31 Commits
Author SHA1 Message Date
albert 23740df60b code style fix 2025-04-11 11:06:05 +05:00
albert 5f8db74161 wip 2025-04-10 23:16:30 +05:00
albert 5f76b35d8e rewrite ignore test 2025-04-10 09:37:10 +05:00
albert 5a31b7232f rewrite to-cache tests 2025-04-10 09:34:39 +05:00
albert 340fc55c0e fix 4 tests in to-cache 2025-04-09 22:31:56 +05:00
albert 93eaed7f77 fix 4 tests in to-cache 2025-04-09 22:29:53 +05:00
albert 01f0085cd8 rewite to-cache tests 2025-04-09 14:11:36 +05:00
albert 3fa25457fa rewrite tests two 2025-04-09 09:48:39 +05:00
albert 87a49fac74 rewrite tests 2025-04-09 09:28:11 +05:00
albert c97253eea2 rewrite tests 2025-04-09 09:26:46 +05:00
Jeffrey PosnickandGitHub bde6bce1c6 Skip ignoreURLParametersMatching (#2992) 2021-12-02 17:07:30 -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
Jeffrey PosnickandGitHub d235904743 Temporarily disable lint_ts (#2869) 2021-06-17 13:09:28 -07:00
Jeffrey PosnickandGitHub 0655c73cd5 Remove default from the export (#2868) 2021-06-17 12:18:25 -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
Jeff Posnick 7f9c93b97e Linting 2021-04-05 12:54:24 -04:00
Jeff Posnick 929dea67d9 Properly serialize regexps 2021-04-02 16:56:12 -04:00
Ognjen JevremovićandGitHub e9aed44b6e [Fix] (Workbox wizard) Manually enter the path of the web app root and unselectable separator (#2766)
* fix: 🐛 workbox-cli ask root of web app question

Make separator unselectable as an answer to root of web application
question when multiple child directories are present. Fix the manual
input to root of the web application question - when manual input option
is chosen a new question / input will be provided to the user to specify
the root of the web app.

✅ Closes: #2764

* test: 💍 workbox-cli ask root of web app question

Extend upon the existing workbox-cli ask root of web app question with
additional unit tests.

✅ Closes: #2764

* chore: 🤖 workbox-cli root web app question variable naming

workbox-cli package, rename `root of the web application` question
variable names to use camelcase naming pattern instead of snake case
format.

✅ Closes: #2766
2021-03-10 14:01:32 -05:00
Ognjen JevremovićandGitHub 637e9a9590 [Feature] (workbox-cli) Prompt for 'ignoreURLParametersMatching' in workbox wizard (#2763)
* feat: 🎸 Add a question to workbox-cli

Extend workbox-cli with a question regarding the
'ignoreURLParametersMatching' workbox config parameter.

✅ Closes: #2758

* refactor: 💡 workbox-cli ignore url parameters improvemenets

Provide assertions to workbox-cli package regarding question for
'ignoreURLParametersMatching' workbox config parameter with meaningful
error messages.

* fix: 🐛 workbox-cli ignore url parameters configuration

Provided instances of RegExp (for ignoring the set of search parameters)
should be converted to string values (using the native
RegExp.prototype.toString method), as JSON.stringify is not able to
convert RegExp class instances into corresponding regular expressions
before writing the configuration to workbox-config.js file.

* refactor: 💡 workbox-cli ignore url parameters defaults

Refactor defaults for 'ignoreURLParametersMatching' config parameter
into constants.

* test: 💍 workbox-cli questions tests

Provide tests for the query parameters in start url question (tests
lib/questions/ask-start_url-query-params). Extend the
lib/questions/ask-questions.js tests with newly added question.

✅ Closes: #2758
2021-03-01 16:28:26 -05:00
6b5abe1e16 Initial pass of workbox-cli conversion (#2537)
* Update message to remove duplicate `is` (#2466)

* v5.1.3

* gulp-glitch first pass (#2433)

* removed old demos
moved new demos on glitch into src folder

* Removed gulp tasks

* Linting

* updated to 5.0.0

* clean commit of publish-glitch w/o
problematic secrets in history

* Added express server to top level
Requires explanation w/in server

* updated background sync
strategies
precaching
w/ new updateServer.js

* incrementing versions

* updated precache express server

* error handling in publish-glitch.js
fixed error in workbox-core
converted:
   workbox-cacheable-response
   workbox-expiration
   workbox-routing

* tested pushing new version

* updated:
  workbox-google-analytics
  workbox-range-requqests
  workbox-streams
modified publish-glitch logging

* updated final demos:
   workbox-broadcast-update
   workbox-navigation-preload
   workbox-window

Co-authored-by: Jeff Posnick <[email protected]>

* resetting to upstream/master

* pushing initial conversion attempt for workbox-cli

* made changes per Jeff's comments

* Removed some accidental files

* Add a TS build step

* WIP

* Cleaned up tests

* Linting

* More linting

* package.json test fix

Co-authored-by: Adarsh Konchady <[email protected]>
Co-authored-by: Jeff Posnick <[email protected]>
2020-07-08 11:11:53 -04:00
Jeffrey PosnickandGitHub e40d5d6ab7 Change swSrc validation (#2451) 2020-04-13 14:44:54 -04:00
Jeffrey PosnickandGitHub 1dc32ece6f Updates various devDependencies (#2357)
* Updates various devDependencies

* Swithcing back to Object

* Switch node back to 8

* Revert a test changee
2020-02-07 10:14:29 -08:00
Jeffrey PosnickandGitHub 6a3db29617 Move to upath, honor swDest subdirs (#2140) 2019-07-23 13:52:00 -04:00
Jeffrey Posnick c6d4b66ab3 Rollup bundles in generateSW, and more for v5 (#2068)
* WIP.

* GenerateSW with code splitting

* More WIP.

* WIP/

* Support a custom fs for rollup output

* Separate the bundling from the writing

* Remove generateSWString

* Remove the generateSWString test

* Use underscore separators.

* Test remidiation.

* generateSW test remediation

* Linting.

* Fixed the InjectManifest tests.

* Fixed getManfiest test.

* Added an extra dependency.

* populateSWTemplate isn't async

* bundle and escape-regexp unit tests

* Test for the existence of output files.

* Return filePaths from build commands.

* Change to log message.

* Ensure swSrc and swDest are different

* Set moduleSideEffects to false

* Explicitly require @babel/preset-env

* Review feedback

* Review feedback.

* __WB_MANIFEST again

* Use a module registry

* Linting.

* Review feedback.
2019-07-12 14:29:21 -04:00
Jeffrey PosnickandGitHub 6a65e8b21c Remove extra escaping. (#2008) 2019-04-03 16:22:42 -04:00
Philip Walton 77e1c99ebe Add license headers to all files 2018-10-07 10:54:22 -07:00
Jeffrey PosnickandGitHub 029365944e Whitespace changes for eslint (#1680) 2018-10-04 19:16:23 -04:00
Jeffrey PosnickandGitHub 6be8449f62 Updates to latest dependencies, and transpilation targets (#1658)
* WIP.

* WIP.

* Linting.

* Removing browser-sync.

* Fixes workbox dependencies (#1667)

* Fixes workbox dependencies

* Fixes the depcheck

* v3.6.2

* 3.6.2 metadata (#1669)
2018-10-03 12:27:07 -04:00
Jeffrey PosnickandGitHub b758aef979 Link to workbox.setConfig() docs after calling workbox copyLibraries (#1553)
* Link to setConfig() docs after calling copyLibraries

* Unit test update
2018-06-26 14:40:10 -04:00
Jeffrey PosnickandGitHub 9b01c67dc0 Updates of package.json dependencies (#1511)
* Updates of package.json dependencies.

* Typo in the Travis config.

* Bump up the node test timeout.

* Some additional tweaks.

* We need sudo after all.
2018-06-06 11:29:48 -04:00
Jeffrey PosnickandGitHub 9d88f2abae The contents of v3, reconciled with master (#1357)
* The contents of v3, reconciled with master.

* Remove a few stray files.

* Another extra file.

* Two more deletions.

* Setting up for stable release

* v3.0.0

* Updating CDN and versions

* Doc repair for wf (#1358)

* Changing doc structure to work with WF

* Changing doc structure to work with WF
2018-03-13 15:20:33 -04:00