chore: update nanoid to 3.3.18, clearing the last advisory - #20
Merged
Conversation
Dependabot alert #6 states it "cannot update nanoid to a non-vulnerable version", naming @tailwindcss/postcss and next as conflicting dependencies. That is not correct, and the alert's own text contains the refutation. Both constraints are nanoid@^3.3.16. The caret range means >=3.3.16 <4.0.0, which admits 3.3.18. And 3.3.18 is published: the 3.x line runs to 3.3.18, carrying the "legacy" dist-tag. Nothing in the tree ever forbade it. The lockfile was simply pinned at 3.3.16 and no top-level bump existed to make Dependabot revisit it. Dependabot resolves a transitive advisory by looking for a release of the package that introduces it. Neither @tailwindcss/postcss nor next has published one that raises its own floor, so it reported the update as impossible. It is not impossible; it just is not reachable by the strategy Dependabot uses. `npm update nanoid --package-lock-only` moves the single lockfile entry from 3.3.16 to 3.3.18. Three lines. No package.json change, no dependency bump, and no `overrides` entry, which is what the alert suggested as the fallback. npm audit now reports 0 vulnerabilities, down from 1. Verified -------- Full install, lint, tsc --noEmit and build all clean. `npm run brand` writes fifteen files byte-identical to those committed, so the CI guard passes. npm audit reports zero.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Closes Dependabot alert #6. Three lines in the lockfile, and
npm auditgoes to zero.The alert is wrong, and its own text contains the refutation
Both constraints are
^3.3.16. The caret range means>=3.3.16 <4.0.0, which admits 3.3.18. The named "conflicting dependencies" do not conflict with the fix.And 3.3.18 exists. From the registry:
Nothing in the tree ever forbade it. The lockfile was simply pinned at 3.3.16, and no top-level bump existed to make Dependabot revisit the entry.
Why Dependabot said otherwise
It resolves a transitive advisory by looking for a release of the package that introduces the dependency. Neither
@tailwindcss/postcssnornexthas published one that raises its own nanoid floor, so it reported the update as impossible.It is not impossible. It just is not reachable by the strategy Dependabot uses. The distinction matters, because the alert's suggested fallback was an
overridesentry — a permanent, hand-maintained pin that would then need removing later. None of that is necessary.The change
package-lock.jsonpackage.jsonoverridesentrynpm auditVerified
npm install --ignore-scriptsnpm run lintnpx tsc --noEmitnpm run buildnpm run brandnpm auditWhat this means for the standing position
F25 was recorded as an accepted open advisory with the constraint named. That record was accurate about what the alert said and wrong about what was possible. It should be closed as resolved, not accepted.
Worth keeping as a general point: a tool reporting that it cannot fix something is a statement about the tool's strategy, not necessarily about the dependency graph. The semver ranges were readable, and reading them took less time than writing the acceptance rationale did.