chore: drop unused deps and correct engines.node floor - #42
Merged
Conversation
Remove four dependencies that nothing in the action references: - node-fetch, @types/node-fetch, @octokit/rest, form-data src/ imports only @actions/core and @actions/github, and none of the four appear as a require/import in the built bundle. form-data's 18 textual hits in dist are MIME strings and comments inside undici's own multipart code, not the package; its only dependent was @types/node-fetch, so removing that orphaned it. Rebuilding after removal produces a byte-identical dist/index.js, confirming all four were dead weight. 247 lines drop out of the lockfile, shrinking the surface that generates Dependabot alerts. Also raise engines.node from >=20.0.0 to >=22.19.0. undici 8.x requires >=22.19.0 and is the highest floor in the tree, so the old value was already inconsistent before this change. The action itself runs on action.yml's node24 runtime; this only constrains local dev and CI. Pre-existing and untouched: `tsc --noEmit` reports TS2304 'Cannot find name ErrorOptions' in @octokit/request-error's .d.ts, because tsconfig sets lib: ["es2016"] and ErrorOptions is ES2022. Reproduces identically on main. It does not affect `pnpm build` or `pnpm test`.
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.
Remove four dependencies that nothing in the action references:
src/ imports only @actions/core and @actions/github, and none of the four appear as a require/import in the built bundle. form-data's 18 textual hits in dist are MIME strings and comments inside undici's own multipart code, not the package; its only dependent was @types/node-fetch, so removing that orphaned it. Rebuilding after removal produces a byte-identical dist/index.js, confirming all four were dead weight. 247 lines drop out of the lockfile, shrinking the surface that generates Dependabot alerts.
Also raise engines.node from >=20.0.0 to >=22.19.0. undici 8.x requires
Pre-existing and untouched:
tsc --noEmitreports TS2304 'Cannot find name ErrorOptions' in @octokit/request-error's .d.ts, because tsconfig sets lib: ["es2016"] and ErrorOptions is ES2022. Reproduces identically on main. It does not affectpnpm buildorpnpm test.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.