Skip to content

Chore/update published dependencies - #3604

Open
SuperDJ wants to merge 8 commits into
GoogleChrome:v7from
SuperDJ:chore/update-published-dependencies
Open

SuperDJ wants to merge 8 commits into
GoogleChrome:v7from
SuperDJ:chore/update-published-dependencies

Conversation

@SuperDJ

@SuperDJ SuperDJ commented Nov 6, 2026 •

Copy link
Copy Markdown

This PR builds on #3603.

Update the packages Workbox ships to users, with the code and test changes
the new majors need:

  • meow 14, chokidar 6, inquirer 14, stringify-object 7, pretty-bytes 7,
    upath 3, fs-extra 11, glob 14, source-map 0.8, ajv 8.20,
    @apideck/better-ajv-errors 0.3.7, eta 4.6, rollup 4.67,
    @rollup/plugin-babel 7, @rollup/plugin-terser 1.0.2,
    @trickfilm400/rollup-plugin-off-main-thread 4, @babel/core 7.29,
    @babel/preset-env 7.29
  • Remove @types/inquirer and @types/stringify-object, as both packages now ship their own types.
  • Update fast-uri, brace-expansion and serialize-javascript in the lockfile, within their existing ranges.
  • chokidar 4 and later dropped glob support, so --watch now filters paths with a new getWatchIgnored() helper, which adds minimatch as a dependency of workbox-cli.
  • inquirer and upath now export __esModule and default, so proxyquire stubs have to replace default. Otherwise tests fall through to the real module.

Dependencies: none saved. package-lock.json grows from 2341 to 2402 entries, as older copies stay alongside the new majors.

Production advisories from npm audit drop from 16 to 1. The one left is a low-severity deepmerge advisory with no fixed release. Across the full tree, including dev tools, they drop from 146 to 135.

CVEs solved in the production tree:

Replace packages Workbox ships to users with maintained or smaller options:

  • update-notifier: tiny-updater, skipping the check in the same cases as before (no TTY, CI, NO_UPDATE_NOTIFIER, NODE_ENV=test and --no-update-notifier)
  • chalk: styleText from node:util
  • ora: yocto-spinner
  • tempy: fs.mkdtemp
  • common-tags: an internal oneLine helper
  • fast-json-stable-stringify: safe-stable-stringify
  • strip-comments: an internal stripComments helper built on acorn. This also fixes return/* a */1 being turned into return1, which broke the code.

The root package.json keeps chalk, common-tags and tempy, as gulp tasks, infra and tests still use them.

tiny-updater runs in the CLI process rather than a separate one and has no request timeout, so a slow network could delay the exit of the CLI, at most once a day.

Generated service workers are byte-identical to before for generateSW in both modes, with the runtime inlined and external, and for injectManifest.

The regenerated workbox-build schemas no longer require the newer RegExp properties hasIndices and unicodeSets, or the ArrayBuffer properties resizable, maxByteLength and detached, as the type environment changed with the removed packages. This only makes validation of those values less strict.

Dependencies: saves 47 package-lock.json entries (2402 to 2355).

Created with Claude

Remove packages that nothing uses:
- Root: @babel/cli, @rollup/plugin-typescript, coveralls, bytes, gzip-size
  and @types/eslint.
- workbox-build: @babel/runtime, which isn't imported, as bundling uses
  babelHelpers: 'bundled'. Also drop its dependency-check ignore entries.
- infra/pr-bot/aggregate-size-plugin.js, which nothing loads and which
  imports the undeclared pr-bot. It was the only user of bytes and gzip-size.

Declare packages that were used but missing:
- type-fest moves from the root to workbox-build, whose published types
  import it.
- body-parser is added to the 13 demo manifests that require it.

workbox-build was compiling against type-fest 0.16.0, hoisted from tempy,
rather than the 3.13.1 declared at the root. Using 3.13.1 fails with TS2411
on the WorkboxPackageJSON interface, so it is now a type alias with the same
shape.
Install all packages from the root with npm workspaces instead of running
lerna bootstrap during the build:
- Add workspaces to package.json and useWorkspaces to lerna.json.
- Remove the bootstrap step from gulp build. npm ci now links the packages.
- Delete the 18 per-package lockfiles, leaving one root lockfile.
- Remove /packages from Dependabot, as it has no manifest.

Newer Lerna no longer includes bootstrap by default, so this is needed before
Lerna can be updated. Lerna stays on 5.6.2 here and still handles versioning
and publishing.

The single lockfile moves webpack from 5.97 to 5.106, whose types declare the
output path as a string, so the non-null assertion in relativeToOutputPath is
no longer needed.
Node 20 is end-of-life, so moving to Node 22 is required to stay on a
supported runtime and recommended for security fixes. It also unblocks
dependency updates whose current versions need Node 22.

