Skip to content

Commit c1290b9

Browse files
committed
Merge branch 'develop'
2 parents b0d5ff1 + 88997cd commit c1290b9

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 1.0.2 (2014-06-24)
2+
--------------------------
3+
Added guard to prevent document size field from being set as "NaNxNaN" (#220)
4+
Fixed Grunt publish tasks to build sp.js as well as upload it to S3 (#224)
5+
Added cache control to Grunt upload for full semantic version (#225)
6+
17
Version 1.0.1 (2014-04-09)
28
--------------------------
39
Fixed lodash.js to work in the presence of AMD modules (#165)

Gruntfile.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ module.exports = function(grunt) {
155155
gzip: true
156156
},
157157
not_pinned: {
158+
options: {
159+
headers: {
160+
'Cache-Control': 'max-age=315360000'
161+
}
162+
},
158163
upload: [
159164
{
160165
src: 'dist/sp.js',
@@ -163,6 +168,11 @@ module.exports = function(grunt) {
163168
]
164169
},
165170
pinned: {
171+
options: {
172+
headers: {
173+
'Cache-Control': 'max-age=3600'
174+
}
175+
},
166176
upload: [
167177
{
168178
src: 'dist/sp.js',
@@ -198,8 +208,8 @@ module.exports = function(grunt) {
198208
});
199209

200210
grunt.registerTask('default', 'Build lodash, Browserify, add banner, and minify', ['lodash', 'browserify', 'concat', 'min']);
201-
grunt.registerTask('publish', 'Upload to S3 and invalidate Cloudfront (full semantic version only)', ['upload_setup', 'concat', 'min', 's3:not_pinned', 'invalidate_cloudfront:not_pinned']);
202-
grunt.registerTask('publish-pinned', 'Upload to S3 and invalidate Cloudfront (full semantic version and semantic major version)', ['upload_setup', 'concat', 'min', 's3', 'invalidate_cloudfront']);
211+
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']);
212+
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']);
203213
grunt.registerTask('travis', 'Intern tests for Travis CI', ['lodash','intern']);
204214

205215
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "snowplow-tracker",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"devDependencies": {
55
"grunt": "~0.4.2",
66
"intern": "~1.4.0",

src/js/lib/detectors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
var de = documentAlias.documentElement; // Alias
156156
var w = Math.max(de.clientWidth, de.offsetWidth, de.scrollWidth);
157157
var h = Math.max(de.clientHeight, de.offsetHeight, de.scrollHeight);
158-
return w + 'x' + h;
158+
return isNaN(w) || isNaN(h) ? '' : w + 'x' + h;
159159
}
160160

161161
/*

src/js/snowplow.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
windowAlias = window,
8989

9090
/* Tracker identifier with version */
91-
version = 'js-1.0.0', // Update banner.js too
91+
version = 'js-1.0.2', // Update banner.js too
9292

9393
/* Contains three variables that are shared with tracker.js and must be passed by reference */
9494
mutSnowplowState = {

0 commit comments

Comments
 (0)