| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR reduces the size of the built JavaScript shipped on release branches by enabling esbuild minification when building for releases/v* (and related release-automation branches), while keeping main builds unminified to avoid high-churn bundle conflicts in day-to-day development.
Changes:
| File | Description |
|---|---|
| CHANGELOG.md | Adds a release note describing minified bundles on release branches. |
| build.mjs | Detects release/release-automation branches and conditionally enables esbuild minification. |
| .github/update-release-branch.py | Ensures release automation rebuilds the Action on conflict-free merges so minified artifacts are produced when appropriate. |
Sorry, something went wrong.
| function shouldMinify() { | ||
| const override = process.env.CODEQL_ACTION_MINIFY; | ||
| if (override === "true") return true; | ||
| if (override === "false") return false; |
| return execFileSync("git", ["rev-parse", "--abbrev-ref", "HEAD"], { | ||
| encoding: "utf-8", | ||
| stdio: ["pipe", "pipe", "ignore"], | ||
| }).trim(); |
| # For backports, the only source-level change vs the source branch is the new version number, | ||
| # so we just need to refresh the version embedded in `lib/`. | ||
| run_command('npm', 'ci') | ||
| # We only expect changes to the JavaScript output, rebuilding e.g. the PR checks is unnecessary. |
|
High-level comment: consider how minification may affect stack traces and whether that is worth an extra 20% reduction in size. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Minify the JS bundle on release branches to reduce the size of the .tar.gz'd Action checkout by a further ~20%.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist