Fix dependencies - #10
Merged
Merged
Conversation
…r loads `npm audit` reported GHSA-67mh-4wv8-2f99 against `esbuild@0.18.20`, reached only through `@esbuild-kit/esm-loader` and `@esbuild-kit/core-utils` under `drizzle-kit`. Both of those packages are deprecated on npm with the same message, `Merged into tsx`, and the loader is vestigial: the string `esbuild-kit` appears nowhere in the installed `drizzle-kit` except the dependency entry in its own `package.json`. Its `bin.cjs` loads TypeScript through `tsx`, which it also declares, and which is what `src/test-support/apply-schema.ts` already says it registers. The specifier is never resolved, so nothing that runs here was ever exposed. The override points the dead specifier at the package it was merged into, which drops the whole 0.18 subtree and its `buffer-from`, `get-tsconfig`, `resolve-pkg-maps` and `source-map-support`. Nothing else in the lockfile changes version; the large textual diff is npm reordering keys. Overriding `esbuild` under `@esbuild-kit/core-utils` instead would silence the same advisory, and was refused. That forces seven minors of a pre-1.0 package onto a shim whose own range is `~0.18.20` and whose last publish was 2023, which is a change to code that would run rather than to a path nothing resolves. What it buys is one fewer esbuild install: the alias resolves `tsx` to a version `drizzle-kit`'s own copy is not pinned at, so their esbuilds do not dedupe and the tree carries three. That is a platform binary in a devDependency, against a compatibility bet on an unmaintained package. `npm run typecheck`, `npm run build` and `npm run lint` pass. The remaining two advisories, `fast-uri` and `fastify`, are untouched by this and were already in the tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`npm audit fix` bumped both copies, and only those: `fast-uri` 3.1.5 to 3.1.8 under `ajv`, which wants `^3.0.1`, and 4.1.2 to 4.2.1 under `fast-json-stringify`, which wants `^4.0.0`. Both are patch moves inside the declared range, so `package.json` is untouched and nothing else in the lockfile changes version. The two copies stay two because the ranges are different majors. Unlike the esbuild entry before it, this one sits on a path that runs. `ajv` validates requests and `fast-json-stringify` serialises responses, so both copies are under every route the Gateway registers. The advisories are host confusion and SSRF in URI parsing, which is what `fast-uri` is there to do. `npm run typecheck`, `npm run build` and `npm run lint` pass. What is left is `fastify` at 5.11.0, where the fix is outside the stated range: the devDependency pin and the `^5.11.0` peer both have to move, which is a decision about what a consumer is asked to install rather than a lockfile bump. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| @@ -158,5 +158,8 @@ | |||
| "peerDependencies": { | |||
| "drizzle-orm": "^0.45.2", | |||
| "fastify": "^5.11.0" | |||
There was a problem hiding this comment.
we should upgrade this also to 5.12.5, I think
The exact devDependency pin was the only thing holding this tree at 5.11.0. It was written on 2026-08-01 in 2c2d22f, two days after 5.11.0 was published and in the commit that made fastify a peer dependency, so it was current that week and has not been touched since. Ten releases have landed since then. What it answers is GHSA-w2qp-rph6-63g4, a schema validation bypass through root primitive coercion, and GHSA-3m5p-2c4r-xxw2, X-Forwarded-* spoofing under a trustProxy hop count. The first of those is why this bump is not a lockfile formality: a response schema here is a serialiser and its drift is silent, so the change was held against the whole suite rather than a build. The peer range moves with it. Both advisories are in fastify itself and fastify is a peer, so this lockfile constrains nobody: the range is the only place the package states what a consumer must install, and `^5.11.0` admitted the fix without requiring it. Both are first patched in 5.12.1, so `^5.12.1` was the other candidate. 5.12.5 is the version the 530 tests actually run against, and one number across the manifest, the four examples and `site/guide.md` is a thing a reader can check. What that costs is an ERESOLVE for a consumer pinned between 5.12.1 and 5.12.4, a month of releases, every one of them a single patch from satisfying the range. The five other copies move with it. They are not a record of the peer range: a deployment is its own npm application and declares fastify itself, so step 1 of `site/guide.md` is a manifest to paste and the examples are applications. No check anywhere compares one of them against this file, so leaving them behind hands a reader a range below the minimum stated here. `npm run check` passes against a real PostgreSQL, 530 tests, and `npm run check:package` passes, which is what proves the one value import of fastify still resolves from the installed tarball. `npm audit` reports nothing at all, the first time it has in this branch. Only fastify moves in the lockfile, and the root `peerDependencies` mirror with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jannikluhn
force-pushed
the
fix/deps
branch
from
September 23, 2026 15:54
dabf815 to
d8904a8
Compare
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.
Fixes the three dependency issues raised by
npm audit