From 1436bf514f463f1ba425a60eeccb3041ca56ca9f Mon Sep 17 00:00:00 2001 From: Andrea Date: Tue, 29 Aug 2017 21:06:44 +0200 Subject: [PATCH 01/13] Removed jest --- package-lock.json | 2 +- package.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ca82332..90ed84f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vanilla-lazyload", - "version": "8.1.0", + "version": "9.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0b0f502a..c40915a3 100644 --- a/package.json +++ b/package.json @@ -41,5 +41,6 @@ "bugs": { "url": "https://github.com/verlok/lazyload/issues" }, - "homepage": "http://verlok.github.io/lazyload" -} \ No newline at end of file + "homepage": "http://verlok.github.io/lazyload", + "dependencies": {} +} From ed88387660b6c5a6df1601dcddd12c449ee0e72a Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 30 Aug 2017 07:47:56 +0200 Subject: [PATCH 02/13] Configured jest and babel --- .babelrc | 22 + __tests__/lazyload.setSources.test.js | 159 ++ gulpfile.js | 20 +- package-lock.json | 2328 ++++++++++++++++++++++++- package.json | 8 +- 5 files changed, 2464 insertions(+), 73 deletions(-) create mode 100644 .babelrc create mode 100644 __tests__/lazyload.setSources.test.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..c8455498 --- /dev/null +++ b/.babelrc @@ -0,0 +1,22 @@ +{ + "ignore": [ + "node_modules/**" + ], + "env": { + "test": { + "presets": [ + "es2015" + ], + "plugins": ["transform-object-assign"] + }, + "release": { + "presets": [ + ["es2015", { + "modules": false + }] + ], + "sourceMap": false, + "plugins": ["transform-object-assign"] + } + } +} \ No newline at end of file diff --git a/__tests__/lazyload.setSources.test.js b/__tests__/lazyload.setSources.test.js new file mode 100644 index 00000000..f5b2b2d0 --- /dev/null +++ b/__tests__/lazyload.setSources.test.js @@ -0,0 +1,159 @@ +import setSources from "../src/lazyLoad.setSources"; + +test("setSources is defined", () => { + expect(typeof setSources).toBe("function"); +}); +/* +describe("setSourcesForPicture", () => { + let p, s1, s2, i; + let testFunct = setSourcesForPicture; + let img1 = "http://placehold.it/1x1"; + let img100 = "http://placehold.it/100x100"; + let img200 = "http://placehold.it/200x200"; + let img400 = "http://placehold.it/400x400"; + let dataSrcSetPartialAttr = "original-set"; + let dataSrcSetAttr = "data-" + dataSrcSetPartialAttr; + let srcsetAttr = "srcset"; + beforeEach(() => { + p = document.createElement("picture"); + p.appendChild(s1 = document.createElement("source")); + p.appendChild(s2 = document.createElement("source")); + p.appendChild(i = document.createElement("img")); + }); + test("...with initially empty srcset", () => { + s1.setAttribute(dataSrcSetAttr, img200); + s2.setAttribute(dataSrcSetAttr, img400); + testFunct(i, dataSrcSetPartialAttr); + expect(s1.getAttribute(srcsetAttr)).toBe(img200); + expect(s2.getAttribute(srcsetAttr)).toBe(img400); + }); + test("...with initial value in srcset", () => { + s1.setAttribute(srcsetAttr, img1); + s2.setAttribute(srcsetAttr, img1); + s1.setAttribute(dataSrcSetAttr, img200); + s2.setAttribute(dataSrcSetAttr, img400); + testFunct(i, dataSrcSetPartialAttr); + expect(s1.getAttribute(srcsetAttr)).toBe(img200); + expect(s2.getAttribute(srcsetAttr)).toBe(img400); + }); + test("...with initial value in srcset and empty data-srcset", () => { + s1.setAttribute(srcsetAttr, img1); + s2.setAttribute(srcsetAttr, img1); + s1.setAttribute(dataSrcSetAttr, ""); + s2.setAttribute(dataSrcSetAttr, ""); + testFunct(i, dataSrcSetPartialAttr); + expect(s1.getAttribute(srcsetAttr)).toBe(img1); + expect(s2.getAttribute(srcsetAttr)).toBe(img1); + }); +}); + +describe("setSources for image", () => { + let i; + let fakeInstance = { + setSourcesForPicture: jest.fn() + }; + let testFunct = setSources; + let img1 = "http://placehold.it/1x1"; + let img100 = "http://placehold.it/100x100"; + let img200 = "http://placehold.it/200x200"; + let img400 = "http://placehold.it/400x400"; + let dataSrcPartialAttr = "original"; + let dataSrcSetPartialAttr = "original-set"; + let dataSrcAttr = "data-" + dataSrcPartialAttr; + let dataSrcSetAttr = "data-" + dataSrcSetPartialAttr; + let srcAttr = "src"; + let srcSetAttr = "srcset"; + beforeEach(() => { + i = document.createElement("img"); + }); + test("...with initially empty src and srcset", () => { + fakeInstance.setSourcesForPicture.mockClear(); + i.setAttribute(dataSrcAttr, img200); + i.setAttribute(dataSrcSetAttr, img400); + testFunct(i, dataSrcSetPartialAttr, dataSrcPartialAttr); + expect(i.getAttribute(srcAttr)).toBe(img200); + expect(i.getAttribute(srcSetAttr)).toBe(img400); + expect(fakeInstance.setSourcesForPicture).toHaveBeenCalledTimes(1); + }); + test("...with initial values in src and srcset", () => { + fakeInstance.setSourcesForPicture.mockClear(); + i.setAttribute(srcAttr, img1); + i.setAttribute(srcSetAttr, img1); + i.setAttribute(dataSrcAttr, img200); + i.setAttribute(dataSrcSetAttr, img400); + testFunct(i, dataSrcSetPartialAttr, dataSrcPartialAttr); + expect(i.getAttribute(srcAttr)).toBe(img200); + expect(i.getAttribute(srcSetAttr)).toBe(img400); + expect(fakeInstance.setSourcesForPicture).toHaveBeenCalledTimes(1); + }); + test("...with initial values in src and srcset and empty data-*", () => { + fakeInstance.setSourcesForPicture.mockClear(); + i.setAttribute(srcAttr, img200); + i.setAttribute(srcSetAttr, img400); + i.setAttribute(dataSrcAttr, ""); + i.setAttribute(dataSrcSetAttr, ""); + testFunct(i, dataSrcSetPartialAttr, dataSrcPartialAttr); + expect(i.getAttribute(srcAttr)).toBe(img200); + expect(i.getAttribute(srcSetAttr)).toBe(img400); + expect(fakeInstance.setSourcesForPicture).toHaveBeenCalledTimes(1); + }); +}); + +describe("_setSources for iframe", () => { + let i; + let testFunct = setSources; + let srcToLoad = "http://www.google.it"; + let dataSrcPartialAttr = "original"; + let dataSrcAttr = "data-" + dataSrcPartialAttr; + let srcAttr = "src"; + beforeEach(() => { + i = document.createElement("iframe"); + }); + test("...with initially empty src", () => { + i.setAttribute(dataSrcAttr, srcToLoad); + testFunct(i, "", dataSrcPartialAttr); + expect(i.getAttribute(srcAttr)).toBe(srcToLoad); + }); + test("...with initial value in src", () => { + let newSrc = srcToLoad + "/doodle"; + i.setAttribute(srcAttr, srcToLoad); + i.setAttribute(dataSrcAttr, newSrc); + testFunct(i, "", dataSrcPartialAttr); + expect(i.getAttribute(srcAttr)).toBe(newSrc); + }); + test("...with initial value in src and empty data-original", () => { + i.setAttribute(srcAttr, srcToLoad); + i.setAttribute(dataSrcAttr, ""); + testFunct(i, "", dataSrcPartialAttr); + expect(i.getAttribute(srcAttr)).toBe(srcToLoad); + }); +}); + +describe("_setSources for background image", () => { + let i; + let testFunct = setSources; + let img100 = "http://placehold.it/100x100"; + let img200 = "http://placehold.it/200x200"; + let dataSrcPartialAttr = "original"; + let dataSrcAttr = "data-" + dataSrcPartialAttr; + test("...with initially empty style attribute", () => { + i = document.createElement("div"); + i.setAttribute(dataSrcAttr, img200); + testFunct(i, "", dataSrcPartialAttr); + expect(i.style.backgroundImage).toBe("url(" + img200 + ")"); + }); + test("...with initially present style attribute", () => { + i = document.createElement("div"); + i.style.padding = "1px"; + i.setAttribute(dataSrcAttr, img200); + testFunct(i, "", dataSrcPartialAttr); + expect(i.style.backgroundImage).toBe("url(" + img200 + ")"); + }); + test("...with initially present style and background", () => { + i = document.createElement("div"); + i.style.backgroundImage = "url(" + img100 + ")"; + i.setAttribute(dataSrcAttr, img200); + testFunct(i, "", dataSrcPartialAttr); + expect(i.style.backgroundImage).toBe("url(" + img200 + ")"); + }); +});*/ \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 4e7d5b3f..7d3bcecb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,10 +5,22 @@ var rename = require('gulp-rename'); var notify = require('gulp-notify'); var babel = require('gulp-babel'); var rollup = require('gulp-rollup'); +var jest = require('gulp-jest').default; var destFolder = "./dist"; -gulp.task('scripts', function () { +gulp.task('test', function() { + process.env.NODE_ENV = 'test'; + return gulp.src('__tests__').pipe(jest({ + "preprocessorIgnorePatterns": [ + "/dist/", "/node_modules/" + ], + "automock": false + })); +}); + +gulp.task('release', function () { + process.env.NODE_ENV = 'release'; return gulp.src("./src/**/*.js") // ----------- linting -------------- .pipe(eslint()) @@ -23,11 +35,7 @@ gulp.task('scripts', function () { .pipe(rename("lazyload.es2015.js")) .pipe(gulp.dest(destFolder)) // --> writing rolledup // ----------- babelizing -------------- - .pipe(babel({ - presets: [["es2015", { "modules": false }]], - sourceMap: false, - plugins: ["transform-object-assign"] - })) + .pipe(babel()) .pipe(rename("lazyload.js")) .pipe(gulp.dest(destFolder)) // --> writing babelized // ----------- minifying -------------- diff --git a/package-lock.json b/package-lock.json index 90ed84f5..55477cfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,12 +4,35 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "abab": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.3.tgz", + "integrity": "sha1-uB3l9ydOxOdW15fNg08wNkJyTl0=", + "dev": true + }, "acorn": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.1.tgz", "integrity": "sha512-vOk6uEMctu0vQrvuSqFdJyqj1Q0S5VTDL79qtjo+DhRr+1mmaD+tluFSCZqhvi/JUhXSzoZN2BhtstaPEeE8cw==", "dev": true }, + "acorn-globals": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", + "dev": true, + "requires": { + "acorn": "4.0.13" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, "acorn-jsx": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", @@ -45,6 +68,23 @@ "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", "dev": true }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, "ansi-escapes": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz", @@ -63,6 +103,25 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "append-transform": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "dev": true, + "requires": { + "default-require-extensions": "1.0.0" + } + }, "archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", @@ -105,6 +164,12 @@ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", "dev": true }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, "array-slice": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", @@ -138,6 +203,45 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "dev": true, + "requires": { + "lodash": "4.17.4" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -149,6 +253,68 @@ "js-tokens": "3.0.2" } }, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.0", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.0", + "debug": "2.6.8", + "json5": "0.5.1", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.7", + "slash": "1.0.0", + "source-map": "0.5.7" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "babel-generator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } + } + }, "babel-helper-builder-binary-assignment-operator-visitor": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", @@ -276,6 +442,27 @@ "babel-types": "6.26.0" } }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-jest": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-20.0.3.tgz", + "integrity": "sha1-5KA7E9wQOJ4UD8ZF0J/8TO0wFnE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-plugin-istanbul": "4.1.4", + "babel-preset-jest": "20.0.3" + } + }, "babel-messages": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", @@ -294,6 +481,23 @@ "babel-runtime": "6.26.0" } }, + "babel-plugin-istanbul": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz", + "integrity": "sha1-GN3oS/POMp/d8/QQP66SFFbY5Yc=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "istanbul-lib-instrument": "1.7.5", + "test-exclude": "4.1.1" + } + }, + "babel-plugin-jest-hoist": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz", + "integrity": "sha1-r+3IU70/jcNUjqZx++adA8wsF2c=", + "dev": true + }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", @@ -666,6 +870,30 @@ "babel-plugin-transform-regenerator": "6.26.0" } }, + "babel-preset-jest": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz", + "integrity": "sha1-y6yq3stdaJyh4d4TYOv8ZoYsF4o=", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "20.0.3" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.0", + "home-or-tmp": "2.0.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "source-map-support": "0.4.16" + } + }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -730,12 +958,31 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, "beeper": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", "dev": true }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", @@ -757,6 +1004,23 @@ "repeat-element": "1.1.2" } }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, "browserslist": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.4.0.tgz", @@ -767,6 +1031,15 @@ "electron-to-chromium": "1.3.18" } }, + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, "buffer-from": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.1.tgz", @@ -776,6 +1049,12 @@ "is-array-buffer-x": "1.4.0" } }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, "caller-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", @@ -791,12 +1070,36 @@ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, "caniuse-lite": { "version": "1.0.30000718", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000718.tgz", "integrity": "sha1-DdJCkL6xExCy2A9rcKgjwqZab60=", "dev": true }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -810,6 +1113,12 @@ "supports-color": "2.0.0" } }, + "ci-info": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.0.0.tgz", + "integrity": "sha1-3FKF8rTiUYIWg2gcOBwziPRuxTQ=", + "dev": true + }, "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", @@ -831,6 +1140,27 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + } + } + }, "clone": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", @@ -849,6 +1179,12 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, "color-convert": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", @@ -864,6 +1200,15 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, "commander": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", @@ -919,6 +1264,18 @@ } } }, + "content-type-parser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-type-parser/-/content-type-parser-1.0.1.tgz", + "integrity": "sha1-w+VpiMU8ZRJ/tG1AMqOpACRv3JQ=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, "core-js": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", @@ -954,6 +1311,47 @@ } } }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "cssom": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", + "dev": true + }, + "cssstyle": { + "version": "0.2.37", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", + "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "dev": true, + "requires": { + "cssom": "0.3.2" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, "dateformat": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", @@ -969,12 +1367,38 @@ "ms": "2.0.0" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "default-require-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "dev": true, + "requires": { + "strip-bom": "2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, "defaults": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", @@ -1007,6 +1431,12 @@ } } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, "deprecated": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", @@ -1022,6 +1452,21 @@ "fs-exists-sync": "0.1.0" } }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "diff": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.0.tgz", + "integrity": "sha512-w0XZubFWn0Adlsapj9EAWX0FqWdO4tz8kc3RiYdWLh4k/V8PTb6i0SMgXt0vRM3zyKnT8tKO7mUlieRQHIjMNg==", + "dev": true + }, "doctrine": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", @@ -1049,6 +1494,16 @@ "readable-stream": "1.1.14" } }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, "electron-to-chromium": { "version": "1.3.18", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.18.tgz", @@ -1064,24 +1519,79 @@ "once": "1.3.3" } }, + "errno": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", + "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "dev": true, + "requires": { + "prr": "0.0.0" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "eslint": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.5.0.tgz", - "integrity": "sha1-u3XTuL3pf7XhPvzVOXRGd/6wGcM=", + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", "dev": true, "requires": { - "ajv": "5.2.2", - "babel-code-frame": "6.26.0", - "chalk": "2.1.0", - "concat-stream": "1.6.0", - "cross-spawn": "5.1.0", - "debug": "2.6.8", + "esprima": "2.7.3", + "estraverse": "1.9.3", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.2.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "eslint": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.5.0.tgz", + "integrity": "sha1-u3XTuL3pf7XhPvzVOXRGd/6wGcM=", + "dev": true, + "requires": { + "ajv": "5.2.2", + "babel-code-frame": "6.26.0", + "chalk": "2.1.0", + "concat-stream": "1.6.0", + "cross-spawn": "5.1.0", + "debug": "2.6.8", "doctrine": "2.0.0", "eslint-scope": "3.7.1", "espree": "3.5.0", @@ -1249,6 +1759,15 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "exec-sh": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.0.tgz", + "integrity": "sha1-FPdd4/INKG75MwmbLOUKkDWc7xA=", + "dev": true, + "requires": { + "merge": "1.2.0" + } + }, "expand-brackets": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", @@ -1302,6 +1821,12 @@ "is-extglob": "1.0.0" } }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, "fancy-log": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", @@ -1324,6 +1849,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "dev": true, + "requires": { + "bser": "2.0.0" + } + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -1357,6 +1891,41 @@ "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", "dev": true }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, "fill-range": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", @@ -1376,6 +1945,15 @@ "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", "dev": true }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, "findup-sync": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", @@ -1459,6 +2037,23 @@ "for-in": "1.0.2" } }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.16" + } + }, "fs-exists-sync": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", @@ -1486,6 +2081,29 @@ "globule": "0.1.0" } }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, "glob": { "version": "4.5.3", "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", @@ -1708,13 +2326,9 @@ } }, "graceful-fs": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", - "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", - "dev": true, - "requires": { - "natives": "1.1.0" - } + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "growly": { "version": "1.3.0", @@ -1773,6 +2387,16 @@ "gulp-util": "3.0.8" } }, + "gulp-jest": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gulp-jest/-/gulp-jest-2.0.0.tgz", + "integrity": "sha1-IkJd25siSRPPt5XXtWcma+zk6KM=", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "through2": "2.0.3" + } + }, "gulp-notify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/gulp-notify/-/gulp-notify-3.0.0.tgz", @@ -1908,6 +2532,97 @@ "glogg": "1.0.0" } }, + "handlebars": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz", + "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + } + } + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + } + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -1947,6 +2662,34 @@ "has-symbol-support-x": "1.4.0" } }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, "homedir-polyfill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", @@ -1956,6 +2699,32 @@ "parse-passwd": "1.0.0" } }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "html-encoding-sniffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz", + "integrity": "sha1-eb96eF6klf5mFl5zQVPzY/9UN9o=", + "dev": true, + "requires": { + "whatwg-encoding": "1.0.1" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, "iconv-lite": { "version": "0.4.18", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", @@ -2079,6 +2848,12 @@ "loose-envify": "1.3.1" } }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, "is": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", @@ -2106,12 +2881,36 @@ "to-string-tag-x": "1.4.0" } }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, "is-buffer": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", "dev": true }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-ci": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", + "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "dev": true, + "requires": { + "ci-info": "1.0.0" + } + }, "is-dotfile": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", @@ -2139,6 +2938,15 @@ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", "dev": true }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -2275,6 +3083,12 @@ "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", "dev": true }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, "is-unc-path": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", @@ -2325,65 +3139,637 @@ } } }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, - "js-yaml": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.9.1.tgz", - "integrity": "sha512-CbcG379L1e+mWBnLvHWWeLs8GyV/EMw862uLI3c+GxVyDHWZcjZinwuBd3iW2pgxgIlksW/1vNJa4to+RvDOww==", + "istanbul-api": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.1.13.tgz", + "integrity": "sha1-cZf2RBNgDr3+xjR6LcPU4D+X7Vo=", "dev": true, "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" + "async": "2.5.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.0.7", + "istanbul-lib-instrument": "1.7.5", + "istanbul-lib-report": "1.1.1", + "istanbul-lib-source-maps": "1.2.1", + "istanbul-reports": "1.1.2", + "js-yaml": "3.9.1", + "mkdirp": "0.5.1", + "once": "1.4.0" + }, + "dependencies": { + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + } } }, - "jschardet": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.1.tgz", - "integrity": "sha512-vE2hT1D0HLZCLLclfBSfkfTTedhVj0fubHpJBHKwwUWX0nSbhPAfk+SG9rTX95BYNmau8rGFfCeaT6T5OW1C2A==", - "dev": true - }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "istanbul-lib-coverage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", + "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==", "dev": true }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "istanbul-lib-hook": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz", + "integrity": "sha512-3U2HB9y1ZV9UmFlE12Fx+nPtFqIymzrqCksrXujm3NVbAZIJg/RfYgO1XiIa0mbmxTjWpVEVlkIZJ25xVIAfkQ==", "dev": true, "requires": { - "jsonify": "0.0.0" + "append-transform": "0.4.0" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "istanbul-lib-instrument": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.5.tgz", + "integrity": "sha1-rbWW+PDLi5XnOSBjUaOKWGryGx4=", "dev": true, "requires": { - "is-buffer": "1.1.5" + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" } }, - "levn": { + "istanbul-lib-report": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz", + "integrity": "sha512-tvF+YmCmH4thnez6JFX06ujIA19WPa9YUiwjc1uALF2cv5dmE3It8b5I8Ob7FHJ70H9Y5yF+TDkVa/mcADuw1Q==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz", + "integrity": "sha512-mukVvSXCn9JQvdJl8wP/iPhqig0MRtuWuD4ZNKo6vB2Ik//AmhAKe3QnPN02dmkRe3lTudFk3rzoHhwU4hb94w==", + "dev": true, + "requires": { + "debug": "2.6.8", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.1", + "source-map": "0.5.7" + } + }, + "istanbul-reports": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.2.tgz", + "integrity": "sha1-D7Lj9qqZIr085F0F2KtNXo4HvU8=", + "dev": true, + "requires": { + "handlebars": "4.0.10" + } + }, + "jest-changed-files": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-20.0.3.tgz", + "integrity": "sha1-k5TVzGXEOEBhSb7xv01Sto4D4/g=", + "dev": true + }, + "jest-cli": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-20.0.4.tgz", + "integrity": "sha1-5TKxnYiuW8bEF+iwWTpv6VSx3JM=", + "dev": true, + "requires": { + "ansi-escapes": "1.4.0", + "callsites": "2.0.0", + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "is-ci": "1.0.10", + "istanbul-api": "1.1.13", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-instrument": "1.7.5", + "istanbul-lib-source-maps": "1.2.1", + "jest-changed-files": "20.0.3", + "jest-config": "20.0.4", + "jest-docblock": "20.0.3", + "jest-environment-jsdom": "20.0.3", + "jest-haste-map": "20.0.4", + "jest-jasmine2": "20.0.4", + "jest-message-util": "20.0.3", + "jest-regex-util": "20.0.3", + "jest-resolve-dependencies": "20.0.3", + "jest-runtime": "20.0.4", + "jest-snapshot": "20.0.3", + "jest-util": "20.0.3", + "micromatch": "2.3.11", + "node-notifier": "5.1.2", + "pify": "2.3.0", + "slash": "1.0.0", + "string-length": "1.0.1", + "throat": "3.2.0", + "which": "1.3.0", + "worker-farm": "1.5.0", + "yargs": "7.1.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "jest-config": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-20.0.4.tgz", + "integrity": "sha1-43kwqyIXyRNgXv8T5712PsSPruo=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "glob": "7.1.2", + "jest-environment-jsdom": "20.0.3", + "jest-environment-node": "20.0.3", + "jest-jasmine2": "20.0.4", + "jest-matcher-utils": "20.0.3", + "jest-regex-util": "20.0.3", + "jest-resolve": "20.0.4", + "jest-validate": "20.0.3", + "pretty-format": "20.0.3" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "jest-diff": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-20.0.3.tgz", + "integrity": "sha1-gfKI/Z5nXw+yPHXxwrGURf5YZhc=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "diff": "3.3.0", + "jest-matcher-utils": "20.0.3", + "pretty-format": "20.0.3" + } + }, + "jest-docblock": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-20.0.3.tgz", + "integrity": "sha1-F76phDQswz2DxQ++FUXqDvqkRxI=", + "dev": true + }, + "jest-environment-jsdom": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz", + "integrity": "sha1-BIqKwS7iJfcZBBdxODS7mZeH3pk=", + "dev": true, + "requires": { + "jest-mock": "20.0.3", + "jest-util": "20.0.3", + "jsdom": "9.12.0" + } + }, + "jest-environment-node": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-20.0.3.tgz", + "integrity": "sha1-1Ii8RhKvLCRumG6K52caCZFj1AM=", + "dev": true, + "requires": { + "jest-mock": "20.0.3", + "jest-util": "20.0.3" + } + }, + "jest-haste-map": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-20.0.4.tgz", + "integrity": "sha1-ZT61XIic48Ah97lGk/IKQVm63wM=", + "dev": true, + "requires": { + "fb-watchman": "2.0.0", + "graceful-fs": "4.1.11", + "jest-docblock": "20.0.3", + "micromatch": "2.3.11", + "sane": "1.6.0", + "worker-farm": "1.5.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "jest-jasmine2": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz", + "integrity": "sha1-/MWxQReA2RHQQpAu8YWehS5g1eE=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "jest-diff": "20.0.3", + "jest-matcher-utils": "20.0.3", + "jest-matchers": "20.0.3", + "jest-message-util": "20.0.3", + "jest-snapshot": "20.0.3", + "once": "1.4.0", + "p-map": "1.1.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + } + } + }, + "jest-matcher-utils": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz", + "integrity": "sha1-s6a443yld4A7CDKpixZPRLeBVhI=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "pretty-format": "20.0.3" + } + }, + "jest-matchers": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-matchers/-/jest-matchers-20.0.3.tgz", + "integrity": "sha1-ymnbHDLbWm9wf6XgQBq7VXAN/WA=", + "dev": true, + "requires": { + "jest-diff": "20.0.3", + "jest-matcher-utils": "20.0.3", + "jest-message-util": "20.0.3", + "jest-regex-util": "20.0.3" + } + }, + "jest-message-util": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-20.0.3.tgz", + "integrity": "sha1-auwoRDBvyw5udNV5bBAG2W/dgxw=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "micromatch": "2.3.11", + "slash": "1.0.0" + } + }, + "jest-mock": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-20.0.3.tgz", + "integrity": "sha1-i8Bw6QQUqhVcEajWTIaaDVxx2lk=", + "dev": true + }, + "jest-regex-util": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-20.0.3.tgz", + "integrity": "sha1-hburXRM+RGJbGfr4xqpRItCF12I=", + "dev": true + }, + "jest-resolve": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-20.0.4.tgz", + "integrity": "sha1-lEiz6La6/BVHlETGSZBFt//ll6U=", + "dev": true, + "requires": { + "browser-resolve": "1.11.2", + "is-builtin-module": "1.0.0", + "resolve": "1.4.0" + } + }, + "jest-resolve-dependencies": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz", + "integrity": "sha1-bhSntxevDyyzZnxUneQK8Bexcjo=", + "dev": true, + "requires": { + "jest-regex-util": "20.0.3" + } + }, + "jest-runtime": { + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-20.0.4.tgz", + "integrity": "sha1-osgCIZxCA/dU3xQE5JAYYWnRJNg=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-jest": "20.0.3", + "babel-plugin-istanbul": "4.1.4", + "chalk": "1.1.3", + "convert-source-map": "1.5.0", + "graceful-fs": "4.1.11", + "jest-config": "20.0.4", + "jest-haste-map": "20.0.4", + "jest-regex-util": "20.0.3", + "jest-resolve": "20.0.4", + "jest-util": "20.0.3", + "json-stable-stringify": "1.0.1", + "micromatch": "2.3.11", + "strip-bom": "3.0.0", + "yargs": "7.1.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "jest-snapshot": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-20.0.3.tgz", + "integrity": "sha1-W4R+GtsaTZCFKn+fElCG4YfHZWY=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "jest-diff": "20.0.3", + "jest-matcher-utils": "20.0.3", + "jest-util": "20.0.3", + "natural-compare": "1.4.0", + "pretty-format": "20.0.3" + } + }, + "jest-util": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-20.0.3.tgz", + "integrity": "sha1-DAf32A2C9OWmfG+LnD/n9lz9Mq0=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "jest-message-util": "20.0.3", + "jest-mock": "20.0.3", + "jest-validate": "20.0.3", + "leven": "2.1.0", + "mkdirp": "0.5.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "jest-validate": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-20.0.3.tgz", + "integrity": "sha1-0M/R3k9XnymEhJJcKA+PHZTsPKs=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "jest-matcher-utils": "20.0.3", + "leven": "2.1.0", + "pretty-format": "20.0.3" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.9.1.tgz", + "integrity": "sha512-CbcG379L1e+mWBnLvHWWeLs8GyV/EMw862uLI3c+GxVyDHWZcjZinwuBd3iW2pgxgIlksW/1vNJa4to+RvDOww==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jschardet": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.1.tgz", + "integrity": "sha512-vE2hT1D0HLZCLLclfBSfkfTTedhVj0fubHpJBHKwwUWX0nSbhPAfk+SG9rTX95BYNmau8rGFfCeaT6T5OW1C2A==", + "dev": true + }, + "jsdom": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-9.12.0.tgz", + "integrity": "sha1-6MVG//ywbADUgzyoRBD+1/igl9Q=", + "dev": true, + "requires": { + "abab": "1.0.3", + "acorn": "4.0.13", + "acorn-globals": "3.1.0", + "array-equal": "1.0.0", + "content-type-parser": "1.0.1", + "cssom": "0.3.2", + "cssstyle": "0.2.37", + "escodegen": "1.8.1", + "html-encoding-sniffer": "1.0.1", + "nwmatcher": "1.4.1", + "parse5": "1.5.1", + "request": "2.81.0", + "sax": "1.2.4", + "symbol-tree": "3.2.2", + "tough-cookie": "2.3.2", + "webidl-conversions": "4.0.2", + "whatwg-encoding": "1.0.1", + "whatwg-url": "4.8.0", + "xml-name-validator": "2.0.1" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", @@ -2410,6 +3796,46 @@ "resolve": "1.4.0" } }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", @@ -2559,6 +3985,12 @@ "lodash.escape": "3.2.0" } }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, "loose-envify": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", @@ -2589,12 +4021,27 @@ "make-error": "1.3.0" } }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.4" + } + }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, + "merge": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, "micromatch": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", @@ -2616,6 +4063,21 @@ "regex-cache": "0.4.3" } }, + "mime-db": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", + "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=", + "dev": true + }, + "mime-types": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", + "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", + "dev": true, + "requires": { + "mime-db": "1.29.0" + } + }, "mimic-fn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", @@ -2687,6 +4149,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, "node-notifier": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.1.2.tgz", @@ -2708,6 +4176,18 @@ "is": "3.2.1" } }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", @@ -2727,6 +4207,24 @@ "white-space-x": "2.0.2" } }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nwmatcher": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.1.tgz", + "integrity": "sha1-eumwew6oBNt+JfBctf5Al9TklJ8=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, "object-assign": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", @@ -2807,6 +4305,30 @@ "mimic-fn": "1.1.0" } }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.10", + "wordwrap": "0.0.3" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -2844,12 +4366,42 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "1.0.0" + } + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.1.0" + } + }, + "p-map": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.1.1.tgz", + "integrity": "sha1-BfXkrpegaDcbwqXMhr+9vBnErno=", + "dev": true + }, "parse-filepath": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", @@ -2873,12 +4425,33 @@ "is-glob": "2.0.1" } }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, "parse-passwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, + "parse5": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", + "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -2912,6 +4485,31 @@ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true + }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -2951,6 +4549,27 @@ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", "dev": true }, + "pretty-format": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-20.0.3.tgz", + "integrity": "sha1-Ag41ClYKH+GpjcO+tsz/s4beixQ=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1", + "ansi-styles": "3.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + } + } + }, "pretty-hrtime": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -2975,12 +4594,30 @@ "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", "dev": true }, + "prr": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", + "dev": true + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, "randomatic": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", @@ -3011,13 +4648,55 @@ } } }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "is-buffer": "1.1.5" + "pinkie-promise": "2.0.1" } } } @@ -3120,6 +4799,15 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, "replace-comments-x": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/replace-comments-x/-/replace-comments-x-1.0.1.tgz", @@ -3135,6 +4823,48 @@ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", "dev": true }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.16", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, "require-uncached": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", @@ -3180,6 +4910,16 @@ "signal-exit": "3.0.2" } }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, "rimraf": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", @@ -3259,6 +4999,56 @@ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true }, + "sane": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-1.6.0.tgz", + "integrity": "sha1-lhDEUjB6E10pwf3+JUcDQYDEZ3U=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "exec-sh": "0.2.0", + "fb-watchman": "1.9.2", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "walker": "1.0.7", + "watch": "0.10.0" + }, + "dependencies": { + "bser": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-1.0.2.tgz", + "integrity": "sha1-OBEWlwsqbe6lZG3RXdcnhES1YWk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "fb-watchman": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-1.9.2.tgz", + "integrity": "sha1-okz0eCf4LTj7Waaa1wt247auc4M=", + "dev": true, + "requires": { + "bser": "1.0.2" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", @@ -3271,6 +5061,12 @@ "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", "dev": true }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -3304,12 +5100,27 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, "slice-ansi": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", "dev": true }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -3331,12 +5142,57 @@ "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", "dev": true }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, "stream-consume": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", @@ -3349,6 +5205,15 @@ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, + "string-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", + "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", + "dev": true, + "requires": { + "strip-ansi": "3.0.1" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -3376,6 +5241,12 @@ } } }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -3407,6 +5278,12 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true + }, "table": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", @@ -3433,12 +5310,39 @@ } } }, + "test-exclude": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.1.1.tgz", + "integrity": "sha512-35+Asrsk3XHJDBgf/VRFexPgh3UyETv8IAn/LRTiZjVy6rjPVqdEk8dJcJYBzl1w0XCJM48lvTy8SfEsCWS4nA==", + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "2.3.11", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + } + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "throat": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-3.2.0.tgz", + "integrity": "sha512-/EY8VpvlqJ+sFtLPeOgc8Pl7kQVOWv0woD87KTXVHPIAE842FGT+rokxIhe8xIUP1cfgrkt0as0vDLjDiMtr8w==", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -3511,6 +5415,12 @@ "os-tmpdir": "1.0.2" } }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", @@ -3536,6 +5446,21 @@ "is-symbol": "1.0.1" } }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "dev": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, "trim-left-x": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/trim-left-x/-/trim-left-x-1.3.3.tgz", @@ -3546,6 +5471,12 @@ "white-space-x": "2.0.2" } }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, "trim-right-x": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/trim-right-x/-/trim-right-x-1.3.2.tgz", @@ -3572,6 +5503,22 @@ "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", "dev": true }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -3597,6 +5544,13 @@ "source-map": "0.5.7" } }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, "unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", @@ -3621,6 +5575,12 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true + }, "v8flags": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", @@ -3630,12 +5590,41 @@ "user-home": "1.1.1" } }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, "validate.io-undefined": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/validate.io-undefined/-/validate.io-undefined-1.0.3.tgz", "integrity": "sha1-fif8uzFbhB54JDQxiXZxkp4gt/Q=", "dev": true }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, "vinyl": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", @@ -3669,6 +5658,15 @@ "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", "dev": true }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "1.1.0" + } + }, "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", @@ -3712,6 +5710,62 @@ "source-map": "0.5.7" } }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.11" + } + }, + "watch": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.10.0.tgz", + "integrity": "sha1-d3mLLaD5kQ1ZXxrOWwwiWFIfIdw=", + "dev": true + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-encoding": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz", + "integrity": "sha1-PGxFGhmO567FWx7GHQkgxngBpfQ=", + "dev": true, + "requires": { + "iconv-lite": "0.4.13" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", + "dev": true + } + } + }, + "whatwg-url": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-4.8.0.tgz", + "integrity": "sha1-0pgaqRSMHgCkHFphMRZqtGg7vMA=", + "dev": true, + "requires": { + "tr46": "0.0.3", + "webidl-conversions": "3.0.1" + }, + "dependencies": { + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + } + } + }, "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", @@ -3721,18 +5775,73 @@ "isexe": "2.0.0" } }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, "white-space-x": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/white-space-x/-/white-space-x-2.0.2.tgz", "integrity": "sha512-fFV+/CTimN5y1ivUbnnH1yL/D8WiXqK9IixeLlxXWMttTJWY6g40v7o+i0Q6wFH0eQ/IPo8fBH2CaquIwEDkxw==", "dev": true }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, + "worker-farm": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.0.tgz", + "integrity": "sha512-DHRiUggxtbruaTwnLDm2/BRDKZIoOYvrgYUj5Bam4fU6Gtvc0FaEyoswFPBjMXAweGW2H4BDNIpy//1yXXuaqQ==", + "dev": true, + "requires": { + "errno": "0.1.4", + "xtend": "4.0.1" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -3748,17 +5857,106 @@ "mkdirp": "0.5.1" } }, + "xml-name-validator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", + "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=", + "dev": true + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } } } } diff --git a/package.json b/package.json index c40915a3..c7a35d93 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,12 @@ "gulp": "^3.9.1", "gulp-babel": "^7.0.0", "gulp-eslint": "^4.0.0", + "gulp-jest": "^2.0.0", "gulp-notify": "^3.0.0", "gulp-rename": "^1.2.2", "gulp-rollup": "^2.14.0", - "gulp-uglify": "^3.0.0" + "gulp-uglify": "^3.0.0", + "jest-cli": "^20.0.4" }, "scripts": {}, "repository": { @@ -42,5 +44,7 @@ "url": "https://github.com/verlok/lazyload/issues" }, "homepage": "http://verlok.github.io/lazyload", - "dependencies": {} + "dependencies": { + "graceful-fs": "^4.1.11" + } } From db1681d1569105e36daaa6c2060f515c8f5b3367 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 30 Aug 2017 08:35:47 +0200 Subject: [PATCH 03/13] First test finally running --- __tests__/lazyload.setSources.test.js | 36 ++++++++++++--------------- gulpfile.js | 7 ++---- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/__tests__/lazyload.setSources.test.js b/__tests__/lazyload.setSources.test.js index f5b2b2d0..dcf2c6a8 100644 --- a/__tests__/lazyload.setSources.test.js +++ b/__tests__/lazyload.setSources.test.js @@ -46,42 +46,37 @@ describe("setSourcesForPicture", () => { expect(s2.getAttribute(srcsetAttr)).toBe(img1); }); }); - +*/ describe("setSources for image", () => { - let i; + let img, div; let fakeInstance = { setSourcesForPicture: jest.fn() }; - let testFunct = setSources; let img1 = "http://placehold.it/1x1"; let img100 = "http://placehold.it/100x100"; let img200 = "http://placehold.it/200x200"; let img400 = "http://placehold.it/400x400"; - let dataSrcPartialAttr = "original"; - let dataSrcSetPartialAttr = "original-set"; - let dataSrcAttr = "data-" + dataSrcPartialAttr; - let dataSrcSetAttr = "data-" + dataSrcSetPartialAttr; - let srcAttr = "src"; - let srcSetAttr = "srcset"; beforeEach(() => { - i = document.createElement("img"); + img = document.createElement("img"); + div = document.createElement("div"); + div.appendChild(img); }); test("...with initially empty src and srcset", () => { - fakeInstance.setSourcesForPicture.mockClear(); - i.setAttribute(dataSrcAttr, img200); - i.setAttribute(dataSrcSetAttr, img400); - testFunct(i, dataSrcSetPartialAttr, dataSrcPartialAttr); - expect(i.getAttribute(srcAttr)).toBe(img200); - expect(i.getAttribute(srcSetAttr)).toBe(img400); - expect(fakeInstance.setSourcesForPicture).toHaveBeenCalledTimes(1); + let settings = {data_src: "original", data_srcset: "originalSet"} + // Parent is a div + img.dataset = {"original": img200, "originalSet": img400} + setSources(img, settings); + expect(img.getAttribute("src")).toBe(img200); + expect(img.getAttribute("srcset")).toBe(img400); }); + /* test("...with initial values in src and srcset", () => { fakeInstance.setSourcesForPicture.mockClear(); i.setAttribute(srcAttr, img1); i.setAttribute(srcSetAttr, img1); i.setAttribute(dataSrcAttr, img200); i.setAttribute(dataSrcSetAttr, img400); - testFunct(i, dataSrcSetPartialAttr, dataSrcPartialAttr); + setSources(i, dataSrcSetPartialAttr, dataSrcPartialAttr); expect(i.getAttribute(srcAttr)).toBe(img200); expect(i.getAttribute(srcSetAttr)).toBe(img400); expect(fakeInstance.setSourcesForPicture).toHaveBeenCalledTimes(1); @@ -92,13 +87,14 @@ describe("setSources for image", () => { i.setAttribute(srcSetAttr, img400); i.setAttribute(dataSrcAttr, ""); i.setAttribute(dataSrcSetAttr, ""); - testFunct(i, dataSrcSetPartialAttr, dataSrcPartialAttr); + setSources(i, dataSrcSetPartialAttr, dataSrcPartialAttr); expect(i.getAttribute(srcAttr)).toBe(img200); expect(i.getAttribute(srcSetAttr)).toBe(img400); expect(fakeInstance.setSourcesForPicture).toHaveBeenCalledTimes(1); }); + */ }); - +/* describe("_setSources for iframe", () => { let i; let testFunct = setSources; diff --git a/gulpfile.js b/gulpfile.js index 7d3bcecb..c289a51b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -9,14 +9,11 @@ var jest = require('gulp-jest').default; var destFolder = "./dist"; -gulp.task('test', function() { +gulp.task('test', function () { process.env.NODE_ENV = 'test'; return gulp.src('__tests__').pipe(jest({ - "preprocessorIgnorePatterns": [ - "/dist/", "/node_modules/" - ], "automock": false - })); + })); }); gulp.task('release', function () { From 113a760cecff511c03ed06a77436a34a7f283e5a Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 30 Aug 2017 19:17:19 +0200 Subject: [PATCH 04/13] More tests on setsources --- __tests__/lazyload.setSources.test.js | 92 ++++++++++++++------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/__tests__/lazyload.setSources.test.js b/__tests__/lazyload.setSources.test.js index dcf2c6a8..62698b02 100644 --- a/__tests__/lazyload.setSources.test.js +++ b/__tests__/lazyload.setSources.test.js @@ -24,75 +24,79 @@ describe("setSourcesForPicture", () => { s1.setAttribute(dataSrcSetAttr, img200); s2.setAttribute(dataSrcSetAttr, img400); testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute(srcsetAttr)).toBe(img200); - expect(s2.getAttribute(srcsetAttr)).toBe(img400); + expect(s1.getAttribute("srcset")).toBe(img200); + expect(s2.getAttribute("srcset")).toBe(img400); }); test("...with initial value in srcset", () => { - s1.setAttribute(srcsetAttr, img1); - s2.setAttribute(srcsetAttr, img1); + s1.setAttribute("srcset", img1); + s2.setAttribute("srcset", img1); s1.setAttribute(dataSrcSetAttr, img200); s2.setAttribute(dataSrcSetAttr, img400); testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute(srcsetAttr)).toBe(img200); - expect(s2.getAttribute(srcsetAttr)).toBe(img400); + expect(s1.getAttribute("srcset")).toBe(img200); + expect(s2.getAttribute("srcset")).toBe(img400); }); test("...with initial value in srcset and empty data-srcset", () => { - s1.setAttribute(srcsetAttr, img1); - s2.setAttribute(srcsetAttr, img1); + s1.setAttribute("srcset", img1); + s2.setAttribute("srcset", img1); s1.setAttribute(dataSrcSetAttr, ""); s2.setAttribute(dataSrcSetAttr, ""); testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute(srcsetAttr)).toBe(img1); - expect(s2.getAttribute(srcsetAttr)).toBe(img1); + expect(s1.getAttribute("srcset")).toBe(img1); + expect(s2.getAttribute("srcset")).toBe(img1); }); }); */ describe("setSources for image", () => { - let img, div; - let fakeInstance = { - setSourcesForPicture: jest.fn() - }; + let img, div, settings; let img1 = "http://placehold.it/1x1"; let img100 = "http://placehold.it/100x100"; let img200 = "http://placehold.it/200x200"; let img400 = "http://placehold.it/400x400"; + + const _setDataset = (img) => { + img.dataset = { + "original": img200, + "originalSet": img400 + } + }; + + const _expects = (img) => { + expect(img.getAttribute("src")).toBe(img200); + expect(img.getAttribute("srcset")).toBe(img400); + }; + beforeEach(() => { + // Parent is a div + settings = { + data_src: "original", + data_srcset: "originalSet" + } img = document.createElement("img"); div = document.createElement("div"); div.appendChild(img); }); + test("...with initially empty src and srcset", () => { - let settings = {data_src: "original", data_srcset: "originalSet"} - // Parent is a div - img.dataset = {"original": img200, "originalSet": img400} + _setDataset(img); setSources(img, settings); - expect(img.getAttribute("src")).toBe(img200); - expect(img.getAttribute("srcset")).toBe(img400); + _expects(img); }); - /* + test("...with initial values in src and srcset", () => { - fakeInstance.setSourcesForPicture.mockClear(); - i.setAttribute(srcAttr, img1); - i.setAttribute(srcSetAttr, img1); - i.setAttribute(dataSrcAttr, img200); - i.setAttribute(dataSrcSetAttr, img400); - setSources(i, dataSrcSetPartialAttr, dataSrcPartialAttr); - expect(i.getAttribute(srcAttr)).toBe(img200); - expect(i.getAttribute(srcSetAttr)).toBe(img400); - expect(fakeInstance.setSourcesForPicture).toHaveBeenCalledTimes(1); + img.setAttribute("src", img1); + img.setAttribute("srcset", img1); + _setDataset(img); + setSources(img, settings); + _expects(img); }); test("...with initial values in src and srcset and empty data-*", () => { - fakeInstance.setSourcesForPicture.mockClear(); - i.setAttribute(srcAttr, img200); - i.setAttribute(srcSetAttr, img400); - i.setAttribute(dataSrcAttr, ""); - i.setAttribute(dataSrcSetAttr, ""); - setSources(i, dataSrcSetPartialAttr, dataSrcPartialAttr); - expect(i.getAttribute(srcAttr)).toBe(img200); - expect(i.getAttribute(srcSetAttr)).toBe(img400); - expect(fakeInstance.setSourcesForPicture).toHaveBeenCalledTimes(1); + img.setAttribute("src", img200); + img.setAttribute("srcset", img400); + img.dataset = {}; + setSources(img, settings); + _expects(img); }); - */ }); /* describe("_setSources for iframe", () => { @@ -108,20 +112,20 @@ describe("_setSources for iframe", () => { test("...with initially empty src", () => { i.setAttribute(dataSrcAttr, srcToLoad); testFunct(i, "", dataSrcPartialAttr); - expect(i.getAttribute(srcAttr)).toBe(srcToLoad); + expect(i.getAttribute("src")).toBe(srcToLoad); }); test("...with initial value in src", () => { let newSrc = srcToLoad + "/doodle"; - i.setAttribute(srcAttr, srcToLoad); + i.setAttribute("src", srcToLoad); i.setAttribute(dataSrcAttr, newSrc); testFunct(i, "", dataSrcPartialAttr); - expect(i.getAttribute(srcAttr)).toBe(newSrc); + expect(i.getAttribute("src")).toBe(newSrc); }); test("...with initial value in src and empty data-original", () => { - i.setAttribute(srcAttr, srcToLoad); + i.setAttribute("src", srcToLoad); i.setAttribute(dataSrcAttr, ""); testFunct(i, "", dataSrcPartialAttr); - expect(i.getAttribute(srcAttr)).toBe(srcToLoad); + expect(i.getAttribute("src")).toBe(srcToLoad); }); }); From c2eb462eb7716bb5257ccb98dc825a2069d4e7d4 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Wed, 30 Aug 2017 20:28:47 +0200 Subject: [PATCH 05/13] Tested iframe --- __tests__/lazyload.setSources.test.js | 203 ++++++++++++++------------ package-lock.json | 51 +------ package.json | 6 +- 3 files changed, 117 insertions(+), 143 deletions(-) diff --git a/__tests__/lazyload.setSources.test.js b/__tests__/lazyload.setSources.test.js index 62698b02..fbe2883f 100644 --- a/__tests__/lazyload.setSources.test.js +++ b/__tests__/lazyload.setSources.test.js @@ -1,134 +1,112 @@ import setSources from "../src/lazyLoad.setSources"; +const settings = { + data_src: "original", + data_srcset: "originalSet" +}; + +const _expectAttr = (el, attr, val) => { + expect(el.getAttribute(attr)).toBe(val); +}; + +expect.extend({ + toHaveAttribute: (element, attributeName, valueToVerify) => { + const actualValue = element.getAttribute(attributeName); + return actualValue === valueToVerify ? { + message: () => `${element.tagName} has attribute "${attributeName}" set to "${valueToVerify}"`, + pass: true + } : { + message: () => `expected ${element.tagName} to have attribute "${attributeName}" set to "${valueToVerify}", received "${actualValue}"`, + pass: false + } + } +}); + test("setSources is defined", () => { expect(typeof setSources).toBe("function"); }); -/* -describe("setSourcesForPicture", () => { - let p, s1, s2, i; - let testFunct = setSourcesForPicture; - let img1 = "http://placehold.it/1x1"; - let img100 = "http://placehold.it/100x100"; - let img200 = "http://placehold.it/200x200"; - let img400 = "http://placehold.it/400x400"; - let dataSrcSetPartialAttr = "original-set"; - let dataSrcSetAttr = "data-" + dataSrcSetPartialAttr; - let srcsetAttr = "srcset"; - beforeEach(() => { - p = document.createElement("picture"); - p.appendChild(s1 = document.createElement("source")); - p.appendChild(s2 = document.createElement("source")); - p.appendChild(i = document.createElement("img")); - }); - test("...with initially empty srcset", () => { - s1.setAttribute(dataSrcSetAttr, img200); - s2.setAttribute(dataSrcSetAttr, img400); - testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute("srcset")).toBe(img200); - expect(s2.getAttribute("srcset")).toBe(img400); - }); - test("...with initial value in srcset", () => { - s1.setAttribute("srcset", img1); - s2.setAttribute("srcset", img1); - s1.setAttribute(dataSrcSetAttr, img200); - s2.setAttribute(dataSrcSetAttr, img400); - testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute("srcset")).toBe(img200); - expect(s2.getAttribute("srcset")).toBe(img400); - }); - test("...with initial value in srcset and empty data-srcset", () => { - s1.setAttribute("srcset", img1); - s2.setAttribute("srcset", img1); - s1.setAttribute(dataSrcSetAttr, ""); - s2.setAttribute(dataSrcSetAttr, ""); - testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute("srcset")).toBe(img1); - expect(s2.getAttribute("srcset")).toBe(img1); - }); -}); -*/ + describe("setSources for image", () => { - let img, div, settings; + let img; let img1 = "http://placehold.it/1x1"; - let img100 = "http://placehold.it/100x100"; let img200 = "http://placehold.it/200x200"; let img400 = "http://placehold.it/400x400"; - const _setDataset = (img) => { - img.dataset = { - "original": img200, - "originalSet": img400 - } - }; - - const _expects = (img) => { - expect(img.getAttribute("src")).toBe(img200); - expect(img.getAttribute("srcset")).toBe(img400); - }; - beforeEach(() => { - // Parent is a div - settings = { - data_src: "original", - data_srcset: "originalSet" - } img = document.createElement("img"); - div = document.createElement("div"); + // Parent is a div + let div = document.createElement("div"); div.appendChild(img); }); test("...with initially empty src and srcset", () => { - _setDataset(img); + img.dataset = { + "original": img200, + "originalSet": img400 + }; setSources(img, settings); - _expects(img); + expect(img).toHaveAttribute("src", img200); + expect(img).toHaveAttribute("srcset", img400); }); test("...with initial values in src and srcset", () => { + img.dataset = { + "original": img200, + "originalSet": img400 + }; img.setAttribute("src", img1); img.setAttribute("srcset", img1); - _setDataset(img); setSources(img, settings); - _expects(img); + expect(img).toHaveAttribute("src", img200); + expect(img).toHaveAttribute("srcset", img400); }); test("...with initial values in src and srcset and empty data-*", () => { + img.dataset = { + "original": "", + "originalSet": "" + }; img.setAttribute("src", img200); img.setAttribute("srcset", img400); - img.dataset = {}; setSources(img, settings); - _expects(img); + expect(img).toHaveAttribute("src", img200); + expect(img).toHaveAttribute("srcset", img400); }); }); -/* + describe("_setSources for iframe", () => { - let i; - let testFunct = setSources; + let iframe; let srcToLoad = "http://www.google.it"; - let dataSrcPartialAttr = "original"; - let dataSrcAttr = "data-" + dataSrcPartialAttr; - let srcAttr = "src"; + let preloadedSrc = srcToLoad + "/doodle"; + beforeEach(() => { - i = document.createElement("iframe"); + iframe = document.createElement("iframe"); }); test("...with initially empty src", () => { - i.setAttribute(dataSrcAttr, srcToLoad); - testFunct(i, "", dataSrcPartialAttr); - expect(i.getAttribute("src")).toBe(srcToLoad); + iframe.dataset = { + "original": srcToLoad + }; + setSources(iframe, settings); + expect(iframe).toHaveAttribute("src", srcToLoad); }); test("...with initial value in src", () => { - let newSrc = srcToLoad + "/doodle"; - i.setAttribute("src", srcToLoad); - i.setAttribute(dataSrcAttr, newSrc); - testFunct(i, "", dataSrcPartialAttr); - expect(i.getAttribute("src")).toBe(newSrc); + iframe.dataset = { + "original": srcToLoad + }; + iframe.setAttribute("src", preloadedSrc); + setSources(iframe, settings); + expect(iframe).toHaveAttribute("src", srcToLoad); }); test("...with initial value in src and empty data-original", () => { - i.setAttribute("src", srcToLoad); - i.setAttribute(dataSrcAttr, ""); - testFunct(i, "", dataSrcPartialAttr); - expect(i.getAttribute("src")).toBe(srcToLoad); + iframe.dataset = { + "original": "" + }; + iframe.setAttribute("src", preloadedSrc); + setSources(iframe, settings); + expect(iframe).toHaveAttribute("src", preloadedSrc); }); }); +/* describe("_setSources for background image", () => { let i; let testFunct = setSources; @@ -156,4 +134,49 @@ describe("_setSources for background image", () => { testFunct(i, "", dataSrcPartialAttr); expect(i.style.backgroundImage).toBe("url(" + img200 + ")"); }); -});*/ \ No newline at end of file +});*/ + +/* +describe("setSourcesForPicture", () => { + let p, s1, s2, i; + let testFunct = setSourcesForPicture; + let img1 = "http://placehold.it/1x1"; + let img100 = "http://placehold.it/100x100"; + let img200 = "http://placehold.it/200x200"; + let img400 = "http://placehold.it/400x400"; + let dataSrcSetPartialAttr = "original-set"; + let dataSrcSetAttr = "data-" + dataSrcSetPartialAttr; + let srcsetAttr = "srcset"; + beforeEach(() => { + p = document.createElement("picture"); + p.appendChild(s1 = document.createElement("source")); + p.appendChild(s2 = document.createElement("source")); + p.appendChild(i = document.createElement("img")); + }); + test("...with initially empty srcset", () => { + s1.setAttribute(dataSrcSetAttr, img200); + s2.setAttribute(dataSrcSetAttr, img400); + testFunct(i, dataSrcSetPartialAttr); + expect(s1.getAttribute("srcset")).toBe(img200); + expect(s2.getAttribute("srcset")).toBe(img400); + }); + test("...with initial value in srcset", () => { + s1.setAttribute("srcset", img1); + s2.setAttribute("srcset", img1); + s1.setAttribute(dataSrcSetAttr, img200); + s2.setAttribute(dataSrcSetAttr, img400); + testFunct(i, dataSrcSetPartialAttr); + expect(s1.getAttribute("srcset")).toBe(img200); + expect(s2.getAttribute("srcset")).toBe(img400); + }); + test("...with initial value in srcset and empty data-srcset", () => { + s1.setAttribute("srcset", img1); + s2.setAttribute("srcset", img1); + s1.setAttribute(dataSrcSetAttr, ""); + s2.setAttribute(dataSrcSetAttr, ""); + testFunct(i, dataSrcSetPartialAttr); + expect(s1.getAttribute("srcset")).toBe(img1); + expect(s2.getAttribute("srcset")).toBe(img1); + }); +}); +*/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 55477cfc..9eaa0bff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2328,7 +2328,8 @@ "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true }, "growly": { "version": "1.3.0", @@ -3311,12 +3312,6 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", "dev": true - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true } } }, @@ -3414,14 +3409,6 @@ "micromatch": "2.3.11", "sane": "1.6.0", "worker-farm": "1.5.0" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - } } }, "jest-jasmine2": { @@ -3441,12 +3428,6 @@ "p-map": "1.1.1" }, "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3546,12 +3527,6 @@ "yargs": "7.1.0" }, "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -3587,14 +3562,6 @@ "jest-validate": "20.0.3", "leven": "2.1.0", "mkdirp": "0.5.1" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - } } }, "jest-validate": { @@ -3809,12 +3776,6 @@ "strip-bom": "2.0.0" }, "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, "strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", @@ -4494,14 +4455,6 @@ "graceful-fs": "4.1.11", "pify": "2.3.0", "pinkie-promise": "2.0.1" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - } } }, "performance-now": { diff --git a/package.json b/package.json index c7a35d93..8aa787e5 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "A fast, lightweight script to load images as they enter the viewport. SEO friendly, it supports responsive images (both srcset + sizes and picture) and progressive JPEG", "main": "dist/lazyload.min.js", "devDependencies": { + "babel-core": "^6.26.0", "babel-plugin-transform-object-assign": "^6.22.0", "babel-preset-env": "^1.6.0", "babel-preset-es2015": "^6.24.1", @@ -43,8 +44,5 @@ "bugs": { "url": "https://github.com/verlok/lazyload/issues" }, - "homepage": "http://verlok.github.io/lazyload", - "dependencies": { - "graceful-fs": "^4.1.11" - } + "homepage": "http://verlok.github.io/lazyload" } From 2aa74592d8b20dd876dec72bcd6ce56a862d9d85 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Wed, 30 Aug 2017 20:44:07 +0200 Subject: [PATCH 06/13] toHaveAttribute -> ToHaveAttributeValue --- __tests__/lazyload.setSources.test.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/__tests__/lazyload.setSources.test.js b/__tests__/lazyload.setSources.test.js index fbe2883f..221c4125 100644 --- a/__tests__/lazyload.setSources.test.js +++ b/__tests__/lazyload.setSources.test.js @@ -10,9 +10,10 @@ const _expectAttr = (el, attr, val) => { }; expect.extend({ - toHaveAttribute: (element, attributeName, valueToVerify) => { + toHaveAttributeValue: (element, attributeName, valueToVerify) => { const actualValue = element.getAttribute(attributeName); - return actualValue === valueToVerify ? { + const pass = actualValue === valueToVerify; + return pass ? { message: () => `${element.tagName} has attribute "${attributeName}" set to "${valueToVerify}"`, pass: true } : { @@ -45,8 +46,8 @@ describe("setSources for image", () => { "originalSet": img400 }; setSources(img, settings); - expect(img).toHaveAttribute("src", img200); - expect(img).toHaveAttribute("srcset", img400); + expect(img).toHaveAttributeValue("src", img200); + expect(img).toHaveAttributeValue("srcset", img400); }); test("...with initial values in src and srcset", () => { @@ -57,8 +58,8 @@ describe("setSources for image", () => { img.setAttribute("src", img1); img.setAttribute("srcset", img1); setSources(img, settings); - expect(img).toHaveAttribute("src", img200); - expect(img).toHaveAttribute("srcset", img400); + expect(img).toHaveAttributeValue("src", img200); + expect(img).toHaveAttributeValue("srcset", img400); }); test("...with initial values in src and srcset and empty data-*", () => { img.dataset = { @@ -68,8 +69,8 @@ describe("setSources for image", () => { img.setAttribute("src", img200); img.setAttribute("srcset", img400); setSources(img, settings); - expect(img).toHaveAttribute("src", img200); - expect(img).toHaveAttribute("srcset", img400); + expect(img).toHaveAttributeValue("src", img200); + expect(img).toHaveAttributeValue("srcset", img400); }); }); @@ -86,7 +87,7 @@ describe("_setSources for iframe", () => { "original": srcToLoad }; setSources(iframe, settings); - expect(iframe).toHaveAttribute("src", srcToLoad); + expect(iframe).toHaveAttributeValue("src", srcToLoad); }); test("...with initial value in src", () => { iframe.dataset = { @@ -94,7 +95,7 @@ describe("_setSources for iframe", () => { }; iframe.setAttribute("src", preloadedSrc); setSources(iframe, settings); - expect(iframe).toHaveAttribute("src", srcToLoad); + expect(iframe).toHaveAttributeValue("src", srcToLoad); }); test("...with initial value in src and empty data-original", () => { iframe.dataset = { @@ -102,7 +103,7 @@ describe("_setSources for iframe", () => { }; iframe.setAttribute("src", preloadedSrc); setSources(iframe, settings); - expect(iframe).toHaveAttribute("src", preloadedSrc); + expect(iframe).toHaveAttributeValue("src", preloadedSrc); }); }); From 85ebbbf95f2572d746e8942cb7d66d641516ab28 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Wed, 30 Aug 2017 20:46:14 +0200 Subject: [PATCH 07/13] Refactoring --- __tests__/lazyload.setSources.test.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/__tests__/lazyload.setSources.test.js b/__tests__/lazyload.setSources.test.js index 221c4125..f7e0e32a 100644 --- a/__tests__/lazyload.setSources.test.js +++ b/__tests__/lazyload.setSources.test.js @@ -1,14 +1,10 @@ import setSources from "../src/lazyLoad.setSources"; -const settings = { +const lazyloadSettings = { data_src: "original", data_srcset: "originalSet" }; -const _expectAttr = (el, attr, val) => { - expect(el.getAttribute(attr)).toBe(val); -}; - expect.extend({ toHaveAttributeValue: (element, attributeName, valueToVerify) => { const actualValue = element.getAttribute(attributeName); @@ -45,7 +41,7 @@ describe("setSources for image", () => { "original": img200, "originalSet": img400 }; - setSources(img, settings); + setSources(img, lazyloadSettings); expect(img).toHaveAttributeValue("src", img200); expect(img).toHaveAttributeValue("srcset", img400); }); @@ -57,7 +53,7 @@ describe("setSources for image", () => { }; img.setAttribute("src", img1); img.setAttribute("srcset", img1); - setSources(img, settings); + setSources(img, lazyloadSettings); expect(img).toHaveAttributeValue("src", img200); expect(img).toHaveAttributeValue("srcset", img400); }); @@ -68,7 +64,7 @@ describe("setSources for image", () => { }; img.setAttribute("src", img200); img.setAttribute("srcset", img400); - setSources(img, settings); + setSources(img, lazyloadSettings); expect(img).toHaveAttributeValue("src", img200); expect(img).toHaveAttributeValue("srcset", img400); }); @@ -86,7 +82,7 @@ describe("_setSources for iframe", () => { iframe.dataset = { "original": srcToLoad }; - setSources(iframe, settings); + setSources(iframe, lazyloadSettings); expect(iframe).toHaveAttributeValue("src", srcToLoad); }); test("...with initial value in src", () => { @@ -94,7 +90,7 @@ describe("_setSources for iframe", () => { "original": srcToLoad }; iframe.setAttribute("src", preloadedSrc); - setSources(iframe, settings); + setSources(iframe, lazyloadSettings); expect(iframe).toHaveAttributeValue("src", srcToLoad); }); test("...with initial value in src and empty data-original", () => { @@ -102,7 +98,7 @@ describe("_setSources for iframe", () => { "original": "" }; iframe.setAttribute("src", preloadedSrc); - setSources(iframe, settings); + setSources(iframe, lazyloadSettings); expect(iframe).toHaveAttributeValue("src", preloadedSrc); }); }); From e1633c45694feed1a414882138bc56e1e75465b0 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Wed, 30 Aug 2017 21:27:56 +0200 Subject: [PATCH 08/13] Added tests for background-image --- __tests__/lazyload.setSources.test.js | 58 ++++++++++++++++----------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/__tests__/lazyload.setSources.test.js b/__tests__/lazyload.setSources.test.js index f7e0e32a..8e0b57bc 100644 --- a/__tests__/lazyload.setSources.test.js +++ b/__tests__/lazyload.setSources.test.js @@ -13,9 +13,9 @@ expect.extend({ message: () => `${element.tagName} has attribute "${attributeName}" set to "${valueToVerify}"`, pass: true } : { - message: () => `expected ${element.tagName} to have attribute "${attributeName}" set to "${valueToVerify}", received "${actualValue}"`, - pass: false - } + message: () => `expected ${element.tagName} to have attribute "${attributeName}" set to "${valueToVerify}", received "${actualValue}"`, + pass: false + } } }); @@ -103,35 +103,47 @@ describe("_setSources for iframe", () => { }); }); -/* describe("_setSources for background image", () => { - let i; - let testFunct = setSources; + let element; let img100 = "http://placehold.it/100x100"; let img200 = "http://placehold.it/200x200"; - let dataSrcPartialAttr = "original"; - let dataSrcAttr = "data-" + dataSrcPartialAttr; + + beforeEach(() => { + element = document.createElement("div"); + }); + test("...with initially empty style attribute", () => { - i = document.createElement("div"); - i.setAttribute(dataSrcAttr, img200); - testFunct(i, "", dataSrcPartialAttr); - expect(i.style.backgroundImage).toBe("url(" + img200 + ")"); + element.dataset = { + "original": img200 + }; + setSources(element, lazyloadSettings); + // Test cheating: bug in JsDOM doesn't return the url("") with quotes inside + expect(element.style.backgroundImage).toBe(`url(${img200})`); }); test("...with initially present style attribute", () => { - i = document.createElement("div"); - i.style.padding = "1px"; - i.setAttribute(dataSrcAttr, img200); - testFunct(i, "", dataSrcPartialAttr); - expect(i.style.backgroundImage).toBe("url(" + img200 + ")"); + element.dataset = { + "original": img100 + }; + element.style = { + padding: "1px" + }; + setSources(element, lazyloadSettings); + // Test cheating: bug in JsDOM doesn't return the url("") with quotes inside + expect(element.style.backgroundImage).toBe(`url(${img100})`); }); test("...with initially present style and background", () => { - i = document.createElement("div"); - i.style.backgroundImage = "url(" + img100 + ")"; - i.setAttribute(dataSrcAttr, img200); - testFunct(i, "", dataSrcPartialAttr); - expect(i.style.backgroundImage).toBe("url(" + img200 + ")"); + element.dataset = { + "original": img200 + }; + element.style = { + padding: "1px", + backgroundImage: "url(" + img100 + ")" + }; + setSources(element, lazyloadSettings); + // Test cheating: bug in JsDOM doesn't return the url("") with quotes inside + expect(element.style.backgroundImage).toBe(`url(${img200})`); }); -});*/ +}); /* describe("setSourcesForPicture", () => { From 521e8cab5785a20967033ec5000173c19961f9ee Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Wed, 30 Aug 2017 21:40:15 +0200 Subject: [PATCH 09/13] Now exporting setSourcesForPicture too --- __tests__/lazyload.setSources.test.js | 74 +++++++++++++-------------- src/lazyload.reveal.js | 2 +- src/lazyload.setSources.js | 6 +-- 3 files changed, 40 insertions(+), 42 deletions(-) diff --git a/__tests__/lazyload.setSources.test.js b/__tests__/lazyload.setSources.test.js index 8e0b57bc..ae569e1c 100644 --- a/__tests__/lazyload.setSources.test.js +++ b/__tests__/lazyload.setSources.test.js @@ -1,4 +1,4 @@ -import setSources from "../src/lazyLoad.setSources"; +import {setSources, setSourcesForPicture} from "../src/lazyLoad.setSources"; const lazyloadSettings = { data_src: "original", @@ -13,9 +13,9 @@ expect.extend({ message: () => `${element.tagName} has attribute "${attributeName}" set to "${valueToVerify}"`, pass: true } : { - message: () => `expected ${element.tagName} to have attribute "${attributeName}" set to "${valueToVerify}", received "${actualValue}"`, - pass: false - } + message: () => `expected ${element.tagName} to have attribute "${attributeName}" set to "${valueToVerify}", received "${actualValue}"`, + pass: false + } } }); @@ -30,10 +30,9 @@ describe("setSources for image", () => { let img400 = "http://placehold.it/400x400"; beforeEach(() => { - img = document.createElement("img"); // Parent is a div let div = document.createElement("div"); - div.appendChild(img); + div.appendChild(img = document.createElement("img")); }); test("...with initially empty src and srcset", () => { @@ -145,47 +144,46 @@ describe("_setSources for background image", () => { }); }); -/* describe("setSourcesForPicture", () => { - let p, s1, s2, i; - let testFunct = setSourcesForPicture; + let picture, source1, source2, img; let img1 = "http://placehold.it/1x1"; let img100 = "http://placehold.it/100x100"; let img200 = "http://placehold.it/200x200"; let img400 = "http://placehold.it/400x400"; - let dataSrcSetPartialAttr = "original-set"; - let dataSrcSetAttr = "data-" + dataSrcSetPartialAttr; - let srcsetAttr = "srcset"; + beforeEach(() => { - p = document.createElement("picture"); - p.appendChild(s1 = document.createElement("source")); - p.appendChild(s2 = document.createElement("source")); - p.appendChild(i = document.createElement("img")); + // Parent is a picture + picture = document.createElement("picture"); + picture.appendChild(source1 = document.createElement("source")); + picture.appendChild(source2 = document.createElement("source")); + picture.appendChild(img = document.createElement("img")); }); + test("...with initially empty srcset", () => { - s1.setAttribute(dataSrcSetAttr, img200); - s2.setAttribute(dataSrcSetAttr, img400); - testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute("srcset")).toBe(img200); - expect(s2.getAttribute("srcset")).toBe(img400); + source1.dataset = {"originalSet": img200}; + source2.dataset = {"originalSet": img400}; + setSourcesForPicture(img, lazyloadSettings); + expect(source1).toHaveAttributeValue("srcset", img200); + expect(source2).toHaveAttributeValue("srcset", img400); }); + test("...with initial value in srcset", () => { - s1.setAttribute("srcset", img1); - s2.setAttribute("srcset", img1); - s1.setAttribute(dataSrcSetAttr, img200); - s2.setAttribute(dataSrcSetAttr, img400); - testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute("srcset")).toBe(img200); - expect(s2.getAttribute("srcset")).toBe(img400); + source1.dataset = {"originalSet": img200}; + source2.dataset = {"originalSet": img400}; + source1.setAttribute("srcset", img1); + source2.setAttribute("srcset", img1); + setSourcesForPicture(img, lazyloadSettings); + expect(source1).toHaveAttributeValue("srcset", img200); + expect(source2).toHaveAttributeValue("srcset", img400); }); + test("...with initial value in srcset and empty data-srcset", () => { - s1.setAttribute("srcset", img1); - s2.setAttribute("srcset", img1); - s1.setAttribute(dataSrcSetAttr, ""); - s2.setAttribute(dataSrcSetAttr, ""); - testFunct(i, dataSrcSetPartialAttr); - expect(s1.getAttribute("srcset")).toBe(img1); - expect(s2.getAttribute("srcset")).toBe(img1); - }); -}); -*/ \ No newline at end of file + source1.dataset = {"originalSet": ""}; + source2.dataset = {"originalSet": ""}; + source1.setAttribute("srcset", img200); + source2.setAttribute("srcset", img400); + setSourcesForPicture(img, lazyloadSettings); + expect(source1).toHaveAttributeValue("srcset", img200); + expect(source2).toHaveAttributeValue("srcset", img400); + }); +}); \ No newline at end of file diff --git a/src/lazyload.reveal.js b/src/lazyload.reveal.js index 3457509b..2b75a22e 100644 --- a/src/lazyload.reveal.js +++ b/src/lazyload.reveal.js @@ -1,4 +1,4 @@ -import setSources from "./lazyload.setSources"; +import {setSources} from "./lazyload.setSources"; const callCallback = function (callback, argument) { if (callback) { diff --git a/src/lazyload.setSources.js b/src/lazyload.setSources.js index f4d2b91b..4a8557ee 100644 --- a/src/lazyload.setSources.js +++ b/src/lazyload.setSources.js @@ -1,5 +1,5 @@ -const setSourcesForPicture = function (element, settings) { - const {dataSrcSet} = settings; +export const setSourcesForPicture = function (element, settings) { + const {data_srcset: dataSrcSet} = settings; const parent = element.parentElement; if (parent.tagName !== "PICTURE") { return; @@ -15,7 +15,7 @@ const setSourcesForPicture = function (element, settings) { } }; -export default function (element, settings) { +export const setSources = function (element, settings) { const {data_src: dataSrc, data_srcset: dataSrcSet} = settings; const tagName = element.tagName; const elementSrc = element.dataset[dataSrc]; From c877dbe6f5c9cca0fd8aab6060e428c9d5110758 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Wed, 30 Aug 2017 21:58:36 +0200 Subject: [PATCH 10/13] Simplified gulpfile --- gulpfile.js | 34 ++++++++------------------- package-lock.json | 59 ----------------------------------------------- package.json | 2 -- 3 files changed, 10 insertions(+), 85 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index c289a51b..85adb9ae 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,23 +1,13 @@ -var gulp = require('gulp'); -var uglify = require('gulp-uglify'); -var eslint = require('gulp-eslint'); -var rename = require('gulp-rename'); -var notify = require('gulp-notify'); -var babel = require('gulp-babel'); -var rollup = require('gulp-rollup'); -var jest = require('gulp-jest').default; - +var gulp = require("gulp"); +var uglify = require("gulp-uglify"); +var eslint = require("gulp-eslint"); +var rename = require("gulp-rename"); +var babel = require("gulp-babel"); +var rollup = require("gulp-rollup"); var destFolder = "./dist"; -gulp.task('test', function () { - process.env.NODE_ENV = 'test'; - return gulp.src('__tests__').pipe(jest({ - "automock": false - })); -}); - -gulp.task('release', function () { - process.env.NODE_ENV = 'release'; +gulp.task("default", function () { + process.env.NODE_ENV = "release"; return gulp.src("./src/**/*.js") // ----------- linting -------------- .pipe(eslint()) @@ -27,7 +17,7 @@ gulp.task('release', function () { .pipe(rollup({ format: "umd", moduleName: "LazyLoad", - entry: './src/lazyload.js' + entry: "./src/lazyload.js" })) .pipe(rename("lazyload.es2015.js")) .pipe(gulp.dest(destFolder)) // --> writing rolledup @@ -38,9 +28,5 @@ gulp.task('release', function () { // ----------- minifying -------------- .pipe(uglify()) .pipe(rename("lazyload.min.js")) - .pipe(gulp.dest(destFolder)) // --> writing uglified - // ----------- notifying -------------- - .pipe(notify({ - message: 'Scripts task complete' - })); + .pipe(gulp.dest(destFolder)); // --> writing uglified }); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9eaa0bff..327f1ebb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2388,50 +2388,6 @@ "gulp-util": "3.0.8" } }, - "gulp-jest": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/gulp-jest/-/gulp-jest-2.0.0.tgz", - "integrity": "sha1-IkJd25siSRPPt5XXtWcma+zk6KM=", - "dev": true, - "requires": { - "gulp-util": "3.0.8", - "through2": "2.0.3" - } - }, - "gulp-notify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gulp-notify/-/gulp-notify-3.0.0.tgz", - "integrity": "sha1-oEuK+azb5OY8hFZ4zgw9MGlMWaM=", - "dev": true, - "requires": { - "gulp-util": "3.0.8", - "lodash.template": "4.4.0", - "node-notifier": "5.1.2", - "node.extend": "1.1.6", - "through2": "2.0.3" - }, - "dependencies": { - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "dev": true, - "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.templatesettings": "4.1.0" - } - }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", - "dev": true, - "requires": { - "lodash._reinterpolate": "3.0.0" - } - } - } - }, "gulp-rename": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz", @@ -2855,12 +2811,6 @@ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, - "is": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", - "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=", - "dev": true - }, "is-absolute": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", @@ -4128,15 +4078,6 @@ "which": "1.3.0" } }, - "node.extend": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.6.tgz", - "integrity": "sha1-p7iCyC1sk6SGOlUEvV3o7IYli5Y=", - "dev": true, - "requires": { - "is": "3.2.1" - } - }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", diff --git a/package.json b/package.json index 8aa787e5..7c835968 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,6 @@ "gulp": "^3.9.1", "gulp-babel": "^7.0.0", "gulp-eslint": "^4.0.0", - "gulp-jest": "^2.0.0", - "gulp-notify": "^3.0.0", "gulp-rename": "^1.2.2", "gulp-rollup": "^2.14.0", "gulp-uglify": "^3.0.0", From e3aea3a54e0682e48a5459f255eea73ba147f147 Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Wed, 30 Aug 2017 21:58:49 +0200 Subject: [PATCH 11/13] Updating dists --- dist/lazyload.es2015.js | 4 ++-- dist/lazyload.js | 2 +- dist/lazyload.min.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/lazyload.es2015.js b/dist/lazyload.es2015.js index 102302c9..4a33fa7a 100644 --- a/dist/lazyload.es2015.js +++ b/dist/lazyload.es2015.js @@ -48,7 +48,7 @@ var autoInitialize = function (classObj, options) { }; const setSourcesForPicture = function (element, settings) { - const {dataSrcSet} = settings; + const {data_srcset: dataSrcSet} = settings; const parent = element.parentElement; if (parent.tagName !== "PICTURE") { return; @@ -64,7 +64,7 @@ const setSourcesForPicture = function (element, settings) { } }; -var setSources = function (element, settings) { +const setSources = function (element, settings) { const {data_src: dataSrc, data_srcset: dataSrcSet} = settings; const tagName = element.tagName; const elementSrc = element.dataset[dataSrc]; diff --git a/dist/lazyload.js b/dist/lazyload.js index c4c623ef..e2961b8e 100644 --- a/dist/lazyload.js +++ b/dist/lazyload.js @@ -50,7 +50,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; var setSourcesForPicture = function setSourcesForPicture(element, settings) { - var dataSrcSet = settings.dataSrcSet; + var dataSrcSet = settings.data_srcset; var parent = element.parentElement; if (parent.tagName !== "PICTURE") { diff --git a/dist/lazyload.min.js b/dist/lazyload.min.js index dc8e4c3c..da303a29 100644 --- a/dist/lazyload.min.js +++ b/dist/lazyload.min.js @@ -1 +1 @@ -var _extends=Object.assign||function(e){for(var t=1;t-1&&(i(e,t),e.classList.add(t.class_loading)),s(e,t),e.dataset.wasProcessed=!0,o(t.callback_set,e)},d=function(t){this._settings=_extends({},e,t),this._setObserver(),this.update()};d.prototype={_setObserver:function(){var e=this;if("IntersectionObserver"in window){var n=this._settings;this._observer=new IntersectionObserver(function(r){r.forEach(function(t){if(t.isIntersecting){var r=t.target;c(r,n),e._observer.unobserve(r)}}),e._elements=t(e._elements)},{root:n.container===document?null:n.container,rootMargin:n.threshold+"px"})}},update:function(){var e=this,n=this._settings,r=n.container.querySelectorAll(n.elements_selector);this._elements=t(Array.prototype.slice.call(r)),this._observer?this._elements.forEach(function(t){e._observer.observe(t)}):(this._elements.forEach(function(e){c(e,n)}),this._elements=t(this._elements))},destroy:function(){var e=this;this._observer&&(t(this._elements).forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null}};var u=window.lazyLoadOptions;return u&&function(e,t){var r=t.length;if(r)for(var s=0;s-1&&(i(e,t),e.classList.add(t.class_loading)),s(e,t),e.dataset.wasProcessed=!0,o(t.callback_set,e)},d=function(t){this._settings=_extends({},e,t),this._setObserver(),this.update()};d.prototype={_setObserver:function(){var e=this;if("IntersectionObserver"in window){var n=this._settings;this._observer=new IntersectionObserver(function(r){r.forEach(function(t){if(t.isIntersecting){var r=t.target;c(r,n),e._observer.unobserve(r)}}),e._elements=t(e._elements)},{root:n.container===document?null:n.container,rootMargin:n.threshold+"px"})}},update:function(){var e=this,n=this._settings,r=n.container.querySelectorAll(n.elements_selector);this._elements=t(Array.prototype.slice.call(r)),this._observer?this._elements.forEach(function(t){e._observer.observe(t)}):(this._elements.forEach(function(e){c(e,n)}),this._elements=t(this._elements))},destroy:function(){var e=this;this._observer&&(t(this._elements).forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null}};var u=window.lazyLoadOptions;return u&&function(e,t){var r=t.length;if(r)for(var s=0;s Date: Wed, 30 Aug 2017 22:01:35 +0200 Subject: [PATCH 12/13] Version bump (fixed a bug in setSourcesForPicture) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 327f1ebb..ad4e9de6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vanilla-lazyload", - "version": "9.0.0", + "version": "9.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7c835968..0aa1e14f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vanilla-lazyload", - "version": "9.0.0", + "version": "9.0.1", "description": "A fast, lightweight script to load images as they enter the viewport. SEO friendly, it supports responsive images (both srcset + sizes and picture) and progressive JPEG", "main": "dist/lazyload.min.js", "devDependencies": { From 6f70f5f0faa390108c3a91af4709fd2a9298beab Mon Sep 17 00:00:00 2001 From: Andrea Verlicchi Date: Wed, 30 Aug 2017 22:23:39 +0200 Subject: [PATCH 13/13] Created Changelog, updated TODO --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ todo.md | 10 ++++------ 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..f24aec66 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,35 @@ +# CHANGELOG + +## Version 9 + +#### 9.0.1 + +- Restored tests using Jest +- Squashed a bug which didn't make images inside `picture` load correctly + +#### 9.0.0 + +LazyLoad is now _faster_ thanks to the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). + +**IMPORTANT!** Browser support changed. Find more information in the [README](README.md) file. + +#### 8.1.0 + +Updated from grunt to gulp (run with gulp scripts) + +#### 8.0.3 + +Added quotes in background image URLs, as suggested in #114 (thanks to @vseva) + +#### 8.0.2 + +Fixed a bug that affected performance + +#### 8.0.1 + +Fixed reference to old names in demo files + +#### 8.0.0 + +- The main file to include is now **`dist/lazyload.min.js`** as you would expect, and no longer `dist/lazyload.transpiled.min.js`. +- The non-transpiled version is now named lazyload.es2015.js. \ No newline at end of file diff --git a/todo.md b/todo.md index 043ec1d0..7c48a5db 100644 --- a/todo.md +++ b/todo.md @@ -1,9 +1,7 @@ TODO ==== -* Use gulp instead of grunt - * Transpile and bundle to dist/lazyload.js and minified to dist/lazyload.min.js - * Bonus: in addition, don't transpile but bundle to dist/lazyload.es2015.js -* Make tests work again - * Test transpiled and bundled file's public functions (mocking dependencies) - * Test unbundled modules singularly (transpiled?) \ No newline at end of file +* Test more modules + * autoinitialize + * purge + * reveal \ No newline at end of file