| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This PR reworks the esbuild output structure to reduce duplicated bundled code across the action entrypoints by introducing a shared entry-points bundle and small per-action wrapper entry files that call into it.
Changes:
| File | Description |
|---|---|
| upload-sarif/action.yml | Point main/post to new wrapper bundles. |
| start-proxy/action.yml | Point main/post to new wrapper bundles. |
| setup-codeql/action.yml | Point main to new wrapper bundle. |
| resolve-environment/action.yml | Point main to new wrapper bundle. |
| init/action.yml | Point main/post to new wrapper bundles. |
| analyze/action.yml | Point main/post to new wrapper bundles. |
| autobuild/action.yml | Point main to new wrapper bundle. |
| build.mjs | Switch entrypoints to *-entry.ts + entry-points.ts; externalize ./entry-points to reduce duplication. |
| src/entry-points.ts | New shared entrypoint module that dispatches to each action’s runWrapper(). |
| src/analyze-entry.ts | New analyze wrapper entrypoint that calls into entry-points. |
| src/analyze-post-entry.ts | New analyze-post wrapper entrypoint that calls into entry-points. |
| src/autobuild-entry.ts | New autobuild wrapper entrypoint that calls into entry-points. |
| src/init-entry.ts | New init wrapper entrypoint that calls into entry-points. |
| src/init-post-entry.ts | New init-post wrapper entrypoint that calls into entry-points. |
| src/resolve-environment-entry.ts | New resolve-environment wrapper entrypoint that calls into entry-points. |
| src/setup-codeql-entry.ts | New setup-codeql wrapper entrypoint that calls into entry-points. |
| src/start-proxy-entry.ts | New start-proxy wrapper entrypoint that calls into entry-points. |
| src/start-proxy-post-entry.ts | New start-proxy-post wrapper entrypoint that calls into entry-points. |
| src/upload-sarif-entry.ts | New upload-sarif wrapper entrypoint that calls into entry-points. |
| src/upload-sarif-post-entry.ts | New upload-sarif-post wrapper entrypoint that calls into entry-points. |
| src/analyze-action.ts | Export runWrapper() and remove import-time execution (runPromise/top-level invocation). |
| src/analyze-action-post.ts | Export runWrapper() and remove top-level invocation. |
| src/autobuild-action.ts | Export runWrapper() and remove top-level invocation. |
| src/init-action.ts | Export runWrapper() and remove top-level invocation. |
| src/init-action-post.ts | Export runWrapper() and remove top-level invocation. |
| src/resolve-environment-action.ts | Export runWrapper() and remove top-level invocation. |
| src/setup-codeql-action.ts | Export runWrapper() and remove top-level invocation. |
| src/start-proxy-action.ts | Export runWrapper() and remove top-level invocation. |
| src/start-proxy-action-post.ts | Export runWrapper() and remove top-level invocation. |
| src/upload-sarif-action.ts | Export runWrapper() and remove top-level invocation. |
| src/upload-sarif-action-post.ts | Export runWrapper() and remove top-level invocation. |
| src/analyze-action-input.test.ts | Update test to call runWrapper() instead of awaiting a removed runPromise. |
| src/analyze-action-env.test.ts | Update test to call runWrapper() instead of awaiting a removed runPromise. |
| lib/analyze-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/analyze-post-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/autobuild-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/init-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/init-post-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/resolve-environment-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/setup-codeql-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/start-proxy-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/start-proxy-post-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/upload-sarif-entry.js | Generated wrapper bundle output (not reviewed). |
| lib/upload-sarif-post-entry.js | Generated wrapper bundle output (not reviewed). |
Sorry, something went wrong.
There was a problem hiding this comment.
I'd like to see a couple of things addressed, but it can be done as followup.
Sorry, something went wrong.
|
@henrymercer I agree with all points. I will merge this and then prepare a follow-up PR to address the comments. |
Sorry, something went wrong.
Address review comments for github#3899
| Back | FazBrowse Home | New Git URL |
Currently, we have a lot of duplication across the JS bundles that esbuild produces for each entry point. This PR fundamentally changes this as follows:
This reduces the size of the compressed repo. I tested the impact of this locally with a fresh, shallow checkout of the repo:
The resulting .tar.gz file is around ~2.9M. This is approximately a 70% reduction in archive size.
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