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

Bg sync array buffer #1932

Merged
merged 4 commits into from
Mar 5, 2019
Merged

Bg sync array buffer #1932

merged 4 commits into from
Mar 5, 2019

Conversation

philipwalton
Copy link
Member

@philipwalton philipwalton commented Mar 2, 2019

R: @jeffposnick

Fixes #1908. This PR mostly cherry-picks commits from the WIP unit-test-updates branch (the first two commits), which means there's some extra stuff in here that might not seem relevant, but it was easier to just cherry-pick existing work that to redo everything. Also that should make merging those changes cleaner in the future.

I kept the tests mostly verbatim from the unit-tests-updates branch since I knew they were passing in all browsers, then I updated the mocks in this branch until I could get them to pass here (I opted to not change the tests since I know they were passing and run correctly in browsers).

The most relevant changes are to the StorableRequest class here. The rest of the changes include several small compat issues (e.g. some stuff in the DBWrapper library) I found and fixed in the other branch.

@coveralls
Copy link

coveralls commented Mar 2, 2019

Coverage Status

Coverage decreased (-0.1%) to 82.693% when pulling b51b6f8 on bg-sync-array-buffer into bd5f411 on master.

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.

I'm fine if this is just an interim PR to bridge things until we eventually move off of mocks and onto in-browser unit tests.

But at the same time, I wanted to point out that https://github.com/pinterest/service-workers/blob/master/packages/service-worker-mock/models/ has been updated to match our local models, and this PR will cause a new divergence.

Is it feasible at all to update the mocks in that project, and then use them locally? Or would that overly complicate things?

.eslintrc.js Outdated
ignoreUrls: true,
ignorePattern: '^\\s*import',
}],
"ignorePattern": "^\\s*import",
Copy link
Contributor

Choose a reason for hiding this comment

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

These don't need quotes (it's a JS file, not JSON).

And elsewhere where there are quotes, could you switch them back to single and not double?

Copy link
Member Author

Choose a reason for hiding this comment

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

I ran eslint or the .eslintrc.js file (not sure why it wasn't already doing that?).

@philipwalton
Copy link
Member Author

I'd rather not put any effort into using their mocks instead of ours since I plan (as the very next thing I work on) to move off the mocks entirely and switch to testing in real browsers.

We could let them know about these changes, or submit a PR with them though.

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.

Sounds good, then.

@workbox-pr-bot
Copy link
Collaborator

PR-Bot Size Plugin

Changed File Sizes

File Before After Change GZipped
packages/workbox-background-sync/build/workbox-background-sync.prod.js 3.60 KB 3.21 KB -11% 1.39 KB 🎉
packages/workbox-core/build/workbox-core.prod.js 5.46 KB 5.34 KB -2% 2.30 KB

New Files

No new files have been added.

All File Sizes

View Table
File Before After Change GZipped
packages/workbox-background-sync/build/workbox-background-sync.prod.js 3.60 KB 3.21 KB -11% 1.39 KB 🎉
packages/workbox-broadcast-update/build/workbox-broadcast-update.prod.js 1.85 KB 1.85 KB 0% 930 B
packages/workbox-build/build/_types.js 41 B 41 B 0% 61 B
packages/workbox-build/build/index.js 3.64 KB 3.64 KB 0% 1.36 KB
packages/workbox-cacheable-response/build/workbox-cacheable-response.prod.js 579 B 579 B 0% 344 B
packages/workbox-cli/build/app.js 5.58 KB 5.58 KB 0% 1.98 KB
packages/workbox-cli/build/bin.js 1.16 KB 1.16 KB 0% 580 B
packages/workbox-core/build/workbox-core.prod.js 5.46 KB 5.34 KB -2% 2.30 KB
packages/workbox-expiration/build/workbox-expiration.prod.js 2.83 KB 2.83 KB 0% 1.24 KB
packages/workbox-google-analytics/build/workbox-offline-ga.prod.js 1.89 KB 1.89 KB 0% 898 B
packages/workbox-navigation-preload/build/workbox-navigation-preload.prod.js 652 B 652 B 0% 317 B
packages/workbox-precaching/build/workbox-precaching.prod.js 4.25 KB 4.25 KB 0% 1.71 KB
packages/workbox-range-requests/build/workbox-range-requests.prod.js 1.51 KB 1.51 KB 0% 758 B
packages/workbox-routing/build/workbox-routing.prod.js 3.38 KB 3.38 KB 0% 1.47 KB
packages/workbox-strategies/build/workbox-strategies.prod.js 4.86 KB 4.86 KB 0% 1.19 KB
packages/workbox-streams/build/workbox-streams.prod.js 1.38 KB 1.38 KB 0% 677 B
packages/workbox-sw/build/workbox-sw.js 1.33 KB 1.33 KB 0% 741 B
packages/workbox-webpack-plugin/build/generate-sw.js 5.29 KB 5.29 KB 0% 1.84 KB
packages/workbox-webpack-plugin/build/index.js 349 B 349 B 0% 255 B
packages/workbox-webpack-plugin/build/inject-manifest.js 7.22 KB 7.22 KB 0% 2.48 KB
packages/workbox-window/build/workbox-window.dev.umd.js 30.37 KB 30.37 KB 0% 8.01 KB
packages/workbox-window/build/workbox-window.prod.umd.js 4.65 KB 4.65 KB 0% 1.80 KB

Workbox Aggregate Size Plugin

8.77KB gzip'ed (58% of limit)
22.04KB uncompressed

@philipwalton philipwalton merged commit ea248e7 into master Mar 5, 2019
@philipwalton philipwalton deleted the bg-sync-array-buffer branch July 8, 2019 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants