Skip to content

Drop dead build deps and refresh the lockfile - #38

Merged
whusterj merged 1 commit into
mainfrom
fix/drop-dead-build-deps
Aug 18, 2026
Merged

Drop dead build deps and refresh the lockfile#38
whusterj merged 1 commit into
mainfrom
fix/drop-dead-build-deps

Conversation

@whusterj

Copy link
Copy Markdown
Member

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-loader sat in dependencies, so every consumer of @thinknimble/tn-forms installed the whole webpack and Babel chain. Alongside it, install (the well-known no-op package) and @thinknimble/tn-utils were also declared as runtime dependencies. None of the three appears in src, test, or the built dist, so all three are removed. That leaves dependencies at exactly what the source imports: email-validator, libphonenumber-js, and luxon.

webpack.config.js goes with them. No script calls it — the build script is tsup src/index.ts — so it and its four dev dependencies (webpack, webpack-cli, ts-loader, source-map-loader) are dead weight.

The @types/expect dev dependency is also removed. It is a deprecated stub package that contains no type definitions and only resolved by accident through the expect package it depends on; refreshing the lockfile broke that accident and failed tsc. The tests assert with assert, 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.2 even 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-utils from dependencies. 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-utils and 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 minor for the same reason: the public API is untouched, but three runtime dependencies disappear.

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.
@whusterj
whusterj merged commit e5efec8 into main Aug 18, 2026
1 check passed
@whusterj
whusterj deleted the fix/drop-dead-build-deps branch August 18, 2026 19:50
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