From 3eadaa3d4b4826a73fb48592d5be2b20fa870614 Mon Sep 17 00:00:00 2001 From: David Zearing Date: Thu, 27 Oct 2016 16:44:41 -0700 Subject: [PATCH 1/4] Updating core build to respect directories/packagePath in package.json. --- .gitignore | 3 +- common/npm-shrinkwrap.json | 974 +++++++++++++++--- common/package.json | 7 +- .../npmx-test-web-library-build/package.json | 11 + .../npmx-web-library-build/package.json | 2 +- gulp-core-build/src/IBuildConfig.ts | 9 + gulp-core-build/src/IExecutable.ts | 2 +- gulp-core-build/src/index.ts | 10 +- gulp-core-build/src/tasks/BuildReceiptTask.ts | 134 +++ gulp-core-build/src/tasks/GulpTask.ts | 4 +- npmx.json | 4 + test-web-library-build/.vscode/launch.json | 46 + test-web-library-build/gulpfile.js | 5 + test-web-library-build/package.json | 18 + test-web-library-build/src/test.ts | 7 + web-library-build/src/index.ts | 16 +- 16 files changed, 1079 insertions(+), 173 deletions(-) create mode 100644 common/temp_modules/npmx-test-web-library-build/package.json create mode 100644 gulp-core-build/src/tasks/BuildReceiptTask.ts create mode 100644 test-web-library-build/.vscode/launch.json create mode 100644 test-web-library-build/gulpfile.js create mode 100644 test-web-library-build/package.json create mode 100644 test-web-library-build/src/test.ts diff --git a/.gitignore b/.gitignore index 6ad5b423bc2..39698786d77 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ lib lib-amd node_modules npm*.log -temp \ No newline at end of file +temp +package diff --git a/common/npm-shrinkwrap.json b/common/npm-shrinkwrap.json index 75480e74c63..9e3f657e1fa 100644 --- a/common/npm-shrinkwrap.json +++ b/common/npm-shrinkwrap.json @@ -237,9 +237,9 @@ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" }, "aws4": { - "version": "1.4.1", + "version": "1.5.0", "from": "aws4@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz" + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz" }, "backo2": { "version": "1.0.2", @@ -447,9 +447,9 @@ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz" }, "caniuse-db": { - "version": "1.0.30000548", + "version": "1.0.30000568", "from": "caniuse-db@>=1.0.30000488 <2.0.0", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000548.tgz" + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000568.tgz" }, "cardinal": { "version": "1.0.0", @@ -482,9 +482,9 @@ "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.1.tgz" }, "chokidar": { - "version": "1.6.0", + "version": "1.6.1", "from": "chokidar@>=1.4.1 <2.0.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.0.tgz" + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.1.tgz" }, "clean-css": { "version": "3.4.20", @@ -793,9 +793,9 @@ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz" }, "custom-event": { - "version": "1.0.0", + "version": "1.0.1", "from": "custom-event@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz" }, "d": { "version": "0.1.1", @@ -927,9 +927,9 @@ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz" }, "duplexify": { - "version": "3.4.5", + "version": "3.5.0", "from": "duplexify@>=3.4.2 <4.0.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.4.5.tgz", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.0.tgz", "dependencies": { "end-of-stream": { "version": "1.0.0", @@ -987,19 +987,19 @@ } }, "engine.io": { - "version": "1.7.0", - "from": "engine.io@1.7.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.7.0.tgz" + "version": "1.7.2", + "from": "engine.io@1.7.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.7.2.tgz" }, "engine.io-client": { - "version": "1.7.0", - "from": "engine.io-client@1.7.0", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.7.0.tgz" + "version": "1.7.2", + "from": "engine.io-client@1.7.2", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.7.2.tgz" }, "engine.io-parser": { - "version": "1.3.0", - "from": "engine.io-parser@1.3.0", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.0.tgz", + "version": "1.3.1", + "from": "engine.io-parser@1.3.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.1.tgz", "dependencies": { "has-binary": { "version": "0.1.6", @@ -1073,12 +1073,19 @@ "escodegen": { "version": "1.8.1", "from": "escodegen@>=1.8.0 <1.9.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz" + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "dependencies": { + "esprima": { + "version": "2.7.3", + "from": "esprima@>=2.7.1 <3.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz" + } + } }, "esprima": { - "version": "2.7.3", - "from": "esprima@>=2.7.0 <2.8.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz" + "version": "3.0.0", + "from": "esprima@>=3.0.0 <3.1.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.0.0.tgz" }, "estraverse": { "version": "1.9.3", @@ -1294,9 +1301,9 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz" }, "findup-sync": { - "version": "0.4.2", + "version": "0.4.3", "from": "findup-sync@>=0.4.2 <0.5.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.2.tgz" + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz" }, "fined": { "version": "1.0.2", @@ -1339,13 +1346,13 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz", "dependencies": { "async": { - "version": "2.0.1", + "version": "2.1.2", "from": "async@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.0.1.tgz" + "resolved": "https://registry.npmjs.org/async/-/async-2.1.2.tgz" }, "lodash": { "version": "4.16.4", - "from": "lodash@>=4.8.0 <5.0.0", + "from": "lodash@>=4.14.0 <5.0.0", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.4.tgz" } } @@ -1385,6 +1392,693 @@ "from": "fs.realpath@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" }, + "fsevents": { + "version": "1.0.14", + "from": "fsevents@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.0.14.tgz", + "optional": true, + "dependencies": { + "abbrev": { + "version": "1.0.9", + "from": "abbrev@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "optional": true + }, + "ansi-regex": { + "version": "2.0.0", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + }, + "ansi-styles": { + "version": "2.2.1", + "from": "ansi-styles@>=2.2.1 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "optional": true + }, + "aproba": { + "version": "1.0.4", + "from": "aproba@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.0.4.tgz", + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.2", + "from": "are-we-there-yet@>=1.1.2 <1.2.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", + "optional": true + }, + "asn1": { + "version": "0.2.3", + "from": "asn1@>=0.2.3 <0.3.0", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "from": "assert-plus@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "optional": true + }, + "async": { + "version": "1.5.2", + "from": "async@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "from": "aws-sign2@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "optional": true + }, + "aws4": { + "version": "1.4.1", + "from": "aws4@>=1.2.1 <2.0.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz", + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "bl": { + "version": "1.1.2", + "from": "bl@>=1.1.2 <1.2.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", + "optional": true, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "from": "readable-stream@>=2.0.5 <2.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "optional": true + } + } + }, + "block-stream": { + "version": "0.0.9", + "from": "block-stream@*", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz" + }, + "boom": { + "version": "2.10.1", + "from": "boom@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" + }, + "brace-expansion": { + "version": "1.1.5", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz" + }, + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "caseless": { + "version": "0.11.0", + "from": "caseless@>=0.11.0 <0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "optional": true + }, + "chalk": { + "version": "1.1.3", + "from": "chalk@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "optional": true + }, + "code-point-at": { + "version": "1.0.0", + "from": "code-point-at@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz" + }, + "combined-stream": { + "version": "1.0.5", + "from": "combined-stream@>=1.0.5 <1.1.0", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz" + }, + "commander": { + "version": "2.9.0", + "from": "commander@>=2.9.0 <3.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "console-control-strings": { + "version": "1.1.0", + "from": "console-control-strings@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "cryptiles": { + "version": "2.0.5", + "from": "cryptiles@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "optional": true + }, + "dashdash": { + "version": "1.14.0", + "from": "dashdash@>=1.12.0 <2.0.0", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz", + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "from": "assert-plus@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "optional": true + } + } + }, + "debug": { + "version": "2.2.0", + "from": "debug@>=2.2.0 <2.3.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "optional": true + }, + "deep-extend": { + "version": "0.4.1", + "from": "deep-extend@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz", + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "from": "delayed-stream@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + }, + "delegates": { + "version": "1.0.0", + "from": "delegates@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "from": "ecc-jsbn@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "optional": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "optional": true + }, + "extend": { + "version": "3.0.0", + "from": "extend@>=3.0.0 <3.1.0", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "from": "extsprintf@1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz" + }, + "forever-agent": { + "version": "0.6.1", + "from": "forever-agent@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "optional": true + }, + "form-data": { + "version": "1.0.0-rc4", + "from": "form-data@>=1.0.0-rc4 <1.1.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz", + "optional": true + }, + "fs.realpath": { + "version": "1.0.0", + "from": "fs.realpath@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "fstream": { + "version": "1.0.10", + "from": "fstream@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz" + }, + "fstream-ignore": { + "version": "1.0.5", + "from": "fstream-ignore@>=1.0.5 <1.1.0", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "optional": true + }, + "gauge": { + "version": "2.6.0", + "from": "gauge@>=2.6.0 <2.7.0", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz", + "optional": true + }, + "generate-function": { + "version": "2.0.0", + "from": "generate-function@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "optional": true + }, + "generate-object-property": { + "version": "1.2.0", + "from": "generate-object-property@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "optional": true + }, + "getpass": { + "version": "0.1.6", + "from": "getpass@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "from": "assert-plus@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "optional": true + } + } + }, + "glob": { + "version": "7.0.5", + "from": "glob@>=7.0.5 <8.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz" + }, + "graceful-fs": { + "version": "4.1.4", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz" + }, + "graceful-readlink": { + "version": "1.0.1", + "from": "graceful-readlink@>=1.0.0", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "optional": true + }, + "har-validator": { + "version": "2.0.6", + "from": "har-validator@>=2.0.6 <2.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "optional": true + }, + "has-ansi": { + "version": "2.0.0", + "from": "has-ansi@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "optional": true + }, + "has-color": { + "version": "0.1.7", + "from": "has-color@>=0.1.7 <0.2.0", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "optional": true + }, + "has-unicode": { + "version": "2.0.1", + "from": "has-unicode@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "optional": true + }, + "hawk": { + "version": "3.1.3", + "from": "hawk@>=3.1.3 <3.2.0", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "optional": true + }, + "hoek": { + "version": "2.16.3", + "from": "hoek@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" + }, + "http-signature": { + "version": "1.1.1", + "from": "http-signature@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "optional": true + }, + "inflight": { + "version": "1.0.5", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "ini": { + "version": "1.3.4", + "from": "ini@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" + }, + "is-my-json-valid": { + "version": "2.13.1", + "from": "is-my-json-valid@>=2.12.4 <3.0.0", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz", + "optional": true + }, + "is-property": { + "version": "1.0.2", + "from": "is-property@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "optional": true + }, + "is-typedarray": { + "version": "1.0.0", + "from": "is-typedarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "optional": true + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "isstream": { + "version": "0.1.2", + "from": "isstream@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "from": "jodid25519@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "optional": true + }, + "jsbn": { + "version": "0.1.0", + "from": "jsbn@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz", + "optional": true + }, + "json-schema": { + "version": "0.2.2", + "from": "json-schema@0.2.2", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz", + "optional": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "from": "json-stringify-safe@>=5.0.1 <5.1.0", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "optional": true + }, + "jsonpointer": { + "version": "2.0.0", + "from": "jsonpointer@2.0.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz", + "optional": true + }, + "jsprim": { + "version": "1.3.0", + "from": "jsprim@>=1.2.2 <2.0.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz", + "optional": true + }, + "mime-db": { + "version": "1.23.0", + "from": "mime-db@>=1.23.0 <1.24.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz" + }, + "mime-types": { + "version": "2.1.11", + "from": "mime-types@>=2.1.7 <2.2.0", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz" + }, + "minimatch": { + "version": "3.0.2", + "from": "minimatch@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz" + }, + "minimist": { + "version": "0.0.8", + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + }, + "mkdirp": { + "version": "0.5.1", + "from": "mkdirp@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "ms": { + "version": "0.7.1", + "from": "ms@0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.29", + "from": "node-pre-gyp@>=0.6.29 <0.7.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.29.tgz", + "optional": true + }, + "node-uuid": { + "version": "1.4.7", + "from": "node-uuid@>=1.4.7 <1.5.0", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz", + "optional": true + }, + "nopt": { + "version": "3.0.6", + "from": "nopt@>=3.0.1 <3.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "optional": true + }, + "npmlog": { + "version": "3.1.2", + "from": "npmlog@>=3.1.2 <3.2.0", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz", + "optional": true + }, + "number-is-nan": { + "version": "1.0.0", + "from": "number-is-nan@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + }, + "oauth-sign": { + "version": "0.8.2", + "from": "oauth-sign@>=0.8.1 <0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "optional": true + }, + "object-assign": { + "version": "4.1.0", + "from": "object-assign@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "optional": true + }, + "once": { + "version": "1.3.3", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" + }, + "path-is-absolute": { + "version": "1.0.0", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + }, + "pinkie": { + "version": "2.0.4", + "from": "pinkie@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "optional": true + }, + "pinkie-promise": { + "version": "2.0.1", + "from": "pinkie-promise@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "qs": { + "version": "6.2.0", + "from": "qs@>=6.2.0 <6.3.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz", + "optional": true + }, + "rc": { + "version": "1.1.6", + "from": "rc@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", + "optional": true, + "dependencies": { + "minimist": { + "version": "1.2.0", + "from": "minimist@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "optional": true + } + } + }, + "readable-stream": { + "version": "2.1.4", + "from": "readable-stream@>=2.0.0 <3.0.0||>=1.1.13 <2.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz" + }, + "request": { + "version": "2.73.0", + "from": "request@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.73.0.tgz", + "optional": true + }, + "rimraf": { + "version": "2.5.3", + "from": "rimraf@>=2.5.0 <2.6.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz" + }, + "semver": { + "version": "5.2.0", + "from": "semver@>=5.2.0 <5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz", + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "from": "set-blocking@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "optional": true + }, + "signal-exit": { + "version": "3.0.0", + "from": "signal-exit@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz", + "optional": true + }, + "sntp": { + "version": "1.0.9", + "from": "sntp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "optional": true + }, + "sshpk": { + "version": "1.8.3", + "from": "sshpk@>=1.7.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.8.3.tgz", + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "from": "assert-plus@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "optional": true + } + } + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "string-width": { + "version": "1.0.1", + "from": "string-width@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" + }, + "stringstream": { + "version": "0.0.5", + "from": "stringstream@>=0.0.4 <0.1.0", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "from": "strip-ansi@>=3.0.1 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" + }, + "strip-json-comments": { + "version": "1.0.4", + "from": "strip-json-comments@>=1.0.4 <1.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "optional": true + }, + "supports-color": { + "version": "2.0.0", + "from": "supports-color@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "optional": true + }, + "tar": { + "version": "2.2.1", + "from": "tar@>=2.2.0 <2.3.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" + }, + "tar-pack": { + "version": "3.1.4", + "from": "tar-pack@>=3.1.0 <3.2.0", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.4.tgz", + "optional": true + }, + "tough-cookie": { + "version": "2.2.2", + "from": "tough-cookie@>=2.2.0 <2.3.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz", + "optional": true + }, + "tunnel-agent": { + "version": "0.4.3", + "from": "tunnel-agent@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "optional": true + }, + "tweetnacl": { + "version": "0.13.3", + "from": "tweetnacl@>=0.13.0 <0.14.0", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "from": "uid-number@>=0.0.6 <0.1.0", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "verror": { + "version": "1.3.6", + "from": "verror@1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "optional": true + }, + "wide-align": { + "version": "1.1.0", + "from": "wide-align@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz", + "optional": true + }, + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "optional": true + } + } + }, "fstream": { "version": "1.0.10", "from": "fstream@>=1.0.0 <2.0.0", @@ -1411,9 +2105,9 @@ "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" }, "generic-names": { - "version": "1.0.1", + "version": "1.0.2", "from": "generic-names@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-1.0.2.tgz" }, "get-caller-file": { "version": "1.0.2", @@ -1438,9 +2132,9 @@ } }, "glob": { - "version": "7.1.0", + "version": "7.1.1", "from": "glob@>=7.0.3 <8.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.0.tgz" + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz" }, "glob-base": { "version": "0.3.0", @@ -2066,9 +2760,9 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" }, "glob-parent": { - "version": "3.0.0", + "version": "3.0.1", "from": "glob-parent@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.0.1.tgz" }, "glob-stream": { "version": "5.3.5", @@ -2093,14 +2787,14 @@ } }, "is-extglob": { - "version": "2.0.0", - "from": "is-extglob@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.0.0.tgz" + "version": "2.1.0", + "from": "is-extglob@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.0.tgz" }, "is-glob": { - "version": "3.0.0", - "from": "is-glob@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.0.0.tgz" + "version": "3.1.0", + "from": "is-glob@>=3.1.0 <4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz" }, "isarray": { "version": "1.0.0", @@ -2138,9 +2832,9 @@ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz" }, "vinyl-fs": { - "version": "2.4.3", + "version": "2.4.4", "from": "vinyl-fs@>=2.4.3 <2.5.0", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.3.tgz" + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz" } } }, @@ -2258,9 +2952,9 @@ } }, "http-proxy": { - "version": "1.15.1", + "version": "1.15.2", "from": "http-proxy@>=1.13.0 <2.0.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.15.1.tgz" + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.15.2.tgz" }, "http-signature": { "version": "1.1.1", @@ -2303,9 +2997,9 @@ "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" }, "inflight": { - "version": "1.0.5", + "version": "1.0.6", "from": "inflight@>=1.0.4 <2.0.0", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz" + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" }, "inherits": { "version": "2.0.3", @@ -2343,21 +3037,14 @@ "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.2.0.tgz" }, "is": { - "version": "3.1.0", + "version": "3.2.0", "from": "is@>=3.1.0 <4.0.0", - "resolved": "https://registry.npmjs.org/is/-/is-3.1.0.tgz" + "resolved": "https://registry.npmjs.org/is/-/is-3.2.0.tgz" }, "is-absolute": { - "version": "0.2.5", + "version": "0.2.6", "from": "is-absolute@>=0.2.3 <0.3.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.5.tgz", - "dependencies": { - "is-windows": { - "version": "0.1.1", - "from": "is-windows@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.1.1.tgz" - } - } + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz" }, "is-arrayish": { "version": "0.2.1", @@ -2526,6 +3213,11 @@ "from": "istanbul@>=0.4.0 <0.5.0", "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", "dependencies": { + "esprima": { + "version": "2.7.3", + "from": "esprima@>=2.7.0 <2.8.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz" + }, "glob": { "version": "5.0.15", "from": "glob@>=5.0.15 <6.0.0", @@ -2640,7 +3332,14 @@ "js-yaml": { "version": "3.6.1", "from": "js-yaml@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz" + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", + "dependencies": { + "esprima": { + "version": "2.7.3", + "from": "esprima@>=2.6.0 <3.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz" + } + } }, "jsbn": { "version": "0.1.0", @@ -2804,9 +3503,9 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz" }, "klaw": { - "version": "1.3.0", + "version": "1.3.1", "from": "klaw@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.0.tgz" + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" }, "lazy-cache": { "version": "1.0.4", @@ -3181,9 +3880,9 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz" }, "marked-terminal": { - "version": "1.6.2", + "version": "1.7.0", "from": "marked-terminal@>=1.6.2 <2.0.0", - "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-1.6.2.tgz" + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-1.7.0.tgz" }, "md5": { "version": "2.2.1", @@ -3377,13 +4076,13 @@ }, "node-emoji": { "version": "1.4.1", - "from": "node-emoji@>=1.3.1 <2.0.0", + "from": "node-emoji@>=1.4.1 <2.0.0", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.4.1.tgz" }, "node-forge": { - "version": "0.6.42", + "version": "0.6.44", "from": "node-forge@>=0.6.42 <0.7.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.42.tgz" + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.44.tgz" }, "node-gyp": { "version": "3.4.0", @@ -3418,21 +4117,14 @@ "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz" }, "globule": { - "version": "1.0.0", + "version": "1.1.0", "from": "globule@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.0.0.tgz", - "dependencies": { - "glob": { - "version": "7.0.6", - "from": "glob@>=7.0.3 <7.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz" - } - } + "resolved": "https://registry.npmjs.org/globule/-/globule-1.1.0.tgz" }, "lodash": { - "version": "4.9.0", - "from": "lodash@>=4.9.0 <4.10.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.9.0.tgz" + "version": "4.16.4", + "from": "lodash@>=4.16.4 <4.17.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.4.tgz" }, "lodash.clonedeep": { "version": "4.5.0", @@ -3548,6 +4240,11 @@ "from": "temp_modules/npmx-node-library-build", "resolved": "file:temp_modules/npmx-node-library-build" }, + "npmx-test-web-library-build": { + "version": "0.0.0", + "from": "temp_modules/npmx-test-web-library-build", + "resolved": "file:temp_modules/npmx-test-web-library-build" + }, "npmx-web-build-tools-scripts": { "version": "0.0.0", "from": "temp_modules/npmx-web-build-tools-scripts", @@ -3559,9 +4256,9 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz" }, "yargs": { - "version": "6.0.0", + "version": "6.3.0", "from": "yargs@>=6.0.0 <7.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.0.0.tgz" + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.3.0.tgz" }, "yargs-parser": { "version": "4.0.2", @@ -3766,6 +4463,11 @@ "from": "path-browserify@0.0.0", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz" }, + "path-dirname": { + "version": "1.0.2", + "from": "path-dirname@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz" + }, "path-exists": { "version": "2.1.0", "from": "path-exists@>=2.0.0 <3.0.0", @@ -3874,9 +4576,9 @@ "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz" }, "postcss": { - "version": "5.2.4", + "version": "5.2.5", "from": "postcss@>=5.0.21 <6.0.0", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.4.tgz", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.5.tgz", "dependencies": { "source-map": { "version": "0.5.6", @@ -3967,7 +4669,7 @@ }, "punycode": { "version": "1.4.1", - "from": "punycode@>=1.2.4 <2.0.0", + "from": "punycode@>=1.4.1 <2.0.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" }, "qs": { @@ -4053,9 +4755,9 @@ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz" }, "redeyed": { - "version": "1.0.0", + "version": "1.0.1", "from": "redeyed@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-1.0.1.tgz" }, "regenerate": { "version": "1.3.1", @@ -4088,9 +4790,9 @@ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" }, "repeat-string": { - "version": "1.5.4", + "version": "1.6.1", "from": "repeat-string@>=1.5.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" }, "repeating": { "version": "2.0.1", @@ -4318,9 +5020,9 @@ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" }, "socket.io": { - "version": "1.5.0", + "version": "1.5.1", "from": "socket.io@>=1.4.5 <2.0.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.5.0.tgz" + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.5.1.tgz" }, "socket.io-adapter": { "version": "0.4.0", @@ -4342,9 +5044,9 @@ } }, "socket.io-client": { - "version": "1.5.0", - "from": "socket.io-client@1.5.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.5.0.tgz", + "version": "1.5.1", + "from": "socket.io-client@1.5.1", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.5.1.tgz", "dependencies": { "component-emitter": { "version": "1.2.0", @@ -4354,9 +5056,9 @@ } }, "socket.io-parser": { - "version": "2.2.6", - "from": "socket.io-parser@2.2.6", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.6.tgz", + "version": "2.3.1", + "from": "socket.io-parser@2.3.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.3.1.tgz", "dependencies": { "json3": { "version": "3.3.2", @@ -4637,9 +5339,9 @@ "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz" }, "tough-cookie": { - "version": "2.3.1", + "version": "2.3.2", "from": "tough-cookie@>=2.3.0 <2.4.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz" + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz" }, "trim-newlines": { "version": "1.0.0", @@ -4681,9 +5383,9 @@ } }, "tslint-microsoft-contrib": { - "version": "2.0.12", + "version": "2.0.13", "from": "tslint-microsoft-contrib@>=2.0.10 <2.1.0", - "resolved": "https://registry.npmjs.org/tslint-microsoft-contrib/-/tslint-microsoft-contrib-2.0.12.tgz" + "resolved": "https://registry.npmjs.org/tslint-microsoft-contrib/-/tslint-microsoft-contrib-2.0.13.tgz" }, "tsscmp": { "version": "1.0.5", @@ -4732,52 +5434,44 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.0.3.tgz" }, "uglify-js": { - "version": "2.7.3", + "version": "2.7.4", "from": "uglify-js@>=2.6.0 <3.0.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.3.tgz", - "optional": true, + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.4.tgz", "dependencies": { "async": { "version": "0.2.10", "from": "async@>=0.2.6 <0.3.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "optional": true + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" }, "camelcase": { "version": "1.2.1", "from": "camelcase@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "optional": true + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" }, "cliui": { "version": "2.1.0", "from": "cliui@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "optional": true + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz" }, "source-map": { "version": "0.5.6", "from": "source-map@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "optional": true + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" }, "window-size": { "version": "0.1.0", "from": "window-size@0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "optional": true + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" }, "wordwrap": { "version": "0.0.2", "from": "wordwrap@0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "optional": true + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" }, "yargs": { "version": "3.10.0", "from": "yargs@>=3.10.0 <3.11.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "optional": true + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz" } } }, @@ -4979,61 +5673,19 @@ } }, "webpack": { - "version": "1.13.2", + "version": "1.13.3", "from": "webpack@>=1.13.0 <1.14.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.13.2.tgz", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.13.3.tgz", "dependencies": { - "camelcase": { - "version": "1.2.1", - "from": "camelcase@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" - }, - "cliui": { - "version": "2.1.0", - "from": "cliui@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz" - }, "interpret": { "version": "0.6.6", "from": "interpret@>=0.6.4 <0.7.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz" }, - "source-map": { - "version": "0.5.6", - "from": "source-map@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" - }, "supports-color": { "version": "3.1.2", "from": "supports-color@>=3.1.0 <4.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz" - }, - "uglify-js": { - "version": "2.6.4", - "from": "uglify-js@>=2.6.0 <2.7.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.4.tgz", - "dependencies": { - "async": { - "version": "0.2.10", - "from": "async@>=0.2.6 <0.3.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" - } - } - }, - "window-size": { - "version": "0.1.0", - "from": "window-size@0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" - }, - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" - }, - "yargs": { - "version": "3.10.0", - "from": "yargs@>=3.10.0 <3.11.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz" } } }, @@ -5050,9 +5702,9 @@ } }, "webpack-dev-middleware": { - "version": "1.8.3", + "version": "1.8.4", "from": "webpack-dev-middleware@>=1.0.11 <2.0.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.8.3.tgz" + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.8.4.tgz" }, "websocket-driver": { "version": "0.6.5", diff --git a/common/package.json b/common/package.json index 77739543404..b93f029d489 100644 --- a/common/package.json +++ b/common/package.json @@ -1,15 +1,16 @@ { "dependencies": { + "npmx-gulp-core-build-typescript": "file:./temp_modules/npmx-gulp-core-build-typescript", "npmx-gulp-core-build": "file:./temp_modules/npmx-gulp-core-build", - "npmx-gulp-core-build-karma": "file:./temp_modules/npmx-gulp-core-build-karma", "npmx-gulp-core-build-mocha": "file:./temp_modules/npmx-gulp-core-build-mocha", "npmx-gulp-core-build-sass": "file:./temp_modules/npmx-gulp-core-build-sass", "npmx-gulp-core-build-serve": "file:./temp_modules/npmx-gulp-core-build-serve", - "npmx-gulp-core-build-typescript": "file:./temp_modules/npmx-gulp-core-build-typescript", + "npmx-gulp-core-build-karma": "file:./temp_modules/npmx-gulp-core-build-karma", "npmx-gulp-core-build-webpack": "file:./temp_modules/npmx-gulp-core-build-webpack", "npmx-node-library-build": "file:./temp_modules/npmx-node-library-build", "npmx-web-library-build": "file:./temp_modules/npmx-web-library-build", - "npmx-web-build-tools-scripts": "file:./temp_modules/npmx-web-build-tools-scripts" + "npmx-web-build-tools-scripts": "file:./temp_modules/npmx-web-build-tools-scripts", + "npmx-test-web-library-build": "file:./temp_modules/npmx-test-web-library-build" }, "description": "Temporary file generated by the NPMX tool", "name": "npmx-common", diff --git a/common/temp_modules/npmx-test-web-library-build/package.json b/common/temp_modules/npmx-test-web-library-build/package.json new file mode 100644 index 00000000000..4182a67db82 --- /dev/null +++ b/common/temp_modules/npmx-test-web-library-build/package.json @@ -0,0 +1,11 @@ +{ + "name": "npmx-test-web-library-build", + "version": "0.0.0", + "private": true, + "dependencies": { + "gulp": "~3.9.1" + }, + "npmxDependencies": { + "@microsoft/web-library-build": ">=0.5.0 < 1.0.0" + } +} diff --git a/common/temp_modules/npmx-web-library-build/package.json b/common/temp_modules/npmx-web-library-build/package.json index e0db6427bef..01f9fc468bb 100644 --- a/common/temp_modules/npmx-web-library-build/package.json +++ b/common/temp_modules/npmx-web-library-build/package.json @@ -16,7 +16,7 @@ "@microsoft/gulp-core-build": ">=0.11.0 <1.0.0", "@microsoft/gulp-core-build-karma": ">=0.4.0 <1.0.0", "@microsoft/gulp-core-build-sass": ">=0.5.0 <1.0.0", - "@microsoft/gulp-core-build-serve": ">=0.4.0 <1.0.0", + "@microsoft/gulp-core-build-serve": ">=0.5.4 <1.0.0", "@microsoft/gulp-core-build-typescript": ">=0.6.0 <1.0.0", "@microsoft/gulp-core-build-webpack": ">=0.4.0 <1.0.0" } diff --git a/gulp-core-build/src/IBuildConfig.ts b/gulp-core-build/src/IBuildConfig.ts index 2c53d67444b..3ef71db628a 100644 --- a/gulp-core-build/src/IBuildConfig.ts +++ b/gulp-core-build/src/IBuildConfig.ts @@ -14,6 +14,12 @@ export interface IBuildConfig { /** Full physical path to the root path directory. */ rootPath?: string; + /** + * Package output folder in which publishable output should be dropped. + * @default package.json directories/packagePath value. + */ + packageFolder?: string; + /** Source folder name where source is included. */ srcFolder?: string; @@ -63,4 +69,7 @@ export interface IBuildConfig { /** Optional callback to be executed when a task ends. */ onTaskEnd?: (taskName: string, duration: number[], error?: any) => void; + + /** Flag used to indicate if the build is redundant and should be exited prematurely. */ + isRedundantBuild?: boolean; } diff --git a/gulp-core-build/src/IExecutable.ts b/gulp-core-build/src/IExecutable.ts index d81b5c9bda0..71cb7684917 100644 --- a/gulp-core-build/src/IExecutable.ts +++ b/gulp-core-build/src/IExecutable.ts @@ -8,7 +8,7 @@ export interface IExecutable { name?: string; /** Optional callback to indicate if the task is enabled or not. */ - isEnabled?: () => boolean; + isEnabled?: (config?: IBuildConfig) => boolean; /** Optional method to indicate directory matches to clean up when the nuke task is run. */ getNukeMatch?: (config: IBuildConfig, taskConfig?: any) => string[]; /* tslint:disable-line:no-any */ diff --git a/gulp-core-build/src/index.ts b/gulp-core-build/src/index.ts index 9299f2be615..a9b07875338 100644 --- a/gulp-core-build/src/index.ts +++ b/gulp-core-build/src/index.ts @@ -35,12 +35,16 @@ const packageJSON: any = require(path.resolve(process.cwd(), 'package.json')); const _taskMap: { [key: string]: IExecutable } = {}; const _uniqueTasks: IExecutable[] = []; +const packageFolder: string = + (packageJSON.directories && packageJSON.directories.packagePath) ? + packageJSON.directories.packagePath : ''; let _buildConfig: IBuildConfig = { + packageFolder, srcFolder: 'src', - distFolder: 'dist', + distFolder: path.join(packageFolder, 'dist'), libAMDFolder: undefined, - libFolder: 'lib', + libFolder: path.join(packageFolder, 'lib'), tempFolder: 'temp', properties: {}, relogIssues: getFlagValue('relogIssues', true), @@ -340,7 +344,7 @@ function _executeTask(task: IExecutable, buildConfig: IBuildConfig): Promise { + public name: string = 'check-for-changes'; + public executeTask( + gulp: gulp.Gulp, + completeCallback: (result?: Object) => void + ): Promise | NodeJS.ReadWriteStream | void { + + getLocalHashes().then(localHashes => { + _lastLocalHashes = localHashes; + debugger; + readPackageHashes(path.join(process.cwd(), this.buildConfig.packageFolder, 'build.json')).then(packageHashes => { + if (packageHashes) { + if (areObjectsEqual(localHashes, packageHashes)) { + this.buildConfig.isRedundantBuild = true; + this.log('Build is redundant. Skipping steps.'); + } else { + debugger; + areObjectsEqual(localHashes, packageHashes); + this.log('Build has new content, continuing execution.'); + } + } + completeCallback(); + }); + }); + } +} + +/** + * This task writes _lastFilesHash, generated from the CheckBuildReceipt task, to the package path in the + * build.json file. It should only be executed in a task which runs the CheckBuildReceipt subtask first, and + * should only be run at the end of the task when everything has successfully completed. + */ +export class UpdateBuildReceiptTask extends GulpTask { + public name: string = 'mark-changes'; + public executeTask( + gulp: gulp.Gulp, + completeCallback: (result?: Object) => void + ): Promise | NodeJS.ReadWriteStream | void { + + let packageHashPath: string = path.join(process.cwd(), this.buildConfig.packageFolder, 'build.json'); + + fs.writeFile(packageHashPath, JSON.stringify(_lastLocalHashes, undefined, 2), completeCallback); + } +} + +function getLocalHashes(): Promise<{ [path: string]: string }> { + return new Promise((complete) => { + child_process.exec( + `git ls-tree HEAD -r && echo ${PROCESS_OUTPUT_DELIMITER} && git status --s -u .`, + { cwd: process.cwd() }, + (error: Error, stdout: string) => { + const fileHashes: { [path: string]: string } = {}; + const processOutputBlocks: string[] = stdout.split(PROCESS_OUTPUT_DELIMITER + '\n'); + + processOutputBlocks[0].split('\n').forEach(line => { + if (line) { + const parts: string[] = line.substr(line.indexOf('blob ') + 5).split('\t'); + fileHashes[parts[1]] = parts[0]; + } + }); + + if (processOutputBlocks[1]) { + const changedFiles: string[] = + processOutputBlocks[1] + .split('\n') + .map(line => line.trim().split(' ')[1]).filter(name => !!name); + + if (changedFiles.length) { + child_process.exec( + 'git hash-object ' + changedFiles.join(' '), + { cwd: process.cwd() }, + (hashError: Error, hashStdout: string) => { + const hashes: string[] = hashStdout.split('\n'); + + changedFiles.forEach((filename, i) => fileHashes[filename] = hashes[i]); + + complete(fileHashes); + }); + } + } else { + complete(fileHashes); + } + }); + + }); +} + +function readPackageHashes(receiptPath: string): Promise<{ [path: string]: string }> { + return new Promise((complete) => { + fs.readFile(receiptPath, 'utf8', (err, data) => { + complete(err ? undefined : JSON.parse(data)); + }); + }); +} + +function areObjectsEqual(obj1: Object, obj2: Object): boolean { + let obj1Keys: string[] = Object.keys(obj1); + let obj2Keys: string[] = Object.keys(obj2); + + if (obj1Keys.length === obj2Keys.length) { + for (let key of obj1Keys) { + if (obj1[key] !== obj2[key]) { + return false; + } + } + + return true; + } + + return false; +} diff --git a/gulp-core-build/src/tasks/GulpTask.ts b/gulp-core-build/src/tasks/GulpTask.ts index 3a43dbd7e74..23b47a7b410 100644 --- a/gulp-core-build/src/tasks/GulpTask.ts +++ b/gulp-core-build/src/tasks/GulpTask.ts @@ -47,8 +47,8 @@ export abstract class GulpTask implements IExecutable { this.taskConfig = taskConfig; } - public isEnabled(): boolean { - return true; + public isEnabled(buildConfig: IBuildConfig): boolean { + return (!buildConfig || !buildConfig.isRedundantBuild); } public abstract executeTask(gulp: gulp.Gulp | GulpProxy, completeCallback?: (result?: Object) => void): Promise | NodeJS.ReadWriteStream | void; diff --git a/npmx.json b/npmx.json index fda6eb54c0e..8abd201b700 100644 --- a/npmx.json +++ b/npmx.json @@ -65,6 +65,10 @@ { "packageName": "web-build-tools-scripts", "projectFolder": "scripts" + }, + { + "packageName": "test-web-library-build", + "projectFolder": "test-web-library-build" } ] } \ No newline at end of file diff --git a/test-web-library-build/.vscode/launch.json b/test-web-library-build/.vscode/launch.json new file mode 100644 index 00000000000..7fa3cf49423 --- /dev/null +++ b/test-web-library-build/.vscode/launch.json @@ -0,0 +1,46 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch", + "type": "node", + "request": "launch", + "program": "${workspaceRoot}/node_modules/gulp/bin/gulp.js", + "stopOnEntry": false, + "args": [], + "cwd": "${workspaceRoot}", + "preLaunchTask": null, + "runtimeExecutable": null, + "runtimeArgs": [ + "--nolazy" + ], + "env": { + "NODE_ENV": "development" + }, + "console": "internalConsole", + "sourceMaps": false, + "outFiles": [] + }, + { + "name": "Attach", + "type": "node", + "request": "attach", + "port": 5858, + "address": "localhost", + "restart": false, + "sourceMaps": false, + "outFiles": [], + "localRoot": "${workspaceRoot}", + "remoteRoot": null + }, + { + "name": "Attach to Process", + "type": "node", + "request": "attach", + "processId": "${command.PickProcess}", + "port": 5858, + "sourceMaps": false, + "outFiles": [] + } + ] +} \ No newline at end of file diff --git a/test-web-library-build/gulpfile.js b/test-web-library-build/gulpfile.js new file mode 100644 index 00000000000..d2c3fc9b46e --- /dev/null +++ b/test-web-library-build/gulpfile.js @@ -0,0 +1,5 @@ +'use strict'; + +require('@microsoft/web-library-build') + .initialize(require('gulp')); + diff --git a/test-web-library-build/package.json b/test-web-library-build/package.json new file mode 100644 index 00000000000..8c4db00b5e3 --- /dev/null +++ b/test-web-library-build/package.json @@ -0,0 +1,18 @@ +{ + "name": "test-web-library-build", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "gulp", + "clean": "gulp nuke", + "test": "gulp" + }, + "directories": { + "packagePath": "package" + }, + "dependencies": { + "gulp": "~3.9.1", + "@microsoft/web-library-build": ">=0.5.0 < 1.0.0" + } +} diff --git a/test-web-library-build/src/test.ts b/test-web-library-build/src/test.ts new file mode 100644 index 00000000000..e17ce1af5a1 --- /dev/null +++ b/test-web-library-build/src/test.ts @@ -0,0 +1,7 @@ +export function log(message: string): void { + console.log(message); +} + +export function add(num1: number, num2: number): number { + return num1 + num2; +} diff --git a/web-library-build/src/index.ts b/web-library-build/src/index.ts index b2394cd6671..a338acff10d 100644 --- a/web-library-build/src/index.ts +++ b/web-library-build/src/index.ts @@ -1,5 +1,7 @@ import { CopyTask, + CheckBuildReceiptTask, + UpdateBuildReceiptTask, GenerateShrinkwrapTask, IExecutable, ValidateShrinkwrapTask, @@ -28,13 +30,25 @@ preCopy.name = 'pre-copy'; export const postCopy: CopyTask = new CopyTask(); postCopy.name = 'post-copy'; +export const checkReceipt: CheckBuildReceiptTask = new CheckBuildReceiptTask(); +export const updateReceipt: UpdateBuildReceiptTask = new UpdateBuildReceiptTask(); + const sourceMatch: string[] = [ 'src/**/*.{ts,tsx,scss,js,txt,html}', '!src/**/*.scss.ts' ]; // Define default task groups. -let buildTasks: IExecutable = task('build', serial(preCopy, sass, parallel(tslint, typescript, text), postCopy)); +let buildTasks: IExecutable = task( + 'build', + serial( + checkReceipt, + preCopy, + sass, + parallel(tslint, typescript, text), + postCopy, + updateReceipt)); + let bundleTasks: IExecutable = task('bundle', serial(buildTasks, webpack)); const postProcessSourceMaps: PostProcessSourceMaps = new PostProcessSourceMaps(); const validateShrinkwrapTask: ValidateShrinkwrapTask = new ValidateShrinkwrapTask(); From 3c3f93cdd726fe250741855add945337a82e2c72 Mon Sep 17 00:00:00 2001 From: David Zearing Date: Thu, 27 Oct 2016 16:55:07 -0700 Subject: [PATCH 2/4] Removing web-library-build integration for now. --- web-library-build/src/index.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/web-library-build/src/index.ts b/web-library-build/src/index.ts index a338acff10d..b2394cd6671 100644 --- a/web-library-build/src/index.ts +++ b/web-library-build/src/index.ts @@ -1,7 +1,5 @@ import { CopyTask, - CheckBuildReceiptTask, - UpdateBuildReceiptTask, GenerateShrinkwrapTask, IExecutable, ValidateShrinkwrapTask, @@ -30,25 +28,13 @@ preCopy.name = 'pre-copy'; export const postCopy: CopyTask = new CopyTask(); postCopy.name = 'post-copy'; -export const checkReceipt: CheckBuildReceiptTask = new CheckBuildReceiptTask(); -export const updateReceipt: UpdateBuildReceiptTask = new UpdateBuildReceiptTask(); - const sourceMatch: string[] = [ 'src/**/*.{ts,tsx,scss,js,txt,html}', '!src/**/*.scss.ts' ]; // Define default task groups. -let buildTasks: IExecutable = task( - 'build', - serial( - checkReceipt, - preCopy, - sass, - parallel(tslint, typescript, text), - postCopy, - updateReceipt)); - +let buildTasks: IExecutable = task('build', serial(preCopy, sass, parallel(tslint, typescript, text), postCopy)); let bundleTasks: IExecutable = task('bundle', serial(buildTasks, webpack)); const postProcessSourceMaps: PostProcessSourceMaps = new PostProcessSourceMaps(); const validateShrinkwrapTask: ValidateShrinkwrapTask = new ValidateShrinkwrapTask(); From b8fb57d2fb25e1f5ee739f3449be910fc68e86e8 Mon Sep 17 00:00:00 2001 From: David Zearing Date: Mon, 31 Oct 2016 11:23:00 -0700 Subject: [PATCH 3/4] PR feedback addressed. --- gulp-core-build/src/tasks/BuildReceiptTask.ts | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/gulp-core-build/src/tasks/BuildReceiptTask.ts b/gulp-core-build/src/tasks/BuildReceiptTask.ts index c4e84ad8381..02541a7d5d9 100644 --- a/gulp-core-build/src/tasks/BuildReceiptTask.ts +++ b/gulp-core-build/src/tasks/BuildReceiptTask.ts @@ -7,19 +7,23 @@ import * as child_process from 'child_process'; export interface IBuildReceiptTask { } -const PROCESS_OUTPUT_DELIMITER: string = '~X~X~X~X~X~X~'; +const PROCESS_OUTPUT_DELIMITER: string = '///~X~X~X~X~X~X~///'; let _lastLocalHashes: { [path: string]: string } = {}; /** - * This task is responsible for the following: + * This task is responsible for generating a build receipt, which is a hash of filePath to sha1 git hash, + * based on the current folder's content. If a {buildConfig.packagePath}/build.json file exists, it will + * parse it and object compare the computed build receipt with the contents. If everything is the same, it + * will set buildConfig.isRedundantBuild flag to true, which can be used in task isEnabled methods to skip + * unnecessary work. * - * 1. Gather the local files build receipt of the current files. Cache it in _lastFilesHash for later use. + * The utility function "_getLocalHashes" will use the git.exe process to get the hashes from the git + * cache. It also asks for git status, which will tell us what has been changed since. It uses this info + * to build the hash. * - * 2. Check for the existence of a package build receipt. If none exists, complete the task. - * - * 3. Compare the package build hashes with the local build hashes. If they match, update the buildConfig to - * have isRedundantBuild flat set to true. This allows other tasks to completely prematurely. + * The utility funciton "_readPackageHashes" will read the local build.json file from the packagePath + * folder. */ export class CheckBuildReceiptTask extends GulpTask { public name: string = 'check-for-changes'; @@ -28,17 +32,15 @@ export class CheckBuildReceiptTask extends GulpTask { completeCallback: (result?: Object) => void ): Promise | NodeJS.ReadWriteStream | void { - getLocalHashes().then(localHashes => { + _getLocalHashes().then(localHashes => { _lastLocalHashes = localHashes; - debugger; - readPackageHashes(path.join(process.cwd(), this.buildConfig.packageFolder, 'build.json')).then(packageHashes => { + _readPackageHashes(path.join(process.cwd(), this.buildConfig.packageFolder, 'build.json')).then(packageHashes => { if (packageHashes) { - if (areObjectsEqual(localHashes, packageHashes)) { + if (_areObjectsEqual(localHashes, packageHashes)) { this.buildConfig.isRedundantBuild = true; this.log('Build is redundant. Skipping steps.'); } else { - debugger; - areObjectsEqual(localHashes, packageHashes); + _areObjectsEqual(localHashes, packageHashes); this.log('Build has new content, continuing execution.'); } } @@ -66,7 +68,7 @@ export class UpdateBuildReceiptTask extends GulpTask { } } -function getLocalHashes(): Promise<{ [path: string]: string }> { +function _getLocalHashes(): Promise<{ [path: string]: string }> { return new Promise((complete) => { child_process.exec( `git ls-tree HEAD -r && echo ${PROCESS_OUTPUT_DELIMITER} && git status --s -u .`, @@ -108,7 +110,7 @@ function getLocalHashes(): Promise<{ [path: string]: string }> { }); } -function readPackageHashes(receiptPath: string): Promise<{ [path: string]: string }> { +function _readPackageHashes(receiptPath: string): Promise<{ [path: string]: string }> { return new Promise((complete) => { fs.readFile(receiptPath, 'utf8', (err, data) => { complete(err ? undefined : JSON.parse(data)); @@ -116,7 +118,7 @@ function readPackageHashes(receiptPath: string): Promise<{ [path: string]: strin }); } -function areObjectsEqual(obj1: Object, obj2: Object): boolean { +function _areObjectsEqual(obj1: Object, obj2: Object): boolean { let obj1Keys: string[] = Object.keys(obj1); let obj2Keys: string[] = Object.keys(obj2); From 04b1e01b1060613574f1d85067d648d47bfbc37b Mon Sep 17 00:00:00 2001 From: David Zearing Date: Mon, 31 Oct 2016 12:03:55 -0700 Subject: [PATCH 4/4] Allowing karma and webpack to be skipped correctly and consistently. --- gulp-core-build-karma/src/KarmaTask.ts | 24 +++++++---- gulp-core-build-webpack/src/WebpackTask.ts | 47 +++++++++------------- test-web-library-build/gulpfile.js | 7 +++- 3 files changed, 40 insertions(+), 38 deletions(-) diff --git a/gulp-core-build-karma/src/KarmaTask.ts b/gulp-core-build-karma/src/KarmaTask.ts index 5a827993bdc..ec72f991d09 100644 --- a/gulp-core-build-karma/src/KarmaTask.ts +++ b/gulp-core-build-karma/src/KarmaTask.ts @@ -1,17 +1,17 @@ -import { GulpTask } from '@microsoft/gulp-core-build'; +import { GulpTask, IBuildConfig } from '@microsoft/gulp-core-build'; import * as gulp from 'gulp'; import * as karma from 'karma'; import * as path from 'path'; export interface IKarmaTaskConfig { - karmaConfigPath: string; + configPath: string; } export class KarmaTask extends GulpTask { public name: string = 'karma'; public taskConfig: IKarmaTaskConfig = { - karmaConfigPath: './karma.config.js' + configPath: './karma.config.js' }; public resources: Object = { @@ -27,16 +27,24 @@ export class KarmaTask extends GulpTask { ] }; + public isEnabled(buildConfig: IBuildConfig): boolean { + return ( + super.isEnabled(buildConfig) && + this.taskConfig.configPath !== null // tslint:disable-line:no-null-keyword + ); + } + public executeTask(gulp: gulp.Gulp, completeCallback: (error?: Error | string) => void): void { - const { karmaConfigPath }: IKarmaTaskConfig = this.taskConfig; + const { configPath }: IKarmaTaskConfig = this.taskConfig; - if (!this.fileExists(karmaConfigPath)) { + if (!this.fileExists(configPath)) { const shouldInitKarma: boolean = (process.argv.indexOf('--initkarma') > -1); if (!shouldInitKarma) { this.logWarning( - `The karma config location '${ karmaConfigPath }' doesn't exist. ` + - `Run again using --initkarma to create a default config.`); + `No karma config has been provided. ` + + `Run again using --initkarma to create a default config, or call ` + + ` karma.setConfig({ configPath: null }) in your gulpfile.`); } else { this.copyFile(path.resolve(__dirname, '../karma.config.js')); this.copyFile(path.resolve(__dirname, '../tests.js'), 'src/tests.js'); @@ -60,7 +68,7 @@ export class KarmaTask extends GulpTask { grep: matchString } }, - configFile: this.resolvePath(karmaConfigPath), + configFile: this.resolvePath(configPath), singleRun: singleRun }, (exitCode) => { if (exitCode) { diff --git a/gulp-core-build-webpack/src/WebpackTask.ts b/gulp-core-build-webpack/src/WebpackTask.ts index cad2649897b..fd606da3dbb 100644 --- a/gulp-core-build-webpack/src/WebpackTask.ts +++ b/gulp-core-build-webpack/src/WebpackTask.ts @@ -1,5 +1,5 @@ import * as Webpack from 'webpack'; -import { GulpTask } from '@microsoft/gulp-core-build'; +import { GulpTask, IBuildConfig } from '@microsoft/gulp-core-build'; import gulp = require('gulp'); import { EOL } from 'os'; @@ -33,6 +33,13 @@ export class WebpackTask extends GulpTask { webpack: require('webpack') }; + public isEnabled(buildConfig: IBuildConfig): boolean { + return ( + super.isEnabled(buildConfig) && + this.taskConfig.configPath !== null // tslint:disable-line:no-null-keyword + ); + } + public executeTask(gulp: gulp.Gulp, completeCallback: (result?: Object) => void): void { let shouldInitWebpack: boolean = (process.argv.indexOf('--initwebpack') > -1); @@ -50,33 +57,17 @@ export class WebpackTask extends GulpTask { } else { let webpackConfig: Object; - if (!this.taskConfig.configPath && !this.taskConfig.config) { - this.logMissingConfigWarning(); - completeCallback(); - return; - } else if (this.taskConfig.configPath) { - if (this.fileExists(this.taskConfig.configPath)) { - try { - webpackConfig = require(this.resolvePath(this.taskConfig.configPath)); - } catch (err) { - completeCallback(`Error parsing webpack config: ${ this.taskConfig.configPath }: ${ err }`); - return; - } - } else if (!this.taskConfig.config) { - this.logWarning( - `The webpack config location '${ this.taskConfig.configPath }' doesn't exist. ` + - `Run again using --initwebpack to create a default config, or call ` + - `webpack.setConfig({ configPath: null }).`); - - completeCallback(); + if (this.taskConfig.configPath && this.fileExists(this.taskConfig.configPath)) { + try { + webpackConfig = require(this.resolvePath(this.taskConfig.configPath)); + } catch (err) { + completeCallback(`Error parsing webpack config: ${this.taskConfig.configPath}: ${err}`); return; - } else { - webpackConfig = this.taskConfig.config; } } else if (this.taskConfig.config) { webpackConfig = this.taskConfig.config; } else { - this.logMissingConfigWarning(); + this._logMissingConfigWarning(); completeCallback(); return; } @@ -134,7 +125,7 @@ export class WebpackTask extends GulpTask { } let duration = (new Date().getTime() - startTime); - let statsResultChildren = statsResult.children ? statsResult.children : [ statsResult ]; + let statsResultChildren = statsResult.children ? statsResult.children : [statsResult]; statsResultChildren.forEach(child => { if (child.chunks) { @@ -156,10 +147,10 @@ export class WebpackTask extends GulpTask { } } - private logMissingConfigWarning() { + private _logMissingConfigWarning() { this.logWarning( - 'No webpack config has been provided.' + - 'Run again using --initwebpack to create a default config,' + - `or call webpack.setConfig({ configPath: null }).`); + 'No webpack config has been provided. ' + + 'Run again using --initwebpack to create a default config, ' + + `or call webpack.setConfig({ configPath: null }) in your gulpfile.`); } } \ No newline at end of file diff --git a/test-web-library-build/gulpfile.js b/test-web-library-build/gulpfile.js index d2c3fc9b46e..2eafcc3479e 100644 --- a/test-web-library-build/gulpfile.js +++ b/test-web-library-build/gulpfile.js @@ -1,5 +1,8 @@ 'use strict'; -require('@microsoft/web-library-build') - .initialize(require('gulp')); +let build = require('@microsoft/web-library-build'); + +build.webpack.setConfig({ configPath: null }); +build.karma.setConfig({ configPath: null }); +build.initialize(require('gulp'));