- Set .nvmrc to 22, which CI also reads.
- Set engines to >=22.22.0 in the root, workbox-build, workbox-cli and
  workbox-webpack-plugin. chokidar 6, a planned update, requires this version.
- Update @types/node to ^22.20.5 to match.

workbox-cli already needs require(esm) because update-notifier is ESM-only,
so the previous engines value of >=20.0.0 was too low.
Update typescript to 6.0.3 and typescript-json-schema to 0.68, which keeps
its own TypeScript 5.9 copy.

- Use moduleResolution bundler in the root tsconfig, as node is deprecated.
- Add types: ["node"] to the root tsconfig, because TypeScript 6 no longer
  includes @types packages by default and the code uses process.env.NODE_ENV.
- Use module node20 with moduleResolution node16 in workbox-build, workbox-cli
  and workbox-webpack-plugin, so CommonJS output can load ESM-only packages.
- Remove a type cast in StrategyHandler that TypeScript can now infer.

All 16 production bundles are byte-identical to the TypeScript 4.9 build.
The build generates these files, so this brings the checked-in copies in line
with its output.

- $ref values are now URL-encoded, for example Record%3Cstring%2Cstring%3E.
- RegExp definitions now list unicodeSets as required. RegExp objects have this
  property on Node 20 and later, so the Node 22 minimum covers it.
Update the packages Workbox ships to users, with the code and test changes
the new majors need:

- meow 14, chokidar 6, inquirer 14, stringify-object 7, pretty-bytes 7,
  upath 3, fs-extra 11, glob 14, source-map 0.8, ajv 8.20,
  @apideck/better-ajv-errors 0.3.7, eta 4.6, rollup 4.67,
  @rollup/plugin-babel 7, @rollup/plugin-terser 1.0.2,
  @trickfilm400/rollup-plugin-off-main-thread 4, @babel/core 7.29,
  @babel/preset-env 7.29
- Remove @types/inquirer and @types/stringify-object, as both packages now
  ship their own types.
- Update fast-uri, brace-expansion and serialize-javascript in the lockfile,
  within their existing ranges.
- chokidar 4 and later dropped glob support, so --watch now filters paths
  with a new getWatchIgnored() helper, which adds minimatch as a dependency
  of workbox-cli.
- inquirer and upath now export __esModule and default, so proxyquire stubs
  have to replace default. Otherwise tests fall through to the real module.

Dependencies: none saved. package-lock.json grows from 2341 to 2402 entries,
as older copies stay alongside the new majors.

Production advisories from npm audit drop from 16 to 1. The one left is a
low-severity deepmerge advisory with no fixed release. Across the full tree,
including dev tools, they drop from 146 to 135.

CVEs solved in the production tree:
- fast-uri: CVE-2026-84292, CVE-2026-84394, CVE-2026-86472, CVE-2026-110095,
  CVE-2026-110180, CVE-2026-110306, CVE-2026-110725
- brace-expansion: CVE-2026-102276, CVE-2026-102277, CVE-2026-102278
- tmp: CVE-2025-54798, CVE-2026-44705
- glob: CVE-2026-118773
- minimatch: CVE-2026-118764
- serialize-javascript: CVE-2026-115897
Replace packages Workbox ships to users with maintained or smaller options:

- update-notifier: tiny-updater, skipping the check in the same cases as
  before (no TTY, CI, NO_UPDATE_NOTIFIER, NODE_ENV=test and
  --no-update-notifier)
- chalk: styleText from node:util
- ora: yocto-spinner
- tempy: fs.mkdtemp
- common-tags: an internal oneLine helper
- fast-json-stable-stringify: safe-stable-stringify
- strip-comments: an internal stripComments helper built on acorn. This also
  fixes return/* a */1 being turned into return1, which broke the code.

The root package.json keeps chalk, common-tags and tempy, as gulp tasks, infra
and tests still use them.

tiny-updater runs in the CLI process rather than a separate one and has no
request timeout, so a slow network could delay the exit of the CLI, at most
once a day.

Generated service workers are byte-identical to before for generateSW in both
modes, with the runtime inlined and external, and for injectManifest.

The regenerated workbox-build schemas no longer require the newer RegExp
properties hasIndices and unicodeSets, or the ArrayBuffer properties resizable,
maxByteLength and detached, as the type environment changed with the removed
packages. This only makes validation of those values less strict.

Dependencies: saves 47 package-lock.json entries (2402 to 2355).

This branch has not been deployed

No deployments
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