Repository navigation
Chore/typescript 6 - #3603
Open
SuperDJ wants to merge 6 commits into
Open
Chore/typescript 6#3603SuperDJ wants to merge 6 commits into
SuperDJ wants to merge 6 commits into
Conversation
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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on #3602.
Update typescript to 6.0.3 and typescript-json-schema to 0.68, which keeps its own TypeScript 5.9 copy.
All 16 production bundles are byte-identical to the TypeScript 4.9 build.
Created with Claude