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

Properly serialize ignoreURLParametersMatching RegExps #2802

Merged
merged 2 commits into from
Apr 6, 2021

Conversation

jeffposnick
Copy link
Contributor

R: @tropicadri
CC: @ognjenjevremovic

Fixes #2796

This resolves an issue with #2763 that I overlooked in my review: the ignoreURLParametersMatching RegExps were serialized to the config file as strings, which makes them invalid when they're read back and used.

This PR switches the serialization to use stringify-object (which we use elsewhere, in workbox-build) and updates the tests to ensure that RegExps are handled as expected.

@ognjenjevremovic
Copy link
Contributor

@jeffposnick I apologize for the issue. I must admit I have overlooked this myself when making the PR.

When testing the changes locally (besides running the suite of unit tests), I have checked the output of the workbox wizard command and inspected the generated workbox-config.js and the value of ignoreURLParametersMatching.
However, I didn't try generating the service worker (by running workbox generateSW) which would've raised the red flags for having invalid value types inside of the generated array.

Good to see you have the fix ready 🚀 .
I apologize for any inconvenience this might have caused 🙂 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect format of "ignoreURLParametersMatching" values generated via workbox wizard cli command
3 participants