Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate workbox-webpack-plugin to typescript #2882

Merged
merged 26 commits into from Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ab4752c
feat: migrate workbox-webpack-plugin to typescript
roikoren755 Jul 4, 2021
e1db3a6
Merge branch 'v6' into workbox-webpack-plugin-ts
tropicadri Aug 5, 2021
7c70903
progress on typescript migration
tropicadri Aug 24, 2021
ab6494d
Merge branch 'v6' into workbox-webpack-plugin-ts
tropicadri Aug 25, 2021
e68ffd3
15e from ts lint
tropicadri Aug 25, 2021
bf21104
draft
tropicadri Aug 26, 2021
9e56e65
Merge branch 'v6' into workbox-webpack-plugin-ts
tropicadri Aug 26, 2021
9a03d5c
fixing webpack version
tropicadri Sep 3, 2021
e47a480
running tests
tropicadri Sep 3, 2021
eec253b
running tests
tropicadri Sep 4, 2021
e4f9032
eslint
tropicadri Sep 4, 2021
8a5ee86
Merge branch 'v6' into workbox-webpack-plugin-ts
tropicadri Dec 23, 2021
3ded4ab
passing tests for workbox webpack plugin
tropicadri Jan 3, 2022
39d313b
passing tests for wb wpp
tropicadri Jan 3, 2022
347bbe2
Merge branch 'v6' into workbox-webpack-plugin-ts
tropicadri Jan 3, 2022
33df7d5
Merge branch 'copyofwbwpp' into workbox-webpack-plugin-ts
tropicadri Jan 3, 2022
dfcc568
passing tests for workbox webpack plugin
tropicadri Jan 3, 2022
852d638
Merge branch 'workbox-webpack-plugin-ts' of github.com:GoogleChrome/w…
tropicadri Jan 8, 2022
fa26432
cleaning some eslint messages
tropicadri Jan 8, 2022
9147336
keeping the checkConditions method signature for backward compatibility
tropicadri Feb 17, 2022
3917f2f
fixing documentation
tropicadri Feb 17, 2022
d115025
commiting package-lock
tropicadri Feb 17, 2022
784d0d8
Merge branch 'v6' into workbox-webpack-plugin-ts
tropicadri Feb 17, 2022
e563152
updating the webpack plugin package-lock
tropicadri Feb 17, 2022
ea9a76e
Merge branch 'workbox-webpack-plugin-ts' of https://github.com/roikor…
tropicadri Feb 17, 2022
9ee1ec9
Fixing typescript typing issues
tropicadri Feb 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25,721 changes: 25,582 additions & 139 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -123,6 +123,5 @@
"test_node": "gulp test_node",
"test_server": "gulp test_server",
"version": "gulp build && git add -A packages"
},
"version": "0.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/workbox-build/src/lib/populate-sw-template.ts
Expand Up @@ -31,9 +31,9 @@ export function populateSWTemplate({
offlineGoogleAnalytics,
runtimeCaching = [],
skipWaiting,
}: GeneratePartial & {manifestEntries: Array<ManifestEntry>}): string {
}: GeneratePartial & {manifestEntries?: Array<ManifestEntry>}): string {
// There needs to be at least something to precache, or else runtime caching.
if (!(manifestEntries.length > 0 || runtimeCaching.length > 0)) {
if (!(manifestEntries?.length > 0 || runtimeCaching.length > 0)) {
throw new Error(errors['no-manifest-entries-or-runtime-caching']);
}

Expand Down
7 changes: 5 additions & 2 deletions packages/workbox-build/src/schema/GenerateSWOptions.json
Expand Up @@ -467,11 +467,14 @@
"QueueOptions": {
"type": "object",
"properties": {
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
"forceSyncFallback": {
"type": "boolean"
},
"maxRetentionTime": {
"type": "number"
},
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
}
},
"additionalProperties": false
Expand Down
7 changes: 5 additions & 2 deletions packages/workbox-build/src/schema/GetManifestOptions.json
Expand Up @@ -342,11 +342,14 @@
"QueueOptions": {
"type": "object",
"properties": {
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
"forceSyncFallback": {
"type": "boolean"
},
"maxRetentionTime": {
"type": "number"
},
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
}
},
"additionalProperties": false
Expand Down
7 changes: 5 additions & 2 deletions packages/workbox-build/src/schema/InjectManifestOptions.json
Expand Up @@ -357,11 +357,14 @@
"QueueOptions": {
"type": "object",
"properties": {
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
"forceSyncFallback": {
"type": "boolean"
},
"maxRetentionTime": {
"type": "number"
},
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
}
},
"additionalProperties": false
Expand Down
Expand Up @@ -445,11 +445,14 @@
"QueueOptions": {
"type": "object",
"properties": {
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
"forceSyncFallback": {
"type": "boolean"
},
"maxRetentionTime": {
"type": "number"
},
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
}
},
"additionalProperties": false
Expand Down
Expand Up @@ -345,11 +345,14 @@
"QueueOptions": {
"type": "object",
"properties": {
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
"forceSyncFallback": {
"type": "boolean"
},
"maxRetentionTime": {
"type": "number"
},
"onSync": {
"$ref": "#/definitions/OnSyncCallback"
}
},
"additionalProperties": false
Expand Down
6 changes: 4 additions & 2 deletions packages/workbox-build/src/types.ts
Expand Up @@ -437,7 +437,8 @@ export interface WebpackPartial {
* as `webpack`'s standard `exclude` option.
* If not provided, the default value is `[/\.map$/, /^manifest.*\.js$]`.
*/
exclude?: Array<string | RegExp | ((arg0: string) => boolean)>;
//eslint-disable-next-line @typescript-eslint/ban-types
exclude?: Array<string | RegExp | ((arg0: any) => boolean)>;
/**
* One or more chunk names whose corresponding output files should be excluded
* from the precache manifest.
Expand All @@ -449,7 +450,8 @@ export interface WebpackPartial {
* [the same rules](https://webpack.js.org/configuration/module/#condition)
* as `webpack`'s standard `include` option.
*/
include?: Array<string | RegExp | ((arg0: string) => boolean)>;
//eslint-disable-next-line @typescript-eslint/ban-types
include?: Array<string | RegExp | ((arg0: any) => boolean)>;
/**
* If set to 'production', then an optimized service worker bundle that
* excludes debugging info will be produced. If not explicitly configured
Expand Down