chore(deps): clear security advisories and block the unusable TypeScript 7 major - #21
Merged
Merged
Conversation
npm audit reported two high-severity issues in transitive deps of astro: - sharp <0.35.0 inherited libvips CVEs (GHSA-f88m-g3jw-g9cj) - svgo 4.0.0-4.0.1 removeScripts left executable scripts intact (GHSA-2p49-hgcm-8545) Lockfile-only bump: sharp 0.34.5 -> 0.35.3, svgo 4.0.1 -> 4.0.2. npm audit now reports 0 vulnerabilities and validate stays green.
TypeScript 7 is the native (Go) compiler and no longer ships the programmatic API that Volar, and therefore `astro check`, depends on. @astrojs/check caps its peer range at ^5 || ^6 for that reason, so the grouped bump in #19 fails `npm ci` on the peer conflict; forcing past it with an override installs cleanly but then `npm run typecheck` aborts with 'the TypeScript module loaded does not expose the programmatic API'. Ignore the typescript major until upstream lands support, tracked at withastro/roadmap#1321
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.
Supersedes #19, which cannot be merged.
Why the TypeScript 7 bump in #19 is not viable
TypeScript 7 is the native (Go) compiler rewrite. Its npm package no longer
ships the classic programmatic API — the
.export is literally justlib/version.cjs, a version string, with the new API behind./unstable/*:Volar — and therefore
@astrojs/language-serverandastro check— needs thatclassic API, so
@astrojs/checkcaps its peer range at^5 || ^6. This is areal incompatibility, not stale metadata:
npm cifails outright on the peer conflict (this is the red CI on chore(deps-dev): bump typescript from 6.0.3 to 7.0.2 in the npm-dependencies group #19).overridesentry installs fine, butnpm run typecheckthen aborts: "The TypeScript module loaded (found 7.0.2) does not expose the
programmatic API that
astro checkrelies on."@astrojs/checkdoes not work either — npmhoists 7.0.2 to the root,
astro checkstill loads it, and the tree is leftin an invalid (
ELSPROBLEMS) state.@astrojs/checksupports TS 7 yet(latest is 0.9.10; the alpha/beta tags are older).
Swapping
astro checkfor TS 7'stsc --noEmitwould make CI green but silentlygut coverage. Measured on this repo with a deliberate type error planted in
src/components/Product.astro:.tsfiles.astrofilesastro checkProduct.astro:19tsc --noEmitHalf the source (8
.astrofiles — every component plus the only page) would stopbeing type-checked. Not worth it for a compiler the project never invokes directly.
What this PR does instead
Ignore the TypeScript major in Dependabot until upstream lands support, so the
broken PR stops being regenerated weekly. Tracked at
withastro/roadmap#1321 — remove the
ignoreblock once@astrojs/checksupports TS 7.Clear both high-severity advisories that were already present on
main(lockfile-only, transitive under
astro):sharp0.34.5 -> 0.35.3 — inherited libvips CVEs (GHSA-f88m-g3jw-g9cj)svgo4.0.1 -> 4.0.2 —removeScriptsleft executable scripts intact (GHSA-2p49-hgcm-8545)Verification
npm ci && npm run validatefrom a cleannode_modules: 0 errors, 0 warnings,0 hints, build completes, 4 pages emitted.
npm auditnow reports 0 vulnerabilities(was 2 high).