21 Commits
Author SHA1 Message Date
Josh Kelley 224023886d Switch to native Promise.allSettled
As discussed in code review, this is widely available.  Update tsconfig.json to recognize it.
2024-11-20 11:43:44 -05:00
d731474fc9 feat: migrate workbox-webpack-plugin to typescript (#2882)
* feat: migrate workbox-webpack-plugin to typescript

* progress on typescript migration

* 15e from ts lint

* draft

* fixing webpack version

* running tests

* running tests

* eslint

* passing tests for workbox webpack plugin

* passing tests for wb wpp

* passing tests for workbox webpack plugin

passing tests for wb wpp

cleaning imports

* cleaning some eslint messages

* keeping the checkConditions method signature for backward compatibility

* fixing documentation

* commiting package-lock

* updating the webpack plugin package-lock

* Fixing typescript typing issues

Co-authored-by: Adriana Jara Salazar <[email protected]>
Co-authored-by: Adriana Jara <[email protected]>
2022-02-18 15:57:25 -05:00
Jeffrey PosnickandGitHub 7d4c4434a4 Enable prettier (#2929)
* Deps and config

* Prettier output

* Update hardcoded file sizes

* More file size updates
2021-08-26 14:57:20 -07:00
Jeff Posnick b486d2e1d4 Small tweak 2021-08-10 13:02:29 -04:00
Jeffrey PosnickandGitHub cc992d4877 Switch tsc target to es2017 (#2905) 2021-08-06 13:36:07 -04:00
cb618332d2 Migrate workbox-build to TypeScript (#2867)
* WIP

* Finished getManifest

* GenerateSW migrated

* Getting there

* WIP

* Runtime caching TS

* More WIP

* More WIP

* Validation, type fixes

* Builds!

* No default exports

* null support in optional strings

* Accept string or buffer again

* Fix JSDocs

* CanIUse update

* test/additional-manifest-entries-transform

* lib/bundle

* cdnUtils test

* Switched to esModuleInterop

* Still WIP

* get-file-size migration

* get-string-details test migration

* A few more

* populateSWTemplate changes

* A few more

* validate options

* Update ts-auto-guard

* Fix dependency-check

* Swapped the exports

* JSON Schema + ajv

* TS 4.1.5

* Getting closer to validation

* Some default logic

* Switched default quotes

* Cleanup optional types

* Figuring out errors

* Refactor

* Update validate-options test

* Started integration test migration

* Remove joi schema

* Fixed some swDest logic

* Closer to webpack tests working

* Fix transformManifest usage

* Use a copy of the exclude array

* More include/exclude fun

* swDest default fix

* Function support?

* modifyURLPrefix workaround

* Fix an import

* Improve error messages

* Fix test string

* New validation unit test

* getManifest working

* Working through generateSW

* Function massaging

* Cleanup of exclude/include

* Fix a few more gSW tests

* RouteMatchCallback function

* Expiration w/cacheName check

* Optional globDirectory

* InjectManifest tests

* Test cleanup

* Fix a test

* Fix a config modification

* v5 injectmanifest test

* esModuleInterop support

* Fixes for proxied build

* Final tweaks

* Linting

* Automated linting fixes

* Tweak linting rules

* Update packages/workbox-build/src/lib/get-file-details.ts

Co-authored-by: Adriana Jara <[email protected]>

* Update test/workbox-build/node/generate-sw.js

Co-authored-by: Adriana Jara <[email protected]>

* Update packages/workbox-build/src/lib/additional-manifest-entries-transform.ts

Co-authored-by: Adriana Jara <[email protected]>

* Update packages/workbox-build/src/lib/additional-manifest-entries-transform.ts

Co-authored-by: Adriana Jara <[email protected]>

* Update packages/workbox-build/src/lib/cdn-utils.ts

Co-authored-by: Adriana Jara <[email protected]>

* Update packages/workbox-build/src/lib/get-file-manifest-entries.ts

Co-authored-by: Adriana Jara <[email protected]>

* Update packages/workbox-build/src/lib/stringify-without-comments.ts

Co-authored-by: Adriana Jara <[email protected]>

* Update packages/workbox-build/src/lib/validate-options.ts

Co-authored-by: Adriana Jara <[email protected]>

* Update packages/workbox-build/src/lib/additional-manifest-entries-transform.ts

Co-authored-by: Adriana Jara <[email protected]>

Co-authored-by: Adriana Jara <[email protected]>
2021-06-17 09:41:49 -04:00
Jeffrey PosnickandGitHub 6e725b8cd7 strict mode cleanup (#2244) 2019-10-04 14:03:02 -04:00
Jeffrey PosnickandGitHub 0a6c587de9 strictPropertyInitialization + fixes (#2241) 2019-10-04 09:08:05 -04:00
Philip Walton b47018220e Address review feedback 2019-07-12 08:29:06 -07:00
Philip Walton 027d2055d3 Add type definitions and refactor common types 2019-07-11 17:04:22 -07:00
Philip Walton 0d2585e606 Add type definitions 2019-07-11 10:04:48 -07:00
Philip Walton de93943db2 Add type definitions 2019-07-10 12:42:57 -07:00
Philip Walton 3e09d36d26 Add type definitions 2019-07-09 19:32:04 -07:00
Philip Walton d3db0461e4 Add type definitions 2019-07-09 10:49:42 -07:00
Philip WaltonandJeffrey Posnick 2f4e628345 Ts workbox precaching (#2098)
* Move and rename files to .ts and update imports

* Add type definitions
2019-07-09 09:26:53 -04:00
Philip Walton 196680630b Add type definitions 2019-07-08 12:16:00 -07:00
Philip Walton a5933d352a Add type definitions 2019-07-08 11:25:04 -07:00
Philip WaltonandJeffrey Posnick c5cab240a0 Convert workbox-cacheable-response to Typescript (#2093)
* Move and rename files to .ts and update imports

* Add tpe definitions

* Add missed typings in previously converted code
2019-07-08 09:41:58 -04:00
Philip WaltonandJeffrey Posnick 96703319e6 Convert workbox-broadcast-update to Typescript (#2089)
* Move and rename files to .ts and update imports

* Add type definitions

* Fix issues with already converted packages
2019-07-03 21:48:20 -04:00
Philip Walton 36277c8d8f Switch from rollup-plugin-typescript2 to tsc 2019-07-01 11:40:55 -07:00
Philip Walton 453bf98b2d Add typescript transpiling to the build process 2019-05-24 09:06:34 -07:00