Repository navigation
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
8000d11 to
52b5017
Compare
|
The published npm install workbox-build@7.4.1 type-fest@5.10.0 typescript@7.0.2
{ "compilerOptions": { "strict": true, "skipLibCheck": false, "noEmit": true, "module": "nodenext", "moduleResolution": "nodenext", "target": "es2022", "lib": ["es2022", "webworker"] }, "files": ["index.ts"] }
import type { WorkboxPackageJSON } from 'workbox-build/build/types';
export type T = WorkboxPackageJSON;
52 errors with |
WorkboxPackageJSON extended type-fest's PackageJson, so the published build/types.d.ts resolved whatever type-fest a consumer had installed. From type-fest 3.0.0 on, PackageJson carries a JsonValue index signature that the optional fields don't satisfy, so consumers type checking with skipLibCheck: false get ~50 TS2411 errors (reported on PR GoogleChrome#3600 for type-fest 3.0.0 through 5.10.0). Replace it with a local interface covering the fields workbox-build reads (version, dependencies, workbox), so the published types no longer depend on type-fest at all. Removes 1 dependency (type-fest@3.13.1) from workbox-build's lockfile (381 -> 380 packages).
|
@YevheniiKotyrlo Made another commit where |
Remove packages that nothing uses:
Declare packages that were used but missing:
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.
Created with Claude,