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

Adding back in in the analytics suite #69

Merged
merged 5 commits into from Nov 18, 2016
Merged

Conversation

gauntface
Copy link

R: @jeffposnick @addyosmani

This adds the offline-analytics back in.

The major thing to change was the tests.

Previously everything was run through browserify. I've switched to include appropriate files in the HTML page directly rather than require them in and I've built the tested files at build time rather than in the test itself.

The tested files are built into build/test/ in sw-offline-google-analytics and I've added that directory to npmignore.

@@ -63,6 +62,7 @@
"selenium-assistant": "^3.0.0",
"serve-index": "^1.8.0",
"serve-static": "^1.11.1",
"sinon": "^1.17.6",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this being used? I don't see it anywhere else.

Copy link
Author

Choose a reason for hiding this comment

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

Just used it to fix the fetch thing a little better.

beforeEach(function() {
MockDate.set(initialTimestamp + timestampOffset);
fetchedUrls = [];
fetch = (requestUrl) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious about the move from the mocked fetch from npm to this brute-force mocking. I'm pretty sure it's fine, but I wonder whether it was motivated by an incompatibility with the new build setup, or something else.

@jeffposnick
Copy link
Contributor

👍 There's a test timeout failure in Chrome Canary 56, but it's passing in the other two Chrome releases, so I don't think it should prevent this merge.

@jeffposnick jeffposnick merged commit 2977714 into future-of-sw-tooling Nov 18, 2016
@jeffposnick jeffposnick deleted the analytics branch November 18, 2016 14:43
gauntface pushed a commit that referenced this pull request Nov 18, 2016
* Super-early exploration

* Move to require() instead of import for the build scripts

* Adding an assert library

* Bump up the documentation dependency

* Add some configuration/assertions

* Add some configuration/assertions

* Another checkpoint.

* More bits.

* Bug fixes!

* CacheManager -> CacheWrapper

* Manager -> Behavior

* Pass the (non-false) result of when to the handler as {params}

* Manager -> Behavior

* Add a RegExpRoute class

* Bug fixes + cleanup

* Docs (#46)

* Deploy to GitHub Pages

* First attempt at jsdoc integration

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

* Fixing linting issues

* Gulp clean (#49)

* 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

* Minify (#53)

* First attempt and minified build

* Removing old modules

* Changing minification for babili (#55)

* Changing minification for babili

* External sourcemap and tidy up of code

* Adding license header file

* Removing unused dep

* Updating to latest google styleguide (#56)

* Cleaner build (#57)

* 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

* Latest syntax/interface updates (#58)

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

* Linting updates

* Removes predicates, adds ExpressRoute (#62)

* Removes predicates, adds ExpressRoute

* Linting fixes

* Jsdocs (#63)

* Adding current changes to the jsdoc

* Fixing up modules and JSDoc

* Bumping selenium-assistant version

* Lerna (#65)

* First shift to lerna

* Fixing build from heap overflow

* Setting up some stuff for lerna release

* Got the building of tools with copy license into each

* Adding files for publishing

* v0.0.1

* Resetting the package.json

* v0.0.1

* Changing version number

* v0.0.3

* Adding the Gemfile.lock

* Add a warning about sw-precaching not being ready.

* JSDoc for sw-runtime-caching

* sw-broadcast-cache-update demo

* Updated the package.json description of sw-cache-expiration

* Linting fixes.

* Repo-level README updates

* Documentation updates

* Linting updates

* v0.0.4

* changing gulp serve directory (#66)

* Moved over to newer JS build process (#68)

* Moved over to newer JS build process

* Fixing up the lint errors

* Use Rollup's moduleName instead of the homegrown scope helper.

* Adding back in in the analytics suite (#69)

* Adding back in in the analytics suite

* Fixing selenium url

* Fixing lint issue

* Removing sinon

* Fixing feedback

* Tests (#70)

* Adding reesilience to tests

* Adding retries for sw-appcache behavior as well

* Fixing multiple windows on retires

* Moving driver get to a test
jeffposnick pushed a commit that referenced this pull request Dec 5, 2016
* Super-early exploration

* Move to require() instead of import for the build scripts

* Adding an assert library

* Bump up the documentation dependency

* Add some configuration/assertions

* Add some configuration/assertions

* Another checkpoint.

* More bits.

* Bug fixes!

* CacheManager -> CacheWrapper

* Manager -> Behavior

* Pass the (non-false) result of when to the handler as {params}

* Manager -> Behavior

* Add a RegExpRoute class

* Bug fixes + cleanup

* Docs (#46)

* Deploy to GitHub Pages

* First attempt at jsdoc integration

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

* Fixing linting issues

* Gulp clean (#49)

* 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

* Minify (#53)

* First attempt and minified build

* Removing old modules

* First commit

* enabling es6 modules in sw-background-queue

* Changing minification for babili (#55)

* Changing minification for babili

* External sourcemap and tidy up of code

* Adding license header file

* Removing unused dep

* Updating to latest google styleguide (#56)

* Files for Request enqueue

* Cleaner build (#57)

* 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

* First working prototype

* Latest syntax/interface updates (#58)

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

* Linting updates

* adding modular functions for attempt count

* adding failure callback

* Removes predicates, adds ExpressRoute (#62)

* Removes predicates, adds ExpressRoute

* Linting fixes

* sample app with PN on success

* Jsdocs (#63)

* Adding current changes to the jsdoc

* Fixing up modules and JSDoc

* Bumping selenium-assistant version

* Lerna (#65)

* First shift to lerna

* Fixing build from heap overflow

* Setting up some stuff for lerna release

* Got the building of tools with copy license into each

* Adding files for publishing

* v0.0.1

* Resetting the package.json

* v0.0.1

* Changing version number

* v0.0.3

* response manager skeleton

* Adding the Gemfile.lock

* Add a warning about sw-precaching not being ready.

* JSDoc for sw-runtime-caching

* sw-broadcast-cache-update demo

* Updated the package.json description of sw-cache-expiration

* Linting fixes.

* Repo-level README updates

* Documentation updates

* Linting updates

* v0.0.4

* implementing request manager

* re did to work everything with better modules

* enabling put response in idb

* moving from projects to packages

* changing gulp serve directory (#66)

* Moving dependencies out and propercallbacks

* Making lint happier

* adding JSDoc

* core Queue class jsDocs

* documenting requestManager

* request manager documentation

* renaming from camel case

* fixing package.json

* changes in queue js

* fixing headers and body serialization issue

* fixing bugs

* comments fixes

* comments fixes

* fixing initialize method documentation

* Moved over to newer JS build process (#68)

* Moved over to newer JS build process

* Fixing up the lint errors

* Use Rollup's moduleName instead of the homegrown scope helper.

* configurable iDB name

* fixing comments and broadcast manager

* named parameters for push

* fixing cleanup bug

* removing globalConfig from request-manager

* Adding back in in the analytics suite (#69)

* Adding back in in the analytics suite

* Fixing selenium url

* Fixing lint issue

* Removing sinon

* Fixing feedback

* Tests (#70)

* Adding reesilience to tests

* Adding retries for sw-appcache behavior as well

* Fixing multiple windows on retires

* Moving driver get to a test

* renaming idb-helper

* linting happiness

* checking for response.ok

* adding getResponse method

* lint fixes

* adding js docs to index.js

* migrating to new build system

* Instance model for every request

* id based default queues

* adding test for queue js

* splitting modules

* splitting modules

* queue tests

* tag based sync events

* bug fixing cleanup queue

* changing callbackName for successfull bgQ request Execution

* removing unwanted parameter from push method

* incorporating comments and more test

* lint fixes

* bug fixes

* adding assert to files

* commenting assert for non required params

* changing lets to consts

* Decentralising idb helper

* bug fix
gauntface pushed a commit that referenced this pull request Jan 18, 2017
* Super-early exploration

* Move to require() instead of import for the build scripts

* Adding an assert library

* Bump up the documentation dependency

* Add some configuration/assertions

* Add some configuration/assertions

* Another checkpoint.

* More bits.

* Bug fixes!

* CacheManager -> CacheWrapper

* Manager -> Behavior

* Pass the (non-false) result of when to the handler as {params}

* Manager -> Behavior

* Add a RegExpRoute class

* Bug fixes + cleanup

* Docs (#46)

* Deploy to GitHub Pages

* First attempt at jsdoc integration

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

* Fixing linting issues

* Gulp clean (#49)

* 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

* Minify (#53)

* First attempt and minified build

* Removing old modules

* First commit

* enabling es6 modules in sw-background-queue

* Changing minification for babili (#55)

* Changing minification for babili

* External sourcemap and tidy up of code

* Adding license header file

* Removing unused dep

* Updating to latest google styleguide (#56)

* Files for Request enqueue

* Cleaner build (#57)

* 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

* First working prototype

* Latest syntax/interface updates (#58)

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

* Linting updates

* adding modular functions for attempt count

* adding failure callback

* Removes predicates, adds ExpressRoute (#62)

* Removes predicates, adds ExpressRoute

* Linting fixes

* sample app with PN on success

* Jsdocs (#63)

* Adding current changes to the jsdoc

* Fixing up modules and JSDoc

* Bumping selenium-assistant version

* Lerna (#65)

* First shift to lerna

* Fixing build from heap overflow

* Setting up some stuff for lerna release

* Got the building of tools with copy license into each

* Adding files for publishing

* v0.0.1

* Resetting the package.json

* v0.0.1

* Changing version number

* v0.0.3

* response manager skeleton

* Adding the Gemfile.lock

* Add a warning about sw-precaching not being ready.

* JSDoc for sw-runtime-caching

* sw-broadcast-cache-update demo

* Updated the package.json description of sw-cache-expiration

* Linting fixes.

* Repo-level README updates

* Documentation updates

* Linting updates

* v0.0.4

* implementing request manager

* re did to work everything with better modules

* enabling put response in idb

* moving from projects to packages

* changing gulp serve directory (#66)

* Moving dependencies out and propercallbacks

* Making lint happier

* adding JSDoc

* core Queue class jsDocs

* documenting requestManager

* request manager documentation

* renaming from camel case

* fixing package.json

* changes in queue js

* fixing headers and body serialization issue

* fixing bugs

* comments fixes

* comments fixes

* fixing initialize method documentation

* Moved over to newer JS build process (#68)

* Moved over to newer JS build process

* Fixing up the lint errors

* Use Rollup's moduleName instead of the homegrown scope helper.

* configurable iDB name

* fixing comments and broadcast manager

* named parameters for push

* fixing cleanup bug

* removing globalConfig from request-manager

* Adding back in in the analytics suite (#69)

* Adding back in in the analytics suite

* Fixing selenium url

* Fixing lint issue

* Removing sinon

* Fixing feedback

* Tests (#70)

* Adding reesilience to tests

* Adding retries for sw-appcache behavior as well

* Fixing multiple windows on retires

* Moving driver get to a test

* renaming idb-helper

* linting happiness

* checking for response.ok

* adding getResponse method

* lint fixes

* adding js docs to index.js

* migrating to new build system

* Instance model for every request

* id based default queues

* adding test for queue js

* splitting modules

* splitting modules

* queue tests

* tag based sync events

* bug fixing cleanup queue

* changing callbackName for successfull bgQ request Execution

* removing unwanted parameter from push method

* incorporating comments and more test

* lint fixes

* bug fixes

* adding assert to files

* commenting assert for non required params

* changing lets to consts

* Decentralising idb helper

* bug fix

* tests for background-sync-queue

* more tests

* more tests

* extending tests ro request-manager

* tests for request manager

* tests for queue utils

* more tests for queue utils

* requestManager tests

* jsDocs

* bug fixes

* more tests

* cleanup test

* adding build for remaining files

* comments fixing

* adding broadcastChannel differently

* adding sw-background-queue into build file

* adding sw-background-queue into build file

* complete build file

* fixing bcManager tests

* replay requests tests

* more tests

* completing tests

* fixing comment

* changing documentation

* making sense with jsDocs

* making sense with jsDocs

* completing documentation

* proper demo

* resolving comments

* fixing test

* changing build file to avoid meory problems

* lint fixes
prateekbh added a commit that referenced this pull request Jan 27, 2017
* Super-early exploration

* Move to require() instead of import for the build scripts

* Adding an assert library

* Bump up the documentation dependency

* Add some configuration/assertions

* Add some configuration/assertions

* Another checkpoint.

* More bits.

* Bug fixes!

* CacheManager -> CacheWrapper

* Manager -> Behavior

* Pass the (non-false) result of when to the handler as {params}

* Manager -> Behavior

* Add a RegExpRoute class

* Bug fixes + cleanup

* Docs (#46)

* Deploy to GitHub Pages

* First attempt at jsdoc integration

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

* Fixing linting issues

* Gulp clean (#49)

* 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

* Minify (#53)

* First attempt and minified build

* Removing old modules

* First commit

* enabling es6 modules in sw-background-queue

* Changing minification for babili (#55)

* Changing minification for babili

* External sourcemap and tidy up of code

* Adding license header file

* Removing unused dep

* Updating to latest google styleguide (#56)

* Files for Request enqueue

* Cleaner build (#57)

* 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

* First working prototype

* Latest syntax/interface updates (#58)

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

* Linting updates

* adding modular functions for attempt count

* adding failure callback

* Removes predicates, adds ExpressRoute (#62)

* Removes predicates, adds ExpressRoute

* Linting fixes

* sample app with PN on success

* Jsdocs (#63)

* Adding current changes to the jsdoc

* Fixing up modules and JSDoc

* Bumping selenium-assistant version

* Lerna (#65)

* First shift to lerna

* Fixing build from heap overflow

* Setting up some stuff for lerna release

* Got the building of tools with copy license into each

* Adding files for publishing

* v0.0.1

* Resetting the package.json

* v0.0.1

* Changing version number

* v0.0.3

* response manager skeleton

* Adding the Gemfile.lock

* Add a warning about sw-precaching not being ready.

* JSDoc for sw-runtime-caching

* sw-broadcast-cache-update demo

* Updated the package.json description of sw-cache-expiration

* Linting fixes.

* Repo-level README updates

* Documentation updates

* Linting updates

* v0.0.4

* implementing request manager

* re did to work everything with better modules

* enabling put response in idb

* moving from projects to packages

* changing gulp serve directory (#66)

* Moving dependencies out and propercallbacks

* Making lint happier

* adding JSDoc

* core Queue class jsDocs

* documenting requestManager

* request manager documentation

* renaming from camel case

* fixing package.json

* changes in queue js

* fixing headers and body serialization issue

* fixing bugs

* comments fixes

* comments fixes

* fixing initialize method documentation

* Moved over to newer JS build process (#68)

* Moved over to newer JS build process

* Fixing up the lint errors

* Use Rollup's moduleName instead of the homegrown scope helper.

* configurable iDB name

* fixing comments and broadcast manager

* named parameters for push

* fixing cleanup bug

* removing globalConfig from request-manager

* Adding back in in the analytics suite (#69)

* Adding back in in the analytics suite

* Fixing selenium url

* Fixing lint issue

* Removing sinon

* Fixing feedback

* Tests (#70)

* Adding reesilience to tests

* Adding retries for sw-appcache behavior as well

* Fixing multiple windows on retires

* Moving driver get to a test

* renaming idb-helper

* linting happiness

* checking for response.ok

* adding getResponse method

* lint fixes

* adding js docs to index.js

* migrating to new build system

* Instance model for every request

* id based default queues

* adding test for queue js

* splitting modules

* splitting modules

* queue tests

* tag based sync events

* bug fixing cleanup queue

* changing callbackName for successfull bgQ request Execution

* removing unwanted parameter from push method

* incorporating comments and more test

* lint fixes

* bug fixes

* adding assert to files

* commenting assert for non required params

* changing lets to consts

* Decentralising idb helper

* bug fix

* tests for background-sync-queue

* more tests

* more tests

* extending tests ro request-manager

* tests for request manager

* tests for queue utils

* more tests for queue utils

* requestManager tests

* jsDocs

* bug fixes

* more tests

* cleanup test

* adding build for remaining files

* comments fixing

* adding broadcastChannel differently

* adding sw-background-queue into build file

* adding sw-background-queue into build file

* complete build file

* fixing bcManager tests

* replay requests tests

* more tests

* completing tests

* fixing comment

* changing documentation

* making sense with jsDocs

* making sense with jsDocs

* completing documentation

* proper demo

* resolving comments

* fixing test

* changing build file to avoid meory problems

* lint fixes

* integration with higher level framework

* updating readme

* resolving comments

* fixing demo
@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.

None yet

3 participants