Skip to content

Chore/npm workspaces - #3601

Open
SuperDJ wants to merge 3 commits into
GoogleChrome:v7from
SuperDJ:chore/npm-workspaces
Open

SuperDJ wants to merge 3 commits into
GoogleChrome:v7from
SuperDJ:chore/npm-workspaces

Conversation

@SuperDJ

@SuperDJ SuperDJ commented Nov 6, 2026 •

Copy link
Copy Markdown

This PR builds on #3600. This PR will make use of npm workspaces eliminating the need of a package-lock.json for each package.

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.

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.
@SuperDJ SuperDJ mentioned this pull request Nov 6, 2026

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