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

[Feature] (workbox-cli) Prompt for 'ignoreURLParametersMatching' in workbox wizard #2763

Merged

Conversation

ognjenjevremovic
Copy link
Contributor

Fixes #2758

R: @jeffposnick @philipwalton

Changes

  • Added a prompt to the workbox wizard for 'ignoreURLParametersMatching' configuration,
  • Extended the workbox-cli package with a new question(s),
  • Provided the necessary set of tests for this change,
  • Provided test coverage of 90%+.

Checklist

After the changes I ensured that:

  • no stylistic or unwanted errors are present, by running gulp lint and gulp lint test from the root directory,
  • no tests are failing, by running gulp test from the root directory,
  • build passes with no issues, by running gulp build from the root directory,
  • checked the build output locally by:
    • creating a new project, by running mkdir workbox-test && cd workbox-test && npm init -y,
    • installing the built workbox wizard, by running npm i ~/path/to/workbox/projects/workbox/packages/workbox-cli && ./node_modules/.bin/workbox wizard,
    • checking the generated workbox-config.js file content.

Done

  • Added/updated unit tests for this change
  • Included links to related issues/PRs

Ognjen Jevremovic added 5 commits February 25, 2021 19:34
Extend workbox-cli with a question regarding the
'ignoreURLParametersMatching' workbox config parameter.

✅ Closes: GoogleChrome#2758
Provide assertions to workbox-cli package regarding question for
'ignoreURLParametersMatching' workbox config parameter with meaningful
error messages.
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 defaults for 'ignoreURLParametersMatching' config parameter
into constants.
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: GoogleChrome#2758
@jeffposnick jeffposnick self-requested a review March 1, 2021 21:28
Copy link
Contributor

@jeffposnick jeffposnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This looks 👍

@jeffposnick jeffposnick merged commit a2f373e into GoogleChrome:v6 Mar 1, 2021
This was referenced Mar 15, 2021
This was referenced Mar 16, 2021
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.

None yet

2 participants