Permalink
Browse files

Update NPM versions and make sure tests/build works

  • Loading branch information...
1 parent 68930c3 commit da1714ac6a7d89aec6bc5d168813f2ecab2fa9f2 @timdream committed Dec 29, 2016
Showing with 21 additions and 15 deletions.
  1. +13 −13 package.json
  2. +8 −2 test/util.js
View
@@ -9,19 +9,19 @@
"grunt": "grunt"
},
"devDependencies": {
- "grunt": "^0.4.5",
+ "grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
- "grunt-contrib-clean": "~0.5.0",
- "grunt-contrib-concat": "~0.4.0",
- "grunt-contrib-connect": "~0.7.1",
- "grunt-contrib-copy": "~0.5.0",
- "grunt-contrib-jshint": "~0.10.0",
- "grunt-contrib-qunit": "~0.4.0",
- "grunt-contrib-uglify": "~0.4.0",
- "grunt-gh-pages": "^0.9.1",
- "grunt-replace": "~0.7.6",
- "grunt-rev": "~0.1.0",
- "grunt-shell": "~0.6.4",
- "grunt-usemin": "~2.1.1"
+ "grunt-contrib-clean": "^1.0.0",
+ "grunt-contrib-concat": "^1.0.1",
+ "grunt-contrib-connect": "^1.0.2",
+ "grunt-contrib-copy": "^1.0.0",
+ "grunt-contrib-jshint": "^1.1.0",
+ "grunt-contrib-qunit": "^1.2.0",
+ "grunt-contrib-uglify": "^2.0.0",
+ "grunt-gh-pages": "^2.0.0",
+ "grunt-replace": "^1.0.1",
+ "grunt-rev": "^0.1.0",
+ "grunt-shell": "^2.1.0",
+ "grunt-usemin": "^3.1.1"
}
}
View
@@ -39,14 +39,20 @@ if (!Function.prototype.bind) {
/* XXX: We cannot create a File object in web content,
so we will use the next best thing here -- a Blob. */
window.getFakeFile = function getBlob(data) {
- if (typeof Blob === 'function') {
+ // XXX: `typeof Blob` won't work because it would be an object,
+ // even if it's a constructor on PhantomJS.
+ try {
return new Blob([data], { type: 'text/plain' });
- }
+ } catch (e) { }
// Use the old BlobBuilder (specifically for PhantomJS v1.9)
var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder ||
window.MozBlobBuilder || window.MSBlobBuilder;
+ if (!BlobBuilder) {
+ throw new Error('No way to construct a Blob.');
+ }
+
// This is a poor man's byte string converter
var byteString = unescape(encodeURIComponent(data));

0 comments on commit da1714a

Please sign in to comment.