Action size: Reduce duplication between upload-lib and entry-points#3912
Open
henrymercer wants to merge 1 commit into
Open
Action size: Reduce duplication between upload-lib and entry-points#3912henrymercer wants to merge 1 commit into
upload-lib and entry-points#3912henrymercer wants to merge 1 commit into
Conversation
Contributor
Author
|
Passed internal testing, so marking as ready for review. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces bundled JavaScript duplication by making upload-lib available through the shared entry-points bundle and generating a small stub for lib/upload-lib.js.
Changes:
- Adds an
uploadLibnamespace export to the generated shared entry point. - Updates the build script to stop bundling
upload-lib.tsas a separate esbuild entry point. - Generates a
lib/upload-lib.jsstub that re-exportsuploadLibfromentry-points.
Show a summary per file
| File | Description |
|---|---|
build.mjs |
Updates bundle generation to expose upload-lib through entry-points and emit a stub. |
lib/entry-points.js |
Generated bundle output reflecting the new uploadLib namespace export. |
Copilot's findings
- Files reviewed: 1/3 changed files
- Comments generated: 1
Comment on lines
+183
to
+188
| // and expect the same shape as before, so we expose the namespace as `module.exports`. | ||
| await writeFile( | ||
| join(OUT_DIR, "upload-lib.js"), | ||
| `// Automatically generated stub re-exporting '${UPLOAD_LIB_SRC}.ts' from '${SHARED_ENTRYPOINT}.js'.\n\n` + | ||
| `"use strict";\n\n` + | ||
| `module.exports = require("./${SHARED_ENTRYPOINT}").${UPLOAD_LIB_EXPORT};\n`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduce the duplication between
upload-libandentry-pointsby exportinglib/upload-lib.jsfromentry-pointsand havinglib/upload-lib.jssimply re-export those exports instead of duplicating implementations.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Only impacts internal workflows that were directly importing
upload-lib.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?
Internal only.
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist