Skip to content

fix(deps): move test runner to 1.x for extract-zip - #532

Merged
uniqueg merged 2 commits into
devfrom
fix/test-runner-extract-zip
Nov 1, 2026
Merged

uniqueg merged 2 commits into
devfrom
fix/test-runner-extract-zip

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Removes extract-zip <= 2.0.1 (GHSA-7pqw-9j4j-h8q3, high, no patched release; Dependabot alert #354, also #340) from the dependency tree by moving the Modern Web test stack to its 1.x line:

  • @web/test-runner ^0.18/^0.19 -> ^1.0.0 in all ten packages
  • root @web/test-runner-playwright ^0.11.0 -> ^1.0.0 (same @web/test-runner-core 1.x as the runner)
  • root @web/dev-server-esbuild ^1.0.2 -> ^2.0.0 (dev-server-core 1.x, used by the shared web-test.runner-config.mjs)

extract-zip came in via @web/test-runner-chrome -> puppeteer-core 22/23 -> @puppeteer/browsers 2.x (exact pin). The 1.x runner uses puppeteer-core 25 -> @puppeteer/browsers 3.x, which no longer depends on it. An overrides entry was not an option: it would cross a major of an exact pin (3.x is ESM-only), and npm did not apply it to the existing lockfile.

The 1.x line needs Node.js 22.12 or later, so the root engines goes from >=18.0.0 to >=22.12.0 and the README says 22.12. CI (22.x, 24.x), Read the Docs (24) and the Dockerfile (24) are already newer. The published packages' dependencies, peerDependencies and engines are unchanged: this only touches dev tooling.

Reachability before this PR: dev-only, and not exercised. extract-zip only runs when @puppeteer/browsers unpacks a downloaded browser, and our tests launch browsers through Playwright.

Closes #527

Verification

  • npm install after the bump: no extract-zip in package-lock.json; nanoid 3.3.20 and js-yaml 3.15.2/4.3.2 from fix(deps): bump nanoid and js-yaml in lockfile #529 kept
  • npm run lint: passed
  • npm run build: passed (docs app included)
  • Tests on Chromium only, with the shared config (Firefox and WebKit are not installed locally): cloud-registry and wes passed. design had 18 passed and 1 failed, the same as with the old runner: the ace editor's JSON worker comes from cdn.jsdelivr.net, which the sandbox blocks. With the new runner, that failed worker load also logs a harmless TypeError ... reading 'has' from watchFilesMiddleware (Koa cannot parse the blob URL; the code is the same in 0.13 and 1.0). It doesn't happen with network access.
  • CI: all checks passed (Lint, Test (Node 22), Test (Node 24): Chromium, Firefox and WebKit, all tests passed, e.g. design 19, cloud-registry 37, wes 7 on Node 24; Read the Docs, CodeQL, Codecov, CI passed)
  • Review: adversarial-reviewer and quality-reviewer, two rounds; the medium finding (root engines) is fixed

Risks and notes

  • This is a major bump of the test tooling. Watch mode (test:watch, wtr --watch with the package-local configs) was not run locally.
  • The 0.x @web/test-runner-core and @web/dev-server-core stay hoisted, because @open-wc/testing -> @web/test-runner-commands 0.9 and the root @web/dev-server ^0.4 need them. The 1.x packages get nested copies. That costs install size only; nothing relies on shared instances today. Deduplicating needs @web/dev-server 1.x and an override for @web/test-runner-commands: left for a follow-up.
  • npm audit now also reaches the existing basic-ftp advisory through @puppeteer/browsers 3 -> proxy-agent. basic-ftp was already in the tree via @turbo/gen. It is not new and is out of scope here.
  • The per-package @web/dev-server / @web/dev-server-esbuild devDeps look unused (only the shared root config imports the esbuild plugin). Cleanup left for a follow-up.

Declined review findings

  • Deduplicate the 0.x/1.x @web cores (low): it needs further majors and an override; it costs install size only. See above.
  • Remove the stale per-package @web/dev-server* devDeps (low): out of scope for an advisory fix.

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Upgrade the development test stack to eliminate the vulnerable extract-zip dependency.

Bug Fixes:

  • Remove the vulnerable extract-zip dependency from the development dependency tree.

Enhancements:

  • Upgrade the Modern Web test tooling to its 1.x line across the workspace.

Build:

  • Raise the minimum supported Node.js version to 22.12.0 and update the development documentation accordingly.

Documentation:

  • Update the README to document the Node.js 22.12 or later requirement.

extract-zip <= 2.0.1 (GHSA-7pqw-9j4j-h8q3) has no patched release. It
came in via @web/test-runner -> @web/test-runner-chrome ->
puppeteer-core -> @puppeteer/browsers 2.x, which pins it.
@puppeteer/browsers 3.x no longer depends on it, and the Modern Web
1.x line pulls it in:

- @web/test-runner ^0.18/^0.19 -> ^1.0.0 in all packages
- @web/test-runner-playwright ^0.11.0 -> ^1.0.0 (same test-runner-core)
- @web/dev-server-esbuild ^1.0.2 -> ^2.0.0 (dev-server-core 1.x, used
  by the shared web-test.runner-config.mjs)

The 1.x line (puppeteer-core 25 included) needs Node.js 22.12 or
later, which CI (22, 24) and the docs (22 or later, now 22.12) expect;
the root engines field goes from >=18.0.0 to >=22.12.0 to match. The
engines of the published packages are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR removes the high-severity, unpatched extract-zip vulnerability from the development dependency tree by upgrading the Modern Web test runner stack and regenerating the lockfile, while aligning the repository's Node.js engine documentation with the new tooling requirement.

Flow diagram for the Node.js requirement update

flowchart LR
    Node[Node.js 22.12 or later] --> Tooling[Modern Web test runner 1.x]
    Tooling --> Repository[Repository development and tests]
    Documentation[README requirement] --> Node
    Engine[package.json engines] --> Node
Loading

File-Level Changes

Change Details Files
Migrated the Modern Web test tooling to its 1.x releases to remove the vulnerable extract-zip dependency from the development dependency tree.
  • Bumped @web/test-runner to ^1.0.0 across all ten package workspaces.
  • Bumped the root Playwright test-runner integration to ^1.0.0 and the esbuild dev-server plugin to ^2.0.0.
  • Regenerated the lockfile and verified extract-zip is no longer present while retaining the previously required dependency resolutions.
package.json
package-lock.json
packages/ecc-client-elixir-cloud-registry/package.json
packages/ecc-client-elixir-drs-filer/package.json
packages/ecc-client-elixir-ro-crate/package.json
packages/ecc-client-elixir-trs-filer/package.json
packages/ecc-client-ga4gh-drs/package.json
packages/ecc-client-ga4gh-service-registry/package.json
packages/ecc-client-ga4gh-tes/package.json
packages/ecc-client-ga4gh-trs/package.json
packages/ecc-client-ga4gh-wes/package.json
packages/ecc-utils-design/package.json
Raised the repository's minimum supported Node.js version to match the 1.x test runner requirements.
  • Changed the root engine requirement to Node.js >=22.12.0.
  • Updated development documentation to require Node.js 22.12 or later.
package.json
README.md

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cloud-components | 🛠️ Build #35555288 | 📁 Comparing 4d79ac4 against latest (188d7d3)

  🔍 Preview build  

2 files changed
± docs/cloud-registry/providers/index.html
± docs/cloud-registry/components/service-create/index.html

@codecov

codecov Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.68%. Comparing base (6f94764) to head (4d79ac4).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #532   +/-   ##
=======================================
  Coverage   70.68%   70.68%           
=======================================
  Files          23       23           
  Lines        5598     5598           
  Branches      188      188           
=======================================
  Hits         3957     3957           
  Misses       1636     1636           
  Partials        5        5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@uniqueg
uniqueg marked this pull request as ready for review November 1, 2026 06:24
@uniqueg
uniqueg requested a review from anuragxxd as a code owner November 1, 2026 06:24

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="packages/ecc-client-elixir-cloud-registry/package.json" line_range="63" />
<code_context>
         "@web/dev-server": "^0.1.34",
         "@web/dev-server-esbuild": "^0.3.0",
-        "@web/test-runner": "^0.19.0",
+        "@web/test-runner": "^1.0.0",
         "commander": "*",
         "concurrently": "^5.3.0",
</code_context>
<issue_to_address>
**Package watch tests cannot start**

When a developer runs `test:watch` in an affected package, `wtr --watch` loads the package-local runner config and its `@web/dev-server-esbuild` 0.x plugin, which is incompatible with the runner’s dev-server-core 1.x stack; watch-mode tests fail to start.

Upgrade the package-local `@web/dev-server-esbuild` plugin to a version compatible with dev-server-core 1.x.

Also at `packages/ecc-client-elixir-drs-filer/package.json:64`, `packages/ecc-client-elixir-trs-filer/package.json:64`, `packages/ecc-client-ga4gh-drs/package.json:61`, `packages/ecc-client-ga4gh-service-registry/package.json:61`, `packages/ecc-client-ga4gh-tes/package.json:57`, `packages/ecc-client-ga4gh-trs/package.json:61`, `packages/ecc-client-ga4gh-wes/package.json:63`, `packages/ecc-utils-design/package.json:60`, `packages/ecc-client-elixir-ro-crate/package.json:34`.
</issue_to_address>

Linked issues

#527 fix(deps): extract-zip advisory via test runner · 1 of 2 met

# Requirement Status Notes
1 Remove vulnerable extract-zip from the dependency tree. ✅ Met The updated package-lock.json has no extract-zip entry.
2 Move the Modern Web test stack to its 1.x/2.x majors in the root and packages. 🟡 Partly met The test runner, root Playwright adapter, and root esbuild plugin are upgraded, but @web/dev-server remains on 0.x and package-level dev-server and esbuild declarations remain on older versions.

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: packages/ecc-client-elixir-cloud-registry/package.json:63


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit b215404 into dev Nov 1, 2026
19 checks passed
@uniqueg
uniqueg deleted the fix/test-runner-extract-zip branch November 1, 2026 07:00
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.

fix(deps): extract-zip advisory via test runner

1 participant