Skip to content

Action size: Reduce duplication between upload-lib and entry-points#3912

Open
henrymercer wants to merge 1 commit into
mainfrom
henrymercer/smaller-upload-lib
Open

Action size: Reduce duplication between upload-lib and entry-points#3912
henrymercer wants to merge 1 commit into
mainfrom
henrymercer/smaller-upload-lib

Conversation

@henrymercer
Copy link
Copy Markdown
Contributor

Reduce the duplication between upload-lib and entry-points by exporting lib/upload-lib.js from entry-points and having lib/upload-lib.js simply re-export those exports instead of duplicating implementations.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Only impacts internal workflows that were directly importing upload-lib.

How did/will you validate this change?

  • Test repository - This change will be tested on a test repository before merging.

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

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?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@github-actions github-actions Bot added the size/S Should be easy to review label May 18, 2026
@henrymercer
Copy link
Copy Markdown
Contributor Author

Passed internal testing, so marking as ready for review.

@henrymercer henrymercer marked this pull request as ready for review May 19, 2026 14:58
@henrymercer henrymercer requested a review from a team as a code owner May 19, 2026 14:58
Copilot AI review requested due to automatic review settings May 19, 2026 14:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 uploadLib namespace export to the generated shared entry point.
  • Updates the build script to stop bundling upload-lib.ts as a separate esbuild entry point.
  • Generates a lib/upload-lib.js stub that re-exports uploadLib from entry-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 thread build.mjs
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`,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Should be easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants