From d9d023cc727f53311a76e64954db80b03fa83885 Mon Sep 17 00:00:00 2001 From: Fred Blundun Date: Fri, 6 Jun 2014 09:22:06 +0100 Subject: [PATCH 1/5] Added guard to prevent document size field from being set as "NaNxNaN" (#220) --- CHANGELOG | 4 ++++ package.json | 2 +- src/js/lib/detectors.js | 2 +- src/js/snowplow.js | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 65a7034bc..4bbea82db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +Version 1.0.2 (2014-04-xx) +-------------------------- +Added guard to prevent document size field from being set as "NaNxNaN" (#220) + Version 1.0.1 (2014-04-09) -------------------------- Fixed lodash.js to work in the presence of AMD modules (#165) diff --git a/package.json b/package.json index fabecef4b..6f8e3915c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "snowplow-tracker", - "version": "1.0.1", + "version": "1.0.2", "devDependencies": { "grunt": "~0.4.2", "intern": "~1.4.0", diff --git a/src/js/lib/detectors.js b/src/js/lib/detectors.js index 25c0fb2bd..df2c1c0fb 100644 --- a/src/js/lib/detectors.js +++ b/src/js/lib/detectors.js @@ -155,7 +155,7 @@ var de = documentAlias.documentElement; // Alias var w = Math.max(de.clientWidth, de.offsetWidth, de.scrollWidth); var h = Math.max(de.clientHeight, de.offsetHeight, de.scrollHeight); - return w + 'x' + h; + return isNaN(w) || isNaN(h) ? '' : w + 'x' + h; } /* diff --git a/src/js/snowplow.js b/src/js/snowplow.js index 3c975fd72..45e5c0ed1 100644 --- a/src/js/snowplow.js +++ b/src/js/snowplow.js @@ -88,7 +88,7 @@ windowAlias = window, /* Tracker identifier with version */ - version = 'js-1.0.0', // Update banner.js too + version = 'js-1.0.2', // Update banner.js too /* Contains three variables that are shared with tracker.js and must be passed by reference */ mutSnowplowState = { From 22dbcdc341bf0869d73add78dbefddeac2749aed Mon Sep 17 00:00:00 2001 From: Fred Blundun Date: Fri, 6 Jun 2014 09:43:27 +0100 Subject: [PATCH 2/5] Corrected month --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 4bbea82db..10576b090 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -Version 1.0.2 (2014-04-xx) +Version 1.0.2 (2014-06-xx) -------------------------- Added guard to prevent document size field from being set as "NaNxNaN" (#220) From 12ab08bcb45400847f957a48c7b7ce8947fe4f54 Mon Sep 17 00:00:00 2001 From: Fred Blundun Date: Fri, 6 Jun 2014 10:09:59 +0100 Subject: [PATCH 3/5] Fixed Grunt publish tasks to build sp.js as well as upload it to S3 (#224) --- CHANGELOG | 1 + Gruntfile.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 10576b090..f1de337a4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Version 1.0.2 (2014-06-xx) -------------------------- Added guard to prevent document size field from being set as "NaNxNaN" (#220) +Fixed Grunt publish tasks to build sp.js as well as upload it to S3 (#224) Version 1.0.1 (2014-04-09) -------------------------- diff --git a/Gruntfile.js b/Gruntfile.js index 8ac37acc8..e45959a6f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -198,8 +198,8 @@ module.exports = function(grunt) { }); grunt.registerTask('default', 'Build lodash, Browserify, add banner, and minify', ['lodash', 'browserify', 'concat', 'min']); - grunt.registerTask('publish', 'Upload to S3 and invalidate Cloudfront (full semantic version only)', ['upload_setup', 'concat', 'min', 's3:not_pinned', 'invalidate_cloudfront:not_pinned']); - grunt.registerTask('publish-pinned', 'Upload to S3 and invalidate Cloudfront (full semantic version and semantic major version)', ['upload_setup', 'concat', 'min', 's3', 'invalidate_cloudfront']); + grunt.registerTask('publish', 'Upload to S3 and invalidate Cloudfront (full semantic version only)', ['upload_setup', 'lodash', 'browserify', 'concat', 'min', 's3:not_pinned', 'invalidate_cloudfront:not_pinned']); + grunt.registerTask('publish-pinned', 'Upload to S3 and invalidate Cloudfront (full semantic version and semantic major version)', ['upload_setup', 'lodash', 'browserify', 'concat', 'min', 's3', 'invalidate_cloudfront']); grunt.registerTask('travis', 'Intern tests for Travis CI', ['lodash','intern']); } From 7e86fb0ff49ae54983426522a6d219df49870b46 Mon Sep 17 00:00:00 2001 From: Fred Blundun Date: Wed, 11 Jun 2014 14:06:58 +0100 Subject: [PATCH 4/5] Added cache control to Grunt upload for full semantic version (#225) --- CHANGELOG | 1 + Gruntfile.js | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index f1de337a4..f20fa842e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Version 1.0.2 (2014-06-xx) -------------------------- Added guard to prevent document size field from being set as "NaNxNaN" (#220) Fixed Grunt publish tasks to build sp.js as well as upload it to S3 (#224) +Added cache control to Grunt upload for full semantic version (#225) Version 1.0.1 (2014-04-09) -------------------------- diff --git a/Gruntfile.js b/Gruntfile.js index e45959a6f..4c339d062 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -155,6 +155,11 @@ module.exports = function(grunt) { gzip: true }, not_pinned: { + options: { + headers: { + 'Cache-Control': 'max-age=315360000' + } + }, upload: [ { src: 'dist/sp.js', @@ -163,6 +168,11 @@ module.exports = function(grunt) { ] }, pinned: { + options: { + headers: { + 'Cache-Control': 'max-age=3600' + } + }, upload: [ { src: 'dist/sp.js', From 88997cd859e375591ce2d8729bc96c8a1053f815 Mon Sep 17 00:00:00 2001 From: Alex Dean Date: Tue, 24 Jun 2014 18:01:50 +0100 Subject: [PATCH 5/5] Finalized date --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index f20fa842e..f70dbb9d7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -Version 1.0.2 (2014-06-xx) +Version 1.0.2 (2014-06-24) -------------------------- Added guard to prevent document size field from being set as "NaNxNaN" (#220) Fixed Grunt publish tasks to build sp.js as well as upload it to S3 (#224)