Skip to content

chore: drop unused deps and correct engines.node floor - #42

Merged
finalerock44 merged 1 commit into
mainfrom
chore/drop-unused-deps
Aug 5, 2026
Merged

chore: drop unused deps and correct engines.node floor#42
finalerock44 merged 1 commit into
mainfrom
chore/drop-unused-deps

Conversation

@finalerock44

@finalerock44 finalerock44 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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`.
@finalerock44 finalerock44 self-assigned this Aug 5, 2026
@finalerock44
finalerock44 merged commit adfc845 into main Aug 5, 2026
3 checks passed
@finalerock44
finalerock44 deleted the chore/drop-unused-deps branch August 5, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant