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

Standardize casing in API names #1833

Merged
merged 1 commit into from Jan 11, 2019
Merged

Standardize casing in API names #1833

merged 1 commit into from Jan 11, 2019

Conversation

philipwalton
Copy link
Member

@philipwalton philipwalton commented Jan 11, 2019

Workbox has been somewhat inconsistent with respect to the casing in its API names. Specifically with regards to SW vs. Sw, and URL vs. Url.

This PR standardizes on SW and URL per the W3C TAG's design principles doc, in an attempt to be as consistent as possible to the underlying web API names. It also updates any mixed-case event names to all lowercase.

Here is a list of changes to the public API:

workbox-broadcast-cache-update

  • The broadcast update message data: data.payload.updatedURL

workbox-precaching

  • workbox.precaching.addRoute(options): options.cleanURLs
  • workbox.precaching.precacheAndRoute(entries, options): options.cleanURLs
  • workbox.precaching.PrecacheController:getCachedURLs()

Note, I haven't changed any of the node tools yet (workbox-build, workbox-cli, or workbox-webpack-plugin) as we may try to accept both variants in v4, and log a deprecation warning.

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.

👍 Sorry about the merge conflicts...

@philipwalton
Copy link
Member Author

No worries, I just copied over your changes and re-did the find and replace.

@philipwalton philipwalton merged commit fb9003c into next Jan 11, 2019
@philipwalton philipwalton deleted the standardize-naming branch January 11, 2019 19:58
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