Making bgQueue compatible with higher level library#170
Conversation
# Conflicts: # package.json
* Deploy to GitHub Pages * Removing jsdoc and docs * Fixes unit tests * Adding browser download to gulpfile * Minor console log tweak * Updating selenium assistant to make gulp download work
* Changing minification for babili * External sourcemap and tidy up of code * Adding license header file * Removing unused dep
* Pulling out minified JS Bundle * Moving to shared build config. Still needs some work * Moving to modular gulp taks and shared build * Removing travis typo * Removing travis TODO
* WIP * Some more updates to match the latest spec * Latest sw-routing updates * Latest sw-runtime-caching updates * Add .min. to output .js file * Broadcast cache update changes * Use .bind() to ensure this is set inside of callback * Syntax tweaks * Demo updates * CacheWrapper => RequestWrapper * CacheWrapper => RequestWrapper * Lint cleanup
JSDoc for the sw-broadcast-cache-update project.
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
| } | ||
|
|
||
| /** | ||
| * This function is a call wrapper over `pushIntoQueue` used by higher |
There was a problem hiding this comment.
Change 'This function is a call wrapper over' to 'Wraps the'.
In reference materials, something are not complete sentences.
| * level framework. If you are writting the fetch handler for background | ||
| * sync manually, please ignore this. | ||
| * | ||
| * @param {Object} input |
There was a problem hiding this comment.
Need a definition. You can probably copy it from pushIntoQueue.
| * @param {Request} input.request The request which is to be queued | ||
| * | ||
| * @return {Promise} Promise which resolves when the request is pushed in | ||
| * the queue |
There was a problem hiding this comment.
Please add periods to the end of the parameter definitions.
|
@jpmedley did the requested changes, please review |
|
One comment from me - otherwise LGTM. I'm slightly scared of the size of these commit logs. In future could you either do a fresh checkout or ensure you are updating against a branch off of master. |
| } | ||
| const route = new goog.routing.ExpressRoute({ | ||
| path: '/*', | ||
| origin: 'https://jsonplaceholder.typicode.com', |
There was a problem hiding this comment.
That's not going to work as expected—origin isn't a supported parameter.
As of #158, you can't use ExpressRoute for cross-origin routes. You should use RegExpRoute instead:
const route = new goog.routing.RegExpRoute({
regExp: new RegExp('^https://jsonplaceholder.typicode.com'),
handler: new goog.runtimeCaching.NetworkOnly({requestWrapper}),
});There was a problem hiding this comment.
@jeffposnick is it something that will change in near future?
cuz i right now it worked...
just curious
There was a problem hiding this comment.
As of #158, you can pass in /*, but it won't trigger a match for cross-origin requests. If you saw your route match a cross-origin request, it might have been because you didn't have that updated code in effect.
origin has never been supported in ExpressRoute. It was just ignored.
| * | ||
| * const route = new goog.routing.ExpressRoute({ | ||
| * path: '/*', | ||
| * origin: 'https://jsonplaceholder.typicode.com', |
There was a problem hiding this comment.
See earlier comment—use RegExpRoute instead.
|
@prateekbh @jeffposnick @gauntface @addyosmani There are parameters that lack definitions. Since they were'nt highlighted in red or green, I didn't request changes. We need to start filling these in. |
|
@gauntface I am highly curious why is this even happening? |
|
After you pull in the changes from the upstream, canonical GitHub repo to your local instance of I think GitHub is showing a diff of your forked repo vs. the canonical repo, so that implies your forked repo doesn't have the commits (even though your local |
|
@jeffposnick I've changed the demo sw, please review |
R: @jeffposnick @addyosmani @gauntface
This makes sw-background-sync-queue compatible with higher level library.