[workbox-build] Deprecated subdependencies: [email protected] and [email protected]
Environment
- workbox-build version: 7.4.0
- Node.js version: v24.x
- Package manager: pnpm v10.22.0
Problem
When running pnpm install or pnpm update, the following deprecation warnings are shown:
WARN 2 deprecated subdependencies found: [email protected], [email protected]
Dependency tree
vite-plugin-pwa 1.2.0
βββ workbox-build 7.4.0
βββ source-map 0.8.0-beta.0 β deprecated
βββ @rollup/plugin-replace 2.4.2
βββ magic-string 0.25.9
βββ sourcemap-codec 1.4.8 β deprecated
Expected behavior
workbox-build should update its dependencies to use non-deprecated packages:
[email protected]β Replace with stablesource-mapor alternativesourcemap-codecβ Replace with@jridgewell/sourcemap-codec(the recommended successor)
Related issues
- #3019
- #3228
Additional context
These warnings appear in every project using vite-plugin-pwa or any Workbox-based PWA tooling. While they don't affect functionality, they can cause confusion for developers maintaining production applications.
This is reproducible across projects that pull Workbox via vite-plugin-pwa.
Short diagnosis
- Deprecations come from:
[email protected]β[email protected](deprecated)[email protected]β@rollup/[email protected]β[email protected]β[email protected](deprecated)
Context & why it happened
- Workbox bumped to
[email protected](see #2716) to avoid a Node βfetchβ detection crash (see mozilla/source-map#349). That explains the beta usage. [email protected]still depends onsourcemap-codec; newermagic-string(0.30.x) uses@jridgewell/sourcemap-codec.
Proposed steps
- Fix sourcemap-codec: Bump
@rollup/plugin-replaceβ^6.xinworkbox-buildsomagic-stringupgrades to0.30.xand pulls@jridgewell/sourcemap-codec(non-deprecated). This is a small, testable change and should remove thesourcemap-codecwarning. - Address
source-mapbeta: Either wait for a stable0.8.xrelease fromsource-map, or evaluate replacing the dependency with a maintained alternative (e.g.,source-map-jsor@jridgewell/source-map) with Node-environment tests (to avoid reintroducing thefetch-detection issue).
In addition to sourcemap-codec and source-map, also [email protected] is now deprecated:
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version.
It would be great if glob also could be bumped
We also can't setup vite-pwa for our project because workbox-build tries to pull in rollup@^2, but if you're using Nitro V3 you need rollup@^4.
It looks like this is already resolved in the V7 branch, and from my understanding would also resolve the deprecated sub-deps mentioned here, since the newer @rollup/plugin-replace@^6 no longer pulls in [email protected] / [email protected].
Is there a timeline for V7.5.0? 7.4 was released in November of last year, if we have to keep slow-dripping releases like this then we'll be right back to this point shortly.
Could we get a nightly or non-official release even that just gets people rolling forward?