Skip to content

Making bgQueue compatible with higher level library#170

Merged
prateekbh merged 149 commits into
GoogleChrome:masterfrom
prateekbh:master
Jan 27, 2017
Merged

Making bgQueue compatible with higher level library#170
prateekbh merged 149 commits into
GoogleChrome:masterfrom
prateekbh:master

Conversation

@prateekbh
Copy link
Copy Markdown
Collaborator

R: @jeffposnick @addyosmani @gauntface

This makes sw-background-sync-queue compatible with higher level library.

jeffposnick and others added 30 commits September 25, 2016 22:25
* Deploy to GitHub Pages

* First attempt at jsdoc integration

* Just removing docs for now - creates a lot of noise

* Fixing linting issues
* 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
* First attempt and minified build

* Removing old modules
* 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.
@googlebot
Copy link
Copy Markdown

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 cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

}

/**
* This function is a call wrapper over `pushIntoQueue` used by higher
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Change 'This function is a call wrapper over' to 'Wraps the'.

In reference materials, something are not complete sentences.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

* level framework. If you are writting the fetch handler for background
* sync manually, please ignore this.
*
* @param {Object} input
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need a definition. You can probably copy it from pushIntoQueue.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

* @param {Request} input.request The request which is to be queued
*
* @return {Promise} Promise which resolves when the request is pushed in
* the queue
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add periods to the end of the parameter definitions.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@prateekbh
Copy link
Copy Markdown
Collaborator Author

@jpmedley did the requested changes, please review

@gauntface
Copy link
Copy Markdown

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',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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}),
});

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@jeffposnick is it something that will change in near future?
cuz i right now it worked...
just curious

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

*
* const route = new goog.routing.ExpressRoute({
* path: '/*',
* origin: 'https://jsonplaceholder.typicode.com',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See earlier comment—use RegExpRoute instead.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@jpmedley
Copy link
Copy Markdown
Contributor

@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.

@prateekbh
Copy link
Copy Markdown
Collaborator Author

@gauntface I am highly curious why is this even happening?
1.) None of the commits are on my profile
2.) Every time I open a PR, it shows all commits.
3.) I regularly merge with this repo's master

@jeffposnick
Copy link
Copy Markdown
Contributor

After you pull in the changes from the upstream, canonical GitHub repo to your local instance of git on your personal machine, are you pushing those changes out to your personal forked GitHub repo?

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 git working copy has them).

@prateekbh
Copy link
Copy Markdown
Collaborator Author

@jeffposnick I've changed the demo sw, please review

@prateekbh prateekbh merged commit fb12c27 into GoogleChrome:master Jan 27, 2017
@addyosmani addyosmani modified the milestone: Service Worker Framework (beta) Feb 18, 2017
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.

6 participants