Repository navigation
feat(dependency-audit): support Node >=20.19 with a 20/24/26 CI matrix - #48
Merged
Merged
Conversation
Deploying mawesome with
|
| Latest commit: |
beb40c6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3f67e115.mawesome.pages.dev |
| Branch Preview URL: | https://feat-node-20-support.mawesome.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR widens the supported Node.js runtime range for @mawesome/dependency-audit to include Node 20 (from 20.19+) while keeping the monorepo’s development/tooling floor at Node >=24.12, and adds CI coverage to validate the package across supported Node lines.
Changes:
- Broaden
packages/dependency-auditruntimeengines.nodeto^20.19.0 || >=22.9.0. - Lower build output target to
node20.19so emitted syntax aligns with the package’s engines floor. - Add a CI “node-compat” matrix job (Node 20/24/26) and adjust CLI tests to run from
distwhen native TS type-stripping isn’t available.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/dependency-audit/tsdown.config.ts | Lowers build target to node20.19 to match the widened runtime floor. |
| packages/dependency-audit/test/cli.test.ts | Switches CLI invocation to TS source only when native type-stripping is available; otherwise uses built JS. |
| packages/dependency-audit/package.json | Widens engines.node to include Node 20.19+ and 22.9+. |
| .github/workflows/verify.yml | Adds a Node compatibility CI job testing Node 20/24/26 by running vitest directly and smoke-testing the built CLI. |
| .changeset/node-20-support.md | Adds a changeset for a minor release documenting the widened Node support range. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merged
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.
What
Widen
@mawesome/dependency-audit's supported Node range from>=24.12.0to^20.19.0 || >=22.9.0, and add a CI compat matrix that tests the package on Node 20, 24, and 26 (each resolved to the latest minor/patch).Why
Nothing in the published artifact actually needs Node 24 — the old
enginesvalue mirrored the monorepo's toolchain floor (internal.tsscripts rely on native type stripping), not the package's real runtime floor. The real floor is set by:pacote/npm-packlistdeclaringengines: ^20.17.0 || >=22.9.0(hence the disjoint range — Node 21 and 22.0–22.8 stay excluded), andstyleText(..., { stream }), whose options argument landed in Node 20.18.The monorepo root intentionally keeps
engines/devEnginesat>=24.12.0; it is private and never published, so the root constraint only governs developing the repo.How
packages/dependency-audit/package.json—engines.node→^20.19.0 || >=22.9.0.tsdown.config.ts—target: 'node24'→'node20.19'in all three build configs, so emitted syntax can never silently exceed the engines floor.test/cli.test.ts— the CLI tests spawnednode src/cli.ts, which requires native type stripping (unavailable on Node 20) — the only real Node 20 breakage. They now spawn the TS source whenprocess.features.typescriptis truthy and fall back to the builtdist/cli.jsotherwise..github/workflows/verify.yml— newnode-compatjob: matrix[20, 24, 26]withcheck-latest: true,fail-fast: false. It installs and builds on Node 24 (the toolchain floor), switches to the matrix Node, runs vitest directly (pnpm enforces the rootengineson everypnpm run, so it cannot run on Node 20), then smoke-tests the built CLI (--version+ a self-audit of the package directory).Testing
pnpm verifygate passes on Node 24.