Drop dead build deps and refresh the lockfile - #38
Merged
Conversation
This clears all 35 open Dependabot alerts. Every alert came from pnpm-lock.yaml, but 12 of them had runtime scope, which pointed at a packaging defect rather than at a stale lockfile. - Remove `babel-loader`, `install`, and `@thinknimble/tn-utils` from `dependencies`. None of the three appears in src, test, or dist. `babel-loader` put the whole webpack and Babel chain into every consumer install, which is what gave 12 alerts runtime scope. - Delete webpack.config.js and its four dev dependencies. No script calls it; the build script is `tsup src/index.ts`. - Remove the `@types/expect` dev dependency. It is a deprecated stub that holds no type definitions, and the tests assert with `assert`. - Update the remaining dev toolchain inside its semver ranges. - Override `serialize-javascript` to >= 7.0.5. Mocha 11 still pins ^6.0.2, so no upgrade path exists. The only break in v7 is a Node 20 minimum, and CI runs Node 22. The lockfile goes from 1266 packages to 992. The built output is unchanged.
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.
What This Does
Clears all 35 open Dependabot alerts on this repository.
Every alert pointed at
pnpm-lock.yaml, which for a published library affects only contributors and CI. But 12 alerts carried runtime scope, and that turned out to be a real packaging defect:babel-loadersat independencies, so every consumer of@thinknimble/tn-formsinstalled the whole webpack and Babel chain. Alongside it,install(the well-known no-op package) and@thinknimble/tn-utilswere also declared as runtime dependencies. None of the three appears insrc,test, or the builtdist, so all three are removed. That leavesdependenciesat exactly what the source imports:email-validator,libphonenumber-js, andluxon.webpack.config.jsgoes with them. No script calls it — the build script istsup src/index.ts— so it and its four dev dependencies (webpack,webpack-cli,ts-loader,source-map-loader) are dead weight.The
@types/expectdev dependency is also removed. It is a deprecated stub package that contains no type definitions and only resolved by accident through theexpectpackage it depends on; refreshing the lockfile broke that accident and failedtsc. The tests assert withassert, so nothing needed it.The rest of the dev toolchain is updated inside its existing semver ranges. That leaves only
serialize-javascript, which mocha pins at^6.0.2even on the latest 11.8.0, so no upgrade path exists — it takes a pnpm override to>=7.0.5. The single breaking change in v7.0.0 is a Node 20 minimum, and CI runs Node 22.The lockfile drops from 1266 packages to 992, and the built output is byte-for-byte identical in size.
Note for reviewers
The one judgment call is removing
@thinknimble/tn-utilsfromdependencies. It generates no alerts, so it is not strictly part of the security fix, and it is the one change a consumer could feel: anyone who imports@thinknimble/tn-utilsand gets it only because npm's flat install hoisted it out of this package would break. That consumer is already relying on undeclared behavior, and pnpm users would already be broken — but if you would rather keep this PR strictly to the alerts, that one line is easy to drop before merge.The changeset marks this
minorfor the same reason: the public API is untouched, but three runtime dependencies disappear.