Conversation
uuid <14.0.0 is affected by GHSA-9p95-fxvg-qgq2 (Missing buffer bounds check in v3/v5/v6 when buf is provided). Bumping uuid to ^14.0.0 closes this transitive vulnerability for downstream consumers. uuid v14 ships its own type definitions, so @types/uuid is no longer required. uuid v14 also exposes types only via the package "exports" field, which the legacy "classic" moduleResolution does not honor — adding explicit moduleResolution to each tsconfig: - tsconfig.esm.json: moduleResolution = "bundler" (bundler-style resolution, fits module: "esnext") - tsconfig.cjs.json: moduleResolution = "node10" (legacy node, picks up uuid's top-level "types" field) Verified with tsc --noEmit on both configs and biome check.
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.
Summary
Bumps
uuidfrom^9.0.1to^14.0.0to remediate GHSA-9p95-fxvg-qgq2 (uuid: Missing buffer bounds check in v3/v5/v6 when buf is provided). The advisory affects all uuid versions<14.0.0, so consumers of@thingsinc/treejsget flagged by Dependabot via this transitive dependency.Changes
dependencies.uuid:^9.0.1→^14.0.0devDependencies.@types/uuid: removed (uuid v14 ships its own type definitions)tsconfig.esm.json: addedmoduleResolution: "bundler"tsconfig.cjs.json: addedmoduleResolution: "node10"Why the tsconfig changes are needed
uuid v14 publishes its types only through the package
exportsfield. The basetsconfig.jsondoes not specifymoduleResolution, so TypeScript falls back to"classic"resolution which doesn't honorexportsand producesCannot find module 'uuid'during typecheck.To fix this without forcing strict ESM (which would require adding
.jsextensions to all relative imports), the per-build configs explicitly set:bundler— readsexports, no extension requirement, fitsmodule: "esnext"node10— legacy resolution that still finds uuid's top-leveltypesfieldbundlercannot be used withmodule: "commonjs", hence the split.Verification
tsc --noEmit -p tsconfig.esm.json✅tsc --noEmit -p tsconfig.cjs.json✅biome check ./src✅tsc -p tsconfig.cjs.json/tsc -p tsconfig.esm.jsonbuild both succeedsrc/tree.tsisimport { v4 as uuid } from "uuid", identical signature in v14)Notes
npto release0.2.6after merge.bun.lockbbecause I don't have bun installed locally. CI'sbun installshould pick up the new uuid version on first run; please verify.dist/. Source code is unchanged so the existing dist still matches semantically; rebuilding before publish (per the existing convention) will refresh artifacts.🤖 Generated with Claude Code