Fix self-contradictory web assets guidelines #1539

Merged
james merged 2 commits from gotmax23/packaging-guidelines:web-no-self-contradict into main 2026-06-11 16:16:43 +00:00
2 changed files with 10 additions and 16 deletions

View file

@ -20,12 +20,6 @@ Node.js xref:Node.js.adoc[have their own guidelines],
and software like GNOME which embeds JavaScript for extensions
have their own directories and policies as well.
Packages containing JavaScript should make the best effort to regenerate any precompiled/minimized JS wherever possible,
as this leads to more maintainable packages.
Where this would result in a significant hardship,
the bundled pregenerated JS may be shipped with a specfile comment explaining the decision.
This does not eliminate the requirement to validate licenses of bundled code.
== Naming Guidelines
The name of a JavaScript library package MUST start with
@ -106,17 +100,19 @@ or to eliminate needless deviation from upstream.
== Compilation/Minification
If a JavaScript library typically is shipped as minified or compiled code,
it MUST be compiled or minified as part of the RPM build process.
Shipping pre-minified or pre-compiled code is unacceptable in Fedora.
it SHOULD be compiled or minified as part of the RPM build process,
as this leads to more maintainable packages.
Where this would result in a significant hardship,
the bundled pregenerated JS may be shipped with a specfile comment explaining the decision.
This does not eliminate the requirement to validate licenses of bundled code.
The compiler or minifier used by upstream
should be used to compile or minify the code.
When regenerating bundled JS, the same compiler or minifier used by upstream
should be used to compile or minify the code during the RPM build process.
If the minifier used by upstream is unable to be included in Fedora,
an alternative minifier may be used.
See https://fedoraproject.org/wiki/JavaScript/Minification_Issues[this page]
for a list of known problem areas and suggestions for workarounds.
Additionally, the uncompiled/unminified version MUST be included
Additionally, the uncompiled/unminified version SHOULD be included

I'm gonna note for the record that I do not understand exactly what is being asked for here. Should I ship the full-size JavaScript in the same RPM that ships the minified one? Or just include in the SRPM?


Nevertheless, this rule already existed before and now is just MUST->SHOULD, so my curiosity should not block this PR.

I'm gonna note for the record that I do not understand exactly what is being asked for here. Should I ship the full-size JavaScript in the same RPM that ships the minified one? Or just include in the SRPM? --- Nevertheless, this rule already existed before and now is just MUST->SHOULD, so my curiosity should not block this PR.
alongside the compiled/minified version.
Minified JavaScript is not useful for JavaScript run locally,

View file

@ -102,12 +102,10 @@ unless stated otherwise in this document.
Pure CSS frameworks can be included as-is.
CSS frameworks that use an alternative language that compiles to CSS,
such as https://lesscss.org/[LESS],
must compile to CSS as part of the build process.
Packages containing CSS should make the best effort to regenerate any precompiled/minimized CSS wherever possible,
SHOULD compile to CSS as part of the build process,
as this leads to more maintainable packages.
Where this would result in a significant hardship,
the bundled pregenerated CSS may be shipped with a specfile comment explaining the decision.
bundled pregenerated CSS may be shipped with a specfile comment explaining the decision.
This does not eliminate the requirement to validate licenses of bundled content.
== Flash