Repository navigation
build(deps): align dev tools in the packages - #561
Conversation
Remove tsup from the packages: scripts/build.js requires the root's copy, so theirs were never used. Raise the root's minimum to 8.5.0, past the advisory's range. Move @web/dev-server-esbuild to the root's 2.x, so that esbuild up to 0.24.2 leaves the lockfile. Closes #557 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR removes unused vulnerable package-local tsup dependencies, raises the shared tsup version, and upgrades eight packages to @web/dev-server-esbuild 2.x. The lockfile is regenerated to eliminate obsolete vulnerable dependency versions, while build output, dependency integrity, and representative dev-server behavior are verified; browser tests remain CI-only. Flow diagram for removing vulnerable dependency versionsflowchart TD
OldTsup[Package-local tsup 7.2.0] --> Remove[Remove unused declarations]
RootTsup[Root tsup 8.0.2] --> Upgrade[Raise to tsup 8.5.0]
OldEsbuild[dev-server-esbuild 0.3.x or 0.4.x] --> Align[Align to 2.0.0]
Remove --> Lockfile[Regenerate package-lock.json]
Upgrade --> Lockfile
Align --> Lockfile
Lockfile --> Verify[npm ci and npm run lint pass]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #561 +/- ##
=======================================
Coverage 70.89% 70.89%
=======================================
Files 23 23
Lines 5638 5638
Branches 190 190
=======================================
Hits 3997 3997
Misses 1636 1636
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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="62" />
<code_context>
"@typescript-eslint/parser": "^5.48.0",
"@web/dev-server": "^0.1.34",
- "@web/dev-server-esbuild": "^0.3.0",
+ "@web/dev-server-esbuild": "^2.0.0",
"@web/test-runner": "^1.0.0",
"commander": "*",
</code_context>
<issue_to_address>
**Browser tests use incompatible server APIs**
When browser tests run using the changed plugin with the existing workspace dev-server versions, the test-runner configs load `esbuildPlugin` against each workspace's `@web/dev-server` 0.1.x, whose lockfile entry uses `@web/dev-server-core` 0.4.1; the upgraded plugin brings core 1.0.1. If the plugin uses the newer core API, its transform hook is incompatible with the server hosting it, and browser tests fail when serving TypeScript modules.
Align the workspace dev-server versions with the plugin's supported core API, or retain a plugin version compatible with the current servers.
Also at `packages/ecc-client-elixir-drs-filer/package.json:63`, `packages/ecc-client-elixir-trs-filer/package.json:63`, `packages/ecc-client-ga4gh-drs/package.json:60`, `packages/ecc-client-ga4gh-service-registry/package.json:60`, `packages/ecc-client-ga4gh-trs/package.json:60`, `packages/ecc-client-ga4gh-wes/package.json:62`, `packages/ecc-utils-design/package.json:59`.
</issue_to_address>Linked issues
#557 build(deps): align dev tools in the packages · 2 of 3 met · 1 to check by hand
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Remove the vulnerable package-local tsup declarations and ensure no tsup up to 8.3.4 remains in the lockfile. | ✅ Met | The package manifests no longer declare tsup; the root declares ^8.5.0 and the lockfile’s tsup entry is 8.5.0. |
| 2 | Align @web/dev-server-esbuild and ensure no esbuild up to 0.24.2 remains in the lockfile. | ✅ Met | All eight package declarations use ^2.0.0; the lockfile’s esbuild entries are 0.25.0 and 0.28.2. |
| 3 | Ensure the builds, tests and packages’ dev servers still work. | 👀 Check by hand (runtime) | Confirm the test suite and dev servers for all applicable packages pass; the PR reports build/lint success and two dev-server checks, but says browser tests were not run locally. |
Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: packages/ecc-client-elixir-cloud-registry/package.json:62
The newer esbuild reads experimentalDecorators only from a tsconfig, so the packages' own web-test-runner configs failed on Lit decorators with a syntax error. Pass the package's tsconfig and the target, as the root config does. CI doesn't run these configs; `test:watch` does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Resolve conflicts from the dev-tools alignment (#561): drop the unused tsup dev dependency, keep tw-animate-css, take dev's esbuild tsconfig setting in the test runner, and regenerate the lockfile with npm 9.2.0.
Summary
Removes the old dev tools behind 12 Dependabot alerts. Light lane: dev dependencies and test configuration only, no component code. I reviewed the diff myself.
tsup(11 low alerts, GHSA-3mv9-4h5g-vhg3): removed from the nine packages that declared^7.2.0.scripts/build.jsrequirestsupfrom the root, which already has 8.5.0, so those copies were never used. The root's minimum goes from^8.0.2to^8.5.0, past the advisory's range. Moving the packages to^8.5.0instead fails to resolve (ERESOLVE, throughtsup's optionaltypescriptpeer).esbuild(1 medium alert, GHSA-67mh-4wv8-2f99):@web/dev-server-esbuildmoves from^0.3.0and^0.4.3to the root's^2.0.0in the eight packages that declare it, which takesesbuild0.17 and 0.18 out of the lockfile. The lowest version left is 0.25.0.Package test configs: the newer
esbuildreadsexperimentalDecoratorsonly from a tsconfig, so the packages' ownweb-test-runner.config.mjsfiles (used bytest:watch, not by CI) now passtsconfigandtarget, as the root config does.The lockfile shrinks by about 8,700 lines.
How it was verified
npm ci, thennpm run lint(includes the build of all packages and the docs): 19 of 19 tasks pass.tw-styles.tsfiles are byte-identical to the earlierdevbaseline, and the docs export has the same number of files (175).npm lsreports nothing invalid or missing.wdsstarts inecc-client-ga4gh-wesandecc-utils-design, and serves/demo/with status 200. Theweb-dev-server.config.mjsfiles only mention theesbuildplugin in comments.ecc-client-elixir-cloud-registry's own config in Playwright Chromium passes 37 of 37 tests. Before the fix, two of its three test files failed with a syntax error. The other packages' configs got the same change but weren't run.npm testbrowser matrix (WebKit isn't installed here). CI runs it.Closes #557
🤖 Generated with Claude Code
https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG