Skip to content

Clear the npm advisories, move Actions to Node 24, and fix the CLI version check - #160

Merged
blackoutjack merged 5 commits into
mainfrom
chore/ci-and-dependency-maintenance
Aug 22, 2026
Merged

blackoutjack merged 5 commits into
mainfrom
chore/ci-and-dependency-maintenance

Conversation

@blackoutjack

@blackoutjack blackoutjack commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Clears every remaining npm advisory, including the three whose only fix was a semver major and were held back from the v1.0.7 dependency pass, moves the GitHub Actions off the deprecated Node 20 runtime, and fixes a version check that told users their CLI was out of date when it was newer than the floor the plugin builds against. npm audit now reports nothing at any severity, and this supersedes all seven open Dependabot PRs (#134, #138, #139, #148, #150, #159, and #149, whose package websocket-driver is no longer in the tree at all).

Implementation

  • Move GitHub Actions off the deprecated Node 20 runtime: actions/checkout and actions/setup-node to v7, release-drafter to v7.7.0, all on node24 (NV-4884).
  • Clear the uuid and webpack-dev-server advisories: uuid 9 to 14 and webpack-dev-server 5 to 6; @types/uuid removed, since uuid has shipped its own types since v10.
  • Upgrade react-router to 7 to close its last two advisories: the open redirect via backslash in Link and useNavigate, and constructor injection in deserializeErrors().
  • Stop reporting a newer CLI as outdated: isCliOutdated never stopped at the segment that settles the comparison, so any segment below the floor's raised the update prompt; ports the three-way compareCliVersions the IntelliJ plugin already uses (NV-4897).
  • Record 1.0.7 and 1.0.8 in the changelog: v1.0.7 tagged and shipped with no entry at all, since the version bump is automated and the changelog is not; the file ships in the .vsix and is what the Marketplace Changelog tab renders.

Out-of-scope

  • No Jira commit sync here, unlike the sibling repos. A public repository cannot call a reusable workflow stored in an internal one, so the callers were removed from this branch; see NV-4883.
  • The CLI version floor itself is unchanged at 0.15.0. Raising it is what masked the comparison bug (NV-4872), and the next raise to a version with a non-zero patch would have exposed it again.

Verification

make test passes, but it covers only the extension host: nothing in the suite renders the webview, so neither the react-router nor the uuid upgrade is exercised by it. Both were checked by loading the built dist/webview.js in a browser against a stub of the extension-host message channel, and then re-running the identical harness against a bundle built from main. The two behave the same: the app boots, createMemoryRouter and the MainLayout Outlet render, Link navigation between routes works, uuid produces valid v4 request ids, and the only console errors are the same pair the stub provokes on both bundles.

The react-router 7 upgrade was also checked against the webview's actual API surface rather than assumed safe. It uses only the element-based router (createMemoryRouter with path, element, errorElement, children, plus Link, Outlet, useNavigate, useParams), with no loaders, actions, fetchers or Form, so none of the v7 future flags that became default behaviour apply and none of the removed helpers are referenced.

The webpack-dev-server 6 upgrade is not covered by make test either, which never starts the dev server, and it is what forced the ProvidePlugin change. v6 ships as "type": "module", so its client is fully specified ESM; fully specified resolution ignores resolve.extensions entirely, so the bare process/browser specifier could not resolve from it and the dev server compiled with two errors until the plugin was given a resolved path. v5 was CommonJS, which is why this surfaced only on the upgrade. Checked by hand afterwards: the dev server compiles clean, serves webview.js over HTTP 200, and returns the expected CORS header.

react-router 7 hits the same resolution rule from .mjs rather than a second one, which widens the consequence: reverting to the bare specifier was tried in both configurations, and with react-router 6 only the dev server fails while a production build still passes, whereas at HEAD a plain production build fails on its own. The config comment names both dependencies so that dropping either does not read as licence to revert it.

The version-check fix is dated against the CLI's own release tags rather than argued from examples. Replaying all 182 released versions through the old comparison puts 20 of them on the wrong side while the floor was 0.9.5: every release from 0.10.0 onward whose patch was below 5, up to and including 0.16.1. Under the current 0.15.0 floor none of the 182 are misjudged, so the bug is masked rather than absent on main, and either a 1.x release or a floor carrying a non-zero patch restores it. Each of the eight isCliOutdated assertions added here fails against the previous implementation, and the five compareCliVersions cases could not run against it at all.

Every run since the deprecation landed carried an annotation that
actions/checkout@v4 and actions/setup-node@v4 target Node 20 and were
being forced onto Node 24. The v1.0.7 publish ran that way.

- actions/checkout and actions/setup-node to v7, the current major on
  a node24 runtime. Neither uses an option that changed across v5-v7;
  the majors here are runtime bumps
- release-drafter to v7.7.0, also node24, still pinned by commit SHA

The node-version the jobs install was already 24; this is the runtime
the actions themselves execute on.

Part of the estate-wide upgrade tracked in NV-4884: twelve repos still
run actions on Node 20, and five on runtimes older still.
@blackoutjack blackoutjack changed the title Clear the remaining npm advisories and move Actions to Node 24 Clear the npm advisories, move Actions to Node 24, and fix the CLI version check Aug 19, 2026
@blackoutjack
blackoutjack force-pushed the chore/ci-and-dependency-maintenance branch 2 times, most recently from 6985047 to 84346fc Compare August 19, 2026 20:45
Both were held back from the v1.0.7 dependency pass because the only
fix was a semver major. Neither turns out to need a code change.

- uuid 9 -> 14 closes the v3/v5/v6 buffer bounds check advisory. Every
  call site imports { v4 }, which is unchanged; @types/uuid goes, as
  uuid has shipped its own types since v10
- webpack-dev-server 5 -> 6 drops sockjs, which carried the other
  advisory. v6 also ships as "type": "module", so its client is fully
  specified ESM, and fully specified resolution ignores
  resolve.extensions: the bare 'process/browser' specifier the
  ProvidePlugin used could not resolve from it at all. The client logger
  calls process.hrtime(), so it pulls process in, and the dev server
  compiled with two errors until the plugin was given a resolved path.
  v5 was CommonJS, which is why this only surfaced on the upgrade
Clears the open redirect via backslash in Link and useNavigate, and the
arbitrary constructor injection in deserializeErrors(). The repo now
reports no npm advisories at any severity.

The webview uses only the element-based router: createMemoryRouter with
path, element, errorElement and children, plus Link, Outlet, useNavigate
and useParams. It has no loaders, actions, fetchers or Form, so none of
the v7 future flags that became default behaviour apply, and none of the
removed helpers (json, defer, fallbackElement) are referenced.

v7 ships .mjs, so it hits the same fully specified ESM resolution that
the previous commit worked around for webpack-dev-server 6: a bare
'process/browser' specifier cannot resolve from it. That widens the
consequence rather than adding a second cause. Before this commit only
the dev server failed without the resolved path; now a plain production
build does too, so the config comment names both dependencies and says
that dropping either is not licence to revert it.
@blackoutjack
blackoutjack force-pushed the chore/ci-and-dependency-maintenance branch from 84346fc to d5c3388 Compare August 19, 2026 22:37
isCliOutdated walked every version segment and only ever tested for
"older", so it never stopped at the segment that settles the
comparison. Any segment smaller than the floor's raised the update
prompt, however much newer an earlier segment made the version.

- Port the three-way comparison the IntelliJ plugin already uses, so
  the first differing segment decides and later ones are ignored
- Read each segment up to its pre-release suffix, and end the version
  at that segment, so 0.15.3-beta reads as 0.15.3 and 0.15.1-rc.2 as
  0.15.1 rather than sorting above the release it precedes
- Stop at the first segment with no leading number, rather than
  dropping it and sliding every later segment out of position
- Leave a version carrying no numeric segment at all alone rather than
  prompting it, since read as 0.0.0 it sits below every floor

While the floor sat at 0.9.5 this prompted every CLI release from
0.10.0 whose patch was below 5, telling a user on 0.16.1 to move to
0.9.5. Raising the floor to 0.15.0 for NV-4872 masked it, because a
floor whose patch is zero cannot trip the test on the 0.x line, but a
1.x release or any later floor with a non-zero patch brings it back.
@blackoutjack
blackoutjack force-pushed the chore/ci-and-dependency-maintenance branch from d5c3388 to 5e60fab Compare August 19, 2026 23:04
CHANGELOG.md ships in the .vsix and is what the Marketplace renders on
its Changelog tab, and it had fallen two releases behind: the last entry
was 1.0.6, while v1.0.7 shipped and package.json is already on 1.0.8. No
workflow reads the file, so nothing caught the drift.

- 1.0.7 backfilled from the commits between v1.0.6 and v1.0.7: the scan
  reliability work, the CLI version floor, the resolved binary path, and
  the target names that were split on spaces
- 1.0.8 covers this branch: the version comparison, the dependency
  upgrades that clear the last advisories, and the Actions runtime
@blackoutjack
blackoutjack merged commit 200f274 into main Aug 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant