workbox icon indicating copy to clipboard operation
workbox copied to clipboard

[workbox-build] Deprecated subdependencies: [email protected] and [email protected]

Open SpaceTimee opened this issue 11 months ago β€’ 3 comments

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 stable source-map or alternative
  • sourcemap-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.

SpaceTimee avatar Jan 03 '26 08:01 SpaceTimee

This is reproducible across projects that pull Workbox via vite-plugin-pwa.

Short diagnosis

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 on sourcemap-codec; newer magic-string (0.30.x) uses @jridgewell/sourcemap-codec.

Proposed steps

  1. Fix sourcemap-codec: Bump @rollup/plugin-replace β†’ ^6.x in workbox-build so magic-string upgrades to 0.30.x and pulls @jridgewell/sourcemap-codec (non-deprecated). This is a small, testable change and should remove the sourcemap-codec warning.
  2. Address source-map beta: Either wait for a stable 0.8.x release from source-map, or evaluate replacing the dependency with a maintained alternative (e.g., source-map-js or @jridgewell/source-map) with Node-environment tests (to avoid reintroducing the fetch-detection issue).

DavidOsipov avatar Jan 15 '26 20:01 DavidOsipov

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

pawagit avatar Feb 17 '26 11:02 pawagit

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?

aidanhibbard avatar Mar 18 '26 23:03 aidanhibbard