From e0703791dda3a2c9fbcf2aa85a2b444b2bd1805b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 15 Aug 2019 05:20:26 +0000 Subject: [PATCH 0001/1070] build: update @angular/animations to version --- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 9e521b13a539..6d6077cb5d87 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#eedbc3cedf79d1dd6afd81b31efc187cbbdfb72a", - "@angular/common": "github:angular/common-builds#f4cbc0a73aa4f58f758a0eec89c37cba97a02322", - "@angular/compiler": "github:angular/compiler-builds#f1d6da7b8885a50924b5e56d8a74683ca22e9d34", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#20476002dcf9ca1ba40e410064309c9ceaeebcbf", - "@angular/core": "github:angular/core-builds#c31c862ce7f801c1cc01850425211e293260764d", - "@angular/forms": "github:angular/forms-builds#b546459a79c718cf1123c31d320d0701b1889788", - "@angular/language-service": "github:angular/language-service-builds#60e7d9ca398b5d07db12455182b7d3c1645845f6", - "@angular/platform-browser": "github:angular/platform-browser-builds#0506913a4d76e490ae0bd7b7b814d72f66db5794", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#2b06f16f6c73c750bed5161dee05f72ab1163c47", - "@angular/router": "github:angular/router-builds#a0e072cf5973c7a088bbc3f72af350f30f5453f8" + "@angular/animations": "github:angular/animations-builds#dc23c0698ccd26aa48670f1a015ce4e709c9fc93", + "@angular/common": "github:angular/common-builds#ec5e60f5d9348717a3eac19e87d2a1ee71219196", + "@angular/compiler": "github:angular/compiler-builds#1cf109145d632552632237e67231bf8a0511daa1", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#0c6726db74da4e1425da79b26e77486216ef9666", + "@angular/core": "github:angular/core-builds#ff105b526f347f94b48d59438313af01dadb8ed0", + "@angular/forms": "github:angular/forms-builds#6d000e1a5cd9be00cbdf5fc6ca2b3d407e85901b", + "@angular/language-service": "github:angular/language-service-builds#04aa90abe2465bdabb4aa0280bc8b7d799dd8fab", + "@angular/platform-browser": "github:angular/platform-browser-builds#3d420fec387959458033c6cdb3af8df5c1196e41", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#902ffd532abad986f2817ea3cda4100d5af1e448", + "@angular/router": "github:angular/router-builds#534e41132c1e97daea7a1c56016a39bd031c6b1d" } } \ No newline at end of file From d3c11ff4ee6ecf1770558de12fb2a821735d4105 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 15 Aug 2019 06:17:13 +0000 Subject: [PATCH 0002/1070] build: update bazel_toolchains to version 0.28.5 --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index aad718ded168..87ff692d7e2a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -108,9 +108,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "e71eadcfcbdb47b4b740eb48b32ca4226e36aabc425d035a18dd40c2dda808c1", - strip_prefix = "bazel-toolchains-0.28.4", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.28.4.tar.gz", + sha256 = "b72e7a911436b2900b05759a1fcd735070edbd4442f0a3506ef021fdcd6e15b3", + strip_prefix = "bazel-toolchains-0.28.5", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.28.5.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") From f7909b8d40692fed44f42166bdafbcbcd5d207cf Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 15 Aug 2019 05:20:43 +0000 Subject: [PATCH 0003/1070] build: update @bazel/buildifier to version ^0.28.0 --- WORKSPACE | 4 ++-- package.json | 8 +++---- yarn.lock | 68 ++++++++++++++++++++++++++-------------------------- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 87ff692d7e2a..5805883af56c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") http_archive( name = "build_bazel_rules_nodejs", - sha256 = "6625259f9f77ef90d795d20df1d0385d9b3ce63b6619325f702b6358abb4ab33", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.35.0/rules_nodejs-0.35.0.tar.gz"], + sha256 = "9abd649b74317c9c135f4810636aaa838d5bea4913bfa93a85c2f52a919fdaf3", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.36.0/rules_nodejs-0.36.0.tar.gz"], ) # We use protocol buffers for the Build Event Protocol diff --git a/package.json b/package.json index 9a75b7ca2ebd..85a98fb15578 100644 --- a/package.json +++ b/package.json @@ -83,10 +83,10 @@ "@angular/compiler": "~8.2.0-rc.0", "@angular/compiler-cli": "~8.2.0-rc.0", "@bazel/bazel": "0.28.1", - "@bazel/buildifier": "^0.26.0", - "@bazel/jasmine": "0.35.0", - "@bazel/karma": "0.35.0", - "@bazel/typescript": "0.35.0", + "@bazel/buildifier": "^0.28.0", + "@bazel/jasmine": "0.36.0", + "@bazel/karma": "0.36.0", + "@bazel/typescript": "0.36.0", "@types/browserslist": "^4.4.0", "@types/caniuse-lite": "^1.0.0", "@types/clean-css": "^4.2.1", diff --git a/yarn.lock b/yarn.lock index 2c481c390108..cfcec028424b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -798,48 +798,48 @@ "@bazel/bazel-linux_x64" "0.28.1" "@bazel/bazel-win32_x64" "0.28.1" -"@bazel/buildifier-darwin_x64@0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-darwin_x64/-/buildifier-darwin_x64-0.26.0.tgz#0e4f5066750f7984689857e332f93368e0d782dd" - integrity sha512-yvlHuaP2FIMJ4Z4Ucs/R1wgwkDjhDkwvGD1eyhy9Qblqu7Ypgxtv2wz8dygrxDJVxhk3Kiwzlrp3otq6OYjv5A== - -"@bazel/buildifier-linux_x64@0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-linux_x64/-/buildifier-linux_x64-0.26.0.tgz#05020641f17441145056821ec33a2c667e253a3f" - integrity sha512-4+ZGEVMQdJr39My2eH6GmQrBIQfuw/DWO3Vwpy5vS1p61EvV0a5+jaukRelA3p//FD0j2cAKaBvwZdsijtDsZw== - -"@bazel/buildifier-win32_x64@0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-win32_x64/-/buildifier-win32_x64-0.26.0.tgz#51d983d36fd41f59063347e027487a447e4ea83e" - integrity sha512-S3QvjopF6cQ0rMv8zxi/SWfRBtA+oBGiTPcfpn1wJZa8Q21PdOcjH9ZgPJKpIV53x6sJ8XBVs7HSW44dPrwxQA== - -"@bazel/buildifier@^0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.26.0.tgz#65af3851f9ebe8b9ac651185d051b1a155012dbb" - integrity sha512-PVzkCOYhjlgcRCXUO31dy/GmtjDWzeTyVmPCFc4pxTFBvlrG7qkVlUW3DCIbBI5neTes0pY8mju837UBdK0OFQ== +"@bazel/buildifier-darwin_x64@0.28.0": + version "0.28.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-darwin_x64/-/buildifier-darwin_x64-0.28.0.tgz#bc8c4312596d4cf321062ae4e3f2115be453fef2" + integrity sha512-bvWz4W3FzWFqUr65Z/IrrhUuzHzvFnYB3QpPXUlUOI1sx43Ge3pMlndEwhMBOPM2SoRi5Z5rxG0X9NuvuXWw8w== + +"@bazel/buildifier-linux_x64@0.28.0": + version "0.28.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-linux_x64/-/buildifier-linux_x64-0.28.0.tgz#d09dedcfcd1677ddec8fe17fa7e39612dab86b41" + integrity sha512-KVXUcT2yZnKcRf4L9qzlYtEHw9SdO4/O6/cyyyybYPzpS3CJ2yIFm6VabXBTXsUp3LXfWc3EE62f8ieHoRJJnw== + +"@bazel/buildifier-win32_x64@0.28.0": + version "0.28.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-win32_x64/-/buildifier-win32_x64-0.28.0.tgz#1d2c239753a389f48669a194bf16477c1f15befd" + integrity sha512-6E9QZPVzMolcQQKDi5tRJjAFylgzBWbV01/3RiFZb1x4ITZJ74h/FuTRhdYAUPA3n59ge2F3sPtf9Q97RxJU7g== + +"@bazel/buildifier@^0.28.0": + version "0.28.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.28.0.tgz#cce8a5b67520f27b611c149bf334b5f86e5e5aa7" + integrity sha512-g9F7rEQayXU4SHgbOYhDLk8AzDMhqFNnZVb/xVDeCkbg20MbCGIZDj9pN8NBnowB7OJF4VsvnSV0FB4BVGfpxQ== optionalDependencies: - "@bazel/buildifier-darwin_x64" "0.26.0" - "@bazel/buildifier-linux_x64" "0.26.0" - "@bazel/buildifier-win32_x64" "0.26.0" + "@bazel/buildifier-darwin_x64" "0.28.0" + "@bazel/buildifier-linux_x64" "0.28.0" + "@bazel/buildifier-win32_x64" "0.28.0" "@bazel/hide-bazel-files@latest": version "0.35.0" resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.35.0.tgz#66ff148c1076534204d755024557609492718b7f" integrity sha512-+96mfEfoIpo2LNyN0929IwKpn50AXO04PZfonscvu3yV+3DVG1JLyq6W63zl/yGP1DAdgCPlRg5scNhkOzNpJw== -"@bazel/jasmine@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.35.0.tgz#1f55145b01761579f8a9f0b525762912ea832d42" - integrity sha512-TBCxjg0CW/C5+GLjyvP1CLPbw66W9HqVMrl0vS/eUyD9WeITID1wzkrjdcSm+FMjftnV/2634Yzj+Wl3nWocMg== +"@bazel/jasmine@0.36.0": + version "0.36.0" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.36.0.tgz#26d5b455cdcf09b0000a5a7d50d672ef3a386388" + integrity sha512-1UEcHOtn+tqaibNJosGsNrDWvIc5KCrH3OlfYZ8g2Eg8wJ9LPLoKw2BPNz3QIqN2TNUSsjLwVE7HZU/PV3ktNQ== dependencies: jasmine "~3.4.0" jasmine-core "~3.4.0" v8-coverage "1.0.9" -"@bazel/karma@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.35.0.tgz#f8edaac3c58db975cbbf444b7845abcd02b323a7" - integrity sha512-OKRyZFnbLTSmVMxBttsDEXKLlqKsj3cHn7gSyVQEP4wgC0D8nKZF8bUlu5awwh3UERE5EiLXZqIUqeO1rxlbGg== +"@bazel/karma@0.36.0": + version "0.36.0" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.36.0.tgz#276956d5db855aac02bae5848ff5de5cd8cd04a2" + integrity sha512-O6cXMOahJc8BB5MawEpa88mrRWnWNpsZsOI+nEZE9SI8YYx/vy2meG720wn1dzmkIcALznA1PRA0/kr8Ww50XA== dependencies: jasmine-core "2.8.0" karma "^4.0.0" @@ -853,10 +853,10 @@ semver "5.6.0" tmp "0.0.33" -"@bazel/typescript@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.35.0.tgz#ffc69b7db0c1c7acd9dce1ecbd4381d6af2773a8" - integrity sha512-HklbkwL+eSLHD1Q+rQgoVMlwPpP+zdMDozqhCsFOUbR2BCU0HedASzaJ5y7wdpnVeCUXwJO5vO7JqqzfvdsBLw== +"@bazel/typescript@0.36.0": + version "0.36.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.36.0.tgz#e080255c4219a5e045fb6ae6aacce966c34e4628" + integrity sha512-/Kb/Uxi4nuJrbSAJTre0aE0D9BwIgEpsuwMJ/ThA25rlJ6Xl3UG4EYbgsrf66PZvznKOVdu6Jc8bVvhG3ldSPw== dependencies: protobufjs "6.8.8" semver "5.6.0" From 0824e8beee0e61c5767c304326425a32b1191703 Mon Sep 17 00:00:00 2001 From: Simon Jespersen Date: Wed, 14 Aug 2019 09:42:27 +0200 Subject: [PATCH 0004/1070] refactor(@angular-devkit/schematics): remove optimize from host-tree Remove unused optimize method marked for removal in version 7.0 --- etc/api/angular_devkit/schematics/src/_golden-api.d.ts | 1 - packages/angular_devkit/schematics/src/tree/host-tree.ts | 6 ------ 2 files changed, 7 deletions(-) diff --git a/etc/api/angular_devkit/schematics/src/_golden-api.d.ts b/etc/api/angular_devkit/schematics/src/_golden-api.d.ts index 2c86d1d05ca4..5fac0daf1a7b 100644 --- a/etc/api/angular_devkit/schematics/src/_golden-api.d.ts +++ b/etc/api/angular_devkit/schematics/src/_golden-api.d.ts @@ -316,7 +316,6 @@ export declare class HostTree implements Tree { get(path: string): FileEntry | null; getDir(path: string): DirEntry; merge(other: Tree, strategy?: MergeStrategy): void; - optimize(): this; overwrite(path: string, content: Buffer | string): void; read(path: string): Buffer | null; rename(from: string, to: string): void; diff --git a/packages/angular_devkit/schematics/src/tree/host-tree.ts b/packages/angular_devkit/schematics/src/tree/host-tree.ts index 78ebbe550dfd..fbd626c6a8d2 100644 --- a/packages/angular_devkit/schematics/src/tree/host-tree.ts +++ b/packages/angular_devkit/schematics/src/tree/host-tree.ts @@ -148,12 +148,6 @@ export class HostTree implements Tree { return this._record.willRename(path); } - // This can be used by old Schematics library with new Trees in some corner cases. - // TODO: remove this for 7.0 - optimize() { - return this; - } - branch(): Tree { const branchedTree = new HostTree(this._backend); branchedTree._record = this._record.clone(); From 2ed70bb5d20e667ea930558188803b1ccd79942d Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 15 Aug 2019 19:05:44 +0200 Subject: [PATCH 0005/1070] build: update angular packages to version 9 --- package.json | 6 +- .../angular_devkit/build_angular/package.json | 26 ++-- .../build_ng_packagr/package.json | 6 +- packages/ngtools/webpack/package.json | 4 +- .../angular/utility/latest-versions.ts | 2 +- .../e2e/assets/webpack/test-app/package.json | 16 +-- yarn.lock | 129 +++++++++--------- 7 files changed, 97 insertions(+), 92 deletions(-) diff --git a/package.json b/package.json index 85a98fb15578..cf027a28b3db 100644 --- a/package.json +++ b/package.json @@ -80,10 +80,10 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "~8.2.0-rc.0", - "@angular/compiler-cli": "~8.2.0-rc.0", + "@angular/compiler": "~9.0.0-next.2", + "@angular/compiler-cli": "~9.0.0-next.2", "@bazel/bazel": "0.28.1", - "@bazel/buildifier": "^0.28.0", + "@bazel/buildifier": "0.28.0", "@bazel/jasmine": "0.36.0", "@bazel/karma": "0.36.0", "@bazel/typescript": "0.36.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 1dfef579d82b..205d2c9240ee 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -62,19 +62,19 @@ "worker-plugin": "3.1.0" }, "devDependencies": { - "@angular/animations": "~8.2.0-rc.0", - "@angular/cdk": "^8.0.0", - "@angular/common": "~8.2.0-rc.0", - "@angular/compiler": "~8.2.0-rc.0", - "@angular/compiler-cli": "~8.2.0-rc.0", - "@angular/core": "~8.2.0-rc.0", - "@angular/forms": "~8.2.0-rc.0", - "@angular/material": "^8.0.0", - "@angular/platform-browser": "~8.2.0-rc.0", - "@angular/platform-browser-dynamic": "~8.2.0-rc.0", - "@angular/platform-server": "~8.2.0-rc.0", - "@angular/router": "~8.2.0-rc.0", - "@angular/service-worker": "~8.2.0-rc.0", + "@angular/animations": "~9.0.0-next.2", + "@angular/cdk": "~8.0.0", + "@angular/common": "~9.0.0-next.2", + "@angular/compiler": "~9.0.0-next.2", + "@angular/compiler-cli": "~9.0.0-next.2", + "@angular/core": "~9.0.0-next.2", + "@angular/forms": "~9.0.0-next.2", + "@angular/material": "~8.0.0", + "@angular/platform-browser": "~9.0.0-next.2", + "@angular/platform-browser-dynamic": "~9.0.0-next.2", + "@angular/platform-server": "~9.0.0-next.2", + "@angular/router": "~9.0.0-next.2", + "@angular/service-worker": "~9.0.0-next.2", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index ae57c93ede5c..182c38d8c273 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,10 +14,10 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "~8.2.0-rc.0", - "@angular/compiler-cli": "~8.2.0-rc.0", + "@angular/compiler": "~9.0.0-next.2", + "@angular/compiler-cli": "~9.0.0-next.2", "@angular-devkit/core": "0.0.0", - "ng-packagr": "^5.4.0", + "ng-packagr": "~5.5.0", "tslib": "^1.10.0" } } diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 55cf2a34f8f9..1148682b6702 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "~8.2.0-rc.0", - "@angular/compiler-cli": "~8.2.0-rc.0", + "@angular/compiler": "~9.0.0-next.2", + "@angular/compiler-cli": "~9.0.0-next.2", "typescript": "3.5.3", "webpack": "4.39.2" } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 43348c54306f..60ad79573f1d 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,7 +8,7 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~8.2.0', + Angular: '~9.0.0-next.2', RxJs: '~6.4.0', ZoneJs: '~0.9.1', TypeScript: '~3.5.3', diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json index ad8926ad672e..a6f56366cb4e 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "^8.2.0-rc.0", - "@angular/compiler": "^8.2.0-rc.0", - "@angular/compiler-cli": "^8.2.0-rc.0", - "@angular/core": "^8.2.0-rc.0", - "@angular/platform-browser": "^8.2.0-rc.0", - "@angular/platform-browser-dynamic": "^8.2.0-rc.0", - "@angular/platform-server": "^8.2.0-rc.0", - "@angular/router": "^8.2.0-rc.0", + "@angular/common": "~9.0.0-next.2", + "@angular/compiler": "~9.0.0-next.2", + "@angular/compiler-cli": "~9.0.0-next.2", + "@angular/core": "~9.0.0-next.2", + "@angular/platform-browser": "~9.0.0-next.2", + "@angular/platform-browser-dynamic": "~9.0.0-next.2", + "@angular/platform-server": "~9.0.0-next.2", + "@angular/router": "~9.0.0-next.2", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.0", diff --git a/yarn.lock b/yarn.lock index cfcec028424b..0b8b5cec7b4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,33 +2,33 @@ # yarn lockfile v1 -"@angular/animations@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-8.2.0-rc.0.tgz#290466ddd7c93ba875cb13a053054334281f71d9" - integrity sha512-Uq6xORBq117KeD9iVXYu2Vkz55+zm3NngAkxyzlhZkbYRz8ByQxFAtfMhWVVcHlqW5GnLhyqX/lN5Nav0jdcIw== +"@angular/animations@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.2.tgz#8c54d9e48948d798b6cf69428b614613ad68d9e0" + integrity sha512-Fx0jqxbxC6/wKowPsKG0vUKaf8cu2/8eKx5/UVoRvdC2S0at3Ud49SKvJD0XcSL1tqVFbYOAvURmkNZSFQlLGA== dependencies: tslib "^1.9.0" -"@angular/cdk@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.0.0.tgz#34ca95e71d71780b29b5ba07318c88c4577bdc25" - integrity sha512-2vsRWEHNARe0iRmqgzvM67gwfRy+aKvdef4Qu9L+ndSsTrrZT3tSgG8SMn1v9SfBHnx5G8mo4d1AMquXG69AuQ== +"@angular/cdk@~8.0.0": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.0.2.tgz#599b7fd06caed8cbea41f8f7874ddcea5dfc99ce" + integrity sha512-Tv9M0vuTp7Ogk7mRiEpzBG9x5289FXe+WH0VKqN4zTzF/taTgGEuJBLDcFrwQMW0mFpGP7acVOiopgH+nClytg== dependencies: tslib "^1.7.1" optionalDependencies: parse5 "^5.0.0" -"@angular/common@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-8.2.0-rc.0.tgz#58b4fdc85d7db9667d9f9d28e8cb6356923c5e92" - integrity sha512-aOTXW2KRGhX/y5v6NUFFxxoTi1HlMwGv9XaxH1I9qj+YnlHO+oVqyHB4MS+gvb2eLqbyxKTKzUYWsMDblX8nVA== +"@angular/common@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.2.tgz#aac53c8725f768eb0afbb5c6912050606324a5c7" + integrity sha512-kBTuqoJo2L318+sVQJWmL6gJDSxdkqpdXWb4QPa5P7tk1/ptPXDD4w5qBA3yXfZfD1bUFP37URVhVA/h+CyNDQ== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-8.2.0-rc.0.tgz#a5b290d5c92d0f9a6de5d17c63ea7740169845e3" - integrity sha512-w4KSp2cSYpg2qcONZeVaeCGB0JkiXdXVIPO9PdkCp8tU7KYVOAt/ZbN91zBKunSD4EbzlaF7pr290J094CH04w== +"@angular/compiler-cli@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.2.tgz#c8907665db7e49a6ddcc07c52d20bf487d19e62e" + integrity sha512-bsDWWBrNV+BtexyQj/Wglw56+b8TBAm+AwUwdXFi/kFvneq7mg9zdmVW2o5azRS5ixdXlzAG9K3qemD9EGHk7w== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -41,68 +41,68 @@ tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-8.2.0-rc.0.tgz#3c288d33717e3a687333a5e7de533f871a5e5fca" - integrity sha512-fS2/5MTUtYy38kCwToltqBku6aq0hq90jn0p37TSRoYsNm7Ae2NU3nkM36A5G1wzetBn6R92updswbR62OVD1w== +"@angular/compiler@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.2.tgz#dd9e5b4c8bd355da6d78dec057655e71571dd947" + integrity sha512-D4yrilNn3DTRn9O/Z6Y/zkAEwZjTDwJvDETnXjK3FDrSOATavUq3GHHsVJcC43QvPSVWoX7biuRpI225oNB1EQ== dependencies: tslib "^1.9.0" -"@angular/core@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-8.2.0-rc.0.tgz#97a028fb2871abed3aa5fd04b5c4237818a5adb8" - integrity sha512-G7vdTjNCxhpLlOaAcQ/xWt9kFLs1PkNkMzyRsiGUe/k5Mlr+xcmUDb1e5N3bLHJmIDFIUO1fXp/KHp1dysqB7g== +"@angular/core@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.2.tgz#25d1d04bc9c8d35a6ba5ec7581006671370e40ad" + integrity sha512-ftoNegNFbCQm7zf9OOVgV/nUZfx8OQFWu/zwsm/hyonI7BicfZs/B1h2Tn9iemWzkcJzlnH4Cnh+2NV1jcTZuw== dependencies: tslib "^1.9.0" -"@angular/forms@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-8.2.0-rc.0.tgz#999970f6e5d37bafd91dffaba7057fc1f801f4fe" - integrity sha512-HjUjdqAu8XfI29+CXC8qDGYsGkFFonLMRwuDhWn2KpF7MXvFhERlxsFUNYNIYd29+HcoJcg/PRHTzqqJ2TPJLg== +"@angular/forms@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.2.tgz#e6bfcf638eecedba3dca7d072982bcf37eb5e408" + integrity sha512-y8YXezn+VY4X2/h1eV4F2c3mCZ5eheyUtq3ZBEAsnrOH2czh3RVE2RuMr3gpXoGHSqq74iGHDCt0qi4ka4R8tQ== dependencies: tslib "^1.9.0" -"@angular/material@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.0.0.tgz#21dd15c318d1e29eb4d1a2dd888ddb027897eb49" - integrity sha512-c7O7GhZd46xF2WB6T/YPam5lJkTgQLdIS53IqwZIFhL427+SEfPvejVzRnVfZCI3NdrKiWt/5VsvtQZwWzlGvw== +"@angular/material@~8.0.0": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.0.2.tgz#c648e0f52d94b37e3dddfd879223202aa0d11587" + integrity sha512-Q6YxX7zLsfI1kv0dSJSENSyCuwq7GdHjHzOGeogGfjQRvX3N/ty/z8YfwhQFzZ3XtIysbhuGcpAUWazgWeIKgw== dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.2.0-rc.0.tgz#4d231e1091502792ef1bd02a49f94a54f12503d0" - integrity sha512-4LOE9pbcEM+dsXPBqIcHDglsizUYU4n23N+J6jsud3GM7VYx7KKd70e1KF+TTNEnNqE1gv7aCz5vZ3J3cYlWTQ== +"@angular/platform-browser-dynamic@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.2.tgz#1e255efd2fb24d4a17b5282fad06405a346761cf" + integrity sha512-WYooQcqDjqqVaMfy2jMUe8ErbWpOe0whpLboyXfuM7Fk7bQwVc3oPE1rPIiujhdbAresHzKnU0YvkC53I2xrkA== dependencies: tslib "^1.9.0" -"@angular/platform-browser@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-8.2.0-rc.0.tgz#69ae708dfc74fcc03e8cd1cdb296e1a828b433b9" - integrity sha512-Vk9Zdv6kHm3hwPvhc6FG0AnMxWOkNXfdAoXTLDY4vbo367ym1xxcDUmUf+mou/HODpnGdoHKSTLj5SEua2SSMw== +"@angular/platform-browser@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.2.tgz#4687ea54dc7a65590103151cc3f68dd6bb4429bd" + integrity sha512-TSfKc70Uw7Ah1NSakJaPct88Gn6ovSlugVEBSBlr/IiY1Cu+/jeaNiSeDe1uBbk6c8W5KZVggRx0Bz46wEKPZA== dependencies: tslib "^1.9.0" -"@angular/platform-server@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-8.2.0-rc.0.tgz#7d54506a01f25a927f68716027f231947f293350" - integrity sha512-acMb95y5vKp5b/CbqDLbb5ZrS99nl4WedAv1FDfQH8kEWR/RtHfxB+Q3w3LwNBDC+Pivy3Ce+E8dZSpVTt4bUA== +"@angular/platform-server@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.2.tgz#b4c2110847ae0a4413be58dd5b942cac403dc34b" + integrity sha512-cSlC5A4AJvPHUyfE2m1DJV8LRmQKG+U+RFlvsoOmF1B44yrgy98plUFY0P/fYRaace7rC/I+9xiAo1SxaQ6Xjw== dependencies: domino "^2.1.2" tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-8.2.0-rc.0.tgz#8a5eba78917d45485fc5001592e690d9ed4e4ad8" - integrity sha512-hpidAfvDpIaWBccogRNck1cFO/STgN/KinF/VkMWeYMlt9IFwefEOWwY/d1V71L3wjTwV+NMhuUTguE8OptT3w== +"@angular/router@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.2.tgz#7888df02845ac2ae71316e560f9f1db2d1ef9bff" + integrity sha512-NNYbcKi5ViiISXkNGTTdvOYsgvi6dI9P+WizBz+uItYcuqwBKog54I/4Byx8CMgGTyZALIzPDbDLXv118deA+Q== dependencies: tslib "^1.9.0" -"@angular/service-worker@~8.2.0-rc.0": - version "8.2.0-rc.0" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-8.2.0-rc.0.tgz#9bfc4da356c177264448185b0a8d0be80853154f" - integrity sha512-9RKJyjruUGY+caJ532J58umsR10R/eW2gU60cndDBPanopoqLsXMstss+bUZOgrtMnO7HaV72aypVZS6sBrbQA== +"@angular/service-worker@~9.0.0-next.2": + version "9.0.0-next.2" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.2.tgz#523b7a2736f758344dbd49c4567a46ba02489b71" + integrity sha512-l2xy8AAFEBFo6AVD5ouN714CyeQjhCFM4Q+o373+NVf1xDIf8hrgN3TLdHadfd3Z2BDGADjDD1MjzeE7wxn/9A== dependencies: tslib "^1.9.0" @@ -813,7 +813,7 @@ resolved "https://registry.yarnpkg.com/@bazel/buildifier-win32_x64/-/buildifier-win32_x64-0.28.0.tgz#1d2c239753a389f48669a194bf16477c1f15befd" integrity sha512-6E9QZPVzMolcQQKDi5tRJjAFylgzBWbV01/3RiFZb1x4ITZJ74h/FuTRhdYAUPA3n59ge2F3sPtf9Q97RxJU7g== -"@bazel/buildifier@^0.28.0": +"@bazel/buildifier@0.28.0": version "0.28.0" resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.28.0.tgz#cce8a5b67520f27b611c149bf334b5f86e5e5aa7" integrity sha512-g9F7rEQayXU4SHgbOYhDLk8AzDMhqFNnZVb/xVDeCkbg20MbCGIZDj9pN8NBnowB7OJF4VsvnSV0FB4BVGfpxQ== @@ -823,9 +823,9 @@ "@bazel/buildifier-win32_x64" "0.28.0" "@bazel/hide-bazel-files@latest": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.35.0.tgz#66ff148c1076534204d755024557609492718b7f" - integrity sha512-+96mfEfoIpo2LNyN0929IwKpn50AXO04PZfonscvu3yV+3DVG1JLyq6W63zl/yGP1DAdgCPlRg5scNhkOzNpJw== + version "0.36.0" + resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.36.0.tgz#3fb7c7c5f579f46dd1efd1b3890f11351aa8e65c" + integrity sha512-RgJWR1rOgyU4smruUK3MFA06DKt3AFCcfi9L8u/h11EjOrfLJgnzBJIGDXvW2zzhgnEJ9RRafOUHKN6blDksGg== "@bazel/jasmine@0.36.0": version "0.36.0" @@ -3117,7 +3117,7 @@ commander@2.20.0, commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== -commander@^2.11.0, commander@^2.12.0: +commander@^2.11.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== @@ -3127,6 +3127,11 @@ commander@^2.12.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== +commander@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.0.tgz#0641ea00838c7a964627f04cddc336a2deddd60a" + integrity sha512-pl3QrGOBa9RZaslQiqnnKX2J068wcQw7j9AIaBQ9/JEp5RY6je4jKTImg0Bd+rpoONSe7GUFSgkxLeo17m3Pow== + commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" @@ -7840,10 +7845,10 @@ neo-async@^2.6.0, neo-async@^2.6.1: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -ng-packagr@^5.4.0: - version "5.4.3" - resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.4.3.tgz#69816c7f605d6c6af3ba72dbe96053095ff9d3f6" - integrity sha512-hNYtJsQ67xQzCeBCAk+zg/x342ETKgKztoV+P3UL4Ri0Yt4CyJJpCbNTqUsy4HmKw4BjKyJMMtB5V0xmSjN5pw== +ng-packagr@~5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.5.0.tgz#e13f6f5c109d11453f2e17f7d6fe116564e8bb65" + integrity sha512-XfOHntvJHM5snNcGtxngeTvV2+8/mBJNJMWEsPrNL9yNXU9bDEh7DFf12GZa+HBQ5TUeX4SnX9DCRyXLdpJMlw== dependencies: ajv "^6.10.2" autoprefixer "^9.6.0" @@ -7851,7 +7856,7 @@ ng-packagr@^5.4.0: chalk "^2.3.1" chokidar "^3.0.0" clean-css "^4.1.11" - commander "^2.12.0" + commander "^3.0.0" fs-extra "^8.0.0" glob "^7.1.2" injection-js "^2.2.1" From beb7070ac868c4484dbc543ca3dc8da51a29ff18 Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 13 Aug 2019 07:55:53 +0200 Subject: [PATCH 0006/1070] feat(@schematics/angular): introduce Ivy libraries for development Since `NGCC` is non incremental and in library projects we have the original TS sources we don't need to build a library using the `VE` and transform it using `NGCC`. Instead we can build the library using `NGTSC` (Ivy) directly as this enables faster incremental compilations and a better development experience. Libraries now have a `production` configuration, which enabled `VE` compilations. As it is not recommended to publish NGTSC (Ivy) built libraries to NPM repositories, since Ivy libraries are not backwards compatible with the legacy View Engine. --- .../angular/library/files/tsconfig.lib.json.template | 2 -- .../library/files/tsconfig.lib.prod.json.template | 6 ++++++ packages/schematics/angular/library/index.ts | 10 +++++++--- packages/schematics/angular/library/index_spec.ts | 12 +++++++++++- 4 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 packages/schematics/angular/library/files/tsconfig.lib.prod.json.template diff --git a/packages/schematics/angular/library/files/tsconfig.lib.json.template b/packages/schematics/angular/library/files/tsconfig.lib.json.template index e40a3d9124bf..a7e7b5665f58 100644 --- a/packages/schematics/angular/library/files/tsconfig.lib.json.template +++ b/packages/schematics/angular/library/files/tsconfig.lib.json.template @@ -15,8 +15,6 @@ "annotateForClosureCompiler": true, "skipTemplateCodegen": true, "strictMetadataEmit": true, - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true, "enableResourceInlining": true }, "exclude": [ diff --git a/packages/schematics/angular/library/files/tsconfig.lib.prod.json.template b/packages/schematics/angular/library/files/tsconfig.lib.prod.json.template new file mode 100644 index 000000000000..cbae79422480 --- /dev/null +++ b/packages/schematics/angular/library/files/tsconfig.lib.prod.json.template @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.lib.json", + "angularCompilerOptions": { + "enableIvy": false + } +} diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 9082711dc62f..01ce622698c9 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -124,7 +124,7 @@ function addDependenciesToPackageJson() { }; } -function addAppToWorkspaceFile( +function addLibToWorkspaceFile( options: LibraryOptions, projectRoot: string, projectName: string, @@ -147,6 +147,11 @@ function addAppToWorkspaceFile( tsConfig: `${projectRoot}/tsconfig.lib.json`, project: `${projectRoot}/ng-package.json`, }, + configurations: { + production: { + tsConfig: `${projectRoot}/tsconfig.lib.prod.json`, + }, + }, }, test: { builder: Builders.Karma, @@ -199,7 +204,6 @@ export default function (options: LibraryOptions): Rule { const folderName = `${scopeFolder}${strings.dasherize(options.name)}`; const projectRoot = join(normalize(newProjectRoot), folderName); const distRoot = `dist/${folderName}`; - const sourceDir = `${projectRoot}/src/lib`; const templateSource = apply(url('./files'), [ @@ -219,7 +223,7 @@ export default function (options: LibraryOptions): Rule { return chain([ mergeWith(templateSource), - addAppToWorkspaceFile(options, projectRoot, projectName), + addLibToWorkspaceFile(options, projectRoot, projectName), options.skipPackageJson ? noop() : addDependenciesToPackageJson(), options.skipTsConfig ? noop() : updateTsConfig(packageName, distRoot), schematic('module', { diff --git a/packages/schematics/angular/library/index_spec.ts b/packages/schematics/angular/library/index_spec.ts index b4b9bd81f87c..f22ac7ef275f 100644 --- a/packages/schematics/angular/library/index_spec.ts +++ b/packages/schematics/angular/library/index_spec.ts @@ -49,6 +49,8 @@ describe('Library Schematic', () => { '/projects/foo/package.json', '/projects/foo/README.md', '/projects/foo/tslint.json', + '/projects/foo/tsconfig.lib.json', + '/projects/foo/tsconfig.lib.prod.json', '/projects/foo/src/test.ts', '/projects/foo/src/my-index.ts', '/projects/foo/src/lib/foo.module.ts', @@ -132,7 +134,7 @@ describe('Library Schematic', () => { }); it('should handle a pascalCasedName', async () => { - const options = {...defaultOptions, name: 'pascalCasedName'}; + const options = { ...defaultOptions, name: 'pascalCasedName' }; const tree = await schematicRunner.runSchematicAsync('library', options, workspaceTree).toPromise(); const config = getJsonFileContent(tree, '/angular.json'); const project = config.projects.pascalCasedName; @@ -317,4 +319,12 @@ describe('Library Schematic', () => { const specTsConfig = JSON.parse(tree.readContent('/foo/tsconfig.spec.json')); expect(specTsConfig.extends).toEqual('../tsconfig.json'); }); + + it(`should add 'production' configuration`, async () => { + const tree = await schematicRunner.runSchematicAsync('library', defaultOptions, workspaceTree) + .toPromise(); + + const workspace = JSON.parse(tree.readContent('/angular.json')); + expect(workspace.projects.foo.architect.build.configurations.production).toBeDefined(); + }); }); From e8e6f8a6df44c17d36fa1ccfa8032e19d037dae3 Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 13 Aug 2019 08:04:58 +0200 Subject: [PATCH 0007/1070] test: update Ivy tests as per new workspace settings --- .../hello-world-app-ivy/src/tsconfig.app.json | 5 +---- .../src/tsconfig.server.json | 3 +-- .../hello-world-app-ivy/src/tsconfig.spec.json | 5 +---- .../hello-world-app-ivy/tsconfig.json | 3 +++ .../build_angular/hello-world-app/tsconfig.json | 3 +++ .../build_ng_packagr/ng-packaged/tsconfig.json | 3 +++ .../legacy-cli/e2e/setup/500-create-project.ts | 17 ++++++++++++----- .../e2e/tests/build/lazy-load-syntax.ts | 3 --- .../generate/library/library-consumption.ts | 14 ++++++++++++-- tests/legacy-cli/e2e/tests/ivy/ivy-opt-out.ts | 9 +++++---- .../e2e/tests/ivy/ngcc-es2015-only.ts | 2 +- tests/legacy-cli/e2e/utils/project.ts | 6 +----- 12 files changed, 43 insertions(+), 30 deletions(-) diff --git a/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.app.json b/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.app.json index 572dee5c7f13..f761e8b2c4fc 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.app.json +++ b/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.app.json @@ -10,8 +10,5 @@ ], "include": [ "**/*.d.ts" - ], - "angularCompilerOptions": { - "enableIvy": true - } + ] } diff --git a/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.server.json b/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.server.json index 8d960ce360c1..eb321efe8f51 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.server.json +++ b/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.server.json @@ -10,7 +10,6 @@ "main.server.ts" ], "angularCompilerOptions": { - "entryModule": "app/app.server.module#AppServerModule", - "enableIvy": true + "entryModule": "app/app.server.module#AppServerModule" } } diff --git a/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.spec.json b/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.spec.json index a55f430af829..de7733630eb2 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.spec.json +++ b/tests/angular_devkit/build_angular/hello-world-app-ivy/src/tsconfig.spec.json @@ -14,8 +14,5 @@ "include": [ "**/*.spec.ts", "**/*.d.ts" - ], - "angularCompilerOptions": { - "enableIvy": true - } + ] } diff --git a/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json b/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json index 944d93dc8215..02f96816e085 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json +++ b/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json @@ -17,5 +17,8 @@ "es2017", "dom" ] + }, + "angularCompilerOptions": { + "enableIvy": true } } diff --git a/tests/angular_devkit/build_angular/hello-world-app/tsconfig.json b/tests/angular_devkit/build_angular/hello-world-app/tsconfig.json index 944d93dc8215..e47a98ffb98a 100644 --- a/tests/angular_devkit/build_angular/hello-world-app/tsconfig.json +++ b/tests/angular_devkit/build_angular/hello-world-app/tsconfig.json @@ -17,5 +17,8 @@ "es2017", "dom" ] + }, + "angularCompilerOptions": { + "enableIvy": false } } diff --git a/tests/angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json b/tests/angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json index ef44e2862b04..a85aeb5a0fa8 100644 --- a/tests/angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json +++ b/tests/angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json @@ -16,5 +16,8 @@ "es2017", "dom" ] + }, + "angularCompilerOptions": { + "enableIvy": false } } diff --git a/tests/legacy-cli/e2e/setup/500-create-project.ts b/tests/legacy-cli/e2e/setup/500-create-project.ts index d8d25d906b7e..76f5e8bd1649 100644 --- a/tests/legacy-cli/e2e/setup/500-create-project.ts +++ b/tests/legacy-cli/e2e/setup/500-create-project.ts @@ -3,7 +3,7 @@ import { getGlobalVariable } from '../utils/env'; import { expectFileToExist } from '../utils/fs'; import { gitClean } from '../utils/git'; import { ng } from '../utils/process'; -import { prepareProjectForE2e } from '../utils/project'; +import { prepareProjectForE2e, updateJsonFile } from '../utils/project'; export default async function() { const argv = getGlobalVariable('argv'); @@ -18,13 +18,20 @@ export default async function() { } else { const extraArgs = []; - if (argv['ivy']) { - extraArgs.push('--enable-ivy'); - } - await ng('new', 'test-project', '--skip-install', ...extraArgs); await expectFileToExist(join(process.cwd(), 'test-project')); process.chdir('./test-project'); + + if (!argv['ivy']) { + await updateJsonFile('tsconfig.json', config => { + config.angularCompilerOptions.enableIvy = false; + }); + + // In VE non prod builds are non AOT by default + await updateJsonFile('angular.json', config => { + config.projects['test-project'].architect.build.options.aot = false; + }); + } } await prepareProjectForE2e('test-project'); diff --git a/tests/legacy-cli/e2e/tests/build/lazy-load-syntax.ts b/tests/legacy-cli/e2e/tests/build/lazy-load-syntax.ts index ffed461c4f7f..e04587e4c67c 100644 --- a/tests/legacy-cli/e2e/tests/build/lazy-load-syntax.ts +++ b/tests/legacy-cli/e2e/tests/build/lazy-load-syntax.ts @@ -9,11 +9,8 @@ import { getGlobalVariable } from '../../utils/env'; import { appendToFile, prependToFile, readFile, replaceInFile, writeFile } from '../../utils/fs'; import { ng } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; -import { expectToFail } from '../../utils/utils'; export default async function () { - const argv = getGlobalVariable('argv'); - const ivyProject = argv['ivy']; const projectName = 'test-project'; const appRoutingModulePath = 'src/app/app-routing.module.ts'; diff --git a/tests/legacy-cli/e2e/tests/generate/library/library-consumption.ts b/tests/legacy-cli/e2e/tests/generate/library/library-consumption.ts index 8486a1549f27..ff222d77cda4 100644 --- a/tests/legacy-cli/e2e/tests/generate/library/library-consumption.ts +++ b/tests/legacy-cli/e2e/tests/generate/library/library-consumption.ts @@ -3,8 +3,6 @@ import { ng } from '../../../utils/process'; export default async function () { await ng('generate', 'library', 'my-lib'); - await ng('build', 'my-lib'); - await writeFile('./src/app/app.module.ts', ` import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; @@ -69,6 +67,18 @@ export default async function () { }); `); + await runLibraryTests(); + await runLibraryTests(true); +} + +async function runLibraryTests(prodMode = false): Promise { + const args = ['build', 'my-lib']; + if (prodMode) { + args.push('--prod'); + } + + await ng(...args); + // Check that the tests succeeds both with named project, unnammed (should test app), and prod. await ng('e2e'); await ng('e2e', 'test-project', '--devServerTarget=test-project:serve:production'); diff --git a/tests/legacy-cli/e2e/tests/ivy/ivy-opt-out.ts b/tests/legacy-cli/e2e/tests/ivy/ivy-opt-out.ts index bd8c5d3d01b1..f9736035d5b6 100644 --- a/tests/legacy-cli/e2e/tests/ivy/ivy-opt-out.ts +++ b/tests/legacy-cli/e2e/tests/ivy/ivy-opt-out.ts @@ -5,19 +5,20 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { replaceInFile } from '../../utils/fs'; import { request } from '../../utils/http'; import { killAllProcesses, ng } from '../../utils/process'; -import { createProject, ngServe } from '../../utils/project'; +import { createProject, ngServe, updateJsonFile } from '../../utils/project'; export default async function() { try { - await createProject('ivy-project-opt-out', '--enable-ivy'); + await createProject('ivy-project-opt-out'); // trigger an Ivy builds to process packages with NGCC await ng('e2e', '--prod'); // View Engine (NGC) compilation should work after running NGCC from Webpack - await replaceInFile('tsconfig.app.json', '"enableIvy": true', '"enableIvy": false'); + await updateJsonFile('tsconfig.json', config => { + config.angularCompilerOptions.enableIvy = false; + }); // verify that VE compilation works during runtime await ng('e2e', '--prod'); diff --git a/tests/legacy-cli/e2e/tests/ivy/ngcc-es2015-only.ts b/tests/legacy-cli/e2e/tests/ivy/ngcc-es2015-only.ts index 0a7b62dc175a..0f9ee1e03b03 100644 --- a/tests/legacy-cli/e2e/tests/ivy/ngcc-es2015-only.ts +++ b/tests/legacy-cli/e2e/tests/ivy/ngcc-es2015-only.ts @@ -4,7 +4,7 @@ import { createProject } from '../../utils/project'; export default async function() { // Create a new project to avoid polluting node modules for other tests - await createProject('ivy-project-ngcc', '--enable-ivy'); + await createProject('ivy-project-ngcc'); const { stderr, stdout } = await ng('build', '--prod'); diff --git a/tests/legacy-cli/e2e/utils/project.ts b/tests/legacy-cli/e2e/utils/project.ts index c25c368c3704..0d1720b765e9 100644 --- a/tests/legacy-cli/e2e/utils/project.ts +++ b/tests/legacy-cli/e2e/utils/project.ts @@ -33,16 +33,12 @@ export function ngServe(...args: string[]) { export async function createProject(name: string, ...args: string[]) { - const argv: string[] = getGlobalVariable('argv'); const extraArgs = []; - if (argv['ivy']) { - extraArgs.push('--enableIvy'); - } - process.chdir(getGlobalVariable('tmp-root')); await ng('new', name, '--skip-install', ...extraArgs, ...args); process.chdir(name); + await prepareProjectForE2e(name); } From ba8a6ea59983bb52a6f1e66d105c5a77517f062e Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 13 Aug 2019 08:55:21 +0200 Subject: [PATCH 0008/1070] feat(@schematics/angular): remove enableIvy option With this change we remove the enableIvy option as now we only support generating Ivy application. Users who want to create a VE applications should follow the opt-out guide --- docs/design/analytics.md | 1 - .../files/tsconfig.app.json.template | 12 +----- .../files/tsconfig.spec.json.template | 5 +-- .../schematics/angular/application/index.ts | 2 +- .../angular/application/index_spec.ts | 39 ------------------- .../angular/application/schema.json | 6 --- packages/schematics/angular/ng-new/index.ts | 1 - .../schematics/angular/ng-new/schema.json | 5 --- .../angular/web-worker/index_spec.ts | 25 +++++++++++- .../hello-world-app-ivy/tsconfig.json | 3 -- .../ng-packaged-ivy/tsconfig.json | 3 -- tests/legacy-cli/e2e/tests/ivy/ivy.ts | 2 +- 12 files changed, 28 insertions(+), 76 deletions(-) diff --git a/docs/design/analytics.md b/docs/design/analytics.md index 5ec9c56adf29..a51d6a2f625f 100644 --- a/docs/design/analytics.md +++ b/docs/design/analytics.md @@ -48,7 +48,6 @@ Note: There's a limit of 20 custom dimensions. | 5 | `Flag: --style` | `string` | | 6 | `--collection` | `string` | | 7 | `--buildEventLog` | `boolean` | -| 8 | `Flag: --enableIvy` | `boolean` | | 9 | `Flag: --inlineStyle` | `boolean` | | 10 | `Flag: --inlineTemplate` | `boolean` | | 11 | `Flag: --viewEncapsulation` | `string` | diff --git a/packages/schematics/angular/application/files/tsconfig.app.json.template b/packages/schematics/angular/application/files/tsconfig.app.json.template index 7f38e6593828..3b0c3645d228 100644 --- a/packages/schematics/angular/application/files/tsconfig.app.json.template +++ b/packages/schematics/angular/application/files/tsconfig.app.json.template @@ -7,18 +7,8 @@ "files": [ "src/main.ts", "src/polyfills.ts" - ],<% if (!enableIvy) { %> - "include": [ - "src/**/*.ts" ], - "exclude": [ - "src/test.ts", - "src/**/*.spec.ts" - ]<% } %><% if (enableIvy) { %> "include": [ "src/**/*.d.ts" - ], - "angularCompilerOptions": { - "enableIvy": true - }<% } %> + ] } diff --git a/packages/schematics/angular/application/files/tsconfig.spec.json.template b/packages/schematics/angular/application/files/tsconfig.spec.json.template index df547643751e..72aa864c8732 100644 --- a/packages/schematics/angular/application/files/tsconfig.spec.json.template +++ b/packages/schematics/angular/application/files/tsconfig.spec.json.template @@ -14,8 +14,5 @@ "include": [ "src/**/*.spec.ts", "src/**/*.d.ts" - ]<% if (enableIvy) { %>, - "angularCompilerOptions": { - "enableIvy": true - }<% } %> + ] } diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 0a29695765b2..1b70e7b468a3 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -194,7 +194,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul main: `${sourceRoot}/main.ts`, polyfills: `${sourceRoot}/polyfills.ts`, tsConfig: `${projectRoot}tsconfig.app.json`, - aot: !!options.enableIvy, + aot: true, assets: [ `${sourceRoot}/favicon.ico`, `${sourceRoot}/assets`, diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index 8558116335d3..039c00b84d73 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -213,45 +213,6 @@ describe('Application Schematic', () => { ])); }); - it('should set AOT option to false for VE projects', async () => { - const options = { ...defaultOptions }; - - const tree = await schematicRunner.runSchematicAsync('application', options, workspaceTree) - .toPromise(); - const workspace = JSON.parse(tree.readContent('/angular.json')); - expect(workspace.projects.foo.architect.build.options.aot).toEqual(false); - }); - - it('should set AOT option to true for Ivy projects', async () => { - const options = { ...defaultOptions, enableIvy: true }; - - const tree = await schematicRunner.runSchematicAsync('application', options, workspaceTree) - .toPromise(); - const workspace = JSON.parse(tree.readContent('/angular.json')); - expect(workspace.projects.foo.architect.build.options.aot).toEqual(true); - }); - - it('should set the right files, exclude, include in the tsconfig for VE projects', async () => { - const tree = await schematicRunner.runSchematicAsync('application', defaultOptions, workspaceTree) - .toPromise(); - const path = '/projects/foo/tsconfig.app.json'; - const tsConfig = JSON.parse(tree.readContent(path)); - expect(tsConfig.files).toEqual(['src/main.ts', 'src/polyfills.ts']); - expect(tsConfig.exclude).toEqual(['src/test.ts', 'src/**/*.spec.ts']); - expect(tsConfig.include).toEqual(['src/**/*.ts']); - }); - - it('should set the right files, exclude, include in the tsconfig for Ivy projects', async () => { - const options = { ...defaultOptions, enableIvy: true }; - const tree = await schematicRunner.runSchematicAsync('application', options, workspaceTree) - .toPromise(); - const path = '/projects/foo/tsconfig.app.json'; - const tsConfig = JSON.parse(tree.readContent(path)); - expect(tsConfig.files).toEqual(['src/main.ts', 'src/polyfills.ts']); - expect(tsConfig.exclude).toBeUndefined(); - expect(tsConfig.include).toEqual(['src/**/*.d.ts']); - }); - describe(`update package.json`, () => { it(`should add build-angular to devDependencies`, async () => { const tree = await schematicRunner.runSchematicAsync('application', defaultOptions, workspaceTree) diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 7b73fa9b6eba..467cb82693ee 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -19,12 +19,6 @@ }, "x-prompt": "What name would you like to use for the application?" }, - "enableIvy": { - "description": "**EXPERIMENTAL** True to create a new app that uses the Ivy rendering engine.", - "type": "boolean", - "default": false, - "x-user-analytics": 8 - }, "inlineStyle": { "description": "When true, includes styles inline in the root component.ts file. Only CSS styles can be included inline. Default is false, meaning that an external styles file is created and referenced in the root component.ts file.", "type": "boolean", diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index af8ac134c3f3..e02a4303571d 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -46,7 +46,6 @@ export default function (options: NgNewOptions): Rule { const applicationOptions: ApplicationOptions = { projectRoot: '', name: options.name, - enableIvy: options.enableIvy, inlineStyle: options.inlineStyle, inlineTemplate: options.inlineTemplate, prefix: options.prefix, diff --git a/packages/schematics/angular/ng-new/schema.json b/packages/schematics/angular/ng-new/schema.json index 033923fcd4a3..cd80048417eb 100644 --- a/packages/schematics/angular/ng-new/schema.json +++ b/packages/schematics/angular/ng-new/schema.json @@ -18,11 +18,6 @@ }, "x-prompt": "What name would you like to use for the new workspace and initial project?" }, - "enableIvy": { - "description": "When true, creates a new app that uses the Ivy rendering engine.", - "type": "boolean", - "default": false - }, "skipInstall": { "description": "When true, does not install dependency packages.", "type": "boolean", diff --git a/packages/schematics/angular/web-worker/index_spec.ts b/packages/schematics/angular/web-worker/index_spec.ts index d1f40ea94476..6e4409029f15 100644 --- a/packages/schematics/angular/web-worker/index_spec.ts +++ b/packages/schematics/angular/web-worker/index_spec.ts @@ -72,6 +72,18 @@ describe('Web Worker Schematic', () => { }); it('should add exclusions to tsconfig.app.json', async () => { + const oldTsConfig = { + extends: '../../tsconfig.json', + include: [ + 'src/**/*.ts', + ], + exclude: [ + 'src/test.ts', + 'src/**/*.spec.ts', + ], + }; + appTree.overwrite('projects/bar/tsconfig.app.json', JSON.stringify(oldTsConfig, undefined, 2)); + const tree = await schematicRunner.runSchematicAsync('web-worker', defaultOptions, appTree) .toPromise(); const { exclude } = JSON.parse(tree.readContent('/projects/bar/tsconfig.app.json')); @@ -120,7 +132,18 @@ describe('Web Worker Schematic', () => { const tsConfigPath = '/projects/bar/src/tsconfig.app.json'; workspace.projects.bar.architect.build.options.tsConfig = tsConfigPath; appTree.overwrite('/angular.json', JSON.stringify(workspace)); - appTree.rename('projects/bar/tsconfig.app.json', tsConfigPath); + + const oldTsConfig = { + extends: '../../../tsconfig.json', + include: [ + '**/*.ts', + ], + exclude: [ + 'test.ts', + '**/*.spec.ts', + ], + }; + appTree.create('projects/bar/src/tsconfig.app.json', JSON.stringify(oldTsConfig, undefined, 2)); const tree = await schematicRunner.runSchematicAsync('web-worker', defaultOptions, appTree) .toPromise(); diff --git a/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json b/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json index 02f96816e085..944d93dc8215 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json +++ b/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json @@ -17,8 +17,5 @@ "es2017", "dom" ] - }, - "angularCompilerOptions": { - "enableIvy": true } } diff --git a/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json b/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json index 61821f36af60..ef44e2862b04 100644 --- a/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json +++ b/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json @@ -16,8 +16,5 @@ "es2017", "dom" ] - }, - "angularCompilerOptions": { - "enableIvy": true } } diff --git a/tests/legacy-cli/e2e/tests/ivy/ivy.ts b/tests/legacy-cli/e2e/tests/ivy/ivy.ts index dcdf9ecb952a..13a7867f1767 100644 --- a/tests/legacy-cli/e2e/tests/ivy/ivy.ts +++ b/tests/legacy-cli/e2e/tests/ivy/ivy.ts @@ -12,7 +12,7 @@ import { createProject, ngServe } from '../../utils/project'; export default async function() { try { - await createProject('ivy-project', '--enable-ivy'); + await createProject('ivy-project'); // Add in a reference to a secondary entry-point to check that ngcc processes it correctly await replaceInFile( From 96c457d6a5c20a2ad667b152efca281261d24988 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 15 Aug 2019 18:37:23 +0200 Subject: [PATCH 0009/1070] refactor: add `enableIvy: true` until FW flips it on by default --- .../schematics/angular/workspace/files/tsconfig.json.template | 1 + .../build_angular/hello-world-app-ivy/tsconfig.json | 3 +++ .../build_ng_packagr/ng-packaged-ivy/tsconfig.json | 3 +++ 3 files changed, 7 insertions(+) diff --git a/packages/schematics/angular/workspace/files/tsconfig.json.template b/packages/schematics/angular/workspace/files/tsconfig.json.template index 30956ae7ea26..3c044080d66f 100644 --- a/packages/schematics/angular/workspace/files/tsconfig.json.template +++ b/packages/schematics/angular/workspace/files/tsconfig.json.template @@ -20,6 +20,7 @@ ] }, "angularCompilerOptions": { + "enableIvy": true, "fullTemplateTypeCheck": true, "strictInjectionParameters": true } diff --git a/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json b/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json index 944d93dc8215..02f96816e085 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json +++ b/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json @@ -17,5 +17,8 @@ "es2017", "dom" ] + }, + "angularCompilerOptions": { + "enableIvy": true } } diff --git a/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json b/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json index ef44e2862b04..61821f36af60 100644 --- a/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json +++ b/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json @@ -16,5 +16,8 @@ "es2017", "dom" ] + }, + "angularCompilerOptions": { + "enableIvy": true } } From 23217fad082ab5acd62f50c10e1cf2cf3c1b9c29 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 8 Aug 2019 15:56:52 +0200 Subject: [PATCH 0010/1070] feat(@schematics/angular): ivy library migration Add a migration to migrate existing libraries to the new library layout considering it will be the default in version 9. --- .../angular/migrations/update-9/index.ts | 2 + .../migrations/update-9/ivy-libraries.ts | 118 ++++++++++++++ .../migrations/update-9/ivy-libraries_spec.ts | 145 ++++++++++++++++++ .../angular/migrations/update-9/utils.ts | 54 +++++++ 4 files changed, 319 insertions(+) create mode 100644 packages/schematics/angular/migrations/update-9/ivy-libraries.ts create mode 100644 packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts create mode 100644 packages/schematics/angular/migrations/update-9/utils.ts diff --git a/packages/schematics/angular/migrations/update-9/index.ts b/packages/schematics/angular/migrations/update-9/index.ts index eb6d7869a4d2..c3429411ffc8 100644 --- a/packages/schematics/angular/migrations/update-9/index.ts +++ b/packages/schematics/angular/migrations/update-9/index.ts @@ -7,12 +7,14 @@ */ import { Rule, chain } from '@angular-devkit/schematics'; +import { UpdateLibraries } from './ivy-libraries'; import { UpdateWorkspaceConfig } from './update-workspace-config'; export default function(): Rule { return () => { return chain([ UpdateWorkspaceConfig(), + UpdateLibraries(), ]); }; } diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts new file mode 100644 index 000000000000..d7a0aaac56ef --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts @@ -0,0 +1,118 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonParseMode, parseJsonAst } from '@angular-devkit/core'; +import { Rule, Tree } from '@angular-devkit/schematics'; +import { getWorkspace, getWorkspacePath } from '../../utility/config'; +import { + appendPropertyInAstObject, + findPropertyInAstObject, + insertPropertyInAstObjectInOrder, +} from '../../utility/json-utils'; +import { Builders } from '../../utility/workspace-models'; +import { getTargets } from './utils'; + +/** + * Updates a pre version 9 library to version 9 Ivy library. + * + * The main things that this migrations does are: + * - Creates a production configuration for VE compilations. + * - Create a prod tsconfig for which disables Ivy and enables VE compilations. + */ +export function UpdateLibraries(): Rule { + return (tree: Tree) => { + const workspacePath = getWorkspacePath(tree); + const workspace = getWorkspace(tree); + + const recorder = tree.beginUpdate(workspacePath); + for (const { target, project } of getTargets(workspace, 'build', Builders.NgPackagr)) { + const projectRoot = findPropertyInAstObject(project, 'root'); + if (!projectRoot || projectRoot.kind !== 'string') { + break; + } + + const configurations = findPropertyInAstObject(target, 'configurations'); + const tsConfig = `${projectRoot.value}/tsconfig.lib.prod.json`; + + if (!configurations || configurations.kind !== 'object') { + // Configurations doesn't exist. + appendPropertyInAstObject(recorder, target, 'configurations', { production: { tsConfig } }, 10); + createTsConfig(tree, tsConfig); + continue; + } + + const prodConfig = findPropertyInAstObject(configurations, 'production'); + if (!prodConfig || prodConfig.kind !== 'object') { + // Production configuration doesn't exist. + insertPropertyInAstObjectInOrder(recorder, configurations, 'production', { tsConfig }, 12); + createTsConfig(tree, tsConfig); + continue; + } + + const tsConfigOption = findPropertyInAstObject(prodConfig, 'tsConfig'); + if (!tsConfigOption || tsConfigOption.kind !== 'string') { + // No tsconfig for production has been defined. + insertPropertyInAstObjectInOrder(recorder, prodConfig, 'tsConfig', tsConfig, 14); + createTsConfig(tree, tsConfig); + continue; + } + + // tsConfig for production already exists. + const tsConfigContent = tree.read(tsConfigOption.value); + if (!tsConfigContent) { + continue; + } + + const tsConfigAst = parseJsonAst(tsConfigContent.toString(), JsonParseMode.Loose); + if (!tsConfigAst || tsConfigAst.kind !== 'object') { + // Invalid tsConfig + continue; + } + + const tsConfigRecorder = tree.beginUpdate(tsConfigOption.value); + const ngCompilerOptions = findPropertyInAstObject(tsConfigAst, 'angularCompilerOptions'); + if (!ngCompilerOptions) { + // Add angularCompilerOptions to the production tsConfig + appendPropertyInAstObject(tsConfigRecorder, tsConfigAst, 'angularCompilerOptions', { enableIvy: false }, 2); + tree.commitUpdate(tsConfigRecorder); + continue; + } + + if (ngCompilerOptions.kind === 'object') { + const enableIvy = findPropertyInAstObject(ngCompilerOptions, 'enableIvy'); + // Add enableIvy false + if (!enableIvy) { + appendPropertyInAstObject(tsConfigRecorder, ngCompilerOptions, 'enableIvy', false, 4); + tree.commitUpdate(tsConfigRecorder); + continue; + } + + if (enableIvy.kind !== 'false') { + const { start, end } = enableIvy; + tsConfigRecorder.remove(start.offset, end.offset - start.offset); + tsConfigRecorder.insertLeft(start.offset, 'false'); + tree.commitUpdate(tsConfigRecorder); + } + } + } + + tree.commitUpdate(recorder); + + return tree; + }; +} + +function createTsConfig(tree: Tree, tsConfigPath: string) { + const tsConfigContent = { + extends: './tsconfig.lib.json', + angularCompilerOptions: { + enableIvy: false, + }, + }; + + tree.create(tsConfigPath, JSON.stringify(tsConfigContent, undefined, 2)); +} diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts new file mode 100644 index 000000000000..ecb42748b501 --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts @@ -0,0 +1,145 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { EmptyTree } from '@angular-devkit/schematics'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import { WorkspaceTargets } from '../../utility/workspace-models'; + +// tslint:disable-next-line: no-any +function getWorkspaceTargets(tree: UnitTestTree): any { + return JSON.parse(tree.readContent(workspacePath)) + .projects['migration-lib'].architect; +} + +function updateWorkspaceTargets(tree: UnitTestTree, workspaceTargets: WorkspaceTargets) { + const config = JSON.parse(tree.readContent(workspacePath)); + config.projects['migration-lib'].architect = workspaceTargets; + tree.overwrite(workspacePath, JSON.stringify(config, undefined, 2)); +} + +const workspacePath = '/angular.json'; +const libProdTsConfig = 'migration-lib/tsconfig.lib.prod.json'; + +// tslint:disable:no-big-function +describe('Migration to version 9', () => { + describe('Migrate Ivy Libraries', () => { + const schematicRunner = new SchematicTestRunner( + 'migrations', + require.resolve('../migration-collection.json'), + ); + + let tree: UnitTestTree; + + beforeEach(async () => { + tree = new UnitTestTree(new EmptyTree()); + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'workspace', + { + name: 'migration-test', + version: '1.2.3', + directory: '.', + }, + tree, + ) + .toPromise(); + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'library', + { + name: 'migration-lib', + }, + tree, + ) + .toPromise(); + }); + + it(`should add 'tsConfig' option in production when configurations doesn't exists`, async () => { + let config = getWorkspaceTargets(tree); + config.build.configurations = undefined; + + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.configurations.production.tsConfig).toEqual(libProdTsConfig); + expect(tree2.exists(libProdTsConfig)).toBeTruthy(); + }); + + it(`should add 'tsConfig' option in production when configurations exists`, async () => { + let config = getWorkspaceTargets(tree); + config.build.configurations = {}; + + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.configurations.production.tsConfig).toEqual(libProdTsConfig); + expect(tree2.exists(libProdTsConfig)).toBeTruthy(); + }); + + it(`should add 'tsConfig' option in production when production configurations exists`, async () => { + let config = getWorkspaceTargets(tree); + config.build.configurations = { production: {} }; + + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.configurations.production.tsConfig).toEqual(libProdTsConfig); + expect(tree2.exists(libProdTsConfig)).toBeTruthy(); + }); + + it(`should add enableIvy false in prod tsconfig if already exists`, async () => { + let config = getWorkspaceTargets(tree); + const prodLibTsConfig = 'migration-lib/tsconfig.library.prod.json'; + config.build.configurations = { production: { tsConfig: prodLibTsConfig } }; + + updateWorkspaceTargets(tree, config); + + const tsconfig = { + compilerOptions: {}, + }; + + tree.create(prodLibTsConfig, JSON.stringify(tsconfig, undefined, 2)); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.configurations.production.tsConfig).toEqual(prodLibTsConfig); + + const tsConfigContent = tree2.readContent(prodLibTsConfig); + expect(JSON.parse(tsConfigContent).angularCompilerOptions).toEqual({ enableIvy: false }); + }); + + it('should set enableIvy to false in prod tsconfig if true', async () => { + let config = getWorkspaceTargets(tree); + const prodLibTsConfig = 'migration-lib/tsconfig.library.prod.json'; + config.build.configurations = { production: { tsConfig: prodLibTsConfig } }; + + updateWorkspaceTargets(tree, config); + + const tsconfig = { + compilerOptions: {}, + angularCompilerOptions: { + enableIvy: true, + }, + }; + + tree.create(prodLibTsConfig, JSON.stringify(tsconfig, undefined, 2)); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.configurations.production.tsConfig).toEqual(prodLibTsConfig); + + const tsConfigContent = tree2.readContent(prodLibTsConfig); + expect(JSON.parse(tsConfigContent).angularCompilerOptions).toEqual({ enableIvy: false }); + }); + }); +}); diff --git a/packages/schematics/angular/migrations/update-9/utils.ts b/packages/schematics/angular/migrations/update-9/utils.ts new file mode 100644 index 000000000000..6ac0da64ed9e --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/utils.ts @@ -0,0 +1,54 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { JsonAstObject, experimental } from '@angular-devkit/core'; +import { findPropertyInAstObject } from '../../utility/json-utils'; +import { Builders, WorkspaceTargets } from '../../utility/workspace-models'; + +/** Get all workspace targets which builder and target names matches the provided. */ +export function getTargets( + workspace: JsonAstObject | experimental.workspace.WorkspaceSchema, + targetName: Exclude, + builderName: Builders, +): { target: JsonAstObject, project: JsonAstObject }[] { + const projects = findPropertyInAstObject(workspace as JsonAstObject, 'projects'); + if (!projects || projects.kind !== 'object') { + return []; + } + + const targets = []; + for (const project of projects.properties) { + const projectConfig = project.value; + if (projectConfig.kind !== 'object') { + continue; + } + + const projectRoot = findPropertyInAstObject(projectConfig, 'root'); + if (!projectRoot || projectRoot.kind !== 'string') { + continue; + } + + const architect = findPropertyInAstObject(projectConfig, 'architect'); + if (!architect || architect.kind !== 'object') { + continue; + } + + const target = findPropertyInAstObject(architect, targetName); + if (!target || target.kind !== 'object') { + continue; + } + + const builder = findPropertyInAstObject(target, 'builder'); + // Projects who's build builder is @angular-devkit/build-ng-packagr + if (builder && builder.kind === 'string' && builder.value === builderName) { + targets.push({ target, project: projectConfig }); + } + } + + return targets; +} From 46274df62c7a03e86b2fd6254c0660b0d114e1ac Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 8 Aug 2019 16:11:46 +0200 Subject: [PATCH 0011/1070] refactor: workspace config migration to use helper methods --- .../migrations/update-9/ivy-libraries.ts | 4 +- .../update-9/update-workspace-config.ts | 90 ++++--------------- .../angular/migrations/update-9/utils.ts | 35 +++++++- 3 files changed, 49 insertions(+), 80 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts index d7a0aaac56ef..a88f19946cf5 100644 --- a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts @@ -7,14 +7,14 @@ */ import { JsonParseMode, parseJsonAst } from '@angular-devkit/core'; import { Rule, Tree } from '@angular-devkit/schematics'; -import { getWorkspace, getWorkspacePath } from '../../utility/config'; +import { getWorkspacePath } from '../../utility/config'; import { appendPropertyInAstObject, findPropertyInAstObject, insertPropertyInAstObjectInOrder, } from '../../utility/json-utils'; import { Builders } from '../../utility/workspace-models'; -import { getTargets } from './utils'; +import { getTargets, getWorkspace } from './utils'; /** * Updates a pre version 9 library to version 9 Ivy library. diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts index ca8310724223..e674ae4c281a 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts @@ -5,18 +5,17 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { - JsonAstObject, - JsonParseMode, - parseJsonAst, -} from '@angular-devkit/core'; +import { JsonAstObject } from '@angular-devkit/core'; import { Rule, Tree, UpdateRecorder } from '@angular-devkit/schematics'; +import { getWorkspacePath } from '../../utility/config'; import { appendValueInAstArray, findPropertyInAstObject, insertPropertyInAstObjectInOrder, removePropertyInAstObject, } from '../../utility/json-utils'; +import { Builders } from '../../utility/workspace-models'; +import { getAllOptions, getTargets, getWorkspace } from './utils'; export const ANY_COMPONENT_STYLE_BUDGET = { type: 'anyComponentStyle', @@ -25,61 +24,19 @@ export const ANY_COMPONENT_STYLE_BUDGET = { export function UpdateWorkspaceConfig(): Rule { return (tree: Tree) => { - let workspaceConfigPath = 'angular.json'; - let angularConfigContent = tree.read(workspaceConfigPath); - - if (!angularConfigContent) { - workspaceConfigPath = '.angular.json'; - angularConfigContent = tree.read(workspaceConfigPath); - - if (!angularConfigContent) { - return; - } - } - - const angularJson = parseJsonAst(angularConfigContent.toString(), JsonParseMode.Loose); - if (angularJson.kind !== 'object') { - return; + const workspacePath = getWorkspacePath(tree); + const workspace = getWorkspace(tree); + const recorder = tree.beginUpdate(workspacePath); + + for (const { target } of getTargets(workspace, 'build', Builders.Browser)) { + updateStyleOrScriptOption('styles', recorder, target); + updateStyleOrScriptOption('scripts', recorder, target); + addAnyComponentStyleBudget(recorder, target); } - const projects = findPropertyInAstObject(angularJson, 'projects'); - if (!projects || projects.kind !== 'object') { - return; - } - - // For all projects - const recorder = tree.beginUpdate(workspaceConfigPath); - for (const project of projects.properties) { - const projectConfig = project.value; - if (projectConfig.kind !== 'object') { - break; - } - - const architect = findPropertyInAstObject(projectConfig, 'architect'); - if (!architect || architect.kind !== 'object') { - break; - } - - const buildTarget = findPropertyInAstObject(architect, 'build'); - if (buildTarget && buildTarget.kind === 'object') { - const builder = findPropertyInAstObject(buildTarget, 'builder'); - // Projects who's build builder is not build-angular:browser - if (builder && builder.kind === 'string' && builder.value === '@angular-devkit/build-angular:browser') { - updateStyleOrScriptOption('styles', recorder, buildTarget); - updateStyleOrScriptOption('scripts', recorder, buildTarget); - addAnyComponentStyleBudget(recorder, buildTarget); - } - } - - const testTarget = findPropertyInAstObject(architect, 'test'); - if (testTarget && testTarget.kind === 'object') { - const builder = findPropertyInAstObject(testTarget, 'builder'); - // Projects who's build builder is not build-angular:browser - if (builder && builder.kind === 'string' && builder.value === '@angular-devkit/build-angular:karma') { - updateStyleOrScriptOption('styles', recorder, testTarget); - updateStyleOrScriptOption('scripts', recorder, testTarget); - } - } + for (const { target } of getTargets(workspace, 'test', Builders.Karma)) { + updateStyleOrScriptOption('styles', recorder, target); + updateStyleOrScriptOption('scripts', recorder, target); } tree.commitUpdate(recorder); @@ -88,23 +45,6 @@ export function UpdateWorkspaceConfig(): Rule { }; } -/** - * Helper to retreive all the options in various configurations - */ -function getAllOptions(builderConfig: JsonAstObject, configurationsOnly = false): JsonAstObject[] { - const options = []; - const configurations = findPropertyInAstObject(builderConfig, 'configurations'); - if (configurations && configurations.kind === 'object') { - options.push(...configurations.properties.map(x => x.value)); - } - - if (!configurationsOnly) { - options.push(findPropertyInAstObject(builderConfig, 'options')); - } - - return options.filter(o => o && o.kind === 'object') as JsonAstObject[]; -} - function updateStyleOrScriptOption(property: 'scripts' | 'styles', recorder: UpdateRecorder, builderConfig: JsonAstObject) { const options = getAllOptions(builderConfig); diff --git a/packages/schematics/angular/migrations/update-9/utils.ts b/packages/schematics/angular/migrations/update-9/utils.ts index 6ac0da64ed9e..04542a708f37 100644 --- a/packages/schematics/angular/migrations/update-9/utils.ts +++ b/packages/schematics/angular/migrations/update-9/utils.ts @@ -6,18 +6,20 @@ * found in the LICENSE file at https://angular.io/license */ -import { JsonAstObject, experimental } from '@angular-devkit/core'; +import { JsonAstObject, JsonParseMode, parseJsonAst } from '@angular-devkit/core'; +import { SchematicsException, Tree } from '@angular-devkit/schematics'; +import { getWorkspacePath } from '../../utility/config'; import { findPropertyInAstObject } from '../../utility/json-utils'; import { Builders, WorkspaceTargets } from '../../utility/workspace-models'; /** Get all workspace targets which builder and target names matches the provided. */ export function getTargets( - workspace: JsonAstObject | experimental.workspace.WorkspaceSchema, + workspace: JsonAstObject, targetName: Exclude, builderName: Builders, ): { target: JsonAstObject, project: JsonAstObject }[] { const projects = findPropertyInAstObject(workspace as JsonAstObject, 'projects'); - if (!projects || projects.kind !== 'object') { + if (!projects || projects.kind !== 'object' || !projects.properties) { return []; } @@ -52,3 +54,30 @@ export function getTargets( return targets; } + +/** Helper to retreive all the options in various configurations. */ +export function getAllOptions(builderConfig: JsonAstObject, configurationsOnly = false): JsonAstObject[] { + const options = []; + const configurations = findPropertyInAstObject(builderConfig, 'configurations'); + if (configurations && configurations.kind === 'object') { + options.push(...configurations.properties.map(x => x.value)); + } + + if (!configurationsOnly) { + options.push(findPropertyInAstObject(builderConfig, 'options')); + } + + return options.filter(o => o && o.kind === 'object') as JsonAstObject[]; +} + +export function getWorkspace(host: Tree): JsonAstObject { + const path = getWorkspacePath(host); + const configBuffer = host.read(path); + if (!configBuffer) { + throw new SchematicsException(`Could not find (${path})`); + } + + const content = configBuffer.toString(); + + return parseJsonAst(content, JsonParseMode.Loose) as JsonAstObject; +} From 0d7dbc7f09aa7af07a8eff05eaa859ff46c3e6ac Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 15 Aug 2019 18:12:16 +0200 Subject: [PATCH 0012/1070] feat(@schematics/angular): update workspace dev dependencies --- .../workspace/files/package.json.template | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/schematics/angular/workspace/files/package.json.template b/packages/schematics/angular/workspace/files/package.json.template index 5dd09ebeaf5c..af919bfc21de 100644 --- a/packages/schematics/angular/workspace/files/package.json.template +++ b/packages/schematics/angular/workspace/files/package.json.template @@ -30,17 +30,17 @@ "@types/node": "~8.9.4",<% if (!minimal) { %> "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", - "codelyzer": "^5.0.0", + "codelyzer": "^5.1.0", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", - "karma": "~4.1.0", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~2.0.1", + "karma": "~4.2.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~2.1.0", "karma-jasmine": "~2.0.1", - "karma-jasmine-html-reporter": "^1.4.0", - "protractor": "~5.4.0",<% } %> - "ts-node": "~7.0.0", - "tslint": "~5.15.0", + "karma-jasmine-html-reporter": "^1.4.2", + "protractor": "~5.4.2",<% } %> + "ts-node": "~8.3.0", + "tslint": "~5.18.0", "typescript": "<%= latestVersions.TypeScript %>" } } From 46768d64815d198c7ac0a94714e69ccddde3aad9 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 15 Aug 2019 18:13:45 +0200 Subject: [PATCH 0013/1070] fix(@schematics/schematics): move development depedencies to `devDependencies` section --- .../blank/project-files/package.json.template | 8 +++++--- .../schematics/schematic/files/package.json | 17 ++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/packages/schematics/schematics/blank/project-files/package.json.template b/packages/schematics/schematics/blank/project-files/package.json.template index 2f6937d0987e..199b07a56b13 100644 --- a/packages/schematics/schematics/blank/project-files/package.json.template +++ b/packages/schematics/schematics/blank/project-files/package.json.template @@ -15,9 +15,11 @@ "dependencies": { "@angular-devkit/core": "^<%= coreVersion %>", "@angular-devkit/schematics": "^<%= schematicsVersion %>", - "@types/jasmine": "^3.3.9", - "@types/node": "^8.0.31", - "jasmine": "^3.3.1", "typescript": "~3.5.3" + }, + "devDependencies": { + "@types/node": "~8.9.4", + "@types/jasmine": "~3.3.8", + "jasmine": "^3.4.0" } } diff --git a/packages/schematics/schematics/schematic/files/package.json b/packages/schematics/schematics/schematic/files/package.json index 853e960759ba..e9c1f1a0dbce 100644 --- a/packages/schematics/schematics/schematic/files/package.json +++ b/packages/schematics/schematics/schematic/files/package.json @@ -15,16 +15,11 @@ "dependencies": { "@angular-devkit/core": "^<%= coreVersion %>", "@angular-devkit/schematics": "^<%= schematicsVersion %>", - "@types/jasmine": "^3.3.9", - "@types/node": "^8.0.31", - "jasmine": "^3.3.1", - "typescript": "3.5.3" + "typescript": "~3.5.3" }, - "files": [ - "src/**/files/", - "src/**/*.json", - "src/**/*.js", - "src/**/*.js.map", - "src/**/*.d.ts" - ] + "devDependencies": { + "@types/node": "~8.9.4", + "@types/jasmine": "~3.3.8", + "jasmine": "^3.4.0" + } } From fee323a4cedc35426c66a22841a610ab2593af14 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 15 Aug 2019 18:14:16 +0200 Subject: [PATCH 0014/1070] refactor: add npmignore instead of file in `package.json` to align with blank schematics --- .../schematics/schematics/schematic/files/__dot__npmignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 packages/schematics/schematics/schematic/files/__dot__npmignore diff --git a/packages/schematics/schematics/schematic/files/__dot__npmignore b/packages/schematics/schematics/schematic/files/__dot__npmignore new file mode 100644 index 000000000000..c55ccfc3f5f9 --- /dev/null +++ b/packages/schematics/schematics/schematic/files/__dot__npmignore @@ -0,0 +1,3 @@ +# Ignores TypeScript files, but keeps definitions. +*.ts +!*.d.ts From f169e0963ecbcc59629cec190520a3491512b28c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 15 Aug 2019 12:39:30 -0400 Subject: [PATCH 0015/1070] build: add bazel_toolchains to bazel renovate group --- renovate.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 35165ce62f9e..aafeee4bb686 100644 --- a/renovate.json +++ b/renovate.json @@ -43,7 +43,8 @@ { "packagePatterns": [ "^@bazel\/.*", - "^build_bazel.*" + "^build_bazel.*", + "^bazel_toolchains$" ], "groupName": "bazel", "pinVersions": false From 2e4cae172e79bbd1e70f9b0c5582808818aab3c0 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 15 Aug 2019 20:18:56 -0400 Subject: [PATCH 0016/1070] test: remove additional usages of experimental workspaces --- .../test/tslint/works_spec_large.ts | 16 ++++++---------- .../angular_devkit/build_angular/test/utils.ts | 7 +++++-- .../src/build/index_spec_large.ts | 7 +++++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts b/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts index fb0a7acbc017..897a121754a5 100644 --- a/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/tslint/works_spec_large.ts @@ -9,13 +9,12 @@ import { Architect, Target } from '@angular-devkit/architect'; import { WorkspaceNodeModulesArchitectHost } from '@angular-devkit/architect/node'; import { TestingArchitectHost } from '@angular-devkit/architect/testing'; import { - experimental, logging, normalize, schema, + workspaces, } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import * as fs from 'fs'; +import { NodeJsAsyncHost } from '@angular-devkit/core/node'; import * as path from 'path'; const devkitRoot = (global as any)._DevKitRoot; // tslint:disable-line:no-any @@ -30,16 +29,13 @@ describe('Tslint Target', () => { let architect: Architect; beforeEach(async () => { - const vfHost = new NodeJsSyncHost(); - const configPath = path.join(workspaceRoot, 'angular.json'); - const configContent = fs.readFileSync(configPath, 'utf-8'); - const workspaceJson = JSON.parse(configContent); - const registry = new schema.CoreSchemaRegistry(); registry.addPostTransform(schema.transforms.addUndefinedDefaults); - const workspace = new experimental.workspace.Workspace(normalize(workspaceRoot), vfHost); - await workspace.loadWorkspaceFromJson(workspaceJson).toPromise(); + const { workspace } = await workspaces.readWorkspace( + normalize(workspaceRoot), + workspaces.createWorkspaceHost(new NodeJsAsyncHost()), + ); testArchitectHost = new TestingArchitectHost( workspaceRoot, diff --git a/packages/angular_devkit/build_angular/test/utils.ts b/packages/angular_devkit/build_angular/test/utils.ts index e1890236d6c7..8fdcabb28d9a 100644 --- a/packages/angular_devkit/build_angular/test/utils.ts +++ b/packages/angular_devkit/build_angular/test/utils.ts @@ -10,13 +10,13 @@ import { WorkspaceNodeModulesArchitectHost } from '@angular-devkit/architect/nod import { TestProjectHost, TestingArchitectHost } from '@angular-devkit/architect/testing'; import { Path, - experimental, getSystemPath, join, json, normalize, schema, virtualFs, + workspaces, } from '@angular-devkit/core'; import { BrowserBuilderOutput } from '../src/browser'; @@ -42,7 +42,10 @@ export async function createArchitect(workspaceRoot: Path) { registry.addPostTransform(schema.transforms.addUndefinedDefaults); const workspaceSysPath = getSystemPath(workspaceRoot); - const workspace = await experimental.workspace.Workspace.fromPath(host, host.root(), registry); + const { workspace } = await workspaces.readWorkspace( + workspaceSysPath, + workspaces.createWorkspaceHost(host), + ); const architectHost = new TestingArchitectHost( workspaceSysPath, workspaceSysPath, diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index eec75d4b72b1..2258fdba9b39 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -9,12 +9,12 @@ import { Architect } from '@angular-devkit/architect'; import { WorkspaceNodeModulesArchitectHost } from '@angular-devkit/architect/node'; import { TestProjectHost, TestingArchitectHost } from '@angular-devkit/architect/testing'; import { - experimental, getSystemPath, join, normalize, schema, virtualFs, + workspaces, } from '@angular-devkit/core'; // tslint:disable-line:no-implicit-dependencies import { map, take, tap } from 'rxjs/operators'; @@ -37,7 +37,10 @@ describe('NgPackagr Builder', () => { registry.addPostTransform(schema.transforms.addUndefinedDefaults); const workspaceSysPath = getSystemPath(host.root()); - const workspace = await experimental.workspace.Workspace.fromPath(host, host.root(), registry); + const { workspace } = await workspaces.readWorkspace( + workspaceSysPath, + workspaces.createWorkspaceHost(host), + ); const architectHost = new TestingArchitectHost( workspaceSysPath, workspaceSysPath, From b630317b4bcef1089b8c1c3221c3407aded990f8 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 15 Aug 2019 20:57:20 -0400 Subject: [PATCH 0017/1070] refactor(@angular/cli): convert workspace access to async This is in preparation for conversion from the experimental workspace API to the stable workspace API. --- .../cli/bin/postinstall/analytics-prompt.js | 14 +- packages/angular/cli/commands/add-impl.ts | 6 +- packages/angular/cli/commands/config-impl.ts | 36 ++--- .../angular/cli/commands/generate-impl.ts | 12 +- packages/angular/cli/commands/new-impl.ts | 4 +- packages/angular/cli/commands/update-impl.ts | 2 +- packages/angular/cli/lib/init.ts | 129 +++++++++--------- packages/angular/cli/models/analytics.ts | 12 +- packages/angular/cli/models/command-runner.ts | 4 +- packages/angular/cli/models/command.ts | 2 +- .../angular/cli/models/schematic-command.ts | 34 +++-- packages/angular/cli/utilities/config.ts | 44 +++--- .../angular/cli/utilities/package-manager.ts | 4 +- 13 files changed, 151 insertions(+), 152 deletions(-) diff --git a/packages/angular/cli/bin/postinstall/analytics-prompt.js b/packages/angular/cli/bin/postinstall/analytics-prompt.js index c1641478d649..cd97394989e6 100644 --- a/packages/angular/cli/bin/postinstall/analytics-prompt.js +++ b/packages/angular/cli/bin/postinstall/analytics-prompt.js @@ -5,12 +5,12 @@ if ('NG_CLI_ANALYTICS' in process.env) { return; } -(async () => { - try { - const analytics = require('../../models/analytics'); +try { + var analytics = require('../../models/analytics'); - if (!analytics.hasGlobalAnalyticsConfiguration()) { - await analytics.promptGlobalAnalytics(); + analytics.hasGlobalAnalyticsConfiguration().then(hasGlobalConfig => { + if (!hasGlobalConfig) { + return analytics.promptGlobalAnalytics(); } - } catch (_) {} -})(); + }); +} catch (_) {} diff --git a/packages/angular/cli/commands/add-impl.ts b/packages/angular/cli/commands/add-impl.ts index 72370fa873a7..c54b3f2e90fe 100644 --- a/packages/angular/cli/commands/add-impl.ts +++ b/packages/angular/cli/commands/add-impl.ts @@ -27,7 +27,6 @@ const npa = require('npm-package-arg'); export class AddCommand extends SchematicCommand { readonly allowPrivateSchematics = true; readonly allowAdditionalArgs = true; - readonly packageManager = getPackageManager(this.workspace.root); async run(options: AddCommandSchema & Arguments) { if (!options.collection) { @@ -55,7 +54,8 @@ export class AddCommand extends SchematicCommand { return this.executeSchematic(packageIdentifier.name, options['--']); } - const usingYarn = this.packageManager === 'yarn'; + const packageManager = await getPackageManager(this.workspace.root); + const usingYarn = packageManager === 'yarn'; if (packageIdentifier.type === 'tag' && !packageIdentifier.rawSpec) { // only package name provided; search for viable version @@ -135,7 +135,7 @@ export class AddCommand extends SchematicCommand { } } - await npmInstall(packageIdentifier.raw, this.logger, this.packageManager, this.workspace.root); + await npmInstall(packageIdentifier.raw, this.logger, packageManager, this.workspace.root); return this.executeSchematic(collectionName, options['--']); } diff --git a/packages/angular/cli/commands/config-impl.ts b/packages/angular/cli/commands/config-impl.ts index f69e5f024dc1..c5d9159603b1 100644 --- a/packages/angular/cli/commands/config-impl.ts +++ b/packages/angular/cli/commands/config-impl.ts @@ -28,7 +28,6 @@ import { } from '../utilities/config'; import { Schema as ConfigCommandSchema, Value as ConfigCommandSchemaValue } from './config'; - function _validateBoolean(value: string) { if (('' + value).trim() === 'true') { return true; @@ -71,8 +70,7 @@ function _validateAnalyticsSharingTracking(value: string) { return value; } - -const validCliPaths = new Map JsonValue)>([ +const validCliPaths = new Map JsonValue>([ ['cli.warnings.versionMismatch', _validateBoolean], ['cli.defaultCollection', _validateString], ['cli.packageManager', _validateString], @@ -89,9 +87,9 @@ const validCliPaths = new Map JsonValue)>([ * @returns {(string|number)[]} The fragments for the string. * @private */ -function parseJsonPath(path: string): (string|number)[] { +function parseJsonPath(path: string): (string | number)[] { const fragments = (path || '').split(/\./g); - const result: (string|number)[] = []; + const result: (string | number)[] = []; while (fragments.length > 0) { const fragment = fragments.shift(); @@ -109,7 +107,7 @@ function parseJsonPath(path: string): (string|number)[] { const indices = match[2] .slice(1, -1) .split('][') - .map(x => /^\d$/.test(x) ? +x : x.replace(/\"|\'/g, '')); + .map(x => (/^\d$/.test(x) ? +x : x.replace(/\"|\'/g, ''))); result.push(...indices); } } @@ -213,14 +211,12 @@ export class ConfigCommand extends Command { await this.validateScope(CommandScope.InProject); } - let config = - (getWorkspace(level) as {} as { _workspace: experimental.workspace.WorkspaceSchema }); + let config = await getWorkspace(level); if (options.global && !config) { try { if (migrateLegacyGlobalConfig()) { - config = - (getWorkspace(level) as {} as { _workspace: experimental.workspace.WorkspaceSchema }); + config = await getWorkspace(level); this.logger.info(tags.oneLine` We found a global configuration that was used in Angular CLI 1. It has been automatically migrated.`); @@ -235,7 +231,10 @@ export class ConfigCommand extends Command { return 1; } - return this.get(config._workspace, options); + const workspace = ((config as {}) as { _workspace: experimental.workspace.WorkspaceSchema }) + ._workspace; + + return this.get(workspace, options); } else { return this.set(options); } @@ -253,7 +252,7 @@ export class ConfigCommand extends Command { return 0; } - value = getValueFromPath(config as {} as JsonObject, options.jsonPath); + value = getValueFromPath((config as {}) as JsonObject, options.jsonPath); } else { value = config; } @@ -271,7 +270,7 @@ export class ConfigCommand extends Command { return 0; } - private set(options: ConfigCommandSchema) { + private async set(options: ConfigCommandSchema) { if (!options.jsonPath || !options.jsonPath.trim()) { throw new Error('Invalid Path.'); } @@ -283,9 +282,11 @@ export class ConfigCommand extends Command { return 0; } - if (options.global - && !options.jsonPath.startsWith('schematics.') - && !validCliPaths.has(options.jsonPath)) { + if ( + options.global && + !options.jsonPath.startsWith('schematics.') && + !validCliPaths.has(options.jsonPath) + ) { throw new Error('Invalid Path.'); } @@ -309,7 +310,7 @@ export class ConfigCommand extends Command { } try { - validateWorkspace(configValue); + await validateWorkspace(configValue); } catch (error) { this.logger.fatal(error.message); @@ -321,5 +322,4 @@ export class ConfigCommand extends Command { return 0; } - } diff --git a/packages/angular/cli/commands/generate-impl.ts b/packages/angular/cli/commands/generate-impl.ts index f384d30e87bc..98a64c7c98ea 100644 --- a/packages/angular/cli/commands/generate-impl.ts +++ b/packages/angular/cli/commands/generate-impl.ts @@ -17,7 +17,7 @@ export class GenerateCommand extends SchematicCommand { async initialize(options: GenerateCommandSchema & Arguments) { // Fill up the schematics property of the command description. - const [collectionName, schematicName] = this.parseSchematicInfo(options); + const [collectionName, schematicName] = await this.parseSchematicInfo(options); this.collectionName = collectionName; this.schematicName = schematicName; @@ -45,7 +45,7 @@ export class GenerateCommand extends SchematicCommand { continue; } - if (this.getDefaultSchematicCollection() == collectionName) { + if ((await this.getDefaultSchematicCollection()) == collectionName) { subcommands[name] = subcommand; } else { subcommands[`${collectionName}:${name}`] = subcommand; @@ -78,7 +78,7 @@ export class GenerateCommand extends SchematicCommand { paths: string[], options: GenerateCommandSchema & Arguments, ): Promise { - const [collectionName, schematicName] = this.parseSchematicInfo(options); + const [collectionName, schematicName] = await this.parseSchematicInfo(options); if (!schematicName || !collectionName) { return; @@ -91,8 +91,10 @@ export class GenerateCommand extends SchematicCommand { ); } - private parseSchematicInfo(options: { schematic?: string }): [string, string | undefined] { - let collectionName = this.getDefaultSchematicCollection(); + private async parseSchematicInfo(options: { + schematic?: string; + }): Promise<[string, string | undefined]> { + let collectionName = await this.getDefaultSchematicCollection(); let schematicName = options.schematic; diff --git a/packages/angular/cli/commands/new-impl.ts b/packages/angular/cli/commands/new-impl.ts index 1b1761680088..d8c66d886bc3 100644 --- a/packages/angular/cli/commands/new-impl.ts +++ b/packages/angular/cli/commands/new-impl.ts @@ -20,7 +20,7 @@ export class NewCommand extends SchematicCommand { if (options.collection) { this.collectionName = options.collection; } else { - this.collectionName = this.parseCollectionName(options); + this.collectionName = await this.parseCollectionName(options); } return super.initialize(options); @@ -43,7 +43,7 @@ export class NewCommand extends SchematicCommand { }); } - private parseCollectionName(options: any): string { + private async parseCollectionName(options: any): Promise { return options.collection || this.getDefaultSchematicCollection(); } } diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 3323a054c5f9..1da822ffe236 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -99,7 +99,7 @@ export class UpdateCommand extends SchematicCommand { } } - const packageManager = getPackageManager(this.workspace.root); + const packageManager = await getPackageManager(this.workspace.root); this.logger.info(`Using package manager: '${packageManager}'`); // Special handling for Angular CLI 1.x migrations diff --git a/packages/angular/cli/lib/init.ts b/packages/angular/cli/lib/init.ts index c1d3d71aa3c2..3028e60950bc 100644 --- a/packages/angular/cli/lib/init.ts +++ b/packages/angular/cli/lib/init.ts @@ -77,76 +77,79 @@ if (process.env['NG_CLI_PROFILING']) { process.on('uncaughtException', () => exitHandler({ exit: true })); } -let cli; -try { - const projectLocalCli = require.resolve('@angular/cli', { paths: [process.cwd()] }); - - // This was run from a global, check local version. - const globalVersion = new SemVer(packageJson['version']); - let localVersion; - let shouldWarn = false; - +(async () => { + let cli; try { - localVersion = _fromPackageJson(); - shouldWarn = localVersion != null && globalVersion.compare(localVersion) > 0; - } catch (e) { - // eslint-disable-next-line no-console - console.error(e); - shouldWarn = true; - } + const projectLocalCli = require.resolve('@angular/cli', { paths: [process.cwd()] }); - if (shouldWarn && isWarningEnabled('versionMismatch')) { - const warning = colors.yellow(tags.stripIndents` - Your global Angular CLI version (${globalVersion}) is greater than your local - version (${localVersion}). The local Angular CLI version is used. + // This was run from a global, check local version. + const globalVersion = new SemVer(packageJson['version']); + let localVersion; + let shouldWarn = false; - To disable this warning use "ng config -g cli.warnings.versionMismatch false". - `); - // Don't show warning colorised on `ng completion` - if (process.argv[2] !== 'completion') { - // eslint-disable-next-line no-console - console.error(warning); - } else { + try { + localVersion = _fromPackageJson(); + shouldWarn = localVersion != null && globalVersion.compare(localVersion) > 0; + } catch (e) { // eslint-disable-next-line no-console - console.error(warning); - process.exit(1); + console.error(e); + shouldWarn = true; } - } - // No error implies a projectLocalCli, which will load whatever - // version of ng-cli you have installed in a local package.json - cli = require(projectLocalCli); -} catch { - // If there is an error, resolve could not find the ng-cli - // library from a package.json. Instead, include it from a relative - // path to this script file (which is likely a globally installed - // npm package). Most common cause for hitting this is `ng new` - cli = require('./cli'); -} + if (shouldWarn && await isWarningEnabled('versionMismatch')) { + const warning = colors.yellow(tags.stripIndents` + Your global Angular CLI version (${globalVersion}) is greater than your local + version (${localVersion}). The local Angular CLI version is used. + + To disable this warning use "ng config -g cli.warnings.versionMismatch false". + `); + // Don't show warning colorised on `ng completion` + if (process.argv[2] !== 'completion') { + // eslint-disable-next-line no-console + console.error(warning); + } else { + // eslint-disable-next-line no-console + console.error(warning); + process.exit(1); + } + } -if ('default' in cli) { - cli = cli['default']; -} + // No error implies a projectLocalCli, which will load whatever + // version of ng-cli you have installed in a local package.json + cli = require(projectLocalCli); + } catch { + // If there is an error, resolve could not find the ng-cli + // library from a package.json. Instead, include it from a relative + // path to this script file (which is likely a globally installed + // npm package). Most common cause for hitting this is `ng new` + cli = require('./cli'); + } -// This is required to support 1.x local versions with a 6+ global -let standardInput; -try { - standardInput = process.stdin; -} catch (e) { - delete process.stdin; - process.stdin = new Duplex(); - standardInput = process.stdin; -} + if ('default' in cli) { + cli = cli['default']; + } -cli({ - cliArgs: process.argv.slice(2), - inputStream: standardInput, - outputStream: process.stdout, -}) - .then((exitCode: number) => { - process.exit(exitCode); - }) - .catch((err: Error) => { - console.error('Unknown error: ' + err.toString()); - process.exit(127); + return cli; +})().then(cli => { + // This is required to support 1.x local versions with a 6+ global + let standardInput; + try { + standardInput = process.stdin; + } catch (e) { + delete process.stdin; + process.stdin = new Duplex(); + standardInput = process.stdin; + } + + return cli({ + cliArgs: process.argv.slice(2), + inputStream: standardInput, + outputStream: process.stdout, }); +}).then((exitCode: number) => { + process.exit(exitCode); +}) +.catch((err: Error) => { + console.error('Unknown error: ' + err.toString()); + process.exit(127); +}); diff --git a/packages/angular/cli/models/analytics.ts b/packages/angular/cli/models/analytics.ts index db8619792f3e..064044f365dd 100644 --- a/packages/angular/cli/models/analytics.ts +++ b/packages/angular/cli/models/analytics.ts @@ -488,9 +488,9 @@ export async function promptProjectAnalytics(force = false): Promise { return false; } -export function hasGlobalAnalyticsConfiguration(): boolean { +export async function hasGlobalAnalyticsConfiguration(): Promise { try { - const globalWorkspace = getWorkspace('global'); + const globalWorkspace = await getWorkspace('global'); const analyticsConfig: string | undefined | null | { uid?: string } = globalWorkspace && globalWorkspace.getCli() && globalWorkspace.getCli()['analytics']; @@ -508,7 +508,7 @@ export function hasGlobalAnalyticsConfiguration(): boolean { * * If any problem happens, it is considered the user has been opting out of analytics. */ -export function getGlobalAnalytics(): UniversalAnalytics | undefined { +export async function getGlobalAnalytics(): Promise { analyticsDebug('getGlobalAnalytics'); const propertyId = AnalyticsProperties.AngularCliDefault; @@ -527,7 +527,7 @@ export function getGlobalAnalytics(): UniversalAnalytics | undefined { // If anything happens we just keep the NOOP analytics. try { - const globalWorkspace = getWorkspace('global'); + const globalWorkspace = await getWorkspace('global'); const analyticsConfig: string | undefined | null | { uid?: string } = globalWorkspace && globalWorkspace.getCli() && globalWorkspace.getCli()['analytics']; analyticsDebug('Client Analytics config found: %j', analyticsConfig); @@ -569,7 +569,7 @@ export function getGlobalAnalytics(): UniversalAnalytics | undefined { * Return the usage analytics sharing setting, which is either a property string (GA-XXXXXXX-XX), * or undefined if no sharing. */ -export function getSharedAnalytics(): UniversalAnalytics | undefined { +export async function getSharedAnalytics(): Promise { analyticsDebug('getSharedAnalytics'); const envVarName = 'NG_CLI_ANALYTICS_SHARE'; @@ -583,7 +583,7 @@ export function getSharedAnalytics(): UniversalAnalytics | undefined { // If anything happens we just keep the NOOP analytics. try { - const globalWorkspace = getWorkspace('global'); + const globalWorkspace = await getWorkspace('global'); const analyticsConfig = globalWorkspace && globalWorkspace.getCli() && globalWorkspace.getCli()['analyticsSharing']; diff --git a/packages/angular/cli/models/command-runner.ts b/packages/angular/cli/models/command-runner.ts index f0bacd1fff3e..9fe02781e06f 100644 --- a/packages/angular/cli/models/command-runner.ts +++ b/packages/angular/cli/models/command-runner.ts @@ -59,8 +59,8 @@ export interface CommandMapOptions { * @private */ async function _createAnalytics(): Promise { - const config = getGlobalAnalytics(); - const maybeSharedAnalytics = getSharedAnalytics(); + const config = await getGlobalAnalytics(); + const maybeSharedAnalytics = await getSharedAnalytics(); if (config && maybeSharedAnalytics) { return new analytics.MultiAnalytics([config, maybeSharedAnalytics]); diff --git a/packages/angular/cli/models/command.ts b/packages/angular/cli/models/command.ts index 0e783fb18318..6519393aae2f 100644 --- a/packages/angular/cli/models/command.ts +++ b/packages/angular/cli/models/command.ts @@ -134,7 +134,7 @@ export abstract class Command } break; case CommandScope.InProject: - if (!this.workspace.configFile || getWorkspace('local') === null) { + if (!this.workspace.configFile || (await getWorkspace('local')) === null) { this.logger.fatal(tags.oneLine` The ${this.description.name} command requires to be run in an Angular project, but a project definition could not be found. diff --git a/packages/angular/cli/models/schematic-command.ts b/packages/angular/cli/models/schematic-command.ts index 7cd74c07caf6..6daecb163bdb 100644 --- a/packages/angular/cli/models/schematic-command.ts +++ b/packages/angular/cli/models/schematic-command.ts @@ -88,7 +88,7 @@ export abstract class SchematicCommand< public async initialize(options: T & Arguments) { await this._loadWorkspace(); - this.createWorkflow(options); + await this.createWorkflow(options); if (this.schematicName) { // Set the options. @@ -142,7 +142,7 @@ export abstract class SchematicCommand< namesPerCollection[collectionName].push(schematicName); }); - const defaultCollection = this.getDefaultSchematicCollection(); + const defaultCollection = await this.getDefaultSchematicCollection(); Object.keys(namesPerCollection).forEach(collectionName => { const isDefault = defaultCollection == collectionName; this.logger.info(` Collection "${collectionName}"${isDefault ? ' (default)' : ''}:`); @@ -176,7 +176,9 @@ export abstract class SchematicCommand< // Display if this is not the default collectionName, // otherwise just show the schematicName. const displayName = - collectionName == this.getDefaultSchematicCollection() ? schematicName : schematicNames[0]; + collectionName == (await this.getDefaultSchematicCollection()) + ? schematicName + : schematicNames[0]; const schematicOptions = subCommandOption.subcommands[schematicNames[0]].options; const schematicArgs = schematicOptions.filter(x => x.positional !== undefined); @@ -239,7 +241,7 @@ export abstract class SchematicCommand< /* * Runtime hook to allow specifying customized workflow */ - protected createWorkflow(options: BaseSchematicSchema): workflow.BaseWorkflow { + protected async createWorkflow(options: BaseSchematicSchema): Promise { if (this._workflow) { return this._workflow; } @@ -250,7 +252,7 @@ export abstract class SchematicCommand< const workflow = new NodeWorkflow(fsHost, { force, dryRun, - packageManager: getPackageManager(this.workspace.root), + packageManager: await getPackageManager(this.workspace.root), root: normalize(this.workspace.root), registry: new schema.CoreSchemaRegistry(formats.standardFormats), }); @@ -293,12 +295,14 @@ export abstract class SchematicCommand< return undefined; }; - workflow.engineHost.registerOptionsTransform( - (schematic: FileSystemSchematicDescription, current: T) => ({ - ...getSchematicDefaults(schematic.collection.name, schematic.name, getProjectName()), - ...current, - }), - ); + const defaultOptionTransform = async ( + schematic: FileSystemSchematicDescription, + current: {}, + ) => ({ + ...(await getSchematicDefaults(schematic.collection.name, schematic.name, getProjectName())), + ...current, + }); + workflow.engineHost.registerOptionsTransform(defaultOptionTransform); if (options.defaults) { workflow.registry.addPreTransform(schema.transforms.addUndefinedDefaults); @@ -358,8 +362,8 @@ export abstract class SchematicCommand< return (this._workflow = workflow); } - protected getDefaultSchematicCollection(): string { - let workspace = getWorkspace('local'); + protected async getDefaultSchematicCollection(): Promise { + let workspace = await getWorkspace('local'); if (workspace) { const project = getProjectByCwd(workspace); @@ -377,7 +381,7 @@ export abstract class SchematicCommand< } } - workspace = getWorkspace('global'); + workspace = await getWorkspace('global'); if (workspace && workspace.getCli()) { const value = workspace.getCli()['defaultCollection']; if (typeof value == 'string') { @@ -473,7 +477,7 @@ export abstract class SchematicCommand< // Read the default values from the workspace. const projectName = input.project !== undefined ? '' + input.project : null; - const defaults = getSchematicDefaults(collectionName, schematicName, projectName); + const defaults = await getSchematicDefaults(collectionName, schematicName, projectName); input = { ...defaults, ...input, diff --git a/packages/angular/cli/utilities/config.ts b/packages/angular/cli/utilities/config.ts index 0fa93ce0e8b7..403f588c7795 100644 --- a/packages/angular/cli/utilities/config.ts +++ b/packages/angular/cli/utilities/config.ts @@ -55,9 +55,9 @@ function globalFilePath(): string | null { const cachedWorkspaces = new Map(); -export function getWorkspace( +export async function getWorkspace( level: 'local' | 'global' = 'local', -): experimental.workspace.Workspace | null { +): Promise { const cached = cachedWorkspaces.get(level); if (cached != undefined) { return cached; @@ -78,12 +78,9 @@ export function getWorkspace( new NodeJsSyncHost(), ); - let error: unknown; - workspace.loadWorkspaceFromHost(file).subscribe({ - error: e => error = e, - }); - - if (error) { + try { + await workspace.loadWorkspaceFromHost(file).toPromise(); + } catch (error) { throw new Error( `Workspace config file cannot be loaded: ${configPath}` + `\n${error instanceof Error ? error.message : error}`, @@ -133,20 +130,13 @@ export function getWorkspaceRaw( return [ast, configPath]; } -export function validateWorkspace(json: JsonObject) { +export async function validateWorkspace(json: JsonObject) { const workspace = new experimental.workspace.Workspace( normalize('.'), new NodeJsSyncHost(), ); - let error; - workspace.loadWorkspaceFromJson(json).subscribe({ - error: e => error = e, - }); - - if (error) { - throw error; - } + await workspace.loadWorkspaceFromJson(json).toPromise(); return true; } @@ -162,8 +152,8 @@ export function getProjectByCwd(workspace: experimental.workspace.Workspace): st } } -export function getConfiguredPackageManager(): string | null { - let workspace = getWorkspace('local'); +export async function getConfiguredPackageManager(): Promise { + let workspace = await getWorkspace('local'); if (workspace) { const project = getProjectByCwd(workspace); @@ -181,7 +171,7 @@ export function getConfiguredPackageManager(): string | null { } } - workspace = getWorkspace('global'); + workspace = await getWorkspace('global'); if (workspace && workspace.getCli()) { const value = workspace.getCli()['packageManager']; if (typeof value == 'string') { @@ -273,15 +263,15 @@ function getLegacyPackageManager(): string | null { return null; } -export function getSchematicDefaults( +export async function getSchematicDefaults( collection: string, schematic: string, project?: string | null, -): {} { +): Promise<{}> { let result = {}; const fullName = `${collection}:${schematic}`; - let workspace = getWorkspace('global'); + let workspace = await getWorkspace('global'); if (workspace && workspace.getSchematics()) { const schematicObject = workspace.getSchematics()[fullName]; if (schematicObject) { @@ -294,7 +284,7 @@ export function getSchematicDefaults( } - workspace = getWorkspace('local'); + workspace = await getWorkspace('local'); if (workspace) { if (workspace.getSchematics()) { @@ -324,8 +314,8 @@ export function getSchematicDefaults( return result; } -export function isWarningEnabled(warning: string): boolean { - let workspace = getWorkspace('local'); +export async function isWarningEnabled(warning: string): Promise { + let workspace = await getWorkspace('local'); if (workspace) { const project = getProjectByCwd(workspace); @@ -349,7 +339,7 @@ export function isWarningEnabled(warning: string): boolean { } } - workspace = getWorkspace('global'); + workspace = await getWorkspace('global'); if (workspace && workspace.getCli()) { const warnings = workspace.getCli()['warnings']; if (typeof warnings == 'object' && !Array.isArray(warnings)) { diff --git a/packages/angular/cli/utilities/package-manager.ts b/packages/angular/cli/utilities/package-manager.ts index bf948b1dda5f..ecc4ac78dc8e 100644 --- a/packages/angular/cli/utilities/package-manager.ts +++ b/packages/angular/cli/utilities/package-manager.ts @@ -28,8 +28,8 @@ export function supportsNpm(): boolean { return supports('npm'); } -export function getPackageManager(root: string): string { - let packageManager = getConfiguredPackageManager(); +export async function getPackageManager(root: string): Promise { + let packageManager = await getConfiguredPackageManager(); if (packageManager) { return packageManager; } From 16a1e4ca510d2ae551045b40e20c2a26e8331fdd Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 16 Aug 2019 05:22:16 +0000 Subject: [PATCH 0018/1070] build: update pacote to version 9.5.6 --- packages/angular/cli/package.json | 2 +- packages/schematics/update/package.json | 2 +- yarn.lock | 39 ++++++++++++++++--------- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index b25ad80ba9ae..c28065f3d6f5 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -37,7 +37,7 @@ "inquirer": "6.5.1", "npm-package-arg": "6.1.0", "open": "6.4.0", - "pacote": "9.5.5", + "pacote": "9.5.6", "read-package-tree": "5.3.1", "semver": "6.3.0", "symbol-observable": "1.2.0", diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index 477d312cd02c..67e086179ccd 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -15,7 +15,7 @@ "@angular-devkit/schematics": "0.0.0", "@yarnpkg/lockfile": "1.1.0", "ini": "1.3.5", - "pacote": "9.5.5", + "pacote": "9.5.6", "semver": "6.3.0", "semver-intersect": "1.4.0", "rxjs": "6.4.0" diff --git a/yarn.lock b/yarn.lock index 0b8b5cec7b4e..acff01045756 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2915,6 +2915,11 @@ chownr@^1.1.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== +chownr@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6" + integrity sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A== + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -7672,7 +7677,7 @@ minipass@^2.2.1, minipass@^2.3.3: safe-buffer "^5.1.2" yallist "^3.0.0" -minipass@^2.3.4, minipass@^2.3.5: +minipass@^2.3.5: version "2.3.5" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== @@ -7687,7 +7692,7 @@ minizlib@^1.1.0: dependencies: minipass "^2.2.1" -minizlib@^1.1.1: +minizlib@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== @@ -8465,13 +8470,14 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pacote@9.5.5: - version "9.5.5" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.5.tgz#63355a393614c3424e735820c3731e2cbbedaeeb" - integrity sha512-jAEP+Nqj4kyMWyNpfTU/Whx1jA7jEc5cCOlurm0/0oL+v8TAp1QSsK83N7bYe+2bEdFzMAtPG5TBebjzzGV0cA== +pacote@9.5.6: + version "9.5.6" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.6.tgz#1f749e25d82921941cf02e58e3312053940e5ea0" + integrity sha512-WyfTZU04KGx9h+ZD37vSmCK0KZMAPp2XTVhWdue7/1bAxBYM3YtyBGz1CNgiOvl3u5TYRT8RG4duhyXxQvaIxw== dependencies: bluebird "^3.5.3" cacache "^12.0.2" + chownr "^1.1.2" figgy-pudding "^3.5.1" get-stream "^4.1.0" glob "^7.1.3" @@ -8495,7 +8501,7 @@ pacote@9.5.5: safe-buffer "^5.1.2" semver "^5.6.0" ssri "^6.0.1" - tar "^4.4.8" + tar "^4.4.10" unique-filename "^1.1.1" which "^1.3.1" @@ -11012,18 +11018,18 @@ tar@^4, tar@^4.4.4, tar@^4.4.6: safe-buffer "^5.1.2" yallist "^3.0.2" -tar@^4.4.8: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== +tar@^4.4.10: + version "4.4.10" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" + integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" + minipass "^2.3.5" + minizlib "^1.2.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" - yallist "^3.0.2" + yallist "^3.0.3" temp@^0.9.0: version "0.9.0" @@ -12254,6 +12260,11 @@ yallist@^3.0.0, yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k= +yallist@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + yargs-parser@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" From 78b408f911f3cbe86dd40663ce41b6125c3d6b09 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Mon, 12 Aug 2019 17:52:39 +0200 Subject: [PATCH 0019/1070] fix(@schematics/angular): default interface for guard Currently, if the user hits `` before selecting an interface to implement, the CLI generates a broken guard that implements no interface. With this commit, the CLI forces a choice in interactive mode and generates a `CanActivate` guard by default. --- packages/schematics/angular/guard/index.ts | 20 ++++++++----------- .../schematics/angular/guard/index_spec.ts | 13 ++++++++++++ packages/schematics/angular/guard/schema.json | 10 +++++++++- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/packages/schematics/angular/guard/index.ts b/packages/schematics/angular/guard/index.ts index 0b16aefd4150..5f6627e773a2 100644 --- a/packages/schematics/angular/guard/index.ts +++ b/packages/schematics/angular/guard/index.ts @@ -22,7 +22,7 @@ import { import { applyLintFix } from '../utility/lint-fix'; import { parseName } from '../utility/parse-name'; import { createDefaultPath } from '../utility/workspace'; -import { Schema as GuardOptions } from './schema'; +import { Implement as GuardInterface, Schema as GuardOptions } from './schema'; export default function (options: GuardOptions): Rule { @@ -31,19 +31,15 @@ export default function (options: GuardOptions): Rule { options.path = await createDefaultPath(host, options.project as string); } - if (options.implements === undefined) { - options.implements = []; + if (!options.implements) { + throw new SchematicsException('Option "implements" is required.'); } - let implementations = ''; - let implementationImports = ''; - if (options.implements.length > 0) { - implementations = options.implements.join(', '); - implementationImports = `${implementations}, `; - // As long as we aren't in IE... ;) - if (options.implements.includes('CanLoad')) { - implementationImports = `${implementationImports}Route, UrlSegment, `; - } + const implementations = options.implements.join(', '); + let implementationImports = `${implementations}, `; + // As long as we aren't in IE... ;) + if (options.implements.includes(GuardInterface.CanLoad)) { + implementationImports = `${implementationImports}Route, UrlSegment, `; } const parsedPath = parseName(options.path, options.name); diff --git a/packages/schematics/angular/guard/index_spec.ts b/packages/schematics/angular/guard/index_spec.ts index b35068e82e76..01740b088f1f 100644 --- a/packages/schematics/angular/guard/index_spec.ts +++ b/packages/schematics/angular/guard/index_spec.ts @@ -105,4 +105,17 @@ describe('Guard Schematic', () => { expect(fileString).toContain(functionName); }); }); + + it('should use CanActivate if no implements value', async () => { + const options = { ...defaultOptions, implements: undefined }; + const tree = await schematicRunner.runSchematicAsync('guard', options, appTree) + .toPromise(); + const fileString = tree.readContent('/projects/bar/src/app/foo.guard.ts'); + expect(fileString).toContain('CanActivate'); + expect(fileString).toContain('canActivate'); + expect(fileString).not.toContain('CanActivateChild'); + expect(fileString).not.toContain('canActivateChild'); + expect(fileString).not.toContain('CanLoad'); + expect(fileString).not.toContain('canLoad'); + }); }); diff --git a/packages/schematics/angular/guard/schema.json b/packages/schematics/angular/guard/schema.json index e430e62ec7fb..64601452c5de 100644 --- a/packages/schematics/angular/guard/schema.json +++ b/packages/schematics/angular/guard/schema.json @@ -55,8 +55,16 @@ "description": "Specifies which interfaces to implement.", "uniqueItems": true, "items": { - "type": "string" + "enum": [ + "CanActivate", + "CanActivateChild", + "CanLoad" + ] }, + "default": [ + "CanActivate" + ], + "minItems": 1, "x-prompt": { "message": "Which interfaces would you like to implement?", "type": "list", From f7f5f5bdd1a367b18e8771f2497f9dbaadfb532f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 16 Aug 2019 20:20:07 +0200 Subject: [PATCH 0020/1070] fix(@schematics/angular): handle existence of un-referenced library prod tsconfig --- .../schematics/angular/migrations/update-9/ivy-libraries.ts | 4 +++- .../angular/migrations/update-9/ivy-libraries_spec.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts index a88f19946cf5..5d9fe6a0a560 100644 --- a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts @@ -114,5 +114,7 @@ function createTsConfig(tree: Tree, tsConfigPath: string) { }, }; - tree.create(tsConfigPath, JSON.stringify(tsConfigContent, undefined, 2)); + if (!tree.exists(tsConfigPath)) { + tree.create(tsConfigPath, JSON.stringify(tsConfigContent, undefined, 2)); + } } diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts index ecb42748b501..bd7ba0d0aea1 100644 --- a/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts @@ -59,6 +59,8 @@ describe('Migration to version 9', () => { tree, ) .toPromise(); + + tree.delete(libProdTsConfig); }); it(`should add 'tsConfig' option in production when configurations doesn't exists`, async () => { From d0f844d3d48b4bd0d913af8a7f40b3b2a2fd915d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 18 Aug 2019 01:41:38 +0000 Subject: [PATCH 0021/1070] build: update less to version 3.10.1 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 205d2c9240ee..e207bc2da595 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -26,7 +26,7 @@ "glob": "7.1.4", "istanbul-instrumenter-loader": "3.0.1", "karma-source-map-support": "1.4.0", - "less": "3.9.0", + "less": "3.10.1", "less-loader": "5.0.0", "license-webpack-plugin": "2.1.2", "loader-utils": "1.2.3", diff --git a/yarn.lock b/yarn.lock index acff01045756..e3f762b6460d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6950,10 +6950,10 @@ less-plugin-npm-import@^2.1.0: promise "~7.0.1" resolve "~1.1.6" -less@3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/less/-/less-3.9.0.tgz#b7511c43f37cf57dc87dffd9883ec121289b1474" - integrity sha512-31CmtPEZraNUtuUREYjSqRkeETFdyEHSEPAGq4erDlUXtda7pzNmctdljdIagSb589d/qXGWiiP31R5JVf+v0w== +less@3.10.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/less/-/less-3.10.1.tgz#a1c97e3436acdfd1757916333b9906f3af7d559e" + integrity sha512-xlPx6vt5nAm1DGDnuv06SNQba4WnMKY5vZkgCrnyKXkDbs09kl9cc2nSS7OMufLT60IWsxUSnwr1Rkh4rkMFcg== dependencies: clone "^2.1.2" optionalDependencies: From c1523d220abfef4cb652e1445b3e813b62ba07fb Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 17 Aug 2019 14:55:04 +0200 Subject: [PATCH 0022/1070] build: update @types/jasmine to version ~3.4.0 --- package.json | 2 +- .../angular/workspace/files/package.json.template | 2 +- .../schematics/blank/project-files/package.json.template | 2 +- .../schematics/schematics/schematic/files/package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index cf027a28b3db..2b867f757568 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "@types/express": "^4.16.0", "@types/glob": "^7.0.0", "@types/inquirer": "^0.0.44", - "@types/jasmine": "^3.3.8", + "@types/jasmine": "~3.4.0", "@types/karma": "^3.0.2", "@types/loader-utils": "^1.1.3", "@types/minimist": "^1.2.0", diff --git a/packages/schematics/angular/workspace/files/package.json.template b/packages/schematics/angular/workspace/files/package.json.template index af919bfc21de..ab9ca49e228d 100644 --- a/packages/schematics/angular/workspace/files/package.json.template +++ b/packages/schematics/angular/workspace/files/package.json.template @@ -28,7 +28,7 @@ "@angular/compiler-cli": "<%= latestVersions.Angular %>", "@angular/language-service": "<%= latestVersions.Angular %>", "@types/node": "~8.9.4",<% if (!minimal) { %> - "@types/jasmine": "~3.3.8", + "@types/jasmine": "~3.4.0", "@types/jasminewd2": "~2.0.3", "codelyzer": "^5.1.0", "jasmine-core": "~3.4.0", diff --git a/packages/schematics/schematics/blank/project-files/package.json.template b/packages/schematics/schematics/blank/project-files/package.json.template index 199b07a56b13..5a2498bcc700 100644 --- a/packages/schematics/schematics/blank/project-files/package.json.template +++ b/packages/schematics/schematics/blank/project-files/package.json.template @@ -19,7 +19,7 @@ }, "devDependencies": { "@types/node": "~8.9.4", - "@types/jasmine": "~3.3.8", + "@types/jasmine": "~3.4.0", "jasmine": "^3.4.0" } } diff --git a/packages/schematics/schematics/schematic/files/package.json b/packages/schematics/schematics/schematic/files/package.json index e9c1f1a0dbce..e1017624bf3e 100644 --- a/packages/schematics/schematics/schematic/files/package.json +++ b/packages/schematics/schematics/schematic/files/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "@types/node": "~8.9.4", - "@types/jasmine": "~3.3.8", + "@types/jasmine": "~3.4.0", "jasmine": "^3.4.0" } } diff --git a/yarn.lock b/yarn.lock index e3f762b6460d..46d1290d9119 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1073,10 +1073,10 @@ "@types/rx" "*" "@types/through" "*" -"@types/jasmine@^3.3.8": - version "3.3.8" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.3.8.tgz#fc6abd92f7121431685ec986f0ec8f77b4390a3e" - integrity sha512-BaOFpaddRVV8qykJoWHrHtamml880oh0+DIZWbtJgx0pu+KhDF1gER5hSfCIfzyMrbjMuYFnLUfyo1l0JUVU3Q== +"@types/jasmine@~3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.0.tgz#018c56db42400c092aae47de21f710b7f04e4b06" + integrity sha512-6pUnBg6DuSB55xnxJ5+gW9JOkFrPsXkYAuqqEE8oyrpgDiPQ+TZ+1Zt4S+CHcRJcxyNYXeIXG4vHSzdF6y9Uvw== "@types/karma@^3.0.2": version "3.0.2" From c61063e130d0d27001146e7b398d046222a456cb Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 20 Aug 2019 10:44:43 +0000 Subject: [PATCH 0023/1070] build: update stylus to version 0.54.6 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 41 ++++++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index e207bc2da595..b434f0136534 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -47,7 +47,7 @@ "source-map-loader": "0.2.4", "speed-measure-webpack-plugin": "1.3.1", "style-loader": "1.0.0", - "stylus": "0.54.5", + "stylus": "0.54.6", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", "terser": "4.1.4", diff --git a/yarn.lock b/yarn.lock index 46d1290d9119..f7a60ff53d2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3676,6 +3676,13 @@ css-parse@1.7.x: resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" integrity sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs= +css-parse@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-2.0.0.tgz#a468ee667c16d81ccf05c58c38d2a97c780dbfd4" + integrity sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q= + dependencies: + css "^2.0.0" + css-selector-tokenizer@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz#a177271a8bca5019172f4f891fc6eed9cbf68d5d" @@ -3685,6 +3692,16 @@ css-selector-tokenizer@^0.7.1: fastparse "^1.1.1" regexpu-core "^1.0.0" +css@^2.0.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" + integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== + dependencies: + inherits "^2.0.3" + source-map "^0.6.1" + source-map-resolve "^0.5.2" + urix "^0.1.0" + cssauron@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/cssauron/-/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8" @@ -7723,7 +7740,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1, mkdirp@~0.5.x: version "0.5.1" resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -9927,7 +9944,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@^2.1.2, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -9984,7 +10001,7 @@ sax@0.5.x: resolved "http://registry.npmjs.org/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE= -sax@>=0.6.0, sax@^1.2.4: +sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -10430,7 +10447,7 @@ source-map-loader@0.2.4: async "^2.5.0" loader-utils "^1.1.0" -source-map-resolve@^0.5.0: +source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== @@ -10947,7 +10964,21 @@ stylus-loader@3.0.2: lodash.clonedeep "^4.5.0" when "~3.6.x" -stylus@0.54.5, stylus@^0.54.5: +stylus@0.54.6: + version "0.54.6" + resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.6.tgz#e8d0c540efd748075c763763f955946ab36f0f66" + integrity sha512-6s7jEoHKSdAaEtfOnGCNJWy7rcgxPf/pdSUUCusnfV6qO28OmmOLAUYeIJIgJlXWfWTwDO9ytRdd8KhxIdB4EQ== + dependencies: + css-parse "~2.0.0" + debug "~3.1.0" + glob "^7.1.3" + mkdirp "~0.5.x" + safer-buffer "^2.1.2" + sax "~1.2.4" + semver "^6.0.0" + source-map "^0.7.3" + +stylus@^0.54.5: version "0.54.5" resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" integrity sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk= From ac22acce8567b29929bed2e889da47d2e2c339ba Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 20 Aug 2019 05:19:22 +0000 Subject: [PATCH 0024/1070] build: update terser to version 4.2.0 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index b434f0136534..82a485796be9 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -50,7 +50,7 @@ "stylus": "0.54.6", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", - "terser": "4.1.4", + "terser": "4.2.0", "terser-webpack-plugin": "1.4.1", "webpack": "4.39.2", "webpack-dev-middleware": "3.7.0", diff --git a/yarn.lock b/yarn.lock index f7a60ff53d2b..358ef46f28e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11091,10 +11091,10 @@ terser-webpack-plugin@1.4.1, terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.1.4.tgz#4478b6a08bb096a61e793fea1a4434408bab936c" - integrity sha512-+ZwXJvdSwbd60jG0Illav0F06GDJF0R4ydZ21Q3wGAFKoBGyJGo34F63vzJHgvYxc1ukOtIjvwEvl9MkjzM6Pg== +terser@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.2.0.tgz#4b1b5f4424b426a7a47e80d6aae45e0d7979aef0" + integrity sha512-6lPt7lZdZ/13icQJp8XasFOwZjFJkxFFIb/N1fhYEQNoNI3Ilo3KABZ9OocZvZoB39r6SiIk/0+v/bt8nZoSeA== dependencies: commander "^2.20.0" source-map "~0.6.1" From b738f3a2f5abbbeaddc02b19cd375e7f83622b00 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 17 Aug 2019 06:20:53 +0000 Subject: [PATCH 0025/1070] build: update sass to version 1.22.10 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 82a485796be9..325c39f510b8 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -39,7 +39,7 @@ "postcss-loader": "3.0.0", "raw-loader": "3.1.0", "rxjs": "6.4.0", - "sass": "1.22.9", + "sass": "1.22.10", "sass-loader": "7.2.0", "semver": "6.3.0", "source-map": "0.7.3", diff --git a/yarn.lock b/yarn.lock index 358ef46f28e3..e62d64faac84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9960,10 +9960,10 @@ sass-loader@7.2.0: pify "^4.0.1" semver "^5.5.0" -sass@1.22.9: - version "1.22.9" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.22.9.tgz#41a2ed6038027f58be2bd5041293452a29c2cb84" - integrity sha512-FzU1X2V8DlnqabrL4u7OBwD2vcOzNMongEJEx3xMEhWY/v26FFR3aG0hyeu2T965sfR0E9ufJwmG+Qjz78vFPQ== +sass@1.22.10: + version "1.22.10" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.22.10.tgz#b9f01440352ba0be5d99fa64a2040b035cc6e5ff" + integrity sha512-DUpS1tVMGCH6gr/N9cXCoemrjoNdOLhAHfQ37fJw2A5ZM4gSI9ej/8Xi95Xwus03RqZ2zdSnKZGULL7oS+jfMA== dependencies: chokidar ">=2.0.0 <4.0.0" From e84e28a5402313dcd9bd1641802f67ecf2a937d6 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 20 Aug 2019 05:19:02 +0000 Subject: [PATCH 0026/1070] build: update pacote to version 9.5.8 --- packages/angular/cli/package.json | 2 +- packages/schematics/update/package.json | 2 +- yarn.lock | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index c28065f3d6f5..80d077ed57f0 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -37,7 +37,7 @@ "inquirer": "6.5.1", "npm-package-arg": "6.1.0", "open": "6.4.0", - "pacote": "9.5.6", + "pacote": "9.5.8", "read-package-tree": "5.3.1", "semver": "6.3.0", "symbol-observable": "1.2.0", diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index 67e086179ccd..0cf9ac252c38 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -15,7 +15,7 @@ "@angular-devkit/schematics": "0.0.0", "@yarnpkg/lockfile": "1.1.0", "ini": "1.3.5", - "pacote": "9.5.6", + "pacote": "9.5.8", "semver": "6.3.0", "semver-intersect": "1.4.0", "rxjs": "6.4.0" diff --git a/yarn.lock b/yarn.lock index e62d64faac84..173d1615e216 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8092,6 +8092,15 @@ npm-pick-manifest@^2.2.3: npm-package-arg "^6.0.0" semver "^5.4.1" +npm-pick-manifest@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.0.tgz#c94cab52d201a85875e45198fffe1a8a348e7af7" + integrity sha512-H+OnFudiq38Qj8P8xcesD/1Xa0Kvr2QRn1DTlephIwNfJg3P30Szc1wtpGEgdPXfAyKZKT2ajIM2X8YtCrbXrA== + dependencies: + figgy-pudding "^3.5.1" + npm-package-arg "^6.0.0" + semver "^5.4.1" + npm-registry-client@8.6.0: version "8.6.0" resolved "https://registry.yarnpkg.com/npm-registry-client/-/npm-registry-client-8.6.0.tgz#7f1529f91450732e89f8518e0f21459deea3e4c4" @@ -8487,10 +8496,10 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pacote@9.5.6: - version "9.5.6" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.6.tgz#1f749e25d82921941cf02e58e3312053940e5ea0" - integrity sha512-WyfTZU04KGx9h+ZD37vSmCK0KZMAPp2XTVhWdue7/1bAxBYM3YtyBGz1CNgiOvl3u5TYRT8RG4duhyXxQvaIxw== +pacote@9.5.8: + version "9.5.8" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.8.tgz#23480efdc4fa74515855c9ecf39cf64078f99786" + integrity sha512-0Tl8Oi/K0Lo4MZmH0/6IsT3gpGf9eEAznLXEQPKgPq7FscnbUOyopnVpwXlnQdIbCUaojWy1Wd7VMyqfVsRrIw== dependencies: bluebird "^3.5.3" cacache "^12.0.2" @@ -8508,7 +8517,7 @@ pacote@9.5.6: normalize-package-data "^2.4.0" npm-package-arg "^6.1.0" npm-packlist "^1.1.12" - npm-pick-manifest "^2.2.3" + npm-pick-manifest "^3.0.0" npm-registry-fetch "^4.0.0" osenv "^0.1.5" promise-inflight "^1.0.1" From c08ca3118897a66373326af83e07ff5c1982b5ad Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 17 Aug 2019 14:37:53 +0200 Subject: [PATCH 0027/1070] test: add replace_resources tests without helpers --- .../webpack/src/transformers/ast_helpers.ts | 11 +++- .../transformers/replace_resources_spec.ts | 55 ++++++++++++++++++- 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/packages/ngtools/webpack/src/transformers/ast_helpers.ts b/packages/ngtools/webpack/src/transformers/ast_helpers.ts index 7ef8ec366a5b..1e850d938d84 100644 --- a/packages/ngtools/webpack/src/transformers/ast_helpers.ts +++ b/packages/ngtools/webpack/src/transformers/ast_helpers.ts @@ -56,6 +56,7 @@ export function createTypescriptContext( content: string, additionalFiles?: Record, useLibs = false, + importHelpers = true, ) { // Set compiler options. const compilerOptions: ts.CompilerOptions = { @@ -67,7 +68,7 @@ export function createTypescriptContext( target: ts.ScriptTarget.ESNext, skipLibCheck: true, sourceMap: false, - importHelpers: true, + importHelpers, }; // Create compiler host. @@ -112,8 +113,12 @@ export function transformTypescript( // Use given context or create a new one. if (content !== undefined) { const typescriptContext = createTypescriptContext(content); - program = typescriptContext.program; - compilerHost = typescriptContext.compilerHost; + if (!program) { + program = typescriptContext.program; + } + if (!compilerHost) { + compilerHost = typescriptContext.compilerHost; + } } else if (!program || !compilerHost) { throw new Error('transformTypescript needs either `content` or a `program` and `compilerHost'); } diff --git a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts index b64870102e2e..db1a4cb752cd 100644 --- a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts @@ -9,13 +9,19 @@ import { tags } from '@angular-devkit/core'; // tslint:disable-line:no-implicit import { createTypescriptContext, transformTypescript } from './ast_helpers'; import { replaceResources } from './replace_resources'; -function transform(input: string, shouldTransform = true, directTemplateLoading = true) { - const { program } = createTypescriptContext(input); +function transform( + input: string, + shouldTransform = true, + directTemplateLoading = true, + importHelpers = true, +) { + const { program, compilerHost } = + createTypescriptContext(input, undefined, undefined, importHelpers); const getTypeChecker = () => program.getTypeChecker(); const transformer = replaceResources( () => shouldTransform, getTypeChecker, directTemplateLoading); - return transformTypescript(input, [transformer]); + return transformTypescript(input, [transformer], program, compilerHost); } // tslint:disable-next-line:no-big-function @@ -58,6 +64,49 @@ describe('@ngtools/webpack transformers', () => { expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); + it(`should replace resources and add helper when 'importHelpers' is false`, () => { + const input = tags.stripIndent` + import { Component } from '@angular/core'; + + @Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css', './app.component.2.css'] + }) + export class AppComponent { + title = 'app'; + } + `; + const output = tags.stripIndent` + var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null + ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" + && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) + if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; + + var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; + + import { Component } from '@angular/core'; + + let AppComponent = class AppComponent { + constructor() { + this.title = 'app'; + } + }; + AppComponent = __decorate([ + Component({ + selector: 'app-root', + template: __importDefault(require("!raw-loader!./app.component.html")).default, + styles: [__importDefault(require("./app.component.css")).default, __importDefault(require("./app.component.2.css")).default] + }) + ], AppComponent); + export { AppComponent }; + `; + + const result = transform(input, undefined, undefined, false); + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); + }); + it('should not replace resources when directTemplateLoading is false', () => { const input = tags.stripIndent` import { Component } from '@angular/core'; From 426c1da8a0ffdf79ffe7c9a995b72cbe52ff9ab5 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 19 Aug 2019 21:20:23 +0200 Subject: [PATCH 0028/1070] feat(@schematics/angular): hide universal schematic The universal schematic by itself doesn't get you a working server application. BREAKING CHANGE: universal schematic is now hidden and cannot be used with the `ng generate` command. Users who want a working universal application should use `ng add @nguniversal/express-engine` or `ng add @nguniversal/hapi-engine` Closes: #15166 --- packages/schematics/angular/collection.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/collection.json b/packages/schematics/angular/collection.json index 75f507d8346d..76778ddc947c 100644 --- a/packages/schematics/angular/collection.json +++ b/packages/schematics/angular/collection.json @@ -87,7 +87,8 @@ "universal": { "factory": "./universal", "description": "Create an Angular universal app.", - "schema": "./universal/schema.json" + "schema": "./universal/schema.json", + "hidden": true }, "appShell": { "aliases": [ "app-shell" ], From 0af2eb175cd8b13751552694b244308a1cf078b2 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 20 Aug 2019 18:01:50 +0200 Subject: [PATCH 0029/1070] test: update platform-server e2e to use `@nguniversal/express-engine` --- .../e2e/tests/build/platform-server.ts | 200 +++--------------- 1 file changed, 28 insertions(+), 172 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index ff76d08627fe..dc1d2b07b7a4 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -1,192 +1,48 @@ import { normalize } from 'path'; import { getGlobalVariable } from '../../utils/env'; -import { appendToFile, expectFileToMatch, prependToFile, writeFile } from '../../utils/fs'; +import { expectFileToMatch, writeFile } from '../../utils/fs'; import { exec, ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { readNgVersion } from '../../utils/version'; -export default function() { - let platformServerVersion = readNgVersion(); - - if (getGlobalVariable('argv')['ng-snapshots']) { - platformServerVersion = 'github:angular/platform-server-builds'; - } - +export default async function () { // Skip this test in Angular 2/4. if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) { - return Promise.resolve(); + return; } - return ( - Promise.resolve() - .then(() => - updateJsonFile('package.json', packageJson => { - const dependencies = packageJson['dependencies']; - dependencies['@angular/platform-server'] = platformServerVersion; - }), - ) - .then(() => - updateJsonFile('angular.json', workspaceJson => { - const appArchitect = workspaceJson.projects['test-project'].architect; - appArchitect['server'] = { - builder: '@angular-devkit/build-angular:server', - options: { - outputPath: 'dist/test-project-server', - main: 'src/main.server.ts', - tsConfig: 'tsconfig.server.json', - }, - }; - }), - ) - .then(() => - writeFile( - './tsconfig.server.json', - ` - { - "extends": "./tsconfig.app.json", - "compilerOptions": { - "outDir": "../dist-server", - "baseUrl": "./", - "module": "commonjs", - "types": [] - }, - "files": [ - "src/main.server.ts" - ], - "include": [ - "src/**/*.d.ts" - ], - "angularCompilerOptions": { - "entryModule": "src/app/app.server.module#AppServerModule" - } - } - `, - ), - ) - .then(() => - writeFile( - './src/main.server.ts', - ` - import { enableProdMode } from '@angular/core'; - - import { environment } from './environments/environment'; - - if (environment.production) { - enableProdMode(); - } + await ng('add', '@nguniversal/express-engine', '--client-project', 'test-project'); - export { AppServerModule } from './app/app.server.module'; - `, - ), - ) - .then(() => - writeFile( - './src/app/app.server.module.ts', - ` - import { NgModule } from '@angular/core'; - import { BrowserModule } from '@angular/platform-browser'; - import { ServerModule } from '@angular/platform-server'; + await updateJsonFile('package.json', packageJson => { + const dependencies = packageJson['dependencies']; + dependencies['@angular/platform-server'] = getGlobalVariable('argv')['ng-snapshots'] + ? 'github:angular/platform-server-builds' + : readNgVersion(); + }); - import { AppModule } from './app.module'; - import { AppComponent } from './app.component'; + await silentNpm('install'); + await ng('run', 'test-project:server:production'); + await expectFileToMatch('dist/server/main.js', /exports.*AppServerModuleNgFactory/); - @NgModule({ - imports: [ - AppModule, - BrowserModule.withServerTransition(\{ appId: 'app' \}), - ServerModule, - ], - bootstrap: [AppComponent], - }) - export class AppServerModule {} - `, - ), - ) - .then(() => silentNpm('install')) - // This part of the test requires a non-aot build, which isn't available anymore. - // .then(() => ng('run', 'test-project:server')) - // // files were created successfully - // .then(() => expectFileToMatch('dist/test-project-server/main.js', - // /exports.*AppServerModule/)) - // .then(() => writeFile('./index.js', ` - // require('zone.js/dist/zone-node'); - // require('reflect-metadata'); - // const fs = require('fs'); - // const \{ AppServerModule \} = require('./dist/test-project-server/main'); - // const \{ renderModule \} = require('@angular/platform-server'); - - // renderModule(AppServerModule, \{ - // url: '/', - // document: '' - // \}).then(html => \{ - // fs.writeFileSync('dist/test-project-server/index.html', html); - // \}); - // `)) - // .then(() => exec(normalize('node'), 'index.js')) - // .then(() => expectFileToMatch('dist/test-project-server/index.html', - // new RegExp('

Here are some links to help you start:

'))) - .then(() => ng('run', 'test-project:server')) - // files were created successfully - .then(() => - expectFileToMatch('dist/test-project-server/main.js', /exports.*AppServerModuleNgFactory/), - ) - .then(() => - writeFile( - './index.js', - ` - require('zone.js/dist/zone-node'); - require('reflect-metadata'); + await writeFile( + './index.js', + ` require('zone.js/dist/zone-node'); const fs = require('fs'); - const \{ AppServerModuleNgFactory \} = require('./dist/test-project-server/main'); - const \{ renderModuleFactory \} = require('@angular/platform-server'); + const { AppServerModuleNgFactory } = require('./dist/server/main'); + const { renderModuleFactory } = require('@angular/platform-server'); - renderModuleFactory(AppServerModuleNgFactory, \{ + renderModuleFactory(AppServerModuleNgFactory, { url: '/', document: '' - \}).then(html => \{ - fs.writeFileSync('dist/test-project-server/index.html', html); - \}); - `, - ), - ) - .then(() => exec(normalize('node'), 'index.js')) - .then(() => - expectFileToMatch( - 'dist/test-project-server/index.html', - /Here are some links to help you get started:<\/p>/, - ), - ) - .then(() => - expectFileToMatch( - './dist/test-project-server/main.js', - /require\(["']@angular\/[^"']*["']\)/, - ), - ) - - // Check externals. - .then(() => - prependToFile( - './src/app/app.server.module.ts', - ` - import 'zone.js/dist/zone-node'; - import 'reflect-metadata'; - `, - ).then(() => - appendToFile( - './src/app/app.server.module.ts', - ` - import * as fs from 'fs'; - import { renderModule } from '@angular/platform-server'; + }).then(html => { + fs.writeFileSync('dist/server/index.html', html); + }); + `, + ); - renderModule(AppModule, \{ - url: '/', - document: '' - \}).then(html => \{ - fs.writeFileSync('dist/test-project-server/index.html', html); - \}); - `, - ), - ), - ) + await exec(normalize('node'), 'index.js'); + await expectFileToMatch( + 'dist/server/index.html', + /Here are some links to help you get started:<\/p>/, ); } From 0aae1476218c95a38527877e15ae55ba68913400 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 19 Aug 2019 23:26:18 +0000 Subject: [PATCH 0030/1070] build: update @angular/animations to version --- .../angular_devkit/build_angular/package.json | 4 ++-- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- yarn.lock | 16 +++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 325c39f510b8..5acf0c2748fb 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -63,13 +63,13 @@ }, "devDependencies": { "@angular/animations": "~9.0.0-next.2", - "@angular/cdk": "~8.0.0", + "@angular/cdk": "~8.1.0", "@angular/common": "~9.0.0-next.2", "@angular/compiler": "~9.0.0-next.2", "@angular/compiler-cli": "~9.0.0-next.2", "@angular/core": "~9.0.0-next.2", "@angular/forms": "~9.0.0-next.2", - "@angular/material": "~8.0.0", + "@angular/material": "~8.1.0", "@angular/platform-browser": "~9.0.0-next.2", "@angular/platform-browser-dynamic": "~9.0.0-next.2", "@angular/platform-server": "~9.0.0-next.2", diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 6d6077cb5d87..0fea1f48bc0d 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#dc23c0698ccd26aa48670f1a015ce4e709c9fc93", - "@angular/common": "github:angular/common-builds#ec5e60f5d9348717a3eac19e87d2a1ee71219196", - "@angular/compiler": "github:angular/compiler-builds#1cf109145d632552632237e67231bf8a0511daa1", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#0c6726db74da4e1425da79b26e77486216ef9666", - "@angular/core": "github:angular/core-builds#ff105b526f347f94b48d59438313af01dadb8ed0", - "@angular/forms": "github:angular/forms-builds#6d000e1a5cd9be00cbdf5fc6ca2b3d407e85901b", - "@angular/language-service": "github:angular/language-service-builds#04aa90abe2465bdabb4aa0280bc8b7d799dd8fab", - "@angular/platform-browser": "github:angular/platform-browser-builds#3d420fec387959458033c6cdb3af8df5c1196e41", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#902ffd532abad986f2817ea3cda4100d5af1e448", - "@angular/router": "github:angular/router-builds#534e41132c1e97daea7a1c56016a39bd031c6b1d" + "@angular/animations": "github:angular/animations-builds#d6e49a8770d0c33d82c77e65325e295bc5b725e9", + "@angular/common": "github:angular/common-builds#12f53a08712e2c778aeb321987dd77cbced3fbe9", + "@angular/compiler": "github:angular/compiler-builds#ec017a938a195b11c76090caa7304053b1ae6c6a", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#8f61a2abcbd8a6d2e50a31157abfa8f3c138728d", + "@angular/core": "github:angular/core-builds#d2aaf40bd57a3d0127a6a3befd6a7820587c171a", + "@angular/forms": "github:angular/forms-builds#2466c18494a4c7ed7956c38dab2e10966b300050", + "@angular/language-service": "github:angular/language-service-builds#71a72db5ef13614220e6d7a2b6467a2cb6fb1c60", + "@angular/platform-browser": "github:angular/platform-browser-builds#9af9808d0232a6a9f7c0815a8a8123d2094a5da9", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d8062fef6123f8e721c3e9cc3a109c459003837b", + "@angular/router": "github:angular/router-builds#3c85c998600101cff08ec3060541ef733f36372d" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 173d1615e216..be94d1f7b99b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,10 +9,10 @@ dependencies: tslib "^1.9.0" -"@angular/cdk@~8.0.0": - version "8.0.2" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.0.2.tgz#599b7fd06caed8cbea41f8f7874ddcea5dfc99ce" - integrity sha512-Tv9M0vuTp7Ogk7mRiEpzBG9x5289FXe+WH0VKqN4zTzF/taTgGEuJBLDcFrwQMW0mFpGP7acVOiopgH+nClytg== +"@angular/cdk@~8.1.0": + version "8.1.3" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.1.3.tgz#c791b4ae950bd015c4f618204e4f974e2dd64254" + integrity sha512-+DOS6x05/nNdnoRmEi3bgQxKym34PeCRGD6dimdw0l7ZgM57qhlaBWo0dXB7QSyR9E44uVT91e4h8ye+/ne1DQ== dependencies: tslib "^1.7.1" optionalDependencies: @@ -62,10 +62,10 @@ dependencies: tslib "^1.9.0" -"@angular/material@~8.0.0": - version "8.0.2" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.0.2.tgz#c648e0f52d94b37e3dddfd879223202aa0d11587" - integrity sha512-Q6YxX7zLsfI1kv0dSJSENSyCuwq7GdHjHzOGeogGfjQRvX3N/ty/z8YfwhQFzZ3XtIysbhuGcpAUWazgWeIKgw== +"@angular/material@~8.1.0": + version "8.1.3" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.1.3.tgz#1e65a6e02196348413cb073da3255771116c7618" + integrity sha512-qZVWrJ/EO1y0lJCy7pe536RlYiih3p3fQzj7tgus7JdOpspyF+zBLzn8gNrdAFACXpVWwq2kLorieoR3BB47ZQ== dependencies: tslib "^1.7.1" From d1488e66a4637b05e7c9fe5d4d6d79b8b913d783 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 16 Aug 2019 11:36:11 -0400 Subject: [PATCH 0031/1070] refactor(@angular-devkit/build-angular): cache downlevel bundles --- package.json | 1 + .../angular_devkit/build_angular/package.json | 2 + .../build_angular/src/browser/index.ts | 160 +++++++++++++++--- .../build_angular/src/utils/process-bundle.ts | 54 +++++- .../e2e/tests/build/differential-cache.ts | 83 +++++++++ yarn.lock | 97 ++++++++--- 6 files changed, 347 insertions(+), 50 deletions(-) create mode 100644 tests/legacy-cli/e2e/tests/build/differential-cache.ts diff --git a/package.json b/package.json index 2b867f757568..9ba21c3b64bb 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "@types/clean-css": "^4.2.1", "@types/copy-webpack-plugin": "^4.4.1", "@types/express": "^4.16.0", + "@types/find-cache-dir": "^2.0.0", "@types/glob": "^7.0.0", "@types/inquirer": "^0.0.44", "@types/jasmine": "~3.4.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 5acf0c2748fb..40aca5aba06c 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -17,12 +17,14 @@ "ajv": "6.10.2", "autoprefixer": "9.6.1", "browserslist": "4.6.6", + "cacache": "12.0.2", "caniuse-lite": "1.0.30000989", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", "core-js": "3.2.1", "file-loader": "4.2.0", + "find-cache-dir": "3.0.0", "glob": "7.1.4", "istanbul-instrumenter-loader": "3.0.1", "karma-source-map-support": "1.4.0", diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 96f21cb59f75..fb89ad2fee10 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -24,7 +24,10 @@ import { virtualFs, } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { createHash } from 'crypto'; +import * as findCacheDirectory from 'find-cache-dir'; import * as fs from 'fs'; +import * as os from 'os'; import * as path from 'path'; import { from, of } from 'rxjs'; import { bufferCount, catchError, concatMap, map, mergeScan, switchMap } from 'rxjs/operators'; @@ -62,6 +65,7 @@ import { normalizeOptimization, normalizeSourceMaps, } from '../utils'; +import { CacheKey, ProcessBundleOptions } from '../utils/process-bundle'; import { assertCompatibleAngularVersion } from '../utils/version'; import { generateBrowserWebpackConfigFromContext, @@ -70,6 +74,10 @@ import { } from '../utils/webpack-browser-config'; import { Schema as BrowserBuilderSchema } from './schema'; +const cacache = require('cacache'); +const cacheDownlevelPath = findCacheDirectory({ name: 'angular-build-dl' }); +const packageVersion = require('../../package.json').version; + export type BrowserBuilderOutput = json.JsonObject & BuilderOutput & { outputPath: string; @@ -240,6 +248,7 @@ export function buildWebpackBrowser( 1, ), bufferCount(configs.length), + // tslint:disable-next-line: no-big-function switchMap(async buildEvents => { configs.length = 0; const success = buildEvents.every(r => r.success); @@ -274,9 +283,10 @@ export function buildWebpackBrowser( optimize: normalizeOptimization(options.optimization).scripts, sourceMaps: sourceMapOptions.scripts, hiddenSourceMaps: sourceMapOptions.hidden, + vendorSourceMaps: sourceMapOptions.vendor, }; - const actions: {}[] = []; + const actions: ProcessBundleOptions[] = []; const seen = new Set(); for (const file of emittedFiles) { // Scripts and non-javascript files are not processed @@ -348,6 +358,7 @@ export function buildWebpackBrowser( code, map, runtime: file.file.startsWith('runtime'), + ignoreOriginal: es5Polyfills, }); // Add the newly created ES5 bundles to the index as nomodule scripts @@ -359,30 +370,133 @@ export function buildWebpackBrowser( // Execute the bundle processing actions context.logger.info('Generating ES5 bundles for differential loading...'); - await new Promise((resolve, reject) => { - const workerFile = require.resolve('../utils/process-bundle'); - const workers = workerFarm( - { - maxRetries: 1, - }, - path.extname(workerFile) !== '.ts' - ? workerFile - : require.resolve('../utils/process-bundle-bootstrap'), - ['process'], - ); - let completed = 0; - const workCallback = (error: Error | null) => { - if (error) { - workerFarm.end(workers); - reject(error); - } else if (++completed === actions.length) { - workerFarm.end(workers); - resolve(); + + const processActions: typeof actions = []; + const cacheActions: { src: string; dest: string }[] = []; + for (const action of actions) { + // Create base cache key with elements: + // * package version - different build-angular versions cause different final outputs + // * code length/hash - ensure cached version matches the same input code + const codeHash = createHash('sha1') + .update(action.code) + .digest('hex'); + const baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`; + + // Postfix added to sourcemap cache keys when vendor sourcemaps are present + // Allows non-destructive caching of both variants + const SourceMapVendorPostfix = + !!action.sourceMaps && action.vendorSourceMaps ? '|vendor' : ''; + + // Determine cache entries required based on build settings + const cacheKeys = []; + + // If optimizing and the original is not ignored, add original as required + if ((action.optimize || action.optimizeOnly) && !action.ignoreOriginal) { + cacheKeys[CacheKey.OriginalCode] = baseCacheKey + '|orig'; + + // If sourcemaps are enabled, add original sourcemap as required + if (action.sourceMaps) { + cacheKeys[CacheKey.OriginalMap] = + baseCacheKey + SourceMapVendorPostfix + '|orig-map'; + } + } + // If not only optimizing, add downlevel as required + if (!action.optimizeOnly) { + cacheKeys[CacheKey.DownlevelCode] = baseCacheKey + '|dl'; + + // If sourcemaps are enabled, add downlevel sourcemap as required + if (action.sourceMaps) { + cacheKeys[CacheKey.DownlevelMap] = + baseCacheKey + SourceMapVendorPostfix + '|dl-map'; + } + } + + // Attempt to get required cache entries + const cacheEntries = []; + for (const key of cacheKeys) { + if (key) { + cacheEntries.push(await cacache.get.info(cacheDownlevelPath, key)); + } else { + cacheEntries.push(null); + } + } + + // Check if required cache entries are present + let cached = cacheKeys.length > 0; + for (let i = 0; i < cacheKeys.length; ++i) { + if (cacheKeys[i] && !cacheEntries[i]) { + cached = false; + break; + } + } + + // If all required cached entries are present, use the cached entries + // Otherwise process the files + if (cached) { + if (cacheEntries[CacheKey.OriginalCode]) { + cacheActions.push({ + src: cacheEntries[CacheKey.OriginalCode].path, + dest: action.filename, + }); } - }; + if (cacheEntries[CacheKey.OriginalMap]) { + cacheActions.push({ + src: cacheEntries[CacheKey.OriginalMap].path, + dest: action.filename + '.map', + }); + } + if (cacheEntries[CacheKey.DownlevelCode]) { + cacheActions.push({ + src: cacheEntries[CacheKey.DownlevelCode].path, + dest: action.filename.replace('es2015', 'es5'), + }); + } + if (cacheEntries[CacheKey.DownlevelMap]) { + cacheActions.push({ + src: cacheEntries[CacheKey.DownlevelMap].path, + dest: action.filename.replace('es2015', 'es5') + '.map', + }); + } + } else { + processActions.push({ + ...action, + cacheKeys, + cachePath: cacheDownlevelPath || undefined, + }); + } + } + + for (const action of cacheActions) { + fs.copyFileSync(action.src, action.dest, fs.constants.COPYFILE_FICLONE); + } + + if (processActions.length > 0) { + await new Promise((resolve, reject) => { + const workerFile = require.resolve('../utils/process-bundle'); + const workers = workerFarm( + { + maxRetries: 1, + }, + path.extname(workerFile) !== '.ts' + ? workerFile + : require.resolve('../utils/process-bundle-bootstrap'), + ['process'], + ); + let completed = 0; + const workCallback = (error: Error | null) => { + if (error) { + workerFarm.end(workers); + reject(error); + } else if (++completed === processActions.length) { + workerFarm.end(workers); + resolve(); + } + }; + + processActions.forEach(action => workers['process'](action, workCallback)); + }); + } - actions.forEach(action => workers['process'](action, workCallback)); - }); context.logger.info('ES5 bundle generation complete.'); } else { const { emittedFiles = [] } = firstBuild; diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 6ed9cc5900a5..48d3d26873a1 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -11,16 +11,28 @@ import { SourceMapConsumer, SourceMapGenerator } from 'source-map'; import { minify } from 'terser'; const { transformAsync } = require('@babel/core'); +const cacache = require('cacache'); -interface ProcessBundleOptions { +export interface ProcessBundleOptions { filename: string; code: string; map?: string; - sourceMaps: boolean; - hiddenSourceMaps: boolean; - runtime: boolean; + sourceMaps?: boolean; + hiddenSourceMaps?: boolean; + vendorSourceMaps?: boolean; + runtime?: boolean; optimize: boolean; optimizeOnly?: boolean; + ignoreOriginal?: boolean; + cacheKeys?: (string | null)[]; + cachePath?: string; +} + +export const enum CacheKey { + OriginalCode = 0, + OriginalMap = 1, + DownlevelCode = 2, + DownlevelMap = 3, } export function process( @@ -31,6 +43,10 @@ export function process( } async function processWorker(options: ProcessBundleOptions): Promise { + if (!options.cacheKeys) { + options.cacheKeys = []; + } + // If no downlevelling required than just mangle code and return if (options.optimizeOnly) { return mangleOriginal(options); @@ -139,7 +155,9 @@ async function processWorker(options: ProcessBundleOptions): Promise { map = result.map; // Mangle original code - mangleOriginal(options); + if (!options.ignoreOriginal) { + await mangleOriginal(options); + } } else if (map) { map = JSON.stringify(map); } @@ -149,13 +167,20 @@ async function processWorker(options: ProcessBundleOptions): Promise { code += `\n//# sourceMappingURL=${path.basename(newFilePath)}.map`; } + if (options.cachePath && options.cacheKeys[CacheKey.DownlevelMap]) { + await cacache.put(options.cachePath, options.cacheKeys[CacheKey.DownlevelMap], map); + } + fs.writeFileSync(newFilePath + '.map', map); } + if (options.cachePath && options.cacheKeys[CacheKey.DownlevelCode]) { + await cacache.put(options.cachePath, options.cacheKeys[CacheKey.DownlevelCode], code); + } fs.writeFileSync(newFilePath, code); } -function mangleOriginal(options: ProcessBundleOptions): void { +async function mangleOriginal(options: ProcessBundleOptions): Promise { const resultOriginal = minify(options.code, { compress: false, ecma: 6, @@ -176,8 +201,25 @@ function mangleOriginal(options: ProcessBundleOptions): void { throw resultOriginal.error; } + if (options.cachePath && options.cacheKeys && options.cacheKeys[CacheKey.OriginalCode]) { + await cacache.put( + options.cachePath, + options.cacheKeys[CacheKey.OriginalCode], + resultOriginal.code, + ); + } + fs.writeFileSync(options.filename, resultOriginal.code); + if (resultOriginal.map) { + if (options.cachePath && options.cacheKeys && options.cacheKeys[CacheKey.OriginalMap]) { + await cacache.put( + options.cachePath, + options.cacheKeys[CacheKey.OriginalMap], + resultOriginal.map, + ); + } + fs.writeFileSync(options.filename + '.map', resultOriginal.map); } } diff --git a/tests/legacy-cli/e2e/tests/build/differential-cache.ts b/tests/legacy-cli/e2e/tests/build/differential-cache.ts new file mode 100644 index 000000000000..fe9fc766a1ae --- /dev/null +++ b/tests/legacy-cli/e2e/tests/build/differential-cache.ts @@ -0,0 +1,83 @@ +import * as crypto from 'crypto'; +import * as fs from 'fs'; +import { rimraf } from '../../utils/fs'; +import { ng } from '../../utils/process'; + +function generateFileHashMap(): Map { + const hashes = new Map(); + + fs.readdirSync('./dist/test-project').forEach(name => { + const data = fs.readFileSync('./dist/test-project/' + name); + const hash = crypto + .createHash('sha1') + .update(data) + .digest('hex'); + + hashes.set(name, hash); + }); + + return hashes; +} + +function validateHashes( + oldHashes: Map, + newHashes: Map, + shouldChange: Array, +): void { + oldHashes.forEach((hash, name) => { + if (hash === newHashes.get(name)) { + if (shouldChange.includes(name)) { + throw new Error(`"${name}" did not change hash (${hash})...`); + } + } else if (!shouldChange.includes(name)) { + throw new Error(`"${name}" changed hash (${hash})...`); + } + }); +} + +export default async function() { + let oldHashes: Map; + let newHashes: Map; + + // Remove the cache so that an initial build and build with cache can be tested + await rimraf('./node_modules/.cache'); + + let start = Date.now(); + await ng('build'); + let initial = Date.now() - start; + oldHashes = generateFileHashMap(); + + start = Date.now(); + await ng('build'); + let cached = Date.now() - start; + newHashes = generateFileHashMap(); + + validateHashes(oldHashes, newHashes, []); + + if (cached > initial * 0.70) { + throw new Error( + `Cached build time [${cached}] should not be greater than 70% of initial build time [${initial}].`, + ); + } + + // Remove the cache so that an initial build and build with cache can be tested + await rimraf('./node_modules/.cache'); + + start = Date.now(); + await ng('build', '--prod'); + initial = Date.now() - start; + oldHashes = generateFileHashMap(); + + start = Date.now(); + await ng('build', '--prod'); + cached = Date.now() - start; + newHashes = generateFileHashMap(); + + if (cached > initial * 0.70) { + throw new Error( + `Cached build time [${cached}] should not be greater than 70% of initial build time [${initial}].`, + ); + } + + validateHashes(oldHashes, newHashes, []); +} diff --git a/yarn.lock b/yarn.lock index be94d1f7b99b..9d435ed59cf7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1031,6 +1031,11 @@ "@types/express-serve-static-core" "*" "@types/serve-static" "*" +"@types/find-cache-dir@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-2.0.0.tgz#6ee79b947b8e51ce8c565fc8278822b2605609db" + integrity sha512-LHAReDNv7IVTE2Q+nPcRBgUZAUKPJIvR7efMrWgx69442KMoMK+QYjtTtK9WGUdaqUYVLkd/0cvCfb55LFWsVw== + "@types/form-data@*": version "2.2.1" resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e" @@ -2569,6 +2574,27 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== +cacache@12.0.2, cacache@^12.0.2: + version "12.0.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" + integrity sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + cacache@^11.0.1, cacache@^11.2.0: version "11.2.0" resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.2.0.tgz#617bdc0b02844af56310e411c0878941d5739965" @@ -2629,27 +2655,6 @@ cacache@^12.0.0: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" - integrity sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -4899,6 +4904,15 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +find-cache-dir@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.0.0.tgz#cd4b7dd97b7185b7e17dbfe2d6e4115ee3eeb8fc" + integrity sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.0" + pkg-dir "^4.1.0" + find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" @@ -4935,6 +4949,14 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + flatted@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" @@ -7099,6 +7121,13 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + lockfile@1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" @@ -7337,6 +7366,13 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" +make-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.0.tgz#1b5f39f6b9270ed33f9f054c5c0f84304989f801" + integrity sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw== + dependencies: + semver "^6.0.0" + make-error@^1.1.1: version "1.3.5" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" @@ -8459,6 +8495,13 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + p-map@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" @@ -8700,6 +8743,11 @@ path-exists@^3.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -8813,6 +8861,13 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" +pkg-dir@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + pkginfo@0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" From e7d99bc727baa168e096742968113afc4bb2c9a1 Mon Sep 17 00:00:00 2001 From: Adam Vigneaux Date: Tue, 20 Aug 2019 10:26:36 -0400 Subject: [PATCH 0032/1070] feat(@angular-devkit/build-angular): collect test coverage from JSX/TSX files --- .../src/angular-cli-files/models/webpack-configs/test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts index 6e51b322ce46..36a4da57151c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts @@ -47,7 +47,7 @@ export function getTestConfig( } extraRules.push({ - test: /\.(js|ts)$/, + test: /\.(jsx?|tsx?)$/, loader: 'istanbul-instrumenter-loader', options: { esModules: true }, enforce: 'post', From a05148e9f54a610ab3ba73286d39575b641df399 Mon Sep 17 00:00:00 2001 From: Stefanie Fluin Date: Wed, 21 Aug 2019 10:34:00 -0700 Subject: [PATCH 0033/1070] fix(@schematics/angular): add twitter link icon (#15385) * fix(@schematics/angular): add twitter link icon * fix(@schematics/angular): remove height unit --- .../other-files/app.component.html.template | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/packages/schematics/angular/application/other-files/app.component.html.template b/packages/schematics/angular/application/other-files/app.component.html.template index 71078b9d20bb..350f7192eb3d 100644 --- a/packages/schematics/angular/application/other-files/app.component.html.template +++ b/packages/schematics/angular/application/other-files/app.component.html.template @@ -30,6 +30,10 @@ margin: 0; } + .spacer { + flex: 1; + } + .toolbar { height: 60px; margin: -8px; @@ -44,6 +48,15 @@ margin: 0 16px; } + .toolbar #twitter-logo { + height: 40px; + margin: 0 16px; + } + + .toolbar #twitter-logo:hover { + opacity: 0.8; + } + .content { display: flex; margin: 32px auto; @@ -290,6 +303,27 @@ src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==" /> Welcome +
+ + + + +
From ec8fb3712f04c041b40b1dcce41a6bb8fd71d03f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 21 Aug 2019 10:41:55 +0200 Subject: [PATCH 0034/1070] refactor: deprecate `universalProject` in app-shell schematics as it's unused --- packages/schematics/angular/app-shell/index_spec.ts | 1 - packages/schematics/angular/app-shell/schema.json | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index 03016ca47d21..2161a7c0ffd0 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -19,7 +19,6 @@ describe('App Shell Schematic', () => { const defaultOptions: AppShellOptions = { name: 'foo', clientProject: 'bar', - universalProject: 'universal', }; const workspaceOptions: WorkspaceOptions = { diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index beb4e71c6963..7e67257382ef 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -12,7 +12,8 @@ }, "universalProject": { "type": "string", - "description": "The name of related Universal app." + "description": "The name of related Universal app.", + "x-deprecated": "This option has no effect." }, "route": { "type": "string", @@ -98,7 +99,6 @@ } }, "required": [ - "clientProject", - "universalProject" + "clientProject" ] } From a219d495b83ae9f87a679107d6d89cccd2df09de Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 21 Aug 2019 10:47:55 +0200 Subject: [PATCH 0035/1070] test: enable app-shell e2e test --- .../build/build-app-shell-with-schematic.ts | 41 +++++++------------ tests/legacy-cli/e2e_runner.ts | 1 - 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts index 8d7427651c71..940fb3d28695 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts @@ -1,37 +1,26 @@ -import { ng, npm } from '../../utils/process'; -import { expectFileToMatch, appendToFile } from '../../utils/fs'; import { getGlobalVariable } from '../../utils/env'; -import { expectToFail } from '../../utils/utils'; +import { appendToFile, expectFileToMatch } from '../../utils/fs'; +import { ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { readNgVersion } from '../../utils/version'; -export default function () { +export default async function () { // Skip this test in Angular 2/4. if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) { - return Promise.resolve(); + return; } - let platformServerVersion = readNgVersion(); + await appendToFile('src/app/app.component.html', ''); + await ng('generate', 'appShell', '--client-project', 'test-project'); + await updateJsonFile('package.json', packageJson => { + const dependencies = packageJson['dependencies']; + dependencies['@angular/platform-server'] = getGlobalVariable('argv')['ng-snapshots'] + ? 'github:angular/platform-server-builds' + : readNgVersion(); + }); - if (getGlobalVariable('argv')['ng-snapshots']) { - platformServerVersion = 'github:angular/platform-server-builds'; - } - - - return Promise.resolve() - .then(() => expectToFail(() => { - return ng('generate', 'appShell', '--universal-app', 'universal'); - }) - .then(() => appendToFile('src/app/app.component.html', '')) - .then(() => ng('generate', 'appShell', '--universal-app', 'universal')) - .then(() => updateJsonFile('package.json', packageJson => { - const dependencies = packageJson['dependencies']; - dependencies['@angular/platform-server'] = platformServerVersion; - }) - .then(() => npm('install')) - .then(() => ng('build', '--optimization')) - .then(() => expectFileToMatch('dist/test-project/index.html', /app-shell works!/)) - .then(() => ng('build', '--optimization', '--skip-app-shell')) - .then(() => expectToFail(() => expectFileToMatch('dist/test-project/index.html', /app-shell works!/))); + await silentNpm('install'); + await ng('run', 'test-project:app-shell'); + await expectFileToMatch('dist/test-project/index.html', /app-shell works!/); } diff --git a/tests/legacy-cli/e2e_runner.ts b/tests/legacy-cli/e2e_runner.ts index 557ed4559797..59dfe9e4784b 100644 --- a/tests/legacy-cli/e2e_runner.ts +++ b/tests/legacy-cli/e2e_runner.ts @@ -80,7 +80,6 @@ let allTests = glob // TODO: either update or remove these tests. allTests = allTests - .filter(name => !name.endsWith('/build-app-shell-with-schematic.ts')) // IS this test still valid? \/ .filter(name => !name.endsWith('/module-id.ts')) // Do we want to support this? From 9702ecbefe9955373aff3da7144948fa76ded7db Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 21 Aug 2019 08:43:50 +0200 Subject: [PATCH 0036/1070] build: update zone.js to ~0.10.1 --- packages/schematics/angular/utility/latest-versions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 60ad79573f1d..fd9716f030f6 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -10,7 +10,7 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. Angular: '~9.0.0-next.2', RxJs: '~6.4.0', - ZoneJs: '~0.9.1', + ZoneJs: '~0.10.1', TypeScript: '~3.5.3', TsLib: '^1.10.0', From 1bc8cbcb988594579d3a05355cd612cda6e986ba Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 27 Jul 2019 05:36:19 +0000 Subject: [PATCH 0037/1070] build: update zone.js to version ^0.10.0 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 40aca5aba06c..4407e2482c4d 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -90,7 +90,7 @@ "karma-jasmine-html-reporter": "^1.4.0", "popper.js": "^1.14.1", "protractor": "~5.4.0", - "zone.js": "^0.9.1" + "zone.js": "^0.10.0" }, "peerDependencies": { "@angular/compiler-cli": "^8.0.0-beta.0 || ^8.1.0-beta.0 || ^8.2.0-beta.0 || ^8.3.0-beta.0 || ^8.4.0-beta.0 || >=9.0.0-beta < 9", diff --git a/yarn.lock b/yarn.lock index 9d435ed59cf7..c62f03fa32fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12478,7 +12478,7 @@ yn@^2.0.0: resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= -zone.js@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.9.1.tgz#e37c6e5c54c13fae4de26b5ffe8d8e9212da6d9b" - integrity sha512-GkPiJL8jifSrKReKaTZ5jkhrMEgXbXYC+IPo1iquBjayRa0q86w3Dipjn8b415jpitMExe9lV8iTsv8tk3DGag== +zone.js@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.0.tgz#dbaa5cf2889e3f92f903de1d8a6edabdc8d4da69" + integrity sha512-dxEcxkKgOj5kNBcngPmeu9VV0PrMPd2aJXX5TDX/MKOITusSzYNjZPs1EVSsLywvdThRVwsEqUi2BAEYeuRP2Q== From 115ea393953d01eec4e8c4399a77270eafe5c335 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 21 Aug 2019 05:23:08 +0000 Subject: [PATCH 0038/1070] build: update @bazel/jasmine to version 0.36.1 --- WORKSPACE | 4 ++-- package.json | 6 +++--- yarn.lock | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 5805883af56c..2577680b2135 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") http_archive( name = "build_bazel_rules_nodejs", - sha256 = "9abd649b74317c9c135f4810636aaa838d5bea4913bfa93a85c2f52a919fdaf3", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.36.0/rules_nodejs-0.36.0.tar.gz"], + sha256 = "3356c6b767403392bab018ce91625f6d15ff8f11c6d772dc84bc9cada01c669a", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.36.1/rules_nodejs-0.36.1.tar.gz"], ) # We use protocol buffers for the Build Event Protocol diff --git a/package.json b/package.json index 9ba21c3b64bb..5ee1f04ace0c 100644 --- a/package.json +++ b/package.json @@ -84,9 +84,9 @@ "@angular/compiler-cli": "~9.0.0-next.2", "@bazel/bazel": "0.28.1", "@bazel/buildifier": "0.28.0", - "@bazel/jasmine": "0.36.0", - "@bazel/karma": "0.36.0", - "@bazel/typescript": "0.36.0", + "@bazel/jasmine": "0.36.1", + "@bazel/karma": "0.36.1", + "@bazel/typescript": "0.36.1", "@types/browserslist": "^4.4.0", "@types/caniuse-lite": "^1.0.0", "@types/clean-css": "^4.2.1", diff --git a/yarn.lock b/yarn.lock index c62f03fa32fa..0ad5738714f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -827,19 +827,19 @@ resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.36.0.tgz#3fb7c7c5f579f46dd1efd1b3890f11351aa8e65c" integrity sha512-RgJWR1rOgyU4smruUK3MFA06DKt3AFCcfi9L8u/h11EjOrfLJgnzBJIGDXvW2zzhgnEJ9RRafOUHKN6blDksGg== -"@bazel/jasmine@0.36.0": - version "0.36.0" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.36.0.tgz#26d5b455cdcf09b0000a5a7d50d672ef3a386388" - integrity sha512-1UEcHOtn+tqaibNJosGsNrDWvIc5KCrH3OlfYZ8g2Eg8wJ9LPLoKw2BPNz3QIqN2TNUSsjLwVE7HZU/PV3ktNQ== +"@bazel/jasmine@0.36.1": + version "0.36.1" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.36.1.tgz#2069f8deb52a6ee206926936dbfd6829228962c2" + integrity sha512-gXCOeiHWNZzClMmYbKvdhS1ZC62inM2e+/w/Z0kOKDFSoSE9GnC6NuIK4vFlDOPjx0vGy2+ZCb/tezrgpqhp2A== dependencies: jasmine "~3.4.0" jasmine-core "~3.4.0" v8-coverage "1.0.9" -"@bazel/karma@0.36.0": - version "0.36.0" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.36.0.tgz#276956d5db855aac02bae5848ff5de5cd8cd04a2" - integrity sha512-O6cXMOahJc8BB5MawEpa88mrRWnWNpsZsOI+nEZE9SI8YYx/vy2meG720wn1dzmkIcALznA1PRA0/kr8Ww50XA== +"@bazel/karma@0.36.1": + version "0.36.1" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.36.1.tgz#3d6e5e8772d2d2799d0b301020c1483ed3fe5de1" + integrity sha512-2zSW12BBJEqV1QYhPiwfTmObKCeyq3Gdox1b+2eYbyNw2HBlCHhWJs0FquGo63LLBn9XZhhk2H2IQmwhUOhx+w== dependencies: jasmine-core "2.8.0" karma "^4.0.0" @@ -853,10 +853,10 @@ semver "5.6.0" tmp "0.0.33" -"@bazel/typescript@0.36.0": - version "0.36.0" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.36.0.tgz#e080255c4219a5e045fb6ae6aacce966c34e4628" - integrity sha512-/Kb/Uxi4nuJrbSAJTre0aE0D9BwIgEpsuwMJ/ThA25rlJ6Xl3UG4EYbgsrf66PZvznKOVdu6Jc8bVvhG3ldSPw== +"@bazel/typescript@0.36.1": + version "0.36.1" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.36.1.tgz#de7994ed8eec90e0593525f62060a302fcf49ef1" + integrity sha512-TvItSk/aGakCmbrxTnbydKxq7bfYzMKqk9tNwHCzC8KqtTTyNuGTHisjqixw8G6jeSrms6vIkfH9YpYw9OHzRQ== dependencies: protobufjs "6.8.8" semver "5.6.0" From 99de2b4b36747487dfe94d1ae135d4302f81d9bf Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 21 Aug 2019 07:24:52 +0000 Subject: [PATCH 0039/1070] build: update sass-loader to version 7.3.1 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 4407e2482c4d..153d55b79216 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -42,7 +42,7 @@ "raw-loader": "3.1.0", "rxjs": "6.4.0", "sass": "1.22.10", - "sass-loader": "7.2.0", + "sass-loader": "7.3.1", "semver": "6.3.0", "source-map": "0.7.3", "source-map-support": "0.5.13", diff --git a/yarn.lock b/yarn.lock index 0ad5738714f6..23f4ec899adf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10013,16 +10013,16 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass-loader@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.2.0.tgz#e34115239309d15b2527cb62b5dfefb62a96ff7f" - integrity sha512-h8yUWaWtsbuIiOCgR9fd9c2lRXZ2uG+h8Dzg/AGNj+Hg/3TO8+BBAW9mEP+mh8ei+qBKqSJ0F1FLlYjNBc61OA== +sass-loader@7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.3.1.tgz#a5bf68a04bcea1c13ff842d747150f7ab7d0d23f" + integrity sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA== dependencies: clone-deep "^4.0.1" loader-utils "^1.0.1" neo-async "^2.5.0" pify "^4.0.1" - semver "^5.5.0" + semver "^6.3.0" sass@1.22.10: version "1.22.10" From 94df0eff205fc3cc1870f95a3a8ca6aa6326a0ab Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 21 Aug 2019 06:22:05 +0000 Subject: [PATCH 0040/1070] build: update cacache to version 12.0.3 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 29 ++++++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 153d55b79216..5177c22fe612 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -17,7 +17,7 @@ "ajv": "6.10.2", "autoprefixer": "9.6.1", "browserslist": "4.6.6", - "cacache": "12.0.2", + "cacache": "12.0.3", "caniuse-lite": "1.0.30000989", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", diff --git a/yarn.lock b/yarn.lock index 23f4ec899adf..2601b5a23923 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2574,10 +2574,10 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@12.0.2, cacache@^12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" - integrity sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== +cacache@12.0.3: + version "12.0.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" + integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== dependencies: bluebird "^3.5.5" chownr "^1.1.1" @@ -2655,6 +2655,27 @@ cacache@^12.0.0: unique-filename "^1.1.1" y18n "^4.0.0" +cacache@^12.0.2: + version "12.0.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" + integrity sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" From 9d676422555995fbd73957444c0c9df683e5fb95 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 21 Aug 2019 06:22:19 +0000 Subject: [PATCH 0041/1070] build: update less to version 3.10.2 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 5177c22fe612..05f41f5bff48 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -28,7 +28,7 @@ "glob": "7.1.4", "istanbul-instrumenter-loader": "3.0.1", "karma-source-map-support": "1.4.0", - "less": "3.10.1", + "less": "3.10.2", "less-loader": "5.0.0", "license-webpack-plugin": "2.1.2", "loader-utils": "1.2.3", diff --git a/yarn.lock b/yarn.lock index 2601b5a23923..c223fee5387b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7010,10 +7010,10 @@ less-plugin-npm-import@^2.1.0: promise "~7.0.1" resolve "~1.1.6" -less@3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/less/-/less-3.10.1.tgz#a1c97e3436acdfd1757916333b9906f3af7d559e" - integrity sha512-xlPx6vt5nAm1DGDnuv06SNQba4WnMKY5vZkgCrnyKXkDbs09kl9cc2nSS7OMufLT60IWsxUSnwr1Rkh4rkMFcg== +less@3.10.2: + version "3.10.2" + resolved "https://registry.yarnpkg.com/less/-/less-3.10.2.tgz#49b94da22e18ed112d9500bdb2340969dafee57f" + integrity sha512-crOb5r8AnIYkWss6sJNccgb20UqvDfdZhopuDG9LGfcSQY+fAKIA/W4as5+ELnfUxnDruqC7iYyeDZmC44nMnw== dependencies: clone "^2.1.2" optionalDependencies: From 3c69e34b2fda628c48786ab8e7bc2c361c6bc3f8 Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Mon, 19 Aug 2019 15:27:14 -0700 Subject: [PATCH 0042/1070] docs: ng add configures project in cwd --- packages/angular/cli/commands/add.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/angular/cli/commands/add.md b/packages/angular/cli/commands/add.md index d2bbcd6af692..f09b1317fd20 100644 --- a/packages/angular/cli/commands/add.md +++ b/packages/angular/cli/commands/add.md @@ -1,8 +1,9 @@ -Adds the npm package for a published library to your workspace, and configures your default -app project to use that library, in whatever way is specified by the library's schematic. +Adds the npm package for a published library to your workspace, and configures +the project in the current working directory (or the default app if you are +not in a project directory) to use that library, as specified by the library's schematic. For example, adding `@angular/pwa` configures your project for PWA support: ```bash ng add @angular/pwa ``` -The default app project is the value of `defaultProject` in `angular.json`. +The default app project is the value of `defaultProject` in `angular.json`. From 08d7d0298cdb2ea58ee6367146da4b582b717d59 Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Tue, 20 Aug 2019 10:44:40 -0700 Subject: [PATCH 0043/1070] docs: remove app from app project --- packages/angular/cli/commands/add.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/commands/add.md b/packages/angular/cli/commands/add.md index f09b1317fd20..465438a4e5b2 100644 --- a/packages/angular/cli/commands/add.md +++ b/packages/angular/cli/commands/add.md @@ -1,9 +1,9 @@ Adds the npm package for a published library to your workspace, and configures -the project in the current working directory (or the default app if you are +the project in the current working directory (or the default project if you are not in a project directory) to use that library, as specified by the library's schematic. For example, adding `@angular/pwa` configures your project for PWA support: ```bash ng add @angular/pwa ``` -The default app project is the value of `defaultProject` in `angular.json`. +The default project is the value of `defaultProject` in `angular.json`. From ad8acb0d2379007fd40306a159efa42a0152ef86 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 22 Aug 2019 15:19:01 +0200 Subject: [PATCH 0044/1070] build: bump angular dev packages to latest next versions --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 22 ++--- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- .../angular/utility/latest-versions.ts | 2 +- .../workspace/files/tsconfig.json.template | 1 - .../hello-world-app-ivy/tsconfig.json | 3 - .../ng-packaged-ivy/tsconfig.json | 3 - .../build_webpack/angular-app/tsconfig.json | 3 + .../e2e/assets/webpack/test-app/package.json | 16 ++-- .../e2e/assets/webpack/test-app/tsconfig.json | 1 - .../e2e/tests/packages/webpack/test-app.ts | 60 ++++++++----- yarn.lock | 88 +++++++++---------- 13 files changed, 109 insertions(+), 102 deletions(-) diff --git a/package.json b/package.json index 5ee1f04ace0c..0fc69234141e 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.2", - "@angular/compiler-cli": "~9.0.0-next.2", + "@angular/compiler": "~9.0.0-next.3", + "@angular/compiler-cli": "~9.0.0-next.3", "@bazel/bazel": "0.28.1", "@bazel/buildifier": "0.28.0", "@bazel/jasmine": "0.36.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 05f41f5bff48..7b874394738b 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -64,19 +64,19 @@ "worker-plugin": "3.1.0" }, "devDependencies": { - "@angular/animations": "~9.0.0-next.2", + "@angular/animations": "~9.0.0-next.3", "@angular/cdk": "~8.1.0", - "@angular/common": "~9.0.0-next.2", - "@angular/compiler": "~9.0.0-next.2", - "@angular/compiler-cli": "~9.0.0-next.2", - "@angular/core": "~9.0.0-next.2", - "@angular/forms": "~9.0.0-next.2", + "@angular/common": "~9.0.0-next.3", + "@angular/compiler": "~9.0.0-next.3", + "@angular/compiler-cli": "~9.0.0-next.3", + "@angular/core": "~9.0.0-next.3", + "@angular/forms": "~9.0.0-next.3", "@angular/material": "~8.1.0", - "@angular/platform-browser": "~9.0.0-next.2", - "@angular/platform-browser-dynamic": "~9.0.0-next.2", - "@angular/platform-server": "~9.0.0-next.2", - "@angular/router": "~9.0.0-next.2", - "@angular/service-worker": "~9.0.0-next.2", + "@angular/platform-browser": "~9.0.0-next.3", + "@angular/platform-browser-dynamic": "~9.0.0-next.3", + "@angular/platform-server": "~9.0.0-next.3", + "@angular/router": "~9.0.0-next.3", + "@angular/service-worker": "~9.0.0-next.3", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 182c38d8c273..2021d0de1082 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.2", - "@angular/compiler-cli": "~9.0.0-next.2", + "@angular/compiler": "~9.0.0-next.3", + "@angular/compiler-cli": "~9.0.0-next.3", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.5.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 1148682b6702..717f062d18fb 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.2", - "@angular/compiler-cli": "~9.0.0-next.2", + "@angular/compiler": "~9.0.0-next.3", + "@angular/compiler-cli": "~9.0.0-next.3", "typescript": "3.5.3", "webpack": "4.39.2" } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index fd9716f030f6..29c3cf38ffa1 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,7 +8,7 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.2', + Angular: '~9.0.0-next.3', RxJs: '~6.4.0', ZoneJs: '~0.10.1', TypeScript: '~3.5.3', diff --git a/packages/schematics/angular/workspace/files/tsconfig.json.template b/packages/schematics/angular/workspace/files/tsconfig.json.template index 3c044080d66f..30956ae7ea26 100644 --- a/packages/schematics/angular/workspace/files/tsconfig.json.template +++ b/packages/schematics/angular/workspace/files/tsconfig.json.template @@ -20,7 +20,6 @@ ] }, "angularCompilerOptions": { - "enableIvy": true, "fullTemplateTypeCheck": true, "strictInjectionParameters": true } diff --git a/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json b/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json index 02f96816e085..944d93dc8215 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json +++ b/tests/angular_devkit/build_angular/hello-world-app-ivy/tsconfig.json @@ -17,8 +17,5 @@ "es2017", "dom" ] - }, - "angularCompilerOptions": { - "enableIvy": true } } diff --git a/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json b/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json index 61821f36af60..ef44e2862b04 100644 --- a/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json +++ b/tests/angular_devkit/build_ng_packagr/ng-packaged-ivy/tsconfig.json @@ -16,8 +16,5 @@ "es2017", "dom" ] - }, - "angularCompilerOptions": { - "enableIvy": true } } diff --git a/tests/angular_devkit/build_webpack/angular-app/tsconfig.json b/tests/angular_devkit/build_webpack/angular-app/tsconfig.json index ef44e2862b04..a85aeb5a0fa8 100644 --- a/tests/angular_devkit/build_webpack/angular-app/tsconfig.json +++ b/tests/angular_devkit/build_webpack/angular-app/tsconfig.json @@ -16,5 +16,8 @@ "es2017", "dom" ] + }, + "angularCompilerOptions": { + "enableIvy": false } } diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json index a6f56366cb4e..fe44d7e98002 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "~9.0.0-next.2", - "@angular/compiler": "~9.0.0-next.2", - "@angular/compiler-cli": "~9.0.0-next.2", - "@angular/core": "~9.0.0-next.2", - "@angular/platform-browser": "~9.0.0-next.2", - "@angular/platform-browser-dynamic": "~9.0.0-next.2", - "@angular/platform-server": "~9.0.0-next.2", - "@angular/router": "~9.0.0-next.2", + "@angular/common": "~9.0.0-next.3", + "@angular/compiler": "~9.0.0-next.3", + "@angular/compiler-cli": "~9.0.0-next.3", + "@angular/core": "~9.0.0-next.3", + "@angular/platform-browser": "~9.0.0-next.3", + "@angular/platform-browser-dynamic": "~9.0.0-next.3", + "@angular/platform-server": "~9.0.0-next.3", + "@angular/router": "~9.0.0-next.3", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.0", diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/tsconfig.json b/tests/legacy-cli/e2e/assets/webpack/test-app/tsconfig.json index c245563164ba..5822e780bfc7 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/tsconfig.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/tsconfig.json @@ -1,5 +1,4 @@ { - // Test comment "compilerOptions": { "baseUrl": "", "module": "es2015", diff --git a/tests/legacy-cli/e2e/tests/packages/webpack/test-app.ts b/tests/legacy-cli/e2e/tests/packages/webpack/test-app.ts index e562226e6b98..487bf906e20a 100644 --- a/tests/legacy-cli/e2e/tests/packages/webpack/test-app.ts +++ b/tests/legacy-cli/e2e/tests/packages/webpack/test-app.ts @@ -1,25 +1,37 @@ -import {normalize} from 'path'; -import {createProjectFromAsset} from '../../../utils/assets'; -import {exec} from '../../../utils/process'; -import {expectFileSizeToBeUnder, replaceInFile, expectFileToMatch} from '../../../utils/fs'; - - -export default function(skipCleaning: () => void) { - return Promise.resolve() - .then(() => createProjectFromAsset('webpack/test-app')) - .then(() => exec(normalize('node_modules/.bin/webpack-cli'))) - // Note: these sizes are without Build Optimizer or any advanced optimizations in the CLI. - .then(() => expectFileSizeToBeUnder('dist/app.main.js', 483 * 1024)) - .then(() => expectFileSizeToBeUnder('dist/0.app.main.js', 25 * 1024)) - .then(() => expectFileSizeToBeUnder('dist/1.app.main.js', 2 * 1024)) - // test resource urls without ./ - .then(() => replaceInFile('app/app.component.ts', - './app.component.html', 'app.component.html')) - .then(() => replaceInFile('app/app.component.ts', - './app.component.scss', 'app.component.scss')) - // test the inclusion of metadata - // This build also test resource URLs without ./ - .then(() => exec(normalize('node_modules/.bin/webpack-cli'), '--mode=development')) - .then(() => expectFileToMatch('dist/app.main.js', 'AppModuleNgFactory')) - .then(() => skipCleaning()); +import { normalize } from 'path'; +import { createProjectFromAsset } from '../../../utils/assets'; +import { getGlobalVariable } from '../../../utils/env'; +import { expectFileSizeToBeUnder, expectFileToMatch, replaceInFile } from '../../../utils/fs'; +import { exec } from '../../../utils/process'; +import { updateJsonFile } from '../../../utils/project'; + + +export default async function (skipCleaning: () => void) { + const webpackCLIBin = normalize('node_modules/.bin/webpack-cli'); + const isIvy = getGlobalVariable('argv')['ivy']; + + await createProjectFromAsset('webpack/test-app'); + if (!isIvy) { + await updateJsonFile('tsconfig.json', config => { + config.angularCompilerOptions.enableIvy = false; + }); + } + + await exec(webpackCLIBin); + + // Note: these sizes are without Build Optimizer or any advanced optimizations in the CLI. + await expectFileSizeToBeUnder('dist/app.main.js', (isIvy ? 565 : 483) * 1024); + await expectFileSizeToBeUnder('dist/0.app.main.js', 1 * 1024); + await expectFileSizeToBeUnder('dist/1.app.main.js', 2 * 1024); + + // test resource urls without ./ + await replaceInFile('app/app.component.ts', './app.component.html', 'app.component.html'); + await replaceInFile('app/app.component.ts', './app.component.scss', 'app.component.scss'); + + // test the inclusion of metadata + // This build also test resource URLs without ./ + await exec(webpackCLIBin, '--mode=development'); + await expectFileToMatch('dist/app.main.js', `AppModule${isIvy ? '' : 'NgFactory'}`); + + skipCleaning(); } diff --git a/yarn.lock b/yarn.lock index c223fee5387b..d90122f44d5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.2.tgz#8c54d9e48948d798b6cf69428b614613ad68d9e0" - integrity sha512-Fx0jqxbxC6/wKowPsKG0vUKaf8cu2/8eKx5/UVoRvdC2S0at3Ud49SKvJD0XcSL1tqVFbYOAvURmkNZSFQlLGA== +"@angular/animations@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.3.tgz#ce20fe948f0327fd8f8faa59f4bfd3967cdb54f3" + integrity sha512-wkAfZ21AH43qPuOKnNQn27KPuIGS4fPCOi+QtPI0E2QH0+iHaXnwVMjB7UYbZM/KMT2ewg0s/s2Jt82Oc3kxyg== dependencies: tslib "^1.9.0" @@ -18,17 +18,17 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.2.tgz#aac53c8725f768eb0afbb5c6912050606324a5c7" - integrity sha512-kBTuqoJo2L318+sVQJWmL6gJDSxdkqpdXWb4QPa5P7tk1/ptPXDD4w5qBA3yXfZfD1bUFP37URVhVA/h+CyNDQ== +"@angular/common@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.3.tgz#347ef82c8c4b29371551ed1e643d4f235f7b59f2" + integrity sha512-9j8QpL6F+AgTjuy7PLiK76v/tbU0XuDu+vx/hmoVSyEjt/zge4io/BgKv7/Ut+HgUfqjkusFZ/ystJ2OJ3XY3Q== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.2.tgz#c8907665db7e49a6ddcc07c52d20bf487d19e62e" - integrity sha512-bsDWWBrNV+BtexyQj/Wglw56+b8TBAm+AwUwdXFi/kFvneq7mg9zdmVW2o5azRS5ixdXlzAG9K3qemD9EGHk7w== +"@angular/compiler-cli@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.3.tgz#11e59406270c2516fd66e4b675212decd59d063f" + integrity sha512-g8fuuz9A8ZrvEXyy6JQxLESg5G8pcFQveyUi6RNDCFxjcnk0NHVLxcCzt1KnnsoWWfPhRtEerOCB3rX0JSgj5w== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -41,24 +41,24 @@ tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.2.tgz#dd9e5b4c8bd355da6d78dec057655e71571dd947" - integrity sha512-D4yrilNn3DTRn9O/Z6Y/zkAEwZjTDwJvDETnXjK3FDrSOATavUq3GHHsVJcC43QvPSVWoX7biuRpI225oNB1EQ== +"@angular/compiler@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.3.tgz#6e60dd862ab0f2e88a25cd361e49e97c6edabb29" + integrity sha512-J+5tKY7IQcgDMLAg81UT9n5mFZ2/AaYM1eH6NLPe9qywTbHr2rqklrP0deAXny3LrDv/BzeB9XeMF3WaQnfsyQ== dependencies: tslib "^1.9.0" -"@angular/core@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.2.tgz#25d1d04bc9c8d35a6ba5ec7581006671370e40ad" - integrity sha512-ftoNegNFbCQm7zf9OOVgV/nUZfx8OQFWu/zwsm/hyonI7BicfZs/B1h2Tn9iemWzkcJzlnH4Cnh+2NV1jcTZuw== +"@angular/core@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.3.tgz#d1dfa4a03ebe182effb8481bcefcb934f6e3cab4" + integrity sha512-BC8uaU60pvopSvtgSxb1rG/6vRz5J+KqPHz8E+laDsFqVcuXxOzdIJrFkYk+lVjoBZlKLppTmxstEj8wl2ZZYw== dependencies: tslib "^1.9.0" -"@angular/forms@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.2.tgz#e6bfcf638eecedba3dca7d072982bcf37eb5e408" - integrity sha512-y8YXezn+VY4X2/h1eV4F2c3mCZ5eheyUtq3ZBEAsnrOH2czh3RVE2RuMr3gpXoGHSqq74iGHDCt0qi4ka4R8tQ== +"@angular/forms@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.3.tgz#efbc4dd8279ada2f60a00d0c59801bbbf7e91361" + integrity sha512-2fazhHaO7dw8NEnBvTeKGY37oiD3kMS0ifzrMX+qcR+v0i9Z/D7zQOSPod1ZFLKv3NT8RDMwzA/A9768Q9hk9Q== dependencies: tslib "^1.9.0" @@ -69,40 +69,40 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.2.tgz#1e255efd2fb24d4a17b5282fad06405a346761cf" - integrity sha512-WYooQcqDjqqVaMfy2jMUe8ErbWpOe0whpLboyXfuM7Fk7bQwVc3oPE1rPIiujhdbAresHzKnU0YvkC53I2xrkA== +"@angular/platform-browser-dynamic@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.3.tgz#bdd58969f2db8823289d56465d76ccf001723e7b" + integrity sha512-K/ewX4vv3vE2fn8SpLIqLqc6HMM8TbUo1gVjgwKs/n5b72Tk+vWG7gh8fuJzXd0OMYHVqOd7bmqZNjEO8FiY0w== dependencies: tslib "^1.9.0" -"@angular/platform-browser@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.2.tgz#4687ea54dc7a65590103151cc3f68dd6bb4429bd" - integrity sha512-TSfKc70Uw7Ah1NSakJaPct88Gn6ovSlugVEBSBlr/IiY1Cu+/jeaNiSeDe1uBbk6c8W5KZVggRx0Bz46wEKPZA== +"@angular/platform-browser@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.3.tgz#f4a699e37dfc2241baf24e555d819d45c78f22de" + integrity sha512-PdSMzAq8akumBsC9BKx/Ra9UnX3eZPkB3PaMjOsoeVmqH4KRuZAsowrQR8z3f/2d33yPUrGLykjEc8l9aARNSQ== dependencies: tslib "^1.9.0" -"@angular/platform-server@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.2.tgz#b4c2110847ae0a4413be58dd5b942cac403dc34b" - integrity sha512-cSlC5A4AJvPHUyfE2m1DJV8LRmQKG+U+RFlvsoOmF1B44yrgy98plUFY0P/fYRaace7rC/I+9xiAo1SxaQ6Xjw== +"@angular/platform-server@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.3.tgz#a33371d642c0e726c837873fe40d0664af054f46" + integrity sha512-PuU2DHxf/rHWb3TPUB8R/jMmYu/2ZcniMsRg3LffvcAK+zKUFQnGvhILjvlR/bc3cLapd3WEklJIXJszmBe9Lg== dependencies: domino "^2.1.2" tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.2.tgz#7888df02845ac2ae71316e560f9f1db2d1ef9bff" - integrity sha512-NNYbcKi5ViiISXkNGTTdvOYsgvi6dI9P+WizBz+uItYcuqwBKog54I/4Byx8CMgGTyZALIzPDbDLXv118deA+Q== +"@angular/router@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.3.tgz#7480ec7d756eb0609d66617d7defd52cec6c8d3e" + integrity sha512-TKVwIMluyeBC3rRptIbXgs4EhZPYEjeNZM77Xc0HSnAYMWTk43i6cyVqj6PfdtVj4MfWR7gpyc+orrCZMuF+4A== dependencies: tslib "^1.9.0" -"@angular/service-worker@~9.0.0-next.2": - version "9.0.0-next.2" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.2.tgz#523b7a2736f758344dbd49c4567a46ba02489b71" - integrity sha512-l2xy8AAFEBFo6AVD5ouN714CyeQjhCFM4Q+o373+NVf1xDIf8hrgN3TLdHadfd3Z2BDGADjDD1MjzeE7wxn/9A== +"@angular/service-worker@~9.0.0-next.3": + version "9.0.0-next.3" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.3.tgz#ea1c0717224e9cd9975e007f4d93dc593532faac" + integrity sha512-rckN+/WrGY0WBPeACP7uPScgl3XudrGrufWSIJyYqjweCvqhjzkTVE1tvyKWxB2GE4te9FNC/I2Ew7QCG2cf8w== dependencies: tslib "^1.9.0" From fe3d597c0e08bf03f0cee672144dd20491d97b5f Mon Sep 17 00:00:00 2001 From: Judy Bogart <31899326+jbogarthyde@users.noreply.github.com> Date: Thu, 22 Aug 2019 10:14:38 -0700 Subject: [PATCH 0045/1070] Add deploy command doc (#15402) * docs: add deploy command doc * docs: fix json example * docs: add link to cli builder doc * docs: remove link * docs: restore link --- packages/angular/cli/commands/deploy-long.md | 27 +++++++++++++++----- packages/angular/cli/commands/deploy.json | 2 +- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/angular/cli/commands/deploy-long.md b/packages/angular/cli/commands/deploy-long.md index d8b66e1e5a56..5d600ef2e8d8 100644 --- a/packages/angular/cli/commands/deploy-long.md +++ b/packages/angular/cli/commands/deploy-long.md @@ -1,9 +1,22 @@ -The `ng deploy` command is a shortcut for: +The command takes an optional project name, as specified in the `projects` section of the `angular.json` workspace configuration file. +When a project name is not supplied, executes the `deploy` builder for the default project. -``` -ng run [PROJECT_NAME]:deploy -``` +To use the `ng deploy` command, use `ng add` to add a package that implements deployment capabilities to your favorite platform. +Adding the package automatically updates your workspace configuration, adding a deployment +[CLI builder](guide/cli-builder). +For example: -It takes an optional project name, as specified in the `projects` section of the `angular.json` workspace configuration file. - -When a project name is not supplied, the CLI will execute the `deploy` builder for the default project. +```json +"projects": { + "my-project": { + ... + "architect": { + ... + "deploy": { + "builder": "@angular/fire:deploy", + "options": {} + } + } + } + } + ``` \ No newline at end of file diff --git a/packages/angular/cli/commands/deploy.json b/packages/angular/cli/commands/deploy.json index 09117c873ecd..12a32dca84a3 100644 --- a/packages/angular/cli/commands/deploy.json +++ b/packages/angular/cli/commands/deploy.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/schema", "$id": "ng-cli://commands/deploy.json", - "description": "Invokes the deploy builder for a specified project. If no project is specified, the CLI will invoke the deploy builder for the default project in the workspace.", + "description": "Invokes the deploy builder for a specified project or for the default project in the workspace.", "$longDescription": "./deploy-long.md", "$aliases": [ "d" ], From ab8d197ca000bff296b458a65fc957c6034669fc Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Thu, 22 Aug 2019 10:23:11 -0700 Subject: [PATCH 0046/1070] release: v9.0.0-next.0 --- packages/schematics/angular/utility/latest-versions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 29c3cf38ffa1..4ed84f475758 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,10 +15,10 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.803.0-rc.0', - DevkitBuildNgPackagr: '~0.803.0-rc.0', - DevkitBuildWebpack: '~0.803.0-rc.0', - AngularPWA: '~0.803.0-rc.0', + DevkitBuildAngular: '~0.900.0-next.0', + DevkitBuildNgPackagr: '~0.900.0-next.0', + DevkitBuildWebpack: '~0.900.0-next.0', + AngularPWA: '~0.900.0-next.0', tsickle: '^0.36.0', ngPackagr: '^5.4.0', From 99d4fd6f5b91abdffd630b9d719fcbb417dc10ae Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 23 Aug 2019 19:01:26 +0200 Subject: [PATCH 0047/1070] test: fix ng update test for version 7 (#15420) --- tests/legacy-cli/e2e/tests/update/update-7.0.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/update/update-7.0.ts b/tests/legacy-cli/e2e/tests/update/update-7.0.ts index b34dc25b31f2..a7cd7e169dd2 100644 --- a/tests/legacy-cli/e2e/tests/update/update-7.0.ts +++ b/tests/legacy-cli/e2e/tests/update/update-7.0.ts @@ -28,8 +28,6 @@ export default async function() { // Should update tsconfig and src/browserslist via differential-loading. await expectFileToMatch('tsconfig.json', `"target": "es2015",`); await expectToFail(() => expectFileToExist('e2e/browserlist')); - // Should update the build-angular version. - await expectFileToMatch('package.json', `"@angular-devkit/build-angular": "~0.8`); // Should rename codelyzer rules. await expectFileToMatch('tslint.json', `use-lifecycle-interface`); // Unnecessary es6 polyfills should be removed via drop-es6-polyfills. From aeaa97c283535452c58594a55ee6dc6e89e320b1 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 23 Aug 2019 19:01:59 +0200 Subject: [PATCH 0048/1070] feat(@schematics/angular): add migration for dependencies (#15421) --- .../angular/migrations/update-9/index.ts | 9 +++++ .../update-9/update-dependencies.ts | 39 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 packages/schematics/angular/migrations/update-9/update-dependencies.ts diff --git a/packages/schematics/angular/migrations/update-9/index.ts b/packages/schematics/angular/migrations/update-9/index.ts index c3429411ffc8..aaca4a6004ed 100644 --- a/packages/schematics/angular/migrations/update-9/index.ts +++ b/packages/schematics/angular/migrations/update-9/index.ts @@ -7,7 +7,9 @@ */ import { Rule, chain } from '@angular-devkit/schematics'; +import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { UpdateLibraries } from './ivy-libraries'; +import { updateDependencies } from './update-dependencies'; import { UpdateWorkspaceConfig } from './update-workspace-config'; export default function(): Rule { @@ -15,6 +17,13 @@ export default function(): Rule { return chain([ UpdateWorkspaceConfig(), UpdateLibraries(), + updateDependencies(), + (tree, context) => { + const packageChanges = tree.actions.some(a => a.path.endsWith('/package.json')); + if (packageChanges) { + context.addTask(new NodePackageInstallTask()); + } + }, ]); }; } diff --git a/packages/schematics/angular/migrations/update-9/update-dependencies.ts b/packages/schematics/angular/migrations/update-9/update-dependencies.ts new file mode 100644 index 000000000000..00b891ab4718 --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/update-dependencies.ts @@ -0,0 +1,39 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Tree } from '@angular-devkit/schematics'; +import { addPackageJsonDependency, getPackageJsonDependency } from '../../utility/dependencies'; +import { latestVersions } from '../../utility/latest-versions'; + +export function updateDependencies() { + return (host: Tree) => { + const dependenciesToUpdate: Record = { + '@angular/pwa': latestVersions.AngularPWA, + '@angular-devkit/build-angular': latestVersions.DevkitBuildAngular, + '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, + '@angular-devkit/build-webpack': latestVersions.DevkitBuildWebpack, + 'zone.js': latestVersions.ZoneJs, + tsickle: latestVersions.tsickle, + 'ng-packagr': latestVersions.ngPackagr, + 'web-animations-js': '^2.3.2', + }; + + for (const [name, version] of Object.entries(dependenciesToUpdate)) { + const current = getPackageJsonDependency(host, name); + if (!current || current.version === version) { + continue; + } + + addPackageJsonDependency(host, { + type: current.type, + name, + version, + overwrite: true, + }); + } + }; +} From bef6e36875b258203b8aa6391e482bb114f39dde Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 23 Aug 2019 20:02:34 +0300 Subject: [PATCH 0049/1070] build: update npm-package-arg to version 6.1.1 (#15406) --- packages/angular/cli/package.json | 2 +- yarn.lock | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 80d077ed57f0..76f7a019a4e1 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -35,7 +35,7 @@ "debug": "^4.1.1", "ini": "1.3.5", "inquirer": "6.5.1", - "npm-package-arg": "6.1.0", + "npm-package-arg": "6.1.1", "open": "6.4.0", "pacote": "9.5.8", "read-package-tree": "5.3.1", diff --git a/yarn.lock b/yarn.lock index d90122f44d5b..6015cadf656b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5625,6 +5625,11 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== +hosted-git-info@^2.7.1: + version "2.8.4" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" + integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== + hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -8114,7 +8119,17 @@ npm-bundled@^1.0.1: resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== -npm-package-arg@6.1.0, "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: +npm-package-arg@6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" + integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== + dependencies: + hosted-git-info "^2.7.1" + osenv "^0.1.5" + semver "^5.6.0" + validate-npm-package-name "^3.0.0" + +"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== From bb0432182c4dd0eb0b42167d140560b0b20968fb Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Fri, 23 Aug 2019 14:32:57 -0400 Subject: [PATCH 0050/1070] fix(@ngtools/webpack): only add ctor params to decorated classes (#15416) Fixes #15404 --- .../src/transformers/ctor-parameters.ts | 2 +- .../src/transformers/ctor-parameters_spec.ts | 45 ++++++++++++++++--- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/packages/ngtools/webpack/src/transformers/ctor-parameters.ts b/packages/ngtools/webpack/src/transformers/ctor-parameters.ts index fff7eee38f71..e58c6a458b79 100644 --- a/packages/ngtools/webpack/src/transformers/ctor-parameters.ts +++ b/packages/ngtools/webpack/src/transformers/ctor-parameters.ts @@ -287,7 +287,7 @@ export function decoratorDownlevelTransformer( } function visitor(node: T): ts.Node { - if (ts.isClassDeclaration(node)) { + if (ts.isClassDeclaration(node) && node.decorators && node.decorators.length > 0) { return ts.updateClassDeclaration( node, node.decorators, diff --git a/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts b/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts index b4b11312dcbb..99f63692b141 100644 --- a/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts +++ b/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts @@ -19,6 +19,30 @@ function transform(input: string, additionalFiles?: Record) { describe('Constructor Parameter Transformer', () => { it('records class name in same module', () => { + const input = ` + export class ClassInject {}; + + @Injectable() + export class MyService { + constructor(v: ClassInject) {} + } + `; + + const output = ` + import * as tslib_1 from "tslib"; + export class ClassInject { } ; + let MyService = class MyService { constructor(v) { } }; + MyService.ctorParameters = () => [ { type: ClassInject } ]; + MyService = tslib_1.__decorate([ Injectable() ], MyService); + export { MyService }; + `; + + const result = transform(input); + + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); + }); + + it('does not record when class does not have a decorator', () => { const input = ` export class ClassInject {}; @@ -29,7 +53,7 @@ describe('Constructor Parameter Transformer', () => { const output = ` export class ClassInject { } ; - export class MyService { constructor(v) { } } MyService.ctorParameters = () => [ { type: ClassInject } ]; + export class MyService { constructor(v) { } } `; const result = transform(input); @@ -47,19 +71,22 @@ describe('Constructor Parameter Transformer', () => { constructor() { } } + @Injectable() export class MyService { constructor(v: RootProvidedService) {} } `; - // tslint:disable:max-line-length const output = ` import * as tslib_1 from "tslib"; let RootProvidedService = class RootProvidedService { constructor() { } }; RootProvidedService = tslib_1.__decorate([ Injectable({ providedIn: 'root' }) ], RootProvidedService); - export { RootProvidedService }; export class MyService { constructor(v) { } } MyService.ctorParameters = () => [ { type: RootProvidedService } ]; + export { RootProvidedService }; + let MyService = class MyService { constructor(v) { } }; + MyService.ctorParameters = () => [ { type: RootProvidedService } ]; + MyService = tslib_1.__decorate([ Injectable() ], MyService); + export { MyService }; `; - // tslint:enable:max-line-length const result = transform(input); @@ -84,6 +111,7 @@ describe('Constructor Parameter Transformer', () => { const input = ` import { RootProvidedService } from './root-provided-service'; + @Injectable() export class MyService { constructor(v: RootProvidedService) {} } @@ -101,6 +129,7 @@ describe('Constructor Parameter Transformer', () => { export interface InterInject {} export const INTERFACE_INJECT = new InjectionToken('interface-inject'); + @Injectable() export class MyService { constructor(@Inject(INTERFACE_INJECT) v: InterInject) {} } @@ -111,7 +140,7 @@ describe('Constructor Parameter Transformer', () => { export const INTERFACE_INJECT = new InjectionToken('interface-inject'); let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: undefined, decorators: [{ type: Inject, args: [INTERFACE_INJECT,] }] } ]; - MyService = tslib_1.__decorate([ tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); + MyService = tslib_1.__decorate([ Injectable(), tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); export { MyService }; `; @@ -125,6 +154,7 @@ describe('Constructor Parameter Transformer', () => { interface InterInject {} export const INTERFACE_INJECT = new InjectionToken('interface-inject'); + @Injectable() export class MyService { constructor(@Inject(INTERFACE_INJECT) v: InterInject) {} } @@ -135,7 +165,7 @@ describe('Constructor Parameter Transformer', () => { export const INTERFACE_INJECT = new InjectionToken('interface-inject'); let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: undefined, decorators: [{ type: Inject, args: [INTERFACE_INJECT,] }] } ]; - MyService = tslib_1.__decorate([ tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); + MyService = tslib_1.__decorate([ Injectable(), tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); export { MyService }; `; @@ -155,6 +185,7 @@ describe('Constructor Parameter Transformer', () => { const input = ` import { INTERFACE_INJECT, InterInject } from './module-inject'; + @Injectable() export class MyService { constructor(@Inject(INTERFACE_INJECT) v: InterInject) {} } @@ -165,7 +196,7 @@ describe('Constructor Parameter Transformer', () => { import { INTERFACE_INJECT } from './module-inject'; let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: undefined, decorators: [{ type: Inject, args: [INTERFACE_INJECT,] }] } ]; - MyService = tslib_1.__decorate([ tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); + MyService = tslib_1.__decorate([ Injectable(), tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); export { MyService }; `; From 2eae78cee68c44ab0d9e2773398f2ead41024e82 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 23 Aug 2019 21:34:42 +0300 Subject: [PATCH 0051/1070] build: update @angular/animations to version (#15386) --- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 0fea1f48bc0d..595c40dbbc2e 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#d6e49a8770d0c33d82c77e65325e295bc5b725e9", - "@angular/common": "github:angular/common-builds#12f53a08712e2c778aeb321987dd77cbced3fbe9", - "@angular/compiler": "github:angular/compiler-builds#ec017a938a195b11c76090caa7304053b1ae6c6a", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#8f61a2abcbd8a6d2e50a31157abfa8f3c138728d", - "@angular/core": "github:angular/core-builds#d2aaf40bd57a3d0127a6a3befd6a7820587c171a", - "@angular/forms": "github:angular/forms-builds#2466c18494a4c7ed7956c38dab2e10966b300050", - "@angular/language-service": "github:angular/language-service-builds#71a72db5ef13614220e6d7a2b6467a2cb6fb1c60", - "@angular/platform-browser": "github:angular/platform-browser-builds#9af9808d0232a6a9f7c0815a8a8123d2094a5da9", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d8062fef6123f8e721c3e9cc3a109c459003837b", - "@angular/router": "github:angular/router-builds#3c85c998600101cff08ec3060541ef733f36372d" + "@angular/animations": "github:angular/animations-builds#e989846453e3dc5a0a0d9d82fdac00ef2f1f8e1d", + "@angular/common": "github:angular/common-builds#4245170a2d05742d2d9cc4381cb6c7a754d394a5", + "@angular/compiler": "github:angular/compiler-builds#ea55e76818e3225cd359c7a29c21552cdd44b8f6", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#441cb41151e6deefa3b67c575cfae42a7a7f181f", + "@angular/core": "github:angular/core-builds#4a4bf861cea127431bcabf2c37492bfb079a8a4a", + "@angular/forms": "github:angular/forms-builds#192389bf4546e99ea9444b4170e5b4be51223b61", + "@angular/language-service": "github:angular/language-service-builds#4b27fa6e6a3ccbf5f2ca7e029774a7a0f38ad71b", + "@angular/platform-browser": "github:angular/platform-browser-builds#27f73939d320ed42cca4513193b7ede0428e8f3c", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#21c6bf206c2643c24c0a45bf103c831b6c31f2b4", + "@angular/router": "github:angular/router-builds#ca6b7de3b1b6f8bcc7bb2cdcdcb3a2b367a5e6d5" } } \ No newline at end of file From 59d80f52be35217850a2b130b0cfacaf0f51f3c0 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 23 Aug 2019 20:35:42 +0200 Subject: [PATCH 0052/1070] fix(@angular-devkit/build-optimizer): replace multiple tslib helpers (#15400) Inlined tslib helpers can be suffixed with `$` and a number when having multiple helpers in the same file. With this change we will replace all tslib inline helpers to imports from `tslib` --- .../src/transforms/import-tslib.ts | 23 +++++--- .../src/transforms/import-tslib_spec.ts | 54 +++++++++++++++++++ 2 files changed, 70 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts index 4b57fc9e039e..27a43e80b5c9 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts @@ -12,7 +12,7 @@ import { isHelperName } from '../helpers/ast-utils'; * @deprecated From 0.9.0 */ export function testImportTslib(content: string) { - const regex = /var (__extends|__decorate|__metadata|__param) = \(.*\r?\n\s+(.*\r?\n)*\s*\};/; + const regex = /var (__extends|__decorate|__metadata|__param)(\$\d+)? = \(.*\r?\n\s+(.*\r?\n)*\s*\};/; return regex.test(content); } @@ -34,11 +34,18 @@ export function getImportTslibTransformer(): ts.TransformerFactory { expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); + it('replaces multiple __decorate', () => { + // tslint:disable:max-line-length + const input = tags.stripIndent` + var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + `; + const output = tags.stripIndent` + import { __decorate as __decorate$1 } from "tslib"; + import { __decorate as __decorate$2 } from "tslib"; + `; + + expect(testImportTslib(input)).toBeTruthy(); + expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); + }); + + it('replaces multiple __decorate in CJS modules', () => { + // tslint:disable:max-line-length + const input = tags.stripIndent` + var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + exports.meaning = 42; + `; + const output = tags.stripIndent` + var __decorate$1 = /*@__PURE__*/ require("tslib").__decorate; + var __decorate$2 = /*@__PURE__*/ require("tslib").__decorate; + + exports.meaning = 42; + `; + + expect(testImportTslib(input)).toBeTruthy(); + expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); + }); + it('replaces __metadata', () => { const input = tags.stripIndent` var __metadata = (this && this.__metadata) || function (k, v) { From 095756ea03a13bb33eac58e94b11176f24f67ade Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 23 Aug 2019 21:36:19 +0300 Subject: [PATCH 0053/1070] build: update stylus to version 0.54.7 (#15407) --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 7b874394738b..20912eddac7b 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -49,7 +49,7 @@ "source-map-loader": "0.2.4", "speed-measure-webpack-plugin": "1.3.1", "style-loader": "1.0.0", - "stylus": "0.54.6", + "stylus": "0.54.7", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", "terser": "4.2.0", diff --git a/yarn.lock b/yarn.lock index 6015cadf656b..0cba365346da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11064,10 +11064,10 @@ stylus-loader@3.0.2: lodash.clonedeep "^4.5.0" when "~3.6.x" -stylus@0.54.6: - version "0.54.6" - resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.6.tgz#e8d0c540efd748075c763763f955946ab36f0f66" - integrity sha512-6s7jEoHKSdAaEtfOnGCNJWy7rcgxPf/pdSUUCusnfV6qO28OmmOLAUYeIJIgJlXWfWTwDO9ytRdd8KhxIdB4EQ== +stylus@0.54.7: + version "0.54.7" + resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.7.tgz#c6ce4793965ee538bcebe50f31537bfc04d88cd2" + integrity sha512-Yw3WMTzVwevT6ZTrLCYNHAFmanMxdylelL3hkWNgPMeTCpMwpV3nXjpOHuBXtFv7aiO2xRuQS6OoAdgkNcSNug== dependencies: css-parse "~2.0.0" debug "~3.1.0" From 9296bea267d8aef34ee026f82320decf5471ca09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Exbrayat?= Date: Fri, 23 Aug 2019 20:36:41 +0200 Subject: [PATCH 0054/1070] fix(@schematics/angular): implements items type for guard schematics (#15412) Fixes the type of the items in the `schema.json` for `implements`, as `enum` alone is not picked up by the CLI. Also migrates the existing e2e test to `async/await` and adds another one with `implements` to avoid regressions. --- packages/schematics/angular/guard/schema.json | 3 ++- .../e2e/tests/generate/guard/guard-basic.ts | 19 ++++++++----------- .../tests/generate/guard/guard-implements.ts | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 tests/legacy-cli/e2e/tests/generate/guard/guard-implements.ts diff --git a/packages/schematics/angular/guard/schema.json b/packages/schematics/angular/guard/schema.json index 64601452c5de..fa09334a80d3 100644 --- a/packages/schematics/angular/guard/schema.json +++ b/packages/schematics/angular/guard/schema.json @@ -59,7 +59,8 @@ "CanActivate", "CanActivateChild", "CanLoad" - ] + ], + "type": "string" }, "default": [ "CanActivate" diff --git a/tests/legacy-cli/e2e/tests/generate/guard/guard-basic.ts b/tests/legacy-cli/e2e/tests/generate/guard/guard-basic.ts index a30cfec2f310..7148fb0b5bf5 100644 --- a/tests/legacy-cli/e2e/tests/generate/guard/guard-basic.ts +++ b/tests/legacy-cli/e2e/tests/generate/guard/guard-basic.ts @@ -1,19 +1,16 @@ import {join} from 'path'; import {ng} from '../../../utils/process'; -import {expectFileToExist} from '../../../utils/fs'; +import {expectFileToExist, expectFileToMatch} from '../../../utils/fs'; -export default function() { +export default async function() { // Does not create a sub directory. const guardDir = join('src', 'app'); - return ng('generate', 'guard', 'test-guard') - .then(() => expectFileToExist(guardDir)) - .then(() => expectFileToExist(join(guardDir, 'test-guard.guard.ts'))) - .then(() => expectFileToExist(join(guardDir, 'test-guard.guard.spec.ts'))); - - - // Try to run the unit tests. - // TODO: Enable once schematic is updated for rxjs 6 - // .then(() => ng('test', '--watch=false')); + await ng('generate', 'guard', 'test-guard'); + await expectFileToExist(guardDir); + await expectFileToExist(join(guardDir, 'test-guard.guard.ts')); + await expectFileToMatch(join(guardDir, 'test-guard.guard.ts'), /implements CanActivate/); + await expectFileToExist(join(guardDir, 'test-guard.guard.spec.ts')); + await ng('test', '--watch=false'); } diff --git a/tests/legacy-cli/e2e/tests/generate/guard/guard-implements.ts b/tests/legacy-cli/e2e/tests/generate/guard/guard-implements.ts new file mode 100644 index 000000000000..5dcf2a32d18c --- /dev/null +++ b/tests/legacy-cli/e2e/tests/generate/guard/guard-implements.ts @@ -0,0 +1,16 @@ +import {join} from 'path'; +import {ng} from '../../../utils/process'; +import {expectFileToExist,expectFileToMatch} from '../../../utils/fs'; + + +export default async function() { + // Does not create a sub directory. + const guardDir = join('src', 'app'); + + await ng('generate', 'guard', 'load', '--implements=CanLoad'); + await expectFileToExist(guardDir); + await expectFileToExist(join(guardDir, 'load.guard.ts')); + await expectFileToMatch(join(guardDir, 'load.guard.ts'), /implements CanLoad/); + await expectFileToExist(join(guardDir, 'load.guard.spec.ts')); + await ng('test', '--watch=false'); +} From 7f6ba9e0014de35e274c71af633b29ae0f2bff45 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Fri, 23 Aug 2019 14:37:06 -0400 Subject: [PATCH 0055/1070] fix(@angular-devkit/core): track workspace targets with no original collection (#15413) Fixes #15403 --- .../angular_devkit/core/src/_golden-api.d.ts | 2 +- .../core/src/workspace/definitions.ts | 7 +-- .../core/src/workspace/json/reader.ts | 40 ++++++++++----- .../core/src/workspace/json/reader_spec.ts | 49 +++++++++++++++++++ 4 files changed, 83 insertions(+), 15 deletions(-) diff --git a/etc/api/angular_devkit/core/src/_golden-api.d.ts b/etc/api/angular_devkit/core/src/_golden-api.d.ts index 6e2467db8a5f..68800d4aacad 100644 --- a/etc/api/angular_devkit/core/src/_golden-api.d.ts +++ b/etc/api/angular_devkit/core/src/_golden-api.d.ts @@ -243,7 +243,7 @@ export declare function decamelize(str: string): string; export declare function deepCopy(value: T): T; -export declare type DefinitionCollectionListener = (name: string, action: 'add' | 'remove' | 'replace', newValue: V | undefined, oldValue: V | undefined) => void; +export declare type DefinitionCollectionListener = (name: string, action: 'add' | 'remove' | 'replace', newValue: V | undefined, oldValue: V | undefined, collection: DefinitionCollection) => void; export declare class DependencyNotFoundException extends BaseException { constructor(); diff --git a/packages/angular_devkit/core/src/workspace/definitions.ts b/packages/angular_devkit/core/src/workspace/definitions.ts index 75dec6286f4b..53b21259116b 100644 --- a/packages/angular_devkit/core/src/workspace/definitions.ts +++ b/packages/angular_devkit/core/src/workspace/definitions.ts @@ -29,11 +29,12 @@ export interface TargetDefinition { builder: string; } -export type DefinitionCollectionListener = ( +export type DefinitionCollectionListener = ( name: string, action: 'add' | 'remove' | 'replace', newValue: V | undefined, oldValue: V | undefined, + collection: DefinitionCollection, ) => void; class DefinitionCollection implements ReadonlyMap { @@ -50,7 +51,7 @@ class DefinitionCollection implements ReadonlyMap { const value = this._map.get(key); const result = this._map.delete(key); if (result && value !== undefined && this._listener) { - this._listener(key, 'remove', undefined, value); + this._listener(key, 'remove', undefined, value, this); } return result; @@ -61,7 +62,7 @@ class DefinitionCollection implements ReadonlyMap { this._map.set(key, value); if (this._listener) { - this._listener(key, existing !== undefined ? 'replace' : 'add', value, existing); + this._listener(key, existing !== undefined ? 'replace' : 'add', value, existing, this); } return this; diff --git a/packages/angular_devkit/core/src/workspace/json/reader.ts b/packages/angular_devkit/core/src/workspace/json/reader.ts index e54382c4acef..24c5f34afe74 100644 --- a/packages/angular_devkit/core/src/workspace/json/reader.ts +++ b/packages/angular_devkit/core/src/workspace/json/reader.ts @@ -213,17 +213,35 @@ function parseProject( } let collectionListener: DefinitionCollectionListener | undefined; - if (context.trackChanges && targetsNode) { - const parentNode = targetsNode; - collectionListener = (name, action, newValue) => { - jsonMetadata.addChange( - action, - `/projects/${projectName}/targets/${escapeKey(name)}`, - parentNode, - newValue, - 'target', - ); - }; + if (context.trackChanges) { + if (targetsNode) { + const parentNode = targetsNode; + collectionListener = (name, action, newValue) => { + jsonMetadata.addChange( + action, + `/projects/${projectName}/targets/${escapeKey(name)}`, + parentNode, + newValue, + 'target', + ); + }; + } else { + let added = false; + collectionListener = (_name, action, _new, _old, collection) => { + if (added || action !== 'add') { + return; + } + + jsonMetadata.addChange( + 'add', + `/projects/${projectName}/targets`, + projectNode, + collection, + 'targetcollection', + ); + added = true; + }; + } } const base = { diff --git a/packages/angular_devkit/core/src/workspace/json/reader_spec.ts b/packages/angular_devkit/core/src/workspace/json/reader_spec.ts index b5c84591dde6..c21550b07d07 100644 --- a/packages/angular_devkit/core/src/workspace/json/reader_spec.ts +++ b/packages/angular_devkit/core/src/workspace/json/reader_spec.ts @@ -710,4 +710,53 @@ describe('JSON ProjectDefinition Tracks Project Changes', () => { expect(change.value).toBe('valueA'); } }); + + it('tracks target additions with no original target collection', async () => { + const original = stripIndent` + { + "version": 1, + // Comment + "schematics": { + "@angular/schematics:component": { + "prefix": "abc" + } + }, + "projects": { + "p1": { + "root": "p1-root" + } + }, + "x-foo": { + "is": ["good", "great", "awesome"] + }, + "x-bar": 5, + } + `; + const host = createTestHost(original); + + const workspace = await readJsonWorkspace('', host); + + const project = workspace.projects.get('p1'); + expect(project).not.toBeUndefined(); + if (!project) { + return; + } + + project.targets.add({ + name: 't1', + builder: 't1-builder', + }); + + const metadata = getMetadata(workspace); + + expect(metadata.hasChanges).toBeTruthy(); + expect(metadata.changeCount).toBe(1); + + const change = metadata.findChangesForPath('/projects/p1/targets')[0]; + expect(change).not.toBeUndefined(); + if (change) { + expect(change.op).toBe('add'); + expect(change.type).toBe('targetcollection'); + } + }); }); From af9a8b75eeeb9d24718c2355cc073f4a4ee726cb Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Fri, 23 Aug 2019 14:37:48 -0400 Subject: [PATCH 0056/1070] fix(@angular-devkit/build-angular): default poll value when not present (#15417) `--poll` is a valid command line option (vs. `--poll 1000`). This however will result in a value of 0 which causes polling to be disabled rather than enabled. This change sets a default value of 500 when the commandline flag is used. --- .../build_angular/src/utils/normalize-builder-schema.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts b/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts index 47e663088ba0..6941e7d2ad04 100644 --- a/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts +++ b/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts @@ -65,5 +65,9 @@ export function normalizeBrowserSchema( || [], }, lazyModules: options.lazyModules || [], + // Using just `--poll` will result in a value of 0 which is very likely not the intention + // A value of 0 is falsy and will disable polling rather then enable + // 500 ms is a sensible default in this case + poll: options.poll === 0 ? 500 : options.poll, }; } From f0a973fe53c99f46db1712ab37b4fe99b978b178 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 23 Aug 2019 21:38:03 +0300 Subject: [PATCH 0057/1070] build: update bazel_toolchains to version 0.28.6 (#15418) --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 2577680b2135..183497ec75bb 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -108,9 +108,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "b72e7a911436b2900b05759a1fcd735070edbd4442f0a3506ef021fdcd6e15b3", - strip_prefix = "bazel-toolchains-0.28.5", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.28.5.tar.gz", + sha256 = "668bb7a8600e50e8e6a58effc15f86b7291475c9a467b7b92c8c6e1513000418", + strip_prefix = "bazel-toolchains-0.28.6", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.28.6.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") From 85bdc984704ba1918306fef96eb6dd6273aca73e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 23 Aug 2019 21:38:14 +0300 Subject: [PATCH 0058/1070] build: update less to version 3.10.3 (#15419) --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 20912eddac7b..162148170f9c 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -28,7 +28,7 @@ "glob": "7.1.4", "istanbul-instrumenter-loader": "3.0.1", "karma-source-map-support": "1.4.0", - "less": "3.10.2", + "less": "3.10.3", "less-loader": "5.0.0", "license-webpack-plugin": "2.1.2", "loader-utils": "1.2.3", diff --git a/yarn.lock b/yarn.lock index 0cba365346da..4454bc2f60c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7015,10 +7015,10 @@ less-plugin-npm-import@^2.1.0: promise "~7.0.1" resolve "~1.1.6" -less@3.10.2: - version "3.10.2" - resolved "https://registry.yarnpkg.com/less/-/less-3.10.2.tgz#49b94da22e18ed112d9500bdb2340969dafee57f" - integrity sha512-crOb5r8AnIYkWss6sJNccgb20UqvDfdZhopuDG9LGfcSQY+fAKIA/W4as5+ELnfUxnDruqC7iYyeDZmC44nMnw== +less@3.10.3: + version "3.10.3" + resolved "https://registry.yarnpkg.com/less/-/less-3.10.3.tgz#417a0975d5eeecc52cff4bcfa3c09d35781e6792" + integrity sha512-vz32vqfgmoxF1h3K4J+yKCtajH0PWmjkIFgbs5d78E/c/e+UQTnI+lWK+1eQRE95PXM2mC3rJlLSSP9VQHnaow== dependencies: clone "^2.1.2" optionalDependencies: From 215f179da784237eeaa5a91a44e77d5e665dadeb Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 23 Aug 2019 21:38:32 +0300 Subject: [PATCH 0059/1070] build: update inquirer to version 7.0.0 (#15422) --- packages/angular/cli/package.json | 2 +- packages/angular_devkit/schematics_cli/package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 76f7a019a4e1..7def7b073037 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -34,7 +34,7 @@ "ansi-colors": "4.1.1", "debug": "^4.1.1", "ini": "1.3.5", - "inquirer": "6.5.1", + "inquirer": "7.0.0", "npm-package-arg": "6.1.1", "open": "6.4.0", "pacote": "9.5.8", diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index def4b1fc2d22..a2ba312bf0fc 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -18,7 +18,7 @@ "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0", "@schematics/schematics": "0.0.0", - "inquirer": "6.5.1", + "inquirer": "7.0.0", "minimist": "1.2.0", "rxjs": "6.4.0", "symbol-observable": "1.2.0" diff --git a/yarn.lock b/yarn.lock index 4454bc2f60c3..73a320f50e6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5932,10 +5932,10 @@ injection-js@^2.2.1: resolved "https://registry.yarnpkg.com/injection-js/-/injection-js-2.2.1.tgz#a8d6a085b2f0b8d8650f6f4487f6abb8cc0d67ce" integrity sha512-zHI+E+dM0PXix5FFTO1Y4/UOyAzE7zG1l/QwAn4jchTThOoBq+UYRFK4AVG7lQgFL+go62SbrzSsjXy9DFEZUg== -inquirer@6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.1.tgz#8bfb7a5ac02dac6ff641ac4c5ff17da112fcdb42" - integrity sha512-uxNHBeQhRXIoHWTSNYUFhQVrHYFThIt6IVo2fFmSe8aBwdR3/w6b58hJpiL/fMukFkvGzjg+hSxFtwvVmKZmXw== +inquirer@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.0.tgz#9e2b032dde77da1db5db804758b8fea3a970519a" + integrity sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ== dependencies: ansi-escapes "^4.2.1" chalk "^2.4.2" From 252f1be4f0a6c435b2b404983c5db7ff2dd8b0bd Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 23 Aug 2019 20:38:56 +0200 Subject: [PATCH 0060/1070] fix(@schematics/angular): update tsickle to 0.37.0 (#15430) Closes #15428 --- packages/schematics/angular/utility/latest-versions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 4ed84f475758..54c8cb39a445 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -20,6 +20,6 @@ export const latestVersions = { DevkitBuildWebpack: '~0.900.0-next.0', AngularPWA: '~0.900.0-next.0', - tsickle: '^0.36.0', + tsickle: '^0.37.0', ngPackagr: '^5.4.0', }; From 55a0ca69d660bf94a2dd0cd75062c9508a249b47 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 26 Aug 2019 21:47:57 +0300 Subject: [PATCH 0061/1070] build: update verdaccio to version 4.2.2 (#15441) --- package.json | 2 +- yarn.lock | 225 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 137 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 0fc69234141e..69da0e97ac90 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "ts-node": "^5.0.0", "tslint-no-circular-imports": "^0.7.0", "tslint-sonarts": "1.9.0", - "verdaccio": "4.2.1" + "verdaccio": "4.2.2" }, "husky": { "hooks": { diff --git a/yarn.lock b/yarn.lock index 73a320f50e6d..97bab93296f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1376,10 +1376,10 @@ "@types/uglify-js" "*" source-map "^0.6.0" -"@verdaccio/commons-api@0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-0.1.2.tgz#084c2c06b22e998ff3bab265de17397998953da3" - integrity sha512-BweLdqHGVpDPZf1BkFVOTb+OW+WQp8TiEFJ4EvVJkpngg9rgvK9MAdJF/NZorGuUIoVIPJmtNwf/fId/ya9Udw== +"@verdaccio/commons-api@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-8.0.0.tgz#b7f2480c73b33311932e59b2dec8c0cda3a1995c" + integrity sha512-s0HFftOhhhnWGVxMRwX1iq7lvFdn9uWmZziG65/XBOrLVw9C1YNsvxmuchIYD0/mms35gq5hm8Z8UqvgGjKo0w== dependencies: http-errors "1.7.3" @@ -1409,10 +1409,10 @@ lodash "4.17.11" mkdirp "0.5.1" -"@verdaccio/readme@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@verdaccio/readme/-/readme-1.0.4.tgz#84fa63f9e278bf4626d1d96460c1ea0359d76974" - integrity sha512-coBtSAriyrGgnzeY4Mu4ps/0P8/B+7fSbG7rcv6DoTb2vl2uLV/zAtet3n55iLKIAg5I4h3LuJ6m+uX2bMkZRA== +"@verdaccio/readme@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@verdaccio/readme/-/readme-8.0.0.tgz#36108dc48597f9ee380d42c965f08db91ed6e87a" + integrity sha512-wZCUR//UwdKbt3C308pFxsai6HJjVJ0lAedyVSWctK+3Dj/is10OsMrWoJZ0gJbacRET6S3rJF9WeS6dtntZcw== dependencies: dompurify "1.0.11" jsdom "15.1.1" @@ -1423,10 +1423,15 @@ resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-2.0.0.tgz#27f51d0cb19d5e49248860942092646e9a357967" integrity sha512-QW1LsYir3wNnqhSznbJlt0iqkcgve0LpXI8RkoTTBPrq3M6ei3Ys4iw+JQKFve3gmYw9O+w8lBiOLc1qvvsoVQ== -"@verdaccio/ui-theme@0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@verdaccio/ui-theme/-/ui-theme-0.2.2.tgz#53a74e9a4c75a93fbe678c6f5cd2a31dcff77f1d" - integrity sha512-Y5AwR0or0gMPuRW5dn8taWNUOr23c4rHgTrh/Q8vjrvZdBs4gMQ/SGghQ/idMjv+Ksk/ch/wQzxt9ut6F1MxJg== +"@verdaccio/streams@8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-8.0.0.tgz#d8e1aa4121c288b2a305de4607d19d0df3f49e52" + integrity sha512-N1zCrQfbo8xWMUyYRFLUuA1Xn9cbbvOslIZ1P2jX+E4HyA/4fBwZi6mpsa79RuOmm1Vu2GI/yXADiO4x9F4j2Q== + +"@verdaccio/ui-theme@0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@verdaccio/ui-theme/-/ui-theme-0.2.3.tgz#d25335be52bc15ad5c57cbff7607ddc8bf857833" + integrity sha512-rzn336VTjReOyxPdYapMDxgH+5PvxpT49GGdnHOcB7JEdDgl4Qa2mQIzRol/3GLahXMfOX+6uRY/ySBdlRo69A== "@webassemblyjs/ast@1.8.5": version "1.8.5" @@ -1584,7 +1589,7 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@yarnpkg/lockfile@1.1.0": +"@yarnpkg/lockfile@1.1.0", "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== @@ -1792,7 +1797,7 @@ ansi-styles@^2.2.1: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= -ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -3019,6 +3024,15 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -4617,42 +4631,6 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -express@4.16.4, express@^4.16.2: - version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" - integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== - dependencies: - accepts "~1.3.5" - array-flatten "1.1.1" - body-parser "1.18.3" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.1" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.4" - qs "6.5.2" - range-parser "~1.2.0" - safe-buffer "5.1.2" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" - utils-merge "1.0.1" - vary "~1.1.2" - express@4.17.1, express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -4689,6 +4667,42 @@ express@4.17.1, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" +express@^4.16.2: + version "4.16.4" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" + integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== + dependencies: + accepts "~1.3.5" + array-flatten "1.1.1" + body-parser "1.18.3" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.1" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.4" + qs "6.5.2" + range-parser "~1.2.0" + safe-buffer "5.1.2" + send "0.16.2" + serve-static "1.13.2" + setprototypeof "1.1.0" + statuses "~1.4.0" + type-is "~1.6.16" + utils-merge "1.0.1" + vary "~1.1.2" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -7154,6 +7168,23 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lockfile-lint-api@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lockfile-lint-api/-/lockfile-lint-api-2.0.0.tgz#36a01a24d94f6c5647b0630163d6bf7af3c9b10e" + integrity sha512-rnOaKGpCHr/Cfz44ADzJa9fxAzTHCJn83tS/xH/7tIqeKN57AZFrpo0jg7Ma0lVrcjeh95nJv+jTMF6aSu4JVw== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + debug "^4.1.0" + +lockfile-lint@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/lockfile-lint/-/lockfile-lint-2.0.1.tgz#b2ccd71530f2861a433cfec3b9deb18b01a2c5e0" + integrity sha512-hT6Nrx2ewTtmZ/N3KjaEpLaXujHmIjcKU32pcuX20JhGgkTVWBlU3bDkIh+Lob7NG6zD96ASOUL6t/dQUa89WQ== + dependencies: + debug "^4.1.0" + lockfile-lint-api "^2.0.0" + yargs "^13.2.4" + lockfile@1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" @@ -7241,21 +7272,16 @@ lodash@4.17.11, lodash@^4.16.6, lodash@^4.17.11, lodash@^4.17.5: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -lodash@4.17.14: - version "4.17.14" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" - integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== +lodash@4.17.15, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== lodash@^4.17.10, lodash@^4.17.4, lodash@^4.2.1: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== -lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== - log4js@^3.0.0: version "3.0.6" resolved "https://registry.yarnpkg.com/log4js/-/log4js-3.0.6.tgz#e6caced94967eeeb9ce399f9f8682a4b2b28c8ff" @@ -10210,11 +10236,6 @@ semver-intersect@1.4.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw== -semver@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" - integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== - semver@6.3.0, semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -10955,7 +10976,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0: +string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== @@ -11006,7 +11027,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.1.0, strip-ansi@^5.2.0: +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -11832,35 +11853,35 @@ vary@^1, vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -verdaccio-audit@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/verdaccio-audit/-/verdaccio-audit-1.2.1.tgz#24aca87c0cd2f3b576e123d2da8b53d620f836c6" - integrity sha512-kSQ4s3B0VgO43r7zOjteINzomeTEjaQwRwcNX0XDcm671pM+ZzPFEbv6VZ+vN75KdwCYmli5r8AUI9TMcj1JEg== +verdaccio-audit@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/verdaccio-audit/-/verdaccio-audit-8.0.0.tgz#61933cab21daa99a2de08c550d6c6d665f3226cd" + integrity sha512-80/0GEPulkwzi0qlQMHpe8tXeHEPQ+x78ZsUk3CkpNwCr+VlgzWxAzk6zI3ZUQ/gBBAidZ8We+TWNsdAPze8/w== dependencies: - express "4.16.4" + express "4.17.1" request "2.88.0" -verdaccio-htpasswd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/verdaccio-htpasswd/-/verdaccio-htpasswd-2.0.0.tgz#cd517dca1d3cee8a46e6ed59b9b9693acb6d9b1f" - integrity sha512-HI6AvstmpkyQp6mHHbCVrSu1rOFq/FND2V4gM7EhUtmOAoJjOmZENVGT87ZNf2mTQq8P4MRnfypBIjfutI3BAg== +verdaccio-htpasswd@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/verdaccio-htpasswd/-/verdaccio-htpasswd-8.0.0.tgz#7939fa13fe46e5154cda526cf0f18085c633e618" + integrity sha512-tZKw5X6TQhVPmyB1NrkdXqQEFIyLbE0WGGt1jFX3tfjjl9cglZLvbkVNkUFKeZcOv4GjJ4zHGXwmTG2ZHlWpEw== dependencies: "@verdaccio/file-locking" "1.0.0" apache-md5 "1.1.2" bcryptjs "2.4.3" - http-errors "1.7.2" + http-errors "1.7.3" unix-crypt-td-js "1.0.0" -verdaccio@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.2.1.tgz#3f9819f537de0301adfa0e291a1c2736343acbab" - integrity sha512-Xk65HJHVHl3RuScEk5P10vVgwPWEhlulXl9IehRHZM+7CPoEcw//WPA+JN4x+rzsVP/Ozt/gkiOONyJaUKP6Wg== +verdaccio@4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.2.2.tgz#80207e64920076d90a0f61a096aed7bae24578f1" + integrity sha512-8T0IcuerV/BjMh+SiIZi7pfx3icc3JQHmJ1LGzHZPPwLy2UD+bZkSKkPrqqWxDhckwPqRcOMG0Xa5yOa9rDGhQ== dependencies: - "@verdaccio/commons-api" "0.1.2" + "@verdaccio/commons-api" "8.0.0" "@verdaccio/local-storage" "2.2.1" - "@verdaccio/readme" "1.0.4" - "@verdaccio/streams" "2.0.0" - "@verdaccio/ui-theme" "0.2.2" + "@verdaccio/readme" "8.0.0" + "@verdaccio/streams" "8.0.0" + "@verdaccio/ui-theme" "0.2.3" JSONStream "1.3.5" async "3.1.0" body-parser "1.19.0" @@ -11877,7 +11898,8 @@ verdaccio@4.2.1: js-yaml "3.13.1" jsonwebtoken "8.5.1" kleur "3.0.3" - lodash "4.17.14" + lockfile-lint "2.0.1" + lodash "4.17.15" lunr-mutable-indexes "2.3.2" marked "0.7.0" mime "2.4.4" @@ -11886,9 +11908,9 @@ verdaccio@4.2.1: mv "2.1.1" pkginfo "0.4.1" request "2.87.0" - semver "6.2.0" - verdaccio-audit "1.2.1" - verdaccio-htpasswd "2.0.0" + semver "6.3.0" + verdaccio-audit "8.0.0" + verdaccio-htpasswd "8.0.0" verror@1.10.0: version "1.10.0" @@ -12272,6 +12294,15 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -12411,7 +12442,7 @@ yargs-parser@^11.1.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^13.0.0: +yargs-parser@^13.0.0, yargs-parser@^13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== @@ -12497,6 +12528,22 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" +yargs@^13.2.4: + version "13.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" + integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.1" + yauzl@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" From 66280bcb29b6c75bcbe4bb84a48cc8493e7381ea Mon Sep 17 00:00:00 2001 From: Wataru KASAHARA Date: Tue, 27 Aug 2019 03:48:14 +0900 Subject: [PATCH 0062/1070] refactor(@schematics/angular): use beforeEach to get service in service unit test (#15438) --- .../__name@dasherize__.service.spec.ts.template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template index 3ac3aab7a0f2..9f6d10c3106f 100644 --- a/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template +++ b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template @@ -3,10 +3,14 @@ import { TestBed } from '@angular/core/testing'; import { <%= classify(name) %>Service } from './<%= dasherize(name) %>.service'; describe('<%= classify(name) %>Service', () => { - beforeEach(() => TestBed.configureTestingModule({})); + let service: <%= classify(name) %>Service; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.get(<%= classify(name) %>Service); + }); it('should be created', () => { - const service: <%= classify(name) %>Service = TestBed.get(<%= classify(name) %>Service); expect(service).toBeTruthy(); }); }); From 0f2cca0ee33e52ca2599fde59504c087b155d216 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 26 Aug 2019 21:48:27 +0300 Subject: [PATCH 0063/1070] build: update terser to version 4.2.1 (#15435) --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 162148170f9c..53e1247a988d 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -52,7 +52,7 @@ "stylus": "0.54.7", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", - "terser": "4.2.0", + "terser": "4.2.1", "terser-webpack-plugin": "1.4.1", "webpack": "4.39.2", "webpack-dev-middleware": "3.7.0", diff --git a/yarn.lock b/yarn.lock index 97bab93296f7..8b2db515d245 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11212,10 +11212,10 @@ terser-webpack-plugin@1.4.1, terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.2.0.tgz#4b1b5f4424b426a7a47e80d6aae45e0d7979aef0" - integrity sha512-6lPt7lZdZ/13icQJp8XasFOwZjFJkxFFIb/N1fhYEQNoNI3Ilo3KABZ9OocZvZoB39r6SiIk/0+v/bt8nZoSeA== +terser@4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.2.1.tgz#1052cfe17576c66e7bc70fcc7119f22b155bdac1" + integrity sha512-cGbc5utAcX4a9+2GGVX4DsenG6v0x3glnDi5hx8816X1McEAwPlPgRtXPJzSBsbpILxZ8MQMT0KvArLuE0HP5A== dependencies: commander "^2.20.0" source-map "~0.6.1" From 891fe527d74e98df8c5d50486c2674385141de6e Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Mon, 26 Aug 2019 14:48:43 -0400 Subject: [PATCH 0064/1070] feat(@angular/cli): update with migrate only creates commit per migration (#15414) * feat(@angular/cli): update with migrate only creates commit per migration * refactor(@angular/cli): simplify update command schematic execution --- packages/angular/cli/commands/update-impl.ts | 282 +++++++++++++++--- packages/angular/cli/commands/update.json | 6 + .../legacy-cli/e2e/tests/update/update-1.0.ts | 3 +- .../e2e/tests/update/update-1.7-longhand.ts | 3 +- .../legacy-cli/e2e/tests/update/update-1.7.ts | 3 +- 5 files changed, 246 insertions(+), 51 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 1da822ffe236..8aa590a719e1 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -5,12 +5,17 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { normalize, virtualFs } from '@angular-devkit/core'; +import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import { UnsuccessfulWorkflowExecution } from '@angular-devkit/schematics'; +import { NodeWorkflow, validateOptionsWithSchema } from '@angular-devkit/schematics/tools'; import { execSync } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; import * as semver from 'semver'; -import { Arguments, Option } from '../models/interface'; -import { SchematicCommand } from '../models/schematic-command'; +import { Command } from '../models/command'; +import { Arguments } from '../models/interface'; +import { colors } from '../utilities/color'; import { getPackageManager } from '../utilities/package-manager'; import { PackageIdentifier, @@ -28,11 +33,156 @@ const npa = require('npm-package-arg'); const oldConfigFileNames = ['.angular-cli.json', 'angular-cli.json']; -export class UpdateCommand extends SchematicCommand { +export class UpdateCommand extends Command { public readonly allowMissingWorkspace = true; - async parseArguments(_schematicOptions: string[], _schema: Option[]): Promise { - return {}; + private workflow: NodeWorkflow; + + async initialize() { + this.workflow = new NodeWorkflow( + new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(this.workspace.root)), + { + packageManager: await getPackageManager(this.workspace.root), + root: normalize(this.workspace.root), + }, + ); + + this.workflow.engineHost.registerOptionsTransform( + validateOptionsWithSchema(this.workflow.registry), + ); + } + + async executeSchematic( + collection: string, + schematic: string, + options = {}, + ): Promise<{ success: boolean; files: Set }> { + let error = false; + const logs: string[] = []; + const files = new Set(); + + const reporterSubscription = this.workflow.reporter.subscribe(event => { + // Strip leading slash to prevent confusion. + const eventPath = event.path.startsWith('/') ? event.path.substr(1) : event.path; + + switch (event.kind) { + case 'error': + error = true; + const desc = event.description == 'alreadyExist' ? 'already exists' : 'does not exist.'; + this.logger.error(`ERROR! ${eventPath} ${desc}.`); + break; + case 'update': + logs.push(`${colors.whiteBright('UPDATE')} ${eventPath} (${event.content.length} bytes)`); + files.add(eventPath); + break; + case 'create': + logs.push(`${colors.green('CREATE')} ${eventPath} (${event.content.length} bytes)`); + files.add(eventPath); + break; + case 'delete': + logs.push(`${colors.yellow('DELETE')} ${eventPath}`); + files.add(eventPath); + break; + case 'rename': + logs.push(`${colors.blue('RENAME')} ${eventPath} => ${event.to}`); + files.add(eventPath); + break; + } + }); + + const lifecycleSubscription = this.workflow.lifeCycle.subscribe(event => { + if (event.kind == 'end' || event.kind == 'post-tasks-start') { + if (!error) { + // Output the logging queue, no error happened. + logs.forEach(log => this.logger.info(log)); + } + } + }); + + // TODO: Allow passing a schematic instance directly + try { + await this.workflow + .execute({ + collection, + schematic, + options, + logger: this.logger, + }) + .toPromise(); + + reporterSubscription.unsubscribe(); + lifecycleSubscription.unsubscribe(); + + return { success: !error, files }; + } catch (e) { + if (e instanceof UnsuccessfulWorkflowExecution) { + this.logger.error('The update failed. See above.'); + } else { + this.logger.fatal(e.message); + } + + return { success: false, files }; + } + } + + async executeMigrations( + packageName: string, + collectionPath: string, + range: semver.Range, + commit = false, + ) { + const collection = this.workflow.engine.createCollection(collectionPath); + + const migrations = []; + for (const name of collection.listSchematicNames()) { + const schematic = this.workflow.engine.createSchematic(name, collection); + const description = schematic.description as typeof schematic.description & { + version?: string; + }; + if (!description.version) { + continue; + } + + if (semver.satisfies(description.version, range, { includePrerelease: true })) { + migrations.push(description as typeof schematic.description & { version: string }); + } + } + + if (migrations.length === 0) { + return true; + } + + const startingGitSha = this.findCurrentGitSha(); + + migrations.sort((a, b) => semver.compare(a.version, b.version) || a.name.localeCompare(b.name)); + + for (const migration of migrations) { + this.logger.info( + `** Executing migrations for version ${migration.version} of package '${packageName}' **`, + ); + + const result = await this.executeSchematic(migration.collection.name, migration.name); + if (!result.success) { + if (startingGitSha !== null) { + const currentGitSha = this.findCurrentGitSha(); + if (currentGitSha !== startingGitSha) { + this.logger.warn(`git HEAD was at ${startingGitSha} before migrations.`); + } + } + + return false; + } + + // Commit migration + if (commit) { + let message = `migrate workspace for ${packageName}@${migration.version}`; + if (migration.description) { + message += '\n' + migration.description; + } + // TODO: Use result.files once package install tasks are accounted + this.createCommit(message, []); + } + } } // tslint:disable-next-line:no-big-function @@ -112,9 +262,9 @@ export class UpdateCommand extends SchematicCommand { this.workspace.configFile && oldConfigFileNames.includes(this.workspace.configFile) ) { - options.migrateOnly = true; - options.from = '1.0.0'; - } + options.migrateOnly = true; + options.from = '1.0.0'; + } this.logger.info('Collecting installed dependencies...'); @@ -125,19 +275,15 @@ export class UpdateCommand extends SchematicCommand { if (options.all || packages.length === 0) { // Either update all packages or show status - return this.runSchematic({ - collectionName: '@schematics/update', - schematicName: 'update', - dryRun: !!options.dryRun, - showNothingDone: false, - additionalOptions: { - force: options.force || false, - next: options.next || false, - verbose: options.verbose || false, - packageManager, - packages: options.all ? Object.keys(rootDependencies) : [], - }, + const { success } = await this.executeSchematic('@schematics/update', 'update', { + force: options.force || false, + next: options.next || false, + verbose: options.verbose || false, + packageManager, + packages: options.all ? Object.keys(rootDependencies) : [], }); + + return success ? 0 : 1; } if (options.migrateOnly) { @@ -153,6 +299,13 @@ export class UpdateCommand extends SchematicCommand { return 1; } + const from = coerceVersionNumber(options.from); + if (!from) { + this.logger.error(`"from" value [${options.from}] is not a valid version.`); + + return 1; + } + if (options.next) { this.logger.warn('"next" option has no effect when using "migrate-only" option.'); } @@ -230,20 +383,18 @@ export class UpdateCommand extends SchematicCommand { } } - return this.runSchematic({ - collectionName: '@schematics/update', - schematicName: 'migrate', - dryRun: !!options.dryRun, - force: false, - showNothingDone: false, - additionalOptions: { - package: packageName, - collection: migrations, - from: options.from, - verbose: options.verbose || false, - to: options.to || packageNode.package.version, - }, - }); + const migrationRange = new semver.Range( + '>' + from + ' <=' + (options.to || packageNode.package.version), + ); + + const result = await this.executeMigrations( + packageName, + migrations, + migrationRange, + !options.skipCommits, + ); + + return result ? 1 : 0; } const requests: { @@ -287,7 +438,9 @@ export class UpdateCommand extends SchematicCommand { try { // Metadata requests are internally cached; multiple requests for same name // does not result in additional network traffic - metadata = await fetchPackageMetadata(packageName, this.logger, { verbose: options.verbose }); + metadata = await fetchPackageMetadata(packageName, this.logger, { + verbose: options.verbose, + }); } catch (e) { this.logger.error(`Error fetching metadata for '${packageName}': ` + e.message); @@ -334,18 +487,14 @@ export class UpdateCommand extends SchematicCommand { return 0; } - return this.runSchematic({ - collectionName: '@schematics/update', - schematicName: 'update', - dryRun: !!options.dryRun, - showNothingDone: false, - additionalOptions: { - verbose: options.verbose || false, - force: options.force || false, - packageManager, - packages: packagesToUpdate, - }, + const { success } = await this.executeSchematic('@schematics/update', 'update', { + verbose: options.verbose || false, + force: options.force || false, + packageManager, + packages: packagesToUpdate, }); + + return success ? 0 : 1; } checkCleanGit() { @@ -366,9 +515,46 @@ export class UpdateCommand extends SchematicCommand { return false; } } - - } catch { } + } catch {} return true; } + + createCommit(message: string, files: string[]) { + try { + execSync('git add -A ' + files.join(' '), { encoding: 'utf8', stdio: 'pipe' }); + + execSync(`git commit --no-verify -m "${message}"`, { encoding: 'utf8', stdio: 'pipe' }); + } catch (error) {} + } + + findCurrentGitSha(): string | null { + try { + const result = execSync('git rev-parse HEAD', { encoding: 'utf8', stdio: 'pipe' }); + + return result.trim(); + } catch { + return null; + } + } +} + +function coerceVersionNumber(version: string): string | null { + if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}/)) { + const match = version.match(/^\d{1,30}(\.\d{1,30})*/); + + if (!match) { + return null; + } + + if (!match[1]) { + version = version.substr(0, match[0].length) + '.0.0' + version.substr(match[0].length); + } else if (!match[2]) { + version = version.substr(0, match[0].length) + '.0' + version.substr(match[0].length); + } else { + return null; + } + } + + return semver.valid(version); } diff --git a/packages/angular/cli/commands/update.json b/packages/angular/cli/commands/update.json index 41e19d672f2b..f9ef123e15cd 100644 --- a/packages/angular/cli/commands/update.json +++ b/packages/angular/cli/commands/update.json @@ -62,6 +62,12 @@ "description": "Display additional details about internal operations during execution.", "type": "boolean", "default": false + }, + "skipCommits": { + "description": "Do not create source control commits for updates and migrations.", + "type": "boolean", + "default": false, + "aliases": ["C"] } } } diff --git a/tests/legacy-cli/e2e/tests/update/update-1.0.ts b/tests/legacy-cli/e2e/tests/update/update-1.0.ts index 6d24c8ffeb4d..4ce2ea66134a 100644 --- a/tests/legacy-cli/e2e/tests/update/update-1.0.ts +++ b/tests/legacy-cli/e2e/tests/update/update-1.0.ts @@ -10,7 +10,8 @@ export default async function() { await useCIChrome('.'); await expectToFail(() => ng('build')); - await ng('update', '@angular/cli'); + // Turn off git commits ('-C') per migration to avoid breaking E2E cleanup process + await ng('update', '@angular/cli', '-C'); await useBuiltPackages(); await silentNpm('install'); await ng('update', '@angular/core', ...extraUpdateArgs); diff --git a/tests/legacy-cli/e2e/tests/update/update-1.7-longhand.ts b/tests/legacy-cli/e2e/tests/update/update-1.7-longhand.ts index adec63d719ac..378fdf0cbbc6 100644 --- a/tests/legacy-cli/e2e/tests/update/update-1.7-longhand.ts +++ b/tests/legacy-cli/e2e/tests/update/update-1.7-longhand.ts @@ -9,7 +9,8 @@ export default async function() { await createProjectFromAsset('1.7-project'); await expectToFail(() => ng('build')); - await ng('update', '@angular/cli', '--migrate-only', '--from=1.7.1'); + // Turn off git commits ('-C') per migration to avoid breaking E2E cleanup process + await ng('update', '@angular/cli', '--migrate-only', '--from=1.7.1', '-C'); await useBuiltPackages(); await silentNpm('install'); await ng('update', '@angular/core', ...extraUpdateArgs); diff --git a/tests/legacy-cli/e2e/tests/update/update-1.7.ts b/tests/legacy-cli/e2e/tests/update/update-1.7.ts index 335368638446..da7724197239 100644 --- a/tests/legacy-cli/e2e/tests/update/update-1.7.ts +++ b/tests/legacy-cli/e2e/tests/update/update-1.7.ts @@ -12,7 +12,8 @@ export default async function() { await useCIChrome('.'); await expectToFail(() => ng('build')); - await ng('update', '@angular/cli'); + // Turn off git commits ('-C') per migration to avoid breaking E2E cleanup process + await ng('update', '@angular/cli', '-C'); await useBuiltPackages(); await silentNpm('install'); await ng('update', '@angular/core', ...extraUpdateArgs); From 860d5925e6877ab88e9e8ea26a1618cff65de0bc Mon Sep 17 00:00:00 2001 From: vikerman Date: Tue, 27 Aug 2019 00:19:35 +0530 Subject: [PATCH 0065/1070] fix(@schematics/angular): open twitter link in new tab (#15446) Change the default application to open the twitter link in a new tab instead of in the current tab. This is consistent with all the other external links in the page. --- .../angular/application/other-files/app.component.html.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/other-files/app.component.html.template b/packages/schematics/angular/application/other-files/app.component.html.template index 350f7192eb3d..f45c96c77e55 100644 --- a/packages/schematics/angular/application/other-files/app.component.html.template +++ b/packages/schematics/angular/application/other-files/app.component.html.template @@ -304,7 +304,7 @@ /> Welcome
- + Welcome
-
- - - - + + +
From 87b01ffd6aad45f3543a31e30f67b5b01a13b77e Mon Sep 17 00:00:00 2001 From: Adam Vigneaux Date: Tue, 27 Aug 2019 14:02:50 -0400 Subject: [PATCH 0080/1070] feat(@angular/cli): add support for custom npmrc paths According to [the npm config docs](https://docs.npmjs.com/misc/config#npmrc-files), a user can specify the path to their `npmrc` files using the environment variables `NPM_CONFIG_USERCONFIG` and `NPM_CONFIG_GLOBALCONFIG`. When set, these variables should override the default paths. --- packages/angular/cli/utilities/package-metadata.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/utilities/package-metadata.ts b/packages/angular/cli/utilities/package-metadata.ts index 26b3f446b135..942fe5412579 100644 --- a/packages/angular/cli/utilities/package-metadata.ts +++ b/packages/angular/cli/utilities/package-metadata.ts @@ -91,8 +91,8 @@ function readOptions( } const defaultConfigLocations = [ - path.join(globalPrefix, 'etc', baseFilename), - path.join(homedir(), dotFilename), + (!yarn && process.env.NPM_CONFIG_GLOBALCONFIG) || path.join(globalPrefix, 'etc', baseFilename), + (!yarn && process.env.NPM_CONFIG_USERCONFIG) || path.join(homedir(), dotFilename), ]; const projectConfigLocations: string[] = [ From f4691a545acc0f5586c1cb8e9c667fed4c6898fe Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 23 Aug 2019 13:52:10 +0200 Subject: [PATCH 0081/1070] feat(@schematics/angular): add migration to enable AOT by default With this change we enable the AOT option for the browser builder when an application will use Ivy as rendering engine. --- .../update-9/update-workspace-config.ts | 44 +++++-- .../update-9/update-workspace-config_spec.ts | 79 +++++++++++++ .../angular/migrations/update-9/utils.ts | 39 ++++++- .../angular/migrations/update-9/utils_spec.ts | 107 ++++++++++++++++++ 4 files changed, 261 insertions(+), 8 deletions(-) create mode 100644 packages/schematics/angular/migrations/update-9/utils_spec.ts diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts index e674ae4c281a..9b9750fa2d96 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts @@ -15,7 +15,7 @@ import { removePropertyInAstObject, } from '../../utility/json-utils'; import { Builders } from '../../utility/workspace-models'; -import { getAllOptions, getTargets, getWorkspace } from './utils'; +import { getAllOptions, getTargets, getWorkspace, isIvyEnabled } from './utils'; export const ANY_COMPONENT_STYLE_BUDGET = { type: 'anyComponentStyle', @@ -32,6 +32,7 @@ export function UpdateWorkspaceConfig(): Rule { updateStyleOrScriptOption('styles', recorder, target); updateStyleOrScriptOption('scripts', recorder, target); addAnyComponentStyleBudget(recorder, target); + updateAotOption(tree, recorder, target); } for (const { target } of getTargets(workspace, 'test', Builders.Karma)) { @@ -45,6 +46,41 @@ export function UpdateWorkspaceConfig(): Rule { }; } +function updateAotOption(tree: Tree, recorder: UpdateRecorder, builderConfig: JsonAstObject) { + const options = findPropertyInAstObject(builderConfig, 'options'); + if (!options || options.kind !== 'object') { + return; + } + + + const tsConfig = findPropertyInAstObject(options, 'tsConfig'); + // Do not add aot option if the users already opted out from Ivy. + if (tsConfig && tsConfig.kind === 'string' && !isIvyEnabled(tree, tsConfig.value)) { + return; + } + + // Add aot to options. + const aotOption = findPropertyInAstObject(options, 'aot'); + + if (!aotOption) { + insertPropertyInAstObjectInOrder(recorder, options, 'aot', true, 12); + + return; + } + + if (aotOption.kind !== 'true') { + const { start, end } = aotOption; + recorder.remove(start.offset, end.offset - start.offset); + recorder.insertLeft(start.offset, 'true'); + } + + // Remove aot properties from other configurations as they are no redundant + const configOptions = getAllOptions(builderConfig, true); + for (const options of configOptions) { + removePropertyInAstObject(recorder, options, 'aot'); + } +} + function updateStyleOrScriptOption(property: 'scripts' | 'styles', recorder: UpdateRecorder, builderConfig: JsonAstObject) { const options = getAllOptions(builderConfig); @@ -75,12 +111,6 @@ function addAnyComponentStyleBudget(recorder: UpdateRecorder, builderConfig: Jso const options = getAllOptions(builderConfig, true); for (const option of options) { - const aotOption = findPropertyInAstObject(option, 'aot'); - if (!aotOption || aotOption.kind !== 'true') { - // AnyComponentStyle only works for AOT - continue; - } - const budgetOption = findPropertyInAstObject(option, 'budgets'); if (!budgetOption) { // add diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts index 5bf68031575f..00d59ab12683 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts @@ -169,5 +169,84 @@ describe('Migration to version 9', () => { expect(config.configurations.production.budgets).toEqual([ANY_COMPONENT_STYLE_BUDGET]); }); }); + + describe('aot option', () => { + it('should update aot option when false', async () => { + let config = getWorkspaceTargets(tree); + config.build.options.aot = false; + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.options.aot).toBe(true); + }); + + it('should add aot option when not defined', async () => { + let config = getWorkspaceTargets(tree); + config.build.options.aot = undefined; + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.options.aot).toBe(true); + }); + + it('should not aot option when opted-out of Ivy', async () => { + const tsConfig = JSON.stringify( + { + extends: './tsconfig.json', + angularCompilerOptions: { + enableIvy: false, + }, + }, + null, + 2, + ); + + tree.overwrite('/tsconfig.app.json', tsConfig); + + let config = getWorkspaceTargets(tree); + config.build.options.aot = false; + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.options.aot).toBe(false); + }); + + it('should not aot option when opted-out of Ivy in workspace', async () => { + const tsConfig = JSON.stringify( + { + angularCompilerOptions: { + enableIvy: false, + }, + }, + null, + 2, + ); + + tree.overwrite('/tsconfig.json', tsConfig); + + let config = getWorkspaceTargets(tree); + config.build.options.aot = false; + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.options.aot).toBe(false); + }); + + it('should remove aot option from production configuration', async () => { + let config = getWorkspaceTargets(tree); + config.build.options.aot = false; + config.build.configurations.production.aot = true; + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.options.aot).toBe(true); + expect(config.configurations.production.aot).toBeUndefined(); + }); + }); }); }); diff --git a/packages/schematics/angular/migrations/update-9/utils.ts b/packages/schematics/angular/migrations/update-9/utils.ts index 04542a708f37..b4c6def533e1 100644 --- a/packages/schematics/angular/migrations/update-9/utils.ts +++ b/packages/schematics/angular/migrations/update-9/utils.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import { JsonAstObject, JsonParseMode, parseJsonAst } from '@angular-devkit/core'; +import { JsonAstObject, JsonParseMode, dirname, normalize, parseJsonAst, resolve } from '@angular-devkit/core'; import { SchematicsException, Tree } from '@angular-devkit/schematics'; import { getWorkspacePath } from '../../utility/config'; import { findPropertyInAstObject } from '../../utility/json-utils'; @@ -81,3 +81,40 @@ export function getWorkspace(host: Tree): JsonAstObject { return parseJsonAst(content, JsonParseMode.Loose) as JsonAstObject; } + +export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { + // In version 9, Ivy is turned on by default + // Ivy is opted out only when 'enableIvy' is set to false. + + const buffer = tree.read(tsConfigPath); + if (!buffer) { + return true; + } + + const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + + if (tsCfgAst.kind !== 'object') { + return true; + } + + const ngCompilerOptions = findPropertyInAstObject(tsCfgAst, 'angularCompilerOptions'); + if (ngCompilerOptions && ngCompilerOptions.kind === 'object') { + const enableIvy = findPropertyInAstObject(ngCompilerOptions, 'enableIvy'); + + if (enableIvy) { + return !!enableIvy.value; + } + } + + const configExtends = findPropertyInAstObject(tsCfgAst, 'extends'); + if (configExtends && configExtends.kind === 'string') { + const extendedTsConfigPath = resolve( + dirname(normalize(tsConfigPath)), + normalize(configExtends.value), + ); + + return isIvyEnabled(tree, extendedTsConfigPath); + } + + return true; +} diff --git a/packages/schematics/angular/migrations/update-9/utils_spec.ts b/packages/schematics/angular/migrations/update-9/utils_spec.ts new file mode 100644 index 000000000000..0726bb04bc8a --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/utils_spec.ts @@ -0,0 +1,107 @@ + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { HostTree } from '@angular-devkit/schematics'; +import { isIvyEnabled } from './utils'; + +describe('migrations update-9 utils', () => { + describe('isIvyEnabled', () => { + let tree: HostTree; + + beforeEach(() => { + tree = new HostTree(); + }); + + it('should return false when disabled in base tsconfig', () => { + tree.create('tsconfig.json', JSON.stringify({ + angularCompilerOptions: { + enableIvy: false, + }, + })); + + tree.create('foo/tsconfig.app.json', JSON.stringify({ + extends: '../tsconfig.json', + })); + + expect(isIvyEnabled(tree, 'foo/tsconfig.app.json')).toBe(false); + }); + + it('should return true when enable in child tsconfig but disabled in base tsconfig', () => { + tree.create('tsconfig.json', JSON.stringify({ + angularCompilerOptions: { + enableIvy: false, + }, + })); + + tree.create('foo/tsconfig.app.json', JSON.stringify({ + extends: '../tsconfig.json', + angularCompilerOptions: { + enableIvy: true, + }, + })); + + expect(isIvyEnabled(tree, 'foo/tsconfig.app.json')).toBe(true); + }); + + it('should return false when disabled in child tsconfig but enabled in base tsconfig', () => { + tree.create('tsconfig.json', JSON.stringify({ + angularCompilerOptions: { + enableIvy: true, + }, + })); + + tree.create('foo/tsconfig.app.json', JSON.stringify({ + extends: '../tsconfig.json', + angularCompilerOptions: { + enableIvy: false, + }, + })); + + expect(isIvyEnabled(tree, 'foo/tsconfig.app.json')).toBe(false); + }); + + it('should return false when disabled in base with multiple extends', () => { + tree.create('tsconfig.json', JSON.stringify({ + angularCompilerOptions: { + enableIvy: false, + }, + })); + + tree.create('foo/tsconfig.project.json', JSON.stringify({ + extends: '../tsconfig.json', + })); + + tree.create('foo/tsconfig.app.json', JSON.stringify({ + extends: './tsconfig.project.json', + })); + + expect(isIvyEnabled(tree, 'foo/tsconfig.app.json')).toBe(false); + }); + + it('should return true when enable in intermediate tsconfig with multiple extends', () => { + tree.create('tsconfig.json', JSON.stringify({ + angularCompilerOptions: { + enableIvy: false, + }, + })); + + tree.create('foo/tsconfig.project.json', JSON.stringify({ + extends: '../tsconfig.json', + angularCompilerOptions: { + enableIvy: true, + }, + })); + + tree.create('foo/tsconfig.app.json', JSON.stringify({ + extends: './tsconfig.project.json', + })); + + expect(isIvyEnabled(tree, 'foo/tsconfig.app.json')).toBe(true); + }); + }); +}); From 8866f1d964cce703c42a0aa0d29fa3bad7c2c4be Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 29 Aug 2019 10:22:08 +0200 Subject: [PATCH 0082/1070] refactor(@schematics/angular): remove redundant `aot` option for production --- packages/schematics/angular/application/index.ts | 1 - tests/legacy-cli/e2e/setup/500-create-project.ts | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 1b70e7b468a3..7029157b2fa7 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -215,7 +215,6 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul sourceMap: false, extractCss: true, namedChunks: false, - aot: true, extractLicenses: true, vendorChunk: false, buildOptimizer: true, diff --git a/tests/legacy-cli/e2e/setup/500-create-project.ts b/tests/legacy-cli/e2e/setup/500-create-project.ts index 9705eab0ae75..43bb0c8b9015 100644 --- a/tests/legacy-cli/e2e/setup/500-create-project.ts +++ b/tests/legacy-cli/e2e/setup/500-create-project.ts @@ -29,7 +29,9 @@ export default async function() { // In VE non prod builds are non AOT by default await updateJsonFile('angular.json', config => { - config.projects['test-project'].architect.build.options.aot = false; + const build = config.projects['test-project'].architect.build; + build.options.aot = false; + build.configurations.production.aot = true; }); } } From e76ea369892ce1207891519380d592e1ac22b9b7 Mon Sep 17 00:00:00 2001 From: Adam Vigneaux Date: Tue, 27 Aug 2019 13:30:27 -0400 Subject: [PATCH 0083/1070] feat(@angular-devkit/build-angular): exclude TSX test files from test coverage --- .../src/angular-cli-files/models/webpack-configs/test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts index 36a4da57151c..1228b5b9d8f5 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts @@ -33,7 +33,7 @@ export function getTestConfig( if (buildOptions.codeCoverage) { const codeCoverageExclude = buildOptions.codeCoverageExclude; const exclude: (string | RegExp)[] = [ - /\.(e2e|spec)\.ts$/, + /\.(e2e|spec)\.tsx?$/, /node_modules/, ]; From 06dbf06f960833794fa9cdac70a40f16dd4e20a1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 29 Aug 2019 00:03:56 +0000 Subject: [PATCH 0084/1070] build: update webpack-merge to version 4.2.2 --- packages/angular_devkit/build_angular/package.json | 2 +- packages/angular_devkit/build_webpack/package.json | 2 +- yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index a8026bae21aa..0d2adf6b5ca6 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -57,7 +57,7 @@ "webpack": "4.39.3", "webpack-dev-middleware": "3.7.0", "webpack-dev-server": "3.8.0", - "webpack-merge": "4.2.1", + "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", "webpack-subresource-integrity": "1.1.0-rc.6", "worker-farm": "1.7.0", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index db27c37aa397..a85d7e5431cb 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -10,7 +10,7 @@ "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", "rxjs": "6.4.0", - "webpack-merge": "4.2.1" + "webpack-merge": "4.2.2" }, "peerDependencies": { "webpack": "^4.6.0", diff --git a/yarn.lock b/yarn.lock index 0dbbc8e6b865..933dbd6a0bc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12107,12 +12107,12 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-merge@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.1.tgz#5e923cf802ea2ace4fd5af1d3247368a633489b4" - integrity sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw== +webpack-merge@4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== dependencies: - lodash "^4.17.5" + lodash "^4.17.15" webpack-sources@1.4.3, webpack-sources@^1.4.1: version "1.4.3" From c867f2a4dd57c56e22e081e34657c04ce57e7882 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 28 Aug 2019 14:34:20 -0400 Subject: [PATCH 0085/1070] fix(@angular-devkit/build-angular): ensure generator polyfills are present for ES5 --- packages/angular_devkit/build_angular/package.json | 1 + .../src/angular-cli-files/models/es5-polyfills.js | 7 +++---- yarn.lock | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 0d2adf6b5ca6..ec6bd6dbe984 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -40,6 +40,7 @@ "postcss-import": "12.0.1", "postcss-loader": "3.0.0", "raw-loader": "3.1.0", + "regenerator-runtime": "0.13.3", "rxjs": "6.4.0", "sass": "1.22.10", "sass-loader": "7.3.1", diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/es5-polyfills.js b/packages/angular_devkit/build_angular/src/angular-cli-files/models/es5-polyfills.js index 04026778259c..4590e60a26a5 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/es5-polyfills.js +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/es5-polyfills.js @@ -7,10 +7,7 @@ */ // ES2015 symbol capabilities -import 'core-js/modules/es.symbol'; -import 'core-js/modules/es.symbol.description'; -import 'core-js/modules/es.symbol.iterator'; -import 'core-js/modules/es.symbol.to-string-tag'; +import 'core-js/es/symbol'; // ES2015 function capabilities import 'core-js/modules/es.function.bind'; @@ -103,3 +100,5 @@ import 'core-js/modules/web.dom-collections.for-each'; import 'core-js/modules/web.dom-collections.iterator'; import 'core-js/modules/es.promise'; import 'core-js/modules/es.json.to-string-tag'; + +import 'regenerator-runtime/runtime'; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 933dbd6a0bc3..4d06a070fb25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9646,6 +9646,11 @@ regenerate@^1.2.1, regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== +regenerator-runtime@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== + regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" From fc53087bd292322332f3f7f498bbc051d8086dec Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 28 Aug 2019 20:54:33 -0400 Subject: [PATCH 0086/1070] refactor(@angular-devkit/build-angular): add debug no mangle environment variable --- .../angular-cli-files/models/webpack-configs/common.ts | 2 ++ .../build_angular/src/utils/mangle-options.ts | 10 ++++++++++ .../build_angular/src/utils/process-bundle.ts | 5 +++-- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/utils/mangle-options.ts diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index b17c42fcc49b..a0d251e75727 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -23,6 +23,7 @@ import { import { RawSource } from 'webpack-sources'; import { AssetPatternClass, ExtraEntryPoint } from '../../../browser/schema'; import { BuildBrowserFeatures, fullDifferential } from '../../../utils'; +import { manglingDisabled } from '../../../utils/mangle-options'; import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { NamedLazyChunksPlugin } from '../../plugins/named-chunks-plugin'; @@ -362,6 +363,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { // We also want to avoid mangling on server. // Name mangling is handled within the browser builder mangle: + !manglingDisabled && buildOptions.platform !== 'server' && (!differentialLoadingNeeded || (differentialLoadingNeeded && fullDifferential)), }; diff --git a/packages/angular_devkit/build_angular/src/utils/mangle-options.ts b/packages/angular_devkit/build_angular/src/utils/mangle-options.ts new file mode 100644 index 000000000000..84be67375d5b --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/mangle-options.ts @@ -0,0 +1,10 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +const mangleVariable = process.env['NG_BUILD_MANGLE']; +export const manglingDisabled = + !!mangleVariable && (mangleVariable === '0' || mangleVariable.toLowerCase() === 'false'); diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 39f36f4f274b..5b14b6f43f02 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -9,6 +9,7 @@ import * as fs from 'fs'; import * as path from 'path'; import { SourceMapConsumer, SourceMapGenerator } from 'source-map'; import { minify } from 'terser'; +import { manglingDisabled } from './mangle-options'; const { transformAsync } = require('@babel/core'); const cacache = require('cacache'); @@ -134,7 +135,7 @@ async function processWorker(options: ProcessBundleOptions): Promise { const result = minify(code, { compress: false, ecma: 5, - mangle: true, + mangle: !manglingDisabled, safari10: true, toplevel: true, output: { @@ -184,7 +185,7 @@ async function mangleOriginal(options: ProcessBundleOptions): Promise { const resultOriginal = minify(options.code, { compress: false, ecma: 6, - mangle: true, + mangle: !manglingDisabled, safari10: true, output: { ascii_only: true, From 5c823ce830035b8f5e6b1b949e3caea2c07ca64d Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 29 Aug 2019 09:35:13 +0200 Subject: [PATCH 0087/1070] build: update angular dev packages --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 22 ++--- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- .../e2e/assets/webpack/test-app/package.json | 16 ++-- yarn.lock | 88 +++++++++---------- 6 files changed, 69 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index 4e1ff895e64a..29d8bb70ffb6 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.3", - "@angular/compiler-cli": "~9.0.0-next.3", + "@angular/compiler": "~9.0.0-next.4", + "@angular/compiler-cli": "~9.0.0-next.4", "@bazel/bazel": "0.28.1", "@bazel/buildifier": "0.28.0", "@bazel/jasmine": "0.36.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ec6bd6dbe984..9e08daeb73b0 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -65,19 +65,19 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "~9.0.0-next.3", + "@angular/animations": "~9.0.0-next.4", "@angular/cdk": "~8.1.0", - "@angular/common": "~9.0.0-next.3", - "@angular/compiler": "~9.0.0-next.3", - "@angular/compiler-cli": "~9.0.0-next.3", - "@angular/core": "~9.0.0-next.3", - "@angular/forms": "~9.0.0-next.3", + "@angular/common": "~9.0.0-next.4", + "@angular/compiler": "~9.0.0-next.4", + "@angular/compiler-cli": "~9.0.0-next.4", + "@angular/core": "~9.0.0-next.4", + "@angular/forms": "~9.0.0-next.4", "@angular/material": "~8.1.0", - "@angular/platform-browser": "~9.0.0-next.3", - "@angular/platform-browser-dynamic": "~9.0.0-next.3", - "@angular/platform-server": "~9.0.0-next.3", - "@angular/router": "~9.0.0-next.3", - "@angular/service-worker": "~9.0.0-next.3", + "@angular/platform-browser": "~9.0.0-next.4", + "@angular/platform-browser-dynamic": "~9.0.0-next.4", + "@angular/platform-server": "~9.0.0-next.4", + "@angular/router": "~9.0.0-next.4", + "@angular/service-worker": "~9.0.0-next.4", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 2021d0de1082..4fc3b4470a11 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.3", - "@angular/compiler-cli": "~9.0.0-next.3", + "@angular/compiler": "~9.0.0-next.4", + "@angular/compiler-cli": "~9.0.0-next.4", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.5.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index d2482e17db05..26c3f4fcf436 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.3", - "@angular/compiler-cli": "~9.0.0-next.3", + "@angular/compiler": "~9.0.0-next.4", + "@angular/compiler-cli": "~9.0.0-next.4", "typescript": "3.5.3", "webpack": "4.39.3" } diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json index fe44d7e98002..9cdd7b6c1045 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "~9.0.0-next.3", - "@angular/compiler": "~9.0.0-next.3", - "@angular/compiler-cli": "~9.0.0-next.3", - "@angular/core": "~9.0.0-next.3", - "@angular/platform-browser": "~9.0.0-next.3", - "@angular/platform-browser-dynamic": "~9.0.0-next.3", - "@angular/platform-server": "~9.0.0-next.3", - "@angular/router": "~9.0.0-next.3", + "@angular/common": "~9.0.0-next.4", + "@angular/compiler": "~9.0.0-next.4", + "@angular/compiler-cli": "~9.0.0-next.4", + "@angular/core": "~9.0.0-next.4", + "@angular/platform-browser": "~9.0.0-next.4", + "@angular/platform-browser-dynamic": "~9.0.0-next.4", + "@angular/platform-server": "~9.0.0-next.4", + "@angular/router": "~9.0.0-next.4", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.0", diff --git a/yarn.lock b/yarn.lock index 4d06a070fb25..877cfb508d21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.3.tgz#ce20fe948f0327fd8f8faa59f4bfd3967cdb54f3" - integrity sha512-wkAfZ21AH43qPuOKnNQn27KPuIGS4fPCOi+QtPI0E2QH0+iHaXnwVMjB7UYbZM/KMT2ewg0s/s2Jt82Oc3kxyg== +"@angular/animations@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.4.tgz#ffca16eb7c431975bc46fd0926f8ff6f4908cac3" + integrity sha512-CvClnTIXKuhrpLjvpjFTsZGLeM1xiXHGSn7YDUedDVycpKl8/ZjNq082xoNKM4JrUe4jQwFpWMJ08fsCLVEYaw== dependencies: tslib "^1.9.0" @@ -18,17 +18,17 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.3.tgz#347ef82c8c4b29371551ed1e643d4f235f7b59f2" - integrity sha512-9j8QpL6F+AgTjuy7PLiK76v/tbU0XuDu+vx/hmoVSyEjt/zge4io/BgKv7/Ut+HgUfqjkusFZ/ystJ2OJ3XY3Q== +"@angular/common@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.4.tgz#e97fcaf077674324b6566571fdb89d24e05de7bc" + integrity sha512-L1Q9x1PzPqQOg0Qoz9seAXSpnZU93G3M7HRuUJPlCsCpRrwqa6L6RwJ6k06x3lZwZuYTvBfTpwbe4pLzLZU83g== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.3.tgz#11e59406270c2516fd66e4b675212decd59d063f" - integrity sha512-g8fuuz9A8ZrvEXyy6JQxLESg5G8pcFQveyUi6RNDCFxjcnk0NHVLxcCzt1KnnsoWWfPhRtEerOCB3rX0JSgj5w== +"@angular/compiler-cli@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.4.tgz#4d7795c67680ba8fda66217f5bf762e4362fe2dd" + integrity sha512-j+r1PSijg2bnypj79ZytBbo7AB/WNQPEkP3cbnuRbRZ/Ear1EUimBILTp1dERjGZssZC8sKsU7wGSdrAS7kA6A== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -41,24 +41,24 @@ tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.3.tgz#6e60dd862ab0f2e88a25cd361e49e97c6edabb29" - integrity sha512-J+5tKY7IQcgDMLAg81UT9n5mFZ2/AaYM1eH6NLPe9qywTbHr2rqklrP0deAXny3LrDv/BzeB9XeMF3WaQnfsyQ== +"@angular/compiler@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.4.tgz#582005a2f71b3731aa71a0ca575080c948fbe094" + integrity sha512-5sBi9nw084jN5ioLh4fal1/0R6Ow/AqI0S9L/1epe9Fg6J1KBszhBnYxzTgHiufsVGtRaGMJ74IEMODvdhz8aw== dependencies: tslib "^1.9.0" -"@angular/core@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.3.tgz#d1dfa4a03ebe182effb8481bcefcb934f6e3cab4" - integrity sha512-BC8uaU60pvopSvtgSxb1rG/6vRz5J+KqPHz8E+laDsFqVcuXxOzdIJrFkYk+lVjoBZlKLppTmxstEj8wl2ZZYw== +"@angular/core@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.4.tgz#823efd8993cda93a92f5072a4c4da330c9df8a4b" + integrity sha512-xstWREvfGUJ/o3wdLG115KkiLeiUCWY5lMLOKfukMwDALGl76jej2CQyDdjDZF6MhWvNYNLeIrWva5br99KJSw== dependencies: tslib "^1.9.0" -"@angular/forms@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.3.tgz#efbc4dd8279ada2f60a00d0c59801bbbf7e91361" - integrity sha512-2fazhHaO7dw8NEnBvTeKGY37oiD3kMS0ifzrMX+qcR+v0i9Z/D7zQOSPod1ZFLKv3NT8RDMwzA/A9768Q9hk9Q== +"@angular/forms@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.4.tgz#93ac4bdb3c0f565d0436361b70c672d8d51512ef" + integrity sha512-nlmXJ9VKQhDVEg680NFxgFwFGB4fe9zlBBcc7Tg439X0u6ofw1CerGBaze5fJaYa34HpCnvoHbe3v8+31gXfjw== dependencies: tslib "^1.9.0" @@ -69,40 +69,40 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.3.tgz#bdd58969f2db8823289d56465d76ccf001723e7b" - integrity sha512-K/ewX4vv3vE2fn8SpLIqLqc6HMM8TbUo1gVjgwKs/n5b72Tk+vWG7gh8fuJzXd0OMYHVqOd7bmqZNjEO8FiY0w== +"@angular/platform-browser-dynamic@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.4.tgz#c1b3aa5b2b3f83892dd13145a0e1f60f919c1511" + integrity sha512-YeybAWOkdEdbmgzulZzXO8HddAEhciESuOWNa9Mx3V9ZB+ofaEHf+Syo7ADhSo2+hdbjVjIp9E11A1C7kOtYug== dependencies: tslib "^1.9.0" -"@angular/platform-browser@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.3.tgz#f4a699e37dfc2241baf24e555d819d45c78f22de" - integrity sha512-PdSMzAq8akumBsC9BKx/Ra9UnX3eZPkB3PaMjOsoeVmqH4KRuZAsowrQR8z3f/2d33yPUrGLykjEc8l9aARNSQ== +"@angular/platform-browser@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.4.tgz#5620bbf003b9317594be6db4e49997f9e4575bcf" + integrity sha512-ikD0wL/2jprYai4xb5V4XMO9UjYwiavBHHxJOY6GeWTeMUh++9kuSq5QvzkOBmtlHUnDMvjic0h/pEran/68Ew== dependencies: tslib "^1.9.0" -"@angular/platform-server@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.3.tgz#a33371d642c0e726c837873fe40d0664af054f46" - integrity sha512-PuU2DHxf/rHWb3TPUB8R/jMmYu/2ZcniMsRg3LffvcAK+zKUFQnGvhILjvlR/bc3cLapd3WEklJIXJszmBe9Lg== +"@angular/platform-server@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.4.tgz#b8715743531ac3c85dfa82cefca7519d3cfbf49c" + integrity sha512-do8QRGDLj02Jt2b2wablTaklCLD6yixxCZBm9qu2QY2eHUfX7HPBSzl0AyfoiR6Y7Vx7WPCkF9iwtU2tzggrtg== dependencies: domino "^2.1.2" tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.3.tgz#7480ec7d756eb0609d66617d7defd52cec6c8d3e" - integrity sha512-TKVwIMluyeBC3rRptIbXgs4EhZPYEjeNZM77Xc0HSnAYMWTk43i6cyVqj6PfdtVj4MfWR7gpyc+orrCZMuF+4A== +"@angular/router@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.4.tgz#9a8bfd2c7c2de6943e819e2aad5aa40255a81a9d" + integrity sha512-VNdIPQUXZAOvxa0K14JEYImeAobTwjrrjTovU7016nzv5sUZ8BrTYpY56w80n570PqnvEon+eKGAP0oZk+nwqA== dependencies: tslib "^1.9.0" -"@angular/service-worker@~9.0.0-next.3": - version "9.0.0-next.3" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.3.tgz#ea1c0717224e9cd9975e007f4d93dc593532faac" - integrity sha512-rckN+/WrGY0WBPeACP7uPScgl3XudrGrufWSIJyYqjweCvqhjzkTVE1tvyKWxB2GE4te9FNC/I2Ew7QCG2cf8w== +"@angular/service-worker@~9.0.0-next.4": + version "9.0.0-next.4" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.4.tgz#de8a7e8fb40ffdd0a42511f53a780485c9f06f93" + integrity sha512-MoFNKj/UaamK//Z60gmCcxJ/fEjHSZlABDXrPQe6NJ/gB4lVKApVroWFYeFRXGfTNcHtPIe4QEwMe76kFpzcCw== dependencies: tslib "^1.9.0" From dffa70affa76d10f461072dc580e8ca24986bd45 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 29 Aug 2019 09:35:56 +0200 Subject: [PATCH 0088/1070] test: refactor karma include spec disable index of failing test and remove timeout which is less than the default --- .../test/karma/selected_spec_large.ts | 49 +++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/karma/selected_spec_large.ts b/packages/angular_devkit/build_angular/test/karma/selected_spec_large.ts index b42a586fe04d..62906e376266 100644 --- a/packages/angular_devkit/build_angular/test/karma/selected_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/karma/selected_spec_large.ts @@ -68,28 +68,6 @@ describe('Karma Builder', () => { await run.stop(); }); - beforeEach(() => { - host.writeMultipleFiles({ - 'src/app/services/test.service.spec.ts': ` - describe('TestService', () => { - it('should succeed', () => { - expect(true).toBe(true); - }); - });`, - 'src/app/failing.service.spec.ts': ` - describe('FailingService', () => { - it('should be ignored', () => { - expect(true).toBe(false); - }); - });`, - 'src/app/property.pipe.spec.ts': ` - describe('PropertyPipe', () => { - it('should succeed', () => { - expect(true).toBe(true); - }); - });`, - }); - }); [ { test: 'relative path from workspace to spec', @@ -119,8 +97,29 @@ describe('Karma Builder', () => { test: 'glob with spec suffix', input: ['**/*.pipe.spec.ts', '**/*.pipe.spec.ts', '**/*test.service.spec.ts'], }, - ].forEach(options => { - it(`should work with ${options.test}`, async () => { + ].forEach((options, index) => { + it(`should work with ${options.test} (${index})`, async () => { + host.writeMultipleFiles({ + 'src/app/services/test.service.spec.ts': ` + describe('TestService', () => { + it('should succeed', () => { + expect(true).toBe(true); + }); + });`, + 'src/app/failing.service.spec.ts': ` + describe('FailingService', () => { + it('should be ignored', () => { + expect(true).toBe(false); + }); + });`, + 'src/app/property.pipe.spec.ts': ` + describe('PropertyPipe', () => { + it('should succeed', () => { + expect(true).toBe(true); + }); + });`, + }); + const overrides = { include: options.input, }; @@ -137,7 +136,7 @@ describe('Karma Builder', () => { await expectAsync(run.result).toBeResolvedTo(jasmine.objectContaining({ success: true })); await run.stop(); - }, 30000); + }); }); }); }); From 77c4d4aa7be68e2ce72544b3ed26565f1eb3da4f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 29 Aug 2019 13:57:49 +0200 Subject: [PATCH 0089/1070] fix(@angular-devkit/build-angular): disable top level variable and function name mangling Disables toplevel mangling and enables compression for es5 bundles. With compress enabled we reduce a further ~7Kb Closes: #15436 --- .../angular_devkit/build_angular/src/utils/process-bundle.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 5b14b6f43f02..a0dc9fa7901a 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -133,11 +133,10 @@ async function processWorker(options: ProcessBundleOptions): Promise { // Mangle downlevel code const result = minify(code, { - compress: false, + compress: true, ecma: 5, mangle: !manglingDisabled, safari10: true, - toplevel: true, output: { ascii_only: true, webkit: true, From a9df5fd2fa39985a0d545990394a90f0cbcbdd27 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 29 Aug 2019 14:45:46 +0200 Subject: [PATCH 0090/1070] test: update regexp prod build `bootstrapModule` call --- tests/legacy-cli/e2e/tests/build/prod-build.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/prod-build.ts b/tests/legacy-cli/e2e/tests/build/prod-build.ts index 3af436a3bcf4..00c76eec3b80 100644 --- a/tests/legacy-cli/e2e/tests/build/prod-build.ts +++ b/tests/legacy-cli/e2e/tests/build/prod-build.ts @@ -33,8 +33,8 @@ export default async function () { const argv = getGlobalVariable('argv'); const veProject = argv['ve']; const bootstrapRegExp = veProject - ? /bootstrapModuleFactory\([$]?[a-zA-Z]+\)\./ - : /bootstrapModule\([$]?[a-zA-Z]+\)\./; + ? /bootstrapModuleFactory\(.?[a-zA-Z]+\)\./ + : /bootstrapModule\(.?[a-zA-Z]+\)\./; await ng('build', '--prod'); await expectFileToExist(join(process.cwd(), 'dist')); From 058299c5314064b8e6b9d8f03c32617d3f4894a8 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 29 Aug 2019 20:01:44 +0200 Subject: [PATCH 0091/1070] fix(@angular-devkit/build-angular): remove deprecation of `baseUrl` in protractor builder Closes #13952 --- .../angular_devkit/build_angular/src/protractor/schema.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/protractor/schema.json b/packages/angular_devkit/build_angular/src/protractor/schema.json index 4aea8deaecbc..0da1ccc1dff8 100644 --- a/packages/angular_devkit/build_angular/src/protractor/schema.json +++ b/packages/angular_devkit/build_angular/src/protractor/schema.json @@ -45,8 +45,7 @@ }, "baseUrl": { "type": "string", - "description": "Base URL for protractor to connect to.", - "x-deprecated": "Use \"baseUrl\" in the Protractor config file instead." + "description": "Base URL for protractor to connect to." } }, "additionalProperties": false, From 9628d00c9217acf6b9ad2f1361ec29ae09405a8d Mon Sep 17 00:00:00 2001 From: vikerman Date: Thu, 29 Aug 2019 14:02:03 -0700 Subject: [PATCH 0092/1070] release: v9.0.0-next.2 --- packages/schematics/angular/utility/latest-versions.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 390b8dd4e341..08e060978ddb 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,17 +8,17 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.3', + Angular: '~9.0.0-next.4', RxJs: '~6.4.0', ZoneJs: '~0.10.1', TypeScript: '~3.5.3', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.1', - DevkitBuildNgPackagr: '~0.900.0-next.1', - DevkitBuildWebpack: '~0.900.0-next.1', - AngularPWA: '~0.900.0-next.1', + DevkitBuildAngular: '~0.900.0-next.2', + DevkitBuildNgPackagr: '~0.900.0-next.2', + DevkitBuildWebpack: '~0.900.0-next.2', + AngularPWA: '~0.900.0-next.2', tsickle: '^0.37.0', ngPackagr: '^5.4.0', From b6a9fd99da7d904a3415a8c8103b28940a7a4053 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 29 Aug 2019 20:31:37 +0000 Subject: [PATCH 0093/1070] build: update @angular/animations to version --- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 595c40dbbc2e..b81fba23311f 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#e989846453e3dc5a0a0d9d82fdac00ef2f1f8e1d", - "@angular/common": "github:angular/common-builds#4245170a2d05742d2d9cc4381cb6c7a754d394a5", - "@angular/compiler": "github:angular/compiler-builds#ea55e76818e3225cd359c7a29c21552cdd44b8f6", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#441cb41151e6deefa3b67c575cfae42a7a7f181f", - "@angular/core": "github:angular/core-builds#4a4bf861cea127431bcabf2c37492bfb079a8a4a", - "@angular/forms": "github:angular/forms-builds#192389bf4546e99ea9444b4170e5b4be51223b61", - "@angular/language-service": "github:angular/language-service-builds#4b27fa6e6a3ccbf5f2ca7e029774a7a0f38ad71b", - "@angular/platform-browser": "github:angular/platform-browser-builds#27f73939d320ed42cca4513193b7ede0428e8f3c", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#21c6bf206c2643c24c0a45bf103c831b6c31f2b4", - "@angular/router": "github:angular/router-builds#ca6b7de3b1b6f8bcc7bb2cdcdcb3a2b367a5e6d5" + "@angular/animations": "github:angular/animations-builds#434ccdeb1b2bbaeeb38b3f3c0f77606801596b1f", + "@angular/common": "github:angular/common-builds#c65c82f450752da0ff6982f5a8169dd3f1c82dbc", + "@angular/compiler": "github:angular/compiler-builds#59e50a3624bfcfe9dd6248712396a8dcfecb3100", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#a93a224f02bdad4f6b7e7d21608a24e46bd9917e", + "@angular/core": "github:angular/core-builds#530a74c2e095ce0f1f63a41ad3ff53ec49ee696f", + "@angular/forms": "github:angular/forms-builds#bdfdc24ba99b0f51e62b74fb12dc98c0d39480b9", + "@angular/language-service": "github:angular/language-service-builds#8dd87fe8ad9efcf8ebd1cd586bd1afd4bf70fcc5", + "@angular/platform-browser": "github:angular/platform-browser-builds#09055bffe035973b40bdf3faa1b779967fe2e773", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#96d3653d152c5f274d07a97ae871ee81ec2f5a42", + "@angular/router": "github:angular/router-builds#78c56edf33995651c543ad6934d06bd729c0cb7a" } } \ No newline at end of file From 605085cc74cdf9bc690542ec73971d82e56e0ad2 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 29 Aug 2019 21:03:45 +0200 Subject: [PATCH 0094/1070] test: add `selected_spec_large` to flake jail --- .circleci/config.yml | 2 +- scripts/test.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2fa48932549..162a7ae24ceb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -245,7 +245,7 @@ jobs: # This is where we put all the misbehaving and flaky tests so we can fine-tune their conditions # and rerun them faster. flake-jail: - executor: action-executor + executor: test-executor steps: - attach_workspace: *attach_options - run: yarn webdriver-update diff --git a/scripts/test.ts b/scripts/test.ts index a59a744d8f74..46297765a994 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -23,6 +23,8 @@ const knownFlakes = [ // Rebuild tests in test-large are flakey if not run as the first suite. // https://github.com/angular/angular-cli/pull/15204 'packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts', + // This is flaky with NGCC + 'packages/angular_devkit/build_angular/test/karma/selected_spec_large.ts', ]; const projectBaseDir = join(__dirname, '..'); From 45155dc489fa2d883bfb3760b8114dcaf0872c7e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Aug 2019 11:07:00 +0100 Subject: [PATCH 0095/1070] test: fix external source map test for Ivy --- .../browser/vendor-source-map_spec_large.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/vendor-source-map_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/vendor-source-map_spec_large.ts index 8ba110e5354f..7d479a525b40 100644 --- a/packages/angular_devkit/build_angular/test/browser/vendor-source-map_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/vendor-source-map_spec_large.ts @@ -9,8 +9,7 @@ import { Architect } from '@angular-devkit/architect'; import * as path from 'path'; import { browserBuild, createArchitect, host, veEnabled } from '../utils'; -// DISABLED_FOR_IVY These should pass but are currently not supported -(veEnabled ? describe : xdescribe)('Browser Builder external source map', () => { +describe('Browser Builder external source map', () => { const target = { project: 'app', target: 'build' }; let architect: Architect; @@ -30,8 +29,9 @@ import { browserBuild, createArchitect, host, veEnabled } from '../utils'; }; const { files } = await browserBuild(architect, host, target, overrides); - const sourcePath = JSON.parse(await files['vendor.js.map']).sources[0]; - expect(path.extname(sourcePath)).toBe('.ts', `${sourcePath} extention should be '.ts'`); + const sourcePaths: string[] = JSON.parse(await files['vendor.js.map']).sources; + const hasTsSourcePaths = sourcePaths.some(p => path.extname(p) == '.ts'); + expect(hasTsSourcePaths).toBe(true, `vendor.js.map should have '.ts' extentions`); }); it(`works when using deprecated 'vendorSourceMap'`, async () => { @@ -44,8 +44,9 @@ import { browserBuild, createArchitect, host, veEnabled } from '../utils'; }; const { files } = await browserBuild(architect, host, target, overrides); - const sourcePath = JSON.parse(await files['vendor.js.map']).sources[0]; - expect(path.extname(sourcePath)).toBe('.ts', `${sourcePath} extention should be '.ts'`); + const sourcePaths: string[] = JSON.parse(await files['vendor.js.map']).sources; + const hasTsSourcePaths = sourcePaths.some(p => path.extname(p) == '.ts'); + expect(hasTsSourcePaths).toBe(true, `vendor.js.map should have '.ts' extentions`); }); it('does not map sourcemaps from external library when disabled', async () => { @@ -58,7 +59,8 @@ import { browserBuild, createArchitect, host, veEnabled } from '../utils'; }; const { files } = await browserBuild(architect, host, target, overrides); - const sourcePath = JSON.parse(await files['vendor.js.map']).sources[0]; - expect(path.extname(sourcePath)).toBe('.js', `${sourcePath} extention should be '.ts'`); + const sourcePaths: string[] = JSON.parse(await files['vendor.js.map']).sources; + const hasTsSourcePaths = sourcePaths.some(p => path.extname(p) == '.ts'); + expect(hasTsSourcePaths).toBe(false, `vendor.js.map not should have '.ts' extentions`); }); }); From 430e75978ab06949a400801c415fe5fa53a589c4 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Aug 2019 13:29:44 +0100 Subject: [PATCH 0096/1070] test: re-enable lazy route error tests for Ivy --- .../test/browser/lazy-module_spec_large.ts | 98 ++++++++++--------- 1 file changed, 54 insertions(+), 44 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts index bcd5aa4b5fc4..2cc708bbd577 100644 --- a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts @@ -45,6 +45,14 @@ describe('Browser Builder lazy modules', () => { ); } + function hasMissingModuleError(logger: TestLogger) { + // TS type error when using import(). + return logger.includes('Cannot find module') || + // Webpack error when using import() on a rebuild. + // There is no TS error because the type checker is forked on rebuilds. + logger.includes('Module not found'); + } + const cases: [string, Record][] = [ ['string', lazyModuleStringImport], ['function', lazyModuleFnImport], @@ -63,50 +71,6 @@ describe('Browser Builder lazy modules', () => { expect('lazy-lazy-module.js' in files).toBe(true); }); - it('should show error when lazy route is invalid on watch mode AOT', async () => { - if (!veEnabled && name === 'string') { - pending('Does not apply to Ivy.'); - - return; - } - - // DISABLED_FOR_IVY - These should pass but are currently not supported - if (!veEnabled) { - pending('Broken in Ivy'); - - return; - } - - host.writeMultipleFiles(lazyModuleFiles); - host.writeMultipleFiles(imports); - host.replaceInFile('src/app/app.module.ts', 'lazy.module', 'invalid.module'); - - const logger = new TestLogger('rebuild-lazy-errors'); - const overrides = { watch: true, aot: true }; - const run = await architect.scheduleTarget(target, overrides, { logger }); - await run.output - .pipe( - timeout(15000), - tap(buildEvent => expect(buildEvent.success).toBe(false)), - tap(() => { - // Webpack error when using loadchildren string syntax. - const hasMissingModuleError = - logger.includes('Could not resolve module') || - // TS type error when using import(). - logger.includes('Cannot find module') || - // Webpack error when using import() on a rebuild. - // There is no TS error because the type checker is forked on rebuilds. - logger.includes('Module not found'); - expect(hasMissingModuleError).toBe(true, 'Should show missing module error'); - logger.clear(); - host.appendToFile('src/main.ts', ' '); - }), - take(2), - ) - .toPromise(); - await run.stop(); - }); - it('supports lazy bundle for lazy routes with AOT', async () => { host.writeMultipleFiles(lazyModuleFiles); host.writeMultipleFiles(imports); @@ -124,6 +88,52 @@ describe('Browser Builder lazy modules', () => { }); } + // Errors for missing lazy routes are only supported with function syntax. + // `ngProgram.listLazyRoutes` will ignore invalid lazy routes in the route map. + describe(`Load children errors with function syntax`, () => { + it('should show error when lazy route is invalid', async () => { + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleFnImport); + host.replaceInFile('src/app/app.module.ts', 'lazy.module', 'invalid.module'); + + const logger = new TestLogger('build-lazy-errors'); + const run = await architect.scheduleTarget(target, {}, { logger }); + const output = await run.result; + expect(output.success).toBe(false); + expect(hasMissingModuleError(logger)).toBe(true, 'Should show missing module error'); + }); + + it('should show error when lazy route is invalid on watch mode AOT', async () => { + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleFnImport); + + let buildNumber = 0; + const logger = new TestLogger('rebuild-lazy-errors'); + const overrides = { watch: true, aot: true }; + const run = await architect.scheduleTarget(target, overrides, { logger }); + await run.output + .pipe( + timeout(15000), + tap(buildEvent => { + buildNumber++; + switch (buildNumber) { + case 1: + expect(buildEvent.success).toBe(true); + host.replaceInFile('src/app/app.module.ts', 'lazy.module', 'invalid.module'); + logger.clear(); + break; + case 2: + expect(buildEvent.success).toBe(false); + break; + } + }), + take(2), + ) + .toPromise(); + await run.stop(); + }); + }); + it(`supports lazy bundle for import() calls`, async () => { host.writeMultipleFiles({ 'src/lazy-module.ts': 'export const value = 42;', From 3a913d2922f30c6b2b10f7c888a4d5e660386f8c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Aug 2019 13:43:07 +0100 Subject: [PATCH 0097/1070] fix(@ngtools/webpack): don't warn on extra files in errored compilations --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index d4accb00b5cc..383aa9abae5c 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -596,7 +596,8 @@ export class AngularCompilerPlugin { // Only do the unused TS files checks when under Ivy // since previously we did include unused files in the compilation // See: https://github.com/angular/angular-cli/pull/15030 - if (!this._compilerOptions.enableIvy) { + // Don't do checks for compilations with errors, since that can result in a partial compilation. + if (!this._compilerOptions.enableIvy || compilation.errors.length > 0) { return; } From 77cb0d3f417388b5cec4ac5eb85e16f03fb252ea Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Aug 2019 15:05:13 +0100 Subject: [PATCH 0098/1070] test: add issue for disabled Ivy AOT rebuild test --- .../build_angular/test/browser/rebuild_spec_large.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts index 950766aa140c..d1abf2efbc20 100644 --- a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts @@ -268,7 +268,7 @@ describe('Browser Builder rebuilds', () => { it('rebuilds after errors in AOT', async () => { // DISABLED_FOR_IVY - These should pass but are currently not supported if (!veEnabled) { - pending('Broken in Ivy'); + pending('Broken in Ivy: https://github.com/angular/angular/issues/32214'); return; } From 2383641b95f4d6a485dd4b1cb79525b07c2414fd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Aug 2019 15:14:06 +0100 Subject: [PATCH 0099/1070] test: fix basic aot e2e to run with Ivy --- tests/legacy-cli/e2e/tests/basic/aot.ts | 17 +++++++++++++---- tests/legacy-cli/e2e_runner.ts | 2 -- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/basic/aot.ts b/tests/legacy-cli/e2e/tests/basic/aot.ts index 33c2c08ec462..a4dd67d5018d 100644 --- a/tests/legacy-cli/e2e/tests/basic/aot.ts +++ b/tests/legacy-cli/e2e/tests/basic/aot.ts @@ -1,10 +1,19 @@ +import { getGlobalVariable } from '../../utils/env'; import { expectFileToMatch } from '../../utils/fs'; import { ng } from '../../utils/process'; export default async function () { await ng('build', '--aot=true'); - await expectFileToMatch('dist/test-project/main-es5.js', - /platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); - await expectFileToMatch('dist/test-project/main-es2015.js', - /platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); + + if (getGlobalVariable('argv')['ve']) { + await expectFileToMatch('dist/test-project/main-es5.js', + /platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); + await expectFileToMatch('dist/test-project/main-es2015.js', + /platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); + } else { + await expectFileToMatch('dist/test-project/main-es5.js', + /platformBrowser.*bootstrapModule.*AppModule/); + await expectFileToMatch('dist/test-project/main-es2015.js', + /platformBrowser.*bootstrapModule.*AppModule/); + } } diff --git a/tests/legacy-cli/e2e_runner.ts b/tests/legacy-cli/e2e_runner.ts index de1d01624901..d498102e31b7 100644 --- a/tests/legacy-cli/e2e_runner.ts +++ b/tests/legacy-cli/e2e_runner.ts @@ -99,8 +99,6 @@ if (!argv.ve) { // - The test itself is not applicable to Ivy // As we transition into using Ivy as the default this list should be reassessed. allTests = allTests - // The basic AOT check is different with Ivy and being checked in /experimental/ivy.ts. - .filter(name => !name.endsWith('tests/basic/aot.ts')) // Ivy doesn't support i18n externally at the moment. .filter(name => !name.includes('tests/i18n/')) .filter(name => !name.endsWith('tests/build/aot/aot-i18n.ts')) From 91d7a6e45f3e6494d0577536d4558b3f814a0122 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Aug 2019 15:16:38 +0100 Subject: [PATCH 0100/1070] test: move dynamic import exclusion to test --- tests/legacy-cli/e2e/tests/build/dynamic-import.ts | 6 ++++++ tests/legacy-cli/e2e_runner.ts | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/dynamic-import.ts b/tests/legacy-cli/e2e/tests/build/dynamic-import.ts index ff0d29a5cc9c..cfa72e03e0ed 100644 --- a/tests/legacy-cli/e2e/tests/build/dynamic-import.ts +++ b/tests/legacy-cli/e2e/tests/build/dynamic-import.ts @@ -1,10 +1,16 @@ import * as fs from 'fs'; +import { getGlobalVariable } from '../../utils/env'; import { writeFile } from '../../utils/fs'; import { ng } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; export default async function() { + if (!(getGlobalVariable('argv')['ve'])) { + // Only applicable to VE. Does not apply to Ivy. + return; + } + // Add a lazy module await ng('generate', 'module', 'lazy'); await updateJsonFile('angular.json', workspaceJson => { diff --git a/tests/legacy-cli/e2e_runner.ts b/tests/legacy-cli/e2e_runner.ts index d498102e31b7..fdb202b3e6db 100644 --- a/tests/legacy-cli/e2e_runner.ts +++ b/tests/legacy-cli/e2e_runner.ts @@ -102,8 +102,6 @@ if (!argv.ve) { // Ivy doesn't support i18n externally at the moment. .filter(name => !name.includes('tests/i18n/')) .filter(name => !name.endsWith('tests/build/aot/aot-i18n.ts')) - // The additional lazy modules array does not work with Ivy because it's not needed. - .filter(name => !name.endsWith('tests/build/dynamic-import.ts')) // We don't have a platform-server usage story yet for Ivy. // It's contingent on lazy loading and factory shim considerations that are still being // discussed. From ecc9d0e2b5554beed313b13c60a7f99b8b2128e3 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Aug 2019 17:25:33 +0100 Subject: [PATCH 0101/1070] test: update server builder specs --- .../test/server/base_spec_large.ts | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts index 2b6e903d6519..1bbdab21716e 100644 --- a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts @@ -13,8 +13,7 @@ import { BrowserBuilderOutput } from '../../src/browser'; import { createArchitect, host, veEnabled } from '../utils'; -// DISABLED_FOR_IVY These should pass but are currently not supported -(veEnabled ? describe : xdescribe)('Server Builder', () => { +describe('Server Builder', () => { const target = { project: 'app', target: 'server' }; let architect: Architect; @@ -33,7 +32,12 @@ import { createArchitect, host, veEnabled } from '../utils'; const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); - expect(content).toMatch(/AppServerModuleNgFactory/); + + if (veEnabled) { + expect(content).toMatch(/AppServerModuleNgFactory/); + } else { + expect(content).toMatch(/AppServerModule\.ngModuleDef/); + } await run.stop(); }); @@ -68,16 +72,10 @@ import { createArchitect, host, veEnabled } from '../utils'; it('supports sourcemaps', async () => { const overrides = { sourceMap: true }; - const run = await architect.scheduleTarget(target, overrides); const output = await run.result as BrowserBuilderOutput; expect(output.success).toBe(true); - - const fileName = join(outputPath, 'main.js'); - const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); - expect(content).toMatch(/AppServerModuleNgFactory/); expect(host.scopedSync().exists(join(outputPath, 'main.js.map'))).toBeTruthy(); - await run.stop(); }); @@ -144,7 +142,11 @@ import { createArchitect, host, veEnabled } from '../utils'; const fileName = join(outputPath, 'main.js'); const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); - expect(content).toMatch(/AppServerModuleNgFactory/); + if (veEnabled) { + expect(content).toMatch(/AppServerModuleNgFactory/); + } else { + expect(content).toMatch(/AppServerModule\.ngModuleDef/); + } }), take(1), ).toPromise(); From 6a29ce47a1acc34e4a210ed0a6eb1c12d7dc4dc2 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 20 Aug 2019 17:28:22 +0100 Subject: [PATCH 0102/1070] test: add issue for broken app-shell test --- .../build_angular/src/app-shell/index.ts | 61 +++++++++---------- .../test/app-shell/app-shell_spec_large.ts | 1 + tests/legacy-cli/e2e_runner.ts | 1 + 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/app-shell/index.ts b/packages/angular_devkit/build_angular/src/app-shell/index.ts index d71db512caa2..75fb4d9c18be 100644 --- a/packages/angular_devkit/build_angular/src/app-shell/index.ts +++ b/packages/angular_devkit/build_angular/src/app-shell/index.ts @@ -15,13 +15,13 @@ import { JsonObject, experimental, join, normalize, resolve, schema } from '@ang import { NodeJsSyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; import * as path from 'path'; +import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { augmentAppWithServiceWorker } from '../angular-cli-files/utilities/service-worker'; import { BrowserBuilderOutput } from '../browser'; import { Schema as BrowserBuilderSchema } from '../browser/schema'; import { ServerBuilderOutput } from '../server'; import { Schema as BuildWebpackAppShellSchema } from './schema'; - async function _renderUniversal( options: BuildWebpackAppShellSchema, context: BuilderContext, @@ -31,40 +31,48 @@ async function _renderUniversal( const browserIndexOutputPath = path.join(browserResult.outputPath || '', 'index.html'); const indexHtml = fs.readFileSync(browserIndexOutputPath, 'utf8'); const serverBundlePath = await _getServerModuleBundlePath(options, context, serverResult); - const root = context.workspaceRoot; + // Get browser target options. + const browserTarget = targetFromTargetString(options.browserTarget); + const rawBrowserOptions = await context.getTargetOptions(browserTarget); + const browserBuilderName = await context.getBuilderNameForTarget(browserTarget); + const browserOptions = await context.validateOptions( + rawBrowserOptions, + browserBuilderName, + ); + + // Determine if browser app was compiled using Ivy. + const { options: compilerOptions } = readTsconfig(browserOptions.tsConfig, context.workspaceRoot); + const ivy = compilerOptions.enableIvy; + // Initialize zone.js const zonePackage = require.resolve('zone.js', { paths: [root] }); await import(zonePackage); // Load platform server module renderer const platformServerPackage = require.resolve('@angular/platform-server', { paths: [root] }); - const renderModuleFactory = await import(platformServerPackage) + const renderOpts = { + document: indexHtml, + url: options.route, + }; + + // Render app to HTML using Ivy or VE + const html = await import(platformServerPackage) // tslint:disable-next-line:no-implicit-dependencies - .then((m: typeof import('@angular/platform-server')) => m.renderModuleFactory); + .then((m: typeof import('@angular/platform-server')) => + ivy + ? m.renderModule(require(serverBundlePath).AppServerModule, renderOpts) + : m.renderModuleFactory(require(serverBundlePath).AppServerModuleNgFactory, renderOpts), + ); - const AppServerModuleNgFactory = require(serverBundlePath).AppServerModuleNgFactory; + // Overwrite the client index file. const outputIndexPath = options.outputIndexPath ? path.join(root, options.outputIndexPath) : browserIndexOutputPath; - // Render to HTML and overwrite the client index file. - const html = await renderModuleFactory(AppServerModuleNgFactory, { - document: indexHtml, - url: options.route, - }); - fs.writeFileSync(outputIndexPath, html); - const browserTarget = targetFromTargetString(options.browserTarget); - const rawBrowserOptions = await context.getTargetOptions(browserTarget); - const browserBuilderName = await context.getBuilderNameForTarget(browserTarget); - const browserOptions = await context.validateOptions( - rawBrowserOptions, - browserBuilderName, - ); - if (browserOptions.serviceWorker) { const host = new NodeJsSyncHost(); // Create workspace. @@ -81,10 +89,7 @@ async function _renderUniversal( if (!projectName) { throw new Error('Must either have a target from the context or a default project.'); } - const projectRoot = resolve( - workspace.root, - normalize(workspace.getProject(projectName).root), - ); + const projectRoot = resolve(workspace.root, normalize(workspace.getProject(projectName).root)); await augmentAppWithServiceWorker( host, @@ -99,7 +104,6 @@ async function _renderUniversal( return browserResult; } - async function _getServerModuleBundlePath( options: BuildWebpackAppShellSchema, context: BuilderContext, @@ -121,7 +125,6 @@ async function _getServerModuleBundlePath( } } - async function _appShellBuilder( options: JsonObject & BuildWebpackAppShellSchema, context: BuilderContext, @@ -139,7 +142,7 @@ async function _appShellBuilder( try { const [browserResult, serverResult] = await Promise.all([ - browserTargetRun.result as {} as BrowserBuilderOutput, + (browserTargetRun.result as {}) as BrowserBuilderOutput, serverTargetRun.result, ]); @@ -154,12 +157,8 @@ async function _appShellBuilder( return { success: false, error: err.message }; } finally { // Just be good citizens and stop those jobs. - await Promise.all([ - browserTargetRun.stop(), - serverTargetRun.stop(), - ]); + await Promise.all([browserTargetRun.stop(), serverTargetRun.stop()]); } } - export default createBuilder(_appShellBuilder); diff --git a/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts b/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts index 2dde22816f1e..8213aa8f1af0 100644 --- a/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts @@ -13,6 +13,7 @@ import { createArchitect, host, veEnabled } from '../utils'; // DISABLED_FOR_IVY These should pass but are currently not supported +// See https://github.com/angular/angular-cli/issues/15383 for details. (veEnabled ? describe : xdescribe)('AppShell Builder', () => { const target = { project: 'app', target: 'app-shell' }; let architect: Architect; diff --git a/tests/legacy-cli/e2e_runner.ts b/tests/legacy-cli/e2e_runner.ts index fdb202b3e6db..b828747018ec 100644 --- a/tests/legacy-cli/e2e_runner.ts +++ b/tests/legacy-cli/e2e_runner.ts @@ -105,6 +105,7 @@ if (!argv.ve) { // We don't have a platform-server usage story yet for Ivy. // It's contingent on lazy loading and factory shim considerations that are still being // discussed. + // Broken currently https://github.com/angular/angular-cli/issues/15383 .filter(name => !name.endsWith('tests/build/platform-server.ts')) .filter(name => !name.endsWith('tests/build/build-app-shell.ts')) .filter(name => !name.endsWith('tests/build/build-app-shell-with-schematic.ts')); From a8b339472f6a548b31b7b6b9e557fd618b408194 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 30 Aug 2019 12:15:28 +0200 Subject: [PATCH 0103/1070] ci: change resource_class for flake jail to medium This is by default set to xlarge in the test-executor which is not needed for flake-jail. --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 162a7ae24ceb..6ff3214591f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -246,6 +246,7 @@ jobs: # and rerun them faster. flake-jail: executor: test-executor + resource_class: medium steps: - attach_workspace: *attach_options - run: yarn webdriver-update From 8527206d6ea3bdcea0f26531e4d83452053bb3c4 Mon Sep 17 00:00:00 2001 From: Christian Liebel Date: Sat, 31 Aug 2019 15:12:09 +0200 Subject: [PATCH 0104/1070] feat(@schematics/angular): feature PWA in CLI app Feature PWA support via `@angular/pwa` directly in the new CLI app. --- .../application/other-files/app.component.html.template | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/schematics/angular/application/other-files/app.component.html.template b/packages/schematics/angular/application/other-files/app.component.html.template index b3dd74ab6d90..ad8054d1cd9d 100644 --- a/packages/schematics/angular/application/other-files/app.component.html.template +++ b/packages/schematics/angular/application/other-files/app.component.html.template @@ -384,6 +384,12 @@ Angular Material
+
+ + + Add PWA Support +
+
@@ -407,6 +413,7 @@
ng generate component xyz
ng add @angular/material
+
ng add @angular/pwa
ng add _____
ng test
ng build --prod
From c935211aef6de1c211eae63c8eeb2e30e48bab4b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 2 Sep 2019 12:07:06 +0200 Subject: [PATCH 0105/1070] fix(@angular-devkit/build-angular): several issues with optimization and bundleDependencies in universal Fixes #15498 --- .../models/webpack-configs/common.ts | 1 + .../e2e/tests/build/platform-server.ts | 21 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index a0d251e75727..693ea1fdc609 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -352,6 +352,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { buildOptions.platform == 'server' ? { global_defs: angularGlobalDefinitions, + keep_fnames: true, } : { pure_getters: buildOptions.buildOptimizer, diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index dc1d2b07b7a4..423deebefaa3 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -1,6 +1,6 @@ import { normalize } from 'path'; import { getGlobalVariable } from '../../utils/env'; -import { expectFileToMatch, writeFile } from '../../utils/fs'; +import { expectFileToMatch, writeFile, appendToFile } from '../../utils/fs'; import { exec, ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { readNgVersion } from '../../utils/version'; @@ -21,15 +21,16 @@ export default async function () { }); await silentNpm('install'); - await ng('run', 'test-project:server:production'); - await expectFileToMatch('dist/server/main.js', /exports.*AppServerModuleNgFactory/); + await appendToFile( + 'src/main.server.ts', + `export { renderModuleFactory } from '@angular/platform-server';`, + ); await writeFile( './index.js', ` require('zone.js/dist/zone-node'); const fs = require('fs'); - const { AppServerModuleNgFactory } = require('./dist/server/main'); - const { renderModuleFactory } = require('@angular/platform-server'); + const { AppServerModuleNgFactory, renderModuleFactory } = require('./dist/server/main'); renderModuleFactory(AppServerModuleNgFactory, { url: '/', @@ -40,6 +41,16 @@ export default async function () { `, ); + await ng('run', 'test-project:server:production'); + await expectFileToMatch('dist/server/main.js', /exports.*AppServerModuleNgFactory/); + await exec(normalize('node'), 'index.js'); + await expectFileToMatch( + 'dist/server/index.html', + /Here are some links to help you get started:<\/p>/, + ); + + // works with optimization and bundleDependencies enabled + await ng('run', 'test-project:server:production', '--optimization', '--bundleDependencies', 'all'); await exec(normalize('node'), 'index.js'); await expectFileToMatch( 'dist/server/index.html', From bbdcbf79d82c78ca1b18d6336a06c4d0b5835e40 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 31 Aug 2019 05:23:07 +0000 Subject: [PATCH 0106/1070] build: update browserslist to version 4.7.0 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 37 +++++++++++++++---- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 9e08daeb73b0..efa2a9bbd297 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -16,7 +16,7 @@ "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", "autoprefixer": "9.6.1", - "browserslist": "4.6.6", + "browserslist": "4.7.0", "cacache": "12.0.3", "caniuse-lite": "1.0.30000989", "circular-dependency-plugin": "5.2.0", diff --git a/yarn.lock b/yarn.lock index 877cfb508d21..b2f62b78deaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2453,14 +2453,14 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.6.6, browserslist@^4.6.0, browserslist@^4.6.2: - version "4.6.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.6.tgz#6e4bf467cde520bc9dbdf3747dafa03531cec453" - integrity sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA== +browserslist@4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" + integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== dependencies: - caniuse-lite "^1.0.30000984" - electron-to-chromium "^1.3.191" - node-releases "^1.1.25" + caniuse-lite "^1.0.30000989" + electron-to-chromium "^1.3.247" + node-releases "^1.1.29" browserslist@^4.0.0: version "4.5.5" @@ -2471,6 +2471,15 @@ browserslist@^4.0.0: electron-to-chromium "^1.3.124" node-releases "^1.1.14" +browserslist@^4.6.0, browserslist@^4.6.2: + version "4.6.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.6.tgz#6e4bf467cde520bc9dbdf3747dafa03531cec453" + integrity sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA== + dependencies: + caniuse-lite "^1.0.30000984" + electron-to-chromium "^1.3.191" + node-releases "^1.1.25" + browserslist@^4.6.3: version "4.6.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.3.tgz#0530cbc6ab0c1f3fc8c819c72377ba55cf647f05" @@ -2778,7 +2787,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000989: +caniuse-lite@1.0.30000989, caniuse-lite@^1.0.30000989: version "1.0.30000989" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz#b9193e293ccf7e4426c5245134b8f2a56c0ac4b9" integrity sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw== @@ -4259,6 +4268,11 @@ electron-to-chromium@^1.3.191: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.191.tgz#c451b422cd8b2eab84dedabab5abcae1eaefb6f0" integrity sha512-jasjtY5RUy/TOyiUYM2fb4BDaPZfm6CXRFeJDMfFsXYADGxUN49RBqtgB7EL2RmJXeIRUk9lM1U6A5yk2YJMPQ== +electron-to-chromium@^1.3.247: + version "1.3.247" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.247.tgz#ff2332376150436599265b2dfd7a539f214f4ade" + integrity sha512-j/Rzx1FyVTwNifpG/DPQKEMz0mruRwoPpJ6Y1tTVmj6+/zAVzG8/YHZwBMLYCZgQH6seLOqaVxZ3RY3KMrT5IQ== + elliptic@^6.0.0: version "6.4.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" @@ -8078,6 +8092,13 @@ node-releases@^1.1.25: dependencies: semver "^5.3.0" +node-releases@^1.1.29: + version "1.1.29" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.29.tgz#86a57c6587a30ecd6726449e5d293466b0a0bb86" + integrity sha512-R5bDhzh6I+tpi/9i2hrrvGJ3yKPYzlVOORDkXhnZuwi5D3q1I5w4vYy24PJXTcLk9Q0kws9TO77T75bcK8/ysQ== + dependencies: + semver "^5.3.0" + node-sass-tilde-importer@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz#1a15105c153f648323b4347693fdb0f331bad1ce" From 4dc856a329cea95a3ab443bfc0acab8c9df89fe7 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 3 Sep 2019 10:43:40 +0000 Subject: [PATCH 0107/1070] build: update webpack-dev-middleware to version 3.7.1 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index efa2a9bbd297..6fe4c97861ea 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -56,7 +56,7 @@ "terser": "4.2.1", "terser-webpack-plugin": "1.4.1", "webpack": "4.39.3", - "webpack-dev-middleware": "3.7.0", + "webpack-dev-middleware": "3.7.1", "webpack-dev-server": "3.8.0", "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", diff --git a/yarn.lock b/yarn.lock index b2f62b78deaa..21a6551ad7c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7703,7 +7703,7 @@ mime@1.6.0, mime@^1.4.1: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@2.4.4: +mime@2.4.4, mime@^2.4.4: version "2.4.4" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== @@ -12042,7 +12042,18 @@ webpack-dev-middleware@3.4.0: range-parser "^1.0.3" webpack-log "^2.0.0" -webpack-dev-middleware@3.7.0, webpack-dev-middleware@^3.7.0: +webpack-dev-middleware@3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09" + integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A== + dependencies: + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" + range-parser "^1.2.1" + webpack-log "^2.0.0" + +webpack-dev-middleware@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.0.tgz#ef751d25f4e9a5c8a35da600c5fda3582b5c6cff" integrity sha512-qvDesR1QZRIAZHOE3iQ4CXLZZSQ1lAUsSpnQmlB1PBfoN/xdRjmge3Dok0W4IdaVLJOGJy3sGI4sZHwjRU0PCA== From 2c8b12f45c6f3cd779e860c809db03059b5754b5 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 30 Aug 2019 16:57:21 +0200 Subject: [PATCH 0108/1070] feat(@angular-devkit/build-angular): update sass-loader to 8.0.0 Full list of changes https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md#800-2019-08-29 --- .../angular_devkit/build_angular/package.json | 2 +- .../models/webpack-configs/styles.ts | 15 ++++-------- .../test/browser/aot_spec_large.ts | 2 +- yarn.lock | 24 ++++++++++++------- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 6fe4c97861ea..0d11bae68096 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -43,7 +43,7 @@ "regenerator-runtime": "0.13.3", "rxjs": "6.4.0", "sass": "1.22.10", - "sass-loader": "7.3.1", + "sass-loader": "8.0.0", "semver": "6.3.0", "source-map": "0.7.3", "source-map-support": "0.5.13", diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index 55a4ff9f553c..cd6e8399853e 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -123,17 +123,11 @@ export function getStylesConfig(wco: WebpackConfigOptions) { } let sassImplementation: {} | undefined; - let fiber: {} | undefined; try { // tslint:disable-next-line:no-implicit-dependencies sassImplementation = require('node-sass'); } catch { sassImplementation = require('sass'); - - try { - // tslint:disable-next-line:no-implicit-dependencies - fiber = require('fibers'); - } catch {} } // set base rules to derive final rules from @@ -146,11 +140,12 @@ export function getStylesConfig(wco: WebpackConfigOptions) { loader: 'sass-loader', options: { implementation: sassImplementation, - fiber, sourceMap: cssSourceMap, - // bootstrap-sass requires a minimum precision of 8 - precision: 8, - includePaths, + sassOptions: { + // bootstrap-sass requires a minimum precision of 8 + precision: 8, + includePaths, + }, }, }, ], diff --git a/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts index b91f13b2c2a7..02b9f6ce78e7 100644 --- a/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts @@ -88,7 +88,7 @@ describe('Browser Builder AOT', () => { const run = await architect.scheduleTarget(targetSpec, overrides, { logger }); const output = await run.result; expect(output.success).toBe(false); - expect(logs.join()).toContain(`Expected "}".`); + expect(logs.join()).toContain('SassError: expected "}".'); await run.stop(); }); }); diff --git a/yarn.lock b/yarn.lock index 21a6551ad7c5..b510d48ac337 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7150,7 +7150,7 @@ loader-utils@1.2.3, loader-utils@^1.2.3: emojis-list "^2.0.0" json5 "^1.0.1" -loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0: +loader-utils@^1.0.2, loader-utils@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= @@ -10101,15 +10101,15 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass-loader@7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.3.1.tgz#a5bf68a04bcea1c13ff842d747150f7ab7d0d23f" - integrity sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA== +sass-loader@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-8.0.0.tgz#e7b07a3e357f965e6b03dd45b016b0a9746af797" + integrity sha512-+qeMu563PN7rPdit2+n5uuYVR0SSVwm0JsOUsaJXzgYcClWSlmX0iHDnmeOobPkf5kUglVot3QS6SyLyaQoJ4w== dependencies: clone-deep "^4.0.1" - loader-utils "^1.0.1" - neo-async "^2.5.0" - pify "^4.0.1" + loader-utils "^1.2.3" + neo-async "^2.6.1" + schema-utils "^2.1.0" semver "^6.3.0" sass@1.22.10: @@ -10189,6 +10189,14 @@ schema-utils@^2.0.0, schema-utils@^2.0.1: ajv "^6.1.0" ajv-keywords "^3.1.0" +schema-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.1.0.tgz#940363b6b1ec407800a22951bdcc23363c039393" + integrity sha512-g6SViEZAfGNrToD82ZPUjq52KUPDYc+fN5+g6Euo5mLokl/9Yx14z0Cu4RR1m55HtBXejO0sBt+qw79axN+Fiw== + dependencies: + ajv "^6.1.0" + ajv-keywords "^3.1.0" + seedrandom@^2.4.4: version "2.4.4" resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-2.4.4.tgz#b25ea98632c73e45f58b77cfaa931678df01f9ba" From 4203294d532910dae139faf9268629928acca8c7 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 28 Aug 2019 13:52:00 +0200 Subject: [PATCH 0109/1070] feat(@schematics/angular): add migration for applications tsconfigs This migration updates the current tsconfig for the applications in two ways. 1) removes `enableIvy: true` option since it's by default true. 2) Amends the files/exclude/include options to only include files that are needed in the compilation. --- .../angular/migrations/update-9/index.ts | 10 +- .../migrations/update-9/ivy-libraries.ts | 2 +- .../update-9/update-app-tsconfigs.ts | 124 ++++++++++++++++++ .../update-9/update-app-tsconfigs_spec.ts | 120 +++++++++++++++++ .../update-9/update-workspace-config.ts | 2 +- 5 files changed, 252 insertions(+), 6 deletions(-) create mode 100644 packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts create mode 100644 packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts diff --git a/packages/schematics/angular/migrations/update-9/index.ts b/packages/schematics/angular/migrations/update-9/index.ts index 22b240421ab0..b964d1d9aa5b 100644 --- a/packages/schematics/angular/migrations/update-9/index.ts +++ b/packages/schematics/angular/migrations/update-9/index.ts @@ -8,17 +8,19 @@ import { Rule, chain } from '@angular-devkit/schematics'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; -import { UpdateLibraries } from './ivy-libraries'; +import { updateLibraries } from './ivy-libraries'; import { updateNGSWConfig } from './ngsw-config'; +import { updateApplicationTsConfigs } from './update-app-tsconfigs'; import { updateDependencies } from './update-dependencies'; -import { UpdateWorkspaceConfig } from './update-workspace-config'; +import { updateWorkspaceConfig } from './update-workspace-config'; export default function(): Rule { return () => { return chain([ - UpdateWorkspaceConfig(), - UpdateLibraries(), + updateWorkspaceConfig(), + updateLibraries(), updateNGSWConfig(), + updateApplicationTsConfigs(), updateDependencies(), (tree, context) => { const packageChanges = tree.actions.some(a => a.path.endsWith('/package.json')); diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts index 5d9fe6a0a560..ae55a404b502 100644 --- a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts @@ -23,7 +23,7 @@ import { getTargets, getWorkspace } from './utils'; * - Creates a production configuration for VE compilations. * - Create a prod tsconfig for which disables Ivy and enables VE compilations. */ -export function UpdateLibraries(): Rule { +export function updateLibraries(): Rule { return (tree: Tree) => { const workspacePath = getWorkspacePath(tree); const workspace = getWorkspace(tree); diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts new file mode 100644 index 000000000000..17f7bc98307d --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts @@ -0,0 +1,124 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonAstObject, JsonParseMode, parseJsonAst } from '@angular-devkit/core'; +import { Rule, Tree, UpdateRecorder } from '@angular-devkit/schematics'; +import { + findPropertyInAstObject, + insertPropertyInAstObjectInOrder, + removePropertyInAstObject, +} from '../../utility/json-utils'; +import { Builders } from '../../utility/workspace-models'; +import { getAllOptions, getTargets, getWorkspace } from './utils'; + + +/** + * Update the tsconfig files for applications + * - Removes enableIvy: true + * - Sets stricter file inclusions + */ +export function updateApplicationTsConfigs(): Rule { + return (tree: Tree) => { + const workspace = getWorkspace(tree); + + for (const { target } of getTargets(workspace, 'build', Builders.Browser)) { + updateTsConfig(tree, target, Builders.Browser); + } + + for (const { target } of getTargets(workspace, 'server', Builders.Server)) { + updateTsConfig(tree, target, Builders.Server); + } + + for (const { target } of getTargets(workspace, 'test', Builders.Karma)) { + updateTsConfig(tree, target, Builders.Karma); + } + + return tree; + }; +} + +function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: Builders) { + const options = getAllOptions(builderConfig); + for (const option of options) { + let recorder: UpdateRecorder; + const tsConfigOption = findPropertyInAstObject(option, 'tsConfig'); + + if (!tsConfigOption || tsConfigOption.kind !== 'string') { + continue; + } + + const tsConfigPath = tsConfigOption.value; + let tsConfigAst = getTsConfigAst(tree, tsConfigPath); + if (!tsConfigAst) { + continue; + } + + // Remove 'enableIvy: true' since this is the default in version 9. + const angularCompilerOptions = findPropertyInAstObject(tsConfigAst, 'angularCompilerOptions'); + if (angularCompilerOptions && angularCompilerOptions.kind === 'object') { + const enableIvy = findPropertyInAstObject(angularCompilerOptions, 'enableIvy'); + if (enableIvy && enableIvy.kind === 'true') { + recorder = tree.beginUpdate(tsConfigPath); + if (angularCompilerOptions.properties.length === 1) { + // remove entire 'angularCompilerOptions' + removePropertyInAstObject(recorder, tsConfigAst, 'angularCompilerOptions'); + } else { + removePropertyInAstObject(recorder, angularCompilerOptions, 'enableIvy'); + } + tree.commitUpdate(recorder); + } + } + + // Add stricter file inclusions to avoid unused file warning during compilation + if (builderName !== Builders.Karma) { + // Note: we need to re-read the tsconfig after very commit because + // otherwise the updates will be out of sync since we are ammending the same node. + tsConfigAst = getTsConfigAst(tree, tsConfigPath) as JsonAstObject; + const files = findPropertyInAstObject(tsConfigAst, 'files'); + const include = findPropertyInAstObject(tsConfigAst, 'include'); + + if (!files && !include) { + const rootInSrc = tsConfigPath.includes('src/'); + const rootSrc = rootInSrc ? '' : 'src/'; + const files = builderName === Builders.Server + ? [`${rootSrc}main.server.ts`] + : [`${rootSrc}main.ts`, `${rootSrc}polyfills.ts`]; + + recorder = tree.beginUpdate(tsConfigPath); + insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'files', files, 2); + tree.commitUpdate(recorder); + + if (builderName === Builders.Browser) { + tsConfigAst = getTsConfigAst(tree, tsConfigPath) as JsonAstObject; + recorder = tree.beginUpdate(tsConfigPath); + insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'include', [`${rootSrc}**/*.d.ts`], 2); + tree.commitUpdate(recorder); + } + + tsConfigAst = getTsConfigAst(tree, tsConfigPath) as JsonAstObject; + recorder = tree.beginUpdate(tsConfigPath); + removePropertyInAstObject(recorder, tsConfigAst, 'exclude'); + tree.commitUpdate(recorder); + } + } + } +} + +function getTsConfigAst(tree: Tree, path: string): JsonAstObject | undefined { + const configBuffer = tree.read(path); + if (!configBuffer) { + return undefined; + } + + const content = configBuffer.toString(); + const tsConfigAst = parseJsonAst(content, JsonParseMode.Loose); + if (!tsConfigAst || tsConfigAst.kind !== 'object') { + return undefined; + } + + return tsConfigAst; +} diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts new file mode 100644 index 000000000000..1655d9badce6 --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts @@ -0,0 +1,120 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { EmptyTree } from '@angular-devkit/schematics'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; + +// tslint:disable-next-line: no-any +function overrideJsonFile(tree: UnitTestTree, path: string, newContent: object) { + tree.overwrite(path, JSON.stringify(newContent, undefined, 2)); +} + +const defaultTsConfigOptions = { + extends: './tsconfig.json', + compilerOptions: { + outDir: './out-tsc/app', + types: [], + }, + exclude: [ + 'src/test.ts', + 'src/**/*.spec.ts', + ], + angularCompilerOptions: { + enableIvy: true, + }, +}; + +// tslint:disable:no-big-function +describe('Migration to version 9', () => { + describe('Update applications tsconfig', () => { + const schematicRunner = new SchematicTestRunner( + 'migrations', + require.resolve('../migration-collection.json'), + ); + + let tree: UnitTestTree; + + beforeEach(async () => { + tree = new UnitTestTree(new EmptyTree()); + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'ng-new', + { + name: 'migration-test', + version: '1.2.3', + directory: '.', + }, + tree, + ) + .toPromise(); + }); + + it('should update apps tsConfig with stricter files inclusions', async () => { + overrideJsonFile(tree, 'tsconfig.app.json', defaultTsConfigOptions); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { exclude, files, include } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(exclude).toBeUndefined(); + expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); + expect(include).toEqual(['src/**/*.d.ts']); + }); + + it('should not update apps tsConfig when tsconfig has include', async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + include: ['foo.ts'], + }; + + overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { files, include } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(files).toEqual(undefined); + expect(include).toEqual(['foo.ts']); + }); + + it(`should remove angularCompilerOptions when enableIvy is true and it's the only option`, async () => { + overrideJsonFile(tree, 'tsconfig.app.json', defaultTsConfigOptions); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { angularCompilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(angularCompilerOptions).toBeUndefined(); + }); + + it('should remove enableIvy only when true and there are other angularCompilerOptions', async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + angularCompilerOptions: { + enableIvy: true, + fullTemplateTypeCheck: true, + }, + }; + + overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { angularCompilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(angularCompilerOptions.enableIvy).toBeUndefined(); + expect(angularCompilerOptions.fullTemplateTypeCheck).toBe(true); + }); + + it('should note remove enableIvy is set to false', async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + angularCompilerOptions: { + enableIvy: false, + fullTemplateTypeCheck: true, + }, + }; + + overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { angularCompilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(angularCompilerOptions.enableIvy).toBe(false); + expect(angularCompilerOptions.fullTemplateTypeCheck).toBe(true); + }); + }); +}); diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts index 9b9750fa2d96..d3ced0deae3b 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts @@ -22,7 +22,7 @@ export const ANY_COMPONENT_STYLE_BUDGET = { maximumWarning: '6kb', }; -export function UpdateWorkspaceConfig(): Rule { +export function updateWorkspaceConfig(): Rule { return (tree: Tree) => { const workspacePath = getWorkspacePath(tree); const workspace = getWorkspace(tree); From b26d6baf8f8b07a5c40623b21218b8846905b5d1 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 28 Aug 2019 14:06:01 +0200 Subject: [PATCH 0110/1070] refactor: create `readJsonFileAsAstObject` utility --- .../migrations/update-9/ivy-libraries.ts | 15 ++--------- .../migrations/update-9/ngsw-config.ts | 13 +++------ .../update-9/update-app-tsconfigs.ts | 27 +++++-------------- .../angular/migrations/update-9/utils.ts | 11 +++++++- 4 files changed, 21 insertions(+), 45 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts index ae55a404b502..a6edb7b5ef4a 100644 --- a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts @@ -5,7 +5,6 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonParseMode, parseJsonAst } from '@angular-devkit/core'; import { Rule, Tree } from '@angular-devkit/schematics'; import { getWorkspacePath } from '../../utility/config'; import { @@ -14,7 +13,7 @@ import { insertPropertyInAstObjectInOrder, } from '../../utility/json-utils'; import { Builders } from '../../utility/workspace-models'; -import { getTargets, getWorkspace } from './utils'; +import { getTargets, getWorkspace, readJsonFileAsAstObject } from './utils'; /** * Updates a pre version 9 library to version 9 Ivy library. @@ -62,17 +61,7 @@ export function updateLibraries(): Rule { } // tsConfig for production already exists. - const tsConfigContent = tree.read(tsConfigOption.value); - if (!tsConfigContent) { - continue; - } - - const tsConfigAst = parseJsonAst(tsConfigContent.toString(), JsonParseMode.Loose); - if (!tsConfigAst || tsConfigAst.kind !== 'object') { - // Invalid tsConfig - continue; - } - + const tsConfigAst = readJsonFileAsAstObject(tree, tsConfigOption.value); const tsConfigRecorder = tree.beginUpdate(tsConfigOption.value); const ngCompilerOptions = findPropertyInAstObject(tsConfigAst, 'angularCompilerOptions'); if (!ngCompilerOptions) { diff --git a/packages/schematics/angular/migrations/update-9/ngsw-config.ts b/packages/schematics/angular/migrations/update-9/ngsw-config.ts index acf840a41322..e6283203dfec 100644 --- a/packages/schematics/angular/migrations/update-9/ngsw-config.ts +++ b/packages/schematics/angular/migrations/update-9/ngsw-config.ts @@ -5,11 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonParseMode, parseJsonAst } from '@angular-devkit/core'; -import { Rule, SchematicsException, Tree } from '@angular-devkit/schematics'; +import { Rule, Tree } from '@angular-devkit/schematics'; import { appendValueInAstArray, findPropertyInAstObject } from '../../utility/json-utils'; import { Builders } from '../../utility/workspace-models'; -import { getAllOptions, getTargets, getWorkspace } from './utils'; +import { getAllOptions, getTargets, getWorkspace, readJsonFileAsAstObject } from './utils'; /** @@ -27,13 +26,7 @@ export function updateNGSWConfig(): Rule { } const path = ngswConfigPath.value; - const configBuffer = tree.read(path); - if (!configBuffer) { - throw new SchematicsException(`Could not find (${path})`); - } - - const content = configBuffer.toString(); - const ngswConfigAst = parseJsonAst(content, JsonParseMode.Loose); + const ngswConfigAst = readJsonFileAsAstObject(tree, path); if (!ngswConfigAst || ngswConfigAst.kind !== 'object') { continue; } diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts index 17f7bc98307d..99c56a37a8fd 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonAstObject, JsonParseMode, parseJsonAst } from '@angular-devkit/core'; +import { JsonAstObject } from '@angular-devkit/core'; import { Rule, Tree, UpdateRecorder } from '@angular-devkit/schematics'; import { findPropertyInAstObject, @@ -13,7 +13,7 @@ import { removePropertyInAstObject, } from '../../utility/json-utils'; import { Builders } from '../../utility/workspace-models'; -import { getAllOptions, getTargets, getWorkspace } from './utils'; +import { getAllOptions, getTargets, getWorkspace, readJsonFileAsAstObject } from './utils'; /** @@ -52,7 +52,7 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B } const tsConfigPath = tsConfigOption.value; - let tsConfigAst = getTsConfigAst(tree, tsConfigPath); + let tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); if (!tsConfigAst) { continue; } @@ -77,7 +77,7 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B if (builderName !== Builders.Karma) { // Note: we need to re-read the tsconfig after very commit because // otherwise the updates will be out of sync since we are ammending the same node. - tsConfigAst = getTsConfigAst(tree, tsConfigPath) as JsonAstObject; + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); const files = findPropertyInAstObject(tsConfigAst, 'files'); const include = findPropertyInAstObject(tsConfigAst, 'include'); @@ -93,13 +93,13 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B tree.commitUpdate(recorder); if (builderName === Builders.Browser) { - tsConfigAst = getTsConfigAst(tree, tsConfigPath) as JsonAstObject; + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); recorder = tree.beginUpdate(tsConfigPath); insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'include', [`${rootSrc}**/*.d.ts`], 2); tree.commitUpdate(recorder); } - tsConfigAst = getTsConfigAst(tree, tsConfigPath) as JsonAstObject; + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); recorder = tree.beginUpdate(tsConfigPath); removePropertyInAstObject(recorder, tsConfigAst, 'exclude'); tree.commitUpdate(recorder); @@ -107,18 +107,3 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B } } } - -function getTsConfigAst(tree: Tree, path: string): JsonAstObject | undefined { - const configBuffer = tree.read(path); - if (!configBuffer) { - return undefined; - } - - const content = configBuffer.toString(); - const tsConfigAst = parseJsonAst(content, JsonParseMode.Loose); - if (!tsConfigAst || tsConfigAst.kind !== 'object') { - return undefined; - } - - return tsConfigAst; -} diff --git a/packages/schematics/angular/migrations/update-9/utils.ts b/packages/schematics/angular/migrations/update-9/utils.ts index b4c6def533e1..f847957468d7 100644 --- a/packages/schematics/angular/migrations/update-9/utils.ts +++ b/packages/schematics/angular/migrations/update-9/utils.ts @@ -72,14 +72,23 @@ export function getAllOptions(builderConfig: JsonAstObject, configurationsOnly = export function getWorkspace(host: Tree): JsonAstObject { const path = getWorkspacePath(host); + + return readJsonFileAsAstObject(host, path); +} + +export function readJsonFileAsAstObject(host: Tree, path: string): JsonAstObject { const configBuffer = host.read(path); if (!configBuffer) { throw new SchematicsException(`Could not find (${path})`); } const content = configBuffer.toString(); + const astContent = parseJsonAst(content, JsonParseMode.Loose); + if (!astContent || astContent.kind !== 'object') { + throw new SchematicsException(`Invalid JSON AST Object (${path})`); + } - return parseJsonAst(content, JsonParseMode.Loose) as JsonAstObject; + return astContent; } export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { From 5e1b3785f6f896a9f099542e3334229b152a6a10 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 4 Sep 2019 18:00:09 +0200 Subject: [PATCH 0111/1070] fix(@angular-devkit/build-angular): fix permission errors for ES5 bundles copyFilesSync will also copy permissions which may result in permissions errors. Closes #15490 --- packages/angular_devkit/build_angular/src/browser/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index e5c6ff297391..5eb820ac4d62 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -473,6 +473,11 @@ export function buildWebpackBrowser( for (const action of cacheActions) { fs.copyFileSync(action.src, action.dest, fs.constants.COPYFILE_FICLONE); + if (process.platform !== 'win32') { + // The cache writes entries as readonly and when using copyFile the permissions will also be copied. + // See: https://github.com/npm/cacache/blob/073fbe1a9f789ba42d9a41de7b8429c93cf61579/lib/util/move-file.js#L36 + fs.chmodSync(action.dest, 0o644); + } } if (processActions.length > 0) { From 1f2fd8399451b68845c1fa02bcec067dc72d1277 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 5 Sep 2019 11:17:01 +0200 Subject: [PATCH 0112/1070] test: update e2e size checks for Ivy --- tests/legacy-cli/e2e/tests/build/prod-build.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/prod-build.ts b/tests/legacy-cli/e2e/tests/build/prod-build.ts index 00c76eec3b80..99bc1cb0767e 100644 --- a/tests/legacy-cli/e2e/tests/build/prod-build.ts +++ b/tests/legacy-cli/e2e/tests/build/prod-build.ts @@ -57,8 +57,8 @@ export default async function () { verifySize(mainES5Path, 184470); verifySize(mainES2015Path, 163627); } else { - verifySize(mainES5Path, 167355); - verifySize(mainES2015Path, 149806); + verifySize(mainES5Path, 148031); + verifySize(mainES2015Path, 137494); } // Check that the process didn't change local files. From 56553a9a69174991e785614f89d48c3fb185bd9d Mon Sep 17 00:00:00 2001 From: vikerman Date: Thu, 5 Sep 2019 10:43:58 -0700 Subject: [PATCH 0113/1070] release: v9.0.0-next.3 --- packages/schematics/angular/utility/latest-versions.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 08e060978ddb..b4a308b43d80 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,17 +8,17 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.4', + Angular: '~9.0.0-next.5', RxJs: '~6.4.0', ZoneJs: '~0.10.1', TypeScript: '~3.5.3', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.2', - DevkitBuildNgPackagr: '~0.900.0-next.2', - DevkitBuildWebpack: '~0.900.0-next.2', - AngularPWA: '~0.900.0-next.2', + DevkitBuildAngular: '~0.900.0-next.3', + DevkitBuildNgPackagr: '~0.900.0-next.3', + DevkitBuildWebpack: '~0.900.0-next.3', + AngularPWA: '~0.900.0-next.3', tsickle: '^0.37.0', ngPackagr: '^5.4.0', From eb38a842d01fe08e89bfe7f7098dfc4c26b60f0e Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 5 Sep 2019 11:39:42 -0700 Subject: [PATCH 0114/1070] ci: set up angular-automatic-lock-bot for the repo (#15533) --- .github/workflows/lock-closed.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/lock-closed.yml diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml new file mode 100644 index 000000000000..a1f957cf4a57 --- /dev/null +++ b/.github/workflows/lock-closed.yml @@ -0,0 +1,15 @@ +name: Lock issues that are closed and inactive + +on: + schedule: + # Run at the 40th minute of every hour + - cron: '40 * * * *' + +jobs: + lock_closed: + runs-on: ubuntu-latest + steps: + - uses: angular/dev-infra/github-actions/lock-closed@1e03b0d + with: + lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }} + locks-per-execution: 250 From 366e51be0483ee213f1ec388384afb5b5fc65824 Mon Sep 17 00:00:00 2001 From: noeri Date: Sun, 18 Aug 2019 16:01:41 +0200 Subject: [PATCH 0115/1070] feat(@angular-devkit/build-angular): expose webpack-dev-server's allowedHosts option Closes #13656 --- packages/angular/cli/lib/config/schema.json | 8 ++++ .../build_angular/src/dev-server/index.ts | 1 + .../build_angular/src/dev-server/schema.json | 8 ++++ .../dev-server/allowed-hosts_spec_large.ts | 44 +++++++++++++++++++ .../test/dev-server/public-host_spec_large.ts | 2 +- 5 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 packages/angular_devkit/build_angular/test/dev-server/allowed-hosts_spec_large.ts diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index 1b7b03daa269..2c181c08db79 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -1119,6 +1119,14 @@ "type": "string", "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." }, + "allowedHosts": { + "type": "array", + "description": "Whitelist of hosts that are allowed to access the dev server.", + "default": [], + "items": { + "type": "string" + } + }, "servePath": { "type": "string", "description": "The pathname where the app will be served." diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 6b15ab96ebd4..b253622c6d08 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -342,6 +342,7 @@ export function buildServerConfig( // inline is always false, because we add live reloading scripts in _addLiveReload when needed inline: false, public: serverOptions.publicHost, + allowedHosts: serverOptions.allowedHosts, disableHostCheck: serverOptions.disableHostCheck, publicPath: servePath, hot: serverOptions.hmr, diff --git a/packages/angular_devkit/build_angular/src/dev-server/schema.json b/packages/angular_devkit/build_angular/src/dev-server/schema.json index 5b7c153fb451..ff1623b9d55b 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/schema.json +++ b/packages/angular_devkit/build_angular/src/dev-server/schema.json @@ -55,6 +55,14 @@ "type": "string", "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies." }, + "allowedHosts": { + "type": "array", + "description": "Whitelist of hosts that are allowed to access the dev server.", + "default": [], + "items": { + "type": "string" + } + }, "servePath": { "type": "string", "description": "The pathname where the app will be served." diff --git a/packages/angular_devkit/build_angular/test/dev-server/allowed-hosts_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/allowed-hosts_spec_large.ts new file mode 100644 index 000000000000..3b6767c9abf2 --- /dev/null +++ b/packages/angular_devkit/build_angular/test/dev-server/allowed-hosts_spec_large.ts @@ -0,0 +1,44 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Architect, BuilderRun } from '@angular-devkit/architect'; +import fetch from 'node-fetch'; // tslint:disable-line:no-implicit-dependencies +import { DevServerBuilderOutput } from '../../src/dev-server'; +import { createArchitect, host } from '../utils'; + + +describe('Dev Server Builder allowed host', () => { + // We have to spoof the host to a non-numeric one because Webpack Dev Server does not + // check the hosts anymore when requests come from numeric IP addresses. + const headers = { host: 'spoofy.mcspoofface' }; + + const target = { project: 'app', target: 'serve' }; + let architect: Architect; + // We use runs like this to ensure it WILL stop the servers at the end of each tests. + let runs: BuilderRun[]; + + beforeEach(async () => { + await host.initialize().toPromise(); + architect = (await createArchitect(host.root())).architect; + runs = []; + }); + afterEach(async () => { + await host.restore().toPromise(); + await Promise.all(runs.map(r => r.stop())); + }); + + it('works', async () => { + const run = await architect.scheduleTarget(target, { allowedHosts: ['spoofy.mcspoofface'] }); + runs.push(run); + const output = await run.result as DevServerBuilderOutput; + expect(output.success).toBe(true); + expect(output.baseUrl).toBe('http://localhost:4200/'); + + const response = await fetch(`${output.baseUrl}`, { headers }); + expect(await response.text()).toContain('HelloWorldApp'); + }, 30000); +}); diff --git a/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts b/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts index f764e025d51f..4f021d6b5624 100644 --- a/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/dev-server/public-host_spec_large.ts @@ -14,7 +14,7 @@ import { createArchitect, host } from '../utils'; describe('Dev Server Builder public host', () => { // We have to spoof the host to a non-numeric one because Webpack Dev Server does not // check the hosts anymore when requests come from numeric IP addresses. - const headers = { host: 'http://spoofy.mcspoofface' }; + const headers = { host: 'spoofy.mcspoofface' }; const target = { project: 'app', target: 'serve' }; let architect: Architect; From b9c4b346dd305e35841dabf4549c78ebed52a724 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 29 Aug 2019 15:23:32 +0200 Subject: [PATCH 0116/1070] feat(@schematics/angular): replace deprecated `TestBed.get` with `TestBed.inject` Relates to https://github.com/angular/angular/pull/32200 --- .../__name@dasherize__.service.spec.ts.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template index 9f6d10c3106f..2c7ab1d2bdf6 100644 --- a/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template +++ b/packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template @@ -7,7 +7,7 @@ describe('<%= classify(name) %>Service', () => { beforeEach(() => { TestBed.configureTestingModule({}); - service = TestBed.get(<%= classify(name) %>Service); + service = TestBed.inject(<%= classify(name) %>Service); }); it('should be created', () => { From b68eec20ef84db19534378ab2b58190b4275086f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 6 Sep 2019 08:41:08 +0200 Subject: [PATCH 0117/1070] feat(@schematics/angular): run lazy loading migration for version 9 Closes #15539 --- .../schematics/angular/migrations/migration-collection.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/schematics/angular/migrations/migration-collection.json b/packages/schematics/angular/migrations/migration-collection.json index f2f7a02f7551..d25c71ddc348 100644 --- a/packages/schematics/angular/migrations/migration-collection.json +++ b/packages/schematics/angular/migrations/migration-collection.json @@ -44,6 +44,11 @@ "version": "9.0.0-beta.0", "factory": "./update-9", "description": "Update an Angular CLI project to version 9." + }, + "migration-10": { + "version": "9.0.0-next.6", + "factory": "./update-8/#updateLazyModulePaths", + "description": "Update lazy loading syntax to use dynamic imports." } } } From b2e74d119c7fd3805487e39cbb478fdb2ec4aa1b Mon Sep 17 00:00:00 2001 From: Elvis Begovic Date: Fri, 6 Sep 2019 11:17:52 +0200 Subject: [PATCH 0118/1070] feat(@schematics/angular): minimal=true should not create tests files when using `ng generate` command Before this commit: `--minimal=true` create project without any testing frameworks and disable e2e, lint, test targets. But, if in this minimal project we try command `ng generate class|component|directive|guard|module|pipe|service`, it will always create `*_spec.ts` files. After this commit: `--minimal=true` override `@schematics/angular` in `angular.json` to not create `*_spec.ts` files when using `ng generate *` commands. --- packages/schematics/angular/application/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 7029157b2fa7..2b891e7ce6a8 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -168,7 +168,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul schematics['@schematics/angular:component'] = componentSchematicsOptions; } - if (options.skipTests === true) { + if (options.skipTests || options.minimal) { ['class', 'component', 'directive', 'guard', 'module', 'pipe', 'service'].forEach((type) => { if (!(`@schematics/angular:${type}` in schematics)) { schematics[`@schematics/angular:${type}`] = {}; From 19cefbd8ace9cf83b0b7fd85be6ab67516cefd45 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 7 Sep 2019 09:26:08 +0200 Subject: [PATCH 0119/1070] ci: group babel packages renovate group name --- renovate.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/renovate.json b/renovate.json index aafeee4bb686..1ee2674e8da8 100644 --- a/renovate.json +++ b/renovate.json @@ -40,6 +40,13 @@ "groupName": "angular", "pinVersions": false }, + { + "packagePatterns": [ + "^@babel\/.*" + ], + "groupName": "Babel", + "pinVersions": false + }, { "packagePatterns": [ "^@bazel\/.*", From fe8666073b4f357d4614bf90ac39225980ebe24c Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 5 Sep 2019 13:51:15 -0700 Subject: [PATCH 0120/1070] ci: move to latest lock-closed commit for github action --- .github/workflows/lock-closed.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml index a1f957cf4a57..323ce1f43d0e 100644 --- a/.github/workflows/lock-closed.yml +++ b/.github/workflows/lock-closed.yml @@ -9,7 +9,7 @@ jobs: lock_closed: runs-on: ubuntu-latest steps: - - uses: angular/dev-infra/github-actions/lock-closed@1e03b0d + - uses: angular/dev-infra/github-actions/lock-closed@7f7ef07 with: lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }} - locks-per-execution: 250 + locks-per-execution: 100 From 9300627e2271fcd456ab31765376cff7d752d009 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 9 Sep 2019 14:08:55 -0400 Subject: [PATCH 0121/1070] fix(@angular-devkit/build-angular): disable extract comments for webpack terser plugin terser-webpack-plugin 2.0.0+ enables the extract comments option by default which is not used by the CLI. --- .../src/angular-cli-files/models/webpack-configs/common.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 693ea1fdc609..f1afa09e3ed1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -374,6 +374,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { sourceMap: scriptsSourceMap, parallel: true, cache: true, + extractComments: false, terserOptions, }), ); From fb24f30202ecdedbba5abc82eb2eb2a01990ee41 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 4 Sep 2019 10:49:30 +0200 Subject: [PATCH 0122/1070] feat(@angular-devkit/build-angular): enable bundleDependencies by default for server builder BREAKING CHANGE: bundleDependencies default value has been changed from none to all. This will result in all of node_modules to be bundled in the final server bundle. Under Ivy, if users choose to opt-out from bundling dependencies they will need to run NGCC binary manually to make non-bundled node_modules compatible with Ivy. --- packages/angular_devkit/build_angular/src/server/schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/server/schema.json b/packages/angular_devkit/build_angular/src/server/schema.json index d1122c949663..d85f4985a365 100644 --- a/packages/angular_devkit/build_angular/src/server/schema.json +++ b/packages/angular_devkit/build_angular/src/server/schema.json @@ -194,8 +194,8 @@ }, "bundleDependencies": { "type": "string", - "description": "Available on server platform only. Which external dependencies to bundle into the module. By default, all of node_modules will be kept as requires.", - "default": "none", + "description": "Available on server platform only. Which external dependencies to bundle into the module. By default, all of node_modules will be bundled.", + "default": "all", "enum": [ "none", "all" From 9602003c49c4fb703056f9f2e79ae0df62765acc Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 4 Sep 2019 10:50:49 +0200 Subject: [PATCH 0123/1070] feat(@schematics/angular): add export to `renderModule` in server main file This will be used by universal and app-shell to render the server module --- .../universal/files/src/__main@stripTsExtension__.ts.template | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template b/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template index 5f82b3e53a0c..ff83dfc2d4ab 100644 --- a/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template +++ b/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template @@ -7,3 +7,4 @@ if (environment.production) { } export { <%= rootModuleClassName %> } from './app/<%= stripTsExtension(rootModuleFileName) %>'; +export { renderModule } from '@angular/platform-server'; From fb0a6af9f07cefac720975512870a33afe0c90f6 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 4 Sep 2019 14:46:29 +0200 Subject: [PATCH 0124/1070] fix(@angular-devkit/build-angular): make app-shell work with Ivy Fixes #15383 --- .../build_angular/src/app-shell/index.ts | 36 ++++++----- .../test/app-shell/app-shell_spec_large.ts | 7 +-- .../test/server/base_spec_large.ts | 5 +- .../hello-world-app-ve/src/main.server.ts | 1 + .../hello-world-app/src/app/app.module.ts | 14 +++-- .../src/app/app.server.module.ts | 5 +- .../hello-world-app/src/main.server.ts | 1 + .../build/build-app-shell-with-schematic.ts | 11 ++-- .../e2e/tests/build/build-app-shell.ts | 7 +-- .../e2e/tests/build/platform-server.ts | 61 +++++++++++-------- tests/legacy-cli/e2e_runner.ts | 7 --- 11 files changed, 86 insertions(+), 69 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/app-shell/index.ts b/packages/angular_devkit/build_angular/src/app-shell/index.ts index 75fb4d9c18be..4639928a0f50 100644 --- a/packages/angular_devkit/build_angular/src/app-shell/index.ts +++ b/packages/angular_devkit/build_angular/src/app-shell/index.ts @@ -15,7 +15,6 @@ import { JsonObject, experimental, join, normalize, resolve, schema } from '@ang import { NodeJsSyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; import * as path from 'path'; -import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { augmentAppWithServiceWorker } from '../angular-cli-files/utilities/service-worker'; import { BrowserBuilderOutput } from '../browser'; import { Schema as BrowserBuilderSchema } from '../browser/schema'; @@ -42,30 +41,37 @@ async function _renderUniversal( browserBuilderName, ); - // Determine if browser app was compiled using Ivy. - const { options: compilerOptions } = readTsconfig(browserOptions.tsConfig, context.workspaceRoot); - const ivy = compilerOptions.enableIvy; - // Initialize zone.js const zonePackage = require.resolve('zone.js', { paths: [root] }); await import(zonePackage); + const { + AppServerModule, + AppServerModuleNgFactory, + renderModule, + renderModuleFactory, + } = await import(serverBundlePath); + + let renderModuleFn: (module: unknown, options: {}) => Promise; + let AppServerModuleDef: unknown; + + if (renderModuleFactory && AppServerModuleNgFactory) { + renderModuleFn = renderModuleFactory; + AppServerModuleDef = AppServerModuleNgFactory; + } else if (renderModule && AppServerModule) { + renderModuleFn = renderModule; + AppServerModuleDef = AppServerModule; + } else { + throw new Error(`renderModule method and/or AppServerModule were not exported from: ${serverBundlePath}.`); + } + // Load platform server module renderer - const platformServerPackage = require.resolve('@angular/platform-server', { paths: [root] }); const renderOpts = { document: indexHtml, url: options.route, }; - // Render app to HTML using Ivy or VE - const html = await import(platformServerPackage) - // tslint:disable-next-line:no-implicit-dependencies - .then((m: typeof import('@angular/platform-server')) => - ivy - ? m.renderModule(require(serverBundlePath).AppServerModule, renderOpts) - : m.renderModuleFactory(require(serverBundlePath).AppServerModuleNgFactory, renderOpts), - ); - + const html = await renderModuleFn(AppServerModuleDef, renderOpts); // Overwrite the client index file. const outputIndexPath = options.outputIndexPath ? path.join(root, options.outputIndexPath) diff --git a/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts b/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts index 8213aa8f1af0..15085642c19a 100644 --- a/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts @@ -9,12 +9,9 @@ import { Architect } from '@angular-devkit/architect/src/architect'; import { getSystemPath, join, normalize, virtualFs } from '@angular-devkit/core'; import * as express from 'express'; // tslint:disable-line:no-implicit-dependencies -import { createArchitect, host, veEnabled } from '../utils'; +import { createArchitect, host } from '../utils'; - -// DISABLED_FOR_IVY These should pass but are currently not supported -// See https://github.com/angular/angular-cli/issues/15383 for details. -(veEnabled ? describe : xdescribe)('AppShell Builder', () => { +describe('AppShell Builder', () => { const target = { project: 'app', target: 'app-shell' }; let architect: Architect; diff --git a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts index 1bbdab21716e..ec8f526dd440 100644 --- a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts @@ -10,6 +10,7 @@ import { Architect } from '@angular-devkit/architect'; import { getSystemPath, join, normalize, virtualFs } from '@angular-devkit/core'; import { take, tap } from 'rxjs/operators'; import { BrowserBuilderOutput } from '../../src/browser'; +import { BundleDependencies } from '../../src/server/schema'; import { createArchitect, host, veEnabled } from '../utils'; @@ -85,6 +86,7 @@ describe('Server Builder', () => { }); const run = await architect.scheduleTarget(target, { + bundleDependencies: BundleDependencies.None, sourceMap: { styles: false, scripts: true, @@ -103,9 +105,10 @@ describe('Server Builder', () => { await run.stop(); }); - // + it('supports component styles sourcemaps', async () => { const overrides = { + bundleDependencies: BundleDependencies.None, sourceMap: { styles: true, scripts: true, diff --git a/tests/angular_devkit/build_angular/hello-world-app-ve/src/main.server.ts b/tests/angular_devkit/build_angular/hello-world-app-ve/src/main.server.ts index 00f62942d0b2..a143d3a033b6 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ve/src/main.server.ts +++ b/tests/angular_devkit/build_angular/hello-world-app-ve/src/main.server.ts @@ -14,3 +14,4 @@ if (environment.production) { } export { AppServerModule } from './app/app.server.module'; +export { renderModuleFactory } from '@angular/platform-server'; diff --git a/tests/angular_devkit/build_angular/hello-world-app/src/app/app.module.ts b/tests/angular_devkit/build_angular/hello-world-app/src/app/app.module.ts index ba889e142a96..c61881ebb3eb 100644 --- a/tests/angular_devkit/build_angular/hello-world-app/src/app/app.module.ts +++ b/tests/angular_devkit/build_angular/hello-world-app/src/app/app.module.ts @@ -8,12 +8,18 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; + import { AppComponent } from './app.component'; + @NgModule({ - declarations: [AppComponent], - imports: [BrowserModule], + declarations: [ + AppComponent + ], + imports: [ + BrowserModule + ], providers: [], - bootstrap: [AppComponent], + bootstrap: [AppComponent] }) -export class AppModule {} +export class AppModule { } diff --git a/tests/angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts b/tests/angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts index e6203b203b30..bb56e2795c22 100644 --- a/tests/angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts +++ b/tests/angular_devkit/build_angular/hello-world-app/src/app/app.server.module.ts @@ -12,7 +12,10 @@ import { AppModule } from './app.module'; import { AppComponent } from './app.component'; @NgModule({ - imports: [AppModule, ServerModule], + imports: [ + AppModule, + ServerModule, + ], bootstrap: [AppComponent], }) export class AppServerModule {} diff --git a/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts b/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts index 00f62942d0b2..4a5a5a1c7234 100644 --- a/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts +++ b/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts @@ -14,3 +14,4 @@ if (environment.production) { } export { AppServerModule } from './app/app.server.module'; +export { renderModule } from '@angular/platform-server'; diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts index 940fb3d28695..dcc28b6bf50e 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts @@ -1,16 +1,11 @@ import { getGlobalVariable } from '../../utils/env'; -import { appendToFile, expectFileToMatch } from '../../utils/fs'; +import { appendToFile, expectFileToMatch, replaceInFile } from '../../utils/fs'; import { ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { readNgVersion } from '../../utils/version'; export default async function () { - // Skip this test in Angular 2/4. - if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) { - return; - } - await appendToFile('src/app/app.component.html', ''); await ng('generate', 'appShell', '--client-project', 'test-project'); await updateJsonFile('package.json', packageJson => { @@ -20,6 +15,10 @@ export default async function () { : readNgVersion(); }); + if (argv['ve']) { + await replaceInFile('src/main.server.ts', /renderModule/g, 'renderModuleFactory'); + } + await silentNpm('install'); await ng('run', 'test-project:app-shell'); await expectFileToMatch('dist/test-project/index.html', /app-shell works!/); diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell.ts index d12350b13f08..a5ed96424cf9 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell.ts @@ -6,13 +6,7 @@ import { updateJsonFile } from '../../utils/project'; import { readNgVersion } from '../../utils/version'; export default function() { - // Skip this test in Angular 2/4. - if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) { - return Promise.resolve(); - } - let platformServerVersion = readNgVersion(); - let httpVersion = readNgVersion(); if (getGlobalVariable('argv')['ng-snapshots']) { platformServerVersion = 'github:angular/platform-server-builds'; @@ -78,6 +72,7 @@ export default function() { } export { AppServerModule } from './app/app.server.module'; + export { renderModule${veProject ? 'Factory' : ''} } from '@angular/platform-server'; `, ), ) diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index 423deebefaa3..f2b004c109f6 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -1,15 +1,13 @@ import { normalize } from 'path'; import { getGlobalVariable } from '../../utils/env'; -import { expectFileToMatch, writeFile, appendToFile } from '../../utils/fs'; +import { expectFileToMatch, writeFile } from '../../utils/fs'; import { exec, ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { readNgVersion } from '../../utils/version'; export default async function () { - // Skip this test in Angular 2/4. - if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) { - return; - } + const argv = getGlobalVariable('argv'); + const veEnabled = argv['ve']; await ng('add', '@nguniversal/express-engine', '--client-project', 'test-project'); @@ -21,28 +19,43 @@ export default async function () { }); await silentNpm('install'); - await appendToFile( - 'src/main.server.ts', - `export { renderModuleFactory } from '@angular/platform-server';`, - ); + if (veEnabled) { + await replaceInFile('src/main.server.ts', /renderModule/g, 'renderModuleFactory'); + await writeFile( + './index.js', + ` require('zone.js/dist/zone-node'); + const fs = require('fs'); + const { AppServerModuleNgFactory, renderModuleFactory } = require('./dist/server/main'); + + renderModuleFactory(AppServerModuleNgFactory, { + url: '/', + document: '' + }).then(html => { + fs.writeFileSync('dist/server/index.html', html); + }); + `, + ); + } else { + await writeFile( + './index.js', + ` require('zone.js/dist/zone-node'); + const fs = require('fs'); + const { AppServerModule, renderModule } = require('./dist/server/main'); + + renderModule(AppServerModule, { + url: '/', + document: '' + }).then(html => { + fs.writeFileSync('dist/server/index.html', html); + }); + `, + ); + } - await writeFile( - './index.js', - ` require('zone.js/dist/zone-node'); - const fs = require('fs'); - const { AppServerModuleNgFactory, renderModuleFactory } = require('./dist/server/main'); - - renderModuleFactory(AppServerModuleNgFactory, { - url: '/', - document: '' - }).then(html => { - fs.writeFileSync('dist/server/index.html', html); - }); - `, - ); await ng('run', 'test-project:server:production'); - await expectFileToMatch('dist/server/main.js', /exports.*AppServerModuleNgFactory/); + + await expectFileToMatch('dist/server/main.js', veEnabled ? /exports.*AppServerModuleNgFactory/ : /exports.*AppServerModule/); await exec(normalize('node'), 'index.js'); await expectFileToMatch( 'dist/server/index.html', diff --git a/tests/legacy-cli/e2e_runner.ts b/tests/legacy-cli/e2e_runner.ts index b828747018ec..00edf37edd56 100644 --- a/tests/legacy-cli/e2e_runner.ts +++ b/tests/legacy-cli/e2e_runner.ts @@ -102,13 +102,6 @@ if (!argv.ve) { // Ivy doesn't support i18n externally at the moment. .filter(name => !name.includes('tests/i18n/')) .filter(name => !name.endsWith('tests/build/aot/aot-i18n.ts')) - // We don't have a platform-server usage story yet for Ivy. - // It's contingent on lazy loading and factory shim considerations that are still being - // discussed. - // Broken currently https://github.com/angular/angular-cli/issues/15383 - .filter(name => !name.endsWith('tests/build/platform-server.ts')) - .filter(name => !name.endsWith('tests/build/build-app-shell.ts')) - .filter(name => !name.endsWith('tests/build/build-app-shell-with-schematic.ts')); } const shardId = 'shard' in argv ? argv['shard'] : null; From 4cd2907dae68c8f5957e28cb249c3adcf3987a6d Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 4 Sep 2019 15:46:09 +0200 Subject: [PATCH 0125/1070] test: run ivy-ngcc binary to reduce flakes --- scripts/test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/test.ts b/scripts/test.ts index 46297765a994..a8d8c0a7fb8c 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -8,7 +8,7 @@ // tslint:disable:no-console // tslint:disable:no-implicit-dependencies import { logging } from '@angular-devkit/core'; -import { spawnSync } from 'child_process'; +import { execSync, spawnSync } from 'child_process'; import * as glob from 'glob'; import 'jasmine'; import { SpecReporter as JasmineSpecReporter } from 'jasmine-spec-reporter'; @@ -23,8 +23,6 @@ const knownFlakes = [ // Rebuild tests in test-large are flakey if not run as the first suite. // https://github.com/angular/angular-cli/pull/15204 'packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts', - // This is flaky with NGCC - 'packages/angular_devkit/build_angular/test/karma/selected_spec_large.ts', ]; const projectBaseDir = join(__dirname, '..'); @@ -94,6 +92,10 @@ export default function(args: ParsedArgs, logger: logging.Logger) { if (args['ve']) { // tslint:disable-next-line:no-console console.warn('********* VE Enabled ***********'); + } else if (args.shard !== undefined) { + // CI is really flaky with NGCC + // This is a working around test order and isolation issues. + execSync('./node_modules/.bin/ivy-ngcc', { stdio: 'inherit' }); } if (args.large) { From 3b6260e28397154957c5685003d4a24cba367c1d Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 4 Sep 2019 15:46:24 +0200 Subject: [PATCH 0126/1070] test: add production app-shell test --- .../e2e/tests/build/build-app-shell-with-schematic.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts index dcc28b6bf50e..0836c0b081d1 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts @@ -22,4 +22,7 @@ export default async function () { await silentNpm('install'); await ng('run', 'test-project:app-shell'); await expectFileToMatch('dist/test-project/index.html', /app-shell works!/); + + await ng('run', 'test-project:app-shell:production'); + await expectFileToMatch('dist/test-project/index.html', /app-shell works!/); } From 6292c737738064cb75a80ca74e423fc6b269fc1e Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 5 Sep 2019 08:17:25 +0200 Subject: [PATCH 0127/1070] feat(@schematics/angular): add export to `renderModuleFactory` in server main file This is to reduce the steps for users when opting-out of ivy --- .../files/src/__main@stripTsExtension__.ts.template | 2 +- .../build_angular/hello-world-app-ve/src/main.server.ts | 2 +- .../build_angular/hello-world-app/src/main.server.ts | 2 +- .../e2e/tests/build/build-app-shell-with-schematic.ts | 6 +----- tests/legacy-cli/e2e/tests/build/build-app-shell.ts | 2 +- tests/legacy-cli/e2e/tests/build/platform-server.ts | 5 ++--- 6 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template b/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template index ff83dfc2d4ab..4ea7661b5570 100644 --- a/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template +++ b/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template @@ -7,4 +7,4 @@ if (environment.production) { } export { <%= rootModuleClassName %> } from './app/<%= stripTsExtension(rootModuleFileName) %>'; -export { renderModule } from '@angular/platform-server'; +export { renderModule, renderModuleFactory } from '@angular/platform-server'; diff --git a/tests/angular_devkit/build_angular/hello-world-app-ve/src/main.server.ts b/tests/angular_devkit/build_angular/hello-world-app-ve/src/main.server.ts index a143d3a033b6..78e25575b131 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ve/src/main.server.ts +++ b/tests/angular_devkit/build_angular/hello-world-app-ve/src/main.server.ts @@ -14,4 +14,4 @@ if (environment.production) { } export { AppServerModule } from './app/app.server.module'; -export { renderModuleFactory } from '@angular/platform-server'; +export { renderModule, renderModuleFactory } from '@angular/platform-server'; diff --git a/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts b/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts index 4a5a5a1c7234..78e25575b131 100644 --- a/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts +++ b/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts @@ -14,4 +14,4 @@ if (environment.production) { } export { AppServerModule } from './app/app.server.module'; -export { renderModule } from '@angular/platform-server'; +export { renderModule, renderModuleFactory } from '@angular/platform-server'; diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts index 0836c0b081d1..6a628f7f89bf 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts @@ -1,5 +1,5 @@ import { getGlobalVariable } from '../../utils/env'; -import { appendToFile, expectFileToMatch, replaceInFile } from '../../utils/fs'; +import { appendToFile, expectFileToMatch } from '../../utils/fs'; import { ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { readNgVersion } from '../../utils/version'; @@ -15,10 +15,6 @@ export default async function () { : readNgVersion(); }); - if (argv['ve']) { - await replaceInFile('src/main.server.ts', /renderModule/g, 'renderModuleFactory'); - } - await silentNpm('install'); await ng('run', 'test-project:app-shell'); await expectFileToMatch('dist/test-project/index.html', /app-shell works!/); diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell.ts index a5ed96424cf9..796ea16e1395 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell.ts @@ -72,7 +72,7 @@ export default function() { } export { AppServerModule } from './app/app.server.module'; - export { renderModule${veProject ? 'Factory' : ''} } from '@angular/platform-server'; + export { renderModule, renderModuleFactory } from '@angular/platform-server'; `, ), ) diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index f2b004c109f6..e5ccc5db1f85 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -20,13 +20,12 @@ export default async function () { await silentNpm('install'); if (veEnabled) { - await replaceInFile('src/main.server.ts', /renderModule/g, 'renderModuleFactory'); await writeFile( './index.js', ` require('zone.js/dist/zone-node'); const fs = require('fs'); const { AppServerModuleNgFactory, renderModuleFactory } = require('./dist/server/main'); - + renderModuleFactory(AppServerModuleNgFactory, { url: '/', document: '' @@ -41,7 +40,7 @@ export default async function () { ` require('zone.js/dist/zone-node'); const fs = require('fs'); const { AppServerModule, renderModule } = require('./dist/server/main'); - + renderModule(AppServerModule, { url: '/', document: '' From 600e5d08b0eb4ddbe90ddf9727863c0341366022 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 5 Sep 2019 10:49:12 +0200 Subject: [PATCH 0128/1070] feat(@schematics/angular): add migration to add missing exports in main server file Update the `main.server.ts` file by adding exports to `renderModule` and `renderModuleFactory` which are now required for Universal and App-Shell for Ivy and `bundleDependencies`. --- .../angular/migrations/update-9/index.ts | 2 + .../update-9/update-server-main-file.ts | 143 ++++++++++++++++++ .../update-9/update-server-main-file_spec.ts | 108 +++++++++++++ 3 files changed, 253 insertions(+) create mode 100644 packages/schematics/angular/migrations/update-9/update-server-main-file.ts create mode 100644 packages/schematics/angular/migrations/update-9/update-server-main-file_spec.ts diff --git a/packages/schematics/angular/migrations/update-9/index.ts b/packages/schematics/angular/migrations/update-9/index.ts index b964d1d9aa5b..33205818be75 100644 --- a/packages/schematics/angular/migrations/update-9/index.ts +++ b/packages/schematics/angular/migrations/update-9/index.ts @@ -12,6 +12,7 @@ import { updateLibraries } from './ivy-libraries'; import { updateNGSWConfig } from './ngsw-config'; import { updateApplicationTsConfigs } from './update-app-tsconfigs'; import { updateDependencies } from './update-dependencies'; +import { updateServerMainFile } from './update-server-main-file'; import { updateWorkspaceConfig } from './update-workspace-config'; export default function(): Rule { @@ -22,6 +23,7 @@ export default function(): Rule { updateNGSWConfig(), updateApplicationTsConfigs(), updateDependencies(), + updateServerMainFile(), (tree, context) => { const packageChanges = tree.actions.some(a => a.path.endsWith('/package.json')); if (packageChanges) { diff --git a/packages/schematics/angular/migrations/update-9/update-server-main-file.ts b/packages/schematics/angular/migrations/update-9/update-server-main-file.ts new file mode 100644 index 000000000000..3d917ce4a75b --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/update-server-main-file.ts @@ -0,0 +1,143 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Rule } from '@angular-devkit/schematics'; +import * as ts from '../../third_party/github.com/Microsoft/TypeScript/lib/typescript'; +import { findNodes } from '../../utility/ast-utils'; +import { findPropertyInAstObject } from '../../utility/json-utils'; +import { Builders } from '../../utility/workspace-models'; +import { getTargets, getWorkspace } from './utils'; + +/** + * Update the `main.server.ts` file by adding exports to `renderModule` and `renderModuleFactory` which are + * now required for Universal and App-Shell for Ivy and `bundleDependencies`. + */ +export function updateServerMainFile(): Rule { + return tree => { + const workspace = getWorkspace(tree); + + for (const { target } of getTargets(workspace, 'server', Builders.Server)) { + const options = findPropertyInAstObject(target, 'options'); + if (!options || options.kind !== 'object') { + continue; + } + + // find the main server file + const mainFile = findPropertyInAstObject(options, 'main'); + if (!mainFile || typeof mainFile.value !== 'string') { + continue; + } + + const mainFilePath = mainFile.value; + + const content = tree.read(mainFilePath); + if (!content) { + continue; + } + + const source = ts.createSourceFile( + mainFilePath, + content.toString().replace(/^\uFEFF/, ''), + ts.ScriptTarget.Latest, + true, + ); + + // find exports in main server file + const exportDeclarations = findNodes(source, ts.SyntaxKind.ExportDeclaration) as ts.ExportDeclaration[]; + + const platformServerExports = exportDeclarations.filter(({ moduleSpecifier }) => ( + moduleSpecifier && ts.isStringLiteral(moduleSpecifier) && moduleSpecifier.text === '@angular/platform-server' + )); + + let hasRenderModule = false; + let hasRenderModuleFactory = false; + + // find exports of renderModule or renderModuleFactory + for (const { exportClause } of platformServerExports) { + if (exportClause && ts.isNamedExports(exportClause)) { + if (!hasRenderModuleFactory) { + hasRenderModuleFactory = exportClause.elements.some(({ name }) => name.text === 'renderModuleFactory'); + } + + if (!hasRenderModule) { + hasRenderModule = exportClause.elements.some(({ name }) => name.text === 'renderModule'); + } + } + } + + if (hasRenderModule && hasRenderModuleFactory) { + // We have both required exports + continue; + } + + let exportSpecifiers: ts.ExportSpecifier[] = []; + let updateExisting = false; + + // Add missing exports + if (platformServerExports.length) { + const { exportClause } = platformServerExports[0] as ts.ExportDeclaration; + if (!exportClause) { + continue; + } + + exportSpecifiers = [...exportClause.elements]; + updateExisting = true; + } + + if (!hasRenderModule) { + exportSpecifiers.push(ts.createExportSpecifier( + undefined, + ts.createIdentifier('renderModule'), + )); + } + + if (!hasRenderModuleFactory) { + exportSpecifiers.push(ts.createExportSpecifier( + undefined, + ts.createIdentifier('renderModuleFactory'), + )); + } + + // Create a TS printer to get the text of the export node + const printer = ts.createPrinter(); + + const moduleSpecifier = ts.createStringLiteral('@angular/platform-server'); + + // TypeScript will emit the Node with double quotes. + // In schematics we usually write code with a single quotes + // tslint:disable-next-line: no-any + (moduleSpecifier as any).singleQuote = true; + + const newExportDeclarationText = printer.printNode( + ts.EmitHint.Unspecified, + ts.createExportDeclaration( + undefined, + undefined, + ts.createNamedExports(exportSpecifiers), + moduleSpecifier, + ), + source, + ); + + const recorder = tree.beginUpdate(mainFilePath); + if (updateExisting) { + const start = platformServerExports[0].getStart(); + const width = platformServerExports[0].getWidth(); + + recorder + .remove(start, width) + .insertLeft(start, newExportDeclarationText); + } else { + recorder.insertLeft(source.getWidth(), '\n' + newExportDeclarationText); + } + + tree.commitUpdate(recorder); + } + + return tree; + }; +} diff --git a/packages/schematics/angular/migrations/update-9/update-server-main-file_spec.ts b/packages/schematics/angular/migrations/update-9/update-server-main-file_spec.ts new file mode 100644 index 000000000000..517d8efa273d --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/update-server-main-file_spec.ts @@ -0,0 +1,108 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { tags } from '@angular-devkit/core'; +import { EmptyTree } from '@angular-devkit/schematics'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; + +const mainServerContent = tags.stripIndents` + import { enableProdMode } from '@angular/core'; + + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + + export { AppServerModule } from './app/app.server.module'; +`; + +const mainServerFile = 'src/main.server.ts'; + +describe('Migration to version 9', () => { + describe('Migrate Server Main File', () => { + const schematicRunner = new SchematicTestRunner( + 'migrations', + require.resolve('../migration-collection.json'), + ); + + let tree: UnitTestTree; + + beforeEach(async () => { + tree = new UnitTestTree(new EmptyTree()); + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'ng-new', + { + name: 'migration-test', + version: '1.2.3', + directory: '.', + }, + tree, + ) + .toPromise(); + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'universal', + { + clientProject: 'migration-test', + }, + tree, + ) + .toPromise(); + }); + + it(`should add exports from '@angular/platform-server'`, async () => { + tree.overwrite(mainServerFile, mainServerContent); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + expect(tree2.readContent(mainServerFile)).toContain(tags.stripIndents` + export { AppServerModule } from './app/app.server.module'; + export { renderModule, renderModuleFactory } from '@angular/platform-server'; + `); + }); + + it(`should add 'renderModule' and 'renderModuleFactory' to existing '@angular/platform-server' export`, async () => { + tree.overwrite(mainServerFile, tags.stripIndents` + ${mainServerContent} + export { platformDynamicServer } from '@angular/platform-server'; + export { PlatformConfig } from '@angular/platform-server'; + `); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + expect(tree2.readContent(mainServerFile)).toContain(tags.stripIndents` + export { AppServerModule } from './app/app.server.module'; + export { platformDynamicServer, renderModule, renderModuleFactory } from '@angular/platform-server'; + export { PlatformConfig } from '@angular/platform-server'; + `); + }); + + it(`should add 'renderModule' to existing '@angular/platform-server' export`, async () => { + tree.overwrite(mainServerFile, tags.stripIndents` + ${mainServerContent} + export { platformDynamicServer, renderModuleFactory } from '@angular/platform-server'; + `); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + expect(tree2.readContent(mainServerFile)).toContain(tags.stripIndents` + export { AppServerModule } from './app/app.server.module'; + export { platformDynamicServer, renderModuleFactory, renderModule } from '@angular/platform-server'; + `); + }); + + it(`should not update exports when 'renderModule' and 'renderModuleFactory' are already exported`, async () => { + const input = tags.stripIndents` + ${mainServerContent} + export { renderModule, renderModuleFactory } from '@angular/platform-server'; + `; + + tree.overwrite(mainServerFile, input); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + expect(tree2.readContent(mainServerFile)).toBe(input); + }); + }); +}); From bcbbd1b8caa8bcea479c8fdafc85301827ba340a Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 9 Sep 2019 15:42:59 +0200 Subject: [PATCH 0129/1070] refactor(@schematics/angular): deprecate options that are unused --- .../schematics/angular/app-shell/schema.json | 21 ++++++++++++------- .../schematics/angular/universal/schema.json | 6 ++++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index 7e67257382ef..78cfb3e741f2 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -23,7 +23,8 @@ "name": { "type": "string", "format": "html-selector", - "description": "The HTML selector of the Universal app" + "description": "The HTML selector of the Universal app", + "x-deprecated": "This option has no effect." }, "appId": { "type": "string", @@ -35,19 +36,22 @@ "type": "string", "format": "path", "description": "The output directory for build results.", - "default": "dist-server" + "default": "dist-server", + "x-deprecated": "This option has no effect." }, "root": { "type": "string", "format": "path", "description": "The root directory of the app.", - "default": "src" + "default": "src", + "x-deprecated": "This option has no effect." }, "index": { "type": "string", "format": "path", "description": "The name of the index file", - "default": "index.html" + "default": "index.html", + "x-deprecated": "This option has no effect." }, "main": { "type": "string", @@ -58,7 +62,8 @@ "test": { "type": "string", "format": "path", - "description": "The name of the test entry-point file." + "description": "The name of the test entry-point file.", + "x-deprecated": "This option has no effect." }, "tsconfigFileName": { "type": "string", @@ -70,7 +75,8 @@ "type": "string", "format": "path", "description": "The name of the TypeScript configuration file for tests.", - "default": "tsconfig.spec" + "default": "tsconfig.spec", + "x-deprecated": "This option has no effect." }, "appDir": { "type": "string", @@ -95,7 +101,8 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "D" + "alias": "D", + "x-deprecated": "This option has no effect." } }, "required": [ diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index da5b760b9896..a6c0ceb7e835 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -24,7 +24,8 @@ "test": { "type": "string", "format": "path", - "description": "The name of the test entry-point file." + "description": "The name of the test entry-point file.", + "x-deprecated": "This option has no effect." }, "tsconfigFileName": { "type": "string", @@ -35,7 +36,8 @@ "type": "string", "format": "path", "description": "The name of the TypeScript configuration file for tests.", - "default": "tsconfig.spec" + "default": "tsconfig.spec", + "x-deprecated": "This option has no effect." }, "appDir": { "type": "string", From cabf57d3c9d679731a273e18a755f2056b3a09bd Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 28 Aug 2019 08:13:28 +0200 Subject: [PATCH 0130/1070] docs(@schematics/angular): improve description of the route parameter --- packages/schematics/angular/module/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/module/schema.json b/packages/schematics/angular/module/schema.json index 2f509c5c57fe..2ca9e87a779f 100644 --- a/packages/schematics/angular/module/schema.json +++ b/packages/schematics/angular/module/schema.json @@ -41,7 +41,7 @@ }, "route": { "type": "string", - "description": "Creates lazy loaded routing module. Requires --module option." + "description": "The route path for the lazy loaded module. Requires --module option." }, "flat": { "type": "boolean", From 3fc86b7ff50286324655be2a749ba05dc010758d Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 10 Sep 2019 19:07:44 +0200 Subject: [PATCH 0131/1070] Merge pull request #15530 from alan-agius4/protractor_base_url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(@angular-devkit/build-angular): add trailing back slash to protr… --- .../angular_devkit/build_angular/src/protractor/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/protractor/index.ts b/packages/angular_devkit/build_angular/src/protractor/index.ts index 3899946c4ab8..2ae7bda8bec7 100644 --- a/packages/angular_devkit/build_angular/src/protractor/index.ts +++ b/packages/angular_devkit/build_angular/src/protractor/index.ts @@ -139,6 +139,12 @@ async function execute( } } + // Like the baseUrl in protractor config file when using the API we need to add + // a trailing slash when provide to the baseUrl. + if (baseUrl && !baseUrl.endsWith('/')) { + baseUrl += '/'; + } + try { return await runProtractor(context.workspaceRoot, { ...options, baseUrl }); } catch { From b204dd8dcee51a084d65219c67a3e1066f8e388a Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Tue, 10 Sep 2019 10:09:00 -0700 Subject: [PATCH 0132/1070] ci: update saucelabs protractor config to run e2e tests in series rather than parallel (#15545) --- tests/legacy-cli/e2e/assets/protractor-saucelabs.conf.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/legacy-cli/e2e/assets/protractor-saucelabs.conf.js b/tests/legacy-cli/e2e/assets/protractor-saucelabs.conf.js index 01651880f517..c7208b1f6a81 100644 --- a/tests/legacy-cli/e2e/assets/protractor-saucelabs.conf.js +++ b/tests/legacy-cli/e2e/assets/protractor-saucelabs.conf.js @@ -101,6 +101,9 @@ exports.config = { }, ], + // Only allow one session at a time to prevent over saturation of Saucelabs sessions. + maxSessions: 1, + baseUrl: 'http://localhost:2000/', framework: 'jasmine', jasmineNodeOpts: { From fcea2443aaa7ab25bdbde0b7efff9cbb29ef95e6 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 9 Sep 2019 20:41:01 +0200 Subject: [PATCH 0133/1070] fix(@schematics/angular): lazy loading module generation routing module lookup Fixes: #15552 --- packages/schematics/angular/module/index.ts | 27 ++++---- .../schematics/angular/module/index_spec.ts | 62 ++++++++++++++++--- .../schematics/angular/utility/find-module.ts | 4 +- 3 files changed, 65 insertions(+), 28 deletions(-) diff --git a/packages/schematics/angular/module/index.ts b/packages/schematics/angular/module/index.ts index 83f5c5f67156..7c72e37962e2 100644 --- a/packages/schematics/angular/module/index.ts +++ b/packages/schematics/angular/module/index.ts @@ -23,7 +23,7 @@ import { import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript'; import { addImportToModule, addRouteDeclarationToModule } from '../utility/ast-utils'; import { InsertChange } from '../utility/change'; -import { buildRelativePath, findModuleFromOptions } from '../utility/find-module'; +import { MODULE_EXT, ROUTING_MODULE_EXT, buildRelativePath, findModuleFromOptions } from '../utility/find-module'; import { applyLintFix } from '../utility/lint-fix'; import { parseName } from '../utility/parse-name'; import { createDefaultPath } from '../utility/workspace'; @@ -112,17 +112,12 @@ function addRouteDeclarationToNgModule( }; } -function getRoutingModulePath(host: Tree, options: ModuleOptions): Path | undefined { - let path: Path | undefined; - const modulePath = options.module as string; - const routingModuleName = modulePath.split('.')[0] + '-routing'; - const { module, ...rest } = options; +function getRoutingModulePath(host: Tree, modulePath: string): Path | undefined { + const routingModulePath = modulePath.endsWith(ROUTING_MODULE_EXT) + ? modulePath + : modulePath.replace(MODULE_EXT, ROUTING_MODULE_EXT); - try { - path = findModuleFromOptions(host, { module: routingModuleName, ...rest }); - } catch {} - - return path; + return host.exists(routingModulePath) ? normalize(routingModulePath) : undefined; } function buildRoute(options: ModuleOptions, modulePath: string) { @@ -143,17 +138,17 @@ export default function (options: ModuleOptions): Rule { options.module = findModuleFromOptions(host, options); } - const parsedPath = parseName(options.path, options.name); - options.name = parsedPath.name; - options.path = parsedPath.path; - let routingModulePath: Path | undefined; const isLazyLoadedModuleGen = options.route && options.module; if (isLazyLoadedModuleGen) { options.routingScope = RoutingScope.Child; - routingModulePath = getRoutingModulePath(host, options); + routingModulePath = getRoutingModulePath(host, options.module as string); } + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; + const templateSource = apply(url('./files'), [ options.routing || isLazyLoadedModuleGen && !!routingModulePath ? noop() diff --git a/packages/schematics/angular/module/index_spec.ts b/packages/schematics/angular/module/index_spec.ts index bfa99e9ab007..8cd9f1c62c21 100644 --- a/packages/schematics/angular/module/index_spec.ts +++ b/packages/schematics/angular/module/index_spec.ts @@ -10,6 +10,7 @@ import { Schema as ApplicationOptions } from '../application/schema'; import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as ModuleOptions } from './schema'; +// tslint:disable-next-line: no-big-function describe('Module Schematic', () => { const schematicRunner = new SchematicTestRunner( '@schematics/angular', @@ -129,11 +130,13 @@ describe('Module Schematic', () => { const tree = await schematicRunner.runSchematicAsync('module', options, appTree).toPromise(); const files = tree.files; - expect(files).toContain('/projects/bar/src/app/foo/foo.module.ts'); - expect(files).toContain('/projects/bar/src/app/foo/foo-routing.module.ts'); - expect(files).toContain('/projects/bar/src/app/foo/foo.component.ts'); - expect(files).toContain('/projects/bar/src/app/foo/foo.component.html'); - expect(files).toContain('/projects/bar/src/app/foo/foo.component.css'); + expect(files).toEqual(jasmine.arrayContaining([ + '/projects/bar/src/app/foo/foo.module.ts', + '/projects/bar/src/app/foo/foo-routing.module.ts', + '/projects/bar/src/app/foo/foo.component.ts', + '/projects/bar/src/app/foo/foo.component.html', + '/projects/bar/src/app/foo/foo.component.css', + ])); const appRoutingModuleContent = tree.readContent('/projects/bar/src/app/app-routing.module.ts'); expect(appRoutingModuleContent).toMatch( @@ -196,16 +199,55 @@ describe('Module Schematic', () => { ).toPromise(); const files = tree.files; - expect(files).toContain('/projects/bar/src/app/foo.module.ts'); - expect(files).toContain('/projects/bar/src/app/foo-routing.module.ts'); - expect(files).toContain('/projects/bar/src/app/foo.component.ts'); - expect(files).toContain('/projects/bar/src/app/foo.component.html'); - expect(files).toContain('/projects/bar/src/app/foo.component.css'); + expect(files).toEqual(jasmine.arrayContaining([ + '/projects/bar/src/app/foo.module.ts', + '/projects/bar/src/app/foo-routing.module.ts', + '/projects/bar/src/app/foo.component.ts', + '/projects/bar/src/app/foo.component.html', + '/projects/bar/src/app/foo.component.css', + ])); const appRoutingModuleContent = tree.readContent('/projects/bar/src/app/app-routing.module.ts'); expect(appRoutingModuleContent).toMatch( /path: '\/new-route', loadChildren: \(\) => import\('.\/foo.module'\).then\(m => m.FooModule\)/, ); }); + + it('should generate a lazy loaded module and add route in another parallel routing module', async () => { + await schematicRunner.runSchematicAsync( + 'module', + { + ...defaultOptions, + name: 'foo', + routing: true, + }, + appTree, + ).toPromise(); + + const tree = await schematicRunner.runSchematicAsync( + 'module', + { + ...defaultOptions, + name: 'bar', + module: 'foo', + route: 'new-route', + }, + appTree, + ).toPromise(); + + expect(tree.files).toEqual(jasmine.arrayContaining([ + '/projects/bar/src/app/foo/foo-routing.module.ts', + '/projects/bar/src/app/foo/foo.module.ts', + '/projects/bar/src/app/bar/bar-routing.module.ts', + '/projects/bar/src/app/bar/bar.module.ts', + '/projects/bar/src/app/bar/bar.component.ts', + ])); + + const barRoutingModuleContent = tree.readContent('/projects/bar/src/app/bar/bar-routing.module.ts'); + expect(barRoutingModuleContent).toContain(`path: '', component: BarComponent `); + + const fooRoutingModuleContent = tree.readContent('/projects/bar/src/app/foo/foo-routing.module.ts'); + expect(fooRoutingModuleContent).toContain(`loadChildren: () => import('../bar/bar.module').then(m => m.BarModule)`); + }); }); }); diff --git a/packages/schematics/angular/utility/find-module.ts b/packages/schematics/angular/utility/find-module.ts index 329b9f445e6f..cc9225289941 100644 --- a/packages/schematics/angular/utility/find-module.ts +++ b/packages/schematics/angular/utility/find-module.ts @@ -26,8 +26,8 @@ export interface ModuleOptions { routingModuleExt?: string; } -const MODULE_EXT = '.module.ts'; -const ROUTING_MODULE_EXT = '-routing.module.ts'; +export const MODULE_EXT = '.module.ts'; +export const ROUTING_MODULE_EXT = '-routing.module.ts'; /** * Find the module referred by a set of options passed to the schematics. From 87d2223c49530c8e81276d4bd19afff14d9f9fca Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 10 Sep 2019 19:10:03 +0200 Subject: [PATCH 0134/1070] Merge pull request #15559 from alan-agius4/main-server-file-option fix(@schematics/angular): infer main server file name from main option --- .../universal/files/root/__tsconfigFileName__.json.template | 2 +- packages/schematics/angular/universal/index.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template b/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template index c62101e0cd14..e960e9a8f385 100644 --- a/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template +++ b/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template @@ -5,7 +5,7 @@ "module": "commonjs" }, "files": [ - "src/main.server.ts" + "src/<%= stripTsExtension(main) %>.ts" ], "angularCompilerOptions": { "entryModule": "./<%= rootInSrc ? '' : 'src/' %><%= appDir %>/<%= stripTsExtension(rootModuleFileName) %>#<%= rootModuleClassName %>" diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index e6e9a263b89b..9d52c9a68eb6 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -49,12 +49,13 @@ function updateConfigFile(options: UniversalOptions, tsConfigDirectory: Path): R fileReplacements = buildTarget.configurations.production.fileReplacements; } + const mainPath = options.main as string; clientProject.targets.add({ name: 'server', builder: Builders.Server, options: { outputPath: `dist/${options.clientProject}-server`, - main: join(normalize(clientProject.root), 'src/main.server.ts'), + main: join(normalize(clientProject.root), 'src', mainPath.endsWith('.ts') ? mainPath : mainPath + '.ts'), tsConfig: join(tsConfigDirectory, `${options.tsconfigFileName}.json`), }, configurations: { From f6fa3d74675027ef5666b80e65956edfe2ef5c4f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 10 Sep 2019 17:02:40 +0000 Subject: [PATCH 0135/1070] build: update @angular/animations to version --- .../angular_devkit/build_angular/package.json | 4 ++-- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- yarn.lock | 16 +++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 0d11bae68096..01e091c981e0 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -66,13 +66,13 @@ }, "devDependencies": { "@angular/animations": "~9.0.0-next.4", - "@angular/cdk": "~8.1.0", + "@angular/cdk": "~8.2.0", "@angular/common": "~9.0.0-next.4", "@angular/compiler": "~9.0.0-next.4", "@angular/compiler-cli": "~9.0.0-next.4", "@angular/core": "~9.0.0-next.4", "@angular/forms": "~9.0.0-next.4", - "@angular/material": "~8.1.0", + "@angular/material": "~8.2.0", "@angular/platform-browser": "~9.0.0-next.4", "@angular/platform-browser-dynamic": "~9.0.0-next.4", "@angular/platform-server": "~9.0.0-next.4", diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index b81fba23311f..33f403cf061b 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#434ccdeb1b2bbaeeb38b3f3c0f77606801596b1f", - "@angular/common": "github:angular/common-builds#c65c82f450752da0ff6982f5a8169dd3f1c82dbc", - "@angular/compiler": "github:angular/compiler-builds#59e50a3624bfcfe9dd6248712396a8dcfecb3100", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#a93a224f02bdad4f6b7e7d21608a24e46bd9917e", - "@angular/core": "github:angular/core-builds#530a74c2e095ce0f1f63a41ad3ff53ec49ee696f", - "@angular/forms": "github:angular/forms-builds#bdfdc24ba99b0f51e62b74fb12dc98c0d39480b9", - "@angular/language-service": "github:angular/language-service-builds#8dd87fe8ad9efcf8ebd1cd586bd1afd4bf70fcc5", - "@angular/platform-browser": "github:angular/platform-browser-builds#09055bffe035973b40bdf3faa1b779967fe2e773", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#96d3653d152c5f274d07a97ae871ee81ec2f5a42", - "@angular/router": "github:angular/router-builds#78c56edf33995651c543ad6934d06bd729c0cb7a" + "@angular/animations": "github:angular/animations-builds#3b2b10e6be0b05159fbaaec23337b66bf357ea9e", + "@angular/common": "github:angular/common-builds#0729ad096f5793514530f91d42b779cd7963146f", + "@angular/compiler": "github:angular/compiler-builds#b3770482d53f7ba20464f3544f454e0dd2f513cb", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#61ceaeb0babefc3a61f0f439d585ff170ce2a7c1", + "@angular/core": "github:angular/core-builds#f7fa406cbc8a78c6ea1f0ed6ea758b72f195ac7d", + "@angular/forms": "github:angular/forms-builds#4840058426232b60397177496eacac4b68cf282b", + "@angular/language-service": "github:angular/language-service-builds#db1b88a38921eb975a66a8e61427e94c408088d2", + "@angular/platform-browser": "github:angular/platform-browser-builds#2be89ef7f066d8483e4982b641525dd21f1635d6", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#36b60be32cb3a6887aae4285e06bebb266627959", + "@angular/router": "github:angular/router-builds#7a1eb7778711b4f650b79d1b4cdc079a891db05a" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index b510d48ac337..b6d062f9839e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,10 +9,10 @@ dependencies: tslib "^1.9.0" -"@angular/cdk@~8.1.0": - version "8.1.3" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.1.3.tgz#c791b4ae950bd015c4f618204e4f974e2dd64254" - integrity sha512-+DOS6x05/nNdnoRmEi3bgQxKym34PeCRGD6dimdw0l7ZgM57qhlaBWo0dXB7QSyR9E44uVT91e4h8ye+/ne1DQ== +"@angular/cdk@~8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.2.0.tgz#fe183aaf9907421086e413a80af6ec0995983a9d" + integrity sha512-vsjKiUirICP9fTxnBT3jjqW14ipZLJPkyT3dKZQETKcml1fTY1L9QVXclvLTeUliuPSl490anuBvpQpfMeJDhQ== dependencies: tslib "^1.7.1" optionalDependencies: @@ -62,10 +62,10 @@ dependencies: tslib "^1.9.0" -"@angular/material@~8.1.0": - version "8.1.3" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.1.3.tgz#1e65a6e02196348413cb073da3255771116c7618" - integrity sha512-qZVWrJ/EO1y0lJCy7pe536RlYiih3p3fQzj7tgus7JdOpspyF+zBLzn8gNrdAFACXpVWwq2kLorieoR3BB47ZQ== +"@angular/material@~8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.2.0.tgz#a99bbe5347ef0197bc4ad29228798608a62308aa" + integrity sha512-4EY3QilEXS09+10WYwkunEltReuPDByb2ulWw2FLG3wpmMpCp4p6AKY9v9xS3sGvb708S0b9vlfLG4FbepmBbA== dependencies: tslib "^1.7.1" From b9f69d67965f72662567b265b734366c94a48d6d Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 9 Sep 2019 20:09:19 -0400 Subject: [PATCH 0136/1070] fix(@angular-devkit/build-angular): fully optimize script bundles with bundle downleveling This also allows terser to perform ECMA 6 level compress optimizations on the actual application bundles (non-script bundles) which can provide for further size improvements. Fixes #15507 --- .../models/webpack-configs/common.ts | 90 +++++++++++-------- 1 file changed, 55 insertions(+), 35 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index f1afa09e3ed1..14abb7a5ffa0 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -18,6 +18,7 @@ import { Configuration, ContextReplacementPlugin, HashedModuleIdsPlugin, + compilation, debug, } from 'webpack'; import { RawSource } from 'webpack-sources'; @@ -146,34 +147,34 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { const hashFormat = getOutputHashFormat(buildOptions.outputHashing || 'none'); // process global scripts - if (buildOptions.scripts.length > 0) { - const globalScriptsByBundleName = normalizeExtraEntryPoints( - buildOptions.scripts, - 'scripts', - ).reduce((prev: { bundleName: string; paths: string[]; inject: boolean }[], curr) => { - const bundleName = curr.bundleName; - const resolvedPath = path.resolve(root, curr.input); - const existingEntry = prev.find(el => el.bundleName === bundleName); - if (existingEntry) { - if (existingEntry.inject && !curr.inject) { - // All entries have to be lazy for the bundle to be lazy. - throw new Error( - `The ${curr.bundleName} bundle is mixing injected and non-injected scripts.`, - ); - } - - existingEntry.paths.push(resolvedPath); - } else { - prev.push({ - bundleName, - paths: [resolvedPath], - inject: curr.inject, - }); + const globalScriptsByBundleName = normalizeExtraEntryPoints( + buildOptions.scripts, + 'scripts', + ).reduce((prev: { bundleName: string; paths: string[]; inject: boolean }[], curr) => { + const bundleName = curr.bundleName; + const resolvedPath = path.resolve(root, curr.input); + const existingEntry = prev.find(el => el.bundleName === bundleName); + if (existingEntry) { + if (existingEntry.inject && !curr.inject) { + // All entries have to be lazy for the bundle to be lazy. + throw new Error( + `The ${curr.bundleName} bundle is mixing injected and non-injected scripts.`, + ); } - return prev; - }, []); + existingEntry.paths.push(resolvedPath); + } else { + prev.push({ + bundleName, + paths: [resolvedPath], + inject: curr.inject, + }); + } + + return prev; + }, []); + if (globalScriptsByBundleName.length > 0) { // Add a new asset for each entry. globalScriptsByBundleName.forEach(script => { // Lazy scripts don't get a hash, otherwise they can't be loaded by name. @@ -321,8 +322,8 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { if (buildOptions.aot) { // Also try to load AOT-only global definitions. - const GLOBAL_DEFS_FOR_TERSER_WITH_AOT = - require('@angular/compiler-cli').GLOBAL_DEFS_FOR_TERSER_WITH_AOT; + const GLOBAL_DEFS_FOR_TERSER_WITH_AOT = require('@angular/compiler-cli') + .GLOBAL_DEFS_FOR_TERSER_WITH_AOT; if (GLOBAL_DEFS_FOR_TERSER_WITH_AOT) { angularGlobalDefinitions = { ...angularGlobalDefinitions, @@ -332,17 +333,10 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { } const terserOptions = { - // Use 5 if using bundle downleveling to ensure script bundles do not use ES2015+ features - // Script bundles are shared for differential loading - // Bundle processing will use the ES2015+ optimizations on the ES2015 bundles - ecma: - wco.supportES2015 && - (!differentialLoadingNeeded || (differentialLoadingNeeded && fullDifferential)) - ? 6 - : 5, warnings: !!buildOptions.verbose, safari10: true, output: { + ecma: wco.supportES2015 ? 6 : 5, comments: false, webkit: true, }, @@ -351,10 +345,12 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { compress: buildOptions.platform == 'server' ? { + ecma: wco.supportES2015 ? 6 : 5, global_defs: angularGlobalDefinitions, keep_fnames: true, } : { + ecma: wco.supportES2015 ? 6 : 5, pure_getters: buildOptions.buildOptimizer, // PURE comments work best with 3 passes. // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. @@ -375,8 +371,32 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { parallel: true, cache: true, extractComments: false, + chunkFilter: (chunk: compilation.Chunk) => + !globalScriptsByBundleName.some(s => s.bundleName === chunk.name), terserOptions, }), + // Script bundles are fully optimized here in one step since they are never downleveled. + // They are shared between ES2015 & ES5 outputs so must support ES5. + new TerserPlugin({ + sourceMap: scriptsSourceMap, + parallel: true, + cache: true, + extractComments: false, + chunkFilter: (chunk: compilation.Chunk) => + globalScriptsByBundleName.some(s => s.bundleName === chunk.name), + terserOptions: { + ...terserOptions, + compress: { + ...terserOptions.compress, + ecma: 5, + }, + output: { + ...terserOptions.output, + ecma: 5, + }, + mangle: !manglingDisabled && buildOptions.platform !== 'server', + }, + }), ); } From c52d475e4d7c367fc8ff81a6c4fc7567d3beef0c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 10 Sep 2019 21:32:09 -0400 Subject: [PATCH 0137/1070] ci: update lock workflow to latest action release --- .github/workflows/lock-closed.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml index 323ce1f43d0e..d668d5fd21cd 100644 --- a/.github/workflows/lock-closed.yml +++ b/.github/workflows/lock-closed.yml @@ -9,7 +9,6 @@ jobs: lock_closed: runs-on: ubuntu-latest steps: - - uses: angular/dev-infra/github-actions/lock-closed@7f7ef07 + - uses: angular/dev-infra/github-actions/lock-closed@a4fd924 with: lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }} - locks-per-execution: 100 From 57bca4db8986b07ec2a8ea9d930f7df8f3ab319b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 10 Sep 2019 19:06:14 +0000 Subject: [PATCH 0138/1070] build: update @bazel/bazel to version 0.29.0 --- WORKSPACE | 10 ++++---- package.json | 8 +++---- yarn.lock | 68 ++++++++++++++++++++++++++-------------------------- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index ebdc586e4f9d..9295bfa4d75b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") http_archive( name = "build_bazel_rules_nodejs", - sha256 = "3356c6b767403392bab018ce91625f6d15ff8f11c6d772dc84bc9cada01c669a", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.36.1/rules_nodejs-0.36.1.tar.gz"], + sha256 = "0d9660cf0894f1fe1e9840818553e0080fbce0851169812d77a70bdb9981c946", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.37.0/rules_nodejs-0.37.0.tar.gz"], ) # We use protocol buffers for the Build Event Protocol @@ -111,9 +111,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "668bb7a8600e50e8e6a58effc15f86b7291475c9a467b7b92c8c6e1513000418", - strip_prefix = "bazel-toolchains-0.28.6", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.28.6.tar.gz", + sha256 = "a019fbd579ce5aed0239de865b2d8281dbb809efd537bf42e0d366783e8dec65", + strip_prefix = "bazel-toolchains-0.29.2", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.2.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") diff --git a/package.json b/package.json index 29d8bb70ffb6..b12fbe6bfc0e 100644 --- a/package.json +++ b/package.json @@ -82,11 +82,11 @@ "devDependencies": { "@angular/compiler": "~9.0.0-next.4", "@angular/compiler-cli": "~9.0.0-next.4", - "@bazel/bazel": "0.28.1", + "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.28.0", - "@bazel/jasmine": "0.36.1", - "@bazel/karma": "0.36.1", - "@bazel/typescript": "0.36.1", + "@bazel/jasmine": "0.37.0", + "@bazel/karma": "0.37.0", + "@bazel/typescript": "0.37.0", "@types/browserslist": "^4.4.0", "@types/caniuse-lite": "^1.0.0", "@types/clean-css": "^4.2.1", diff --git a/yarn.lock b/yarn.lock index b6d062f9839e..db237bc77133 100644 --- a/yarn.lock +++ b/yarn.lock @@ -772,31 +772,31 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@bazel/bazel-darwin_x64@0.28.1": - version "0.28.1" - resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.28.1.tgz#415658785e1dbd6f7ab5c8f2b98c1c99c614e1d5" - integrity sha512-VDKWmplAfa4uCAbkIQ5nRn04MFQqtsPNuc2HkluJ8OIum773yC2dPR+OlLBKxrlBuKJYB27TtbOwOa6w/uK7aw== - -"@bazel/bazel-linux_x64@0.28.1": - version "0.28.1" - resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.28.1.tgz#f78006089e17660261088272a0e04fc886572e34" - integrity sha512-n4XfNxagYhejQD32V4XSxT/qzuH1l/2jxslbKSak66/uQ+wad8Ew9rjNb4JUin3xtrfFtzmxx2jpQkybZsRVGA== - -"@bazel/bazel-win32_x64@0.28.1": - version "0.28.1" - resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.28.1.tgz#60a2819618cf7582cc35ac16c01763a5e807b414" - integrity sha512-T4xksGfKikaHS4zxnGT6r5R436mz9j2lz//L1vc5sJnaEF/1e2Gv6MLl86vfZW2Xxo6iIEi6ntSzgYxP2Blohw== - -"@bazel/bazel@0.28.1": - version "0.28.1" - resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.28.1.tgz#3a6b9b7a74d566c66805242ccaa2f907592b5bff" - integrity sha512-s4bn5/vegEec66l15ZjyUe4jNybQ5J/cg9gFzR5f8deKj8lM+2WtCfvTLO3XfUe2pbrB4BG7C31jpyFPOC+6aw== +"@bazel/bazel-darwin_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.29.0.tgz#d2ebcb95bc66031b0545dd8b0e597b3aa5b9024b" + integrity sha512-q6snNakVA3wzv3VIuFlsw3/xcB/ygsAMhkigsuZXv1yHmwnuBOI4UJ2r2+Ttc4HPHflS0aWuI/raHDq81vBYKw== + +"@bazel/bazel-linux_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.29.0.tgz#95250ad8463425bec81a95736056f432c186cb9d" + integrity sha512-QxWdtlsFKMi3SJ++osjA8QQbWOlGZXU0/TtUTiswsRwWdOEwZhOa2c1ljIQY5QBgzc3CCh2clRnkjWQj0/V/Dw== + +"@bazel/bazel-win32_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.29.0.tgz#62af30d4ccf0a31e656a6ac9337e928d29a4598d" + integrity sha512-r0DhNarJrzzcXrvRbey43hGVO4J2QBAS43VrgjrxVw+1kyjKkIOQIh3wKr/OKx2jKOX0y3hCrLpL/aivHqub4g== + +"@bazel/bazel@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.29.0.tgz#bf4ecf47d6e67e8df8d342d24c146bd732d78640" + integrity sha512-OBxPv+V73PtADVG4qsGJ7Zj0wJrJorRbHgYE8qsRBNKls6e6rf0jkjSIQvAvP1Dyt7x4MGyhIzzK/5IsPeQZIA== dependencies: "@bazel/hide-bazel-files" latest optionalDependencies: - "@bazel/bazel-darwin_x64" "0.28.1" - "@bazel/bazel-linux_x64" "0.28.1" - "@bazel/bazel-win32_x64" "0.28.1" + "@bazel/bazel-darwin_x64" "0.29.0" + "@bazel/bazel-linux_x64" "0.29.0" + "@bazel/bazel-win32_x64" "0.29.0" "@bazel/buildifier-darwin_x64@0.28.0": version "0.28.0" @@ -827,19 +827,19 @@ resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.36.0.tgz#3fb7c7c5f579f46dd1efd1b3890f11351aa8e65c" integrity sha512-RgJWR1rOgyU4smruUK3MFA06DKt3AFCcfi9L8u/h11EjOrfLJgnzBJIGDXvW2zzhgnEJ9RRafOUHKN6blDksGg== -"@bazel/jasmine@0.36.1": - version "0.36.1" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.36.1.tgz#2069f8deb52a6ee206926936dbfd6829228962c2" - integrity sha512-gXCOeiHWNZzClMmYbKvdhS1ZC62inM2e+/w/Z0kOKDFSoSE9GnC6NuIK4vFlDOPjx0vGy2+ZCb/tezrgpqhp2A== +"@bazel/jasmine@0.37.0": + version "0.37.0" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.37.0.tgz#8463e5d26cfcdb7f76865bf80c7b88a77b6eecb2" + integrity sha512-R6QiX4l1xb4Xl0croK0hdZqM8vjfAoFGXYekPeueWzw+/A1l2LMiMIye82qQbmaXihKcQvOVG/8CDWEEtMfVbQ== dependencies: jasmine "~3.4.0" jasmine-core "~3.4.0" v8-coverage "1.0.9" -"@bazel/karma@0.36.1": - version "0.36.1" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.36.1.tgz#3d6e5e8772d2d2799d0b301020c1483ed3fe5de1" - integrity sha512-2zSW12BBJEqV1QYhPiwfTmObKCeyq3Gdox1b+2eYbyNw2HBlCHhWJs0FquGo63LLBn9XZhhk2H2IQmwhUOhx+w== +"@bazel/karma@0.37.0": + version "0.37.0" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.37.0.tgz#e420e32f4309fa28a980ee47072865b2aa3cb858" + integrity sha512-XBQpEVyQCYNlN6bzz+1AGLBLCCd4CAvlp7ubklLGCFXuFKOnvU/ADaN0t/t7V3Pjx+uZqgAHamOFQla+21UXDg== dependencies: jasmine-core "2.8.0" karma "^4.0.0" @@ -853,10 +853,10 @@ semver "5.6.0" tmp "0.0.33" -"@bazel/typescript@0.36.1": - version "0.36.1" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.36.1.tgz#de7994ed8eec90e0593525f62060a302fcf49ef1" - integrity sha512-TvItSk/aGakCmbrxTnbydKxq7bfYzMKqk9tNwHCzC8KqtTTyNuGTHisjqixw8G6jeSrms6vIkfH9YpYw9OHzRQ== +"@bazel/typescript@0.37.0": + version "0.37.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.37.0.tgz#9213d963cf132db614a9780b87815cda256a3e14" + integrity sha512-4Pz5x87ihPjKQxo/XMfFXJeGHiNEOdaIqLOqzuIXbwczJvMxPKMwnXzikr9XkjHrHs26zZo4iMtXALqW2j7C5w== dependencies: protobufjs "6.8.8" semver "5.6.0" From 05a4280e96940782f95f1c2597558581c25df4ac Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 11 Sep 2019 20:07:47 +0300 Subject: [PATCH 0139/1070] Merge pull request #15574 from renovate-bot/renovate/angular build: update @angular/animations to version --- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 33f403cf061b..8e8bc1cfba50 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#3b2b10e6be0b05159fbaaec23337b66bf357ea9e", - "@angular/common": "github:angular/common-builds#0729ad096f5793514530f91d42b779cd7963146f", - "@angular/compiler": "github:angular/compiler-builds#b3770482d53f7ba20464f3544f454e0dd2f513cb", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#61ceaeb0babefc3a61f0f439d585ff170ce2a7c1", - "@angular/core": "github:angular/core-builds#f7fa406cbc8a78c6ea1f0ed6ea758b72f195ac7d", - "@angular/forms": "github:angular/forms-builds#4840058426232b60397177496eacac4b68cf282b", - "@angular/language-service": "github:angular/language-service-builds#db1b88a38921eb975a66a8e61427e94c408088d2", - "@angular/platform-browser": "github:angular/platform-browser-builds#2be89ef7f066d8483e4982b641525dd21f1635d6", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#36b60be32cb3a6887aae4285e06bebb266627959", - "@angular/router": "github:angular/router-builds#7a1eb7778711b4f650b79d1b4cdc079a891db05a" + "@angular/animations": "github:angular/animations-builds#400e3b7b9002fd03c104fc41bbf2f7da48d65ce4", + "@angular/common": "github:angular/common-builds#658ba4451a93c239804ef76afeeb0601b4b82140", + "@angular/compiler": "github:angular/compiler-builds#c133f4b7c727e39eb6c9c8d4405642511395a5ec", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#fa897a47e6de4018e6dab20be48ad32a6c766060", + "@angular/core": "github:angular/core-builds#8f1daaa80dd025baf338b45bd817fbc340323f30", + "@angular/forms": "github:angular/forms-builds#ca5e8f03bad481ae24eab3dcf32aff0ac62e425a", + "@angular/language-service": "github:angular/language-service-builds#cffc78e2ed454a5f9641ca925a6b18fd40c44038", + "@angular/platform-browser": "github:angular/platform-browser-builds#000295ed030f21459fddf0d112889002c1ba6db3", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#a74450b34b22b2a5cd8898772bda36bed74a993b", + "@angular/router": "github:angular/router-builds#6bacca23cdce73ccd20f79280920b1558a55cd53" } } \ No newline at end of file From a8e19c2e984757761aca5a435dc0ac7325f6a883 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Wed, 11 Sep 2019 13:07:59 -0400 Subject: [PATCH 0140/1070] build: update minimum npm/yarn engine versions for built packages (#15567) The `peerDependenciesMeta` package.json field is becoming increasingly prevalent. The minimum versions in this change provide support for the field and mitigate incorrect peer dependency warnings for end users. npm: https://github.com/npm/cli/blob/fc5fc76182c0746433c84a7208877fb70ef62352/CHANGELOG.md#v6110-2019-08-20 yarn: https://github.com/yarnpkg/yarn/blob/53d8004229f543f342833310d5af63a4b6e59c8a/CHANGELOG.md#1130 pnpm: https://github.com/pnpm/pnpm/releases/tag/v3.2.0 --- lib/packages.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/packages.ts b/lib/packages.ts index 4d69ecb81098..b5db90ea96e3 100644 --- a/lib/packages.ts +++ b/lib/packages.ts @@ -83,7 +83,9 @@ function loadPackageJson(p: string) { case 'engines': pkg['engines'] = { 'node': '>= 10.9.0', - 'npm': '>= 6.2.0', + 'npm': '>= 6.11.0', + 'pnpm': '>= 3.2.0', + 'yarn': '>= 1.13.0', }; break; From 2a689ff3ca3133bc9c938beef82bacb1c1f7eb19 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 10 Sep 2019 13:16:43 -0400 Subject: [PATCH 0141/1070] feat(@angular-devkit/core): auto discover multiselect schema prompt types If a prompt is present on a schema property and the type is an array with a set of enum values, then the prompt type is a list with multiselect capabilites. This eliminates the need to specify the longhand form for typical multiselect prompts. --- .../angular_devkit/core/src/_golden-api.d.ts | 2 +- .../core/src/json/schema/interface.ts | 2 +- .../core/src/json/schema/prompt_spec.ts | 83 ++++++++++++++++++- .../core/src/json/schema/registry.ts | 60 ++++++++------ 4 files changed, 119 insertions(+), 28 deletions(-) diff --git a/etc/api/angular_devkit/core/src/_golden-api.d.ts b/etc/api/angular_devkit/core/src/_golden-api.d.ts index 68800d4aacad..6cc16a5bdb55 100644 --- a/etc/api/angular_devkit/core/src/_golden-api.d.ts +++ b/etc/api/angular_devkit/core/src/_golden-api.d.ts @@ -798,7 +798,7 @@ export interface PromptDefinition { multiselect?: boolean; raw?: string | JsonObject; type: string; - validator?: (value: string) => boolean | string | Promise; + validator?: (value: JsonValue) => boolean | string | Promise; } export declare type PromptProvider = (definitions: Array) => SubscribableOrPromise<{ diff --git a/packages/angular_devkit/core/src/json/schema/interface.ts b/packages/angular_devkit/core/src/json/schema/interface.ts index 768acf726b4f..59e0530714e9 100644 --- a/packages/angular_devkit/core/src/json/schema/interface.ts +++ b/packages/angular_devkit/core/src/json/schema/interface.ts @@ -100,7 +100,7 @@ export interface PromptDefinition { type: string; message: string; default?: string | string[] | number | boolean | null; - validator?: (value: string) => boolean | string | Promise; + validator?: (value: JsonValue) => boolean | string | Promise; items?: Array; diff --git a/packages/angular_devkit/core/src/json/schema/prompt_spec.ts b/packages/angular_devkit/core/src/json/schema/prompt_spec.ts index 6e74e7fb6559..b22b26b7a567 100644 --- a/packages/angular_devkit/core/src/json/schema/prompt_spec.ts +++ b/packages/angular_devkit/core/src/json/schema/prompt_spec.ts @@ -262,7 +262,7 @@ describe('Prompt Provider', () => { .toPromise().then(done, done.fail); }); - it('analyzes list with multiselect option and object items', done => { + it('analyzes list with true multiselect option and object items', done => { const registry = new CoreSchemaRegistry(); const data: any = {}; @@ -301,6 +301,45 @@ describe('Prompt Provider', () => { .toPromise().then(done, done.fail); }); + it('analyzes list with false multiselect option and object items', done => { + const registry = new CoreSchemaRegistry(); + const data: any = {}; + + registry.usePromptProvider(async definitions => { + expect(definitions.length).toBe(1); + expect(definitions[0].type).toBe('list'); + expect(definitions[0].multiselect).toBe(false); + expect(definitions[0].items).toEqual([ + { 'value': 'one', 'label': 'one' }, + { 'value': 'two', 'label': 'two' }, + ]); + + return { [definitions[0].id]: { 'value': 'one', 'label': 'one' } }; + }); + + registry + .compile({ + properties: { + test: { + type: 'array', + 'x-prompt': { + 'type': 'list', + 'multiselect': false, + 'items': [ + { 'value': 'one', 'label': 'one' }, + { 'value': 'two', 'label': 'two' }, + ], + 'message': 'test-message', + }, + }, + }, + }) + .pipe( + mergeMap(validator => validator(data)), + ) + .toPromise().then(done, done.fail); + }); + it('analyzes list without multiselect option and object items', done => { const registry = new CoreSchemaRegistry(); const data: any = {}; @@ -308,7 +347,7 @@ describe('Prompt Provider', () => { registry.usePromptProvider(async definitions => { expect(definitions.length).toBe(1); expect(definitions[0].type).toBe('list'); - expect(definitions[0].multiselect).toBeUndefined(); + expect(definitions[0].multiselect).toBe(true); expect(definitions[0].items).toEqual([ { 'value': 'one', 'label': 'one' }, { 'value': 'two', 'label': 'two' }, @@ -346,6 +385,7 @@ describe('Prompt Provider', () => { registry.usePromptProvider(async definitions => { expect(definitions.length).toBe(1); expect(definitions[0].type).toBe('list'); + expect(definitions[0].multiselect).toBeFalsy(); expect(definitions[0].items).toEqual([ 'one', 'two', @@ -377,6 +417,45 @@ describe('Prompt Provider', () => { .toPromise().then(done, done.fail); }); + it('analyzes enums WITHOUT explicit list type and multiselect', done => { + const registry = new CoreSchemaRegistry(); + const data: any = {}; + + registry.usePromptProvider(async definitions => { + expect(definitions.length).toBe(1); + expect(definitions[0].type).toBe('list'); + expect(definitions[0].multiselect).toBe(true); + expect(definitions[0].items).toEqual([ + 'one', + 'two', + 'three', + ]); + + return {}; + }); + + registry + .compile({ + properties: { + test: { + type: 'array', + items: { + enum: [ + 'one', + 'two', + 'three', + ], + }, + 'x-prompt': 'test-message', + }, + }, + }) + .pipe( + mergeMap(validator => validator(data)), + ) + .toPromise().then(done, done.fail); + }); + it('analyzes boolean properties', done => { const registry = new CoreSchemaRegistry(); const data: any = {}; diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 146347c38135..82e20bdbbe3f 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -28,6 +28,7 @@ import { SmartDefaultProvider, } from './interface'; import { JsonSchema } from './schema'; +import { getTypesOfSchema } from './utility'; import { visitJson, visitJsonSchema } from './visitor'; // This interface should be exported from ajv, but they only export the class and not the type. @@ -539,26 +540,44 @@ export class CoreSchemaRegistry implements SchemaRegistry { items = schema.items; } + const propertyTypes = getTypesOfSchema(parentSchema); if (!type) { - if (parentSchema.type === 'boolean') { + if (propertyTypes.size === 1 && propertyTypes.has('boolean')) { type = 'confirmation'; } else if (Array.isArray(parentSchema.enum)) { type = 'list'; + } else if ( + propertyTypes.size === 1 && + propertyTypes.has('array') && + parentSchema.items && + Array.isArray((parentSchema.items as JsonObject).enum) + ) { + type = 'list'; } else { type = 'input'; } } - if (type === 'list' && !items && Array.isArray(parentSchema.enum)) { - type = 'list'; - items = []; - for (const value of parentSchema.enum) { - if (typeof value == 'string') { - items.push(value); - } else if (typeof value == 'object') { - // Invalid - } else { - items.push({ label: value.toString(), value }); + let multiselect; + if (type === 'list') { + multiselect = + schema.multiselect === undefined + ? propertyTypes.size === 1 && propertyTypes.has('array') + : schema.multiselect; + + const enumValues = multiselect + ? parentSchema.items && (parentSchema.items as JsonObject).enum + : parentSchema.enum; + if (!items && Array.isArray(enumValues)) { + items = []; + for (const value of enumValues) { + if (typeof value == 'string') { + items.push(value); + } else if (typeof value == 'object') { + // Invalid + } else { + items.push({ label: value.toString(), value }); + } } } } @@ -569,20 +588,13 @@ export class CoreSchemaRegistry implements SchemaRegistry { message, raw: schema, items, - multiselect: type === 'list' ? schema.multiselect : false, + multiselect, default: typeof parentSchema.default == 'object' ? undefined : parentSchema.default, - async validator(data: string) { - const result = it.self.validate(parentSchema, data); - if (typeof result === 'boolean') { - return result; - } else { - try { - await result; - - return true; - } catch { - return false; - } + async validator(data: JsonValue) { + try { + return await it.self.validate(parentSchema, data); + } catch { + return false; } }, }; From be49f6fef4dbce2e485e102e682b7802e1ca147a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 10 Sep 2019 13:51:35 -0400 Subject: [PATCH 0142/1070] refactor(@schematics/angular): use multiselect auto-discovery in guard schematic --- packages/schematics/angular/guard/schema.json | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/schematics/angular/guard/schema.json b/packages/schematics/angular/guard/schema.json index fa09334a80d3..861afc82ff2c 100644 --- a/packages/schematics/angular/guard/schema.json +++ b/packages/schematics/angular/guard/schema.json @@ -54,6 +54,7 @@ "type": "array", "description": "Specifies which interfaces to implement.", "uniqueItems": true, + "minItems": 1, "items": { "enum": [ "CanActivate", @@ -65,17 +66,7 @@ "default": [ "CanActivate" ], - "minItems": 1, - "x-prompt": { - "message": "Which interfaces would you like to implement?", - "type": "list", - "multiselect": true, - "items": [ - "CanActivate", - "CanActivateChild", - "CanLoad" - ] - } + "x-prompt": "Which interfaces would you like to implement?" } }, "required": [ From c2d544520d14965f490cc7aa2d69e55b3a3b2b2c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 10 Sep 2019 18:07:36 +0000 Subject: [PATCH 0143/1070] build: update terser to version 4.3.1 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 01e091c981e0..6aa12eed8cc9 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -53,7 +53,7 @@ "stylus": "0.54.7", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", - "terser": "4.2.1", + "terser": "4.3.1", "terser-webpack-plugin": "1.4.1", "webpack": "4.39.3", "webpack-dev-middleware": "3.7.1", diff --git a/yarn.lock b/yarn.lock index db237bc77133..a66a28f64e22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11246,10 +11246,10 @@ terser-webpack-plugin@1.4.1, terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.2.1.tgz#1052cfe17576c66e7bc70fcc7119f22b155bdac1" - integrity sha512-cGbc5utAcX4a9+2GGVX4DsenG6v0x3glnDi5hx8816X1McEAwPlPgRtXPJzSBsbpILxZ8MQMT0KvArLuE0HP5A== +terser@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65" + integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg== dependencies: commander "^2.20.0" source-map "~0.6.1" From 1824fc029c614b01758e97246dbc11b3c258008e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 10 Sep 2019 18:07:20 +0000 Subject: [PATCH 0144/1070] build: update postcss to version 7.0.18 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 6aa12eed8cc9..a06bae828006 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -36,7 +36,7 @@ "minimatch": "3.0.4", "parse5": "4.0.0", "open": "6.4.0", - "postcss": "7.0.17", + "postcss": "7.0.18", "postcss-import": "12.0.1", "postcss-loader": "3.0.0", "raw-loader": "3.1.0", diff --git a/yarn.lock b/yarn.lock index a66a28f64e22..9a298f7460ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9050,10 +9050,10 @@ postcss-value-parser@^4.0.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz#99a983d365f7b2ad8d0f9b8c3094926eab4b936d" integrity sha512-ESPktioptiSUchCKgggAkzdmkgzKfmp0EU8jXH+5kbIUB+unr0Y4CY9SRMvibuvYUBjNh1ACLbxqYNpdTQOteQ== -postcss@7.0.17, postcss@^7.0.17: - version "7.0.17" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" - integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ== +postcss@7.0.18: + version "7.0.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" + integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -9068,6 +9068,15 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.2: source-map "^0.6.1" supports-color "^5.5.0" +postcss@^7.0.17: + version "7.0.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" + integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" From 2565077dbea928f61b7a534fcb536482495c8379 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 9 Sep 2019 13:32:08 -0400 Subject: [PATCH 0145/1070] fix(@angular/cli): correctly account for linked packages in update Fixes #15511 Fixes #15294 --- packages/angular/cli/commands/update-impl.ts | 29 ++++++------ .../angular/cli/utilities/package-metadata.ts | 46 ++++++++----------- .../angular/cli/utilities/package-tree.ts | 34 +++++++++----- 3 files changed, 53 insertions(+), 56 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 8aa590a719e1..0a39875769e2 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -20,13 +20,10 @@ import { getPackageManager } from '../utilities/package-manager'; import { PackageIdentifier, PackageManifest, + PackageMetadata, fetchPackageMetadata, } from '../utilities/package-metadata'; -import { - PackageTreeActual, - findNodeDependencies, - readPackageTree, -} from '../utilities/package-tree'; +import { PackageTreeNode, findNodeDependencies, readPackageTree } from '../utilities/package-tree'; import { Schema as UpdateCommandSchema } from './update'; const npa = require('npm-package-arg'); @@ -311,26 +308,26 @@ export class UpdateCommand extends Command { } const packageName = packages[0].name; - let packageNode = rootDependencies[packageName]; - if (typeof packageNode === 'string') { + const packageDependency = rootDependencies[packageName]; + let packageNode = packageDependency && packageDependency.node; + if (packageDependency && !packageNode) { this.logger.error('Package found in package.json but is not installed.'); return 1; - } else if (!packageNode) { + } else if (!packageDependency) { // Allow running migrations on transitively installed dependencies // There can technically be nested multiple versions // TODO: If multiple, this should find all versions and ask which one to use const child = packageTree.children.find(c => c.name === packageName); if (child) { - // A link represents a symlinked package so use the actual in this case - packageNode = child.isLink ? child.target : child; + packageNode = child; } + } - if (!packageNode) { - this.logger.error('Package is not installed.'); + if (!packageNode) { + this.logger.error('Package is not installed.'); - return 1; - } + return 1; } const updateMetadata = packageNode.package['ng-update']; @@ -399,12 +396,12 @@ export class UpdateCommand extends Command { const requests: { identifier: PackageIdentifier; - node: PackageTreeActual | string; + node: PackageTreeNode | string; }[] = []; // Validate packages actually are part of the workspace for (const pkg of packages) { - const node = rootDependencies[pkg.name]; + const node = rootDependencies[pkg.name] && rootDependencies[pkg.name].node; if (!node) { this.logger.error(`Package '${pkg.name}' is not a dependency.`); diff --git a/packages/angular/cli/utilities/package-metadata.ts b/packages/angular/cli/utilities/package-metadata.ts index 942fe5412579..e30b2bc9ba8b 100644 --- a/packages/angular/cli/utilities/package-metadata.ts +++ b/packages/angular/cli/utilities/package-metadata.ts @@ -40,12 +40,10 @@ export interface PackageManifest { peerDependencies: PackageDependencies; optionalDependencies: PackageDependencies; - 'ng-add'?: { - - }; + 'ng-add'?: {}; 'ng-update'?: { - migrations: string, - packageGroup: { [name: string]: string }, + migrations: string; + packageGroup: { [name: string]: string }; }; } @@ -61,12 +59,12 @@ function ensureNpmrc(logger: logging.LoggerApi, usingYarn: boolean, verbose: boo if (!npmrc) { try { npmrc = readOptions(logger, false, verbose); - } catch { } + } catch {} if (usingYarn) { try { npmrc = { ...npmrc, ...readOptions(logger, true, verbose) }; - } catch { } + } catch {} } } } @@ -95,9 +93,7 @@ function readOptions( (!yarn && process.env.NPM_CONFIG_USERCONFIG) || path.join(homedir(), dotFilename), ]; - const projectConfigLocations: string[] = [ - path.join(cwd, dotFilename), - ]; + const projectConfigLocations: string[] = [path.join(cwd, dotFilename)]; const root = path.parse(cwd).root; for (let curDir = path.dirname(cwd); curDir && curDir !== root; curDir = path.dirname(curDir)) { projectConfigLocations.unshift(path.join(curDir, dotFilename)); @@ -125,7 +121,7 @@ function readOptions( delete options.cafile; try { options.ca = readFileSync(cafile, 'utf8').replace(/\r?\n/, '\\n'); - } catch { } + } catch {} } } else if (showPotentials) { logger.info(`Trying '${location}'...not found.`); @@ -151,7 +147,7 @@ function normalizeManifest(rawManifest: {}): PackageManifest { peerDependencies: {}, optionalDependencies: {}, // tslint:disable-next-line:no-any - ...rawManifest as any, + ...(rawManifest as any), }; } @@ -173,14 +169,11 @@ export async function fetchPackageMetadata( ensureNpmrc(logger, usingYarn, verbose); - const response = await pacote.packument( - name, - { - 'full-metadata': true, - ...npmrc, - ...(registry ? { registry } : {}), - }, - ); + const response = await pacote.packument(name, { + 'full-metadata': true, + ...npmrc, + ...(registry ? { registry } : {}), + }); // Normalize the response const metadata: PackageMetadata = { @@ -227,14 +220,11 @@ export async function fetchPackageManifest( ensureNpmrc(logger, usingYarn, verbose); - const response = await pacote.manifest( - name, - { - 'full-metadata': true, - ...npmrc, - ...(registry ? { registry } : {}), - }, - ); + const response = await pacote.manifest(name, { + 'full-metadata': true, + ...npmrc, + ...(registry ? { registry } : {}), + }); return normalizeManifest(response); } diff --git a/packages/angular/cli/utilities/package-tree.ts b/packages/angular/cli/utilities/package-tree.ts index 3005546098eb..afff17122046 100644 --- a/packages/angular/cli/utilities/package-tree.ts +++ b/packages/angular/cli/utilities/package-tree.ts @@ -18,21 +18,21 @@ export interface PackageTreeNodeBase { dependencies?: Record; devDependencies?: Record; peerDependencies?: Record; + optionalDependencies?: Record; 'ng-update'?: { migrations?: string; }; }; + parent?: PackageTreeNode; children: PackageTreeNode[]; } export interface PackageTreeActual extends PackageTreeNodeBase { isLink: false; - parent?: PackageTreeActual; } export interface PackageTreeLink extends PackageTreeNodeBase { isLink: true; - parent: null; target: PackageTreeActual; } @@ -52,25 +52,35 @@ export function readPackageTree(path: string): Promise { }); } -export function findNodeDependencies(root: PackageTreeNode, node = root) { - const actual = node.isLink ? node.target : node; +export interface NodeDependency { + version: string; + node?: PackageTreeNode; +} +export function findNodeDependencies(node: PackageTreeNode) { const rawDeps: Record = { - ...actual.package.dependencies, - ...actual.package.devDependencies, - ...actual.package.peerDependencies, + ...node.package.dependencies, + ...node.package.devDependencies, + ...node.package.peerDependencies, + ...node.package.optionalDependencies, }; return Object.entries(rawDeps).reduce( (deps, [name, version]) => { - const depNode = root.children.find(child => { - return child.name === name && !child.isLink && child.parent === node; - }) as PackageTreeActual | undefined; + let dependencyNode; + let parent: PackageTreeNode | undefined | null = node; + while (!dependencyNode && parent) { + dependencyNode = parent.children.find(child => child.name === name); + parent = parent.parent; + } - deps[name] = depNode || version; + deps[name] = { + node: dependencyNode, + version, + }; return deps; }, - {} as Record, + Object.create(null) as Record, ); } From 8f5a54a08929daea692cc394de3d852aad122d86 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 9 Sep 2019 13:51:41 -0400 Subject: [PATCH 0146/1070] fix(@schematics/update): only update peer dependency if out of range --- packages/schematics/update/update/index.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 42feca52aa23..1ae274078470 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -717,6 +717,7 @@ function _addPeerDependencies( packages: Map, allDependencies: ReadonlyMap, npmPackageJson: NpmRepositoryPackageJson, + npmPackageJsonMap: Map, logger: logging.LoggerApi, ): void { const maybePackage = packages.get(npmPackageJson.name); @@ -737,9 +738,19 @@ function _addPeerDependencies( const error = false; for (const [peer, range] of Object.entries(packageJson.peerDependencies || {})) { - if (!packages.has(peer)) { - packages.set(peer, range as VersionRange); + if (packages.has(peer)) { + continue; + } + + const peerPackageJson = npmPackageJsonMap.get(peer); + if (peerPackageJson) { + const peerInfo = _buildPackageInfo(tree, packages, allDependencies, peerPackageJson, logger); + if (semver.satisfies(peerInfo.installed.version, range)) { + continue; + } } + + packages.set(peer, range as VersionRange); } if (error) { @@ -860,7 +871,7 @@ export default function(options: UpdateSchema): Rule { lastPackagesSize = packages.size; npmPackageJsonMap.forEach((npmPackageJson) => { _addPackageGroup(tree, packages, allDependencies, npmPackageJson, logger); - _addPeerDependencies(tree, packages, allDependencies, npmPackageJson, logger); + _addPeerDependencies(tree, packages, allDependencies, npmPackageJson, npmPackageJsonMap, logger); }); } while (packages.size > lastPackagesSize); From f2cb88572bcad62fec3b8550f7040a43b82d1873 Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Tue, 10 Sep 2019 11:03:08 -0700 Subject: [PATCH 0147/1070] docs: expand doc for new -route flag in generate module --- packages/schematics/angular/module/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/module/schema.json b/packages/schematics/angular/module/schema.json index 2ca9e87a779f..36ed1162e056 100644 --- a/packages/schematics/angular/module/schema.json +++ b/packages/schematics/angular/module/schema.json @@ -41,7 +41,7 @@ }, "route": { "type": "string", - "description": "The route path for the lazy loaded module. Requires --module option." + "description": "The route path for a lazy-loaded module. When supplied, creates a component in the new module using the route name, and adds the route to the `routes` array in the declaring module's routing module. Requires `--module` option." }, "flat": { "type": "boolean", From e200d730d47faafe071a961e3ddbf62156c11356 Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Tue, 10 Sep 2019 11:39:15 -0700 Subject: [PATCH 0148/1070] docs: remove naming comment, clarify declaring module --- packages/schematics/angular/module/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/module/schema.json b/packages/schematics/angular/module/schema.json index 36ed1162e056..b3f77d81ea0a 100644 --- a/packages/schematics/angular/module/schema.json +++ b/packages/schematics/angular/module/schema.json @@ -41,7 +41,7 @@ }, "route": { "type": "string", - "description": "The route path for a lazy-loaded module. When supplied, creates a component in the new module using the route name, and adds the route to the `routes` array in the declaring module's routing module. Requires `--module` option." + "description": "The route path for a lazy-loaded module. When supplied, creates a component in the new module, and adds the route to that component in the `routes` array in the routing module specified in the `--module` option." }, "flat": { "type": "boolean", From 805e1a9a4760aeaf4d0d8ca1f562d667c3f1e2ef Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Tue, 10 Sep 2019 11:52:59 -0700 Subject: [PATCH 0149/1070] docs: further clarify module relationship --- packages/schematics/angular/module/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/module/schema.json b/packages/schematics/angular/module/schema.json index b3f77d81ea0a..7588a306d2fd 100644 --- a/packages/schematics/angular/module/schema.json +++ b/packages/schematics/angular/module/schema.json @@ -41,7 +41,7 @@ }, "route": { "type": "string", - "description": "The route path for a lazy-loaded module. When supplied, creates a component in the new module, and adds the route to that component in the `routes` array in the routing module specified in the `--module` option." + "description": "The route path for a lazy-loaded module. When supplied, creates a component in the new module, and adds the route to that component in the `Routes` array declared in the module provided in the `--module` option." }, "flat": { "type": "boolean", From 35a014508f4bee18d750a668665dd0f6c2c45012 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Wed, 11 Sep 2019 10:49:44 -0700 Subject: [PATCH 0150/1070] release: v9.0.0-next.4 --- packages/schematics/angular/utility/latest-versions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index b4a308b43d80..9cbafc9c6977 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,10 +15,10 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.3', - DevkitBuildNgPackagr: '~0.900.0-next.3', - DevkitBuildWebpack: '~0.900.0-next.3', - AngularPWA: '~0.900.0-next.3', + DevkitBuildAngular: '~0.900.0-next.4', + DevkitBuildNgPackagr: '~0.900.0-next.4', + DevkitBuildWebpack: '~0.900.0-next.4', + AngularPWA: '~0.900.0-next.4', tsickle: '^0.37.0', ngPackagr: '^5.4.0', From 1ea4a5ffa5986bf066db4b2fecf51eb2f7329abe Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 12 Sep 2019 20:44:32 +0200 Subject: [PATCH 0151/1070] feat(@angular-devkit/build-angular): ignore express and hapi depedency expresstion (#15586) In version 9 universal express and hapi `server.ts` will be bundled using the CLI server builder. We need to add this to avoid `the request of a dependency is an expression` warnings See: https://github.com/angular/universal/pull/1237 --- .../angular-cli-files/models/webpack-configs/server.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts index 6079bf1c16bd..200cac43c5c1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/server.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { isAbsolute } from 'path'; -import { Configuration } from 'webpack'; +import { Configuration, ContextReplacementPlugin } from 'webpack'; import { WebpackConfigOptions } from '../build-options'; import { getSourceMapDevTool } from './utils'; @@ -30,7 +30,12 @@ export function getServerConfig(wco: WebpackConfigOptions): Configuration { output: { libraryTarget: 'commonjs', }, - plugins: extraPlugins, + plugins: [ + // Fixes Critical dependency: the request of a dependency is an expression + new ContextReplacementPlugin(/@?hapi(\\|\/)/), + new ContextReplacementPlugin(/express(\\|\/)/), + ...extraPlugins, + ], node: false, }; From d9fdfc5b8dbcd528f4a06c94065cdecf627b1d51 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Sep 2019 14:44:40 -0400 Subject: [PATCH 0152/1070] build: remove renovate ignore of webpack-subresource-integrity (#15583) As of v6.11.0, npm supports optional peer dependencies. This prevents webpack-subresource-integrity from showing peer dependency warnings for its optional peer dependency on html-webpack-plugin. --- renovate.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/renovate.json b/renovate.json index 1ee2674e8da8..5c4ef1e1e69e 100644 --- a/renovate.json +++ b/renovate.json @@ -18,8 +18,7 @@ "master" ], "ignoreDeps": [ - "@types/node", - "webpack-subresource-integrity" + "@types/node" ], "packageFiles": [ "WORKSPACE", From 17d08c49182c1d85e8dcc9bba71a94bdf1f22fd5 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 12 Sep 2019 21:45:01 +0300 Subject: [PATCH 0153/1070] build: update sass to version 1.22.12 (#15579) --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index a06bae828006..da1a866463a8 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -42,7 +42,7 @@ "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", "rxjs": "6.4.0", - "sass": "1.22.10", + "sass": "1.22.12", "sass-loader": "8.0.0", "semver": "6.3.0", "source-map": "0.7.3", diff --git a/yarn.lock b/yarn.lock index 9a298f7460ad..e2994cb28527 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10121,10 +10121,10 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.22.10: - version "1.22.10" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.22.10.tgz#b9f01440352ba0be5d99fa64a2040b035cc6e5ff" - integrity sha512-DUpS1tVMGCH6gr/N9cXCoemrjoNdOLhAHfQ37fJw2A5ZM4gSI9ej/8Xi95Xwus03RqZ2zdSnKZGULL7oS+jfMA== +sass@1.22.12: + version "1.22.12" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.22.12.tgz#5cbdd38720ffd1857da695331faee9f634bcb5d7" + integrity sha512-u5Rxn+dKTPCW5/11kMNxtmqKsxCjcpnqj9CaJoru1NqeJ0DOa9rOM00e0HqmseTAatGkKoLY+jaNecMYevu1gg== dependencies: chokidar ">=2.0.0 <4.0.0" From b9e587de46ae1870c1403314fbc7f5b6a6d3d9bd Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 12 Sep 2019 21:45:10 +0300 Subject: [PATCH 0154/1070] build: update bazel_toolchains to version 0.29.3 (#15578) --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 9295bfa4d75b..d10f264fbfde 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -111,9 +111,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "a019fbd579ce5aed0239de865b2d8281dbb809efd537bf42e0d366783e8dec65", - strip_prefix = "bazel-toolchains-0.29.2", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.2.tar.gz", + sha256 = "1411f2648185b0e7d8c2bb88b25cc8f2c477cc4223133461652ddce2b3154ac4", + strip_prefix = "bazel-toolchains-0.29.3", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.3.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") From 10262a0c1a287449be94b02e96dd99b1a18b2499 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 12 Sep 2019 21:45:22 +0300 Subject: [PATCH 0155/1070] build: update @babel/core to version 7.6.0 (#15562) --- .../angular_devkit/build_angular/package.json | 4 +- yarn.lock | 143 ++++++++++++------ 2 files changed, 98 insertions(+), 49 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index da1a866463a8..908cc3809c5c 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -11,8 +11,8 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/build-webpack": "0.0.0", "@angular-devkit/core": "0.0.0", - "@babel/core": "7.5.5", - "@babel/preset-env": "7.5.5", + "@babel/core": "7.6.0", + "@babel/preset-env": "7.6.0", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", "autoprefixer": "9.6.1", diff --git a/yarn.lock b/yarn.lock index e2994cb28527..165a065e1594 100644 --- a/yarn.lock +++ b/yarn.lock @@ -120,18 +120,18 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.5.tgz#17b2686ef0d6bc58f963dddd68ab669755582c30" - integrity sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg== +"@babel/core@7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.0.tgz#9b00f73554edd67bebc86df8303ef678be3d7b48" + integrity sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.5.5" - "@babel/helpers" "^7.5.5" - "@babel/parser" "^7.5.5" - "@babel/template" "^7.4.4" - "@babel/traverse" "^7.5.5" - "@babel/types" "^7.5.5" + "@babel/generator" "^7.6.0" + "@babel/helpers" "^7.6.0" + "@babel/parser" "^7.6.0" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.0" + "@babel/types" "^7.6.0" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" @@ -151,6 +151,17 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.0.tgz#e2c21efbfd3293ad819a2359b448f002bfdfda56" + integrity sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA== + dependencies: + "@babel/types" "^7.6.0" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + trim-right "^1.0.1" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -306,14 +317,14 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.2.0" -"@babel/helpers@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.5.tgz#63908d2a73942229d1e6685bc2a0e730dde3b75e" - integrity sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g== +"@babel/helpers@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.0.tgz#21961d16c6a3c3ab597325c34c465c0887d31c6e" + integrity sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ== dependencies: - "@babel/template" "^7.4.4" - "@babel/traverse" "^7.5.5" - "@babel/types" "^7.5.5" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.0" + "@babel/types" "^7.6.0" "@babel/highlight@^7.0.0": version "7.0.0" @@ -334,6 +345,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== +"@babel/parser@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.0.tgz#3e05d0647432a8326cb28d0de03895ae5a57f39b" + integrity sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -442,10 +458,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.5.5.tgz#a35f395e5402822f10d2119f6f8e045e3639a2ce" - integrity sha512-82A3CLRRdYubkG85lKwhZB0WZoHxLGsJdux/cOVaJCJpvYFl1LVzAIFyRsa7CvXqW8rBM4Zf3Bfn8PHt5DP0Sg== +"@babel/plugin-transform-block-scoping@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.0.tgz#c49e21228c4bbd4068a35667e6d951c75439b1dc" + integrity sha512-tIt4E23+kw6TgL/edACZwP1OUKrjOTyMrFMLoT5IOFrfMRabCgekjqFd5o6PaAMildBu46oFkekIdMuGkkPEpA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.13" @@ -471,10 +487,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-destructuring@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.5.0.tgz#f6c09fdfe3f94516ff074fe877db7bc9ef05855a" - integrity sha512-YbYgbd3TryYYLGyC7ZR+Tq8H/+bCmwoaxHfJHupom5ECstzbRLTch6gOQbhEY9Z4hiCNHEURgq06ykFv9JZ/QQ== +"@babel/plugin-transform-destructuring@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz#44bbe08b57f4480094d57d9ffbcd96d309075ba6" + integrity sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -540,10 +556,10 @@ "@babel/helper-plugin-utils" "^7.0.0" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-commonjs@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.5.0.tgz#425127e6045231360858eeaa47a71d75eded7a74" - integrity sha512-xmHq0B+ytyrWJvQTc5OWAC4ii6Dhr0s22STOoydokG51JjWhyYo5mRPXoi+ZmtHQhZZwuXNN+GG5jy5UZZJxIQ== +"@babel/plugin-transform-modules-commonjs@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz#39dfe957de4420445f1fcf88b68a2e4aa4515486" + integrity sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g== dependencies: "@babel/helper-module-transforms" "^7.4.4" "@babel/helper-plugin-utils" "^7.0.0" @@ -567,12 +583,12 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-named-capturing-groups-regex@^7.4.5": - version "7.4.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.5.tgz#9d269fd28a370258199b4294736813a60bbdd106" - integrity sha512-z7+2IsWafTBbjNsOxU/Iv5CvTJlr5w4+HGu1HovKYTtgJ362f7kBcQglkfmlspKKZ3bgrbSGvLfNx++ZJgCWsg== +"@babel/plugin-transform-named-capturing-groups-regex@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.0.tgz#1e6e663097813bb4f53d42df0750cf28ad3bb3f1" + integrity sha512-jem7uytlmrRl3iCAuQyw8BpB4c4LWvSpvIeXKpMb+7j84lkx4m4mYr5ErAcmN5KM7B6BqrAvRGjBIbbzqCczew== dependencies: - regexp-tree "^0.1.6" + regexp-tree "^0.1.13" "@babel/plugin-transform-new-target@^7.4.4": version "7.4.4" @@ -665,10 +681,10 @@ "@babel/helper-regex" "^7.4.4" regexpu-core "^4.5.4" -"@babel/preset-env@7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.5.5.tgz#bc470b53acaa48df4b8db24a570d6da1fef53c9a" - integrity sha512-GMZQka/+INwsMz1A5UEql8tG015h5j/qjptpKY2gJ7giy8ohzU710YciJB5rcKsWGWHiW3RUnHib0E5/m3Tp3A== +"@babel/preset-env@7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.0.tgz#aae4141c506100bb2bfaa4ac2a5c12b395619e50" + integrity sha512-1efzxFv/TcPsNXlRhMzRnkBFMeIqBBgzwmZwlFDw5Ubj0AGLeufxugirwZmkkX/ayi3owsSqoQ4fw8LkfK9SYg== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -686,10 +702,10 @@ "@babel/plugin-transform-arrow-functions" "^7.2.0" "@babel/plugin-transform-async-to-generator" "^7.5.0" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.5.5" + "@babel/plugin-transform-block-scoping" "^7.6.0" "@babel/plugin-transform-classes" "^7.5.5" "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.5.0" + "@babel/plugin-transform-destructuring" "^7.6.0" "@babel/plugin-transform-dotall-regex" "^7.4.4" "@babel/plugin-transform-duplicate-keys" "^7.5.0" "@babel/plugin-transform-exponentiation-operator" "^7.2.0" @@ -698,10 +714,10 @@ "@babel/plugin-transform-literals" "^7.2.0" "@babel/plugin-transform-member-expression-literals" "^7.2.0" "@babel/plugin-transform-modules-amd" "^7.5.0" - "@babel/plugin-transform-modules-commonjs" "^7.5.0" + "@babel/plugin-transform-modules-commonjs" "^7.6.0" "@babel/plugin-transform-modules-systemjs" "^7.5.0" "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.5" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.6.0" "@babel/plugin-transform-new-target" "^7.4.4" "@babel/plugin-transform-object-super" "^7.5.5" "@babel/plugin-transform-parameters" "^7.4.4" @@ -714,7 +730,7 @@ "@babel/plugin-transform-template-literals" "^7.4.4" "@babel/plugin-transform-typeof-symbol" "^7.2.0" "@babel/plugin-transform-unicode-regex" "^7.4.4" - "@babel/types" "^7.5.5" + "@babel/types" "^7.6.0" browserslist "^4.6.0" core-js-compat "^3.1.1" invariant "^2.2.2" @@ -739,6 +755,15 @@ "@babel/parser" "^7.4.4" "@babel/types" "^7.4.4" +"@babel/template@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" + integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb" @@ -754,6 +779,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.0.tgz#389391d510f79be7ce2ddd6717be66d3fed4b516" + integrity sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.1.2": version "7.1.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.3.tgz#3a767004567060c2f40fca49a304712c525ee37d" @@ -772,6 +812,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.6.0": + version "7.6.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" + integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@bazel/bazel-darwin_x64@0.29.0": version "0.29.0" resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.29.0.tgz#d2ebcb95bc66031b0545dd8b0e597b3aa5b9024b" @@ -9708,10 +9757,10 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp-tree@^0.1.6: - version "0.1.11" - resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.11.tgz#c9c7f00fcf722e0a56c7390983a7a63dd6c272f3" - integrity sha512-7/l/DgapVVDzZobwMCCgMlqiqyLFJ0cduo/j+3BcDJIB+yJdsYCfKuI3l/04NV+H/rfNRdPIDbXNZHM9XvQatg== +regexp-tree@^0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.13.tgz#5b19ab9377edc68bc3679256840bb29afc158d7f" + integrity sha512-hwdV/GQY5F8ReLZWO+W1SRoN5YfpOKY6852+tBFcma72DKBIcHjPRIlIvQN35bCOljuAfP2G2iB0FC/w236mUw== regexpu-core@^1.0.0: version "1.0.0" From 676b329112dd1e5ff553cc01306c9381cac0f47c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 12 Sep 2019 21:45:32 +0300 Subject: [PATCH 0156/1070] build: update terser-webpack-plugin to version 2.0.1 (#15538) --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 50 +++++++++++++++++-- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 908cc3809c5c..32820e09373b 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -54,7 +54,7 @@ "stylus-loader": "3.0.2", "tree-kill": "1.2.1", "terser": "4.3.1", - "terser-webpack-plugin": "1.4.1", + "terser-webpack-plugin": "2.0.1", "webpack": "4.39.3", "webpack-dev-middleware": "3.7.1", "webpack-dev-server": "3.8.0", diff --git a/yarn.lock b/yarn.lock index 165a065e1594..3471d6eecee1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2637,7 +2637,7 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@12.0.3: +cacache@12.0.3, cacache@^12.0.3: version "12.0.3" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== @@ -5002,7 +5002,7 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@3.0.0: +find-cache-dir@3.0.0, find-cache-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.0.0.tgz#cd4b7dd97b7185b7e17dbfe2d6e4115ee3eeb8fc" integrity sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw== @@ -6661,6 +6661,14 @@ jasminewd2@^2.1.0: resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e" integrity sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4= +jest-worker@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" + integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== + dependencies: + merge-stream "^2.0.0" + supports-color "^6.1.0" + jquery@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" @@ -7657,6 +7665,11 @@ merge-source-map@1.0.4: dependencies: source-map "^0.5.6" +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -10255,6 +10268,14 @@ schema-utils@^2.1.0: ajv "^6.1.0" ajv-keywords "^3.1.0" +schema-utils@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.2.0.tgz#48a065ce219e0cacf4631473159037b2c1ae82da" + integrity sha512-5EwsCNhfFTZvUreQhx/4vVQpJ/lnCAkgoIHLhSpp4ZirE+4hzFvdJi0FMub6hxbFVBJYSpeVVmon+2e7uEGRrA== + dependencies: + ajv "^6.10.2" + ajv-keywords "^3.4.1" + seedrandom@^2.4.4: version "2.4.4" resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-2.4.4.tgz#b25ea98632c73e45f58b77cfaa931678df01f9ba" @@ -10381,6 +10402,11 @@ serialize-javascript@^1.7.0: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA== +serialize-javascript@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.0.tgz#9310276819efd0eb128258bb341957f6eb2fc570" + integrity sha512-a/mxFfU00QT88umAJQsNWOnUKckhNCqOl028N48e7wFmo2/EHpTo9Wso+iJJCMrQnmFvcjto5RJdAHEvVhcyUQ== + serve-index@^1.7.2, serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -11289,7 +11315,21 @@ term-size@^1.2.0: dependencies: execa "^0.7.0" -terser-webpack-plugin@1.4.1, terser-webpack-plugin@^1.4.1: +terser-webpack-plugin@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.0.1.tgz#5e69a187133472174ef2fb51afc76a0f0a7b1d13" + integrity sha512-DXx8f7080P2dgW9Ydd7MUon81AL+GkGr9prfQRf+rH06dRrgCGIvtT7q73JRm2UzmjKeJGtro9O8zwL2y2udag== + dependencies: + cacache "^12.0.3" + find-cache-dir "^3.0.0" + jest-worker "^24.9.0" + schema-utils "^2.2.0" + serialize-javascript "^2.1.0" + source-map "^0.6.1" + terser "^4.2.1" + webpack-sources "^1.4.3" + +terser-webpack-plugin@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz#61b18e40eaee5be97e771cdbb10ed1280888c2b4" integrity sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg== @@ -11304,7 +11344,7 @@ terser-webpack-plugin@1.4.1, terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.1: +terser@4.3.1, terser@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65" integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg== @@ -12217,7 +12257,7 @@ webpack-merge@4.2.2: dependencies: lodash "^4.17.15" -webpack-sources@1.4.3, webpack-sources@^1.4.1: +webpack-sources@1.4.3, webpack-sources@^1.4.1, webpack-sources@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== From a1487b3e9e11720a2754d03a6f1811bd35b46be4 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Sep 2019 14:45:59 -0400 Subject: [PATCH 0157/1070] feat(@angular/cli): check/prompt for workspace level analytics configuration (#14264) --- packages/angular/cli/models/analytics.ts | 61 +++++++++++++++++++ packages/angular/cli/models/command-runner.ts | 25 ++++++-- 2 files changed, 82 insertions(+), 4 deletions(-) diff --git a/packages/angular/cli/models/analytics.ts b/packages/angular/cli/models/analytics.ts index 064044f365dd..7a151b4f5d53 100644 --- a/packages/angular/cli/models/analytics.ts +++ b/packages/angular/cli/models/analytics.ts @@ -565,6 +565,67 @@ export async function getGlobalAnalytics(): Promise { + try { + const globalWorkspace = await getWorkspace('local'); + const analyticsConfig: string | undefined | null | { uid?: string } = globalWorkspace + && globalWorkspace.getCli() + && globalWorkspace.getCli()['analytics']; + + if (analyticsConfig !== undefined) { + return true; + } + } catch {} + + return false; +} + +/** + * Get the workspace analytics object for the user. This returns an instance of UniversalAnalytics, + * or undefined if analytics are disabled. + * + * If any problem happens, it is considered the user has been opting out of analytics. + */ +export async function getWorkspaceAnalytics(): Promise { + analyticsDebug('getWorkspaceAnalytics'); + try { + const globalWorkspace = await getWorkspace('local'); + const analyticsConfig: string | undefined | null | { uid?: string } = globalWorkspace + && globalWorkspace.getCli() + && globalWorkspace.getCli()['analytics']; + analyticsDebug('Workspace Analytics config found: %j', analyticsConfig); + + if (analyticsConfig === false) { + analyticsDebug('Analytics disabled. Ignoring all analytics.'); + + return undefined; + } else if (analyticsConfig === undefined || analyticsConfig === null) { + analyticsDebug('Analytics settings not found. Ignoring all analytics.'); + + return undefined; + } else { + let uid: string | undefined = undefined; + if (typeof analyticsConfig == 'string') { + uid = analyticsConfig; + } else if (typeof analyticsConfig == 'object' && typeof analyticsConfig['uid'] == 'string') { + uid = analyticsConfig['uid']; + } + + analyticsDebug('client id: %j', uid); + if (uid == undefined) { + return undefined; + } + + return new UniversalAnalytics(AnalyticsProperties.AngularCliDefault, uid); + } + } catch (err) { + analyticsDebug('Error happened during reading of analytics config: %s', err.message); + + return undefined; + } + +} + /** * Return the usage analytics sharing setting, which is either a property string (GA-XXXXXXX-XX), * or undefined if no sharing. diff --git a/packages/angular/cli/models/command-runner.ts b/packages/angular/cli/models/command-runner.ts index 9fe02781e06f..acc13742f42a 100644 --- a/packages/angular/cli/models/command-runner.ts +++ b/packages/angular/cli/models/command-runner.ts @@ -19,7 +19,13 @@ import * as debug from 'debug'; import { readFileSync } from 'fs'; import { join, resolve } from 'path'; import { parseJsonSchemaToCommandDescription } from '../utilities/json-schema'; -import { UniversalAnalytics, getGlobalAnalytics, getSharedAnalytics } from './analytics'; +import { + getGlobalAnalytics, + getSharedAnalytics, + getWorkspaceAnalytics, + hasWorkspaceAnalyticsConfiguration, + promptProjectAnalytics, +} from './analytics'; import { Command } from './command'; import { CommandDescription, CommandWorkspace } from './interface'; import * as parser from './parser'; @@ -58,8 +64,19 @@ export interface CommandMapOptions { * Create the analytics instance. * @private */ -async function _createAnalytics(): Promise { - const config = await getGlobalAnalytics(); +async function _createAnalytics(workspace: boolean): Promise { + let config = await getGlobalAnalytics(); + // If in workspace and global analytics is enabled, defer to workspace level + if (workspace && config) { + // TODO: This should honor the `no-interactive` option. + // It is currently not an `ng` option but rather only an option for specific commands. + // The concept of `ng`-wide options are needed to cleanly handle this. + if (!(await hasWorkspaceAnalyticsConfiguration())) { + await promptProjectAnalytics(); + } + config = await getWorkspaceAnalytics(); + } + const maybeSharedAnalytics = await getSharedAnalytics(); if (config && maybeSharedAnalytics) { @@ -214,7 +231,7 @@ export async function runCommand( return map; }); - const analytics = options.analytics || await _createAnalytics(); + const analytics = options.analytics || await _createAnalytics(!!workspace.configFile); const context = { workspace, analytics }; const command = new description.impl(context, description, logger); From 5e72b300cdb2f3a0225f26385d68d96d048db67f Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Fri, 13 Sep 2019 16:35:14 -0700 Subject: [PATCH 0158/1070] ci: update schedule for locking inactive issues (#15597) --- .github/workflows/lock-closed.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml index d668d5fd21cd..2bc90deaeef2 100644 --- a/.github/workflows/lock-closed.yml +++ b/.github/workflows/lock-closed.yml @@ -1,9 +1,9 @@ -name: Lock issues that are closed and inactive +name: Lock Inactive Issues on: schedule: - # Run at the 40th minute of every hour - - cron: '40 * * * *' + # Run at 08:00 every day + - cron: '0 8 * * *' jobs: lock_closed: From 63248e32eff603460b58cb68e8aa27c8990f3770 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 14 Sep 2019 01:35:22 +0200 Subject: [PATCH 0159/1070] feat(@schematics/angular): add node types to universal tsconfig (#15594) By default we disable types inclusion in tsconfig.app.json which this tsconfig extends from --- .../universal/files/root/__tsconfigFileName__.json.template | 5 ++++- packages/schematics/angular/universal/index_spec.ts | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template b/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template index e960e9a8f385..06b8b6ee92dc 100644 --- a/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template +++ b/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template @@ -2,7 +2,10 @@ "extends": "./<%= tsConfigExtends %>", "compilerOptions": { "outDir": "<%= outDir %>-server", - "module": "commonjs" + "module": "commonjs", + "types": [ + "node" + ] }, "files": [ "src/<%= stripTsExtension(main) %>.ts" diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index f2132888c7bf..d58a8edbcf7e 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -91,6 +91,7 @@ describe('Universal Schematic', () => { compilerOptions: { outDir: './out-tsc/app-server', module: 'commonjs', + types: ['node'], }, files: [ 'src/main.server.ts', @@ -115,6 +116,7 @@ describe('Universal Schematic', () => { compilerOptions: { outDir: '../../out-tsc/app-server', module: 'commonjs', + types: ['node'], }, files: [ 'src/main.server.ts', From 8459993532c3395dc37ef7a8a6936527145d010c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 14 Sep 2019 02:35:38 +0300 Subject: [PATCH 0160/1070] build: update webpack-subresource-integrity to version 1.3.3 (#15592) --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 32 ++++--------------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 32820e09373b..134329ffb4b2 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -60,7 +60,7 @@ "webpack-dev-server": "3.8.0", "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", - "webpack-subresource-integrity": "1.1.0-rc.6", + "webpack-subresource-integrity": "1.3.3", "worker-farm": "1.7.0", "worker-plugin": "3.2.0" }, diff --git a/yarn.lock b/yarn.lock index 3471d6eecee1..d76a13d8eae5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10673,11 +10673,6 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-list-map@~0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" - integrity sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY= - source-map-loader@0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.4.tgz#c18b0dc6e23bf66f6792437557c569a11e072271" @@ -10747,13 +10742,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@~0.4.1: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - integrity sha1-66T12pwNyZneaAMti092FzZSA2s= - dependencies: - amdefine ">=0.0.4" - sourcemap-codec@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2" @@ -12130,14 +12118,6 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-core@^0.6.8: - version "0.6.9" - resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" - integrity sha1-/FcViMhVjad76e+23r3Fo7FyvcI= - dependencies: - source-list-map "~0.1.7" - source-map "~0.4.1" - webpack-dev-middleware@3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz#1132fecc9026fd90f0ecedac5cbff75d1fb45890" @@ -12257,7 +12237,7 @@ webpack-merge@4.2.2: dependencies: lodash "^4.17.15" -webpack-sources@1.4.3, webpack-sources@^1.4.1, webpack-sources@^1.4.3: +webpack-sources@1.4.3, webpack-sources@^1.3.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== @@ -12281,12 +12261,12 @@ webpack-sources@^1.4.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack-subresource-integrity@1.1.0-rc.6: - version "1.1.0-rc.6" - resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.6.tgz#37f6f1264e1eb378e41465a98da80fad76ab8886" - integrity sha512-Az7y8xTniNhaA0620AV1KPwWOqawurVVDzQSpPAeR5RwNbL91GoBSJAAo9cfd+GiFHwsS5bbHepBw1e6Hzxy4w== +webpack-subresource-integrity@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.3.3.tgz#8a320457a93ef480707884443d886f7f677ccbf7" + integrity sha512-t668hZNc/fZCgt2u83A4Tp9l5sDEwAhEC5XQ2QugshEr9WkNNDQC6551pB/JUfy5DwqTa/MJzAjeG5QQ9vxCEA== dependencies: - webpack-core "^0.6.8" + webpack-sources "^1.3.0" webpack@4.39.3: version "4.39.3" From 021624183a9938d28c8625df860faf62828b378c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 14 Sep 2019 02:35:47 +0300 Subject: [PATCH 0161/1070] build: update webpack to version 4.40.2 (#15591) --- packages/angular_devkit/build_angular/package.json | 2 +- packages/angular_devkit/build_webpack/package.json | 2 +- packages/ngtools/webpack/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 134329ffb4b2..54bf829b3db4 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -55,7 +55,7 @@ "tree-kill": "1.2.1", "terser": "4.3.1", "terser-webpack-plugin": "2.0.1", - "webpack": "4.39.3", + "webpack": "4.40.2", "webpack-dev-middleware": "3.7.1", "webpack-dev-server": "3.8.0", "webpack-merge": "4.2.2", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index a85d7e5431cb..01e83eeeeaec 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -17,7 +17,7 @@ "webpack-dev-server": "^3.1.4" }, "devDependencies": { - "webpack": "4.39.3", + "webpack": "4.40.2", "webpack-dev-server": "^3.1.4" } } diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 26c3f4fcf436..60b69259e95a 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -36,6 +36,6 @@ "@angular/compiler": "~9.0.0-next.4", "@angular/compiler-cli": "~9.0.0-next.4", "typescript": "3.5.3", - "webpack": "4.39.3" + "webpack": "4.40.2" } } diff --git a/yarn.lock b/yarn.lock index d76a13d8eae5..28601802fbc1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12268,10 +12268,10 @@ webpack-subresource-integrity@1.3.3: dependencies: webpack-sources "^1.3.0" -webpack@4.39.3: - version "4.39.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.39.3.tgz#a02179d1032156b713b6ec2da7e0df9d037def50" - integrity sha512-BXSI9M211JyCVc3JxHWDpze85CvjC842EvpRsVTc/d15YJGlox7GIDd38kJgWrb3ZluyvIjgenbLDMBQPDcxYQ== +webpack@4.40.2: + version "4.40.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.40.2.tgz#d21433d250f900bf0facbabe8f50d585b2dc30a7" + integrity sha512-5nIvteTDCUws2DVvP9Qe+JPla7kWPPIDFZv55To7IycHWZ+Z5qBdaBYPyuXWdhggTufZkQwfIK+5rKQTVovm2A== dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" From 7618c4adc66e3650deec3178255e56e45e3785a6 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Fri, 13 Sep 2019 19:35:53 -0400 Subject: [PATCH 0162/1070] test: re-enable style preprocessor include paths E2E (#15590) --- .../e2e/tests/build/styles/include-paths.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/styles/include-paths.ts b/tests/legacy-cli/e2e/tests/build/styles/include-paths.ts index c685abe6f979..709dfc7784e6 100644 --- a/tests/legacy-cli/e2e/tests/build/styles/include-paths.ts +++ b/tests/legacy-cli/e2e/tests/build/styles/include-paths.ts @@ -8,9 +8,6 @@ import { ng } from '../../../utils/process'; import { updateJsonFile } from '../../../utils/project'; export default function () { - // TODO(architect): The compat layer doesn't yet process `includePaths`. - return; - return Promise.resolve() .then(() => createDir('src/style-paths')) .then(() => writeMultipleFiles({ @@ -62,16 +59,16 @@ export default function () { // files were created successfully .then(() => ng('build', '--extract-css')) .then(() => expectFileToMatch('dist/test-project/styles.css', /h1\s*{\s*color: red;\s*}/)) - .then(() => expectFileToMatch('dist/test-project/main.js', /h2.*{.*color: red;.*}/)) + .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /h2.*{.*color: red;.*}/)) .then(() => expectFileToMatch('dist/test-project/styles.css', /h3\s*{\s*color: #008000;\s*}/)) - .then(() => expectFileToMatch('dist/test-project/main.js', /h4.*{.*color: #008000;.*}/)) + .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /h4.*{.*color: #008000;.*}/)) .then(() => expectFileToMatch('dist/test-project/styles.css', /h5\s*{\s*color: #ADDADD;\s*}/)) - .then(() => expectFileToMatch('dist/test-project/main.js', /h6.*{.*color: #ADDADD;.*}/)) + .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /h6.*{.*color: #ADDADD;.*}/)) .then(() => ng('build', '--extract-css', '--aot')) .then(() => expectFileToMatch('dist/test-project/styles.css', /h1\s*{\s*color: red;\s*}/)) - .then(() => expectFileToMatch('dist/test-project/main.js', /h2.*{.*color: red;.*}/)) + .then(() => expectFileToMatch('dist/test-project/main-es5.js', /h2.*{.*color: red;.*}/)) .then(() => expectFileToMatch('dist/test-project/styles.css', /h3\s*{\s*color: #008000;\s*}/)) - .then(() => expectFileToMatch('dist/test-project/main.js', /h4.*{.*color: #008000;.*}/)) + .then(() => expectFileToMatch('dist/test-project/main-es5.js', /h4.*{.*color: #008000;.*}/)) .then(() => expectFileToMatch('dist/test-project/styles.css', /h5\s*{\s*color: #ADDADD;\s*}/)) - .then(() => expectFileToMatch('dist/test-project/main.js', /h6.*{.*color: #ADDADD;.*}/)); + .then(() => expectFileToMatch('dist/test-project/main-es5.js', /h6.*{.*color: #ADDADD;.*}/)); } From 4aaec9c7467d0ec6f7db4b5345e86c2de4799891 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 14 Sep 2019 06:14:29 +0300 Subject: [PATCH 0163/1070] build: update @angular/animations to version (#15577) --- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 8e8bc1cfba50..8a3d86df76ab 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#400e3b7b9002fd03c104fc41bbf2f7da48d65ce4", - "@angular/common": "github:angular/common-builds#658ba4451a93c239804ef76afeeb0601b4b82140", - "@angular/compiler": "github:angular/compiler-builds#c133f4b7c727e39eb6c9c8d4405642511395a5ec", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#fa897a47e6de4018e6dab20be48ad32a6c766060", - "@angular/core": "github:angular/core-builds#8f1daaa80dd025baf338b45bd817fbc340323f30", - "@angular/forms": "github:angular/forms-builds#ca5e8f03bad481ae24eab3dcf32aff0ac62e425a", - "@angular/language-service": "github:angular/language-service-builds#cffc78e2ed454a5f9641ca925a6b18fd40c44038", - "@angular/platform-browser": "github:angular/platform-browser-builds#000295ed030f21459fddf0d112889002c1ba6db3", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#a74450b34b22b2a5cd8898772bda36bed74a993b", - "@angular/router": "github:angular/router-builds#6bacca23cdce73ccd20f79280920b1558a55cd53" + "@angular/animations": "github:angular/animations-builds#ed957441d6698aa0eb3dd54d223ff7cd14d89bbc", + "@angular/common": "github:angular/common-builds#7095bc662820b6657fa233eaea17351ce04dd03d", + "@angular/compiler": "github:angular/compiler-builds#f1316e136b68f568e742e8fef61d26cc841f554d", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#1af3f1d0850e337cd87d17eeb539f9b2a80d77c6", + "@angular/core": "github:angular/core-builds#e60f85858483086960e727cdffba02dd4d7820c5", + "@angular/forms": "github:angular/forms-builds#3b0118d912b184776b99da101d82bb8e707814a5", + "@angular/language-service": "github:angular/language-service-builds#9afec9af703a65739caa41031984f31113308eb1", + "@angular/platform-browser": "github:angular/platform-browser-builds#6fad57d61274f910af0990095ecf54a09a56ac70", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d179293ef0859b8ede41e3088078d992866f803d", + "@angular/router": "github:angular/router-builds#70afeb561103c2503090c286efb0d95e2139cd5f" } } \ No newline at end of file From 0d0d124a6d4ec17b8bb26068301be7286664b875 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Tue, 17 Sep 2019 11:34:09 -0400 Subject: [PATCH 0164/1070] build: yarn upgrade lock update (#15589) * build: yarn upgrade lock update * build: change sauce connect proxy name to avoid npm package shadowing `sauce-connect` is an old npm package. Using the name for the saucelabs proxy tool causes false security vulnerability warnings. * build: update license exceptions mainly removal of now unneeded exceptions --- package.json | 6 +- .../angular_devkit/build_angular/package.json | 22 +- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- scripts/saucelabs/start-tunnel.sh | 2 +- scripts/validate-licenses.ts | 17 +- .../angular-app/src/polyfills.ts | 6 - .../e2e/assets/webpack/test-app/package.json | 16 +- yarn.lock | 3809 +++++------------ 9 files changed, 1098 insertions(+), 2788 deletions(-) diff --git a/package.json b/package.json index b12fbe6bfc0e..0e6fa7fc6118 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.4", - "@angular/compiler-cli": "~9.0.0-next.4", + "@angular/compiler": "9.0.0-next.4", + "@angular/compiler-cli": "9.0.0-next.4", "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.28.0", "@bazel/jasmine": "0.37.0", @@ -127,7 +127,7 @@ "pidtree": "^0.3.0", "pidusage": "^2.0.17", "rxjs": "~6.4.0", - "sauce-connect": "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz", + "sauce-connect-proxy": "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz", "semver": "6.3.0", "source-map": "^0.7.3", "source-map-support": "^0.5.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 54bf829b3db4..3b5baf8f3fd5 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -65,19 +65,19 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "~9.0.0-next.4", + "@angular/animations": "9.0.0-next.4", "@angular/cdk": "~8.2.0", - "@angular/common": "~9.0.0-next.4", - "@angular/compiler": "~9.0.0-next.4", - "@angular/compiler-cli": "~9.0.0-next.4", - "@angular/core": "~9.0.0-next.4", - "@angular/forms": "~9.0.0-next.4", + "@angular/common": "9.0.0-next.4", + "@angular/compiler": "9.0.0-next.4", + "@angular/compiler-cli": "9.0.0-next.4", + "@angular/core": "9.0.0-next.4", + "@angular/forms": "9.0.0-next.4", "@angular/material": "~8.2.0", - "@angular/platform-browser": "~9.0.0-next.4", - "@angular/platform-browser-dynamic": "~9.0.0-next.4", - "@angular/platform-server": "~9.0.0-next.4", - "@angular/router": "~9.0.0-next.4", - "@angular/service-worker": "~9.0.0-next.4", + "@angular/platform-browser": "9.0.0-next.4", + "@angular/platform-browser-dynamic": "9.0.0-next.4", + "@angular/platform-server": "9.0.0-next.4", + "@angular/router": "9.0.0-next.4", + "@angular/service-worker": "9.0.0-next.4", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 4fc3b4470a11..a8bc263ab8c6 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.4", - "@angular/compiler-cli": "~9.0.0-next.4", + "@angular/compiler": "9.0.0-next.4", + "@angular/compiler-cli": "9.0.0-next.4", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.5.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 60b69259e95a..3c2726007ec6 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "~9.0.0-next.4", - "@angular/compiler-cli": "~9.0.0-next.4", + "@angular/compiler": "9.0.0-next.4", + "@angular/compiler-cli": "9.0.0-next.4", "typescript": "3.5.3", "webpack": "4.40.2" } diff --git a/scripts/saucelabs/start-tunnel.sh b/scripts/saucelabs/start-tunnel.sh index 34bf0a7b5bc9..8aeaa8a25cdc 100755 --- a/scripts/saucelabs/start-tunnel.sh +++ b/scripts/saucelabs/start-tunnel.sh @@ -32,4 +32,4 @@ fi echo "Starting Sauce Connect. Passed arguments: ${sauceArgs}" -${currentDir}/../../node_modules/sauce-connect/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs} +${currentDir}/../../node_modules/sauce-connect-proxy/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs} diff --git a/scripts/validate-licenses.ts b/scripts/validate-licenses.ts index c0c7a82ff82c..1a685e7b62d4 100644 --- a/scripts/validate-licenses.ts +++ b/scripts/validate-licenses.ts @@ -64,27 +64,14 @@ const ignoredPackages = [ // Us. '@angular/devkit-repo@0.0.0', // Hey, that's us! // * Development only - 'spdx-license-ids@3.0.1', // CC0 but it's content only (index.json, no code) and not distributed. + 'spdx-license-ids@3.0.5', // CC0 but it's content only (index.json, no code) and not distributed. 'tslint-sonarts@1.9.0', // LGPL-3.0 but only used as a tool, not linked in the build. // * Broken license fields - 'bitsyntax@0.0.4', // MIT but no license field in package.json - 'pako@1.0.6', // MIT but broken license in package.json - 'true-case-path@1.0.2', // Apache-2.0 but broken license in package.json - 'uws@9.14.0', // zlib license - - // * Need to publish these with LICENSE files - // see https://github.com/bazelbuild/rules_nodejs/pull/696 - // TODO(alexeagle): remove these after a release that fixes it - '@bazel/bazel@0.24.1', - '@bazel/bazel-linux_x64@0.24.1', - '@bazel/buildifier@0.22.0', - '@bazel/buildifier-linux_x64@0.22.0', - '@bazel/jasmine@0.26.0', + 'pako@1.0.10', // MIT but broken license in package.json // * Other 'font-awesome@4.7.0', // (OFL-1.1 AND MIT) - 'stream-json@0.5.2', // 'New BSD' ]; // Ignore own packages (all MIT) diff --git a/tests/angular_devkit/build_webpack/angular-app/src/polyfills.ts b/tests/angular_devkit/build_webpack/angular-app/src/polyfills.ts index d7fd9a7ba789..1b2d66b61857 100644 --- a/tests/angular_devkit/build_webpack/angular-app/src/polyfills.ts +++ b/tests/angular_devkit/build_webpack/angular-app/src/polyfills.ts @@ -47,12 +47,6 @@ /** IE10 and IE11 requires the following for the Reflect API. */ // import 'core-js/es6/reflect'; - -/** Evergreen browsers require these. **/ -// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. -import 'core-js/es7/reflect'; - - /** * Required to support Web Animations `@angular/platform-browser/animations`. * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json index 9cdd7b6c1045..8f7615d11cb4 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "~9.0.0-next.4", - "@angular/compiler": "~9.0.0-next.4", - "@angular/compiler-cli": "~9.0.0-next.4", - "@angular/core": "~9.0.0-next.4", - "@angular/platform-browser": "~9.0.0-next.4", - "@angular/platform-browser-dynamic": "~9.0.0-next.4", - "@angular/platform-server": "~9.0.0-next.4", - "@angular/router": "~9.0.0-next.4", + "@angular/common": "9.0.0-next.4", + "@angular/compiler": "9.0.0-next.4", + "@angular/compiler-cli": "9.0.0-next.4", + "@angular/core": "9.0.0-next.4", + "@angular/platform-browser": "9.0.0-next.4", + "@angular/platform-browser-dynamic": "9.0.0-next.4", + "@angular/platform-server": "9.0.0-next.4", + "@angular/router": "9.0.0-next.4", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.0", diff --git a/yarn.lock b/yarn.lock index 28601802fbc1..adcc563d5dfb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@angular/animations@~9.0.0-next.4": +"@angular/animations@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.4.tgz#ffca16eb7c431975bc46fd0926f8ff6f4908cac3" integrity sha512-CvClnTIXKuhrpLjvpjFTsZGLeM1xiXHGSn7YDUedDVycpKl8/ZjNq082xoNKM4JrUe4jQwFpWMJ08fsCLVEYaw== @@ -18,14 +18,14 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@~9.0.0-next.4": +"@angular/common@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.4.tgz#e97fcaf077674324b6566571fdb89d24e05de7bc" integrity sha512-L1Q9x1PzPqQOg0Qoz9seAXSpnZU93G3M7HRuUJPlCsCpRrwqa6L6RwJ6k06x3lZwZuYTvBfTpwbe4pLzLZU83g== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@~9.0.0-next.4": +"@angular/compiler-cli@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.4.tgz#4d7795c67680ba8fda66217f5bf762e4362fe2dd" integrity sha512-j+r1PSijg2bnypj79ZytBbo7AB/WNQPEkP3cbnuRbRZ/Ear1EUimBILTp1dERjGZssZC8sKsU7wGSdrAS7kA6A== @@ -41,21 +41,21 @@ tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@~9.0.0-next.4": +"@angular/compiler@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.4.tgz#582005a2f71b3731aa71a0ca575080c948fbe094" integrity sha512-5sBi9nw084jN5ioLh4fal1/0R6Ow/AqI0S9L/1epe9Fg6J1KBszhBnYxzTgHiufsVGtRaGMJ74IEMODvdhz8aw== dependencies: tslib "^1.9.0" -"@angular/core@~9.0.0-next.4": +"@angular/core@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.4.tgz#823efd8993cda93a92f5072a4c4da330c9df8a4b" integrity sha512-xstWREvfGUJ/o3wdLG115KkiLeiUCWY5lMLOKfukMwDALGl76jej2CQyDdjDZF6MhWvNYNLeIrWva5br99KJSw== dependencies: tslib "^1.9.0" -"@angular/forms@~9.0.0-next.4": +"@angular/forms@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.4.tgz#93ac4bdb3c0f565d0436361b70c672d8d51512ef" integrity sha512-nlmXJ9VKQhDVEg680NFxgFwFGB4fe9zlBBcc7Tg439X0u6ofw1CerGBaze5fJaYa34HpCnvoHbe3v8+31gXfjw== @@ -69,21 +69,21 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@~9.0.0-next.4": +"@angular/platform-browser-dynamic@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.4.tgz#c1b3aa5b2b3f83892dd13145a0e1f60f919c1511" integrity sha512-YeybAWOkdEdbmgzulZzXO8HddAEhciESuOWNa9Mx3V9ZB+ofaEHf+Syo7ADhSo2+hdbjVjIp9E11A1C7kOtYug== dependencies: tslib "^1.9.0" -"@angular/platform-browser@~9.0.0-next.4": +"@angular/platform-browser@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.4.tgz#5620bbf003b9317594be6db4e49997f9e4575bcf" integrity sha512-ikD0wL/2jprYai4xb5V4XMO9UjYwiavBHHxJOY6GeWTeMUh++9kuSq5QvzkOBmtlHUnDMvjic0h/pEran/68Ew== dependencies: tslib "^1.9.0" -"@angular/platform-server@~9.0.0-next.4": +"@angular/platform-server@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.4.tgz#b8715743531ac3c85dfa82cefca7519d3cfbf49c" integrity sha512-do8QRGDLj02Jt2b2wablTaklCLD6yixxCZBm9qu2QY2eHUfX7HPBSzl0AyfoiR6Y7Vx7WPCkF9iwtU2tzggrtg== @@ -92,28 +92,21 @@ tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@~9.0.0-next.4": +"@angular/router@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.4.tgz#9a8bfd2c7c2de6943e819e2aad5aa40255a81a9d" integrity sha512-VNdIPQUXZAOvxa0K14JEYImeAobTwjrrjTovU7016nzv5sUZ8BrTYpY56w80n570PqnvEon+eKGAP0oZk+nwqA== dependencies: tslib "^1.9.0" -"@angular/service-worker@~9.0.0-next.4": +"@angular/service-worker@9.0.0-next.4": version "9.0.0-next.4" resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.4.tgz#de8a7e8fb40ffdd0a42511f53a780485c9f06f93" integrity sha512-MoFNKj/UaamK//Z60gmCcxJ/fEjHSZlABDXrPQe6NJ/gB4lVKApVroWFYeFRXGfTNcHtPIe4QEwMe76kFpzcCw== dependencies: tslib "^1.9.0" -"@babel/code-frame@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/code-frame@^7.5.5": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== @@ -140,18 +133,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.5.tgz#873a7f936a3c89491b43536d12245b626664e3cf" - integrity sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ== - dependencies: - "@babel/types" "^7.5.5" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/generator@^7.6.0": +"@babel/generator@^7.4.0", "@babel/generator@^7.6.0": version "7.6.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.0.tgz#e2c21efbfd3293ad819a2359b448f002bfdfda56" integrity sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA== @@ -327,25 +309,15 @@ "@babel/types" "^7.6.0" "@babel/highlight@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" - integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" + integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.2": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.3.tgz#2c92469bac2b7fbff810b67fca07bd138b48af77" - integrity sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w== - -"@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" - integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== - -"@babel/parser@^7.6.0": +"@babel/parser@^7.4.3", "@babel/parser@^7.6.0": version "7.6.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.0.tgz#3e05d0647432a8326cb28d0de03895ae5a57f39b" integrity sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ== @@ -737,25 +709,14 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/template@^7.1.0": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" - integrity sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.1.2" - "@babel/types" "^7.1.2" - -"@babel/template@^7.4.0", "@babel/template@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" - integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw== +"@babel/runtime@^7.4.5": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.0.tgz#4fc1d642a9fd0299754e8b5de62c631cf5568205" + integrity sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ== dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.4.4" - "@babel/types" "^7.4.4" + regenerator-runtime "^0.13.2" -"@babel/template@^7.6.0": +"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.6.0": version "7.6.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== @@ -764,22 +725,7 @@ "@babel/parser" "^7.6.0" "@babel/types" "^7.6.0" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb" - integrity sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.5.5" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.5.5" - "@babel/types" "^7.5.5" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/traverse@^7.6.0": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.0": version "7.6.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.0.tgz#389391d510f79be7ce2ddd6717be66d3fed4b516" integrity sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ== @@ -794,25 +740,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.1.2": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.3.tgz#3a767004567060c2f40fca49a304712c525ee37d" - integrity sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA== - dependencies: - esutils "^2.0.2" - lodash "^4.17.10" - to-fast-properties "^2.0.0" - -"@babel/types@^7.2.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a" - integrity sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - -"@babel/types@^7.6.0": +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0": version "7.6.1" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g== @@ -872,9 +800,9 @@ "@bazel/buildifier-win32_x64" "0.28.0" "@bazel/hide-bazel-files@latest": - version "0.36.0" - resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.36.0.tgz#3fb7c7c5f579f46dd1efd1b3890f11351aa8e65c" - integrity sha512-RgJWR1rOgyU4smruUK3MFA06DKt3AFCcfi9L8u/h11EjOrfLJgnzBJIGDXvW2zzhgnEJ9RRafOUHKN6blDksGg== + version "0.37.0" + resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.37.0.tgz#3c30a3f64f0b976c8c0e8dd236b0f26db0f6f860" + integrity sha512-aVReQa7UxWjBNTsZTAmFKHujTaDxlMUEq2BgvP7mYp1nnZjsCI30SjzPkTn77Ghw4/lK8lhht7AdfWPQp271pQ== "@bazel/jasmine@0.37.0": version "0.37.0" @@ -912,6 +840,14 @@ source-map-support "0.5.9" tsutils "2.27.2" +"@mark.probst/unicode-properties@~1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@mark.probst/unicode-properties/-/unicode-properties-1.1.0.tgz#5caafeab4737df93163d6d288007df33f9939b80" + integrity sha512-7AQsO0hMmpqDledV7AhBuSYqYPFsKP9PaltMecX9nlnsyFxqtsqUg9/pvB2L/jxvskrDrNkdKYz2KTbQznCtng== + dependencies: + brfs "^1.4.0" + unicode-trie "^0.3.0" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -970,13 +906,6 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== -"@szmarczak/http-timer@^1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.1.tgz#6402258dfe467532b26649ef076b4d11f74fb612" - integrity sha512-WljfOGkmSJe8SUkl+4TPvN2ec0dpUGVyfTBQLoXJUiILs+wBSc4Kvp2N3aAWE4VwwDSLGdmD3/bufS5BgZpVSQ== - dependencies: - defer-to-connect "^1.0.1" - "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" @@ -990,14 +919,14 @@ integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA== "@types/bluebird@*": - version "3.5.26" - resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.26.tgz#a38c438ae84fa02431d6892edf86e46edcbca291" - integrity sha512-aj2mrBLn5ky0GmAg6IPXrQjnN0iB/ulozuJ+oZdrHRAzRbXjGmu4UXsNCjFvPbSaaPZmniocdOzsM392qLOlmQ== + version "3.5.27" + resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.27.tgz#61eb4d75dc6bfbce51cf49ee9bbebe941b2cb5d0" + integrity sha512-6BmYWSBea18+tSjjSC3QIyV93ZKAeNWGM7R6aYt1ryTZXrlHF+QLV0G2yV0viEGVyRkyQsWfMoJ0k/YghBX5sQ== "@types/body-parser@*": - version "1.17.0" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.0.tgz#9f5c9d9bd04bb54be32d5eb9fc0d8c974e6cf58c" - integrity sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w== + version "1.17.1" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.1.tgz#18fcf61768fb5c30ccc508c21d6fd2e8b3bf7897" + integrity sha512-RoX2EZjMiFMjZh9lmYrwgoP9RTpAjSHiJxdp4oidAQVO02T7HER3xj9UKue5534ULWeqVEkujhWcyvUce+d68w== dependencies: "@types/connect" "*" "@types/node" "*" @@ -1013,9 +942,9 @@ integrity sha512-g28510gzJpFL0xqvuGAlI+dfIr3qvUcZQVFc7f7u2VlWVqI1oBkWhGLYh3fXfoflR7HRnU4w0NRux0pPJQ7VVg== "@types/caseless@*": - version "0.12.1" - resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.1.tgz#9794c69c8385d0192acc471a540d1f8e0d16218a" - integrity sha512-FhlMa34NHp9K5MY1Uz8yb+ZvuX0pnvn3jScRSNAb75KHGB8d3rEU6hqMs3Z2vjuytcMfRg6c5CHMc3wtYyD2/A== + version "0.12.2" + resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" + integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== "@types/clean-css@^4.2.1": version "4.2.1" @@ -1025,9 +954,9 @@ "@types/node" "*" "@types/connect-history-api-fallback@*": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.2.tgz#40a497500238ebf30ae28fdf687c2f92969f2635" - integrity sha512-tobKLYh5XszXIQ2lHTeyK1wMi/3K5WiOKb/sl6MENCirlOcXw0jUBHHmST2dLKnYMv6WHWPOSmR8jIF3za0MBQ== + version "1.3.3" + resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.3.tgz#4772b79b8b53185f0f4c9deab09236baf76ee3b4" + integrity sha512-7SxFCd+FLlxCfwVwbyPxbR4khL9aNikJhrorw8nUIOqeuooc9gifBuDQOJw5kzN7i6i3vLn9G8Wde/4QDihpYw== dependencies: "@types/express-serve-static-core" "*" "@types/node" "*" @@ -1040,17 +969,18 @@ "@types/node" "*" "@types/copy-webpack-plugin@^4.4.1": - version "4.4.2" - resolved "https://registry.yarnpkg.com/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.4.2.tgz#6dfac0dc8692378f76a20c6c1bbe01eec438f316" - integrity sha512-/L0m5kc7pKGpsu97TTgAP6YcVRmau2Wj0HpRPQBGEbZXT1DZkdozZPCZHGDWXpxcvWDFTxob2JmYJj3RC7CwFA== + version "4.4.4" + resolved "https://registry.yarnpkg.com/@types/copy-webpack-plugin/-/copy-webpack-plugin-4.4.4.tgz#fefc44f0c3526a4852a0b708dadfed9fc4ad22b0" + integrity sha512-D8NyCMfHFWi638Cn5gi88mELGrISQdzDAcmOk4j70bzm0kLey99Zp5xsFsL44qPi+a22tcB39U5jiJiV2XMd9A== dependencies: "@types/minimatch" "*" + "@types/node" "*" "@types/webpack" "*" "@types/debug@^4.1.2": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.2.tgz#84824e9259fc583dd9385635738359c9582f7f82" - integrity sha512-jkf6UiWUjcOqdQbatbvOm54/YbCdjt3JjiAzT/9KS2XtMmOkYHdKsI5u8fulhbuTUuiqNBfa6J5GSDiwjK+zLA== + version "4.1.5" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" + integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== "@types/estree@0.0.39": version "0.0.39" @@ -1058,23 +988,22 @@ integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== "@types/events@*": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" - integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA== + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== "@types/express-serve-static-core@*": - version "4.16.0" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz#fdfe777594ddc1fe8eb8eccce52e261b496e43e7" - integrity sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w== + version "4.16.9" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.9.tgz#69e00643b0819b024bdede95ced3ff239bb54558" + integrity sha512-GqpaVWR0DM8FnRUJYKlWgyARoBUAVfRIeVDZQKOttLFp5SmhhF9YFIYeTPwMd/AXfxlP7xVO2dj1fGu0Q+krKQ== dependencies: - "@types/events" "*" "@types/node" "*" "@types/range-parser" "*" "@types/express@*", "@types/express@^4.16.0": - version "4.16.0" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.16.0.tgz#6d8bc42ccaa6f35cf29a2b7c3333cb47b5a32a19" - integrity sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w== + version "4.17.1" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.1.tgz#4cf7849ae3b47125a567dfee18bfca4254b88c5c" + integrity sha512-VfH/XCP0QbQk5B5puLqTLEeFgR8lfCJHZJKkInZ9mkYd+u8byX0kztXEQxEk4wZXJs8HI+7km2ALXjn4YKcX9w== dependencies: "@types/body-parser" "*" "@types/express-serve-static-core" "*" @@ -1085,13 +1014,6 @@ resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-2.0.0.tgz#6ee79b947b8e51ce8c565fc8278822b2605609db" integrity sha512-LHAReDNv7IVTE2Q+nPcRBgUZAUKPJIvR7efMrWgx69442KMoMK+QYjtTtK9WGUdaqUYVLkd/0cvCfb55LFWsVw== -"@types/form-data@*": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e" - integrity sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ== - dependencies: - "@types/node" "*" - "@types/glob@^7.0.0", "@types/glob@^7.1.1": version "7.1.1" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" @@ -1102,21 +1024,19 @@ "@types/node" "*" "@types/http-proxy-middleware@*": - version "0.17.5" - resolved "https://registry.yarnpkg.com/@types/http-proxy-middleware/-/http-proxy-middleware-0.17.5.tgz#efdeb4be652744422d57929f3c4ea31a2e627a45" - integrity sha512-mUqVzfaiOknDT2QJ7g8f2c37G4ZDqDNt08QdUkFCu19Ey5+2SZ0rWHMG00GRJ7g+SgHvl/9weZYuWLXr7RgiCg== + version "0.19.3" + resolved "https://registry.yarnpkg.com/@types/http-proxy-middleware/-/http-proxy-middleware-0.19.3.tgz#b2eb96fbc0f9ac7250b5d9c4c53aade049497d03" + integrity sha512-lnBTx6HCOUeIJMLbI/LaL5EmdKLhczJY5oeXZpX/cXE4rRqb3RmV7VcMpiEfYkmTjipv3h7IAyIINe4plEv7cA== dependencies: "@types/connect" "*" "@types/http-proxy" "*" "@types/node" "*" - winston "^3.0.0" "@types/http-proxy@*": - version "1.16.2" - resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.16.2.tgz#16cb373b52fff2aa2f389d23d940ed4a642349e5" - integrity sha512-GgqePmC3rlsn1nv+kx5OviPuUBU2omhnlXOaJSXFgOdsTcScNFap+OaCb2ip9Bm4m5L8EOehgT5d9M4uNB90zg== + version "1.17.0" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.0.tgz#baf82ff6aa2723fd29f90e3ba1384e665006863e" + integrity sha512-l+s0IoxSHqhLFJPDHRfO235kgrCkvFD8JmdV/T9C4BKBYPIjrQopGFH4r7h2e3jQqgJRCthRCAZIxDoFnj1zwQ== dependencies: - "@types/events" "*" "@types/node" "*" "@types/inquirer@^0.0.44": @@ -1133,9 +1053,9 @@ integrity sha512-6pUnBg6DuSB55xnxJ5+gW9JOkFrPsXkYAuqqEE8oyrpgDiPQ+TZ+1Zt4S+CHcRJcxyNYXeIXG4vHSzdF6y9Uvw== "@types/karma@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/karma/-/karma-3.0.2.tgz#c66654ea7167ae9fb62880ad2ef99cc18b64940d" - integrity sha512-xm+iMKgLSpTPo1Z7wLKbrZt8aLzA1udb9UOb9+OSDMFIufqlbp0DXQpY75EQ3ETi6EJiaohIodBlMs+UD4NSMQ== + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/karma/-/karma-3.0.3.tgz#7b920e8cc6dc9e0ffed52677d254a42da9eeb8d5" + integrity sha512-mkJejrAacgignkBce2+qD9S4VncjEfAT0Dion0fRcqpav3Sd2KiLTHODZOXRP3S8b0ZY5sXr9meDB3P8MSH8Cg== dependencies: "@types/bluebird" "*" "@types/node" "*" @@ -1155,9 +1075,9 @@ integrity sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q== "@types/mime@*": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" - integrity sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA== + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" + integrity sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw== "@types/minimatch@*": version "3.0.3" @@ -1170,31 +1090,31 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node-fetch@^2.1.6": - version "2.1.6" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.1.6.tgz#4326288b49f352a142f03c63526ebce0f4c50877" - integrity sha512-Hv1jgh3pfpUEl2F2mqUd1AfLSk1YbUCeBJFaP36t7esAO617dErqdxWb5cdG2NfJGOofkmBW36fdx0dVewxDRg== + version "2.5.0" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.0.tgz#1c55616a4591bdd15a389fbd0da4a55b9502add5" + integrity sha512-TLFRywthBgL68auWj+ziWu+vnmmcHCDFC/sqCOQf1xTz4hRq8cu79z8CtHU9lncExGBsB8fXA4TiLDLt6xvMzw== dependencies: "@types/node" "*" -"@types/node@*", "@types/node@10.9.4": +"@types/node@*", "@types/node@^12.7.5": + version "12.7.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.5.tgz#e19436e7f8e9b4601005d73673b6dc4784ffcc2f" + integrity sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w== + +"@types/node@10.9.4": version "10.9.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.4.tgz#0f4cb2dc7c1de6096055357f70179043c33e9897" integrity sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw== "@types/node@^10.1.0": - version "10.14.15" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.15.tgz#e8f7729b631be1b02ae130ff0b61f3e018000640" - integrity sha512-CBR5avlLcu0YCILJiDIXeU2pTw7UK/NIxfC63m7d7CVamho1qDEzXKkOtEauQRPMy6MI8mLozth+JJkas7HY6g== - -"@types/node@^12.6.2": - version "12.6.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" - integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== + version "10.14.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.18.tgz#b7d45fc950e6ffd7edc685e890d13aa7b8535dce" + integrity sha512-ryO3Q3++yZC/+b8j8BdKd/dn9JlzlHBPdm80656xwYUdmPkpTGTjkAdt6BByiNupGPE8w0FhBgvYy/fX9hRNGQ== -"@types/node@^6.0.46": - version "6.14.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.14.0.tgz#85c6998293fc6f2945915419296c7fbb63384f66" - integrity sha512-6tQyh4Q4B5pECcXBOQDZ5KjyBIxRZGzrweGPM47sAYTdVG4+7R+2EGMTmp0h6ZwgqHrFRCeg2gdhsG9xXEl2Sg== +"@types/normalize-package-data@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" + integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== "@types/progress@2.0.3", "@types/progress@^2.0.3": version "2.0.3" @@ -1205,23 +1125,23 @@ "@types/q@^0.0.32": version "0.0.32" - resolved "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" + resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" integrity sha1-vShOV8hPEyXacCur/IKlMoGQwMU= "@types/range-parser@*": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.2.tgz#fa8e1ad1d474688a757140c91de6dace6f4abc8d" - integrity sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw== + version "1.2.3" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" + integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== "@types/request@^2.47.1": - version "2.47.1" - resolved "https://registry.yarnpkg.com/@types/request/-/request-2.47.1.tgz#25410d3afbdac04c91a94ad9efc9824100735824" - integrity sha512-TV3XLvDjQbIeVxJ1Z3oCTDk/KuYwwcNKVwz2YaT0F5u86Prgc4syDAp6P96rkTQQ4bIdh+VswQIC9zS6NjY7/g== + version "2.48.3" + resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.3.tgz#970b8ed2317568c390361d29c555a95e74bd6135" + integrity sha512-3Wo2jNYwqgXcIz/rrq18AdOZUQB8cQ34CXZo+LUwPJNpvRAL86+Kc2wwI8mqpz9Cr1V+enIox5v+WZhy/p3h8w== dependencies: "@types/caseless" "*" - "@types/form-data" "*" "@types/node" "*" "@types/tough-cookie" "*" + form-data "^2.5.0" "@types/resolve@0.0.8": version "0.0.8" @@ -1306,9 +1226,9 @@ "@types/rx-lite" "*" "@types/rx-lite@*": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/rx-lite/-/rx-lite-4.0.5.tgz#b3581525dff69423798daa9a0d33c1e66a5e8c4c" - integrity sha512-KZk5XTR1dm/kNgBx8iVpjno6fRYtAUQWBOmj+O8j724+nk097sz4fOoHJNpCkOJUtHUurZlJC7QvSFCZHbkC+w== + version "4.0.6" + resolved "https://registry.yarnpkg.com/@types/rx-lite/-/rx-lite-4.0.6.tgz#3c02921c4244074234f26b772241bcc20c18c253" + integrity sha512-oYiDrFIcor9zDm0VDUca1UbROiMYBxMLMaM6qzz4ADAfOmA9r1dYEcAFH+2fsPI5BCCjPvV9pWC3X3flbrvs7w== dependencies: "@types/rx-core" "*" "@types/rx-core-binding" "*" @@ -1332,19 +1252,19 @@ "@types/rx-lite-virtualtime" "*" "@types/selenium-webdriver@^3.0.0": - version "3.0.12" - resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.12.tgz#6affe5aed1ba379175075a889adbe2bc3aa62159" - integrity sha512-hYn+eoOehVUIdMwp5h34ZsGAO1ydja10GDup4BwyoFCdcH5MQ35nQq+AInSaBMEMopD5hEooFCyKo2Pajbe1ag== + version "3.0.16" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz#50a4755f8e33edacd9c406729e9b930d2451902a" + integrity sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA== "@types/semver@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.0.0.tgz#86ba89f02a414e39c68d02b351872e4ed31bd773" - integrity sha512-OO0srjOGH99a4LUN2its3+r6CBYcplhJ466yLqs+zvAWgphCpS8hYZEZ797tRDP/QKcqTdb/YCN6ifASoAWkrQ== + version "6.0.2" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.0.2.tgz#5e8b09f0e4af53034b1d0fb9977a277847836205" + integrity sha512-G1Ggy7/9Nsa1Jt2yiBR2riEuyK2DFNnqow6R7cromXPMNynackRY1vqFTLz/gwnef1LHokbXThcPhqMRjUbkpQ== "@types/serve-static@*": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.2.tgz#f5ac4d7a6420a99a6a45af4719f4dcd8cd907a48" - integrity sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q== + version "1.13.3" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1" + integrity sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g== dependencies: "@types/express-serve-static-core" "*" "@types/mime" "*" @@ -1367,30 +1287,31 @@ "@types/node" "*" "@types/tough-cookie@*": - version "2.3.3" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.3.tgz#7f226d67d654ec9070e755f46daebf014628e9d9" - integrity sha512-MDQLxNFRLasqS4UlkWMSACMKeSm1x4Q3TxzUC7KQUsh6RK1ZrQ0VEyE3yzXcBu+K8ejVj4wuX32eUG02yNp+YQ== + version "2.3.5" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.5.tgz#9da44ed75571999b65c37b60c9b2b88db54c585d" + integrity sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg== "@types/uglify-js@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.3.tgz#801a5ca1dc642861f47c46d14b700ed2d610840b" - integrity sha512-MAT0BW2ruO0LhQKjvlipLGCF/Yx0y/cj+tT67tK3QIQDrM2+9R78HgJ54VlrE8AbfjYJJBCQCEPM5ZblPVTuww== + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082" + integrity sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ== dependencies: source-map "^0.6.1" "@types/universal-analytics@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@types/universal-analytics/-/universal-analytics-0.4.2.tgz#d21a122a984bf8261eb206bcb7ccb1c0e8353d04" - integrity sha512-ndv0aYA5tNPdl4KYUperlswuiSj49+o7Pwx8hrCiE9x2oeiMrn7A2jXFDdTLFIymiYZImDX02ycq0i6uQ3TL0A== + version "0.4.3" + resolved "https://registry.yarnpkg.com/@types/universal-analytics/-/universal-analytics-0.4.3.tgz#8cc5e9a69df0e3c9714bdcf101d8d93df2a6d247" + integrity sha512-CCM1yPGAAg/WRlBEUIzRAqEE0G84n1btOVRybHgQ+AdA6+LgM0DeDH8yBWtcpg3HcrLHA9JWiHwPpySlo5GtZA== -"@types/urijs@github:quicktype/types-urijs": - version "1.0.1" - resolved "https://codeload.github.com/quicktype/types-urijs/tar.gz/a23603a04e31e883a92244bff8515e3d841a8b98" +"@types/urijs@^1.19.1": + version "1.19.3" + resolved "https://registry.yarnpkg.com/@types/urijs/-/urijs-1.19.3.tgz#ed90d38baf3eff1627544ad6ed3bcdeb79ef3533" + integrity sha512-L5tP2dEIV+OMVEVRhf8PCFMNMyO5ZBodrXpEqnGczky60lcv8l5Kl9Yi4J1yxhSVfHUe+Pr2nXJfDM+rUYNs3w== "@types/uuid@^3.4.4": - version "3.4.4" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.4.tgz#7af69360fa65ef0decb41fd150bf4ca5c0cefdf5" - integrity sha512-tPIgT0GUmdJQNSHxp0X2jnpQfBSTfGxUMc/2CXBU2mnyTFVYVa2ojpoQ74w0U2yn2vw3jnC640+77lkFFpdVDw== + version "3.4.5" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.5.tgz#d4dc10785b497a1474eae0ba7f0cb09c0ddfd6eb" + integrity sha512-MNL15wC3EKyw1VLF+RoVO4hJJdk9t/Hlv3rt1OL65Qvuadm4BYo6g9ZJQqoq7X8NBFSsQXgAujWciovh2lpVjA== dependencies: "@types/node" "*" @@ -1405,7 +1326,7 @@ "@types/serve-static" "*" "@types/webpack" "*" -"@types/webpack-sources@^0.1.5": +"@types/webpack-sources@*", "@types/webpack-sources@^0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.5.tgz#be47c10f783d3d6efe1471ff7f042611bd464a92" integrity sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w== @@ -1415,14 +1336,15 @@ source-map "^0.6.1" "@types/webpack@*", "@types/webpack@^4.32.1": - version "4.32.1" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.32.1.tgz#6e95010e806f808abd6551c112097ac09035aacf" - integrity sha512-9n38CBx9uga1FEAdTipnt0EkbKpsCJFh7xJb1LE65FFb/A6OOLFX022vYsGC1IyVCZ/GroNg9u/RMmlDxGcLIw== + version "4.39.1" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.1.tgz#d76cd551cc851198f67f75ff3e26551d204530e9" + integrity sha512-rgO9ihNu/l72Sjx3shqwc9r6gi+tOMsqxhMEZhOEVIZt82GFOeUyEdpTk1BO2HqEHLS/XJW8ldUTIIfIMMyYFQ== dependencies: "@types/anymatch" "*" "@types/node" "*" "@types/tapable" "*" "@types/uglify-js" "*" + "@types/webpack-sources" "*" source-map "^0.6.0" "@verdaccio/commons-api@8.0.0": @@ -1643,7 +1565,7 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== -JSONStream@1.3.5, JSONStream@^1.3.4: +JSONStream@1.3.5, JSONStream@^1.0.4, JSONStream@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -1651,33 +1573,17 @@ JSONStream@1.3.5, JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -JSONStream@^1.0.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.4.tgz#615bb2adb0cd34c8f4c447b5f6512fa1d8f16a2e" - integrity sha512-Y7vfi3I5oMOYIr+WxV8NZxDSwcbNgzdKYsTNInmycOq9bUYwGg9ryu57Wg5NLmCjqdFPNUmpMBo3kSJN9tCbXg== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - abab@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" - integrity sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w== + version "2.0.1" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.1.tgz#3fa17797032b71410ec372e11668f4b4ffc86a82" + integrity sha512-1zSbbCuoIjafKZ3mblY5ikvAb0ODUbqBnFuUb7f6uLeQhhGJ0vEV4ntmtxKLT2WgXCO94E07BjunsIw1jOMPZw== abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -accepts@~1.3.4, accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -accepts@~1.3.7: +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== @@ -1686,49 +1592,51 @@ accepts@~1.3.7: negotiator "0.6.2" acorn-globals@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.2.tgz#4e2c2313a597fd589720395f6354b41cd5ec8006" - integrity sha512-BbzvZhVtZP+Bs1J1HcwrQe8ycfO0wStkSGxuul3He3GkHOIZ6eTqOkPuw9IP1X3+IkOo4wiJmwkobzXYz4wewQ== + version "4.3.4" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" + integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== dependencies: acorn "^6.0.1" acorn-walk "^6.0.1" acorn-walk@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" - integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== + version "6.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" + integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== acorn@^5.0.0: version "5.7.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" - integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== - -acorn@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.0.tgz#67f0da2fc339d6cfb5d6fb244fd449f33cd8bbe3" - integrity sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw== +acorn@^6.0.1, acorn@^6.1.1, acorn@^6.2.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" + integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== -acorn@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" - integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== +acorn@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.0.0.tgz#26b8d1cd9a9b700350b71c0905546f64d1284e7a" + integrity sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ== adm-zip@^0.4.9, adm-zip@~0.4.3: - version "0.4.11" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.11.tgz#2aa54c84c4b01a9d0fb89bb11982a51f13e3d62a" - integrity sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA== + version "0.4.13" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a" + integrity sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw== after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0: +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + +agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== @@ -1743,21 +1651,16 @@ agentkeepalive@^3.4.1: humanize-ms "^1.2.1" ajv-errors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59" - integrity sha1-7PAh+hCP0X37Xms4Py3SM+Mf/Fk= - -ajv-keywords@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" - integrity sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo= + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== -ajv-keywords@^3.4.1: +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@6.10.2, ajv@^6.10.2: +ajv@6.10.2, ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== @@ -1767,7 +1670,7 @@ ajv@6.10.2, ajv@^6.10.2: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^5.0.0, ajv@^5.1.0, ajv@^5.3.0: +ajv@^5.0.0, ajv@^5.1.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= @@ -1777,21 +1680,6 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.3.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.1.0: - version "6.5.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.4.tgz#247d5274110db653706b550fcc2b797ca28cfc59" - integrity sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= - ansi-align@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" @@ -1799,7 +1687,7 @@ ansi-align@^3.0.0: dependencies: string-width "^3.0.0" -ansi-colors@3.2.4: +ansi-colors@3.2.4, ansi-colors@^3.0.0: version "3.2.4" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== @@ -1809,11 +1697,6 @@ ansi-colors@4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-colors@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.1.tgz#9638047e4213f3428a11944a7d4b31cba0a3ff95" - integrity sha512-Xt+zb6nqgvV9SWAVp0EG3lRsHcbq5DDgqjPPz6pwgtj6RKz65zGXMNa82oJfOSBA/to6GmRP7Dr+6o+kbApTzQ== - ansi-escapes@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.2.1.tgz#4dccdb846c3eee10f6d64dea66273eab90c37228" @@ -1862,9 +1745,9 @@ anymatch@^2.0.0: normalize-path "^2.1.1" anymatch@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.0.2.tgz#ddb3a8495d44875423af7b919aace11e91732a41" - integrity sha512-rUe9SxpRQlVg4EM8It7JMNWWYHAirTPpbTuvaSKybb5IejNgWB3PGBBX9rrPKDx2pM/p3Wh+7+ASaWRyyAbxmQ== + version "3.1.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.0.tgz#e609350e50a9313b472789b2f14ef35808ee14d6" + integrity sha512-Ozz7l4ixzI7Oxj2+cw+p0tVUt27BpaJ+1+q1TCeANWxHpvyn2+Un+YamBdfKu0uh8xLodGhoa1v7595NhKDAuA== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -1874,10 +1757,10 @@ apache-md5@1.1.2: resolved "https://registry.yarnpkg.com/apache-md5/-/apache-md5-1.1.2.tgz#ee49736b639b4f108b6e9e626c6da99306b41692" integrity sha1-7klza2ObTxCLbp5ibG2pkwa0FpI= -app-root-path@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a" - integrity sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo= +app-root-path@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" + integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== append-transform@^1.0.0: version "1.0.0" @@ -1914,19 +1797,12 @@ aria-query@^3.0.0: ast-types-flow "0.0.7" commander "^2.11.0" -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= - dependencies: - arr-flatten "^1.0.1" - arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= -arr-flatten@^1.0.1, arr-flatten@^1.1.0: +arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== @@ -1952,9 +1828,9 @@ array-flatten@1.1.1: integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= array-flatten@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" - integrity sha1-Qmu52oQJDBg42BLIFQryCoMx4pY= + version "2.1.2" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" + integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== array-ify@^1.0.0: version "1.0.0" @@ -1973,11 +1849,6 @@ array-uniq@^1.0.1: resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= - array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" @@ -2020,10 +1891,11 @@ assert-plus@1.0.0, assert-plus@^1.0.0: integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== dependencies: + object-assign "^4.1.1" util "0.10.3" assign-symbols@^1.0.0: @@ -2036,25 +1908,15 @@ ast-types-flow@0.0.7: resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0= -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - integrity sha1-GdOGodntxufByF04iu28xW0zYC0= - async-each@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.2.tgz#8b8a7ca2a658f927e9f307d6d1a42f4199f0f735" - integrity sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg== - -async-each@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== async-limiter@^1.0.0, async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== async@3.1.0: version "3.1.0" @@ -2066,14 +1928,7 @@ async@^1.5.2: resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= -async@^2.1.2, async@^2.5.0, async@^2.6.0, async@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" - integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== - dependencies: - lodash "^4.17.10" - -async@^2.6.2: +async@^2.1.2, async@^2.5.0, async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== @@ -2120,7 +1975,7 @@ axobject-query@^2.0.2: dependencies: ast-types-flow "0.0.7" -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= @@ -2222,9 +2077,9 @@ base64-arraybuffer@0.1.5: integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= base64-js@^1.0.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== base64id@1.0.0: version "1.0.0" @@ -2268,30 +2123,25 @@ better-assert@~1.0.0: dependencies: callsite "1.0.0" -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== - big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== binary-extensions@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" - integrity sha1-RqoXUftqL5PuXmibsQh9SxTGwgU= + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== binary-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== -blob@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" - integrity sha1-vPEwUspURj8w+fx+lbmkdjCpSSE= +blob@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" + integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== blocking-proxy@^1.0.0: version "1.0.1" @@ -2300,17 +2150,7 @@ blocking-proxy@^1.0.0: dependencies: minimist "^1.2.0" -bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.2.tgz#1be0908e054a751754549c270489c1505d4ab15a" - integrity sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg== - -bluebird@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" - integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== - -bluebird@^3.5.5: +bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: version "3.5.5" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== @@ -2320,23 +2160,7 @@ bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -body-parser@1.18.3, body-parser@^1.16.1: - version "1.18.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" - integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "~1.6.3" - iconv-lite "0.4.23" - on-finished "~2.3.0" - qs "6.5.2" - raw-body "2.3.3" - type-is "~1.6.16" - -body-parser@1.19.0: +body-parser@1.19.0, body-parser@^1.16.1: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== @@ -2365,9 +2189,9 @@ bonjour@^3.5.0: multicast-dns-service-types "^1.1.0" bootstrap@^4.0.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.1.3.tgz#0eb371af2c8448e8c210411d0cb824a6409a12be" - integrity sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w== + version "4.3.1" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.3.1.tgz#280ca8f610504d99d7b6b4bfc4b68cec601704ac" + integrity sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag== boxen@^3.0.0: version "3.2.0" @@ -2391,16 +2215,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.0, braces@^2.3.1, braces@^2.3.2: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -2445,7 +2260,7 @@ browser-process-hrtime@^0.1.2: browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.2.0" - resolved "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== dependencies: buffer-xor "^1.0.3" @@ -2476,7 +2291,7 @@ browserify-des@^1.0.0: browserify-rsa@^4.0.0: version "4.0.1" - resolved "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= dependencies: bn.js "^4.1.0" @@ -2502,7 +2317,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.0: +browserslist@4.7.0, browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.6.6: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== @@ -2511,37 +2326,10 @@ browserslist@4.7.0: electron-to-chromium "^1.3.247" node-releases "^1.1.29" -browserslist@^4.0.0: - version "4.5.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.5.tgz#fe1a352330d2490d5735574c149a85bc18ef9b82" - integrity sha512-0QFO1r/2c792Ohkit5XI8Cm8pDtZxgNl2H6HU4mHrpYz7314pEYcsAVVatM0l/YmxPnEzh9VygXouj4gkFUTKA== - dependencies: - caniuse-lite "^1.0.30000960" - electron-to-chromium "^1.3.124" - node-releases "^1.1.14" - -browserslist@^4.6.0, browserslist@^4.6.2: - version "4.6.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.6.tgz#6e4bf467cde520bc9dbdf3747dafa03531cec453" - integrity sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA== - dependencies: - caniuse-lite "^1.0.30000984" - electron-to-chromium "^1.3.191" - node-releases "^1.1.25" - -browserslist@^4.6.3: - version "4.6.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.3.tgz#0530cbc6ab0c1f3fc8c819c72377ba55cf647f05" - integrity sha512-CNBqTCq22RKM8wKJNowcqihHJ4SkI8CGeK7KOR9tPboXUuS5Zk5lQgzzTbs4oxD8x+6HUshZUa2OyNI9lR93bQ== - dependencies: - caniuse-lite "^1.0.30000975" - electron-to-chromium "^1.3.164" - node-releases "^1.1.23" - browserstack@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.1.tgz#e2dfa66ffee940ebad0a07f7e00fd4687c455d66" - integrity sha512-O8VMT64P9NOLhuIoD4YngyxBURefaSdR4QdhG8l6HZ9VxtU7jc3m6jLufFwKA5gaf7fetfB2TnRJnMxyob+heg== + version "1.5.3" + resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.3.tgz#93ab48799a12ef99dbd074dd595410ddb196a7ac" + integrity sha512-AO+mECXsW4QcqC9bxwM29O7qWa7bJT94uBFzeb5brylIQwawuEziwq20dPYbins95GlWzOawgyDNdjYAo32EKg== dependencies: https-proxy-agent "^2.2.1" @@ -2590,14 +2378,14 @@ buffer-xor@^1.0.3: buffer@^4.3.0: version "4.9.1" - resolved "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" isarray "^1.0.0" -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= @@ -2637,7 +2425,7 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@12.0.3, cacache@^12.0.3: +cacache@12.0.3, cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: version "12.0.3" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== @@ -2658,26 +2446,6 @@ cacache@12.0.3, cacache@^12.0.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^11.0.1, cacache@^11.2.0: - version "11.2.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.2.0.tgz#617bdc0b02844af56310e411c0878941d5739965" - integrity sha512-IFWl6lfK6wSeYCHUXh+N1lY72UDrpyrYQJNIVQf48paDuWbv5RbAtJYf/4gUQFObTCHZwdZ5sI8Iw7nqwP6nlQ== - dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - figgy-pudding "^3.1.0" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.3" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.2" - ssri "^6.0.0" - unique-filename "^1.1.0" - y18n "^4.0.0" - cacache@^11.3.3: version "11.3.3" resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.3.tgz#8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc" @@ -2698,47 +2466,6 @@ cacache@^11.3.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.0.tgz#1ed91cc306312a53ad688b1563ce4c416faec564" - integrity sha512-0baf1FhCp16LhN+xDJsOrSiaPDCTD3JegZptVmLDoEbFcT5aT+BeFGt3wcDU3olCP5tpTCXU5sv0+TsKWT9WGQ== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - -cacache@^12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" - integrity sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -2754,19 +2481,6 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cacheable-request@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-5.2.0.tgz#00c87097835af4caf92a97390660ecadce51187d" - integrity sha512-h1n0vjpFaByTvU6PiyTKk2kx4OnuV1aVUynCUd/FiKl4icpPSceowk3rHczwFEBuZvz+E1EU4KExR0MCPeQfaQ== - dependencies: - clone-response "^1.0.2" - get-stream "^4.0.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^1.0.1" - normalize-url "^3.1.0" - responselike "^1.0.2" - cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -2836,31 +2550,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000989, caniuse-lite@^1.0.30000989: +caniuse-lite@1.0.30000989, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989: version "1.0.30000989" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz#b9193e293ccf7e4426c5245134b8f2a56c0ac4b9" integrity sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw== -caniuse-lite@^1.0.30000960: - version "1.0.30000960" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000960.tgz#ec48297037e5607f582f246ae7b12bee66a78999" - integrity sha512-7nK5qs17icQaX6V3/RYrJkOsZyRNnroA4+ZwxaKJzIKy+crIy0Mz5CBlLySd2SNV+4nbUZeqeNfiaEieUBu3aA== - -caniuse-lite@^1.0.30000975: - version "1.0.30000975" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000975.tgz#d4e7131391dddcf2838999d3ce75065f65f1cdfc" - integrity sha512-ZsXA9YWQX6ATu5MNg+Vx/cMQ+hM6vBBSqDeJs8ruk9z0ky4yIHML15MoxcFt088ST2uyjgqyUGRJButkptWf0w== - -caniuse-lite@^1.0.30000980: - version "1.0.30000980" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000980.tgz#0df53e4354b3111f83ac15b0bd4c71fe92994231" - integrity sha512-as0PRtWHaX3gl2gpC7qA7bX88lr+qLacMMXm1QKLLQtBCwT/Ljbgrv5EXKMNBoeEX6yFZ4vIsBb4Nh+PEwW2Rw== - -caniuse-lite@^1.0.30000984: - version "1.0.30000984" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz#dc96c3c469e9bcfc6ad5bdd24c77ec918ea76fe0" - integrity sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA== - canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" @@ -2873,7 +2567,7 @@ caseless@~0.12.0: chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" - resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= dependencies: ansi-styles "^2.2.1" @@ -2882,16 +2576,7 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2905,106 +2590,41 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -"chokidar@>=2.0.0 <4.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.0.1.tgz#98fe9aa476c55d9aea7841d6325ffdb30e95b40c" - integrity sha512-2ww34sJWehnbpV0Q4k4V5Hh7juo7po6z7LUWkcIQnSGN1lHOL8GGtLtfwabKvLFQw/hbSUQ0u6V7OgGYgBzlkQ== +"chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.0.2.tgz#0d1cd6d04eb2df0327446188cd13736a3367d681" + integrity sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA== dependencies: anymatch "^3.0.1" - async-each "^1.0.3" braces "^3.0.2" glob-parent "^5.0.0" is-binary-path "^2.1.0" is-glob "^4.0.1" normalize-path "^3.0.0" - readdirp "^3.0.2" + readdirp "^3.1.1" optionalDependencies: fsevents "^2.0.6" -chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" - integrity sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ== +chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.6: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== dependencies: anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" + async-each "^1.0.1" + braces "^2.3.2" glob-parent "^3.1.0" - inherits "^2.0.1" + inherits "^2.0.3" is-binary-path "^1.0.0" is-glob "^4.0.0" - lodash.debounce "^4.0.8" - normalize-path "^2.1.1" + normalize-path "^3.0.0" path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.5" - optionalDependencies: - fsevents "^1.2.2" - -chokidar@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.2.tgz#9c23ea40b01638439e0513864d362aeacc5ad058" - integrity sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.0" - optionalDependencies: - fsevents "^1.2.7" - -chokidar@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" - integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" + readdirp "^2.2.1" + upath "^1.1.1" optionalDependencies: fsevents "^1.2.7" -chokidar@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.0.2.tgz#0d1cd6d04eb2df0327446188cd13736a3367d681" - integrity sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA== - dependencies: - anymatch "^3.0.1" - braces "^3.0.2" - glob-parent "^5.0.0" - is-binary-path "^2.1.0" - is-glob "^4.0.1" - normalize-path "^3.0.0" - readdirp "^3.1.1" - optionalDependencies: - fsevents "^2.0.6" - -chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" - integrity sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE= - -chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== - -chownr@^1.1.2: +chownr@^1.1.1, chownr@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6" integrity sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A== @@ -3123,11 +2743,11 @@ code-point-at@^1.0.0: integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= codelyzer@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-5.0.0.tgz#e4032efb23a7c5d4bcfe7321fc1789490c679837" - integrity sha512-Bif70XYt8NFf/Q9GPTxmC86OsBRfQZq1dBjdruJ5kZhJ8/jKhJL6MvCLKnYtSOG6Rhiv/44DU0cHk6GYthjy8Q== + version "5.1.0" + resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-5.1.0.tgz#a0eb89497622679ea4c53b6974aa45598f06a4b5" + integrity sha512-QiyY2/oDQnYx4mAVEDqr+z9MwrOto18tQFjExiuRChXCy0yvngS5fQpWIxvAGpbOmZFiR1PRTRLbEI71u10maA== dependencies: - app-root-path "^2.1.0" + app-root-path "^2.2.1" aria-query "^3.0.0" axobject-query "^2.0.2" css-selector-tokenizer "^0.7.1" @@ -3150,95 +2770,44 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0, color-convert@^1.9.1: +color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" -color-name@1.1.3, color-name@^1.0.0: +color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-string@^1.5.2: - version "1.5.3" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" - integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - -color@3.0.x: - version "3.0.0" - resolved "https://registry.yarnpkg.com/color/-/color-3.0.0.tgz#d920b4328d534a3ac8295d68f7bd4ba6c427be9a" - integrity sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w== - dependencies: - color-convert "^1.9.1" - color-string "^1.5.2" - -colornames@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/colornames/-/colornames-1.1.1.tgz#f8889030685c7c4ff9e2a559f5077eb76a816f96" - integrity sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y= - colors@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= -colors@^1.1.0, colors@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.2.tgz#2df8ff573dfbf255af562f8ce7181d6b971a359b" - integrity sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ== - -colorspace@1.1.x: - version "1.1.1" - resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.1.tgz#9ac2491e1bc6f8fb690e2176814f8d091636d972" - integrity sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw== - dependencies: - color "3.0.x" - text-hex "1.0.x" - -combined-stream@1.0.6, combined-stream@~1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" - integrity sha1-cj599ugBrFYTETp+RFqbactjKBg= - dependencies: - delayed-stream "~1.0.0" +colors@^1.1.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" + integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== -combined-stream@^1.0.6, combined-stream@~1.0.5: +combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" -commander@2.20.0, commander@^2.20.0: +commander@2.20.0, commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== -commander@^2.11.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== - -commander@^2.12.1: - version "2.18.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" - integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== - commander@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.0.tgz#0641ea00838c7a964627f04cddc336a2deddd60a" - integrity sha512-pl3QrGOBa9RZaslQiqnnKX2J068wcQw7j9AIaBQ9/JEp5RY6je4jKTImg0Bd+rpoONSe7GUFSgkxLeo17m3Pow== - -commander@~2.17.1: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" - integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.1.tgz#4595aec3530525e671fb6f85fb173df8ff8bf57a" + integrity sha512-UNgvDd+csKdc9GD4zjtkHKQbT8Aspt2jCBqNSPp53vAS0L1tS9sXB2TCEOPHJ7kt9bN/niWkYj8T3RQSoMXdSQ== common-tags@^1.8.0: version "1.8.0" @@ -3259,38 +2828,36 @@ compare-func@^1.3.1: dot-prop "^3.0.0" compare-versions@^3.4.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.5.0.tgz#85fc22a1ae9612ff730d77fb092295acd056d311" - integrity sha512-hX+4kt2Rcwu+x1U0SsEFCn1quURjEjPEGH/cPBlpME/IidGimAdwfMU+B+xDr7et/KTR7VH2+ZqWGerv4NGs2w== + version "3.5.1" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.5.1.tgz#26e1f5cf0d48a77eced5046b9f67b6b61075a393" + integrity sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg== component-bind@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" integrity sha1-AMYIq33Nk4l8AAllGx06jh5zu9E= -component-emitter@1.2.1, component-emitter@^1.2.1: +component-emitter@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + component-inherit@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= -compressible@~2.0.14: - version "2.0.15" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.15.tgz#857a9ab0a7e5a07d8d837ed43fe2defff64fe212" - integrity sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw== - dependencies: - mime-db ">= 1.36.0 < 2" - compressible@~2.0.16: - version "2.0.16" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.16.tgz#a49bf9858f3821b64ce1be0296afc7380466a77f" - integrity sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA== + version "2.0.17" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.17.tgz#6e8c108a16ad58384a977f3a482ca20bff2f38c1" + integrity sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw== dependencies: - mime-db ">= 1.38.0 < 2" + mime-db ">= 1.40.0 < 2" compression@1.7.4, compression@^1.7.4: version "1.7.4" @@ -3305,19 +2872,6 @@ compression@1.7.4, compression@^1.7.4: safe-buffer "5.1.2" vary "~1.1.2" -compression@^1.5.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" - integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.14" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.2" - vary "~1.1.2" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -3345,24 +2899,19 @@ configstore@^4.0.0: write-file-atomic "^2.0.0" xdg-basedir "^3.0.0" -connect-history-api-fallback@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" - integrity sha1-sGhzk0vF40T+9hGhlqb6rgruAVo= - connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== connect@^3.6.0: - version "3.6.6" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" - integrity sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ= + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== dependencies: debug "2.6.9" - finalhandler "1.1.0" - parseurl "~1.3.2" + finalhandler "1.1.2" + parseurl "~1.3.3" utils-merge "1.0.1" console-browserify@^1.1.0: @@ -3382,11 +2931,6 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= - content-disposition@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" @@ -3543,9 +3087,9 @@ conventional-commits-parser@^2.1.7: trim-off-newlines "^1.0.0" conventional-commits-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.0.tgz#7f604549a50bd8f60443fbe515484b1c2f06a5c4" - integrity sha512-GWh71U26BLWgMykCp+VghZ4s64wVbtseECcKQ/PvcPZR2cUnz+FUc2J9KjxNl7/ZbCxST8R03c9fc+Vi0umS9Q== + version "3.0.1" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz#fe1c49753df3f98edb2285a5e485e11ffa7f2e4c" + integrity sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -3621,38 +3165,22 @@ copy-webpack-plugin@5.0.4: webpack-log "^2.0.0" core-js-compat@^3.1.1: - version "3.1.4" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.1.4.tgz#e4d0c40fbd01e65b1d457980fe4112d4358a7408" - integrity sha512-Z5zbO9f1d0YrJdoaQhphVAnKPimX92D6z8lCGphH89MNRxlL1prI9ExJPqVwP0/kgkQCv8c4GJGT8X16yUncOg== + version "3.2.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.2.1.tgz#0cbdbc2e386e8e00d3b85dc81c848effec5b8150" + integrity sha512-MwPZle5CF9dEaMYdDeWm73ao/IflDH+FjeJCWEADcEgFSE9TLimFKwJsfmkwzI8eC0Aj0mgvMDjeQjrElkz4/A== dependencies: - browserslist "^4.6.2" - core-js-pure "3.1.4" - semver "^6.1.1" - -core-js-pure@3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.1.4.tgz#5fa17dc77002a169a3566cc48dc774d2e13e3769" - integrity sha512-uJ4Z7iPNwiu1foygbcZYJsJs1jiXrTTCvxfLDXNhI/I+NHbSIEyr548y4fcsCEyWY0XgfAG/qqaunJ1SThHenA== + browserslist "^4.6.6" + semver "^6.3.0" -core-js@3.2.1: +core-js@3.2.1, core-js@^3.1.3: version "3.2.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09" integrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw== -core-js@^2.2.0, core-js@^2.4.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" - integrity sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw== - -core-js@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.1.4.tgz#3a2837fc48e582e1ae25907afcd6cf03b0cc7a07" - integrity sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ== - -core-js@~2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz#fab83fbb0b2d8dc85fa636c4b9d34c75420c6d65" - integrity sha1-+rg/uwstjchfpjbEudNMdUIMbWU= +core-js@^2.4.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" + integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -3667,25 +3195,14 @@ cors@2.8.5: object-assign "^4" vary "^1" -cosmiconfig@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" - integrity sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ== - dependencies: - is-directory "^0.3.1" - js-yaml "^3.9.0" - parse-json "^4.0.0" - require-from-string "^2.0.1" - -cosmiconfig@^5.0.7: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.1.0.tgz#6c5c35e97f37f985061cdf653f114784231185cf" - integrity sha512-kCNPvthka8gvLtzAxQXvWo4FxqRB+ftRZyPZNuab5ngvM9Y7yw7hbEysglptLgpkGX9nAOKTBVkHUAe8xtYR6Q== +cosmiconfig@^5.0.0, cosmiconfig@^5.0.7: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== dependencies: import-fresh "^2.0.0" is-directory "^0.3.1" - js-yaml "^3.9.0" - lodash.get "^4.4.2" + js-yaml "^3.13.1" parse-json "^4.0.0" create-ecdh@^4.0.0: @@ -3698,7 +3215,7 @@ create-ecdh@^4.0.0: create-hash@^1.1.0, create-hash@^1.1.2: version "1.2.0" - resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== dependencies: cipher-base "^1.0.1" @@ -3709,7 +3226,7 @@ create-hash@^1.1.0, create-hash@^1.1.2: create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: version "1.1.7" - resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== dependencies: cipher-base "^1.0.3" @@ -3769,11 +3286,6 @@ crypto-random-string@^1.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= -css-parse@1.7.x: - version "1.7.0" - resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" - integrity sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs= - css-parse@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-2.0.0.tgz#a468ee667c16d81ccf05c58c38d2a97c780dbfd4" @@ -3812,22 +3324,17 @@ cssesc@^0.1.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q= -cssom@^0.3.6: +cssom@0.3.x, cssom@^0.3.6: version "0.3.8" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssom@~0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.6.tgz#f85206cee04efa841f3c5982a74ba96ab20d65ad" - integrity sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A== - cssstyle@^1.2.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.3.0.tgz#c36c466f7037fd30f03baa271b65f0f17b50585c" - integrity sha512-wXsoRfsRfsLVNaVzoKdqvEmK/5PFaEXNspVT22Ots6K/cnJdpoDKuQFw+qlMiXnmaif1OgeC466X1zISgAOcGg== + version "1.4.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" + integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== dependencies: - cssom "~0.3.6" + cssom "0.3.x" cuint@^0.2.2: version "0.2.2" @@ -3846,15 +3353,15 @@ custom-event@~1.0.0: resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= -cyclist@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" - integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= damerau-levenshtein@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" - integrity sha1-AxkcQyy27qFou3fzpV/9zLiXhRQ= + version "1.0.5" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz#780cf7144eb2e8dbd1c3bb83ae31100ccc31a414" + integrity sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA== dargs@^4.0.1: version "4.1.0" @@ -3885,9 +3392,9 @@ date-format@^1.2.0: integrity sha1-YV6CjiM90aubua4JUODOzPpuytg= date-format@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/date-format/-/date-format-2.0.0.tgz#7cf7b172f1ec564f0003b39ea302c5498fb98c8f" - integrity sha512-M6UqVvZVgFYqZL1SfHsRGIQSz3ZL+qgbsV5Lp1Vj61LZVYuEwcMXYay7DRDtYs2HQQBK5hQtQ0fD9aEJ89V0LA== + version "2.1.0" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-2.1.0.tgz#31d5b5ea211cf5fd764cd38baf9d033df7e125cf" + integrity sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA== date-now@^0.1.4: version "0.1.4" @@ -3904,14 +3411,7 @@ dayjs@1.8.15: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.15.tgz#7121bc04e6a7f2621ed6db566be4a8aaf8c3913e" integrity sha512-HYHCI1nohG52B45vCQg8Re3hNDZbMroWPkhz50yaX7Lu0ATyjGsTdoYZBpjED9ar6chqTx2dmSmM8A51mojnAg== -debug@*: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== - dependencies: - ms "^2.1.1" - -debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -3925,20 +3425,13 @@ debug@3.1.0, debug@~3.1.0: dependencies: ms "2.0.0" -debug@^3.0.0, debug@^3.2.5: +debug@^3.0.0, debug@^3.1.0, debug@^3.2.5, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== dependencies: ms "^2.1.1" -debug@^3.1.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.4.tgz#82123737c51afbe9609a2b5dfe9664e7487171f0" - integrity sha512-fCEG5fOr7m/fhgOD3KurdAov706JbXZJYXAsAOEJ7GgasGr0GO4N+1NsIcrjlIUcyvJ9oZlnelTzN3Ix8z1ecw== - dependencies: - ms "^2.1.1" - debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -3964,13 +3457,6 @@ decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decamelize@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7" - integrity sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg== - dependencies: - xregexp "4.0.0" - decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -3984,9 +3470,16 @@ decompress-response@^3.3.0: mimic-response "^1.0.0" deep-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= + version "1.1.0" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.0.tgz#3103cdf8ab6d32cf4a8df7865458f2b8d33f3745" + integrity sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" deep-extend@^0.6.0: version "0.6.0" @@ -3998,14 +3491,6 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -default-gateway@^2.6.0: - version "2.7.2" - resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-2.7.2.tgz#b7ef339e5e024b045467af403d50348db4642d0f" - integrity sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ== - dependencies: - execa "^0.10.0" - ip-regex "^2.1.0" - default-gateway@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" @@ -4022,11 +3507,11 @@ default-require-extensions@^2.0.0: strip-bom "^3.0.0" defer-to-connect@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.1.tgz#41ec1dd670dc4c6dcbe7e54c9e44d784d025fe63" - integrity sha512-2e0FJesseUqQj671gvZWfUyxpnFx/5n4xleamlpCD3U6Fm5dh5qzmmLNxNhtmHF06+SYVHH8QU6FACffYTnj0Q== + version "1.0.2" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" + integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw== -define-properties@^1.1.2: +define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -4068,18 +3553,6 @@ del@^2.2.0: pinkie-promise "^2.0.0" rimraf "^2.2.8" -del@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" - integrity sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU= - dependencies: - globby "^6.1.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - p-map "^1.1.1" - pify "^3.0.0" - rimraf "^2.2.8" - del@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" @@ -4138,7 +3611,7 @@ detect-libc@^1.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= -detect-node@^2.0.3, detect-node@^2.0.4: +detect-node@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== @@ -4156,23 +3629,19 @@ di@^0.0.1: resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" integrity sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= -diagnostics@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/diagnostics/-/diagnostics-1.1.1.tgz#cab6ac33df70c9d9a727490ae43ac995a769b22a" - integrity sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ== - dependencies: - colorspace "1.1.x" - enabled "1.0.x" - kuler "1.0.x" - -diff@^3.1.0, diff@^3.2.0, diff@^3.5.0: +diff@^3.1.0, diff@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +diff@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.1.tgz#0c667cb467ebbb5cea7f14f135cc2dba7780a8ff" + integrity sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q== + diffie-hellman@^5.0.0: version "5.0.3" - resolved "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== dependencies: bn.js "^4.1.0" @@ -4180,11 +3649,10 @@ diffie-hellman@^5.0.0: randombytes "^2.0.0" dir-glob@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" - integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== + version "2.2.2" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" + integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== dependencies: - arrify "^1.0.1" path-type "^3.0.0" dns-equal@^1.0.0: @@ -4254,11 +3722,11 @@ dot-prop@^4.1.0: is-obj "^1.0.0" dtrace-provider@~0.8: - version "0.8.7" - resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.7.tgz#dc939b4d3e0620cfe0c1cd803d0d2d7ed04ffd04" - integrity sha1-3JObTT4GIM/gwc2APQ0tftBP/QQ= + version "0.8.8" + resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.8.tgz#2996d5490c37e1347be263b423ed7b297fb0d97e" + integrity sha512-b7Z7cNtHPhH9EJhNNbbeqTcXB8LGFFZhq1PGgEvpeHlzd36bhbdTWoE/Ba/YguqpBSlAPKnARWhVlhunCMwfxg== dependencies: - nan "^2.10.0" + nan "^2.14.0" duplexer2@~0.1.4: version "0.1.4" @@ -4273,9 +3741,9 @@ duplexer3@^0.1.4: integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= duplexify@^3.4.2, duplexify@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.1.tgz#b1a7a29c4abfd639585efaecce80d666b1e34125" - integrity sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA== + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== dependencies: end-of-stream "^1.0.0" inherits "^2.0.1" @@ -4302,30 +3770,15 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.124: - version "1.3.124" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz#861fc0148748a11b3e5ccebdf8b795ff513fa11f" - integrity sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w== - -electron-to-chromium@^1.3.164: - version "1.3.164" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.164.tgz#8680b875577882c1572c42218d53fa9ba5f71d5d" - integrity sha512-VLlalqUeduN4+fayVtRZvGP2Hl1WrRxlwzh2XVVMJym3IFrQUS29BFQ1GP/BxOJXJI1OFCrJ5BnFEsAe8NHtOg== - -electron-to-chromium@^1.3.191: - version "1.3.191" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.191.tgz#c451b422cd8b2eab84dedabab5abcae1eaefb6f0" - integrity sha512-jasjtY5RUy/TOyiUYM2fb4BDaPZfm6CXRFeJDMfFsXYADGxUN49RBqtgB7EL2RmJXeIRUk9lM1U6A5yk2YJMPQ== - electron-to-chromium@^1.3.247: - version "1.3.247" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.247.tgz#ff2332376150436599265b2dfd7a539f214f4ade" - integrity sha512-j/Rzx1FyVTwNifpG/DPQKEMz0mruRwoPpJ6Y1tTVmj6+/zAVzG8/YHZwBMLYCZgQH6seLOqaVxZ3RY3KMrT5IQ== + version "1.3.259" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.259.tgz#d0b14836df3c89e86fa47be67315daa642fe9d5c" + integrity sha512-NMHS8iQzAYwiFZ1jL/rNOfrZJhvoowKN5uHrbbHOeNgBT5W762wpe/SRLo9kJoTiJ4d2R8i01/NQHwndo9N5PQ== elliptic@^6.0.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" - integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ== + version "6.5.1" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.1.tgz#c380f5f909bf1b9b4428d028cd18d3b0efd6b52b" + integrity sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg== dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -4350,14 +3803,7 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= -enabled@1.0.x: - version "1.0.2" - resolved "https://registry.yarnpkg.com/enabled/-/enabled-1.0.2.tgz#965f6513d2c2d1c5f4652b64a2e3396467fc2f93" - integrity sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M= - dependencies: - env-variable "0.0.x" - -encodeurl@~1.0.1, encodeurl@~1.0.2: +encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= @@ -4394,20 +3840,20 @@ engine.io-client@~3.2.0: yeast "0.1.2" engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.2.tgz#4c0f4cff79aaeecbbdcfdea66a823c6085409196" - integrity sha512-dInLFzr80RijZ1rGpx1+56/uFoH7/7InhH3kZt+Ms6hT8tNx3NGW/WNSA/f8As1WkOfkuyb3tnRyuXGxusclMw== + version "2.1.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz#757ab970fbf2dfb32c7b74b033216d5739ef79a6" + integrity sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA== dependencies: after "0.8.2" arraybuffer.slice "~0.0.7" base64-arraybuffer "0.1.5" - blob "0.0.4" + blob "0.0.5" has-binary2 "~1.0.2" engine.io@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.0.tgz#54332506f42f2edc71690d2f2a42349359f3bf7d" - integrity sha512-mRbgmAtQ4GAlKwuPnnAvXXwdPhEx+jkc0OBCLrXuD/CRvwNK3AxRSnqK4FSqmAMRRHryVJP8TopOvmEaA64fKw== + version "3.2.1" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.1.tgz#b60281c35484a70ee0351ea0ebff83ec8c9522a2" + integrity sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w== dependencies: accepts "~1.3.4" base64id "1.0.0" @@ -4430,11 +3876,6 @@ ent@~2.2.0: resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= -env-variable@0.0.x: - version "0.0.4" - resolved "https://registry.yarnpkg.com/env-variable/-/env-variable-0.0.4.tgz#0d6280cf507d84242befe35a512b5ae4be77c54e" - integrity sha512-+jpGxSWG4vr6gVxUHOc4p+ilPnql7NzZxOZBxNldsKGjCF+97df3CbuX7XMaDa5oAVkKQj4rKp38rYdC4VcpDg== - envinfo@7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.3.1.tgz#892e42f7bf858b3446d9414ad240dbaf8da52f09" @@ -4460,16 +3901,20 @@ error-ex@^1.2.0, error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.5.1: - version "1.13.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" - integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== + version "1.14.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.14.2.tgz#7ce108fad83068c8783c3cdf62e504e084d8c497" + integrity sha512-DgoQmbpFNOofkjJtKwr87Ma5EW4Dc8fWhD0R+ndq7Oc456ivUfGOOP6oAZTTKl5/CcNMP+EN+e3/iUzgE0veZg== dependencies: es-to-primitive "^1.2.0" function-bind "^1.1.1" has "^1.0.3" + has-symbols "^1.0.0" is-callable "^1.1.4" is-regex "^1.0.4" - object-keys "^1.0.12" + object-inspect "^1.6.0" + object-keys "^1.1.1" + string.prototype.trimleft "^2.0.0" + string.prototype.trimright "^2.0.0" es-to-primitive@^1.2.0: version "1.2.0" @@ -4481,14 +3926,9 @@ es-to-primitive@^1.2.0: is-symbol "^1.0.2" es6-promise@^4.0.3: - version "4.2.5" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054" - integrity sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg== - -es6-promise@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz#010d5858423a5f118979665f46486a95c6ee2bb6" - integrity sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y= + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== es6-promisify@^5.0.0: version "5.0.0" @@ -4507,22 +3947,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -escodegen@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" - integrity sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw== - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -escodegen@^1.8.1: - version "1.11.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" - integrity sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw== +escodegen@^1.11.1, escodegen@^1.8.1: + version "1.12.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.0.tgz#f763daf840af172bb3a2b6dd7219c0e17f7ff541" + integrity sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg== dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -4569,19 +3997,9 @@ esrecurse@^4.1.0: estraverse "^4.1.0" estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= - -estree-walker@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39" - integrity sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig== - -estree-walker@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.0.tgz#5d865327c44a618dde5699f763891ae31f257dae" - integrity sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw== + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estree-walker@^0.6.1: version "0.6.1" @@ -4589,9 +4007,9 @@ estree-walker@^0.6.1: integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== etag@~1.8.1: version "1.8.1" @@ -4599,9 +4017,9 @@ etag@~1.8.1: integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= eventemitter3@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" - integrity sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA== + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== events@^3.0.0: version "3.0.0" @@ -4623,19 +4041,6 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -execa@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" - integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw== - dependencies: - cross-spawn "^6.0.0" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" @@ -4667,13 +4072,6 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= - dependencies: - is-posix-bracket "^0.1.0" - expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -4687,13 +4085,6 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - express@4.17.1, express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -4730,42 +4121,6 @@ express@4.17.1, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" -express@^4.16.2: - version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" - integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== - dependencies: - accepts "~1.3.5" - array-flatten "1.1.1" - body-parser "1.18.3" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.1" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.4" - qs "6.5.2" - range-parser "~1.2.0" - safe-buffer "5.1.2" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" - utils-merge "1.0.1" - vary "~1.1.2" - extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -4787,21 +4142,14 @@ extend@^3.0.0, extend@~3.0.1, extend@~3.0.2: integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== external-editor@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" - integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: chardet "^0.7.0" iconv-lite "^0.4.24" tmp "^0.0.33" -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= - dependencies: - is-extglob "^1.0.0" - extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -4866,11 +4214,6 @@ fast-levenshtein@~2.0.4: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fast-safe-stringify@^2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz#04b26106cc56681f51a044cfc0d76cf0008ac2c2" - integrity sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg== - fastparse@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" @@ -4884,9 +4227,9 @@ faye-websocket@^0.10.0: websocket-driver ">=0.5.1" faye-websocket@~0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" - integrity sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg= + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== dependencies: websocket-driver ">=0.5.1" @@ -4897,12 +4240,7 @@ fd-slicer@~1.0.1: dependencies: pend "~1.2.0" -fecha@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fecha/-/fecha-2.3.3.tgz#948e74157df1a32fd1b12c3a3c3cdcb6ec9d96cd" - integrity sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg== - -figgy-pudding@^3.1.0, figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: +figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== @@ -4922,11 +4260,6 @@ file-loader@4.2.0: loader-utils "^1.2.3" schema-utils "^2.0.0" -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= - fileset@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" @@ -4935,17 +4268,6 @@ fileset@^2.0.3: glob "^7.0.3" minimatch "^3.0.3" -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -4963,33 +4285,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" - integrity sha1-zgtoVbRYU+eRsvzGgARtiCU91/U= - dependencies: - debug "2.6.9" - encodeurl "~1.0.1" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.3.1" - unpipe "~1.0.0" - -finalhandler@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" - unpipe "~1.0.0" - -finalhandler@~1.1.2: +finalhandler@1.1.2, finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== @@ -5056,42 +4352,35 @@ find-up@^4.0.0: path-exists "^4.0.0" flatted@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" - integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== + version "2.0.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" + integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== flush-write-stream@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" - integrity sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw== + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== dependencies: - inherits "^2.0.1" - readable-stream "^2.0.4" + inherits "^2.0.3" + readable-stream "^2.3.6" follow-redirects@^1.0.0: - version "1.5.7" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.7.tgz#a39e4804dacb90202bca76a9e2ac10433ca6a69a" - integrity sha512-NONJVIFiX7Z8k2WxfqBjtwqMifx7X42ORLFrOZ2LTKGj71G3C0kfdyTqGqr8fx5zSX6Foo/D95dgGWbPUiwnew== + version "1.9.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f" + integrity sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A== dependencies: - debug "^3.1.0" + debug "^3.0.0" font-awesome@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM= -for-in@^1.0.1, for-in@^1.0.2: +for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= - dependencies: - for-in "^1.0.1" - foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" @@ -5110,22 +4399,22 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@~2.3.1: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== +form-data@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== dependencies: asynckit "^0.4.0" combined-stream "^1.0.6" mime-types "^2.1.12" -form-data@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" - integrity sha1-SXBJi+YEwgwAXU9cI67NIda0kJk= +form-data@~2.3.1, form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" - combined-stream "1.0.6" + combined-stream "^1.0.6" mime-types "^2.1.12" forwarded@~0.1.2: @@ -5160,10 +4449,10 @@ fs-access@^1.0.0: dependencies: null-check "^1.0.0" -fs-extra@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.0.tgz#8cc3f47ce07ef7b3593a11b9fb245f7e34c041d6" - integrity sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ== +fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" @@ -5179,9 +4468,9 @@ fs-extra@^8.0.0: universalify "^0.1.0" fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== + version "1.2.6" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" + integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ== dependencies: minipass "^2.2.1" @@ -5200,21 +4489,13 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - fsevents@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.7.tgz#4851b664a3783e52003b3c66eb0eee1074933aa4" - integrity sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw== + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" + nan "^2.12.1" + node-pre-gyp "^0.12.0" fsevents@^2.0.6: version "2.0.7" @@ -5308,11 +4589,11 @@ getpass@^0.1.1: assert-plus "^1.0.0" gh-got@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/gh-got/-/gh-got-8.0.1.tgz#857c5e9bcd52956e14a9f200d010c641a2f992b3" - integrity sha512-i2TkU/u5ti1Wgc34y65FDSCKDuuuVH1Qa6192e0E2Z2CvleS0zPgArpiPZroiQdp9f5gbohw9UZCTTcrjIzwFw== + version "8.1.0" + resolved "https://registry.yarnpkg.com/gh-got/-/gh-got-8.1.0.tgz#2378d07ac293f524549c75f8dc6f3604a885ab01" + integrity sha512-Jy7+73XqsAVeAtM5zA0dd+A7mmzkQVIzFuw3xRjFbPsQVqS+aeci8v8H1heOCAPlBYWED5ZYPhlYqZVXdD3Fmg== dependencies: - got "^9.1.0" + got "^9.5.0" git-raw-commits@^1.3.6: version "1.3.6" @@ -5359,21 +4640,6 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= - dependencies: - is-glob "^2.0.0" - glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" @@ -5389,19 +4655,7 @@ glob-parent@^5.0.0: dependencies: is-glob "^4.0.1" -glob@7.0.x: - version "7.0.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" - integrity sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo= - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@7.1.4, glob@^7.1.4: +glob@7.1.4, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== @@ -5424,18 +4678,6 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -5444,9 +4686,9 @@ global-dirs@^0.1.0: ini "^1.3.4" globals@^11.1.0: - version "11.8.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.8.0.tgz#c1ef45ee9bed6badf0663c5cb90e8d1adec1321d" - integrity sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA== + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^9.18.0: version "9.18.0" @@ -5484,28 +4726,11 @@ globby@^7.1.1: array-union "^1.0.1" dir-glob "^2.0.0" glob "^7.1.2" - ignore "^3.3.5" - pify "^3.0.0" - slash "^1.0.0" - -got@^9.1.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.5.0.tgz#6fd0312c6b694c0a11d9119d95fd7daed174eb49" - integrity sha512-N+4kb6i9t1lauJ4NwLVVoFVLxZNa6i+iivtNzCSVw7+bVbTXoq0qXctdd8i9rj3lrI0zDk5NGzcO4bfpEP6Uuw== - dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.0" - cacheable-request "^5.1.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" -got@^9.6.0: +got@^9.5.0, got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== @@ -5522,32 +4747,17 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= - -graceful-fs@^4.1.15: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -graceful-fs@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" - integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== - -handle-thing@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" - integrity sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ= +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" + integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== handle-thing@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754" integrity sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ== -handlebars@4.1.2, handlebars@^4.0.3, handlebars@^4.1.2: +handlebars@4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== @@ -5558,12 +4768,12 @@ handlebars@4.1.2, handlebars@^4.0.3, handlebars@^4.1.2: optionalDependencies: uglify-js "^3.1.4" -handlebars@^4.0.2: - version "4.0.12" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" - integrity sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA== +handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.1.2: + version "4.2.0" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.0.tgz#57ce8d2175b9bbb3d8b3cf3e4217b1aec8ddcb2e" + integrity sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw== dependencies: - async "^2.5.0" + neo-async "^2.6.0" optimist "^0.6.1" source-map "^0.6.1" optionalDependencies: @@ -5583,11 +4793,11 @@ har-validator@~5.0.3: har-schema "^2.0.0" har-validator@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" - integrity sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA== + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== dependencies: - ajv "^5.3.0" + ajv "^6.5.5" har-schema "^2.0.0" has-ansi@^2.0.0: @@ -5681,9 +4891,9 @@ hash-base@^3.0.0: safe-buffer "^5.0.1" hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.5.tgz#e38ab4b85dfb1e0c40fe9265c0e9b54854c23812" - integrity sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA== + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== dependencies: inherits "^2.0.3" minimalistic-assert "^1.0.1" @@ -5697,12 +4907,7 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== - -hosted-git-info@^2.7.1: +hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.4" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== @@ -5724,7 +4929,7 @@ html-encoding-sniffer@^1.0.2: dependencies: whatwg-encoding "^1.0.1" -html-entities@^1.2.0, html-entities@^1.2.1: +html-entities@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" integrity sha1-DfKTUfByEWNRXfueVUPl9u7VFi8= @@ -5735,26 +4940,16 @@ http-cache-semantics@^3.8.1: integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== http-cache-semantics@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#6c2ef57e22090b177828708a52eaeae9d1d63e1b" - integrity sha512-OO/9K7uFN30qwAKvslzmCTbimZ/uRjtdN5S50vvWLwUKqFuZj0n96XyCzF5tHRHEO/Q4JYC01hv41gkX06gmHA== + version "4.0.3" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5" + integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew== http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= -http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-errors@1.7.2, http-errors@~1.7.2: +http-errors@1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== @@ -5765,7 +4960,7 @@ http-errors@1.7.2, http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-errors@1.7.3: +http-errors@1.7.3, http-errors@~1.7.2: version "1.7.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== @@ -5776,10 +4971,20 @@ http-errors@1.7.3: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-parser-js@>=0.4.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.0.tgz#d65edbede84349d0dc30320815a15d39cc3cbbd8" - integrity sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w== +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +"http-parser-js@>=0.4.0 <0.4.11": + version "0.4.10" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" + integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q= http-proxy-agent@^2.1.0: version "2.1.0" @@ -5799,17 +5004,7 @@ http-proxy-middleware@^0.19.1: lodash "^4.17.11" micromatch "^3.1.10" -http-proxy-middleware@~0.18.0: - version "0.18.0" - resolved "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz#0987e6bb5a5606e5a69168d8f967a87f15dd8aab" - integrity sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q== - dependencies: - http-proxy "^1.16.2" - is-glob "^4.0.0" - lodash "^4.17.5" - micromatch "^3.1.9" - -http-proxy@^1.13.0, http-proxy@^1.16.2, http-proxy@^1.17.0: +http-proxy@^1.13.0, http-proxy@^1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g== @@ -5833,11 +5028,11 @@ https-browserify@^1.0.0: integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= https-proxy-agent@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" - integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== + version "2.2.2" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz#271ea8e90f836ac9f119daccd39c19ff7dfb0793" + integrity sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg== dependencies: - agent-base "^4.1.0" + agent-base "^4.3.0" debug "^3.1.0" humanize-ms@^1.2.1: @@ -5863,13 +5058,6 @@ husky@^1.3.1: run-node "^1.0.0" slash "^2.0.0" -iconv-lite@0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -5878,9 +5066,9 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: safer-buffer ">= 2.1.2 < 3" ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== iferr@^0.1.5: version "0.1.5" @@ -5888,9 +5076,9 @@ iferr@^0.1.5: integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== + version "3.0.2" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.2.tgz#99d83a246c196ea5c93ef9315ad7b0819c35069b" + integrity sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw== dependencies: minimatch "^3.0.4" @@ -5984,20 +5172,20 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= -inherits@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ini@1.3.5, ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: version "1.3.5" @@ -6005,9 +5193,9 @@ ini@1.3.5, ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== injection-js@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/injection-js/-/injection-js-2.2.1.tgz#a8d6a085b2f0b8d8650f6f4487f6abb8cc0d67ce" - integrity sha512-zHI+E+dM0PXix5FFTO1Y4/UOyAzE7zG1l/QwAn4jchTThOoBq+UYRFK4AVG7lQgFL+go62SbrzSsjXy9DFEZUg== + version "2.2.2" + resolved "https://registry.yarnpkg.com/injection-js/-/injection-js-2.2.2.tgz#5bfbeb951ab7bc8e1f359dea5d20e10ed4b84cef" + integrity sha512-9K4fW2NNPG3JCvORx5G/T6q/PZYIr43RFgxBvtk3OV4omh5iqvpK4cChuBfhgPnRbXSgZRfuROh0XG5KNA8Xlg== inquirer@7.0.0: version "7.0.0" @@ -6028,14 +5216,6 @@ inquirer@7.0.0: strip-ansi "^5.1.0" through "^2.3.6" -internal-ip@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-3.0.1.tgz#df5c99876e1d2eb2ea2d74f520e3f669a00ece27" - integrity sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q== - dependencies: - default-gateway "^2.6.0" - ipaddr.js "^1.5.2" - internal-ip@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" @@ -6071,25 +5251,20 @@ ip@^1.1.0, ip@^1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -ipaddr.js@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" - integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= - -ipaddr.js@1.9.0, ipaddr.js@^1.9.0: +ipaddr.js@1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== -ipaddr.js@^1.5.2: - version "1.8.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.1.tgz#fa4b79fa47fd3def5e3b159825161c0a519c9427" - integrity sha1-+kt5+kf9Pe9eOxWYJRYcClGclCc= +ipaddr.js@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== is-absolute-url@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.0.tgz#eb21d69df2ed8ef72a3e6f243e216563036a0913" - integrity sha512-3OkP8XrM2Xq4/IxsJnClfMp3OaM3TAatLPLKPeWcxLBTrpe6hihwtX+XZfJTcXg/FTRi4qjy0y/C5qiyNxY24g== + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.2.tgz#554f2933e7385cc46e94351977ca2081170a206e" + integrity sha512-+5g/wLlcm1AcxSP7014m6GvbPHswDx980vD/3bZaap8aGV9Yfs7Q6y6tfaupgZ5O74Byzc8dGrSCJ+bFXx0KdA== is-accessor-descriptor@^0.1.6: version "0.1.6" @@ -6105,16 +5280,16 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-arguments@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" + integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -6134,13 +5309,6 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= - dependencies: - builtin-modules "^1.0.0" - is-callable@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" @@ -6195,18 +5363,6 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= - dependencies: - is-primitive "^2.0.0" - is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -6219,11 +5375,6 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= - is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -6253,13 +5404,6 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= - dependencies: - is-extglob "^1.0.0" - is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" @@ -6267,14 +5411,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= - dependencies: - is-extglob "^2.1.1" - -is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -6299,13 +5436,6 @@ is-npm@^3.0.0: resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-3.0.0.tgz#ec9147bfb629c43f494cf67936a961edec7e8053" integrity sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA== -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -6313,11 +5443,6 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -6334,9 +5459,9 @@ is-path-cwd@^1.0.0: integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= is-path-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.0.0.tgz#d4777a8e227a00096a31f030db3770f84b116c02" - integrity sha512-m5dHHzpOXEiv18JEORttBO64UgTEypx99vCxQLjbBvGhOJxnTNglYoFXxwo6AbsQb79sqqycQEHv2hWkHZAijA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== is-path-in-cwd@^1.0.0: version "1.0.1" @@ -6346,11 +5471,11 @@ is-path-in-cwd@^1.0.0: is-path-inside "^1.0.0" is-path-in-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.0.0.tgz#68e452a6eec260500cec21e029c0a44cc0dcd2ea" - integrity sha512-6Vz5Gc9s/sDA3JBVu0FzWufm8xaBsqy1zn8Q6gmvGP6nSDMw78aS4poBNeatWjaRpTpxxLn1WOndAiOlk+qY8A== + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" + integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== dependencies: - is-path-inside "^1.0.0" + is-path-inside "^2.1.0" is-path-inside@^1.0.0: version "1.0.1" @@ -6359,28 +5484,25 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" +is-path-inside@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" + integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== + dependencies: + path-is-inside "^1.0.2" + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: +is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= - is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" @@ -6614,12 +5736,7 @@ jasmine-core@2.8.0, jasmine-core@~2.8.0: resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e" integrity sha1-vMl5rh+f0FcB5F5S5l06XWPxok4= -jasmine-core@^3.3, jasmine-core@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.3.0.tgz#dea1cdc634bc93c7e0d4ad27185df30fa971b10e" - integrity sha512-3/xSmG/d35hf80BEN66Y6g9Ca5l/Isdeg/j6zvbTYlTzeKinzmaTM4p9am5kYqOmE05D7s1t8FGjzdSnbUbceA== - -jasmine-core@~3.4.0: +jasmine-core@^3.3, jasmine-core@~3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.4.0.tgz#2a74618e966026530c3518f03e9f845d26473ce3" integrity sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg== @@ -6640,15 +5757,7 @@ jasmine@2.8.0: glob "^7.0.6" jasmine-core "~2.8.0" -jasmine@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.3.1.tgz#d61bb1dd8888859bd11ea83074a78ee13d949905" - integrity sha512-/vU3/H7U56XsxIXHwgEuWpCgQ0bRi2iiZeUpx7Nqo8n1TpoDHfZhkPIc7CO8I4pnMzYsi3XaSZEiy8cnTfujng== - dependencies: - glob "^7.0.6" - jasmine-core "~3.3.0" - -jasmine@~3.4.0: +jasmine@^3.3.1, jasmine@~3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.4.0.tgz#0fa68903ff0c9697459cd044b44f4dcef5ec8bdc" integrity sha512-sR9b4n+fnBFDEd7VS2el2DeHgKcPiMVn44rtKFumq9q7P/t8WrxsVIZPob4UDdgcDNCwyDqwxCt4k9TDRmjPoQ== @@ -6670,14 +5779,14 @@ jest-worker@^24.9.0: supports-color "^6.1.0" jquery@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" - integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg== + version "3.4.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2" + integrity sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw== js-base64@^2.4.3: - version "2.4.9" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.9.tgz#748911fb04f48a60c4771b375cac45a80df11c03" - integrity sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ== + version "2.5.1" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" + integrity sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw== js-levenshtein@^1.1.3: version "1.1.6" @@ -6694,7 +5803,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@3.13.1, js-yaml@^3.13.0, js-yaml@^3.13.1: +js-yaml@3.13.1, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -6702,14 +5811,6 @@ js-yaml@3.13.1, js-yaml@^3.13.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.9.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -6753,9 +5854,9 @@ jsesc@^1.3.0: integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= jsesc@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" - integrity sha1-5CGiqOINawgZ3yiQj3glJrlt0f4= + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== jsesc@~0.5.0: version "0.5.0" @@ -6793,14 +5894,9 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json3@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - integrity sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE= - -json5@^0.5.0: - version "0.5.1" - resolved "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + version "3.3.3" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" + integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== json5@^1.0.1: version "1.0.1" @@ -6854,16 +5950,15 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jszip@^3.1.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.1.5.tgz#e3c2a6c6d706ac6e603314036d43cd40beefdf37" - integrity sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ== +jszip@^3.1.3, jszip@^3.1.5: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.2.2.tgz#b143816df7e106a9597a94c77493385adca5bd1d" + integrity sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA== dependencies: - core-js "~2.3.0" - es6-promise "~3.0.2" - lie "~3.1.0" + lie "~3.3.0" pako "~1.0.2" - readable-stream "~2.0.6" + readable-stream "~2.3.6" + set-immediate-shim "~1.0.1" jwa@^1.4.1: version "1.4.1" @@ -6904,9 +5999,9 @@ karma-firefox-launcher@1.1.0: integrity sha512-LbZ5/XlIXLeQ3cqnCbYLn+rOVhuMIK9aZwlP6eOLGzWdo1UVp7t6CN3DP4SafiRLjexKwHeKHDm0c38Mtd3VxA== karma-jasmine-html-reporter@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.4.0.tgz#1abbd30d4509a8c82b96707ae7d2fa4da459ca19" - integrity sha512-0wxhwA8PLPpICZ4o2GRnPi67hf3JhfQm5WCB8nElh4qsE6wRNOTtrqooyBPNqI087Xr2SBhxLg5fU+BJ/qxRrw== + version "1.4.2" + resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.4.2.tgz#16d100fd701271192d27fd28ddc90b710ad36fff" + integrity sha512-7g0gPj8+9JepCNJR9WjDyQ2RkZ375jpdurYQyAYv8PorUCadepl8vrD6LmMqOGcM17cnrynBawQYZHaumgDjBw== karma-jasmine@2.0.1, karma-jasmine@^2.0.1, karma-jasmine@~2.0.1: version "2.0.1" @@ -6943,40 +6038,7 @@ karma-sourcemap-loader@0.3.7: dependencies: graceful-fs "^4.1.2" -karma@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/karma/-/karma-4.0.1.tgz#2581d6caa0d4cd28b65131561b47bad6d5478773" - integrity sha512-ind+4s03BqIXas7ZmraV3/kc5+mnqwCd+VDX1FndS6jxbt03kQKX2vXrWxNLuCjVYmhMwOZosAEKMM0a2q7w7A== - dependencies: - bluebird "^3.3.0" - body-parser "^1.16.1" - braces "^2.3.2" - chokidar "^2.0.3" - colors "^1.1.0" - connect "^3.6.0" - core-js "^2.2.0" - di "^0.0.1" - dom-serialize "^2.2.0" - flatted "^2.0.0" - glob "^7.1.1" - graceful-fs "^4.1.2" - http-proxy "^1.13.0" - isbinaryfile "^3.0.0" - lodash "^4.17.11" - log4js "^4.0.0" - mime "^2.3.1" - minimatch "^3.0.2" - optimist "^0.6.1" - qjobs "^1.1.4" - range-parser "^1.2.0" - rimraf "^2.6.0" - safe-buffer "^5.0.1" - socket.io "2.1.1" - source-map "^0.6.1" - tmp "0.0.33" - useragent "2.3.0" - -karma@~4.3.0: +karma@^4.0.0, karma@~4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/karma/-/karma-4.3.0.tgz#e14471ea090a952265a42ebb442b1a3c09832559" integrity sha512-NSPViHOt+RW38oJklvYxQC4BSQsv737oQlr/r06pCM+slDOr4myuI1ivkRmp+3dVpJDfZt2DmaPJ2wkx+ZZuMQ== @@ -7021,7 +6083,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -killable@^1.0.0, killable@^1.0.1: +killable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== @@ -7055,13 +6117,6 @@ kleur@3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -kuler@1.0.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/kuler/-/kuler-1.0.0.tgz#904ad31c373b781695854d32be33818bf1d60250" - integrity sha512-oyy6pu/yWRjiVfCoJebNUKFL061sNtrs9ejKTbirIwY3oiHmENVCSkHhxDV85Dkm7JYR/czMCBeoM87WilTdSg== - dependencies: - colornames "^1.1.1" - latest-version@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" @@ -7100,7 +6155,7 @@ less-plugin-npm-import@^2.1.0: promise "~7.0.1" resolve "~1.1.6" -less@3.10.3: +less@3.10.3, less@^3.8.0: version "3.10.3" resolved "https://registry.yarnpkg.com/less/-/less-3.10.3.tgz#417a0975d5eeecc52cff4bcfa3c09d35781e6792" integrity sha512-vz32vqfgmoxF1h3K4J+yKCtajH0PWmjkIFgbs5d78E/c/e+UQTnI+lWK+1eQRE95PXM2mC3rJlLSSP9VQHnaow== @@ -7116,22 +6171,6 @@ less@3.10.3: request "^2.83.0" source-map "~0.6.0" -less@^3.8.0: - version "3.8.1" - resolved "https://registry.yarnpkg.com/less/-/less-3.8.1.tgz#f31758598ef5a1930dd4caefa9e4340641e71e1d" - integrity sha512-8HFGuWmL3FhQR0aH89escFNBQH/nEiYPP2ltDFdQw2chE28Yx2E3lhAIq9Y2saYwLSwa699s4dBVEfCY8Drf7Q== - dependencies: - clone "^2.1.2" - optionalDependencies: - errno "^0.1.1" - graceful-fs "^4.1.2" - image-size "~0.5.0" - mime "^1.4.1" - mkdirp "^0.5.0" - promise "^7.1.1" - request "^2.83.0" - source-map "~0.6.0" - levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -7165,13 +6204,18 @@ license-webpack-plugin@2.1.2: "@types/webpack-sources" "^0.1.5" webpack-sources "^1.2.0" -lie@~3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" - integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4= +lie@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== dependencies: immediate "~3.0.5" +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -7198,7 +6242,7 @@ loader-runner@^2.4.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== -loader-utils@1.2.3, loader-utils@^1.2.3: +loader-utils@1.2.3, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== @@ -7207,15 +6251,6 @@ loader-utils@1.2.3, loader-utils@^1.2.3: emojis-list "^2.0.0" json5 "^1.0.1" -loader-utils@^1.0.2, loader-utils@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -7263,7 +6298,7 @@ lockfile@1.0.4: dependencies: signal-exit "^3.0.2" -lodash._reinterpolate@~3.0.0: +lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= @@ -7273,16 +6308,6 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= - -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= - lodash.includes@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" @@ -7324,35 +6349,30 @@ lodash.sortby@^4.7.0: integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= lodash.template@^4.0.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" - integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== dependencies: - lodash._reinterpolate "~3.0.0" + lodash._reinterpolate "^3.0.0" lodash.templatesettings "^4.0.0" lodash.templatesettings@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" - integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== dependencies: - lodash._reinterpolate "~3.0.0" + lodash._reinterpolate "^3.0.0" -lodash@4.17.11, lodash@^4.16.6, lodash@^4.17.11, lodash@^4.17.5: +lodash@4.17.11: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -lodash@4.17.15, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: +lodash@4.17.15, lodash@^4.16.6, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.2.1: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -lodash@^4.17.10, lodash@^4.17.4, lodash@^4.2.1: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== - log4js@^3.0.0: version "3.0.6" resolved "https://registry.yarnpkg.com/log4js/-/log4js-3.0.6.tgz#e6caced94967eeeb9ce399f9f8682a4b2b28c8ff" @@ -7365,36 +6385,20 @@ log4js@^3.0.0: streamroller "0.7.0" log4js@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-4.0.2.tgz#0c73e623ca4448669653eb0e9f629beacc7fbbe3" - integrity sha512-KE7HjiieVDPPdveA3bJZSuu0n8chMkFl8mIoisBFxwEJ9FmXe4YzNuiqSwYUiR1K8q8/5/8Yd6AClENY1RA9ww== + version "4.5.1" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-4.5.1.tgz#e543625e97d9e6f3e6e7c9fc196dd6ab2cae30b5" + integrity sha512-EEEgFcE9bLgaYUKuozyFfytQM2wDHtXn4tAN41pkaxpNjAykv11GVdeI4tHtmPWW4Xrgh9R/2d7XYghDVjbKKw== dependencies: date-format "^2.0.0" - debug "^3.1.0" + debug "^4.1.1" flatted "^2.0.0" - rfdc "^1.1.2" - streamroller "^1.0.1" - -logform@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/logform/-/logform-1.9.1.tgz#58b29d7b11c332456d7a217e17b48a13ad69d60a" - integrity sha512-ZHrZE8VSf7K3xKxJiQ1aoTBp2yK+cEbFcgarsjzI3nt3nE/3O0heNSppoOQMUJVMZo/xiVwCxiXIabaZApsKNQ== - dependencies: - colors "^1.2.1" - fast-safe-stringify "^2.0.4" - fecha "^2.3.3" - ms "^2.1.1" - triple-beam "^1.2.0" - -loglevel@^1.4.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" - integrity sha1-4PyVEztu8nbNyIh82vJKpvFW+Po= + rfdc "^1.1.4" + streamroller "^1.0.6" loglevel@^1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.3.tgz#77f2eb64be55a404c9fd04ad16d57c1d6d6b1280" - integrity sha512-LoEDv5pgpvWgPF4kNYuIp0qqSJVWak/dML0RY74xlzMZiT9w77teNAwKYKWBTYjlokMirg+o3jBwp+vlLrcfAA== + version "1.6.4" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.4.tgz#f408f4f006db8354d0577dcf6d33485b3cb90d56" + integrity sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g== long@^4.0.0: version "4.0.0" @@ -7426,10 +6430,10 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@4.1.x, lru-cache@^4.0.1, lru-cache@^4.1.2, lru-cache@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" - integrity sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA== +lru-cache@4.1.x, lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" @@ -7453,7 +6457,7 @@ lunr-mutable-indexes@2.3.2: resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.6.tgz#f278beee7ffd56ad86e6e478ce02ab2b98c78dd5" integrity sha512-swStvEyDqQ85MGpABCMBclZcLI/pBIlu8FFDtmX197+oEgKloJ67QnB+Tidh0340HmLMs39c4GrkPY3cmkXp6Q== -magic-string@0.25.3, magic-string@^0.25.2: +magic-string@0.25.3, magic-string@^0.25.0, magic-string@^0.25.2: version "0.25.3" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9" integrity sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA== @@ -7467,13 +6471,6 @@ magic-string@^0.22.4: dependencies: vlq "^0.2.2" -magic-string@^0.25.0: - version "0.25.0" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.0.tgz#1f3696f9931ff0a1ed4c132250529e19cad6759b" - integrity sha512-Msbwa9oNYNPjwVh9ury5X2BHbTFWoirTlzuf4X+pIoSOQVKNRJHXTx1WmKYuXzRM4QZFv8dGXyZvhDMmWhGLPw== - dependencies: - sourcemap-codec "^1.4.1" - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -7501,23 +6498,6 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== -make-fetch-happen@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083" - integrity sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ== - dependencies: - agentkeepalive "^3.4.1" - cacache "^11.0.1" - http-cache-semantics "^3.8.1" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.1" - lru-cache "^4.1.2" - mississippi "^3.0.0" - node-fetch-npm "^2.0.2" - promise-retry "^1.1.1" - socks-proxy-agent "^4.0.0" - ssri "^6.0.0" - make-fetch-happen@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.0.tgz#a8e3fe41d3415dd656fe7b8e8172e1fb4458b38d" @@ -7541,9 +6521,9 @@ mamacro@^0.0.3: integrity sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA== map-age-cleaner@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz#098fb15538fd3dbe461f12745b0ca8568d4e3f74" - integrity sha512-UN1dNocxQq44IhJyMI4TU8phc2m9BddacHRPRjKGLYaF0jqd3xLz0jS0skpAU9WgYyoR4gHtUpzytNBS385FWQ== + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== dependencies: p-defer "^1.0.0" @@ -7579,11 +6559,6 @@ marked@0.7.0: resolved "https://registry.yarnpkg.com/marked/-/marked-0.7.0.tgz#b64201f051d271b1edc10a04d1ae9b74bb8e5c0e" integrity sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg== -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" - integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w= - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -7606,15 +6581,15 @@ mem@^1.1.0: mimic-fn "^1.0.0" mem@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.0.0.tgz#6437690d9471678f6cc83659c00cbafcd6b0cdaf" - integrity sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== dependencies: map-age-cleaner "^0.1.1" - mimic-fn "^1.0.0" - p-is-promise "^1.1.0" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" -memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: +memory-fs@^0.4.0, memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= @@ -7675,26 +6650,7 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.9: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -7726,71 +6682,34 @@ mime-db@1.40.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== -"mime-db@>= 1.36.0 < 2": - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== - -"mime-db@>= 1.38.0 < 2": - version "1.39.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.39.0.tgz#f95a20275742f7d2ad0429acfe40f4233543780e" - integrity sha512-DTsrw/iWVvwHH+9Otxccdyy0Tgiil6TWK/xhfARJZF/QFhwOgZgOIvA2/VIGpM8U7Q8z5nDmdDWC6tuVMJNibw== +"mime-db@>= 1.40.0 < 2": + version "1.41.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.41.0.tgz#9110408e1f6aa1b34aef51f2c9df3caddf46b6a0" + integrity sha512-B5gxBI+2K431XW8C2rcc/lhppbuji67nf9v39eH8pkWoZDxnAL0PxdpH32KYRScniF8qDHBDlI+ipgg5WrCUYw== -mime-db@~1.36.0: - version "1.36.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397" - integrity sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw== - -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19: - version "2.1.20" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19" - integrity sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A== - dependencies: - mime-db "~1.36.0" - -mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.24" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== dependencies: mime-db "1.40.0" -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - mime@1.6.0, mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@2.4.4, mime@^2.4.4: +mime@2.4.4, mime@^2.0.3, mime@^2.3.1, mime@^2.4.4: version "2.4.4" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== -mime@^2.0.3: - version "2.4.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.0.tgz#e051fd881358585f3279df333fe694da0bcffdd6" - integrity sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w== - -mime@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" - integrity sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg== - -mime@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.2.tgz#ce5229a5e99ffc313abac806b482c10e7ba6ac78" - integrity sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg== - mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== -mimic-fn@^2.1.0: +mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -7837,46 +6756,31 @@ minimist-options@^3.0.1: minimist@0.0.8: version "0.0.8" - resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= minimist@1.2.0, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= minimist@~0.0.1: version "0.0.10" - resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.2.1, minipass@^2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957" - integrity sha512-mlouk1OHlaUE8Odt1drMtG1bAJA4ZA6B/ehysgV0LUIrDHdKgo1KorZq3pK0b/7Z7LJIQ12MNM6aC+Tn6lUZ5w== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minipass@^2.3.5: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== +minipass@^2.2.1, minipass@^2.3.5: + version "2.5.1" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.5.1.tgz#cf435a9bf9408796ca3a3525a8b851464279c9b8" + integrity sha512-dmpSnLJtNQioZFI5HfQ55Ad0DzzsMAb+HfokwRTNXwEQjepbTkl5mtIlSVxGIkOkxlpX7wIn5ET/oAd9fZ/Y/Q== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" - integrity sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA== - dependencies: - minipass "^2.2.1" - minizlib@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== + version "1.2.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.2.tgz#6f0ccc82fa53e1bf2ff145f220d2da9fa6e3a166" + integrity sha512-hR3At21uSrsjjDTWrbu0IMLTpnkpv8IIMFDFaoz43Tmu4LkmAXfH44vNNzpTnf+OAQQCHrb91y/wc2J4x5XgSQ== dependencies: minipass "^2.2.1" @@ -7897,16 +6801,16 @@ mississippi@^3.0.0: through2 "^2.0.0" mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1, mkdirp@~0.5.x: version "0.5.1" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" @@ -7938,11 +6842,16 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.1, ms@^2.0.0, ms@^2.1.1: +ms@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== +ms@^2.0.0, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -7970,16 +6879,11 @@ mv@2.1.1, mv@~2: ncp "~2.0.0" rimraf "~2.4.0" -nan@^2.10.0: +nan@^2.12.1, nan@^2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== -nan@^2.9.2: - version "2.11.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099" - integrity sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -8003,38 +6907,28 @@ ncp@~2.0.0: integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= needle@^2.2.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.3.tgz#c1b04da378cd634d8befe2de965dc2cfb0fd65ca" - integrity sha512-GPL22d/U9cai87FcCPO6e+MT3vyHS2j+zwotakDc7kE2DtUAqFKMXLJCTtRp+5S75vXIwQPvIxkvlctxf9q4gQ== + version "2.4.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" + integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== dependencies: - debug "^2.1.2" + debug "^3.2.6" iconv-lite "^0.4.4" - sax "^1.2.4" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= + sax "^1.2.4" negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -neo-async@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" - integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA== - -neo-async@^2.6.0, neo-async@^2.6.1: +neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== ng-packagr@~5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.5.0.tgz#e13f6f5c109d11453f2e17f7d6fe116564e8bb65" - integrity sha512-XfOHntvJHM5snNcGtxngeTvV2+8/mBJNJMWEsPrNL9yNXU9bDEh7DFf12GZa+HBQ5TUeX4SnX9DCRyXLdpJMlw== + version "5.5.1" + resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.5.1.tgz#2d27968c1079fba12ff2ae542beab82747a92e7b" + integrity sha512-GT6QK5WAirQwALdeJPiXdgRd5PzRqcknb/C/G+cCDEbUFri4oGVmns2Nl4I0FGg/cRn6nXTxRiUunOSqZ3Lehw== dependencies: ajv "^6.10.2" autoprefixer "^9.6.0" @@ -8052,7 +6946,7 @@ ng-packagr@~5.5.0: postcss "^7.0.0" postcss-url "^8.0.0" read-pkg-up "^5.0.0" - rimraf "^2.6.1" + rimraf "^3.0.0" rollup "^1.12.1" rollup-plugin-commonjs "^10.0.0" rollup-plugin-json "^4.0.0" @@ -8079,14 +6973,14 @@ node-fetch-npm@^2.0.2: safe-buffer "^5.1.1" node-fetch@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.2.0.tgz#4ee79bde909262f9775f731e3656d0db55ced5b5" - integrity sha512-OayFWziIxiHY8bCUyLX6sTpDH8Jsbp4FfYd1j1f7vZyfgkcOnAyM4oQR16f8a0s7Gl/viMGRey8eScYk4V4EZA== + version "2.6.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== -node-forge@0.7.5: - version "0.7.5" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df" - integrity sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ== +node-forge@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.2.tgz#b4bcc59fb12ce77a8825fc6a783dfe3182499c5a" + integrity sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg== node-libs-browser@^2.2.1: version "2.2.1" @@ -8117,10 +7011,10 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" - integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -8133,31 +7027,10 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.14: - version "1.1.15" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.15.tgz#9e76a73b0eca3bf7801addaa0e6ce90c795f2b9a" - integrity sha512-cKV097BQaZr8LTSRUa2+oc/aX5L8UkZtPQrMSTgiJEeaW7ymTDCoRaGCoaTqk0lqnalcoSHu4wjSl0Cmj2+bMw== - dependencies: - semver "^5.3.0" - -node-releases@^1.1.23: - version "1.1.23" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.23.tgz#de7409f72de044a2fa59c097f436ba89c39997f0" - integrity sha512-uq1iL79YjfYC0WXoHbC/z28q/9pOl8kSHaXdWmAAc8No+bDwqkZbzIJz55g/MUsPgSGm9LZ7QSUbzTcH5tz47w== - dependencies: - semver "^5.3.0" - -node-releases@^1.1.25: - version "1.1.25" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.25.tgz#0c2d7dbc7fed30fbe02a9ee3007b8c90bf0133d3" - integrity sha512-fI5BXuk83lKEoZDdH3gRhtsNgh05/wZacuXkgbiYkceE7+QIMXOg98n9ZV7mz27B+kFHnqHcUpscZZlGRSmTpQ== - dependencies: - semver "^5.3.0" - node-releases@^1.1.29: - version "1.1.29" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.29.tgz#86a57c6587a30ecd6726449e5d293466b0a0bb86" - integrity sha512-R5bDhzh6I+tpi/9i2hrrvGJ3yKPYzlVOORDkXhnZuwi5D3q1I5w4vYy24PJXTcLk9Q0kws9TO77T75bcK8/ysQ== + version "1.1.30" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.30.tgz#35eebf129c63baeb6d8ddeda3c35b05abfd37f7f" + integrity sha512-BHcr1g6NeUH12IL+X3Flvs4IOnl1TL0JczUhEZjDE+FXXPQcVCNr8NEPb01zqGxzhTpdyJL5GXemaCW7aw6Khw== dependencies: semver "^5.3.0" @@ -8176,17 +7049,17 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, "normalize-package-data@~1.0.1 || ^2.0.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== +normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0, "normalize-package-data@~1.0.1 || ^2.0.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== dependencies: hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" + resolve "^1.10.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.0.1, normalize-path@^2.1.1: +normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= @@ -8213,22 +7086,17 @@ normalize-url@1.9.1: query-string "^4.1.0" sort-keys "^1.0.0" -normalize-url@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" - integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== - normalize-url@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.3.0.tgz#9c49e10fc1876aeb76dba88bf1b2b5d9fa57b2ee" integrity sha512-0NLtR71o4k6GLP+mr6Ty34c5GA6CMoEsncKJxvQd8NzPxaHRJNnb5gZE8R1XF4CPIS7QPHLJ74IFszwtNVAHVQ== npm-bundled@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" - integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== + version "1.0.6" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" + integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== -npm-package-arg@6.1.1: +npm-package-arg@6.1.1, "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== @@ -8238,45 +7106,18 @@ npm-package-arg@6.1.1: semver "^5.6.0" validate-npm-package-name "^3.0.0" -"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" - integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== - dependencies: - hosted-git-info "^2.6.0" - osenv "^0.1.5" - semver "^5.5.0" - validate-npm-package-name "^3.0.0" - -npm-packlist@^1.1.12: - version "1.1.12" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" - integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npm-packlist@^1.1.6: - version "1.1.11" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.11.tgz#84e8c683cbe7867d34b1d357d893ce29e28a02de" - integrity sha512-CxKlZ24urLkJk+9kCm48RTQ7L4hsmgSVzEk0TLGPzzyuFxD7VNgy5Sl24tOLMzQv773a/NeJ1ce1DKeacqffEA== +npm-packlist@^1.1.12, npm-packlist@^1.1.6: + version "1.4.4" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.4.tgz#866224233850ac534b63d1a6e76050092b5d2f44" + integrity sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-pick-manifest@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40" - integrity sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA== - dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" - npm-pick-manifest@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.0.tgz#c94cab52d201a85875e45198fffe1a8a348e7af7" - integrity sha512-H+OnFudiq38Qj8P8xcesD/1Xa0Kvr2QRn1DTlephIwNfJg3P30Szc1wtpGEgdPXfAyKZKT2ajIM2X8YtCrbXrA== + version "3.0.2" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" + integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== dependencies: figgy-pudding "^3.5.1" npm-package-arg "^6.0.0" @@ -8301,22 +7142,10 @@ npm-registry-client@8.6.0: optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -npm-registry-fetch@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz#aa7d9a7c92aff94f48dba0984bdef4bd131c88cc" - integrity sha512-hrw8UMD+Nob3Kl3h8Z/YjmKamb1gf7D1ZZch2otrIXM3uFLB5vjEY6DhMlq80z/zZet6eETLbOXcuQudCB3Zpw== - dependencies: - JSONStream "^1.3.4" - bluebird "^3.5.1" - figgy-pudding "^3.4.1" - lru-cache "^4.1.3" - make-fetch-happen "^4.0.1" - npm-package-arg "^6.1.0" - npm-registry-fetch@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz#5ef75845b605855c7964472542c25da172af8677" - integrity sha512-Jllq35Jag8dtv0M17ue74XtdQTyqKzuAYGiX9mAjOhkmNjib3bBUgK6mUY61+AHnXeSRobQkpY3/xIOS/omptw== + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.1.tgz#4ec0964dce6f29d253801a47cd381a7d6ad13a5e" + integrity sha512-1ZQ+yjnxc698R5h9Yje9CASapzAZr7aYDkJDdERg9xg2hOEY0vRJwskOaJAXq8N/eLavzvW4g564YAfq6zMn/A== dependencies: JSONStream "^1.3.4" bluebird "^3.5.1" @@ -8324,6 +7153,7 @@ npm-registry-fetch@^4.0.0: lru-cache "^5.1.1" make-fetch-happen "^5.0.0" npm-package-arg "^6.1.0" + safe-buffer "^5.2.0" npm-run-path@^2.0.0: version "2.0.2" @@ -8372,7 +7202,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -8391,21 +7221,26 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" + integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== + object-inspect@~1.4.0: version "1.4.1" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.4.1.tgz#37ffb10e71adaf3748d05f713b4c9452f402cbc4" integrity sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw== -object-keys@^1.0.11, object-keys@^1.0.12: +object-is@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6" + integrity sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY= + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.0.6, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-keys@^1.0.6: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== - object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" @@ -8431,14 +7266,6 @@ object.getownpropertydescriptors@^2.0.3: define-properties "^1.1.2" es-abstract "^1.5.1" -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -8446,7 +7273,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -obuf@^1.0.0, obuf@^1.1.1, obuf@^1.1.2: +obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== @@ -8458,11 +7285,6 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - integrity sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c= - on-headers@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" @@ -8475,11 +7297,6 @@ once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: dependencies: wrappy "1" -one-time@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/one-time/-/one-time-0.0.4.tgz#f8cdf77884826fe4dff93e3a9cc37b1e4480742e" - integrity sha1-+M33eISCb+Tf+T46nMN7HkSAdC4= - onetime@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" @@ -8494,13 +7311,6 @@ open@6.4.0: dependencies: is-wsl "^1.1.0" -opn@^5.1.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035" - integrity sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw== - dependencies: - is-wsl "^1.1.0" - opn@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" @@ -8554,16 +7364,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-locale@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.0.1.tgz#3b014fbf01d87f60a1e5348d80fe870dc82c4620" - integrity sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw== - dependencies: - execa "^0.10.0" - lcid "^2.0.0" - mem "^4.0.0" - -os-locale@^3.1.0: +os-locale@^3.0.0, os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== @@ -8586,9 +7387,9 @@ osenv@^0.1.4, osenv@^0.1.5: os-tmpdir "^1.0.0" p-cancelable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.0.0.tgz#07e9c6d22c31f9c6784cb4f1e1454a79b6d9e2d6" - integrity sha512-USgPoaC6tkTGlS831CxsVdmZmyb8tR1D+hStI84MyckLOzfJlYQUweomrwE3D8T7u5u5GVuW064LT501wHTYYA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== p-defer@^1.0.0: version "1.0.0" @@ -8600,10 +7401,10 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== p-limit@^1.1.0: version "1.3.0" @@ -8612,17 +7413,10 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec" - integrity sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A== - dependencies: - p-try "^2.0.0" - -p-limit@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" - integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ== +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" + integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== dependencies: p-try "^2.0.0" @@ -8647,11 +7441,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== - p-map@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" @@ -8670,9 +7459,9 @@ p-try@^1.0.0: integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= p-try@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" - integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== package-json@^6.3.0: version "6.5.0" @@ -8684,7 +7473,7 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pacote@9.5.8: +pacote@9.5.8, pacote@^9.2.3: version "9.5.8" resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.8.tgz#23480efdc4fa74515855c9ecf39cf64078f99786" integrity sha512-0Tl8Oi/K0Lo4MZmH0/6IsT3gpGf9eEAznLXEQPKgPq7FscnbUOyopnVpwXlnQdIbCUaojWy1Wd7VMyqfVsRrIw== @@ -8719,84 +7508,42 @@ pacote@9.5.8: unique-filename "^1.1.1" which "^1.3.1" -pacote@^9.2.3: - version "9.2.3" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.2.3.tgz#48cfe87beb9177acd6594355a584a538835424b3" - integrity sha512-Y3+yY3nBRAxMlZWvr62XLJxOwCmG9UmkGZkFurWHoCjqF0cZL72cTOCRJTvWw8T4OhJS2RTg13x4oYYriauvEw== - dependencies: - bluebird "^3.5.2" - cacache "^11.2.0" - figgy-pudding "^3.5.1" - get-stream "^4.1.0" - glob "^7.1.3" - lru-cache "^4.1.3" - make-fetch-happen "^4.0.1" - minimatch "^3.0.4" - minipass "^2.3.5" - mississippi "^3.0.0" - mkdirp "^0.5.1" - normalize-package-data "^2.4.0" - npm-package-arg "^6.1.0" - npm-packlist "^1.1.12" - npm-pick-manifest "^2.2.3" - npm-registry-fetch "^3.8.0" - osenv "^0.1.5" - promise-inflight "^1.0.1" - promise-retry "^1.1.1" - protoduck "^5.0.1" - rimraf "^2.6.2" - safe-buffer "^5.1.2" - semver "^5.6.0" - ssri "^6.0.1" - tar "^4.4.6" - unique-filename "^1.1.1" - which "^1.3.1" - pako@^0.2.5: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" integrity sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU= pako@^1.0.6, pako@~1.0.2, pako@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" - integrity sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg== + version "1.0.10" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" + integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== parallel-transform@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" - integrity sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY= + version "1.2.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== dependencies: - cyclist "~0.2.2" + cyclist "^1.0.1" inherits "^2.0.3" readable-stream "^2.1.5" parse-asn1@^5.0.0: - version "5.1.1" - resolved "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" - integrity sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw== + version "5.1.4" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" + integrity sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw== dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" create-hash "^1.1.0" evp_bytestokey "^1.0.0" pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" parse-github-repo-url@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" integrity sha1-nn2LslKmy2ukJZUGC3v23z28H1A= -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -8812,6 +7559,16 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-json@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" + integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + lines-and-columns "^1.1.6" + parse5-html-rewriting-stream@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-5.1.0.tgz#63f92c958764aea8cbe3aa68f2e5895c32068ab8" @@ -8851,12 +7608,7 @@ parseuri@0.0.5: dependencies: better-assert "~1.0.0" -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= - -parseurl@~1.3.3: +parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== @@ -8898,7 +7650,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.1: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= @@ -9019,9 +7771,9 @@ pkginfo@0.4.1: integrity sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8= please-upgrade-node@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz#ed320051dfcc5024fae696712c8288993595e8ac" - integrity sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ== + version "3.2.0" + resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" + integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== dependencies: semver-compare "^1.0.0" @@ -9036,23 +7788,14 @@ pn@^1.1.0: integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== popper.js@^1.14.1: - version "1.14.4" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.4.tgz#8eec1d8ff02a5a3a152dd43414a15c7b79fd69b6" - integrity sha1-juwdj/AqWjoVLdQ0FKFce3n9abY= + version "1.15.0" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2" + integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA== portfinder@^1.0.21: - version "1.0.21" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.21.tgz#60e1397b95ac170749db70034ece306b9a27e324" - integrity sha512-ESabpDCzmBS3ekHbmpAIiESq3udRsCBGiBZLsC+HgBKv2ezb0R4oG+7RnYEVZ/ZCfhel5Tx3UzdNWA0Lox2QCA== - dependencies: - async "^1.5.2" - debug "^2.2.0" - mkdirp "0.5.x" - -portfinder@^1.0.9: - version "1.0.19" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.19.tgz#07e87914a55242dcda5b833d42f018d6875b595f" - integrity sha512-23aeQKW9KgHe6citUrG3r9HjeX6vls0h713TAa+CwTKZwNIr/pD2ApaxYF4Um3ZZyq4ar+Siv3+fhoHaIwSOSw== + version "1.0.24" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.24.tgz#11efbc6865f12f37624b6531ead1d809ed965cfa" + integrity sha512-ekRl7zD2qxYndYflwiryJwMioBI7LI7rVXg3EnLK3sjkouT5eOuhS3gS255XxBksa30VG8UPZYZCdgfGOfkSUg== dependencies: async "^1.5.2" debug "^2.2.0" @@ -9074,11 +7817,11 @@ postcss-import@12.0.1: resolve "^1.1.7" postcss-load-config@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.0.0.tgz#f1312ddbf5912cd747177083c5ef7a19d62ee484" - integrity sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" + integrity sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q== dependencies: - cosmiconfig "^4.0.0" + cosmiconfig "^5.0.0" import-cwd "^2.0.0" postcss-loader@3.0.0: @@ -9108,11 +7851,11 @@ postcss-value-parser@^3.2.3: integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== postcss-value-parser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz#99a983d365f7b2ad8d0f9b8c3094926eab4b936d" - integrity sha512-ESPktioptiSUchCKgggAkzdmkgzKfmp0EU8jXH+5kbIUB+unr0Y4CY9SRMvibuvYUBjNh1ACLbxqYNpdTQOteQ== + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" + integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== -postcss@7.0.18: +postcss@7.0.18, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17, postcss@^7.0.2: version "7.0.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== @@ -9121,24 +7864,6 @@ postcss@7.0.18: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.2: - version "7.0.5" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.5.tgz#70e6443e36a6d520b0fd4e7593fcca3635ee9f55" - integrity sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ== - dependencies: - chalk "^2.4.1" - source-map "^0.6.1" - supports-color "^5.5.0" - -postcss@^7.0.17: - version "7.0.17" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" - integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -9154,11 +7879,6 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= - prettier@^1.16.4: version "1.18.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" @@ -9169,15 +7889,10 @@ private@^0.1.6: resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= - process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== process@^0.11.10: version "0.11.10" @@ -9211,7 +7926,7 @@ promise@^7.1.1: promise@~7.0.1: version "7.0.4" - resolved "https://registry.npmjs.org/promise/-/promise-7.0.4.tgz#363e84a4c36c8356b890fed62c91ce85d02ed539" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.0.4.tgz#363e84a4c36c8356b890fed62c91ce85d02ed539" integrity sha1-Nj6EpMNsg1a4kP7WLJHOhdAu1Tk= dependencies: asap "~2.0.3" @@ -9243,11 +7958,10 @@ protoduck@^5.0.1: genfun "^5.0.0" protractor@~5.4.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.1.tgz#011a99e38df7aa45d22455b889ffbb13a6ce0bd9" - integrity sha512-ORey5ewQMYiXQxcQohsqEiKYOg/r5yJoJbt0tuROmmgajdg/CA3gTOZNIFJncUVMAJIk5YFqBBLUjKVmQO6tfA== + version "5.4.2" + resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.2.tgz#329efe37f48b2141ab9467799be2d4d12eb48c13" + integrity sha512-zlIj64Cr6IOWP7RwxVeD8O4UskLYPoyIcg0HboWJL9T79F1F0VWtKkGTr/9GN6BKL+/Q/GmM7C9kFVCfDbP5sA== dependencies: - "@types/node" "^6.0.46" "@types/q" "^0.0.32" "@types/selenium-webdriver" "^3.0.0" blocking-proxy "^1.0.0" @@ -9264,14 +7978,6 @@ protractor@~5.4.0: webdriver-js-extender "2.1.0" webdriver-manager "^12.0.6" -proxy-addr@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" - integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.8.0" - proxy-addr@~2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" @@ -9295,15 +8001,10 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= -psl@^1.1.24: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" - integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ== - -psl@^1.1.28: - version "1.1.33" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.33.tgz#5533d9384ca7aab86425198e10e8053ebfeab661" - integrity sha512-LTDP2uSrsc7XCb5lO7A8BI1qYxRe/8EqlRvMeEl6rsnYAqDOl8xHR+8lSAIVfrNaSAlTPTNOCgNjWcoUL3AZsw== +psl@^1.1.24, psl@^1.1.28: + version "1.4.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" + integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw== public-encrypt@^4.0.0: version "4.0.3" @@ -9386,16 +8087,16 @@ qjobs@^1.1.4: resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== -qs@6.5.2, qs@~6.5.1, qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - qs@6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== +qs@~6.5.1, qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + query-string@^4.1.0: version "4.3.4" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" @@ -9414,10 +8115,10 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= -querystringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.0.tgz#7ded8dfbf7879dcc60d0a644ac6754b283ad17ef" - integrity sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg== +querystringify@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" + integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== quick-lru@^1.0.0: version "1.1.0" @@ -9425,18 +8126,19 @@ quick-lru@^1.0.0: integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= quicktype-core@^6.0.15: - version "6.0.15" - resolved "https://registry.yarnpkg.com/quicktype-core/-/quicktype-core-6.0.15.tgz#44fddfa7ae00fcc06e2eb43829870341be12a34b" - integrity sha512-m8GHNFsd2yL9eZmIy0FoZCDuoxfKnvfQHCpcBTvV0760AV9kSNRAk8e2uRs2eYcgj/VUSx0qcUUqm/40CrwYOQ== + version "6.0.47" + resolved "https://registry.yarnpkg.com/quicktype-core/-/quicktype-core-6.0.47.tgz#4b7964c58c8ba55bb554ab110a035fcde3937fef" + integrity sha512-sHOrqzwF8R4MdeFLrXWpMxzSlPiTE6Jd8DzdYUiFUW1KrrhA3RiFyOOyrtQs0V1cVyWHaFHqd8SUe8Xy3vRZpQ== dependencies: - "@types/urijs" "github:quicktype/types-urijs" + "@mark.probst/unicode-properties" "~1.1.0" + "@types/urijs" "^1.19.1" collection-utils "^1.0.1" js-base64 "^2.4.3" pako "^1.0.6" pluralize "^7.0.0" - unicode-properties "github:quicktype/unicode-properties#dist" urijs "^1.19.1" wordwrap "^1.0.0" + yaml "^1.5.0" quote-stream@^1.0.1, quote-stream@~1.0.2: version "1.0.2" @@ -9447,19 +8149,10 @@ quote-stream@^1.0.1, quote-stream@~1.0.2: minimist "^1.1.3" through2 "^2.0.0" -randomatic@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116" - integrity sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" - integrity sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A== + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" @@ -9471,26 +8164,11 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" -range-parser@^1.0.3, range-parser@^1.2.0, range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - -range-parser@^1.2.1, range-parser@~1.2.1: +range-parser@^1.2.0, range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" - integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== - dependencies: - bytes "3.0.0" - http-errors "1.6.3" - iconv-lite "0.4.23" - unpipe "1.0.0" - raw-body@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" @@ -9541,9 +8219,9 @@ read-installed@~4.0.3: graceful-fs "^4.1.2" read-package-json@^2.0.0: - version "2.0.13" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" - integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg== + version "2.1.0" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.0.tgz#e3d42e6c35ea5ae820d9a03ab0c7291217fc51d5" + integrity sha512-KLhu8M1ZZNkMcrq1+0UJbR8Dii8KZUqB0Sha4mOx/bknfKI/fyrQVrG/YIt2UOtG667sD8+ee4EXMM91W9dC+A== dependencies: glob "^7.1.1" json-parse-better-errors "^1.0.1" @@ -9621,16 +8299,18 @@ read-pkg@^4.0.1: pify "^3.0.0" read-pkg@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.0.0.tgz#75449907ece8dfb89cbc76adcba2665316e32b94" - integrity sha512-OWufaRc67oJjcgrxckW/qO9q22iYzyiONh8h+GMcnOvSHAmhV1Dr3x+gyRjP+Qxc5jKupkSfoCQLS/98rDPh9A== + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== dependencies: - normalize-package-data "^2.3.2" - parse-json "^4.0.0" + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.3: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.3, readable-stream@~2.3.6: version "2.3.6" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== dependencies: core-util-is "~1.0.0" @@ -9642,46 +8322,24 @@ read-pkg@^5.0.0: util-deprecate "~1.0.1" readable-stream@^3.0.6: - version "3.1.1" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.1.1.tgz#ed6bbc6c5ba58b090039ff18ce670515795aeb06" - integrity sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA== + version "3.4.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" + integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@~2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" - integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - readdir-scoped-modules@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" - integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c= + version "1.1.0" + resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" + integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" graceful-fs "^4.1.2" once "^1.3.0" -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - integrity sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg= - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - readdirp@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" @@ -9691,17 +8349,10 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.0.2.tgz#cba63348e9e42fc1bd334b1d2ef895b6a043cbd6" - integrity sha512-LbyJYv48eywrhOlScq16H/VkCiGKGPC2TpOdZCJ7QXnYEjn3NN/Oblh8QEU3vqfSRBB7OGvh5x45NKiVeNujIQ== - dependencies: - picomatch "^2.0.4" - readdirp@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.1.tgz#b158123ac343c8b0f31d65680269cc0fc1025db1" - integrity sha512-XXdSXZrQuvqoETj50+JAitxz1UPdt5dupjT6T5nVB+WvjMv2XKYj+s7hPeAVCXvmJrL36O4YYyWlIC3an2ePiQ== + version "3.1.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.2.tgz#fa85d2d14d4289920e4671dead96431add2ee78a" + integrity sha512-8rhl0xs2cxfVsqzreYCvs8EwBfn/DhVdqtoLmw19uI3SC5avYX9teCurlErfpPXGmYtMHReGaP2RsLnFvz/lnw== dependencies: picomatch "^2.0.4" @@ -9722,11 +8373,11 @@ redent@^2.0.0: strip-indent "^2.0.0" reflect-metadata@^0.1.2: - version "0.1.12" - resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.12.tgz#311bf0c6b63cd782f228a81abe146a2bfa9c56f2" - integrity sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A== + version "0.1.13" + resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" + integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== -regenerate-unicode-properties@^8.0.2: +regenerate-unicode-properties@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA== @@ -9738,7 +8389,7 @@ regenerate@^1.2.1, regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== -regenerator-runtime@0.13.3: +regenerator-runtime@0.13.3, regenerator-runtime@^0.13.2: version "0.13.3" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== @@ -9755,13 +8406,6 @@ regenerator-transform@^0.14.0: dependencies: private "^0.1.6" -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== - dependencies: - is-equal-shallow "^0.1.3" - regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" @@ -9775,6 +8419,13 @@ regexp-tree@^0.1.13: resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.13.tgz#5b19ab9377edc68bc3679256840bb29afc158d7f" integrity sha512-hwdV/GQY5F8ReLZWO+W1SRoN5YfpOKY6852+tBFcma72DKBIcHjPRIlIvQN35bCOljuAfP2G2iB0FC/w236mUw== +regexp.prototype.flags@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" + integrity sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA== + dependencies: + define-properties "^1.1.2" + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -9785,12 +8436,12 @@ regexpu-core@^1.0.0: regjsparser "^0.1.4" regexpu-core@^4.5.4: - version "4.5.4" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae" - integrity sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ== + version "4.6.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" + integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg== dependencies: regenerate "^1.4.0" - regenerate-unicode-properties "^8.0.2" + regenerate-unicode-properties "^8.1.0" regjsgen "^0.5.0" regjsparser "^0.6.0" unicode-match-property-ecmascript "^1.0.4" @@ -9813,7 +8464,7 @@ registry-url@^5.0.0: regjsgen@^0.2.0: version "0.2.0" - resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= regjsgen@^0.5.0: @@ -9845,7 +8496,7 @@ repeat-element@^1.1.2: resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== -repeat-string@^1.5.2, repeat-string@^1.6.1: +repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= @@ -9930,11 +8581,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -9972,17 +8618,10 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.5, resolve@^1.1.7, resolve@^1.3.2: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - dependencies: - path-parse "^1.0.5" - -resolve@^1.11.0, resolve@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e" - integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== +resolve@^1.1.5, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.3.2: + version "1.12.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" + integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== dependencies: path-parse "^1.0.6" @@ -10021,22 +8660,22 @@ retry@^0.12.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= -rfdc@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.2.tgz#e6e72d74f5dc39de8f538f65e00c36c18018e349" - integrity sha512-92ktAgvZhBzYTIK0Mja9uen5q5J3NRVMoDkJL2VMwq6SXjVCgqvQeVP2XAaUY6HT+XpQYeLSjb3UoitBryKmdA== +rfdc@^1.1.2, rfdc@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" + integrity sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug== -rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== +rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== dependencies: - glob "^7.0.5" + glob "^7.1.3" -rimraf@^2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== +rimraf@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" + integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== dependencies: glob "^7.1.3" @@ -10047,6 +8686,13 @@ rimraf@~2.4.0: dependencies: glob "^6.0.1" +rimraf@~2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -10056,9 +8702,9 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: inherits "^2.0.1" rollup-plugin-commonjs@^10.0.0: - version "10.0.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.0.1.tgz#fbfcadf4ce2e826068e056a9f5c19287d9744ddf" - integrity sha512-x0PcCVdEc4J8igv1qe2vttz8JKAKcTs3wfIA3L8xEty3VzxgORLrzZrNWaVMc+pBC4U3aDOb9BnWLAQ8J11vkA== + version "10.1.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz#417af3b54503878e084d127adf4d1caf8beb86fb" + integrity sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q== dependencies: estree-walker "^0.6.1" is-reference "^1.1.2" @@ -10092,37 +8738,21 @@ rollup-plugin-sourcemaps@^0.4.2: rollup-pluginutils "^2.0.1" source-map-resolve "^0.5.0" -rollup-pluginutils@^2.0.1: - version "2.3.3" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz#3aad9b1eb3e7fe8262820818840bf091e5ae6794" - integrity sha512-2XZwja7b6P5q4RZ5FhyX1+f46xi1Z3qBKigLRZ6VTZjwbN0K1IFGMlwm06Uu0Emcre2Z63l77nq/pzn+KxIEoA== - dependencies: - estree-walker "^0.5.2" - micromatch "^2.3.11" - -rollup-pluginutils@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.5.0.tgz#23be0f05ac3972ea7b08fc7870cb91fde5b23a09" - integrity sha512-9Muh1H+XB5f5ONmKMayUoTYR1EZwHbwJJ9oZLrKT5yuTf/RLIQ5mYIGsrERquVucJmjmaAW0Y7+6Qo1Ep+5w3Q== - dependencies: - estree-walker "^0.6.0" - micromatch "^3.1.10" - -rollup-pluginutils@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz#8fa6dd0697344938ef26c2c09d2488ce9e33ce97" - integrity sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg== +rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: + version "2.8.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" + integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== dependencies: estree-walker "^0.6.1" rollup@^1.12.1: - version "1.17.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.17.0.tgz#47ee8b04514544fc93b39bae06271244c8db7dfa" - integrity sha512-k/j1m0NIsI4SYgCJR4MWPstGJOWfJyd6gycKoMhyoKPVXxm+L49XtbUwZyFsrSU2YXsOkM4u1ll9CS/ZgJBUpw== + version "1.21.3" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.21.3.tgz#2d957e04b230b06a85b8c617bf594f92c37c4d5d" + integrity sha512-43CgeUtHhfiqBOUd0uJo5NEOg2FuheF3SqGN8BqgvnqB4xM2TbfPdudeSdllDcMKpagHb//qtpaAADBurT4GzA== dependencies: "@types/estree" "0.0.39" - "@types/node" "^12.6.2" - acorn "^6.2.0" + "@types/node" "^12.7.5" + acorn "^7.0.0" run-async@^2.2.0: version "2.3.0" @@ -10143,18 +8773,30 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@6.4.0, rxjs@^6.0.0, rxjs@^6.4.0, rxjs@~6.4.0: +rxjs@6.4.0, rxjs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== dependencies: tslib "^1.9.0" -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +rxjs@^6.0.0, rxjs@^6.4.0: + version "6.5.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" + integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== + dependencies: + tslib "^1.9.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + safe-json-stringify@~1: version "1.2.0" resolved "https://registry.yarnpkg.com/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz#356e44bc98f1f93ce45df14bcd7c01cda86e0afd" @@ -10162,7 +8804,7 @@ safe-json-stringify@~1: safe-regex@^1.1.0: version "1.1.0" - resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= dependencies: ret "~0.1.10" @@ -10183,24 +8825,17 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.22.12: +sass@1.22.12, sass@^1.17.3: version "1.22.12" resolved "https://registry.yarnpkg.com/sass/-/sass-1.22.12.tgz#5cbdd38720ffd1857da695331faee9f634bcb5d7" integrity sha512-u5Rxn+dKTPCW5/11kMNxtmqKsxCjcpnqj9CaJoru1NqeJ0DOa9rOM00e0HqmseTAatGkKoLY+jaNecMYevu1gg== dependencies: chokidar ">=2.0.0 <4.0.0" -sass@^1.17.3: - version "1.17.3" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.17.3.tgz#19f9164cf8653b9fca670a64e53285272c96d192" - integrity sha512-S4vJawbrNUxJUBiHLXPYUKZCoO6cvq3/3ZFBV66a+PafTxcDEFJB+FHLDFl0P+rUfha/703ajEXMuGTYhJESkQ== - dependencies: - chokidar "^2.0.0" - sauce-connect-launcher@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.2.4.tgz#8d38f85242a9fbede1b2303b559f7e20c5609a1c" - integrity sha512-X2vfwulR6brUGiicXKxPm1GJ7dBEeP1II450Uv4bHGrcGOapZNgzJvn9aioea5IC5BPp/7qjKdE3xbbTBIVXMA== + version "1.2.7" + resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.2.7.tgz#c7f8b3d4eb354d07a9922b4cd67356f527192556" + integrity sha512-v07+QhFrxgz3seMFuRSonu3gW1s6DbcLQlFhjsRrmKUauzPbbudHdnn91WYgEwhoZVdPNzeZpAEJwcQyd9xnTA== dependencies: adm-zip "~0.4.3" async "^2.1.2" @@ -10208,7 +8843,7 @@ sauce-connect-launcher@^1.2.4: lodash "^4.16.6" rimraf "^2.5.4" -"sauce-connect@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": +"sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" @@ -10219,11 +8854,6 @@ saucelabs@^1.5.0: dependencies: https-proxy-agent "^2.2.1" -sax@0.5.x: - version "0.5.8" - resolved "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" - integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE= - sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -10252,23 +8882,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.0, schema-utils@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.0.1.tgz#1eec2e059556af841b7f3a83b61af13d7a3f9196" - integrity sha512-HJFKJ4JixDpRur06QHwi8uu2kZbng318ahWEKgBjc0ZklcE4FDvmm2wghb448q0IRaABxIESt8vqPFvwgMB80A== - dependencies: - ajv "^6.1.0" - ajv-keywords "^3.1.0" - -schema-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.1.0.tgz#940363b6b1ec407800a22951bdcc23363c039393" - integrity sha512-g6SViEZAfGNrToD82ZPUjq52KUPDYc+fN5+g6Euo5mLokl/9Yx14z0Cu4RR1m55HtBXejO0sBt+qw79axN+Fiw== - dependencies: - ajv "^6.1.0" - ajv-keywords "^3.1.0" - -schema-utils@^2.2.0: +schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.1.0, schema-utils@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.2.0.tgz#48a065ce219e0cacf4631473159037b2c1ae82da" integrity sha512-5EwsCNhfFTZvUreQhx/4vVQpJ/lnCAkgoIHLhSpp4ZirE+4hzFvdJi0FMub6hxbFVBJYSpeVVmon+2e7uEGRrA== @@ -10297,21 +8911,21 @@ selenium-webdriver@3.6.0, selenium-webdriver@^3.0.1: xml2js "^0.4.17" selenium-webdriver@^4.0.0-alpha.1: - version "4.0.0-alpha.1" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.0.0-alpha.1.tgz#cc93415e21d2dc1dfd85dfc5f6b55f3ac53933b1" - integrity sha512-z88rdjHAv3jmTZ7KSGUkTvo4rGzcDGMq0oXWHNIDK96Gs31JKVdu9+FMtT4KBrVoibg8dUicJDok6GnqqttO5Q== + version "4.0.0-alpha.5" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.0.0-alpha.5.tgz#e4683b3dbf827d70df09a7e43bf02ebad20fa7c1" + integrity sha512-hktl3DSrhzM59yLhWzDGHIX9o56DvA+cVK7Dw6FcJR6qQ4CGzkaHeXQPcdrslkWMTeq0Ci9AmCxq0EMOvm2Rkg== dependencies: - jszip "^3.1.3" - rimraf "^2.5.4" + jszip "^3.1.5" + rimraf "^2.6.3" tmp "0.0.30" - xml2js "^0.4.17" + xml2js "^0.4.19" -selfsigned@^1.10.4, selfsigned@^1.9.1: - version "1.10.4" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.4.tgz#cdd7eccfca4ed7635d47a08bf2d5d3074092e2cd" - integrity sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw== +selfsigned@^1.10.4: + version "1.10.6" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.6.tgz#7b3cd37ed9c2034261a173af1a1aae27d8169b67" + integrity sha512-i3+CeqxL7DpAazgVpAGdKMwHuL63B5nhJMh9NQ7xmChGkA3jNFflq6Jyo1LLJYcr3idWiNOPWHCrm4zMayLG4w== dependencies: - node-forge "0.7.5" + node-forge "0.8.2" semver-compare@^1.0.0: version "1.0.0" @@ -10339,45 +8953,21 @@ semver-intersect@1.4.0: dependencies: semver "^5.0.0" -"semver@2 >=2.2.1 || 3.x || 4 || 5", semver@5.6.0, semver@^5.0.0, semver@^5.0.3, semver@^5.4.1, semver@^5.6.0: +"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", semver@^5.0.0, semver@^5.0.3, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" - integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw== - semver@6.3.0, semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b" - integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ== - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -10398,16 +8988,16 @@ send@0.17.1: statuses "~1.5.0" serialize-javascript@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" - integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA== + version "1.9.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.9.1.tgz#cfc200aef77b600c47da9bb8149c943e798c2fdb" + integrity sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A== serialize-javascript@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.0.tgz#9310276819efd0eb128258bb341957f6eb2fc570" integrity sha512-a/mxFfU00QT88umAJQsNWOnUKckhNCqOl028N48e7wFmo2/EHpTo9Wso+iJJCMrQnmFvcjto5RJdAHEvVhcyUQ== -serve-index@^1.7.2, serve-index@^1.9.1: +serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= @@ -10420,16 +9010,6 @@ serve-index@^1.7.2, serve-index@^1.9.1: mime-types "~2.1.17" parseurl "~1.3.2" -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - serve-static@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" @@ -10445,25 +9025,15 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -set-immediate-shim@^1.0.1: +set-immediate-shim@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -10487,7 +9057,7 @@ setprototypeof@1.1.1: sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" - resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== dependencies: inherits "^2.0.1" @@ -10522,13 +9092,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" - integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= - dependencies: - is-arrayish "^0.3.1" - slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -10544,10 +9107,10 @@ slide@^1.1.3, slide@~1.1.3: resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= -smart-buffer@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" - integrity sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg== +smart-buffer@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" + integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== snapdragon-node@^2.0.1: version "2.1.1" @@ -10646,20 +9209,20 @@ sockjs@0.3.19: uuid "^3.0.1" socks-proxy-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473" - integrity sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw== + version "4.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" + integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== dependencies: - agent-base "~4.2.0" - socks "~2.2.0" + agent-base "~4.2.1" + socks "~2.3.2" -socks@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.1.tgz#68ad678b3642fbc5d99c64c165bc561eab0215f9" - integrity sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w== +socks@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.2.tgz#ade388e9e6d87fdb11649c15746c578922a5883e" + integrity sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ== dependencies: ip "^1.1.5" - smart-buffer "^4.0.1" + smart-buffer "4.0.2" sort-keys@^1.0.0: version "1.1.2" @@ -10692,7 +9255,7 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@0.5.13, source-map-support@~0.5.12: +source-map-support@0.5.13, source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.5, source-map-support@~0.5.12: version "0.5.13" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== @@ -10700,7 +9263,7 @@ source-map-support@0.5.13, source-map-support@~0.5.12: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@0.5.9, source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.5: +source-map-support@0.5.9: version "0.5.9" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== @@ -10720,13 +9283,6 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@0.1.x: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - integrity sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y= - dependencies: - amdefine ">=0.0.4" - source-map@0.7.3, source-map@^0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" @@ -10742,20 +9298,15 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -sourcemap-codec@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2" - integrity sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA== - sourcemap-codec@^1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz#c63ea927c029dd6bd9a2b7fa03b3fec02ad56e9f" - integrity sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg== + version "1.4.6" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz#e30a74f0402bad09807640d39e971090a08ce1e9" + integrity sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg== spawn-wrap@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c" - integrity sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg== + version "1.4.3" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.3.tgz#81b7670e170cca247d80bf5faf0cfb713bdcf848" + integrity sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw== dependencies: foreground-child "^1.5.6" mkdirp "^0.5.0" @@ -10774,9 +9325,9 @@ spdx-compare@^1.0.0: spdx-ranges "^2.0.0" spdx-correct@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" - integrity sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g== + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" @@ -10787,9 +9338,9 @@ spdx-exceptions@^1.0.0: integrity sha1-nSGsTaS9tx0GD7dOWmdTHQMsu6Y= spdx-exceptions@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" - integrity sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg== + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== spdx-expression-parse@^3.0.0: version "3.0.0" @@ -10805,19 +9356,19 @@ spdx-license-ids@^1.0.0: integrity sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc= spdx-license-ids@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz#e2a303236cac54b04031fa7a5a79c7e701df852f" - integrity sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w== + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== spdx-ranges@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/spdx-ranges/-/spdx-ranges-2.0.0.tgz#257686798e5edb41d45c1aba3d3f1bb47af8d5ec" - integrity sha512-AUUXLfqkwD7GlzZkXv8ePPCpPjeVWI9xJCfysL8re/uKb6H10umMnC7bFRsHmLJan4fslUtekAgpHlSgLc/7mA== + version "2.1.1" + resolved "https://registry.yarnpkg.com/spdx-ranges/-/spdx-ranges-2.1.1.tgz#87573927ba51e92b3f4550ab60bfc83dd07bac20" + integrity sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA== spdx-satisfies@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/spdx-satisfies/-/spdx-satisfies-4.0.0.tgz#ebc79eec88b68ac75618e2e5ee94fbc347587552" - integrity sha512-OcARj6U1OuVv98SVrRqgrR30sVocONtoPpnX8Xz4vXNrFVedqtbgkA+0KmQoXIQ2xjfltPPRVIMeNzKEFLWWKQ== + version "4.0.1" + resolved "https://registry.yarnpkg.com/spdx-satisfies/-/spdx-satisfies-4.0.1.tgz#9a09a68d80f5f1a31cfaebb384b0c6009e4969fe" + integrity sha512-WVzZ/cXAzoNmjCWiEluEA3BjHp5tiUmmhn9MK+X0tBbR9sOqtC6UQwmgCNrAIZvNlMuBUYAaHYfb2oqlF9SwKA== dependencies: spdx-compare "^1.0.0" spdx-expression-parse "^3.0.0" @@ -10831,19 +9382,6 @@ spdx@^0.5.1: spdx-exceptions "^1.0.0" spdx-license-ids "^1.0.0" -spdy-transport@^2.0.18: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1" - integrity sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g== - dependencies: - debug "^2.6.8" - detect-node "^2.0.3" - hpack.js "^2.1.6" - obuf "^1.1.1" - readable-stream "^2.2.9" - safe-buffer "^5.0.1" - wbuf "^1.7.2" - spdy-transport@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" @@ -10856,18 +9394,6 @@ spdy-transport@^3.0.0: readable-stream "^3.0.6" wbuf "^1.7.3" -spdy@^3.4.1: - version "3.4.7" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" - integrity sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw= - dependencies: - debug "^2.6.8" - handle-thing "^1.2.5" - http-deceiver "^1.2.7" - safe-buffer "^5.0.1" - select-hose "^2.0.0" - spdy-transport "^2.0.18" - spdy@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.1.tgz#6f12ed1c5db7ea4f24ebb8b89ba58c87c08257f2" @@ -10918,19 +9444,18 @@ sprintf-js@~1.0.2: integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" - integrity sha1-xvxhZIo9nE52T9P8306hBeSSupg= + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - safer-buffer "^2.0.2" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" ssri@^5.2.4: @@ -10947,15 +9472,10 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" -stack-trace@0.0.x: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" - integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= - static-eval@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.0.tgz#0e821f8926847def7b4b50cda5d55c04a9b13864" - integrity sha512-6flshd3F1Gwm+Ksxq463LtFd1liC77N/PX1FVVc3OzL3hAmo2fwHFbuArkcfi7s9rTNsLEhcRmXGFZhlgy40uw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.2.tgz#2d1759306b1befa688938454c546b7871f806a42" + integrity sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg== dependencies: escodegen "^1.8.1" @@ -10992,25 +9512,15 @@ static-module@^2.2.0: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - integrity sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - stealthy-require@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - integrity sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds= + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== dependencies: inherits "~2.0.1" readable-stream "^2.0.2" @@ -11049,16 +9559,16 @@ streamroller@0.7.0: mkdirp "^0.5.1" readable-stream "^2.3.0" -streamroller@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-1.0.3.tgz#cb51e7e382f799a9381a5d7490ce3053b325fba3" - integrity sha512-P7z9NwP51EltdZ81otaGAN3ob+/F88USJE546joNq7bqRNTe6jc74fTBDyynxP4qpIfKlt/CesEYicuMzI0yJg== +streamroller@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-1.0.6.tgz#8167d8496ed9f19f05ee4b158d9611321b8cacd9" + integrity sha512-3QC47Mhv3/aZNFpDDVO44qQb9gwB9QggMEE0sQmkTAwBVYdBRWISdsywlkfm5II1Q5y/pmrHflti/IgmIzdDBg== dependencies: - async "^2.6.1" + async "^2.6.2" date-format "^2.0.0" - debug "^3.1.0" - fs-extra "^7.0.0" - lodash "^4.17.10" + debug "^3.2.6" + fs-extra "^7.0.1" + lodash "^4.17.14" strict-uri-encode@^1.0.0: version "1.1.0" @@ -11100,25 +9610,36 @@ string-width@^4.1.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^5.2.0" -string_decoder@^1.0.0, string_decoder@~1.1.1: +string.prototype.trimleft@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634" + integrity sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string.prototype.trimright@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz#669d164be9df9b6f7559fa8e89945b168a5a6c58" + integrity sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string_decoder@^1.0.0, string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" -string_decoder@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -11191,7 +9712,7 @@ stylus-loader@3.0.2: lodash.clonedeep "^4.5.0" when "~3.6.x" -stylus@0.54.7: +stylus@0.54.7, stylus@^0.54.5: version "0.54.7" resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.7.tgz#c6ce4793965ee538bcebe50f31537bfc04d88cd2" integrity sha512-Yw3WMTzVwevT6ZTrLCYNHAFmanMxdylelL3hkWNgPMeTCpMwpV3nXjpOHuBXtFv7aiO2xRuQS6OoAdgkNcSNug== @@ -11205,18 +9726,6 @@ stylus@0.54.7: semver "^6.0.0" source-map "^0.7.3" -stylus@^0.54.5: - version "0.54.5" - resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" - integrity sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk= - dependencies: - css-parse "1.7.x" - debug "*" - glob "7.0.x" - mkdirp "0.5.x" - sax "0.5.x" - source-map "0.1.x" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -11229,7 +9738,7 @@ supports-color@^3.1.2: dependencies: has-flag "^1.0.0" -supports-color@^5.1.0, supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -11253,30 +9762,12 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -tapable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.0.tgz#0d076a172e3d9ba088fd2272b2668fb8d194b78c" - integrity sha512-IlqtmLVaZA2qab8epUXbVWRn3aB1imbDMJtjB3nu4X0NqPkcY/JH9ZtCBWKHWPxs8Svi9tyo8w2dBoi07qZbBA== - -tapable@^1.1.3: +tapable@^1.0.0, tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar@^4, tar@^4.4.4, tar@^4.4.6: - version "4.4.6" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" - integrity sha512-tMkTnh9EdzxyfW+6GK6fCahagXsnYk6kE6S9Gr9pjVdys769+laCTbodXDhPAjzVtEBazRgP0gYqOjnk9dQzLg== - dependencies: - chownr "^1.0.1" - fs-minipass "^1.2.5" - minipass "^2.3.3" - minizlib "^1.1.0" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - -tar@^4.4.10: +tar@^4, tar@^4.4.10, tar@^4.4.4: version "4.4.10" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== @@ -11332,7 +9823,7 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.1, terser@^4.2.1: +terser@4.3.1, terser@^4.1.2, terser@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65" integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg== @@ -11341,15 +9832,6 @@ terser@4.3.1, terser@^4.2.1: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.1.2.tgz#b2656c8a506f7ce805a3f300a2ff48db022fa391" - integrity sha512-jvNoEQSPXJdssFwqPSgWjsOrb+ELoE+ILpHPKXC83tIxOlh2U75F1KuB2luLD/3a6/7K3Vw5pDn+hvu0C4AzSw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - test-exclude@^5.2.2: version "5.2.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" @@ -11361,21 +9843,16 @@ test-exclude@^5.2.2: require-main-filename "^2.0.0" text-extensions@^1.0.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.8.0.tgz#6f343c62268843019b21a616a003557bdb952d2b" - integrity sha512-mVzjRxuWnDKs/qH1rbOJEVHLlSX9kty9lpi7lMvLgU9S74mQ8/Ozg9UPcKxShh0qG2NZ+NyPOPpcZU4C1Eld9A== - -text-hex@1.0.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" - integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== + version "1.9.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" + integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== through2@^2.0.0, through2@^2.0.2, through2@^2.0.3, through2@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - integrity sha1-AARWmzfHx0ujnEPzzteNGtlBQL4= + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== dependencies: - readable-stream "^2.1.5" + readable-stream "~2.3.6" xtend "~4.0.1" through@2, "through@>=2.2.7 <3", through@X.X.X, through@^2.3.6: @@ -11389,9 +9866,9 @@ thunky@^1.0.2: integrity sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow== timers-browserify@^2.0.4: - version "2.0.10" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" - integrity sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg== + version "2.0.11" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" + integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== dependencies: setimmediate "^1.0.4" @@ -11515,16 +9992,11 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -tree-kill@1.2.1: +tree-kill@1.2.1, tree-kill@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.1.tgz#5398f374e2f292b9dcc7b2e71e30a5c3bb6c743a" integrity sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q== -tree-kill@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" - integrity sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg== - treeify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" @@ -11550,11 +10022,6 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -triple-beam@^1.2.0, triple-beam@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" - integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== - ts-api-guardian@0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/ts-api-guardian/-/ts-api-guardian-0.4.6.tgz#ebd9a700b40de6ca4dbc5c468e322fe86476b6db" @@ -11578,16 +10045,11 @@ ts-node@^5.0.0: source-map-support "^0.5.3" yn "^2.0.0" -tslib@1.10.0, tslib@^1.10.0: +tslib@1.10.0, tslib@^1.10.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== - tslint-no-circular-imports@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/tslint-no-circular-imports/-/tslint-no-circular-imports-0.7.0.tgz#9df0a15654d66b172e0b7843eed073fa5ae99b5f" @@ -11601,17 +10063,17 @@ tslint-sonarts@1.9.0: immutable "^3.8.2" tslint@^5.15.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.15.0.tgz#6ffb180986d63afa1e531feb2a134dbf961e27d3" - integrity sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA== + version "5.20.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.0.tgz#fac93bfa79568a5a24e7be9cdde5e02b02d00ec1" + integrity sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g== dependencies: - babel-code-frame "^6.22.0" + "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" chalk "^2.3.0" commander "^2.12.1" - diff "^3.2.0" + diff "^4.0.1" glob "^7.1.1" - js-yaml "^3.13.0" + js-yaml "^3.13.1" minimatch "^3.0.4" mkdirp "^0.5.1" resolve "^1.3.2" @@ -11667,13 +10129,10 @@ type-fest@^0.5.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2" integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw== -type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.18" +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" @@ -11694,11 +10153,11 @@ typescript@3.5.3: integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g== uglify-js@^3.1.4: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" - integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== + version "3.6.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" + integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg== dependencies: - commander "~2.17.1" + commander "~2.20.0" source-map "~0.6.1" ultron@~1.1.0: @@ -11724,13 +10183,6 @@ unicode-match-property-value-ecmascript@^1.1.0: resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== -"unicode-properties@github:quicktype/unicode-properties#dist": - version "1.1.0" - resolved "https://codeload.github.com/quicktype/unicode-properties/tar.gz/d5fddfea1ef9d05c6479a979e225476063e13f52" - dependencies: - brfs "^1.4.0" - unicode-trie "^0.3.0" - unicode-property-aliases-ecmascript@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" @@ -11745,16 +10197,16 @@ unicode-trie@^0.3.0: tiny-inflate "^1.0.0" union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== dependencies: arr-union "^3.1.0" get-value "^2.0.6" is-extendable "^0.1.1" - set-value "^0.4.3" + set-value "^2.0.1" -unique-filename@^1.1.0, unique-filename@^1.1.1: +unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== @@ -11762,9 +10214,9 @@ unique-filename@^1.1.0, unique-filename@^1.1.1: unique-slug "^2.0.0" unique-slug@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.1.tgz#5e9edc6d1ce8fb264db18a507ef9bd8544451ca6" - integrity sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== dependencies: imurmurhash "^0.1.4" @@ -11807,15 +10259,10 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -upath@^1.0.5: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" - integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== - -upath@^1.1.0, upath@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" - integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== update-notifier@^3.0.0: version "3.0.1" @@ -11860,11 +10307,11 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.3.tgz#bfaee455c889023219d757e045fa6a684ec36c15" - integrity sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw== + version "1.4.7" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" + integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== dependencies: - querystringify "^2.0.0" + querystringify "^2.1.1" requires-port "^1.0.0" url@^0.11.0: @@ -11905,6 +10352,14 @@ util-promisify@^2.1.0: dependencies: object.getownpropertydescriptors "^2.0.3" +util.promisify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + util@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" @@ -11925,9 +10380,9 @@ utils-merge@1.0.1: integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== v8-coverage@1.0.9: version "1.0.9" @@ -12081,7 +10536,7 @@ watchpack@^1.6.0: graceful-fs "^4.1.2" neo-async "^2.5.0" -wbuf@^1.1.0, wbuf@^1.7.2, wbuf@^1.7.3: +wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== @@ -12097,9 +10552,9 @@ webdriver-js-extender@2.1.0: selenium-webdriver "^3.0.1" webdriver-manager@^12.0.6: - version "12.1.0" - resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.0.tgz#f6601e52de5f0c97fc7024c889eeb2416f2f1d9d" - integrity sha512-oEc5fmkpz6Yh6udhwir5m0eN5mgRPq9P/NU5YWuT3Up5slt6Zz+znhLU7q4+8rwCZz/Qq3Fgpr/4oao7NPCm2A== + version "12.1.6" + resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.6.tgz#9e5410c506d1a7e0a7aa6af91ba3d5bb37f362b6" + integrity sha512-B1mOycNCrbk7xODw7Jgq/mdD3qzPxMaTsnKIQDy2nXlQoyjTrJTTD0vRpEZI9b8RibPEyQvh9zIZ0M1mpOxS3w== dependencies: adm-zip "^0.4.9" chalk "^1.1.1" @@ -12118,17 +10573,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz#1132fecc9026fd90f0ecedac5cbff75d1fb45890" - integrity sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA== - dependencies: - memory-fs "~0.4.1" - mime "^2.3.1" - range-parser "^1.0.3" - webpack-log "^2.0.0" - -webpack-dev-middleware@3.7.1: +webpack-dev-middleware@3.7.1, webpack-dev-middleware@^3.7.0: version "3.7.1" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09" integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A== @@ -12139,17 +10584,7 @@ webpack-dev-middleware@3.7.1: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-middleware@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.0.tgz#ef751d25f4e9a5c8a35da600c5fda3582b5c6cff" - integrity sha512-qvDesR1QZRIAZHOE3iQ4CXLZZSQ1lAUsSpnQmlB1PBfoN/xdRjmge3Dok0W4IdaVLJOGJy3sGI4sZHwjRU0PCA== - dependencies: - memory-fs "^0.4.1" - mime "^2.4.2" - range-parser "^1.2.1" - webpack-log "^2.0.0" - -webpack-dev-server@3.8.0: +webpack-dev-server@3.8.0, webpack-dev-server@^3.1.4: version "3.8.0" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.0.tgz#06cc4fc2f440428508d0e9770da1fef10e5ef28d" integrity sha512-Hs8K9yI6pyMvGkaPTeTonhD6JXVsigXDApYk9JLW4M7viVBspQvb1WdAcWxqtmttxNW4zf2UFLsLNe0y87pIGQ== @@ -12188,40 +10623,6 @@ webpack-dev-server@3.8.0: ws "^6.2.1" yargs "12.0.5" -webpack-dev-server@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.1.10.tgz#507411bee727ee8d2fdffdc621b66a64ab3dea2b" - integrity sha512-RqOAVjfqZJtQcB0LmrzJ5y4Jp78lv9CK0MZ1YJDTaTmedMZ9PU9FLMQNrMCfVu8hHzaVLVOJKBlGEHMN10z+ww== - dependencies: - ansi-html "0.0.7" - bonjour "^3.5.0" - chokidar "^2.0.0" - compression "^1.5.2" - connect-history-api-fallback "^1.3.0" - debug "^3.1.0" - del "^3.0.0" - express "^4.16.2" - html-entities "^1.2.0" - http-proxy-middleware "~0.18.0" - import-local "^2.0.0" - internal-ip "^3.0.1" - ip "^1.1.5" - killable "^1.0.0" - loglevel "^1.4.1" - opn "^5.1.0" - portfinder "^1.0.9" - schema-utils "^1.0.0" - selfsigned "^1.9.1" - serve-index "^1.7.2" - sockjs "0.3.19" - sockjs-client "1.3.0" - spdy "^3.4.1" - strip-ansi "^3.0.0" - supports-color "^5.1.0" - webpack-dev-middleware "3.4.0" - webpack-log "^2.0.0" - yargs "12.0.2" - webpack-log@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" @@ -12237,7 +10638,7 @@ webpack-merge@4.2.2: dependencies: lodash "^4.17.15" -webpack-sources@1.4.3, webpack-sources@^1.3.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: +webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.3.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== @@ -12245,22 +10646,6 @@ webpack-sources@1.4.3, webpack-sources@^1.3.0, webpack-sources@^1.4.1, webpack-s source-list-map "^2.0.0" source-map "~0.6.1" -webpack-sources@^1.1.0, webpack-sources@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" - integrity sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack-sources@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.1.tgz#b91b2c5b1c4e890ff50d1d35b7fa3657040da1da" - integrity sha512-XSz38193PTo/1csJabKaV4b53uRVotlMgqJXm3s3eje0Bu6gQTxYDqpD38CmQfDBA+gN+QqaGjasuC8I/7eW3Q== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - webpack-subresource-integrity@1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.3.3.tgz#8a320457a93ef480707884443d886f7f677ccbf7" @@ -12298,11 +10683,12 @@ webpack@4.40.2: webpack-sources "^1.4.1" websocket-driver@>=0.5.1: - version "0.7.0" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" - integrity sha1-DK+dLXVdk67gSdS90NP+LMoqJOs= + version "0.7.3" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" + integrity sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg== dependencies: - http-parser-js ">=0.4.0" + http-parser-js ">=0.4.0 <0.4.11" + safe-buffer ">=5.1.0" websocket-extensions ">=0.1.1" websocket-extensions@>=0.1.1: @@ -12362,29 +10748,6 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" -winston-transport@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.2.0.tgz#a20be89edf2ea2ca39ba25f3e50344d73e6520e5" - integrity sha512-0R1bvFqxSlK/ZKTH86nymOuKv/cT1PQBMuDdA7k7f0S9fM44dNH6bXnuxwXPrN8lefJgtZq08BKdyZ0DZIy/rg== - dependencies: - readable-stream "^2.3.6" - triple-beam "^1.2.0" - -winston@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/winston/-/winston-3.1.0.tgz#80724376aef164e024f316100d5b178d78ac5331" - integrity sha512-FsQfEE+8YIEeuZEYhHDk5cILo1HOcWkGwvoidLrDgPog0r4bser1lEIOco2dN9zpDJ1M88hfDgZvxe5z4xNcwg== - dependencies: - async "^2.6.0" - diagnostics "^1.1.1" - is-stream "^1.1.0" - logform "^1.9.1" - one-time "0.0.4" - readable-stream "^2.3.6" - stack-trace "0.0.x" - triple-beam "^1.3.0" - winston-transport "^4.2.0" - wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" @@ -12411,7 +10774,7 @@ worker-plugin@3.2.0: wrap-ansi@^2.0.0: version "2.1.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= dependencies: string-width "^1.0.1" @@ -12432,22 +10795,15 @@ wrappy@1: integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write-file-atomic@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" signal-exit "^3.0.2" -ws@^6.1.0: - version "6.1.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.2.tgz#3cc7462e98792f0ac679424148903ded3b9c3ad8" - integrity sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw== - dependencies: - async-limiter "~1.0.0" - -ws@^6.2.1: +ws@^6.1.0, ws@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== @@ -12455,9 +10811,9 @@ ws@^6.2.1: async-limiter "~1.0.0" ws@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.0.1.tgz#1a04e86cc3a57c03783f4910fdb090cf31b8e165" - integrity sha512-ILHfMbuqLJvnSgYXLgy4kMntroJpe8hT41dOVWM8bxRuw6TK4mgMp9VJUNsZTEc5Bh+Mbs0DJT4M0N+wBG9l9A== + version "7.1.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.1.2.tgz#c672d1629de8bb27a9699eb599be47aeeedd8f73" + integrity sha512-gftXq3XI81cJCgkUiAVixA0raD9IVmXqsylCrjRygw4+UOOGzPoxnQ6r/CnVL9i+mDncJo94tSkyrtuuQVBmrg== dependencies: async-limiter "^1.0.0" @@ -12485,38 +10841,34 @@ xml-name-validator@^3.0.0: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== -xml2js@^0.4.17: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== +xml2js@^0.4.17, xml2js@^0.4.19: + version "0.4.22" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.22.tgz#4fa2d846ec803237de86f30aa9b5f70b6600de02" + integrity sha512-MWTbxAQqclRSTnehWWe5nMKzI3VmJ8ltiJEco8akcC6j3miOhjjfzKum5sId+CWhfxdOs/1xauYr8/ZDBtQiRw== dependencies: sax ">=0.6.0" - xmlbuilder "~9.0.1" + util.promisify "~1.0.0" + xmlbuilder "~11.0.0" -xmlbuilder@~9.0.1: - version "9.0.7" - resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== xmlchars@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.1.1.tgz#ef1a81c05bff629c2280007f12daca21bd6f6c93" - integrity sha512-7hew1RPJ1iIuje/Y01bGD/mXokXxegAgVS+e+E0wSi2ILHQkYAH1+JXARwTjZSM4Z4Z+c73aKspEcqj+zPPL/w== + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== xmlhttprequest-ssl@~1.5.4: version "1.5.5" resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xregexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" - integrity sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg== - xtend@^4.0.0, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== xxhashjs@^0.2.1: version "0.2.2" @@ -12540,22 +10892,17 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" - integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k= - -yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== -yargs-parser@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== +yaml@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.6.0.tgz#d8a985cfb26086dd73f91c637f6e6bc909fddd3c" + integrity sha512-iZfse3lwrJRoSlfs/9KQ9iIXxs9++RvBFVzAqbbBiFT+giYtyanevreF9r61ZTbGMgWQBxAua3FzJiniiJXWWw== dependencies: - camelcase "^4.1.0" + "@babel/runtime" "^7.4.5" yargs-parser@^11.1.1: version "11.1.1" @@ -12580,24 +10927,6 @@ yargs-parser@^9.0.2: dependencies: camelcase "^4.1.0" -yargs@12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.2.tgz#fe58234369392af33ecbef53819171eff0f5aadc" - integrity sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ== - dependencies: - cliui "^4.0.0" - decamelize "^2.0.0" - find-up "^3.0.0" - get-caller-file "^1.0.1" - os-locale "^3.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1 || ^4.0.0" - yargs-parser "^10.1.0" - yargs@12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -12685,6 +11014,6 @@ yn@^2.0.0: integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= zone.js@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.0.tgz#dbaa5cf2889e3f92f903de1d8a6edabdc8d4da69" - integrity sha512-dxEcxkKgOj5kNBcngPmeu9VV0PrMPd2aJXX5TDX/MKOITusSzYNjZPs1EVSsLywvdThRVwsEqUi2BAEYeuRP2Q== + version "0.10.2" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.2.tgz#67ca084b3116fc33fc40435e0d5ea40a207e392e" + integrity sha512-UAYfiuvxLN4oyuqhJwd21Uxb4CNawrq6fPS/05Su5L4G+1TN+HVDJMUHNMobVQDFJRir2cLAODXwluaOKB7HFg== From ace02f6c2a121a9120fd368617fe3f70992b47f6 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Tue, 17 Sep 2019 11:35:18 -0400 Subject: [PATCH 0165/1070] feat(@angular/cli): create commits per migration during update (#15611) --- packages/angular/cli/commands/update-impl.ts | 36 ++++++++++++++++++- packages/schematics/update/update/index.ts | 21 ++++++++++- packages/schematics/update/update/schema.json | 5 +++ 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 0a39875769e2..1be15926ca06 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -136,6 +136,7 @@ export class UpdateCommand extends Command { const description = schematic.description as typeof schematic.description & { version?: string; }; + description.version = coerceVersionNumber(description.version) || undefined; if (!description.version) { continue; } @@ -489,8 +490,37 @@ export class UpdateCommand extends Command { force: options.force || false, packageManager, packages: packagesToUpdate, + migrateExternal: true, }); + if (success && !options.skipCommits) { + this.createCommit('Angular CLI update\n' + packagesToUpdate.join('\n'), []); + } + + // This is a temporary workaround to allow data to be passed back from the update schematic + // tslint:disable-next-line: no-any + const migrations = (global as any).externalMigrations as { + package: string; + collection: string; + from: string; + to: string; + }[]; + + if (success && migrations) { + for (const migration of migrations) { + const result = await this.executeMigrations( + migration.package, + migration.collection, + new semver.Range('>' + migration.from + ' <=' + migration.to), + !options.skipCommits, + ); + + if (!result) { + return 0; + } + } + } + return success ? 0 : 1; } @@ -536,7 +566,11 @@ export class UpdateCommand extends Command { } } -function coerceVersionNumber(version: string): string | null { +function coerceVersionNumber(version: string | undefined): string | null { + if (!version) { + return null; + } + if (!version.match(/^\d{1,30}\.\d{1,30}\.\d{1,30}/)) { const match = version.match(/^\d{1,30}(\.\d{1,30})*/); diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 1ae274078470..cf05b19b7671 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -228,6 +228,7 @@ function _performUpdate( infoMap: Map, logger: logging.LoggerApi, migrateOnly: boolean, + migrateExternal: boolean, ): Observable { const packageJsonContent = tree.read('/package.json'); if (!packageJsonContent) { @@ -292,6 +293,8 @@ function _performUpdate( installTask = [context.addTask(new NodePackageInstallTask())]; } + const externalMigrations: {}[] = []; + // Run the migrate schematics with the list of packages to use. The collection contains // version information and we need to do this post installation. Please note that the // migration COULD fail and leave side effects on disk. @@ -307,6 +310,17 @@ function _performUpdate( : '' ) + target.updateMetadata.migrations; + if (migrateExternal) { + externalMigrations.push({ + package: name, + collection, + from: installed.version, + to: target.version, + }); + + return; + } + context.addTask(new RunSchematicTask('@schematics/update', 'migrate', { package: name, collection, @@ -316,6 +330,11 @@ function _performUpdate( installTask, ); }); + + if (externalMigrations.length > 0) { + // tslint:disable-next-line: no-any + (global as any).externalMigrations = externalMigrations; + } } return of(undefined); @@ -906,7 +925,7 @@ export default function(options: UpdateSchema): Rule { ); _validateUpdatePackages(infoMap, !!options.force, sublog); - return _performUpdate(tree, context, infoMap, logger, !!options.migrateOnly); + return _performUpdate(tree, context, infoMap, logger, !!options.migrateOnly, !!options.migrateExternal); } else { return _usageMessage(options, infoMap, logger); } diff --git a/packages/schematics/update/update/schema.json b/packages/schematics/update/update/schema.json index 2385abbde97b..4b849b8a5316 100644 --- a/packages/schematics/update/update/schema.json +++ b/packages/schematics/update/update/schema.json @@ -66,6 +66,11 @@ "npm", "yarn" ] + }, + "migrateExternal": { + "type": "boolean", + "default": false, + "hidden": true } }, "required": [ From ef360dd7f86034a886f485f400badff5b882bad3 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Wed, 18 Sep 2019 09:49:22 -0400 Subject: [PATCH 0166/1070] refactor(@angular-devkit/architect): use standard node resolution methods where possible (#15622) * refactor(@angular-devkit/architect): use standard node resolution methods where possible * refactor(@angular-devkit/core): use standard node resolution methods where possible --- etc/api/angular_devkit/core/node/_golden-api.d.ts | 1 - .../architect/node/node-modules-architect-host.ts | 8 ++------ .../core/node/experimental/jobs/job-registry.ts | 11 ++--------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/etc/api/angular_devkit/core/node/_golden-api.d.ts b/etc/api/angular_devkit/core/node/_golden-api.d.ts index 6577971a1802..df5f96cf2958 100644 --- a/etc/api/angular_devkit/core/node/_golden-api.d.ts +++ b/etc/api/angular_devkit/core/node/_golden-api.d.ts @@ -40,7 +40,6 @@ export declare class NodeJsSyncHost implements virtualFs.Host { } export declare class NodeModuleJobRegistry implements core_experimental.jobs.Registry { - constructor(_resolveLocal?: boolean, _resolveGlobal?: boolean); protected _resolve(name: string): string | null; get(name: core_experimental.jobs.JobName): Observable | null>; } diff --git a/packages/angular_devkit/architect/node/node-modules-architect-host.ts b/packages/angular_devkit/architect/node/node-modules-architect-host.ts index f1cd327136e2..e19051e7b172 100644 --- a/packages/angular_devkit/architect/node/node-modules-architect-host.ts +++ b/packages/angular_devkit/architect/node/node-modules-architect-host.ts @@ -6,7 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ import { experimental, json, workspaces } from '@angular-devkit/core'; -import { resolve } from '@angular-devkit/core/node'; import * as path from 'path'; import { BuilderInfo } from '../src'; import { Schema as BuilderSchema } from '../src/builders-schema'; @@ -56,11 +55,8 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost implements core_experimental.jobs.Registry { - public constructor(private _resolveLocal = true, private _resolveGlobal = false) { - } protected _resolve(name: string): string | null { try { - return resolve(name, { - checkLocal: this._resolveLocal, - checkGlobal: this._resolveGlobal, - basedir: __dirname, - }); + return require.resolve(name); } catch (e) { - if (e instanceof ModuleNotFoundException) { + if (e.code === 'MODULE_NOT_FOUND') { return null; } throw e; From 81fd40519d925c33b4e91571ea57810cd3651519 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 18 Sep 2019 16:49:35 +0300 Subject: [PATCH 0167/1070] build: update webpack-dev-server to version 3.8.1 (#15617) --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 65 +++++++++++++++++-- 2 files changed, 59 insertions(+), 8 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 3b5baf8f3fd5..2ef975f2488a 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -57,7 +57,7 @@ "terser-webpack-plugin": "2.0.1", "webpack": "4.40.2", "webpack-dev-middleware": "3.7.1", - "webpack-dev-server": "3.8.0", + "webpack-dev-server": "3.8.1", "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", "webpack-subresource-integrity": "1.3.3", diff --git a/yarn.lock b/yarn.lock index adcc563d5dfb..c9912a1624b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2605,7 +2605,7 @@ chardet@^0.7.0: optionalDependencies: fsevents "^2.0.6" -chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.6: +chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.6, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== @@ -5261,7 +5261,7 @@ ipaddr.js@^1.9.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-absolute-url@^3.0.0: +is-absolute-url@^3.0.0, is-absolute-url@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.2.tgz#554f2933e7385cc46e94351977ca2081170a206e" integrity sha512-+5g/wLlcm1AcxSP7014m6GvbPHswDx980vD/3bZaap8aGV9Yfs7Q6y6tfaupgZ5O74Byzc8dGrSCJ+bFXx0KdA== @@ -6395,7 +6395,7 @@ log4js@^4.0.0: rfdc "^1.1.4" streamroller "^1.0.6" -loglevel@^1.6.3: +loglevel@^1.6.3, loglevel@^1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.4.tgz#f408f4f006db8354d0577dcf6d33485b3cb90d56" integrity sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g== @@ -7792,7 +7792,7 @@ popper.js@^1.14.1: resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2" integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA== -portfinder@^1.0.21: +portfinder@^1.0.21, portfinder@^1.0.24: version "1.0.24" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.24.tgz#11efbc6865f12f37624b6531ead1d809ed965cfa" integrity sha512-ekRl7zD2qxYndYflwiryJwMioBI7LI7rVXg3EnLK3sjkouT5eOuhS3gS255XxBksa30VG8UPZYZCdgfGOfkSUg== @@ -8920,7 +8920,7 @@ selenium-webdriver@^4.0.0-alpha.1: tmp "0.0.30" xml2js "^0.4.19" -selfsigned@^1.10.4: +selfsigned@^1.10.4, selfsigned@^1.10.6: version "1.10.6" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.6.tgz#7b3cd37ed9c2034261a173af1a1aae27d8169b67" integrity sha512-i3+CeqxL7DpAazgVpAGdKMwHuL63B5nhJMh9NQ7xmChGkA3jNFflq6Jyo1LLJYcr3idWiNOPWHCrm4zMayLG4w== @@ -9200,6 +9200,18 @@ sockjs-client@1.3.0: json3 "^3.3.2" url-parse "^1.4.3" +sockjs-client@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" + integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g== + dependencies: + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" + json3 "^3.3.2" + url-parse "^1.4.3" + sockjs@0.3.19: version "0.3.19" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" @@ -10573,7 +10585,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@3.7.1, webpack-dev-middleware@^3.7.0: +webpack-dev-middleware@3.7.1, webpack-dev-middleware@^3.7.0, webpack-dev-middleware@^3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09" integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A== @@ -10584,7 +10596,46 @@ webpack-dev-middleware@3.7.1, webpack-dev-middleware@^3.7.0: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.8.0, webpack-dev-server@^3.1.4: +webpack-dev-server@3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.1.tgz#485b64c4aadc23f601e72114b40c1b1fea31d9f1" + integrity sha512-9F5DnfFA9bsrhpUCAfQic/AXBVHvq+3gQS+x6Zj0yc1fVVE0erKh2MV4IV12TBewuTrYeeTIRwCH9qLMvdNvTw== + dependencies: + ansi-html "0.0.7" + bonjour "^3.5.0" + chokidar "^2.1.8" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" + debug "^4.1.1" + del "^4.1.1" + express "^4.17.1" + html-entities "^1.2.1" + http-proxy-middleware "^0.19.1" + import-local "^2.0.0" + internal-ip "^4.3.0" + ip "^1.1.5" + is-absolute-url "^3.0.2" + killable "^1.0.1" + loglevel "^1.6.4" + opn "^5.5.0" + p-retry "^3.0.1" + portfinder "^1.0.24" + schema-utils "^1.0.0" + selfsigned "^1.10.6" + semver "^6.3.0" + serve-index "^1.9.1" + sockjs "0.3.19" + sockjs-client "1.4.0" + spdy "^4.0.1" + strip-ansi "^3.0.1" + supports-color "^6.1.0" + url "^0.11.0" + webpack-dev-middleware "^3.7.1" + webpack-log "^2.0.0" + ws "^6.2.1" + yargs "12.0.5" + +webpack-dev-server@^3.1.4: version "3.8.0" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.0.tgz#06cc4fc2f440428508d0e9770da1fef10e5ef28d" integrity sha512-Hs8K9yI6pyMvGkaPTeTonhD6JXVsigXDApYk9JLW4M7viVBspQvb1WdAcWxqtmttxNW4zf2UFLsLNe0y87pIGQ== From 0dd9a2edc15e74142eac84e28dc21657cbd0048b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 18 Sep 2019 16:49:44 +0300 Subject: [PATCH 0168/1070] build: update terser-webpack-plugin to version 2.1.0 (#15616) --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 2ef975f2488a..ecedbffa69f5 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -54,7 +54,7 @@ "stylus-loader": "3.0.2", "tree-kill": "1.2.1", "terser": "4.3.1", - "terser-webpack-plugin": "2.0.1", + "terser-webpack-plugin": "2.1.0", "webpack": "4.40.2", "webpack-dev-middleware": "3.7.1", "webpack-dev-server": "3.8.1", diff --git a/yarn.lock b/yarn.lock index c9912a1624b6..80d402089529 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9806,10 +9806,10 @@ term-size@^1.2.0: dependencies: execa "^0.7.0" -terser-webpack-plugin@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.0.1.tgz#5e69a187133472174ef2fb51afc76a0f0a7b1d13" - integrity sha512-DXx8f7080P2dgW9Ydd7MUon81AL+GkGr9prfQRf+rH06dRrgCGIvtT7q73JRm2UzmjKeJGtro9O8zwL2y2udag== +terser-webpack-plugin@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.1.0.tgz#b9cee799a2da2bce788540c3738e081b6db28d8a" + integrity sha512-sZs43FVvNTqHp5hTkTSIC3XKB7rEC2FCbx9Uv0rM7D4iJsbTA1Q84tiaRYSSKSojBe6LCONX44RF73AEHGasvw== dependencies: cacache "^12.0.3" find-cache-dir "^3.0.0" @@ -9817,7 +9817,7 @@ terser-webpack-plugin@2.0.1: schema-utils "^2.2.0" serialize-javascript "^2.1.0" source-map "^0.6.1" - terser "^4.2.1" + terser "^4.3.1" webpack-sources "^1.4.3" terser-webpack-plugin@^1.4.1: @@ -9835,7 +9835,7 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.1, terser@^4.1.2, terser@^4.2.1: +terser@4.3.1, terser@^4.1.2, terser@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65" integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg== From b94bd77dec77e9eecd1b01b9344e1f903e6b6ccb Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 18 Sep 2019 16:49:54 +0300 Subject: [PATCH 0169/1070] build: update @bazel/buildifier to version 0.29.0 (#15614) --- WORKSPACE | 10 ++++---- package.json | 8 +++---- yarn.lock | 68 ++++++++++++++++++++++++++-------------------------- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index d10f264fbfde..1980229a4a04 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") http_archive( name = "build_bazel_rules_nodejs", - sha256 = "0d9660cf0894f1fe1e9840818553e0080fbce0851169812d77a70bdb9981c946", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.37.0/rules_nodejs-0.37.0.tar.gz"], + sha256 = "da217044d24abd16667324626a33581f3eaccabf80985b2688d6a08ed2f864be", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.37.1/rules_nodejs-0.37.1.tar.gz"], ) # We use protocol buffers for the Build Event Protocol @@ -111,9 +111,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "1411f2648185b0e7d8c2bb88b25cc8f2c477cc4223133461652ddce2b3154ac4", - strip_prefix = "bazel-toolchains-0.29.3", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.3.tar.gz", + sha256 = "ef95c8567ebf1bc7cebf77511de50d0da04a9be3b345727595e284c59a2787cf", + strip_prefix = "bazel-toolchains-0.29.4", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.4.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") diff --git a/package.json b/package.json index 0e6fa7fc6118..cb4143737ec0 100644 --- a/package.json +++ b/package.json @@ -83,10 +83,10 @@ "@angular/compiler": "9.0.0-next.4", "@angular/compiler-cli": "9.0.0-next.4", "@bazel/bazel": "0.29.0", - "@bazel/buildifier": "0.28.0", - "@bazel/jasmine": "0.37.0", - "@bazel/karma": "0.37.0", - "@bazel/typescript": "0.37.0", + "@bazel/buildifier": "0.29.0", + "@bazel/jasmine": "0.37.1", + "@bazel/karma": "0.37.1", + "@bazel/typescript": "0.37.1", "@types/browserslist": "^4.4.0", "@types/caniuse-lite": "^1.0.0", "@types/clean-css": "^4.2.1", diff --git a/yarn.lock b/yarn.lock index 80d402089529..6833b4d51296 100644 --- a/yarn.lock +++ b/yarn.lock @@ -775,48 +775,48 @@ "@bazel/bazel-linux_x64" "0.29.0" "@bazel/bazel-win32_x64" "0.29.0" -"@bazel/buildifier-darwin_x64@0.28.0": - version "0.28.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-darwin_x64/-/buildifier-darwin_x64-0.28.0.tgz#bc8c4312596d4cf321062ae4e3f2115be453fef2" - integrity sha512-bvWz4W3FzWFqUr65Z/IrrhUuzHzvFnYB3QpPXUlUOI1sx43Ge3pMlndEwhMBOPM2SoRi5Z5rxG0X9NuvuXWw8w== - -"@bazel/buildifier-linux_x64@0.28.0": - version "0.28.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-linux_x64/-/buildifier-linux_x64-0.28.0.tgz#d09dedcfcd1677ddec8fe17fa7e39612dab86b41" - integrity sha512-KVXUcT2yZnKcRf4L9qzlYtEHw9SdO4/O6/cyyyybYPzpS3CJ2yIFm6VabXBTXsUp3LXfWc3EE62f8ieHoRJJnw== - -"@bazel/buildifier-win32_x64@0.28.0": - version "0.28.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-win32_x64/-/buildifier-win32_x64-0.28.0.tgz#1d2c239753a389f48669a194bf16477c1f15befd" - integrity sha512-6E9QZPVzMolcQQKDi5tRJjAFylgzBWbV01/3RiFZb1x4ITZJ74h/FuTRhdYAUPA3n59ge2F3sPtf9Q97RxJU7g== - -"@bazel/buildifier@0.28.0": - version "0.28.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.28.0.tgz#cce8a5b67520f27b611c149bf334b5f86e5e5aa7" - integrity sha512-g9F7rEQayXU4SHgbOYhDLk8AzDMhqFNnZVb/xVDeCkbg20MbCGIZDj9pN8NBnowB7OJF4VsvnSV0FB4BVGfpxQ== +"@bazel/buildifier-darwin_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-darwin_x64/-/buildifier-darwin_x64-0.29.0.tgz#13dfaf3ea4d89f9d4da00085e894e90b7d302342" + integrity sha512-jiQIZo5z1c8oFokD2jObrkB04Bs+7RaUJ6WlHV9BBeJiRMGfRVUBUrOF5eJPk6VB8qknIOfHvJD/Ym5XUc1Zlw== + +"@bazel/buildifier-linux_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-linux_x64/-/buildifier-linux_x64-0.29.0.tgz#0191fc46735a1c281878642673844f2b717cd8dc" + integrity sha512-sXXY0gP4oC1nC1G8Baqd7kyBL/y9/qOqftKSkDe2Y7gBoc9GslwyexwDxTSxK0Gun/4Vcvc2eRu7b83hMOxuag== + +"@bazel/buildifier-win32_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier-win32_x64/-/buildifier-win32_x64-0.29.0.tgz#a63438c7a7d2dc593e626ed6e163e9d8ea93917a" + integrity sha512-hnOQfPhQNAIqbrhsHT3MWAyAZSUhKwxzEuZJZoOsGrW8fPonhKysdvfZJqfqJ6vDVYaMJKvLnSO1c9QZRhU7kQ== + +"@bazel/buildifier@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.29.0.tgz#7984739270c8d1dd23650f87a810e1e6367188d9" + integrity sha512-skJ7vVff7x3tB8crBCtJji2wU09uH0uD2N30xfOpVUgsMJSXktAQMj8+RPdMBqJQ9XS5+O5lmRthR35Ua7xQXA== optionalDependencies: - "@bazel/buildifier-darwin_x64" "0.28.0" - "@bazel/buildifier-linux_x64" "0.28.0" - "@bazel/buildifier-win32_x64" "0.28.0" + "@bazel/buildifier-darwin_x64" "0.29.0" + "@bazel/buildifier-linux_x64" "0.29.0" + "@bazel/buildifier-win32_x64" "0.29.0" "@bazel/hide-bazel-files@latest": version "0.37.0" resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.37.0.tgz#3c30a3f64f0b976c8c0e8dd236b0f26db0f6f860" integrity sha512-aVReQa7UxWjBNTsZTAmFKHujTaDxlMUEq2BgvP7mYp1nnZjsCI30SjzPkTn77Ghw4/lK8lhht7AdfWPQp271pQ== -"@bazel/jasmine@0.37.0": - version "0.37.0" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.37.0.tgz#8463e5d26cfcdb7f76865bf80c7b88a77b6eecb2" - integrity sha512-R6QiX4l1xb4Xl0croK0hdZqM8vjfAoFGXYekPeueWzw+/A1l2LMiMIye82qQbmaXihKcQvOVG/8CDWEEtMfVbQ== +"@bazel/jasmine@0.37.1": + version "0.37.1" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.37.1.tgz#e5111f4f913b542cbfad767e0f903be026246c5a" + integrity sha512-EQJ2bbmF3w+BeoCMEDY8mKd5lrVuZ4tEc1wqth4Jl2UIYwyEepDAKVMiEeM+seXxmzqle38ksdsf7uSUWMjthA== dependencies: jasmine "~3.4.0" jasmine-core "~3.4.0" v8-coverage "1.0.9" -"@bazel/karma@0.37.0": - version "0.37.0" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.37.0.tgz#e420e32f4309fa28a980ee47072865b2aa3cb858" - integrity sha512-XBQpEVyQCYNlN6bzz+1AGLBLCCd4CAvlp7ubklLGCFXuFKOnvU/ADaN0t/t7V3Pjx+uZqgAHamOFQla+21UXDg== +"@bazel/karma@0.37.1": + version "0.37.1" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.37.1.tgz#1c2ba937f8a2a442a629d4edd5219c3623192b12" + integrity sha512-LwcvQkZJvlSWf7jvZY48GG1PJFINDrKHp59hupK8tTWN726sAAoQzQUp8ZO0e/pHKGcl4X6AvqWw3+MvXsGS7Q== dependencies: jasmine-core "2.8.0" karma "^4.0.0" @@ -830,10 +830,10 @@ semver "5.6.0" tmp "0.0.33" -"@bazel/typescript@0.37.0": - version "0.37.0" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.37.0.tgz#9213d963cf132db614a9780b87815cda256a3e14" - integrity sha512-4Pz5x87ihPjKQxo/XMfFXJeGHiNEOdaIqLOqzuIXbwczJvMxPKMwnXzikr9XkjHrHs26zZo4iMtXALqW2j7C5w== +"@bazel/typescript@0.37.1": + version "0.37.1" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.37.1.tgz#e740f311597dc0ed9d479ae7a88ea35cb2411e34" + integrity sha512-RrZ6rYZTQz0tSwGIGoKykNkhpu8xY3IOAzLA3cmtpNa0pCGEb+PpFBlh//wjcnP8jLg5vK2Qa6jh3SZ2pcYZbg== dependencies: protobufjs "6.8.8" semver "5.6.0" From 643ff77d54a3eaa2f38a3324908973454a5431ed Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 18 Sep 2019 14:50:02 +0100 Subject: [PATCH 0170/1070] fix(@schematics/angular): support adding app-shell after nguniversal schematics (#15606) --- packages/schematics/angular/app-shell/index.ts | 10 +++++----- .../schematics/angular/app-shell/index_spec.ts | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/app-shell/index.ts b/packages/schematics/angular/app-shell/index.ts index 868205182de6..a2d661abf565 100644 --- a/packages/schematics/angular/app-shell/index.ts +++ b/packages/schematics/angular/app-shell/index.ts @@ -46,17 +46,17 @@ function getSourceFile(host: Tree, path: string): ts.SourceFile { function getServerModulePath( host: Tree, - projectRoot: string, + sourceRoot: string, mainPath: string, ): string | null { - const mainSource = getSourceFile(host, mainPath); + const mainSource = getSourceFile(host, join(normalize(sourceRoot), mainPath)); const allNodes = getSourceNodes(mainSource); - const expNode = allNodes.filter(node => node.kind === ts.SyntaxKind.ExportDeclaration)[0]; + const expNode = allNodes.find(node => ts.isExportDeclaration(node)); if (!expNode) { return null; } const relativePath = (expNode as ts.ExportDeclaration).moduleSpecifier as ts.StringLiteral; - const modulePath = normalize(`/${projectRoot}/src/${relativePath.text}.ts`); + const modulePath = normalize(`/${sourceRoot}/${relativePath.text}.ts`); return modulePath; } @@ -243,7 +243,7 @@ function addServerRoutes(options: AppShellOptions): Rule { if (!clientServerOptions) { throw new SchematicsException('Server target does not contain options.'); } - const modulePath = getServerModulePath(host, clientProject.root, clientServerOptions.main); + const modulePath = getServerModulePath(host, clientProject.sourceRoot || 'src', options.main as string); if (modulePath === null) { throw new SchematicsException('Universal/server module not found.'); } diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index 2161a7c0ffd0..4bf8efeb159d 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -157,6 +157,22 @@ describe('App Shell Schematic', () => { expect(content).toMatch(/import { Routes, RouterModule } from \'@angular\/router\';/); }); + it('should work after adding nguniversal', async () => { + let tree = await schematicRunner.runSchematicAsync('universal', defaultOptions, appTree) + .toPromise(); + + // change main tsconfig to mimic ng add for nguniveral + const workspace = JSON.parse(appTree.readContent('/angular.json')); + workspace.projects.bar.architect.server.options.main = 'server.ts'; + appTree.overwrite('angular.json', JSON.stringify(workspace, undefined, 2)); + + tree = await schematicRunner.runSchematicAsync('appShell', defaultOptions, tree) + .toPromise(); + const filePath = '/projects/bar/src/app/app.server.module.ts'; + const content = tree.readContent(filePath); + expect(content).toMatch(/import { Routes, RouterModule } from \'@angular\/router\';/); + }); + it('should define a server route', async () => { const tree = await schematicRunner.runSchematicAsync('appShell', defaultOptions, appTree) .toPromise(); From 745670fa6a6f9fe8ace0b21e4a3c36eedaf0d757 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 18 Sep 2019 14:50:29 +0100 Subject: [PATCH 0171/1070] feat(@schematics/angular): remove dependency on tsickle (#15603) With this change we remove the requirement to add tsickle as a dependency when having a workspace library. Since the CTOR downlevel transformer which was previously provided via tsickle is now in ng-packagr version 5.5.1+ We migrate existing libraries to remove the need for tsickle. --- .../library/files/tsconfig.lib.json.template | 1 - packages/schematics/angular/library/index.ts | 5 -- .../update-8/update-dependencies.ts | 2 +- .../angular/migrations/update-9/index.ts | 2 + .../migrations/update-9/remove-tsickle.ts | 53 ++++++++++++ .../update-9/remove-tsickle_spec.ts | 84 +++++++++++++++++++ .../update-9/update-dependencies.ts | 1 - .../angular/utility/latest-versions.ts | 3 +- 8 files changed, 141 insertions(+), 10 deletions(-) create mode 100644 packages/schematics/angular/migrations/update-9/remove-tsickle.ts create mode 100644 packages/schematics/angular/migrations/update-9/remove-tsickle_spec.ts diff --git a/packages/schematics/angular/library/files/tsconfig.lib.json.template b/packages/schematics/angular/library/files/tsconfig.lib.json.template index a7e7b5665f58..7518a4c87974 100644 --- a/packages/schematics/angular/library/files/tsconfig.lib.json.template +++ b/packages/schematics/angular/library/files/tsconfig.lib.json.template @@ -12,7 +12,6 @@ ] }, "angularCompilerOptions": { - "annotateForClosureCompiler": true, "skipTemplateCodegen": true, "strictMetadataEmit": true, "enableResourceInlining": true diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 01ce622698c9..8d33a1870d38 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -103,11 +103,6 @@ function addDependenciesToPackageJson() { name: 'ng-packagr', version: latestVersions.ngPackagr, }, - { - type: NodeDependencyType.Dev, - name: 'tsickle', - version: latestVersions.tsickle, - }, { type: NodeDependencyType.Default, name: 'tslib', diff --git a/packages/schematics/angular/migrations/update-8/update-dependencies.ts b/packages/schematics/angular/migrations/update-8/update-dependencies.ts index 00b891ab4718..144b613a5818 100644 --- a/packages/schematics/angular/migrations/update-8/update-dependencies.ts +++ b/packages/schematics/angular/migrations/update-8/update-dependencies.ts @@ -17,7 +17,7 @@ export function updateDependencies() { '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, '@angular-devkit/build-webpack': latestVersions.DevkitBuildWebpack, 'zone.js': latestVersions.ZoneJs, - tsickle: latestVersions.tsickle, + tsickle: '^0.37.0', 'ng-packagr': latestVersions.ngPackagr, 'web-animations-js': '^2.3.2', }; diff --git a/packages/schematics/angular/migrations/update-9/index.ts b/packages/schematics/angular/migrations/update-9/index.ts index 33205818be75..0d3690a23295 100644 --- a/packages/schematics/angular/migrations/update-9/index.ts +++ b/packages/schematics/angular/migrations/update-9/index.ts @@ -10,6 +10,7 @@ import { Rule, chain } from '@angular-devkit/schematics'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; import { updateLibraries } from './ivy-libraries'; import { updateNGSWConfig } from './ngsw-config'; +import { removeTsickle } from './remove-tsickle'; import { updateApplicationTsConfigs } from './update-app-tsconfigs'; import { updateDependencies } from './update-dependencies'; import { updateServerMainFile } from './update-server-main-file'; @@ -24,6 +25,7 @@ export default function(): Rule { updateApplicationTsConfigs(), updateDependencies(), updateServerMainFile(), + removeTsickle(), (tree, context) => { const packageChanges = tree.actions.some(a => a.path.endsWith('/package.json')); if (packageChanges) { diff --git a/packages/schematics/angular/migrations/update-9/remove-tsickle.ts b/packages/schematics/angular/migrations/update-9/remove-tsickle.ts new file mode 100644 index 000000000000..283cb9c3162e --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/remove-tsickle.ts @@ -0,0 +1,53 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { JsonParseMode, parseJsonAst } from '@angular-devkit/core'; +import { Rule, Tree } from '@angular-devkit/schematics'; +import { removePackageJsonDependency } from '../../utility/dependencies'; +import { findPropertyInAstObject, removePropertyInAstObject } from '../../utility/json-utils'; +import { Builders } from '../../utility/workspace-models'; +import { getAllOptions, getTargets, getWorkspace } from './utils'; + +/** + * Remove tsickle from libraries + */ +export function removeTsickle(): Rule { + return (tree: Tree) => { + removePackageJsonDependency(tree, 'tsickle'); + + const workspace = getWorkspace(tree); + + for (const { target } of getTargets(workspace, 'build', Builders.NgPackagr)) { + for (const options of getAllOptions(target)) { + const tsConfigOption = findPropertyInAstObject(options, 'tsConfig'); + if (!tsConfigOption || tsConfigOption.kind !== 'string') { + continue; + } + + const tsConfigContent = tree.read(tsConfigOption.value); + if (!tsConfigContent) { + continue; + } + + const tsConfigAst = parseJsonAst(tsConfigContent.toString(), JsonParseMode.Loose); + if (!tsConfigAst || tsConfigAst.kind !== 'object') { + continue; + } + + const ngCompilerOptions = findPropertyInAstObject(tsConfigAst, 'angularCompilerOptions'); + if (ngCompilerOptions && ngCompilerOptions.kind === 'object') { + // remove annotateForClosureCompiler option + const recorder = tree.beginUpdate(tsConfigOption.value); + removePropertyInAstObject(recorder, ngCompilerOptions, 'annotateForClosureCompiler'); + tree.commitUpdate(recorder); + } + } + } + + return tree; + }; +} diff --git a/packages/schematics/angular/migrations/update-9/remove-tsickle_spec.ts b/packages/schematics/angular/migrations/update-9/remove-tsickle_spec.ts new file mode 100644 index 000000000000..c71cf5816d5f --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/remove-tsickle_spec.ts @@ -0,0 +1,84 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { EmptyTree } from '@angular-devkit/schematics'; +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; + +// tslint:disable:no-big-function +describe('Migration to version 9', () => { + describe('Remove tsickle and annotateForClosureCompiler', () => { + const schematicRunner = new SchematicTestRunner( + 'migrations', + require.resolve('../migration-collection.json'), + ); + + let tree: UnitTestTree; + + beforeEach(async () => { + tree = new UnitTestTree(new EmptyTree()); + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'workspace', + { + name: 'migration-test', + version: '1.2.3', + directory: '.', + }, + tree, + ) + .toPromise(); + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'library', + { + name: 'migration-lib', + }, + tree, + ) + .toPromise(); + }); + + it(`should remove 'annotateForClosureCompiler' from library tsconfig`, async () => { + const libTsConfig = 'migration-lib/tsconfig.lib.json'; + + const tsconfig = { + compilerOptions: {}, + angularCompilerOptions: { + enableIvy: false, + skipTemplateCodegen: true, + annotateForClosureCompiler: true, + }, + }; + + tree.overwrite(libTsConfig, JSON.stringify(tsconfig, undefined, 2)); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { angularCompilerOptions } = JSON.parse(tree2.readContent(libTsConfig)); + expect(angularCompilerOptions).toEqual({ enableIvy: false, skipTemplateCodegen: true }); + }); + + it('should remove all dependencies on tsickle', async () => { + const packageJson = { + dependencies: { + 'tsickle': '0.0.0', + }, + devDependencies: { + 'tsickle': '0.0.0', + }, + }; + + tree.overwrite('/package.json', JSON.stringify(packageJson, undefined, 2)); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { dependencies, devDependencies } = JSON.parse(tree2.readContent('/package.json')); + expect(dependencies['tsickle']).toBeUndefined(); + expect(devDependencies['tsickle']).toBeUndefined(); + }); + }); +}); diff --git a/packages/schematics/angular/migrations/update-9/update-dependencies.ts b/packages/schematics/angular/migrations/update-9/update-dependencies.ts index 00b891ab4718..301511f653b3 100644 --- a/packages/schematics/angular/migrations/update-9/update-dependencies.ts +++ b/packages/schematics/angular/migrations/update-9/update-dependencies.ts @@ -17,7 +17,6 @@ export function updateDependencies() { '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, '@angular-devkit/build-webpack': latestVersions.DevkitBuildWebpack, 'zone.js': latestVersions.ZoneJs, - tsickle: latestVersions.tsickle, 'ng-packagr': latestVersions.ngPackagr, 'web-animations-js': '^2.3.2', }; diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 9cbafc9c6977..8d48546c1905 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -20,6 +20,5 @@ export const latestVersions = { DevkitBuildWebpack: '~0.900.0-next.4', AngularPWA: '~0.900.0-next.4', - tsickle: '^0.37.0', - ngPackagr: '^5.4.0', + ngPackagr: '^5.5.1', }; From 10493a2256679ada9c54087f4870cbf333bdce79 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 18 Sep 2019 14:50:39 +0100 Subject: [PATCH 0172/1070] ci: enable renovate lockFileMaintenance (#15593) See: https://docs.renovatebot.com/configuration-options/#lockfilemaintenance --- renovate.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renovate.json b/renovate.json index 5c4ef1e1e69e..074739f1f833 100644 --- a/renovate.json +++ b/renovate.json @@ -9,6 +9,9 @@ "PR target: master-only" ], "timezone": "America/Tijuana", + "lockFileMaintenance": { + "enabled": true + }, "schedule": [ "after 10pm every weekday", "before 4am every weekday", From 438e2eb4a73b8111e9c2397e6873d81b01710c9a Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 18 Sep 2019 14:51:12 +0100 Subject: [PATCH 0173/1070] feat(@schematics/angular): add strict compiler option to workspace tsconfig (#14905) Closes #14694 --- .../angular/workspace/files/tsconfig.json.template | 7 ++++++- packages/schematics/angular/workspace/index_spec.ts | 12 ++++++++++++ packages/schematics/angular/workspace/schema.json | 5 +++++ tests/legacy-cli/e2e/tests/build/platform-server.ts | 2 ++ tests/legacy-cli/e2e/tests/misc/browsers.ts | 2 +- 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/workspace/files/tsconfig.json.template b/packages/schematics/angular/workspace/files/tsconfig.json.template index 30956ae7ea26..9eb43d31920f 100644 --- a/packages/schematics/angular/workspace/files/tsconfig.json.template +++ b/packages/schematics/angular/workspace/files/tsconfig.json.template @@ -2,7 +2,12 @@ "compileOnSave": false, "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/out-tsc", + "outDir": "./dist/out-tsc",<% if (strict) { %> + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noFallthroughCasesInSwitch": true, + "strictNullChecks": true,<% } %> "sourceMap": true, "declaration": false, "downlevelIteration": true, diff --git a/packages/schematics/angular/workspace/index_spec.ts b/packages/schematics/angular/workspace/index_spec.ts index a33d1c2e7879..b91840fda6e5 100644 --- a/packages/schematics/angular/workspace/index_spec.ts +++ b/packages/schematics/angular/workspace/index_spec.ts @@ -71,4 +71,16 @@ describe('Workspace Schematic', () => { expect(files).not.toContain('/tslint.json'); expect(files).not.toContain('/.editorconfig'); }); + + it('should not add strict compiler options when false', async () => { + const tree = await schematicRunner.runSchematicAsync('workspace', { ...defaultOptions, strict: false }).toPromise(); + const { compilerOptions } = JSON.parse(tree.readContent('/tsconfig.json')); + expect(compilerOptions.strictNullChecks).not.toBeDefined(); + }); + + it('should not add strict compiler options when true', async () => { + const tree = await schematicRunner.runSchematicAsync('workspace', { ...defaultOptions, strict: true }).toPromise(); + const { compilerOptions } = JSON.parse(tree.readContent('/tsconfig.json')); + expect(compilerOptions.strictNullChecks).toBe(true); + }); }); diff --git a/packages/schematics/angular/workspace/schema.json b/packages/schematics/angular/workspace/schema.json index c398744b149f..827a8ab3f3ba 100644 --- a/packages/schematics/angular/workspace/schema.json +++ b/packages/schematics/angular/workspace/schema.json @@ -31,6 +31,11 @@ "type": "boolean", "default": false, "x-user-analytics": 14 + }, + "strict": { + "description": "Creates a workspace with stricter TypeScript compiler options.", + "type": "boolean", + "default": false } }, "required": [ diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index e5ccc5db1f85..d595f84360d5 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -10,6 +10,8 @@ export default async function () { const veEnabled = argv['ve']; await ng('add', '@nguniversal/express-engine', '--client-project', 'test-project'); + // todo remove once https://github.com/angular/universal/pull/1229 is landed + await silentNpm('install', '@types/express', '--save-dev'); await updateJsonFile('package.json', packageJson => { const dependencies = packageJson['dependencies']; diff --git a/tests/legacy-cli/e2e/tests/misc/browsers.ts b/tests/legacy-cli/e2e/tests/misc/browsers.ts index 74220d99ec20..50fa6d76edaa 100644 --- a/tests/legacy-cli/e2e/tests/misc/browsers.ts +++ b/tests/legacy-cli/e2e/tests/misc/browsers.ts @@ -39,7 +39,7 @@ export default async function () { await replaceInFile( 'e2e/src/app.e2e-spec.ts', 'await browser.manage().logs().get(logging.Type.BROWSER)', - '[]', + '[] as any', ); // Workaround defect in getText WebDriver implementation for Safari/Edge From 2b48aff5e4a6885a7539f6066572c08c3bf7acad Mon Sep 17 00:00:00 2001 From: mgechev Date: Wed, 18 Sep 2019 21:28:41 +0100 Subject: [PATCH 0174/1070] release: v9.0.0-next.5 --- .../schematics/angular/utility/latest-versions.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 8d48546c1905..c80145439ccc 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,17 +8,17 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.5', + Angular: '~9.0.0-next.7', RxJs: '~6.4.0', - ZoneJs: '~0.10.1', + ZoneJs: '~0.10.2', TypeScript: '~3.5.3', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.4', - DevkitBuildNgPackagr: '~0.900.0-next.4', - DevkitBuildWebpack: '~0.900.0-next.4', - AngularPWA: '~0.900.0-next.4', + DevkitBuildAngular: '~0.900.0-next.5', + DevkitBuildNgPackagr: '~0.900.0-next.5', + DevkitBuildWebpack: '~0.900.0-next.5', + AngularPWA: '~0.900.0-next.5', ngPackagr: '^5.5.1', }; From 9deaf87754ef29f600c9daef94769f69d2d20b3a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Sep 2019 11:34:35 -0400 Subject: [PATCH 0175/1070] fix(@angular/cli): add browser builder index option longhand form to schema --- packages/angular/cli/lib/config/schema.json | 27 +++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index 2c181c08db79..1958147b6079 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -847,8 +847,31 @@ "default": false }, "index": { - "type": "string", - "description": "The name of the index HTML file." + "description": "Configures the generation of the application's HTML index.", + "oneOf": [ + { + "type": "string", + "description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path." + }, + { + "type": "object", + "description": "", + "properties": { + "input": { + "type": "string", + "minLength": 1, + "description": "The path of a file to use for the application's generated HTML index." + }, + "output": { + "type": "string", + "minLength": 1, + "default": "index.html", + "description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path." + } + }, + "required": ["input"] + } + ] }, "statsJson": { "type": "boolean", From e4444121d13bf7971a8a46fcec065e5468e26042 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sun, 15 Sep 2019 09:57:11 -0400 Subject: [PATCH 0176/1070] fix(@angular-devkit/build-angular): always use ECMA 5 optimizations with terser There appears to be defects related to terser's ECMA 6 options. The optimizations present a minima size improvement in general. Further investigation is required to determine the underlying cause within terser. Fixes #15580 --- .../angular-cli-files/models/webpack-configs/common.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 14abb7a5ffa0..08ce9b597f77 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -332,11 +332,14 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { } } + // TODO: Investigate why this fails for some packages: wco.supportES2015 ? 6 : 5; + const terserEcma = 5; + const terserOptions = { warnings: !!buildOptions.verbose, safari10: true, output: { - ecma: wco.supportES2015 ? 6 : 5, + ecma: terserEcma, comments: false, webkit: true, }, @@ -345,12 +348,12 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { compress: buildOptions.platform == 'server' ? { - ecma: wco.supportES2015 ? 6 : 5, + ecma: terserEcma, global_defs: angularGlobalDefinitions, keep_fnames: true, } : { - ecma: wco.supportES2015 ? 6 : 5, + ecma: terserEcma, pure_getters: buildOptions.buildOptimizer, // PURE comments work best with 3 passes. // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. From 0abeadbc10a42b1ce4301f041e7eea8695d66b1d Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Sep 2019 14:31:07 -0400 Subject: [PATCH 0177/1070] refactor(@angular/cli): use canonical npm logic to determine update package version --- packages/angular/cli/commands/add-impl.ts | 2 +- packages/angular/cli/commands/update-impl.ts | 74 ++++++++++++------- packages/angular/cli/package.json | 1 + .../angular/cli/utilities/package-metadata.ts | 12 ++- yarn.lock | 2 +- 5 files changed, 60 insertions(+), 31 deletions(-) diff --git a/packages/angular/cli/commands/add-impl.ts b/packages/angular/cli/commands/add-impl.ts index c54b3f2e90fe..fe3578f89d57 100644 --- a/packages/angular/cli/commands/add-impl.ts +++ b/packages/angular/cli/commands/add-impl.ts @@ -90,7 +90,7 @@ export class AddCommand extends SchematicCommand { } } else if (!latestManifest || (await this.hasMismatchedPeer(latestManifest))) { // 'latest' is invalid so search for most recent matching package - const versionManifests = Array.from(packageMetadata.versions.values()).filter( + const versionManifests = Object.values(packageMetadata.versions).filter( value => !prerelease(value.version), ); diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 1be15926ca06..0e622e363548 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -26,7 +26,11 @@ import { import { PackageTreeNode, findNodeDependencies, readPackageTree } from '../utilities/package-tree'; import { Schema as UpdateCommandSchema } from './update'; -const npa = require('npm-package-arg'); +const npa = require('npm-package-arg') as (selector: string) => PackageIdentifier; +const pickManifest = require('npm-pick-manifest') as ( + metadata: PackageMetadata, + selector: string, +) => PackageManifest; const oldConfigFileNames = ['.angular-cli.json', 'angular-cli.json']; @@ -188,7 +192,7 @@ export class UpdateCommand extends Command { const packages: PackageIdentifier[] = []; for (const request of options['--'] || []) { try { - const packageIdentifier: PackageIdentifier = npa(request); + const packageIdentifier = npa(request); // only registry identifiers are supported if (!packageIdentifier.registry) { @@ -271,8 +275,19 @@ export class UpdateCommand extends Command { this.logger.info(`Found ${Object.keys(rootDependencies).length} dependencies.`); - if (options.all || packages.length === 0) { - // Either update all packages or show status + if (options.all) { + // 'all' option and a zero length packages have already been checked. + // Add all direct dependencies to be updated + for (const dep of Object.keys(rootDependencies)) { + const packageIdentifier = npa(dep); + if (options.next) { + packageIdentifier.fetchSpec = 'next'; + } + + packages.push(packageIdentifier); + } + } else if (packages.length === 0) { + // Show status const { success } = await this.executeSchematic('@schematics/update', 'update', { force: options.force || false, next: options.next || false, @@ -397,7 +412,7 @@ export class UpdateCommand extends Command { const requests: { identifier: PackageIdentifier; - node: PackageTreeNode | string; + node: PackageTreeNode; }[] = []; // Validate packages actually are part of the workspace @@ -410,11 +425,7 @@ export class UpdateCommand extends Command { } // If a specific version is requested and matches the installed version, skip. - if ( - pkg.type === 'version' && - typeof node === 'object' && - node.package.version === pkg.fetchSpec - ) { + if (pkg.type === 'version' && node.package.version === pkg.fetchSpec) { this.logger.info(`Package '${pkg.name}' is already at '${pkg.fetchSpec}'.`); continue; } @@ -448,18 +459,34 @@ export class UpdateCommand extends Command { // Try to find a package version based on the user requested package specifier // registry specifier types are either version, range, or tag let manifest: PackageManifest | undefined; - if (requestIdentifier.type === 'version') { - manifest = metadata.versions.get(requestIdentifier.fetchSpec); - } else if (requestIdentifier.type === 'range') { - const maxVersion = semver.maxSatisfying( - Array.from(metadata.versions.keys()), - requestIdentifier.fetchSpec, - ); - if (maxVersion) { - manifest = metadata.versions.get(maxVersion); + if ( + requestIdentifier.type === 'version' || + requestIdentifier.type === 'range' || + requestIdentifier.type === 'tag' + ) { + try { + manifest = pickManifest(metadata, requestIdentifier.fetchSpec); + } catch (e) { + if (e.code === 'ETARGET') { + // If not found and next was used and user did not provide a specifier, try latest. + // Package may not have a next tag. + if ( + requestIdentifier.type === 'tag' && + requestIdentifier.fetchSpec === 'next' && + !requestIdentifier.rawSpec + ) { + try { + manifest = pickManifest(metadata, 'latest'); + } catch (e) { + if (e.code !== 'ETARGET' && e.code !== 'ENOVERSIONS') { + throw e; + } + } + } + } else if (e.code !== 'ENOVERSIONS') { + throw e; + } } - } else if (requestIdentifier.type === 'tag') { - manifest = metadata.tags[requestIdentifier.fetchSpec]; } if (!manifest) { @@ -470,10 +497,7 @@ export class UpdateCommand extends Command { return 1; } - if ( - (typeof node === 'string' && manifest.version === node) || - (typeof node === 'object' && manifest.version === node.package.version) - ) { + if (manifest.version === node.package.version) { this.logger.info(`Package '${packageName}' is already up to date.`); continue; } diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 7def7b073037..83770de1dc39 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -36,6 +36,7 @@ "ini": "1.3.5", "inquirer": "7.0.0", "npm-package-arg": "6.1.1", + "npm-pick-manifest": "3.0.2", "open": "6.4.0", "pacote": "9.5.8", "read-package-tree": "5.3.1", diff --git a/packages/angular/cli/utilities/package-metadata.ts b/packages/angular/cli/utilities/package-metadata.ts index e30b2bc9ba8b..0be552aa09a9 100644 --- a/packages/angular/cli/utilities/package-metadata.ts +++ b/packages/angular/cli/utilities/package-metadata.ts @@ -50,7 +50,7 @@ export interface PackageManifest { export interface PackageMetadata { name: string; tags: { [tag: string]: PackageManifest | undefined }; - versions: Map; + versions: Record; } let npmrc: { [key: string]: string }; @@ -179,18 +179,22 @@ export async function fetchPackageMetadata( const metadata: PackageMetadata = { name: response.name, tags: {}, - versions: new Map(), + versions: {}, }; if (response.versions) { for (const [version, manifest] of Object.entries(response.versions)) { - metadata.versions.set(version, normalizeManifest(manifest as {})); + metadata.versions[version] = normalizeManifest(manifest as {}); } } if (response['dist-tags']) { + // Store this for use with other npm utility packages + // tslint:disable-next-line: no-any + (metadata as any)['dist-tags'] = response['dist-tags']; + for (const [tag, version] of Object.entries(response['dist-tags'])) { - const manifest = metadata.versions.get(version as string); + const manifest = metadata.versions[version as string]; if (manifest) { metadata.tags[tag] = manifest; } else if (verbose) { diff --git a/yarn.lock b/yarn.lock index 6833b4d51296..9288327d257b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7114,7 +7114,7 @@ npm-packlist@^1.1.12, npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-pick-manifest@^3.0.0: +npm-pick-manifest@3.0.2, npm-pick-manifest@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== From a6b496d4ff7e36dde6bc0f0dbf1fd5444695a859 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 16 Sep 2019 21:47:14 -0400 Subject: [PATCH 0178/1070] fix(@angular-devkit/build-angular): use manual sourcemap processing for large sourcemaps Mitigates #15493 --- .../angular_devkit/build_angular/src/utils/process-bundle.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index a0dc9fa7901a..f2f062121a09 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -56,7 +56,8 @@ async function processWorker(options: ProcessBundleOptions): Promise { // if code size is larger than 500kB, manually handle sourcemaps with newer source-map package. // babel currently uses an older version that still supports sync calls const codeSize = Buffer.byteLength(options.code, 'utf8'); - const manualSourceMaps = codeSize >= 500 * 1024; + const mapSize = options.map ? Buffer.byteLength(options.map, 'utf8') : 0; + const manualSourceMaps = codeSize >= 500 * 1024 || mapSize >= 500 * 1024; // downlevel the bundle let { code, map } = await transformAsync(options.code, { From 8a4bc54ef3cfa98514d63ead892729da7852dad1 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 17 Sep 2019 11:04:12 -0400 Subject: [PATCH 0179/1070] fix(@angular-devkit/build-angular): workaround Node.js copyFile defect on macOS Fixes #15544 --- .../build_angular/src/browser/index.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 5eb820ac4d62..84abd3852729 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -471,7 +471,27 @@ export function buildWebpackBrowser( } } + // Workaround Node.js issue prior to 10.16 with copyFile on macOS + // https://github.com/angular/angular-cli/issues/15544 & https://github.com/nodejs/node/pull/27241 + let copyFileWorkaround = false; + if (process.platform === 'darwin') { + const version = process.versions.node.split('.').map(part => Number(part)); + if ( + version[0] < 10 || + version[0] === 11 || + (version[0] === 10 && version[1] < 16) + ) { + copyFileWorkaround = true; + } + } + for (const action of cacheActions) { + if (copyFileWorkaround) { + try { + fs.unlinkSync(action.dest); + } catch {} + } + fs.copyFileSync(action.src, action.dest, fs.constants.COPYFILE_FICLONE); if (process.platform !== 'win32') { // The cache writes entries as readonly and when using copyFile the permissions will also be copied. From 0dd056759853a48478210e410adb34089bcb5044 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 19 Sep 2019 05:20:21 +0000 Subject: [PATCH 0180/1070] build: update bazel_toolchains to version 0.29.5 --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 1980229a4a04..d13237b8a74b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -111,9 +111,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "ef95c8567ebf1bc7cebf77511de50d0da04a9be3b345727595e284c59a2787cf", - strip_prefix = "bazel-toolchains-0.29.4", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.4.tar.gz", + sha256 = "22ca5b8115c8673ecb627a02b606529e813961e447933863fccdf325cc5f999f", + strip_prefix = "bazel-toolchains-0.29.5", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.5.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") From 225ff385acbd9608072814328c769e82c4720f88 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 19 Sep 2019 07:16:31 -0400 Subject: [PATCH 0181/1070] fix(@angular/cli): do not warn on multiple array option use Fixes #15630 --- packages/angular/cli/models/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/cli/models/parser.ts b/packages/angular/cli/models/parser.ts index f8c65ecd1402..a3a84045e7ff 100644 --- a/packages/angular/cli/models/parser.ts +++ b/packages/angular/cli/models/parser.ts @@ -190,7 +190,7 @@ function _assignOption( const v = _coerce(value, option, parsedOptions[option.name]); if (v !== undefined) { if (parsedOptions[option.name] !== v) { - if (parsedOptions[option.name] !== undefined) { + if (parsedOptions[option.name] !== undefined && option.type !== OptionType.Array) { warnings.push( `Option ${JSON.stringify(option.name)} was already specified with value ` + `${JSON.stringify(parsedOptions[option.name])}. The new value ${JSON.stringify(v)} ` From 703f74e72a04f45075f6d3a113912ae682346048 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 20 Sep 2019 05:22:18 +0000 Subject: [PATCH 0182/1070] build: update bazel_toolchains to version 0.29.6 --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index d13237b8a74b..30f7ac341b02 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -111,9 +111,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "22ca5b8115c8673ecb627a02b606529e813961e447933863fccdf325cc5f999f", - strip_prefix = "bazel-toolchains-0.29.5", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.5.tar.gz", + sha256 = "a1e273b6159ae858f53046f5bab9678cffa82a72f0bf0c0a9e4af8fddb91209c", + strip_prefix = "bazel-toolchains-0.29.6", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.6.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") From c681c9df3bb7a3a9c33f49a54a07acdae8add550 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 21 Sep 2019 05:21:43 +0000 Subject: [PATCH 0183/1070] build: update jasmine-core to version ~3.5.0 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ecedbffa69f5..db5b6124c3b3 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -82,7 +82,7 @@ "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", "jquery": "^3.3.1", - "jasmine-core": "~3.4.0", + "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.3.0", "karma-chrome-launcher": "~2.2.0", diff --git a/yarn.lock b/yarn.lock index 9288327d257b..c6a7ecc72b94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5741,6 +5741,11 @@ jasmine-core@^3.3, jasmine-core@~3.4.0: resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.4.0.tgz#2a74618e966026530c3518f03e9f845d26473ce3" integrity sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg== +jasmine-core@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.5.0.tgz#132c23e645af96d85c8bca13c8758b18429fc1e4" + integrity sha512-nCeAiw37MIMA9w9IXso7bRaLl+c/ef3wnxsoSAlYrzS+Ot0zTG6nU8G/cIfGkqpkjX2wNaIW9RFG0TwIFnG6bA== + jasmine-spec-reporter@^4.2.1, jasmine-spec-reporter@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz#1d632aec0341670ad324f92ba84b4b32b35e9e22" From 8ea892cb7ea124127fa3867a8c3edd44e855106f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 23 Sep 2019 09:56:49 +0200 Subject: [PATCH 0184/1070] feat(@schematics/angular): enable scripts optimization for server bundle The optimizations are suggested to; 1) disables ngDevMode via terser 2) helps with cold server starts the same way as client by lowering JS parse times --- .../migrations/update-9/ivy-libraries_spec.ts | 1 + .../update-9/update-workspace-config.ts | 23 +++++++++ .../update-9/update-workspace-config_spec.ts | 48 +++++++++++++++++++ .../schematics/angular/universal/index.ts | 5 +- .../e2e/tests/build/platform-server.ts | 2 +- 5 files changed, 74 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts index bd7ba0d0aea1..d7eca2bcffae 100644 --- a/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts @@ -49,6 +49,7 @@ describe('Migration to version 9', () => { tree, ) .toPromise(); + tree = await schematicRunner .runExternalSchematicAsync( require.resolve('../../collection.json'), diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts index d3ced0deae3b..30bfd3d6bb2a 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts @@ -40,6 +40,10 @@ export function updateWorkspaceConfig(): Rule { updateStyleOrScriptOption('scripts', recorder, target); } + for (const { target } of getTargets(workspace, 'server', Builders.Server)) { + updateOptimizationOption(recorder, target); + } + tree.commitUpdate(recorder); return tree; @@ -139,3 +143,22 @@ function addAnyComponentStyleBudget(recorder: UpdateRecorder, builderConfig: Jso } } } + +function updateOptimizationOption(recorder: UpdateRecorder, builderConfig: JsonAstObject) { + const options = getAllOptions(builderConfig, true); + + for (const option of options) { + const optimizationOption = findPropertyInAstObject(option, 'optimization'); + if (!optimizationOption) { + // add + insertPropertyInAstObjectInOrder(recorder, option, 'optimization', true, 14); + continue; + } + + if (optimizationOption.kind !== 'true') { + const { start, end } = optimizationOption; + recorder.remove(start.offset, end.offset - start.offset); + recorder.insertLeft(start.offset, 'true'); + } + } +} diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts index 00d59ab12683..a7a2c98a220c 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts @@ -248,5 +248,53 @@ describe('Migration to version 9', () => { expect(config.configurations.production.aot).toBeUndefined(); }); }); + + describe('server optimization option', () => { + beforeEach(async () => { + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'universal', + { + clientProject: 'migration-test', + }, + tree, + ) + .toPromise(); + }); + + it('should add optimization option when not defined', async () => { + let config = getWorkspaceTargets(tree); + config.server.configurations.production.optimization = undefined; + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).server.configurations; + expect(config.production.optimization).toBe(true); + }); + + it('should set optimization to true when false', async () => { + let config = getWorkspaceTargets(tree); + config.server.configurations.production.optimization = false; + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).server.configurations; + expect(config.production.optimization).toBe(true); + }); + + it('should set optimization to true when optimization is fine grained', async () => { + let config = getWorkspaceTargets(tree); + config.server.configurations.production.optimization = { + scripts: false, + styles: true, + }; + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).server.configurations; + expect(config.production.optimization).toBe(true); + }); + }); }); }); diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 9d52c9a68eb6..b79e55b28583 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -62,10 +62,7 @@ function updateConfigFile(options: UniversalOptions, tsConfigDirectory: Path): R production: { fileReplacements, sourceMap: false, - optimization: { - scripts: false, - styles: true, - }, + optimization: true, }, }, }); diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index d595f84360d5..a2e6cc4f84b7 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -54,7 +54,7 @@ export default async function () { } - await ng('run', 'test-project:server:production'); + await ng('run', 'test-project:server:production', '--optimization', 'false'); await expectFileToMatch('dist/server/main.js', veEnabled ? /exports.*AppServerModuleNgFactory/ : /exports.*AppServerModule/); await exec(normalize('node'), 'index.js'); From d9f0bd5f3456a4ba4b7f3cefee41f78ebc253404 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 23 Sep 2019 10:01:08 +0200 Subject: [PATCH 0185/1070] fix(@angular-devkit/build-angular): remove pure_getters Closes #14316 --- .../src/angular-cli-files/models/webpack-configs/common.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 08ce9b597f77..984efbe979a1 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -354,7 +354,6 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { } : { ecma: terserEcma, - pure_getters: buildOptions.buildOptimizer, // PURE comments work best with 3 passes. // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. passes: buildOptions.buildOptimizer ? 3 : 1, From ab5b1909d62ae081001f965d2e3caa79a4a7e372 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 23 Sep 2019 14:40:03 +0200 Subject: [PATCH 0186/1070] build: update rxjs to 6.5.3 --- package.json | 2 +- packages/angular_devkit/architect/package.json | 2 +- packages/angular_devkit/architect_cli/package.json | 2 +- packages/angular_devkit/benchmark/package.json | 2 +- packages/angular_devkit/build_angular/package.json | 2 +- .../angular_devkit/build_angular/src/browser/index.ts | 5 ++--- .../build_angular/src/utils/delete-output-dir.ts | 7 ++++--- packages/angular_devkit/build_ng_packagr/package.json | 2 +- packages/angular_devkit/build_webpack/package.json | 2 +- packages/angular_devkit/core/package.json | 2 +- packages/angular_devkit/schematics/package.json | 2 +- packages/angular_devkit/schematics_cli/package.json | 2 +- packages/ngtools/webpack/package.json | 2 +- packages/schematics/angular/utility/latest-versions.ts | 2 +- packages/schematics/update/package.json | 2 +- yarn.lock | 9 +-------- 16 files changed, 20 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index cb4143737ec0..7f22547d577a 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "pacote": "^9.2.3", "pidtree": "^0.3.0", "pidusage": "^2.0.17", - "rxjs": "~6.4.0", + "rxjs": "6.5.3", "sauce-connect-proxy": "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz", "semver": "6.3.0", "source-map": "^0.7.3", diff --git a/packages/angular_devkit/architect/package.json b/packages/angular_devkit/architect/package.json index 12bad056e733..4b9e41995d5a 100644 --- a/packages/angular_devkit/architect/package.json +++ b/packages/angular_devkit/architect/package.json @@ -7,7 +7,7 @@ "typings": "src/index.d.ts", "dependencies": { "@angular-devkit/core": "0.0.0", - "rxjs": "6.4.0" + "rxjs": "6.5.3" }, "builders": "./builders/builders.json" } diff --git a/packages/angular_devkit/architect_cli/package.json b/packages/angular_devkit/architect_cli/package.json index 82224c697d6b..57810f0bac01 100644 --- a/packages/angular_devkit/architect_cli/package.json +++ b/packages/angular_devkit/architect_cli/package.json @@ -17,7 +17,7 @@ "@angular-devkit/core": "0.0.0", "minimist": "1.2.0", "progress": "2.0.3", - "rxjs": "6.4.0", + "rxjs": "6.5.3", "symbol-observable": "1.2.0" }, "devDependencies": { diff --git a/packages/angular_devkit/benchmark/package.json b/packages/angular_devkit/benchmark/package.json index 9d9b0bb12a0e..59a2b6526ff2 100644 --- a/packages/angular_devkit/benchmark/package.json +++ b/packages/angular_devkit/benchmark/package.json @@ -18,7 +18,7 @@ "minimist": "1.2.0", "pidusage": "2.0.17", "pidtree": "0.3.0", - "rxjs": "6.4.0", + "rxjs": "6.5.3", "tree-kill": "^1.2.0" } } \ No newline at end of file diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index db5b6124c3b3..ebcf423507d8 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -41,7 +41,7 @@ "postcss-loader": "3.0.0", "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", - "rxjs": "6.4.0", + "rxjs": "6.5.3", "sass": "1.22.12", "sass-loader": "8.0.0", "semver": "6.3.0", diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 84abd3852729..6b915da053d6 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -27,9 +27,8 @@ import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { createHash } from 'crypto'; import * as findCacheDirectory from 'find-cache-dir'; import * as fs from 'fs'; -import * as os from 'os'; import * as path from 'path'; -import { from, of } from 'rxjs'; +import { Observable, from, of } from 'rxjs'; import { bufferCount, catchError, concatMap, map, mergeScan, switchMap } from 'rxjs/operators'; import { ScriptTarget } from 'typescript'; import * as webpack from 'webpack'; @@ -192,7 +191,7 @@ export function buildWebpackBrowser( logging?: WebpackLoggingCallback; indexHtml?: IndexHtmlTransform; } = {}, -) { +): Observable { const host = new NodeJsSyncHost(); const root = normalize(context.workspaceRoot); diff --git a/packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts b/packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts index 30682efc6e99..b4234cd269f6 100644 --- a/packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts +++ b/packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts @@ -6,13 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ import { Path, resolve, virtualFs } from '@angular-devkit/core'; -import { EMPTY } from 'rxjs'; -import { concatMap, last } from 'rxjs/operators'; +import { EMPTY, Observable } from 'rxjs'; +import { concatMap, last, map } from 'rxjs/operators'; /** * Delete an output directory, but error out if it's the root of the project. */ -export function deleteOutputDir(root: Path, outputPath: Path, host: virtualFs.Host) { +export function deleteOutputDir(root: Path, outputPath: Path, host: virtualFs.Host): Observable { const resolvedOutputPath = resolve(root, outputPath); if (resolvedOutputPath === root) { throw new Error('Output path MUST not be project root directory!'); @@ -21,5 +21,6 @@ export function deleteOutputDir(root: Path, outputPath: Path, host: virtualFs.Ho return host.exists(resolvedOutputPath).pipe( concatMap(exists => exists ? host.delete(resolvedOutputPath) : EMPTY), last(null, null), + map(() => undefined), ); } diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index a8bc263ab8c6..4d6244bba1a9 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -8,7 +8,7 @@ "builders": "builders.json", "dependencies": { "@angular-devkit/architect": "0.0.0", - "rxjs": "6.4.0" + "rxjs": "6.5.3" }, "peerDependencies": { "ng-packagr": "^4.0.0 || ^5.0.0" diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 01e83eeeeaec..3b3455909873 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -9,7 +9,7 @@ "dependencies": { "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", - "rxjs": "6.4.0", + "rxjs": "6.5.3", "webpack-merge": "4.2.2" }, "peerDependencies": { diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index 45ecc3089b10..17c797fd7482 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -11,7 +11,7 @@ "ajv": "6.10.2", "fast-json-stable-stringify": "2.0.0", "magic-string": "0.25.3", - "rxjs": "6.4.0", + "rxjs": "6.5.3", "source-map": "0.7.3" }, "devDependencies": { diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index ba3351542cde..50b161e7f9f0 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -14,6 +14,6 @@ ], "dependencies": { "@angular-devkit/core": "0.0.0", - "rxjs": "6.4.0" + "rxjs": "6.5.3" } } diff --git a/packages/angular_devkit/schematics_cli/package.json b/packages/angular_devkit/schematics_cli/package.json index a2ba312bf0fc..99c7c16790eb 100644 --- a/packages/angular_devkit/schematics_cli/package.json +++ b/packages/angular_devkit/schematics_cli/package.json @@ -20,7 +20,7 @@ "@schematics/schematics": "0.0.0", "inquirer": "7.0.0", "minimist": "1.2.0", - "rxjs": "6.4.0", + "rxjs": "6.5.3", "symbol-observable": "1.2.0" } } diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 3c2726007ec6..002c8e62da81 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -23,7 +23,7 @@ "dependencies": { "@angular-devkit/core": "0.0.0", "enhanced-resolve": "4.1.0", - "rxjs": "6.4.0", + "rxjs": "6.5.3", "tree-kill": "1.2.1", "webpack-sources": "1.4.3" }, diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index c80145439ccc..dbe33af42323 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -9,7 +9,7 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. Angular: '~9.0.0-next.7', - RxJs: '~6.4.0', + RxJs: '~6.5.3', ZoneJs: '~0.10.2', TypeScript: '~3.5.3', TsLib: '^1.10.0', diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index 0cf9ac252c38..6cb4128f105b 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -18,6 +18,6 @@ "pacote": "9.5.8", "semver": "6.3.0", "semver-intersect": "1.4.0", - "rxjs": "6.4.0" + "rxjs": "6.5.3" } } diff --git a/yarn.lock b/yarn.lock index c6a7ecc72b94..487361f28a4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8778,14 +8778,7 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@6.4.0, rxjs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" - integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== - dependencies: - tslib "^1.9.0" - -rxjs@^6.0.0, rxjs@^6.4.0: +rxjs@6.5.3, rxjs@^6.0.0, rxjs@^6.4.0, rxjs@~6.5.3: version "6.5.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== From 0d104c0abaa69444ac74d282269b032ee39e1204 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 18 Sep 2019 10:38:46 -0400 Subject: [PATCH 0187/1070] feat(@angular-devkit/architect): support accessing project metadata --- .../angular_devkit/architect/src/index.d.ts | 2 ++ .../architect/testing/index.d.ts | 1 + .../node/node-modules-architect-host.ts | 23 +++++++++++++++++ packages/angular_devkit/architect/src/api.ts | 3 +++ .../angular_devkit/architect/src/architect.ts | 25 +++++++++++++++++++ .../architect/src/create-builder.ts | 5 ++++ .../angular_devkit/architect/src/internal.ts | 3 +++ .../testing/testing-architect-host.ts | 4 +++ 8 files changed, 66 insertions(+) diff --git a/etc/api/angular_devkit/architect/src/index.d.ts b/etc/api/angular_devkit/architect/src/index.d.ts index 1d7e5cb3e925..c25da032eafa 100644 --- a/etc/api/angular_devkit/architect/src/index.d.ts +++ b/etc/api/angular_devkit/architect/src/index.d.ts @@ -15,6 +15,8 @@ export interface BuilderContext { workspaceRoot: string; addTeardown(teardown: () => (Promise | void)): void; getBuilderNameForTarget(target: Target): Promise; + getProjectMetadata(target: Target): Promise; + getProjectMetadata(projectName: string): Promise; getTargetOptions(target: Target): Promise; reportProgress(current: number, total?: number, status?: string): void; reportRunning(): void; diff --git a/etc/api/angular_devkit/architect/testing/index.d.ts b/etc/api/angular_devkit/architect/testing/index.d.ts index ccd2f03ff06d..c531a3dfb51b 100644 --- a/etc/api/angular_devkit/architect/testing/index.d.ts +++ b/etc/api/angular_devkit/architect/testing/index.d.ts @@ -8,6 +8,7 @@ export declare class TestingArchitectHost implements ArchitectHost { getBuilderNameForTarget(target: Target): Promise; getCurrentDirectory(): Promise; getOptionsForTarget(target: Target): Promise; + getProjectMetadata(target: Target | string): Promise; getWorkspaceRoot(): Promise; loadBuilder(info: BuilderInfo): Promise; resolveBuilder(builderName: string): Promise; diff --git a/packages/angular_devkit/architect/node/node-modules-architect-host.ts b/packages/angular_devkit/architect/node/node-modules-architect-host.ts index e19051e7b172..c78cd740648c 100644 --- a/packages/angular_devkit/architect/node/node-modules-architect-host.ts +++ b/packages/angular_devkit/architect/node/node-modules-architect-host.ts @@ -113,6 +113,29 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost { + const projectName = typeof target === 'string' ? target : target.project; + + // NOTE: Remove conditional when deprecated support for experimental workspace API is removed. + if ('getProject' in this._workspace) { + return this._workspace.getProject(projectName) as unknown as json.JsonObject; + } else { + const projectDefinition = this._workspace.projects.get(projectName); + if (!projectDefinition) { + throw new Error('Project does not exist.'); + } + + const metadata = { + root: projectDefinition.root, + sourceRoot: projectDefinition.sourceRoot, + prefix: projectDefinition.prefix, + ...projectDefinition.extensions, + } as unknown as json.JsonObject; + + return metadata; + } + } + async loadBuilder(info: NodeModulesBuilderInfo): Promise { const builder = (await import(info.import)).default; if (builder[BuilderSymbol]) { diff --git a/packages/angular_devkit/architect/src/api.ts b/packages/angular_devkit/architect/src/api.ts index 35f7e4fd9275..57cd289bbc33 100644 --- a/packages/angular_devkit/architect/src/api.ts +++ b/packages/angular_devkit/architect/src/api.ts @@ -197,6 +197,9 @@ export interface BuilderContext { */ getTargetOptions(target: Target): Promise; + getProjectMetadata(projectName: string): Promise; + getProjectMetadata(target: Target): Promise; + /** * Resolves and return a builder name. The exact format of the name is up to the host, * so it should not be parsed to gather information (it's free form). This string can be diff --git a/packages/angular_devkit/architect/src/architect.ts b/packages/angular_devkit/architect/src/architect.ts index 62350f8fc0f7..7e8c18fd0d59 100644 --- a/packages/angular_devkit/architect/src/architect.ts +++ b/packages/angular_devkit/architect/src/architect.ts @@ -277,6 +277,30 @@ function _getTargetOptionsFactory(host: ArchitectHost) { ); } +function _getProjectMetadataFactory(host: ArchitectHost) { + return experimental.jobs.createJobHandler( + target => { + return host.getProjectMetadata(target).then(options => { + if (options === null) { + throw new Error(`Invalid target: ${JSON.stringify(target)}.`); + } + + return options; + }); + }, + { + name: '..getProjectMetadata', + output: { type: 'object' }, + argument: { + oneOf: [ + { type: 'string' }, + inputSchema.properties.target, + ], + }, + }, + ); +} + function _getBuilderNameForTargetFactory(host: ArchitectHost) { return experimental.jobs.createJobHandler(async target => { const builderName = await host.getBuilderNameForTarget(target); @@ -342,6 +366,7 @@ export class Architect { privateArchitectJobRegistry.register(_getTargetOptionsFactory(_host)); privateArchitectJobRegistry.register(_getBuilderNameForTargetFactory(_host)); privateArchitectJobRegistry.register(_validateOptionsFactory(_host, registry)); + privateArchitectJobRegistry.register(_getProjectMetadataFactory(_host)); const jobRegistry = new experimental.jobs.FallbackRegistry([ new ArchitectTargetJobRegistry(_host, registry, this._jobCache, this._infoCache), diff --git a/packages/angular_devkit/architect/src/create-builder.ts b/packages/angular_devkit/architect/src/create-builder.ts index 9b03efd8b85f..62b0ff2489a4 100644 --- a/packages/angular_devkit/architect/src/create-builder.ts +++ b/packages/angular_devkit/architect/src/create-builder.ts @@ -25,6 +25,7 @@ import { Builder, BuilderSymbol, BuilderVersionSymbol } from './internal'; import { scheduleByName, scheduleByTarget } from './schedule-by-name'; +// tslint:disable-next-line: no-big-function export function createBuilder< OptT extends json.JsonObject, OutT extends BuilderOutput = BuilderOutput, @@ -144,6 +145,10 @@ export function createBuilder< return scheduler.schedule( '..getTargetOptions', target).output.toPromise(); }, + async getProjectMetadata(target: Target | string) { + return scheduler.schedule( + '..getProjectMetadata', target).output.toPromise(); + }, async getBuilderNameForTarget(target: Target) { return scheduler.schedule( '..getBuilderNameForTarget', diff --git a/packages/angular_devkit/architect/src/internal.ts b/packages/angular_devkit/architect/src/internal.ts index 0ccf439926ee..deaf25047160 100644 --- a/packages/angular_devkit/architect/src/internal.ts +++ b/packages/angular_devkit/architect/src/internal.ts @@ -78,4 +78,7 @@ export interface ArchitectHost { getWorkspaceRoot(): Promise; getOptionsForTarget(target: Target): Promise; + + getProjectMetadata(projectName: string): Promise; + getProjectMetadata(target: Target): Promise; } diff --git a/packages/angular_devkit/architect/testing/testing-architect-host.ts b/packages/angular_devkit/architect/testing/testing-architect-host.ts index 0599979241ba..c7d901f3906b 100644 --- a/packages/angular_devkit/architect/testing/testing-architect-host.ts +++ b/packages/angular_devkit/architect/testing/testing-architect-host.ts @@ -104,6 +104,10 @@ export class TestingArchitectHost implements ArchitectHost { return maybeTarget.options; } + async getProjectMetadata(target: Target | string): Promise { + return this._backendHost && this._backendHost.getProjectMetadata(target as string); + } + async loadBuilder(info: BuilderInfo): Promise { return this._builderImportMap.get(info.builderName) || (this._backendHost && this._backendHost.loadBuilder(info)); From ffd153a6a210120eecbb0aca44f2cca2a3088ef6 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 18 Sep 2019 11:26:35 -0400 Subject: [PATCH 0188/1070] refactor(@angular-devkit/build-angular): use project metadata in builders This eliminates the need to manually read a workspace file and removes the use of the experimental workspace API from the package. --- .../build_angular/src/app-shell/index.ts | 22 ++-- .../build_angular/src/browser/index.ts | 32 ++---- .../build_angular/src/dev-server/index.ts | 24 +--- .../build_angular/src/karma/index.ts | 17 ++- .../src/utils/webpack-browser-config.ts | 105 +++++++----------- 5 files changed, 71 insertions(+), 129 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/app-shell/index.ts b/packages/angular_devkit/build_angular/src/app-shell/index.ts index 4639928a0f50..277dcd70a6bb 100644 --- a/packages/angular_devkit/build_angular/src/app-shell/index.ts +++ b/packages/angular_devkit/build_angular/src/app-shell/index.ts @@ -11,7 +11,7 @@ import { createBuilder, targetFromTargetString, } from '@angular-devkit/architect'; -import { JsonObject, experimental, join, normalize, resolve, schema } from '@angular-devkit/core'; +import { JsonObject, join, normalize, resolve, schema } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; import * as path from 'path'; @@ -81,21 +81,17 @@ async function _renderUniversal( if (browserOptions.serviceWorker) { const host = new NodeJsSyncHost(); - // Create workspace. - const registry = new schema.CoreSchemaRegistry(); - registry.addPostTransform(schema.transforms.addUndefinedDefaults); - - const workspace = await experimental.workspace.Workspace.fromPath( - host, - normalize(context.workspaceRoot), - registry, - ); - const projectName = context.target ? context.target.project : workspace.getDefaultProjectName(); + const projectName = context.target && context.target.project; if (!projectName) { - throw new Error('Must either have a target from the context or a default project.'); + throw new Error('The builder requires a target.'); } - const projectRoot = resolve(workspace.root, normalize(workspace.getProject(projectName).root)); + + const projectMetadata = await context.getProjectMetadata(projectName); + const projectRoot = resolve( + normalize(context.workspaceRoot), + normalize((projectMetadata.root as string) || ''), + ); await augmentAppWithServiceWorker( host, diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 6b915da053d6..a5b6b6e5a11d 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -13,7 +13,6 @@ import { runWebpack, } from '@angular-devkit/build-webpack'; import { - experimental, getSystemPath, join, json, @@ -108,7 +107,7 @@ export async function buildBrowserWebpackConfigFromContext( options: BrowserBuilderSchema, context: BuilderContext, host: virtualFs.Host = new NodeJsSyncHost(), -): Promise<{ workspace: experimental.workspace.Workspace; config: webpack.Configuration[] }> { +): Promise<{ config: webpack.Configuration[], projectRoot: string, projectSourceRoot?: string }> { return generateBrowserWebpackConfigFromContext( options, context, @@ -160,8 +159,12 @@ async function initialize( context: BuilderContext, host: virtualFs.Host, webpackConfigurationTransform?: ExecutionTransformer, -): Promise<{ workspace: experimental.workspace.Workspace; config: webpack.Configuration[] }> { - const { config, workspace } = await buildBrowserWebpackConfigFromContext(options, context, host); +): Promise<{ config: webpack.Configuration[]; projectRoot: string; projectSourceRoot?: string }> { + const { config, projectRoot, projectSourceRoot } = await buildBrowserWebpackConfigFromContext( + options, + context, + host, + ); let transformedConfig; if (webpackConfigurationTransform) { @@ -179,7 +182,7 @@ async function initialize( ).toPromise(); } - return { config: transformedConfig || config, workspace }; + return { config: transformedConfig || config, projectRoot, projectSourceRoot }; } // tslint:disable-next-line: no-big-function @@ -203,23 +206,10 @@ export function buildWebpackBrowser( return from(initialize(options, context, host, transforms.webpackConfiguration)).pipe( // tslint:disable-next-line: no-big-function - switchMap(({ workspace, config: configs }) => { - const projectName = context.target - ? context.target.project - : workspace.getDefaultProjectName(); - - if (!projectName) { - throw new Error('Must either have a target from the context or a default project.'); - } - - const projectRoot = resolve( - workspace.root, - normalize(workspace.getProject(projectName).root), - ); - + switchMap(({ config: configs, projectRoot }) => { const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); const target = tsConfig.options.target || ScriptTarget.ES5; - const buildBrowserFeatures = new BuildBrowserFeatures(getSystemPath(projectRoot), target); + const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot, target); const isDifferentialLoadingNeeded = buildBrowserFeatures.isDifferentialLoadingNeeded(); @@ -570,7 +560,7 @@ export function buildWebpackBrowser( augmentAppWithServiceWorker( host, root, - projectRoot, + normalize(projectRoot), resolve(root, normalize(options.outputPath)), options.baseHref || '/', options.ngswConfigPath, diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index b253622c6d08..ecf36de71361 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -13,12 +13,8 @@ import { runWebpackDevServer, } from '@angular-devkit/build-webpack'; import { - experimental, - getSystemPath, json, logging, - normalize, - resolve, tags, } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; @@ -98,7 +94,7 @@ export function serveWebpackBrowser( webpackConfig: webpack.Configuration; webpackDevServerConfig: WebpackDevServer.Configuration; port: number; - workspace: experimental.workspace.Workspace; + projectRoot: string; }> { // Get the browser configuration from the target name. const rawBrowserOptions = await context.getTargetOptions(browserTarget); @@ -149,12 +145,12 @@ export function serveWebpackBrowser( webpackConfig, webpackDevServerConfig, port, - workspace: webpackConfigResult.workspace, + projectRoot: webpackConfigResult.projectRoot, }; } return from(setup()).pipe( - switchMap(({ browserOptions, webpackConfig, webpackDevServerConfig, port, workspace }) => { + switchMap(({ browserOptions, webpackConfig, webpackDevServerConfig, port, projectRoot }) => { options.port = port; // Resolve public host and client address. @@ -192,21 +188,9 @@ export function serveWebpackBrowser( if (browserOptions.index) { const { scripts = [], styles = [], baseHref, tsConfig } = browserOptions; - const projectName = context.target - ? context.target.project - : workspace.getDefaultProjectName(); - - if (!projectName) { - throw new Error('Must either have a target from the context or a default project.'); - } - const projectRoot = resolve( - workspace.root, - normalize(workspace.getProject(projectName).root), - ); - const { options: compilerOptions } = readTsconfig(tsConfig, context.workspaceRoot); const target = compilerOptions.target || ts.ScriptTarget.ES5; - const buildBrowserFeatures = new BuildBrowserFeatures(getSystemPath(projectRoot), target); + const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot, target); const entrypoints = generateEntryPoints({ scripts, styles }); const moduleEntrypoints = buildBrowserFeatures.isDifferentialLoadingNeeded() diff --git a/packages/angular_devkit/build_angular/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts index c95c400d6216..61e7c851e2f4 100644 --- a/packages/angular_devkit/build_angular/src/karma/index.ts +++ b/packages/angular_devkit/build_angular/src/karma/index.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect'; -import { experimental, getSystemPath, join } from '@angular-devkit/core'; +import { getSystemPath, join, normalize } from '@angular-devkit/core'; import { dirname, resolve } from 'path'; import { Observable, from } from 'rxjs'; import { defaultIfEmpty, switchMap } from 'rxjs/operators'; @@ -40,8 +40,8 @@ async function initialize( context: BuilderContext, webpackConfigurationTransformer?: ExecutionTransformer, // tslint:disable-next-line:no-implicit-dependencies -): Promise<[experimental.workspace.Workspace, typeof import('karma'), webpack.Configuration]> { - const { config, workspace } = await generateBrowserWebpackConfigFromContext( +): Promise<[typeof import('karma'), webpack.Configuration]> { + const { config } = await generateBrowserWebpackConfigFromContext( // only two properties are missing: // * `outputPath` which is fixed for tests // * `budgets` which might be incorrect due to extra dev libs @@ -60,7 +60,6 @@ async function initialize( const karma = await import('karma'); return [ - workspace, karma, webpackConfigurationTransformer ? await webpackConfigurationTransformer(config[0]) : config[0], ]; @@ -80,7 +79,7 @@ export function execute( return from(initialize(options, context, transforms.webpackConfiguration)).pipe( switchMap( - ([workspace, karma, webpackConfig]) => + ([karma, webpackConfig]) => new Observable(subscriber => { const karmaOptions: KarmaConfigOptions = {}; @@ -111,12 +110,10 @@ export function execute( options.include && options.include.length > 0 ) { - const mainFilePath = getSystemPath(join(workspace.root, options.main)); - const files = findTests( - options.include, - dirname(mainFilePath), - getSystemPath(workspace.root), + const mainFilePath = getSystemPath( + join(normalize(context.workspaceRoot), options.main), ); + const files = findTests(options.include, dirname(mainFilePath), context.workspaceRoot); // early exit, no reason to start karma if (!files.length) { subscriber.error( diff --git a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts index c3682dac18bd..203b432f6d67 100644 --- a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts +++ b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts @@ -7,12 +7,10 @@ */ import { BuilderContext } from '@angular-devkit/architect'; import { - experimental, getSystemPath, logging, normalize, resolve, - schema, virtualFs, } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; @@ -60,9 +58,10 @@ export async function generateWebpackConfig( // However this config generation is used by multiple builders such as dev-server const scriptTarget = tsConfig.options.target || ts.ScriptTarget.ES5; const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot, scriptTarget); - const differentialLoading = context.builder.builderName === 'browser' - && !options.watch - && buildBrowserFeatures.isDifferentialLoadingNeeded(); + const differentialLoading = + context.builder.builderName === 'browser' && + !options.watch && + buildBrowserFeatures.isDifferentialLoadingNeeded(); const scriptTargets = [scriptTarget]; @@ -73,29 +72,32 @@ export async function generateWebpackConfig( // For differential loading, we can have several targets return scriptTargets.map(scriptTarget => { let buildOptions: NormalizedBrowserBuilderSchema = { ...options }; - const supportES2015 - = scriptTarget !== ts.ScriptTarget.ES3 && scriptTarget !== ts.ScriptTarget.ES5; + const supportES2015 = + scriptTarget !== ts.ScriptTarget.ES3 && scriptTarget !== ts.ScriptTarget.ES5; if (differentialLoading && fullDifferential) { buildOptions = { ...options, - ...( - // FIXME: we do create better webpack config composition to achieve the below - // When DL is enabled and supportES2015 is true it means that we are on the second build - // This also means that we don't need to include styles and assets multiple times - supportES2015 - ? {} - : { + ...// FIXME: we do create better webpack config composition to achieve the below + // When DL is enabled and supportES2015 is true it means that we are on the second build + // This also means that we don't need to include styles and assets multiple times + (supportES2015 + ? {} + : { styles: options.extractCss ? [] : options.styles, assets: [], - } - ), + }), es5BrowserSupport: undefined, esVersionInFileName: true, scriptTargetOverride: scriptTarget, }; } else if (differentialLoading && !fullDifferential) { - buildOptions = { ...options, esVersionInFileName: true, scriptTargetOverride: ts.ScriptTarget.ES5, es5BrowserSupport: undefined }; + buildOptions = { + ...options, + esVersionInFileName: true, + scriptTargetOverride: ts.ScriptTarget.ES5, + es5BrowserSupport: undefined, + }; } const wco: BrowserWebpackConfigOptions = { @@ -145,75 +147,48 @@ export async function generateWebpackConfig( }); } - -export async function generateBrowserWebpackConfigFromWorkspace( +export async function generateBrowserWebpackConfigFromContext( options: BrowserBuilderSchema, context: BuilderContext, - projectName: string, - workspace: experimental.workspace.Workspace, - host: virtualFs.Host, webpackPartialGenerator: (wco: BrowserWebpackConfigOptions) => webpack.Configuration[], - logger: logging.LoggerApi, -): Promise { - // TODO: Use a better interface for workspace access. - const projectRoot = resolve(workspace.root, normalize(workspace.getProject(projectName).root)); - const projectSourceRoot = workspace.getProject(projectName).sourceRoot; + host: virtualFs.Host = new NodeJsSyncHost(), +): Promise<{ config: webpack.Configuration[]; projectRoot: string; projectSourceRoot?: string }> { + const projectName = context.target && context.target.project; + if (!projectName) { + throw new Error('The builder requires a target.'); + } + + const workspaceRoot = normalize(context.workspaceRoot); + const projectMetadata = await context.getProjectMetadata(projectName); + const projectRoot = resolve(workspaceRoot, normalize((projectMetadata.root as string) || '')); + const projectSourceRoot = projectMetadata.sourceRoot as string | undefined; const sourceRoot = projectSourceRoot - ? resolve(workspace.root, normalize(projectSourceRoot)) + ? resolve(workspaceRoot, normalize(projectSourceRoot)) : undefined; const normalizedOptions = normalizeBrowserSchema( host, - workspace.root, + workspaceRoot, projectRoot, sourceRoot, options, ); - return generateWebpackConfig( + const config = await generateWebpackConfig( context, - getSystemPath(workspace.root), + getSystemPath(workspaceRoot), getSystemPath(projectRoot), sourceRoot && getSystemPath(sourceRoot), normalizedOptions, webpackPartialGenerator, - logger, - ); -} - - -export async function generateBrowserWebpackConfigFromContext( - options: BrowserBuilderSchema, - context: BuilderContext, - webpackPartialGenerator: (wco: BrowserWebpackConfigOptions) => webpack.Configuration[], - host: virtualFs.Host = new NodeJsSyncHost(), -): Promise<{ workspace: experimental.workspace.Workspace, config: webpack.Configuration[] }> { - const registry = new schema.CoreSchemaRegistry(); - registry.addPostTransform(schema.transforms.addUndefinedDefaults); - - const workspace = await experimental.workspace.Workspace.fromPath( - host, - normalize(context.workspaceRoot), - registry, - ); - - const projectName = context.target ? context.target.project : workspace.getDefaultProjectName(); - - if (!projectName) { - throw new Error('Must either have a target from the context or a default project.'); - } - - const config = await generateBrowserWebpackConfigFromWorkspace( - options, - context, - projectName, - workspace, - host, - webpackPartialGenerator, context.logger, ); - return { workspace, config }; + return { + config, + projectRoot: getSystemPath(projectRoot), + projectSourceRoot: sourceRoot && getSystemPath(sourceRoot), + }; } export function getIndexOutputFile(options: BrowserBuilderSchema): string { From e847733febce0594688bbf4f12a54fd6b5400897 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 23 Sep 2019 17:44:18 +0000 Subject: [PATCH 0189/1070] build: update to version --- yarn.lock | 216 ++++++++++++++++++++++-------------------------------- 1 file changed, 87 insertions(+), 129 deletions(-) diff --git a/yarn.lock b/yarn.lock index 487361f28a4c..073a3f331106 100644 --- a/yarn.lock +++ b/yarn.lock @@ -800,9 +800,9 @@ "@bazel/buildifier-win32_x64" "0.29.0" "@bazel/hide-bazel-files@latest": - version "0.37.0" - resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.37.0.tgz#3c30a3f64f0b976c8c0e8dd236b0f26db0f6f860" - integrity sha512-aVReQa7UxWjBNTsZTAmFKHujTaDxlMUEq2BgvP7mYp1nnZjsCI30SjzPkTn77Ghw4/lK8lhht7AdfWPQp271pQ== + version "0.37.1" + resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.37.1.tgz#70702139318996672d279024076427f2b8ab6879" + integrity sha512-9wDXQHG4MitPIFvQOKi1zFzSI79mzH5R3iWa/e/nuhD+uVfeOaoyAGTCiwxm13/sGt/Hjlx3vRb8WT7ucq0ouw== "@bazel/jasmine@0.37.1": version "0.37.1" @@ -1090,9 +1090,9 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node-fetch@^2.1.6": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.0.tgz#1c55616a4591bdd15a389fbd0da4a55b9502add5" - integrity sha512-TLFRywthBgL68auWj+ziWu+vnmmcHCDFC/sqCOQf1xTz4hRq8cu79z8CtHU9lncExGBsB8fXA4TiLDLt6xvMzw== + version "2.5.1" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.1.tgz#9e4daffa983eb098d25c2cb410c949678f3aee78" + integrity sha512-nYsC20tHanaNa4coFvCDcuIvtdvu8YkQz0XQOoBHL1X1y1QxeNe73dg1PaLGqsJNWiVwK0bjn5Jf+ZQpE6acJg== dependencies: "@types/node" "*" @@ -1744,7 +1744,7 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@^3.0.1: +anymatch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.0.tgz#e609350e50a9313b472789b2f14ef35808ee14d6" integrity sha512-Ozz7l4ixzI7Oxj2+cw+p0tVUt27BpaJ+1+q1TCeANWxHpvyn2+Un+YamBdfKu0uh8xLodGhoa1v7595NhKDAuA== @@ -2591,11 +2591,11 @@ chardet@^0.7.0: integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== "chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.0.2.tgz#0d1cd6d04eb2df0327446188cd13736a3367d681" - integrity sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA== + version "3.1.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.1.1.tgz#27e953f3950336efcc455fd03e240c7299062003" + integrity sha512-df4o16uZmMHzVQwECZRHwfguOt5ixpuQVaZHjYMvYisgKhE+JXwcj/Tcr3+3bu/XeOJQ9ycYmzu7Mv8XrGxJDQ== dependencies: - anymatch "^3.0.1" + anymatch "^3.1.0" braces "^3.0.2" glob-parent "^5.0.0" is-binary-path "^2.1.0" @@ -2605,7 +2605,7 @@ chardet@^0.7.0: optionalDependencies: fsevents "^2.0.6" -chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.6, chokidar@^2.1.8: +chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== @@ -2743,9 +2743,9 @@ code-point-at@^1.0.0: integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= codelyzer@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-5.1.0.tgz#a0eb89497622679ea4c53b6974aa45598f06a4b5" - integrity sha512-QiyY2/oDQnYx4mAVEDqr+z9MwrOto18tQFjExiuRChXCy0yvngS5fQpWIxvAGpbOmZFiR1PRTRLbEI71u10maA== + version "5.1.1" + resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-5.1.1.tgz#a599fa8c2a5847f553a792b934e493d1506a4a62" + integrity sha512-t8ZLSZBUjVFOJVk4jASLgmTdKWK/0ZsQCnPXy6PXw1LWOOormQOVnyy4OYoiZ6rAWTrz60Obx+zA2t8xY53QzQ== dependencies: app-root-path "^2.2.1" aria-query "^3.0.0" @@ -2788,9 +2788,9 @@ colors@1.1.2: integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= colors@^1.1.0: - version "1.3.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" - integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: version "1.0.8" @@ -3771,9 +3771,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.247: - version "1.3.259" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.259.tgz#d0b14836df3c89e86fa47be67315daa642fe9d5c" - integrity sha512-NMHS8iQzAYwiFZ1jL/rNOfrZJhvoowKN5uHrbbHOeNgBT5W762wpe/SRLo9kJoTiJ4d2R8i01/NQHwndo9N5PQ== + version "1.3.264" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.264.tgz#ed837f44524d0601a7b2b7b6efd86e35753d0e27" + integrity sha512-z8E7WkrrquCuGYv+kKyybuZIbdms+4PeHp7Zm2uIgEhAigP0bOwqXILItwj0YO73o+QyHY/7XtEfP5DsHOWQgQ== elliptic@^6.0.0: version "6.5.1" @@ -3816,9 +3816,9 @@ encoding@^0.1.11: iconv-lite "~0.4.13" end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== + version "1.4.2" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.2.tgz#080bf028edce8312b665ff18ea03cae0c3ac0ecb" + integrity sha512-gUSUszrsxlDnUbUwEI9Oygyrk4ZEWtVaHQc+uZHphVeNxl+qeqMV/jDWoTkjN1RmGlZ5QWAP7o458p/JMlikQg== dependencies: once "^1.4.0" @@ -4016,10 +4016,10 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= -eventemitter3@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +eventemitter3@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" + integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== events@^3.0.0: version "3.0.0" @@ -4468,11 +4468,11 @@ fs-extra@^8.0.0: universalify "^0.1.0" fs-minipass@^1.2.5: - version "1.2.6" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" - integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ== + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== dependencies: - minipass "^2.2.1" + minipass "^2.6.0" fs-write-stream-atomic@^1.0.8: version "1.0.10" @@ -4649,9 +4649,9 @@ glob-parent@^3.1.0: path-dirname "^1.0.0" glob-parent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" - integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== + version "5.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" + integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== dependencies: is-glob "^4.0.1" @@ -4769,9 +4769,9 @@ handlebars@4.1.2: uglify-js "^3.1.4" handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.1.2: - version "4.2.0" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.0.tgz#57ce8d2175b9bbb3d8b3cf3e4217b1aec8ddcb2e" - integrity sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw== + version "4.2.1" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.1.tgz#dc69c0e61604224f0c23b38b5b6741db210b57da" + integrity sha512-bqPIlDk06UWbVEIFoYj+LVo42WhK96J+b25l7hbFDpxrOXMphFM3fNIm+cluwg4Pk2jiLjWU5nHQY7igGE75NQ== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -5005,11 +5005,11 @@ http-proxy-middleware@^0.19.1: micromatch "^3.1.10" http-proxy@^1.13.0, http-proxy@^1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" - integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g== + version "1.18.0" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a" + integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ== dependencies: - eventemitter3 "^3.0.0" + eventemitter3 "^4.0.0" follow-redirects "^1.0.0" requires-port "^1.0.0" @@ -5261,7 +5261,7 @@ ipaddr.js@^1.9.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-absolute-url@^3.0.0, is-absolute-url@^3.0.2: +is-absolute-url@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.2.tgz#554f2933e7385cc46e94351977ca2081170a206e" integrity sha512-+5g/wLlcm1AcxSP7014m6GvbPHswDx980vD/3bZaap8aGV9Yfs7Q6y6tfaupgZ5O74Byzc8dGrSCJ+bFXx0KdA== @@ -5736,16 +5736,16 @@ jasmine-core@2.8.0, jasmine-core@~2.8.0: resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e" integrity sha1-vMl5rh+f0FcB5F5S5l06XWPxok4= -jasmine-core@^3.3, jasmine-core@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.4.0.tgz#2a74618e966026530c3518f03e9f845d26473ce3" - integrity sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg== - -jasmine-core@~3.5.0: +jasmine-core@^3.3, jasmine-core@~3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.5.0.tgz#132c23e645af96d85c8bca13c8758b18429fc1e4" integrity sha512-nCeAiw37MIMA9w9IXso7bRaLl+c/ef3wnxsoSAlYrzS+Ot0zTG6nU8G/cIfGkqpkjX2wNaIW9RFG0TwIFnG6bA== +jasmine-core@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.4.0.tgz#2a74618e966026530c3518f03e9f845d26473ce3" + integrity sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg== + jasmine-spec-reporter@^4.2.1, jasmine-spec-reporter@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz#1d632aec0341670ad324f92ba84b4b32b35e9e22" @@ -5762,7 +5762,15 @@ jasmine@2.8.0: glob "^7.0.6" jasmine-core "~2.8.0" -jasmine@^3.3.1, jasmine@~3.4.0: +jasmine@^3.3.1: + version "3.5.0" + resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.5.0.tgz#7101eabfd043a1fc82ac24e0ab6ec56081357f9e" + integrity sha512-DYypSryORqzsGoMazemIHUfMkXM7I7easFaxAvNM3Mr6Xz3Fy36TupTrAOxZWN8MVKEU5xECv22J4tUQf3uBzQ== + dependencies: + glob "^7.1.4" + jasmine-core "~3.5.0" + +jasmine@~3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.4.0.tgz#0fa68903ff0c9697459cd044b44f4dcef5ec8bdc" integrity sha512-sR9b4n+fnBFDEd7VS2el2DeHgKcPiMVn44rtKFumq9q7P/t8WrxsVIZPob4UDdgcDNCwyDqwxCt4k9TDRmjPoQ== @@ -6400,7 +6408,7 @@ log4js@^4.0.0: rfdc "^1.1.4" streamroller "^1.0.6" -loglevel@^1.6.3, loglevel@^1.6.4: +loglevel@^1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.4.tgz#f408f4f006db8354d0577dcf6d33485b3cb90d56" integrity sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g== @@ -6774,10 +6782,10 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.2.1, minipass@^2.3.5: - version "2.5.1" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.5.1.tgz#cf435a9bf9408796ca3a3525a8b851464279c9b8" - integrity sha512-dmpSnLJtNQioZFI5HfQ55Ad0DzzsMAb+HfokwRTNXwEQjepbTkl5mtIlSVxGIkOkxlpX7wIn5ET/oAd9fZ/Y/Q== +minipass@^2.2.1, minipass@^2.3.5, minipass@^2.6.0, minipass@^2.6.4: + version "2.8.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.2.tgz#17ce3a7ecac3bdb8cafc9caf311e9176e6c840db" + integrity sha512-b+Eph8Vj+LLlW739/5jV9aTOQ7lnnyeZ8NbZnK+RqqH702jj6//10UnE0ufPUaBKdJpUZi0CnOUyRIQH1YQAwQ== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" @@ -7033,9 +7041,9 @@ node-pre-gyp@^0.12.0: tar "^4" node-releases@^1.1.29: - version "1.1.30" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.30.tgz#35eebf129c63baeb6d8ddeda3c35b05abfd37f7f" - integrity sha512-BHcr1g6NeUH12IL+X3Flvs4IOnl1TL0JczUhEZjDE+FXXPQcVCNr8NEPb01zqGxzhTpdyJL5GXemaCW7aw6Khw== + version "1.1.32" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.32.tgz#485b35c1bf9b4d8baa105d782f8ca731e518276e" + integrity sha512-VhVknkitq8dqtWoluagsGPn3dxTvN9fwgR59fV3D7sLBHe0JfDramsMI8n8mY//ccq/Kkrf8ZRHRpsyVZ3qw1A== dependencies: semver "^5.3.0" @@ -7092,9 +7100,9 @@ normalize-url@1.9.1: sort-keys "^1.0.0" normalize-url@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.3.0.tgz#9c49e10fc1876aeb76dba88bf1b2b5d9fa57b2ee" - integrity sha512-0NLtR71o4k6GLP+mr6Ty34c5GA6CMoEsncKJxvQd8NzPxaHRJNnb5gZE8R1XF4CPIS7QPHLJ74IFszwtNVAHVQ== + version "4.4.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.4.1.tgz#81e9c153b0ad5743755696f2aa20488d48e962b6" + integrity sha512-rjH3yRt0Ssx19mUwS0hrDUOdG9VI+oRLpLHJ7tXRdjcuQ7v7wo6qPvOZppHRrqfslTKr0L2yBhjj4UXd7c3cQg== npm-bundled@^1.0.1: version "1.0.6" @@ -7533,9 +7541,9 @@ parallel-transform@^1.1.0: readable-stream "^2.1.5" parse-asn1@^5.0.0: - version "5.1.4" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" - integrity sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw== + version "5.1.5" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" + integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" @@ -7797,7 +7805,7 @@ popper.js@^1.14.1: resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2" integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA== -portfinder@^1.0.21, portfinder@^1.0.24: +portfinder@^1.0.24: version "1.0.24" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.24.tgz#11efbc6865f12f37624b6531ead1d809ed965cfa" integrity sha512-ekRl7zD2qxYndYflwiryJwMioBI7LI7rVXg3EnLK3sjkouT5eOuhS3gS255XxBksa30VG8UPZYZCdgfGOfkSUg== @@ -8751,9 +8759,9 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: estree-walker "^0.6.1" rollup@^1.12.1: - version "1.21.3" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.21.3.tgz#2d957e04b230b06a85b8c617bf594f92c37c4d5d" - integrity sha512-43CgeUtHhfiqBOUd0uJo5NEOg2FuheF3SqGN8BqgvnqB4xM2TbfPdudeSdllDcMKpagHb//qtpaAADBurT4GzA== + version "1.21.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.21.4.tgz#00a41a30f90095db890301b226cbe2918e4cf54d" + integrity sha512-Pl512XVCmVzgcBz5h/3Li4oTaoDcmpuFZ+kdhS/wLreALz//WuDAMfomD3QEYl84NkDu6Z6wV9twlcREb4qQsw== dependencies: "@types/estree" "0.0.39" "@types/node" "^12.7.5" @@ -8843,6 +8851,7 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" + uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: @@ -8918,7 +8927,7 @@ selenium-webdriver@^4.0.0-alpha.1: tmp "0.0.30" xml2js "^0.4.19" -selfsigned@^1.10.4, selfsigned@^1.10.6: +selfsigned@^1.10.6: version "1.10.6" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.6.tgz#7b3cd37ed9c2034261a173af1a1aae27d8169b67" integrity sha512-i3+CeqxL7DpAazgVpAGdKMwHuL63B5nhJMh9NQ7xmChGkA3jNFflq6Jyo1LLJYcr3idWiNOPWHCrm4zMayLG4w== @@ -9186,18 +9195,6 @@ socket.io@2.1.1: socket.io-client "2.1.1" socket.io-parser "~3.2.0" -sockjs-client@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.3.0.tgz#12fc9d6cb663da5739d3dc5fb6e8687da95cb177" - integrity sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg== - dependencies: - debug "^3.2.5" - eventsource "^1.0.7" - faye-websocket "~0.11.1" - inherits "^2.0.3" - json3 "^3.3.2" - url-parse "^1.4.3" - sockjs-client@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" @@ -9778,13 +9775,13 @@ tapable@^1.0.0, tapable@^1.1.3: integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== tar@^4, tar@^4.4.10, tar@^4.4.4: - version "4.4.10" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" - integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== + version "4.4.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.11.tgz#7ac09801445a3cf74445ed27499136b5240ffb73" + integrity sha512-iI4zh3ktLJKaDNZKZc+fUONiQrSn9HkCFzamtb7k8FFmVilHVob7QsLX/VySAW8lAviMzMbFw4QtFb4errwgYA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.5" + minipass "^2.6.4" minizlib "^1.2.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" @@ -10562,9 +10559,9 @@ webdriver-js-extender@2.1.0: selenium-webdriver "^3.0.1" webdriver-manager@^12.0.6: - version "12.1.6" - resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.6.tgz#9e5410c506d1a7e0a7aa6af91ba3d5bb37f362b6" - integrity sha512-B1mOycNCrbk7xODw7Jgq/mdD3qzPxMaTsnKIQDy2nXlQoyjTrJTTD0vRpEZI9b8RibPEyQvh9zIZ0M1mpOxS3w== + version "12.1.7" + resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.7.tgz#ed4eaee8f906b33c146e869b55e850553a1b1162" + integrity sha512-XINj6b8CYuUYC93SG3xPkxlyUc3IJbD6Vvo75CVGuG9uzsefDzWQrhz0Lq8vbPxtb4d63CZdYophF8k8Or/YiA== dependencies: adm-zip "^0.4.9" chalk "^1.1.1" @@ -10583,7 +10580,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@3.7.1, webpack-dev-middleware@^3.7.0, webpack-dev-middleware@^3.7.1: +webpack-dev-middleware@3.7.1, webpack-dev-middleware@^3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09" integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A== @@ -10594,7 +10591,7 @@ webpack-dev-middleware@3.7.1, webpack-dev-middleware@^3.7.0, webpack-dev-middlew range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.8.1: +webpack-dev-server@3.8.1, webpack-dev-server@^3.1.4: version "3.8.1" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.1.tgz#485b64c4aadc23f601e72114b40c1b1fea31d9f1" integrity sha512-9F5DnfFA9bsrhpUCAfQic/AXBVHvq+3gQS+x6Zj0yc1fVVE0erKh2MV4IV12TBewuTrYeeTIRwCH9qLMvdNvTw== @@ -10633,45 +10630,6 @@ webpack-dev-server@3.8.1: ws "^6.2.1" yargs "12.0.5" -webpack-dev-server@^3.1.4: - version "3.8.0" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.0.tgz#06cc4fc2f440428508d0e9770da1fef10e5ef28d" - integrity sha512-Hs8K9yI6pyMvGkaPTeTonhD6JXVsigXDApYk9JLW4M7viVBspQvb1WdAcWxqtmttxNW4zf2UFLsLNe0y87pIGQ== - dependencies: - ansi-html "0.0.7" - bonjour "^3.5.0" - chokidar "^2.1.6" - compression "^1.7.4" - connect-history-api-fallback "^1.6.0" - debug "^4.1.1" - del "^4.1.1" - express "^4.17.1" - html-entities "^1.2.1" - http-proxy-middleware "^0.19.1" - import-local "^2.0.0" - internal-ip "^4.3.0" - ip "^1.1.5" - is-absolute-url "^3.0.0" - killable "^1.0.1" - loglevel "^1.6.3" - opn "^5.5.0" - p-retry "^3.0.1" - portfinder "^1.0.21" - schema-utils "^1.0.0" - selfsigned "^1.10.4" - semver "^6.3.0" - serve-index "^1.9.1" - sockjs "0.3.19" - sockjs-client "1.3.0" - spdy "^4.0.1" - strip-ansi "^3.0.1" - supports-color "^6.1.0" - url "^0.11.0" - webpack-dev-middleware "^3.7.0" - webpack-log "^2.0.0" - ws "^6.2.1" - yargs "12.0.5" - webpack-log@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" From 8f1bbc111aca58d37e4ea02d3b1c34be3bfe14b4 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 24 Sep 2019 05:22:28 +0000 Subject: [PATCH 0190/1070] build: update @babel/core to version 7.6.2 --- .../angular_devkit/build_angular/package.json | 4 +- yarn.lock | 151 ++++++++++-------- 2 files changed, 90 insertions(+), 65 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ebcf423507d8..11c7d369321a 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -11,8 +11,8 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/build-webpack": "0.0.0", "@angular-devkit/core": "0.0.0", - "@babel/core": "7.6.0", - "@babel/preset-env": "7.6.0", + "@babel/core": "7.6.2", + "@babel/preset-env": "7.6.2", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", "autoprefixer": "9.6.1", diff --git a/yarn.lock b/yarn.lock index 073a3f331106..e1a85833481f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -113,17 +113,17 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.0.tgz#9b00f73554edd67bebc86df8303ef678be3d7b48" - integrity sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw== +"@babel/core@7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.2.tgz#069a776e8d5e9eefff76236bc8845566bd31dd91" + integrity sha512-l8zto/fuoZIbncm+01p8zPSDZu/VuuJhAfA7d/AbzM09WR7iVhavvfNDYCNpo1VvLk6E6xgAoP9P+/EMJHuRkQ== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.0" - "@babel/helpers" "^7.6.0" - "@babel/parser" "^7.6.0" + "@babel/generator" "^7.6.2" + "@babel/helpers" "^7.6.2" + "@babel/parser" "^7.6.2" "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.0" + "@babel/traverse" "^7.6.2" "@babel/types" "^7.6.0" convert-source-map "^1.1.0" debug "^4.1.0" @@ -144,6 +144,16 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.2.tgz#dac8a3c2df118334c2a29ff3446da1636a8f8c03" + integrity sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ== + dependencies: + "@babel/types" "^7.6.0" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -299,13 +309,13 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.2.0" -"@babel/helpers@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.0.tgz#21961d16c6a3c3ab597325c34c465c0887d31c6e" - integrity sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ== +"@babel/helpers@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.2.tgz#681ffe489ea4dcc55f23ce469e58e59c1c045153" + integrity sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA== dependencies: "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.0" + "@babel/traverse" "^7.6.2" "@babel/types" "^7.6.0" "@babel/highlight@^7.0.0": @@ -322,6 +332,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.0.tgz#3e05d0647432a8326cb28d0de03895ae5a57f39b" integrity sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ== +"@babel/parser@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.2.tgz#205e9c95e16ba3b8b96090677a67c9d6075b70a1" + integrity sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -347,10 +362,10 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz#61939744f71ba76a3ae46b5eea18a54c16d22e58" - integrity sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw== +"@babel/plugin-proposal-object-rest-spread@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz#8ffccc8f3a6545e9f78988b6bf4fe881b88e8096" + integrity sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" @@ -363,14 +378,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" -"@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz#501ffd9826c0b91da22690720722ac7cb1ca9c78" - integrity sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA== +"@babel/plugin-proposal-unicode-property-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.6.2.tgz#05413762894f41bfe42b9a5e80919bd575dcc802" + integrity sha512-NxHETdmpeSCtiatMRYWVJo7266rrvAC3DTeG5exQBIH/fMIUK7ejDNznBbn3HQl/o9peymRRg7Yqkx6PdUXmMw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.4.4" - regexpu-core "^4.5.4" + regexpu-core "^4.6.0" "@babel/plugin-syntax-async-generators@^7.2.0": version "7.2.0" @@ -430,10 +445,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.0.tgz#c49e21228c4bbd4068a35667e6d951c75439b1dc" - integrity sha512-tIt4E23+kw6TgL/edACZwP1OUKrjOTyMrFMLoT5IOFrfMRabCgekjqFd5o6PaAMildBu46oFkekIdMuGkkPEpA== +"@babel/plugin-transform-block-scoping@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.2.tgz#96c33ab97a9ae500cc6f5b19e04a7e6553360a79" + integrity sha512-zZT8ivau9LOQQaOGC7bQLQOT4XPkPXgN2ERfUgk1X8ql+mVkLc4E8eKk+FO3o0154kxzqenWCorfmEXpEZcrSQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.13" @@ -466,14 +481,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz#361a148bc951444312c69446d76ed1ea8e4450c3" - integrity sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg== +"@babel/plugin-transform-dotall-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.6.2.tgz#44abb948b88f0199a627024e1508acaf8dc9b2f9" + integrity sha512-KGKT9aqKV+9YMZSkowzYoYEiHqgaDhGmPNZlZxX6UeHC4z30nC1J9IrZuGqbYFB1jaIGdv91ujpze0exiVK8bA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.4.4" - regexpu-core "^4.5.4" + regexpu-core "^4.6.0" "@babel/plugin-transform-duplicate-keys@^7.5.0": version "7.5.0" @@ -555,12 +570,12 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-named-capturing-groups-regex@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.0.tgz#1e6e663097813bb4f53d42df0750cf28ad3bb3f1" - integrity sha512-jem7uytlmrRl3iCAuQyw8BpB4c4LWvSpvIeXKpMb+7j84lkx4m4mYr5ErAcmN5KM7B6BqrAvRGjBIbbzqCczew== +"@babel/plugin-transform-named-capturing-groups-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.2.tgz#c1ca0bb84b94f385ca302c3932e870b0fb0e522b" + integrity sha512-xBdB+XOs+lgbZc2/4F5BVDVcDNS4tcSKQc96KmlqLEAwz6tpYPEvPdmDfvVG0Ssn8lAhronaRs6Z6KSexIpK5g== dependencies: - regexp-tree "^0.1.13" + regexpu-core "^4.6.0" "@babel/plugin-transform-new-target@^7.4.4": version "7.4.4" @@ -614,10 +629,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-spread@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" - integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== +"@babel/plugin-transform-spread@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz#fc77cf798b24b10c46e1b51b1b88c2bf661bb8dd" + integrity sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -644,28 +659,28 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz#ab4634bb4f14d36728bf5978322b35587787970f" - integrity sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA== +"@babel/plugin-transform-unicode-regex@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz#b692aad888a7e8d8b1b214be6b9dc03d5031f698" + integrity sha512-orZI6cWlR3nk2YmYdb0gImrgCUwb5cBUwjf6Ks6dvNVvXERkwtJWOQaEOjPiu0Gu1Tq6Yq/hruCZZOOi9F34Dw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.4.4" - regexpu-core "^4.5.4" + regexpu-core "^4.6.0" -"@babel/preset-env@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.0.tgz#aae4141c506100bb2bfaa4ac2a5c12b395619e50" - integrity sha512-1efzxFv/TcPsNXlRhMzRnkBFMeIqBBgzwmZwlFDw5Ubj0AGLeufxugirwZmkkX/ayi3owsSqoQ4fw8LkfK9SYg== +"@babel/preset-env@7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.2.tgz#abbb3ed785c7fe4220d4c82a53621d71fc0c75d3" + integrity sha512-Ru7+mfzy9M1/YTEtlDS8CD45jd22ngb9tXnn64DvQK3ooyqSw9K4K9DUWmYknTTVk4TqygL9dqCrZgm1HMea/Q== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-async-generator-functions" "^7.2.0" "@babel/plugin-proposal-dynamic-import" "^7.5.0" "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.5.5" + "@babel/plugin-proposal-object-rest-spread" "^7.6.2" "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-proposal-unicode-property-regex" "^7.6.2" "@babel/plugin-syntax-async-generators" "^7.2.0" "@babel/plugin-syntax-dynamic-import" "^7.2.0" "@babel/plugin-syntax-json-strings" "^7.2.0" @@ -674,11 +689,11 @@ "@babel/plugin-transform-arrow-functions" "^7.2.0" "@babel/plugin-transform-async-to-generator" "^7.5.0" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.6.0" + "@babel/plugin-transform-block-scoping" "^7.6.2" "@babel/plugin-transform-classes" "^7.5.5" "@babel/plugin-transform-computed-properties" "^7.2.0" "@babel/plugin-transform-destructuring" "^7.6.0" - "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.6.2" "@babel/plugin-transform-duplicate-keys" "^7.5.0" "@babel/plugin-transform-exponentiation-operator" "^7.2.0" "@babel/plugin-transform-for-of" "^7.4.4" @@ -689,7 +704,7 @@ "@babel/plugin-transform-modules-commonjs" "^7.6.0" "@babel/plugin-transform-modules-systemjs" "^7.5.0" "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.6.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.6.2" "@babel/plugin-transform-new-target" "^7.4.4" "@babel/plugin-transform-object-super" "^7.5.5" "@babel/plugin-transform-parameters" "^7.4.4" @@ -697,11 +712,11 @@ "@babel/plugin-transform-regenerator" "^7.4.5" "@babel/plugin-transform-reserved-words" "^7.2.0" "@babel/plugin-transform-shorthand-properties" "^7.2.0" - "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-spread" "^7.6.2" "@babel/plugin-transform-sticky-regex" "^7.2.0" "@babel/plugin-transform-template-literals" "^7.4.4" "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.4.4" + "@babel/plugin-transform-unicode-regex" "^7.6.2" "@babel/types" "^7.6.0" browserslist "^4.6.0" core-js-compat "^3.1.1" @@ -725,7 +740,7 @@ "@babel/parser" "^7.6.0" "@babel/types" "^7.6.0" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.0": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5": version "7.6.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.0.tgz#389391d510f79be7ce2ddd6717be66d3fed4b516" integrity sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ== @@ -740,6 +755,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.2.tgz#b0e2bfd401d339ce0e6c05690206d1e11502ce2c" + integrity sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.2" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.6.2" + "@babel/types" "^7.6.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0": version "7.6.1" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" @@ -8427,11 +8457,6 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp-tree@^0.1.13: - version "0.1.13" - resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.13.tgz#5b19ab9377edc68bc3679256840bb29afc158d7f" - integrity sha512-hwdV/GQY5F8ReLZWO+W1SRoN5YfpOKY6852+tBFcma72DKBIcHjPRIlIvQN35bCOljuAfP2G2iB0FC/w236mUw== - regexp.prototype.flags@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" @@ -8448,7 +8473,7 @@ regexpu-core@^1.0.0: regjsgen "^0.2.0" regjsparser "^0.1.4" -regexpu-core@^4.5.4: +regexpu-core@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg== From 44f42050b475ce6ed152a6b6f319bda2c837c759 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 24 Sep 2019 05:22:44 +0000 Subject: [PATCH 0191/1070] build: update caniuse-lite to version 1.0.30000997 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 11c7d369321a..3b4193367b4c 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -18,7 +18,7 @@ "autoprefixer": "9.6.1", "browserslist": "4.7.0", "cacache": "12.0.3", - "caniuse-lite": "1.0.30000989", + "caniuse-lite": "1.0.30000997", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", diff --git a/yarn.lock b/yarn.lock index e1a85833481f..8f698bd62895 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2580,7 +2580,12 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000989, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989: +caniuse-lite@1.0.30000997: + version "1.0.30000997" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000997.tgz#ba44a606804f8680894b7042612c2c7f65685b7e" + integrity sha512-BQLFPIdj2ntgBNWp9Q64LGUIEmvhKkzzHhUHR3CD5A9Lb7ZKF20/+sgadhFap69lk5XmK1fTUleDclaRFvgVUA== + +caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989: version "1.0.30000989" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz#b9193e293ccf7e4426c5245134b8f2a56c0ac4b9" integrity sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw== From f1b87da67da4aa6956648acd29d0efb2c6a97b7c Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 24 Sep 2019 07:58:09 +0200 Subject: [PATCH 0192/1070] fix(@schematics/angular): add strict option to ng-new Closes: #15654 --- packages/schematics/angular/ng-new/index.ts | 1 + packages/schematics/angular/ng-new/schema.json | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index e02a4303571d..ee9d2a60b062 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -42,6 +42,7 @@ export default function (options: NgNewOptions): Rule { version: options.version, newProjectRoot: options.newProjectRoot || 'projects', minimal: options.minimal, + strict: options.strict, }; const applicationOptions: ApplicationOptions = { projectRoot: '', diff --git a/packages/schematics/angular/ng-new/schema.json b/packages/schematics/angular/ng-new/schema.json index cd80048417eb..1bfd7c25298d 100644 --- a/packages/schematics/angular/ng-new/schema.json +++ b/packages/schematics/angular/ng-new/schema.json @@ -127,6 +127,11 @@ "type": "boolean", "default": false, "x-user-analytics": 14 + }, + "strict": { + "description": "Creates a workspace with stricter TypeScript compiler options.", + "type": "boolean", + "default": false } }, "required": ["name", "version"] From 016977c9ff16dd0eaa7e26d6318e2a8caf3f80d3 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 24 Sep 2019 15:11:36 +0100 Subject: [PATCH 0193/1070] fix(@angular-devkit/build-optimizer): remove unecessary scrub file checks --- .../src/transforms/scrub-file.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts index 6146dd087405..b164a43ca578 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts @@ -50,21 +50,19 @@ function scrubFileTransformer(checker: ts.TypeChecker, isAngularCoreFile: boolea return ts.forEachChild(node, checkNodeForDecorators); } const exprStmt = node as ts.ExpressionStatement; - if (isDecoratorAssignmentExpression(exprStmt)) { + // Do checks that don't need the typechecker first and bail early. + if (isCtorParamsAssignmentExpression(exprStmt)) { + nodes.push(node); + } else if (isDecoratorAssignmentExpression(exprStmt)) { nodes.push(...pickDecorationNodesToRemove(exprStmt, ngMetadata, checker)); - } - if (isDecorateAssignmentExpression(exprStmt, tslibImports, checker)) { + } else if (isDecorateAssignmentExpression(exprStmt, tslibImports, checker)) { nodes.push(...pickDecorateNodesToRemove(exprStmt, tslibImports, ngMetadata, checker)); - } - if (isAngularDecoratorMetadataExpression(exprStmt, ngMetadata, tslibImports, checker)) { + } else if (isAngularDecoratorMetadataExpression(exprStmt, + ngMetadata, tslibImports, checker)) { nodes.push(node); - } - if (isPropDecoratorAssignmentExpression(exprStmt)) { + } else if (isPropDecoratorAssignmentExpression(exprStmt)) { nodes.push(...pickPropDecorationNodesToRemove(exprStmt, ngMetadata, checker)); } - if (isCtorParamsAssignmentExpression(exprStmt)) { - nodes.push(node); - } } const visitor: ts.Visitor = (node: ts.Node): ts.VisitResult => { From b1f7537342603ab73f57e0df1a93fed3a785ce74 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 24 Sep 2019 15:18:35 +0100 Subject: [PATCH 0194/1070] refactor(@angular-devkit/build-optimizer): refactor assignment expression identification --- .../src/transforms/scrub-file.ts | 49 ++++++------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts index b164a43ca578..3eb8fa0f64ec 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts @@ -150,23 +150,10 @@ function isAngularCoreImport(node: ts.ImportDeclaration, isAngularCoreFile: bool // Check if assignment is `Clazz.decorators = [...];`. function isDecoratorAssignmentExpression(exprStmt: ts.ExpressionStatement): boolean { - if (exprStmt.expression.kind !== ts.SyntaxKind.BinaryExpression) { + if (!isAssignmentExpressionTo(exprStmt, 'decorators')) { return false; } const expr = exprStmt.expression as ts.BinaryExpression; - if (expr.left.kind !== ts.SyntaxKind.PropertyAccessExpression) { - return false; - } - const propAccess = expr.left as ts.PropertyAccessExpression; - if (propAccess.expression.kind !== ts.SyntaxKind.Identifier) { - return false; - } - if (propAccess.name.text !== 'decorators') { - return false; - } - if (expr.operatorToken.kind !== ts.SyntaxKind.FirstAssignment) { - return false; - } if (expr.right.kind !== ts.SyntaxKind.ArrayLiteralExpression) { return false; } @@ -275,32 +262,33 @@ function isAngularDecoratorMetadataExpression( // Check if assignment is `Clazz.propDecorators = [...];`. function isPropDecoratorAssignmentExpression(exprStmt: ts.ExpressionStatement): boolean { - if (exprStmt.expression.kind !== ts.SyntaxKind.BinaryExpression) { + if (!isAssignmentExpressionTo(exprStmt, 'propDecorators')) { return false; } const expr = exprStmt.expression as ts.BinaryExpression; - if (expr.left.kind !== ts.SyntaxKind.PropertyAccessExpression) { - return false; - } - const propAccess = expr.left as ts.PropertyAccessExpression; - if (propAccess.expression.kind !== ts.SyntaxKind.Identifier) { - return false; - } - if (propAccess.name.text !== 'propDecorators') { + if (expr.right.kind !== ts.SyntaxKind.ObjectLiteralExpression) { return false; } - if (expr.operatorToken.kind !== ts.SyntaxKind.FirstAssignment) { + + return true; +} + +// Check if assignment is `Clazz.ctorParameters = [...];`. +function isCtorParamsAssignmentExpression(exprStmt: ts.ExpressionStatement): boolean { + if (!isAssignmentExpressionTo(exprStmt, 'ctorParameters')) { return false; } - if (expr.right.kind !== ts.SyntaxKind.ObjectLiteralExpression) { + const expr = exprStmt.expression as ts.BinaryExpression; + if (expr.right.kind !== ts.SyntaxKind.FunctionExpression + && expr.right.kind !== ts.SyntaxKind.ArrowFunction + ) { return false; } return true; } -// Check if assignment is `Clazz.ctorParameters = [...];`. -function isCtorParamsAssignmentExpression(exprStmt: ts.ExpressionStatement): boolean { +function isAssignmentExpressionTo(exprStmt: ts.ExpressionStatement, name: string) { if (exprStmt.expression.kind !== ts.SyntaxKind.BinaryExpression) { return false; } @@ -309,7 +297,7 @@ function isCtorParamsAssignmentExpression(exprStmt: ts.ExpressionStatement): boo return false; } const propAccess = expr.left as ts.PropertyAccessExpression; - if (propAccess.name.text !== 'ctorParameters') { + if (propAccess.name.text !== name) { return false; } if (propAccess.expression.kind !== ts.SyntaxKind.Identifier) { @@ -318,11 +306,6 @@ function isCtorParamsAssignmentExpression(exprStmt: ts.ExpressionStatement): boo if (expr.operatorToken.kind !== ts.SyntaxKind.FirstAssignment) { return false; } - if (expr.right.kind !== ts.SyntaxKind.FunctionExpression - && expr.right.kind !== ts.SyntaxKind.ArrowFunction - ) { - return false; - } return true; } From 5564ce6ea1a96bda981d88cb86932b4874d30bef Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 24 Sep 2019 15:50:18 +0100 Subject: [PATCH 0195/1070] =?UTF-8?q?feat(@angular-devkit/build-optimizer)?= =?UTF-8?q?:=20scrub=20=C9=B5setClassMetadata=20and=20=C9=B5=C9=B5setNgMod?= =?UTF-8?q?uleScope=20calls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/transforms/scrub-file.ts | 23 ++++++++++- .../src/transforms/scrub-file_spec.ts | 38 +++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts index 3eb8fa0f64ec..748abcd9c0ca 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts @@ -17,6 +17,8 @@ export function testScrubFile(content: string) { '__decorate', 'propDecorators', 'ctorParameters', + 'ɵsetClassMetadata', + 'ɵɵsetNgModuleScope', ]; return markers.some((marker) => content.indexOf(marker) !== -1); @@ -51,7 +53,8 @@ function scrubFileTransformer(checker: ts.TypeChecker, isAngularCoreFile: boolea } const exprStmt = node as ts.ExpressionStatement; // Do checks that don't need the typechecker first and bail early. - if (isCtorParamsAssignmentExpression(exprStmt)) { + if (isIvyPrivateCallExpression(exprStmt) + || isCtorParamsAssignmentExpression(exprStmt)) { nodes.push(node); } else if (isDecoratorAssignmentExpression(exprStmt)) { nodes.push(...pickDecorationNodesToRemove(exprStmt, ngMetadata, checker)); @@ -310,6 +313,24 @@ function isAssignmentExpressionTo(exprStmt: ts.ExpressionStatement, name: string return true; } +function isIvyPrivateCallExpression(exprStmt: ts.ExpressionStatement) { + const callExpr = exprStmt.expression; + if (!ts.isCallExpression(callExpr)) { + return false; + } + const propAccExpr = callExpr.expression; + if (!ts.isPropertyAccessExpression(propAccExpr)) { + return false; + } + + if (propAccExpr.name.text != 'ɵsetClassMetadata' + && propAccExpr.name.text != 'ɵɵsetNgModuleScope') { + return false; + } + + return true; +} + // Remove Angular decorators from`Clazz.decorators = [...];`, or expression itself if all are // removed. function pickDecorationNodesToRemove( diff --git a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts index b2cd87e700eb..84feac63a78a 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts @@ -612,4 +612,42 @@ describe('scrub-file', () => { expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); }); + + describe('Ivy', () => { + it('removes ɵsetClassMetadata call', () => { + const output = tags.stripIndent` + import { Component } from '@angular/core'; + ${clazz} + `; + const input = tags.stripIndent` + ${output} + /*@__PURE__*/ i0.ɵsetClassMetadata(Clazz, [{ + type: Component, + args: [{ + selector: 'app-lazy', + template: 'very lazy', + styles: [] + }] + }], null, null); + `; + + expect(testScrubFile(input)).toBeTruthy(); + expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); + }); + + it('removes ɵɵsetNgModuleScope call', () => { + const output = tags.stripIndent` + import { CommonModule } from '@angular/common'; + import * as i0 from "@angular/core"; + ${clazz} + `; + const input = tags.stripIndent` + ${output} + /*@__PURE__*/ i0.ɵɵsetNgModuleScope(Clazz, { declarations: [], imports: [CommonModule] }); + `; + + expect(testScrubFile(input)).toBeTruthy(); + expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); + }); + }); }); From f897f385d27fd8e5e99e1c89a33823d6feefb970 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 25 Sep 2019 13:09:18 +0100 Subject: [PATCH 0196/1070] ci: use app with lazy chunk for size tracking --- tests/legacy-cli/e2e/tests/basic/build.ts | 8 +--- .../e2e/tests/basic/size-tracking.ts | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 tests/legacy-cli/e2e/tests/basic/size-tracking.ts diff --git a/tests/legacy-cli/e2e/tests/basic/build.ts b/tests/legacy-cli/e2e/tests/basic/build.ts index 4410c0576afd..119e1b2c5c4a 100644 --- a/tests/legacy-cli/e2e/tests/basic/build.ts +++ b/tests/legacy-cli/e2e/tests/basic/build.ts @@ -1,4 +1,4 @@ -import { expectFileToMatch, moveDirectory } from '../../utils/fs'; +import { expectFileToMatch } from '../../utils/fs'; import { ng } from '../../utils/process'; @@ -18,10 +18,4 @@ export default async function() { await expectFileToMatch('dist/test-project/index.html', /main-es2015\.[a-zA-Z0-9]{20}\.js/); await expectFileToMatch('dist/test-project/index.html', /main-es5\.[a-zA-Z0-9]{20}\.js/); await ng('build', '--prod', '--no-progress', 'test-project'); - - // Store the production build for artifact storage on CircleCI - if (process.env['CIRCLECI']) { - await ng('build', '--prod', '--output-hashing=none'); - await moveDirectory('dist', '/tmp/dist'); - } } diff --git a/tests/legacy-cli/e2e/tests/basic/size-tracking.ts b/tests/legacy-cli/e2e/tests/basic/size-tracking.ts new file mode 100644 index 000000000000..24a5ab3984d2 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/basic/size-tracking.ts @@ -0,0 +1,39 @@ +import { appendToFile, moveDirectory, prependToFile, replaceInFile, writeFile } from '../../utils/fs'; +import { ng } from '../../utils/process'; + + +export default async function () { + // Store the production build for artifact storage on CircleCI + if (process.env['CIRCLECI']) { + + // Add initial app routing. + // This is done automatically on a new app with --routing but must be done manually on + // existing apps. + const appRoutingModulePath = 'src/app/app-routing.module.ts'; + await writeFile(appRoutingModulePath, ` + import { NgModule } from '@angular/core'; + import { Routes, RouterModule } from '@angular/router'; + + const routes: Routes = []; + + @NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule] + }) + export class AppRoutingModule { } + `); + await prependToFile('src/app/app.module.ts', + `import { AppRoutingModule } from './app-routing.module';`); + await replaceInFile('src/app/app.module.ts', `imports: [`, `imports: [ AppRoutingModule,`); + await appendToFile('src/app/app.component.html', ''); + + // Add a lazy module. + await ng('generate', 'module', 'lazy', '--route=lazy', '--module=app.module'); + + // Build without hashing and with named chunks to keep have consistent file names. + await ng('build', '--prod', '--output-hashing=none', '--named-chunks=true'); + + // Upload to the store_artifacts dir listed in .circleci/config.yml + await moveDirectory('dist', '/tmp/dist'); + } +} From 36bc3685965b0240fe315ceebb79878b401fcc9a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 25 Sep 2019 05:26:11 +0000 Subject: [PATCH 0197/1070] build: update terser to version 4.3.2 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 3b4193367b4c..ffd95506f9c8 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -53,7 +53,7 @@ "stylus": "0.54.7", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", - "terser": "4.3.1", + "terser": "4.3.2", "terser-webpack-plugin": "2.1.0", "webpack": "4.40.2", "webpack-dev-middleware": "3.7.1", diff --git a/yarn.lock b/yarn.lock index 8f698bd62895..b3e71ddc9139 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8816,7 +8816,7 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@6.5.3, rxjs@^6.0.0, rxjs@^6.4.0, rxjs@~6.5.3: +rxjs@6.5.3, rxjs@^6.0.0, rxjs@^6.4.0: version "6.5.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== @@ -9860,7 +9860,16 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.1, terser@^4.1.2, terser@^4.3.1: +terser@4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.2.tgz#ed830de484b0103652799063e605618e80f97f93" + integrity sha512-obxk4x19Zlzj9zY4QeXj9iPCb5W8YGn4v3pn4/fHj0Nw8+R7N02Kvwvz9VpOItCZZD8RC+vnYCDL0gP6FAJ7Xg== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + +terser@^4.1.2, terser@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65" integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg== From 687ada993d42d2559803148ebd52ec924bc4d055 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 25 Sep 2019 05:26:28 +0000 Subject: [PATCH 0198/1070] build: update webpack to version 4.41.0 --- packages/angular_devkit/build_angular/package.json | 2 +- packages/angular_devkit/build_webpack/package.json | 2 +- packages/ngtools/webpack/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ffd95506f9c8..9e17d79b7a71 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -55,7 +55,7 @@ "tree-kill": "1.2.1", "terser": "4.3.2", "terser-webpack-plugin": "2.1.0", - "webpack": "4.40.2", + "webpack": "4.41.0", "webpack-dev-middleware": "3.7.1", "webpack-dev-server": "3.8.1", "webpack-merge": "4.2.2", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 3b3455909873..8d78bfe3829d 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -17,7 +17,7 @@ "webpack-dev-server": "^3.1.4" }, "devDependencies": { - "webpack": "4.40.2", + "webpack": "4.41.0", "webpack-dev-server": "^3.1.4" } } diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 002c8e62da81..9dacfb01b726 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -36,6 +36,6 @@ "@angular/compiler": "9.0.0-next.4", "@angular/compiler-cli": "9.0.0-next.4", "typescript": "3.5.3", - "webpack": "4.40.2" + "webpack": "4.41.0" } } diff --git a/yarn.lock b/yarn.lock index b3e71ddc9139..e640f2c0c8f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10699,10 +10699,10 @@ webpack-subresource-integrity@1.3.3: dependencies: webpack-sources "^1.3.0" -webpack@4.40.2: - version "4.40.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.40.2.tgz#d21433d250f900bf0facbabe8f50d585b2dc30a7" - integrity sha512-5nIvteTDCUws2DVvP9Qe+JPla7kWPPIDFZv55To7IycHWZ+Z5qBdaBYPyuXWdhggTufZkQwfIK+5rKQTVovm2A== +webpack@4.41.0: + version "4.41.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.0.tgz#db6a254bde671769f7c14e90a1a55e73602fc70b" + integrity sha512-yNV98U4r7wX1VJAj5kyMsu36T8RPPQntcb5fJLOsMz/pt/WrKC0Vp1bAlqPLkA1LegSwQwf6P+kAbyhRKVQ72g== dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" From 640ae2fdf8bed1daff9b0d04c854b33f1df8a385 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 25 Sep 2019 09:24:31 +0200 Subject: [PATCH 0199/1070] feat(@schematics/angular): augment universal/app-shell addition for `@angular/localize` If i18n support is already present within an application, the newly generated `main.server.ts` file should also contain the `@angular/localize` polyfill to allow the universal application to function. This universal schematic here, is the base for app-shell, @nguniversal/express-engine, and @nguniversal/hapi-engine --- .../src/__main@stripTsExtension__.ts.template | 7 +++++- .../schematics/angular/universal/index.ts | 1 + .../angular/universal/index_spec.ts | 22 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template b/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template index 4ea7661b5570..4e9897c5ae49 100644 --- a/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template +++ b/packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template @@ -1,4 +1,9 @@ -import { enableProdMode } from '@angular/core'; +<% if (hasLocalizePackage) { %>/*************************************************************************************************** + * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. +*/ +import '@angular/localize/init'; + +<% } %>import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index b79e55b28583..0cf76e255e19 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -250,6 +250,7 @@ export default function (options: UniversalOptions): Rule { ...strings, ...options as object, stripTsExtension: (s: string) => s.replace(/\.ts$/, ''), + hasLocalizePackage: !!getPackageJsonDependency(host, '@angular/localize'), }), move(join(normalize(clientProject.root), 'src')), ]); diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index d58a8edbcf7e..3c3cb9256f2b 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -7,6 +7,7 @@ */ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; import { Schema as ApplicationOptions, Style } from '../application/schema'; +import { NodeDependencyType, addPackageJsonDependency } from '../utility/dependencies'; import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as UniversalOptions } from './schema'; @@ -227,4 +228,25 @@ describe('Universal Schematic', () => { expect(tree.exists(filePath)).toEqual(true); }); + it(`should not add import to '@angular/localize' in main file when it's not a depedency`, async () => { + const tree = await schematicRunner.runSchematicAsync('universal', defaultOptions, appTree) + .toPromise(); + const filePath = '/projects/bar/src/main.server.ts'; + const contents = tree.readContent(filePath); + expect(contents).not.toContain('@angular/localize'); + }); + + it(`should add import to '@angular/localize' in main file when it's a depedency`, async () => { + addPackageJsonDependency(appTree, { + name: '@angular/localize', + type: NodeDependencyType.Default, + version: 'latest', + }); + + const tree = await schematicRunner.runSchematicAsync('universal', defaultOptions, appTree) + .toPromise(); + const filePath = '/projects/bar/src/main.server.ts'; + const contents = tree.readContent(filePath); + expect(contents).toContain('@angular/localize/init'); + }); }); From 0c2f2f496ba804c1c7d88d3ebe3578ec902c2cb9 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 25 Sep 2019 13:02:04 +0200 Subject: [PATCH 0200/1070] feat(@ngtools/webpack): deprecate `discoverLazyRoutes`, `additionalLazyModules` and `additionalLazyModuleResources` options String form of lazy loading and SystemJsNgModuleLoader are deprecated, and this is part of its usage. See: https://angular.io/api/core/SystemJsNgModuleLoader#systemjsngmoduleloader --- packages/ngtools/webpack/src/interfaces.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/ngtools/webpack/src/interfaces.ts b/packages/ngtools/webpack/src/interfaces.ts index a5bdd3b05a27..41818c67ecf6 100644 --- a/packages/ngtools/webpack/src/interfaces.ts +++ b/packages/ngtools/webpack/src/interfaces.ts @@ -45,14 +45,22 @@ export interface AngularCompilerPluginOptions { logger?: logging.Logger; directTemplateLoading?: boolean; - // When using the loadChildren string syntax, @ngtools/webpack must query @angular/compiler-cli - // via a private API to know which lazy routes exist. This increases build and rebuild time. - // When using Ivy, the string syntax is not supported at all. Thus we shouldn't attempt that. - // This option is also used for when the compilation doesn't need this sort of processing at all. + /** + * When using the loadChildren string syntax, @ngtools/webpack must query @angular/compiler-cli + * via a private API to know which lazy routes exist. This increases build and rebuild time. + * When using Ivy, the string syntax is not supported at all. Thus we shouldn't attempt that + * This option is also used for when the compilation doesn't need this sort of processing at all. + * @deprecated SystemJsNgModuleLoader is deprecated, and this is part of its usage. + */ discoverLazyRoutes?: boolean; - // added to the list of lazy routes + /** added to the list of lazy routes + * @deprecated SystemJsNgModuleLoader is deprecated, and this is part of its usage. + */ additionalLazyModules?: { [module: string]: string }; + /** + * @deprecated SystemJsNgModuleLoader is deprecated, and this is part of its usage. + */ additionalLazyModuleResources?: string[]; // The ContextElementDependency of correct Webpack compilation. From 18fb7faf1043bc80a3dc07b361a6b352703a825d Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 25 Sep 2019 13:02:31 +0200 Subject: [PATCH 0201/1070] feat(@angular-devkit/build-angular): deprecate `lazyModules` option String form of lazy loading and SystemJsNgModuleLoader are deprecated, and this is part of its usage. See: https://angular.io/api/core/SystemJsNgModuleLoader#systemjsngmoduleloader --- .../build_angular/src/angular-cli-files/models/build-options.ts | 1 + packages/angular_devkit/build_angular/src/browser/schema.json | 1 + packages/angular_devkit/build_angular/src/server/schema.json | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts index 5ed595b83f66..0f92cacb4a83 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts @@ -69,6 +69,7 @@ export interface BuildOptions { scripts: ExtraEntryPoint[]; styles: ExtraEntryPoint[]; stylePreprocessorOptions?: { includePaths: string[] }; + /** @deprecated SystemJsNgModuleLoader is deprecated, and this is part of its usage. */ lazyModules: string[]; platform?: 'browser' | 'server'; fileReplacements: NormalizedFileReplacement[]; diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index dbc930292512..5d37643ec1ed 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -312,6 +312,7 @@ "items": { "type": "string" }, + "x-deprecated": "'SystemJsNgModuleLoader' is deprecated, and this is part of its usage. Use 'import()' syntax instead.", "default": [] }, "budgets": { diff --git a/packages/angular_devkit/build_angular/src/server/schema.json b/packages/angular_devkit/build_angular/src/server/schema.json index d85f4985a365..b67f552e99c9 100644 --- a/packages/angular_devkit/build_angular/src/server/schema.json +++ b/packages/angular_devkit/build_angular/src/server/schema.json @@ -217,6 +217,7 @@ "items": { "type": "string" }, + "x-deprecated": "'SystemJsNgModuleLoader' is deprecated, and this is part of its usage. Use 'import()' syntax instead.", "default": [] }, "watch": { From f8f48a4c39e2a93cf4af19f148604ba4a9f04853 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 10 Jul 2019 17:55:00 +0100 Subject: [PATCH 0202/1070] ci: use cache and workspace on windows --- .circleci/config.yml | 107 ++++++++++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 43 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ff3214591f9..7061b67ac666 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,14 +12,18 @@ version: 2.1 # Variables ## IMPORTANT -# If you change the cache key prefix, also sync the restore_cache fallback to match. +# If you change the cache key prefix, also sync the fallback_cache_key fallback to match. # Keep the static part of the cache key as prefix to enable correct fallbacks. +# Windows needs its own cache key because binaries in node_modules are different. # See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI. var_1: &cache_key angular_devkit-0.11.0-{{ checksum "yarn.lock" }} -var_2: &default_nodeversion "12.9" -var_3: &attach_options +var_2: &cache_key_fallback angular_devkit-0.11.0 +var_1_win: &cache_key_win angular_devkit-win-0.11.0-{{ checksum "yarn.lock" }} +var_2_win: &cache_key_fallback_win angular_devkit-win-0.11.0 +var_3: &default_nodeversion "12.9" +var_4: &attach_options at: . -var_4: &ignore_pull_requests +var_5: &ignore_pull_requests filters: branches: ignore: @@ -60,24 +64,13 @@ executors: # https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands commands: setup_windows: - steps: - - checkout + steps: - run: - # Need to install node and yarn before, as the base windows image doesn't have anything. - # TODO: remove when CircleCI provides preconfigured node images/VMs. + # Need to install node and yarn before to ensure correct versions. name: Setup windows node environment - command: ./.circleci/windows-env.ps1 - # TODO: remove commands other than the e2e runner when workspaces on windows are well supported. - - run: - name: Rebase PR on target branch - command: > - if (Test-Path env:CIRCLE_PR_NUMBER) { - git config user.name "angular-ci" - git config user.email "angular-ci" - node tools\rebase-pr.js angular/angular-cli $env:CIRCLE_PR_NUMBER } + command: ./.circleci/windows-env.ps1 - run: node --version - run: yarn --version - - run: yarn install --frozen-lockfile setup_bazel_rbe: parameters: @@ -108,7 +101,7 @@ commands: # Job definitions jobs: - install: + setup: executor: action-executor steps: - checkout @@ -127,8 +120,7 @@ jobs: - restore_cache: keys: - *cache_key - # This fallback should be the cache_key without variables. - - angular_devkit-0.11.0- + - *cache_key_fallback - run: yarn install --frozen-lockfile - persist_to_workspace: root: . @@ -294,45 +286,60 @@ jobs: # Windows jobs # CircleCI support for Windows jobs is still in preview. # Docs: https://github.com/CircleCI-Public/windows-preview-docs + setup-and-build-win: + executor: windows-executor + steps: + - attach_workspace: *attach_options + - setup_windows + - restore_cache: + keys: + - *cache_key_win + - *cache_key_fallback_win + - run: yarn install --frozen-lockfile + - run: yarn build + - save_cache: + key: *cache_key_win + paths: + # Get cache dir on windows via `yarn cache dir` + - C:\Users\circleci\AppData\Local\Yarn\Cache\v4 + # Only jobs downstream from this one will see the updated workspace + # https://circleci.com/blog/deep-diving-into-circleci-workspaces/ + - persist_to_workspace: + root: . + paths: + - ./* + test-win: executor: windows-executor - # Skipping cache and workspace for now because it takes 10x longer than on linux. - # TODO: when/if CircleCI makes them faster, use cache and workspaces fully. - # Notes: - # - windows needs its own cache key because binaries in node_modules are different. - # - windows might need its own workspace for the same reason. - # - get cache dir on windows via `yarn cache dir` (was `C:\Users\circleci\AppData\Local\Yarn\Cache\v4` last time) steps: + - attach_workspace: *attach_options - setup_windows - # Build and test should be on their own jobs, but restoring workspaces is too slow - # so we do it here. - - run: yarn build - run: yarn test --full # Run partial e2e suite on PRs only. Master will run the full e2e suite with sharding. - - run: if (Test-Path env:CIRCLE_PR_NUMBER) { node tests\legacy-cli\run_e2e.js "--glob=tests/basic/**" } + - run: if (Test-Path env:CIRCLE_PR_NUMBER) { node tests\legacy-cli\run_e2e.js "--glob=tests/{basic,ivy}/**" } e2e-cli-win: executor: windows-executor parallelism: 4 steps: - setup_windows - - run: yarn build - run: node tests\legacy-cli\run_e2e.js --nb-shards=$env:CIRCLE_NODE_TOTAL --shard=$env:CIRCLE_NODE_INDEX workflows: version: 2 default_workflow: jobs: - - install + # Linux jobs + - setup - lint: requires: - - install + - setup - validate: requires: - - install + - setup - build: requires: - - install + - setup filters: branches: ignore: @@ -343,9 +350,6 @@ workflows: - test: requires: - build - - test-win: - requires: - - test - test-large: requires: - build @@ -398,16 +402,33 @@ workflows: <<: *ignore_pull_requests requires: - e2e-cli - - e2e-cli-win: - <<: *ignore_pull_requests - requires: - - e2e-cli - test-browsers: requires: - build - flake-jail: requires: + - build + + # Windows jobs + # These jobs only run after their non-windows counterparts finish successfully. + # This isn't strictly necessary as there is no artifact dependency, but helps economize + # CI resources by not attempting to build when we know it should fail. + - setup-and-build-win: + requires: + # The Linux setup job also does checkout and rebase, which we get via the workspace. + - setup - build + - test-win: + requires: + - setup-and-build-win + - test + - e2e-cli-win: + <<: *ignore_pull_requests + requires: + - setup-and-build-win + - e2e-cli + + # Publish jobs - snapshot_publish: <<: *ignore_pull_requests requires: From a64f03baf1f1699d88ded191556449790eb4ccb2 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 18 Sep 2019 16:15:28 +0100 Subject: [PATCH 0203/1070] ci: use var to hold workspace location --- .circleci/config.yml | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7061b67ac666..7cc0729f27d0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,8 +21,11 @@ var_2: &cache_key_fallback angular_devkit-0.11.0 var_1_win: &cache_key_win angular_devkit-win-0.11.0-{{ checksum "yarn.lock" }} var_2_win: &cache_key_fallback_win angular_devkit-win-0.11.0 var_3: &default_nodeversion "12.9" -var_4: &attach_options - at: . +# Workspace initially persisted by the `setup` job, and then enhanced by `setup-and-build-win`. +# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs +# https://circleci.com/blog/deep-diving-into-circleci-workspaces/ +var_4: &workspace_location . +# Filter to ignore pull requests on a given job. var_5: &ignore_pull_requests filters: branches: @@ -63,6 +66,11 @@ executors: # Command Definitions # https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands commands: + custom_attach_workspace: + description: Attach workspace at a predefined location + steps: + - attach_workspace: + at: *workspace_location setup_windows: steps: - run: @@ -123,7 +131,7 @@ jobs: - *cache_key_fallback - run: yarn install --frozen-lockfile - persist_to_workspace: - root: . + root: *workspace_location paths: - ./* - save_cache: @@ -134,7 +142,7 @@ jobs: lint: executor: action-executor steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: yarn lint - run: 'yarn bazel:format -mode=check || (echo "BUILD files not formatted. Please run ''yarn bazel:format''" ; exit 1)' @@ -145,13 +153,13 @@ jobs: validate: executor: action-executor steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: yarn validate --ci test: executor: action-executor steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: yarn test --full test-large: @@ -166,7 +174,7 @@ jobs: resource_class: large parallelism: 4 steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: yarn webdriver-update - run: yarn test-large --full <<# parameters.ve >>--ve<> <<# parameters.glob >>--glob="<< parameters.glob >>"<> --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} @@ -181,7 +189,7 @@ jobs: executor: test-executor parallelism: 4 steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: name: Initialize Environment command: ./.circleci/env.sh @@ -195,7 +203,7 @@ jobs: nodeversion: "10.16" parallelism: 4 steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: name: Initialize Environment command: | @@ -210,7 +218,7 @@ jobs: environment: E2E_BROWSERS: true steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: name: Initialize Environment command: ./.circleci/env.sh @@ -231,7 +239,7 @@ jobs: build: executor: action-executor steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: yarn build # This is where we put all the misbehaving and flaky tests so we can fine-tune their conditions @@ -240,7 +248,7 @@ jobs: executor: test-executor resource_class: medium steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: yarn webdriver-update - run: yarn test-large --full --flakey - run: yarn test-large --full --flakey --ve=true @@ -249,7 +257,7 @@ jobs: executor: action-executor resource_class: xlarge steps: - - attach_workspace: *attach_options + - custom_attach_workspace - setup_bazel_rbe - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc - run: yarn bazel:test @@ -257,7 +265,7 @@ jobs: snapshot_publish: executor: action-executor steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: name: Decrypt Credentials # Note: when changing the image, you might have to re-encrypt the credentials with a @@ -273,7 +281,7 @@ jobs: publish: executor: action-executor steps: - - attach_workspace: *attach_options + - custom_attach_workspace - run: name: Decrypt Credentials command: | @@ -289,7 +297,7 @@ jobs: setup-and-build-win: executor: windows-executor steps: - - attach_workspace: *attach_options + - custom_attach_workspace - setup_windows - restore_cache: keys: @@ -305,14 +313,14 @@ jobs: # Only jobs downstream from this one will see the updated workspace # https://circleci.com/blog/deep-diving-into-circleci-workspaces/ - persist_to_workspace: - root: . + root: *workspace_location paths: - ./* test-win: executor: windows-executor steps: - - attach_workspace: *attach_options + - custom_attach_workspace - setup_windows - run: yarn test --full # Run partial e2e suite on PRs only. Master will run the full e2e suite with sharding. From e523a4865ba1b97fc30a82fb43876aab824df254 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 25 Sep 2019 17:40:53 +0200 Subject: [PATCH 0204/1070] feat(@schematics/angular): support adding app-shell without specifying `clientProject` When unset we set the clientProject to the resolved packageName from the current working directory --- packages/schematics/angular/app-shell/schema.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index 78cfb3e741f2..a6859507fa60 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -8,7 +8,10 @@ "properties": { "clientProject": { "type": "string", - "description": "The name of the related client app." + "description": "The name of the related client app.", + "$default": { + "$source": "projectName" + } }, "universalProject": { "type": "string", From 6cb9f4df92d14f4c3a1e048c7621404023a0c70e Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 12 Sep 2019 22:11:30 -0400 Subject: [PATCH 0205/1070] test: update to Angular 9.0.0-next.7 This requires localize polyfills for i18n support. --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 27 +++--- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- .../hello-world-app/src/main.server.ts | 1 + .../hello-world-app/src/polyfills.ts | 3 + .../e2e/assets/webpack/test-app/package.json | 16 +-- yarn.lock | 97 ++++++++++--------- 8 files changed, 83 insertions(+), 73 deletions(-) diff --git a/package.json b/package.json index 7f22547d577a..f138f0db6d49 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.4", - "@angular/compiler-cli": "9.0.0-next.4", + "@angular/compiler": "9.0.0-next.7", + "@angular/compiler-cli": "9.0.0-next.7", "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.37.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 9e17d79b7a71..9dbf02dcc541 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -65,19 +65,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.4", - "@angular/cdk": "~8.2.0", - "@angular/common": "9.0.0-next.4", - "@angular/compiler": "9.0.0-next.4", - "@angular/compiler-cli": "9.0.0-next.4", - "@angular/core": "9.0.0-next.4", - "@angular/forms": "9.0.0-next.4", - "@angular/material": "~8.2.0", - "@angular/platform-browser": "9.0.0-next.4", - "@angular/platform-browser-dynamic": "9.0.0-next.4", - "@angular/platform-server": "9.0.0-next.4", - "@angular/router": "9.0.0-next.4", - "@angular/service-worker": "9.0.0-next.4", + "@angular/animations": "9.0.0-next.7", + "@angular/cdk": "8.2.0", + "@angular/common": "9.0.0-next.7", + "@angular/compiler": "9.0.0-next.7", + "@angular/compiler-cli": "9.0.0-next.7", + "@angular/core": "9.0.0-next.7", + "@angular/forms": "9.0.0-next.7", + "@angular/localize": "9.0.0-next.7", + "@angular/material": "8.2.0", + "@angular/platform-browser": "9.0.0-next.7", + "@angular/platform-browser-dynamic": "9.0.0-next.7", + "@angular/platform-server": "9.0.0-next.7", + "@angular/router": "9.0.0-next.7", + "@angular/service-worker": "9.0.0-next.7", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 4d6244bba1a9..195195af903b 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.4", - "@angular/compiler-cli": "9.0.0-next.4", + "@angular/compiler": "9.0.0-next.7", + "@angular/compiler-cli": "9.0.0-next.7", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.5.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 9dacfb01b726..df8413e84bb4 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.4", - "@angular/compiler-cli": "9.0.0-next.4", + "@angular/compiler": "9.0.0-next.7", + "@angular/compiler-cli": "9.0.0-next.7", "typescript": "3.5.3", "webpack": "4.41.0" } diff --git a/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts b/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts index 78e25575b131..340dffcdf657 100644 --- a/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts +++ b/tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import '@angular/localize/init'; import { enableProdMode } from '@angular/core'; import { environment } from './environments/environment'; diff --git a/tests/angular_devkit/build_angular/hello-world-app/src/polyfills.ts b/tests/angular_devkit/build_angular/hello-world-app/src/polyfills.ts index b631294a5491..397e95e012de 100644 --- a/tests/angular_devkit/build_angular/hello-world-app/src/polyfills.ts +++ b/tests/angular_devkit/build_angular/hello-world-app/src/polyfills.ts @@ -35,6 +35,9 @@ */ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. + +import '@angular/localize/init'; + /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json index 8f7615d11cb4..b444992d3479 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "9.0.0-next.4", - "@angular/compiler": "9.0.0-next.4", - "@angular/compiler-cli": "9.0.0-next.4", - "@angular/core": "9.0.0-next.4", - "@angular/platform-browser": "9.0.0-next.4", - "@angular/platform-browser-dynamic": "9.0.0-next.4", - "@angular/platform-server": "9.0.0-next.4", - "@angular/router": "9.0.0-next.4", + "@angular/common": "9.0.0-next.7", + "@angular/compiler": "9.0.0-next.7", + "@angular/compiler-cli": "9.0.0-next.7", + "@angular/core": "9.0.0-next.7", + "@angular/platform-browser": "9.0.0-next.7", + "@angular/platform-browser-dynamic": "9.0.0-next.7", + "@angular/platform-server": "9.0.0-next.7", + "@angular/router": "9.0.0-next.7", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.0", diff --git a/yarn.lock b/yarn.lock index e640f2c0c8f8..2bf08a8c1ddc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,14 +2,14 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.4.tgz#ffca16eb7c431975bc46fd0926f8ff6f4908cac3" - integrity sha512-CvClnTIXKuhrpLjvpjFTsZGLeM1xiXHGSn7YDUedDVycpKl8/ZjNq082xoNKM4JrUe4jQwFpWMJ08fsCLVEYaw== +"@angular/animations@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.7.tgz#62809382b39ba7cc6c9b96af500f49149669c820" + integrity sha512-6cz5KqiGPgiN82xtvXxrEIM2vhKlJdXmSSb1qBfsLIIbAXxvgBW3kCzJkZsKFCREL8QHqVKuAQFdQ2c3HBlA9A== dependencies: tslib "^1.9.0" -"@angular/cdk@~8.2.0": +"@angular/cdk@8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.2.0.tgz#fe183aaf9907421086e413a80af6ec0995983a9d" integrity sha512-vsjKiUirICP9fTxnBT3jjqW14ipZLJPkyT3dKZQETKcml1fTY1L9QVXclvLTeUliuPSl490anuBvpQpfMeJDhQ== @@ -18,17 +18,17 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.4.tgz#e97fcaf077674324b6566571fdb89d24e05de7bc" - integrity sha512-L1Q9x1PzPqQOg0Qoz9seAXSpnZU93G3M7HRuUJPlCsCpRrwqa6L6RwJ6k06x3lZwZuYTvBfTpwbe4pLzLZU83g== +"@angular/common@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.7.tgz#5ae5a848e6d359a13347bc932aabdeb205dcdcd5" + integrity sha512-1WzfbX1eF5xJM9mKlj7LMYY8MVOTF0rxL52P6OUBXYBq9e4Wg1d0QoTmpTVrO4bVxkGbuRpgGQqYN5g+QL3M8g== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.4.tgz#4d7795c67680ba8fda66217f5bf762e4362fe2dd" - integrity sha512-j+r1PSijg2bnypj79ZytBbo7AB/WNQPEkP3cbnuRbRZ/Ear1EUimBILTp1dERjGZssZC8sKsU7wGSdrAS7kA6A== +"@angular/compiler-cli@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.7.tgz#add5b605dd5458ad2a560b8dcbea0e0e05c722fc" + integrity sha512-3paTm6AhiuN4uQTe0zyKI9xek7QK8cWaxR08u5YWx7Zyb4nwvYIOUZ6bVNKynoHVeRyS5PoTIvoG5wOHzuuYyQ== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -41,68 +41,73 @@ tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.4.tgz#582005a2f71b3731aa71a0ca575080c948fbe094" - integrity sha512-5sBi9nw084jN5ioLh4fal1/0R6Ow/AqI0S9L/1epe9Fg6J1KBszhBnYxzTgHiufsVGtRaGMJ74IEMODvdhz8aw== +"@angular/compiler@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.7.tgz#06298ba65442dee294d6a887f2ec5e47768ca5f3" + integrity sha512-FfUCtkEABG+Wqa/HVIIN3t/1GRsgFNDS1p/3DgdNwUm79gE/Q6uYdyUP7vi+TaX3iXKilTyTxFd0z21dC4iAqQ== dependencies: tslib "^1.9.0" -"@angular/core@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.4.tgz#823efd8993cda93a92f5072a4c4da330c9df8a4b" - integrity sha512-xstWREvfGUJ/o3wdLG115KkiLeiUCWY5lMLOKfukMwDALGl76jej2CQyDdjDZF6MhWvNYNLeIrWva5br99KJSw== +"@angular/core@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.7.tgz#a501fb483433042346fbeb435fbde0f5f8e58320" + integrity sha512-Lz487EWTLwWWbkSA/stiYDXd7f0myGYjJU3AqkorriFmY0QJ6nZZupODNjcf4gpLX09IOTvneK9sEK5OGi4sOQ== dependencies: tslib "^1.9.0" -"@angular/forms@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.4.tgz#93ac4bdb3c0f565d0436361b70c672d8d51512ef" - integrity sha512-nlmXJ9VKQhDVEg680NFxgFwFGB4fe9zlBBcc7Tg439X0u6ofw1CerGBaze5fJaYa34HpCnvoHbe3v8+31gXfjw== +"@angular/forms@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.7.tgz#a68b44979ad2002ab0e240a7dda00192b113997b" + integrity sha512-UWcx7U22aa/K73rOrUtYxe66/CUxULopdzmOdl3tuitZDHs55L1MXTYlw0xrSFUtB7dUfbLXO/k3rdmIvHSkQQ== dependencies: tslib "^1.9.0" -"@angular/material@~8.2.0": +"@angular/localize@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.7.tgz#b654403a09e94695ff69850ecc831628de754d73" + integrity sha512-N79ZLFQEJV7oBrcqfCTzoC4Ot7pbOYpwQ02zi0xSud124DN4Tf1R8EM+H6nqbV4F/mOUL/fXHIP3Iu1u6QCDTQ== + +"@angular/material@8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.2.0.tgz#a99bbe5347ef0197bc4ad29228798608a62308aa" integrity sha512-4EY3QilEXS09+10WYwkunEltReuPDByb2ulWw2FLG3wpmMpCp4p6AKY9v9xS3sGvb708S0b9vlfLG4FbepmBbA== dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.4.tgz#c1b3aa5b2b3f83892dd13145a0e1f60f919c1511" - integrity sha512-YeybAWOkdEdbmgzulZzXO8HddAEhciESuOWNa9Mx3V9ZB+ofaEHf+Syo7ADhSo2+hdbjVjIp9E11A1C7kOtYug== +"@angular/platform-browser-dynamic@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.7.tgz#e8e9fae2dc772094ec644ffb06437808f79c45f6" + integrity sha512-R1XLmzw4ZIDcYvKg1x9cQG0PSDHsjAjt/ZoVhLTB/AC/V1E95AAkCnmcvTCH4UGDQREG7wc3OBN7KRLJDabbuA== dependencies: tslib "^1.9.0" -"@angular/platform-browser@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.4.tgz#5620bbf003b9317594be6db4e49997f9e4575bcf" - integrity sha512-ikD0wL/2jprYai4xb5V4XMO9UjYwiavBHHxJOY6GeWTeMUh++9kuSq5QvzkOBmtlHUnDMvjic0h/pEran/68Ew== +"@angular/platform-browser@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.7.tgz#b25e031e2af0a72919743000dc62597f260563c0" + integrity sha512-c90plfSkD5glZET7E5qxHo1F/lRINwM1JaEWHOBEj8jqgVPLrMuRKq3t5ZDEWiGCG2qg4LVtGjJNEXnacOZXxQ== dependencies: tslib "^1.9.0" -"@angular/platform-server@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.4.tgz#b8715743531ac3c85dfa82cefca7519d3cfbf49c" - integrity sha512-do8QRGDLj02Jt2b2wablTaklCLD6yixxCZBm9qu2QY2eHUfX7HPBSzl0AyfoiR6Y7Vx7WPCkF9iwtU2tzggrtg== +"@angular/platform-server@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.7.tgz#8f7d7afeb08354d8ede44de3e11b195e73ed104d" + integrity sha512-mbMI84S6iN3aVAj/QO1RYTompnB5ZpsKDykxkZuaTsvb6jTXreeZiPYEK+jU1xO61k4nZGkuDV4vUsEuMIF/Lw== dependencies: domino "^2.1.2" tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.4.tgz#9a8bfd2c7c2de6943e819e2aad5aa40255a81a9d" - integrity sha512-VNdIPQUXZAOvxa0K14JEYImeAobTwjrrjTovU7016nzv5sUZ8BrTYpY56w80n570PqnvEon+eKGAP0oZk+nwqA== +"@angular/router@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.7.tgz#64347051e135844dccaadc7351a294163a699ac0" + integrity sha512-kCkBJZ7s1p/mpp6wffx0X7+LO5v/PzAcBnEDnzmunF+74L6GIv2uB7dLnRSSkdC7Q5A6/CrGPvfSIThIs0UKlQ== dependencies: tslib "^1.9.0" -"@angular/service-worker@9.0.0-next.4": - version "9.0.0-next.4" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.4.tgz#de8a7e8fb40ffdd0a42511f53a780485c9f06f93" - integrity sha512-MoFNKj/UaamK//Z60gmCcxJ/fEjHSZlABDXrPQe6NJ/gB4lVKApVroWFYeFRXGfTNcHtPIe4QEwMe76kFpzcCw== +"@angular/service-worker@9.0.0-next.7": + version "9.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.7.tgz#5310c56e047e7222f16c9ad8c3040ee4e78b0d0f" + integrity sha512-H+tH/Vu+OJ5tQUrYC7sk8i6WNbVfyuUlU/YqQQeSzHx9ZL0K0R3UIgmT/UV5B8txB0qskK8WXKbhgZIl8h25Xg== dependencies: tslib "^1.9.0" From b4d5921dc993d3530945ef1d12a574fdb98d674c Mon Sep 17 00:00:00 2001 From: vikerman Date: Wed, 25 Sep 2019 12:23:20 -0700 Subject: [PATCH 0206/1070] release: v9.0.0-next.6 --- packages/schematics/angular/utility/latest-versions.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index dbe33af42323..3de2407d8f24 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,17 +8,17 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.7', + Angular: '~9.0.0-next.8', RxJs: '~6.5.3', ZoneJs: '~0.10.2', TypeScript: '~3.5.3', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.5', - DevkitBuildNgPackagr: '~0.900.0-next.5', - DevkitBuildWebpack: '~0.900.0-next.5', - AngularPWA: '~0.900.0-next.5', + DevkitBuildAngular: '~0.900.0-next.6', + DevkitBuildNgPackagr: '~0.900.0-next.6', + DevkitBuildWebpack: '~0.900.0-next.6', + AngularPWA: '~0.900.0-next.6', ngPackagr: '^5.5.1', }; From fd6b752d3661f866582cf5cc4e1e52308555cba7 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 26 Sep 2019 14:41:04 +0200 Subject: [PATCH 0207/1070] ci: update angular robot configuration to match current CI tasks --- .github/angular-robot.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/angular-robot.yml b/.github/angular-robot.yml index c00e502cba2b..8d06fa54ce8a 100644 --- a/.github/angular-robot.yml +++ b/.github/angular-robot.yml @@ -43,12 +43,19 @@ merge: requiredStatuses: - "ci/circleci: build" - "ci/circleci: build-bazel" - - "ci/circleci: install" + - "ci/circleci: setup" + - "ci/circleci: setup-and-build-win" - "ci/circleci: lint" - "ci/circleci: validate" - "ci/circleci: test" - "ci/circleci: test-win" - "ci/circleci: test-large" + - "ci/circleci: test-large-ve" + - "ci/circleci: e2e-cli" + - "ci/circleci: e2e-cli-ve" + - "ci/circleci: test-browsers" + - "ci/angular: size" + - "cla/google" # the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable # {{MERGE_LABEL}} will be replaced by the value of the mergeLabel option From 9de282ca3209c3c8895dcfc1da36c30e4a05fc67 Mon Sep 17 00:00:00 2001 From: FG-33 Date: Tue, 6 Aug 2019 22:13:51 +0200 Subject: [PATCH 0208/1070] feat(@schematics/angular): add generator for interceptor Rework. --- .../schematics/angular/application/index.ts | 2 +- packages/schematics/angular/collection.json | 5 ++ ...e@dasherize__.interceptor.spec.ts.template | 16 +++++ ...__name@dasherize__.interceptor.ts.template | 18 +++++ .../schematics/angular/interceptor/index.ts | 51 +++++++++++++ .../angular/interceptor/index_spec.ts | 71 +++++++++++++++++++ .../angular/interceptor/schema.json | 49 +++++++++++++ .../generate/interceptor/interceptor-basic.ts | 17 +++++ 8 files changed, 228 insertions(+), 1 deletion(-) mode change 100644 => 100755 packages/schematics/angular/collection.json create mode 100755 packages/schematics/angular/interceptor/files/__name@dasherize@if-flat__/__name@dasherize__.interceptor.spec.ts.template create mode 100755 packages/schematics/angular/interceptor/files/__name@dasherize@if-flat__/__name@dasherize__.interceptor.ts.template create mode 100755 packages/schematics/angular/interceptor/index.ts create mode 100755 packages/schematics/angular/interceptor/index_spec.ts create mode 100755 packages/schematics/angular/interceptor/schema.json create mode 100755 tests/legacy-cli/e2e/tests/generate/interceptor/interceptor-basic.ts diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 2b891e7ce6a8..c670ddc64f66 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -169,7 +169,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul } if (options.skipTests || options.minimal) { - ['class', 'component', 'directive', 'guard', 'module', 'pipe', 'service'].forEach((type) => { + ['class', 'component', 'directive', 'guard', 'interceptor', 'module', 'pipe', 'service'].forEach((type) => { if (!(`@schematics/angular:${type}` in schematics)) { schematics[`@schematics/angular:${type}`] = {}; } diff --git a/packages/schematics/angular/collection.json b/packages/schematics/angular/collection.json old mode 100644 new mode 100755 index 76778ddc947c..317e0ec6fe60 --- a/packages/schematics/angular/collection.json +++ b/packages/schematics/angular/collection.json @@ -60,6 +60,11 @@ "description": "Create a guard.", "schema": "./guard/schema.json" }, + "interceptor": { + "factory": "./interceptor", + "description": "Create an interceptor.", + "schema": "./interceptor/schema.json" + }, "interface": { "aliases": [ "i" ], "factory": "./interface", diff --git a/packages/schematics/angular/interceptor/files/__name@dasherize@if-flat__/__name@dasherize__.interceptor.spec.ts.template b/packages/schematics/angular/interceptor/files/__name@dasherize@if-flat__/__name@dasherize__.interceptor.spec.ts.template new file mode 100755 index 000000000000..d136abd5f7dc --- /dev/null +++ b/packages/schematics/angular/interceptor/files/__name@dasherize@if-flat__/__name@dasherize__.interceptor.spec.ts.template @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { <%= classify(name) %>Interceptor } from './<%= dasherize(name) %>.interceptor'; + +describe('<%= classify(name) %>Interceptor', () => { + beforeEach(() => TestBed.configureTestingModule({ + providers: [ + <%= classify(name) %>Interceptor + ] + })); + + it('should be created', () => { + const interceptor: <%= classify(name) %>Interceptor = TestBed.inject(<%= classify(name) %>Interceptor); + expect(interceptor).toBeTruthy(); + }); +}); diff --git a/packages/schematics/angular/interceptor/files/__name@dasherize@if-flat__/__name@dasherize__.interceptor.ts.template b/packages/schematics/angular/interceptor/files/__name@dasherize@if-flat__/__name@dasherize__.interceptor.ts.template new file mode 100755 index 000000000000..fffab4ddf988 --- /dev/null +++ b/packages/schematics/angular/interceptor/files/__name@dasherize@if-flat__/__name@dasherize__.interceptor.ts.template @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import { + HttpRequest, + HttpHandler, + HttpEvent, + HttpInterceptor +} from '@angular/common/http'; +import { Observable } from 'rxjs'; + +@Injectable() +export class <%= classify(name) %>Interceptor implements HttpInterceptor { + + constructor() {} + + intercept(request: HttpRequest, next: HttpHandler): Observable> { + return next.handle(request); + } +} diff --git a/packages/schematics/angular/interceptor/index.ts b/packages/schematics/angular/interceptor/index.ts new file mode 100755 index 000000000000..3aa33e65f589 --- /dev/null +++ b/packages/schematics/angular/interceptor/index.ts @@ -0,0 +1,51 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { strings } from '@angular-devkit/core'; +import { + Rule, + Tree, + apply, + applyTemplates, + chain, + filter, + mergeWith, + move, + noop, + url, +} from '@angular-devkit/schematics'; +import { applyLintFix } from '../utility/lint-fix'; +import { parseName } from '../utility/parse-name'; +import { createDefaultPath } from '../utility/workspace'; +import { Schema as InterceptorOptions } from './schema'; + +export default function (options: InterceptorOptions): Rule { + return async (host: Tree) => { + if (options.path === undefined) { + options.path = await createDefaultPath(host, options.project as string); + } + + const parsedPath = parseName(options.path, options.name); + options.name = parsedPath.name; + options.path = parsedPath.path; + + const templateSource = apply(url('./files'), [ + options.skipTests ? filter(path => !path.endsWith('.spec.ts.template')) : noop(), + applyTemplates({ + ...strings, + 'if-flat': (s: string) => options.flat ? '' : s, + ...options, + }), + move(parsedPath.path), + ]); + + return chain([ + mergeWith(templateSource), + options.lintFix ? applyLintFix(options.path) : noop(), + ]); + }; +} diff --git a/packages/schematics/angular/interceptor/index_spec.ts b/packages/schematics/angular/interceptor/index_spec.ts new file mode 100755 index 000000000000..e382b926032f --- /dev/null +++ b/packages/schematics/angular/interceptor/index_spec.ts @@ -0,0 +1,71 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing'; +import { Schema as ApplicationOptions } from '../application/schema'; +import { Schema as WorkspaceOptions } from '../workspace/schema'; +import { Schema as ServiceOptions } from './schema'; + +describe('Interceptor Schematic', () => { + const schematicRunner = new SchematicTestRunner( + '@schematics/angular', + require.resolve('../collection.json'), + ); + const defaultOptions: ServiceOptions = { + name: 'foo', + flat: false, + project: 'bar', + }; + + const workspaceOptions: WorkspaceOptions = { + name: 'workspace', + newProjectRoot: 'projects', + version: '6.0.0', + }; + + const appOptions: ApplicationOptions = { + name: 'bar', + inlineStyle: false, + inlineTemplate: false, + routing: false, + skipPackageJson: false, + }; + let appTree: UnitTestTree; + beforeEach(async () => { + appTree = schematicRunner.runSchematic('workspace', workspaceOptions); + appTree = await schematicRunner.runSchematicAsync('application', appOptions, appTree).toPromise(); + }); + + it('should create an interceptor', async () => { + const options = { ...defaultOptions }; + + const tree = await schematicRunner.runSchematicAsync('interceptor', options, appTree) + .toPromise(); + const files = tree.files; + expect(files).toContain('/projects/bar/src/app/foo/foo.interceptor.spec.ts'); + expect(files).toContain('/projects/bar/src/app/foo/foo.interceptor.ts'); + }); + + it('should respect the skipTests flag', async () => { + const options = { ...defaultOptions, skipTests: true }; + + const tree = await schematicRunner.runSchematicAsync('interceptor', options, appTree) + .toPromise(); + const files = tree.files; + expect(files).toContain('/projects/bar/src/app/foo/foo.interceptor.ts'); + expect(files).not.toContain('/projects/bar/src/app/foo/foo.interceptor.spec.ts'); + }); + + it('should respect the sourceRoot value', async () => { + const config = JSON.parse(appTree.readContent('/angular.json')); + config.projects.bar.sourceRoot = 'projects/bar/custom'; + appTree.overwrite('/angular.json', JSON.stringify(config, null, 2)); + appTree = await schematicRunner.runSchematicAsync('interceptor', defaultOptions, appTree) + .toPromise(); + expect(appTree.files).toContain('/projects/bar/custom/app/foo/foo.interceptor.ts'); + }); +}); diff --git a/packages/schematics/angular/interceptor/schema.json b/packages/schematics/angular/interceptor/schema.json new file mode 100755 index 000000000000..cecce7e8c1d6 --- /dev/null +++ b/packages/schematics/angular/interceptor/schema.json @@ -0,0 +1,49 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "SchematicsAngularInterceptor", + "title": "Angular Interceptor Options Schema", + "type": "object", + "description": "Creates a new, generic interceptor definition in the given or default project.", + "properties": { + "name": { + "type": "string", + "description": "The name of the interceptor.", + "$default": { + "$source": "argv", + "index": 0 + }, + "x-prompt": "What name would you like to use for the interceptor?" + }, + "path": { + "type": "string", + "format": "path", + "description": "The path at which to create the interceptor, relative to the workspace root.", + "visible": false + }, + "project": { + "type": "string", + "description": "The name of the project.", + "$default": { + "$source": "projectName" + } + }, + "flat": { + "type": "boolean", + "default": true, + "description": "When true (the default), creates files at the top level of the project." + }, + "skipTests": { + "type": "boolean", + "description": "When true, does not create \"spec.ts\" test files for the new interceptor.", + "default": false, + "x-user-analytics": 12 + }, + "lintFix": { + "type": "boolean", + "default": false, + "description": "When true, applies lint fixes after generating the interceptor.", + "x-user-analytics": 15 + } + }, + "required": ["name"] +} diff --git a/tests/legacy-cli/e2e/tests/generate/interceptor/interceptor-basic.ts b/tests/legacy-cli/e2e/tests/generate/interceptor/interceptor-basic.ts new file mode 100755 index 000000000000..19e27eeed5dc --- /dev/null +++ b/tests/legacy-cli/e2e/tests/generate/interceptor/interceptor-basic.ts @@ -0,0 +1,17 @@ +import {join} from 'path'; +import {ng} from '../../../utils/process'; +import {expectFileToExist} from '../../../utils/fs'; + + +export default function() { + // Does not create a sub directory. + const interceptorDir = join('src', 'app'); + + return ng('generate', 'interceptor', 'test-interceptor') + .then(() => expectFileToExist(interceptorDir)) + .then(() => expectFileToExist(join(interceptorDir, 'test-interceptor.interceptor.ts'))) + .then(() => expectFileToExist(join(interceptorDir, 'test-interceptor.interceptor.spec.ts'))) + + // Try to run the unit tests. + .then(() => ng('test', '--watch=false')); +} From 87153f159dc7b4ad3d543e637031e2e558307cb2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 26 Sep 2019 15:23:29 +0000 Subject: [PATCH 0209/1070] build: update @angular/animations to version 9.0.0-next.8 --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 28 ++--- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 ++-- yarn.lock | 112 +++++++++--------- 6 files changed, 86 insertions(+), 86 deletions(-) diff --git a/package.json b/package.json index f138f0db6d49..f5618f9bc652 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.7", - "@angular/compiler-cli": "9.0.0-next.7", + "@angular/compiler": "9.0.0-next.8", + "@angular/compiler-cli": "9.0.0-next.8", "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.37.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 9dbf02dcc541..20c353259841 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -65,20 +65,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.7", - "@angular/cdk": "8.2.0", - "@angular/common": "9.0.0-next.7", - "@angular/compiler": "9.0.0-next.7", - "@angular/compiler-cli": "9.0.0-next.7", - "@angular/core": "9.0.0-next.7", - "@angular/forms": "9.0.0-next.7", - "@angular/localize": "9.0.0-next.7", - "@angular/material": "8.2.0", - "@angular/platform-browser": "9.0.0-next.7", - "@angular/platform-browser-dynamic": "9.0.0-next.7", - "@angular/platform-server": "9.0.0-next.7", - "@angular/router": "9.0.0-next.7", - "@angular/service-worker": "9.0.0-next.7", + "@angular/animations": "9.0.0-next.8", + "@angular/cdk": "8.2.1", + "@angular/common": "9.0.0-next.8", + "@angular/compiler": "9.0.0-next.8", + "@angular/compiler-cli": "9.0.0-next.8", + "@angular/core": "9.0.0-next.8", + "@angular/forms": "9.0.0-next.8", + "@angular/localize": "9.0.0-next.8", + "@angular/material": "8.2.1", + "@angular/platform-browser": "9.0.0-next.8", + "@angular/platform-browser-dynamic": "9.0.0-next.8", + "@angular/platform-server": "9.0.0-next.8", + "@angular/router": "9.0.0-next.8", + "@angular/service-worker": "9.0.0-next.8", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 195195af903b..df2dc4a5901d 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.7", - "@angular/compiler-cli": "9.0.0-next.7", + "@angular/compiler": "9.0.0-next.8", + "@angular/compiler-cli": "9.0.0-next.8", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.5.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index df8413e84bb4..0463a299bd6a 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.7", - "@angular/compiler-cli": "9.0.0-next.7", + "@angular/compiler": "9.0.0-next.8", + "@angular/compiler-cli": "9.0.0-next.8", "typescript": "3.5.3", "webpack": "4.41.0" } diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 8a3d86df76ab..e009dd0cd528 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#ed957441d6698aa0eb3dd54d223ff7cd14d89bbc", - "@angular/common": "github:angular/common-builds#7095bc662820b6657fa233eaea17351ce04dd03d", - "@angular/compiler": "github:angular/compiler-builds#f1316e136b68f568e742e8fef61d26cc841f554d", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#1af3f1d0850e337cd87d17eeb539f9b2a80d77c6", - "@angular/core": "github:angular/core-builds#e60f85858483086960e727cdffba02dd4d7820c5", - "@angular/forms": "github:angular/forms-builds#3b0118d912b184776b99da101d82bb8e707814a5", - "@angular/language-service": "github:angular/language-service-builds#9afec9af703a65739caa41031984f31113308eb1", - "@angular/platform-browser": "github:angular/platform-browser-builds#6fad57d61274f910af0990095ecf54a09a56ac70", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d179293ef0859b8ede41e3088078d992866f803d", - "@angular/router": "github:angular/router-builds#70afeb561103c2503090c286efb0d95e2139cd5f" + "@angular/animations": "github:angular/animations-builds#85c3ab82a145826c501b780c3da4cadd129212d4", + "@angular/common": "github:angular/common-builds#d86c5b145e5b00a8b0d0602529e4653aef2acd91", + "@angular/compiler": "github:angular/compiler-builds#5261e76a993c85e89c893b1aa51d2cb640f6d2ce", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#36506e91360abda25c12e9237b1bc438cf43923c", + "@angular/core": "github:angular/core-builds#9266b42001a954fb5d0ffdddd2703b6478eb4d24", + "@angular/forms": "github:angular/forms-builds#c61fabb0cded0d878098b780be34fd3481aba974", + "@angular/language-service": "github:angular/language-service-builds#c3c8e8993b8c341676045f831ac3e6c7b6f47931", + "@angular/platform-browser": "github:angular/platform-browser-builds#cb6ce64c0b32a8407d8522d356a84607dd23d676", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#1cae33c84b9cc3ffae42e166ec7b78de7b468101", + "@angular/router": "github:angular/router-builds#0a079c227febe1b29c19ca039dd5fb9dbbc3b1e9" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 2bf08a8c1ddc..1969d4b3346e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,33 +2,33 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.7.tgz#62809382b39ba7cc6c9b96af500f49149669c820" - integrity sha512-6cz5KqiGPgiN82xtvXxrEIM2vhKlJdXmSSb1qBfsLIIbAXxvgBW3kCzJkZsKFCREL8QHqVKuAQFdQ2c3HBlA9A== +"@angular/animations@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.8.tgz#a0931bb11f6d07bdadb79e9c4ccbb34e5f4e97c3" + integrity sha512-srsMTEbrwRFE/Ijn9G87Bv2XVuJnYVjJVJ2zsVDc4Y6OKIPkNqwUeWeT4h5lw4wtg5LMM8Gw0EBHLKqp8p51qw== dependencies: tslib "^1.9.0" -"@angular/cdk@8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.2.0.tgz#fe183aaf9907421086e413a80af6ec0995983a9d" - integrity sha512-vsjKiUirICP9fTxnBT3jjqW14ipZLJPkyT3dKZQETKcml1fTY1L9QVXclvLTeUliuPSl490anuBvpQpfMeJDhQ== +"@angular/cdk@8.2.1": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.2.1.tgz#3dc2648fe8255098940c9f9a16a271f422571d51" + integrity sha512-Y6xTxESrQlWw1kvSVWAs9cfeN/sYThrc/S9Ll4vekNkYSzye4mHHmDxzsKeGLR1tP+7urXTVz6xo44YUWVE7mw== dependencies: tslib "^1.7.1" optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.7.tgz#5ae5a848e6d359a13347bc932aabdeb205dcdcd5" - integrity sha512-1WzfbX1eF5xJM9mKlj7LMYY8MVOTF0rxL52P6OUBXYBq9e4Wg1d0QoTmpTVrO4bVxkGbuRpgGQqYN5g+QL3M8g== +"@angular/common@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.8.tgz#7338fd7ca4d48b1e4b636f2d8286af6443a25748" + integrity sha512-bxnneNCX1nO7JXp1YPtZZSbERV5Jpmpjw3YA2aOcu1waVTlV9PFh+mnP+7pTim6k8DRvpwvIB7p08GaDrWP0ZQ== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.7.tgz#add5b605dd5458ad2a560b8dcbea0e0e05c722fc" - integrity sha512-3paTm6AhiuN4uQTe0zyKI9xek7QK8cWaxR08u5YWx7Zyb4nwvYIOUZ6bVNKynoHVeRyS5PoTIvoG5wOHzuuYyQ== +"@angular/compiler-cli@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.8.tgz#33475aad43157b36c5e3e768bc2e100172d35ebb" + integrity sha512-UmoFM/MfJYP8TxdrFG9MZkkz/gCmjRWalWJsZIHgRuZuNclNzTuvwSxWxan8mBpTHCYeTKyZgr3rP1hFqab8dQ== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -41,73 +41,73 @@ tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.7.tgz#06298ba65442dee294d6a887f2ec5e47768ca5f3" - integrity sha512-FfUCtkEABG+Wqa/HVIIN3t/1GRsgFNDS1p/3DgdNwUm79gE/Q6uYdyUP7vi+TaX3iXKilTyTxFd0z21dC4iAqQ== +"@angular/compiler@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.8.tgz#6b9a3b827c05403f9ef76a9f40a346539bdf5e2d" + integrity sha512-NYCo1T2924AD45HVTLJcgJFkptzmnTg2GYSRZx9wqFsQxMCb5vok4dow2/irUwJ5MS+7KU9NtRKK+mNSVxsiSg== dependencies: tslib "^1.9.0" -"@angular/core@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.7.tgz#a501fb483433042346fbeb435fbde0f5f8e58320" - integrity sha512-Lz487EWTLwWWbkSA/stiYDXd7f0myGYjJU3AqkorriFmY0QJ6nZZupODNjcf4gpLX09IOTvneK9sEK5OGi4sOQ== +"@angular/core@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.8.tgz#b0550354afc1d8a3193efc0332650b8be886b566" + integrity sha512-AOAzhPDoXhuF6znghYqSVxKKQTUDhGscZ4k95wxZVWvRpe19fHxXIDADCFsExpsehofH3k4D/e/8ju0dWumLkA== dependencies: tslib "^1.9.0" -"@angular/forms@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.7.tgz#a68b44979ad2002ab0e240a7dda00192b113997b" - integrity sha512-UWcx7U22aa/K73rOrUtYxe66/CUxULopdzmOdl3tuitZDHs55L1MXTYlw0xrSFUtB7dUfbLXO/k3rdmIvHSkQQ== +"@angular/forms@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.8.tgz#f849439d8f4d160448b3dcc6f5a32a30c07a690a" + integrity sha512-DjkelZ36suKHFuyN8NzFJ2d/MVtg+RK+cYRURoKHhFt/Z+0w03m+YKEX0k1NLXF/3ES5aTP0JfxkCHaM97v26Q== dependencies: tslib "^1.9.0" -"@angular/localize@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.7.tgz#b654403a09e94695ff69850ecc831628de754d73" - integrity sha512-N79ZLFQEJV7oBrcqfCTzoC4Ot7pbOYpwQ02zi0xSud124DN4Tf1R8EM+H6nqbV4F/mOUL/fXHIP3Iu1u6QCDTQ== +"@angular/localize@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.8.tgz#14d25ebb88ad451ef9f327c4fbd05cd0c17f5ce9" + integrity sha512-zmH9tGHPG3xmGmuu2o++4yBs36mnpHiZQSwro0KEr8+WU9Hi2Am4jL4TbiL/xe7JpERpr87aESBbcey/oqW/MA== -"@angular/material@8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.2.0.tgz#a99bbe5347ef0197bc4ad29228798608a62308aa" - integrity sha512-4EY3QilEXS09+10WYwkunEltReuPDByb2ulWw2FLG3wpmMpCp4p6AKY9v9xS3sGvb708S0b9vlfLG4FbepmBbA== +"@angular/material@8.2.1": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.2.1.tgz#d57575715c0659a713c0eb9e65292e46923ad28d" + integrity sha512-A3PbyVoj2Ao3h21YJSl1zCJahxnaipUKDG8wetCuqw8Ph8Qf5v+VtLfRXY2aYIp7HEBbAhuisrW9S2r+aVq7Ww== dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.7.tgz#e8e9fae2dc772094ec644ffb06437808f79c45f6" - integrity sha512-R1XLmzw4ZIDcYvKg1x9cQG0PSDHsjAjt/ZoVhLTB/AC/V1E95AAkCnmcvTCH4UGDQREG7wc3OBN7KRLJDabbuA== +"@angular/platform-browser-dynamic@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.8.tgz#a6397f79d1b1f43c8039495106d5015eebdc6203" + integrity sha512-oS5BFFHZwjR09929GaALdz/iOqzhf6v1B8q0nz2VMR84Nyy0zdl2+iXugXIHurO30XMmjOOTHMLZbwFAaIlRHg== dependencies: tslib "^1.9.0" -"@angular/platform-browser@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.7.tgz#b25e031e2af0a72919743000dc62597f260563c0" - integrity sha512-c90plfSkD5glZET7E5qxHo1F/lRINwM1JaEWHOBEj8jqgVPLrMuRKq3t5ZDEWiGCG2qg4LVtGjJNEXnacOZXxQ== +"@angular/platform-browser@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.8.tgz#b1dec2346e0fedd2eeb3815cf6606dd8e671de09" + integrity sha512-vE1MyX2lMHVI6qHM7awJYXrnCbnRX4xRUEBwtfkG/Ipsbu/FwPdbKJs1TifA5+jg214J2KjrpJZggGQe7HOFUQ== dependencies: tslib "^1.9.0" -"@angular/platform-server@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.7.tgz#8f7d7afeb08354d8ede44de3e11b195e73ed104d" - integrity sha512-mbMI84S6iN3aVAj/QO1RYTompnB5ZpsKDykxkZuaTsvb6jTXreeZiPYEK+jU1xO61k4nZGkuDV4vUsEuMIF/Lw== +"@angular/platform-server@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.8.tgz#f56867fb3d01d2d2d0620fe7db744b9369fbce30" + integrity sha512-jqQaH9zTZ7+M/6zEBcllSlIyyb2Ka/iB0a//zxEk0Wgu3UsgWzRQyTlJ7blGyKTMpyr6SUTTTLEDmSS/FDWr+Q== dependencies: domino "^2.1.2" tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.7.tgz#64347051e135844dccaadc7351a294163a699ac0" - integrity sha512-kCkBJZ7s1p/mpp6wffx0X7+LO5v/PzAcBnEDnzmunF+74L6GIv2uB7dLnRSSkdC7Q5A6/CrGPvfSIThIs0UKlQ== +"@angular/router@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.8.tgz#e828fae003548b8306fc709e2b34bdbb59a2afa1" + integrity sha512-2+QU9bIpKos+j6eRRFCVufN8K9XQ6oeECNT65xU/Ihk/WnMvgt3+kRB23tEPwXWgdabPibtBIZXnzB1XVvbbRQ== dependencies: tslib "^1.9.0" -"@angular/service-worker@9.0.0-next.7": - version "9.0.0-next.7" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.7.tgz#5310c56e047e7222f16c9ad8c3040ee4e78b0d0f" - integrity sha512-H+tH/Vu+OJ5tQUrYC7sk8i6WNbVfyuUlU/YqQQeSzHx9ZL0K0R3UIgmT/UV5B8txB0qskK8WXKbhgZIl8h25Xg== +"@angular/service-worker@9.0.0-next.8": + version "9.0.0-next.8" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.8.tgz#1d0c6b81a13aa2d093e36c2a6e36bc118e9a164a" + integrity sha512-KMcbwKuiW0JTJw4Zy36Y9of75ZBh8RfyyaxcxVxYo/VnZ2hdrZkvtsASbh5oLBDYwqQL36wNFQ0kH1w4dY1D3Q== dependencies: tslib "^1.9.0" From d73a098900d3b227e5cf819a1213e07ee77f2f42 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 19 Sep 2019 11:13:34 -0400 Subject: [PATCH 0210/1070] refactor(@angular-devkit/build-angular): account for disabled mangling in downlevel cache --- packages/angular_devkit/build_angular/src/browser/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index a5b6b6e5a11d..674eafcf8008 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -63,6 +63,7 @@ import { normalizeOptimization, normalizeSourceMaps, } from '../utils'; +import { manglingDisabled } from '../utils/mangle-options'; import { CacheKey, ProcessBundleOptions } from '../utils/process-bundle'; import { assertCompatibleAngularVersion } from '../utils/version'; import { @@ -374,7 +375,10 @@ export function buildWebpackBrowser( const codeHash = createHash('sha1') .update(action.code) .digest('hex'); - const baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`; + let baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`; + if (manglingDisabled) { + baseCacheKey += '|MD'; + } // Postfix added to sourcemap cache keys when vendor sourcemaps are present // Allows non-destructive caching of both variants From 8dd67cd3cbc768fb985d313e568b4cfbc4e24912 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 27 Aug 2019 09:45:46 -0400 Subject: [PATCH 0211/1070] fix(@angular-devkit/build-angular): inject correct SRI values in downlevel bundles Fixes #15468 --- .../build_angular/src/browser/index.ts | 131 +++++++++++++--- .../build_angular/src/utils/process-bundle.ts | 148 ++++++++++++++++-- 2 files changed, 238 insertions(+), 41 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 674eafcf8008..f712a782c8d9 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -64,7 +64,7 @@ import { normalizeSourceMaps, } from '../utils'; import { manglingDisabled } from '../utils/mangle-options'; -import { CacheKey, ProcessBundleOptions } from '../utils/process-bundle'; +import { CacheKey, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; import { assertCompatibleAngularVersion } from '../utils/version'; import { generateBrowserWebpackConfigFromContext, @@ -269,11 +269,12 @@ export function buildWebpackBrowser( // Common options for all bundle process actions const sourceMapOptions = normalizeSourceMaps(options.sourceMap || false); - const actionOptions = { + const actionOptions: Partial = { optimize: normalizeOptimization(options.optimization).scripts, sourceMaps: sourceMapOptions.scripts, hiddenSourceMaps: sourceMapOptions.hidden, vendorSourceMaps: sourceMapOptions.vendor, + integrityAlgorithm: options.subresourceIntegrity ? 'sha384' : undefined, }; const actions: ProcessBundleOptions[] = []; @@ -303,8 +304,10 @@ export function buildWebpackBrowser( seen.add(file.file); // All files at this point except ES5 polyfills are module scripts - const es5Polyfills = file.file.startsWith('polyfills-es5'); - if (!es5Polyfills && !file.file.startsWith('polyfills-nomodule-es5')) { + const es5Polyfills = + file.file.startsWith('polyfills-es5') || + file.file.startsWith('polyfills-nomodule-es5'); + if (!es5Polyfills) { moduleFiles.push(file); } // If not optimizing then ES2015 polyfills do not need processing @@ -339,6 +342,7 @@ export function buildWebpackBrowser( filename, code, map, + name: file.name, optimizeOnly: true, }); @@ -352,6 +356,7 @@ export function buildWebpackBrowser( filename, code, map, + name: file.name, runtime: file.file.startsWith('runtime'), ignoreOriginal: es5Polyfills, }); @@ -367,15 +372,18 @@ export function buildWebpackBrowser( context.logger.info('Generating ES5 bundles for differential loading...'); const processActions: typeof actions = []; + let processRuntimeAction: ProcessBundleOptions | undefined; const cacheActions: { src: string; dest: string }[] = []; + const processResults: ProcessBundleResult[] = []; for (const action of actions) { // Create base cache key with elements: // * package version - different build-angular versions cause different final outputs // * code length/hash - ensure cached version matches the same input code - const codeHash = createHash('sha1') + const algorithm = action.integrityAlgorithm || 'sha1'; + const codeHash = createHash(algorithm) .update(action.code) - .digest('hex'); - let baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`; + .digest('base64'); + let baseCacheKey = `${packageVersion}|${action.code.length}|${algorithm}-${codeHash}`; if (manglingDisabled) { baseCacheKey += '|MD'; } @@ -430,31 +438,86 @@ export function buildWebpackBrowser( // If all required cached entries are present, use the cached entries // Otherwise process the files - if (cached) { - if (cacheEntries[CacheKey.OriginalCode]) { - cacheActions.push({ - src: cacheEntries[CacheKey.OriginalCode].path, - dest: action.filename, - }); + // If SRI is enabled always process the runtime bundle + // Lazy route integrity values are stored in the runtime bundle + if (action.integrityAlgorithm && action.runtime) { + processRuntimeAction = action; + } else if (cached) { + const result: ProcessBundleResult = { name: action.name }; + if (action.integrityAlgorithm) { + result.integrity = `${action.integrityAlgorithm}-${codeHash}`; } - if (cacheEntries[CacheKey.OriginalMap]) { + + let cacheEntry = cacheEntries[CacheKey.OriginalCode]; + if (cacheEntry) { cacheActions.push({ - src: cacheEntries[CacheKey.OriginalMap].path, - dest: action.filename + '.map', + src: cacheEntry.path, + dest: action.filename, }); + result.original = { + filename: action.filename, + size: cacheEntry.size, + integrity: cacheEntry.metadata && cacheEntry.metadata.integrity, + }; + + cacheEntry = cacheEntries[CacheKey.OriginalMap]; + if (cacheEntry) { + cacheActions.push({ + src: cacheEntry.path, + dest: action.filename + '.map', + }); + result.original.map = { + filename: action.filename + '.map', + size: cacheEntry.size, + }; + } + } else if (!action.ignoreOriginal) { + // If the original wasn't processed (and therefore not cached), add info + result.original = { + filename: action.filename, + size: Buffer.byteLength(action.code, 'utf8'), + map: + action.map === undefined + ? undefined + : { + filename: action.filename + '.map', + size: Buffer.byteLength(action.map, 'utf8'), + }, + }; } - if (cacheEntries[CacheKey.DownlevelCode]) { + + cacheEntry = cacheEntries[CacheKey.DownlevelCode]; + if (cacheEntry) { cacheActions.push({ - src: cacheEntries[CacheKey.DownlevelCode].path, + src: cacheEntry.path, dest: action.filename.replace('es2015', 'es5'), }); + result.downlevel = { + filename: action.filename.replace('es2015', 'es5'), + size: cacheEntry.size, + integrity: cacheEntry.metadata && cacheEntry.metadata.integrity, + }; + + cacheEntry = cacheEntries[CacheKey.DownlevelMap]; + if (cacheEntry) { + cacheActions.push({ + src: cacheEntry.path, + dest: action.filename.replace('es2015', 'es5') + '.map', + }); + result.downlevel.map = { + filename: action.filename.replace('es2015', 'es5') + '.map', + size: cacheEntry.size, + }; + } } - if (cacheEntries[CacheKey.DownlevelMap]) { - cacheActions.push({ - src: cacheEntries[CacheKey.DownlevelMap].path, - dest: action.filename.replace('es2015', 'es5') + '.map', - }); - } + + processResults.push(result); + } else if (action.runtime) { + processRuntimeAction = { + ...action, + cacheKeys, + cachePath: cacheDownlevelPath || undefined, + }; } else { processActions.push({ ...action, @@ -506,11 +569,16 @@ export function buildWebpackBrowser( ['process'], ); let completed = 0; - const workCallback = (error: Error | null) => { + const workCallback = (error: Error | null, result: ProcessBundleResult) => { if (error) { workerFarm.end(workers); reject(error); - } else if (++completed === processActions.length) { + + return; + } + + processResults.push(result); + if (++completed === processActions.length) { workerFarm.end(workers); resolve(); } @@ -520,6 +588,17 @@ export function buildWebpackBrowser( }); } + // Runtime must be processed after all other files + if (processRuntimeAction) { + const runtimeOptions = { + ...processRuntimeAction, + runtimeData: processResults, + }; + processResults.push( + await import('../utils/process-bundle').then(m => m.processAsync(runtimeOptions)), + ); + } + context.logger.info('ES5 bundle generation complete.'); } else { const { emittedFiles = [] } = firstBuild; diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index f2f062121a09..28ec55d4cd96 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { createHash } from 'crypto'; import * as fs from 'fs'; import * as path from 'path'; import { SourceMapConsumer, SourceMapGenerator } from 'source-map'; @@ -18,15 +19,35 @@ export interface ProcessBundleOptions { filename: string; code: string; map?: string; + name?: string; sourceMaps?: boolean; hiddenSourceMaps?: boolean; vendorSourceMaps?: boolean; runtime?: boolean; - optimize: boolean; + optimize?: boolean; optimizeOnly?: boolean; ignoreOriginal?: boolean; cacheKeys?: (string | null)[]; cachePath?: string; + integrityAlgorithm?: 'sha256' | 'sha384' | 'sha512'; + runtimeData?: ProcessBundleResult[]; +} + +export interface ProcessBundleResult { + name?: string; + integrity?: string; + original?: ProcessBundleFile; + downlevel?: ProcessBundleFile; +} + +export interface ProcessBundleFile { + filename: string; + size: number; + integrity?: string; + map?: { + filename: string; + size: number; + }; } export const enum CacheKey { @@ -38,19 +59,38 @@ export const enum CacheKey { export function process( options: ProcessBundleOptions, - callback: (error: Error | null, result?: {}) => void, + callback: (error: Error | null, result?: ProcessBundleResult) => void, ): void { - processWorker(options).then(() => callback(null, {}), error => callback(error)); + processAsync(options).then(result => callback(null, result), error => callback(error)); } -async function processWorker(options: ProcessBundleOptions): Promise { +export async function processAsync(options: ProcessBundleOptions): Promise { if (!options.cacheKeys) { options.cacheKeys = []; } // If no downlevelling required than just mangle code and return if (options.optimizeOnly) { - return mangleOriginal(options); + const result: ProcessBundleResult = { name: options.name }; + if (options.integrityAlgorithm) { + result.integrity = generateIntegrityValue(options.integrityAlgorithm, options.code); + } + + // Replace integrity hashes with updated values + // NOTE: This should eventually be a babel plugin + if (options.runtime && options.integrityAlgorithm && options.runtimeData) { + for (const data of options.runtimeData) { + if (!data.integrity || !data.original || !data.original.integrity) { + continue; + } + + options.code = options.code.replace(data.integrity, data.original.integrity); + } + } + + result.original = await mangleOriginal(options); + + return result; } // if code size is larger than 500kB, manually handle sourcemaps with newer source-map package. @@ -64,13 +104,15 @@ async function processWorker(options: ProcessBundleOptions): Promise { filename: options.filename, inputSourceMap: !manualSourceMaps && options.map !== undefined && JSON.parse(options.map), babelrc: false, - // modules aren't needed since the bundles use webpacks custom module loading + // modules aren't needed since the bundles use webpack's custom module loading // loose generates more ES5-like code but does not strictly adhere to the ES2015 spec (Typescript is loose) // 'transform-typeof-symbol' generates slower code presets: [ ['@babel/preset-env', { modules: false, loose: true, exclude: ['transform-typeof-symbol'] }], ], - minified: true, + minified: options.optimize, + // `false` ensures it is disabled and prevents large file warnings + compact: options.optimize || false, sourceMaps: options.sourceMaps, }); @@ -80,6 +122,18 @@ async function processWorker(options: ProcessBundleOptions): Promise { // Extra spacing is intentional to align source line positions if (options.runtime) { code = code.replace('"-es2015.', ' "-es5.'); + + // Replace integrity hashes with updated values + // NOTE: This should eventually be a babel plugin + if (options.integrityAlgorithm && options.runtimeData) { + for (const data of options.runtimeData) { + if (!data.integrity || !data.downlevel || !data.downlevel.integrity) { + continue; + } + + code = code.replace(data.integrity, data.downlevel.integrity); + } + } } if (options.sourceMaps && manualSourceMaps && options.map) { @@ -128,12 +182,14 @@ async function processWorker(options: ProcessBundleOptions): Promise { map.sourceRoot = sourceRoot; } + const result: ProcessBundleResult = { name: options.name }; + if (options.optimize) { // Note: Investigate converting the AST instead of re-parsing // estree -> terser is already supported; need babel -> estree/terser // Mangle downlevel code - const result = minify(code, { + const minifyOutput = minify(code, { compress: true, ecma: 5, mangle: !manglingDisabled, @@ -148,16 +204,16 @@ async function processWorker(options: ProcessBundleOptions): Promise { }, }); - if (result.error) { - throw result.error; + if (minifyOutput.error) { + throw minifyOutput.error; } - code = result.code; - map = result.map; + code = minifyOutput.code; + map = minifyOutput.map; // Mangle original code if (!options.ignoreOriginal) { - await mangleOriginal(options); + result.original = await mangleOriginal(options); } } else if (map) { map = JSON.stringify(map); @@ -175,13 +231,33 @@ async function processWorker(options: ProcessBundleOptions): Promise { fs.writeFileSync(newFilePath + '.map', map); } + result.downlevel = createFileEntry(newFilePath, code, map, options.integrityAlgorithm); + if (options.cachePath && options.cacheKeys[CacheKey.DownlevelCode]) { - await cacache.put(options.cachePath, options.cacheKeys[CacheKey.DownlevelCode], code); + await cacache.put(options.cachePath, options.cacheKeys[CacheKey.DownlevelCode], code, { + metadata: { integrity: result.downlevel.integrity }, + }); } fs.writeFileSync(newFilePath, code); + + // If original was not processed, add info + if (!result.original && !options.ignoreOriginal) { + result.original = createFileEntry( + options.filename, + options.code, + options.map, + options.integrityAlgorithm, + ); + } + + if (options.integrityAlgorithm) { + result.integrity = generateIntegrityValue(options.integrityAlgorithm, options.code); + } + + return result; } -async function mangleOriginal(options: ProcessBundleOptions): Promise { +async function mangleOriginal(options: ProcessBundleOptions): Promise { const resultOriginal = minify(options.code, { compress: false, ecma: 6, @@ -218,13 +294,55 @@ async function mangleOriginal(options: ProcessBundleOptions): Promise { fs.writeFileSync(options.filename + '.map', resultOriginal.map); } + const fileResult = createFileEntry( + options.filename, + // tslint:disable-next-line: no-non-null-assertion + resultOriginal.code!, + resultOriginal.map as string, + options.integrityAlgorithm, + ); + if (options.cachePath && options.cacheKeys && options.cacheKeys[CacheKey.OriginalCode]) { await cacache.put( options.cachePath, options.cacheKeys[CacheKey.OriginalCode], resultOriginal.code, + { + metadata: { integrity: fileResult.integrity }, + }, ); } fs.writeFileSync(options.filename, resultOriginal.code); + + return fileResult; +} + +function createFileEntry( + filename: string, + code: string, + map: string | undefined, + integrityAlgorithm?: string, +): ProcessBundleFile { + return { + filename: filename, + size: Buffer.byteLength(code), + integrity: integrityAlgorithm && generateIntegrityValue(integrityAlgorithm, code), + map: !map + ? undefined + : { + filename: filename + '.map', + size: Buffer.byteLength(map), + }, + }; +} + +function generateIntegrityValue(hashAlgorithm: string, code: string) { + return ( + hashAlgorithm + + '-' + + createHash(hashAlgorithm) + .update(code) + .digest('base64') + ); } From 1930bd5845582f0b2f60ce9c2c3ec377fb739ec9 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 23 Sep 2019 13:23:42 -0400 Subject: [PATCH 0212/1070] fix(@angular-devkit/build-webpack): provide more complete compilation stats --- packages/angular_devkit/build_webpack/src/utils.ts | 13 +++---------- .../src/webpack-dev-server/index_spec_large.ts | 1 + .../build_webpack/src/webpack/index.ts | 2 ++ .../build_webpack/src/webpack/index_spec_large.ts | 5 +++-- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/angular_devkit/build_webpack/src/utils.ts b/packages/angular_devkit/build_webpack/src/utils.ts index 9a711b9e0f82..4cf61464e1fa 100644 --- a/packages/angular_devkit/build_webpack/src/utils.ts +++ b/packages/angular_devkit/build_webpack/src/utils.ts @@ -10,6 +10,7 @@ import * as path from 'path'; import * as webpack from 'webpack'; export interface EmittedFiles { + id?: string; name?: string; file: string; initial: boolean; @@ -20,19 +21,11 @@ export interface EmittedFiles { export function getEmittedFiles(compilation: webpack.compilation.Compilation): EmittedFiles[] { const files: EmittedFiles[] = []; - // entrypoints might have multiple outputs - // such as runtime.js - for (const [name, entrypoint] of compilation.entrypoints) { - const entryFiles: string[] = (entrypoint && entrypoint.getFiles()) || []; - for (const file of entryFiles) { - files.push({ name, file, extension: path.extname(file), initial: true }); - } - } - // adds all chunks to the list of emitted files such as lazy loaded modules - for (const chunk of Object.values(compilation.chunks)) { + for (const chunk of compilation.chunks as webpack.compilation.Chunk[]) { for (const file of chunk.files as string[]) { files.push({ + id: chunk.id.toString(), name: chunk.name, file, extension: path.extname(file), diff --git a/packages/angular_devkit/build_webpack/src/webpack-dev-server/index_spec_large.ts b/packages/angular_devkit/build_webpack/src/webpack-dev-server/index_spec_large.ts index 447a5f1541eb..a2e2f431c0ab 100644 --- a/packages/angular_devkit/build_webpack/src/webpack-dev-server/index_spec_large.ts +++ b/packages/angular_devkit/build_webpack/src/webpack-dev-server/index_spec_large.ts @@ -61,6 +61,7 @@ describe('Dev Server Builder', () => { expect(output.success).toBe(true); expect(output.emittedFiles).toContain({ + id: 'main', name: 'main', initial: true, file: 'bundle.js', diff --git a/packages/angular_devkit/build_webpack/src/webpack/index.ts b/packages/angular_devkit/build_webpack/src/webpack/index.ts index 73c4abcd6886..0da60ee387f4 100644 --- a/packages/angular_devkit/build_webpack/src/webpack/index.ts +++ b/packages/angular_devkit/build_webpack/src/webpack/index.ts @@ -27,6 +27,7 @@ export interface WebpackFactory { export type BuildResult = BuilderOutput & { emittedFiles?: EmittedFiles[]; + webpackStats?: webpack.Stats.ToJsonOutput; }; export function runWebpack( @@ -59,6 +60,7 @@ export function runWebpack( obs.next({ success: !stats.hasErrors(), + webpackStats: stats.toJson(), emittedFiles: getEmittedFiles(stats.compilation), } as unknown as BuildResult); diff --git a/packages/angular_devkit/build_webpack/src/webpack/index_spec_large.ts b/packages/angular_devkit/build_webpack/src/webpack/index_spec_large.ts index 1c173f088296..d81a7b8c5c04 100644 --- a/packages/angular_devkit/build_webpack/src/webpack/index_spec_large.ts +++ b/packages/angular_devkit/build_webpack/src/webpack/index_spec_large.ts @@ -60,6 +60,7 @@ describe('Webpack Builder basic test', () => { expect(output.success).toBe(true); expect(output.emittedFiles).toContain({ + id: 'main', name: 'main', initial: true, file: 'bundle.js', @@ -94,8 +95,8 @@ describe('Webpack Builder basic test', () => { expect(output.success).toBe(true); expect(output.emittedFiles).toContain( - { name: 'main', initial: true, file: 'main.js', extension: '.js' }, - { name: 'polyfills', initial: true, file: 'polyfills.js', extension: '.js' }, + { id: 'main', name: 'main', initial: true, file: 'main.js', extension: '.js' }, + { id: 'polyfills', name: 'polyfills', initial: true, file: 'polyfills.js', extension: '.js' }, ); await run.stop(); From d3e4dfa0c06fdc658c91fe1e146e2b368028074a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 23 Sep 2019 13:24:56 -0400 Subject: [PATCH 0213/1070] fix(@angular-devkit/build-angular): display accurate sizes for downlevelled files Fixes #15425 --- .../utilities/package-chunk-sort.ts | 2 + .../src/angular-cli-files/utilities/stats.ts | 43 +++++-- .../build_angular/src/browser/index.ts | 115 ++++++++++++++++-- .../build_angular/src/utils/process-bundle.ts | 4 +- .../e2e/tests/basic/scripts-array.ts | 6 +- .../e2e/tests/basic/styles-array.ts | 6 +- .../e2e/tests/misc/support-safari-10.1.ts | 6 +- 7 files changed, 151 insertions(+), 31 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts index 29e5e17ac34e..442b80ebb34f 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/package-chunk-sort.ts @@ -27,11 +27,13 @@ export function generateEntryPoints(appConfig: { const entryPoints = [ 'polyfills-nomodule-es5', + 'runtime', 'polyfills-es5', 'polyfills', 'sw-register', ...extraEntryPoints(appConfig.styles, 'styles'), ...extraEntryPoints(appConfig.scripts, 'scripts'), + 'vendor', 'main', ]; diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts index 296b4f16b34f..ac2bc7aa8fe3 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts @@ -8,6 +8,7 @@ // tslint:disable // TODO: cleanup this file, it's copied as is from Angular CLI. import { tags, terminal } from '@angular-devkit/core'; +import * as path from 'path'; const { bold, green, red, reset, white, yellow } = terminal; @@ -23,27 +24,47 @@ export function formatSize(size: number): string { return `${+(size / Math.pow(1024, index)).toPrecision(3)} ${abbreviations[index]}`; } +export function generateBundleStats( + info: { + id: string | number; + size?: number; + files: string[]; + names?: string[]; + entry: boolean; + initial: boolean; + rendered?: boolean; + }, + colors: boolean, +): string { + const g = (x: string) => (colors ? bold(green(x)) : x); + const y = (x: string) => (colors ? bold(yellow(x)) : x); + + const size = typeof info.size === 'number' ? ` ${formatSize(info.size)}` : ''; + const files = info.files.map(f => path.basename(f)).join(', '); + const names = info.names ? ` (${info.names.join(', ')})` : ''; + const initial = y(info.entry ? '[entry]' : info.initial ? '[initial]' : ''); + const flags = ['rendered', 'recorded'] + .map(f => (f && (info as any)[f] ? g(` [${f}]`) : '')) + .join(''); + + return `chunk {${y(info.id.toString())}} ${g(files)}${names}${size} ${initial}${flags}`; +} + +export function generateBuildStats(hash: string, time: number, colors: boolean): string { + const w = (x: string) => colors ? bold(white(x)) : x; + return `Date: ${w(new Date().toISOString())} - Hash: ${w(hash)} - Time: ${w('' + time)}ms` +} export function statsToString(json: any, statsConfig: any) { const colors = statsConfig.colors; const rs = (x: string) => colors ? reset(x) : x; const w = (x: string) => colors ? bold(white(x)) : x; - const g = (x: string) => colors ? bold(green(x)) : x; - const y = (x: string) => colors ? bold(yellow(x)) : x; const changedChunksStats = json.chunks .filter((chunk: any) => chunk.rendered) .map((chunk: any) => { const asset = json.assets.filter((x: any) => x.name == chunk.files[0])[0]; - const size = asset ? ` ${formatSize(asset.size)}` : ''; - const files = chunk.files.join(', '); - const names = chunk.names ? ` (${chunk.names.join(', ')})` : ''; - const initial = y(chunk.entry ? '[entry]' : chunk.initial ? '[initial]' : ''); - const flags = ['rendered', 'recorded'] - .map(f => f && chunk[f] ? g(` [${f}]`) : '') - .join(''); - - return `chunk {${y(chunk.id)}} ${g(files)}${names}${size} ${initial}${flags}`; + return generateBundleStats({ ...chunk, size: asset && asset.size }, colors); }); const unchangedChunkNumber = json.chunks.length - changedChunksStats.length; diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index f712a782c8d9..6ad5518856bb 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -51,6 +51,8 @@ import { import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { augmentAppWithServiceWorker } from '../angular-cli-files/utilities/service-worker'; import { + generateBuildStats, + generateBundleStats, statsErrorsToString, statsToString, statsWarningsToString, @@ -64,7 +66,12 @@ import { normalizeSourceMaps, } from '../utils'; import { manglingDisabled } from '../utils/mangle-options'; -import { CacheKey, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; +import { + CacheKey, + ProcessBundleFile, + ProcessBundleOptions, + ProcessBundleResult, +} from '../utils/process-bundle'; import { assertCompatibleAngularVersion } from '../utils/version'; import { generateBrowserWebpackConfigFromContext, @@ -202,9 +209,6 @@ export function buildWebpackBrowser( // Check Angular version. assertCompatibleAngularVersion(context.workspaceRoot, context.logger); - const loggingFn = - transforms.logging || createBrowserLoggingCallback(!!options.verbose, context.logger); - return from(initialize(options, context, host, transforms.webpackConfiguration)).pipe( // tslint:disable-next-line: no-big-function switchMap(({ config: configs, projectRoot }) => { @@ -222,6 +226,10 @@ export function buildWebpackBrowser( `); } + const useBundleDownleveling = + isDifferentialLoadingNeeded && !(fullDifferential || options.watch); + const startTime = Date.now(); + return from(configs).pipe( // the concurrency parameter (3rd parameter of mergeScan) is deliberately // set to 1 to make sure the build steps are executed in sequence. @@ -229,7 +237,13 @@ export function buildWebpackBrowser( (lastResult, config) => { // Make sure to only run the 2nd build step, if 1st one succeeded if (lastResult.success) { - return runWebpack(config, context, { logging: loggingFn }); + return runWebpack(config, context, { + logging: + transforms.logging || + (useBundleDownleveling + ? () => {} + : createBrowserLoggingCallback(!!options.verbose, context.logger)), + }); } else { return of(); } @@ -242,7 +256,19 @@ export function buildWebpackBrowser( switchMap(async buildEvents => { configs.length = 0; const success = buildEvents.every(r => r.success); - if (success) { + if (!success && useBundleDownleveling) { + // If using bundle downleveling then there is only one build + // If it fails show any diagnostic messages and bail + const webpackStats = buildEvents[0].webpackStats; + if (webpackStats && webpackStats.warnings.length > 0) { + context.logger.warn(statsWarningsToString(webpackStats, { colors: true })); + } + if (webpackStats && webpackStats.errors.length > 0) { + context.logger.error(statsErrorsToString(webpackStats, { colors: true })); + } + + return { success }; + } else if (success) { let noModuleFiles: EmittedFiles[] | undefined; let moduleFiles: EmittedFiles[] | undefined; let files: EmittedFiles[] | undefined; @@ -263,7 +289,7 @@ export function buildWebpackBrowser( noModuleFiles = secondBuild.emittedFiles; } } else if (isDifferentialLoadingNeeded && !fullDifferential) { - const { emittedFiles = [] } = firstBuild; + const { emittedFiles = [], webpackStats } = firstBuild; moduleFiles = []; noModuleFiles = []; @@ -342,7 +368,9 @@ export function buildWebpackBrowser( filename, code, map, - name: file.name, + // id is always present for non-assets + // tslint:disable-next-line: no-non-null-assertion + name: file.id!, optimizeOnly: true, }); @@ -356,7 +384,9 @@ export function buildWebpackBrowser( filename, code, map, - name: file.name, + // id is always present for non-assets + // tslint:disable-next-line: no-non-null-assertion + name: file.id!, runtime: file.file.startsWith('runtime'), ignoreOriginal: es5Polyfills, }); @@ -600,6 +630,73 @@ export function buildWebpackBrowser( } context.logger.info('ES5 bundle generation complete.'); + + type ArrayElement = A extends ReadonlyArray ? T : never; + function generateBundleInfoStats( + id: string | number, + bundle: ProcessBundleFile, + chunk: ArrayElement | undefined, + ): string { + return generateBundleStats( + { + id, + size: bundle.size, + files: bundle.map ? [bundle.filename, bundle.map.filename] : [bundle.filename], + names: chunk && chunk.names, + entry: !!chunk && chunk.names.includes('runtime'), + initial: !!chunk && chunk.initial, + rendered: true, + }, + true, + ); + } + + let bundleInfoText = ''; + const processedNames = new Set(); + for (const result of processResults) { + processedNames.add(result.name); + + const chunk = + webpackStats && + webpackStats.chunks && + webpackStats.chunks.find(c => result.name === c.id.toString()); + if (result.original) { + bundleInfoText += + '\n' + generateBundleInfoStats(result.name, result.original, chunk); + } + if (result.downlevel) { + bundleInfoText += + '\n' + generateBundleInfoStats(result.name, result.downlevel, chunk); + } + } + + if (webpackStats && webpackStats.chunks) { + for (const chunk of webpackStats.chunks) { + if (processedNames.has(chunk.id.toString())) { + continue; + } + + const asset = + webpackStats.assets && webpackStats.assets.find(a => a.name === chunk.files[0]); + bundleInfoText += + '\n' + generateBundleStats({ ...chunk, size: asset && asset.size }, true); + } + } + + bundleInfoText += + '\n' + + generateBuildStats( + (webpackStats && webpackStats.hash) || '', + Date.now() - startTime, + true, + ); + context.logger.info(bundleInfoText); + if (webpackStats && webpackStats.warnings.length > 0) { + context.logger.warn(statsWarningsToString(webpackStats, { colors: true })); + } + if (webpackStats && webpackStats.errors.length > 0) { + context.logger.error(statsErrorsToString(webpackStats, { colors: true })); + } } else { const { emittedFiles = [] } = firstBuild; files = emittedFiles.filter(x => x.name !== 'polyfills-es5'); diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 28ec55d4cd96..1313660cc610 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -19,7 +19,7 @@ export interface ProcessBundleOptions { filename: string; code: string; map?: string; - name?: string; + name: string; sourceMaps?: boolean; hiddenSourceMaps?: boolean; vendorSourceMaps?: boolean; @@ -34,7 +34,7 @@ export interface ProcessBundleOptions { } export interface ProcessBundleResult { - name?: string; + name: string; integrity?: string; original?: ProcessBundleFile; downlevel?: ProcessBundleFile; diff --git a/tests/legacy-cli/e2e/tests/basic/scripts-array.ts b/tests/legacy-cli/e2e/tests/basic/scripts-array.ts index d6c8698e7532..fd7f869b6cc9 100644 --- a/tests/legacy-cli/e2e/tests/basic/scripts-array.ts +++ b/tests/legacy-cli/e2e/tests/basic/scripts-array.ts @@ -73,15 +73,15 @@ export default async function () { await expectFileToMatch( 'dist/test-project/index.html', oneLineTrim` + + - - - + `, ); diff --git a/tests/legacy-cli/e2e/tests/basic/styles-array.ts b/tests/legacy-cli/e2e/tests/basic/styles-array.ts index feea3e79acf8..72b082f3d18c 100644 --- a/tests/legacy-cli/e2e/tests/basic/styles-array.ts +++ b/tests/legacy-cli/e2e/tests/basic/styles-array.ts @@ -61,13 +61,13 @@ export default async function() { await expectFileToMatch( 'dist/test-project/index.html', oneLineTrim` + + - - - + `, ); diff --git a/tests/legacy-cli/e2e/tests/misc/support-safari-10.1.ts b/tests/legacy-cli/e2e/tests/misc/support-safari-10.1.ts index bf5dcd375ce2..f790ba83180e 100644 --- a/tests/legacy-cli/e2e/tests/misc/support-safari-10.1.ts +++ b/tests/legacy-cli/e2e/tests/misc/support-safari-10.1.ts @@ -44,15 +44,15 @@ export default async function () { } else { await expectFileToMatch('dist/test-project/index.html', oneLineTrim` + + - - - + `); } From 08aa5c615e356440f34c2f2ecb7ae552cba320e8 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 25 Sep 2019 11:18:24 -0400 Subject: [PATCH 0214/1070] fix(@angular-devkit/core): json visitors should only set writable properties --- .../core/src/json/schema/visitor.ts | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/packages/angular_devkit/core/src/json/schema/visitor.ts b/packages/angular_devkit/core/src/json/schema/visitor.ts index a00ed14a0247..a1f1bdb6fc8c 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor.ts @@ -13,21 +13,20 @@ import { buildJsonPointer, joinJsonPointer } from './pointer'; import { JsonSchema } from './schema'; export interface ReferenceResolver { - (ref: string, context?: ContextT): { context?: ContextT, schema?: JsonObject }; + (ref: string, context?: ContextT): { context?: ContextT; schema?: JsonObject }; } -function _getObjectSubSchema( - schema: JsonSchema | undefined, - key: string, -): JsonObject | undefined { +function _getObjectSubSchema(schema: JsonSchema | undefined, key: string): JsonObject | undefined { if (typeof schema !== 'object' || schema === null) { return undefined; } // Is it an object schema? if (typeof schema.properties == 'object' || schema.type == 'object') { - if (typeof schema.properties == 'object' - && typeof (schema.properties as JsonObject)[key] == 'object') { + if ( + typeof schema.properties == 'object' && + typeof (schema.properties as JsonObject)[key] == 'object' + ) { return (schema.properties as JsonObject)[key] as JsonObject; } if (typeof schema.additionalProperties == 'object') { @@ -51,7 +50,7 @@ function _visitJsonRecursive( ptr: JsonPointer, schema?: JsonSchema, refResolver?: ReferenceResolver, - context?: ContextT, // tslint:disable-line:no-any + context?: ContextT, root?: JsonObject | JsonArray, ): Observable { if (schema === true || schema === false) { @@ -82,7 +81,7 @@ function _visitJsonRecursive( refResolver, context, root || value, - ).pipe(tap(x => value[i] = x)); + ).pipe(tap(x => (value[i] = x))); }), ignoreElements(), ), @@ -100,11 +99,18 @@ function _visitJsonRecursive( refResolver, context, root || value, - ).pipe(tap(x => value[key] = x)); + ).pipe( + tap(x => { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && descriptor.writable && value[key] !== x) { + value[key] = x; + } + }), + ); }), ignoreElements(), - ), - observableOf(value), + ), + observableOf(value), ); } else { return observableOf(value); @@ -133,12 +139,11 @@ export function visitJson( visitor: JsonVisitor, schema?: JsonSchema, refResolver?: ReferenceResolver, - context?: ContextT, // tslint:disable-line:no-any + context?: ContextT, ): Observable { return _visitJsonRecursive(json, visitor, buildJsonPointer([]), schema, refResolver, context); } - export function visitJsonSchema(schema: JsonSchema, visitor: JsonSchemaVisitor) { if (schema === false || schema === true) { // Nothing to visit. From 1015ce27ef9fdbdd740bd8b04ca293fd27d1b3c4 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 26 Sep 2019 12:29:53 +0000 Subject: [PATCH 0215/1070] build: update bazel_toolchains to version 0.29.7 --- WORKSPACE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 30f7ac341b02..2eba657cbb57 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -111,9 +111,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "a1e273b6159ae858f53046f5bab9678cffa82a72f0bf0c0a9e4af8fddb91209c", - strip_prefix = "bazel-toolchains-0.29.6", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.6.tar.gz", + sha256 = "e08fa958f227ea2e41627b50d9b3f1df9bd3ef8dff5a2bcee3a19bc26bc36070", + strip_prefix = "bazel-toolchains-0.29.7", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.7.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") From c479365f01550682085255bb8484141e6b7a3834 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 26 Sep 2019 12:30:09 +0000 Subject: [PATCH 0216/1070] build: update cacache to version 13.0.0 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 107 +++++++++++++++--- 2 files changed, 95 insertions(+), 14 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 20c353259841..8475fc0d3f1a 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -17,7 +17,7 @@ "ajv": "6.10.2", "autoprefixer": "9.6.1", "browserslist": "4.7.0", - "cacache": "12.0.3", + "cacache": "13.0.0", "caniuse-lite": "1.0.30000997", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", diff --git a/yarn.lock b/yarn.lock index 1969d4b3346e..42c83b0f3605 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1685,6 +1685,14 @@ agentkeepalive@^3.4.1: dependencies: humanize-ms "^1.2.1" +aggregate-error@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.0.tgz#5b5a3c95e9095f311c9ab16c19fb4f3527cd3f79" + integrity sha512-yKD9kEoJIR+2IFqhMwayIBgheLYbB3PS2OBhWae1L/ODTd/JF/30cW0bc9TqzRL3k4U41Dieu3BF4I29p8xesA== + dependencies: + clean-stack "^2.0.0" + indent-string "^3.2.0" + ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -2460,17 +2468,40 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@12.0.3, cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: - version "12.0.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" - integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== +cacache@13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.0.tgz#1797c957bcddf7bc697520920e3a284e64fc21cc" + integrity sha512-hc9ozSyxintw3TulgdYl5q3ZMjugHYI8lE5hd1S6E1/7OwLf0vNlBdCaROlzHxE5x0lUpFx+B3iMjWmcHDRxiQ== + dependencies: + chownr "^1.1.2" + figgy-pudding "^3.5.1" + fs-minipass "^1.2.7" + glob "^7.1.4" + graceful-fs "^4.2.2" + infer-owner "^1.0.4" + lru-cache "^5.1.1" + minipass "^2.6.5" + minipass-collect "^1.0.1" + minipass-flush "^1.0.3" + minipass-pipeline "^1.1.2" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + p-map "^3.0.0" + promise-inflight "^1.0.1" + rimraf "^2.7.1" + ssri "^7.0.0" + unique-filename "^1.1.1" + +cacache@^11.3.3: + version "11.3.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.3.tgz#8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc" + integrity sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA== dependencies: bluebird "^3.5.5" chownr "^1.1.1" figgy-pudding "^3.5.1" glob "^7.1.4" graceful-fs "^4.1.15" - infer-owner "^1.0.3" lru-cache "^5.1.1" mississippi "^3.0.0" mkdirp "^0.5.1" @@ -2481,16 +2512,17 @@ cacache@12.0.3, cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^11.3.3: - version "11.3.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.3.tgz#8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc" - integrity sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA== +cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: + version "12.0.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" + integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== dependencies: bluebird "^3.5.5" chownr "^1.1.1" figgy-pudding "^3.5.1" glob "^7.1.4" graceful-fs "^4.1.15" + infer-owner "^1.0.3" lru-cache "^5.1.1" mississippi "^3.0.0" mkdirp "^0.5.1" @@ -2716,6 +2748,11 @@ clean-css@4.2.1, clean-css@^4.1.11: dependencies: source-map "~0.6.0" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + cli-boxes@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" @@ -4507,7 +4544,7 @@ fs-extra@^8.0.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: +fs-minipass@^1.2.5, fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== @@ -4787,7 +4824,7 @@ got@^9.5.0, got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== @@ -5189,7 +5226,7 @@ indent-string@^2.1.0: dependencies: repeating "^2.0.0" -indent-string@^3.0.0: +indent-string@^3.0.0, indent-string@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= @@ -6822,6 +6859,27 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= +minipass-collect@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.1.tgz#4e145371e0032332d398bb0e18bdbd56b7131443" + integrity sha512-mg9mz9bTiormVPZ0+1ywhx378ZL64RXpzyFByQ/qpLg2ZpXgyMNYnSSrE2GMW/q0JwaEfzcJySPcItQI/eTTHA== + dependencies: + minipass "^2.5.1" + +minipass-flush@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.4.tgz#e43261649da7ff9b9db529edc635b8f835411759" + integrity sha512-xr8SwVhu0UQTN3Fn8A2kyFubTZX/UCMDi0z7/LtyFkaTu8+5m0XeWODyj/gY1fG/GAf6qGfODfPc8RmHVaYJ+A== + dependencies: + minipass "^2.6.2" + +minipass-pipeline@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.0.tgz#deb473f0e72c8ef72cc712433cc921e52d8e6ee2" + integrity sha512-enqZIVhYZGGh5nTAoDz8yfp0V8fPGpvtExanqpGj8O/gNo8RQIRKFEfRpCMVLW8D/7Zq1NuXMVvCcGoyCGycZw== + dependencies: + minipass "^2.8.1" + minipass@^2.2.1, minipass@^2.3.5, minipass@^2.6.0, minipass@^2.6.4: version "2.8.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.2.tgz#17ce3a7ecac3bdb8cafc9caf311e9176e6c840db" @@ -6830,6 +6888,14 @@ minipass@^2.2.1, minipass@^2.3.5, minipass@^2.6.0, minipass@^2.6.4: safe-buffer "^5.1.2" yallist "^3.0.0" +minipass@^2.5.1, minipass@^2.6.2, minipass@^2.6.5, minipass@^2.8.1: + version "2.8.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.6.tgz#620d889ace26356391d010ecb9458749df9b6db5" + integrity sha512-lFG7d6g3+/UaFDCOtqPiKAC9zngWWsQZl1g5q6gaONqrjq61SX2xFqXMleQiFVyDpYwa018E9hmlAFY22PCb+A== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + minizlib@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.2.tgz#6f0ccc82fa53e1bf2ff145f220d2da9fa6e3a166" @@ -7499,6 +7565,13 @@ p-map@^2.0.0: resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== +p-map@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== + dependencies: + aggregate-error "^3.0.0" + p-retry@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" @@ -8713,7 +8786,7 @@ rfdc@^1.1.2, rfdc@^1.1.4: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" integrity sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug== -rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -9514,6 +9587,14 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" +ssri@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.0.0.tgz#5c2229910a91b6c161312a8d2608d3e83e82c431" + integrity sha512-cvBRrMQrBppFp7QQqh2zME8/Fek9akLhpAq6C78Q5npH8vonxkInB/nLIslb3NRCOKoM/PgUvKHd/zojlFCHlQ== + dependencies: + figgy-pudding "^3.5.1" + minipass "^2.5.1" + static-eval@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.2.tgz#2d1759306b1befa688938454c546b7871f806a42" From 3af79b90f828365f1ac49bd0db27d15cc8d4ff4c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 26 Sep 2019 11:24:14 +0100 Subject: [PATCH 0217/1070] ci: fix missing workspace on e2e-cli-win --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7cc0729f27d0..0b7ac5a444d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -330,6 +330,7 @@ jobs: executor: windows-executor parallelism: 4 steps: + - custom_attach_workspace - setup_windows - run: node tests\legacy-cli\run_e2e.js --nb-shards=$env:CIRCLE_NODE_TOTAL --shard=$env:CIRCLE_NODE_INDEX From 0cf8ce56a69d99b0cdead234ed1cb52ade61d640 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 26 Sep 2019 11:58:35 +0200 Subject: [PATCH 0218/1070] fix(@ngtools/webpack): `exportLazyModuleMap` should not be executed in Ivy The export lazy module map is required only for string based lazy loading which is not supported in Ivy. --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 383aa9abae5c..a7f0ad7a8c17 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -1012,7 +1012,12 @@ export class AngularCompilerPlugin { )); } } else if (this._platform === PLATFORM.Server) { - this._transformers.push(exportLazyModuleMap(isMainPath, getLazyRoutes)); + // The export lazy module map is required only for string based lazy loading + // which is not supported in Ivy + if (!this._compilerOptions.enableIvy) { + this._transformers.push(exportLazyModuleMap(isMainPath, getLazyRoutes)); + } + if (this._useFactories) { this._transformers.push( exportNgFactory(isMainPath, getEntryModule), From e2e7dee752c8a5e78cd007a40767fc774a2cc1b1 Mon Sep 17 00:00:00 2001 From: mgechev Date: Thu, 26 Sep 2019 10:51:14 -0700 Subject: [PATCH 0219/1070] feat(@schematics/angular): use codelyzer@5.1.2 --- .../angular/migrations/update-9/update-dependencies.ts | 1 + .../schematics/angular/workspace/files/package.json.template | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-9/update-dependencies.ts b/packages/schematics/angular/migrations/update-9/update-dependencies.ts index 301511f653b3..41456d0087c5 100644 --- a/packages/schematics/angular/migrations/update-9/update-dependencies.ts +++ b/packages/schematics/angular/migrations/update-9/update-dependencies.ts @@ -19,6 +19,7 @@ export function updateDependencies() { 'zone.js': latestVersions.ZoneJs, 'ng-packagr': latestVersions.ngPackagr, 'web-animations-js': '^2.3.2', + 'codelyzer': '^5.1.2', }; for (const [name, version] of Object.entries(dependenciesToUpdate)) { diff --git a/packages/schematics/angular/workspace/files/package.json.template b/packages/schematics/angular/workspace/files/package.json.template index ab9ca49e228d..b68d512f46ac 100644 --- a/packages/schematics/angular/workspace/files/package.json.template +++ b/packages/schematics/angular/workspace/files/package.json.template @@ -30,7 +30,7 @@ "@types/node": "~8.9.4",<% if (!minimal) { %> "@types/jasmine": "~3.4.0", "@types/jasminewd2": "~2.0.3", - "codelyzer": "^5.1.0", + "codelyzer": "^5.1.2", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.2.0", From 5393041747835f4d14521e739fe02bc2ab2cb06b Mon Sep 17 00:00:00 2001 From: mgechev Date: Thu, 26 Sep 2019 10:58:16 -0700 Subject: [PATCH 0220/1070] fix(@schematics/angular): drop deprecated tslint rule >no-use-before-declare is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead. --- packages/schematics/angular/workspace/files/tslint.json.template | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schematics/angular/workspace/files/tslint.json.template b/packages/schematics/angular/workspace/files/tslint.json.template index 9c729f991da5..e77091336b06 100644 --- a/packages/schematics/angular/workspace/files/tslint.json.template +++ b/packages/schematics/angular/workspace/files/tslint.json.template @@ -48,7 +48,6 @@ "no-non-null-assertion": true, "no-redundant-jsdoc": true, "no-switch-case-fall-through": true, - "no-use-before-declare": true, "no-var-requires": false, "object-literal-key-quotes": [ true, From dd2a6947ff8bad2e2b35aa75175dd3a3e5d13f8c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 26 Sep 2019 20:27:42 -0400 Subject: [PATCH 0221/1070] refactor(@angular-devkit/build-angular): improve performance of parallel bundle processing --- .../angular_devkit/build_angular/package.json | 2 +- .../src/browser/action-executor.ts | 53 +++++++++++++++++++ .../build_angular/src/browser/index.ts | 52 ++++++++---------- .../build_angular/src/utils/process-bundle.ts | 9 +--- yarn.lock | 5 +- 5 files changed, 78 insertions(+), 43 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/browser/action-executor.ts diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 8475fc0d3f1a..a4ea8568a8bc 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -27,6 +27,7 @@ "find-cache-dir": "3.0.0", "glob": "7.1.4", "istanbul-instrumenter-loader": "3.0.1", + "jest-worker": "24.9.0", "karma-source-map-support": "1.4.0", "less": "3.10.3", "less-loader": "5.0.0", @@ -61,7 +62,6 @@ "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", "webpack-subresource-integrity": "1.3.3", - "worker-farm": "1.7.0", "worker-plugin": "3.2.0" }, "devDependencies": { diff --git a/packages/angular_devkit/build_angular/src/browser/action-executor.ts b/packages/angular_devkit/build_angular/src/browser/action-executor.ts new file mode 100644 index 000000000000..29f9d7a39b89 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/browser/action-executor.ts @@ -0,0 +1,53 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import JestWorker from 'jest-worker'; +import * as os from 'os'; + +export class ActionExecutor { + private largeWorker: JestWorker; + private smallWorker: JestWorker; + + private smallThreshold = 32 * 1024; + + constructor(actionFile: string, private readonly actionName: string) { + // larger files are processed in a separate process to limit memory usage in the main process + this.largeWorker = new JestWorker(actionFile, { + exposedMethods: [actionName], + }); + + // small files are processed in a limited number of threads to improve speed + // The limited number also prevents a large increase in memory usage for an otherwise short operation + this.smallWorker = new JestWorker(actionFile, { + exposedMethods: [actionName], + numWorkers: os.cpus().length < 2 ? 1 : 2, + // Will automatically fallback to processes if not supported + enableWorkerThreads: true, + }); + } + + execute(options: Input): Promise { + if (options.size > this.smallThreshold) { + return ((this.largeWorker as unknown) as Record Promise>)[ + this.actionName + ](options); + } else { + return ((this.smallWorker as unknown) as Record Promise>)[ + this.actionName + ](options); + } + } + + executeAll(options: Input[]): Promise { + return Promise.all(options.map(o => this.execute(o))); + } + + stop() { + this.largeWorker.end(); + this.smallWorker.end(); + } +} diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 6ad5518856bb..0cc9cbf753ab 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -31,7 +31,6 @@ import { Observable, from, of } from 'rxjs'; import { bufferCount, catchError, concatMap, map, mergeScan, switchMap } from 'rxjs/operators'; import { ScriptTarget } from 'typescript'; import * as webpack from 'webpack'; -import * as workerFarm from 'worker-farm'; import { NgBuildAnalyticsPlugin } from '../../plugins/webpack/analytics'; import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; import { @@ -78,6 +77,7 @@ import { getIndexInputFile, getIndexOutputFile, } from '../utils/webpack-browser-config'; +import { ActionExecutor } from './action-executor'; import { Schema as BrowserBuilderSchema } from './schema'; const cacache = require('cacache'); @@ -115,7 +115,7 @@ export async function buildBrowserWebpackConfigFromContext( options: BrowserBuilderSchema, context: BuilderContext, host: virtualFs.Host = new NodeJsSyncHost(), -): Promise<{ config: webpack.Configuration[], projectRoot: string, projectSourceRoot?: string }> { +): Promise<{ config: webpack.Configuration[]; projectRoot: string; projectSourceRoot?: string }> { return generateBrowserWebpackConfigFromContext( options, context, @@ -587,35 +587,25 @@ export function buildWebpackBrowser( } if (processActions.length > 0) { - await new Promise((resolve, reject) => { - const workerFile = require.resolve('../utils/process-bundle'); - const workers = workerFarm( - { - maxRetries: 1, - }, - path.extname(workerFile) !== '.ts' - ? workerFile - : require.resolve('../utils/process-bundle-bootstrap'), - ['process'], - ); - let completed = 0; - const workCallback = (error: Error | null, result: ProcessBundleResult) => { - if (error) { - workerFarm.end(workers); - reject(error); - - return; - } - - processResults.push(result); - if (++completed === processActions.length) { - workerFarm.end(workers); - resolve(); - } - }; + const workerFile = require.resolve('../utils/process-bundle'); + const executor = new ActionExecutor< + ProcessBundleOptions & { size: number }, + ProcessBundleResult + >( + path.extname(workerFile) !== '.ts' + ? workerFile + : require.resolve('../utils/process-bundle-bootstrap'), + 'process', + ); - processActions.forEach(action => workers['process'](action, workCallback)); - }); + try { + const results = await executor.executeAll( + processActions.map(a => ({ ...a, size: a.code.length })), + ); + results.forEach(result => processResults.push(result)); + } finally { + executor.stop(); + } } // Runtime must be processed after all other files @@ -625,7 +615,7 @@ export function buildWebpackBrowser( runtimeData: processResults, }; processResults.push( - await import('../utils/process-bundle').then(m => m.processAsync(runtimeOptions)), + await import('../utils/process-bundle').then(m => m.process(runtimeOptions)), ); } diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 1313660cc610..d6836ebf9daa 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -57,14 +57,7 @@ export const enum CacheKey { DownlevelMap = 3, } -export function process( - options: ProcessBundleOptions, - callback: (error: Error | null, result?: ProcessBundleResult) => void, -): void { - processAsync(options).then(result => callback(null, result), error => callback(error)); -} - -export async function processAsync(options: ProcessBundleOptions): Promise { +export async function process(options: ProcessBundleOptions): Promise { if (!options.cacheKeys) { options.cacheKeys = []; } diff --git a/yarn.lock b/yarn.lock index 42c83b0f3605..c00fe0226e37 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5860,7 +5860,7 @@ jasminewd2@^2.1.0: resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e" integrity sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4= -jest-worker@^24.9.0: +jest-worker@24.9.0, jest-worker@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== @@ -8959,7 +8959,6 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" - uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: @@ -10890,7 +10889,7 @@ wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -worker-farm@1.7.0, worker-farm@^1.7.0: +worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== From 190f80cf582241c7f16193137569613007db5b9f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 26 Sep 2019 20:51:44 -0400 Subject: [PATCH 0222/1070] refactor(@angular-devkit/build-angular): optimize bundle process cache detection This causes the cache checking to stop on the first miss since all required entries must be present for a bundle to be considered cached. --- .../build_angular/src/browser/index.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 0cc9cbf753ab..66f4bdd755ef 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -449,23 +449,20 @@ export function buildWebpackBrowser( // Attempt to get required cache entries const cacheEntries = []; + let cached = cacheKeys.length > 0; for (const key of cacheKeys) { if (key) { - cacheEntries.push(await cacache.get.info(cacheDownlevelPath, key)); + const entry = await cacache.get.info(cacheDownlevelPath, key); + if (!entry) { + cached = false; + break; + } + cacheEntries.push(entry); } else { cacheEntries.push(null); } } - // Check if required cache entries are present - let cached = cacheKeys.length > 0; - for (let i = 0; i < cacheKeys.length; ++i) { - if (cacheKeys[i] && !cacheEntries[i]) { - cached = false; - break; - } - } - // If all required cached entries are present, use the cached entries // Otherwise process the files // If SRI is enabled always process the runtime bundle From b4eac6751123c7dc817030a5b339432690e3fab0 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 27 Sep 2019 12:24:06 +0200 Subject: [PATCH 0223/1070] test: enable ctor parameter transformer test that was previously disabled --- .../src/transformers/ctor-parameters_spec.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts b/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts index 99f63692b141..ae881fa82818 100644 --- a/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts +++ b/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts @@ -93,16 +93,13 @@ describe('Constructor Parameter Transformer', () => { expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); - // The current testing infrastructure does not support this test - // Aliased TS symbols are resolved to 'unknown' - xit('records class name of root-provided injectable in imported module', () => { + it('records class name of root-provided injectable in imported module', () => { const rootProvided = { - 'root-provided-service': ` + 'root-provided-service.ts': ` @Injectable({ providedIn: 'root' }) export class RootProvidedService { - constructor() { } } `, @@ -117,7 +114,17 @@ describe('Constructor Parameter Transformer', () => { } `; - const output = `export class MyService { constructor(v) { } } MyService.ctorParameters = () => [ { type: RootProvidedService } ];`; + const output = ` + import * as tslib_1 from "tslib"; + import { RootProvidedService } from './root-provided-service'; + + let MyService = class MyService { + constructor(v) { } + }; + MyService.ctorParameters = () => [ { type: RootProvidedService } ]; + MyService = tslib_1.__decorate([ Injectable() ], MyService); + export { MyService }; + `; const result = transform(input, rootProvided); From fe54ab87e46f558f9d54a81332a5f51ec987e741 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Sep 2019 16:59:02 +0100 Subject: [PATCH 0224/1070] fix(@ngtools/webpack): don't delete virtual files for resources still on disk Fix https://github.com/angular/angular-cli/issues/15453 --- packages/ngtools/webpack/src/compiler_host.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts index ff943bc5256c..ae898e43d1e2 100644 --- a/packages/ngtools/webpack/src/compiler_host.ts +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -141,10 +141,16 @@ export class WebpackCompilerHost implements ts.CompilerHost { return; } - for (const ext of this._virtualStyleFileExtensions) { - const virtualFile = (fullPath + ext) as Path; - if (this._memoryHost.exists(virtualFile)) { - this._memoryHost.delete(virtualFile); + if (!exists) { + // At this point we're only looking at resource files (html/css/scss/etc). + // If the original was deleted, we should delete the virtual files too. + // If the original it wasn't deleted we should leave them to be overwritten, because webpack + // might begin the loading process before our plugin has re-emitted them. + for (const ext of this._virtualStyleFileExtensions) { + const virtualFile = (fullPath + ext) as Path; + if (this._memoryHost.exists(virtualFile)) { + this._memoryHost.delete(virtualFile); + } } } } From 102cd86a8ea33bf1c3dc8cb75b8727c2f239c3d5 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Sep 2019 16:59:24 +0100 Subject: [PATCH 0225/1070] fix(@angular-devkit/build-angular): don't double process factory files --- .../src/angular-cli-files/models/webpack-configs/common.ts | 2 ++ packages/ngtools/webpack/src/compiler_host.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 984efbe979a1..f05aff592888 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -468,6 +468,8 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { }, { test: /\.js$/, + // Factory files are processed by BO in the rules added in typescript.ts. + exclude: /(ngfactory|ngstyle)\.js$/, ...buildOptimizerUseRule, }, { diff --git a/packages/ngtools/webpack/src/compiler_host.ts b/packages/ngtools/webpack/src/compiler_host.ts index ae898e43d1e2..93bf04cff1d2 100644 --- a/packages/ngtools/webpack/src/compiler_host.ts +++ b/packages/ngtools/webpack/src/compiler_host.ts @@ -144,7 +144,7 @@ export class WebpackCompilerHost implements ts.CompilerHost { if (!exists) { // At this point we're only looking at resource files (html/css/scss/etc). // If the original was deleted, we should delete the virtual files too. - // If the original it wasn't deleted we should leave them to be overwritten, because webpack + // If the original wasn't deleted we should leave them to be overwritten, because webpack // might begin the loading process before our plugin has re-emitted them. for (const ext of this._virtualStyleFileExtensions) { const virtualFile = (fullPath + ext) as Path; From 941c6af1ed79d4aac7604773265650142346b099 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 25 Sep 2019 14:11:52 -0400 Subject: [PATCH 0226/1070] fix(@angular-devkit/build-angular): downlevel with non-loose ECMA compliance This ensures that the ES5 bundles operate consistently with the ES2015+ bundles. Fixes #15673 --- .../angular_devkit/build_angular/src/utils/process-bundle.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index d6836ebf9daa..f0e9f5c07600 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -98,10 +98,9 @@ export async function process(options: ProcessBundleOptions): Promise Date: Fri, 27 Sep 2019 23:28:42 +0000 Subject: [PATCH 0227/1070] build: update @angular/animations to version --- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index e009dd0cd528..5404fa4cb3bc 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#85c3ab82a145826c501b780c3da4cadd129212d4", - "@angular/common": "github:angular/common-builds#d86c5b145e5b00a8b0d0602529e4653aef2acd91", - "@angular/compiler": "github:angular/compiler-builds#5261e76a993c85e89c893b1aa51d2cb640f6d2ce", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#36506e91360abda25c12e9237b1bc438cf43923c", - "@angular/core": "github:angular/core-builds#9266b42001a954fb5d0ffdddd2703b6478eb4d24", - "@angular/forms": "github:angular/forms-builds#c61fabb0cded0d878098b780be34fd3481aba974", - "@angular/language-service": "github:angular/language-service-builds#c3c8e8993b8c341676045f831ac3e6c7b6f47931", - "@angular/platform-browser": "github:angular/platform-browser-builds#cb6ce64c0b32a8407d8522d356a84607dd23d676", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#1cae33c84b9cc3ffae42e166ec7b78de7b468101", - "@angular/router": "github:angular/router-builds#0a079c227febe1b29c19ca039dd5fb9dbbc3b1e9" + "@angular/animations": "github:angular/animations-builds#d9c95a98ab03d2a94f6cd14af4f0c61fb986e04b", + "@angular/common": "github:angular/common-builds#6f9d910df1604baa913119744e984165b7dd8786", + "@angular/compiler": "github:angular/compiler-builds#4307078b0da26ef562eead5733b077f755466cf7", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#5482fc3f6ac792c7812657cacd6e4db7f6df1cab", + "@angular/core": "github:angular/core-builds#7dfaeca7a6ec2ca0949095df2ed072436e0fb02c", + "@angular/forms": "github:angular/forms-builds#7a0700bc804ffe113abe234c0b2d6c3af7a57062", + "@angular/language-service": "github:angular/language-service-builds#405471457b9ed0d93d60eb1b64a14066c55c472d", + "@angular/platform-browser": "github:angular/platform-browser-builds#272a149be8baa1892847085d5854ea99181124f6", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#381dda6deffb18eca38f2b4e8fdeab0f3670b39a", + "@angular/router": "github:angular/router-builds#04b7f6c24f4252c55134599b8aa364a07c5483b4" } } \ No newline at end of file From 6525d59fea8fafe621efd8ef47561239ad1c7df5 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 28 Sep 2019 15:36:16 +0000 Subject: [PATCH 0228/1070] build: update webpack-dev-middleware to version 3.7.2 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index a4ea8568a8bc..10fca7501576 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -57,7 +57,7 @@ "terser": "4.3.2", "terser-webpack-plugin": "2.1.0", "webpack": "4.41.0", - "webpack-dev-middleware": "3.7.1", + "webpack-dev-middleware": "3.7.2", "webpack-dev-server": "3.8.1", "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", diff --git a/yarn.lock b/yarn.lock index c00fe0226e37..14f890ac489e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10704,7 +10704,18 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@3.7.1, webpack-dev-middleware@^3.7.1: +webpack-dev-middleware@3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" + integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== + dependencies: + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" + range-parser "^1.2.1" + webpack-log "^2.0.0" + +webpack-dev-middleware@^3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09" integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A== From fca9cbe6fd5a2065f06e69e4e38189ad339c6f71 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 30 Sep 2019 19:13:43 +0200 Subject: [PATCH 0229/1070] feat(@schematics/angular): update browser output path when adding universal Currently, in the CLI universal schematic we are setting the server output path to `dist/project-server` and not amending the build outputPath Ex: ``` dist/project dist/project-server ``` However, the above paths are being update when adding `nguniversal` to the below: ``` dist/project/browser dist/project/server ``` With this change it is proposed to move that logic to upstream. Related PR to clean up nguniversal schematics https://github.com/angular/universal/pull/1265 --- packages/schematics/angular/universal/index.ts | 6 +++++- packages/schematics/angular/universal/index_spec.ts | 12 +++++++++++- .../tests/build/build-app-shell-with-schematic.ts | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 0cf76e255e19..926150efb45b 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -49,12 +49,16 @@ function updateConfigFile(options: UniversalOptions, tsConfigDirectory: Path): R fileReplacements = buildTarget.configurations.production.fileReplacements; } + if (buildTarget && buildTarget.options) { + buildTarget.options.outputPath = `dist/${options.clientProject}/browser`; + } + const mainPath = options.main as string; clientProject.targets.add({ name: 'server', builder: Builders.Server, options: { - outputPath: `dist/${options.clientProject}-server`, + outputPath: `dist/${options.clientProject}/server`, main: join(normalize(clientProject.root), 'src', mainPath.endsWith('.ts') ? mainPath : mainPath + '.ts'), tsConfig: join(tsConfigDirectory, `${options.tsconfigFileName}.json`), }, diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 3c3cb9256f2b..d2ab6ff616bc 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -149,7 +149,7 @@ describe('Universal Schematic', () => { expect(targets.server).toBeDefined(); expect(targets.server.builder).toBeDefined(); const opts = targets.server.options; - expect(opts.outputPath).toEqual('dist/bar-server'); + expect(opts.outputPath).toEqual('dist/bar/server'); expect(opts.main).toEqual('projects/bar/src/main.server.ts'); expect(opts.tsConfig).toEqual('projects/bar/tsconfig.server.json'); const configurations = targets.server.configurations; @@ -161,6 +161,16 @@ describe('Universal Schematic', () => { expect(fileReplacements[0].with).toEqual('projects/bar/src/environments/environment.prod.ts'); }); + it('should update workspace with a build target outputPath', async () => { + const tree = await schematicRunner.runSchematicAsync('universal', defaultOptions, appTree) + .toPromise(); + const filePath = '/angular.json'; + const contents = tree.readContent(filePath); + const config = JSON.parse(contents.toString()); + const targets = config.projects.bar.architect; + expect(targets.build.options.outputPath).toEqual('dist/bar/browser'); + }); + it('should add a server transition to BrowerModule import', async () => { const tree = await schematicRunner.runSchematicAsync('universal', defaultOptions, appTree) .toPromise(); diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts index 6a628f7f89bf..f610c4d2bcc7 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts @@ -17,8 +17,8 @@ export default async function () { await silentNpm('install'); await ng('run', 'test-project:app-shell'); - await expectFileToMatch('dist/test-project/index.html', /app-shell works!/); + await expectFileToMatch('dist/test-project/browser/index.html', /app-shell works!/); await ng('run', 'test-project:app-shell:production'); - await expectFileToMatch('dist/test-project/index.html', /app-shell works!/); + await expectFileToMatch('dist/test-project/browser/index.html', /app-shell works!/); } From c07c2a7eba2a7fd9bc8a188860207afafc9327a8 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 30 Sep 2019 18:24:04 +0000 Subject: [PATCH 0230/1070] build: update to version --- yarn.lock | 284 ++++++++++++++++++++++++------------------------------ 1 file changed, 125 insertions(+), 159 deletions(-) diff --git a/yarn.lock b/yarn.lock index 14f890ac489e..34f71eed634d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -138,18 +138,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.0.tgz#e2c21efbfd3293ad819a2359b448f002bfdfda56" - integrity sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA== - dependencies: - "@babel/types" "^7.6.0" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/generator@^7.6.2": +"@babel/generator@^7.4.0", "@babel/generator@^7.6.2": version "7.6.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.2.tgz#dac8a3c2df118334c2a29ff3446da1636a8f8c03" integrity sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ== @@ -332,12 +321,7 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.0.tgz#3e05d0647432a8326cb28d0de03895ae5a57f39b" - integrity sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ== - -"@babel/parser@^7.6.2": +"@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.2": version "7.6.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.2.tgz#205e9c95e16ba3b8b96090677a67c9d6075b70a1" integrity sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg== @@ -729,10 +713,10 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/runtime@^7.4.5": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.0.tgz#4fc1d642a9fd0299754e8b5de62c631cf5568205" - integrity sha512-89eSBLJsxNxOERC0Op4vd+0Bqm6wRMqMbFtV3i0/fbaWw/mJ8Q3eBvgX0G4SyrOOLCtbu98HspF8o09MRT+KzQ== +"@babel/runtime@^7.5.5": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.2.tgz#c3d6e41b304ef10dcf13777a33e7694ec4a9a6dd" + integrity sha512-EXxN64agfUqqIGeEjI5dL5z0Sw0ZwWo1mLTi4mQowCZ42O59b7DRpZAnTC6OqdF28wMBMFKNb/4uFGrVaigSpg== dependencies: regenerator-runtime "^0.13.2" @@ -745,22 +729,7 @@ "@babel/parser" "^7.6.0" "@babel/types" "^7.6.0" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.0.tgz#389391d510f79be7ce2ddd6717be66d3fed4b516" - integrity sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.6.0" - "@babel/types" "^7.6.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/traverse@^7.6.2": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.2": version "7.6.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.2.tgz#b0e2bfd401d339ce0e6c05690206d1e11502ce2c" integrity sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ== @@ -835,9 +804,9 @@ "@bazel/buildifier-win32_x64" "0.29.0" "@bazel/hide-bazel-files@latest": - version "0.37.1" - resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.37.1.tgz#70702139318996672d279024076427f2b8ab6879" - integrity sha512-9wDXQHG4MitPIFvQOKi1zFzSI79mzH5R3iWa/e/nuhD+uVfeOaoyAGTCiwxm13/sGt/Hjlx3vRb8WT7ucq0ouw== + version "0.38.0" + resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.0.tgz#84007bc5653e7aaa671a072760342e00a494008a" + integrity sha512-zXUCVxx2DZZ1CD1k04tLEhs/V1Dey96q6CBQafC9gux72Z93xsF4qQer5RcglCCdLcBut2KBeky87ueRwgPOjw== "@bazel/jasmine@0.37.1": version "0.37.1" @@ -1017,7 +986,7 @@ resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== -"@types/estree@0.0.39": +"@types/estree@*", "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== @@ -1083,9 +1052,9 @@ "@types/through" "*" "@types/jasmine@~3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.0.tgz#018c56db42400c092aae47de21f710b7f04e4b06" - integrity sha512-6pUnBg6DuSB55xnxJ5+gW9JOkFrPsXkYAuqqEE8oyrpgDiPQ+TZ+1Zt4S+CHcRJcxyNYXeIXG4vHSzdF6y9Uvw== + version "3.4.1" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.1.tgz#214496efdd7870f133051a95d1692f9cc0730ee7" + integrity sha512-kA2/srq6lb/kiczw+l/yW7lKdAN9Ae5A/pp1bhu8RBzhYY/ybc1hwav3sWrPyAwSRcAS95NVB0uZdM62qT75EA== "@types/karma@^3.0.2": version "3.0.3" @@ -1125,16 +1094,16 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node-fetch@^2.1.6": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.1.tgz#9e4daffa983eb098d25c2cb410c949678f3aee78" - integrity sha512-nYsC20tHanaNa4coFvCDcuIvtdvu8YkQz0XQOoBHL1X1y1QxeNe73dg1PaLGqsJNWiVwK0bjn5Jf+ZQpE6acJg== + version "2.5.2" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.2.tgz#76906dea5b3d6901e50e63e15249c9bcd6e9676e" + integrity sha512-djYYKmdNRSBtL1x4CiE9UJb9yZhwtI1VC+UxZD0psNznrUj80ywsxKlEGAE+QL1qvLjPbfb24VosjkYM6W4RSQ== dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^12.7.5": - version "12.7.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.5.tgz#e19436e7f8e9b4601005d73673b6dc4784ffcc2f" - integrity sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w== +"@types/node@*": + version "12.7.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.8.tgz#cb1bf6800238898bc2ff6ffa5702c3cadd350708" + integrity sha512-FMdVn84tJJdV+xe+53sYiZS4R5yn1mAIxfj+DVoNiQjTYz1+OYmjwEZr1ev9nU0axXwda0QDbYl06QHanRVH3A== "@types/node@10.9.4": version "10.9.4" @@ -1142,9 +1111,9 @@ integrity sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw== "@types/node@^10.1.0": - version "10.14.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.18.tgz#b7d45fc950e6ffd7edc685e890d13aa7b8535dce" - integrity sha512-ryO3Q3++yZC/+b8j8BdKd/dn9JlzlHBPdm80656xwYUdmPkpTGTjkAdt6BByiNupGPE8w0FhBgvYy/fX9hRNGQ== + version "10.14.19" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.19.tgz#f52742c7834a815dedf66edfc8a51547e2a67342" + integrity sha512-j6Sqt38ssdMKutXBUuAcmWF8QtHW1Fwz/mz4Y+Wd9mzpBiVFirjpNQf363hG5itkG+yGaD+oiLyb50HxJ36l9Q== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1339,9 +1308,9 @@ integrity sha512-CCM1yPGAAg/WRlBEUIzRAqEE0G84n1btOVRybHgQ+AdA6+LgM0DeDH8yBWtcpg3HcrLHA9JWiHwPpySlo5GtZA== "@types/urijs@^1.19.1": - version "1.19.3" - resolved "https://registry.yarnpkg.com/@types/urijs/-/urijs-1.19.3.tgz#ed90d38baf3eff1627544ad6ed3bcdeb79ef3533" - integrity sha512-L5tP2dEIV+OMVEVRhf8PCFMNMyO5ZBodrXpEqnGczky60lcv8l5Kl9Yi4J1yxhSVfHUe+Pr2nXJfDM+rUYNs3w== + version "1.19.4" + resolved "https://registry.yarnpkg.com/@types/urijs/-/urijs-1.19.4.tgz#29c4a694d4842d7f95e359a26223fc1865f1ab13" + integrity sha512-uHUvuLfy4YkRHL4UH8J8oRsINhdEHd9ymag7KJZVT94CjAmY1njoUzhazJsZjwfy+IpWKQKGVyXCwzhZvg73Fg== "@types/uuid@^3.4.4": version "3.4.5" @@ -1371,9 +1340,9 @@ source-map "^0.6.1" "@types/webpack@*", "@types/webpack@^4.32.1": - version "4.39.1" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.1.tgz#d76cd551cc851198f67f75ff3e26551d204530e9" - integrity sha512-rgO9ihNu/l72Sjx3shqwc9r6gi+tOMsqxhMEZhOEVIZt82GFOeUyEdpTk1BO2HqEHLS/XJW8ldUTIIfIMMyYFQ== + version "4.39.2" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.2.tgz#fcaa85607a9bdd0e8f86a350f239ff08aede8584" + integrity sha512-3c7+vcmyyIi3RBoOdXs8k3E9rQVIy6yOBqK0DFk6lnJ76JUfbDBWbEf1JflzyPQf56W4ToE+2YPnbxbucniW5w== dependencies: "@types/anymatch" "*" "@types/node" "*" @@ -1609,9 +1578,9 @@ JSONStream@1.3.5, JSONStream@^1.0.4, JSONStream@^1.3.4: through ">=2.2.7 <3" abab@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.1.tgz#3fa17797032b71410ec372e11668f4b4ffc86a82" - integrity sha512-1zSbbCuoIjafKZ3mblY5ikvAb0ODUbqBnFuUb7f6uLeQhhGJ0vEV4ntmtxKLT2WgXCO94E07BjunsIw1jOMPZw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.2.tgz#a2fba1b122c69a85caa02d10f9270c7219709a9d" + integrity sha512-2scffjvioEmNz0OyDSLGWDfKCVwaKc6l9Pm9kOIREU13ClXZvHpg/nRL5xyjSSSLhOnXqft2HpsAzNEEA8cFFg== abbrev@1: version "1.1.1" @@ -1649,10 +1618,10 @@ acorn@^6.0.1, acorn@^6.1.1, acorn@^6.2.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== -acorn@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.0.0.tgz#26b8d1cd9a9b700350b71c0905546f64d1284e7a" - integrity sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ== +acorn@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" + integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== adm-zip@^0.4.9, adm-zip@~0.4.3: version "0.4.13" @@ -2617,16 +2586,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000997: +caniuse-lite@1.0.30000997, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989: version "1.0.30000997" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000997.tgz#ba44a606804f8680894b7042612c2c7f65685b7e" integrity sha512-BQLFPIdj2ntgBNWp9Q64LGUIEmvhKkzzHhUHR3CD5A9Lb7ZKF20/+sgadhFap69lk5XmK1fTUleDclaRFvgVUA== -caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989: - version "1.0.30000989" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz#b9193e293ccf7e4426c5245134b8f2a56c0ac4b9" - integrity sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw== - canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" @@ -2697,9 +2661,9 @@ chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.8: fsevents "^1.2.7" chownr@^1.1.1, chownr@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6" - integrity sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A== + version "1.1.3" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" + integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== chrome-trace-event@^1.0.2: version "1.0.2" @@ -2820,9 +2784,9 @@ code-point-at@^1.0.0: integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= codelyzer@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-5.1.1.tgz#a599fa8c2a5847f553a792b934e493d1506a4a62" - integrity sha512-t8ZLSZBUjVFOJVk4jASLgmTdKWK/0ZsQCnPXy6PXw1LWOOormQOVnyy4OYoiZ6rAWTrz60Obx+zA2t8xY53QzQ== + version "5.1.2" + resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-5.1.2.tgz#e6c08269f8796483e57e6d9b7c29723572472b1d" + integrity sha512-1z7mtpwxcz5uUqq0HLO0ifj/tz2dWEmeaK+8c5TEZXAwwVxrjjg0118ODCOCCOcpfYaaEHxStNCaWVYo9FUPXw== dependencies: app-root-path "^2.2.1" aria-query "^3.0.0" @@ -2876,15 +2840,20 @@ combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@2.20.0, commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.0: +commander@2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.0: + version "2.20.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.1.tgz#3863ce3ca92d0831dcf2a102f5fb4b5926afd0f9" + integrity sha512-cCuLsMhJeWQ/ZpsFTbE765kvVfoeSddc4nU3up4fV+fDBcfUXnbITJ+JzhkdjzOqhURjZgujxaioam4RM9yGUg== + commander@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.1.tgz#4595aec3530525e671fb6f85fb173df8ff8bf57a" - integrity sha512-UNgvDd+csKdc9GD4zjtkHKQbT8Aspt2jCBqNSPp53vAS0L1tS9sXB2TCEOPHJ7kt9bN/niWkYj8T3RQSoMXdSQ== + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== common-tags@^1.8.0: version "1.8.0" @@ -3848,9 +3817,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.247: - version "1.3.264" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.264.tgz#ed837f44524d0601a7b2b7b6efd86e35753d0e27" - integrity sha512-z8E7WkrrquCuGYv+kKyybuZIbdms+4PeHp7Zm2uIgEhAigP0bOwqXILItwj0YO73o+QyHY/7XtEfP5DsHOWQgQ== + version "1.3.269" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.269.tgz#3e00cc9266a0123fc2e7b4f290899e257200e6e3" + integrity sha512-t2ZTfo07HxkxTOUbIwMmqHBSnJsC9heqJUm7LwQu2iSk0wNhG4H5cMREtb8XxeCrQABDZ6IqQKY3yZq+NfAqwg== elliptic@^6.0.0: version "6.5.1" @@ -3893,9 +3862,9 @@ encoding@^0.1.11: iconv-lite "~0.4.13" end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.2.tgz#080bf028edce8312b665ff18ea03cae0c3ac0ecb" - integrity sha512-gUSUszrsxlDnUbUwEI9Oygyrk4ZEWtVaHQc+uZHphVeNxl+qeqMV/jDWoTkjN1RmGlZ5QWAP7o458p/JMlikQg== + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" @@ -4846,9 +4815,9 @@ handlebars@4.1.2: uglify-js "^3.1.4" handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.1.2: - version "4.2.1" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.1.tgz#dc69c0e61604224f0c23b38b5b6741db210b57da" - integrity sha512-bqPIlDk06UWbVEIFoYj+LVo42WhK96J+b25l7hbFDpxrOXMphFM3fNIm+cluwg4Pk2jiLjWU5nHQY7igGE75NQ== + version "4.4.0" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.0.tgz#22e1a897c5d83023d39801f35f6b65cf97ed8b25" + integrity sha512-xkRtOt3/3DzTKMOt3xahj2M/EqNhY988T+imYSlMgs5fVhLN2fmKVVj0LtEGmb+3UUYV5Qmm1052Mm3dIQxOvw== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -5339,9 +5308,9 @@ ipaddr.js@^1.9.0: integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== is-absolute-url@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.2.tgz#554f2933e7385cc46e94351977ca2081170a206e" - integrity sha512-+5g/wLlcm1AcxSP7014m6GvbPHswDx980vD/3bZaap8aGV9Yfs7Q6y6tfaupgZ5O74Byzc8dGrSCJ+bFXx0KdA== + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" + integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== is-accessor-descriptor@^0.1.6: version "0.1.6" @@ -5586,9 +5555,9 @@ is-promise@^2.1.0: integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= is-reference@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.3.tgz#e99059204b66fdbe09305cfca715a29caa5c8a51" - integrity sha512-W1iHHv/oyBb2pPxkBxtaewxa1BC58Pn5J0hogyCdefwUIvb6R+TGbAcIa4qPNYLqLhb3EnOgUf2MQkkF76BcKw== + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427" + integrity sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== dependencies: "@types/estree" "0.0.39" @@ -6547,7 +6516,7 @@ lunr-mutable-indexes@2.3.2: resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.6.tgz#f278beee7ffd56ad86e6e478ce02ab2b98c78dd5" integrity sha512-swStvEyDqQ85MGpABCMBclZcLI/pBIlu8FFDtmX197+oEgKloJ67QnB+Tidh0340HmLMs39c4GrkPY3cmkXp6Q== -magic-string@0.25.3, magic-string@^0.25.0, magic-string@^0.25.2: +magic-string@0.25.3: version "0.25.3" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9" integrity sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA== @@ -6561,6 +6530,13 @@ magic-string@^0.22.4: dependencies: vlq "^0.2.2" +magic-string@^0.25.0, magic-string@^0.25.2: + version "0.25.4" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143" + integrity sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw== + dependencies: + sourcemap-codec "^1.4.4" + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -6773,9 +6749,9 @@ mime-db@1.40.0: integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== "mime-db@>= 1.40.0 < 2": - version "1.41.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.41.0.tgz#9110408e1f6aa1b34aef51f2c9df3caddf46b6a0" - integrity sha512-B5gxBI+2K431XW8C2rcc/lhppbuji67nf9v39eH8pkWoZDxnAL0PxdpH32KYRScniF8qDHBDlI+ipgg5WrCUYw== + version "1.42.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.42.0.tgz#3e252907b4c7adb906597b4b65636272cf9e7bac" + integrity sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ== mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.24" @@ -6874,34 +6850,34 @@ minipass-flush@^1.0.3: minipass "^2.6.2" minipass-pipeline@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.0.tgz#deb473f0e72c8ef72cc712433cc921e52d8e6ee2" - integrity sha512-enqZIVhYZGGh5nTAoDz8yfp0V8fPGpvtExanqpGj8O/gNo8RQIRKFEfRpCMVLW8D/7Zq1NuXMVvCcGoyCGycZw== + version "1.2.1" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.1.tgz#6e195376fc77fc2eeb7b8476abf7fbad03d76c0a" + integrity sha512-z6lkn/teAcodsoV5UyJtSLFHnw5YSGUW5BG0VsOLow7cPXFsD4LMeH+x3AVQS9rJ9hsIbCq2LMbVKSMj8cglYA== dependencies: minipass "^2.8.1" -minipass@^2.2.1, minipass@^2.3.5, minipass@^2.6.0, minipass@^2.6.4: - version "2.8.2" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.2.tgz#17ce3a7ecac3bdb8cafc9caf311e9176e6c840db" - integrity sha512-b+Eph8Vj+LLlW739/5jV9aTOQ7lnnyeZ8NbZnK+RqqH702jj6//10UnE0ufPUaBKdJpUZi0CnOUyRIQH1YQAwQ== +minipass@^2.3.5, minipass@^2.5.1, minipass@^2.6.0, minipass@^2.6.2, minipass@^2.6.5, minipass@^2.8.1, minipass@^2.8.6: + version "2.8.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.6.tgz#620d889ace26356391d010ecb9458749df9b6db5" + integrity sha512-lFG7d6g3+/UaFDCOtqPiKAC9zngWWsQZl1g5q6gaONqrjq61SX2xFqXMleQiFVyDpYwa018E9hmlAFY22PCb+A== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" -minipass@^2.5.1, minipass@^2.6.2, minipass@^2.6.5, minipass@^2.8.1: - version "2.8.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.6.tgz#620d889ace26356391d010ecb9458749df9b6db5" - integrity sha512-lFG7d6g3+/UaFDCOtqPiKAC9zngWWsQZl1g5q6gaONqrjq61SX2xFqXMleQiFVyDpYwa018E9hmlAFY22PCb+A== +minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" minizlib@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.2.tgz#6f0ccc82fa53e1bf2ff145f220d2da9fa6e3a166" - integrity sha512-hR3At21uSrsjjDTWrbu0IMLTpnkpv8IIMFDFaoz43Tmu4LkmAXfH44vNNzpTnf+OAQQCHrb91y/wc2J4x5XgSQ== + version "1.3.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.2.tgz#5d24764998f98112586f7e566bd4c0999769dad4" + integrity sha512-lsNFqSHdJ21EwKzCp12HHJGxSMtHkCW1EMA9cceG3MkMNARjuWotZnMe3NKNshAvFXpm4loZqmYsCmRwhS2JMw== dependencies: - minipass "^2.2.1" + minipass "^2.9.0" mississippi@^3.0.0: version "3.0.0" @@ -7147,9 +7123,9 @@ node-pre-gyp@^0.12.0: tar "^4" node-releases@^1.1.29: - version "1.1.32" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.32.tgz#485b35c1bf9b4d8baa105d782f8ca731e518276e" - integrity sha512-VhVknkitq8dqtWoluagsGPn3dxTvN9fwgR59fV3D7sLBHe0JfDramsMI8n8mY//ccq/Kkrf8ZRHRpsyVZ3qw1A== + version "1.1.33" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.33.tgz#349f10291234624574f44cf32b7de259bf028303" + integrity sha512-I0V30bWQEoHb+10W8oedVoUrdjW5wIkYm0w7vvcrPO95pZY738m1k77GF5sO0vKg5eXYg9oGtrMAETbgZGm11A== dependencies: semver "^5.3.0" @@ -7206,9 +7182,9 @@ normalize-url@1.9.1: sort-keys "^1.0.0" normalize-url@^4.1.0: - version "4.4.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.4.1.tgz#81e9c153b0ad5743755696f2aa20488d48e962b6" - integrity sha512-rjH3yRt0Ssx19mUwS0hrDUOdG9VI+oRLpLHJ7tXRdjcuQ7v7wo6qPvOZppHRrqfslTKr0L2yBhjj4UXd7c3cQg== + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== npm-bundled@^1.0.1: version "1.0.6" @@ -8867,13 +8843,13 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: estree-walker "^0.6.1" rollup@^1.12.1: - version "1.21.4" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.21.4.tgz#00a41a30f90095db890301b226cbe2918e4cf54d" - integrity sha512-Pl512XVCmVzgcBz5h/3Li4oTaoDcmpuFZ+kdhS/wLreALz//WuDAMfomD3QEYl84NkDu6Z6wV9twlcREb4qQsw== + version "1.22.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.22.0.tgz#a5b2672c0eebe9f2b6454220f785dbc09b64b4bc" + integrity sha512-x4l4ZrV/Mr/x/jvFTmwROdEAhbZjx16yDRTVSKWh/i4oJDuW2dVEbECT853mybYCz7BAitU8ElGlhx7dNjw3qQ== dependencies: - "@types/estree" "0.0.39" - "@types/node" "^12.7.5" - acorn "^7.0.0" + "@types/estree" "*" + "@types/node" "*" + acorn "^7.1.0" run-async@^2.2.0: version "2.3.0" @@ -8959,6 +8935,7 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" + uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: @@ -8997,9 +8974,9 @@ schema-utils@^1.0.0: ajv-keywords "^3.1.0" schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.1.0, schema-utils@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.2.0.tgz#48a065ce219e0cacf4631473159037b2c1ae82da" - integrity sha512-5EwsCNhfFTZvUreQhx/4vVQpJ/lnCAkgoIHLhSpp4ZirE+4hzFvdJi0FMub6hxbFVBJYSpeVVmon+2e7uEGRrA== + version "2.4.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.4.1.tgz#e89ade5d056dc8bcaca377574bb4a9c4e1b8be56" + integrity sha512-RqYLpkPZX5Oc3fw/kHHHyP56fg5Y+XBpIpV8nCg0znIALfq3OH+Ea9Hfeac9BAMwG5IICltiZ0vxFvJQONfA5w== dependencies: ajv "^6.10.2" ajv-keywords "^3.4.1" @@ -9890,13 +9867,13 @@ tapable@^1.0.0, tapable@^1.1.3: integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== tar@^4, tar@^4.4.10, tar@^4.4.4: - version "4.4.11" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.11.tgz#7ac09801445a3cf74445ed27499136b5240ffb73" - integrity sha512-iI4zh3ktLJKaDNZKZc+fUONiQrSn9HkCFzamtb7k8FFmVilHVob7QsLX/VySAW8lAviMzMbFw4QtFb4errwgYA== + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.6.4" + minipass "^2.8.6" minizlib "^1.2.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" @@ -9955,9 +9932,9 @@ terser@4.3.2: source-map-support "~0.5.12" terser@^4.1.2, terser@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65" - integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg== + version "4.3.4" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.4.tgz#ad91bade95619e3434685d69efa621a5af5f877d" + integrity sha512-Kcrn3RiW8NtHBP0ssOAzwa2MsIRQ8lJWiBG/K7JgqPlomA3mtb2DEmp4/hrUA+Jujx+WZ02zqd7GYD+QRBB/2Q== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -10704,7 +10681,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@3.7.2: +webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.1: version "3.7.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== @@ -10715,17 +10692,6 @@ webpack-dev-middleware@3.7.2: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-middleware@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09" - integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A== - dependencies: - memory-fs "^0.4.1" - mime "^2.4.4" - mkdirp "^0.5.1" - range-parser "^1.2.1" - webpack-log "^2.0.0" - webpack-dev-server@3.8.1, webpack-dev-server@^3.1.4: version "3.8.1" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.1.tgz#485b64c4aadc23f601e72114b40c1b1fea31d9f1" @@ -11035,16 +11001,16 @@ yallist@^2.1.2: integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + version "3.1.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.0.tgz#906cc2100972dc2625ae78f566a2577230a1d6f7" + integrity sha512-6gpP93MR+VOOehKbCPchro3wFZNSNmek8A2kbkOAZLIZAYx1KP/zAqwO0sOHi3xJEb+UBz8NaYt/17UNit1Q9w== yaml@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.6.0.tgz#d8a985cfb26086dd73f91c637f6e6bc909fddd3c" - integrity sha512-iZfse3lwrJRoSlfs/9KQ9iIXxs9++RvBFVzAqbbBiFT+giYtyanevreF9r61ZTbGMgWQBxAua3FzJiniiJXWWw== + version "1.7.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.0.tgz#b4cddb83490051e6c4b6ffe2bb08221c23f4c6cf" + integrity sha512-BEXCJKbbJmDzjuG4At0R4nHJKlP81hxoLQqUCaxzqZ8HHgjAlOXbiOHVCQ4YuQqO/rLR8HoQ6kxGkYJ3tlKIsg== dependencies: - "@babel/runtime" "^7.4.5" + "@babel/runtime" "^7.5.5" yargs-parser@^11.1.1: version "11.1.1" From ae36fbcd8eb0e42c56ba9d93c7cbaadc5a834f4d Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sun, 29 Sep 2019 21:36:10 +0200 Subject: [PATCH 0231/1070] fix(@angular-devkit/build-optimizer): fix error when `__decorate` has no `__metadata` When a `__decorator` expression has no `__metadata` call, example: ```js __decorate([ ContentChild('heading', { read: ElementRef, static: true }) ], FooBarComponent.prototype, "buttons", void 0); ``` A `Cannot read property 'kind' of undefined` error will be thrown. Closes: #15703 --- .../src/transforms/scrub-file.ts | 62 +++++------ .../src/transforms/scrub-file_spec.ts | 101 ++++++++++++++++++ 2 files changed, 127 insertions(+), 36 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts index 748abcd9c0ca..9bf57689d111 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts @@ -58,11 +58,9 @@ function scrubFileTransformer(checker: ts.TypeChecker, isAngularCoreFile: boolea nodes.push(node); } else if (isDecoratorAssignmentExpression(exprStmt)) { nodes.push(...pickDecorationNodesToRemove(exprStmt, ngMetadata, checker)); - } else if (isDecorateAssignmentExpression(exprStmt, tslibImports, checker)) { + } else if (isDecorateAssignmentExpression(exprStmt, tslibImports, checker) + || isAngularDecoratorExpression(exprStmt, ngMetadata, tslibImports, checker)) { nodes.push(...pickDecorateNodesToRemove(exprStmt, tslibImports, ngMetadata, checker)); - } else if (isAngularDecoratorMetadataExpression(exprStmt, - ngMetadata, tslibImports, checker)) { - nodes.push(node); } else if (isPropDecoratorAssignmentExpression(exprStmt)) { nodes.push(...pickPropDecorationNodesToRemove(exprStmt, ngMetadata, checker)); } @@ -218,7 +216,7 @@ function isDecorateAssignmentExpression( } // Check if expression is `__decorate([smt, __metadata("design:type", Object)], ...)`. -function isAngularDecoratorMetadataExpression( +function isAngularDecoratorExpression( exprStmt: ts.ExpressionStatement, ngMetadata: ts.Node[], tslibImports: ts.NamespaceImport[], @@ -240,27 +238,19 @@ function isAngularDecoratorMetadataExpression( } const decorateArray = callExpr.arguments[0] as ts.ArrayLiteralExpression; // Check first array entry for Angular decorators. - if (decorateArray.elements[0].kind !== ts.SyntaxKind.CallExpression) { - return false; - } - const decoratorCall = decorateArray.elements[0] as ts.CallExpression; - if (decoratorCall.expression.kind !== ts.SyntaxKind.Identifier) { - return false; - } - const decoratorId = decoratorCall.expression as ts.Identifier; - if (!identifierIsMetadata(decoratorId, ngMetadata, checker)) { - return false; - } - // Check second array entry for __metadata call. - if (decorateArray.elements[1].kind !== ts.SyntaxKind.CallExpression) { - return false; - } - const metadataCall = decorateArray.elements[1] as ts.CallExpression; - if (!isTslibHelper(metadataCall, '__metadata', tslibImports, checker)) { + if (decorateArray.elements.length === 0 || !ts.isCallExpression(decorateArray.elements[0])) { return false; } - return true; + return decorateArray.elements.some(decoratorCall => { + if (!ts.isCallExpression(decoratorCall) || !ts.isIdentifier(decoratorCall.expression)) { + return false; + } + + const decoratorId = decoratorCall.expression; + + return identifierIsMetadata(decoratorId, ngMetadata, checker); + }); } // Check if assignment is `Clazz.propDecorators = [...];`. @@ -359,16 +349,19 @@ function pickDecorateNodesToRemove( ngMetadata: ts.Node[], checker: ts.TypeChecker, ): ts.Node[] { + let callExpr: ts.CallExpression | undefined; + if (ts.isCallExpression(exprStmt.expression)) { + callExpr = exprStmt.expression; + } else if (ts.isBinaryExpression(exprStmt.expression)) { + const expr = exprStmt.expression; + if (ts.isCallExpression(expr.right)) { + callExpr = expr.right; + } else if (ts.isBinaryExpression(expr.right) && ts.isCallExpression(expr.right.right)) { + callExpr = expr.right.right; + } + } - const expr = expect(exprStmt.expression, ts.SyntaxKind.BinaryExpression); - let callExpr: ts.CallExpression; - - if (expr.right.kind === ts.SyntaxKind.CallExpression) { - callExpr = expect(expr.right, ts.SyntaxKind.CallExpression); - } else if (expr.right.kind === ts.SyntaxKind.BinaryExpression) { - const innerExpr = expr.right as ts.BinaryExpression; - callExpr = expect(innerExpr.right, ts.SyntaxKind.CallExpression); - } else { + if (!callExpr) { return []; } @@ -400,10 +393,6 @@ function pickDecorateNodesToRemove( if (el.arguments[0].kind !== ts.SyntaxKind.StringLiteral) { return false; } - const metadataTypeId = el.arguments[0] as ts.StringLiteral; - if (metadataTypeId.text !== 'design:paramtypes') { - return false; - } return true; }); @@ -421,6 +410,7 @@ function pickDecorateNodesToRemove( return true; }); + ngDecoratorCalls.push(...metadataCalls, ...paramCalls); // If all decorators are metadata decorators then return the whole `Class = __decorate([...])'` diff --git a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts index 84feac63a78a..1ef06dc0c2f8 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file_spec.ts @@ -319,6 +319,107 @@ describe('scrub-file', () => { expect(testScrubFile(input)).toBeTruthy(); expect(tags.oneLine`${transformCore(input)}`).toEqual(tags.oneLine`${output}`); }); + + it('removes Angular decorators calls in __decorate when no __metadata is present', () => { + const input = tags.stripIndent` + import { __decorate } from 'tslib'; + import { Component, ElementRef, ContentChild} from '@angular/core'; + + var FooBarComponent = /** @class */ (function () { + function FooBarComponent(elementRef) { + this.elementRef = elementRef; + this.inlineButtons = []; + this.menuButtons = []; + } + FooBarComponent.ctorParameters = function () { return [ + { type: ElementRef } + ]; }; + __decorate([ + ContentChild('heading', { read: ElementRef, static: true }) + ], FooBarComponent.prototype, "buttons", void 0); + FooBarComponent = __decorate([ + Component({ + selector: 'custom-foo-bar', + template: '', + styles: [] + }) + ], FooBarComponent); + return FooBarComponent; + }()); + `; + + const output = tags.stripIndent` + import { __decorate } from 'tslib'; + import { Component, ElementRef, ContentChild } from '@angular/core'; + + var FooBarComponent = /** @class */ (function () { + function FooBarComponent(elementRef) { + this.elementRef = elementRef; + this.inlineButtons = []; + this.menuButtons = []; + } + + return FooBarComponent; + }()); + `; + + expect(testScrubFile(input)).toBeTruthy(); + expect(tags.oneLine`${transformCore(input)}`).toEqual(tags.oneLine`${output}`); + }); + + it('removes only Angular decorators calls in __decorate when no __metadata is present', () => { + const input = tags.stripIndent` + import { __decorate } from 'tslib'; + import { Component, ElementRef, ContentChild} from '@angular/core'; + import { NotComponent } from 'another-lib'; + + var FooBarComponent = /** @class */ (function () { + function FooBarComponent(elementRef) { + this.elementRef = elementRef; + this.inlineButtons = []; + this.menuButtons = []; + } + FooBarComponent.ctorParameters = function () { return [ + { type: ElementRef } + ]; }; + __decorate([ + NotComponent(), + ContentChild('heading', { read: ElementRef, static: true }) + ], FooBarComponent.prototype, "buttons", void 0); + FooBarComponent = __decorate([ + NotComponent(), + Component({ + selector: 'custom-foo-bar', + template: '', + styles: [] + }) + ], FooBarComponent); + return FooBarComponent; + }()); + `; + + const output = tags.stripIndent` + import { __decorate } from 'tslib'; + import { Component, ElementRef, ContentChild } from '@angular/core'; + import { NotComponent } from 'another-lib'; + + var FooBarComponent = /** @class */ (function () { + function FooBarComponent(elementRef) { + this.elementRef = elementRef; + this.inlineButtons = []; + this.menuButtons = []; + } + __decorate([ + NotComponent() + ], FooBarComponent.prototype, "buttons", void 0); + + FooBarComponent = __decorate([ NotComponent() ], FooBarComponent); return FooBarComponent; + }()); + `; + + expect(testScrubFile(input)).toBeTruthy(); + expect(tags.oneLine`${transformCore(input)}`).toEqual(tags.oneLine`${output}`); + }); }); describe('__metadata', () => { From 22f3262617211ff5c88e92fffea87dbd58c6c5dc Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 1 Oct 2019 05:35:13 +0000 Subject: [PATCH 0232/1070] build: update @angular/animations to version --- .../angular_devkit/build_angular/package.json | 4 ++-- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- yarn.lock | 16 +++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 10fca7501576..a15f23d3add7 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -66,14 +66,14 @@ }, "devDependencies": { "@angular/animations": "9.0.0-next.8", - "@angular/cdk": "8.2.1", + "@angular/cdk": "8.2.2", "@angular/common": "9.0.0-next.8", "@angular/compiler": "9.0.0-next.8", "@angular/compiler-cli": "9.0.0-next.8", "@angular/core": "9.0.0-next.8", "@angular/forms": "9.0.0-next.8", "@angular/localize": "9.0.0-next.8", - "@angular/material": "8.2.1", + "@angular/material": "8.2.2", "@angular/platform-browser": "9.0.0-next.8", "@angular/platform-browser-dynamic": "9.0.0-next.8", "@angular/platform-server": "9.0.0-next.8", diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 5404fa4cb3bc..cf6ba9eb909f 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#d9c95a98ab03d2a94f6cd14af4f0c61fb986e04b", - "@angular/common": "github:angular/common-builds#6f9d910df1604baa913119744e984165b7dd8786", - "@angular/compiler": "github:angular/compiler-builds#4307078b0da26ef562eead5733b077f755466cf7", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#5482fc3f6ac792c7812657cacd6e4db7f6df1cab", - "@angular/core": "github:angular/core-builds#7dfaeca7a6ec2ca0949095df2ed072436e0fb02c", - "@angular/forms": "github:angular/forms-builds#7a0700bc804ffe113abe234c0b2d6c3af7a57062", - "@angular/language-service": "github:angular/language-service-builds#405471457b9ed0d93d60eb1b64a14066c55c472d", - "@angular/platform-browser": "github:angular/platform-browser-builds#272a149be8baa1892847085d5854ea99181124f6", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#381dda6deffb18eca38f2b4e8fdeab0f3670b39a", - "@angular/router": "github:angular/router-builds#04b7f6c24f4252c55134599b8aa364a07c5483b4" + "@angular/animations": "github:angular/animations-builds#753914f011a26ee22ee007f025d5ea3569e9882d", + "@angular/common": "github:angular/common-builds#c6685642c9cdae459e32edea78b7289da3cec9a9", + "@angular/compiler": "github:angular/compiler-builds#b198b98246fdbde12288e09e905ca87754962330", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#ad9290b95ab1e82287494e54451492c6b7ae05ec", + "@angular/core": "github:angular/core-builds#7bb72c768ef5bbfccba811bb29dd9bc80afece7d", + "@angular/forms": "github:angular/forms-builds#96b01e38bb6e2fc8d408a8d472cb6ecb0fbd8f3d", + "@angular/language-service": "github:angular/language-service-builds#1d08a3852f9f5e35ba41ea6468677ec7b0b3809a", + "@angular/platform-browser": "github:angular/platform-browser-builds#24806af5f6356b0e67878c5c49e2f9d40a5b6763", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#77ce204273f5446f26527193b12a631a28e7764e", + "@angular/router": "github:angular/router-builds#529177427a4ed34310233b90144977640d570232" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 34f71eed634d..feb37f4c5d5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,10 +9,10 @@ dependencies: tslib "^1.9.0" -"@angular/cdk@8.2.1": - version "8.2.1" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.2.1.tgz#3dc2648fe8255098940c9f9a16a271f422571d51" - integrity sha512-Y6xTxESrQlWw1kvSVWAs9cfeN/sYThrc/S9Ll4vekNkYSzye4mHHmDxzsKeGLR1tP+7urXTVz6xo44YUWVE7mw== +"@angular/cdk@8.2.2": + version "8.2.2" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.2.2.tgz#e7898a66dbf479edaed4e6c71cf37ddd83daa1fa" + integrity sha512-e+BtFab0Vd1q/ZVu6l850Q4vvgyVYiugSX31oMRlp86fKHPowlAO7jL3z5JcAG7TybpLIqd7oqF8XQBR/yw83w== dependencies: tslib "^1.7.1" optionalDependencies: @@ -67,10 +67,10 @@ resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.8.tgz#14d25ebb88ad451ef9f327c4fbd05cd0c17f5ce9" integrity sha512-zmH9tGHPG3xmGmuu2o++4yBs36mnpHiZQSwro0KEr8+WU9Hi2Am4jL4TbiL/xe7JpERpr87aESBbcey/oqW/MA== -"@angular/material@8.2.1": - version "8.2.1" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.2.1.tgz#d57575715c0659a713c0eb9e65292e46923ad28d" - integrity sha512-A3PbyVoj2Ao3h21YJSl1zCJahxnaipUKDG8wetCuqw8Ph8Qf5v+VtLfRXY2aYIp7HEBbAhuisrW9S2r+aVq7Ww== +"@angular/material@8.2.2": + version "8.2.2" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.2.2.tgz#c2a1773d604304f614f20bdb1c6eba1cce351f3f" + integrity sha512-mR2ppE+Z1S5As2SUFK8wUH76Fj7YgrefhrwVGaeCLcAen//RHPw043+KL2apPAUaltdIFlGFtUuA6yJN6av0nQ== dependencies: tslib "^1.7.1" From e0887010689dd2f55f79c0f8d2b29353405cdf90 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 1 Oct 2019 05:35:34 +0000 Subject: [PATCH 0233/1070] build: update cacache to version 13.0.1 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 71 ++++++++++++------- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index a15f23d3add7..bf668edc1e31 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -17,7 +17,7 @@ "ajv": "6.10.2", "autoprefixer": "9.6.1", "browserslist": "4.7.0", - "cacache": "13.0.0", + "cacache": "13.0.1", "caniuse-lite": "1.0.30000997", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", diff --git a/yarn.lock b/yarn.lock index feb37f4c5d5f..50adf21d6405 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2437,22 +2437,22 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.0.tgz#1797c957bcddf7bc697520920e3a284e64fc21cc" - integrity sha512-hc9ozSyxintw3TulgdYl5q3ZMjugHYI8lE5hd1S6E1/7OwLf0vNlBdCaROlzHxE5x0lUpFx+B3iMjWmcHDRxiQ== +cacache@13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c" + integrity sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w== dependencies: chownr "^1.1.2" figgy-pudding "^3.5.1" - fs-minipass "^1.2.7" + fs-minipass "^2.0.0" glob "^7.1.4" graceful-fs "^4.2.2" infer-owner "^1.0.4" lru-cache "^5.1.1" - minipass "^2.6.5" - minipass-collect "^1.0.1" - minipass-flush "^1.0.3" - minipass-pipeline "^1.1.2" + minipass "^3.0.0" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" mkdirp "^0.5.1" move-concurrently "^1.0.1" p-map "^3.0.0" @@ -4513,13 +4513,20 @@ fs-extra@^8.0.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5, fs-minipass@^1.2.7: +fs-minipass@^1.2.5: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== dependencies: minipass "^2.6.0" +fs-minipass@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.0.0.tgz#a6415edab02fae4b9e9230bc87ee2e4472003cd1" + integrity sha512-40Qz+LFXmd9tzYVnnBmZvFfvAADfUA14TXPK1s7IfElJTIZ97rA8w4Kin7Wt5JBrC3ShnnFJO/5vPjPEeJIq9A== + dependencies: + minipass "^3.0.0" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -6835,28 +6842,28 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass-collect@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.1.tgz#4e145371e0032332d398bb0e18bdbd56b7131443" - integrity sha512-mg9mz9bTiormVPZ0+1ywhx378ZL64RXpzyFByQ/qpLg2ZpXgyMNYnSSrE2GMW/q0JwaEfzcJySPcItQI/eTTHA== +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== dependencies: - minipass "^2.5.1" + minipass "^3.0.0" -minipass-flush@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.4.tgz#e43261649da7ff9b9db529edc635b8f835411759" - integrity sha512-xr8SwVhu0UQTN3Fn8A2kyFubTZX/UCMDi0z7/LtyFkaTu8+5m0XeWODyj/gY1fG/GAf6qGfODfPc8RmHVaYJ+A== +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== dependencies: - minipass "^2.6.2" + minipass "^3.0.0" -minipass-pipeline@^1.1.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.1.tgz#6e195376fc77fc2eeb7b8476abf7fbad03d76c0a" - integrity sha512-z6lkn/teAcodsoV5UyJtSLFHnw5YSGUW5BG0VsOLow7cPXFsD4LMeH+x3AVQS9rJ9hsIbCq2LMbVKSMj8cglYA== +minipass-pipeline@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz#3dcb6bb4a546e32969c7ad710f2c79a86abba93a" + integrity sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA== dependencies: - minipass "^2.8.1" + minipass "^3.0.0" -minipass@^2.3.5, minipass@^2.5.1, minipass@^2.6.0, minipass@^2.6.2, minipass@^2.6.5, minipass@^2.8.1, minipass@^2.8.6: +minipass@^2.3.5, minipass@^2.5.1, minipass@^2.6.0, minipass@^2.8.6: version "2.8.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.6.tgz#620d889ace26356391d010ecb9458749df9b6db5" integrity sha512-lFG7d6g3+/UaFDCOtqPiKAC9zngWWsQZl1g5q6gaONqrjq61SX2xFqXMleQiFVyDpYwa018E9hmlAFY22PCb+A== @@ -6872,6 +6879,13 @@ minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" +minipass@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.0.0.tgz#adb830268348df8b32217ceda3fc48684faff232" + integrity sha512-FKNU4XrAPDX0+ynwns7njVu4RolyG1mUKSlT6n6GwGXLtYSYh2Znc0S83Rl6zEr1zgFfXvAzIBabnmItm+n19g== + dependencies: + yallist "^4.0.0" + minizlib@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.2.tgz#5d24764998f98112586f7e566bd4c0999769dad4" @@ -11005,6 +11019,11 @@ yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.0.tgz#906cc2100972dc2625ae78f566a2577230a1d6f7" integrity sha512-6gpP93MR+VOOehKbCPchro3wFZNSNmek8A2kbkOAZLIZAYx1KP/zAqwO0sOHi3xJEb+UBz8NaYt/17UNit1Q9w== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yaml@^1.5.0: version "1.7.0" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.0.tgz#b4cddb83490051e6c4b6ffe2bb08221c23f4c6cf" From 5d8a64931d88f445984fb9b4761d103587d2f663 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 1 Oct 2019 06:13:28 +0000 Subject: [PATCH 0234/1070] build: update magic-string to version 0.25.4 --- packages/angular_devkit/core/package.json | 2 +- yarn.lock | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json index 17c797fd7482..c564a8b8cecf 100644 --- a/packages/angular_devkit/core/package.json +++ b/packages/angular_devkit/core/package.json @@ -10,7 +10,7 @@ "dependencies": { "ajv": "6.10.2", "fast-json-stable-stringify": "2.0.0", - "magic-string": "0.25.3", + "magic-string": "0.25.4", "rxjs": "6.5.3", "source-map": "0.7.3" }, diff --git a/yarn.lock b/yarn.lock index 50adf21d6405..9a043514a74b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6523,10 +6523,10 @@ lunr-mutable-indexes@2.3.2: resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.6.tgz#f278beee7ffd56ad86e6e478ce02ab2b98c78dd5" integrity sha512-swStvEyDqQ85MGpABCMBclZcLI/pBIlu8FFDtmX197+oEgKloJ67QnB+Tidh0340HmLMs39c4GrkPY3cmkXp6Q== -magic-string@0.25.3: - version "0.25.3" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9" - integrity sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA== +magic-string@0.25.4, magic-string@^0.25.0, magic-string@^0.25.2: + version "0.25.4" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143" + integrity sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw== dependencies: sourcemap-codec "^1.4.4" @@ -6537,13 +6537,6 @@ magic-string@^0.22.4: dependencies: vlq "^0.2.2" -magic-string@^0.25.0, magic-string@^0.25.2: - version "0.25.4" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143" - integrity sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw== - dependencies: - sourcemap-codec "^1.4.4" - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" From cf2eb3793063178315b0df754a98215dab6c4d55 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 1 Oct 2019 06:13:45 +0000 Subject: [PATCH 0235/1070] build: update verdaccio to version 4.3.0 --- package.json | 2 +- yarn.lock | 334 ++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 237 insertions(+), 99 deletions(-) diff --git a/package.json b/package.json index f5618f9bc652..0f6f1c6800b0 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "ts-node": "^5.0.0", "tslint-no-circular-imports": "^0.7.0", "tslint-sonarts": "1.9.0", - "verdaccio": "4.2.2" + "verdaccio": "4.3.0" }, "husky": { "hooks": { diff --git a/yarn.lock b/yarn.lock index 9a043514a74b..27df5935b09b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1351,10 +1351,10 @@ "@types/webpack-sources" "*" source-map "^0.6.0" -"@verdaccio/commons-api@8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-8.0.0.tgz#b7f2480c73b33311932e59b2dec8c0cda3a1995c" - integrity sha512-s0HFftOhhhnWGVxMRwX1iq7lvFdn9uWmZziG65/XBOrLVw9C1YNsvxmuchIYD0/mms35gq5hm8Z8UqvgGjKo0w== +"@verdaccio/commons-api@8.1.2", "@verdaccio/commons-api@^8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-8.1.2.tgz#725b04dad6c09f6d9c3d6a9ca83fbb9d55f6dae1" + integrity sha512-voJIpdikrSe6aWpRmGoyHGIB0mUgLyNe5oz+jBH81G0/8VsFiIEXye2WTJ4vmEGsZV3tsitMfJM0x+H+uFpE4Q== dependencies: http-errors "1.7.3" @@ -1365,48 +1365,44 @@ dependencies: lockfile "1.0.4" -"@verdaccio/file-locking@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@verdaccio/file-locking/-/file-locking-1.0.3.tgz#8244380a4ee41e585ef38690f9dbcaa1aba6bdc4" - integrity sha512-+npFxBPq8c7oXHtroLGjcrninqtoQBPVeCfLG0BzrEe3ZM5bCcaz3nwQsXLBzhL/QP5z3zLiOgpsxddDN3UIyw== +"@verdaccio/file-locking@^8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@verdaccio/file-locking/-/file-locking-8.1.2.tgz#6f529a54ad2fa3558068e8c3e8241c6502ec6763" + integrity sha512-23fer5+B+Y254MzHoCvPiqDbB9QEzlDau7Gj/L2vQbFjjVnnBMv85PCokWDU7EguF2mvhjkZ5U4Zoo6bZ5PRKw== dependencies: lockfile "1.0.4" -"@verdaccio/local-storage@2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@verdaccio/local-storage/-/local-storage-2.2.1.tgz#ce8b9ab6c05d6ce2bccef5c7781abe8667eab778" - integrity sha512-lSM5Rc2dn8rtzo1P2kQz7TNlVgm12OQzOcocK9uwVgKS95sWqjxttLB9EMfsGsy0+qwfzw96AMBkOXn3f55m/Q== +"@verdaccio/local-storage@8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@verdaccio/local-storage/-/local-storage-8.1.2.tgz#27564856856808bb019ff0453745d25bea04074a" + integrity sha512-49j5nyB7+At3ho/eMBF6WB+Wz0H90MOzvzx8pS+J1rBoqY+nkyeR4iYG7I+kbWCcRjp7aDpwN5djGPyV8ZEsXw== dependencies: - "@verdaccio/file-locking" "1.0.3" - "@verdaccio/streams" "2.0.0" + "@verdaccio/commons-api" "^8.1.2" + "@verdaccio/file-locking" "^8.1.2" + "@verdaccio/streams" "^8.1.2" async "3.1.0" - http-errors "1.7.3" - lodash "4.17.11" + level "5.0.1" + lodash "4.17.15" mkdirp "0.5.1" -"@verdaccio/readme@8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@verdaccio/readme/-/readme-8.0.0.tgz#36108dc48597f9ee380d42c965f08db91ed6e87a" - integrity sha512-wZCUR//UwdKbt3C308pFxsai6HJjVJ0lAedyVSWctK+3Dj/is10OsMrWoJZ0gJbacRET6S3rJF9WeS6dtntZcw== +"@verdaccio/readme@8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@verdaccio/readme/-/readme-8.1.2.tgz#1022e7bced4c91f0712b66792528b00761ea8031" + integrity sha512-FVa5WQttsf8rLRK3IA/VZD9UWhHAdK/UEcKL0zP+EFqiXQTADYuIPgdLtSeC1w4LTUAUu2Qv05D2vimTAabFKA== dependencies: - dompurify "1.0.11" + dompurify "2.0.3" jsdom "15.1.1" - marked "0.6.2" - -"@verdaccio/streams@2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-2.0.0.tgz#27f51d0cb19d5e49248860942092646e9a357967" - integrity sha512-QW1LsYir3wNnqhSznbJlt0iqkcgve0LpXI8RkoTTBPrq3M6ei3Ys4iw+JQKFve3gmYw9O+w8lBiOLc1qvvsoVQ== + marked "0.7.0" -"@verdaccio/streams@8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-8.0.0.tgz#d8e1aa4121c288b2a305de4607d19d0df3f49e52" - integrity sha512-N1zCrQfbo8xWMUyYRFLUuA1Xn9cbbvOslIZ1P2jX+E4HyA/4fBwZi6mpsa79RuOmm1Vu2GI/yXADiO4x9F4j2Q== +"@verdaccio/streams@8.1.2", "@verdaccio/streams@^8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-8.1.2.tgz#0f74d967415b260b728b35caf05992fdb5bb5fe9" + integrity sha512-mh7qeYFNNt7MtxPZXs8JLs5lwxob1mELNEc6aA3ZHhg90PCKM7v9fzylWZgbsn0XSzTKltosQ/dqYUQvDCd0Dg== -"@verdaccio/ui-theme@0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@verdaccio/ui-theme/-/ui-theme-0.2.3.tgz#d25335be52bc15ad5c57cbff7607ddc8bf857833" - integrity sha512-rzn336VTjReOyxPdYapMDxgH+5PvxpT49GGdnHOcB7JEdDgl4Qa2mQIzRol/3GLahXMfOX+6uRY/ySBdlRo69A== +"@verdaccio/ui-theme@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@verdaccio/ui-theme/-/ui-theme-0.3.2.tgz#6f4a27abb3781a9741473e55bff7af650dce118c" + integrity sha512-bxICDb2dgHXp6DOEx8f1IfU7PsgF1AuuDxa87MbvXqfE3CfMGB2TEwlPWNlX+VSScgWNh/yYSDrOIQ2SqwgAGg== "@webassemblyjs/ast@1.8.5": version "1.8.5" @@ -1587,6 +1583,31 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +abstract-leveldown@^6.1.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.0.tgz#15cac11924e2bfade6ab0b9b58996f1666451499" + integrity sha512-8hUdvEq5Iy78VM0+/0jqqlvro6z1KKao5YwA9S016kZ9Lcvtvhk5hh9uszFT4WMomfZA99DZVBoozA34Tjoe5w== + dependencies: + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +abstract-leveldown@~6.0.1: + version "6.0.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz#b4b6159343c74b0c5197b2817854782d8f748c4a" + integrity sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q== + dependencies: + level-concat-iterator "~2.0.0" + xtend "~4.0.0" + +abstract-leveldown@~6.1.0, abstract-leveldown@~6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.1.1.tgz#f44bad5862d71c7b418110d7698ac25bedf24396" + integrity sha512-7fK/KySVqzKIomdhkSWzX4YBQhzkzEMbWSiaB6mSN9e+ZdV3KEeKxia/8xQzCkATA5xnnukdP88cFR0D2FsFXw== + dependencies: + level-concat-iterator "~2.0.0" + xtend "~4.0.0" + accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -2840,21 +2861,16 @@ combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@2.20.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" - integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +commander@3.0.2, commander@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.0: version "2.20.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.1.tgz#3863ce3ca92d0831dcf2a102f5fb4b5926afd0f9" integrity sha512-cCuLsMhJeWQ/ZpsFTbE765kvVfoeSddc4nU3up4fV+fDBcfUXnbITJ+JzhkdjzOqhURjZgujxaioam4RM9yGUg== -commander@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== - common-tags@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" @@ -3452,10 +3468,10 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -dayjs@1.8.15: - version "1.8.15" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.15.tgz#7121bc04e6a7f2621ed6db566be4a8aaf8c3913e" - integrity sha512-HYHCI1nohG52B45vCQg8Re3hNDZbMroWPkhz50yaX7Lu0ATyjGsTdoYZBpjED9ar6chqTx2dmSmM8A51mojnAg== +dayjs@1.8.16: + version "1.8.16" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.16.tgz#2a3771de537255191b947957af2fd90012e71e64" + integrity sha512-XPmqzWz/EJiaRHjBqSJ2s6hE/BUoCIHKgdS2QPtTQtKcS9E4/Qn0WomoH1lXanWCzri+g7zPcuNV4aTZ8PMORQ== debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" @@ -3557,6 +3573,14 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw== +deferred-leveldown@~5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.2.1.tgz#8da87909cd3269c2d6aff67b1e607f93e4d96c15" + integrity sha512-PwXZRn5EmW+IKYVAYVc7G9FsRkShr0myPubPuq+mtLhDq9xSUqfvTlNZKoeQGeXACHXkeCFurKrz5oo6TZ3qwg== + dependencies: + abstract-leveldown "~6.1.0" + inherits "^2.0.3" + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3748,10 +3772,10 @@ domino@^2.1.2: resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.3.tgz#0ca1ad02cbd316ebe2e99e0ac9fb0010407d4601" integrity sha512-EwjTbUv1Q/RLQOdn9k7ClHutrQcWGsfXaRQNOnM/KgK4xDBoLFEcIRFuBSxAx13Vfa63X029gXYrNFrSy+DOSg== -dompurify@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-1.0.11.tgz#fe0f4a40d147f7cebbe31a50a1357539cfc1eb4d" - integrity sha512-XywCTXZtc/qCX3iprD1pIklRVk/uhl8BKpkTxr+ZyMVUzSUg7wkQXRBp/euJ5J5moa1QvfpvaPQVP71z1O59dQ== +dompurify@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.0.3.tgz#5cc4965a487d54aedba6ba9634b137cfbd7eb50d" + integrity sha512-q006uOkD2JGSJgF0qBt7rVhUvUPBWCxpGayALmHvXx2iNlMfNVz7PDGeXEUjNGgIDjADz59VZCv6UE3U8XRWVw== dot-prop@^3.0.0: version "3.0.0" @@ -3854,6 +3878,16 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encoding-down@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.2.0.tgz#7ca52446dac6e0fd09ad3584a7359809ea1a4844" + integrity sha512-XlIoQMBMbU4aE01uSKpAix0sXBJWK8YPhuOdvKa1CroThZyUpj0zWzt+bbe7g1KWsdhNFFzHkQHSdDymVtpJ1w== + dependencies: + abstract-leveldown "^6.1.1" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" @@ -3922,17 +3956,17 @@ ent@~2.2.0: resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= -envinfo@7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.3.1.tgz#892e42f7bf858b3446d9414ad240dbaf8da52f09" - integrity sha512-GvXiDTqLYrORVSCuJCsWHPXF5BFvoWMQA9xX4YVjPT1jyS3aZEHUBwjzxU/6LTPF9ReHgVEbX7IEN5UvSXHw/A== +envinfo@7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.4.0.tgz#bef4ece9e717423aaf0c3584651430b735ad6630" + integrity sha512-FdDfnWnCVjxTTpWE3d6Jgh5JDIA3Cw7LCgpM/pI7kK1ORkjaqI2r6NqQ+ln2j0dfpgxY00AWieSvtkiZQKIItA== err-code@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= -errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: +errno@^0.1.1, errno@^0.1.3, errno@~0.1.1, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== @@ -4810,10 +4844,10 @@ handle-thing@^2.0.0: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754" integrity sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ== -handlebars@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" - integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== +handlebars@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.3.1.tgz#6febc1890851f62a8932d495cc88d29390fa850d" + integrity sha512-c0HoNHzDiHpBt4Kqe99N8tdLPKAnGCQ73gYMPWtAYM4PwGnf7xl8PBUHJqh9ijlzt2uQKaSRxbXRt+rZ7M2/kA== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -5150,6 +5184,11 @@ immediate@~3.0.5: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= +immediate@~3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" + integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= + immutable@^3.8.2: version "3.8.2" resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" @@ -5599,7 +5638,7 @@ is-text-path@^1.0.0: dependencies: text-extensions "^1.0.0" -is-typedarray@~1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= @@ -6237,6 +6276,88 @@ less@3.10.3, less@^3.8.0: request "^2.83.0" source-map "~0.6.0" +level-codec@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.1.tgz#042f4aa85e56d4328ace368c950811ba802b7247" + integrity sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q== + +level-concat-iterator@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" + integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== + +level-errors@^2.0.0, level-errors@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" + integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== + dependencies: + errno "~0.1.1" + +level-iterator-stream@~4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.1.tgz#65c467070c0788fe0d08a0c1ed600c3b9e82bc8d" + integrity sha512-pSZWqXK6/yHQkZKCHrR59nKpU5iqorKM22C/BOHTb/cwNQ2EOZG+bovmFFGcOgaBoF3KxqJEI27YwewhJQTzsw== + dependencies: + inherits "^2.0.1" + readable-stream "^3.0.2" + xtend "^4.0.0" + +level-js@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-js/-/level-js-4.0.1.tgz#3bad57d8bb46ebba7b13bc7442b56f4b45c8a2e0" + integrity sha512-m5JRIyHZn5VnCCFeRegJkn5bQd3MJK5qZX12zg3Oivc8+BUIS2yFS6ANMMeHX2ieGxucNvEn6/ZnyjmZQLLUWw== + dependencies: + abstract-leveldown "~6.0.1" + immediate "~3.2.3" + inherits "^2.0.3" + ltgt "^2.1.2" + typedarray-to-buffer "~3.1.5" + +level-packager@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.0.3.tgz#e22bc9887663d0808ab092453d691bc319b7e5a2" + integrity sha512-Ut62o3nvUNCxYldM5+13+0sYow6ifKj2C26/0ToB7zKgdypF5wRKcVkcztQVwsQi+ZnrmDzhimp7FKP5Ynv6Rg== + dependencies: + encoding-down "^6.2.0" + levelup "^4.2.0" + +level-supports@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.0.tgz#376f3f2339c23be0ba2fe62b0fa0e3ac7d6d9988" + integrity sha512-01PKZumFhgysuHUbRz4c9DyA1egmcHJBAsZbm0Vf5agojC3uWOvAnhOD4swNUgHlfJBymXLi/xkBaEckeNRSvA== + dependencies: + xtend "^4.0.2" + +level@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/level/-/level-5.0.1.tgz#8528cc1ee37ac413270129a1eab938c610be3ccb" + integrity sha512-wcak5OQeA4rURGacqS62R/xNHjCYnJSQDBOlm4KNUGJVE9bWv2B04TclqReYejN+oD65PzD4FsqeWoI5wNC5Lg== + dependencies: + level-js "^4.0.0" + level-packager "^5.0.0" + leveldown "^5.0.0" + opencollective-postinstall "^2.0.0" + +leveldown@^5.0.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.2.1.tgz#eadc2184ab4c83fe0d74853384fe99dc0a0de6be" + integrity sha512-369I1rGibXV7CIoLhsSpp/ExwQucI3xUe0RXQrMu4ji6OG9PFMVAQuzsEXKwAi3BWsjFzcFtodAP8MW5fmfung== + dependencies: + abstract-leveldown "~6.1.1" + napi-macros "~2.0.0" + node-gyp-build "~4.1.0" + +levelup@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.3.0.tgz#b6934483787e7558a340d54b4364ea3361150b73" + integrity sha512-6sC7hXr43Q3vDq/nB4UC4mU6sVxhFJZXYSfKJd5iDHgqQzJx6RIxRiFbXakQiNvdVRz6RO/HNmQqr1W06dne2w== + dependencies: + deferred-leveldown "~5.2.1" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -6429,11 +6550,6 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" -lodash@4.17.11: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - lodash@4.17.15, lodash@^4.16.6, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.2.1: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" @@ -6511,6 +6627,11 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +ltgt@^2.1.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + lunr-mutable-indexes@2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/lunr-mutable-indexes/-/lunr-mutable-indexes-2.3.2.tgz#864253489735d598c5140f3fb75c0a5c8be2e98c" @@ -6615,11 +6736,6 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -marked@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.2.tgz#c574be8b545a8b48641456ca1dbe0e37b6dccc1a" - integrity sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA== - marked@0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/marked/-/marked-0.7.0.tgz#b64201f051d271b1edc10a04d1ae9b74bb8e5c0e" @@ -7003,6 +7119,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + ncp@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" @@ -7084,6 +7205,11 @@ node-forge@0.8.2: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.2.tgz#b4bcc59fb12ce77a8825fc6a783dfe3182499c5a" integrity sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg== +node-gyp-build@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb" + integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== + node-libs-browser@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" @@ -7413,6 +7539,11 @@ open@6.4.0: dependencies: is-wsl "^1.1.0" +opencollective-postinstall@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89" + integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw== + opn@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" @@ -8430,7 +8561,7 @@ read-pkg@^5.0.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6: +readable-stream@^3.0.2, readable-stream@^3.0.6: version "3.4.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== @@ -10257,6 +10388,13 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typedarray-to-buffer@~3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -10543,18 +10681,18 @@ vary@^1, vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -verdaccio-audit@8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/verdaccio-audit/-/verdaccio-audit-8.0.0.tgz#61933cab21daa99a2de08c550d6c6d665f3226cd" - integrity sha512-80/0GEPulkwzi0qlQMHpe8tXeHEPQ+x78ZsUk3CkpNwCr+VlgzWxAzk6zI3ZUQ/gBBAidZ8We+TWNsdAPze8/w== +verdaccio-audit@8.1.4: + version "8.1.4" + resolved "https://registry.yarnpkg.com/verdaccio-audit/-/verdaccio-audit-8.1.4.tgz#b2005927cbfe29229b01034e9d2d8bc635f12970" + integrity sha512-Ehg9XS1soO5xfbtut64MU+FutF42kay0tw1wwB84UaQJ7YgZ58ftgvLZcL3AuPlTzI9KHMCf6ZOdyt6/fNmsVw== dependencies: express "4.17.1" request "2.88.0" -verdaccio-htpasswd@8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/verdaccio-htpasswd/-/verdaccio-htpasswd-8.0.0.tgz#7939fa13fe46e5154cda526cf0f18085c633e618" - integrity sha512-tZKw5X6TQhVPmyB1NrkdXqQEFIyLbE0WGGt1jFX3tfjjl9cglZLvbkVNkUFKeZcOv4GjJ4zHGXwmTG2ZHlWpEw== +verdaccio-htpasswd@8.1.2: + version "8.1.2" + resolved "https://registry.yarnpkg.com/verdaccio-htpasswd/-/verdaccio-htpasswd-8.1.2.tgz#594c97eb33e260a699861411235cca3e018d14be" + integrity sha512-GZGnToJ80Cd3qYE2upNxcq6M35wlDCW+iqe9sCooqH0gLo+C3TUTJw54Y6zC1qtlnTV29Bhf07ODr1j5IS6dcA== dependencies: "@verdaccio/file-locking" "1.0.0" apache-md5 "1.1.2" @@ -10562,28 +10700,28 @@ verdaccio-htpasswd@8.0.0: http-errors "1.7.3" unix-crypt-td-js "1.0.0" -verdaccio@4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.2.2.tgz#80207e64920076d90a0f61a096aed7bae24578f1" - integrity sha512-8T0IcuerV/BjMh+SiIZi7pfx3icc3JQHmJ1LGzHZPPwLy2UD+bZkSKkPrqqWxDhckwPqRcOMG0Xa5yOa9rDGhQ== - dependencies: - "@verdaccio/commons-api" "8.0.0" - "@verdaccio/local-storage" "2.2.1" - "@verdaccio/readme" "8.0.0" - "@verdaccio/streams" "8.0.0" - "@verdaccio/ui-theme" "0.2.3" +verdaccio@4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.3.0.tgz#db0c51f2497df84d1ab0ea270fed2b5469a757da" + integrity sha512-kaDe07+BPsHO4+fkCdQtTh6rUQjrvhOTc7oRDzAwg1r14q665FUBmJ2xsGyVnoJk9COAKE9dqud8rmkfolj+gA== + dependencies: + "@verdaccio/commons-api" "8.1.2" + "@verdaccio/local-storage" "8.1.2" + "@verdaccio/readme" "8.1.2" + "@verdaccio/streams" "8.1.2" + "@verdaccio/ui-theme" "0.3.2" JSONStream "1.3.5" async "3.1.0" body-parser "1.19.0" bunyan "1.8.12" - commander "2.20.0" + commander "3.0.2" compression "1.7.4" cookies "0.7.3" cors "2.8.5" - dayjs "1.8.15" - envinfo "7.3.1" + dayjs "1.8.16" + envinfo "7.4.0" express "4.17.1" - handlebars "4.1.2" + handlebars "4.3.1" http-errors "1.7.3" js-yaml "3.13.1" jsonwebtoken "8.5.1" @@ -10599,8 +10737,8 @@ verdaccio@4.2.2: pkginfo "0.4.1" request "2.87.0" semver "6.3.0" - verdaccio-audit "8.0.0" - verdaccio-htpasswd "8.0.0" + verdaccio-audit "8.1.4" + verdaccio-htpasswd "8.1.2" verror@1.10.0: version "1.10.0" @@ -10980,7 +11118,7 @@ xmlhttprequest-ssl@~1.5.4: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xtend@^4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== From 289336d6d9a5dcc6969c100ce057a8e8838af53d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 1 Oct 2019 07:55:57 +0000 Subject: [PATCH 0236/1070] build: update webpack-subresource-integrity to version 1.3.4 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index bf668edc1e31..8067022b4bd6 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -61,7 +61,7 @@ "webpack-dev-server": "3.8.1", "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", - "webpack-subresource-integrity": "1.3.3", + "webpack-subresource-integrity": "1.3.4", "worker-plugin": "3.2.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 27df5935b09b..1806b32cbc66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10899,10 +10899,10 @@ webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-s source-list-map "^2.0.0" source-map "~0.6.1" -webpack-subresource-integrity@1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.3.3.tgz#8a320457a93ef480707884443d886f7f677ccbf7" - integrity sha512-t668hZNc/fZCgt2u83A4Tp9l5sDEwAhEC5XQ2QugshEr9WkNNDQC6551pB/JUfy5DwqTa/MJzAjeG5QQ9vxCEA== +webpack-subresource-integrity@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.3.4.tgz#4554e0c622d6787f880eba009cdb73139c107bad" + integrity sha512-6XbGYzjh30cGQT/NsC+9IAkJP8IL7/t47sbwR5DLSsamiD56Rwv4/+hsgEHsviPvrEFZ0JRAQtCRN3UsR2Pw9g== dependencies: webpack-sources "^1.3.0" From 5a2a055c4deb3bac7542643410028f9f89abbca7 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Mon, 30 Sep 2019 15:01:39 -0700 Subject: [PATCH 0237/1070] build: g3 sync for angular_devkit Fix all build errors in g3 --- BUILD | 2 +- packages/angular_devkit/core/BUILD | 10 ++++++++++ packages/angular_devkit/core/node/host.ts | 2 +- .../angular_devkit/core/src/json/schema/visitor.ts | 2 +- packages/angular_devkit/schematics/BUILD | 12 +++++++++++- packages/angular_devkit/schematics_cli/BUILD | 4 +++- 6 files changed, 27 insertions(+), 5 deletions(-) diff --git a/BUILD b/BUILD index a1c5b6b5ac0e..468401fb4c74 100644 --- a/BUILD +++ b/BUILD @@ -4,7 +4,7 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) -licenses(["notice"]) # MIT License +licenses(["notice"]) exports_files([ "LICENSE", diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index ecb6c3617849..6e6e934efebe 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -30,6 +30,8 @@ ts_library( ], module_name = "@angular-devkit/core", module_root = "src/index.d.ts", + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, deps = [ "@npm//rxjs", "@npm//@types/node", @@ -37,6 +39,8 @@ ts_library( "@npm//magic-string", "@npm//source-map", # @typings: es2015.core + # @typings: es2015.proxy + # @typings: es2015.reflect # @typings: es2015.symbol.wellknown # @typings: es2016.array.include ], @@ -55,6 +59,8 @@ ts_library( "src/experimental/workspace/test/test-workspace.json", "src/experimental/workspace/workspace-schema.json", ], + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, # @external_begin tsconfig = "//:tsconfig-test.json", # @external_end @@ -93,6 +99,8 @@ ts_library( ), module_name = "@angular-devkit/core/node", module_root = "node/index.d.ts", + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, deps = [ ":core", "@npm//@types/node", @@ -150,6 +158,8 @@ ts_library( ), module_name = "@angular-devkit/core/node/testing", module_root = "node/testing/index.d.ts", + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, deps = [ ":core", ":node", diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts index 49907cd55355..27e716fc2a41 100644 --- a/packages/angular_devkit/core/node/host.ts +++ b/packages/angular_devkit/core/node/host.ts @@ -160,7 +160,7 @@ export class NodeJsAsyncHost implements virtualFs.Host { list(path: Path): Observable { return _callFs(fs.readdir, getSystemPath(path)).pipe( - map(names => names.map(name => fragment(name))), + map((names: string[]) => names.map(name => fragment(name))), ); } diff --git a/packages/angular_devkit/core/src/json/schema/visitor.ts b/packages/angular_devkit/core/src/json/schema/visitor.ts index a1f1bdb6fc8c..194c29eef4fe 100644 --- a/packages/angular_devkit/core/src/json/schema/visitor.ts +++ b/packages/angular_devkit/core/src/json/schema/visitor.ts @@ -65,7 +65,7 @@ function _visitJsonRecursive( } } - const value = visitor(json, ptr, schema, root); + const value = visitor(json, ptr, schema as JsonObject, root); return (isObservable(value) ? value : observableOf(value)).pipe( concatMap(value => { diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index bb07197cf112..cbc9558c1990 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -11,7 +11,7 @@ load("@npm_bazel_typescript//:defs.bzl", "ts_library") load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") # @external_end -licenses(["notice"]) # MIT License +licenses(["notice"]) # @angular-devkit/schematics @@ -27,6 +27,8 @@ ts_library( ), module_name = "@angular-devkit/schematics", module_root = "src/index.d.ts", + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, deps = [ "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", # TODO: get rid of this for 6.0 @@ -82,6 +84,8 @@ ts_library( ), module_name = "@angular-devkit/schematics/tasks", module_root = "tasks/index.d.ts", + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, deps = [ ":schematics", "//packages/angular_devkit/core", @@ -106,6 +110,8 @@ ts_library( ), module_name = "@angular-devkit/schematics/tasks/node", module_root = "tasks/node/index.d.ts", + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, deps = [ ":schematics", ":tasks", @@ -130,6 +136,8 @@ ts_library( "tasks/tslint-fix/test/collection.json", "tasks/tslint-fix/test/rules/customRuleRule.js", ], + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, # @external_begin tsconfig = "//:tsconfig-test.json", # @external_end @@ -169,6 +177,8 @@ ts_library( ), module_name = "@angular-devkit/schematics/tools", module_root = "tools/index.d.ts", + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, deps = [ ":schematics", ":tasks", diff --git a/packages/angular_devkit/schematics_cli/BUILD b/packages/angular_devkit/schematics_cli/BUILD index 8faa850b8c97..e8f0f82c1c2f 100644 --- a/packages/angular_devkit/schematics_cli/BUILD +++ b/packages/angular_devkit/schematics_cli/BUILD @@ -6,7 +6,7 @@ package(default_visibility = ["//visibility:public"]) load("@npm_bazel_typescript//:defs.bzl", "ts_library") -licenses(["notice"]) # MIT License +licenses(["notice"]) # @angular-devkit/schematics-cli @@ -22,6 +22,8 @@ ts_library( ), module_name = "@angular-devkit/schematics-cli", module_root = "bin", + # The attribute below is needed in g3 to turn off strict typechecking + # strict_checks = False, deps = [ "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", From c5869f57bc66cd6c4ea8d97a4f1f50fd42308a70 Mon Sep 17 00:00:00 2001 From: TinyMan Date: Sat, 28 Sep 2019 16:35:54 +0200 Subject: [PATCH 0238/1070] feat(@angular-devkit/build-angular): set document locale when using i18nLocale Fixes #8102 --- .../plugins/index-html-webpack-plugin.ts | 2 ++ .../index-file/augment-index-html.ts | 32 +++++++++++++++++++ .../index-file/augment-index-html_spec.ts | 17 ++++++++++ .../utilities/index-file/write-index-html.ts | 3 ++ .../build_angular/src/browser/index.ts | 1 + .../build_angular/src/dev-server/index.ts | 1 + .../legacy-cli/e2e/tests/i18n/build-locale.ts | 2 ++ 7 files changed, 58 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts index eff0ba5af826..9f6a5cc2d737 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/index-html-webpack-plugin.ts @@ -27,6 +27,7 @@ export interface IndexHtmlWebpackPluginOptions { moduleEntrypoints: string[]; postTransform?: IndexHtmlTransform; crossOrigin?: CrossOriginValue; + lang?: string; } function readFile(filename: string, compilation: compilation.Compilation): Promise { @@ -100,6 +101,7 @@ export class IndexHtmlWebpackPlugin { loadOutputFile, moduleFiles, entrypoints: this._options.entrypoints, + lang: this._options.lang, }); if (this._options.postTransform) { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html.ts index d78fac2d45c3..76864be1bd17 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html.ts @@ -42,6 +42,8 @@ export interface AugmentIndexHtmlOptions { loadOutputFile: LoadOutputFileFunctionType; /** Used to sort the inseration of files in the HTML file */ entrypoints: string[]; + /** Used to set the document default locale */ + lang?: string; } export interface FileInfo { @@ -56,6 +58,7 @@ export interface FileInfo { * after processing several configurations in order to build different sets of * bundles for differential serving. */ +// tslint:disable-next-line: no-big-function export async function augmentIndexHtml(params: AugmentIndexHtmlOptions): Promise { const { loadOutputFile, files, noModuleFiles = [], moduleFiles = [], entrypoints } = params; @@ -91,8 +94,10 @@ export async function augmentIndexHtml(params: AugmentIndexHtmlOptions): Promise const document = parse5.parse(params.inputContent, { treeAdapter, locationInfo: true }); let headElement; let bodyElement; + let htmlElement; for (const docChild of document.childNodes) { if (docChild.tagName === 'html') { + htmlElement = docChild; for (const htmlChild of docChild.childNodes) { if (htmlChild.tagName === 'head') { headElement = htmlChild; @@ -241,6 +246,33 @@ export async function augmentIndexHtml(params: AugmentIndexHtmlOptions): Promise indexSource.insert(styleInsertionPoint, parse5.serialize(styleElements, { treeAdapter })); + // Adjust document locale if specified + if (typeof params.lang == 'string') { + + const htmlFragment = treeAdapter.createDocumentFragment(); + + let langAttribute; + for (const attribute of htmlElement.attrs) { + if (attribute.name === 'lang') { + langAttribute = attribute; + } + } + if (langAttribute) { + langAttribute.value = params.lang; + } else { + htmlElement.attrs.push({ name: 'lang', value: params.lang }); + } + // we want only openning tag + htmlElement.childNodes = []; + + treeAdapter.appendChild(htmlFragment, htmlElement); + indexSource.replace( + htmlElement.__location.startTag.startOffset, + htmlElement.__location.startTag.endOffset - 1, + parse5.serialize(htmlFragment, { treeAdapter }).replace('', ''), + ); + } + return indexSource.source(); } diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html_spec.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html_spec.ts index 269c0ef43c55..a986e007d0de 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html_spec.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/augment-index-html_spec.ts @@ -132,4 +132,21 @@ describe('augment-index-html', () => { `); }); + it('should add lang attribute', async () => { + const source = augmentIndexHtml({ + ...indexGeneratorOptions, + lang: 'fr', + }); + + const html = await source; + expect(html).toEqual(oneLineHtml` + + + + + + + + `); + }); }); diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/write-index-html.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/write-index-html.ts index 06694394ef40..1ec63a5dcc7f 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/write-index-html.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/index-file/write-index-html.ts @@ -31,6 +31,7 @@ export interface WriteIndexHtmlOptions { styles?: ExtraEntryPoint[]; postTransform?: IndexHtmlTransform; crossOrigin?: CrossOriginValue; + lang?: string; } export type IndexHtmlTransform = (content: string) => Promise; @@ -49,6 +50,7 @@ export function writeIndexHtml({ styles = [], postTransform, crossOrigin, + lang, }: WriteIndexHtmlOptions): Observable { return host.read(indexPath).pipe( map(content => stripBom(virtualFs.fileBufferToString(content))), @@ -70,6 +72,7 @@ export function writeIndexHtml({ .pipe(map(data => virtualFs.fileBufferToString(data))) .toPromise(); }, + lang: lang, }), ), switchMap(content => (postTransform ? postTransform(content) : of(content))), diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 66f4bdd755ef..7bf3fa8b1eac 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -708,6 +708,7 @@ export function buildWebpackBrowser( styles: options.styles, postTransform: transforms.indexHtml, crossOrigin: options.crossOrigin, + lang: options.i18nLocale, }) .pipe( map(() => ({ success: true })), diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index ecf36de71361..f076546b89b7 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -209,6 +209,7 @@ export function serveWebpackBrowser( noModuleEntrypoints: ['polyfills-es5'], postTransform: transforms.indexHtml, crossOrigin: browserOptions.crossOrigin, + lang: browserOptions.i18nLocale, }), ); } diff --git a/tests/legacy-cli/e2e/tests/i18n/build-locale.ts b/tests/legacy-cli/e2e/tests/i18n/build-locale.ts index c05515c5a54f..6fd4f6166f42 100644 --- a/tests/legacy-cli/e2e/tests/i18n/build-locale.ts +++ b/tests/legacy-cli/e2e/tests/i18n/build-locale.ts @@ -19,11 +19,13 @@ export default function () { .then(() => expectFileToMatch('dist/test-project/main-es5.js', /angular_common_locales_fr/)) .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /registerLocaleData/)) .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /angular_common_locales_fr/)) + .then(() => expectFileToMatch('dist/test-project/index.html', /lang="fr"/)) .then(() => rimraf('dist')) .then(() => ng('build', '--aot', '--i18n-locale=fr_FR')) .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /registerLocaleData/)) .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /angular_common_locales_fr/)) .then(() => expectFileToMatch('dist/test-project/main-es5.js', /registerLocaleData/)) .then(() => expectFileToMatch('dist/test-project/main-es5.js', /angular_common_locales_fr/)) + .then(() => expectFileToMatch('dist/test-project/index.html', /lang="fr_FR"/)) .then(() => rimraf('dist')); } From 8497d9ac7b18f782def1fcd97c42c99d52b7f699 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Tue, 1 Oct 2019 16:14:21 -0700 Subject: [PATCH 0239/1070] build: use import instead of require for fast-json-stable-stringify --- package.json | 1 + packages/angular_devkit/core/BUILD | 1 + .../angular_devkit/core/src/experimental/jobs/strategy.ts | 3 +-- .../angular_devkit/core/src/workspace/json/utilities.ts | 3 +-- yarn.lock | 6 +++++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0f6f1c6800b0..18ba11a95a6c 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "@types/clean-css": "^4.2.1", "@types/copy-webpack-plugin": "^4.4.1", "@types/express": "^4.16.0", + "@types/fast-json-stable-stringify": "^2.0.0", "@types/find-cache-dir": "^2.0.0", "@types/glob": "^7.0.0", "@types/inquirer": "^0.0.44", diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index 6e6e934efebe..fe02c5bfced8 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -35,6 +35,7 @@ ts_library( deps = [ "@npm//rxjs", "@npm//@types/node", + "@npm//@types/fast-json-stable-stringify", "@npm//ajv", "@npm//magic-string", "@npm//source-map", diff --git a/packages/angular_devkit/core/src/experimental/jobs/strategy.ts b/packages/angular_devkit/core/src/experimental/jobs/strategy.ts index 705c500581bc..e1903aceb8b9 100644 --- a/packages/angular_devkit/core/src/experimental/jobs/strategy.ts +++ b/packages/angular_devkit/core/src/experimental/jobs/strategy.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import * as stableStringify from 'fast-json-stable-stringify'; import { Observable, Subject, concat, of } from 'rxjs'; import { finalize, ignoreElements, share, shareReplay, tap } from 'rxjs/operators'; import { JsonValue } from '../../json'; @@ -16,8 +17,6 @@ import { JobOutboundMessageKind, } from './api'; -const stableStringify = require('fast-json-stable-stringify'); - export namespace strategy { export type JobStrategy< diff --git a/packages/angular_devkit/core/src/workspace/json/utilities.ts b/packages/angular_devkit/core/src/workspace/json/utilities.ts index fa6dd14167f8..52d6a72cf9c1 100644 --- a/packages/angular_devkit/core/src/workspace/json/utilities.ts +++ b/packages/angular_devkit/core/src/workspace/json/utilities.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import * as stableStringify from 'fast-json-stable-stringify'; import { JsonAstArray, JsonAstKeyValue, @@ -14,8 +15,6 @@ import { JsonValue, } from '../../json'; -const stableStringify = require('fast-json-stable-stringify'); - interface CacheEntry { value?: JsonValue; node?: JsonAstNode; diff --git a/yarn.lock b/yarn.lock index 1806b32cbc66..05ec2995ada7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1013,6 +1013,11 @@ "@types/express-serve-static-core" "*" "@types/serve-static" "*" +"@types/fast-json-stable-stringify@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#40363bb847cb86b2c2e1599f1398d11e8329c921" + integrity sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ== + "@types/find-cache-dir@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-2.0.0.tgz#6ee79b947b8e51ce8c565fc8278822b2605609db" @@ -9073,7 +9078,6 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" - uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: From a02724b22c9a16e9fbd4058e6d4efa7382dbc9d7 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 2 Oct 2019 05:18:12 +0000 Subject: [PATCH 0240/1070] build: update sass to version 1.23.0 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 8067022b4bd6..5725d19a1504 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -43,7 +43,7 @@ "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", "rxjs": "6.5.3", - "sass": "1.22.12", + "sass": "1.23.0", "sass-loader": "8.0.0", "semver": "6.3.0", "source-map": "0.7.3", diff --git a/yarn.lock b/yarn.lock index 05ec2995ada7..7b94e4e1cfac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9058,7 +9058,14 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.22.12, sass@^1.17.3: +sass@1.23.0: + version "1.23.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.0.tgz#bd526ff40dbc5d09a4ed69e2cffa849749977710" + integrity sha512-W4HT8+WE31Rzk3EPQC++CXjD5O+lOxgYBIB8Ohvt7/zeE2UzYW+TOczDrRU3KcEy3+xwXXbmDsOZFkoqgD4TKw== + dependencies: + chokidar ">=2.0.0 <4.0.0" + +sass@^1.17.3: version "1.22.12" resolved "https://registry.yarnpkg.com/sass/-/sass-1.22.12.tgz#5cbdd38720ffd1857da695331faee9f634bcb5d7" integrity sha512-u5Rxn+dKTPCW5/11kMNxtmqKsxCjcpnqj9CaJoru1NqeJ0DOa9rOM00e0HqmseTAatGkKoLY+jaNecMYevu1gg== From 6df1c90a52f61171182e909577384fff40a6095b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 2 Oct 2019 05:18:28 +0000 Subject: [PATCH 0241/1070] build: update verdaccio to version 4.3.1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 18ba11a95a6c..1a42b493760e 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "ts-node": "^5.0.0", "tslint-no-circular-imports": "^0.7.0", "tslint-sonarts": "1.9.0", - "verdaccio": "4.3.0" + "verdaccio": "4.3.1" }, "husky": { "hooks": { diff --git a/yarn.lock b/yarn.lock index 7b94e4e1cfac..eea35739064c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10711,10 +10711,10 @@ verdaccio-htpasswd@8.1.2: http-errors "1.7.3" unix-crypt-td-js "1.0.0" -verdaccio@4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.3.0.tgz#db0c51f2497df84d1ab0ea270fed2b5469a757da" - integrity sha512-kaDe07+BPsHO4+fkCdQtTh6rUQjrvhOTc7oRDzAwg1r14q665FUBmJ2xsGyVnoJk9COAKE9dqud8rmkfolj+gA== +verdaccio@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.3.1.tgz#a6d433a8194d683ebd6ccf3684b33e7ef0c3308c" + integrity sha512-3B42RYYmG7P064f4c+2yKNYZmL18Xzn9pDe/C3zVyfkNn+AZZVl/CgoK9bzWXALLqaPILlVImXenASKvtMlb7g== dependencies: "@verdaccio/commons-api" "8.1.2" "@verdaccio/local-storage" "8.1.2" From 42155fc3665e8c2b23c46150323f0491c0d45083 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 2 Oct 2019 06:35:44 +0000 Subject: [PATCH 0242/1070] build: update caniuse-lite to version 1.0.30000998 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 5725d19a1504..4a8a0d1d1aee 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -18,7 +18,7 @@ "autoprefixer": "9.6.1", "browserslist": "4.7.0", "cacache": "13.0.1", - "caniuse-lite": "1.0.30000997", + "caniuse-lite": "1.0.30000998", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", diff --git a/yarn.lock b/yarn.lock index eea35739064c..c6710dec36c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2612,7 +2612,12 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000997, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989: +caniuse-lite@1.0.30000998: + version "1.0.30000998" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000998.tgz#7227a8046841e7d01e156ae7227a504d065f6744" + integrity sha512-8Tj5sPZR9kMHeDD9SZXIVr5m9ofufLLCG2Y4QwQrH18GIwG+kCc+zYdlR036ZRkuKjVVetyxeAgGA1xF7XdmzQ== + +caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989: version "1.0.30000997" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000997.tgz#ba44a606804f8680894b7042612c2c7f65685b7e" integrity sha512-BQLFPIdj2ntgBNWp9Q64LGUIEmvhKkzzHhUHR3CD5A9Lb7ZKF20/+sgadhFap69lk5XmK1fTUleDclaRFvgVUA== From 2303a045ee84ef29a5e71ba9aeef71c85c52149c Mon Sep 17 00:00:00 2001 From: vikerman Date: Mon, 30 Sep 2019 14:49:37 -0700 Subject: [PATCH 0243/1070] feat(@angular-devkit/build-angular): add analytics for ivy/non-ivy builds Look for `ngComponentDef` or `ngModuleDef` in the webpack analytics plugin to report back whether the current build is built with Ivy enabled. --- docs/design/analytics.md | 4 ++-- etc/api/angular_devkit/core/src/_golden-api.d.ts | 1 + .../build_angular/plugins/webpack/analytics.ts | 15 +++++++++++++-- .../angular_devkit/core/src/analytics/index.ts | 2 ++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/design/analytics.md b/docs/design/analytics.md index a51d6a2f625f..dc0861efcc8d 100644 --- a/docs/design/analytics.md +++ b/docs/design/analytics.md @@ -28,8 +28,7 @@ To create a new dimension (tracking a new flag): defined on GA. 1. Use the ID of the dimension as the `x-user-analytics` value in the `schema.json` file. 1. Add a new row to the table below in the same PR as the one adding the dimension to the code. -1. New dimensions PRs need to be approved by [bradgreen@google.com](mailto:bradgreen@google.com), - [stephenfluin@google.com](mailto:stephenfluin@google.com) and +1. New dimensions PRs need to be approved by [stephenfluin@google.com](mailto:stephenfluin@google.com) and [iminar@google.com](mailto:iminar@google.com). **This is not negotiable.** **DO NOT ADD `x-user-analytics` FOR VALUES THAT ARE USER IDENTIFIABLE (PII), FOR EXAMPLE A @@ -48,6 +47,7 @@ Note: There's a limit of 20 custom dimensions. | 5 | `Flag: --style` | `string` | | 6 | `--collection` | `string` | | 7 | `--buildEventLog` | `boolean` | +| 8 | `Ivy Enabled` | `boolean` | | 9 | `Flag: --inlineStyle` | `boolean` | | 10 | `Flag: --inlineTemplate` | `boolean` | | 11 | `Flag: --viewEncapsulation` | `string` | diff --git a/etc/api/angular_devkit/core/src/_golden-api.d.ts b/etc/api/angular_devkit/core/src/_golden-api.d.ts index 6cc16a5bdb55..6419d836f3bc 100644 --- a/etc/api/angular_devkit/core/src/_golden-api.d.ts +++ b/etc/api/angular_devkit/core/src/_golden-api.d.ts @@ -618,6 +618,7 @@ export declare enum NgCliAnalyticsDimensions { NodeVersion = 4, NgAddCollection = 6, NgBuildBuildEventLog = 7, + NgIvyEnabled = 8, BuildErrors = 20 } diff --git a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts index 94f76d36e407..0611a307cc55 100644 --- a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts +++ b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts @@ -69,6 +69,7 @@ export function countOccurrences(source: string, match: string, wordBreak = fals * Holder of statistics related to the build. */ class AnalyticsBuildStats { + public isIvy = false; public errors: string[] = []; public numberOfNgOnInit = 0; public numberOfComponents = 0; @@ -121,13 +122,15 @@ export class NgBuildAnalyticsPlugin { return metrics; } protected _getDimensions(stats: Stats) { - const dimensions: (string | number)[] = []; + const dimensions: (string | number | boolean)[] = []; if (this._stats.errors.length) { // Adding commas before and after so the regex are easier to define filters. dimensions[analytics.NgCliAnalyticsDimensions.BuildErrors] = `,${this._stats.errors.join()},`; } + dimensions[analytics.NgCliAnalyticsDimensions.NgIvyEnabled] = this._stats.isIvy; + return dimensions; } @@ -156,7 +159,15 @@ export class NgBuildAnalyticsPlugin { // This does not include View Engine AOT compilation, we use the ngfactory for it. this._stats.numberOfComponents += countOccurrences(module._source.source(), ' Component({'); // For Ivy we just count ngComponentDef. - this._stats.numberOfComponents += countOccurrences(module._source.source(), 'ngComponentDef', true); + const numIvyComponents = countOccurrences(module._source.source(), 'ngComponentDef', true); + this._stats.numberOfComponents += numIvyComponents; + + // Check whether this is an Ivy app so that it can reported as part of analytics. + if (!this._stats.isIvy) { + if (numIvyComponents > 0 || module._source.source().includes('ngModuleDef')) { + this._stats.isIvy = true; + } + } } } diff --git a/packages/angular_devkit/core/src/analytics/index.ts b/packages/angular_devkit/core/src/analytics/index.ts index 962c451acea1..4a209fd85beb 100644 --- a/packages/angular_devkit/core/src/analytics/index.ts +++ b/packages/angular_devkit/core/src/analytics/index.ts @@ -26,6 +26,7 @@ export enum NgCliAnalyticsDimensions { NodeVersion = 4, NgAddCollection = 6, NgBuildBuildEventLog = 7, + NgIvyEnabled = 8, BuildErrors = 20, } @@ -56,6 +57,7 @@ export const NgCliAnalyticsDimensionsFlagInfo: { [name: string]: [string, string NodeVersion: ['Node Version', 'number'], NgAddCollection: ['--collection', 'string'], NgBuildBuildEventLog: ['--buildEventLog', 'boolean'], + NgIvyEnabled: ['Ivy Enabled', 'boolean'], BuildErrors: ['Build Errors (comma separated)', 'string'], }; From 38823cf92cb7ffd38a53485428b088b5a2e60e3d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 2 Oct 2019 19:03:50 +0000 Subject: [PATCH 0244/1070] build: update @angular/animations to version 9.0.0-next.9 --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 24 ++--- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 ++-- yarn.lock | 96 +++++++++---------- 6 files changed, 76 insertions(+), 76 deletions(-) diff --git a/package.json b/package.json index 1a42b493760e..5938aaa6f34c 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.8", - "@angular/compiler-cli": "9.0.0-next.8", + "@angular/compiler": "9.0.0-next.9", + "@angular/compiler-cli": "9.0.0-next.9", "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.37.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 4a8a0d1d1aee..72dac8402fca 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -65,20 +65,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.8", + "@angular/animations": "9.0.0-next.9", "@angular/cdk": "8.2.2", - "@angular/common": "9.0.0-next.8", - "@angular/compiler": "9.0.0-next.8", - "@angular/compiler-cli": "9.0.0-next.8", - "@angular/core": "9.0.0-next.8", - "@angular/forms": "9.0.0-next.8", - "@angular/localize": "9.0.0-next.8", + "@angular/common": "9.0.0-next.9", + "@angular/compiler": "9.0.0-next.9", + "@angular/compiler-cli": "9.0.0-next.9", + "@angular/core": "9.0.0-next.9", + "@angular/forms": "9.0.0-next.9", + "@angular/localize": "9.0.0-next.9", "@angular/material": "8.2.2", - "@angular/platform-browser": "9.0.0-next.8", - "@angular/platform-browser-dynamic": "9.0.0-next.8", - "@angular/platform-server": "9.0.0-next.8", - "@angular/router": "9.0.0-next.8", - "@angular/service-worker": "9.0.0-next.8", + "@angular/platform-browser": "9.0.0-next.9", + "@angular/platform-browser-dynamic": "9.0.0-next.9", + "@angular/platform-server": "9.0.0-next.9", + "@angular/router": "9.0.0-next.9", + "@angular/service-worker": "9.0.0-next.9", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index df2dc4a5901d..ff9345f9d95b 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.8", - "@angular/compiler-cli": "9.0.0-next.8", + "@angular/compiler": "9.0.0-next.9", + "@angular/compiler-cli": "9.0.0-next.9", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.5.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 0463a299bd6a..1ab341633be3 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.8", - "@angular/compiler-cli": "9.0.0-next.8", + "@angular/compiler": "9.0.0-next.9", + "@angular/compiler-cli": "9.0.0-next.9", "typescript": "3.5.3", "webpack": "4.41.0" } diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index cf6ba9eb909f..b020eda6425f 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#753914f011a26ee22ee007f025d5ea3569e9882d", - "@angular/common": "github:angular/common-builds#c6685642c9cdae459e32edea78b7289da3cec9a9", - "@angular/compiler": "github:angular/compiler-builds#b198b98246fdbde12288e09e905ca87754962330", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#ad9290b95ab1e82287494e54451492c6b7ae05ec", - "@angular/core": "github:angular/core-builds#7bb72c768ef5bbfccba811bb29dd9bc80afece7d", - "@angular/forms": "github:angular/forms-builds#96b01e38bb6e2fc8d408a8d472cb6ecb0fbd8f3d", - "@angular/language-service": "github:angular/language-service-builds#1d08a3852f9f5e35ba41ea6468677ec7b0b3809a", - "@angular/platform-browser": "github:angular/platform-browser-builds#24806af5f6356b0e67878c5c49e2f9d40a5b6763", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#77ce204273f5446f26527193b12a631a28e7764e", - "@angular/router": "github:angular/router-builds#529177427a4ed34310233b90144977640d570232" + "@angular/animations": "github:angular/animations-builds#c6e16e8b41fc235ce8731f467cfe0f3600ba11fb", + "@angular/common": "github:angular/common-builds#c615a3e93c535b1028d5624a3917d24321f58953", + "@angular/compiler": "github:angular/compiler-builds#ab10983d98e1681e8d8bf89a1b4f9e4a34c4df5c", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#9280ab8c5417b62889af22c46a367b75f2cbc966", + "@angular/core": "github:angular/core-builds#efd37c2d68e941979d4338bf1dc2bd28012a3ec8", + "@angular/forms": "github:angular/forms-builds#c3911a86ef060e1f5efd5b8f66fd56b9a4a439f0", + "@angular/language-service": "github:angular/language-service-builds#d9480d6e0592086261cfb9ddded3d6b51895ce4f", + "@angular/platform-browser": "github:angular/platform-browser-builds#061451efe4e6a634d853dfba49bece9e0a5bd6b8", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d2b43a4f1013219be458731963cfefec6187f2a7", + "@angular/router": "github:angular/router-builds#e88dbe9a35b9a9219142fabc8af046a17fc0de45" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index c6710dec36c2..f8ce19a5d1e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.8.tgz#a0931bb11f6d07bdadb79e9c4ccbb34e5f4e97c3" - integrity sha512-srsMTEbrwRFE/Ijn9G87Bv2XVuJnYVjJVJ2zsVDc4Y6OKIPkNqwUeWeT4h5lw4wtg5LMM8Gw0EBHLKqp8p51qw== +"@angular/animations@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.9.tgz#ad169fe6f171a9c917a5c2a0a8ade9159fe9cb3c" + integrity sha512-0d1DNSfaVlPNa4irmHvb7xGo/N6D0eV/mxVGhsisNKQlVKzyMB5/zE/Un0snKa7tkfhU0hvwnMYp5WDl1k5Osg== dependencies: tslib "^1.9.0" @@ -18,17 +18,17 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.8.tgz#7338fd7ca4d48b1e4b636f2d8286af6443a25748" - integrity sha512-bxnneNCX1nO7JXp1YPtZZSbERV5Jpmpjw3YA2aOcu1waVTlV9PFh+mnP+7pTim6k8DRvpwvIB7p08GaDrWP0ZQ== +"@angular/common@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.9.tgz#e80cf09429960747780b7271fca056daca5e7796" + integrity sha512-mGb32CNcA5E4kAfalXgGS79nYWajLB25ifokuKjlgzPw396wVUyE30X9IglPX9w9pq2fXuyYpmDLUhzB4E4fMw== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.8.tgz#33475aad43157b36c5e3e768bc2e100172d35ebb" - integrity sha512-UmoFM/MfJYP8TxdrFG9MZkkz/gCmjRWalWJsZIHgRuZuNclNzTuvwSxWxan8mBpTHCYeTKyZgr3rP1hFqab8dQ== +"@angular/compiler-cli@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.9.tgz#99e56e2ecf37d83cb8137edf893f5326b55998b1" + integrity sha512-TVMdrCHJ9tLPZiRulzAQwsttV6wpOFoDqEEbXV5pY5eHBcv2lP7vJxm5FfJ3XEqMdMyx68h0W4N8TYBraDaGJw== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -41,31 +41,31 @@ tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.8.tgz#6b9a3b827c05403f9ef76a9f40a346539bdf5e2d" - integrity sha512-NYCo1T2924AD45HVTLJcgJFkptzmnTg2GYSRZx9wqFsQxMCb5vok4dow2/irUwJ5MS+7KU9NtRKK+mNSVxsiSg== +"@angular/compiler@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.9.tgz#a0dd68d931b74f0eb1d4342965548c8a403529ba" + integrity sha512-vRywLqsf1VQHuXkSgsjJY1HNVz9GGS3z9KcIwTW+CZsDNteULmLOIHTWxguBx4MfLz77TlOGtiDxosUqxqVZcA== dependencies: tslib "^1.9.0" -"@angular/core@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.8.tgz#b0550354afc1d8a3193efc0332650b8be886b566" - integrity sha512-AOAzhPDoXhuF6znghYqSVxKKQTUDhGscZ4k95wxZVWvRpe19fHxXIDADCFsExpsehofH3k4D/e/8ju0dWumLkA== +"@angular/core@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.9.tgz#c78fc8228d692e3c24dc5f6862644131242d29cc" + integrity sha512-8UJE+3ZVuNNVKcKewtx7jR0K7dHpcsPc9RE0UHil6QBNuyvyaVgDb7pSYdIEs2dx0pX78akvM8VF87Fvc20xWw== dependencies: tslib "^1.9.0" -"@angular/forms@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.8.tgz#f849439d8f4d160448b3dcc6f5a32a30c07a690a" - integrity sha512-DjkelZ36suKHFuyN8NzFJ2d/MVtg+RK+cYRURoKHhFt/Z+0w03m+YKEX0k1NLXF/3ES5aTP0JfxkCHaM97v26Q== +"@angular/forms@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.9.tgz#dc6c41257e1e4cec94c91b4f929ee4c09550c3db" + integrity sha512-iFQprmypUFh/g5Y3R0jF/CcUsitfwB55cUVAfhkBOGPTj8IGBcwJEEtrWxsOdvJieAHRFfQgVcTxmXQHSDKb3Q== dependencies: tslib "^1.9.0" -"@angular/localize@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.8.tgz#14d25ebb88ad451ef9f327c4fbd05cd0c17f5ce9" - integrity sha512-zmH9tGHPG3xmGmuu2o++4yBs36mnpHiZQSwro0KEr8+WU9Hi2Am4jL4TbiL/xe7JpERpr87aESBbcey/oqW/MA== +"@angular/localize@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.9.tgz#c6370a2a176659087a4cb609de982f13bc1a9803" + integrity sha512-Je43V3nMZTjDrhHfnjfOxslxfOZiNyawwSNUz3FX7KfxVx638pzrabgR7hRbIkD6wsginEIpVSKFJ+M9Pr6BFQ== "@angular/material@8.2.2": version "8.2.2" @@ -74,40 +74,40 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.8.tgz#a6397f79d1b1f43c8039495106d5015eebdc6203" - integrity sha512-oS5BFFHZwjR09929GaALdz/iOqzhf6v1B8q0nz2VMR84Nyy0zdl2+iXugXIHurO30XMmjOOTHMLZbwFAaIlRHg== +"@angular/platform-browser-dynamic@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.9.tgz#aa0f375d45af24ff8175a26cd6f297caa0f4e489" + integrity sha512-SIZOsqc5uP9NvmPTNBaZwOquya3ml9COsk3RJFxyDMDWfgGmms0sbk0qNDyErREPZOr2jIP86LP399GNKuMEDw== dependencies: tslib "^1.9.0" -"@angular/platform-browser@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.8.tgz#b1dec2346e0fedd2eeb3815cf6606dd8e671de09" - integrity sha512-vE1MyX2lMHVI6qHM7awJYXrnCbnRX4xRUEBwtfkG/Ipsbu/FwPdbKJs1TifA5+jg214J2KjrpJZggGQe7HOFUQ== +"@angular/platform-browser@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.9.tgz#3bf47fe66b02aac4dddce37baf825f5a7746600b" + integrity sha512-KsBlk/QXKt5IBKB9YunjJdV+RwhiURaxf5wxuFkk72HkLGmQh4aAV1eoviztIwnCn8mu6xgmCF8wsnPfNxL4bw== dependencies: tslib "^1.9.0" -"@angular/platform-server@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.8.tgz#f56867fb3d01d2d2d0620fe7db744b9369fbce30" - integrity sha512-jqQaH9zTZ7+M/6zEBcllSlIyyb2Ka/iB0a//zxEk0Wgu3UsgWzRQyTlJ7blGyKTMpyr6SUTTTLEDmSS/FDWr+Q== +"@angular/platform-server@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.9.tgz#84211e11d90857aa18e7b0c83a221a5c17093971" + integrity sha512-CFVS1HOurJ1H7Nag9mWnjUfp/HL5L2NwEwT89d31NcbHCblv0ou+ifzN8x4M0FPjSWWaNtRVnQev+E1zQ9eULw== dependencies: domino "^2.1.2" tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.8.tgz#e828fae003548b8306fc709e2b34bdbb59a2afa1" - integrity sha512-2+QU9bIpKos+j6eRRFCVufN8K9XQ6oeECNT65xU/Ihk/WnMvgt3+kRB23tEPwXWgdabPibtBIZXnzB1XVvbbRQ== +"@angular/router@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.9.tgz#d2695bb0576f4a60cfe1c1fb35fa62ca6c89f01e" + integrity sha512-kKQfDZx5l3ePwIKI0kk7ujqCjDpK8MYHXZqwfumIqFiFcifIQRDENF5WxTMXaua70kTTQxDsnpNYGXGCEMKIZg== dependencies: tslib "^1.9.0" -"@angular/service-worker@9.0.0-next.8": - version "9.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.8.tgz#1d0c6b81a13aa2d093e36c2a6e36bc118e9a164a" - integrity sha512-KMcbwKuiW0JTJw4Zy36Y9of75ZBh8RfyyaxcxVxYo/VnZ2hdrZkvtsASbh5oLBDYwqQL36wNFQ0kH1w4dY1D3Q== +"@angular/service-worker@9.0.0-next.9": + version "9.0.0-next.9" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.9.tgz#a697db6e75a684e8c4fc479a05e01c9faae23595" + integrity sha512-NDmHMZ8B0PKytuxz4yEmoqFJZoxKINCaZzTH0FUxgXcdkHN69XLBc4f2wBxdnk9nT5YSJhSDOgoDCTURMssAWw== dependencies: tslib "^1.9.0" From 1bddf8b48cbfbf558e7738d2ed5661d6d9171405 Mon Sep 17 00:00:00 2001 From: vikerman Date: Wed, 2 Oct 2019 14:20:41 -0700 Subject: [PATCH 0245/1070] release: v9.0.0-next.7 --- packages/schematics/angular/utility/latest-versions.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 3de2407d8f24..24d95555a823 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,17 +8,17 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.8', + Angular: '~9.0.0-next.9', RxJs: '~6.5.3', ZoneJs: '~0.10.2', TypeScript: '~3.5.3', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.6', - DevkitBuildNgPackagr: '~0.900.0-next.6', - DevkitBuildWebpack: '~0.900.0-next.6', - AngularPWA: '~0.900.0-next.6', + DevkitBuildAngular: '~0.900.0-next.7', + DevkitBuildNgPackagr: '~0.900.0-next.7', + DevkitBuildWebpack: '~0.900.0-next.7', + AngularPWA: '~0.900.0-next.7', ngPackagr: '^5.5.1', }; From 0662a8d77491f3e8ac6fe94f683667ee83a3beda Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Tue, 1 Oct 2019 13:16:33 -0700 Subject: [PATCH 0246/1070] build: g3 sync for packages/schematics and packages/angular Fix all build errors in g3 --- packages/angular/cli/BUILD | 1 - packages/angular/cli/commands/add-impl.ts | 4 ++-- packages/angular_devkit/core/BUILD | 19 +++++++++++-------- .../angular/service-worker/index.ts | 2 +- .../schematics/angular/web-worker/index.ts | 5 +++-- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/angular/cli/BUILD b/packages/angular/cli/BUILD index 9515d5b12bce..4b35ada84242 100644 --- a/packages/angular/cli/BUILD +++ b/packages/angular/cli/BUILD @@ -35,7 +35,6 @@ ts_library( "//packages/angular_devkit/schematics:tools", # @typings: es2017.object "@npm//@types/debug", - "@npm//debug", "@npm//@types/node", "@npm//@types/inquirer", "@npm//@types/semver", diff --git a/packages/angular/cli/commands/add-impl.ts b/packages/angular/cli/commands/add-impl.ts index fe3578f89d57..790a8618115d 100644 --- a/packages/angular/cli/commands/add-impl.ts +++ b/packages/angular/cli/commands/add-impl.ts @@ -91,8 +91,8 @@ export class AddCommand extends SchematicCommand { } else if (!latestManifest || (await this.hasMismatchedPeer(latestManifest))) { // 'latest' is invalid so search for most recent matching package const versionManifests = Object.values(packageMetadata.versions).filter( - value => !prerelease(value.version), - ); + (value: PackageManifest) => !prerelease(value.version), + ) as PackageManifest[]; versionManifests.sort((a, b) => rcompare(a.version, b.version, true)); diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index fe02c5bfced8..383ff74a4522 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -33,11 +33,11 @@ ts_library( # The attribute below is needed in g3 to turn off strict typechecking # strict_checks = False, deps = [ - "@npm//rxjs", - "@npm//@types/node", "@npm//@types/fast-json-stable-stringify", + "@npm//@types/node", "@npm//ajv", "@npm//magic-string", + "@npm//rxjs", "@npm//source-map", # @typings: es2015.core # @typings: es2015.proxy @@ -80,8 +80,10 @@ jasmine_node_test( # TODO: Audit tests to determine if tests can be run in RBE environments local = True, deps = [ - "@npm//jasmine", - "@npm//source-map", + # @node_module: ajv + # @node_module: fast_json_stable_stringify + # @node_module: magic_string + # @node_module: source_map ], ) @@ -137,11 +139,12 @@ jasmine_node_test( # TODO: Audit tests to determine if tests can be run in RBE environments local = True, deps = [ - "@npm//chokidar", - "@npm//jasmine", - "@npm//source-map", "@npm//temp", - "@npm//tslint", + "@npm//chokidar", + # @node_module: ajv + # @node_module: fast_json_stable_stringify + # @node_module: magic_string + # @node_module: temp ], ) diff --git a/packages/schematics/angular/service-worker/index.ts b/packages/schematics/angular/service-worker/index.ts index fa01bff3a40d..3fc6ff4f5680 100644 --- a/packages/schematics/angular/service-worker/index.ts +++ b/packages/schematics/angular/service-worker/index.ts @@ -131,7 +131,7 @@ export default function (options: ServiceWorkerOptions): Rule { let buildConfiguration; if (options.configuration && buildTarget.configurations) { buildConfiguration = - buildTarget.configurations[options.configuration] as BrowserBuilderOptions | undefined; + buildTarget.configurations[options.configuration] as unknown as BrowserBuilderOptions | undefined; } const config = buildConfiguration || buildOptions; diff --git a/packages/schematics/angular/web-worker/index.ts b/packages/schematics/angular/web-worker/index.ts index 2964937bd13f..2e430ce5121e 100644 --- a/packages/schematics/angular/web-worker/index.ts +++ b/packages/schematics/angular/web-worker/index.ts @@ -6,6 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { + JsonAstArray, JsonParseMode, dirname, join, @@ -46,9 +47,9 @@ function addConfig(options: WebWorkerOptions, root: string, tsConfigPath: string throw new SchematicsException('Invalid tsconfig "exclude" property; expected an array.'); } - if (filesAstNode && !filesAstNode.value.includes(workerGlob)) { + if (filesAstNode && !(filesAstNode as JsonAstArray).value.includes(workerGlob)) { const recorder = host.beginUpdate(tsConfigPath); - appendValueInAstArray(recorder, filesAstNode, workerGlob); + appendValueInAstArray(recorder, filesAstNode as JsonAstArray, workerGlob); host.commitUpdate(recorder); } } From fa8216c217bc8b744ef4d103c682b472c201ded9 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Thu, 3 Oct 2019 18:45:53 +0200 Subject: [PATCH 0247/1070] fix(@angular-devkit/build-angular): re-introduce pure_getters PR #15607 removed the `_pure_getters` optimization as it no longer has effect on the framework size. But it does have an effect on third party library. For example a simple project using `@ng-bootstrap/ng-bootstrap` goes from `444K` uncompressed with CLI `9.0.0-next.5` to `488K` with CLI `9.0.0-next.6` which introduced the removal. --- .../src/angular-cli-files/models/webpack-configs/common.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index f05aff592888..9e6db9c0c2bb 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -354,6 +354,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { } : { ecma: terserEcma, + pure_getters: buildOptions.buildOptimizer, // PURE comments work best with 3 passes. // See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926. passes: buildOptions.buildOptimizer ? 3 : 1, From 592a5121a3eafc84b5f5496e3fd2ae4a3d183077 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 27 Sep 2019 15:01:56 -0400 Subject: [PATCH 0248/1070] build: add @babel/core typings --- package.json | 1 + yarn.lock | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5938aaa6f34c..03b575a589fb 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "@bazel/jasmine": "0.37.1", "@bazel/karma": "0.37.1", "@bazel/typescript": "0.37.1", + "@types/babel__core": "7.1.3", "@types/browserslist": "^4.4.0", "@types/caniuse-lite": "^1.0.0", "@types/clean-css": "^4.2.1", diff --git a/yarn.lock b/yarn.lock index f8ce19a5d1e2..0cac4c961eb4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -321,7 +321,7 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.2": +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.2": version "7.6.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.2.tgz#205e9c95e16ba3b8b96090677a67c9d6075b70a1" integrity sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg== @@ -744,7 +744,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0": +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0": version "7.6.1" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g== @@ -922,6 +922,39 @@ resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA== +"@types/babel__core@7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30" + integrity sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.0.tgz#f1ec1c104d1bb463556ecb724018ab788d0c172a" + integrity sha512-c1mZUu4up5cp9KROs/QAw0gTeHrw/x7m52LcnvMxxOZ03DmLwPV0MlGmlgzV3cnSdjhJOZsj7E7FHeioai+egw== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" + integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*": + version "7.0.7" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.7.tgz#2496e9ff56196cc1429c72034e07eab6121b6f3f" + integrity sha512-CeBpmX1J8kWLcDEnI3Cl2Eo6RfbGvzUctA+CjZUhOKDFbLfcr7fc4usEqLNWetrlJd7RhAkyYe2czXop4fICpw== + dependencies: + "@babel/types" "^7.3.0" + "@types/bluebird@*": version "3.5.27" resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.27.tgz#61eb4d75dc6bfbce51cf49ee9bbebe941b2cb5d0" From 1cefbc6974bbf7a9d1d8d8f1a10b73c37c94f267 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 30 Sep 2019 21:10:05 -0400 Subject: [PATCH 0249/1070] refactor(@angular-devkit/build-angular): process bundle code quality improvements --- .../src/browser/action-executor.ts | 4 +- .../build_angular/src/browser/index.ts | 3 +- .../build_angular/src/utils/process-bundle.ts | 480 +++++++++++------- 3 files changed, 292 insertions(+), 195 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/action-executor.ts b/packages/angular_devkit/build_angular/src/browser/action-executor.ts index 29f9d7a39b89..7471e885d626 100644 --- a/packages/angular_devkit/build_angular/src/browser/action-executor.ts +++ b/packages/angular_devkit/build_angular/src/browser/action-executor.ts @@ -14,16 +14,18 @@ export class ActionExecutor { private smallThreshold = 32 * 1024; - constructor(actionFile: string, private readonly actionName: string) { + constructor(actionFile: string, private readonly actionName: string, setupOptions?: unknown) { // larger files are processed in a separate process to limit memory usage in the main process this.largeWorker = new JestWorker(actionFile, { exposedMethods: [actionName], + setupArgs: setupOptions === undefined ? undefined : [setupOptions], }); // small files are processed in a limited number of threads to improve speed // The limited number also prevents a large increase in memory usage for an otherwise short operation this.smallWorker = new JestWorker(actionFile, { exposedMethods: [actionName], + setupArgs: setupOptions === undefined ? undefined : [setupOptions], numWorkers: os.cpus().length < 2 ? 1 : 2, // Will automatically fallback to processes if not supported enableWorkerThreads: true, diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 7bf3fa8b1eac..f84b63ef6037 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -543,13 +543,11 @@ export function buildWebpackBrowser( processRuntimeAction = { ...action, cacheKeys, - cachePath: cacheDownlevelPath || undefined, }; } else { processActions.push({ ...action, cacheKeys, - cachePath: cacheDownlevelPath || undefined, }); } } @@ -593,6 +591,7 @@ export function buildWebpackBrowser( ? workerFile : require.resolve('../utils/process-bundle-bootstrap'), 'process', + { cachePath: cacheDownlevelPath }, ); try { diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index f0e9f5c07600..82da8993e5c3 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -5,14 +5,14 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { transformAsync } from '@babel/core'; import { createHash } from 'crypto'; import * as fs from 'fs'; import * as path from 'path'; -import { SourceMapConsumer, SourceMapGenerator } from 'source-map'; +import { RawSourceMap, SourceMapConsumer, SourceMapGenerator } from 'source-map'; import { minify } from 'terser'; import { manglingDisabled } from './mangle-options'; -const { transformAsync } = require('@babel/core'); const cacache = require('cacache'); export interface ProcessBundleOptions { @@ -28,7 +28,6 @@ export interface ProcessBundleOptions { optimizeOnly?: boolean; ignoreOriginal?: boolean; cacheKeys?: (string | null)[]; - cachePath?: string; integrityAlgorithm?: 'sha256' | 'sha384' | 'sha512'; runtimeData?: ProcessBundleResult[]; } @@ -57,180 +56,124 @@ export const enum CacheKey { DownlevelMap = 3, } +let cachePath: string | undefined; + +export function setup(options: { cachePath: string }): void { + cachePath = options.cachePath; +} + +async function cachePut(content: string, key: string | null, integrity?: string): Promise { + if (cachePath && key) { + await cacache.put(cachePath, key, content, { + metadata: { integrity }, + }); + } +} + export async function process(options: ProcessBundleOptions): Promise { if (!options.cacheKeys) { options.cacheKeys = []; } - // If no downlevelling required than just mangle code and return - if (options.optimizeOnly) { - const result: ProcessBundleResult = { name: options.name }; - if (options.integrityAlgorithm) { - result.integrity = generateIntegrityValue(options.integrityAlgorithm, options.code); - } - - // Replace integrity hashes with updated values - // NOTE: This should eventually be a babel plugin - if (options.runtime && options.integrityAlgorithm && options.runtimeData) { - for (const data of options.runtimeData) { - if (!data.integrity || !data.original || !data.original.integrity) { - continue; - } - - options.code = options.code.replace(data.integrity, data.original.integrity); - } - } - - result.original = await mangleOriginal(options); + const result: ProcessBundleResult = { name: options.name }; + if (options.integrityAlgorithm) { + // Store unmodified code integrity value -- used for SRI value replacement + result.integrity = generateIntegrityValue(options.integrityAlgorithm, options.code); + } - return result; + // Runtime chunk requires specialized handling + if (options.runtime) { + return { ...result, ...(await processRuntime(options)) }; } + const basePath = path.dirname(options.filename); + const filename = path.basename(options.filename); + const downlevelFilename = filename.replace('es2015', 'es5'); + const downlevel = !options.optimizeOnly; + // if code size is larger than 500kB, manually handle sourcemaps with newer source-map package. // babel currently uses an older version that still supports sync calls - const codeSize = Buffer.byteLength(options.code, 'utf8'); - const mapSize = options.map ? Buffer.byteLength(options.map, 'utf8') : 0; + const codeSize = Buffer.byteLength(options.code); + const mapSize = options.map ? Buffer.byteLength(options.map) : 0; const manualSourceMaps = codeSize >= 500 * 1024 || mapSize >= 500 * 1024; - // downlevel the bundle - let { code, map } = await transformAsync(options.code, { - filename: options.filename, - inputSourceMap: !manualSourceMaps && options.map !== undefined && JSON.parse(options.map), - babelrc: false, - // modules aren't needed since the bundles use webpack's custom module loading - // 'transform-typeof-symbol' generates slower code - presets: [ - ['@babel/preset-env', { modules: false, exclude: ['transform-typeof-symbol'] }], - ], - minified: options.optimize, - // `false` ensures it is disabled and prevents large file warnings - compact: options.optimize || false, - sourceMaps: options.sourceMaps, - }); - - const newFilePath = options.filename.replace('es2015', 'es5'); - - // Adjust lazy loaded scripts to point to the proper variant - // Extra spacing is intentional to align source line positions - if (options.runtime) { - code = code.replace('"-es2015.', ' "-es5.'); - - // Replace integrity hashes with updated values - // NOTE: This should eventually be a babel plugin - if (options.integrityAlgorithm && options.runtimeData) { - for (const data of options.runtimeData) { - if (!data.integrity || !data.downlevel || !data.downlevel.integrity) { - continue; - } + const sourceCode = options.code; + const sourceMap = options.map ? JSON.parse(options.map) : undefined; + + let downlevelCode; + let downlevelMap; + if (downlevel) { + // Downlevel the bundle + const transformResult = await transformAsync(sourceCode, { + filename: options.filename, + inputSourceMap: manualSourceMaps ? undefined : sourceMap, + babelrc: false, + // modules aren't needed since the bundles use webpack's custom module loading + // 'transform-typeof-symbol' generates slower code + presets: [['@babel/preset-env', { modules: false, exclude: ['transform-typeof-symbol'] }]], + minified: options.optimize, + // `false` ensures it is disabled and prevents large file warnings + compact: options.optimize || false, + sourceMaps: !!sourceMap, + }); - code = code.replace(data.integrity, data.downlevel.integrity); - } + if (!transformResult || !transformResult.code) { + throw new Error(`Unknown error occurred processing bundle for "${options.filename}".`); } - } + downlevelCode = transformResult.code; - if (options.sourceMaps && manualSourceMaps && options.map) { - const generator = new SourceMapGenerator(); - let sourceRoot; - await SourceMapConsumer.with(options.map, null, originalConsumer => { - sourceRoot = 'sourceRoot' in originalConsumer ? originalConsumer.sourceRoot : undefined; - - return SourceMapConsumer.with(map, null, newConsumer => { - newConsumer.eachMapping(mapping => { - if (mapping.originalLine === null) { - return; - } - - const originalPosition = originalConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn, - }); - - if ( - originalPosition.line === null || - originalPosition.column === null || - originalPosition.source === null - ) { - return; - } - - generator.addMapping({ - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn, - }, - name: originalPosition.name || undefined, - original: { - line: originalPosition.line, - column: originalPosition.column, - }, - source: originalPosition.source, - }); - }); - }); - }); - - map = generator.toJSON(); - map.file = path.basename(newFilePath); - map.sourceRoot = sourceRoot; + if (manualSourceMaps && sourceMap && transformResult.map) { + downlevelMap = await mergeSourcemaps(sourceMap, transformResult.map); + } else { + // undefined is needed here to normalize the property type + downlevelMap = transformResult.map || undefined; + } } - const result: ProcessBundleResult = { name: options.name }; - if (options.optimize) { - // Note: Investigate converting the AST instead of re-parsing - // estree -> terser is already supported; need babel -> estree/terser - - // Mangle downlevel code - const minifyOutput = minify(code, { - compress: true, - ecma: 5, - mangle: !manglingDisabled, - safari10: true, - output: { - ascii_only: true, - webkit: true, - }, - sourceMap: options.sourceMaps && { - filename: path.basename(newFilePath), - content: map, - }, - }); - - if (minifyOutput.error) { - throw minifyOutput.error; + if (downlevelCode) { + const minifyResult = terserMangle(downlevelCode, { + filename: downlevelFilename, + map: downlevelMap, + compress: true, + }); + downlevelCode = minifyResult.code; + downlevelMap = minifyResult.map; } - code = minifyOutput.code; - map = minifyOutput.map; - - // Mangle original code if (!options.ignoreOriginal) { result.original = await mangleOriginal(options); } - } else if (map) { - map = JSON.stringify(map); } - if (map) { - if (!options.hiddenSourceMaps) { - code += `\n//# sourceMappingURL=${path.basename(newFilePath)}.map`; - } + if (downlevelCode) { + const downlevelPath = path.join(basePath, downlevelFilename); - if (options.cachePath && options.cacheKeys[CacheKey.DownlevelMap]) { - await cacache.put(options.cachePath, options.cacheKeys[CacheKey.DownlevelMap], map); - } + let mapContent; + if (downlevelMap) { + if (!options.hiddenSourceMaps) { + downlevelCode += `\n//# sourceMappingURL=${downlevelFilename}.map`; + } - fs.writeFileSync(newFilePath + '.map', map); - } + mapContent = JSON.stringify(downlevelMap); + await cachePut(mapContent, options.cacheKeys[CacheKey.DownlevelMap]); + fs.writeFileSync(downlevelPath + '.map', mapContent); + } - result.downlevel = createFileEntry(newFilePath, code, map, options.integrityAlgorithm); + result.downlevel = createFileEntry( + downlevelFilename, + downlevelCode, + mapContent, + options.integrityAlgorithm, + ); - if (options.cachePath && options.cacheKeys[CacheKey.DownlevelCode]) { - await cacache.put(options.cachePath, options.cacheKeys[CacheKey.DownlevelCode], code, { - metadata: { integrity: result.downlevel.integrity }, - }); + await cachePut( + downlevelCode, + options.cacheKeys[CacheKey.DownlevelCode], + result.downlevel.integrity, + ); + fs.writeFileSync(downlevelPath, downlevelCode); } - fs.writeFileSync(newFilePath, code); // If original was not processed, add info if (!result.original && !options.ignoreOriginal) { @@ -242,74 +185,138 @@ export async function process(options: ProcessBundleOptions): Promise { + return SourceMapConsumer.with(second, null, newConsumer => { + newConsumer.eachMapping(mapping => { + if (mapping.originalLine === null) { + return; + } + const originalPosition = originalConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn, + }); + if ( + originalPosition.line === null || + originalPosition.column === null || + originalPosition.source === null + ) { + return; + } + generator.addMapping({ + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn, + }, + name: originalPosition.name || undefined, + original: { + line: originalPosition.line, + column: originalPosition.column, + }, + source: originalPosition.source, + }); + }); + }); + }); + + const map = generator.toJSON(); + map.file = second.file; + map.sourceRoot = sourceRoot; + + // Put the sourceRoot back + if (sourceRoot) { + first.sourceRoot = sourceRoot; } - return result; + return map; } async function mangleOriginal(options: ProcessBundleOptions): Promise { - const resultOriginal = minify(options.code, { - compress: false, + const result = terserMangle(options.code, { + filename: path.basename(options.filename), + map: options.map ? JSON.parse(options.map) : undefined, ecma: 6, - mangle: !manglingDisabled, - safari10: true, - output: { - ascii_only: true, - webkit: true, - }, - sourceMap: options.sourceMaps && - options.map !== undefined && { - filename: path.basename(options.filename), - content: JSON.parse(options.map), - }, }); - if (resultOriginal.error) { - throw resultOriginal.error; - } - - if (resultOriginal.map) { + let mapContent; + if (result.map) { if (!options.hiddenSourceMaps) { - resultOriginal.code += `\n//# sourceMappingURL=${path.basename(options.filename)}.map`; + result.code += `\n//# sourceMappingURL=${path.basename(options.filename)}.map`; } - if (options.cachePath && options.cacheKeys && options.cacheKeys[CacheKey.OriginalMap]) { - await cacache.put( - options.cachePath, - options.cacheKeys[CacheKey.OriginalMap], - resultOriginal.map, - ); - } + mapContent = JSON.stringify(result.map); - fs.writeFileSync(options.filename + '.map', resultOriginal.map); + await cachePut( + mapContent, + (options.cacheKeys && options.cacheKeys[CacheKey.OriginalMap]) || null, + ); + fs.writeFileSync(options.filename + '.map', mapContent); } const fileResult = createFileEntry( options.filename, - // tslint:disable-next-line: no-non-null-assertion - resultOriginal.code!, - resultOriginal.map as string, + result.code, + mapContent, options.integrityAlgorithm, ); - if (options.cachePath && options.cacheKeys && options.cacheKeys[CacheKey.OriginalCode]) { - await cacache.put( - options.cachePath, - options.cacheKeys[CacheKey.OriginalCode], - resultOriginal.code, - { - metadata: { integrity: fileResult.integrity }, - }, - ); - } - - fs.writeFileSync(options.filename, resultOriginal.code); + await cachePut( + result.code, + (options.cacheKeys && options.cacheKeys[CacheKey.OriginalCode]) || null, + fileResult.integrity, + ); + fs.writeFileSync(options.filename, result.code); return fileResult; } +function terserMangle( + code: string, + options: { filename?: string; map?: RawSourceMap; compress?: boolean; ecma?: 5 | 6 } = {}, +) { + // Note: Investigate converting the AST instead of re-parsing + // estree -> terser is already supported; need babel -> estree/terser + + // Mangle downlevel code + const minifyOutput = minify(code, { + compress: options.compress || false, + ecma: options.ecma || 5, + mangle: !manglingDisabled, + safari10: true, + output: { + ascii_only: true, + webkit: true, + }, + sourceMap: + !!options.map && + ({ + filename: options.filename, + // terser uses an old version of the sourcemap typings + // tslint:disable-next-line: no-any + content: options.map as any, + asObject: true, + // typings don't include asObject option + // tslint:disable-next-line: no-any + } as any), + }); + + if (minifyOutput.error) { + throw minifyOutput.error; + } + + // tslint:disable-next-line: no-non-null-assertion + return { code: minifyOutput.code!, map: minifyOutput.map as RawSourceMap | undefined }; +} + function createFileEntry( filename: string, code: string, @@ -338,3 +345,92 @@ function generateIntegrityValue(hashAlgorithm: string, code: string) { .digest('base64') ); } + +// The webpack runtime chunk is already ES5. +// However, two variants are still needed due to lazy routing and SRI differences +// NOTE: This should eventually be a babel plugin +async function processRuntime( + options: ProcessBundleOptions, +): Promise> { + let originalCode = options.code; + let downlevelCode = options.code; + + // Replace integrity hashes with updated values + if (options.integrityAlgorithm && options.runtimeData) { + for (const data of options.runtimeData) { + if (!data.integrity) { + continue; + } + + if (data.original && data.original.integrity) { + originalCode = originalCode.replace(data.integrity, data.original.integrity); + } + if (data.downlevel && data.downlevel.integrity) { + downlevelCode = downlevelCode.replace(data.integrity, data.downlevel.integrity); + } + } + } + + // Adjust lazy loaded scripts to point to the proper variant + // Extra spacing is intentional to align source line positions + downlevelCode = downlevelCode.replace('"-es2015.', ' "-es5.'); + + const downlevelFilePath = options.filename.replace('es2015', 'es5'); + let downlevelMap; + let result; + if (options.optimize) { + const minifiyResults = terserMangle(downlevelCode, { + filename: path.basename(downlevelFilePath), + map: options.map === undefined ? undefined : JSON.parse(options.map), + }); + downlevelCode = minifiyResults.code; + downlevelMap = JSON.stringify(minifiyResults.map); + + result = { + original: await mangleOriginal({ ...options, code: originalCode }), + downlevel: createFileEntry( + downlevelFilePath, + downlevelCode, + downlevelMap, + options.integrityAlgorithm, + ), + }; + } else { + if (options.map) { + const rawMap = JSON.parse(options.map) as RawSourceMap; + rawMap.file = path.basename(downlevelFilePath); + downlevelMap = JSON.stringify(rawMap); + } + + result = { + original: createFileEntry( + options.filename, + originalCode, + options.map, + options.integrityAlgorithm, + ), + downlevel: createFileEntry( + downlevelFilePath, + downlevelCode, + downlevelMap, + options.integrityAlgorithm, + ), + }; + } + + if (downlevelMap) { + await cachePut( + downlevelMap, + (options.cacheKeys && options.cacheKeys[CacheKey.DownlevelMap]) || null, + ); + fs.writeFileSync(downlevelFilePath + '.map', downlevelMap); + downlevelCode += `\n//# sourceMappingURL=${path.basename(downlevelFilePath)}.map`; + } + await cachePut( + downlevelCode, + (options.cacheKeys && options.cacheKeys[CacheKey.DownlevelCode]) || null, + ); + fs.writeFileSync(downlevelFilePath, downlevelCode); + + return result; +} From 72d1bf3c52d36a43554d1c1d9607b5ab5c4f06ab Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 30 Sep 2019 21:10:54 -0400 Subject: [PATCH 0250/1070] refactor(@angular-devkit/build-angular): support reading i18n project options --- .../build_angular/src/browser/index.ts | 19 ++++++-- .../build_angular/src/utils/i18n-options.ts | 47 +++++++++++++++++++ 2 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/utils/i18n-options.ts diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index f84b63ef6037..c136b54976e9 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -64,6 +64,7 @@ import { normalizeOptimization, normalizeSourceMaps, } from '../utils'; +import { I18nOptions, createI18nOptions } from '../utils/i18n-options'; import { manglingDisabled } from '../utils/mangle-options'; import { CacheKey, @@ -167,13 +168,23 @@ async function initialize( context: BuilderContext, host: virtualFs.Host, webpackConfigurationTransform?: ExecutionTransformer, -): Promise<{ config: webpack.Configuration[]; projectRoot: string; projectSourceRoot?: string }> { +): Promise<{ + config: webpack.Configuration[]; + projectRoot: string; + projectSourceRoot?: string; + i18n: I18nOptions; +}> { const { config, projectRoot, projectSourceRoot } = await buildBrowserWebpackConfigFromContext( options, context, host, ); + // target is verified in the above call + // tslint:disable-next-line: no-non-null-assertion + const metadata = await context.getProjectMetadata(context.target!); + const i18n = createI18nOptions(metadata); + let transformedConfig; if (webpackConfigurationTransform) { transformedConfig = []; @@ -190,7 +201,7 @@ async function initialize( ).toPromise(); } - return { config: transformedConfig || config, projectRoot, projectSourceRoot }; + return { config: transformedConfig || config, projectRoot, projectSourceRoot, i18n }; } // tslint:disable-next-line: no-big-function @@ -211,7 +222,7 @@ export function buildWebpackBrowser( return from(initialize(options, context, host, transforms.webpackConfiguration)).pipe( // tslint:disable-next-line: no-big-function - switchMap(({ config: configs, projectRoot }) => { + switchMap(({ config: configs, projectRoot, i18n }) => { const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); const target = tsConfig.options.target || ScriptTarget.ES5; const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot, target); @@ -591,7 +602,7 @@ export function buildWebpackBrowser( ? workerFile : require.resolve('../utils/process-bundle-bootstrap'), 'process', - { cachePath: cacheDownlevelPath }, + { cachePath: cacheDownlevelPath, i18n }, ); try { diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts new file mode 100644 index 000000000000..dbc7fad8820a --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -0,0 +1,47 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { json } from '@angular-devkit/core'; + +export interface I18nOptions { + sourceLocale?: string; + locales: Record; +} + +export function createI18nOptions(metadata: json.JsonObject): I18nOptions { + const i18n: I18nOptions = { locales: {} }; + + if (metadata.sourceLocale !== undefined && typeof metadata.sourceLocale !== 'string') { + throw new Error('Project i18n sourceLocale field is malformed. Expected a string.'); + } + + // en-US is the default locale added to Angular applications (https://angular.io/guide/i18n#i18n-pipes) + i18n.sourceLocale = metadata.sourceLocale || 'en-US'; + + if ( + metadata.locales !== undefined && + (!metadata.locales || typeof metadata.locales !== 'object' || Array.isArray(metadata.locales)) + ) { + throw new Error('Project i18n locales field is malformed. Expected an object.'); + } else if (metadata.locales) { + for (const [locale, translationFile] of Object.entries(metadata.locales)) { + if (typeof translationFile !== 'string') { + throw new Error( + `Project i18n locales field value for '${locale}' is malformed. Expected a string.`, + ); + } + + // TODO: Integrate translation file parsing from FW when available + i18n.locales[locale] = { + file: translationFile, + translation: {}, + }; + } + } + + return i18n; +} From 645b60192bfd28426efcb0e90d45c4bcf638b87c Mon Sep 17 00:00:00 2001 From: Nikita Potapenko Date: Wed, 2 Oct 2019 15:34:41 +0300 Subject: [PATCH 0251/1070] fix(@angular/cli): initialize baseUrl variable baseUrl is not provided to protractor config because it was undefined --- packages/angular_devkit/build_angular/src/protractor/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/protractor/index.ts b/packages/angular_devkit/build_angular/src/protractor/index.ts index 2ae7bda8bec7..ef7768fd7144 100644 --- a/packages/angular_devkit/build_angular/src/protractor/index.ts +++ b/packages/angular_devkit/build_angular/src/protractor/index.ts @@ -92,7 +92,7 @@ async function execute( await updateWebdriver(); } - let baseUrl; + let baseUrl = options.baseUrl; let server; if (options.devServerTarget) { const target = targetFromTargetString(options.devServerTarget); From 791e09b93510fb3403ba464d74a933de5f92d8f9 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 3 Oct 2019 20:28:39 +0000 Subject: [PATCH 0252/1070] build: update @angular/animations to version --- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index b020eda6425f..3d727b94e4d2 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#c6e16e8b41fc235ce8731f467cfe0f3600ba11fb", - "@angular/common": "github:angular/common-builds#c615a3e93c535b1028d5624a3917d24321f58953", - "@angular/compiler": "github:angular/compiler-builds#ab10983d98e1681e8d8bf89a1b4f9e4a34c4df5c", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#9280ab8c5417b62889af22c46a367b75f2cbc966", - "@angular/core": "github:angular/core-builds#efd37c2d68e941979d4338bf1dc2bd28012a3ec8", - "@angular/forms": "github:angular/forms-builds#c3911a86ef060e1f5efd5b8f66fd56b9a4a439f0", - "@angular/language-service": "github:angular/language-service-builds#d9480d6e0592086261cfb9ddded3d6b51895ce4f", - "@angular/platform-browser": "github:angular/platform-browser-builds#061451efe4e6a634d853dfba49bece9e0a5bd6b8", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d2b43a4f1013219be458731963cfefec6187f2a7", - "@angular/router": "github:angular/router-builds#e88dbe9a35b9a9219142fabc8af046a17fc0de45" + "@angular/animations": "github:angular/animations-builds#e4cbf5fdb0a930c07f87697f0383fd47bfb31877", + "@angular/common": "github:angular/common-builds#a019aa4c7dc74e975f5de6dfcbc51e2e0e974a51", + "@angular/compiler": "github:angular/compiler-builds#06b9bfdacd371da241945e457e3a7e426938c6cb", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#c3ac6886635bfc44e56c64bbf9a7a6f9e93ef156", + "@angular/core": "github:angular/core-builds#207392f1404d5e01a0535bfde74e278c569a1990", + "@angular/forms": "github:angular/forms-builds#ad4d83c8df520417c42e0bbd7a5fed058b5215aa", + "@angular/language-service": "github:angular/language-service-builds#b20b826fdcb5e3f4c878e579ca02493f82b28333", + "@angular/platform-browser": "github:angular/platform-browser-builds#d6805422bf75c35803e228df4fcb7f8d07c862db", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#968d124ca53b5627be363c8033f1df990cf4c2c6", + "@angular/router": "github:angular/router-builds#0c7caf48fc31c0b9833827a836a8551197a1e53c" } } \ No newline at end of file From 190a852e45662ca18b5a4b0a15b66a1a09172778 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 3 Oct 2019 06:38:27 +0000 Subject: [PATCH 0253/1070] build: update verdaccio to version 4.3.3 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 03b575a589fb..32b35eafe820 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "ts-node": "^5.0.0", "tslint-no-circular-imports": "^0.7.0", "tslint-sonarts": "1.9.0", - "verdaccio": "4.3.1" + "verdaccio": "4.3.3" }, "husky": { "hooks": { diff --git a/yarn.lock b/yarn.lock index 0cac4c961eb4..909064490178 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10749,10 +10749,10 @@ verdaccio-htpasswd@8.1.2: http-errors "1.7.3" unix-crypt-td-js "1.0.0" -verdaccio@4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.3.1.tgz#a6d433a8194d683ebd6ccf3684b33e7ef0c3308c" - integrity sha512-3B42RYYmG7P064f4c+2yKNYZmL18Xzn9pDe/C3zVyfkNn+AZZVl/CgoK9bzWXALLqaPILlVImXenASKvtMlb7g== +verdaccio@4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.3.3.tgz#4a3e462dc88da9afed22b1a91aa47dc818b110af" + integrity sha512-XE86BmCRVh6qghyO+v9o4VyydvJ/A/AFQul6wzo/tRriQxuOLFdsmVvAd8tZNqE4FKSXowTqQtABmKYB2cBNZw== dependencies: "@verdaccio/commons-api" "8.1.2" "@verdaccio/local-storage" "8.1.2" From 176698feed646b822f90f8dd09eb8b456442b338 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 3 Oct 2019 06:21:51 +0000 Subject: [PATCH 0254/1070] build: update webpack-dev-server to version 3.8.2 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 59 +++++++++++++++++-- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 72dac8402fca..b5796b5cf433 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -58,7 +58,7 @@ "terser-webpack-plugin": "2.1.0", "webpack": "4.41.0", "webpack-dev-middleware": "3.7.2", - "webpack-dev-server": "3.8.1", + "webpack-dev-server": "3.8.2", "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", "webpack-subresource-integrity": "1.3.4", diff --git a/yarn.lock b/yarn.lock index 909064490178..e9bb5edfa9d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5124,7 +5124,7 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" -http-proxy-middleware@^0.19.1: +http-proxy-middleware@0.19.1, http-proxy-middleware@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== @@ -5396,7 +5396,7 @@ ipaddr.js@^1.9.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-absolute-url@^3.0.2: +is-absolute-url@^3.0.2, is-absolute-url@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== @@ -7248,6 +7248,11 @@ node-forge@0.8.2: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.2.tgz#b4bcc59fb12ce77a8825fc6a783dfe3182499c5a" integrity sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg== +node-forge@0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" + integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ== + node-gyp-build@~4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb" @@ -9205,6 +9210,13 @@ selfsigned@^1.10.6: dependencies: node-forge "0.8.2" +selfsigned@^1.10.7: + version "1.10.7" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b" + integrity sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA== + dependencies: + node-forge "0.9.0" + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -10875,7 +10887,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.1: +webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.1, webpack-dev-middleware@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== @@ -10886,7 +10898,46 @@ webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.1: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.8.1, webpack-dev-server@^3.1.4: +webpack-dev-server@3.8.2: + version "3.8.2" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.2.tgz#3292427bf6510da9a3ac2d500b924a4197667ff9" + integrity sha512-0xxogS7n5jHDQWy0WST0q6Ykp7UGj4YvWh+HVN71JoE7BwPxMZrwgraBvmdEMbDVMBzF0u+mEzn8TQzBm5NYJQ== + dependencies: + ansi-html "0.0.7" + bonjour "^3.5.0" + chokidar "^2.1.8" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" + debug "^4.1.1" + del "^4.1.1" + express "^4.17.1" + html-entities "^1.2.1" + http-proxy-middleware "0.19.1" + import-local "^2.0.0" + internal-ip "^4.3.0" + ip "^1.1.5" + is-absolute-url "^3.0.3" + killable "^1.0.1" + loglevel "^1.6.4" + opn "^5.5.0" + p-retry "^3.0.1" + portfinder "^1.0.24" + schema-utils "^1.0.0" + selfsigned "^1.10.7" + semver "^6.3.0" + serve-index "^1.9.1" + sockjs "0.3.19" + sockjs-client "1.4.0" + spdy "^4.0.1" + strip-ansi "^3.0.1" + supports-color "^6.1.0" + url "^0.11.0" + webpack-dev-middleware "^3.7.2" + webpack-log "^2.0.0" + ws "^6.2.1" + yargs "12.0.5" + +webpack-dev-server@^3.1.4: version "3.8.1" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.1.tgz#485b64c4aadc23f601e72114b40c1b1fea31d9f1" integrity sha512-9F5DnfFA9bsrhpUCAfQic/AXBVHvq+3gQS+x6Zj0yc1fVVE0erKh2MV4IV12TBewuTrYeeTIRwCH9qLMvdNvTw== From c2b13a7683615436d0298061bd93d742526b4842 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 3 Oct 2019 14:19:00 +0100 Subject: [PATCH 0255/1070] feat(@angular-devkit/build-optimizer): don't use getImportTslibTransformer This transformer can cause size regressions when it introduces `tslib` imports across independent chunks. It should be deprecated because tslib adoption has become more ubiquitous. Should also speed up Build Optimizer processing time because there's one less thing to do. Closes https://github.com/angular/angular-cli/issues/15401 without adding the warning, because some libraries like zone.js should inline the helpers. --- .../src/build-optimizer/build-optimizer.ts | 15 --------------- .../src/build-optimizer/build-optimizer_spec.ts | 6 ------ .../src/transforms/import-tslib.ts | 3 +++ 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts index 5113273314bd..eac95c7f23f0 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts @@ -11,7 +11,6 @@ import { TransformJavascriptOutput, transformJavascript, } from '../helpers/transform-javascript'; -import { getImportTslibTransformer, testImportTslib } from '../transforms/import-tslib'; import { getPrefixClassesTransformer, testPrefixClasses } from '../transforms/prefix-classes'; import { getPrefixFunctionsTransformer } from '../transforms/prefix-functions'; import { @@ -109,8 +108,6 @@ export function buildOptimizer(options: BuildOptimizerOptions): TransformJavascr selectedGetScrubFileTransformer = getScrubFileTransformerForCore; } - const isWebpackBundle = content.indexOf('__webpack_require__') !== -1; - // Determine which transforms to apply. const getTransforms = []; @@ -133,22 +130,10 @@ export function buildOptimizer(options: BuildOptimizerOptions): TransformJavascr typeCheck = true; } - // tests are not needed for fast path - // usage will be expanded once transformers are verified safe - const ignoreTest = !options.emitSourceMap && !typeCheck; - if (testPrefixClasses(content)) { getTransforms.unshift(getPrefixClassesTransformer); } - // This transform introduces import/require() calls, but this won't work properly on libraries - // built with Webpack. These libraries use __webpack_require__() calls instead, which will break - // with a new import that wasn't part of it's original module list. - // We ignore this transform for such libraries. - if (!isWebpackBundle && (ignoreTest || testImportTslib(content))) { - getTransforms.unshift(getImportTslibTransformer); - } - getTransforms.push(getWrapEnumsTransformer); const transformJavascriptOpts: TransformJavascriptOptions = { diff --git a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts index e8e90f6256ea..cb242499a1ae 100644 --- a/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer_spec.ts @@ -22,11 +22,6 @@ describe('build-optimizer', () => { it('applies scrub-file and prefix-functions to side-effect free modules', () => { const input = tags.stripIndent` ${imports} - var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; var ChangeDetectionStrategy; (function (ChangeDetectionStrategy) { ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; @@ -55,7 +50,6 @@ describe('build-optimizer', () => { var RenderType_MdOption = ɵcrt({ encapsulation: 2, styles: styles_MdOption}); `; const output = tags.oneLine` - import { __extends } from "tslib"; ${imports} var ChangeDetectionStrategy = /*@__PURE__*/ (function (ChangeDetectionStrategy) { ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts index 8cb23c73a568..d4f01a0fb5eb 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts @@ -17,6 +17,9 @@ export function testImportTslib(content: string) { return regex.test(content); } +/** + * @deprecated From 0.900.0 + */ export function getImportTslibTransformer(): ts.TransformerFactory { return (context: ts.TransformationContext): ts.Transformer => { From 07bfd1eeb309ce8795f39962474a29951af1dd6a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 3 Oct 2019 17:45:15 +0100 Subject: [PATCH 0256/1070] fix(@angular-devkit/build-optimizer): remove deprecated testImportTslib --- .../build_optimizer/src/transforms/import-tslib.ts | 9 --------- .../build_optimizer/src/transforms/import-tslib_spec.ts | 9 +-------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts index d4f01a0fb5eb..46905f26a6ec 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts @@ -8,15 +8,6 @@ import * as ts from 'typescript'; import { getCleanHelperName } from '../helpers/ast-utils'; -/** - * @deprecated From 0.9.0 - */ -export function testImportTslib(content: string) { - const regex = /var (__extends|__decorate|__metadata|__param)(\$\d+)? = \(.*\r?\n\s+(.*\r?\n)*\s*\};/; - - return regex.test(content); -} - /** * @deprecated From 0.900.0 */ diff --git a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib_spec.ts index 20bc023a2d97..0cc7d167bc6a 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib_spec.ts @@ -8,7 +8,7 @@ // tslint:disable-next-line:no-implicit-dependencies import { tags } from '@angular-devkit/core'; import { transformJavascript } from '../helpers/transform-javascript'; -import { getImportTslibTransformer, testImportTslib } from './import-tslib'; +import { getImportTslibTransformer } from './import-tslib'; const transform = (content: string) => transformJavascript( @@ -27,7 +27,6 @@ describe('import-tslib', () => { import { __extends } from "tslib"; `; - expect(testImportTslib(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -46,7 +45,6 @@ describe('import-tslib', () => { export default function appGlobal() { } `; - expect(testImportTslib(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -64,7 +62,6 @@ describe('import-tslib', () => { import { __decorate } from "tslib"; `; - expect(testImportTslib(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -89,7 +86,6 @@ describe('import-tslib', () => { import { __decorate as __decorate$2 } from "tslib"; `; - expect(testImportTslib(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -118,7 +114,6 @@ describe('import-tslib', () => { exports.meaning = 42; `; - expect(testImportTslib(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -132,7 +127,6 @@ describe('import-tslib', () => { import { __metadata } from "tslib"; `; - expect(testImportTslib(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); @@ -147,7 +141,6 @@ describe('import-tslib', () => { import { __param } from "tslib"; `; - expect(testImportTslib(input)).toBeTruthy(); expect(tags.oneLine`${transform(input)}`).toEqual(tags.oneLine`${output}`); }); From 7e1e8adf7a528d8068cc32b272da9cc830f41df0 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Thu, 3 Oct 2019 11:10:14 -0700 Subject: [PATCH 0257/1070] feat(@angular/cli): allow subclass to override default collection name This PR provides a way for subclass that extends `SchematicCommand` to provide a different default collection name. This is needed in g3 where the collection name is different from external. --- packages/angular/cli/models/schematic-command.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/cli/models/schematic-command.ts b/packages/angular/cli/models/schematic-command.ts index 3047d7f167d7..fe7b4417f492 100644 --- a/packages/angular/cli/models/schematic-command.ts +++ b/packages/angular/cli/models/schematic-command.ts @@ -78,7 +78,7 @@ export abstract class SchematicCommand< private _workspace: workspaces.WorkspaceDefinition; protected _workflow: NodeWorkflow; - private readonly defaultCollectionName = '@schematics/angular'; + protected defaultCollectionName = '@schematics/angular'; protected collectionName = this.defaultCollectionName; protected schematicName?: string; From ebc92c2125041b0020992b3a00ef76a69536d4f1 Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Thu, 3 Oct 2019 11:24:57 -0700 Subject: [PATCH 0258/1070] refactor(@angular/cli): Simplify retrival of collection name --- packages/angular/cli/commands/new-impl.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/angular/cli/commands/new-impl.ts b/packages/angular/cli/commands/new-impl.ts index d8c66d886bc3..b7b418cb3926 100644 --- a/packages/angular/cli/commands/new-impl.ts +++ b/packages/angular/cli/commands/new-impl.ts @@ -17,11 +17,7 @@ export class NewCommand extends SchematicCommand { schematicName = 'ng-new'; async initialize(options: NewCommandSchema & Arguments) { - if (options.collection) { - this.collectionName = options.collection; - } else { - this.collectionName = await this.parseCollectionName(options); - } + this.collectionName = options.collection || await this.getDefaultSchematicCollection(); return super.initialize(options); } @@ -43,7 +39,4 @@ export class NewCommand extends SchematicCommand { }); } - private async parseCollectionName(options: any): Promise { - return options.collection || this.getDefaultSchematicCollection(); - } } From 17540a2e4be9d72579ccc06978727047f375d551 Mon Sep 17 00:00:00 2001 From: vikerman Date: Thu, 3 Oct 2019 14:58:32 -0700 Subject: [PATCH 0259/1070] release: v9.0.0-next.8 --- packages/schematics/angular/utility/latest-versions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 24d95555a823..76fccaa37ddb 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,10 +15,10 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.7', - DevkitBuildNgPackagr: '~0.900.0-next.7', - DevkitBuildWebpack: '~0.900.0-next.7', - AngularPWA: '~0.900.0-next.7', + DevkitBuildAngular: '~0.900.0-next.8', + DevkitBuildNgPackagr: '~0.900.0-next.8', + DevkitBuildWebpack: '~0.900.0-next.8', + AngularPWA: '~0.900.0-next.8', ngPackagr: '^5.5.1', }; From bcbbc1929336d656d461e94bc62964cc6d22b532 Mon Sep 17 00:00:00 2001 From: Muhammad Umair Khan Date: Mon, 7 Oct 2019 21:15:09 +0500 Subject: [PATCH 0260/1070] fix(@schematics/angular): scroll issue on new app (#15714) Subtracting the top space from image vh(viewport height) to remove scroll Closes #15596 --- .../angular/application/other-files/app.component.html.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/other-files/app.component.html.template b/packages/schematics/angular/application/other-files/app.component.html.template index ad8054d1cd9d..ca64a6a9bebc 100644 --- a/packages/schematics/angular/application/other-files/app.component.html.template +++ b/packages/schematics/angular/application/other-files/app.component.html.template @@ -146,7 +146,7 @@ } svg#rocket-smoke { - height: 100vh; + height: calc(100vh - 95px); position: absolute; top: 10px; right: 180px; From 825b4bb139fd91a031dcf2df8ee0c88b550916cb Mon Sep 17 00:00:00 2001 From: Keen Yee Liau Date: Tue, 1 Oct 2019 13:16:33 -0700 Subject: [PATCH 0261/1070] build: update BUILD files for g3 sync Removing @typings allows us to use a single transform rule: @node_module --- packages/angular/cli/BUILD | 2 +- packages/angular_devkit/core/BUILD | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/angular/cli/BUILD b/packages/angular/cli/BUILD index 4b35ada84242..dbddc4551ece 100644 --- a/packages/angular/cli/BUILD +++ b/packages/angular/cli/BUILD @@ -33,7 +33,7 @@ ts_library( "//packages/angular_devkit/core:node", "//packages/angular_devkit/schematics", "//packages/angular_devkit/schematics:tools", - # @typings: es2017.object + # @node_module: typescript:es2017.object "@npm//@types/debug", "@npm//@types/node", "@npm//@types/inquirer", diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index 383ff74a4522..9d57dad2b058 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -39,11 +39,11 @@ ts_library( "@npm//magic-string", "@npm//rxjs", "@npm//source-map", - # @typings: es2015.core - # @typings: es2015.proxy - # @typings: es2015.reflect - # @typings: es2015.symbol.wellknown - # @typings: es2016.array.include + # @node_module: typescript:es2015.core + # @node_module: typescript:es2015.proxy + # @node_module: typescript:es2015.reflect + # @node_module: typescript:es2015.symbol.wellknown + # @node_module: typescript:es2016.array.include ], ) @@ -139,12 +139,11 @@ jasmine_node_test( # TODO: Audit tests to determine if tests can be run in RBE environments local = True, deps = [ - "@npm//temp", "@npm//chokidar", + "@npm//temp", # @node_module: ajv # @node_module: fast_json_stable_stringify # @node_module: magic_string - # @node_module: temp ], ) From c9683f39b8f8099abbc085862ec8051afb040965 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 8 Oct 2019 01:20:32 +0300 Subject: [PATCH 0262/1070] build: update to version (#15768) --- yarn.lock | 398 ++++++++++++++++++++++-------------------------------- 1 file changed, 159 insertions(+), 239 deletions(-) diff --git a/yarn.lock b/yarn.lock index e9bb5edfa9d5..5f1105853239 100644 --- a/yarn.lock +++ b/yarn.lock @@ -804,9 +804,9 @@ "@bazel/buildifier-win32_x64" "0.29.0" "@bazel/hide-bazel-files@latest": - version "0.38.0" - resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.0.tgz#84007bc5653e7aaa671a072760342e00a494008a" - integrity sha512-zXUCVxx2DZZ1CD1k04tLEhs/V1Dey96q6CBQafC9gux72Z93xsF4qQer5RcglCCdLcBut2KBeky87ueRwgPOjw== + version "0.38.1" + resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.1.tgz#a2447e04775de262290adf3afa533d4472a75641" + integrity sha512-9psDbiOS53tdHSpVVhxf01aBHjdOOwljAkJdleuAPhGif/jl2GrAfVXcSSgmMogeTlDT1xMG24sryPxn7M/3Zw== "@bazel/jasmine@0.37.1": version "0.37.1" @@ -1090,9 +1090,9 @@ "@types/through" "*" "@types/jasmine@~3.4.0": - version "3.4.1" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.1.tgz#214496efdd7870f133051a95d1692f9cc0730ee7" - integrity sha512-kA2/srq6lb/kiczw+l/yW7lKdAN9Ae5A/pp1bhu8RBzhYY/ybc1hwav3sWrPyAwSRcAS95NVB0uZdM62qT75EA== + version "3.4.2" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.2.tgz#49f672de24043b3c1fb919901fd3cd36f027bc93" + integrity sha512-SaSSGOzwUnBEn64c+HTyVTJhRf8F1CXZLnxYx2ww3UrgGBmEEw38RSux2l3fYiT9brVLP67DU5omWA6V9OHI5Q== "@types/karma@^3.0.2": version "3.0.3" @@ -1139,9 +1139,9 @@ "@types/node" "*" "@types/node@*": - version "12.7.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.8.tgz#cb1bf6800238898bc2ff6ffa5702c3cadd350708" - integrity sha512-FMdVn84tJJdV+xe+53sYiZS4R5yn1mAIxfj+DVoNiQjTYz1+OYmjwEZr1ev9nU0axXwda0QDbYl06QHanRVH3A== + version "12.7.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.11.tgz#be879b52031cfb5d295b047f5462d8ef1a716446" + integrity sha512-Otxmr2rrZLKRYIybtdG/sgeO+tHY20GxeDjcGmUnmmlCWyEnv2a2x1ZXBo3BTec4OiTXMQCiazB8NMBf0iRlFw== "@types/node@10.9.4": version "10.9.4" @@ -1149,9 +1149,9 @@ integrity sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw== "@types/node@^10.1.0": - version "10.14.19" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.19.tgz#f52742c7834a815dedf66edfc8a51547e2a67342" - integrity sha512-j6Sqt38ssdMKutXBUuAcmWF8QtHW1Fwz/mz4Y+Wd9mzpBiVFirjpNQf363hG5itkG+yGaD+oiLyb50HxJ36l9Q== + version "10.14.20" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.20.tgz#c4378d9d6a62faa5c9aafffc3d726b5a1e7367c6" + integrity sha512-An+MXSV8CGXz/BO9C1KKsoJ/8WDrvlNUaRMsm2h+IHZuSyQkM8U5bJJkb8ItLKA73VePG/nUK+t+EuW2IWuhsQ== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1621,10 +1621,10 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abstract-leveldown@^6.1.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.0.tgz#15cac11924e2bfade6ab0b9b58996f1666451499" - integrity sha512-8hUdvEq5Iy78VM0+/0jqqlvro6z1KKao5YwA9S016kZ9Lcvtvhk5hh9uszFT4WMomfZA99DZVBoozA34Tjoe5w== +abstract-leveldown@^6.1.1, abstract-leveldown@~6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.1.tgz#37b655151e13c3d9b20fa3a04ce63ccaa345fce4" + integrity sha512-zUgomHedGBCThDkUtc1bfilu2jEhRZ7Dk3RePhtMma/akw7UK2Upm2R5Dd8ynRBEt3uscwbWO0VQNx22/7RtWg== dependencies: level-concat-iterator "~2.0.0" level-supports "~1.0.0" @@ -1638,7 +1638,7 @@ abstract-leveldown@~6.0.1: level-concat-iterator "~2.0.0" xtend "~4.0.0" -abstract-leveldown@~6.1.0, abstract-leveldown@~6.1.1: +abstract-leveldown@~6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.1.1.tgz#f44bad5862d71c7b418110d7698ac25bedf24396" integrity sha512-7fK/KySVqzKIomdhkSWzX4YBQhzkzEMbWSiaB6mSN9e+ZdV3KEeKxia/8xQzCkATA5xnnukdP88cFR0D2FsFXw== @@ -1714,12 +1714,12 @@ agentkeepalive@^3.4.1: humanize-ms "^1.2.1" aggregate-error@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.0.tgz#5b5a3c95e9095f311c9ab16c19fb4f3527cd3f79" - integrity sha512-yKD9kEoJIR+2IFqhMwayIBgheLYbB3PS2OBhWae1L/ODTd/JF/30cW0bc9TqzRL3k4U41Dieu3BF4I29p8xesA== + version "3.0.1" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" + integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA== dependencies: clean-stack "^2.0.0" - indent-string "^3.2.0" + indent-string "^4.0.0" ajv-errors@^1.0.0: version "1.0.1" @@ -1815,10 +1815,10 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.0.tgz#e609350e50a9313b472789b2f14ef35808ee14d6" - integrity sha512-Ozz7l4ixzI7Oxj2+cw+p0tVUt27BpaJ+1+q1TCeANWxHpvyn2+Un+YamBdfKu0uh8xLodGhoa1v7595NhKDAuA== +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -2016,7 +2016,7 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.6.1, autoprefixer@^9.6.0: +autoprefixer@9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw== @@ -2029,6 +2029,19 @@ autoprefixer@9.6.1, autoprefixer@^9.6.0: postcss "^7.0.17" postcss-value-parser "^4.0.0" +autoprefixer@^9.6.0: + version "9.6.4" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.4.tgz#e6453be47af316b2923eaeaed87860f52ad4b7eb" + integrity sha512-Koz2cJU9dKOxG8P1f8uVaBntOv9lP4yz9ffWvWaicv9gHBPhpQB22nGijwd8gqW9CNT+UdkbQOQNLVI8jN1ZfQ== + dependencies: + browserslist "^4.7.0" + caniuse-lite "^1.0.30000998" + chalk "^2.4.2" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.18" + postcss-value-parser "^4.0.2" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2222,9 +2235,9 @@ blocking-proxy@^1.0.0: minimist "^1.2.0" bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: - version "3.5.5" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" - integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== + version "3.7.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.0.tgz#56a6a886e03f6ae577cffedeb524f8f2450293cf" + integrity sha512-aBQ1FxIa7kSWCcmKHlcHFlT2jt6J/l4FzC7KcPELkOJOsPOb/bccdhmIrKDfXhwFrmc7vDoDrrepFvGqjyXGJg== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" @@ -2302,7 +2315,7 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.2: +braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -2388,7 +2401,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.0, browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.6.6: +browserslist@4.7.0, browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.6.6, browserslist@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== @@ -2650,10 +2663,10 @@ caniuse-lite@1.0.30000998: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000998.tgz#7227a8046841e7d01e156ae7227a504d065f6744" integrity sha512-8Tj5sPZR9kMHeDD9SZXIVr5m9ofufLLCG2Y4QwQrH18GIwG+kCc+zYdlR036ZRkuKjVVetyxeAgGA1xF7XdmzQ== -caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989: - version "1.0.30000997" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000997.tgz#ba44a606804f8680894b7042612c2c7f65685b7e" - integrity sha512-BQLFPIdj2ntgBNWp9Q64LGUIEmvhKkzzHhUHR3CD5A9Lb7ZKF20/+sgadhFap69lk5XmK1fTUleDclaRFvgVUA== +caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998: + version "1.0.30000999" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" + integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== canonical-path@1.0.0: version "1.0.0" @@ -2691,19 +2704,19 @@ chardet@^0.7.0: integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== "chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.1.1.tgz#27e953f3950336efcc455fd03e240c7299062003" - integrity sha512-df4o16uZmMHzVQwECZRHwfguOt5ixpuQVaZHjYMvYisgKhE+JXwcj/Tcr3+3bu/XeOJQ9ycYmzu7Mv8XrGxJDQ== - dependencies: - anymatch "^3.1.0" - braces "^3.0.2" - glob-parent "^5.0.0" - is-binary-path "^2.1.0" - is-glob "^4.0.1" - normalize-path "^3.0.0" - readdirp "^3.1.1" + version "3.2.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.1.tgz#4634772a1924512d990d4505957bf3a510611387" + integrity sha512-/j5PPkb5Feyps9e+jo07jUZGvkB5Aj953NrI4s8xSVScrAo/RHeILrtdb4uzR7N6aaFFxxJ+gt8mA8HfNpw76w== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.1.3" optionalDependencies: - fsevents "^2.0.6" + fsevents "~2.1.0" chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.8: version "2.1.8" @@ -3616,12 +3629,12 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw== -deferred-leveldown@~5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.2.1.tgz#8da87909cd3269c2d6aff67b1e607f93e4d96c15" - integrity sha512-PwXZRn5EmW+IKYVAYVc7G9FsRkShr0myPubPuq+mtLhDq9xSUqfvTlNZKoeQGeXACHXkeCFurKrz5oo6TZ3qwg== +deferred-leveldown@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" + integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== dependencies: - abstract-leveldown "~6.1.0" + abstract-leveldown "~6.2.1" inherits "^2.0.3" define-properties@^1.1.2, define-properties@^1.1.3: @@ -3884,9 +3897,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.247: - version "1.3.269" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.269.tgz#3e00cc9266a0123fc2e7b4f290899e257200e6e3" - integrity sha512-t2ZTfo07HxkxTOUbIwMmqHBSnJsC9heqJUm7LwQu2iSk0wNhG4H5cMREtb8XxeCrQABDZ6IqQKY3yZq+NfAqwg== + version "1.3.277" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.277.tgz#38b7b297f9b3f67ea900a965c1b11a555de526ec" + integrity sha512-Czmsrgng89DOgJlIknnw9bn5431QdtnUwGp5YYiPwU1DbZQUxCLF+rc1ZC09VNAdalOPcvH6AE8BaA0H5HjI/w== elliptic@^6.0.0: version "6.5.1" @@ -4024,9 +4037,9 @@ error-ex@^1.2.0, error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.5.1: - version "1.14.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.14.2.tgz#7ce108fad83068c8783c3cdf62e504e084d8c497" - integrity sha512-DgoQmbpFNOofkjJtKwr87Ma5EW4Dc8fWhD0R+ndq7Oc456ivUfGOOP6oAZTTKl5/CcNMP+EN+e3/iUzgE0veZg== + version "1.15.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.15.0.tgz#8884928ec7e40a79e3c9bc812d37d10c8b24cc57" + integrity sha512-bhkEqWJ2t2lMeaJDuk7okMkJWI/yqgH/EoGwpcvv0XW9RWQsRspI4wt6xuyuvMvvQE3gg/D9HXppgk21w78GyQ== dependencies: es-to-primitive "^1.2.0" function-bind "^1.1.1" @@ -4036,8 +4049,8 @@ es-abstract@^1.5.1: is-regex "^1.0.4" object-inspect "^1.6.0" object-keys "^1.1.1" - string.prototype.trimleft "^2.0.0" - string.prototype.trimright "^2.0.0" + string.prototype.trimleft "^2.1.0" + string.prototype.trimright "^2.1.0" es-to-primitive@^1.2.0: version "1.2.0" @@ -4627,10 +4640,10 @@ fsevents@^1.2.7: nan "^2.12.1" node-pre-gyp "^0.12.0" -fsevents@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.0.7.tgz#382c9b443c6cbac4c57187cdda23aa3bf1ccfc2a" - integrity sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ== +fsevents@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.0.tgz#ce1a5f9ac71c6d75278b0c5bd236d7dfece4cbaa" + integrity sha512-+iXhW3LuDQsno8dOIrCIT/CBjeBWuP7PXe8w9shnj9Lebny/Gx1ZjVBYwexLz36Ri2jKuXMNpV6CYNh8lHHgrQ== function-bind@^1.1.1: version "1.1.1" @@ -4778,7 +4791,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0: +glob-parent@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== @@ -4899,9 +4912,9 @@ handlebars@4.3.1: uglify-js "^3.1.4" handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.1.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.0.tgz#22e1a897c5d83023d39801f35f6b65cf97ed8b25" - integrity sha512-xkRtOt3/3DzTKMOt3xahj2M/EqNhY988T+imYSlMgs5fVhLN2fmKVVj0LtEGmb+3UUYV5Qmm1052Mm3dIQxOvw== + version "4.4.2" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.2.tgz#8810a9821a9d6d52cb2f57d326d6ce7c3dfe741d" + integrity sha512-cIv17+GhL8pHHnRJzGu2wwcthL5sb8uDKBHvZ2Dtu5s1YNt0ljbzKbamnc+gr69y7bzwQiBdr5+hOpRd5pnOdg== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -5124,7 +5137,7 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" -http-proxy-middleware@0.19.1, http-proxy-middleware@^0.19.1: +http-proxy-middleware@0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== @@ -5284,11 +5297,16 @@ indent-string@^2.1.0: dependencies: repeating "^2.0.0" -indent-string@^3.0.0, indent-string@^3.2.0: +indent-string@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" @@ -5307,7 +5325,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5366,11 +5384,6 @@ invariant@^2.2.2: dependencies: loose-envify "^1.0.0" -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" @@ -5396,7 +5409,7 @@ ipaddr.js@^1.9.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-absolute-url@^3.0.2, is-absolute-url@^3.0.3: +is-absolute-url@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== @@ -5432,7 +5445,7 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" -is-binary-path@^2.1.0: +is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== @@ -5546,7 +5559,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -6054,9 +6067,9 @@ json5@^1.0.1: minimist "^1.2.0" json5@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" - integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== + version "2.1.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" + integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== dependencies: minimist "^1.2.0" @@ -6272,13 +6285,6 @@ latest-version@^5.0.0: dependencies: package-json "^6.3.0" -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -6337,13 +6343,13 @@ level-errors@^2.0.0, level-errors@~2.0.0: errno "~0.1.1" level-iterator-stream@~4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.1.tgz#65c467070c0788fe0d08a0c1ed600c3b9e82bc8d" - integrity sha512-pSZWqXK6/yHQkZKCHrR59nKpU5iqorKM22C/BOHTb/cwNQ2EOZG+bovmFFGcOgaBoF3KxqJEI27YwewhJQTzsw== + version "4.0.2" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" + integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== dependencies: - inherits "^2.0.1" - readable-stream "^3.0.2" - xtend "^4.0.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + xtend "^4.0.2" level-js@^4.0.0: version "4.0.1" @@ -6382,20 +6388,20 @@ level@5.0.1: opencollective-postinstall "^2.0.0" leveldown@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.2.1.tgz#eadc2184ab4c83fe0d74853384fe99dc0a0de6be" - integrity sha512-369I1rGibXV7CIoLhsSpp/ExwQucI3xUe0RXQrMu4ji6OG9PFMVAQuzsEXKwAi3BWsjFzcFtodAP8MW5fmfung== + version "5.3.0" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.3.0.tgz#cc228088b184901d52b54bd70518543bfb059406" + integrity sha512-PQXwTKMz55rYlg7984VbM7xpcqdiWgVKRms2fEgqVL7spd6+wK8NewScJOYIGpIG7/XxMOc0i+q/NX0WLJEcwA== dependencies: abstract-leveldown "~6.1.1" napi-macros "~2.0.0" node-gyp-build "~4.1.0" levelup@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.3.0.tgz#b6934483787e7558a340d54b4364ea3361150b73" - integrity sha512-6sC7hXr43Q3vDq/nB4UC4mU6sVxhFJZXYSfKJd5iDHgqQzJx6RIxRiFbXakQiNvdVRz6RO/HNmQqr1W06dne2w== + version "4.3.2" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.3.2.tgz#31c5b1b29f146d1d35d692e01a6da4d28fa55ebd" + integrity sha512-cRTjU4ktWo59wf13PHEiOayHC3n0dOh4i5+FHr4tv4MX9+l7mqETicNq3Aj07HKlLdk0z5muVoDL2RD+ovgiyA== dependencies: - deferred-leveldown "~5.2.1" + deferred-leveldown "~5.3.0" level-errors "~2.0.0" level-iterator-stream "~4.0.0" level-supports "~1.0.0" @@ -6683,9 +6689,9 @@ lunr-mutable-indexes@2.3.2: lunr ">= 2.3.0 < 2.4.0" "lunr@>= 2.3.0 < 2.4.0": - version "2.3.6" - resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.6.tgz#f278beee7ffd56ad86e6e478ce02ab2b98c78dd5" - integrity sha512-swStvEyDqQ85MGpABCMBclZcLI/pBIlu8FFDtmX197+oEgKloJ67QnB+Tidh0340HmLMs39c4GrkPY3cmkXp6Q== + version "2.3.7" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.7.tgz#05ccf3af9d0e169b8f432c97e02fc1bdf3f36343" + integrity sha512-HjFSiy0Y0qZoW5OA1I6qBi7OnsDdqQnaUr03jhorh30maQoaP+4lQCKklYE3Nq3WJMSUfuBl6N+bKY5wxCb9hw== magic-string@0.25.4, magic-string@^0.25.0, magic-string@^0.25.2: version "0.25.4" @@ -6798,13 +6804,6 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - mem@^4.0.0: version "4.3.0" resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" @@ -6929,11 +6928,6 @@ mime@2.4.4, mime@^2.0.3, mime@^2.3.1, mime@^2.4.4: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -7015,15 +7009,7 @@ minipass-pipeline@^1.2.2: dependencies: minipass "^3.0.0" -minipass@^2.3.5, minipass@^2.5.1, minipass@^2.6.0, minipass@^2.8.6: - version "2.8.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.8.6.tgz#620d889ace26356391d010ecb9458749df9b6db5" - integrity sha512-lFG7d6g3+/UaFDCOtqPiKAC9zngWWsQZl1g5q6gaONqrjq61SX2xFqXMleQiFVyDpYwa018E9hmlAFY22PCb+A== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minipass@^2.9.0: +minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -7032,16 +7018,16 @@ minipass@^2.9.0: yallist "^3.0.0" minipass@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.0.0.tgz#adb830268348df8b32217ceda3fc48684faff232" - integrity sha512-FKNU4XrAPDX0+ynwns7njVu4RolyG1mUKSlT6n6GwGXLtYSYh2Znc0S83Rl6zEr1zgFfXvAzIBabnmItm+n19g== + version "3.0.1" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.0.1.tgz#b4fec73bd61e8a40f0b374ddd04260ade2c8ec20" + integrity sha512-2y5okJ4uBsjoD2vAbLKL9EUQPPkC0YMIp+2mZOXG3nBba++pdfJWRxx2Ewirc0pwAJYu4XtWg2EkVo1nRXuO/w== dependencies: yallist "^4.0.0" minizlib@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.2.tgz#5d24764998f98112586f7e566bd4c0999769dad4" - integrity sha512-lsNFqSHdJ21EwKzCp12HHJGxSMtHkCW1EMA9cceG3MkMNARjuWotZnMe3NKNshAvFXpm4loZqmYsCmRwhS2JMw== + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== dependencies: minipass "^2.9.0" @@ -7243,11 +7229,6 @@ node-fetch@^2.2.0: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== -node-forge@0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.2.tgz#b4bcc59fb12ce77a8825fc6a783dfe3182499c5a" - integrity sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg== - node-forge@0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" @@ -7304,11 +7285,11 @@ node-pre-gyp@^0.12.0: tar "^4" node-releases@^1.1.29: - version "1.1.33" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.33.tgz#349f10291234624574f44cf32b7de259bf028303" - integrity sha512-I0V30bWQEoHb+10W8oedVoUrdjW5wIkYm0w7vvcrPO95pZY738m1k77GF5sO0vKg5eXYg9oGtrMAETbgZGm11A== + version "1.1.34" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.34.tgz#ced4655ee1ba9c3a2c5dcbac385e19434155fd40" + integrity sha512-fNn12JTEfniTuCqo0r9jXgl44+KxRH/huV7zM/KAGOKxDKrHr6EbT7SSs4B+DNxyBE2mks28AD+Jw6PkfY5uwA== dependencies: - semver "^5.3.0" + semver "^6.3.0" node-sass-tilde-importer@^1.0.0: version "1.0.2" @@ -7342,7 +7323,7 @@ normalize-path@^2.1.1: dependencies: remove-trailing-separator "^1.0.1" -normalize-path@^3.0.0: +normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -7419,9 +7400,9 @@ npm-registry-client@8.6.0: npmlog "2 || ^3.1.0 || ^4.0.0" npm-registry-fetch@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.1.tgz#4ec0964dce6f29d253801a47cd381a7d6ad13a5e" - integrity sha512-1ZQ+yjnxc698R5h9Yje9CASapzAZr7aYDkJDdERg9xg2hOEY0vRJwskOaJAXq8N/eLavzvW4g564YAfq6zMn/A== + version "4.0.2" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz#2b1434f93ccbe6b6385f8e45f45db93e16921d7a" + integrity sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A== dependencies: JSONStream "^1.3.4" bluebird "^3.5.1" @@ -7636,15 +7617,6 @@ os-homedir@^1.0.0, os-homedir@^1.0.1: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - os-locale@^3.0.0, os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -8138,12 +8110,12 @@ postcss-value-parser@^3.2.3: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.0: +postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== -postcss@7.0.18, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17, postcss@^7.0.2: +postcss@7.0.18, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2: version "7.0.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== @@ -8609,7 +8581,7 @@ read-pkg@^5.0.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.2, readable-stream@^3.0.6: +readable-stream@^3.0.6, readable-stream@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== @@ -8637,10 +8609,10 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.2.tgz#fa85d2d14d4289920e4671dead96431add2ee78a" - integrity sha512-8rhl0xs2cxfVsqzreYCvs8EwBfn/DhVdqtoLmw19uI3SC5avYX9teCurlErfpPXGmYtMHReGaP2RsLnFvz/lnw== +readdirp@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.3.tgz#d6e011ed5b9240a92f08651eeb40f7942ceb6cc1" + integrity sha512-ZOsfTGkjO2kqeR5Mzr5RYDbTGYneSkdNKX2fOX2P5jF7vMrd/GNnIAUtDldeHHumHUCQ3V05YfWUdxMPAsRu9Q== dependencies: picomatch "^2.0.4" @@ -9029,9 +9001,9 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: estree-walker "^0.6.1" rollup@^1.12.1: - version "1.22.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.22.0.tgz#a5b2672c0eebe9f2b6454220f785dbc09b64b4bc" - integrity sha512-x4l4ZrV/Mr/x/jvFTmwROdEAhbZjx16yDRTVSKWh/i4oJDuW2dVEbECT853mybYCz7BAitU8ElGlhx7dNjw3qQ== + version "1.23.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.23.1.tgz#0315a0f5d0dfb056e6363e1dff05b89ac2da6b8e" + integrity sha512-95C1GZQpr/NIA0kMUQmSjuMDQ45oZfPgDBcN0yZwBG7Kee//m7H68vgIyg+SPuyrTZ5PrXfyLK80OzXeKG5dAA== dependencies: "@types/estree" "*" "@types/node" "*" @@ -9101,20 +9073,13 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.23.0: +sass@1.23.0, sass@^1.17.3: version "1.23.0" resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.0.tgz#bd526ff40dbc5d09a4ed69e2cffa849749977710" integrity sha512-W4HT8+WE31Rzk3EPQC++CXjD5O+lOxgYBIB8Ohvt7/zeE2UzYW+TOczDrRU3KcEy3+xwXXbmDsOZFkoqgD4TKw== dependencies: chokidar ">=2.0.0 <4.0.0" -sass@^1.17.3: - version "1.22.12" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.22.12.tgz#5cbdd38720ffd1857da695331faee9f634bcb5d7" - integrity sha512-u5Rxn+dKTPCW5/11kMNxtmqKsxCjcpnqj9CaJoru1NqeJ0DOa9rOM00e0HqmseTAatGkKoLY+jaNecMYevu1gg== - dependencies: - chokidar ">=2.0.0 <4.0.0" - sauce-connect-launcher@^1.2.4: version "1.2.7" resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.2.7.tgz#c7f8b3d4eb354d07a9922b4cd67356f527192556" @@ -9128,6 +9093,7 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" + uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: @@ -9203,13 +9169,6 @@ selenium-webdriver@^4.0.0-alpha.1: tmp "0.0.30" xml2js "^0.4.19" -selfsigned@^1.10.6: - version "1.10.6" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.6.tgz#7b3cd37ed9c2034261a173af1a1aae27d8169b67" - integrity sha512-i3+CeqxL7DpAazgVpAGdKMwHuL63B5nhJMh9NQ7xmChGkA3jNFflq6Jyo1LLJYcr3idWiNOPWHCrm4zMayLG4w== - dependencies: - node-forge "0.8.2" - selfsigned@^1.10.7: version "1.10.7" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b" @@ -9763,12 +9722,12 @@ ssri@^6.0.0, ssri@^6.0.1: figgy-pudding "^3.5.1" ssri@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.0.0.tgz#5c2229910a91b6c161312a8d2608d3e83e82c431" - integrity sha512-cvBRrMQrBppFp7QQqh2zME8/Fek9akLhpAq6C78Q5npH8vonxkInB/nLIslb3NRCOKoM/PgUvKHd/zojlFCHlQ== + version "7.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.0.1.tgz#b0cab7bbb11ac9ea07f003453e2011f8cbed9f34" + integrity sha512-FfndBvkXL9AHyGLNzU3r9AvYIBBZ7gm+m+kd0p8cT3/v4OliMAyipZAhLVEv1Zi/k4QFq9CstRGVd9pW/zcHFQ== dependencies: figgy-pudding "^3.5.1" - minipass "^2.5.1" + minipass "^3.0.0" static-eval@^2.0.0: version "2.0.2" @@ -9908,7 +9867,7 @@ string-width@^4.1.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^5.2.0" -string.prototype.trimleft@^2.0.0: +string.prototype.trimleft@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634" integrity sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw== @@ -9916,7 +9875,7 @@ string.prototype.trimleft@^2.0.0: define-properties "^1.1.3" function-bind "^1.1.1" -string.prototype.trimright@^2.0.0: +string.prototype.trimright@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz#669d164be9df9b6f7559fa8e89945b168a5a6c58" integrity sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg== @@ -10131,9 +10090,9 @@ terser@4.3.2: source-map-support "~0.5.12" terser@^4.1.2, terser@^4.3.1: - version "4.3.4" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.4.tgz#ad91bade95619e3434685d69efa621a5af5f877d" - integrity sha512-Kcrn3RiW8NtHBP0ssOAzwa2MsIRQ8lJWiBG/K7JgqPlomA3mtb2DEmp4/hrUA+Jujx+WZ02zqd7GYD+QRBB/2Q== + version "4.3.8" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.8.tgz#707f05f3f4c1c70c840e626addfdb1c158a17136" + integrity sha512-otmIRlRVmLChAWsnSFNO0Bfk6YySuBp6G9qrHiJwlLDd4mxe2ta4sjI7TzIR+W1nBMjilzrMcPOz9pSusgx3hQ== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -10887,7 +10846,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.1, webpack-dev-middleware@^3.7.2: +webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== @@ -10898,7 +10857,7 @@ webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.1, webpack-dev-middlew range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.8.2: +webpack-dev-server@3.8.2, webpack-dev-server@^3.1.4: version "3.8.2" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.2.tgz#3292427bf6510da9a3ac2d500b924a4197667ff9" integrity sha512-0xxogS7n5jHDQWy0WST0q6Ykp7UGj4YvWh+HVN71JoE7BwPxMZrwgraBvmdEMbDVMBzF0u+mEzn8TQzBm5NYJQ== @@ -10937,45 +10896,6 @@ webpack-dev-server@3.8.2: ws "^6.2.1" yargs "12.0.5" -webpack-dev-server@^3.1.4: - version "3.8.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.1.tgz#485b64c4aadc23f601e72114b40c1b1fea31d9f1" - integrity sha512-9F5DnfFA9bsrhpUCAfQic/AXBVHvq+3gQS+x6Zj0yc1fVVE0erKh2MV4IV12TBewuTrYeeTIRwCH9qLMvdNvTw== - dependencies: - ansi-html "0.0.7" - bonjour "^3.5.0" - chokidar "^2.1.8" - compression "^1.7.4" - connect-history-api-fallback "^1.6.0" - debug "^4.1.1" - del "^4.1.1" - express "^4.17.1" - html-entities "^1.2.1" - http-proxy-middleware "^0.19.1" - import-local "^2.0.0" - internal-ip "^4.3.0" - ip "^1.1.5" - is-absolute-url "^3.0.2" - killable "^1.0.1" - loglevel "^1.6.4" - opn "^5.5.0" - p-retry "^3.0.1" - portfinder "^1.0.24" - schema-utils "^1.0.0" - selfsigned "^1.10.6" - semver "^6.3.0" - serve-index "^1.9.1" - sockjs "0.3.19" - sockjs-client "1.4.0" - spdy "^4.0.1" - strip-ansi "^3.0.1" - supports-color "^6.1.0" - url "^0.11.0" - webpack-dev-middleware "^3.7.1" - webpack-log "^2.0.0" - ws "^6.2.1" - yargs "12.0.5" - webpack-log@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" @@ -11246,9 +11166,9 @@ yallist@^2.1.2: integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.0.tgz#906cc2100972dc2625ae78f566a2577230a1d6f7" - integrity sha512-6gpP93MR+VOOehKbCPchro3wFZNSNmek8A2kbkOAZLIZAYx1KP/zAqwO0sOHi3xJEb+UBz8NaYt/17UNit1Q9w== + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yallist@^4.0.0: version "4.0.0" @@ -11256,9 +11176,9 @@ yallist@^4.0.0: integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^1.5.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.0.tgz#b4cddb83490051e6c4b6ffe2bb08221c23f4c6cf" - integrity sha512-BEXCJKbbJmDzjuG4At0R4nHJKlP81hxoLQqUCaxzqZ8HHgjAlOXbiOHVCQ4YuQqO/rLR8HoQ6kxGkYJ3tlKIsg== + version "1.7.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.1.tgz#86db1b39a6434a7928d3750cbe08303a50a24d6b" + integrity sha512-sR0mJ2C3LVBgMST+0zrrrsKSijbw64bfHmTt4nEXLZTZFyIAuUVARqA/LO5kaZav2OVQMaZ+5WRrZv7QjxG3uQ== dependencies: "@babel/runtime" "^7.5.5" @@ -11321,15 +11241,15 @@ yargs@13.1.0: yargs-parser "^13.0.0" yargs@^11.0.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.1.tgz#5052efe3446a4df5ed669c995886cc0f13702766" + integrity sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw== dependencies: cliui "^4.0.0" decamelize "^1.1.1" find-up "^2.1.0" get-caller-file "^1.0.1" - os-locale "^2.0.0" + os-locale "^3.1.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" From 0cdb203505029b3239e5413c77aef0910d5054e2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 8 Oct 2019 01:20:41 +0300 Subject: [PATCH 0263/1070] build: update caniuse-lite to version 1.0.30000999 (#15767) --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index b5796b5cf433..fe9fc3a89118 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -18,7 +18,7 @@ "autoprefixer": "9.6.1", "browserslist": "4.7.0", "cacache": "13.0.1", - "caniuse-lite": "1.0.30000998", + "caniuse-lite": "1.0.30000999", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", diff --git a/yarn.lock b/yarn.lock index 5f1105853239..e43552c236ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2658,10 +2658,10 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000998: - version "1.0.30000998" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000998.tgz#7227a8046841e7d01e156ae7227a504d065f6744" - integrity sha512-8Tj5sPZR9kMHeDD9SZXIVr5m9ofufLLCG2Y4QwQrH18GIwG+kCc+zYdlR036ZRkuKjVVetyxeAgGA1xF7XdmzQ== +caniuse-lite@1.0.30000999: + version "1.0.30000999" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" + integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998: version "1.0.30000999" From b65c0d2fea0672a72bdad4ff55d93f2f7c828a90 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 8 Oct 2019 01:21:04 +0300 Subject: [PATCH 0264/1070] build: update terser to version 4.3.8 (#15696) --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index fe9fc3a89118..b99e59635080 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -54,7 +54,7 @@ "stylus": "0.54.7", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", - "terser": "4.3.2", + "terser": "4.3.8", "terser-webpack-plugin": "2.1.0", "webpack": "4.41.0", "webpack-dev-middleware": "3.7.2", diff --git a/yarn.lock b/yarn.lock index e43552c236ca..df2d547b5651 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10080,10 +10080,10 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.2.tgz#ed830de484b0103652799063e605618e80f97f93" - integrity sha512-obxk4x19Zlzj9zY4QeXj9iPCb5W8YGn4v3pn4/fHj0Nw8+R7N02Kvwvz9VpOItCZZD8RC+vnYCDL0gP6FAJ7Xg== +terser@4.3.8: + version "4.3.8" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.8.tgz#707f05f3f4c1c70c840e626addfdb1c158a17136" + integrity sha512-otmIRlRVmLChAWsnSFNO0Bfk6YySuBp6G9qrHiJwlLDd4mxe2ta4sjI7TzIR+W1nBMjilzrMcPOz9pSusgx3hQ== dependencies: commander "^2.20.0" source-map "~0.6.1" From 0d70565f9d80f1d765622eb8c8b2c3c701723599 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 8 Oct 2019 20:55:07 +0300 Subject: [PATCH 0265/1070] build: update terser-webpack-plugin to version 2.1.2 (#15704) --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 38 ++++++------------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index b99e59635080..fe6d5523c3e9 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -55,7 +55,7 @@ "stylus-loader": "3.0.2", "tree-kill": "1.2.1", "terser": "4.3.8", - "terser-webpack-plugin": "2.1.0", + "terser-webpack-plugin": "2.1.2", "webpack": "4.41.0", "webpack-dev-middleware": "3.7.2", "webpack-dev-server": "3.8.2", diff --git a/yarn.lock b/yarn.lock index df2d547b5651..340da7bf87af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2509,7 +2509,7 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@13.0.1: +cacache@13.0.1, cacache@^13.0.0: version "13.0.1" resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c" integrity sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w== @@ -2553,7 +2553,7 @@ cacache@^11.3.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: +cacache@^12.0.0, cacache@^12.0.2: version "12.0.3" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== @@ -2658,12 +2658,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000999: - version "1.0.30000999" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" - integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== - -caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998: +caniuse-lite@1.0.30000999, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998: version "1.0.30000999" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== @@ -9131,7 +9126,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.1.0, schema-utils@^2.2.0: +schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.1.0, schema-utils@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.4.1.tgz#e89ade5d056dc8bcaca377574bb4a9c4e1b8be56" integrity sha512-RqYLpkPZX5Oc3fw/kHHHyP56fg5Y+XBpIpV8nCg0znIALfq3OH+Ea9Hfeac9BAMwG5IICltiZ0vxFvJQONfA5w== @@ -10051,18 +10046,18 @@ term-size@^1.2.0: dependencies: execa "^0.7.0" -terser-webpack-plugin@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.1.0.tgz#b9cee799a2da2bce788540c3738e081b6db28d8a" - integrity sha512-sZs43FVvNTqHp5hTkTSIC3XKB7rEC2FCbx9Uv0rM7D4iJsbTA1Q84tiaRYSSKSojBe6LCONX44RF73AEHGasvw== +terser-webpack-plugin@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.1.2.tgz#2b9b8147a6f18918348200800cf9560c50f701bb" + integrity sha512-MF/C4KABwqYOfRDi87f7gG07GP7Wj/kyiX938UxIGIO6l5mkh8XJL7xtS0hX/CRdVQaZI7ThGUPZbznrCjsGpg== dependencies: - cacache "^12.0.3" + cacache "^13.0.0" find-cache-dir "^3.0.0" jest-worker "^24.9.0" - schema-utils "^2.2.0" + schema-utils "^2.4.1" serialize-javascript "^2.1.0" source-map "^0.6.1" - terser "^4.3.1" + terser "^4.3.4" webpack-sources "^1.4.3" terser-webpack-plugin@^1.4.1: @@ -10080,16 +10075,7 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.8: - version "4.3.8" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.8.tgz#707f05f3f4c1c70c840e626addfdb1c158a17136" - integrity sha512-otmIRlRVmLChAWsnSFNO0Bfk6YySuBp6G9qrHiJwlLDd4mxe2ta4sjI7TzIR+W1nBMjilzrMcPOz9pSusgx3hQ== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - -terser@^4.1.2, terser@^4.3.1: +terser@4.3.8, terser@^4.1.2, terser@^4.3.4: version "4.3.8" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.8.tgz#707f05f3f4c1c70c840e626addfdb1c158a17136" integrity sha512-otmIRlRVmLChAWsnSFNO0Bfk6YySuBp6G9qrHiJwlLDd4mxe2ta4sjI7TzIR+W1nBMjilzrMcPOz9pSusgx3hQ== From 08bc4df4c69177d2ed00b947928a0c75608ce57f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 9 Oct 2019 20:03:43 +0200 Subject: [PATCH 0266/1070] feat(@schematics/angular): add migration ensure that `tslib` is installed (#15800) Related to: https://github.com/angular/angular/pull/32167 --- .../angular/migrations/update-9/add-tslib.ts | 21 +++++++++++++++++++ .../angular/migrations/update-9/index.ts | 2 ++ .../update-9/update-dependencies.ts | 6 +++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 packages/schematics/angular/migrations/update-9/add-tslib.ts diff --git a/packages/schematics/angular/migrations/update-9/add-tslib.ts b/packages/schematics/angular/migrations/update-9/add-tslib.ts new file mode 100644 index 000000000000..ad562fcb41c0 --- /dev/null +++ b/packages/schematics/angular/migrations/update-9/add-tslib.ts @@ -0,0 +1,21 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { Rule } from '@angular-devkit/schematics'; +import { NodeDependencyType, addPackageJsonDependency, removePackageJsonDependency } from '../../utility/dependencies'; +import { latestVersions } from '../../utility/latest-versions'; + +export function addTsLib(): Rule { + return host => { + removePackageJsonDependency(host, 'tslib'); + addPackageJsonDependency(host, { + name: 'tslib', + version: latestVersions.TsLib, + type: NodeDependencyType.Default, + }); + }; +} diff --git a/packages/schematics/angular/migrations/update-9/index.ts b/packages/schematics/angular/migrations/update-9/index.ts index 0d3690a23295..939c8d3d6e9a 100644 --- a/packages/schematics/angular/migrations/update-9/index.ts +++ b/packages/schematics/angular/migrations/update-9/index.ts @@ -8,6 +8,7 @@ import { Rule, chain } from '@angular-devkit/schematics'; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; +import { addTsLib } from './add-tslib'; import { updateLibraries } from './ivy-libraries'; import { updateNGSWConfig } from './ngsw-config'; import { removeTsickle } from './remove-tsickle'; @@ -26,6 +27,7 @@ export default function(): Rule { updateDependencies(), updateServerMainFile(), removeTsickle(), + addTsLib(), (tree, context) => { const packageChanges = tree.actions.some(a => a.path.endsWith('/package.json')); if (packageChanges) { diff --git a/packages/schematics/angular/migrations/update-9/update-dependencies.ts b/packages/schematics/angular/migrations/update-9/update-dependencies.ts index 41456d0087c5..7413be942dcd 100644 --- a/packages/schematics/angular/migrations/update-9/update-dependencies.ts +++ b/packages/schematics/angular/migrations/update-9/update-dependencies.ts @@ -5,12 +5,12 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Tree } from '@angular-devkit/schematics'; +import { Rule } from '@angular-devkit/schematics'; import { addPackageJsonDependency, getPackageJsonDependency } from '../../utility/dependencies'; import { latestVersions } from '../../utility/latest-versions'; -export function updateDependencies() { - return (host: Tree) => { +export function updateDependencies(): Rule { + return host => { const dependenciesToUpdate: Record = { '@angular/pwa': latestVersions.AngularPWA, '@angular-devkit/build-angular': latestVersions.DevkitBuildAngular, From 2da85b804ebd3bdd537c77d0298f581f0191bbdc Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 9 Oct 2019 19:04:06 +0100 Subject: [PATCH 0267/1070] test: add second language to aot-i18n e2e (#15798) --- .../e2e/tests/build/aot/aot-i18n.ts | 112 +++++++++++------- 1 file changed, 72 insertions(+), 40 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts index 1460308507bc..fe8220c8df97 100644 --- a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts +++ b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts @@ -1,45 +1,77 @@ +import { appendToFile, createDir, expectFileToMatch, writeFile } from '../../../utils/fs'; import { ng } from '../../../utils/process'; -import { expectFileToMatch, writeFile, createDir, appendToFile, readFile } from '../../../utils/fs'; +import { updateJsonFile } from '../../../utils/project'; import { expectToFail } from '../../../utils/utils'; -import { Version } from '../../../../../packages/@angular/cli/upgrade/version'; -import { SemVer } from 'semver'; -// tslint:disable:max-line-length -export default function () { - // TODO(architect): Delete this test. It is now in devkit/build-angular. +export default async function () { + const enDir = 'dist/test-project'; + const frDist = `${enDir}-fr`; + const deDir = `${enDir}-de`; - return Promise.resolve() - .then(() => createDir('src/locale')) - .then(() => writeFile('src/locale/messages.fr.xlf', ` - - - - - - Hello i18n! - Bonjour i18n! - An introduction header for this sample - - - - `)) - .then(() => appendToFile('src/app/app.component.html', - '

Hello i18n!

')) - .then(() => ng('build', '--aot', '--i18n-file', 'src/locale/messages.fr.xlf', '--i18n-format', - 'xlf', '--i18n-locale', 'fr')) - .then(() => expectFileToMatch('dist/test-project/main-es5.js', /Bonjour i18n!/)) - .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /Bonjour i18n!/)) - .then(() => ng('build', '--aot')) - .then(() => expectToFail(() => expectFileToMatch('dist/test-project/main-es5.js', /Bonjour i18n!/))) - .then(() => expectToFail(() => expectFileToMatch('dist/test-project/main-es2015.js', /Bonjour i18n!/))) - .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /Hello i18n!/)) - .then(() => expectFileToMatch('dist/test-project/main-es5.js', /Hello i18n!/)) - .then(() => appendToFile('src/app/app.component.html', - '

Other content

')) - .then(() => ng('build', '--aot', '--i18nFile', 'src/locale/messages.fr.xlf', '--i18nFormat', - 'xlf', '--i18n-locale', 'fr', '--i18n-missing-translation', 'ignore')) - .then(() => expectFileToMatch('dist/test-project/main-es5.js', /Other content/)) - .then(() => expectFileToMatch('dist/test-project/main-es2015.js', /Other content/)) - .then(() => expectToFail(() => ng('build', '--aot', '--i18nFile', 'src/locale/messages.fr.xlf', - '--i18nFormat', 'xlf', '--i18n-locale', 'fr', '--i18n-missing-translation', 'error'))); + await updateJsonFile('angular.json', workspaceJson => { + const appArchitect = workspaceJson.projects['test-project'].architect; + const browserConfigs = appArchitect['build'].configurations; + browserConfigs['fr'] = { + outputPath: frDist, + aot: true, + i18nFile: 'src/locale/messages.fr.xlf', + i18nFormat: 'xlf', + i18nLocale: 'fr', + }; + browserConfigs['de'] = { + outputPath: deDir, + aot: true, + i18nFile: 'src/locale/messages.de.xlf', + i18nFormat: 'xlf', + i18nLocale: 'de', + }; + }); + + await createDir('src/locale'); + await writeFile('src/locale/messages.fr.xlf', ` + + + + + + Hello i18n! + Bonjour i18n! + An introduction header for this sample + + + + `); + await writeFile('src/locale/messages.de.xlf', ` + + + + + + Hello i18n! + Hallo i18n! + An introduction header for this sample + + + + `); + await appendToFile('src/app/app.component.html', + '

Hello i18n!

'); + await ng('build', '--configuration=fr'); + await expectFileToMatch(`${frDist}/main-es5.js`, /Bonjour i18n!/); + await expectFileToMatch(`${frDist}/main-es2015.js`, /Bonjour i18n!/); + await ng('build', '--configuration=de'); + await expectFileToMatch(`${deDir}/main-es5.js`, /Hallo i18n!/); + await expectFileToMatch(`${deDir}/main-es2015.js`, /Hallo i18n!/); + await ng('build', '--aot'); + await expectToFail(() => expectFileToMatch(`${enDir}/main-es5.js`, /Bonjour i18n!/)); + await expectToFail(() => expectFileToMatch(`${enDir}/main-es2015.js`, /Bonjour i18n!/)); + await expectToFail(() => expectFileToMatch(`${enDir}/main-es5.js`, /Hallo i18n!/)); + await expectToFail(() => expectFileToMatch(`${enDir}/main-es2015.js`, /Hallo i18n!/)); + await expectFileToMatch(`${enDir}/main-es2015.js`, /Hello i18n!/); + await expectFileToMatch(`${enDir}/main-es5.js`, /Hello i18n!/); + await appendToFile('src/app/app.component.html', '

Other content

'); + await ng('build', '--configuration=fr', '--i18n-missing-translation', 'ignore'); + await expectFileToMatch(`${frDist}/main-es5.js`, /Other content/); + await expectFileToMatch(`${frDist}/main-es2015.js`, /Other content/); + await expectToFail(() => ng('build', '--configuration=fr', '--i18n-missing-translation', 'error')); } From 35edccf4b45be1340f29a352cf1840de649b8368 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 9 Oct 2019 20:04:25 +0200 Subject: [PATCH 0268/1070] Update several dependencies (#15797) * feat(@schematics/schematics): update serveral dependencies of blank projects * feat(@schematics/angular): update serveral dependencies of new workspaces --- .../angular/workspace/files/package.json.template | 6 +++--- .../schematics/blank/project-files/package.json.template | 4 ++-- packages/schematics/schematics/schematic/files/package.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/schematics/angular/workspace/files/package.json.template b/packages/schematics/angular/workspace/files/package.json.template index b68d512f46ac..80ad3097f6ce 100644 --- a/packages/schematics/angular/workspace/files/package.json.template +++ b/packages/schematics/angular/workspace/files/package.json.template @@ -27,13 +27,13 @@ "@angular/cli": "<%= '~' + version %>", "@angular/compiler-cli": "<%= latestVersions.Angular %>", "@angular/language-service": "<%= latestVersions.Angular %>", - "@types/node": "~8.9.4",<% if (!minimal) { %> + "@types/node": "~10.14.0",<% if (!minimal) { %> "@types/jasmine": "~3.4.0", "@types/jasminewd2": "~2.0.3", "codelyzer": "^5.1.2", - "jasmine-core": "~3.4.0", + "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~4.2.1", - "karma": "~4.2.0", + "karma": "~4.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~2.1.0", "karma-jasmine": "~2.0.1", diff --git a/packages/schematics/schematics/blank/project-files/package.json.template b/packages/schematics/schematics/blank/project-files/package.json.template index 5a2498bcc700..4416c8dbad09 100644 --- a/packages/schematics/schematics/blank/project-files/package.json.template +++ b/packages/schematics/schematics/blank/project-files/package.json.template @@ -18,8 +18,8 @@ "typescript": "~3.5.3" }, "devDependencies": { - "@types/node": "~8.9.4", + "@types/node": "~10.14.0", "@types/jasmine": "~3.4.0", - "jasmine": "^3.4.0" + "jasmine": "^3.5.0" } } diff --git a/packages/schematics/schematics/schematic/files/package.json b/packages/schematics/schematics/schematic/files/package.json index e1017624bf3e..21ff709b2bf3 100644 --- a/packages/schematics/schematics/schematic/files/package.json +++ b/packages/schematics/schematics/schematic/files/package.json @@ -18,8 +18,8 @@ "typescript": "~3.5.3" }, "devDependencies": { - "@types/node": "~8.9.4", + "@types/node": "~10.14.0", "@types/jasmine": "~3.4.0", - "jasmine": "^3.4.0" + "jasmine": "^3.5.0" } } From 4d2ef2bf577fa35e52e690a97767d7d8e0764c39 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 9 Oct 2019 20:04:48 +0200 Subject: [PATCH 0269/1070] feat(@angular-devkit/build-angular): add support for i18n extraction with Ivy (#15796) Re-enable i18n extraction in Ivy by using the legacy VE compiler. --- .../models/webpack-configs/typescript.ts | 7 +++++++ .../build_angular/src/extract-i18n/index.ts | 10 ---------- .../test/extract-i18n/works_spec_large.ts | 5 ++--- tests/legacy-cli/e2e_runner.ts | 3 +-- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts index 1ea900c6a7be..7b82019d9eb3 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -68,6 +68,12 @@ function _createAotPlugin( i18nInFormat: buildOptions.i18nFormat, }; + const compilerOptions = options.compilerOptions || {}; + if (i18nExtract) { + // Extraction of i18n is still using the legacy VE pipeline + compilerOptions.enableIvy = false; + } + const additionalLazyModules: { [module: string]: string } = {}; if (buildOptions.lazyModules) { for (const lazyModule of buildOptions.lazyModules) { @@ -92,6 +98,7 @@ function _createAotPlugin( logger: wco.logger, directTemplateLoading: true, ...options, + compilerOptions, }; pluginOptions = _pluginOptionsOverrides(buildOptions, pluginOptions); diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts index 92e44c6d9fc5..ae4076b8b939 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts @@ -20,7 +20,6 @@ import { getStatsConfig, getStylesConfig, } from '../angular-cli-files/models/webpack-configs'; -import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { statsErrorsToString, statsWarningsToString } from '../angular-cli-files/utilities/stats'; import { Schema as BrowserBuilderOptions } from '../browser/schema'; import { assertCompatibleAngularVersion } from '../utils/version'; @@ -59,15 +58,6 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte await context.getBuilderNameForTarget(browserTarget), ); - // FIXME: i18n is not yet implemented in Ivy - // We should display a warning and exit gracefully. - const { options: compilerOptions } = readTsconfig(browserOptions.tsConfig, context.workspaceRoot); - if (compilerOptions.enableIvy) { - context.logger.warn('We are sorry but i18n is not yet implemented in Ivy.'); - - return { success: true }; - } - // We need to determine the outFile name so that AngularCompiler can retrieve it. let outFile = options.outFile || getI18nOutfile(options.i18nFormat); if (options.outputPath) { diff --git a/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts b/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts index cd64161c46d1..f22e39932655 100644 --- a/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts @@ -8,11 +8,10 @@ import { Architect } from '@angular-devkit/architect'; import { TestLogger } from '@angular-devkit/architect/testing'; import { join, normalize, virtualFs } from '@angular-devkit/core'; -import { createArchitect, extractI18nTargetSpec, host, veEnabled } from '../utils'; +import { createArchitect, extractI18nTargetSpec, host } from '../utils'; -// DISABLED_FOR_IVY These should pass but are currently not supported -(veEnabled ? describe : xdescribe)('Extract i18n Target', () => { +describe('Extract i18n Target', () => { const extractionFile = join(normalize('src'), 'messages.xlf'); let architect: Architect; diff --git a/tests/legacy-cli/e2e_runner.ts b/tests/legacy-cli/e2e_runner.ts index 00edf37edd56..851fbcc3ee57 100644 --- a/tests/legacy-cli/e2e_runner.ts +++ b/tests/legacy-cli/e2e_runner.ts @@ -100,8 +100,7 @@ if (!argv.ve) { // As we transition into using Ivy as the default this list should be reassessed. allTests = allTests // Ivy doesn't support i18n externally at the moment. - .filter(name => !name.includes('tests/i18n/')) - .filter(name => !name.endsWith('tests/build/aot/aot-i18n.ts')) + .filter(name => !name.endsWith('tests/build/aot/aot-i18n.ts')); } const shardId = 'shard' in argv ? argv['shard'] : null; From 3e5906baec7f90b23e7062e54c3fffe49df6c35b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 9 Oct 2019 21:06:11 +0300 Subject: [PATCH 0270/1070] build: update ng-packagr to version ~5.6.0 (#15793) --- packages/angular_devkit/build_ng_packagr/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index ff9345f9d95b..c3b45257d11b 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -17,7 +17,7 @@ "@angular/compiler": "9.0.0-next.9", "@angular/compiler-cli": "9.0.0-next.9", "@angular-devkit/core": "0.0.0", - "ng-packagr": "~5.5.0", + "ng-packagr": "~5.6.0", "tslib": "^1.10.0" } } diff --git a/yarn.lock b/yarn.lock index 340da7bf87af..ffdf58df5552 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7172,10 +7172,10 @@ neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -ng-packagr@~5.5.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.5.1.tgz#2d27968c1079fba12ff2ae542beab82747a92e7b" - integrity sha512-GT6QK5WAirQwALdeJPiXdgRd5PzRqcknb/C/G+cCDEbUFri4oGVmns2Nl4I0FGg/cRn6nXTxRiUunOSqZ3Lehw== +ng-packagr@~5.6.0: + version "5.6.1" + resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.6.1.tgz#c3664134d28289383a2bd95f09efa685432ffea6" + integrity sha512-Z7pOtjlWQe9eBGq6iDSWqBzpxq7IXO8tZssCZDv6v+6IvsgWVxbIndDr7g6IZyVJQriliCRjFQ70w3XoX4dSKw== dependencies: ajv "^6.10.2" autoprefixer "^9.6.0" From 10712372df6af214d132e85b3b86478d65a692ca Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 9 Oct 2019 21:06:53 +0300 Subject: [PATCH 0271/1070] build: update enhanced-resolve to version 4.1.1 (#15791) --- packages/ngtools/webpack/package.json | 2 +- yarn.lock | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 1ab341633be3..e3536bbaa69b 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -22,7 +22,7 @@ "homepage": "https://github.com/angular/angular-cli/tree/master/packages/@ngtools/webpack", "dependencies": { "@angular-devkit/core": "0.0.0", - "enhanced-resolve": "4.1.0", + "enhanced-resolve": "4.1.1", "rxjs": "6.5.3", "tree-kill": "1.2.1", "webpack-sources": "1.4.3" diff --git a/yarn.lock b/yarn.lock index ffdf58df5552..1b380feb3864 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3993,7 +3993,16 @@ engine.io@~3.2.0: engine.io-parser "~2.1.0" ws "~3.3.1" -enhanced-resolve@4.1.0, enhanced-resolve@^4.1.0: +enhanced-resolve@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" + integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + +enhanced-resolve@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== @@ -6816,6 +6825,14 @@ memory-fs@^0.4.0, memory-fs@^0.4.1: errno "^0.1.3" readable-stream "^2.0.1" +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" From 665f6e0d86364aabb040bed35d4f4da3e9b40520 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 9 Oct 2019 21:07:15 +0300 Subject: [PATCH 0272/1070] build: update @babel/core to version 7.6.3 (#15790) --- .../angular_devkit/build_angular/package.json | 4 +- yarn.lock | 87 ++++++++++++++----- 2 files changed, 65 insertions(+), 26 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index fe6d5523c3e9..498e41c90efe 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -11,8 +11,8 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/build-webpack": "0.0.0", "@angular-devkit/core": "0.0.0", - "@babel/core": "7.6.2", - "@babel/preset-env": "7.6.2", + "@babel/core": "7.6.3", + "@babel/preset-env": "7.6.3", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", "autoprefixer": "9.6.1", diff --git a/yarn.lock b/yarn.lock index 1b380feb3864..30d6453ce66a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -118,25 +118,25 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.2.tgz#069a776e8d5e9eefff76236bc8845566bd31dd91" - integrity sha512-l8zto/fuoZIbncm+01p8zPSDZu/VuuJhAfA7d/AbzM09WR7iVhavvfNDYCNpo1VvLk6E6xgAoP9P+/EMJHuRkQ== +"@babel/core@7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.3.tgz#44de824e89eaa089bb12da7337bc9bdff2ab68f9" + integrity sha512-QfQ5jTBgXLzJuo7Mo8bZK/ePywmgNRgk/UQykiKwEtZPiFIn8ZqE6jB+AnD1hbB1S2xQyL4//it5vuAUOVAMTw== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.2" + "@babel/generator" "^7.6.3" "@babel/helpers" "^7.6.2" - "@babel/parser" "^7.6.2" + "@babel/parser" "^7.6.3" "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.2" - "@babel/types" "^7.6.0" + "@babel/traverse" "^7.6.3" + "@babel/types" "^7.6.3" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" - source-map "^0.5.0" + source-map "^0.6.1" "@babel/generator@^7.4.0", "@babel/generator@^7.6.2": version "7.6.2" @@ -148,6 +148,16 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.3.tgz#71d5375264f93ec7bac7d9f35a67067733f5578e" + integrity sha512-hLhYbAb3pHwxjlijC4AQ7mqZdcoujiNaW7izCT04CIowHK8psN0IN8QjDv0iyFtycF5FowUOTwDloIheI25aMw== + dependencies: + "@babel/types" "^7.6.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.6.1" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -326,6 +336,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.2.tgz#205e9c95e16ba3b8b96090677a67c9d6075b70a1" integrity sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg== +"@babel/parser@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.3.tgz#9eff8b9c3eeae16a74d8d4ff30da2bd0d6f0487e" + integrity sha512-sUZdXlva1dt2Vw2RqbMkmfoImubO0D0gaCrNngV6Hi0DA4x3o4mlrq0tbfY0dZEUIccH8I6wQ4qgEtwcpOR6Qg== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -434,10 +449,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.2.tgz#96c33ab97a9ae500cc6f5b19e04a7e6553360a79" - integrity sha512-zZT8ivau9LOQQaOGC7bQLQOT4XPkPXgN2ERfUgk1X8ql+mVkLc4E8eKk+FO3o0154kxzqenWCorfmEXpEZcrSQ== +"@babel/plugin-transform-block-scoping@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz#6e854e51fbbaa84351b15d4ddafe342f3a5d542a" + integrity sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.13" @@ -559,10 +574,10 @@ "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-named-capturing-groups-regex@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.2.tgz#c1ca0bb84b94f385ca302c3932e870b0fb0e522b" - integrity sha512-xBdB+XOs+lgbZc2/4F5BVDVcDNS4tcSKQc96KmlqLEAwz6tpYPEvPdmDfvVG0Ssn8lAhronaRs6Z6KSexIpK5g== +"@babel/plugin-transform-named-capturing-groups-regex@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.3.tgz#aaa6e409dd4fb2e50b6e2a91f7e3a3149dbce0cf" + integrity sha512-jTkk7/uE6H2s5w6VlMHeWuH+Pcy2lmdwFoeWCVnvIrDUnB5gQqTVI8WfmEAhF2CDEarGrknZcmSFg1+bkfCoSw== dependencies: regexpu-core "^4.6.0" @@ -657,10 +672,10 @@ "@babel/helper-regex" "^7.4.4" regexpu-core "^4.6.0" -"@babel/preset-env@7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.2.tgz#abbb3ed785c7fe4220d4c82a53621d71fc0c75d3" - integrity sha512-Ru7+mfzy9M1/YTEtlDS8CD45jd22ngb9tXnn64DvQK3ooyqSw9K4K9DUWmYknTTVk4TqygL9dqCrZgm1HMea/Q== +"@babel/preset-env@7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.3.tgz#9e1bf05a2e2d687036d24c40e4639dc46cef2271" + integrity sha512-CWQkn7EVnwzlOdR5NOm2+pfgSNEZmvGjOhlCHBDq0J8/EStr+G+FvPEiz9B56dR6MoiUFjXhfE4hjLoAKKJtIQ== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -678,7 +693,7 @@ "@babel/plugin-transform-arrow-functions" "^7.2.0" "@babel/plugin-transform-async-to-generator" "^7.5.0" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.6.2" + "@babel/plugin-transform-block-scoping" "^7.6.3" "@babel/plugin-transform-classes" "^7.5.5" "@babel/plugin-transform-computed-properties" "^7.2.0" "@babel/plugin-transform-destructuring" "^7.6.0" @@ -693,7 +708,7 @@ "@babel/plugin-transform-modules-commonjs" "^7.6.0" "@babel/plugin-transform-modules-systemjs" "^7.5.0" "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.6.2" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.6.3" "@babel/plugin-transform-new-target" "^7.4.4" "@babel/plugin-transform-object-super" "^7.5.5" "@babel/plugin-transform-parameters" "^7.4.4" @@ -706,7 +721,7 @@ "@babel/plugin-transform-template-literals" "^7.4.4" "@babel/plugin-transform-typeof-symbol" "^7.2.0" "@babel/plugin-transform-unicode-regex" "^7.6.2" - "@babel/types" "^7.6.0" + "@babel/types" "^7.6.3" browserslist "^4.6.0" core-js-compat "^3.1.1" invariant "^2.2.2" @@ -744,6 +759,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.3.tgz#66d7dba146b086703c0fb10dd588b7364cec47f9" + integrity sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.3" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.6.3" + "@babel/types" "^7.6.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0": version "7.6.1" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" @@ -753,6 +783,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.3.tgz#3f07d96f854f98e2fbd45c64b0cb942d11e8ba09" + integrity sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@bazel/bazel-darwin_x64@0.29.0": version "0.29.0" resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.29.0.tgz#d2ebcb95bc66031b0545dd8b0e597b3aa5b9024b" From 3a44611483758c9144164a4307cfcb0617cd6769 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Wed, 9 Oct 2019 14:07:31 -0400 Subject: [PATCH 0273/1070] refactor(@angular-devkit/build-angular): initial copy-on-write asset processing support (#15788) This is currently only supported when performing a differential loading build (no watch mode). This will eventually be expanded to cover watch mode and non-differential loading builds. --- .../models/webpack-configs/common.ts | 5 +- .../build_angular/src/browser/index.ts | 37 ++++++++++--- .../build_angular/src/utils/copy-assets.ts | 53 +++++++++++++++++++ .../build_angular/src/utils/copy-file.ts | 28 ++++++++++ 4 files changed, 114 insertions(+), 9 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/utils/copy-assets.ts create mode 100644 packages/angular_devkit/build_angular/src/utils/copy-file.ts diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 9e6db9c0c2bb..892fb6c6cf0c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -194,7 +194,10 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { } // process asset entries - if (buildOptions.assets) { + if ( + buildOptions.assets && + (fullDifferential || buildOptions.watch || !differentialLoadingNeeded) + ) { const copyWebpackPluginPatterns = buildOptions.assets.map((asset: AssetPatternClass) => { // Resolve input paths relative to workspace root and add slash at the end. asset.input = path.resolve(root, asset.input).replace(/\\/g, '/'); diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index c136b54976e9..5d87691438e5 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -61,9 +61,11 @@ import { BuildBrowserFeatures, deleteOutputDir, fullDifferential, + normalizeAssetPatterns, normalizeOptimization, normalizeSourceMaps, } from '../utils'; +import { copyAssets } from '../utils/copy-assets'; import { I18nOptions, createI18nOptions } from '../utils/i18n-options'; import { manglingDisabled } from '../utils/mangle-options'; import { @@ -216,13 +218,14 @@ export function buildWebpackBrowser( ): Observable { const host = new NodeJsSyncHost(); const root = normalize(context.workspaceRoot); + const baseOutputPath = path.resolve(context.workspaceRoot, options.outputPath); // Check Angular version. assertCompatibleAngularVersion(context.workspaceRoot, context.logger); return from(initialize(options, context, host, transforms.webpackConfiguration)).pipe( // tslint:disable-next-line: no-big-function - switchMap(({ config: configs, projectRoot, i18n }) => { + switchMap(({ config: configs, projectRoot, projectSourceRoot, i18n }) => { const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); const target = tsConfig.options.target || ScriptTarget.ES5; const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot, target); @@ -355,7 +358,7 @@ export function buildWebpackBrowser( // Retrieve the content/map for the file // NOTE: Additional future optimizations will read directly from memory - let filename = path.resolve(getSystemPath(root), options.outputPath, file.file); + let filename = path.join(baseOutputPath, file.file); const code = fs.readFileSync(filename, 'utf8'); let map; if (actionOptions.sourceMaps) { @@ -628,6 +631,27 @@ export function buildWebpackBrowser( context.logger.info('ES5 bundle generation complete.'); + // Copy assets + if (options.assets) { + try { + await copyAssets( + normalizeAssetPatterns( + options.assets, + new virtualFs.SyncDelegateHost(host), + root, + normalize(projectRoot), + projectSourceRoot === undefined ? undefined : normalize(projectSourceRoot), + ), + [baseOutputPath], + context.workspaceRoot, + ); + } catch (err) { + context.logger.error('Unable to copy assets: ' + err.message); + + return { success: false }; + } + } + type ArrayElement
= A extends ReadonlyArray ? T : never; function generateBundleInfoStats( id: string | number, @@ -703,10 +727,7 @@ export function buildWebpackBrowser( if (options.index) { return writeIndexHtml({ host, - outputPath: resolve( - root, - join(normalize(options.outputPath), getIndexOutputFile(options)), - ), + outputPath: join(normalize(baseOutputPath), getIndexOutputFile(options)), indexPath: join(root, getIndexInputFile(options)), files, noModuleFiles, @@ -739,7 +760,7 @@ export function buildWebpackBrowser( host, root, normalize(projectRoot), - resolve(root, normalize(options.outputPath)), + normalize(baseOutputPath), options.baseHref || '/', options.ngswConfigPath, ).then( @@ -756,7 +777,7 @@ export function buildWebpackBrowser( ({ ...event, // If we use differential loading, both configs have the same outputs - outputPath: path.resolve(context.workspaceRoot, options.outputPath), + outputPath: baseOutputPath, } as BrowserBuilderOutput), ), ); diff --git a/packages/angular_devkit/build_angular/src/utils/copy-assets.ts b/packages/angular_devkit/build_angular/src/utils/copy-assets.ts new file mode 100644 index 000000000000..337f4dd9ed9e --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/copy-assets.ts @@ -0,0 +1,53 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import * as fs from 'fs'; +import * as glob from 'glob'; +import * as path from 'path'; +import { copyFile } from './copy-file'; + +function globAsync(pattern: string, options: glob.IOptions) { + return new Promise((resolve, reject) => + glob(pattern, options, (e, m) => (e ? reject(e) : resolve(m))), + ); +} + +export async function copyAssets( + entries: { glob: string; ignore?: string[]; input: string; output: string; flatten?: boolean }[], + basePaths: Iterable, + root: string, + changed?: Set, +) { + const defaultIgnore = ['.gitkeep', '**/.DS_Store', '**/Thumbs.db']; + + for (const entry of entries) { + const cwd = path.resolve(root, entry.input); + const files = await globAsync(entry.glob, { + cwd, + dot: true, + ignore: entry.ignore ? defaultIgnore.concat(entry.ignore) : defaultIgnore, + }); + + for (const file of files) { + const src = path.join(cwd, file); + if (changed && !changed.has(src)) { + continue; + } + + const filePath = entry.flatten ? path.basename(file) : file; + for (const base of basePaths) { + const dest = path.join(base, entry.output, filePath); + const dir = path.dirname(dest); + if (!fs.existsSync(dir)) { + // tslint:disable-next-line: no-any + fs.mkdirSync(dir, { recursive: true } as any); + } + copyFile(src, dest); + } + } + } +} diff --git a/packages/angular_devkit/build_angular/src/utils/copy-file.ts b/packages/angular_devkit/build_angular/src/utils/copy-file.ts new file mode 100644 index 000000000000..f935599fe95f --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/copy-file.ts @@ -0,0 +1,28 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import * as fs from 'fs'; + +// Workaround Node.js issue prior to 10.16 with copyFile on macOS +// https://github.com/angular/angular-cli/issues/15544 & https://github.com/nodejs/node/pull/27241 +let copyFileWorkaround = false; +if (process.platform === 'darwin') { + const version = process.versions.node.split('.').map(part => Number(part)); + if (version[0] < 10 || version[0] === 11 || (version[0] === 10 && version[1] < 16)) { + copyFileWorkaround = true; + } +} + +export function copyFile(src: fs.PathLike, dest: fs.PathLike): void { + if (copyFileWorkaround) { + try { + fs.unlinkSync(dest); + } catch {} + } + + fs.copyFileSync(src, dest, fs.constants.COPYFILE_FICLONE); +} From 964abe3b05d188734f80e384dca7c6e820f0bf14 Mon Sep 17 00:00:00 2001 From: Michael Prentice Date: Wed, 9 Oct 2019 14:07:47 -0400 Subject: [PATCH 0274/1070] refactor(@schematics/update): missing space in usageMessage output (#15786) Fixes #15784 --- packages/schematics/update/update/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index cf05b19b7671..e5eeb1407deb 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -489,7 +489,7 @@ function _usageMessage( command += ' --next'; } - return [name, `${info.installed.version} -> ${version}`, command]; + return [name, `${info.installed.version} -> ${version} `, command]; }) .filter(x => x !== null) .sort((a, b) => a && b ? a[0].localeCompare(b[0]) : 0); From 970e2055c00d8d5e0b935b0bd7d620957bbdfd28 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 9 Oct 2019 21:08:01 +0300 Subject: [PATCH 0275/1070] build: update autoprefixer to version 9.6.4 (#15765) --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 23 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 498e41c90efe..95c87733a05f 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -15,7 +15,7 @@ "@babel/preset-env": "7.6.3", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", - "autoprefixer": "9.6.1", + "autoprefixer": "9.6.4", "browserslist": "4.7.0", "cacache": "13.0.1", "caniuse-lite": "1.0.30000999", diff --git a/yarn.lock b/yarn.lock index 30d6453ce66a..eafe4fe9ccbb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2055,20 +2055,7 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" - integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw== - dependencies: - browserslist "^4.6.3" - caniuse-lite "^1.0.30000980" - chalk "^2.4.2" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.17" - postcss-value-parser "^4.0.0" - -autoprefixer@^9.6.0: +autoprefixer@9.6.4, autoprefixer@^9.6.0: version "9.6.4" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.4.tgz#e6453be47af316b2923eaeaed87860f52ad4b7eb" integrity sha512-Koz2cJU9dKOxG8P1f8uVaBntOv9lP4yz9ffWvWaicv9gHBPhpQB22nGijwd8gqW9CNT+UdkbQOQNLVI8jN1ZfQ== @@ -2440,7 +2427,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.0, browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.6.6, browserslist@^4.7.0: +browserslist@4.7.0, browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.6.6, browserslist@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== @@ -2697,7 +2684,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000999, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998: +caniuse-lite@1.0.30000999, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998: version "1.0.30000999" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== @@ -8161,12 +8148,12 @@ postcss-value-parser@^3.2.3: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2: +postcss-value-parser@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== -postcss@7.0.18, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2: +postcss@7.0.18, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.18, postcss@^7.0.2: version "7.0.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== From c0d42e0c0eb8bc8e22d21f3f9a437d587074bd9f Mon Sep 17 00:00:00 2001 From: Leon Radley Date: Wed, 9 Oct 2019 20:09:12 +0200 Subject: [PATCH 0276/1070] feat(@schematics/angular): add type option to component generator (#15754) the type option allows you to change the default .component.ts suffix to new types. such as Route Dialog UI Container --- ...e__.__type@dasherize__.__style__.template} | 0 ...herize__.__type@dasherize__.html.template} | 0 ...rize__.__type@dasherize__.spec.ts.template | 25 +++++++++++++++++++ ...asherize__.__type@dasherize__.ts.template} | 6 ++--- ...ame@dasherize__.component.spec.ts.template | 25 ------------------- .../schematics/angular/component/index.ts | 11 +++++--- .../angular/component/index_spec.ts | 12 +++++++++ .../schematics/angular/component/schema.json | 5 ++++ 8 files changed, 52 insertions(+), 32 deletions(-) rename packages/schematics/angular/component/files/__name@dasherize@if-flat__/{__name@dasherize__.component.__style__.template => __name@dasherize__.__type@dasherize__.__style__.template} (100%) rename packages/schematics/angular/component/files/__name@dasherize@if-flat__/{__name@dasherize__.component.html.template => __name@dasherize__.__type@dasherize__.html.template} (100%) create mode 100644 packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template rename packages/schematics/angular/component/files/__name@dasherize@if-flat__/{__name@dasherize__.component.ts.template => __name@dasherize__.__type@dasherize__.ts.template} (68%) delete mode 100644 packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template diff --git a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.__style__.template similarity index 100% rename from packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template rename to packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.__style__.template diff --git a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.html.template b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.html.template similarity index 100% rename from packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.html.template rename to packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.html.template diff --git a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template new file mode 100644 index 000000000000..6ea46afb72d7 --- /dev/null +++ b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { <%= classify(name) %><%= classify(type) %> } from './<%= dasherize(name) %>.<%= dasherize(type) %>'; + +describe('<%= classify(name) %><%= classify(type) %>', () => { + let component: <%= classify(name) %><%= classify(type) %>; + let fixture: ComponentFixture<<%= classify(name) %><%= classify(type) %>>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ <%= classify(name) %><%= classify(type) %> ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(<%= classify(name) %><%= classify(type) %>); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template similarity index 68% rename from packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template rename to packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template index 7993328cbf83..de839a8ce79c 100644 --- a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +++ b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template @@ -7,13 +7,13 @@ import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% } <%= dasherize(name) %> works!

`,<% } else { %> - templateUrl: './<%= dasherize(name) %>.component.html',<% } if(inlineStyle) { %> + templateUrl: './<%= dasherize(name) %>.<%= dasherize(type) %>.html',<% } if(inlineStyle) { %> styles: []<% } else { %> - styleUrls: ['./<%= dasherize(name) %>.component.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>, + styleUrls: ['./<%= dasherize(name) %>.<%= dasherize(type) %>.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>, encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>, changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %> }) -export class <%= classify(name) %>Component implements OnInit { +export class <%= classify(name) %><%= classify(type) %> implements OnInit { constructor() { } diff --git a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template deleted file mode 100644 index b22b9a9c884d..000000000000 --- a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component'; - -describe('<%= classify(name) %>Component', () => { - let component: <%= classify(name) %>Component; - let fixture: ComponentFixture<<%= classify(name) %>Component>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ <%= classify(name) %>Component ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(<%= classify(name) %>Component); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index 1c91fedb2485..84783fe31008 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -49,15 +49,18 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule { return host; } + options.type = !!options.type ? options.type : 'Component'; + const modulePath = options.module; const source = readIntoSourceFile(host, modulePath); const componentPath = `/${options.path}/` + (options.flat ? '' : strings.dasherize(options.name) + '/') + strings.dasherize(options.name) - + '.component'; + + '.' + + strings.dasherize(options.type); const relativePath = buildRelativePath(modulePath, componentPath); - const classifiedName = strings.classify(`${options.name}Component`); + const classifiedName = strings.classify(options.name) + strings.classify(options.type); const declarationChanges = addDeclarationToModule(source, modulePath, classifiedName, @@ -77,7 +80,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule { const exportRecorder = host.beginUpdate(modulePath); const exportChanges = addExportToModule(source, modulePath, - strings.classify(`${options.name}Component`), + strings.classify(options.name) + strings.classify(options.type), relativePath); for (const change of exportChanges) { @@ -95,7 +98,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule { const entryComponentRecorder = host.beginUpdate(modulePath); const entryComponentChanges = addEntryComponentToModule( source, modulePath, - strings.classify(`${options.name}Component`), + strings.classify(options.name) + strings.classify(options.type), relativePath); for (const change of entryComponentChanges) { diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 59f1c97bc04e..3968de0b552f 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -24,6 +24,7 @@ describe('Component Schematic', () => { inlineTemplate: false, changeDetection: ChangeDetection.Default, style: Style.Css, + type: 'Component', skipTests: false, module: undefined, export: false, @@ -256,6 +257,17 @@ describe('Component Schematic', () => { expect(tree.files).not.toContain('/projects/bar/src/app/foo/foo.component.css'); }); + it('should respect the type option', async () => { + const options = { ...defaultOptions, type: 'Route' }; + const tree = await schematicRunner.runSchematicAsync('component', options, appTree).toPromise(); + const content = tree.readContent('/projects/bar/src/app/foo/foo.route.ts'); + const testContent = tree.readContent('/projects/bar/src/app/foo/foo.route.spec.ts'); + expect(content).toContain('export class FooRoute implements OnInit'); + expect(testContent).toContain('describe(\'FooRoute\''); + expect(tree.files).toContain('/projects/bar/src/app/foo/foo.route.css'); + expect(tree.files).toContain('/projects/bar/src/app/foo/foo.route.html'); + }); + it('should use the module flag even if the module is a routing module', async () => { const routingFileName = 'app-routing.module.ts'; const routingModulePath = `/projects/bar/src/app/${routingFileName}`; diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 95f25cdc2dc4..2cbc2524a8f7 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -88,6 +88,11 @@ ], "x-user-analytics": 5 }, + "type": { + "type": "string", + "description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".", + "default": "Component" + }, "spec": { "type": "boolean", "description": "When true (the default), generates a \"spec.ts\" test file for the new component.", From 2dc885304bc0722156e53f9d5f24423f92eea280 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Wed, 9 Oct 2019 14:25:23 -0400 Subject: [PATCH 0277/1070] refactor(@angular-devkit/build-angular): reorganize bundle processing for browser builder (#15776) --- .../build_angular/src/browser/action-cache.ts | 191 +++++++++++++++ .../src/browser/action-executor.ts | 111 +++++++-- .../build_angular/src/browser/index.ts | 226 ++---------------- 3 files changed, 296 insertions(+), 232 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/browser/action-cache.ts diff --git a/packages/angular_devkit/build_angular/src/browser/action-cache.ts b/packages/angular_devkit/build_angular/src/browser/action-cache.ts new file mode 100644 index 000000000000..f04e4053b07b --- /dev/null +++ b/packages/angular_devkit/build_angular/src/browser/action-cache.ts @@ -0,0 +1,191 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { createHash } from 'crypto'; +import * as findCacheDirectory from 'find-cache-dir'; +import * as fs from 'fs'; +import { manglingDisabled } from '../utils/mangle-options'; +import { CacheKey, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; + +const cacache = require('cacache'); +const cacheDownlevelPath = findCacheDirectory({ name: 'angular-build-dl' }); +const packageVersion = require('../../package.json').version; + +// Workaround Node.js issue prior to 10.16 with copyFile on macOS +// https://github.com/angular/angular-cli/issues/15544 & https://github.com/nodejs/node/pull/27241 +let copyFileWorkaround = false; +if (process.platform === 'darwin') { + const version = process.versions.node.split('.').map(part => Number(part)); + if (version[0] < 10 || version[0] === 11 || (version[0] === 10 && version[1] < 16)) { + copyFileWorkaround = true; + } +} + +export interface CacheEntry { + path: string; + size: number; + integrity?: string; +} + +export class BundleActionCache { + constructor(private readonly integrityAlgorithm?: string) {} + + static copyEntryContent(entry: CacheEntry | string, dest: fs.PathLike): void { + if (copyFileWorkaround) { + try { + fs.unlinkSync(dest); + } catch {} + } + + fs.copyFileSync( + typeof entry === 'string' ? entry : entry.path, + dest, + fs.constants.COPYFILE_FICLONE, + ); + if (process.platform !== 'win32') { + // The cache writes entries as readonly and when using copyFile the permissions will also be copied. + // See: https://github.com/npm/cacache/blob/073fbe1a9f789ba42d9a41de7b8429c93cf61579/lib/util/move-file.js#L36 + fs.chmodSync(dest, 0o644); + } + } + + generateBaseCacheKey(content: string): string { + // Create base cache key with elements: + // * package version - different build-angular versions cause different final outputs + // * code length/hash - ensure cached version matches the same input code + const algorithm = this.integrityAlgorithm || 'sha1'; + const codeHash = createHash(algorithm) + .update(content) + .digest('base64'); + let baseCacheKey = `${packageVersion}|${content.length}|${algorithm}-${codeHash}`; + if (manglingDisabled) { + baseCacheKey += '|MD'; + } + + return baseCacheKey; + } + + generateCacheKeys(action: ProcessBundleOptions): string[] { + const baseCacheKey = this.generateBaseCacheKey(action.code); + + // Postfix added to sourcemap cache keys when vendor sourcemaps are present + // Allows non-destructive caching of both variants + const SourceMapVendorPostfix = !!action.sourceMaps && action.vendorSourceMaps ? '|vendor' : ''; + + // Determine cache entries required based on build settings + const cacheKeys = []; + + // If optimizing and the original is not ignored, add original as required + if ((action.optimize || action.optimizeOnly) && !action.ignoreOriginal) { + cacheKeys[CacheKey.OriginalCode] = baseCacheKey + '|orig'; + + // If sourcemaps are enabled, add original sourcemap as required + if (action.sourceMaps) { + cacheKeys[CacheKey.OriginalMap] = baseCacheKey + SourceMapVendorPostfix + '|orig-map'; + } + } + // If not only optimizing, add downlevel as required + if (!action.optimizeOnly) { + cacheKeys[CacheKey.DownlevelCode] = baseCacheKey + '|dl'; + + // If sourcemaps are enabled, add downlevel sourcemap as required + if (action.sourceMaps) { + cacheKeys[CacheKey.DownlevelMap] = baseCacheKey + SourceMapVendorPostfix + '|dl-map'; + } + } + + return cacheKeys; + } + + async getCacheEntries(cacheKeys: (string | null)[]): Promise<(CacheEntry | null)[] | false> { + // Attempt to get required cache entries + const cacheEntries = []; + for (const key of cacheKeys) { + if (key) { + const entry = await cacache.get.info(cacheDownlevelPath, key); + if (!entry) { + return false; + } + cacheEntries.push({ + path: entry.path, + size: entry.size, + integrity: entry.metadata && entry.metadata.integrity, + }); + } else { + cacheEntries.push(null); + } + } + + return cacheEntries; + } + + async getCachedBundleResult(action: ProcessBundleOptions): Promise { + const entries = action.cacheKeys && await this.getCacheEntries(action.cacheKeys); + if (!entries) { + return null; + } + + const result: ProcessBundleResult = { name: action.name }; + + let cacheEntry = entries[CacheKey.OriginalCode]; + if (cacheEntry) { + result.original = { + filename: action.filename, + size: cacheEntry.size, + integrity: cacheEntry.integrity, + }; + + BundleActionCache.copyEntryContent(cacheEntry, result.original.filename); + + cacheEntry = entries[CacheKey.OriginalMap]; + if (cacheEntry) { + result.original.map = { + filename: action.filename + '.map', + size: cacheEntry.size, + }; + + BundleActionCache.copyEntryContent(cacheEntry, result.original.filename + '.map'); + } + } else if (!action.ignoreOriginal) { + // If the original wasn't processed (and therefore not cached), add info + result.original = { + filename: action.filename, + size: Buffer.byteLength(action.code, 'utf8'), + map: + action.map === undefined + ? undefined + : { + filename: action.filename + '.map', + size: Buffer.byteLength(action.map, 'utf8'), + }, + }; + } + + cacheEntry = entries[CacheKey.DownlevelCode]; + if (cacheEntry) { + result.downlevel = { + filename: action.filename.replace('es2015', 'es5'), + size: cacheEntry.size, + integrity: cacheEntry.integrity, + }; + + BundleActionCache.copyEntryContent(cacheEntry, result.downlevel.filename); + + cacheEntry = entries[CacheKey.DownlevelMap]; + if (cacheEntry) { + result.downlevel.map = { + filename: action.filename.replace('es2015', 'es5') + '.map', + size: cacheEntry.size, + }; + + BundleActionCache.copyEntryContent(cacheEntry, result.downlevel.filename + '.map'); + } + } + + return result; + } +} diff --git a/packages/angular_devkit/build_angular/src/browser/action-executor.ts b/packages/angular_devkit/build_angular/src/browser/action-executor.ts index 7471e885d626..8e24c3d5d27e 100644 --- a/packages/angular_devkit/build_angular/src/browser/action-executor.ts +++ b/packages/angular_devkit/build_angular/src/browser/action-executor.ts @@ -7,49 +7,110 @@ */ import JestWorker from 'jest-worker'; import * as os from 'os'; +import * as path from 'path'; +import { ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; +import { BundleActionCache } from './action-cache'; -export class ActionExecutor { - private largeWorker: JestWorker; - private smallWorker: JestWorker; +let workerFile = require.resolve('../utils/process-bundle'); +workerFile = + path.extname(workerFile) === '.ts' + ? require.resolve('../utils/process-bundle-bootstrap') + : workerFile; - private smallThreshold = 32 * 1024; +export class BundleActionExecutor { + private largeWorker?: JestWorker; + private smallWorker?: JestWorker; + private cache: BundleActionCache; + + constructor( + private workerOptions: unknown, + integrityAlgorithm?: string, + private readonly sizeThreshold = 32 * 1024, + ) { + this.cache = new BundleActionCache(integrityAlgorithm); + } + + private static executeMethod(worker: JestWorker, method: string, input: unknown): Promise { + return ((worker as unknown) as Record Promise>)[method](input); + } + + private ensureLarge(): JestWorker { + if (this.largeWorker) { + return this.largeWorker; + } - constructor(actionFile: string, private readonly actionName: string, setupOptions?: unknown) { // larger files are processed in a separate process to limit memory usage in the main process - this.largeWorker = new JestWorker(actionFile, { - exposedMethods: [actionName], - setupArgs: setupOptions === undefined ? undefined : [setupOptions], - }); + return (this.largeWorker = new JestWorker(workerFile, { + exposedMethods: ['process'], + setupArgs: [this.workerOptions], + })); + } + + private ensureSmall(): JestWorker { + if (this.smallWorker) { + return this.smallWorker; + } // small files are processed in a limited number of threads to improve speed // The limited number also prevents a large increase in memory usage for an otherwise short operation - this.smallWorker = new JestWorker(actionFile, { - exposedMethods: [actionName], - setupArgs: setupOptions === undefined ? undefined : [setupOptions], + return (this.smallWorker = new JestWorker(workerFile, { + exposedMethods: ['process'], + setupArgs: [this.workerOptions], numWorkers: os.cpus().length < 2 ? 1 : 2, // Will automatically fallback to processes if not supported enableWorkerThreads: true, - }); + })); } - execute(options: Input): Promise { - if (options.size > this.smallThreshold) { - return ((this.largeWorker as unknown) as Record Promise>)[ - this.actionName - ](options); + private executeAction(method: string, action: { code: string }): Promise { + // code.length is not an exact byte count but close enough for this + if (action.code.length > this.sizeThreshold) { + return BundleActionExecutor.executeMethod(this.ensureLarge(), method, action); } else { - return ((this.smallWorker as unknown) as Record Promise>)[ - this.actionName - ](options); + return BundleActionExecutor.executeMethod(this.ensureSmall(), method, action); } } - executeAll(options: Input[]): Promise { - return Promise.all(options.map(o => this.execute(o))); + async process(action: ProcessBundleOptions) { + const cacheKeys = this.cache.generateCacheKeys(action); + action.cacheKeys = cacheKeys; + + // Try to get cached data, if it fails fallback to processing + try { + const cachedResult = await this.cache.getCachedBundleResult(action); + if (cachedResult) { + return cachedResult; + } + } catch {} + + return this.executeAction('process', action); + } + + async *processAll(actions: Iterable) { + const executions = new Map, Promise>(); + for (const action of actions) { + const execution = this.process(action); + executions.set( + execution, + execution.then(result => { + executions.delete(execution); + + return result; + }), + ); + } + + while (executions.size > 0) { + yield Promise.race(executions.values()); + } } stop() { - this.largeWorker.end(); - this.smallWorker.end(); + if (this.largeWorker) { + this.largeWorker.end(); + } + if (this.smallWorker) { + this.smallWorker.end(); + } } } diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 5d87691438e5..ff5c3e892d1a 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -67,9 +67,7 @@ import { } from '../utils'; import { copyAssets } from '../utils/copy-assets'; import { I18nOptions, createI18nOptions } from '../utils/i18n-options'; -import { manglingDisabled } from '../utils/mangle-options'; import { - CacheKey, ProcessBundleFile, ProcessBundleOptions, ProcessBundleResult, @@ -80,7 +78,7 @@ import { getIndexInputFile, getIndexOutputFile, } from '../utils/webpack-browser-config'; -import { ActionExecutor } from './action-executor'; +import { BundleActionExecutor } from './action-executor'; import { Schema as BrowserBuilderSchema } from './schema'; const cacache = require('cacache'); @@ -352,7 +350,8 @@ export function buildWebpackBrowser( } // If not optimizing then ES2015 polyfills do not need processing // Unlike other module scripts, it is never downleveled - if (!actionOptions.optimize && file.file.startsWith('polyfills-es2015')) { + const es2015Polyfills = file.file.startsWith('polyfills-es2015'); + if (!actionOptions.optimize && es2015Polyfills) { continue; } @@ -375,22 +374,6 @@ export function buildWebpackBrowser( filename = filename.replace('-es2015', ''); } - // ES2015 polyfills are only optimized; optimization check was performed above - if (file.file.startsWith('polyfills-es2015')) { - actions.push({ - ...actionOptions, - filename, - code, - map, - // id is always present for non-assets - // tslint:disable-next-line: no-non-null-assertion - name: file.id!, - optimizeOnly: true, - }); - - continue; - } - // Record the bundle processing action // The runtime chunk gets special processing for lazy loaded files actions.push({ @@ -403,8 +386,14 @@ export function buildWebpackBrowser( name: file.id!, runtime: file.file.startsWith('runtime'), ignoreOriginal: es5Polyfills, + optimizeOnly: es2015Polyfills, }); + // ES2015 polyfills are only optimized; optimization check was performed above + if (es2015Polyfills) { + continue; + } + // Add the newly created ES5 bundles to the index as nomodule scripts const newFilename = es5Polyfills ? file.file.replace('-es2015', '') @@ -417,205 +406,28 @@ export function buildWebpackBrowser( const processActions: typeof actions = []; let processRuntimeAction: ProcessBundleOptions | undefined; - const cacheActions: { src: string; dest: string }[] = []; const processResults: ProcessBundleResult[] = []; for (const action of actions) { - // Create base cache key with elements: - // * package version - different build-angular versions cause different final outputs - // * code length/hash - ensure cached version matches the same input code - const algorithm = action.integrityAlgorithm || 'sha1'; - const codeHash = createHash(algorithm) - .update(action.code) - .digest('base64'); - let baseCacheKey = `${packageVersion}|${action.code.length}|${algorithm}-${codeHash}`; - if (manglingDisabled) { - baseCacheKey += '|MD'; - } - - // Postfix added to sourcemap cache keys when vendor sourcemaps are present - // Allows non-destructive caching of both variants - const SourceMapVendorPostfix = - !!action.sourceMaps && action.vendorSourceMaps ? '|vendor' : ''; - - // Determine cache entries required based on build settings - const cacheKeys = []; - - // If optimizing and the original is not ignored, add original as required - if ((action.optimize || action.optimizeOnly) && !action.ignoreOriginal) { - cacheKeys[CacheKey.OriginalCode] = baseCacheKey + '|orig'; - - // If sourcemaps are enabled, add original sourcemap as required - if (action.sourceMaps) { - cacheKeys[CacheKey.OriginalMap] = - baseCacheKey + SourceMapVendorPostfix + '|orig-map'; - } - } - // If not only optimizing, add downlevel as required - if (!action.optimizeOnly) { - cacheKeys[CacheKey.DownlevelCode] = baseCacheKey + '|dl'; - - // If sourcemaps are enabled, add downlevel sourcemap as required - if (action.sourceMaps) { - cacheKeys[CacheKey.DownlevelMap] = - baseCacheKey + SourceMapVendorPostfix + '|dl-map'; - } - } - - // Attempt to get required cache entries - const cacheEntries = []; - let cached = cacheKeys.length > 0; - for (const key of cacheKeys) { - if (key) { - const entry = await cacache.get.info(cacheDownlevelPath, key); - if (!entry) { - cached = false; - break; - } - cacheEntries.push(entry); - } else { - cacheEntries.push(null); - } - } - - // If all required cached entries are present, use the cached entries - // Otherwise process the files // If SRI is enabled always process the runtime bundle // Lazy route integrity values are stored in the runtime bundle if (action.integrityAlgorithm && action.runtime) { processRuntimeAction = action; - } else if (cached) { - const result: ProcessBundleResult = { name: action.name }; - if (action.integrityAlgorithm) { - result.integrity = `${action.integrityAlgorithm}-${codeHash}`; - } - - let cacheEntry = cacheEntries[CacheKey.OriginalCode]; - if (cacheEntry) { - cacheActions.push({ - src: cacheEntry.path, - dest: action.filename, - }); - result.original = { - filename: action.filename, - size: cacheEntry.size, - integrity: cacheEntry.metadata && cacheEntry.metadata.integrity, - }; - - cacheEntry = cacheEntries[CacheKey.OriginalMap]; - if (cacheEntry) { - cacheActions.push({ - src: cacheEntry.path, - dest: action.filename + '.map', - }); - result.original.map = { - filename: action.filename + '.map', - size: cacheEntry.size, - }; - } - } else if (!action.ignoreOriginal) { - // If the original wasn't processed (and therefore not cached), add info - result.original = { - filename: action.filename, - size: Buffer.byteLength(action.code, 'utf8'), - map: - action.map === undefined - ? undefined - : { - filename: action.filename + '.map', - size: Buffer.byteLength(action.map, 'utf8'), - }, - }; - } - - cacheEntry = cacheEntries[CacheKey.DownlevelCode]; - if (cacheEntry) { - cacheActions.push({ - src: cacheEntry.path, - dest: action.filename.replace('es2015', 'es5'), - }); - result.downlevel = { - filename: action.filename.replace('es2015', 'es5'), - size: cacheEntry.size, - integrity: cacheEntry.metadata && cacheEntry.metadata.integrity, - }; - - cacheEntry = cacheEntries[CacheKey.DownlevelMap]; - if (cacheEntry) { - cacheActions.push({ - src: cacheEntry.path, - dest: action.filename.replace('es2015', 'es5') + '.map', - }); - result.downlevel.map = { - filename: action.filename.replace('es2015', 'es5') + '.map', - size: cacheEntry.size, - }; - } - } - - processResults.push(result); - } else if (action.runtime) { - processRuntimeAction = { - ...action, - cacheKeys, - }; } else { - processActions.push({ - ...action, - cacheKeys, - }); - } - } - - // Workaround Node.js issue prior to 10.16 with copyFile on macOS - // https://github.com/angular/angular-cli/issues/15544 & https://github.com/nodejs/node/pull/27241 - let copyFileWorkaround = false; - if (process.platform === 'darwin') { - const version = process.versions.node.split('.').map(part => Number(part)); - if ( - version[0] < 10 || - version[0] === 11 || - (version[0] === 10 && version[1] < 16) - ) { - copyFileWorkaround = true; + processActions.push(action); } } - for (const action of cacheActions) { - if (copyFileWorkaround) { - try { - fs.unlinkSync(action.dest); - } catch {} - } - - fs.copyFileSync(action.src, action.dest, fs.constants.COPYFILE_FICLONE); - if (process.platform !== 'win32') { - // The cache writes entries as readonly and when using copyFile the permissions will also be copied. - // See: https://github.com/npm/cacache/blob/073fbe1a9f789ba42d9a41de7b8429c93cf61579/lib/util/move-file.js#L36 - fs.chmodSync(action.dest, 0o644); - } - } - - if (processActions.length > 0) { - const workerFile = require.resolve('../utils/process-bundle'); - const executor = new ActionExecutor< - ProcessBundleOptions & { size: number }, - ProcessBundleResult - >( - path.extname(workerFile) !== '.ts' - ? workerFile - : require.resolve('../utils/process-bundle-bootstrap'), - 'process', - { cachePath: cacheDownlevelPath, i18n }, - ); + const executor = new BundleActionExecutor( + { cachePath: cacheDownlevelPath, i18n }, + options.subresourceIntegrity ? 'sha384' : undefined, + ); - try { - const results = await executor.executeAll( - processActions.map(a => ({ ...a, size: a.code.length })), - ); - results.forEach(result => processResults.push(result)); - } finally { - executor.stop(); + try { + for await (const result of executor.processAll(processActions)) { + processResults.push(result); } + } finally { + executor.stop(); } // Runtime must be processed after all other files From c3169ae7d2a68405e061453d041934a7d3a7dc76 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 10 Oct 2019 21:39:00 +0200 Subject: [PATCH 0278/1070] New i18n schema (#15760) * feat(@angular-devkit/core): update schema to support new i18n options "projects": { "my-app": { "projectType": "application", "schematics": {}, "root": "", "i18n": { "sourceLocale": "en-US", "locales": { "fr": "src/locale/messages.fr.xlf" } }, "sourceRoot": "src", ... } } * feat(@angular-devkit/build-angular): add new i18n options to browser and server builders With this change we add `translateLocales` as new options for i18n in browser and server builders. We also deprecate the following options; * i18nLocale * i18nFormat * i18nFile * feat(@angular-devkit/build-angular): deprecate `i18nFormat` and `i18nLocale` options of `extract-i18n` builder Option `i18nFormat` has been deprecated in favor of `format` and `i18nLocale` option has been deprecated in favor of the `sourceLocale` sub option of the `i18n` project level option. * feat(@angular/cli): add alias of `i18n-extract` for `x18n` command * refactor: rename `translateLocales` to `localize` --- .../angular_devkit/core/src/_golden-api.d.ts | 6 ++ packages/angular/cli/commands/xi18n.json | 2 +- packages/angular/cli/lib/config/schema.json | 101 +++++++++++++++--- .../angular-cli-files/models/build-options.ts | 15 ++- .../build_angular/src/browser/schema.json | 30 +++++- .../build_angular/src/extract-i18n/index.ts | 22 +++- .../src/extract-i18n/schema.json | 17 ++- .../build_angular/src/server/schema.json | 30 +++++- .../test/extract-i18n/works_spec_large.ts | 2 +- .../workspace/workspace-schema.json | 41 ++++++- .../workspace/workspace-schema.ts | 15 +++ .../experimental/workspace/workspace_spec.ts | 8 +- .../legacy-cli/e2e/tests/i18n/extract-xmb.ts | 2 +- 13 files changed, 256 insertions(+), 35 deletions(-) diff --git a/etc/api/angular_devkit/core/src/_golden-api.d.ts b/etc/api/angular_devkit/core/src/_golden-api.d.ts index 6419d836f3bc..c9226acff2e1 100644 --- a/etc/api/angular_devkit/core/src/_golden-api.d.ts +++ b/etc/api/angular_devkit/core/src/_golden-api.d.ts @@ -1251,6 +1251,7 @@ export declare class WorkspaceNotYetLoadedException extends BaseException { export interface WorkspaceProject { architect?: WorkspaceTool; cli?: WorkspaceTool; + i18n?: WorkspaceProjectI18n; prefix: string; projectType: "application" | "library"; root: string; @@ -1259,6 +1260,11 @@ export interface WorkspaceProject { targets?: WorkspaceTool; } +export interface WorkspaceProjectI18n { + locales: Record; + sourceLocale?: string; +} + export interface WorkspaceSchema { $schema?: string; architect?: WorkspaceTool; diff --git a/packages/angular/cli/commands/xi18n.json b/packages/angular/cli/commands/xi18n.json index 082ae7ca1ba2..c48d958440fa 100644 --- a/packages/angular/cli/commands/xi18n.json +++ b/packages/angular/cli/commands/xi18n.json @@ -4,7 +4,7 @@ "description": "Extracts i18n messages from source code.", "$longDescription": "", - "$aliases": [], + "$aliases": ["i18n-extract"], "$scope": "in", "$type": "architect", "$impl": "./xi18n-impl#Xi18nCommand", diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index 1958147b6079..1fde7a4b6541 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -342,6 +342,9 @@ "type": "string", "description": "Root of the project files." }, + "i18n": { + "$ref": "#/definitions/project/definitions/i18n" + }, "sourceRoot": { "type": "string", "description": "The root of the source files, assets and index.html file structure." @@ -398,6 +401,28 @@ "^[a-z]{1,3}-.*": {} }, "definitions": { + "i18n": { + "description": "Project i18n options", + "type": "object", + "properties": { + "sourceLocale": { + "type": "string", + "description": "Specifies the source language of the application.", + "default": "en-US" + }, + "locales": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-z]{2}(-[a-zA-Z]{2,})?$": { + "type": "string", + "description": "Localization file to use for i18n" + } + } + } + }, + "additionalProperties": false + }, "target": { "oneOf": [ { @@ -756,21 +781,26 @@ "description": "Log progress to the console while building.", "default": true }, + "localize": { + "$ref": "#/definitions/buildersOptions/localize" + }, + "i18nMissingTranslation": { + "$ref": "#/definitions/buildersOptions/missingTranslation" + }, "i18nFile": { "type": "string", - "description": "Localization file to use for i18n." + "description": "Localization file to use for i18n.", + "x-deprecated": "Deprecated since 9.0" }, "i18nFormat": { "type": "string", - "description": "Format of the localization file specified with --i18n-file." + "description": "Format of the localization file specified with --i18n-file.", + "x-deprecated": "Deprecated since 9.0" }, "i18nLocale": { "type": "string", - "description": "Locale to use for i18n." - }, - "i18nMissingTranslation": { - "type": "string", - "description": "How to handle missing translations for i18n." + "description": "Locale to use for i18n.", + "x-deprecated": "Deprecated since 9.0" }, "extractCss": { "type": "boolean", @@ -1281,10 +1311,24 @@ "type": "string", "description": "Target to extract from." }, + "format": { + "type": "string", + "description": "Output format for the generated file.", + "default": "xlf", + "enum": [ + "xmb", + "xlf", + "xlif", + "xliff", + "xlf2", + "xliff2" + ] + }, "i18nFormat": { "type": "string", "description": "Output format for the generated file.", "default": "xlf", + "x-deprecated": "Use 'format' option instead.", "enum": [ "xmb", "xlf", @@ -1296,7 +1340,8 @@ }, "i18nLocale": { "type": "string", - "description": "Specifies the source language of the application." + "description": "Specifies the source language of the application.", + "x-deprecated": "Use 'i18n' project level sub-option 'sourceLocale' instead." }, "progress": { "type": "boolean", @@ -1761,21 +1806,26 @@ "description": "Log progress to the console while building.", "default": true }, + "localize": { + "$ref": "#/definitions/buildersOptions/localize" + }, "i18nFile": { "type": "string", - "description": "Localization file to use for i18n." + "description": "Localization file to use for i18n.", + "x-deprecated": "Deprecated since 9.0" }, "i18nFormat": { "type": "string", - "description": "Format of the localization file specified with --i18n-file." + "description": "Format of the localization file specified with --i18n-file.", + "x-deprecated": "Deprecated since 9.0" }, "i18nLocale": { "type": "string", - "description": "Locale to use for i18n." + "description": "Locale to use for i18n.", + "x-deprecated": "Deprecated since 9.0" }, "i18nMissingTranslation": { - "type": "string", - "description": "How to handle missing translations for i18n." + "$ref": "#/definitions/buildersOptions/missingTranslation" }, "outputHashing": { "type": "string", @@ -1965,6 +2015,31 @@ "additionalProperties": false } } + }, + "buildersOptions": { + "missingTranslation": { + "type": "string", + "description": "How to handle missing translations for i18n.", + "enum": ["warning", "error", "ignore"], + "default": "warning" + }, + "localize": { + "oneOf": [ + { + "type": "boolean", + "description": "Translate all locales." + }, + { + "type": "array", + "description": "List of locales ID's to translate.", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$" + } + } + ] + } } } } diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts index 0f92cacb4a83..d7c5a73b3500 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts @@ -15,6 +15,8 @@ import { AssetPatternClass, Budget, ExtraEntryPoint, + I18NMissingTranslation, + Localize, OptimizationClass, SourceMapClass, } from '../../browser/schema'; @@ -27,9 +29,9 @@ export interface BuildOptions { resourcesOutputPath?: string; aot?: boolean; sourceMap: SourceMapClass; - /** @deprecated use sourceMap instead */ + /** @deprecated since version 8. use sourceMap instead. */ vendorSourceMap?: boolean; - /** @deprecated */ + /** @deprecated since version 8 */ evalSourceMap?: boolean; vendorChunk?: boolean; commonChunk?: boolean; @@ -37,16 +39,19 @@ export interface BuildOptions { deployUrl?: string; verbose?: boolean; progress?: boolean; + /** @deprecated since version 9. Use 'locales' object in the project metadata instead.*/ i18nFile?: string; + /** @deprecated since version 9. No longer needed as the format will be determined automatically.*/ i18nFormat?: string; + /** @deprecated since version 9. Use 'localize' instead.*/ i18nLocale?: string; - i18nMissingTranslation?: string; + localize?: Localize; + i18nMissingTranslation?: I18NMissingTranslation; extractCss?: boolean; bundleDependencies?: 'none' | 'all'; watch?: boolean; outputHashing?: string; poll?: number; - app?: string; deleteOutputPath?: boolean; preserveSymlinks?: boolean; extractLicenses?: boolean; @@ -56,10 +61,12 @@ export interface BuildOptions { subresourceIntegrity?: boolean; serviceWorker?: boolean; webWorkerTsConfig?: string; + /** @deprecated since version 8 **/ skipAppShell?: boolean; statsJson: boolean; forkTypeChecker: boolean; profile?: boolean; + /** @deprecated since version 8 **/ es5BrowserSupport?: boolean; main: string; diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index 5d37643ec1ed..e0665a4bc5c7 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -180,19 +180,41 @@ }, "i18nFile": { "type": "string", - "description": "Localization file to use for i18n." + "description": "Localization file to use for i18n.", + "x-deprecated": "Use 'locales' object in the project metadata instead." }, "i18nFormat": { "type": "string", - "description": "Format of the localization file specified with --i18n-file." + "description": "Format of the localization file specified with --i18n-file.", + "x-deprecated": "No longer needed as the format will be determined automatically." }, "i18nLocale": { "type": "string", - "description": "Locale to use for i18n." + "description": "Locale to use for i18n.", + "x-deprecated": "Use 'localize' instead." }, "i18nMissingTranslation": { "type": "string", - "description": "How to handle missing translations for i18n." + "description": "How to handle missing translations for i18n.", + "enum": ["warning", "error", "ignore"], + "default": "warning" + }, + "localize": { + "oneOf": [ + { + "type": "boolean", + "description": "Translate all locales." + }, + { + "type": "array", + "description": "List of locales ID's to translate.", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$" + } + } + ] }, "extractCss": { "type": "boolean", diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts index ae4076b8b939..563ef3fcd83d 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts @@ -22,9 +22,10 @@ import { } from '../angular-cli-files/models/webpack-configs'; import { statsErrorsToString, statsWarningsToString } from '../angular-cli-files/utilities/stats'; import { Schema as BrowserBuilderOptions } from '../browser/schema'; +import { createI18nOptions } from '../utils/i18n-options'; import { assertCompatibleAngularVersion } from '../utils/version'; import { generateBrowserWebpackConfigFromContext } from '../utils/webpack-browser-config'; -import { Schema as ExtractI18nBuilderOptions } from './schema'; +import { Format, Schema as ExtractI18nBuilderOptions } from './schema'; function getI18nOutfile(format: string | undefined) { switch (format) { @@ -58,13 +59,26 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte await context.getBuilderNameForTarget(browserTarget), ); + if (options.i18nFormat !== Format.Xlf) { + options.format = options.i18nFormat; + } + // We need to determine the outFile name so that AngularCompiler can retrieve it. - let outFile = options.outFile || getI18nOutfile(options.i18nFormat); + let outFile = options.outFile || getI18nOutfile(options.format); if (options.outputPath) { // AngularCompilerPlugin doesn't support genDir so we have to adjust outFile instead. outFile = path.join(options.outputPath, outFile); } + const projectName = context.target && context.target.project; + if (!projectName) { + throw new Error('The builder requires a target.'); + } + // target is verified in the above call + // tslint:disable-next-line: no-non-null-assertion + const metadata = await context.getProjectMetadata(context.target!); + const i18n = createI18nOptions(metadata); + const { config } = await generateBrowserWebpackConfigFromContext( { ...browserOptions, @@ -73,8 +87,8 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte styles: false, }, buildOptimizer: false, - i18nLocale: options.i18nLocale, - i18nFormat: options.i18nFormat, + i18nLocale: options.i18nLocale || i18n.sourceLocale, + i18nFormat: options.format, i18nFile: outFile, aot: true, progress: options.progress, diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/schema.json b/packages/angular_devkit/build_angular/src/extract-i18n/schema.json index a40af39254db..3212818ff580 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/schema.json +++ b/packages/angular_devkit/build_angular/src/extract-i18n/schema.json @@ -8,10 +8,24 @@ "type": "string", "description": "Target to extract from." }, + "format": { + "type": "string", + "description": "Output format for the generated file.", + "default": "xlf", + "enum": [ + "xmb", + "xlf", + "xlif", + "xliff", + "xlf2", + "xliff2" + ] + }, "i18nFormat": { "type": "string", "description": "Output format for the generated file.", "default": "xlf", + "x-deprecated": "Use 'format' option instead.", "enum": [ "xmb", "xlf", @@ -23,7 +37,8 @@ }, "i18nLocale": { "type": "string", - "description": "Specifies the source language of the application." + "description": "Specifies the source language of the application.", + "x-deprecated": "Use 'i18n' project level sub-option 'sourceLocale' instead." }, "progress": { "type": "boolean", diff --git a/packages/angular_devkit/build_angular/src/server/schema.json b/packages/angular_devkit/build_angular/src/server/schema.json index b67f552e99c9..041654fa7990 100644 --- a/packages/angular_devkit/build_angular/src/server/schema.json +++ b/packages/angular_devkit/build_angular/src/server/schema.json @@ -142,19 +142,41 @@ }, "i18nFile": { "type": "string", - "description": "Localization file to use for i18n." + "description": "Localization file to use for i18n.", + "x-deprecated": "Use 'locales' object in the project metadata instead." }, "i18nFormat": { "type": "string", - "description": "Format of the localization file specified with --i18n-file." + "description": "Format of the localization file specified with --i18n-file.", + "x-deprecated": "No longer needed as the format will be determined automatically." }, "i18nLocale": { "type": "string", - "description": "Locale to use for i18n." + "description": "Locale to use for i18n.", + "x-deprecated": "Use 'localize' instead." }, "i18nMissingTranslation": { "type": "string", - "description": "How to handle missing translations for i18n." + "description": "How to handle missing translations for i18n.", + "enum": ["warning", "error", "ignore"], + "default": "warning" + }, + "localize": { + "oneOf": [ + { + "type": "boolean", + "description": "Translate all locales." + }, + { + "type": "array", + "description": "List of locales ID's to translate.", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[a-z]{2}(-[a-zA-Z]{2,})?$" + } + } + ] }, "outputHashing": { "type": "string", diff --git a/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts b/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts index f22e39932655..a721e03e06f1 100644 --- a/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts @@ -122,7 +122,7 @@ describe('Extract i18n Target', () => { it('supports i18n format', async () => { host.appendToFile('src/app/app.component.html', '

i18n test

'); const extractionFile = join(normalize('src'), 'messages.xmb'); - const overrides = { i18nFormat: 'xmb' }; + const overrides = { format: 'xmb' }; const run = await architect.scheduleTarget(extractI18nTargetSpec, overrides); diff --git a/packages/angular_devkit/core/src/experimental/workspace/workspace-schema.json b/packages/angular_devkit/core/src/experimental/workspace/workspace-schema.json index a030a6753d55..de7b5abec537 100644 --- a/packages/angular_devkit/core/src/experimental/workspace/workspace-schema.json +++ b/packages/angular_devkit/core/src/experimental/workspace/workspace-schema.json @@ -90,13 +90,31 @@ "targets": { "$ref": "#/definitions/tool", "default": {} + }, + "i18n": { + "$ref": "#/definitions/i18n", + "default": {} } }, "additionalProperties": false, "required": [ "root", "projectType" - ] + ], + "if": { + "properties": { + "projectType": { + "const": "library" + } + } + }, + "then": { + "not": { + "required": [ + "i18n" + ] + } + } }, "tool": { "type": "object", @@ -108,6 +126,27 @@ } }, "additionalProperties": true + }, + "i18n": { + "type": "object", + "properties": { + "sourceLocale": { + "type": "string", + "description": "Specifies the source language of the application.", + "default": "en-US" + }, + "locales": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-z]{2}(-[a-zA-Z]{2,})?$": { + "type": "string", + "description": "Localization file to use for i18n." + } + } + } + }, + "additionalProperties": false } } } diff --git a/packages/angular_devkit/core/src/experimental/workspace/workspace-schema.ts b/packages/angular_devkit/core/src/experimental/workspace/workspace-schema.ts index f10dbc18a688..84769ee96389 100644 --- a/packages/angular_devkit/core/src/experimental/workspace/workspace-schema.ts +++ b/packages/angular_devkit/core/src/experimental/workspace/workspace-schema.ts @@ -82,6 +82,10 @@ export interface WorkspaceProject { * Tool options. */ targets?: WorkspaceTool; + /** + * i18n options. + */ + i18n?: WorkspaceProjectI18n; } /** * Architect options. @@ -93,3 +97,14 @@ export interface WorkspaceTool { $schema?: string; [k: string]: any; } + +export interface WorkspaceProjectI18n { + /** + * Specifies the source language of the application. + */ + sourceLocale?: string; + /** + * Localization file to use for i18n. + */ + locales: Record; +} diff --git a/packages/angular_devkit/core/src/experimental/workspace/workspace_spec.ts b/packages/angular_devkit/core/src/experimental/workspace/workspace_spec.ts index 98032715d4cf..a4e725990be9 100644 --- a/packages/angular_devkit/core/src/experimental/workspace/workspace_spec.ts +++ b/packages/angular_devkit/core/src/experimental/workspace/workspace_spec.ts @@ -17,7 +17,7 @@ import { Workspace, WorkspaceNotYetLoadedException, } from './workspace'; -import { WorkspaceProject, WorkspaceSchema, WorkspaceTool } from './workspace-schema'; +import { WorkspaceSchema, WorkspaceTool } from './workspace-schema'; describe('Workspace', () => { @@ -57,6 +57,12 @@ describe('Workspace', () => { projectType: 'application', prefix: 'app', cli: {}, + i18n: { + sourceLocale: 'en-US', + locales: { + 'fr': 'src/locale/messages.fr.xlf', + }, + }, schematics: { '@schematics/angular': { '*': { diff --git a/tests/legacy-cli/e2e/tests/i18n/extract-xmb.ts b/tests/legacy-cli/e2e/tests/i18n/extract-xmb.ts index e931ec8657ec..c5dd1c5a85f2 100644 --- a/tests/legacy-cli/e2e/tests/i18n/extract-xmb.ts +++ b/tests/legacy-cli/e2e/tests/i18n/extract-xmb.ts @@ -13,7 +13,7 @@ export default function() { .then(() => writeFile(join('src/app/i18n-test', 'i18n-test.component.html'), '

Hello world

'), ) - .then(() => ng('xi18n', '--i18n-format', 'xmb')) + .then(() => ng('xi18n', '--format', 'xmb')) .then(() => expectFileToExist('messages.xmb')) .then(() => expectFileToMatch('messages.xmb', /Hello world/)); } From 318396345ab8b9c609cbfdf1c99a3b00b37c0e83 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 10 Oct 2019 20:39:10 +0100 Subject: [PATCH 0279/1070] feat(@schematics/angular): use ngcc on postinstall (#15801) * build: use FW 9.0.0-next.10 * feat(@schematics/angular): use ngcc on postinstall This should improve the time first builds take. Part of https://github.com/angular/angular/pull/32999 Blocked on an Angular release that includes https://github.com/angular/angular/pull/33049 --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 24 ++-- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- .../angular/utility/latest-versions.ts | 2 +- .../workspace/files/package.json.template | 3 +- yarn.lock | 133 +++++++++++------- 7 files changed, 105 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index 32b35eafe820..6143190d108b 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.9", - "@angular/compiler-cli": "9.0.0-next.9", + "@angular/compiler": "9.0.0-next.10", + "@angular/compiler-cli": "9.0.0-next.10", "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.37.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 95c87733a05f..f32ad0a3e720 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -65,20 +65,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.9", + "@angular/animations": "9.0.0-next.10", "@angular/cdk": "8.2.2", - "@angular/common": "9.0.0-next.9", - "@angular/compiler": "9.0.0-next.9", - "@angular/compiler-cli": "9.0.0-next.9", - "@angular/core": "9.0.0-next.9", - "@angular/forms": "9.0.0-next.9", - "@angular/localize": "9.0.0-next.9", + "@angular/common": "9.0.0-next.10", + "@angular/compiler": "9.0.0-next.10", + "@angular/compiler-cli": "9.0.0-next.10", + "@angular/core": "9.0.0-next.10", + "@angular/forms": "9.0.0-next.10", + "@angular/localize": "9.0.0-next.10", "@angular/material": "8.2.2", - "@angular/platform-browser": "9.0.0-next.9", - "@angular/platform-browser-dynamic": "9.0.0-next.9", - "@angular/platform-server": "9.0.0-next.9", - "@angular/router": "9.0.0-next.9", - "@angular/service-worker": "9.0.0-next.9", + "@angular/platform-browser": "9.0.0-next.10", + "@angular/platform-browser-dynamic": "9.0.0-next.10", + "@angular/platform-server": "9.0.0-next.10", + "@angular/router": "9.0.0-next.10", + "@angular/service-worker": "9.0.0-next.10", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index c3b45257d11b..3643f4a7dd7d 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.9", - "@angular/compiler-cli": "9.0.0-next.9", + "@angular/compiler": "9.0.0-next.10", + "@angular/compiler-cli": "9.0.0-next.10", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.6.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index e3536bbaa69b..3c1000eb3a1d 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.9", - "@angular/compiler-cli": "9.0.0-next.9", + "@angular/compiler": "9.0.0-next.10", + "@angular/compiler-cli": "9.0.0-next.10", "typescript": "3.5.3", "webpack": "4.41.0" } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 76fccaa37ddb..9eb59f6c5494 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,7 +8,7 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.9', + Angular: '~9.0.0-next.10', RxJs: '~6.5.3', ZoneJs: '~0.10.2', TypeScript: '~3.5.3', diff --git a/packages/schematics/angular/workspace/files/package.json.template b/packages/schematics/angular/workspace/files/package.json.template index 80ad3097f6ce..5da9b23eceed 100644 --- a/packages/schematics/angular/workspace/files/package.json.template +++ b/packages/schematics/angular/workspace/files/package.json.template @@ -7,7 +7,8 @@ "build": "ng build", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e" + "e2e": "ng e2e", + "postinstall": "ivy-ngcc --properties es2015 --create-ivy-entry-points" }, "private": true, "dependencies": { diff --git a/yarn.lock b/yarn.lock index eafe4fe9ccbb..544d084f080b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.9.tgz#ad169fe6f171a9c917a5c2a0a8ade9159fe9cb3c" - integrity sha512-0d1DNSfaVlPNa4irmHvb7xGo/N6D0eV/mxVGhsisNKQlVKzyMB5/zE/Un0snKa7tkfhU0hvwnMYp5WDl1k5Osg== +"@angular/animations@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.10.tgz#965e5f1b9533fc1177dd122c21dadd8f7a349d2b" + integrity sha512-KEH0oW2JCIUCsdA6NjJIP8V0fEYWLkccYwBGXvlhDnNW5d5JLhNEpjugrFaREYIQD/Qguu71eoZDFTdaJr7e/g== dependencies: tslib "^1.9.0" @@ -18,17 +18,17 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.9.tgz#e80cf09429960747780b7271fca056daca5e7796" - integrity sha512-mGb32CNcA5E4kAfalXgGS79nYWajLB25ifokuKjlgzPw396wVUyE30X9IglPX9w9pq2fXuyYpmDLUhzB4E4fMw== +"@angular/common@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.10.tgz#1d57400d0c4af121546177b143b5ab10be0bf8f2" + integrity sha512-PrXIb+5f6IuZSgWpn0YpOWIYHCDcBJMihMBafHk+VaWtAPjdXGBo9PeBhXROPXGQrcMxorZHBCaj7REZcrh3Ug== dependencies: tslib "^1.9.0" -"@angular/compiler-cli@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.9.tgz#99e56e2ecf37d83cb8137edf893f5326b55998b1" - integrity sha512-TVMdrCHJ9tLPZiRulzAQwsttV6wpOFoDqEEbXV5pY5eHBcv2lP7vJxm5FfJ3XEqMdMyx68h0W4N8TYBraDaGJw== +"@angular/compiler-cli@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.10.tgz#6465bd2b98bbbf8e6ec29260de4ee48c69272d23" + integrity sha512-D4deoczwl6iNTjWtd4Cp8bQYmH9GE1CI64bK2WQLEp35UZRizRSFvFSht/7+BzdiEi7/+Sn31MiDUdkQCnYe2A== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -41,31 +41,35 @@ tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.9.tgz#a0dd68d931b74f0eb1d4342965548c8a403529ba" - integrity sha512-vRywLqsf1VQHuXkSgsjJY1HNVz9GGS3z9KcIwTW+CZsDNteULmLOIHTWxguBx4MfLz77TlOGtiDxosUqxqVZcA== +"@angular/compiler@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.10.tgz#299a0d5b63e68debe1b2469b12bda61f76d47450" + integrity sha512-02+et2JJ8lkwBTFj+OiLcDat8mWgpLJRpUFFWzHJyEOIkfv/maDMmF6pQzI6X8YCyKaaOEIXaNZcfIYshewxJA== dependencies: tslib "^1.9.0" -"@angular/core@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.9.tgz#c78fc8228d692e3c24dc5f6862644131242d29cc" - integrity sha512-8UJE+3ZVuNNVKcKewtx7jR0K7dHpcsPc9RE0UHil6QBNuyvyaVgDb7pSYdIEs2dx0pX78akvM8VF87Fvc20xWw== +"@angular/core@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.10.tgz#6617be2e5e757b081e2c2bb52278240586020214" + integrity sha512-YXQacLAB4yk1bFztUr0XdHCeZAMsX3UXxisEdJwB1TT+6XTthMC0rv4ja3pwgz6oXGRP7hSLKdx3UWj3xE2BLw== dependencies: tslib "^1.9.0" -"@angular/forms@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.9.tgz#dc6c41257e1e4cec94c91b4f929ee4c09550c3db" - integrity sha512-iFQprmypUFh/g5Y3R0jF/CcUsitfwB55cUVAfhkBOGPTj8IGBcwJEEtrWxsOdvJieAHRFfQgVcTxmXQHSDKb3Q== +"@angular/forms@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.10.tgz#2b46797ba2da0555077fc4a4184a284edbf7d17d" + integrity sha512-oBamuJ3Y7lLwnBGcrJUlmj4px8KtVj+elQPkUY54D/r394/RLmck839o62dljPR2vd0wVjhPKkbUl7aUIDrvEw== dependencies: tslib "^1.9.0" -"@angular/localize@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.9.tgz#c6370a2a176659087a4cb609de982f13bc1a9803" - integrity sha512-Je43V3nMZTjDrhHfnjfOxslxfOZiNyawwSNUz3FX7KfxVx638pzrabgR7hRbIkD6wsginEIpVSKFJ+M9Pr6BFQ== +"@angular/localize@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.10.tgz#cc1a117a5a00c612e17e184344c6aec10f591607" + integrity sha512-QuEWm+fHLtzbF/ifM6fWG51jIioZxK/rjACZqAchlfG1SAfUA66rHygHrxrXmVf+0OnABeJafk+XJM3payV5jQ== + dependencies: + "@babel/core" "^7.5.5" + glob "7.1.2" + yargs "13.1.0" "@angular/material@8.2.2": version "8.2.2" @@ -74,40 +78,40 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.9.tgz#aa0f375d45af24ff8175a26cd6f297caa0f4e489" - integrity sha512-SIZOsqc5uP9NvmPTNBaZwOquya3ml9COsk3RJFxyDMDWfgGmms0sbk0qNDyErREPZOr2jIP86LP399GNKuMEDw== +"@angular/platform-browser-dynamic@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.10.tgz#49650e94eab8e468b2e2934d5ba46b7105a7a8dc" + integrity sha512-RfDSqTZYHiHRc2j7OyppbrgYX1hTtUPqJOpNwytMwoyzwG3aHg9iNzlVw6h7b99euBxBpVwR96fmws2x52DFKw== dependencies: tslib "^1.9.0" -"@angular/platform-browser@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.9.tgz#3bf47fe66b02aac4dddce37baf825f5a7746600b" - integrity sha512-KsBlk/QXKt5IBKB9YunjJdV+RwhiURaxf5wxuFkk72HkLGmQh4aAV1eoviztIwnCn8mu6xgmCF8wsnPfNxL4bw== +"@angular/platform-browser@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.10.tgz#496d99a169a7b7941f6046ba9dc2852150a3745e" + integrity sha512-PDcDscEwkEXhFhmiwn5dIs7MjmspgjeJJlW+JDHPPZntqgqiTIXiOhhDwvGyo0/Yi9cT1IP63w8gHbZp9Sx36w== dependencies: tslib "^1.9.0" -"@angular/platform-server@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.9.tgz#84211e11d90857aa18e7b0c83a221a5c17093971" - integrity sha512-CFVS1HOurJ1H7Nag9mWnjUfp/HL5L2NwEwT89d31NcbHCblv0ou+ifzN8x4M0FPjSWWaNtRVnQev+E1zQ9eULw== +"@angular/platform-server@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.10.tgz#6be104812274259c6e822b754ab137f762da1125" + integrity sha512-PnEhgE6p4+mo76vymN0yINGcTtMPZSX+9kIJWTCo7pF+s3ExnZl+usHuFV9fBPn2REvnZQlPR0DytyA75ZOYgg== dependencies: domino "^2.1.2" tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.9.tgz#d2695bb0576f4a60cfe1c1fb35fa62ca6c89f01e" - integrity sha512-kKQfDZx5l3ePwIKI0kk7ujqCjDpK8MYHXZqwfumIqFiFcifIQRDENF5WxTMXaua70kTTQxDsnpNYGXGCEMKIZg== +"@angular/router@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.10.tgz#d36aa9763d99fd532616eac985399118f881eced" + integrity sha512-Il0KaD3Orm5HWGZvywJy8I9oH3uJVQZFX3FlZweaOsmlsAlrRw9tE4n51aOOVDff/NwJANdDLoQ5Kd8tBRqRPQ== dependencies: tslib "^1.9.0" -"@angular/service-worker@9.0.0-next.9": - version "9.0.0-next.9" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.9.tgz#a697db6e75a684e8c4fc479a05e01c9faae23595" - integrity sha512-NDmHMZ8B0PKytuxz4yEmoqFJZoxKINCaZzTH0FUxgXcdkHN69XLBc4f2wBxdnk9nT5YSJhSDOgoDCTURMssAWw== +"@angular/service-worker@9.0.0-next.10": + version "9.0.0-next.10" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.10.tgz#b096478e49a7a16df10753531cb5cb9ee8bf91b0" + integrity sha512-krY0c+E3cZJ0zZ+/IKm4iQjAAk+kJgf92S1tYvU8qDebZHaiq3wA/Fjs+ziyHtY4NCcrRtIAGl3g6TvnKLMvwg== dependencies: tslib "^1.9.0" @@ -138,6 +142,26 @@ semver "^5.4.1" source-map "^0.6.1" +"@babel/core@^7.5.5": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.3.tgz#44de824e89eaa089bb12da7337bc9bdff2ab68f9" + integrity sha512-QfQ5jTBgXLzJuo7Mo8bZK/ePywmgNRgk/UQykiKwEtZPiFIn8ZqE6jB+AnD1hbB1S2xQyL4//it5vuAUOVAMTw== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.3" + "@babel/helpers" "^7.6.2" + "@babel/parser" "^7.6.3" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.3" + "@babel/types" "^7.6.3" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.6.1" + "@babel/generator@^7.4.0", "@babel/generator@^7.6.2": version "7.6.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.2.tgz#dac8a3c2df118334c2a29ff3446da1636a8f8c03" @@ -4828,6 +4852,18 @@ glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" +glob@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@7.1.4, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" @@ -9131,7 +9167,6 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" - uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: From 33e90392199580886786f7463e3e8a7798164406 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Thu, 10 Oct 2019 15:39:28 -0400 Subject: [PATCH 0280/1070] build: set minimum Node.js version to 10.13 (#15756) Version 10.13.0 was the first version of 10.x that was considered LTS. This also provides an improved performance baseline as well as access to newer Node.js APIs and Javascript language features which the Angular CLI will now be able to leverage. --- lib/packages.ts | 2 +- package.json | 4 ++-- packages/angular/cli/bin/ng | 4 ++-- packages/angular_devkit/benchmark/package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/packages.ts b/lib/packages.ts index b5db90ea96e3..2f3d49373802 100644 --- a/lib/packages.ts +++ b/lib/packages.ts @@ -82,7 +82,7 @@ function loadPackageJson(p: string) { // Overwrite engines to a common default. case 'engines': pkg['engines'] = { - 'node': '>= 10.9.0', + 'node': '>= 10.13.0', 'npm': '>= 6.11.0', 'pnpm': '>= 3.2.0', 'yarn': '>= 1.13.0', diff --git a/package.json b/package.json index 6143190d108b..9408fb9ea732 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "url": "https://github.com/angular/angular-cli.git" }, "engines": { - "node": ">=10.9.0 <13.0.0", + "node": ">=10.13.0 <13.0.0", "yarn": ">=1.17.3 <2.0.0" }, "author": "Angular Authors", @@ -101,7 +101,7 @@ "@types/karma": "^3.0.2", "@types/loader-utils": "^1.1.3", "@types/minimist": "^1.2.0", - "@types/node": "10.9.4", + "@types/node": "10.12.30", "@types/request": "^2.47.1", "@types/semver": "^6.0.0", "@types/webpack": "^4.32.1", diff --git a/packages/angular/cli/bin/ng b/packages/angular/cli/bin/ng index b0be0f9d40d5..923bf1914ec9 100755 --- a/packages/angular/cli/bin/ng +++ b/packages/angular/cli/bin/ng @@ -14,8 +14,8 @@ try { var version = process.version.substr(1).split('.'); if (Number(version[0]) < 10 || (Number(version[0]) === 10 && Number(version[1]) < 9)) { process.stderr.write( - 'You are running version ' + process.version + ' of Node.js, which is not supported by Angular CLI 8.0+.\n' + - 'The official Node.js version that is supported is 10.9 or greater.\n\n' + + 'You are running version ' + process.version + ' of Node.js, which is not supported by Angular CLI 9.0+.\n' + + 'The official Node.js version that is supported is 10.13.0 or greater.\n\n' + 'Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.\n' ); diff --git a/packages/angular_devkit/benchmark/package.json b/packages/angular_devkit/benchmark/package.json index 59a2b6526ff2..64e19a0f6094 100644 --- a/packages/angular_devkit/benchmark/package.json +++ b/packages/angular_devkit/benchmark/package.json @@ -10,7 +10,7 @@ "benchmark" ], "engines": { - "node": ">= 10.9.0", + "node": ">= 10.13.0", "npm": ">= 6.2.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 544d084f080b..021836f431a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1206,10 +1206,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.11.tgz#be879b52031cfb5d295b047f5462d8ef1a716446" integrity sha512-Otxmr2rrZLKRYIybtdG/sgeO+tHY20GxeDjcGmUnmmlCWyEnv2a2x1ZXBo3BTec4OiTXMQCiazB8NMBf0iRlFw== -"@types/node@10.9.4": - version "10.9.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.4.tgz#0f4cb2dc7c1de6096055357f70179043c33e9897" - integrity sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw== +"@types/node@10.12.30": + version "10.12.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.30.tgz#4c2b4f0015f214f8158a347350481322b3b29b2f" + integrity sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q== "@types/node@^10.1.0": version "10.14.20" From 47490527ff8cfbd912225ae1ba1e7e3128547938 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 10 Oct 2019 20:39:38 +0100 Subject: [PATCH 0281/1070] feat(@angular-devkit/build-angular): add experimentalRollupPass (#15690) In applications that make heavy use of lazy routes and ES2015 libraries, this option can improve bundle sizes. It might also break your bundles in ways we don't understand fully, so please test and report any problems you find. NOTE: the following are known problems with experimentalRollupPass - vendorChunk, commonChunk, namedChunks: these won't work, because by the time webpack sees the chunks, the context of where they came from is lost. - webWorkerTsConfig: workers must be imported via a root relative path (e.g.`app/search/search.worker`) instead of a relative path (`/search.worker`) because of the same reason as above. - loadChildren string syntax: doesn't work because rollup cannot follow the imports. --- .../angular_devkit/build_angular/package.json | 1 + .../angular-cli-files/models/build-options.ts | 2 + .../models/webpack-configs/common.ts | 51 +++++- .../plugins/webpack-rollup-loader.ts | 148 ++++++++++++++++++ .../src/angular-cli-files/plugins/webpack.ts | 1 + .../build_angular/src/browser/schema.json | 5 + .../src/utils/webpack-browser-config.ts | 12 ++ .../test/browser/rollup_spec_large.ts | 102 ++++++++++++ .../build_angular/test/utils.ts | 7 +- tests/legacy-cli/e2e/tests/build/rollup.ts | 68 ++++++++ yarn.lock | 16 +- 11 files changed, 410 insertions(+), 3 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack-rollup-loader.ts create mode 100644 packages/angular_devkit/build_angular/test/browser/rollup_spec_large.ts create mode 100644 tests/legacy-cli/e2e/tests/build/rollup.ts diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index f32ad0a3e720..f14789d8f683 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -42,6 +42,7 @@ "postcss-loader": "3.0.0", "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", + "rollup": "1.21.4", "rxjs": "6.5.3", "sass": "1.23.0", "sass-loader": "8.0.0", diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts index d7c5a73b3500..4d5730648ca9 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts @@ -88,6 +88,8 @@ export interface BuildOptions { /* When specified it will be used instead of the script target in the tsconfig.json. */ scriptTargetOverride?: ScriptTarget; + + experimentalRollupPass?: boolean; } export interface WebpackTestOptions extends BuildOptions { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 892fb6c6cf0c..3bb39b216dd3 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -12,12 +12,14 @@ import { import { tags } from '@angular-devkit/core'; import * as CopyWebpackPlugin from 'copy-webpack-plugin'; import * as path from 'path'; +import { RollupOptions } from 'rollup'; import { ScriptTarget } from 'typescript'; import { Compiler, Configuration, ContextReplacementPlugin, HashedModuleIdsPlugin, + Rule, compilation, debug, } from 'webpack'; @@ -29,6 +31,7 @@ import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { NamedLazyChunksPlugin } from '../../plugins/named-chunks-plugin'; import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin'; +import { WebpackRollupLoader } from '../../plugins/webpack'; import { findAllNodeModules, findUp } from '../../utilities/find-up'; import { WebpackConfigOptions } from '../build-options'; import { getEsVersionForFileName, getOutputHashFormat, normalizeExtraEntryPoints } from './utils'; @@ -57,6 +60,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { // tslint:disable-next-line:no-any const extraPlugins: any[] = []; + const extraRules: Rule[] = []; const entryPoints: { [key: string]: string[] } = {}; const targetInFileName = getEsVersionForFileName( @@ -65,7 +69,51 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { ); if (buildOptions.main) { - entryPoints['main'] = [path.resolve(root, buildOptions.main)]; + const mainPath = path.resolve(root, buildOptions.main); + entryPoints['main'] = [mainPath]; + + if (buildOptions.experimentalRollupPass) { + // NOTE: the following are known problems with experimentalRollupPass + // - vendorChunk, commonChunk, namedChunks: these won't work, because by the time webpack + // sees the chunks, the context of where they came from is lost. + // - webWorkerTsConfig: workers must be imported via a root relative path (e.g. + // `app/search/search.worker`) instead of a relative path (`/search.worker`) because + // of the same reason as above. + // - loadChildren string syntax: doesn't work because rollup cannot follow the imports. + + // Rollup options, except entry module, which is automatically inferred. + const rollupOptions: RollupOptions = {}; + + // Add rollup plugins/rules. + extraRules.push({ + test: mainPath, + // Ensure rollup loader executes after other loaders. + enforce: 'post', + use: [{ + loader: WebpackRollupLoader, + options: rollupOptions, + }], + }); + + // Rollup bundles will include the dynamic System.import that was inside Angular and webpack + // will emit warnings because it can't resolve it. We just ignore it. + // TODO: maybe use https://webpack.js.org/configuration/stats/#statswarningsfilter instead. + + // Ignore all "Critical dependency: the request of a dependency is an expression" warnings. + extraPlugins.push(new ContextReplacementPlugin(/./)); + // Ignore "System.import() is deprecated" warnings for the main file and js files. + // Might still get them if @angular/core gets split into a lazy module. + extraRules.push({ + test: mainPath, + enforce: 'post', + parser: { system: true }, + }); + extraRules.push({ + test: /\.js$/, + enforce: 'post', + parser: { system: true }, + }); + } } let differentialLoadingNeeded = false; @@ -482,6 +530,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { enforce: 'pre', ...sourceMapUseRule, }, + ...extraRules, ], }, optimization: { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack-rollup-loader.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack-rollup-loader.ts new file mode 100644 index 000000000000..72db6a989aae --- /dev/null +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack-rollup-loader.ts @@ -0,0 +1,148 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +/** + * @license + * @author Erik Desjardins + * Forked as of SHA 10fb020f997a146725963b202d79290c8798a7a0 from https://github.com/erikdesjardins/webpack-rollup-loader. + * Licensed under a MIT license. + * See https://github.com/erikdesjardins/webpack-rollup-loader/blob/10fb020f997a146725963b202d79290c8798a7a0/LICENSE for full license. + */ + +import { VirtualFileSystemDecorator } from '@ngtools/webpack/src/virtual_file_system_decorator'; +import { dirname, join } from 'path'; +import { OutputAsset, OutputChunk, rollup } from 'rollup'; +import { RawSourceMap } from 'source-map'; +import webpack = require('webpack'); + +function splitRequest(request: string) { + const inx = request.lastIndexOf('!'); + if (inx === -1) { + return { + loaders: '', + resource: request, + }; + } else { + return { + loaders: request.slice(0, inx + 1), + resource: request.slice(inx + 1), + }; + } +} + +// Load resolve paths using Webpack. +function webpackResolutionPlugin( + loaderContext: webpack.loader.LoaderContext, + entryId: string, + entryIdCodeAndMap: { code: string, map: RawSourceMap }, +) { + return { + name: 'webpack-resolution-plugin', + resolveId: (id: string, importerId: string) => { + if (id === entryId) { + return entryId; + } else { + return new Promise((resolve, reject) => { + // split apart resource paths because Webpack's this.resolve() can't handle `loader!` + // prefixes + const parts = splitRequest(id); + const importerParts = splitRequest(importerId); + + // resolve the full path of the imported file with Webpack's module loader + // this will figure out node_modules imports, Webpack aliases, etc. + loaderContext.resolve( + dirname(importerParts.resource), + parts.resource, + (err, fullPath) => err ? reject(err) : resolve(parts.loaders + fullPath), + ); + }); + } + }, + load: (id: string) => { + if (id === entryId) { + return entryIdCodeAndMap; + } + + return new Promise((resolve, reject) => { + // load the module with Webpack + // this will apply all relevant loaders, etc. + loaderContext.loadModule( + id, + (err, source, map) => err ? reject(err) : resolve({ code: source, map: map }), + ); + }); + }, + }; +} + +export default function webpackRollupLoader( + this: webpack.loader.LoaderContext, + source: string, + sourceMap: RawSourceMap, +) { + // Note: this loader isn't cacheable because it will add the lazy chunks to the + // virtual file system on completion. + const callback = this.async(); + if (!callback) { + throw new Error('Async loader support is required.'); + } + const options = this.query || {}; + const entryId = this.resourcePath; + const sourcemap = this.sourceMap; + + // Get the VirtualFileSystemDecorator that AngularCompilerPlugin added so we can write to it. + // Since we use webpackRollupLoader as a post loader, this should be there. + // TODO: we should be able to do this in a more elegant way by again decorating webpacks + // input file system inside a custom WebpackRollupPlugin, modelled after AngularCompilerPlugin. + const vfs = this._compiler.inputFileSystem as VirtualFileSystemDecorator; + const virtualWrite = (path: string, data: string) => + vfs.getWebpackCompilerHost().writeFile(path, data, false); + + // Bundle with Rollup + const rollupOptions = { + ...options, + input: entryId, + plugins: [ + ...(options.plugins || []), + webpackResolutionPlugin(this, entryId, { code: source, map: sourceMap }), + ], + }; + + rollup(rollupOptions) + .then(build => build.generate({ format: 'es', sourcemap })) + .then( + (result) => { + const [mainChunk, ...otherChunksOrAssets] = result.output; + + // Write other chunks and assets to the virtual file system so that webpack can load them. + const resultDir = dirname(entryId); + otherChunksOrAssets.forEach(chunkOrAsset => { + const { fileName, type } = chunkOrAsset; + if (type == 'chunk') { + const { code, map } = chunkOrAsset as OutputChunk; + virtualWrite(join(resultDir, fileName), code); + if (map) { + // Also write the map if there's one. + // Probably need scriptsSourceMap set on CLI to load it. + virtualWrite(join(resultDir, `${fileName}.map`), map.toString()); + } + } else if (type == 'asset') { + const { source } = chunkOrAsset as OutputAsset; + // Source might be a Buffer. Just assuming it's a string for now. + virtualWrite(join(resultDir, fileName), source as string); + } + }); + + // Always return the main chunk from webpackRollupLoader. + // Cast to any here is needed because of a typings incompatibility between source-map versions. + // tslint:disable-next-line:no-any + callback(null, mainChunk.code, (mainChunk as any).map); + }, + (err) => callback(err), + ); +} diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts index de7d1a2425ce..ff8505733c4c 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/webpack.ts @@ -20,3 +20,4 @@ export { import { join } from 'path'; export const RawCssLoader = require.resolve(join(__dirname, 'raw-css-loader')); +export const WebpackRollupLoader = require.resolve(join(__dirname, 'webpack-rollup-loader')); diff --git a/packages/angular_devkit/build_angular/src/browser/schema.json b/packages/angular_devkit/build_angular/src/browser/schema.json index e0665a4bc5c7..61c659e7d861 100644 --- a/packages/angular_devkit/build_angular/src/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/browser/schema.json @@ -375,6 +375,11 @@ "anonymous", "use-credentials" ] + }, + "experimentalRollupPass": { + "type": "boolean", + "description": "Concatenate modules with Rollup before bundling them with Webpack.", + "default": false } }, "additionalProperties": false, diff --git a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts index 203b432f6d67..6b8d0ae94787 100644 --- a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts +++ b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts @@ -48,6 +48,18 @@ export async function generateWebpackConfig( throw new Error(`The 'buildOptimizer' option cannot be used without 'aot'.`); } + // Ensure Rollup Concatenation is only used with compatible options. + if (options.experimentalRollupPass) { + if (!options.aot) { + throw new Error(`The 'experimentalRollupPass' option cannot be used without 'aot'.`); + } + + if (options.vendorChunk || options.commonChunk || options.namedChunks) { + throw new Error(`The 'experimentalRollupPass' option cannot be used with the` + + `'vendorChunk', 'commonChunk', 'namedChunks' options set to true.`); + } + } + const tsConfigPath = path.resolve(workspaceRoot, options.tsConfig); const tsConfig = readTsconfig(tsConfigPath); diff --git a/packages/angular_devkit/build_angular/test/browser/rollup_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/rollup_spec_large.ts new file mode 100644 index 000000000000..55e96781e284 --- /dev/null +++ b/packages/angular_devkit/build_angular/test/browser/rollup_spec_large.ts @@ -0,0 +1,102 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { Architect } from '@angular-devkit/architect'; +import { + BrowserBuildOutput, + browserBuild, + createArchitect, + host, + lazyModuleFiles, + lazyModuleFnImport, +} from '../utils'; + + +describe('Browser Builder Rollup Concatenation test', () => { + const target = { project: 'app', target: 'build' }; + const overrides = { + experimentalRollupPass: true, + // JIT Rollup bundles will include require calls to .css and .html file, that have lost their + // path context. AOT code already inlines resources so that's not a problem. + aot: true, + // Webpack can't separate rolled-up modules into chunks. + vendorChunk: false, + commonChunk: false, + namedChunks: false, + }; + const prodOverrides = { + // Usual prod options. + fileReplacements: [{ + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }], + optimization: true, + sourceMap: false, + extractCss: true, + namedChunks: false, + aot: true, + extractLicenses: true, + vendorChunk: false, + buildOptimizer: true, + // Extra prod options we need for experimentalRollupPass. + commonChunk: false, + // Just for convenience. + outputHashing: 'none', + }; + const rollupProdOverrides = { + ...prodOverrides, + experimentalRollupPass: true, + }; + let architect: Architect; + + const getOutputSize = async (output: BrowserBuildOutput) => + (await Promise.all( + Object.keys(output.files) + .filter(name => name.endsWith('.js') && + // These aren't concatenated by Rollup so no point comparing. + !['runtime.js', 'polyfills.js'].includes(name)) + .map(name => output.files[name]), + )) + .map(content => content.length) + .reduce((acc, curr) => acc + curr, 0); + + beforeEach(async () => { + await host.initialize().toPromise(); + architect = (await createArchitect(host.root())).architect; + }); + + afterEach(async () => host.restore().toPromise()); + + it('works', async () => { + await browserBuild(architect, host, target, overrides); + }); + + it('works with lazy modules', async () => { + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleFnImport); + await browserBuild(architect, host, target, overrides); + }); + + it('creates smaller or same size bundles for app without lazy bundles', async () => { + const prodOutput = await browserBuild(architect, host, target, prodOverrides); + const prodSize = await getOutputSize(prodOutput); + const rollupProdOutput = await browserBuild(architect, host, target, rollupProdOverrides); + const rollupProd = await getOutputSize(rollupProdOutput); + expect(prodSize).toBeGreaterThan(rollupProd); + }); + + it('creates smaller bundles for apps with lazy bundles', async () => { + host.writeMultipleFiles(lazyModuleFiles); + host.writeMultipleFiles(lazyModuleFnImport); + const prodOutput = await browserBuild(architect, host, target, prodOverrides); + const prodSize = await getOutputSize(prodOutput); + const rollupProdOutput = await browserBuild(architect, host, target, rollupProdOverrides); + const rollupProd = await getOutputSize(rollupProdOutput); + expect(prodSize).toBeGreaterThan(rollupProd); + }); +}); diff --git a/packages/angular_devkit/build_angular/test/utils.ts b/packages/angular_devkit/build_angular/test/utils.ts index bf9da9d183b7..aadd47ae5a68 100644 --- a/packages/angular_devkit/build_angular/test/utils.ts +++ b/packages/angular_devkit/build_angular/test/utils.ts @@ -60,13 +60,18 @@ export async function createArchitect(workspaceRoot: Path) { }; } +export interface BrowserBuildOutput { + output: BuilderOutput; + files: { [file: string]: Promise }; +} + export async function browserBuild( architect: Architect, host: virtualFs.Host, target: Target, overrides?: json.JsonObject, scheduleOptions?: ScheduleOptions, -): Promise<{ output: BuilderOutput; files: { [file: string]: Promise } }> { +): Promise { const run = await architect.scheduleTarget(target, overrides, scheduleOptions); const output = (await run.result) as BrowserBuilderOutput; expect(output.success).toBe(true); diff --git a/tests/legacy-cli/e2e/tests/build/rollup.ts b/tests/legacy-cli/e2e/tests/build/rollup.ts new file mode 100644 index 000000000000..96b16f968439 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/build/rollup.ts @@ -0,0 +1,68 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { appendToFile, prependToFile, replaceInFile, writeFile } from '../../utils/fs'; +import { ng } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; + +export default async function () { + // Add initial app routing. + const appRoutingModulePath = 'src/app/app-routing.module.ts'; + await writeFile(appRoutingModulePath, ` + import { NgModule } from '@angular/core'; + import { Routes, RouterModule } from '@angular/router'; + const routes: Routes = []; + @NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule] + }) + export class AppRoutingModule { } + `); + await prependToFile('src/app/app.module.ts', + `import { AppRoutingModule } from './app-routing.module';`); + await replaceInFile('src/app/app.module.ts', `imports: [`, `imports: [ AppRoutingModule,`); + await appendToFile('src/app/app.component.html', ''); + + // Add a lazy route. + await ng('generate', 'module', 'lazy', '--route=lazy', '--module=app.module'); + + // Add lazy route e2e + await writeFile('e2e/src/app.e2e-spec.ts', ` + import { browser, logging, element, by } from 'protractor'; + + describe('workspace-project App', () => { + it('should display lazy route', () => { + browser.get(browser.baseUrl + '/lazy'); + expect(element(by.css('app-lazy p')).getText()).toEqual('lazy works!'); + }); + + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + })); + }); + }); + `); + + // Set options needed for Rollup. + await updateJsonFile('angular.json', workspaceJson => { + const appArchitect = workspaceJson.projects['test-project'].architect; + const prodOptions = appArchitect.build.configurations.production; + prodOptions.vendorChunk = false; + prodOptions.commonChunk = false; + prodOptions.namedChunks = false; + prodOptions.experimentalRollupPass = true; + }); + + // Build for prod. + await ng('build', '--prod'); + + // E2E to make sure it's working. + await ng('e2e', '--prod'); +} diff --git a/yarn.lock b/yarn.lock index 021836f431a1..4f246a0cb602 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1216,6 +1216,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.20.tgz#c4378d9d6a62faa5c9aafffc3d726b5a1e7367c6" integrity sha512-An+MXSV8CGXz/BO9C1KKsoJ/8WDrvlNUaRMsm2h+IHZuSyQkM8U5bJJkb8ItLKA73VePG/nUK+t+EuW2IWuhsQ== +"@types/node@^12.7.5": + version "12.7.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.12.tgz#7c6c571cc2f3f3ac4a59a5f2bd48f5bdbc8653cc" + integrity sha512-KPYGmfD0/b1eXurQ59fXD1GBzhSQfz6/lKBxkaHX9dKTzjXbK68Zt7yGUxUsCS1jeTy/8aL+d9JEr+S54mpkWQ== + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -1740,7 +1745,7 @@ acorn@^6.0.1, acorn@^6.1.1, acorn@^6.2.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== -acorn@^7.1.0: +acorn@^7.0.0, acorn@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== @@ -9074,6 +9079,15 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" +rollup@1.21.4: + version "1.21.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.21.4.tgz#00a41a30f90095db890301b226cbe2918e4cf54d" + integrity sha512-Pl512XVCmVzgcBz5h/3Li4oTaoDcmpuFZ+kdhS/wLreALz//WuDAMfomD3QEYl84NkDu6Z6wV9twlcREb4qQsw== + dependencies: + "@types/estree" "0.0.39" + "@types/node" "^12.7.5" + acorn "^7.0.0" + rollup@^1.12.1: version "1.23.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.23.1.tgz#0315a0f5d0dfb056e6363e1dff05b89ac2da6b8e" From 88aa035cc312116fb2056a6bb15636ed96f04f07 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 11 Oct 2019 03:23:48 +0300 Subject: [PATCH 0282/1070] build: update @angular/animations to version (#15758) --- .../angular_devkit/build_angular/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++----- yarn.lock | 38 +++++-------------- 3 files changed, 21 insertions(+), 41 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index f14789d8f683..42cecf237016 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -67,14 +67,14 @@ }, "devDependencies": { "@angular/animations": "9.0.0-next.10", - "@angular/cdk": "8.2.2", + "@angular/cdk": "8.2.3", "@angular/common": "9.0.0-next.10", "@angular/compiler": "9.0.0-next.10", "@angular/compiler-cli": "9.0.0-next.10", "@angular/core": "9.0.0-next.10", "@angular/forms": "9.0.0-next.10", "@angular/localize": "9.0.0-next.10", - "@angular/material": "8.2.2", + "@angular/material": "8.2.3", "@angular/platform-browser": "9.0.0-next.10", "@angular/platform-browser-dynamic": "9.0.0-next.10", "@angular/platform-server": "9.0.0-next.10", diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 3d727b94e4d2..7fe6804e19d4 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#e4cbf5fdb0a930c07f87697f0383fd47bfb31877", - "@angular/common": "github:angular/common-builds#a019aa4c7dc74e975f5de6dfcbc51e2e0e974a51", - "@angular/compiler": "github:angular/compiler-builds#06b9bfdacd371da241945e457e3a7e426938c6cb", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#c3ac6886635bfc44e56c64bbf9a7a6f9e93ef156", - "@angular/core": "github:angular/core-builds#207392f1404d5e01a0535bfde74e278c569a1990", - "@angular/forms": "github:angular/forms-builds#ad4d83c8df520417c42e0bbd7a5fed058b5215aa", - "@angular/language-service": "github:angular/language-service-builds#b20b826fdcb5e3f4c878e579ca02493f82b28333", - "@angular/platform-browser": "github:angular/platform-browser-builds#d6805422bf75c35803e228df4fcb7f8d07c862db", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#968d124ca53b5627be363c8033f1df990cf4c2c6", - "@angular/router": "github:angular/router-builds#0c7caf48fc31c0b9833827a836a8551197a1e53c" + "@angular/animations": "github:angular/animations-builds#07b04260b2653c48b11164b974e8acd89c956fb2", + "@angular/common": "github:angular/common-builds#07a003b4d34b98677ba5eeffea2b41ea15126ff6", + "@angular/compiler": "github:angular/compiler-builds#16f9f82ae890734f766fe3d5c78602cde193438a", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#cb91e7386f8174c5f7b98e08c9b7c3a4c8ee12c3", + "@angular/core": "github:angular/core-builds#d144181cf413da0a442a24434b13e287c74b654d", + "@angular/forms": "github:angular/forms-builds#7c857ae1506d0d9bf86880442b7c25aea2c7dd9d", + "@angular/language-service": "github:angular/language-service-builds#279fb6627ffbf790523691c50f763b99b4f83080", + "@angular/platform-browser": "github:angular/platform-browser-builds#117ba04374a43ea0ade5b82470658b82359ef71e", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#13b4e02eb3bba4b221609c1f4d9a554417cae4a9", + "@angular/router": "github:angular/router-builds#8a7d5c49fc9ad105f3b9ca986ac14c6f3aec4435" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 4f246a0cb602..13b2fe67a474 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,10 +9,10 @@ dependencies: tslib "^1.9.0" -"@angular/cdk@8.2.2": - version "8.2.2" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.2.2.tgz#e7898a66dbf479edaed4e6c71cf37ddd83daa1fa" - integrity sha512-e+BtFab0Vd1q/ZVu6l850Q4vvgyVYiugSX31oMRlp86fKHPowlAO7jL3z5JcAG7TybpLIqd7oqF8XQBR/yw83w== +"@angular/cdk@8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.2.3.tgz#16b96ffa935cbf5a646757ecaf2b19c434678f72" + integrity sha512-ZwO5Sn720RA2YvBqud0JAHkZXjmjxM0yNzCO8RVtRE9i8Gl26Wk0j0nQeJkVm4zwv2QO8MwbKUKGTMt8evsokA== dependencies: tslib "^1.7.1" optionalDependencies: @@ -71,10 +71,10 @@ glob "7.1.2" yargs "13.1.0" -"@angular/material@8.2.2": - version "8.2.2" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.2.2.tgz#c2a1773d604304f614f20bdb1c6eba1cce351f3f" - integrity sha512-mR2ppE+Z1S5As2SUFK8wUH76Fj7YgrefhrwVGaeCLcAen//RHPw043+KL2apPAUaltdIFlGFtUuA6yJN6av0nQ== +"@angular/material@8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.2.3.tgz#16543e4e06a3fde2651a25cfe126e88e714ae105" + integrity sha512-SOczkIaqes+r+9XF/UUiokidfFKBpHkOPIaFK857sFD0FBNPvPEpOr5oHKCG3feERRwAFqHS7Wo2ohVEWypb5A== dependencies: tslib "^1.7.1" @@ -122,27 +122,7 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.3.tgz#44de824e89eaa089bb12da7337bc9bdff2ab68f9" - integrity sha512-QfQ5jTBgXLzJuo7Mo8bZK/ePywmgNRgk/UQykiKwEtZPiFIn8ZqE6jB+AnD1hbB1S2xQyL4//it5vuAUOVAMTw== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.3" - "@babel/helpers" "^7.6.2" - "@babel/parser" "^7.6.3" - "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.3" - "@babel/types" "^7.6.3" - convert-source-map "^1.1.0" - debug "^4.1.0" - json5 "^2.1.0" - lodash "^4.17.13" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.6.1" - -"@babel/core@^7.5.5": +"@babel/core@7.6.3", "@babel/core@^7.5.5": version "7.6.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.3.tgz#44de824e89eaa089bb12da7337bc9bdff2ab68f9" integrity sha512-QfQ5jTBgXLzJuo7Mo8bZK/ePywmgNRgk/UQykiKwEtZPiFIn8ZqE6jB+AnD1hbB1S2xQyL4//it5vuAUOVAMTw== From c1051b52058bad48768eb242463cac92fa58d61b Mon Sep 17 00:00:00 2001 From: mgechev Date: Thu, 10 Oct 2019 19:04:09 -0700 Subject: [PATCH 0283/1070] release: v9.0.0-next.9 --- packages/schematics/angular/utility/latest-versions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 9eb59f6c5494..da4dd38a1268 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,10 +15,10 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.8', - DevkitBuildNgPackagr: '~0.900.0-next.8', - DevkitBuildWebpack: '~0.900.0-next.8', - AngularPWA: '~0.900.0-next.8', + DevkitBuildAngular: '~0.900.0-next.9', + DevkitBuildNgPackagr: '~0.900.0-next.9', + DevkitBuildWebpack: '~0.900.0-next.9', + AngularPWA: '~0.900.0-next.9', ngPackagr: '^5.5.1', }; From 5b8b62870726ba4f8663e427e69659f3694ad133 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 10 Oct 2019 16:06:22 +0100 Subject: [PATCH 0284/1070] test: additional i18n e2e tests --- .../e2e/tests/build/aot/aot-i18n.ts | 166 +++++++++++------- 1 file changed, 107 insertions(+), 59 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts index fe8220c8df97..915516581c32 100644 --- a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts +++ b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts @@ -1,74 +1,122 @@ -import { appendToFile, createDir, expectFileToMatch, writeFile } from '../../../utils/fs'; +import * as express from 'express'; +import { resolve } from 'path'; +import { getGlobalVariable } from '../../../utils/env'; +import { appendToFile, copyFile, expectFileToExist, expectFileToMatch, replaceInFile, writeFile } from '../../../utils/fs'; import { ng } from '../../../utils/process'; import { updateJsonFile } from '../../../utils/project'; import { expectToFail } from '../../../utils/utils'; export default async function () { - const enDir = 'dist/test-project'; - const frDist = `${enDir}-fr`; - const deDir = `${enDir}-de`; + const baseDir = 'dist/test-project'; + const enDir = `${baseDir}/en`; + const frDist = `${baseDir}/fr`; + const deDir = `${baseDir}/de`; + + // Set configurations for each locale. + const langTranslations = [ + { lang: 'en', translation: 'Hello i18n!', outputPath: enDir }, + { lang: 'fr', translation: 'Bonjour i18n!', outputPath: frDist }, + { lang: 'de', translation: 'Hallo i18n!', outputPath: deDir }, + ]; await updateJsonFile('angular.json', workspaceJson => { const appArchitect = workspaceJson.projects['test-project'].architect; const browserConfigs = appArchitect['build'].configurations; - browserConfigs['fr'] = { - outputPath: frDist, - aot: true, - i18nFile: 'src/locale/messages.fr.xlf', - i18nFormat: 'xlf', - i18nLocale: 'fr', - }; - browserConfigs['de'] = { - outputPath: deDir, - aot: true, - i18nFile: 'src/locale/messages.de.xlf', - i18nFormat: 'xlf', - i18nLocale: 'de', - }; + const serveConfigs = appArchitect['serve'].configurations; + const e2eConfigs = appArchitect['e2e'].configurations; + + // Make default builds prod. + appArchitect['build'].options.optimization = true; + appArchitect['build'].options.buildOptimizer = true; + appArchitect['build'].options.aot = true; + appArchitect['build'].options.fileReplacements = [{ + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }]; + + for (const { lang, outputPath } of langTranslations) { + if (lang == 'en') { + browserConfigs[lang] = { outputPath }; + } else { + browserConfigs[lang] = { + outputPath, + i18nFile: `src/locale/messages.${lang}.xlf`, + i18nFormat: `xlf`, + i18nLocale: lang, + }; + } + serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; + e2eConfigs[lang] = { + specs: [`./src/app.${lang}.e2e-spec.ts`], + devServerTarget: `test-project:serve:${lang}`, + }; + } }); - await createDir('src/locale'); - await writeFile('src/locale/messages.fr.xlf', ` - - - - - - Hello i18n! - Bonjour i18n! - An introduction header for this sample - - - - `); - await writeFile('src/locale/messages.de.xlf', ` - - - - - - Hello i18n! - Hallo i18n! - An introduction header for this sample - - - - `); - await appendToFile('src/app/app.component.html', + // Add e2e specs for each lang. + for (const { lang, translation } of langTranslations) { + await writeFile(`./src/app.${lang}.e2e-spec.ts`, ` + import { browser, logging, element, by } from 'protractor'; + + describe('workspace-project App', () => { + it('should display welcome message', () => { + browser.get(browser.baseUrl); + expect(element(by.css('h1')).getText()).toEqual('${translation}'); + }); + + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); + }); + `); + } + + // Add a translatable element. + await writeFile('src/app/app.component.html', '

Hello i18n!

'); - await ng('build', '--configuration=fr'); - await expectFileToMatch(`${frDist}/main-es5.js`, /Bonjour i18n!/); - await expectFileToMatch(`${frDist}/main-es2015.js`, /Bonjour i18n!/); - await ng('build', '--configuration=de'); - await expectFileToMatch(`${deDir}/main-es5.js`, /Hallo i18n!/); - await expectFileToMatch(`${deDir}/main-es2015.js`, /Hallo i18n!/); - await ng('build', '--aot'); - await expectToFail(() => expectFileToMatch(`${enDir}/main-es5.js`, /Bonjour i18n!/)); - await expectToFail(() => expectFileToMatch(`${enDir}/main-es2015.js`, /Bonjour i18n!/)); - await expectToFail(() => expectFileToMatch(`${enDir}/main-es5.js`, /Hallo i18n!/)); - await expectToFail(() => expectFileToMatch(`${enDir}/main-es2015.js`, /Hallo i18n!/)); - await expectFileToMatch(`${enDir}/main-es2015.js`, /Hello i18n!/); - await expectFileToMatch(`${enDir}/main-es5.js`, /Hello i18n!/); + + // Extract the translation messages and copy them for each language. + await ng('xi18n', '--output-path=src/locale'); + await expectFileToExist('src/locale/messages.xlf'); + await expectFileToMatch('src/locale/messages.xlf', `source-language="en"`); + await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); + + for (const { lang, translation } of langTranslations) { + if (lang != 'en') { + await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); + await replaceInFile(`src/locale/messages.${lang}.xlf`, 'Hello i18n!', + `Hello i18n!\n${translation}`); + } + } + + for (const { lang, translation, outputPath } of langTranslations) { + // Build each locale and verify the output. + await ng('build', `--configuration=${lang}`); + await expectFileToMatch(`${outputPath}/main-es5.js`, translation); + await expectFileToMatch(`${outputPath}/main-es2015.js`, translation); + + // E2E to verify the output runs and is correct. + if (getGlobalVariable('argv')['ve']) { + await ng('e2e', `--configuration=${lang}`); + } else { + // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. + const app = express(); + app.use(express.static(resolve(outputPath))); + const server = app.listen(4200, 'localhost'); + try { + // Execute without a devserver. + await ng('e2e', '--devServerTarget='); + } finally { + server.close(); + } + } + } + + // Verify missing translation behaviour. await appendToFile('src/app/app.component.html', '

Other content

'); await ng('build', '--configuration=fr', '--i18n-missing-translation', 'ignore'); await expectFileToMatch(`${frDist}/main-es5.js`, /Other content/); From d9bf2dbbda36780472ffaf48e75e010c6045c4d6 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 11 Oct 2019 16:55:29 +0200 Subject: [PATCH 0285/1070] fix(@angular-devkit/build-angular): avoid attempting to copy directories Avoid copying directly directories, also which this change we cache `fs.existsSync` to optimize copying when a lot of file are being copied to the same destination. Closes: #15816 --- .../build_angular/src/utils/copy-assets.ts | 11 ++++++++--- .../build_angular/test/browser/assets_spec_large.ts | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/copy-assets.ts b/packages/angular_devkit/build_angular/src/utils/copy-assets.ts index 337f4dd9ed9e..17e2fdd64c20 100644 --- a/packages/angular_devkit/build_angular/src/utils/copy-assets.ts +++ b/packages/angular_devkit/build_angular/src/utils/copy-assets.ts @@ -29,9 +29,12 @@ export async function copyAssets( const files = await globAsync(entry.glob, { cwd, dot: true, + nodir: true, ignore: entry.ignore ? defaultIgnore.concat(entry.ignore) : defaultIgnore, }); + const directoryExists = new Set(); + for (const file of files) { const src = path.join(cwd, file); if (changed && !changed.has(src)) { @@ -42,9 +45,11 @@ export async function copyAssets( for (const base of basePaths) { const dest = path.join(base, entry.output, filePath); const dir = path.dirname(dest); - if (!fs.existsSync(dir)) { - // tslint:disable-next-line: no-any - fs.mkdirSync(dir, { recursive: true } as any); + if (!directoryExists.has(dir)) { + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir, { recursive: true }); + } + directoryExists.add(dir); } copyFile(src, dest); } diff --git a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts index 904180ce5a7c..ab0e30faf422 100644 --- a/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/assets_spec_large.ts @@ -28,6 +28,7 @@ describe('Browser Builder assets', () => { './src/folder/.gitkeep': '', './src/string-file-asset.txt': 'string-file-asset.txt', './src/string-folder-asset/file.txt': 'string-folder-asset.txt', + './src/nested/nested/file.txt': 'nested-file.txt', './src/glob-asset.txt': 'glob-asset.txt', './src/folder/folder-asset.txt': 'folder-asset.txt', './src/output-asset.txt': 'output-asset.txt', @@ -35,6 +36,7 @@ describe('Browser Builder assets', () => { const matches: { [path: string]: string } = { './dist/string-file-asset.txt': 'string-file-asset.txt', './dist/string-folder-asset/file.txt': 'string-folder-asset.txt', + './dist/nested/nested/file.txt': 'nested-file.txt', './dist/glob-asset.txt': 'glob-asset.txt', './dist/folder/folder-asset.txt': 'folder-asset.txt', './dist/output-folder/output-asset.txt': 'output-asset.txt', @@ -43,6 +45,7 @@ describe('Browser Builder assets', () => { const overrides = { assets: [ + 'src/nested', 'src/string-file-asset.txt', 'src/string-folder-asset', { glob: 'glob-asset.txt', input: 'src/', output: '/' }, From 102ba9a7b7955b1559b486df65a63d540d6e35fe Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 11 Oct 2019 05:19:50 +0000 Subject: [PATCH 0286/1070] build: update @babel/core to version 7.6.4 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 37 ++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 42cecf237016..e42a42d42c83 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -11,7 +11,7 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/build-webpack": "0.0.0", "@angular-devkit/core": "0.0.0", - "@babel/core": "7.6.3", + "@babel/core": "7.6.4", "@babel/preset-env": "7.6.3", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", diff --git a/yarn.lock b/yarn.lock index 13b2fe67a474..2c4df914174e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,7 +122,27 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.6.3", "@babel/core@^7.5.5": +"@babel/core@7.6.4": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.4.tgz#6ebd9fe00925f6c3e177bb726a188b5f578088ff" + integrity sha512-Rm0HGw101GY8FTzpWSyRbki/jzq+/PkNQJ+nSulrdY6gFGOsNseCqD6KHRYe2E+EdzuBdr2pxCp6s4Uk6eJ+XQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.4" + "@babel/helpers" "^7.6.2" + "@babel/parser" "^7.6.4" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.3" + "@babel/types" "^7.6.3" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/core@^7.5.5": version "7.6.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.3.tgz#44de824e89eaa089bb12da7337bc9bdff2ab68f9" integrity sha512-QfQ5jTBgXLzJuo7Mo8bZK/ePywmgNRgk/UQykiKwEtZPiFIn8ZqE6jB+AnD1hbB1S2xQyL4//it5vuAUOVAMTw== @@ -162,6 +182,16 @@ lodash "^4.17.13" source-map "^0.6.1" +"@babel/generator@^7.6.4": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" + integrity sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w== + dependencies: + "@babel/types" "^7.6.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -345,6 +375,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.3.tgz#9eff8b9c3eeae16a74d8d4ff30da2bd0d6f0487e" integrity sha512-sUZdXlva1dt2Vw2RqbMkmfoImubO0D0gaCrNngV6Hi0DA4x3o4mlrq0tbfY0dZEUIccH8I6wQ4qgEtwcpOR6Qg== +"@babel/parser@^7.6.4": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" + integrity sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" From 9c2cf7dea2753e7d3b66d64009996bb3cd5a0599 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 11 Oct 2019 05:20:07 +0000 Subject: [PATCH 0287/1070] build: update rollup to version 1.23.1 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index e42a42d42c83..ccbb2a7ad9cf 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -42,7 +42,7 @@ "postcss-loader": "3.0.0", "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", - "rollup": "1.21.4", + "rollup": "1.23.1", "rxjs": "6.5.3", "sass": "1.23.0", "sass-loader": "8.0.0", diff --git a/yarn.lock b/yarn.lock index 2c4df914174e..b0c333d9c91a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1231,11 +1231,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.20.tgz#c4378d9d6a62faa5c9aafffc3d726b5a1e7367c6" integrity sha512-An+MXSV8CGXz/BO9C1KKsoJ/8WDrvlNUaRMsm2h+IHZuSyQkM8U5bJJkb8ItLKA73VePG/nUK+t+EuW2IWuhsQ== -"@types/node@^12.7.5": - version "12.7.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.12.tgz#7c6c571cc2f3f3ac4a59a5f2bd48f5bdbc8653cc" - integrity sha512-KPYGmfD0/b1eXurQ59fXD1GBzhSQfz6/lKBxkaHX9dKTzjXbK68Zt7yGUxUsCS1jeTy/8aL+d9JEr+S54mpkWQ== - "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -1760,7 +1755,7 @@ acorn@^6.0.1, acorn@^6.1.1, acorn@^6.2.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== -acorn@^7.0.0, acorn@^7.1.0: +acorn@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== @@ -9094,16 +9089,7 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.21.4: - version "1.21.4" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.21.4.tgz#00a41a30f90095db890301b226cbe2918e4cf54d" - integrity sha512-Pl512XVCmVzgcBz5h/3Li4oTaoDcmpuFZ+kdhS/wLreALz//WuDAMfomD3QEYl84NkDu6Z6wV9twlcREb4qQsw== - dependencies: - "@types/estree" "0.0.39" - "@types/node" "^12.7.5" - acorn "^7.0.0" - -rollup@^1.12.1: +rollup@1.23.1, rollup@^1.12.1: version "1.23.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.23.1.tgz#0315a0f5d0dfb056e6363e1dff05b89ac2da6b8e" integrity sha512-95C1GZQpr/NIA0kMUQmSjuMDQ45oZfPgDBcN0yZwBG7Kee//m7H68vgIyg+SPuyrTZ5PrXfyLK80OzXeKG5dAA== From 788875dda57f96abe24de0b6f737ebe4fda06988 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 11 Oct 2019 06:19:44 +0000 Subject: [PATCH 0288/1070] build: update terser-webpack-plugin to version 2.1.3 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ccbb2a7ad9cf..37de98f4b60b 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -56,7 +56,7 @@ "stylus-loader": "3.0.2", "tree-kill": "1.2.1", "terser": "4.3.8", - "terser-webpack-plugin": "2.1.2", + "terser-webpack-plugin": "2.1.3", "webpack": "4.41.0", "webpack-dev-middleware": "3.7.2", "webpack-dev-server": "3.8.2", diff --git a/yarn.lock b/yarn.lock index b0c333d9c91a..937c4c02e210 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2574,7 +2574,7 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@13.0.1, cacache@^13.0.0: +cacache@13.0.1, cacache@^13.0.1: version "13.0.1" resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c" integrity sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w== @@ -10139,18 +10139,18 @@ term-size@^1.2.0: dependencies: execa "^0.7.0" -terser-webpack-plugin@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.1.2.tgz#2b9b8147a6f18918348200800cf9560c50f701bb" - integrity sha512-MF/C4KABwqYOfRDi87f7gG07GP7Wj/kyiX938UxIGIO6l5mkh8XJL7xtS0hX/CRdVQaZI7ThGUPZbznrCjsGpg== +terser-webpack-plugin@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.1.3.tgz#85430da71ba88a60072bf659589eafaf6a00dc22" + integrity sha512-z5Utx0TxmirZvRNL1GC795tlDM+bO83ZfcbtkL1y1VLoWtZ7S2a9+HFCLnabSRE/Yjsu4zCEX6U6CIRo4dVmcQ== dependencies: - cacache "^13.0.0" + cacache "^13.0.1" find-cache-dir "^3.0.0" jest-worker "^24.9.0" schema-utils "^2.4.1" serialize-javascript "^2.1.0" source-map "^0.6.1" - terser "^4.3.4" + terser "^4.3.8" webpack-sources "^1.4.3" terser-webpack-plugin@^1.4.1: @@ -10168,7 +10168,7 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.8, terser@^4.1.2, terser@^4.3.4: +terser@4.3.8, terser@^4.1.2, terser@^4.3.8: version "4.3.8" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.8.tgz#707f05f3f4c1c70c840e626addfdb1c158a17136" integrity sha512-otmIRlRVmLChAWsnSFNO0Bfk6YySuBp6G9qrHiJwlLDd4mxe2ta4sjI7TzIR+W1nBMjilzrMcPOz9pSusgx3hQ== From 7045a781ea47eae5b8cc775e73d8ffbb694a9cf3 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 12 Oct 2019 10:01:27 +0200 Subject: [PATCH 0289/1070] test: fix i18n extraction e2e test The default `source-language` is `en-US` and not `en`. --- tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts index 915516581c32..2178f822f892 100644 --- a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts +++ b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts @@ -82,7 +82,7 @@ export default async function () { // Extract the translation messages and copy them for each language. await ng('xi18n', '--output-path=src/locale'); await expectFileToExist('src/locale/messages.xlf'); - await expectFileToMatch('src/locale/messages.xlf', `source-language="en"`); + await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); for (const { lang, translation } of langTranslations) { From 750baf92d681faa7f6fe8d1a29aea53133415108 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 10 Oct 2019 19:07:26 +0200 Subject: [PATCH 0290/1070] feat(@schematics/angular): add migration to add new i18n options for Ivy This migration will update current projects by adding the `i18n` project level option and add `localize` option in the server and browser builder configurations when both `i18nLocale` and `i18nFile` are defined. --- .../update-9/update-workspace-config.ts | 74 ++++++++++++++++++- .../update-9/update-workspace-config_spec.ts | 71 ++++++++++++++++++ .../angular/migrations/update-9/utils.ts | 51 ++++++++----- 3 files changed, 176 insertions(+), 20 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts index 30bfd3d6bb2a..f74d9730a688 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts @@ -15,7 +15,7 @@ import { removePropertyInAstObject, } from '../../utility/json-utils'; import { Builders } from '../../utility/workspace-models'; -import { getAllOptions, getTargets, getWorkspace, isIvyEnabled } from './utils'; +import { getAllOptions, getProjectTarget, getTargets, getWorkspace, isIvyEnabled } from './utils'; export const ANY_COMPONENT_STYLE_BUDGET = { type: 'anyComponentStyle', @@ -33,6 +33,7 @@ export function updateWorkspaceConfig(): Rule { updateStyleOrScriptOption('scripts', recorder, target); addAnyComponentStyleBudget(recorder, target); updateAotOption(tree, recorder, target); + addBuilderI18NOptions(recorder, target); } for (const { target } of getTargets(workspace, 'test', Builders.Karma)) { @@ -42,6 +43,11 @@ export function updateWorkspaceConfig(): Rule { for (const { target } of getTargets(workspace, 'server', Builders.Server)) { updateOptimizationOption(recorder, target); + addBuilderI18NOptions(recorder, target); + } + + for (const { target, project } of getTargets(workspace, 'extract-i18n', Builders.ExtractI18n)) { + addProjectI18NOptions(recorder, target, project); } tree.commitUpdate(recorder); @@ -50,6 +56,72 @@ export function updateWorkspaceConfig(): Rule { }; } +function addProjectI18NOptions(recorder: UpdateRecorder, builderConfig: JsonAstObject, projectConfig: JsonAstObject) { + const browserConfig = getProjectTarget(projectConfig, 'build', Builders.Browser); + if (!browserConfig || browserConfig.kind !== 'object') { + return; + } + + // browser builder options + let locales: Record | undefined; + const options = getAllOptions(browserConfig); + for (const option of options) { + const localeId = findPropertyInAstObject(option, 'i18nLocale'); + if (!localeId || localeId.kind !== 'string') { + continue; + } + + const localeFile = findPropertyInAstObject(option, 'i18nFile'); + if (!localeFile || localeFile.kind !== 'string') { + continue; + } + + const localIdValue = localeId.value; + const localeFileValue = localeFile.value; + + if (!locales) { + locales = { + [localIdValue]: localeFileValue, + }; + } else { + locales[localIdValue] = localeFileValue; + } + } + + if (locales) { + // Get sourceLocale from extract-i18n builder + const i18nOptions = getAllOptions(builderConfig); + const sourceLocale = i18nOptions + .map(o => { + const sourceLocale = findPropertyInAstObject(o, 'i18nLocale'); + + return sourceLocale && sourceLocale.value; + }) + .find(x => !!x); + + // Add i18n project configuration + insertPropertyInAstObjectInOrder(recorder, projectConfig, 'i18n', { + locales, + // tslint:disable-next-line: no-any + sourceLocale: sourceLocale as any, + }, 6); + } +} + +function addBuilderI18NOptions(recorder: UpdateRecorder, builderConfig: JsonAstObject) { + const options = getAllOptions(builderConfig); + + for (const option of options) { + const localeId = findPropertyInAstObject(option, 'i18nLocale'); + if (!localeId || localeId.kind !== 'string') { + continue; + } + + // add new localize option + insertPropertyInAstObjectInOrder(recorder, option, 'localize', [localeId.value], 12); + } +} + function updateAotOption(tree: Tree, recorder: UpdateRecorder, builderConfig: JsonAstObject) { const options = findPropertyInAstObject(builderConfig, 'options'); if (!options || options.kind !== 'object') { diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts index a7a2c98a220c..55d3261f78b8 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts @@ -296,5 +296,76 @@ describe('Migration to version 9', () => { expect(config.production.optimization).toBe(true); }); }); + + describe('i18n configuration', () => { + function getI18NConfig(localId: string): object { + return { + outputPath: `dist/my-project-${localId}/`, + i18nFile: `src/locale/messages.${localId}.xlf`, + i18nFormat: 'xlf', + i18nLocale: localId, + }; + } + + describe('when i18n builder options are set', () => { + it(`should add 'localize' option in configuration`, async () => { + let config = getWorkspaceTargets(tree); + config.build.options.aot = false; + config.build.options = getI18NConfig('fr'); + config.build.configurations.de = getI18NConfig('de'); + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + config = getWorkspaceTargets(tree2).build; + expect(config.options.localize).toEqual(['fr']); + expect(config.configurations.de.localize).toEqual(['de']); + }); + + it(`should add i18n 'sourceLocale' project config when 'extract-i18n' 'i18nLocale' is defined`, async () => { + const config = getWorkspaceTargets(tree); + config.build.options.aot = false; + config.build.options = getI18NConfig('fr'); + config['extract-i18n'].options.i18nLocale = 'en-GB'; + config.build.configurations.de = getI18NConfig('de'); + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const projectConfig = JSON.parse(tree2.readContent(workspacePath)).projects['migration-test']; + expect(projectConfig.i18n.sourceLocale).toBe('en-GB'); + expect(projectConfig.i18n.locales).toBeDefined(); + }); + + it(`should add i18n 'locales' project config`, async () => { + const config = getWorkspaceTargets(tree); + config.build.options.aot = false; + config.build.options = getI18NConfig('fr'); + config.build.configurations.de = getI18NConfig('de'); + updateWorkspaceTargets(tree, config); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const projectConfig = JSON.parse(tree2.readContent(workspacePath)).projects['migration-test']; + expect(projectConfig.i18n.sourceLocale).toBeUndefined(); + expect(projectConfig.i18n.locales).toEqual({ + de: 'src/locale/messages.de.xlf', + fr: 'src/locale/messages.fr.xlf', + }); + }); + }); + + describe('when i18n builder options are not set', () => { + it(`should not add 'localize' option`, async () => { + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const config = getWorkspaceTargets(tree2).build; + expect(config.options.localize).toBeUndefined(); + expect(config.configurations.production.localize).toBeUndefined(); + }); + + it('should not add i18n project config', async () => { + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const projectConfig = JSON.parse(tree2.readContent(workspacePath)).projects['migration-test']; + expect(projectConfig.i18n).toBeUndefined(); + }); + }); + }); }); }); diff --git a/packages/schematics/angular/migrations/update-9/utils.ts b/packages/schematics/angular/migrations/update-9/utils.ts index f847957468d7..074cbf4e67b4 100644 --- a/packages/schematics/angular/migrations/update-9/utils.ts +++ b/packages/schematics/angular/migrations/update-9/utils.ts @@ -12,7 +12,36 @@ import { getWorkspacePath } from '../../utility/config'; import { findPropertyInAstObject } from '../../utility/json-utils'; import { Builders, WorkspaceTargets } from '../../utility/workspace-models'; -/** Get all workspace targets which builder and target names matches the provided. */ +/** Get a project target which builder and target names matches the provided. */ +export function getProjectTarget( + project: JsonAstObject, + targetName: Exclude, + builderName: Builders, +): JsonAstObject | undefined { + const projectRoot = findPropertyInAstObject(project, 'root'); + if (!projectRoot || projectRoot.kind !== 'string') { + return undefined; + } + + const architect = findPropertyInAstObject(project, 'architect'); + if (!architect || architect.kind !== 'object') { + return undefined; + } + + const target = findPropertyInAstObject(architect, targetName); + if (!target || target.kind !== 'object') { + return undefined; + } + + const builder = findPropertyInAstObject(target, 'builder'); + // Projects who's build builder is @angular-devkit/build-ng-packagr + if (builder && builder.kind === 'string' && builder.value === builderName) { + return target; + } + + return undefined; +} + export function getTargets( workspace: JsonAstObject, targetName: Exclude, @@ -30,24 +59,8 @@ export function getTargets( continue; } - const projectRoot = findPropertyInAstObject(projectConfig, 'root'); - if (!projectRoot || projectRoot.kind !== 'string') { - continue; - } - - const architect = findPropertyInAstObject(projectConfig, 'architect'); - if (!architect || architect.kind !== 'object') { - continue; - } - - const target = findPropertyInAstObject(architect, targetName); - if (!target || target.kind !== 'object') { - continue; - } - - const builder = findPropertyInAstObject(target, 'builder'); - // Projects who's build builder is @angular-devkit/build-ng-packagr - if (builder && builder.kind === 'string' && builder.value === builderName) { + const target = getProjectTarget(projectConfig, targetName, builderName); + if (target) { targets.push({ target, project: projectConfig }); } } From d133ba68c0e2bc05472712fbe7eecd63a54f142c Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 11 Oct 2019 12:43:01 +0200 Subject: [PATCH 0291/1070] feat(@angular/cli): add support for ng-add packages that should not be saved as `dependencies` With this change the CLI offers a way for a package authors to specify if during `ng add` the package should be saved as a `dependencies`, `devDependencies` or not saved at all. Such config needs to be specified in `package.json` Example: ```json "ng-add": { "save": false } ``` Possible values are; - false - Don't add the package to `package.json` - true - Add the package to the `dependencies` - `dependencies` - Add the package to the `dependencies` - `devDependencies` - Add the package to the `devDependencies` Closes #12003 , closes #15764 and closes #13237 --- packages/angular/cli/commands/add-impl.ts | 46 +++++++++------- packages/angular/cli/tasks/npm-install.ts | 9 +++- packages/angular/cli/tasks/npm-uninstall.ts | 53 +++++++++++++++++++ .../angular/cli/utilities/package-metadata.ts | 7 ++- .../angular/cli/utilities/package-tree.ts | 7 +++ packages/angular/pwa/package.json | 3 ++ .../e2e/tests/commands/add/add-pwa.ts | 20 +++++++ 7 files changed, 123 insertions(+), 22 deletions(-) create mode 100644 packages/angular/cli/tasks/npm-uninstall.ts create mode 100644 tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts diff --git a/packages/angular/cli/commands/add-impl.ts b/packages/angular/cli/commands/add-impl.ts index 790a8618115d..9e0e213eabe4 100644 --- a/packages/angular/cli/commands/add-impl.ts +++ b/packages/angular/cli/commands/add-impl.ts @@ -13,9 +13,11 @@ import { isPackageNameSafeForAnalytics } from '../models/analytics'; import { Arguments } from '../models/interface'; import { RunSchematicOptions, SchematicCommand } from '../models/schematic-command'; import npmInstall from '../tasks/npm-install'; +import npmUninstall from '../tasks/npm-uninstall'; import { colors } from '../utilities/color'; import { getPackageManager } from '../utilities/package-manager'; import { + NgAddSaveDepedency, PackageManifest, fetchPackageManifest, fetchPackageMetadata, @@ -113,31 +115,39 @@ export class AddCommand extends SchematicCommand { } let collectionName = packageIdentifier.name; - if (!packageIdentifier.registry) { - try { - const manifest = await fetchPackageManifest(packageIdentifier, this.logger, { - registry: options.registry, - verbose: options.verbose, - usingYarn, - }); + let dependencyType: NgAddSaveDepedency | undefined; - collectionName = manifest.name; + try { + const manifest = await fetchPackageManifest(packageIdentifier, this.logger, { + registry: options.registry, + verbose: options.verbose, + usingYarn, + }); - if (await this.hasMismatchedPeer(manifest)) { - this.logger.warn( - 'Package has unmet peer dependencies. Adding the package may not succeed.', - ); - } - } catch (e) { - this.logger.error('Unable to fetch package manifest: ' + e.message); + dependencyType = manifest['ng-add'] && manifest['ng-add'].save; + collectionName = manifest.name; - return 1; + if (await this.hasMismatchedPeer(manifest)) { + this.logger.warn( + 'Package has unmet peer dependencies. Adding the package may not succeed.', + ); } + } catch (e) { + this.logger.error('Unable to fetch package manifest: ' + e.message); + + return 1; } - await npmInstall(packageIdentifier.raw, this.logger, packageManager, this.workspace.root); + await npmInstall(packageIdentifier.raw, this.logger, packageManager, dependencyType); + + const schematicResult = await this.executeSchematic(collectionName, options['--']); + + if (dependencyType === false) { + // Uninstall the package if it was not meant to be retained. + return npmUninstall(packageIdentifier.raw, this.logger, packageManager); + } - return this.executeSchematic(collectionName, options['--']); + return schematicResult; } async reportAnalytics( diff --git a/packages/angular/cli/tasks/npm-install.ts b/packages/angular/cli/tasks/npm-install.ts index f60fce0f8991..33deaabd3964 100644 --- a/packages/angular/cli/tasks/npm-install.ts +++ b/packages/angular/cli/tasks/npm-install.ts @@ -9,13 +9,13 @@ import { logging } from '@angular-devkit/core'; import { spawn } from 'child_process'; import { colors } from '../utilities/color'; +import { NgAddSaveDepedency } from '../utilities/package-metadata'; export default async function( packageName: string, logger: logging.Logger, packageManager: string, - projectRoot: string, - save = true, + save: NgAddSaveDepedency = true, ) { const installArgs: string[] = []; switch (packageManager) { @@ -42,9 +42,14 @@ export default async function( } if (!save) { + // IMP: yarn doesn't have a no-save option installArgs.push('--no-save'); } + if (save === 'devDependencies') { + installArgs.push(packageManager === 'yarn' ? '--dev' : '--save-dev'); + } + installArgs.push('--quiet'); await new Promise((resolve, reject) => { diff --git a/packages/angular/cli/tasks/npm-uninstall.ts b/packages/angular/cli/tasks/npm-uninstall.ts new file mode 100644 index 000000000000..a30160195a0d --- /dev/null +++ b/packages/angular/cli/tasks/npm-uninstall.ts @@ -0,0 +1,53 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { logging } from '@angular-devkit/core'; +import { spawn } from 'child_process'; +import { colors } from '../utilities/color'; + +export default async function( + packageName: string, + logger: logging.Logger, + packageManager: string, +) { + const installArgs: string[] = []; + switch (packageManager) { + case 'cnpm': + case 'pnpm': + case 'npm': + installArgs.push('uninstall'); + break; + + case 'yarn': + installArgs.push('remove'); + break; + + default: + packageManager = 'npm'; + installArgs.push('uninstall'); + break; + } + + installArgs.push(packageName, '--quiet'); + + logger.info(colors.green(`Uninstalling packages for tooling via ${packageManager}.`)); + + await new Promise((resolve, reject) => { + spawn(packageManager, installArgs, { stdio: 'inherit', shell: true }).on( + 'close', + (code: number) => { + if (code === 0) { + logger.info(colors.green(`Uninstalling packages for tooling via ${packageManager}.`)); + resolve(); + } else { + reject('Package uninstallation failed, see above.'); + } + }, + ); + }); +} diff --git a/packages/angular/cli/utilities/package-metadata.ts b/packages/angular/cli/utilities/package-metadata.ts index 0be552aa09a9..303468da908d 100644 --- a/packages/angular/cli/utilities/package-metadata.ts +++ b/packages/angular/cli/utilities/package-metadata.ts @@ -18,6 +18,8 @@ export interface PackageDependencies { [dependency: string]: string; } +export type NgAddSaveDepedency = 'dependencies' | 'devDependencies' | boolean; + export interface PackageIdentifier { type: 'git' | 'tag' | 'version' | 'range' | 'file' | 'directory' | 'remote'; name: string; @@ -39,8 +41,9 @@ export interface PackageManifest { devDependencies: PackageDependencies; peerDependencies: PackageDependencies; optionalDependencies: PackageDependencies; - - 'ng-add'?: {}; + 'ng-add'?: { + save?: NgAddSaveDepedency; + }; 'ng-update'?: { migrations: string; packageGroup: { [name: string]: string }; diff --git a/packages/angular/cli/utilities/package-tree.ts b/packages/angular/cli/utilities/package-tree.ts index afff17122046..48af91ceadab 100644 --- a/packages/angular/cli/utilities/package-tree.ts +++ b/packages/angular/cli/utilities/package-tree.ts @@ -5,6 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ + + +import { NgAddSaveDepedency } from './package-metadata'; + export interface PackageTreeNodeBase { name: string; path: string; @@ -22,6 +26,9 @@ export interface PackageTreeNodeBase { 'ng-update'?: { migrations?: string; }; + 'ng-add'?: { + save?: NgAddSaveDepedency; + }; }; parent?: PackageTreeNode; children: PackageTreeNode[]; diff --git a/packages/angular/pwa/package.json b/packages/angular/pwa/package.json index a9ef0a0996b6..7ccefc72d2be 100644 --- a/packages/angular/pwa/package.json +++ b/packages/angular/pwa/package.json @@ -9,6 +9,9 @@ "schematics" ], "schematics": "./collection.json", + "ng-add": { + "save": false + }, "dependencies": { "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0", diff --git a/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts b/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts new file mode 100644 index 000000000000..330297ec1866 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts @@ -0,0 +1,20 @@ +import { join } from 'path'; +import { expectFileToExist, expectFileToMatch, rimraf, readFile } from '../../../utils/fs'; +import { ng } from '../../../utils/process'; + +export default async function () { + // forcibly remove in case another test doesn't clean itself up + await rimraf('node_modules/@angular/pwa'); + + await ng('add', '@angular/pwa'); + + await expectFileToExist(join(process.cwd(), 'src/manifest.webmanifest')); + + // Angular PWA doesn't install as a dependency + const { dependencies, devDependencies } = JSON.parse(await readFile(join(process.cwd(), 'package.json'))); + const hasPWADep = Object.keys({ ...dependencies, ...devDependencies }) + .some(d => d === '@angular/pwa'); + if (hasPWADep) { + throw new Error(`Expected 'package.json' not to contain a dependency on '@angular/pwa'.`); + } +} From a7f977f05db3e82c346e266363786cf019859dd4 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 11 Oct 2019 12:47:04 +0200 Subject: [PATCH 0292/1070] feat(@schematics/angular): remove `@angular/pwa` from depedencies `@angular/pwa` is not needed as a dependency. This is because the pwa package is a schematic and is only used once when adding pwa capabilities to your application. After that, this package is not used anymore. Closes #15764 --- .../angular/migrations/update-8/update-dependencies.ts | 2 +- .../angular/migrations/update-9/update-dependencies.ts | 10 ++++++++-- packages/schematics/angular/utility/latest-versions.ts | 1 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/migrations/update-8/update-dependencies.ts b/packages/schematics/angular/migrations/update-8/update-dependencies.ts index 144b613a5818..e10c8707d67c 100644 --- a/packages/schematics/angular/migrations/update-8/update-dependencies.ts +++ b/packages/schematics/angular/migrations/update-8/update-dependencies.ts @@ -12,7 +12,7 @@ import { latestVersions } from '../../utility/latest-versions'; export function updateDependencies() { return (host: Tree) => { const dependenciesToUpdate: Record = { - '@angular/pwa': latestVersions.AngularPWA, + '@angular/pwa': '^0.803.9', '@angular-devkit/build-angular': latestVersions.DevkitBuildAngular, '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, '@angular-devkit/build-webpack': latestVersions.DevkitBuildWebpack, diff --git a/packages/schematics/angular/migrations/update-9/update-dependencies.ts b/packages/schematics/angular/migrations/update-9/update-dependencies.ts index 7413be942dcd..2e10c0026d8e 100644 --- a/packages/schematics/angular/migrations/update-9/update-dependencies.ts +++ b/packages/schematics/angular/migrations/update-9/update-dependencies.ts @@ -6,13 +6,16 @@ * found in the LICENSE file at https://angular.io/license */ import { Rule } from '@angular-devkit/schematics'; -import { addPackageJsonDependency, getPackageJsonDependency } from '../../utility/dependencies'; +import { + addPackageJsonDependency, + getPackageJsonDependency, + removePackageJsonDependency, +} from '../../utility/dependencies'; import { latestVersions } from '../../utility/latest-versions'; export function updateDependencies(): Rule { return host => { const dependenciesToUpdate: Record = { - '@angular/pwa': latestVersions.AngularPWA, '@angular-devkit/build-angular': latestVersions.DevkitBuildAngular, '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, '@angular-devkit/build-webpack': latestVersions.DevkitBuildWebpack, @@ -35,5 +38,8 @@ export function updateDependencies(): Rule { overwrite: true, }); } + + // `@angular/pwa` package is only needed when running `ng-add`. + removePackageJsonDependency(host, '@angular/pwa'); }; } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index da4dd38a1268..a579542d44cd 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -18,7 +18,6 @@ export const latestVersions = { DevkitBuildAngular: '~0.900.0-next.9', DevkitBuildNgPackagr: '~0.900.0-next.9', DevkitBuildWebpack: '~0.900.0-next.9', - AngularPWA: '~0.900.0-next.9', ngPackagr: '^5.5.1', }; From 27c3650d80c51d95b761b8e31c1d1641e115acf4 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 11 Oct 2019 15:32:34 +0100 Subject: [PATCH 0293/1070] feat(@angular-devkit/architect): support multiple configs in WorkspaceNodeModulesArchitectHost Add support for parsing multiple configurations in a single string using comma as a separator. This support is only at the host level (`WorkspaceNodeModulesArchitectHost` in this case) and does not change the underlying Architect API. Different hosts are able to compose target options in different ways. --- .../node/node-modules-architect-host.ts | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/architect/node/node-modules-architect-host.ts b/packages/angular_devkit/architect/node/node-modules-architect-host.ts index c78cd740648c..4a39e5a52596 100644 --- a/packages/angular_devkit/architect/node/node-modules-architect-host.ts +++ b/packages/angular_devkit/architect/node/node-modules-architect-host.ts @@ -100,16 +100,26 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost c.trim()); + for (const configuration of configurations) { + if (!(targetSpec['configurations'] && targetSpec['configurations'][configuration])) { + throw new Error(`Configuration '${configuration}' is not set in the workspace.`); + } else { + additionalOptions = { + ...additionalOptions, + ...targetSpec['configurations'][configuration], + }; + } + } } return { ...targetSpec['options'], - ...(target.configuration ? targetSpec['configurations'][target.configuration] : 0), + ...additionalOptions, }; } From 65c2a1965f1b2d40ee2d1175846fe25aed6c8033 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 11 Oct 2019 16:12:32 +0100 Subject: [PATCH 0294/1070] feat(@angular/cli): support using multiple configurations It's now possible to use multiple configurations by separating them with a comma: ``` ng build --configuration=one,two,three ``` They will be applied from left to right. If `--prod` is also present, it will be considered to be the first configuration and thus able to be overriden. You can also use it in target strings: ``` "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "latest-project:build:one,two" }, "configurations": { "production": { "browserTarget": "latest-project:build:production,one,two" } } ``` Fix https://github.com/angular/angular-cli/issues/10612 --- .../angular/cli/models/architect-command.ts | 9 ++- .../e2e/tests/build/multiple-configs.ts | 71 +++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 tests/legacy-cli/e2e/tests/build/multiple-configs.ts diff --git a/packages/angular/cli/models/architect-command.ts b/packages/angular/cli/models/architect-command.ts index 34bf24a76c2f..5e64a6bff178 100644 --- a/packages/angular/cli/models/architect-command.ts +++ b/packages/angular/cli/models/architect-command.ts @@ -366,10 +366,15 @@ export abstract class ArchitectCommand< } else { project = commandOptions.project; target = this.target; - configuration = commandOptions.configuration; - if (!configuration && commandOptions.prod) { + if (commandOptions.prod) { + // The --prod flag will always be the first configuration, available to be overwritten + // by following configurations. configuration = 'production'; } + if (commandOptions.configuration) { + configuration = + `${configuration ? `${configuration},` : ''}${commandOptions.configuration}`; + } } if (!project) { diff --git a/tests/legacy-cli/e2e/tests/build/multiple-configs.ts b/tests/legacy-cli/e2e/tests/build/multiple-configs.ts new file mode 100644 index 000000000000..50b15f03517d --- /dev/null +++ b/tests/legacy-cli/e2e/tests/build/multiple-configs.ts @@ -0,0 +1,71 @@ +import { expectFileToExist } from '../../utils/fs'; +import { ng } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; +import { expectToFail } from '../../utils/utils'; + +export default async function () { + await updateJsonFile('angular.json', workspaceJson => { + const appArchitect = workspaceJson.projects['test-project'].architect; + // These are the default options, that we'll overwrite in subsequent configs. + // extractCss defaults to false + // sourceMap defaults to true + appArchitect['options'] = { + outputPath: 'dist/latest-project', + index: 'src/index.html', + main: 'src/main.ts', + polyfills: 'src/polyfills.ts', + tsConfig: 'tsconfig.app.json', + assets: [ + 'src/favicon.ico', + 'src/assets', + ], + 'styles': [ + 'src/styles.css', + ], + 'scripts': [], + }; + const browserConfigs = appArchitect['build'].configurations; + browserConfigs['production'] = { + extractCss: true, + }; + browserConfigs['one'] = { + assets: [], + }; + browserConfigs['two'] = { + sourceMap: false, + }; + browserConfigs['three'] = { + extractCss: false, // Defaults to false when not set. + }; + }); + + // Test the base configuration. + await ng('build'); + await expectFileToExist('dist/test-project/favicon.ico'); + await expectFileToExist('dist/test-project/main-es2015.js.map'); + await expectFileToExist('dist/test-project/styles-es2015.js'); + await expectFileToExist('dist/test-project/vendor-es2015.js'); + // Test that --prod extracts css. + await ng('build', '--prod'); + await expectFileToExist('dist/test-project/styles.css'); + // But using a config overrides prod. + await ng('build', '--prod', '--configuration=three'); + await expectFileToExist('dist/test-project/styles-es2015.js'); + await expectToFail(() => expectFileToExist('dist/test-project/styles.css')); + // Use two configurations. + await ng('build', '--configuration=one,two', '--vendor-chunk=false'); + await expectToFail(() => expectFileToExist('dist/test-project/favicon.ico')); + await expectToFail(() => expectFileToExist('dist/test-project/main-es2015.js.map')); + // Use two configurations and two overrides, one of which overrides a config. + await ng('build', '--configuration=one,two', '--vendor-chunk=false', '--sourceMap=true'); + await expectToFail(() => expectFileToExist('dist/test-project/favicon.ico')); + await expectFileToExist('dist/test-project/main-es2015.js.map'); + await expectToFail(() => expectFileToExist('dist/test-project/vendor-es2015.js')); + // Use three configurations and a override, and prod at the end. + await ng('build', '--configuration=one,two,three', '--vendor-chunk=false', '--prod'); + await expectToFail(() => expectFileToExist('dist/test-project/favicon.ico')); + await expectToFail(() => expectFileToExist('dist/test-project/main-es2015.js.map')); + await expectToFail(() => expectFileToExist('dist/test-project/vendor-es2015.js')); + await expectFileToExist('dist/test-project/styles-es2015.js'); + await expectToFail(() => expectFileToExist('dist/test-project/styles.css')); +} From a1cf5f5b1e297ddf6e0fd246880964ee54907c31 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 12 Oct 2019 11:28:02 +0200 Subject: [PATCH 0295/1070] fix(@angular-devkit/build-webpack): proxy config with windows authentication It seems that this is causing issues with proxy config and IIS with Windows authentication, for now we remove the `ArchitectPlugin` since it's not being used. Fixes #14595 --- packages/angular_devkit/build_webpack/package.json | 3 +-- .../build_webpack/src/webpack-dev-server/index.ts | 10 ---------- .../angular_devkit/build_webpack/src/webpack/index.ts | 9 --------- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 8d78bfe3829d..b3b49aaad972 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -9,8 +9,7 @@ "dependencies": { "@angular-devkit/architect": "0.0.0", "@angular-devkit/core": "0.0.0", - "rxjs": "6.5.3", - "webpack-merge": "4.2.2" + "rxjs": "6.5.3" }, "peerDependencies": { "webpack": "^4.6.0", diff --git a/packages/angular_devkit/build_webpack/src/webpack-dev-server/index.ts b/packages/angular_devkit/build_webpack/src/webpack-dev-server/index.ts index c78b0c9da2f9..a61fae14aa2f 100644 --- a/packages/angular_devkit/build_webpack/src/webpack-dev-server/index.ts +++ b/packages/angular_devkit/build_webpack/src/webpack-dev-server/index.ts @@ -12,14 +12,10 @@ import { Observable, from, of } from 'rxjs'; import { switchMap } from 'rxjs/operators'; import * as webpack from 'webpack'; import * as WebpackDevServer from 'webpack-dev-server'; -import { ArchitectPlugin } from '../plugins/architect'; import { getEmittedFiles } from '../utils'; import { BuildResult, WebpackFactory, WebpackLoggingCallback } from '../webpack'; import { Schema as WebpackDevServerBuilderSchema } from './schema'; -const webpackMerge = require('webpack-merge'); - - export type DevServerBuildOutput = BuildResult & { port: number; family: string; @@ -39,12 +35,6 @@ export function runWebpackDevServer( const log: WebpackLoggingCallback = options.logging || ((stats, config) => context.logger.info(stats.toString(config.stats))); - config = webpackMerge(config, { - plugins: [ - new ArchitectPlugin(context), - ], - }); - const devServerConfig = options.devServerConfig || config.devServer || {}; if (devServerConfig.stats) { config.stats = devServerConfig.stats; diff --git a/packages/angular_devkit/build_webpack/src/webpack/index.ts b/packages/angular_devkit/build_webpack/src/webpack/index.ts index 0da60ee387f4..6daf93ef0f26 100644 --- a/packages/angular_devkit/build_webpack/src/webpack/index.ts +++ b/packages/angular_devkit/build_webpack/src/webpack/index.ts @@ -10,12 +10,9 @@ import { getSystemPath, json, normalize, resolve } from '@angular-devkit/core'; import { Observable, from, of } from 'rxjs'; import { switchMap } from 'rxjs/operators'; import * as webpack from 'webpack'; -import { ArchitectPlugin } from '../plugins/architect'; import { EmittedFiles, getEmittedFiles } from '../utils'; import { Schema as RealWebpackBuilderSchema } from './schema'; -const webpackMerge = require('webpack-merge'); - export type WebpackBuilderSchema = json.JsonObject & RealWebpackBuilderSchema; export interface WebpackLoggingCallback { @@ -42,12 +39,6 @@ export function runWebpack( const log: WebpackLoggingCallback = options.logging || ((stats, config) => context.logger.info(stats.toString(config.stats))); - config = webpackMerge(config, { - plugins: [ - new ArchitectPlugin(context), - ], - }); - return createWebpack(config).pipe( switchMap(webpackCompiler => new Observable(obs => { const callback: webpack.Compiler.Handler = (err, stats) => { From 5d9b20b49ceb5168a34ad696db21af7bb0eb9058 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 12 Oct 2019 15:19:11 +0200 Subject: [PATCH 0296/1070] refactor(@schematics/angular): remove redundant quotes from protractor options --- .../angular/e2e/files/protractor.conf.js.template | 2 +- .../hello-world-app-ve/protractor.conf.js | 2 +- .../e2e/assets/1.0-project/protractor.conf.js | 2 +- .../e2e/assets/1.7-project/protractor.conf.js | 2 +- .../e2e/assets/7.0-project/e2e/protractor.conf.js | 2 +- tests/legacy-cli/e2e/utils/project.ts | 12 ++++++------ 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/schematics/angular/e2e/files/protractor.conf.js.template b/packages/schematics/angular/e2e/files/protractor.conf.js.template index 73e4e6806cd6..7c798cfff07e 100644 --- a/packages/schematics/angular/e2e/files/protractor.conf.js.template +++ b/packages/schematics/angular/e2e/files/protractor.conf.js.template @@ -13,7 +13,7 @@ exports.config = { './src/**/*.e2e-spec.ts' ], capabilities: { - 'browserName': 'chrome' + browserName: 'chrome' }, directConnect: true, baseUrl: 'http://localhost:4200/', diff --git a/tests/angular_devkit/build_angular/hello-world-app-ve/protractor.conf.js b/tests/angular_devkit/build_angular/hello-world-app-ve/protractor.conf.js index 5ae5970f346e..82732dcf0770 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ve/protractor.conf.js +++ b/tests/angular_devkit/build_angular/hello-world-app-ve/protractor.conf.js @@ -17,7 +17,7 @@ exports.config = { './e2e/**/*.e2e-spec.ts' ], capabilities: { - 'browserName': 'chrome', + browserName: 'chrome', chromeOptions: { args: ['--headless', '--disable-gpu', '--window-size=800,600'], binary: require('puppeteer').executablePath() diff --git a/tests/legacy-cli/e2e/assets/1.0-project/protractor.conf.js b/tests/legacy-cli/e2e/assets/1.0-project/protractor.conf.js index c398ead76901..cdb43c5b4ab6 100644 --- a/tests/legacy-cli/e2e/assets/1.0-project/protractor.conf.js +++ b/tests/legacy-cli/e2e/assets/1.0-project/protractor.conf.js @@ -10,7 +10,7 @@ exports.config = { './e2e/**/*.e2e-spec.ts' ], capabilities: { - 'browserName': 'chrome' + browserName: 'chrome' }, directConnect: true, baseUrl: 'http://localhost:4200/', diff --git a/tests/legacy-cli/e2e/assets/1.7-project/protractor.conf.js b/tests/legacy-cli/e2e/assets/1.7-project/protractor.conf.js index 7a12a87a90a2..513957968bc5 100644 --- a/tests/legacy-cli/e2e/assets/1.7-project/protractor.conf.js +++ b/tests/legacy-cli/e2e/assets/1.7-project/protractor.conf.js @@ -10,7 +10,7 @@ exports.config = { './e2e/**/*.e2e-spec.ts' ], capabilities: { - 'browserName': 'chrome' + browserName: 'chrome' }, directConnect: true, baseUrl: 'http://localhost:4200/', diff --git a/tests/legacy-cli/e2e/assets/7.0-project/e2e/protractor.conf.js b/tests/legacy-cli/e2e/assets/7.0-project/e2e/protractor.conf.js index 86776a391a5b..fda004eb85fd 100644 --- a/tests/legacy-cli/e2e/assets/7.0-project/e2e/protractor.conf.js +++ b/tests/legacy-cli/e2e/assets/7.0-project/e2e/protractor.conf.js @@ -9,7 +9,7 @@ exports.config = { './src/**/*.e2e-spec.ts' ], capabilities: { - 'browserName': 'chrome' + browserName: 'chrome' }, directConnect: true, baseUrl: 'http://localhost:4200/', diff --git a/tests/legacy-cli/e2e/utils/project.ts b/tests/legacy-cli/e2e/utils/project.ts index 0d1720b765e9..a3fd823b83a4 100644 --- a/tests/legacy-cli/e2e/utils/project.ts +++ b/tests/legacy-cli/e2e/utils/project.ts @@ -258,8 +258,8 @@ export function useCIChrome(projectDir: string) { .then(() => { if (fs.existsSync(protractorConf)) { return replaceInFile(protractorConf, - `'browserName': 'chrome'`, - `'browserName': 'chrome', + `browserName: 'chrome'`, + `browserName: 'chrome', chromeOptions: { args: ['--headless'], binary: require('puppeteer').executablePath() @@ -275,11 +275,11 @@ export function useCIChrome(projectDir: string) { .then(() => replaceInFile(karmaConf, `browsers: ['Chrome']`, `browsers: ['Chrome'], - customLaunchers: { - ChromeHeadlessCI: { - base: 'ChromeHeadless', + customLaunchers: { + ChromeHeadlessCI: { + base: 'ChromeHeadless', + } } - } `)); } }); From b3086ffd54440f340b7f7457cbf1445ade10685e Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 12 Oct 2019 20:48:39 +0200 Subject: [PATCH 0297/1070] fix(@angular-devkit/build-angular): only copy assets outside of webpack when differential loading is needed in build builder Fixes #15825 --- .../src/angular-cli-files/models/webpack-configs/common.ts | 7 +------ packages/angular_devkit/build_angular/src/browser/index.ts | 5 ----- .../build_angular/src/utils/webpack-browser-config.ts | 2 ++ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 3bb39b216dd3..bf7fed90722b 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -40,8 +40,6 @@ const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const CircularDependencyPlugin = require('circular-dependency-plugin'); const TerserPlugin = require('terser-webpack-plugin'); -// tslint:disable-next-line:no-any -const g: any = typeof global !== 'undefined' ? global : {}; // tslint:disable-next-line:no-big-function export function getCommonConfig(wco: WebpackConfigOptions): Configuration { @@ -242,10 +240,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { } // process asset entries - if ( - buildOptions.assets && - (fullDifferential || buildOptions.watch || !differentialLoadingNeeded) - ) { + if (buildOptions.assets.length) { const copyWebpackPluginPatterns = buildOptions.assets.map((asset: AssetPatternClass) => { // Resolve input paths relative to workspace root and add slash at the end. asset.input = path.resolve(root, asset.input).replace(/\\/g, '/'); diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index ff5c3e892d1a..b6da933c4100 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -13,17 +13,14 @@ import { runWebpack, } from '@angular-devkit/build-webpack'; import { - getSystemPath, join, json, logging, normalize, - resolve, tags, virtualFs, } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { createHash } from 'crypto'; import * as findCacheDirectory from 'find-cache-dir'; import * as fs from 'fs'; import * as path from 'path'; @@ -81,9 +78,7 @@ import { import { BundleActionExecutor } from './action-executor'; import { Schema as BrowserBuilderSchema } from './schema'; -const cacache = require('cacache'); const cacheDownlevelPath = findCacheDirectory({ name: 'angular-build-dl' }); -const packageVersion = require('../../package.json').version; export type BrowserBuilderOutput = json.JsonObject & BuilderOutput & { diff --git a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts index 6b8d0ae94787..f2d89748515c 100644 --- a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts +++ b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts @@ -106,6 +106,8 @@ export async function generateWebpackConfig( } else if (differentialLoading && !fullDifferential) { buildOptions = { ...options, + // Under downlevel differential loading we copy the assets outside of webpack. + assets: [], esVersionInFileName: true, scriptTargetOverride: ts.ScriptTarget.ES5, es5BrowserSupport: undefined, From aeab0a0264747e5f6a9c02f75602ee590dbd18fe Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 14 Oct 2019 18:19:48 +0000 Subject: [PATCH 0298/1070] build: update webpack to version 4.41.1 --- packages/angular_devkit/build_angular/package.json | 2 +- packages/angular_devkit/build_webpack/package.json | 2 +- packages/ngtools/webpack/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 37de98f4b60b..735d341d63cf 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -57,7 +57,7 @@ "tree-kill": "1.2.1", "terser": "4.3.8", "terser-webpack-plugin": "2.1.3", - "webpack": "4.41.0", + "webpack": "4.41.1", "webpack-dev-middleware": "3.7.2", "webpack-dev-server": "3.8.2", "webpack-merge": "4.2.2", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index b3b49aaad972..1dc1d3f3c372 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -16,7 +16,7 @@ "webpack-dev-server": "^3.1.4" }, "devDependencies": { - "webpack": "4.41.0", + "webpack": "4.41.1", "webpack-dev-server": "^3.1.4" } } diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 3c1000eb3a1d..6a278fcbbfa8 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -36,6 +36,6 @@ "@angular/compiler": "9.0.0-next.10", "@angular/compiler-cli": "9.0.0-next.10", "typescript": "3.5.3", - "webpack": "4.41.0" + "webpack": "4.41.1" } } diff --git a/yarn.lock b/yarn.lock index 937c4c02e210..4e8e3c3bc2c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11005,10 +11005,10 @@ webpack-subresource-integrity@1.3.4: dependencies: webpack-sources "^1.3.0" -webpack@4.41.0: - version "4.41.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.0.tgz#db6a254bde671769f7c14e90a1a55e73602fc70b" - integrity sha512-yNV98U4r7wX1VJAj5kyMsu36T8RPPQntcb5fJLOsMz/pt/WrKC0Vp1bAlqPLkA1LegSwQwf6P+kAbyhRKVQ72g== +webpack@4.41.1: + version "4.41.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.1.tgz#5388dd3047d680d5d382a84249fd4750e87372fd" + integrity sha512-ak7u4tUu/U63sCVxA571IuPZO/Q0pZ9cEXKg+R/woxkDzVovq57uB6L2Hlg/pC8LCU+TWpvtcYwsstivQwMJmw== dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" From 3847001bc1e595e06064fa01d968b7eddd56ed17 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 14 Oct 2019 18:19:22 +0000 Subject: [PATCH 0299/1070] build: update core-js to version 3.3.2 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 735d341d63cf..ac12e629e953 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -22,7 +22,7 @@ "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", - "core-js": "3.2.1", + "core-js": "3.3.2", "file-loader": "4.2.0", "find-cache-dir": "3.0.0", "glob": "7.1.4", diff --git a/yarn.lock b/yarn.lock index 4e8e3c3bc2c0..c25cba38026f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3350,16 +3350,21 @@ core-js-compat@^3.1.1: browserslist "^4.6.6" semver "^6.3.0" -core-js@3.2.1, core-js@^3.1.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09" - integrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw== +core-js@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.2.tgz#cd42da1d7b0bb33ef11326be3a721934277ceb42" + integrity sha512-S1FfZpeBchkhyoY76YAdFzKS4zz9aOK7EeFaNA2aJlyXyA+sgqz6xdxmLPGXEAf0nF44MVN1kSjrA9Kt3ATDQg== core-js@^2.4.0: version "2.6.9" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== +core-js@^3.1.3: + version "3.2.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09" + integrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" From d3518a1abc7f75a7f13c6ab2b01546c30ae4cc78 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 14 Oct 2019 18:19:34 +0000 Subject: [PATCH 0300/1070] build: update license-webpack-plugin to version 2.1.3 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ac12e629e953..2c603cbcc10d 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -31,7 +31,7 @@ "karma-source-map-support": "1.4.0", "less": "3.10.3", "less-loader": "5.0.0", - "license-webpack-plugin": "2.1.2", + "license-webpack-plugin": "2.1.3", "loader-utils": "1.2.3", "mini-css-extract-plugin": "0.8.0", "minimatch": "3.0.4", diff --git a/yarn.lock b/yarn.lock index c25cba38026f..f8c702360c60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6518,10 +6518,10 @@ license-checker@^20.1.0: strip-ansi "^4.0.0" treeify "^1.1.0" -license-webpack-plugin@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/license-webpack-plugin/-/license-webpack-plugin-2.1.2.tgz#63f7c571537a450ec47dc98f5d5ffdbca7b3b14f" - integrity sha512-7poZHRla+ae0eEButlwMrPpkXyhNVBf2EHePYWT0jyLnI6311/OXJkTI2sOIRungRpQgU2oDMpro5bSFPT5F0A== +license-webpack-plugin@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/license-webpack-plugin/-/license-webpack-plugin-2.1.3.tgz#656fa6a8b2e711ee35c27ac8e1659a87240ef7f3" + integrity sha512-vTSY5r9HOq4sxR2BIxdIXWKI+9n3b+DoQkhKHedB3TdSxTfXUDRxKXdAj5iejR+qNXprXsxvEu9W+zOhgGIkAw== dependencies: "@types/webpack-sources" "^0.1.5" webpack-sources "^1.2.0" From 2a78706f1a2b10a71304c8d0ffc3db0c05bbd959 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 14 Oct 2019 18:19:09 +0000 Subject: [PATCH 0301/1070] build: update autoprefixer to version 9.6.5 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 2c603cbcc10d..53ecb347ffc8 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -15,7 +15,7 @@ "@babel/preset-env": "7.6.3", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", - "autoprefixer": "9.6.4", + "autoprefixer": "9.6.5", "browserslist": "4.7.0", "cacache": "13.0.1", "caniuse-lite": "1.0.30000999", diff --git a/yarn.lock b/yarn.lock index f8c702360c60..9951c710f00d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2094,7 +2094,20 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.6.4, autoprefixer@^9.6.0: +autoprefixer@9.6.5: + version "9.6.5" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.5.tgz#98f4afe7e93cccf323287515d426019619775e5e" + integrity sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g== + dependencies: + browserslist "^4.7.0" + caniuse-lite "^1.0.30000999" + chalk "^2.4.2" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.18" + postcss-value-parser "^4.0.2" + +autoprefixer@^9.6.0: version "9.6.4" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.4.tgz#e6453be47af316b2923eaeaed87860f52ad4b7eb" integrity sha512-Koz2cJU9dKOxG8P1f8uVaBntOv9lP4yz9ffWvWaicv9gHBPhpQB22nGijwd8gqW9CNT+UdkbQOQNLVI8jN1ZfQ== @@ -2723,7 +2736,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000999, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998: +caniuse-lite@1.0.30000999, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998, caniuse-lite@^1.0.30000999: version "1.0.30000999" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== From c19583057a5cac5766e77aaf7296d6fac63db8d8 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 15 Oct 2019 00:01:56 +0000 Subject: [PATCH 0302/1070] build: update to version --- yarn.lock | 324 +++++++++++++++++++++--------------------------------- 1 file changed, 124 insertions(+), 200 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9951c710f00d..f6ba26bc6171 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,7 +122,7 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.6.4": +"@babel/core@7.6.4", "@babel/core@^7.5.5": version "7.6.4" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.4.tgz#6ebd9fe00925f6c3e177bb726a188b5f578088ff" integrity sha512-Rm0HGw101GY8FTzpWSyRbki/jzq+/PkNQJ+nSulrdY6gFGOsNseCqD6KHRYe2E+EdzuBdr2pxCp6s4Uk6eJ+XQ== @@ -142,47 +142,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.5.5": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.3.tgz#44de824e89eaa089bb12da7337bc9bdff2ab68f9" - integrity sha512-QfQ5jTBgXLzJuo7Mo8bZK/ePywmgNRgk/UQykiKwEtZPiFIn8ZqE6jB+AnD1hbB1S2xQyL4//it5vuAUOVAMTw== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.3" - "@babel/helpers" "^7.6.2" - "@babel/parser" "^7.6.3" - "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.3" - "@babel/types" "^7.6.3" - convert-source-map "^1.1.0" - debug "^4.1.0" - json5 "^2.1.0" - lodash "^4.17.13" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.6.1" - -"@babel/generator@^7.4.0", "@babel/generator@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.2.tgz#dac8a3c2df118334c2a29ff3446da1636a8f8c03" - integrity sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ== - dependencies: - "@babel/types" "^7.6.0" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - -"@babel/generator@^7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.3.tgz#71d5375264f93ec7bac7d9f35a67067733f5578e" - integrity sha512-hLhYbAb3pHwxjlijC4AQ7mqZdcoujiNaW7izCT04CIowHK8psN0IN8QjDv0iyFtycF5FowUOTwDloIheI25aMw== - dependencies: - "@babel/types" "^7.6.3" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.6.1" - -"@babel/generator@^7.6.4": +"@babel/generator@^7.4.0", "@babel/generator@^7.6.3", "@babel/generator@^7.6.4": version "7.6.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" integrity sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w== @@ -365,17 +325,7 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.2.tgz#205e9c95e16ba3b8b96090677a67c9d6075b70a1" - integrity sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg== - -"@babel/parser@^7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.3.tgz#9eff8b9c3eeae16a74d8d4ff30da2bd0d6f0487e" - integrity sha512-sUZdXlva1dt2Vw2RqbMkmfoImubO0D0gaCrNngV6Hi0DA4x3o4mlrq0tbfY0dZEUIccH8I6wQ4qgEtwcpOR6Qg== - -"@babel/parser@^7.6.4": +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.3", "@babel/parser@^7.6.4": version "7.6.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" integrity sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A== @@ -768,9 +718,9 @@ semver "^5.5.0" "@babel/runtime@^7.5.5": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.2.tgz#c3d6e41b304ef10dcf13777a33e7694ec4a9a6dd" - integrity sha512-EXxN64agfUqqIGeEjI5dL5z0Sw0ZwWo1mLTi4mQowCZ42O59b7DRpZAnTC6OqdF28wMBMFKNb/4uFGrVaigSpg== + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.3.tgz#935122c74c73d2240cafd32ddb5fc2a6cd35cf1f" + integrity sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA== dependencies: regenerator-runtime "^0.13.2" @@ -783,22 +733,7 @@ "@babel/parser" "^7.6.0" "@babel/types" "^7.6.0" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.2.tgz#b0e2bfd401d339ce0e6c05690206d1e11502ce2c" - integrity sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.2" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.6.2" - "@babel/types" "^7.6.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/traverse@^7.6.3": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.2", "@babel/traverse@^7.6.3": version "7.6.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.3.tgz#66d7dba146b086703c0fb10dd588b7364cec47f9" integrity sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw== @@ -813,16 +748,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" - integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - -"@babel/types@^7.6.3": +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0", "@babel/types@^7.6.3": version "7.6.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.3.tgz#3f07d96f854f98e2fbd45c64b0cb942d11e8ba09" integrity sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA== @@ -882,9 +808,9 @@ "@bazel/buildifier-win32_x64" "0.29.0" "@bazel/hide-bazel-files@latest": - version "0.38.1" - resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.1.tgz#a2447e04775de262290adf3afa533d4472a75641" - integrity sha512-9psDbiOS53tdHSpVVhxf01aBHjdOOwljAkJdleuAPhGif/jl2GrAfVXcSSgmMogeTlDT1xMG24sryPxn7M/3Zw== + version "0.38.3" + resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.3.tgz#e98231d3d360d51860d9c1a7c3345b40dab4cf81" + integrity sha512-o+dNkfDm3qxWQ8h/04cWuTcjR7qnjZi3pQGv4aklVb16oPWx2jF8BzbkwvWuIkdbOl9VnqYP0vaHzwQVJRRcIA== "@bazel/jasmine@0.37.1": version "0.37.1" @@ -1034,9 +960,9 @@ "@babel/types" "^7.3.0" "@types/bluebird@*": - version "3.5.27" - resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.27.tgz#61eb4d75dc6bfbce51cf49ee9bbebe941b2cb5d0" - integrity sha512-6BmYWSBea18+tSjjSC3QIyV93ZKAeNWGM7R6aYt1ryTZXrlHF+QLV0G2yV0viEGVyRkyQsWfMoJ0k/YghBX5sQ== + version "3.5.28" + resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.28.tgz#04c1a520ff076649236bc8ca21198542ce2bdb09" + integrity sha512-0Vk/kqkukxPKSzP9c8WJgisgGDx5oZDbsLLWIP5t70yThO/YleE+GEm2S1GlRALTaack3O7U5OS5qEm7q2kciA== "@types/body-parser@*": version "1.17.1" @@ -1168,9 +1094,9 @@ "@types/through" "*" "@types/jasmine@~3.4.0": - version "3.4.2" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.2.tgz#49f672de24043b3c1fb919901fd3cd36f027bc93" - integrity sha512-SaSSGOzwUnBEn64c+HTyVTJhRf8F1CXZLnxYx2ww3UrgGBmEEw38RSux2l3fYiT9brVLP67DU5omWA6V9OHI5Q== + version "3.4.4" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.4.tgz#be3fbd73e72725edb44e6f7f509cd52912d1550c" + integrity sha512-+/sHcTPyDS1JQacDRRRWb+vNrjBwnD+cKvTaWlxlJ/uOOFvzCkjOwNaqVjYMLfsjzNi0WtDH9RyReDXPG1Cdug== "@types/karma@^3.0.2": version "3.0.3" @@ -1217,9 +1143,9 @@ "@types/node" "*" "@types/node@*": - version "12.7.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.11.tgz#be879b52031cfb5d295b047f5462d8ef1a716446" - integrity sha512-Otxmr2rrZLKRYIybtdG/sgeO+tHY20GxeDjcGmUnmmlCWyEnv2a2x1ZXBo3BTec4OiTXMQCiazB8NMBf0iRlFw== + version "12.7.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.12.tgz#7c6c571cc2f3f3ac4a59a5f2bd48f5bdbc8653cc" + integrity sha512-KPYGmfD0/b1eXurQ59fXD1GBzhSQfz6/lKBxkaHX9dKTzjXbK68Zt7yGUxUsCS1jeTy/8aL+d9JEr+S54mpkWQ== "@types/node@10.12.30": version "10.12.30" @@ -1227,9 +1153,9 @@ integrity sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q== "@types/node@^10.1.0": - version "10.14.20" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.20.tgz#c4378d9d6a62faa5c9aafffc3d726b5a1e7367c6" - integrity sha512-An+MXSV8CGXz/BO9C1KKsoJ/8WDrvlNUaRMsm2h+IHZuSyQkM8U5bJJkb8ItLKA73VePG/nUK+t+EuW2IWuhsQ== + version "10.14.21" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.21.tgz#4a9db7ef1d1671c0015e632c5fa3d46c86c58c1e" + integrity sha512-nuFlRdBiqbF+PJIEVxm2jLFcQWN7q7iWEJGsBV4n7v1dbI9qXB8im2pMMKMCUZe092sQb5SQft2DHfuQGK5hqQ== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1456,9 +1382,9 @@ source-map "^0.6.1" "@types/webpack@*", "@types/webpack@^4.32.1": - version "4.39.2" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.2.tgz#fcaa85607a9bdd0e8f86a350f239ff08aede8584" - integrity sha512-3c7+vcmyyIi3RBoOdXs8k3E9rQVIy6yOBqK0DFk6lnJ76JUfbDBWbEf1JflzyPQf56W4ToE+2YPnbxbucniW5w== + version "4.39.3" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.3.tgz#1d55f8fce117a325368bf7612950552ee4ed4467" + integrity sha512-afGNNuTfKk1YfHrQ+IwF0QhDkSSMIMMt8BRRErTKaGVvWTMABDjT22/4kJ4bRoSzir9LVgxuuceyZ4Z5I82Cyg== dependencies: "@types/anymatch" "*" "@types/node" "*" @@ -1699,7 +1625,7 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abstract-leveldown@^6.1.1, abstract-leveldown@~6.2.1: +abstract-leveldown@^6.2.1, abstract-leveldown@~6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.1.tgz#37b655151e13c3d9b20fa3a04ce63ccaa345fce4" integrity sha512-zUgomHedGBCThDkUtc1bfilu2jEhRZ7Dk3RePhtMma/akw7UK2Upm2R5Dd8ynRBEt3uscwbWO0VQNx22/7RtWg== @@ -2094,7 +2020,7 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.6.5: +autoprefixer@9.6.5, autoprefixer@^9.6.0: version "9.6.5" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.5.tgz#98f4afe7e93cccf323287515d426019619775e5e" integrity sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g== @@ -2107,19 +2033,6 @@ autoprefixer@9.6.5: postcss "^7.0.18" postcss-value-parser "^4.0.2" -autoprefixer@^9.6.0: - version "9.6.4" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.4.tgz#e6453be47af316b2923eaeaed87860f52ad4b7eb" - integrity sha512-Koz2cJU9dKOxG8P1f8uVaBntOv9lP4yz9ffWvWaicv9gHBPhpQB22nGijwd8gqW9CNT+UdkbQOQNLVI8jN1ZfQ== - dependencies: - browserslist "^4.7.0" - caniuse-lite "^1.0.30000998" - chalk "^2.4.2" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.18" - postcss-value-parser "^4.0.2" - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2479,7 +2392,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.0, browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.6.6, browserslist@^4.7.0: +browserslist@4.7.0, browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== @@ -2736,7 +2649,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000999, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000998, caniuse-lite@^1.0.30000999: +caniuse-lite@1.0.30000999, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000999: version "1.0.30000999" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== @@ -2990,15 +2903,20 @@ combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commander@2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== + commander@3.0.2, commander@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== -commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.0: - version "2.20.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.1.tgz#3863ce3ca92d0831dcf2a102f5fb4b5926afd0f9" - integrity sha512-cCuLsMhJeWQ/ZpsFTbE765kvVfoeSddc4nU3up4fV+fDBcfUXnbITJ+JzhkdjzOqhURjZgujxaioam4RM9yGUg== +commander@^2.11.0, commander@^2.12.1, commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== common-tags@^1.8.0: version "1.8.0" @@ -3278,16 +3196,16 @@ conventional-commits-parser@^2.1.7: trim-off-newlines "^1.0.0" conventional-commits-parser@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz#fe1c49753df3f98edb2285a5e485e11ffa7f2e4c" - integrity sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg== + version "3.0.5" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.5.tgz#df471d6cb3f6fecfd1356ac72e0b577dbdae0a9c" + integrity sha512-qVz9+5JwdJzsbt7JbJ6P7NOXBGt8CyLFJYSjKAuPSgO+5UGfcsbk9EMR+lI8Unlvx6qwIc2YDJlrGIfay2ehNA== dependencies: JSONStream "^1.0.4" - is-text-path "^1.0.0" + is-text-path "^2.0.0" lodash "^4.2.1" meow "^4.0.0" split2 "^2.0.0" - through2 "^2.0.0" + through2 "^3.0.0" trim-off-newlines "^1.0.0" convert-source-map@^1.1.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1: @@ -3356,27 +3274,22 @@ copy-webpack-plugin@5.0.4: webpack-log "^2.0.0" core-js-compat@^3.1.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.2.1.tgz#0cbdbc2e386e8e00d3b85dc81c848effec5b8150" - integrity sha512-MwPZle5CF9dEaMYdDeWm73ao/IflDH+FjeJCWEADcEgFSE9TLimFKwJsfmkwzI8eC0Aj0mgvMDjeQjrElkz4/A== + version "3.3.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.3.2.tgz#1096c989c1b929ede06b5b6b4768dc4439078c03" + integrity sha512-gfiK4QnNXhnnHVOIZst2XHdFfdMTPxtR0EGs0TdILMlGIft+087oH6/Sw2xTTIjpWXC9vEwsJA8VG3XTGcmO5g== dependencies: - browserslist "^4.6.6" + browserslist "^4.7.0" semver "^6.3.0" -core-js@3.3.2: +core-js@3.3.2, core-js@^3.1.3: version "3.3.2" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.2.tgz#cd42da1d7b0bb33ef11326be3a721934277ceb42" integrity sha512-S1FfZpeBchkhyoY76YAdFzKS4zz9aOK7EeFaNA2aJlyXyA+sgqz6xdxmLPGXEAf0nF44MVN1kSjrA9Kt3ATDQg== core-js@^2.4.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" - integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== - -core-js@^3.1.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09" - integrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw== + version "2.6.10" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" + integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -3975,9 +3888,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.247: - version "1.3.277" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.277.tgz#38b7b297f9b3f67ea900a965c1b11a555de526ec" - integrity sha512-Czmsrgng89DOgJlIknnw9bn5431QdtnUwGp5YYiPwU1DbZQUxCLF+rc1ZC09VNAdalOPcvH6AE8BaA0H5HjI/w== + version "1.3.282" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.282.tgz#16118ae9c79a32ea93a17591d5b16e28d10fc08d" + integrity sha512-irSaDeCGgfMu1OA30bhqIBr+dx+pDJjRbwCpob7YWqVZbzXblybNzPGklVnWqv4EXxbkEAzQYqiNCqNTgu00lQ== elliptic@^6.0.0: version "6.5.1" @@ -4012,12 +3925,12 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding-down@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.2.0.tgz#7ca52446dac6e0fd09ad3584a7359809ea1a4844" - integrity sha512-XlIoQMBMbU4aE01uSKpAix0sXBJWK8YPhuOdvKa1CroThZyUpj0zWzt+bbe7g1KWsdhNFFzHkQHSdDymVtpJ1w== +encoding-down@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" + integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== dependencies: - abstract-leveldown "^6.1.1" + abstract-leveldown "^6.2.1" inherits "^2.0.3" level-codec "^9.0.0" level-errors "^2.0.0" @@ -4076,7 +3989,7 @@ engine.io@~3.2.0: engine.io-parser "~2.1.0" ws "~3.3.1" -enhanced-resolve@4.1.1: +enhanced-resolve@4.1.1, enhanced-resolve@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== @@ -4085,15 +3998,6 @@ enhanced-resolve@4.1.1: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" - integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - tapable "^1.0.0" - ent@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" @@ -4728,9 +4632,9 @@ fsevents@^1.2.7: node-pre-gyp "^0.12.0" fsevents@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.0.tgz#ce1a5f9ac71c6d75278b0c5bd236d7dfece4cbaa" - integrity sha512-+iXhW3LuDQsno8dOIrCIT/CBjeBWuP7PXe8w9shnj9Lebny/Gx1ZjVBYwexLz36Ri2jKuXMNpV6CYNh8lHHgrQ== + version "2.1.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.1.tgz#74c64e21df71721845d0c44fe54b7f56b82995a9" + integrity sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw== function-bind@^1.1.1: version "1.1.1" @@ -4837,15 +4741,15 @@ git-raw-commits@^1.3.6: through2 "^2.0.0" git-raw-commits@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" - integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.2.tgz#0ffdb5881e1f9d1ed73edbda47389614543afb99" + integrity sha512-HVvl6J3dx7CS9fWTtyZXA2ejhdq9p/GSU9EEVlJPb2pSgMuD7IWK3dERcUPsJj9SZrJJ6IIB+3Rsjx9FUDdE1Q== dependencies: dargs "^4.0.1" lodash.template "^4.0.2" meow "^4.0.0" split2 "^2.0.0" - through2 "^2.0.0" + through2 "^3.0.0" git-remote-origin-url@^2.0.0: version "2.0.0" @@ -5011,9 +4915,9 @@ handlebars@4.3.1: uglify-js "^3.1.4" handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.1.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.2.tgz#8810a9821a9d6d52cb2f57d326d6ce7c3dfe741d" - integrity sha512-cIv17+GhL8pHHnRJzGu2wwcthL5sb8uDKBHvZ2Dtu5s1YNt0ljbzKbamnc+gr69y7bzwQiBdr5+hOpRd5pnOdg== + version "4.4.3" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.3.tgz#180bae52c1d0e9ec0c15d7e82a4362d662762f6e" + integrity sha512-B0W4A2U1ww3q7VVthTKfh+epHx+q4mCt6iK+zEAzbMBpWQAwxCeKxEGpj/1oQTpzPXDNSOG7hmG14TsISH50yw== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -5150,9 +5054,9 @@ hmac-drbg@^1.0.0: minimalistic-crypto-utils "^1.0.1" hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: - version "2.8.4" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" - integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== + version "2.8.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" + integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== hpack.js@^2.1.6: version "2.1.6" @@ -5318,9 +5222,9 @@ iferr@^0.1.5: integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= ignore-walk@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.2.tgz#99d83a246c196ea5c93ef9315ad7b0819c35069b" - integrity sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw== + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== dependencies: minimatch "^3.0.4" @@ -5793,6 +5697,13 @@ is-text-path@^1.0.0: dependencies: text-extensions "^1.0.0" +is-text-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-2.0.0.tgz#b2484e2b720a633feb2e85b67dc193ff72c75636" + integrity sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw== + dependencies: + text-extensions "^2.0.0" + is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -6462,17 +6373,17 @@ level-js@^4.0.0: typedarray-to-buffer "~3.1.5" level-packager@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.0.3.tgz#e22bc9887663d0808ab092453d691bc319b7e5a2" - integrity sha512-Ut62o3nvUNCxYldM5+13+0sYow6ifKj2C26/0ToB7zKgdypF5wRKcVkcztQVwsQi+ZnrmDzhimp7FKP5Ynv6Rg== + version "5.1.0" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.0.tgz#9c01c6c8e2380d3196d61e56bd79c2eff4a9d5c3" + integrity sha512-3pbJmDgGvp/lUQNULPoYQZtUbhMI8KoViYDw7Sa0kWl1mPeHWWJF7T/9upWI/NTMuEikkEE/cd6wBvmrW1+ZnQ== dependencies: - encoding-down "^6.2.0" - levelup "^4.2.0" + encoding-down "^6.3.0" + levelup "^4.3.2" level-supports@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.0.tgz#376f3f2339c23be0ba2fe62b0fa0e3ac7d6d9988" - integrity sha512-01PKZumFhgysuHUbRz4c9DyA1egmcHJBAsZbm0Vf5agojC3uWOvAnhOD4swNUgHlfJBymXLi/xkBaEckeNRSvA== + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" + integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== dependencies: xtend "^4.0.2" @@ -6495,7 +6406,7 @@ leveldown@^5.0.0: napi-macros "~2.0.0" node-gyp-build "~4.1.0" -levelup@^4.2.0: +levelup@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.3.2.tgz#31c5b1b29f146d1d35d692e01a6da4d28fa55ebd" integrity sha512-cRTjU4ktWo59wf13PHEiOayHC3n0dOh4i5+FHr4tv4MX9+l7mqETicNq3Aj07HKlLdk0z5muVoDL2RD+ovgiyA== @@ -6610,9 +6521,9 @@ locate-path@^5.0.0: p-locate "^4.1.0" lockfile-lint-api@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lockfile-lint-api/-/lockfile-lint-api-2.0.0.tgz#36a01a24d94f6c5647b0630163d6bf7af3c9b10e" - integrity sha512-rnOaKGpCHr/Cfz44ADzJa9fxAzTHCJn83tS/xH/7tIqeKN57AZFrpo0jg7Ma0lVrcjeh95nJv+jTMF6aSu4JVw== + version "2.1.3" + resolved "https://registry.yarnpkg.com/lockfile-lint-api/-/lockfile-lint-api-2.1.3.tgz#1c3421c68279e360ea55737f48d9fb357749b1d9" + integrity sha512-UB6HQv2r3D4opC9rw/pO8c9kD/o2ZmZ8wf1KSYEgmIUfDRXXorcHXc4ur0NvFvogsNvJx7/0jm4vv9DSJUQ6aA== dependencies: "@yarnpkg/lockfile" "^1.1.0" debug "^4.1.0" @@ -6912,7 +6823,7 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memory-fs@^0.4.0, memory-fs@^0.4.1: +memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= @@ -7392,9 +7303,9 @@ node-pre-gyp@^0.12.0: tar "^4" node-releases@^1.1.29: - version "1.1.34" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.34.tgz#ced4655ee1ba9c3a2c5dcbac385e19434155fd40" - integrity sha512-fNn12JTEfniTuCqo0r9jXgl44+KxRH/huV7zM/KAGOKxDKrHr6EbT7SSs4B+DNxyBE2mks28AD+Jw6PkfY5uwA== + version "1.1.35" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.35.tgz#32a74a3cd497aa77f23d509f483475fd160e4c48" + integrity sha512-JGcM/wndCN/2elJlU0IGdVEJQQnJwsLbgPCFd2pY7V0mxf17bZ0Gb/lgOtL29ZQhvEX5shnVhxQyZz3ex94N8w== dependencies: semver "^6.3.0" @@ -7471,9 +7382,9 @@ npm-package-arg@6.1.1, "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", n validate-npm-package-name "^3.0.0" npm-packlist@^1.1.12, npm-packlist@^1.1.6: - version "1.4.4" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.4.tgz#866224233850ac534b63d1a6e76050092b5d2f44" - integrity sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw== + version "1.4.6" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.6.tgz#53ba3ed11f8523079f1457376dd379ee4ea42ff4" + integrity sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -8688,7 +8599,7 @@ read-pkg@^5.0.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6, readable-stream@^3.4.0: +"readable-stream@2 || 3", readable-stream@^3.0.6, readable-stream@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== @@ -9200,6 +9111,7 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" + uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: @@ -10210,6 +10122,11 @@ text-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== +text-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-2.0.0.tgz#43eabd1b495482fae4a2bf65e5f56c29f69220f6" + integrity sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ== + through2@^2.0.0, through2@^2.0.2, through2@^2.0.3, through2@~2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -10218,15 +10135,22 @@ through2@^2.0.0, through2@^2.0.2, through2@^2.0.3, through2@~2.0.3: readable-stream "~2.3.6" xtend "~4.0.1" +through2@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + dependencies: + readable-stream "2 || 3" + through@2, "through@>=2.2.7 <3", through@X.X.X, through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= thunky@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.3.tgz#f5df732453407b09191dae73e2a8cc73f381a826" - integrity sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow== + version "1.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== timers-browserify@^2.0.4: version "2.0.11" @@ -10523,11 +10447,11 @@ typescript@3.5.3: integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g== uglify-js@^3.1.4: - version "3.6.0" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" - integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg== + version "3.6.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.1.tgz#ae7688c50e1bdcf2f70a0e162410003cf9798311" + integrity sha512-+dSJLJpXBb6oMHP+Yvw8hUgElz4gLTh82XuX68QiJVTXaE5ibl6buzhNkQdYhBlIhozWOC9ge16wyRmjG4TwVQ== dependencies: - commander "~2.20.0" + commander "2.20.0" source-map "~0.6.1" ultron@~1.1.0: From 38947d8643f22b81759662cf35d00e16041db83e Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 15 Oct 2019 08:28:51 +0200 Subject: [PATCH 0303/1070] refactor(@angular-devkit/build-angular): remove differential loading version 1.0 --- .../angular-cli-files/models/build-options.ts | 4 +- .../models/webpack-configs/common.ts | 33 ++--- .../models/webpack-configs/typescript.ts | 5 - .../build_angular/src/browser/index.ts | 67 +++------ .../build_angular/src/dev-server/index.ts | 2 +- .../build_angular/src/extract-i18n/index.ts | 2 +- .../build_angular/src/karma/index.ts | 2 +- .../build_angular/src/server/index.ts | 2 +- .../src/utils/build-browser-features.ts | 6 - .../src/utils/webpack-browser-config.ts | 130 +++++++----------- 10 files changed, 88 insertions(+), 165 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts index 4d5730648ca9..57d7725906ef 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts @@ -86,9 +86,6 @@ export interface BuildOptions { /* Append script target version to filename. */ esVersionInFileName?: boolean; - /* When specified it will be used instead of the script target in the tsconfig.json. */ - scriptTargetOverride?: ScriptTarget; - experimentalRollupPass?: boolean; } @@ -106,4 +103,5 @@ export interface WebpackConfigOptions { tsConfig: ParsedConfiguration; tsConfigPath: string; supportES2015: boolean; + differentialLoadingMode?: boolean; } diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index bf7fed90722b..385963f807ce 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -25,7 +25,7 @@ import { } from 'webpack'; import { RawSource } from 'webpack-sources'; import { AssetPatternClass, ExtraEntryPoint } from '../../../browser/schema'; -import { BuildBrowserFeatures, fullDifferential } from '../../../utils'; +import { BuildBrowserFeatures } from '../../../utils'; import { manglingDisabled } from '../../../utils/mangle-options'; import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; @@ -62,7 +62,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { const entryPoints: { [key: string]: string[] } = {}; const targetInFileName = getEsVersionForFileName( - fullDifferential ? buildOptions.scriptTargetOverride : tsConfig.options.target, + tsConfig.options.target, buildOptions.esVersionInFileName, ); @@ -114,16 +114,14 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { } } - let differentialLoadingNeeded = false; + const differentialLoadingMode = !!wco.differentialLoadingMode; if (wco.buildOptions.platform !== 'server') { - const buildBrowserFeatures = new BuildBrowserFeatures( - projectRoot, - tsConfig.options.target || ScriptTarget.ES5, - ); - - differentialLoadingNeeded = buildBrowserFeatures.isDifferentialLoadingNeeded(); + if (differentialLoadingMode || tsConfig.options.target === ScriptTarget.ES5) { + const buildBrowserFeatures = new BuildBrowserFeatures( + projectRoot, + tsConfig.options.target || ScriptTarget.ES5, + ); - if ((buildOptions.scriptTargetOverride || tsConfig.options.target) === ScriptTarget.ES5) { if ( buildOptions.es5BrowserSupport || (buildOptions.es5BrowserSupport === undefined && buildBrowserFeatures.isEs5SupportNeeded()) @@ -141,26 +139,21 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { : [noModuleScript]; } - // For full build differential loading we don't need to generate a seperate polyfill file - // because they will be loaded exclusivly based on module and nomodule - const polyfillsChunkName = - fullDifferential && differentialLoadingNeeded ? 'polyfills' : 'polyfills-es5'; - + const polyfillsChunkName = 'polyfills-es5'; entryPoints[polyfillsChunkName] = [path.join(__dirname, '..', 'es5-polyfills.js')]; - if (!fullDifferential && differentialLoadingNeeded) { + if (differentialLoadingMode) { // Add zone.js legacy support to the es5 polyfills // This is a noop execution-wise if zone-evergreen is not used. entryPoints[polyfillsChunkName].push('zone.js/dist/zone-legacy'); } if (!buildOptions.aot) { - // If not performing a full differential build the JIT polyfills need to be added to ES5 - if (!fullDifferential && differentialLoadingNeeded) { + if (differentialLoadingMode) { entryPoints[polyfillsChunkName].push(path.join(__dirname, '..', 'jit-polyfills.js')); } entryPoints[polyfillsChunkName].push(path.join(__dirname, '..', 'es5-jit-polyfills.js')); } // If not performing a full differential build the polyfills need to be added to ES5 bundle - if (!fullDifferential && buildOptions.polyfills) { + if (buildOptions.polyfills) { entryPoints[polyfillsChunkName].push(path.resolve(root, buildOptions.polyfills)); } } @@ -411,7 +404,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { mangle: !manglingDisabled && buildOptions.platform !== 'server' && - (!differentialLoadingNeeded || (differentialLoadingNeeded && fullDifferential)), + !differentialLoadingMode, }; extraMinimizers.push( diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts index 7b82019d9eb3..bb690a6a434f 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts @@ -15,7 +15,6 @@ import { NgToolsLoader, PLATFORM } from '@ngtools/webpack'; -import { fullDifferential } from '../../../utils'; import { WebpackConfigOptions, BuildOptions } from '../build-options'; function _pluginOptionsOverrides( @@ -33,10 +32,6 @@ function _pluginOptionsOverrides( } } - if (fullDifferential && buildOptions.scriptTargetOverride) { - compilerOptions.target = buildOptions.scriptTargetOverride; - } - if (buildOptions.preserveSymlinks) { compilerOptions.preserveSymlinks = true; } diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index b6da933c4100..79a813c64759 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -7,7 +7,6 @@ */ import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect'; import { - BuildResult, EmittedFiles, WebpackLoggingCallback, runWebpack, @@ -25,7 +24,7 @@ import * as findCacheDirectory from 'find-cache-dir'; import * as fs from 'fs'; import * as path from 'path'; import { Observable, from, of } from 'rxjs'; -import { bufferCount, catchError, concatMap, map, mergeScan, switchMap } from 'rxjs/operators'; +import { catchError, concatMap, map, switchMap } from 'rxjs/operators'; import { ScriptTarget } from 'typescript'; import * as webpack from 'webpack'; import { NgBuildAnalyticsPlugin } from '../../plugins/webpack/analytics'; @@ -57,7 +56,6 @@ import { ExecutionTransformer } from '../transforms'; import { BuildBrowserFeatures, deleteOutputDir, - fullDifferential, normalizeAssetPatterns, normalizeOptimization, normalizeSourceMaps, @@ -111,7 +109,7 @@ export async function buildBrowserWebpackConfigFromContext( options: BrowserBuilderSchema, context: BuilderContext, host: virtualFs.Host = new NodeJsSyncHost(), -): Promise<{ config: webpack.Configuration[]; projectRoot: string; projectSourceRoot?: string }> { +): Promise<{ config: webpack.Configuration; projectRoot: string; projectSourceRoot?: string }> { return generateBrowserWebpackConfigFromContext( options, context, @@ -164,7 +162,7 @@ async function initialize( host: virtualFs.Host, webpackConfigurationTransform?: ExecutionTransformer, ): Promise<{ - config: webpack.Configuration[]; + config: webpack.Configuration; projectRoot: string; projectSourceRoot?: string; i18n: I18nOptions; @@ -182,10 +180,7 @@ async function initialize( let transformedConfig; if (webpackConfigurationTransform) { - transformedConfig = []; - for (const c of config) { - transformedConfig.push(await webpackConfigurationTransform(c)); - } + transformedConfig = await webpackConfigurationTransform(config); } if (options.deleteOutputPath) { @@ -218,7 +213,7 @@ export function buildWebpackBrowser( return from(initialize(options, context, host, transforms.webpackConfiguration)).pipe( // tslint:disable-next-line: no-big-function - switchMap(({ config: configs, projectRoot, projectSourceRoot, i18n }) => { + switchMap(({ config, projectRoot, projectSourceRoot, i18n }) => { const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); const target = tsConfig.options.target || ScriptTarget.ES5; const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot, target); @@ -233,40 +228,23 @@ export function buildWebpackBrowser( `); } - const useBundleDownleveling = - isDifferentialLoadingNeeded && !(fullDifferential || options.watch); + const useBundleDownleveling = isDifferentialLoadingNeeded && !options.watch; const startTime = Date.now(); - return from(configs).pipe( - // the concurrency parameter (3rd parameter of mergeScan) is deliberately - // set to 1 to make sure the build steps are executed in sequence. - mergeScan( - (lastResult, config) => { - // Make sure to only run the 2nd build step, if 1st one succeeded - if (lastResult.success) { - return runWebpack(config, context, { - logging: - transforms.logging || - (useBundleDownleveling - ? () => {} - : createBrowserLoggingCallback(!!options.verbose, context.logger)), - }); - } else { - return of(); - } - }, - { success: true } as BuildResult, - 1, - ), - bufferCount(configs.length), + return runWebpack(config, context, { + logging: + transforms.logging || + (useBundleDownleveling + ? () => {} + : createBrowserLoggingCallback(!!options.verbose, context.logger)), + }).pipe( // tslint:disable-next-line: no-big-function - switchMap(async buildEvents => { - configs.length = 0; - const success = buildEvents.every(r => r.success); + concatMap(async buildEvent => { + const { webpackStats, success, emittedFiles = [] } = buildEvent; + if (!success && useBundleDownleveling) { // If using bundle downleveling then there is only one build // If it fails show any diagnostic messages and bail - const webpackStats = buildEvents[0].webpackStats; if (webpackStats && webpackStats.warnings.length > 0) { context.logger.warn(statsWarningsToString(webpackStats, { colors: true })); } @@ -285,18 +263,12 @@ export function buildWebpackBrowser( 'scripts', ).map(x => x.bundleName); - const [firstBuild, secondBuild] = buildEvents; - if (isDifferentialLoadingNeeded && (fullDifferential || options.watch)) { - moduleFiles = firstBuild.emittedFiles || []; + if (isDifferentialLoadingNeeded && options.watch) { + moduleFiles = emittedFiles; files = moduleFiles.filter( x => x.extension === '.css' || (x.name && scriptsEntryPointName.includes(x.name)), ); - - if (buildEvents.length === 2) { - noModuleFiles = secondBuild.emittedFiles; - } - } else if (isDifferentialLoadingNeeded && !fullDifferential) { - const { emittedFiles = [], webpackStats } = firstBuild; + } else if (isDifferentialLoadingNeeded) { moduleFiles = []; noModuleFiles = []; @@ -526,7 +498,6 @@ export function buildWebpackBrowser( context.logger.error(statsErrorsToString(webpackStats, { colors: true })); } } else { - const { emittedFiles = [] } = firstBuild; files = emittedFiles.filter(x => x.name !== 'polyfills-es5'); noModuleFiles = emittedFiles.filter(x => x.name === 'polyfills-es5'); } diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index f076546b89b7..816ba06c7bfd 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -126,7 +126,7 @@ export function serveWebpackBrowser( ); // No differential loading for dev-server, hence there is just one config - let webpackConfig = webpackConfigResult.config[0]; + let webpackConfig = webpackConfigResult.config; const port = await checkPort(options.port || 0, options.host || 'localhost', 4200); const webpackDevServerConfig = (webpackConfig.devServer = buildServerConfig( diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts index 563ef3fcd83d..50136fe9c3f3 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts @@ -119,7 +119,7 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte } }; - return runWebpack(config[0], context, { logging }).toPromise(); + return runWebpack(config, context, { logging }).toPromise(); } export default createBuilder(execute); diff --git a/packages/angular_devkit/build_angular/src/karma/index.ts b/packages/angular_devkit/build_angular/src/karma/index.ts index 61e7c851e2f4..2f1ef386d7ed 100644 --- a/packages/angular_devkit/build_angular/src/karma/index.ts +++ b/packages/angular_devkit/build_angular/src/karma/index.ts @@ -61,7 +61,7 @@ async function initialize( return [ karma, - webpackConfigurationTransformer ? await webpackConfigurationTransformer(config[0]) : config[0], + webpackConfigurationTransformer ? await webpackConfigurationTransformer(config) : config, ]; } diff --git a/packages/angular_devkit/build_angular/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts index 866a1bb1dce9..8e7b95174450 100644 --- a/packages/angular_devkit/build_angular/src/server/index.ts +++ b/packages/angular_devkit/build_angular/src/server/index.ts @@ -106,5 +106,5 @@ async function buildServerWebpackConfig( ], ); - return config[0]; + return config; } diff --git a/packages/angular_devkit/build_angular/src/utils/build-browser-features.ts b/packages/angular_devkit/build_angular/src/utils/build-browser-features.ts index f579105c3d5d..cfd3e58dda4c 100644 --- a/packages/angular_devkit/build_angular/src/utils/build-browser-features.ts +++ b/packages/angular_devkit/build_angular/src/utils/build-browser-features.ts @@ -10,12 +10,6 @@ import * as browserslist from 'browserslist'; import { feature, features } from 'caniuse-lite'; import * as ts from 'typescript'; -const fullDifferentialEnv = process.env['NG_BUILD_DIFFERENTIAL_FULL']; -export const fullDifferential = - fullDifferentialEnv !== undefined && - fullDifferentialEnv !== '0' && - fullDifferentialEnv.toLowerCase() !== 'false'; - export class BuildBrowserFeatures { private readonly _supportedBrowsers: string[]; private readonly _es6TargetOrLater: boolean; diff --git a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts index f2d89748515c..279c1a213222 100644 --- a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts +++ b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts @@ -24,7 +24,6 @@ import { Schema as BrowserBuilderSchema } from '../browser/schema'; import { NormalizedBrowserBuilderSchema, defaultProgress, - fullDifferential, normalizeBrowserSchema, } from '../utils'; import { BuildBrowserFeatures } from './build-browser-features'; @@ -42,7 +41,7 @@ export async function generateWebpackConfig( options: NormalizedBrowserBuilderSchema, webpackPartialGenerator: (wco: BrowserWebpackConfigOptions) => webpack.Configuration[], logger: logging.LoggerApi, -): Promise { +): Promise { // Ensure Build Optimizer is only used with AOT. if (options.buildOptimizer && !options.aot) { throw new Error(`The 'buildOptimizer' option cannot be used without 'aot'.`); @@ -75,90 +74,63 @@ export async function generateWebpackConfig( !options.watch && buildBrowserFeatures.isDifferentialLoadingNeeded(); - const scriptTargets = [scriptTarget]; - - if (differentialLoading && fullDifferential) { - scriptTargets.push(ts.ScriptTarget.ES5); + let buildOptions: NormalizedBrowserBuilderSchema = { ...options }; + if (differentialLoading) { + buildOptions = { + ...options, + // Under downlevel differential loading we copy the assets outside of webpack. + assets: [], + esVersionInFileName: true, + es5BrowserSupport: undefined, + }; } - // For differential loading, we can have several targets - return scriptTargets.map(scriptTarget => { - let buildOptions: NormalizedBrowserBuilderSchema = { ...options }; - const supportES2015 = - scriptTarget !== ts.ScriptTarget.ES3 && scriptTarget !== ts.ScriptTarget.ES5; - - if (differentialLoading && fullDifferential) { - buildOptions = { - ...options, - ...// FIXME: we do create better webpack config composition to achieve the below - // When DL is enabled and supportES2015 is true it means that we are on the second build - // This also means that we don't need to include styles and assets multiple times - (supportES2015 - ? {} - : { - styles: options.extractCss ? [] : options.styles, - assets: [], - }), - es5BrowserSupport: undefined, - esVersionInFileName: true, - scriptTargetOverride: scriptTarget, - }; - } else if (differentialLoading && !fullDifferential) { - buildOptions = { - ...options, - // Under downlevel differential loading we copy the assets outside of webpack. - assets: [], - esVersionInFileName: true, - scriptTargetOverride: ts.ScriptTarget.ES5, - es5BrowserSupport: undefined, - }; - } - - const wco: BrowserWebpackConfigOptions = { - root: workspaceRoot, - logger: logger.createChild('webpackConfigOptions'), - projectRoot, - sourceRoot, - buildOptions, - tsConfig, - tsConfigPath, - supportES2015, - }; + const supportES2015 = scriptTarget !== ts.ScriptTarget.JSON && scriptTarget > ts.ScriptTarget.ES5; + const wco: BrowserWebpackConfigOptions = { + root: workspaceRoot, + logger: logger.createChild('webpackConfigOptions'), + projectRoot, + sourceRoot, + buildOptions, + tsConfig, + tsConfigPath, + supportES2015, + differentialLoadingMode: differentialLoading, + }; - wco.buildOptions.progress = defaultProgress(wco.buildOptions.progress); + wco.buildOptions.progress = defaultProgress(wco.buildOptions.progress); - const partials = webpackPartialGenerator(wco); - const webpackConfig = webpackMerge(partials) as webpack.Configuration; + const partials = webpackPartialGenerator(wco); + const webpackConfig = webpackMerge(partials) as webpack.Configuration; - if (supportES2015) { - if (!webpackConfig.resolve) { - webpackConfig.resolve = {}; - } - if (!webpackConfig.resolve.alias) { - webpackConfig.resolve.alias = {}; - } - webpackConfig.resolve.alias['zone.js/dist/zone'] = 'zone.js/dist/zone-evergreen'; + if (supportES2015) { + if (!webpackConfig.resolve) { + webpackConfig.resolve = {}; } - - if (options.profile || process.env['NG_BUILD_PROFILING']) { - const esVersionInFileName = getEsVersionForFileName( - fullDifferential ? buildOptions.scriptTargetOverride : tsConfig.options.target, - wco.buildOptions.esVersionInFileName, - ); - - const smp = new SpeedMeasurePlugin({ - outputFormat: 'json', - outputTarget: path.resolve( - workspaceRoot, - `speed-measure-plugin${esVersionInFileName}.json`, - ), - }); - - return smp.wrap(webpackConfig); + if (!webpackConfig.resolve.alias) { + webpackConfig.resolve.alias = {}; } + webpackConfig.resolve.alias['zone.js/dist/zone'] = 'zone.js/dist/zone-evergreen'; + } + + if (options.profile || process.env['NG_BUILD_PROFILING']) { + const esVersionInFileName = getEsVersionForFileName( + tsConfig.options.target, + wco.buildOptions.esVersionInFileName, + ); + + const smp = new SpeedMeasurePlugin({ + outputFormat: 'json', + outputTarget: path.resolve( + workspaceRoot, + `speed-measure-plugin${esVersionInFileName}.json`, + ), + }); + + return smp.wrap(webpackConfig); + } - return webpackConfig; - }); + return webpackConfig; } export async function generateBrowserWebpackConfigFromContext( @@ -166,7 +138,7 @@ export async function generateBrowserWebpackConfigFromContext( context: BuilderContext, webpackPartialGenerator: (wco: BrowserWebpackConfigOptions) => webpack.Configuration[], host: virtualFs.Host = new NodeJsSyncHost(), -): Promise<{ config: webpack.Configuration[]; projectRoot: string; projectSourceRoot?: string }> { +): Promise<{ config: webpack.Configuration; projectRoot: string; projectSourceRoot?: string }> { const projectName = context.target && context.target.project; if (!projectName) { throw new Error('The builder requires a target.'); From a803dea22a7ad0aa59a4fb274af3e5cac560bdd1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 15 Oct 2019 06:02:30 +0000 Subject: [PATCH 0304/1070] build: update rollup to version 1.24.0 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 53ecb347ffc8..fc2f65f88282 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -42,7 +42,7 @@ "postcss-loader": "3.0.0", "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", - "rollup": "1.23.1", + "rollup": "1.24.0", "rxjs": "6.5.3", "sass": "1.23.0", "sass-loader": "8.0.0", diff --git a/yarn.lock b/yarn.lock index f6ba26bc6171..a359c089dc6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9018,7 +9018,16 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.23.1, rollup@^1.12.1: +rollup@1.24.0: + version "1.24.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.24.0.tgz#0ace969508babb7a5fcb228e831e9c9a2873c2b0" + integrity sha512-PiFETY/rPwodQ8TTC52Nz2DSCYUATznGh/ChnxActCr8rV5FIk3afBUb3uxNritQW/Jpbdn3kq1Rwh1HHYMwdQ== + dependencies: + "@types/estree" "*" + "@types/node" "*" + acorn "^7.1.0" + +rollup@^1.12.1: version "1.23.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.23.1.tgz#0315a0f5d0dfb056e6363e1dff05b89ac2da6b8e" integrity sha512-95C1GZQpr/NIA0kMUQmSjuMDQ45oZfPgDBcN0yZwBG7Kee//m7H68vgIyg+SPuyrTZ5PrXfyLK80OzXeKG5dAA== From cf349433ab77930fa461b42a81107a9a584b98a1 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 15 Oct 2019 08:24:36 +0200 Subject: [PATCH 0305/1070] fix(@angular/cli): ng update log messages printed twice After the logs are printing to console clean the logs queue. Fixes #15839 --- packages/angular/cli/commands/update-impl.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 0e622e363548..9330e86125d3 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -59,7 +59,7 @@ export class UpdateCommand extends Command { options = {}, ): Promise<{ success: boolean; files: Set }> { let error = false; - const logs: string[] = []; + let logs: string[] = []; const files = new Set(); const reporterSubscription = this.workflow.reporter.subscribe(event => { @@ -96,6 +96,7 @@ export class UpdateCommand extends Command { if (!error) { // Output the logging queue, no error happened. logs.forEach(log => this.logger.info(log)); + logs = []; } } }); From 2b22e73990a9250be963cbd84b513b0ce7fe2bef Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 15 Oct 2019 07:01:59 +0000 Subject: [PATCH 0306/1070] build: update ng-packagr to version ~5.7.0 --- packages/angular_devkit/build_ng_packagr/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 3643f4a7dd7d..9dbd71836fbd 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -17,7 +17,7 @@ "@angular/compiler": "9.0.0-next.10", "@angular/compiler-cli": "9.0.0-next.10", "@angular-devkit/core": "0.0.0", - "ng-packagr": "~5.6.0", + "ng-packagr": "~5.7.0", "tslib": "^1.10.0" } } diff --git a/yarn.lock b/yarn.lock index a359c089dc6d..84809907fccf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7195,10 +7195,10 @@ neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -ng-packagr@~5.6.0: - version "5.6.1" - resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.6.1.tgz#c3664134d28289383a2bd95f09efa685432ffea6" - integrity sha512-Z7pOtjlWQe9eBGq6iDSWqBzpxq7IXO8tZssCZDv6v+6IvsgWVxbIndDr7g6IZyVJQriliCRjFQ70w3XoX4dSKw== +ng-packagr@~5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.7.0.tgz#3a450d2264724a900dbf6270a8b4c5439eb1f236" + integrity sha512-/75eqAyk2ef8J0aMLl7XCx1QXmqUUTsQDu+fNCFDIYpkpWBh0C8Rkdd72hMLPv3MMo63pfaNeiMXa0zzpQINyA== dependencies: ajv "^6.10.2" autoprefixer "^9.6.0" From 940276f5549ae1bf22606d3f8318f4662d463444 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 14 Oct 2019 10:23:55 +0100 Subject: [PATCH 0307/1070] fix(@schematics/angular): update ngcc postinstall command --- .../schematics/angular/workspace/files/package.json.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/workspace/files/package.json.template b/packages/schematics/angular/workspace/files/package.json.template index 5da9b23eceed..78d695e562b9 100644 --- a/packages/schematics/angular/workspace/files/package.json.template +++ b/packages/schematics/angular/workspace/files/package.json.template @@ -8,7 +8,7 @@ "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", - "postinstall": "ivy-ngcc --properties es2015 --create-ivy-entry-points" + "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points" }, "private": true, "dependencies": { From e847ee5c83cdb8ea6c49844e0e571265caacc4f3 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 15 Oct 2019 09:35:13 +0200 Subject: [PATCH 0308/1070] =?UTF-8?q?fix(@angular-devkit/build-angular):?= =?UTF-8?q?=20change=20the=20`ngComponentDef`=20to=20`=C9=B5cmp`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to https://github.com/angular/angular/commit/64fd0d6db947e971e47802770f79c38ec9e03d59 --- .../plugins/webpack/analytics.ts | 4 ++-- .../test/browser/aot_spec_large.ts | 2 +- .../src/build/index_spec_large.ts | 4 ++-- tests/legacy-cli/e2e/ng-snapshot/package.json | 20 +++++++++---------- .../legacy-cli/e2e/tests/basic/ivy-opt-out.ts | 2 +- tests/legacy-cli/e2e/tests/basic/ivy.ts | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts index 0611a307cc55..bd75970f2bdf 100644 --- a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts +++ b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts @@ -158,8 +158,8 @@ export class NgBuildAnalyticsPlugin { // Count the number of `Component({` strings (case sensitive), which happens in __decorate(). // This does not include View Engine AOT compilation, we use the ngfactory for it. this._stats.numberOfComponents += countOccurrences(module._source.source(), ' Component({'); - // For Ivy we just count ngComponentDef. - const numIvyComponents = countOccurrences(module._source.source(), 'ngComponentDef', true); + // For Ivy we just count ɵcmp. + const numIvyComponents = countOccurrences(module._source.source(), 'ɵcmp', true); this._stats.numberOfComponents += numIvyComponents; // Check whether this is an Ivy app so that it can reported as part of analytics. diff --git a/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts index 02b9f6ce78e7..327e75b6fd07 100644 --- a/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts @@ -32,7 +32,7 @@ describe('Browser Builder AOT', () => { const fileName = join(normalize(output.outputPath), 'main.js'); const content = virtualFs.fileBufferToString(await host.read(normalize(fileName)).toPromise()); if (!veEnabled) { - expect(content).toContain('AppComponent.ngComponentDef'); + expect(content).toContain('AppComponent.ɵcmp'); } else { expect(content).toMatch(/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); } diff --git a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts index 4431c5f477e8..7c8f6b6a21c6 100644 --- a/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts +++ b/packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts @@ -66,9 +66,9 @@ describe('NgPackagr Builder', () => { expect(content).toContain('lib works'); if (veEnabled) { - expect(content).not.toContain('ngComponentDef'); + expect(content).not.toContain('ɵcmp'); } else { - expect(content).toContain('ngComponentDef'); + expect(content).toContain('ɵcmp'); } }); diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 7fe6804e19d4..5797fe71a35c 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,15 +2,15 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#07b04260b2653c48b11164b974e8acd89c956fb2", - "@angular/common": "github:angular/common-builds#07a003b4d34b98677ba5eeffea2b41ea15126ff6", - "@angular/compiler": "github:angular/compiler-builds#16f9f82ae890734f766fe3d5c78602cde193438a", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#cb91e7386f8174c5f7b98e08c9b7c3a4c8ee12c3", - "@angular/core": "github:angular/core-builds#d144181cf413da0a442a24434b13e287c74b654d", - "@angular/forms": "github:angular/forms-builds#7c857ae1506d0d9bf86880442b7c25aea2c7dd9d", - "@angular/language-service": "github:angular/language-service-builds#279fb6627ffbf790523691c50f763b99b4f83080", - "@angular/platform-browser": "github:angular/platform-browser-builds#117ba04374a43ea0ade5b82470658b82359ef71e", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#13b4e02eb3bba4b221609c1f4d9a554417cae4a9", - "@angular/router": "github:angular/router-builds#8a7d5c49fc9ad105f3b9ca986ac14c6f3aec4435" + "@angular/animations": "github:angular/animations-builds#06199648629a68084af81ecdbc73a4a425ff3a92", + "@angular/common": "github:angular/common-builds#239bb4eb52905c57a8a0207e4f1e95f8e018bd54", + "@angular/compiler": "github:angular/compiler-builds#ad0588213a4ae15b585efdca549bb04221129014", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#46061561d517698fc9608a44d207540bfda2fede", + "@angular/core": "github:angular/core-builds#e05a7ec0414fe552ac3632d3735927e026157db3", + "@angular/forms": "github:angular/forms-builds#e3910afb6188c86e9f51c615e24e3e65587142f5", + "@angular/language-service": "github:angular/language-service-builds#5f99caab4c5bcfbdd8aecafc9c70d8c7ce703004", + "@angular/platform-browser": "github:angular/platform-browser-builds#16497ae98fc072c69910e3042e622980645340ad", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#73fe229bcd3b0e644b946296805939757a2b9f83", + "@angular/router": "github:angular/router-builds#f9822e15092516892cb3817ec3bf6524c0188adc" } } \ No newline at end of file diff --git a/tests/legacy-cli/e2e/tests/basic/ivy-opt-out.ts b/tests/legacy-cli/e2e/tests/basic/ivy-opt-out.ts index e75f88b2ee2d..aad19225ce3b 100644 --- a/tests/legacy-cli/e2e/tests/basic/ivy-opt-out.ts +++ b/tests/legacy-cli/e2e/tests/basic/ivy-opt-out.ts @@ -41,7 +41,7 @@ export default async function() { const mainUrl = mainUrlMatch && mainUrlMatch[1]; const main = await request('http://localhost:4200/' + mainUrl); - if (main.match(/ngComponentDef\s*=/)) { + if (main.match(/ɵcmp\s*=/)) { throw new Error('Loaded Ivy but expected View Engine applicatiom.'); } diff --git a/tests/legacy-cli/e2e/tests/basic/ivy.ts b/tests/legacy-cli/e2e/tests/basic/ivy.ts index 2406f79cd670..80bb9fff78f0 100644 --- a/tests/legacy-cli/e2e/tests/basic/ivy.ts +++ b/tests/legacy-cli/e2e/tests/basic/ivy.ts @@ -42,7 +42,7 @@ export default async function() { const mainUrl = mainUrlMatch && mainUrlMatch[1]; const main = await request('http://localhost:4200/' + mainUrl); - if (!main.match(/ngComponentDef\s*=/)) { + if (!main.match(/ɵcmp\s*=/)) { throw new Error('Ivy could not be found.'); } if (main.match(/ngDevMode/)) { From 804d60de0c468aabba52f5343e146248f69f0ba2 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Mon, 14 Oct 2019 13:42:49 +0300 Subject: [PATCH 0309/1070] fix(@schematics/angular): rename the `ivy-ngcc` command to `ngcc` With angular/angular#33140, the Angular Compatibility Compiler executable will be renamed from `ivy-ngcc` to `ngcc`. --- scripts/test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.ts b/scripts/test.ts index a8d8c0a7fb8c..158675021937 100644 --- a/scripts/test.ts +++ b/scripts/test.ts @@ -95,7 +95,7 @@ export default function(args: ParsedArgs, logger: logging.Logger) { } else if (args.shard !== undefined) { // CI is really flaky with NGCC // This is a working around test order and isolation issues. - execSync('./node_modules/.bin/ivy-ngcc', { stdio: 'inherit' }); + execSync('./node_modules/.bin/ngcc', { stdio: 'inherit' }); } if (args.large) { From 6b0aec4cc2832500667b01b3f56eac0940b95591 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 15 Oct 2019 09:40:36 +0200 Subject: [PATCH 0310/1070] build: update framework packages to `9.0.0-next.11` --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 25 ++-- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- .../angular/utility/latest-versions.ts | 2 +- yarn.lock | 119 ++++++++---------- 6 files changed, 70 insertions(+), 88 deletions(-) diff --git a/package.json b/package.json index 9408fb9ea732..3f19c2610f86 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.5.3" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.10", - "@angular/compiler-cli": "9.0.0-next.10", + "@angular/compiler": "9.0.0-next.11", + "@angular/compiler-cli": "9.0.0-next.11", "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.37.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index fc2f65f88282..f48c863eb23d 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -66,20 +66,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.10", + "@angular/animations": "9.0.0-next.11", "@angular/cdk": "8.2.3", - "@angular/common": "9.0.0-next.10", - "@angular/compiler": "9.0.0-next.10", - "@angular/compiler-cli": "9.0.0-next.10", - "@angular/core": "9.0.0-next.10", - "@angular/forms": "9.0.0-next.10", - "@angular/localize": "9.0.0-next.10", + "@angular/common": "9.0.0-next.11", + "@angular/compiler": "9.0.0-next.11", + "@angular/compiler-cli": "9.0.0-next.11", + "@angular/core": "9.0.0-next.11", + "@angular/forms": "9.0.0-next.11", + "@angular/localize": "9.0.0-next.11", "@angular/material": "8.2.3", - "@angular/platform-browser": "9.0.0-next.10", - "@angular/platform-browser-dynamic": "9.0.0-next.10", - "@angular/platform-server": "9.0.0-next.10", - "@angular/router": "9.0.0-next.10", - "@angular/service-worker": "9.0.0-next.10", + "@angular/platform-browser": "9.0.0-next.11", + "@angular/platform-browser-dynamic": "9.0.0-next.11", + "@angular/platform-server": "9.0.0-next.11", + "@angular/router": "9.0.0-next.11", + "@angular/service-worker": "9.0.0-next.11", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", @@ -93,6 +93,7 @@ "karma-jasmine-html-reporter": "^1.4.0", "popper.js": "^1.14.1", "protractor": "~5.4.0", + "tslib": "~1.10.0", "zone.js": "^0.10.0" }, "peerDependencies": { diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 9dbd71836fbd..32bcd70d2d1b 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.10", - "@angular/compiler-cli": "9.0.0-next.10", + "@angular/compiler": "9.0.0-next.11", + "@angular/compiler-cli": "9.0.0-next.11", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.7.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 6a278fcbbfa8..d6a87aee0735 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.10", - "@angular/compiler-cli": "9.0.0-next.10", + "@angular/compiler": "9.0.0-next.11", + "@angular/compiler-cli": "9.0.0-next.11", "typescript": "3.5.3", "webpack": "4.41.1" } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index a579542d44cd..43237baf9267 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,7 +8,7 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.10', + Angular: '~9.0.0-next.11', RxJs: '~6.5.3', ZoneJs: '~0.10.2', TypeScript: '~3.5.3', diff --git a/yarn.lock b/yarn.lock index 84809907fccf..2d6576c94a74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,12 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.10.tgz#965e5f1b9533fc1177dd122c21dadd8f7a349d2b" - integrity sha512-KEH0oW2JCIUCsdA6NjJIP8V0fEYWLkccYwBGXvlhDnNW5d5JLhNEpjugrFaREYIQD/Qguu71eoZDFTdaJr7e/g== - dependencies: - tslib "^1.9.0" +"@angular/animations@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.11.tgz#49a1502d0611017f8ea77719207ace416e8a55a2" + integrity sha512-p6gY6sv/dpVxTN0oM/PZzKKlGHLhlgZ/TtpsRST1iQy2DiYhW932Adr+0CsjJc9eJcnAaHY+pYPR2YJaB7U/dw== "@angular/cdk@8.2.3": version "8.2.3" @@ -18,17 +16,15 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.10.tgz#1d57400d0c4af121546177b143b5ab10be0bf8f2" - integrity sha512-PrXIb+5f6IuZSgWpn0YpOWIYHCDcBJMihMBafHk+VaWtAPjdXGBo9PeBhXROPXGQrcMxorZHBCaj7REZcrh3Ug== - dependencies: - tslib "^1.9.0" +"@angular/common@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.11.tgz#6079b966edc3c3eb318a6e005f8bfde8ca385177" + integrity sha512-BfjVJOAZFVl/2MUJPZk5UTGSNax9WT5/dH1jrxzAqMpHfhw+xixvvSiixn3FXY/nKqelhB7HwnUvNEnzE5zflA== -"@angular/compiler-cli@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.10.tgz#6465bd2b98bbbf8e6ec29260de4ee48c69272d23" - integrity sha512-D4deoczwl6iNTjWtd4Cp8bQYmH9GE1CI64bK2WQLEp35UZRizRSFvFSht/7+BzdiEi7/+Sn31MiDUdkQCnYe2A== +"@angular/compiler-cli@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.11.tgz#be15bd58261d2ca8afef60f83e7f85f6f3dc4b86" + integrity sha512-52ebMVn8MBMSvkoaYgNk7HKQwubrHGBnZxzF0qU6NLqrNAs3mHfPLKyL1coksYCEmNNn69XjYacumi7PTebSyA== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -37,35 +33,29 @@ magic-string "^0.25.0" minimist "^1.2.0" reflect-metadata "^0.1.2" + semver "^6.3.0" source-map "^0.6.1" - tslib "^1.9.0" yargs "13.1.0" -"@angular/compiler@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.10.tgz#299a0d5b63e68debe1b2469b12bda61f76d47450" - integrity sha512-02+et2JJ8lkwBTFj+OiLcDat8mWgpLJRpUFFWzHJyEOIkfv/maDMmF6pQzI6X8YCyKaaOEIXaNZcfIYshewxJA== - dependencies: - tslib "^1.9.0" +"@angular/compiler@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.11.tgz#9b931dcff9bf661eb8e572d3349542408031067c" + integrity sha512-wmJnNn5mI1oI7C+IiqDfshK/Se+d6/5e4wWV+YOZweSpwml9mTuporMHunfnGe0uR1bxfWt2TVxmtXlHnQReIA== -"@angular/core@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.10.tgz#6617be2e5e757b081e2c2bb52278240586020214" - integrity sha512-YXQacLAB4yk1bFztUr0XdHCeZAMsX3UXxisEdJwB1TT+6XTthMC0rv4ja3pwgz6oXGRP7hSLKdx3UWj3xE2BLw== - dependencies: - tslib "^1.9.0" +"@angular/core@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.11.tgz#61e4432d72cc75ca4a0c2c1d50bdfffd9d06676c" + integrity sha512-SkyulD9geB2us362yorkG0CU8UzgtnkjEW3+l8qf7LG4nWFWL/5Nyqyxv80pDLDuLdf0GtFo2sZGZ+KHccUmpQ== -"@angular/forms@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.10.tgz#2b46797ba2da0555077fc4a4184a284edbf7d17d" - integrity sha512-oBamuJ3Y7lLwnBGcrJUlmj4px8KtVj+elQPkUY54D/r394/RLmck839o62dljPR2vd0wVjhPKkbUl7aUIDrvEw== - dependencies: - tslib "^1.9.0" +"@angular/forms@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.11.tgz#2a940e83069fcf65488bce4fd985964426e64ec8" + integrity sha512-9gXnhR1TJ6tUpvUxQffdyT5A5R7l1oUjusN2tPZuxClEqOwG17nWajx97Wn3cHaVXfemtov5ExNQyMQ8xXASGg== -"@angular/localize@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.10.tgz#cc1a117a5a00c612e17e184344c6aec10f591607" - integrity sha512-QuEWm+fHLtzbF/ifM6fWG51jIioZxK/rjACZqAchlfG1SAfUA66rHygHrxrXmVf+0OnABeJafk+XJM3payV5jQ== +"@angular/localize@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.11.tgz#53be7c0ae80c5872f952d2a4c958d38de0a3fd50" + integrity sha512-62C5HnC3CQ/0CUqEm6J9NV4Dvadg9thV6Ecq2PpoNznYH9Yh3THCieWq+XCzKXqoOMWdl7jTCFNAP7TzkXtXnw== dependencies: "@babel/core" "^7.5.5" glob "7.1.2" @@ -78,42 +68,33 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.10.tgz#49650e94eab8e468b2e2934d5ba46b7105a7a8dc" - integrity sha512-RfDSqTZYHiHRc2j7OyppbrgYX1hTtUPqJOpNwytMwoyzwG3aHg9iNzlVw6h7b99euBxBpVwR96fmws2x52DFKw== - dependencies: - tslib "^1.9.0" +"@angular/platform-browser-dynamic@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.11.tgz#67bfa6cf0714be4f318bed2b5685609f2ff9ccae" + integrity sha512-7/0DJLm/XeyTGpZUcUdSByD1GY6SBwdskn6SpWc563EQ6wMb/A1lus0AUT2khUgW/4ArTJldCScei946KRfD5Q== -"@angular/platform-browser@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.10.tgz#496d99a169a7b7941f6046ba9dc2852150a3745e" - integrity sha512-PDcDscEwkEXhFhmiwn5dIs7MjmspgjeJJlW+JDHPPZntqgqiTIXiOhhDwvGyo0/Yi9cT1IP63w8gHbZp9Sx36w== - dependencies: - tslib "^1.9.0" +"@angular/platform-browser@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.11.tgz#61562bacd79fcbc8daf17d061c11e90dddd23dc1" + integrity sha512-MBAbCfPR+dBNEWqPqiTcoKHLotfCwAAoBFwx3tUQi6oz1+SPJIownBHyUiyBSG0FqfHcLDqCO1FYkSIiLVysEw== -"@angular/platform-server@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.10.tgz#6be104812274259c6e822b754ab137f762da1125" - integrity sha512-PnEhgE6p4+mo76vymN0yINGcTtMPZSX+9kIJWTCo7pF+s3ExnZl+usHuFV9fBPn2REvnZQlPR0DytyA75ZOYgg== +"@angular/platform-server@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.11.tgz#55fb51f3fc487f9b39f801d9c338f2481a9ba91f" + integrity sha512-jbIwPSUPGoVREAv5aNxBvHUmO1f9fpzMVm4sP0KwFSNdO9rarljmyy86G5sh2n8c2/eEsVAm9wfpN/5JHgsnqg== dependencies: domino "^2.1.2" - tslib "^1.9.0" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.10.tgz#d36aa9763d99fd532616eac985399118f881eced" - integrity sha512-Il0KaD3Orm5HWGZvywJy8I9oH3uJVQZFX3FlZweaOsmlsAlrRw9tE4n51aOOVDff/NwJANdDLoQ5Kd8tBRqRPQ== - dependencies: - tslib "^1.9.0" +"@angular/router@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.11.tgz#ccce71094dcf846ec12a804a59333e8ccd7f1835" + integrity sha512-JFdxfbZEkOIPHg2/vL/JMuu668uyq10fqwu2rmvoFKVqfHj0zHbcG86kank7NfNpmn+LlJwxeZVRps/yWt4pUA== -"@angular/service-worker@9.0.0-next.10": - version "9.0.0-next.10" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.10.tgz#b096478e49a7a16df10753531cb5cb9ee8bf91b0" - integrity sha512-krY0c+E3cZJ0zZ+/IKm4iQjAAk+kJgf92S1tYvU8qDebZHaiq3wA/Fjs+ziyHtY4NCcrRtIAGl3g6TvnKLMvwg== - dependencies: - tslib "^1.9.0" +"@angular/service-worker@9.0.0-next.11": + version "9.0.0-next.11" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.11.tgz#ea0f23643d413efc65650b2adc0a4d7cad2b8d80" + integrity sha512-klF7vW8vwlGUWc/mZjB6zMZzfqs7Nn3h+MMDnJK9Kw7Lzb5zZPXcsPCFTEkhWsVLFeeGO5i5l7VwR4Xir9BetA== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" @@ -10341,7 +10322,7 @@ ts-node@^5.0.0: source-map-support "^0.5.3" yn "^2.0.0" -tslib@1.10.0, tslib@^1.10.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@1.10.0, tslib@^1.10.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@~1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== From f943d3a8dcebfb59db11b070bbee58dc9559c19f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 15 Oct 2019 19:40:33 +0200 Subject: [PATCH 0311/1070] =?UTF-8?q?refactor(@angular-devkit/build-angula?= =?UTF-8?q?r):=20rename=20ngModuleDef=20to=20=C9=B5mod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../angular_devkit/build_angular/plugins/webpack/analytics.ts | 2 +- .../build_angular/test/browser/lazy-module_spec_large.ts | 4 ++-- .../build_angular/test/server/base_spec_large.ts | 4 ++-- .../build_optimizer/src/transforms/wrap-enums_spec.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts index bd75970f2bdf..974c4c619982 100644 --- a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts +++ b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts @@ -164,7 +164,7 @@ export class NgBuildAnalyticsPlugin { // Check whether this is an Ivy app so that it can reported as part of analytics. if (!this._stats.isIvy) { - if (numIvyComponents > 0 || module._source.source().includes('ngModuleDef')) { + if (numIvyComponents > 0 || module._source.source().includes('ɵmod')) { this._stats.isIvy = true; } } diff --git a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts index 2cc708bbd577..0822372967fb 100644 --- a/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts @@ -80,7 +80,7 @@ describe('Browser Builder lazy modules', () => { if (!veEnabled) { const data = await files['lazy-lazy-module.js']; expect(data).not.toBeUndefined('Lazy module output bundle does not exist'); - expect(data).toContain('LazyModule.ngModuleDef'); + expect(data).toContain('LazyModule.ɵmod'); } else { expect(files['lazy-lazy-module-ngfactory.js']).not.toBeUndefined(); } @@ -270,7 +270,7 @@ describe('Browser Builder lazy modules', () => { if (!veEnabled) { const data = await files['src-app-lazy-lazy-module.js']; expect(data).not.toBeUndefined('Lazy module output bundle does not exist'); - expect(data).toContain('LazyModule.ngModuleDef'); + expect(data).toContain('LazyModule.ɵmod'); } else { expect(files['src-app-lazy-lazy-module-ngfactory.js']).not.toBeUndefined(); } diff --git a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts index ec8f526dd440..3ca89cf349b1 100644 --- a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts @@ -37,7 +37,7 @@ describe('Server Builder', () => { if (veEnabled) { expect(content).toMatch(/AppServerModuleNgFactory/); } else { - expect(content).toMatch(/AppServerModule\.ngModuleDef/); + expect(content).toMatch(/AppServerModule\.ɵmod/); } await run.stop(); @@ -148,7 +148,7 @@ describe('Server Builder', () => { if (veEnabled) { expect(content).toMatch(/AppServerModuleNgFactory/); } else { - expect(content).toMatch(/AppServerModule\.ngModuleDef/); + expect(content).toMatch(/AppServerModule\.ɵmod/); } }), take(1), diff --git a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts index b4d0e8917c4b..98c57053a8ac 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums_spec.ts @@ -124,7 +124,7 @@ describe('wrap enums and classes transformer', () => { class ApplicationModule { constructor(appRef) { } } - ApplicationModule.ngModuleDef = ɵɵdefineNgModule({ type: ApplicationModule }); + ApplicationModule.ɵmod = ɵɵdefineNgModule({ type: ApplicationModule }); /*@__PURE__*/ setClassMetadata(ApplicationModule, [{ type: NgModule, args: [{ providers: APPLICATION_MODULE_PROVIDERS }] @@ -148,7 +148,7 @@ describe('wrap enums and classes transformer', () => { it('with nested static properties in IIFE', () => { const input = tags.stripIndent` class CommonModule { } - CommonModule.ngModuleDef = defineNgModule({ + CommonModule.ɵmod = defineNgModule({ type: CommonModule }), CommonModule.ngInjectorDef = defineInjector({ factory: function (t) { From 3380d67a1ef3b7a6d07a574baa52f56e2a17cd7f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 16 Oct 2019 12:13:28 +0200 Subject: [PATCH 0312/1070] test: update nguniversal test for version 9 --- .../e2e/tests/build/platform-server.ts | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index a2e6cc4f84b7..6ff3882055b9 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -1,6 +1,6 @@ import { normalize } from 'path'; import { getGlobalVariable } from '../../utils/env'; -import { expectFileToMatch, writeFile } from '../../utils/fs'; +import { appendToFile, expectFileToMatch, writeFile } from '../../utils/fs'; import { exec, ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { readNgVersion } from '../../utils/version'; @@ -9,9 +9,7 @@ export default async function () { const argv = getGlobalVariable('argv'); const veEnabled = argv['ve']; - await ng('add', '@nguniversal/express-engine', '--client-project', 'test-project'); - // todo remove once https://github.com/angular/universal/pull/1229 is landed - await silentNpm('install', '@types/express', '--save-dev'); + await ng('add', '@nguniversal/express-engine@9.0.0-next.5'); await updateJsonFile('package.json', packageJson => { const dependencies = packageJson['dependencies']; @@ -22,32 +20,40 @@ export default async function () { await silentNpm('install'); if (veEnabled) { + // todo: https://github.com/angular/angular-cli/issues/15851 + // We need to fix the 'export_ngfactory' transformer as with the + // new universal approach the factory is not exported. + await appendToFile( + './src/main.server.ts', + `export { AppServerModuleNgFactory } from './app/app.server.module.ngfactory'`, + ); + await writeFile( - './index.js', - ` require('zone.js/dist/zone-node'); - const fs = require('fs'); - const { AppServerModuleNgFactory, renderModuleFactory } = require('./dist/server/main'); + './server.ts', + ` import 'zone.js/dist/zone-node'; + import * as fs from 'fs'; + import { AppServerModuleNgFactory, renderModuleFactory } from './src/main.server'; renderModuleFactory(AppServerModuleNgFactory, { url: '/', document: '' }).then(html => { - fs.writeFileSync('dist/server/index.html', html); + fs.writeFileSync('dist/test-project/server/index.html', html); }); `, ); } else { await writeFile( - './index.js', - ` require('zone.js/dist/zone-node'); - const fs = require('fs'); - const { AppServerModule, renderModule } = require('./dist/server/main'); + './server.ts', + ` import 'zone.js/dist/zone-node'; + import * as fs from 'fs'; + import { AppServerModule, renderModule } from './src/main.server'; renderModule(AppServerModule, { url: '/', document: '' }).then(html => { - fs.writeFileSync('dist/server/index.html', html); + fs.writeFileSync('dist/test-project/server/index.html', html); }); `, ); @@ -56,18 +62,18 @@ export default async function () { await ng('run', 'test-project:server:production', '--optimization', 'false'); - await expectFileToMatch('dist/server/main.js', veEnabled ? /exports.*AppServerModuleNgFactory/ : /exports.*AppServerModule/); - await exec(normalize('node'), 'index.js'); + await expectFileToMatch('dist/test-project/server/main.js', veEnabled ? /exports.*AppServerModuleNgFactory/ : /exports.*AppServerModule/); + await exec(normalize('node'), 'dist/test-project/server/main.js'); await expectFileToMatch( - 'dist/server/index.html', + 'dist/test-project/server/index.html', /Here are some links to help you get started:<\/p>/, ); // works with optimization and bundleDependencies enabled await ng('run', 'test-project:server:production', '--optimization', '--bundleDependencies', 'all'); - await exec(normalize('node'), 'index.js'); + await exec(normalize('node'), 'dist/test-project/server/main.js'); await expectFileToMatch( - 'dist/server/index.html', + 'dist/test-project/server/index.html', /Here are some links to help you get started:<\/p>/, ); } From 90a29255da13c44962ff0cc155d68dfc9dbc6b78 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 16 Oct 2019 14:40:15 +0200 Subject: [PATCH 0313/1070] =?UTF-8?q?refactor(@angular-devkit/build-angula?= =?UTF-8?q?r):=20remove=20branch=20that=20checks=20for=20`=C9=B5mod`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under VE this symbol exists in ngfactories and hence it is not safe to use it to determine if the app is running under ivy --- .../build_angular/plugins/webpack/analytics.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts index 974c4c619982..a3fceb133f79 100644 --- a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts +++ b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts @@ -163,10 +163,8 @@ export class NgBuildAnalyticsPlugin { this._stats.numberOfComponents += numIvyComponents; // Check whether this is an Ivy app so that it can reported as part of analytics. - if (!this._stats.isIvy) { - if (numIvyComponents > 0 || module._source.source().includes('ɵmod')) { - this._stats.isIvy = true; - } + if (!this._stats.isIvy && numIvyComponents > 0) { + this._stats.isIvy = true; } } } From 012929a8ac8aded573b45ea2a8ba0b37b135b084 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Wed, 16 Oct 2019 07:31:07 -0700 Subject: [PATCH 0314/1070] release: v9.0.0-next.10 --- packages/schematics/angular/utility/latest-versions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 43237baf9267..926dae9a3d5f 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,9 +15,9 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.9', - DevkitBuildNgPackagr: '~0.900.0-next.9', - DevkitBuildWebpack: '~0.900.0-next.9', + DevkitBuildAngular: '~0.900.0-next.10', + DevkitBuildNgPackagr: '~0.900.0-next.10', + DevkitBuildWebpack: '~0.900.0-next.10', ngPackagr: '^5.5.1', }; From 7612d3e2003bf1a0cf8d66e4ebb11d43ac59bd9f Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 15 Oct 2019 11:19:34 +0100 Subject: [PATCH 0315/1070] build: use TS 3.6.4 --- .../angular_devkit/core/src/_golden-api.d.ts | 2 +- package.json | 2 +- .../angular_devkit/build_angular/package.json | 2 +- .../build_optimizer/package.json | 2 +- packages/ngtools/webpack/package.json | 4 +- .../src/transformers/ctor-parameters_spec.ts | 26 +- .../transformers/remove_decorators_spec.ts | 12 +- .../src/transformers/replace_resources.ts | 4 +- .../transformers/replace_resources_spec.ts | 70 +- .../Microsoft/TypeScript/lib/typescript.d.ts | 1322 +- .../Microsoft/TypeScript/lib/typescript.js | 11600 ++++++++++------ .../blank/project-files/package.json.template | 2 +- .../schematics/schematic/files/package.json | 2 +- .../webpack/test-app-weird/package.json | 2 +- .../e2e/assets/webpack/test-app/package.json | 2 +- .../webpack/test-server-app/package.json | 2 +- yarn.lock | 8 +- 17 files changed, 8337 insertions(+), 4727 deletions(-) diff --git a/etc/api/angular_devkit/core/src/_golden-api.d.ts b/etc/api/angular_devkit/core/src/_golden-api.d.ts index c9226acff2e1..af24be598705 100644 --- a/etc/api/angular_devkit/core/src/_golden-api.d.ts +++ b/etc/api/angular_devkit/core/src/_golden-api.d.ts @@ -689,7 +689,7 @@ export declare function parseJsonPointer(pointer: JsonPointer): string[]; export declare class PartiallyOrderedSet implements Set { readonly [Symbol.toStringTag]: 'Set'; readonly size: number; - [Symbol.iterator](): IterableIterator; + [Symbol.iterator](): Generator; protected _checkCircularDependencies(item: T, deps: Set): void; add(item: T, deps?: (Set | T[])): this; clear(): void; diff --git a/package.json b/package.json index 3f19c2610f86..f21e4e04b485 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "quicktype-core": "^6.0.15", "temp": "^0.9.0", "tslint": "^5.15.0", - "typescript": "3.5.3" + "typescript": "3.6.4" }, "devDependencies": { "@angular/compiler": "9.0.0-next.11", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index f48c863eb23d..643d891a86f2 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -98,6 +98,6 @@ }, "peerDependencies": { "@angular/compiler-cli": "^8.0.0-beta.0 || ^8.1.0-beta.0 || ^8.2.0-beta.0 || ^8.3.0-beta.0 || ^8.4.0-beta.0 || >=9.0.0-beta < 9", - "typescript": ">=3.1 < 3.6" + "typescript": ">=3.1 < 3.7" } } diff --git a/packages/angular_devkit/build_optimizer/package.json b/packages/angular_devkit/build_optimizer/package.json index 05c80b97e3c2..db2759e3426d 100644 --- a/packages/angular_devkit/build_optimizer/package.json +++ b/packages/angular_devkit/build_optimizer/package.json @@ -12,7 +12,7 @@ "loader-utils": "1.2.3", "source-map": "0.7.3", "tslib": "1.10.0", - "typescript": "3.5.3", + "typescript": "3.6.4", "webpack-sources": "1.4.3" } } diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index d6a87aee0735..845bd1390a9a 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -29,13 +29,13 @@ }, "peerDependencies": { "@angular/compiler-cli": "^8.0.0-beta.0 || ^8.1.0-beta.0 || ^8.2.0-beta.0 || ^8.3.0-beta.0 || ^8.4.0-beta.0 || >=9.0.0-beta < 9", - "typescript": ">=3.4 < 3.6", + "typescript": ">=3.4 < 3.7", "webpack": "^4.0.0" }, "devDependencies": { "@angular/compiler": "9.0.0-next.11", "@angular/compiler-cli": "9.0.0-next.11", - "typescript": "3.5.3", + "typescript": "3.6.4", "webpack": "4.41.1" } } diff --git a/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts b/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts index ae881fa82818..45b88e5aac22 100644 --- a/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts +++ b/packages/ngtools/webpack/src/transformers/ctor-parameters_spec.ts @@ -29,11 +29,11 @@ describe('Constructor Parameter Transformer', () => { `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate } from "tslib"; export class ClassInject { } ; let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: ClassInject } ]; - MyService = tslib_1.__decorate([ Injectable() ], MyService); + MyService = __decorate([ Injectable() ], MyService); export { MyService }; `; @@ -78,13 +78,13 @@ describe('Constructor Parameter Transformer', () => { `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate } from "tslib"; let RootProvidedService = class RootProvidedService { constructor() { } }; - RootProvidedService = tslib_1.__decorate([ Injectable({ providedIn: 'root' }) ], RootProvidedService); + RootProvidedService = __decorate([ Injectable({ providedIn: 'root' }) ], RootProvidedService); export { RootProvidedService }; let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: RootProvidedService } ]; - MyService = tslib_1.__decorate([ Injectable() ], MyService); + MyService = __decorate([ Injectable() ], MyService); export { MyService }; `; @@ -115,14 +115,14 @@ describe('Constructor Parameter Transformer', () => { `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate } from "tslib"; import { RootProvidedService } from './root-provided-service'; let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: RootProvidedService } ]; - MyService = tslib_1.__decorate([ Injectable() ], MyService); + MyService = __decorate([ Injectable() ], MyService); export { MyService }; `; @@ -143,11 +143,11 @@ describe('Constructor Parameter Transformer', () => { `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate, __param } from "tslib"; export const INTERFACE_INJECT = new InjectionToken('interface-inject'); let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: undefined, decorators: [{ type: Inject, args: [INTERFACE_INJECT,] }] } ]; - MyService = tslib_1.__decorate([ Injectable(), tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); + MyService = __decorate([ Injectable(), __param(0, Inject(INTERFACE_INJECT)) ], MyService); export { MyService }; `; @@ -168,11 +168,11 @@ describe('Constructor Parameter Transformer', () => { `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate, __param } from "tslib"; export const INTERFACE_INJECT = new InjectionToken('interface-inject'); let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: undefined, decorators: [{ type: Inject, args: [INTERFACE_INJECT,] }] } ]; - MyService = tslib_1.__decorate([ Injectable(), tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); + MyService = __decorate([ Injectable(), __param(0, Inject(INTERFACE_INJECT)) ], MyService); export { MyService }; `; @@ -199,11 +199,11 @@ describe('Constructor Parameter Transformer', () => { `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate, __param } from "tslib"; import { INTERFACE_INJECT } from './module-inject'; let MyService = class MyService { constructor(v) { } }; MyService.ctorParameters = () => [ { type: undefined, decorators: [{ type: Inject, args: [INTERFACE_INJECT,] }] } ]; - MyService = tslib_1.__decorate([ Injectable(), tslib_1.__param(0, Inject(INTERFACE_INJECT)) ], MyService); + MyService = __decorate([ Injectable(), __param(0, Inject(INTERFACE_INJECT)) ], MyService); export { MyService }; `; diff --git a/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts b/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts index 9f563e0f74c7..4ef3c52e9965 100644 --- a/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts +++ b/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts @@ -57,14 +57,14 @@ describe('@ngtools/webpack transformers', () => { } `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate } from "tslib"; import { Component } from 'another-lib'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', templateUrl: './app.component.html', @@ -105,7 +105,7 @@ describe('@ngtools/webpack transformers', () => { } `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate } from "tslib"; import { AnotherDecorator } from 'another-lib'; export class AppComponent { @@ -117,7 +117,7 @@ describe('@ngtools/webpack transformers', () => { console.log('run'); } } - tslib_1.__decorate([ + __decorate([ AnotherDecorator() ], AppComponent.prototype, "onEscape", null); `; @@ -148,7 +148,7 @@ describe('@ngtools/webpack transformers', () => { } `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate } from "tslib"; import { AnotherDecorator } from 'another-lib'; let AppComponent = class AppComponent { @@ -156,7 +156,7 @@ describe('@ngtools/webpack transformers', () => { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ AnotherDecorator() ], AppComponent); export { AppComponent }; diff --git a/packages/ngtools/webpack/src/transformers/replace_resources.ts b/packages/ngtools/webpack/src/transformers/replace_resources.ts index dd993964fabb..deb7f0138658 100644 --- a/packages/ngtools/webpack/src/transformers/replace_resources.ts +++ b/packages/ngtools/webpack/src/transformers/replace_resources.ts @@ -39,8 +39,10 @@ export function replaceResources( }; // emit helper for `import Name from "foo"` - const importDefaultHelper: ts.EmitHelper = { + // importName is marked as an internal property but is needed for the tslib import. + const importDefaultHelper: ts.UnscopedEmitHelper & { importName?: string; } = { name: 'typescript:commonjsimportdefault', + importName: '__importDefault', scoped: false, text: tags.stripIndent` var __importDefault = (this && this.__importDefault) || function (mod) { diff --git a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts index db1a4cb752cd..6094ea284433 100644 --- a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts +++ b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts @@ -43,18 +43,18 @@ describe('@ngtools/webpack transformers', () => { } `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', - template: tslib_1.__importDefault(require("!raw-loader!./app.component.html")).default, - styles: [tslib_1.__importDefault(require("./app.component.css")).default, tslib_1.__importDefault(require("./app.component.2.css")).default] + template: __importDefault(require("!raw-loader!./app.component.html")).default, + styles: [__importDefault(require("./app.component.css")).default, __importDefault(require("./app.component.2.css")).default] }) ], AppComponent); export { AppComponent }; @@ -124,18 +124,18 @@ describe('@ngtools/webpack transformers', () => { } `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', - template: tslib_1.__importDefault(require("./app.component.html")).default, - styles: [tslib_1.__importDefault(require("./app.component.css")).default, tslib_1.__importDefault(require("./app.component.2.css")).default] + template: __importDefault(require("./app.component.html")).default, + styles: [__importDefault(require("./app.component.css")).default, __importDefault(require("./app.component.2.css")).default] }) ], AppComponent); export { AppComponent }; @@ -159,17 +159,17 @@ describe('@ngtools/webpack transformers', () => { } `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', - template: tslib_1.__importDefault(require("!raw-loader!./app.component.svg")).default + template: __importDefault(require("!raw-loader!./app.component.svg")).default }) ], AppComponent); export { AppComponent }; @@ -194,18 +194,18 @@ describe('@ngtools/webpack transformers', () => { } `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', - template: tslib_1.__importDefault(require("!raw-loader!./app.component.html")).default, - styles: ["a { color: red }", tslib_1.__importDefault(require("./app.component.css")).default] + template: __importDefault(require("!raw-loader!./app.component.html")).default, + styles: ["a { color: red }", __importDefault(require("./app.component.css")).default] }) ], AppComponent); export { AppComponent }; @@ -229,18 +229,18 @@ describe('@ngtools/webpack transformers', () => { } `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', - template: tslib_1.__importDefault(require("!raw-loader!./app.component.html")).default, - styles: [tslib_1.__importDefault(require("./app.component.css")).default, tslib_1.__importDefault(require("./app.component.2.css")).default] + template: __importDefault(require("!raw-loader!./app.component.html")).default, + styles: [__importDefault(require("./app.component.css")).default, __importDefault(require("./app.component.2.css")).default] }) ], AppComponent); export { AppComponent }; @@ -264,18 +264,18 @@ describe('@ngtools/webpack transformers', () => { } `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import { Component as NgComponent } from '@angular/core'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ NgComponent({ selector: 'app-root', - template: tslib_1.__importDefault(require("!raw-loader!./app.component.html")).default, - styles: [tslib_1.__importDefault(require("./app.component.css")).default, tslib_1.__importDefault(require("./app.component.2.css")).default] + template: __importDefault(require("!raw-loader!./app.component.html")).default, + styles: [__importDefault(require("./app.component.css")).default, __importDefault(require("./app.component.2.css")).default] }) ], AppComponent); export { AppComponent }; @@ -303,18 +303,18 @@ describe('@ngtools/webpack transformers', () => { } `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import * as ng from '@angular/core'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ ng.Component({ selector: 'app-root', - template: tslib_1.__importDefault(require("!raw-loader!./app.component.html")).default, - styles: [tslib_1.__importDefault(require("./app.component.css")).default, tslib_1.__importDefault(require("./app.component.2.css")).default] + template: __importDefault(require("!raw-loader!./app.component.html")).default, + styles: [__importDefault(require("./app.component.css")).default, __importDefault(require("./app.component.2.css")).default] }) ], AppComponent); export { AppComponent }; @@ -344,7 +344,7 @@ describe('@ngtools/webpack transformers', () => { `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { @@ -358,11 +358,11 @@ describe('@ngtools/webpack transformers', () => { } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', - template: tslib_1.__importDefault(require("!raw-loader!./app.component.html")).default, - styles: [tslib_1.__importDefault(require("./app.component.css")).default] + template: __importDefault(require("!raw-loader!./app.component.html")).default, + styles: [__importDefault(require("./app.component.css")).default] }) ], AppComponent); export { AppComponent }; @@ -392,7 +392,7 @@ describe('@ngtools/webpack transformers', () => { `; const output = tags.stripIndent` - import * as tslib_1 from "tslib"; + import { __decorate, __importDefault } from "tslib"; import { Component } from 'foo'; let AppComponent = class AppComponent { @@ -406,7 +406,7 @@ describe('@ngtools/webpack transformers', () => { } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', templateUrl: './app.component.html', @@ -434,14 +434,14 @@ describe('@ngtools/webpack transformers', () => { } `; const output = ` - import * as tslib_1 from "tslib"; + import { __decorate } from "tslib"; import { Component } from '@angular/core'; let AppComponent = class AppComponent { constructor() { this.title = 'app'; } }; - AppComponent = tslib_1.__decorate([ + AppComponent = __decorate([ Component({ selector: 'app-root', templateUrl: './app.component.html', diff --git a/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts b/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts index 58ccd42344b0..0d6170aa8adf 100644 --- a/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +++ b/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts @@ -1,20 +1,20 @@ /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. +Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - +License at http://www.apache.org/licenses/LICENSE-2.0 + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.5"; + const versionMajorMinor = "3.6"; /** The version of the TypeScript compiler release */ const version: string; } @@ -53,7 +53,7 @@ declare namespace ts { interface Iterator { next(): { value: T; - done: false; + done?: false; } | { value: never; done: true; @@ -65,17 +65,17 @@ declare namespace ts { } } declare namespace ts { - type Path = string & { + export type Path = string & { __pathBrand: any; }; - interface TextRange { + export interface TextRange { pos: number; end: number; } - type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InferKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.OfKeyword; - type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; - enum SyntaxKind { + export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind; + export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InferKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.OfKeyword; + export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; + export enum SyntaxKind { Unknown = 0, EndOfFileToken = 1, SingleLineCommentTrivia = 2, @@ -374,28 +374,30 @@ declare namespace ts { JSDocOptionalType = 294, JSDocFunctionType = 295, JSDocVariadicType = 296, - JSDocComment = 297, - JSDocTypeLiteral = 298, - JSDocSignature = 299, - JSDocTag = 300, - JSDocAugmentsTag = 301, - JSDocClassTag = 302, - JSDocCallbackTag = 303, - JSDocEnumTag = 304, - JSDocParameterTag = 305, - JSDocReturnTag = 306, - JSDocThisTag = 307, - JSDocTypeTag = 308, - JSDocTemplateTag = 309, - JSDocTypedefTag = 310, - JSDocPropertyTag = 311, - SyntaxList = 312, - NotEmittedStatement = 313, - PartiallyEmittedExpression = 314, - CommaListExpression = 315, - MergeDeclarationMarker = 316, - EndOfDeclarationMarker = 317, - Count = 318, + JSDocNamepathType = 297, + JSDocComment = 298, + JSDocTypeLiteral = 299, + JSDocSignature = 300, + JSDocTag = 301, + JSDocAugmentsTag = 302, + JSDocAuthorTag = 303, + JSDocClassTag = 304, + JSDocCallbackTag = 305, + JSDocEnumTag = 306, + JSDocParameterTag = 307, + JSDocReturnTag = 308, + JSDocThisTag = 309, + JSDocTypeTag = 310, + JSDocTemplateTag = 311, + JSDocTypedefTag = 312, + JSDocPropertyTag = 313, + SyntaxList = 314, + NotEmittedStatement = 315, + PartiallyEmittedExpression = 316, + CommaListExpression = 317, + MergeDeclarationMarker = 318, + EndOfDeclarationMarker = 319, + Count = 320, FirstAssignment = 60, LastAssignment = 72, FirstCompoundAssignment = 61, @@ -422,11 +424,11 @@ declare namespace ts { LastBinaryOperator = 72, FirstNode = 149, FirstJSDocNode = 289, - LastJSDocNode = 311, - FirstJSDocTagNode = 300, - LastJSDocTagNode = 311, + LastJSDocNode = 313, + FirstJSDocTagNode = 301, + LastJSDocTagNode = 313, } - enum NodeFlags { + export enum NodeFlags { None = 0, Let = 1, Const = 2, @@ -455,7 +457,7 @@ declare namespace ts { ContextFlags = 12679168, TypeExcludesFlags = 20480, } - enum ModifierFlags { + export enum ModifierFlags { None = 0, Export = 1, Ambient = 2, @@ -476,7 +478,7 @@ declare namespace ts { ExportDefault = 513, All = 3071 } - enum JsxFlags { + export enum JsxFlags { None = 0, /** An element from a named property of the JSX.IntrinsicElements interface */ IntrinsicNamedElement = 1, @@ -484,40 +486,40 @@ declare namespace ts { IntrinsicIndexedElement = 2, IntrinsicElement = 3 } - interface Node extends TextRange { + export interface Node extends TextRange { kind: SyntaxKind; flags: NodeFlags; decorators?: NodeArray; modifiers?: ModifiersArray; parent: Node; } - interface JSDocContainer { + export interface JSDocContainer { } - type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | EndOfFileToken; - type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; - type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; - type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember; - interface NodeArray extends ReadonlyArray, TextRange { + export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | EndOfFileToken; + export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; + export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; + export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember; + export interface NodeArray extends ReadonlyArray, TextRange { hasTrailingComma?: boolean; } - interface Token extends Node { + export interface Token extends Node { kind: TKind; } - type DotDotDotToken = Token; - type QuestionToken = Token; - type ExclamationToken = Token; - type ColonToken = Token; - type EqualsToken = Token; - type AsteriskToken = Token; - type EqualsGreaterThanToken = Token; - type EndOfFileToken = Token & JSDocContainer; - type ReadonlyToken = Token; - type AwaitKeywordToken = Token; - type PlusToken = Token; - type MinusToken = Token; - type Modifier = Token | Token | Token | Token | Token | Token | Token | Token | Token | Token | Token; - type ModifiersArray = NodeArray; - interface Identifier extends PrimaryExpression, Declaration { + export type DotDotDotToken = Token; + export type QuestionToken = Token; + export type ExclamationToken = Token; + export type ColonToken = Token; + export type EqualsToken = Token; + export type AsteriskToken = Token; + export type EqualsGreaterThanToken = Token; + export type EndOfFileToken = Token & JSDocContainer; + export type ReadonlyToken = Token; + export type AwaitKeywordToken = Token; + export type PlusToken = Token; + export type MinusToken = Token; + export type Modifier = Token | Token | Token | Token | Token | Token | Token | Token | Token | Token | Token; + export type ModifiersArray = NodeArray; + export interface Identifier extends PrimaryExpression, Declaration { kind: SyntaxKind.Identifier; /** * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.) @@ -527,37 +529,37 @@ declare namespace ts { originalKeywordKind?: SyntaxKind; isInJSDocNamespace?: boolean; } - interface TransientIdentifier extends Identifier { + export interface TransientIdentifier extends Identifier { resolvedSymbol: Symbol; } - interface QualifiedName extends Node { + export interface QualifiedName extends Node { kind: SyntaxKind.QualifiedName; left: EntityName; right: Identifier; } - type EntityName = Identifier | QualifiedName; - type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName; - type DeclarationName = Identifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | BindingPattern; - interface Declaration extends Node { + export type EntityName = Identifier | QualifiedName; + export type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName; + export type DeclarationName = Identifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | BindingPattern; + export interface Declaration extends Node { _declarationBrand: any; } - interface NamedDeclaration extends Declaration { + export interface NamedDeclaration extends Declaration { name?: DeclarationName; } - interface DeclarationStatement extends NamedDeclaration, Statement { + export interface DeclarationStatement extends NamedDeclaration, Statement { name?: Identifier | StringLiteral | NumericLiteral; } - interface ComputedPropertyName extends Node { + export interface ComputedPropertyName extends Node { parent: Declaration; kind: SyntaxKind.ComputedPropertyName; expression: Expression; } - interface Decorator extends Node { + export interface Decorator extends Node { kind: SyntaxKind.Decorator; parent: NamedDeclaration; expression: LeftHandSideExpression; } - interface TypeParameterDeclaration extends NamedDeclaration { + export interface TypeParameterDeclaration extends NamedDeclaration { kind: SyntaxKind.TypeParameter; parent: DeclarationWithTypeParameterChildren | InferTypeNode; name: Identifier; @@ -566,22 +568,22 @@ declare namespace ts { default?: TypeNode; expression?: Expression; } - interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer { + export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer { kind: SignatureDeclaration["kind"]; name?: PropertyName; typeParameters?: NodeArray; parameters: NodeArray; type?: TypeNode; } - type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction; - interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement { + export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction; + export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement { kind: SyntaxKind.CallSignature; } - interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement { + export interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement { kind: SyntaxKind.ConstructSignature; } - type BindingName = Identifier | BindingPattern; - interface VariableDeclaration extends NamedDeclaration { + export type BindingName = Identifier | BindingPattern; + export interface VariableDeclaration extends NamedDeclaration { kind: SyntaxKind.VariableDeclaration; parent: VariableDeclarationList | CatchClause; name: BindingName; @@ -589,12 +591,12 @@ declare namespace ts { type?: TypeNode; initializer?: Expression; } - interface VariableDeclarationList extends Node { + export interface VariableDeclarationList extends Node { kind: SyntaxKind.VariableDeclarationList; parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement; declarations: NodeArray; } - interface ParameterDeclaration extends NamedDeclaration, JSDocContainer { + export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer { kind: SyntaxKind.Parameter; parent: SignatureDeclaration; dotDotDotToken?: DotDotDotToken; @@ -603,7 +605,7 @@ declare namespace ts { type?: TypeNode; initializer?: Expression; } - interface BindingElement extends NamedDeclaration { + export interface BindingElement extends NamedDeclaration { kind: SyntaxKind.BindingElement; parent: BindingPattern; propertyName?: PropertyName; @@ -611,14 +613,14 @@ declare namespace ts { name: BindingName; initializer?: Expression; } - interface PropertySignature extends TypeElement, JSDocContainer { + export interface PropertySignature extends TypeElement, JSDocContainer { kind: SyntaxKind.PropertySignature; name: PropertyName; questionToken?: QuestionToken; type?: TypeNode; initializer?: Expression; } - interface PropertyDeclaration extends ClassElement, JSDocContainer { + export interface PropertyDeclaration extends ClassElement, JSDocContainer { kind: SyntaxKind.PropertyDeclaration; parent: ClassLikeDeclaration; name: PropertyName; @@ -627,20 +629,20 @@ declare namespace ts { type?: TypeNode; initializer?: Expression; } - interface ObjectLiteralElement extends NamedDeclaration { + export interface ObjectLiteralElement extends NamedDeclaration { _objectLiteralBrand: any; name?: PropertyName; } /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */ - type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration; - interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer { + export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration; + export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer { parent: ObjectLiteralExpression; kind: SyntaxKind.PropertyAssignment; name: PropertyName; questionToken?: QuestionToken; initializer: Expression; } - interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { + export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { parent: ObjectLiteralExpression; kind: SyntaxKind.ShorthandPropertyAssignment; name: Identifier; @@ -649,27 +651,27 @@ declare namespace ts { equalsToken?: Token; objectAssignmentInitializer?: Expression; } - interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { + export interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { parent: ObjectLiteralExpression; kind: SyntaxKind.SpreadAssignment; expression: Expression; } - type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; - interface PropertyLikeDeclaration extends NamedDeclaration { + export type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; + export interface PropertyLikeDeclaration extends NamedDeclaration { name: PropertyName; } - interface ObjectBindingPattern extends Node { + export interface ObjectBindingPattern extends Node { kind: SyntaxKind.ObjectBindingPattern; parent: VariableDeclaration | ParameterDeclaration | BindingElement; elements: NodeArray; } - interface ArrayBindingPattern extends Node { + export interface ArrayBindingPattern extends Node { kind: SyntaxKind.ArrayBindingPattern; parent: VariableDeclaration | ParameterDeclaration | BindingElement; elements: NodeArray; } - type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; - type ArrayBindingElement = BindingElement | OmittedExpression; + export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; + export type ArrayBindingElement = BindingElement | OmittedExpression; /** * Several node kinds share function-like features such as a signature, * a name, and a body. These nodes should extend FunctionLikeDeclarationBase. @@ -678,298 +680,298 @@ declare namespace ts { * - MethodDeclaration * - AccessorDeclaration */ - interface FunctionLikeDeclarationBase extends SignatureDeclarationBase { + export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase { _functionLikeDeclarationBrand: any; asteriskToken?: AsteriskToken; questionToken?: QuestionToken; exclamationToken?: ExclamationToken; body?: Block | Expression; } - type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; + export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; /** @deprecated Use SignatureDeclaration */ - type FunctionLike = SignatureDeclaration; - interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement { + export type FunctionLike = SignatureDeclaration; + export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement { kind: SyntaxKind.FunctionDeclaration; name?: Identifier; body?: FunctionBody; } - interface MethodSignature extends SignatureDeclarationBase, TypeElement { + export interface MethodSignature extends SignatureDeclarationBase, TypeElement { kind: SyntaxKind.MethodSignature; parent: ObjectTypeDeclaration; name: PropertyName; } - interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { + export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { kind: SyntaxKind.MethodDeclaration; parent: ClassLikeDeclaration | ObjectLiteralExpression; name: PropertyName; body?: FunctionBody; } - interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer { + export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer { kind: SyntaxKind.Constructor; parent: ClassLikeDeclaration; body?: FunctionBody; } /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */ - interface SemicolonClassElement extends ClassElement { + export interface SemicolonClassElement extends ClassElement { kind: SyntaxKind.SemicolonClassElement; parent: ClassLikeDeclaration; } - interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { + export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { kind: SyntaxKind.GetAccessor; parent: ClassLikeDeclaration | ObjectLiteralExpression; name: PropertyName; body?: FunctionBody; } - interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { + export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer { kind: SyntaxKind.SetAccessor; parent: ClassLikeDeclaration | ObjectLiteralExpression; name: PropertyName; body?: FunctionBody; } - type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration; - interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement { + export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration; + export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement { kind: SyntaxKind.IndexSignature; parent: ObjectTypeDeclaration; } - interface TypeNode extends Node { + export interface TypeNode extends Node { _typeNodeBrand: any; } - interface KeywordTypeNode extends TypeNode { + export interface KeywordTypeNode extends TypeNode { kind: SyntaxKind.AnyKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.NumberKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword; } - interface ImportTypeNode extends NodeWithTypeArguments { + export interface ImportTypeNode extends NodeWithTypeArguments { kind: SyntaxKind.ImportType; isTypeOf?: boolean; argument: TypeNode; qualifier?: EntityName; } - interface ThisTypeNode extends TypeNode { + export interface ThisTypeNode extends TypeNode { kind: SyntaxKind.ThisType; } - type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode; - interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase { + export type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode; + export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase { kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType; type: TypeNode; } - interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase { + export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase { kind: SyntaxKind.FunctionType; } - interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase { + export interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase { kind: SyntaxKind.ConstructorType; } - interface NodeWithTypeArguments extends TypeNode { + export interface NodeWithTypeArguments extends TypeNode { typeArguments?: NodeArray; } - type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments; - interface TypeReferenceNode extends NodeWithTypeArguments { + export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments; + export interface TypeReferenceNode extends NodeWithTypeArguments { kind: SyntaxKind.TypeReference; typeName: EntityName; } - interface TypePredicateNode extends TypeNode { + export interface TypePredicateNode extends TypeNode { kind: SyntaxKind.TypePredicate; parent: SignatureDeclaration | JSDocTypeExpression; parameterName: Identifier | ThisTypeNode; type: TypeNode; } - interface TypeQueryNode extends TypeNode { + export interface TypeQueryNode extends TypeNode { kind: SyntaxKind.TypeQuery; exprName: EntityName; } - interface TypeLiteralNode extends TypeNode, Declaration { + export interface TypeLiteralNode extends TypeNode, Declaration { kind: SyntaxKind.TypeLiteral; members: NodeArray; } - interface ArrayTypeNode extends TypeNode { + export interface ArrayTypeNode extends TypeNode { kind: SyntaxKind.ArrayType; elementType: TypeNode; } - interface TupleTypeNode extends TypeNode { + export interface TupleTypeNode extends TypeNode { kind: SyntaxKind.TupleType; elementTypes: NodeArray; } - interface OptionalTypeNode extends TypeNode { + export interface OptionalTypeNode extends TypeNode { kind: SyntaxKind.OptionalType; type: TypeNode; } - interface RestTypeNode extends TypeNode { + export interface RestTypeNode extends TypeNode { kind: SyntaxKind.RestType; type: TypeNode; } - type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode; - interface UnionTypeNode extends TypeNode { + export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode; + export interface UnionTypeNode extends TypeNode { kind: SyntaxKind.UnionType; types: NodeArray; } - interface IntersectionTypeNode extends TypeNode { + export interface IntersectionTypeNode extends TypeNode { kind: SyntaxKind.IntersectionType; types: NodeArray; } - interface ConditionalTypeNode extends TypeNode { + export interface ConditionalTypeNode extends TypeNode { kind: SyntaxKind.ConditionalType; checkType: TypeNode; extendsType: TypeNode; trueType: TypeNode; falseType: TypeNode; } - interface InferTypeNode extends TypeNode { + export interface InferTypeNode extends TypeNode { kind: SyntaxKind.InferType; typeParameter: TypeParameterDeclaration; } - interface ParenthesizedTypeNode extends TypeNode { + export interface ParenthesizedTypeNode extends TypeNode { kind: SyntaxKind.ParenthesizedType; type: TypeNode; } - interface TypeOperatorNode extends TypeNode { + export interface TypeOperatorNode extends TypeNode { kind: SyntaxKind.TypeOperator; operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword; type: TypeNode; } - interface IndexedAccessTypeNode extends TypeNode { + export interface IndexedAccessTypeNode extends TypeNode { kind: SyntaxKind.IndexedAccessType; objectType: TypeNode; indexType: TypeNode; } - interface MappedTypeNode extends TypeNode, Declaration { + export interface MappedTypeNode extends TypeNode, Declaration { kind: SyntaxKind.MappedType; readonlyToken?: ReadonlyToken | PlusToken | MinusToken; typeParameter: TypeParameterDeclaration; questionToken?: QuestionToken | PlusToken | MinusToken; type?: TypeNode; } - interface LiteralTypeNode extends TypeNode { + export interface LiteralTypeNode extends TypeNode { kind: SyntaxKind.LiteralType; literal: BooleanLiteral | LiteralExpression | PrefixUnaryExpression; } - interface StringLiteral extends LiteralExpression { + export interface StringLiteral extends LiteralExpression { kind: SyntaxKind.StringLiteral; } - type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; - interface Expression extends Node { + export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; + export interface Expression extends Node { _expressionBrand: any; } - interface OmittedExpression extends Expression { + export interface OmittedExpression extends Expression { kind: SyntaxKind.OmittedExpression; } - interface PartiallyEmittedExpression extends LeftHandSideExpression { + export interface PartiallyEmittedExpression extends LeftHandSideExpression { kind: SyntaxKind.PartiallyEmittedExpression; expression: Expression; } - interface UnaryExpression extends Expression { + export interface UnaryExpression extends Expression { _unaryExpressionBrand: any; } /** Deprecated, please use UpdateExpression */ - type IncrementExpression = UpdateExpression; - interface UpdateExpression extends UnaryExpression { + export type IncrementExpression = UpdateExpression; + export interface UpdateExpression extends UnaryExpression { _updateExpressionBrand: any; } - type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken; - interface PrefixUnaryExpression extends UpdateExpression { + export type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken; + export interface PrefixUnaryExpression extends UpdateExpression { kind: SyntaxKind.PrefixUnaryExpression; operator: PrefixUnaryOperator; operand: UnaryExpression; } - type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; - interface PostfixUnaryExpression extends UpdateExpression { + export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; + export interface PostfixUnaryExpression extends UpdateExpression { kind: SyntaxKind.PostfixUnaryExpression; operand: LeftHandSideExpression; operator: PostfixUnaryOperator; } - interface LeftHandSideExpression extends UpdateExpression { + export interface LeftHandSideExpression extends UpdateExpression { _leftHandSideExpressionBrand: any; } - interface MemberExpression extends LeftHandSideExpression { + export interface MemberExpression extends LeftHandSideExpression { _memberExpressionBrand: any; } - interface PrimaryExpression extends MemberExpression { + export interface PrimaryExpression extends MemberExpression { _primaryExpressionBrand: any; } - interface NullLiteral extends PrimaryExpression, TypeNode { + export interface NullLiteral extends PrimaryExpression, TypeNode { kind: SyntaxKind.NullKeyword; } - interface BooleanLiteral extends PrimaryExpression, TypeNode { + export interface BooleanLiteral extends PrimaryExpression, TypeNode { kind: SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword; } - interface ThisExpression extends PrimaryExpression, KeywordTypeNode { + export interface ThisExpression extends PrimaryExpression, KeywordTypeNode { kind: SyntaxKind.ThisKeyword; } - interface SuperExpression extends PrimaryExpression { + export interface SuperExpression extends PrimaryExpression { kind: SyntaxKind.SuperKeyword; } - interface ImportExpression extends PrimaryExpression { + export interface ImportExpression extends PrimaryExpression { kind: SyntaxKind.ImportKeyword; } - interface DeleteExpression extends UnaryExpression { + export interface DeleteExpression extends UnaryExpression { kind: SyntaxKind.DeleteExpression; expression: UnaryExpression; } - interface TypeOfExpression extends UnaryExpression { + export interface TypeOfExpression extends UnaryExpression { kind: SyntaxKind.TypeOfExpression; expression: UnaryExpression; } - interface VoidExpression extends UnaryExpression { + export interface VoidExpression extends UnaryExpression { kind: SyntaxKind.VoidExpression; expression: UnaryExpression; } - interface AwaitExpression extends UnaryExpression { + export interface AwaitExpression extends UnaryExpression { kind: SyntaxKind.AwaitExpression; expression: UnaryExpression; } - interface YieldExpression extends Expression { + export interface YieldExpression extends Expression { kind: SyntaxKind.YieldExpression; asteriskToken?: AsteriskToken; expression?: Expression; } - interface SyntheticExpression extends Expression { + export interface SyntheticExpression extends Expression { kind: SyntaxKind.SyntheticExpression; isSpread: boolean; type: Type; } - type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken; - type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken; - type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator; - type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken; - type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator; - type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken; - type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator; - type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword; - type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator; - type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken; - type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator; - type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken; - type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator; - type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken; - type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator; - type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken; - type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator; - type AssignmentOperatorOrHigher = LogicalOperatorOrHigher | AssignmentOperator; - type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken; - type BinaryOperatorToken = Token; - interface BinaryExpression extends Expression, Declaration { + export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken; + export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken; + export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator; + export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken; + export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator; + export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken; + export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator; + export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword; + export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator; + export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken; + export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator; + export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken; + export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator; + export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken; + export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator; + export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken; + export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator; + export type AssignmentOperatorOrHigher = LogicalOperatorOrHigher | AssignmentOperator; + export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken; + export type BinaryOperatorToken = Token; + export interface BinaryExpression extends Expression, Declaration { kind: SyntaxKind.BinaryExpression; left: Expression; operatorToken: BinaryOperatorToken; right: Expression; } - type AssignmentOperatorToken = Token; - interface AssignmentExpression extends BinaryExpression { + export type AssignmentOperatorToken = Token; + export interface AssignmentExpression extends BinaryExpression { left: LeftHandSideExpression; operatorToken: TOperator; } - interface ObjectDestructuringAssignment extends AssignmentExpression { + export interface ObjectDestructuringAssignment extends AssignmentExpression { left: ObjectLiteralExpression; } - interface ArrayDestructuringAssignment extends AssignmentExpression { + export interface ArrayDestructuringAssignment extends AssignmentExpression { left: ArrayLiteralExpression; } - type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; - type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression | Identifier | PropertyAccessExpression | ElementAccessExpression; - type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment; - type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression; - type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression; - type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression; - type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression; - type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern; - interface ConditionalExpression extends Expression { + export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; + export type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression | Identifier | PropertyAccessExpression | ElementAccessExpression; + export type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment; + export type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression; + export type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression; + export type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression; + export type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression; + export type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern; + export interface ConditionalExpression extends Expression { kind: SyntaxKind.ConditionalExpression; condition: Expression; questionToken: QuestionToken; @@ -977,34 +979,37 @@ declare namespace ts { colonToken: ColonToken; whenFalse: Expression; } - type FunctionBody = Block; - type ConciseBody = FunctionBody | Expression; - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer { + export type FunctionBody = Block; + export type ConciseBody = FunctionBody | Expression; + export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer { kind: SyntaxKind.FunctionExpression; name?: Identifier; body: FunctionBody; } - interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer { + export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer { kind: SyntaxKind.ArrowFunction; equalsGreaterThanToken: EqualsGreaterThanToken; body: ConciseBody; name: never; } - interface LiteralLikeNode extends Node { + export interface LiteralLikeNode extends Node { text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } - interface LiteralExpression extends LiteralLikeNode, PrimaryExpression { + export interface TemplateLiteralLikeNode extends LiteralLikeNode { + rawText?: string; + } + export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression { _literalExpressionBrand: any; } - interface RegularExpressionLiteral extends LiteralExpression { + export interface RegularExpressionLiteral extends LiteralExpression { kind: SyntaxKind.RegularExpressionLiteral; } - interface NoSubstitutionTemplateLiteral extends LiteralExpression { + export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode { kind: SyntaxKind.NoSubstitutionTemplateLiteral; } - enum TokenFlags { + export enum TokenFlags { None = 0, Scientific = 16, Octal = 32, @@ -1012,45 +1017,45 @@ declare namespace ts { BinarySpecifier = 128, OctalSpecifier = 256, } - interface NumericLiteral extends LiteralExpression { + export interface NumericLiteral extends LiteralExpression { kind: SyntaxKind.NumericLiteral; } - interface BigIntLiteral extends LiteralExpression { + export interface BigIntLiteral extends LiteralExpression { kind: SyntaxKind.BigIntLiteral; } - interface TemplateHead extends LiteralLikeNode { + export interface TemplateHead extends TemplateLiteralLikeNode { kind: SyntaxKind.TemplateHead; parent: TemplateExpression; } - interface TemplateMiddle extends LiteralLikeNode { + export interface TemplateMiddle extends TemplateLiteralLikeNode { kind: SyntaxKind.TemplateMiddle; parent: TemplateSpan; } - interface TemplateTail extends LiteralLikeNode { + export interface TemplateTail extends TemplateLiteralLikeNode { kind: SyntaxKind.TemplateTail; parent: TemplateSpan; } - type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; - interface TemplateExpression extends PrimaryExpression { + export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; + export interface TemplateExpression extends PrimaryExpression { kind: SyntaxKind.TemplateExpression; head: TemplateHead; templateSpans: NodeArray; } - interface TemplateSpan extends Node { + export interface TemplateSpan extends Node { kind: SyntaxKind.TemplateSpan; parent: TemplateExpression; expression: Expression; literal: TemplateMiddle | TemplateTail; } - interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer { + export interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer { kind: SyntaxKind.ParenthesizedExpression; expression: Expression; } - interface ArrayLiteralExpression extends PrimaryExpression { + export interface ArrayLiteralExpression extends PrimaryExpression { kind: SyntaxKind.ArrayLiteralExpression; elements: NodeArray; } - interface SpreadElement extends Expression { + export interface SpreadElement extends Expression { kind: SyntaxKind.SpreadElement; parent: ArrayLiteralExpression | CallExpression | NewExpression; expression: Expression; @@ -1061,412 +1066,413 @@ declare namespace ts { * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.) */ - interface ObjectLiteralExpressionBase extends PrimaryExpression, Declaration { + export interface ObjectLiteralExpressionBase extends PrimaryExpression, Declaration { properties: NodeArray; } - interface ObjectLiteralExpression extends ObjectLiteralExpressionBase { + export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase { kind: SyntaxKind.ObjectLiteralExpression; } - type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression; - type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; - interface PropertyAccessExpression extends MemberExpression, NamedDeclaration { + export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression; + export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; + export interface PropertyAccessExpression extends MemberExpression, NamedDeclaration { kind: SyntaxKind.PropertyAccessExpression; expression: LeftHandSideExpression; name: Identifier; } - interface SuperPropertyAccessExpression extends PropertyAccessExpression { + export interface SuperPropertyAccessExpression extends PropertyAccessExpression { expression: SuperExpression; } /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */ - interface PropertyAccessEntityNameExpression extends PropertyAccessExpression { + export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression { _propertyAccessExpressionLikeQualifiedNameBrand?: any; expression: EntityNameExpression; } - interface ElementAccessExpression extends MemberExpression { + export interface ElementAccessExpression extends MemberExpression { kind: SyntaxKind.ElementAccessExpression; expression: LeftHandSideExpression; argumentExpression: Expression; } - interface SuperElementAccessExpression extends ElementAccessExpression { + export interface SuperElementAccessExpression extends ElementAccessExpression { expression: SuperExpression; } - type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression; - interface CallExpression extends LeftHandSideExpression, Declaration { + export type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression; + export interface CallExpression extends LeftHandSideExpression, Declaration { kind: SyntaxKind.CallExpression; expression: LeftHandSideExpression; typeArguments?: NodeArray; arguments: NodeArray; } - interface SuperCall extends CallExpression { + export interface SuperCall extends CallExpression { expression: SuperExpression; } - interface ImportCall extends CallExpression { + export interface ImportCall extends CallExpression { expression: ImportExpression; } - interface ExpressionWithTypeArguments extends NodeWithTypeArguments { + export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; parent: HeritageClause | JSDocAugmentsTag; expression: LeftHandSideExpression; } - interface NewExpression extends PrimaryExpression, Declaration { + export interface NewExpression extends PrimaryExpression, Declaration { kind: SyntaxKind.NewExpression; expression: LeftHandSideExpression; typeArguments?: NodeArray; arguments?: NodeArray; } - interface TaggedTemplateExpression extends MemberExpression { + export interface TaggedTemplateExpression extends MemberExpression { kind: SyntaxKind.TaggedTemplateExpression; tag: LeftHandSideExpression; typeArguments?: NodeArray; template: TemplateLiteral; } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement; - interface AsExpression extends Expression { + export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement; + export interface AsExpression extends Expression { kind: SyntaxKind.AsExpression; expression: Expression; type: TypeNode; } - interface TypeAssertion extends UnaryExpression { + export interface TypeAssertion extends UnaryExpression { kind: SyntaxKind.TypeAssertionExpression; type: TypeNode; expression: UnaryExpression; } - type AssertionExpression = TypeAssertion | AsExpression; - interface NonNullExpression extends LeftHandSideExpression { + export type AssertionExpression = TypeAssertion | AsExpression; + export interface NonNullExpression extends LeftHandSideExpression { kind: SyntaxKind.NonNullExpression; expression: Expression; } - interface MetaProperty extends PrimaryExpression { + export interface MetaProperty extends PrimaryExpression { kind: SyntaxKind.MetaProperty; keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword; name: Identifier; } - interface JsxElement extends PrimaryExpression { + export interface JsxElement extends PrimaryExpression { kind: SyntaxKind.JsxElement; openingElement: JsxOpeningElement; children: NodeArray; closingElement: JsxClosingElement; } - type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement; - type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute; - type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess; - interface JsxTagNamePropertyAccess extends PropertyAccessExpression { + export type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement; + export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute; + export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess; + export interface JsxTagNamePropertyAccess extends PropertyAccessExpression { expression: JsxTagNameExpression; } - interface JsxAttributes extends ObjectLiteralExpressionBase { + export interface JsxAttributes extends ObjectLiteralExpressionBase { + kind: SyntaxKind.JsxAttributes; parent: JsxOpeningLikeElement; } - interface JsxOpeningElement extends Expression { + export interface JsxOpeningElement extends Expression { kind: SyntaxKind.JsxOpeningElement; parent: JsxElement; tagName: JsxTagNameExpression; typeArguments?: NodeArray; attributes: JsxAttributes; } - interface JsxSelfClosingElement extends PrimaryExpression { + export interface JsxSelfClosingElement extends PrimaryExpression { kind: SyntaxKind.JsxSelfClosingElement; tagName: JsxTagNameExpression; typeArguments?: NodeArray; attributes: JsxAttributes; } - interface JsxFragment extends PrimaryExpression { + export interface JsxFragment extends PrimaryExpression { kind: SyntaxKind.JsxFragment; openingFragment: JsxOpeningFragment; children: NodeArray; closingFragment: JsxClosingFragment; } - interface JsxOpeningFragment extends Expression { + export interface JsxOpeningFragment extends Expression { kind: SyntaxKind.JsxOpeningFragment; parent: JsxFragment; } - interface JsxClosingFragment extends Expression { + export interface JsxClosingFragment extends Expression { kind: SyntaxKind.JsxClosingFragment; parent: JsxFragment; } - interface JsxAttribute extends ObjectLiteralElement { + export interface JsxAttribute extends ObjectLiteralElement { kind: SyntaxKind.JsxAttribute; parent: JsxAttributes; name: Identifier; initializer?: StringLiteral | JsxExpression; } - interface JsxSpreadAttribute extends ObjectLiteralElement { + export interface JsxSpreadAttribute extends ObjectLiteralElement { kind: SyntaxKind.JsxSpreadAttribute; parent: JsxAttributes; expression: Expression; } - interface JsxClosingElement extends Node { + export interface JsxClosingElement extends Node { kind: SyntaxKind.JsxClosingElement; parent: JsxElement; tagName: JsxTagNameExpression; } - interface JsxExpression extends Expression { + export interface JsxExpression extends Expression { kind: SyntaxKind.JsxExpression; parent: JsxElement | JsxAttributeLike; dotDotDotToken?: Token; expression?: Expression; } - interface JsxText extends LiteralLikeNode { + export interface JsxText extends LiteralLikeNode { kind: SyntaxKind.JsxText; containsOnlyTriviaWhiteSpaces: boolean; parent: JsxElement; } - type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; - interface Statement extends Node { + export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; + export interface Statement extends Node { _statementBrand: any; } - interface NotEmittedStatement extends Statement { + export interface NotEmittedStatement extends Statement { kind: SyntaxKind.NotEmittedStatement; } /** * A list of comma-separated expressions. This node is only created by transformations. */ - interface CommaListExpression extends Expression { + export interface CommaListExpression extends Expression { kind: SyntaxKind.CommaListExpression; elements: NodeArray; } - interface EmptyStatement extends Statement { + export interface EmptyStatement extends Statement { kind: SyntaxKind.EmptyStatement; } - interface DebuggerStatement extends Statement { + export interface DebuggerStatement extends Statement { kind: SyntaxKind.DebuggerStatement; } - interface MissingDeclaration extends DeclarationStatement { + export interface MissingDeclaration extends DeclarationStatement { kind: SyntaxKind.MissingDeclaration; name?: Identifier; } - type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause; - interface Block extends Statement { + export type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause; + export interface Block extends Statement { kind: SyntaxKind.Block; statements: NodeArray; } - interface VariableStatement extends Statement, JSDocContainer { + export interface VariableStatement extends Statement, JSDocContainer { kind: SyntaxKind.VariableStatement; declarationList: VariableDeclarationList; } - interface ExpressionStatement extends Statement, JSDocContainer { + export interface ExpressionStatement extends Statement, JSDocContainer { kind: SyntaxKind.ExpressionStatement; expression: Expression; } - interface IfStatement extends Statement { + export interface IfStatement extends Statement { kind: SyntaxKind.IfStatement; expression: Expression; thenStatement: Statement; elseStatement?: Statement; } - interface IterationStatement extends Statement { + export interface IterationStatement extends Statement { statement: Statement; } - interface DoStatement extends IterationStatement { + export interface DoStatement extends IterationStatement { kind: SyntaxKind.DoStatement; expression: Expression; } - interface WhileStatement extends IterationStatement { + export interface WhileStatement extends IterationStatement { kind: SyntaxKind.WhileStatement; expression: Expression; } - type ForInitializer = VariableDeclarationList | Expression; - interface ForStatement extends IterationStatement { + export type ForInitializer = VariableDeclarationList | Expression; + export interface ForStatement extends IterationStatement { kind: SyntaxKind.ForStatement; initializer?: ForInitializer; condition?: Expression; incrementor?: Expression; } - type ForInOrOfStatement = ForInStatement | ForOfStatement; - interface ForInStatement extends IterationStatement { + export type ForInOrOfStatement = ForInStatement | ForOfStatement; + export interface ForInStatement extends IterationStatement { kind: SyntaxKind.ForInStatement; initializer: ForInitializer; expression: Expression; } - interface ForOfStatement extends IterationStatement { + export interface ForOfStatement extends IterationStatement { kind: SyntaxKind.ForOfStatement; awaitModifier?: AwaitKeywordToken; initializer: ForInitializer; expression: Expression; } - interface BreakStatement extends Statement { + export interface BreakStatement extends Statement { kind: SyntaxKind.BreakStatement; label?: Identifier; } - interface ContinueStatement extends Statement { + export interface ContinueStatement extends Statement { kind: SyntaxKind.ContinueStatement; label?: Identifier; } - type BreakOrContinueStatement = BreakStatement | ContinueStatement; - interface ReturnStatement extends Statement { + export type BreakOrContinueStatement = BreakStatement | ContinueStatement; + export interface ReturnStatement extends Statement { kind: SyntaxKind.ReturnStatement; expression?: Expression; } - interface WithStatement extends Statement { + export interface WithStatement extends Statement { kind: SyntaxKind.WithStatement; expression: Expression; statement: Statement; } - interface SwitchStatement extends Statement { + export interface SwitchStatement extends Statement { kind: SyntaxKind.SwitchStatement; expression: Expression; caseBlock: CaseBlock; possiblyExhaustive?: boolean; } - interface CaseBlock extends Node { + export interface CaseBlock extends Node { kind: SyntaxKind.CaseBlock; parent: SwitchStatement; clauses: NodeArray; } - interface CaseClause extends Node { + export interface CaseClause extends Node { kind: SyntaxKind.CaseClause; parent: CaseBlock; expression: Expression; statements: NodeArray; } - interface DefaultClause extends Node { + export interface DefaultClause extends Node { kind: SyntaxKind.DefaultClause; parent: CaseBlock; statements: NodeArray; } - type CaseOrDefaultClause = CaseClause | DefaultClause; - interface LabeledStatement extends Statement, JSDocContainer { + export type CaseOrDefaultClause = CaseClause | DefaultClause; + export interface LabeledStatement extends Statement, JSDocContainer { kind: SyntaxKind.LabeledStatement; label: Identifier; statement: Statement; } - interface ThrowStatement extends Statement { + export interface ThrowStatement extends Statement { kind: SyntaxKind.ThrowStatement; expression?: Expression; } - interface TryStatement extends Statement { + export interface TryStatement extends Statement { kind: SyntaxKind.TryStatement; tryBlock: Block; catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchClause extends Node { + export interface CatchClause extends Node { kind: SyntaxKind.CatchClause; parent: TryStatement; variableDeclaration?: VariableDeclaration; block: Block; } - type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode; - type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature; - type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag; - interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer { + export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode; + export type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature; + export type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag; + export interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer { kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression; name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; } - interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement { + export interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement { kind: SyntaxKind.ClassDeclaration; /** May be undefined in `export default class { ... }`. */ name?: Identifier; } - interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { + export interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { kind: SyntaxKind.ClassExpression; } - type ClassLikeDeclaration = ClassDeclaration | ClassExpression; - interface ClassElement extends NamedDeclaration { + export type ClassLikeDeclaration = ClassDeclaration | ClassExpression; + export interface ClassElement extends NamedDeclaration { _classElementBrand: any; name?: PropertyName; } - interface TypeElement extends NamedDeclaration { + export interface TypeElement extends NamedDeclaration { _typeElementBrand: any; name?: PropertyName; questionToken?: QuestionToken; } - interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer { + export interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer { kind: SyntaxKind.InterfaceDeclaration; name: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; } - interface HeritageClause extends Node { + export interface HeritageClause extends Node { kind: SyntaxKind.HeritageClause; parent: InterfaceDeclaration | ClassLikeDeclaration; token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword; types: NodeArray; } - interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer { + export interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer { kind: SyntaxKind.TypeAliasDeclaration; name: Identifier; typeParameters?: NodeArray; type: TypeNode; } - interface EnumMember extends NamedDeclaration, JSDocContainer { + export interface EnumMember extends NamedDeclaration, JSDocContainer { kind: SyntaxKind.EnumMember; parent: EnumDeclaration; name: PropertyName; initializer?: Expression; } - interface EnumDeclaration extends DeclarationStatement, JSDocContainer { + export interface EnumDeclaration extends DeclarationStatement, JSDocContainer { kind: SyntaxKind.EnumDeclaration; name: Identifier; members: NodeArray; } - type ModuleName = Identifier | StringLiteral; - type ModuleBody = NamespaceBody | JSDocNamespaceBody; - interface ModuleDeclaration extends DeclarationStatement, JSDocContainer { + export type ModuleName = Identifier | StringLiteral; + export type ModuleBody = NamespaceBody | JSDocNamespaceBody; + export interface ModuleDeclaration extends DeclarationStatement, JSDocContainer { kind: SyntaxKind.ModuleDeclaration; parent: ModuleBody | SourceFile; name: ModuleName; body?: ModuleBody | JSDocNamespaceDeclaration; } - type NamespaceBody = ModuleBlock | NamespaceDeclaration; - interface NamespaceDeclaration extends ModuleDeclaration { + export type NamespaceBody = ModuleBlock | NamespaceDeclaration; + export interface NamespaceDeclaration extends ModuleDeclaration { name: Identifier; body: NamespaceBody; } - type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration; - interface JSDocNamespaceDeclaration extends ModuleDeclaration { + export type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration; + export interface JSDocNamespaceDeclaration extends ModuleDeclaration { name: Identifier; body?: JSDocNamespaceBody; } - interface ModuleBlock extends Node, Statement { + export interface ModuleBlock extends Node, Statement { kind: SyntaxKind.ModuleBlock; parent: ModuleDeclaration; statements: NodeArray; } - type ModuleReference = EntityName | ExternalModuleReference; + export type ModuleReference = EntityName | ExternalModuleReference; /** * One of: * - import x = require("mod"); * - import x = M.x; */ - interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer { + export interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer { kind: SyntaxKind.ImportEqualsDeclaration; parent: SourceFile | ModuleBlock; name: Identifier; moduleReference: ModuleReference; } - interface ExternalModuleReference extends Node { + export interface ExternalModuleReference extends Node { kind: SyntaxKind.ExternalModuleReference; parent: ImportEqualsDeclaration; expression: Expression; } - interface ImportDeclaration extends Statement { + export interface ImportDeclaration extends Statement { kind: SyntaxKind.ImportDeclaration; parent: SourceFile | ModuleBlock; importClause?: ImportClause; /** If this is not a StringLiteral it will be a grammar error. */ moduleSpecifier: Expression; } - type NamedImportBindings = NamespaceImport | NamedImports; - interface ImportClause extends NamedDeclaration { + export type NamedImportBindings = NamespaceImport | NamedImports; + export interface ImportClause extends NamedDeclaration { kind: SyntaxKind.ImportClause; parent: ImportDeclaration; name?: Identifier; namedBindings?: NamedImportBindings; } - interface NamespaceImport extends NamedDeclaration { + export interface NamespaceImport extends NamedDeclaration { kind: SyntaxKind.NamespaceImport; parent: ImportClause; name: Identifier; } - interface NamespaceExportDeclaration extends DeclarationStatement { + export interface NamespaceExportDeclaration extends DeclarationStatement { kind: SyntaxKind.NamespaceExportDeclaration; name: Identifier; } - interface ExportDeclaration extends DeclarationStatement, JSDocContainer { + export interface ExportDeclaration extends DeclarationStatement, JSDocContainer { kind: SyntaxKind.ExportDeclaration; parent: SourceFile | ModuleBlock; /** Will not be assigned in the case of `export * from "foo";` */ @@ -1474,158 +1480,166 @@ declare namespace ts { /** If this is not a StringLiteral it will be a grammar error. */ moduleSpecifier?: Expression; } - interface NamedImports extends Node { + export interface NamedImports extends Node { kind: SyntaxKind.NamedImports; parent: ImportClause; elements: NodeArray; } - interface NamedExports extends Node { + export interface NamedExports extends Node { kind: SyntaxKind.NamedExports; parent: ExportDeclaration; elements: NodeArray; } - type NamedImportsOrExports = NamedImports | NamedExports; - interface ImportSpecifier extends NamedDeclaration { + export type NamedImportsOrExports = NamedImports | NamedExports; + export interface ImportSpecifier extends NamedDeclaration { kind: SyntaxKind.ImportSpecifier; parent: NamedImports; propertyName?: Identifier; name: Identifier; } - interface ExportSpecifier extends NamedDeclaration { + export interface ExportSpecifier extends NamedDeclaration { kind: SyntaxKind.ExportSpecifier; parent: NamedExports; propertyName?: Identifier; name: Identifier; } - type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; + export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; /** * This is either an `export =` or an `export default` declaration. * Unless `isExportEquals` is set, this node was parsed as an `export default`. */ - interface ExportAssignment extends DeclarationStatement { + export interface ExportAssignment extends DeclarationStatement { kind: SyntaxKind.ExportAssignment; parent: SourceFile; isExportEquals?: boolean; expression: Expression; } - interface FileReference extends TextRange { + export interface FileReference extends TextRange { fileName: string; } - interface CheckJsDirective extends TextRange { + export interface CheckJsDirective extends TextRange { enabled: boolean; } - type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia; - interface CommentRange extends TextRange { + export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia; + export interface CommentRange extends TextRange { hasTrailingNewLine?: boolean; kind: CommentKind; } - interface SynthesizedComment extends CommentRange { + export interface SynthesizedComment extends CommentRange { text: string; pos: -1; end: -1; } - interface JSDocTypeExpression extends TypeNode { + export interface JSDocTypeExpression extends TypeNode { kind: SyntaxKind.JSDocTypeExpression; type: TypeNode; } - interface JSDocType extends TypeNode { + export interface JSDocType extends TypeNode { _jsDocTypeBrand: any; } - interface JSDocAllType extends JSDocType { + export interface JSDocAllType extends JSDocType { kind: SyntaxKind.JSDocAllType; } - interface JSDocUnknownType extends JSDocType { + export interface JSDocUnknownType extends JSDocType { kind: SyntaxKind.JSDocUnknownType; } - interface JSDocNonNullableType extends JSDocType { + export interface JSDocNonNullableType extends JSDocType { kind: SyntaxKind.JSDocNonNullableType; type: TypeNode; } - interface JSDocNullableType extends JSDocType { + export interface JSDocNullableType extends JSDocType { kind: SyntaxKind.JSDocNullableType; type: TypeNode; } - interface JSDocOptionalType extends JSDocType { + export interface JSDocOptionalType extends JSDocType { kind: SyntaxKind.JSDocOptionalType; type: TypeNode; } - interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase { + export interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase { kind: SyntaxKind.JSDocFunctionType; } - interface JSDocVariadicType extends JSDocType { + export interface JSDocVariadicType extends JSDocType { kind: SyntaxKind.JSDocVariadicType; type: TypeNode; } - type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType; - interface JSDoc extends Node { + export interface JSDocNamepathType extends JSDocType { + kind: SyntaxKind.JSDocNamepathType; + type: TypeNode; + } + export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType; + export interface JSDoc extends Node { kind: SyntaxKind.JSDocComment; parent: HasJSDoc; tags?: NodeArray; comment?: string; } - interface JSDocTag extends Node { + export interface JSDocTag extends Node { parent: JSDoc | JSDocTypeLiteral; tagName: Identifier; comment?: string; } - interface JSDocUnknownTag extends JSDocTag { + export interface JSDocUnknownTag extends JSDocTag { kind: SyntaxKind.JSDocTag; } /** * Note that `@extends` is a synonym of `@augments`. * Both tags are represented by this interface. */ - interface JSDocAugmentsTag extends JSDocTag { + export interface JSDocAugmentsTag extends JSDocTag { kind: SyntaxKind.JSDocAugmentsTag; class: ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression; }; } - interface JSDocClassTag extends JSDocTag { + export interface JSDocAuthorTag extends JSDocTag { + kind: SyntaxKind.JSDocAuthorTag; + } + export interface JSDocClassTag extends JSDocTag { kind: SyntaxKind.JSDocClassTag; } - interface JSDocEnumTag extends JSDocTag { + export interface JSDocEnumTag extends JSDocTag, Declaration { + parent: JSDoc; kind: SyntaxKind.JSDocEnumTag; typeExpression?: JSDocTypeExpression; } - interface JSDocThisTag extends JSDocTag { + export interface JSDocThisTag extends JSDocTag { kind: SyntaxKind.JSDocThisTag; typeExpression?: JSDocTypeExpression; } - interface JSDocTemplateTag extends JSDocTag { + export interface JSDocTemplateTag extends JSDocTag { kind: SyntaxKind.JSDocTemplateTag; constraint: JSDocTypeExpression | undefined; typeParameters: NodeArray; } - interface JSDocReturnTag extends JSDocTag { + export interface JSDocReturnTag extends JSDocTag { kind: SyntaxKind.JSDocReturnTag; typeExpression?: JSDocTypeExpression; } - interface JSDocTypeTag extends JSDocTag { + export interface JSDocTypeTag extends JSDocTag { kind: SyntaxKind.JSDocTypeTag; typeExpression: JSDocTypeExpression; } - interface JSDocTypedefTag extends JSDocTag, NamedDeclaration { + export interface JSDocTypedefTag extends JSDocTag, NamedDeclaration { parent: JSDoc; kind: SyntaxKind.JSDocTypedefTag; fullName?: JSDocNamespaceDeclaration | Identifier; name?: Identifier; typeExpression?: JSDocTypeExpression | JSDocTypeLiteral; } - interface JSDocCallbackTag extends JSDocTag, NamedDeclaration { + export interface JSDocCallbackTag extends JSDocTag, NamedDeclaration { parent: JSDoc; kind: SyntaxKind.JSDocCallbackTag; fullName?: JSDocNamespaceDeclaration | Identifier; name?: Identifier; typeExpression: JSDocSignature; } - interface JSDocSignature extends JSDocType, Declaration { + export interface JSDocSignature extends JSDocType, Declaration { kind: SyntaxKind.JSDocSignature; typeParameters?: ReadonlyArray; parameters: ReadonlyArray; type: JSDocReturnTag | undefined; } - interface JSDocPropertyLikeTag extends JSDocTag, Declaration { + export interface JSDocPropertyLikeTag extends JSDocTag, Declaration { parent: JSDoc; name: EntityName; typeExpression?: JSDocTypeExpression; @@ -1633,19 +1647,19 @@ declare namespace ts { isNameFirst: boolean; isBracketed: boolean; } - interface JSDocPropertyTag extends JSDocPropertyLikeTag { + export interface JSDocPropertyTag extends JSDocPropertyLikeTag { kind: SyntaxKind.JSDocPropertyTag; } - interface JSDocParameterTag extends JSDocPropertyLikeTag { + export interface JSDocParameterTag extends JSDocPropertyLikeTag { kind: SyntaxKind.JSDocParameterTag; } - interface JSDocTypeLiteral extends JSDocType { + export interface JSDocTypeLiteral extends JSDocType { kind: SyntaxKind.JSDocTypeLiteral; jsDocPropertyTags?: ReadonlyArray; /** If true, then this type literal represents an *array* of its type. */ isArrayType?: boolean; } - enum FlowFlags { + export enum FlowFlags { Unreachable = 1, Start = 2, BranchLabel = 4, @@ -1662,55 +1676,55 @@ declare namespace ts { Label = 12, Condition = 96 } - interface FlowLock { + export interface FlowLock { locked?: boolean; } - interface AfterFinallyFlow extends FlowNodeBase, FlowLock { + export interface AfterFinallyFlow extends FlowNodeBase, FlowLock { antecedent: FlowNode; } - interface PreFinallyFlow extends FlowNodeBase { + export interface PreFinallyFlow extends FlowNodeBase { antecedent: FlowNode; lock: FlowLock; } - type FlowNode = AfterFinallyFlow | PreFinallyFlow | FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation; - interface FlowNodeBase { + export type FlowNode = AfterFinallyFlow | PreFinallyFlow | FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation; + export interface FlowNodeBase { flags: FlowFlags; id?: number; } - interface FlowStart extends FlowNodeBase { + export interface FlowStart extends FlowNodeBase { container?: FunctionExpression | ArrowFunction | MethodDeclaration; } - interface FlowLabel extends FlowNodeBase { + export interface FlowLabel extends FlowNodeBase { antecedents: FlowNode[] | undefined; } - interface FlowAssignment extends FlowNodeBase { + export interface FlowAssignment extends FlowNodeBase { node: Expression | VariableDeclaration | BindingElement; antecedent: FlowNode; } - interface FlowCondition extends FlowNodeBase { + export interface FlowCondition extends FlowNodeBase { expression: Expression; antecedent: FlowNode; } - interface FlowSwitchClause extends FlowNodeBase { + export interface FlowSwitchClause extends FlowNodeBase { switchStatement: SwitchStatement; clauseStart: number; clauseEnd: number; antecedent: FlowNode; } - interface FlowArrayMutation extends FlowNodeBase { + export interface FlowArrayMutation extends FlowNodeBase { node: CallExpression | BinaryExpression; antecedent: FlowNode; } - type FlowType = Type | IncompleteType; - interface IncompleteType { + export type FlowType = Type | IncompleteType; + export interface IncompleteType { flags: TypeFlags; type: Type; } - interface AmdDependency { + export interface AmdDependency { path: string; name?: string; } - interface SourceFile extends Declaration { + export interface SourceFile extends Declaration { kind: SyntaxKind.SourceFile; statements: NodeArray; endOfFileToken: Token; @@ -1734,12 +1748,12 @@ declare namespace ts { hasNoDefaultLib: boolean; languageVersion: ScriptTarget; } - interface Bundle extends Node { + export interface Bundle extends Node { kind: SyntaxKind.Bundle; prepends: ReadonlyArray; sourceFiles: ReadonlyArray; } - interface InputFiles extends Node { + export interface InputFiles extends Node { kind: SyntaxKind.InputFiles; javascriptPath?: string; javascriptText: string; @@ -1750,7 +1764,7 @@ declare namespace ts { declarationMapPath?: string; declarationMapText?: string; } - interface UnparsedSource extends Node { + export interface UnparsedSource extends Node { kind: SyntaxKind.UnparsedSource; fileName: string; text: string; @@ -1765,53 +1779,53 @@ declare namespace ts { syntheticReferences?: ReadonlyArray; texts: ReadonlyArray; } - type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike; - type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference; - interface UnparsedSection extends Node { + export type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike; + export type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference; + export interface UnparsedSection extends Node { kind: SyntaxKind; data?: string; parent: UnparsedSource; } - interface UnparsedPrologue extends UnparsedSection { + export interface UnparsedPrologue extends UnparsedSection { kind: SyntaxKind.UnparsedPrologue; data: string; parent: UnparsedSource; } - interface UnparsedPrepend extends UnparsedSection { + export interface UnparsedPrepend extends UnparsedSection { kind: SyntaxKind.UnparsedPrepend; data: string; parent: UnparsedSource; texts: ReadonlyArray; } - interface UnparsedTextLike extends UnparsedSection { + export interface UnparsedTextLike extends UnparsedSection { kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText; parent: UnparsedSource; } - interface UnparsedSyntheticReference extends UnparsedSection { + export interface UnparsedSyntheticReference extends UnparsedSection { kind: SyntaxKind.UnparsedSyntheticReference; parent: UnparsedSource; } - interface JsonSourceFile extends SourceFile { + export interface JsonSourceFile extends SourceFile { statements: NodeArray; } - interface TsConfigSourceFile extends JsonSourceFile { + export interface TsConfigSourceFile extends JsonSourceFile { extendedSourceFiles?: string[]; } - interface JsonMinusNumericLiteral extends PrefixUnaryExpression { + export interface JsonMinusNumericLiteral extends PrefixUnaryExpression { kind: SyntaxKind.PrefixUnaryExpression; operator: SyntaxKind.MinusToken; operand: NumericLiteral; } - interface JsonObjectExpressionStatement extends ExpressionStatement { + export interface JsonObjectExpressionStatement extends ExpressionStatement { expression: ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral; } - interface ScriptReferenceHost { + export interface ScriptReferenceHost { getCompilerOptions(): CompilerOptions; getSourceFile(fileName: string): SourceFile | undefined; getSourceFileByPath(path: Path): SourceFile | undefined; getCurrentDirectory(): string; } - interface ParseConfigHost { + export interface ParseConfigHost { useCaseSensitiveFileNames: boolean; readDirectory(rootDir: string, extensions: ReadonlyArray, excludes: ReadonlyArray | undefined, includes: ReadonlyArray, depth?: number): ReadonlyArray; /** @@ -1827,18 +1841,18 @@ declare namespace ts { * specified like "./blah" to an absolute path to an actual * tsconfig file, e.g. "/root/blah/tsconfig.json" */ - type ResolvedConfigFileName = string & { + export type ResolvedConfigFileName = string & { _isResolvedConfigFileName: never; }; - type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: ReadonlyArray) => void; - class OperationCanceledException { + export type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: ReadonlyArray) => void; + export class OperationCanceledException { } - interface CancellationToken { + export interface CancellationToken { isCancellationRequested(): boolean; /** @throws OperationCanceledException if isCancellationRequested is true */ throwIfCancellationRequested(): void; } - interface Program extends ScriptReferenceHost { + export interface Program extends ScriptReferenceHost { /** * Get a list of root file names that were passed to a 'createProgram' */ @@ -1874,17 +1888,17 @@ declare namespace ts { getProjectReferences(): ReadonlyArray | undefined; getResolvedProjectReferences(): ReadonlyArray | undefined; } - interface ResolvedProjectReference { + export interface ResolvedProjectReference { commandLine: ParsedCommandLine; sourceFile: SourceFile; references?: ReadonlyArray; } - type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; - interface CustomTransformer { + export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; + export interface CustomTransformer { transformSourceFile(node: SourceFile): SourceFile; transformBundle(node: Bundle): Bundle; } - interface CustomTransformers { + export interface CustomTransformers { /** Custom transformers to evaluate before built-in .js transformations. */ before?: (TransformerFactory | CustomTransformerFactory)[]; /** Custom transformers to evaluate after built-in .js transformations. */ @@ -1892,7 +1906,7 @@ declare namespace ts { /** Custom transformers to evaluate after built-in .d.ts transformations. */ afterDeclarations?: (TransformerFactory | CustomTransformerFactory)[]; } - interface SourceMapSpan { + export interface SourceMapSpan { /** Line number in the .js file. */ emittedLine: number; /** Column number in the .js file. */ @@ -1907,18 +1921,19 @@ declare namespace ts { sourceIndex: number; } /** Return code used by getEmitOutput function to indicate status of the function */ - enum ExitStatus { + export enum ExitStatus { Success = 0, DiagnosticsPresent_OutputsSkipped = 1, - DiagnosticsPresent_OutputsGenerated = 2 + DiagnosticsPresent_OutputsGenerated = 2, + InvalidProject_OutputsSkipped = 3 } - interface EmitResult { + export interface EmitResult { emitSkipped: boolean; /** Contains declaration emit diagnostics */ diagnostics: ReadonlyArray; emittedFiles?: string[]; } - interface TypeChecker { + export interface TypeChecker { getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; getPropertiesOfType(type: Type): Symbol[]; @@ -2010,7 +2025,7 @@ declare namespace ts { */ runWithCancellationToken(token: CancellationToken, cb: (checker: TypeChecker) => T): T; } - enum NodeBuilderFlags { + export enum NodeBuilderFlags { None = 0, NoTruncation = 1, WriteArrayAsGenericType = 2, @@ -2041,7 +2056,7 @@ declare namespace ts { InInitialEntityName = 16777216, InReverseMappedType = 33554432 } - enum TypeFormatFlags { + export enum TypeFormatFlags { None = 0, NoTruncation = 1, WriteArrayAsGenericType = 2, @@ -2064,31 +2079,31 @@ declare namespace ts { /** @deprecated */ WriteOwnNameForAnyLike = 0, NodeBuilderFlagsMask = 9469291 } - enum SymbolFormatFlags { + export enum SymbolFormatFlags { None = 0, WriteTypeParametersOrArguments = 1, UseOnlyExternalAliasing = 2, AllowAnyNodeKind = 4, UseAliasDefinedOutsideCurrentScope = 8, } - enum TypePredicateKind { + export enum TypePredicateKind { This = 0, Identifier = 1 } - interface TypePredicateBase { + export interface TypePredicateBase { kind: TypePredicateKind; type: Type; } - interface ThisTypePredicate extends TypePredicateBase { + export interface ThisTypePredicate extends TypePredicateBase { kind: TypePredicateKind.This; } - interface IdentifierTypePredicate extends TypePredicateBase { + export interface IdentifierTypePredicate extends TypePredicateBase { kind: TypePredicateKind.Identifier; parameterName: string; parameterIndex: number; } - type TypePredicate = IdentifierTypePredicate | ThisTypePredicate; - enum SymbolFlags { + export type TypePredicate = IdentifierTypePredicate | ThisTypePredicate; + export enum SymbolFlags { None = 0, FunctionScopedVariable = 1, BlockScopedVariable = 2, @@ -2120,28 +2135,28 @@ declare namespace ts { ModuleExports = 134217728, Enum = 384, Variable = 3, - Value = 67220415, - Type = 67897832, + Value = 111551, + Type = 788968, Namespace = 1920, Module = 1536, Accessor = 98304, - FunctionScopedVariableExcludes = 67220414, - BlockScopedVariableExcludes = 67220415, - ParameterExcludes = 67220415, + FunctionScopedVariableExcludes = 111550, + BlockScopedVariableExcludes = 111551, + ParameterExcludes = 111551, PropertyExcludes = 0, - EnumMemberExcludes = 68008959, - FunctionExcludes = 67219887, - ClassExcludes = 68008383, - InterfaceExcludes = 67897736, - RegularEnumExcludes = 68008191, - ConstEnumExcludes = 68008831, + EnumMemberExcludes = 900095, + FunctionExcludes = 110991, + ClassExcludes = 899503, + InterfaceExcludes = 788872, + RegularEnumExcludes = 899327, + ConstEnumExcludes = 899967, ValueModuleExcludes = 110735, NamespaceModuleExcludes = 0, - MethodExcludes = 67212223, - GetAccessorExcludes = 67154879, - SetAccessorExcludes = 67187647, - TypeParameterExcludes = 67635688, - TypeAliasExcludes = 67897832, + MethodExcludes = 103359, + GetAccessorExcludes = 46015, + SetAccessorExcludes = 78783, + TypeParameterExcludes = 526824, + TypeAliasExcludes = 788968, AliasExcludes = 2097152, ModuleMember = 2623475, ExportHasLocal = 944, @@ -2149,7 +2164,7 @@ declare namespace ts { PropertyOrAccessor = 98308, ClassMember = 106500, } - interface Symbol { + export interface Symbol { flags: SymbolFlags; escapedName: __String; declarations: Declaration[]; @@ -2158,7 +2173,7 @@ declare namespace ts { exports?: SymbolTable; globalExports?: SymbolTable; } - enum InternalSymbolName { + export enum InternalSymbolName { Call = "__call", Constructor = "__constructor", New = "__new", @@ -2185,13 +2200,13 @@ declare namespace ts { * with a normal string (which is good, it cannot be misused on assignment or on usage), * while still being comparable with a normal string via === (also good) and castable from a string. */ - type __String = (string & { + export type __String = (string & { __escapedIdentifier: void; }) | (void & { __escapedIdentifier: void; }) | InternalSymbolName; /** ReadonlyMap where keys are `__String`s. */ - interface ReadonlyUnderscoreEscapedMap { + export interface ReadonlyUnderscoreEscapedMap { get(key: __String): T | undefined; has(key: __String): boolean; forEach(action: (value: T, key: __String) => void): void; @@ -2201,14 +2216,14 @@ declare namespace ts { entries(): Iterator<[__String, T]>; } /** Map where keys are `__String`s. */ - interface UnderscoreEscapedMap extends ReadonlyUnderscoreEscapedMap { + export interface UnderscoreEscapedMap extends ReadonlyUnderscoreEscapedMap { set(key: __String, value: T): this; delete(key: __String): boolean; clear(): void; } /** SymbolTable based on ES6 Map interface. */ - type SymbolTable = UnderscoreEscapedMap; - enum TypeFlags { + export type SymbolTable = UnderscoreEscapedMap; + export enum TypeFlags { Any = 1, Unknown = 2, String = 4, @@ -2257,35 +2272,35 @@ declare namespace ts { Narrowable = 133970943, NotUnionOrUnit = 67637251, } - type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; - interface Type { + export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; + export interface Type { flags: TypeFlags; symbol: Symbol; pattern?: DestructuringPattern; aliasSymbol?: Symbol; aliasTypeArguments?: ReadonlyArray; } - interface LiteralType extends Type { + export interface LiteralType extends Type { value: string | number | PseudoBigInt; freshType: LiteralType; regularType: LiteralType; } - interface UniqueESSymbolType extends Type { + export interface UniqueESSymbolType extends Type { symbol: Symbol; escapedName: __String; } - interface StringLiteralType extends LiteralType { + export interface StringLiteralType extends LiteralType { value: string; } - interface NumberLiteralType extends LiteralType { + export interface NumberLiteralType extends LiteralType { value: number; } - interface BigIntLiteralType extends LiteralType { + export interface BigIntLiteralType extends LiteralType { value: PseudoBigInt; } - interface EnumType extends Type { + export interface EnumType extends Type { } - enum ObjectFlags { + export enum ObjectFlags { Class = 1, Interface = 2, Reference = 4, @@ -2302,20 +2317,21 @@ declare namespace ts { MarkerType = 8192, JSLiteral = 16384, FreshLiteral = 32768, + ArrayLiteral = 65536, ClassOrInterface = 3, } - interface ObjectType extends Type { + export interface ObjectType extends Type { objectFlags: ObjectFlags; } /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */ - interface InterfaceType extends ObjectType { + export interface InterfaceType extends ObjectType { typeParameters: TypeParameter[] | undefined; outerTypeParameters: TypeParameter[] | undefined; localTypeParameters: TypeParameter[] | undefined; thisType: TypeParameter | undefined; } - type BaseType = ObjectType | IntersectionType; - interface InterfaceTypeWithDeclaredMembers extends InterfaceType { + export type BaseType = ObjectType | IntersectionType; + export interface InterfaceTypeWithDeclaredMembers extends InterfaceType { declaredProperties: Symbol[]; declaredCallSignatures: Signature[]; declaredConstructSignatures: Signature[]; @@ -2332,49 +2348,49 @@ declare namespace ts { * if the class or interface has no type parameters and the reference isn't specifying an * explicit "this" argument. */ - interface TypeReference extends ObjectType { + export interface TypeReference extends ObjectType { target: GenericType; typeArguments?: ReadonlyArray; } - interface GenericType extends InterfaceType, TypeReference { + export interface GenericType extends InterfaceType, TypeReference { } - interface TupleType extends GenericType { + export interface TupleType extends GenericType { minLength: number; hasRestElement: boolean; readonly: boolean; associatedNames?: __String[]; } - interface TupleTypeReference extends TypeReference { + export interface TupleTypeReference extends TypeReference { target: TupleType; } - interface UnionOrIntersectionType extends Type { + export interface UnionOrIntersectionType extends Type { types: Type[]; } - interface UnionType extends UnionOrIntersectionType { + export interface UnionType extends UnionOrIntersectionType { } - interface IntersectionType extends UnionOrIntersectionType { + export interface IntersectionType extends UnionOrIntersectionType { } - type StructuredType = ObjectType | UnionType | IntersectionType; - interface EvolvingArrayType extends ObjectType { + export type StructuredType = ObjectType | UnionType | IntersectionType; + export interface EvolvingArrayType extends ObjectType { elementType: Type; finalArrayType?: Type; } - interface InstantiableType extends Type { + export interface InstantiableType extends Type { } - interface TypeParameter extends InstantiableType { + export interface TypeParameter extends InstantiableType { } - interface IndexedAccessType extends InstantiableType { + export interface IndexedAccessType extends InstantiableType { objectType: Type; indexType: Type; constraint?: Type; simplifiedForReading?: Type; simplifiedForWriting?: Type; } - type TypeVariable = TypeParameter | IndexedAccessType; - interface IndexType extends InstantiableType { + export type TypeVariable = TypeParameter | IndexedAccessType; + export interface IndexType extends InstantiableType { type: InstantiableType | UnionOrIntersectionType; } - interface ConditionalRoot { + export interface ConditionalRoot { node: ConditionalTypeNode; checkType: Type; extendsType: Type; @@ -2387,36 +2403,36 @@ declare namespace ts { aliasSymbol?: Symbol; aliasTypeArguments?: Type[]; } - interface ConditionalType extends InstantiableType { + export interface ConditionalType extends InstantiableType { root: ConditionalRoot; checkType: Type; extendsType: Type; resolvedTrueType: Type; resolvedFalseType: Type; } - interface SubstitutionType extends InstantiableType { + export interface SubstitutionType extends InstantiableType { typeVariable: TypeVariable; substitute: Type; } - enum SignatureKind { + export enum SignatureKind { Call = 0, Construct = 1 } - interface Signature { + export interface Signature { declaration?: SignatureDeclaration | JSDocSignature; typeParameters?: ReadonlyArray; parameters: ReadonlyArray; } - enum IndexKind { + export enum IndexKind { String = 0, Number = 1 } - interface IndexInfo { + export interface IndexInfo { type: Type; isReadonly: boolean; declaration?: IndexSignatureDeclaration; } - enum InferencePriority { + export enum InferencePriority { NakedTypeVariable = 1, HomomorphicMappedType = 2, PartialHomomorphicMappedType = 4, @@ -2425,16 +2441,18 @@ declare namespace ts { LiteralKeyof = 32, NoConstraints = 64, AlwaysStrict = 128, - PriorityImpliesCombination = 56 + MaxValue = 256, + PriorityImpliesCombination = 56, + Circularity = -1 } /** @deprecated Use FileExtensionInfo instead. */ - type JsFileExtensionInfo = FileExtensionInfo; - interface FileExtensionInfo { + export type JsFileExtensionInfo = FileExtensionInfo; + export interface FileExtensionInfo { extension: string; isMixedContent: boolean; scriptKind?: ScriptKind; } - interface DiagnosticMessage { + export interface DiagnosticMessage { key: string; category: DiagnosticCategory; code: number; @@ -2447,19 +2465,19 @@ declare namespace ts { * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, * the difference is that messages are all preformatted in DMC. */ - interface DiagnosticMessageChain { + export interface DiagnosticMessageChain { messageText: string; category: DiagnosticCategory; code: number; - next?: DiagnosticMessageChain; + next?: DiagnosticMessageChain[]; } - interface Diagnostic extends DiagnosticRelatedInformation { + export interface Diagnostic extends DiagnosticRelatedInformation { /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ reportsUnnecessary?: {}; source?: string; relatedInformation?: DiagnosticRelatedInformation[]; } - interface DiagnosticRelatedInformation { + export interface DiagnosticRelatedInformation { category: DiagnosticCategory; code: number; file: SourceFile | undefined; @@ -2467,25 +2485,25 @@ declare namespace ts { length: number | undefined; messageText: string | DiagnosticMessageChain; } - interface DiagnosticWithLocation extends Diagnostic { + export interface DiagnosticWithLocation extends Diagnostic { file: SourceFile; start: number; length: number; } - enum DiagnosticCategory { + export enum DiagnosticCategory { Warning = 0, Error = 1, Suggestion = 2, Message = 3 } - enum ModuleResolutionKind { + export enum ModuleResolutionKind { Classic = 1, NodeJs = 2 } - interface PluginImport { + export interface PluginImport { name: string; } - interface ProjectReference { + export interface ProjectReference { /** A normalized path on disk */ path: string; /** The path as the user originally wrote it */ @@ -2495,8 +2513,8 @@ declare namespace ts { /** True if it is intended that this reference form a circularity */ circular?: boolean; } - type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike | PluginImport[] | ProjectReference[] | null | undefined; - interface CompilerOptions { + export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike | PluginImport[] | ProjectReference[] | null | undefined; + export interface CompilerOptions { allowJs?: boolean; allowSyntheticDefaultImports?: boolean; allowUmdGlobalAccess?: boolean; @@ -2579,38 +2597,38 @@ declare namespace ts { esModuleInterop?: boolean; [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; } - interface TypeAcquisition { + export interface TypeAcquisition { enableAutoDiscovery?: boolean; enable?: boolean; include?: string[]; exclude?: string[]; [option: string]: string[] | boolean | undefined; } - enum ModuleKind { + export enum ModuleKind { None = 0, CommonJS = 1, AMD = 2, UMD = 3, System = 4, ES2015 = 5, - ESNext = 6 + ESNext = 99 } - enum JsxEmit { + export enum JsxEmit { None = 0, Preserve = 1, React = 2, ReactNative = 3 } - enum NewLineKind { + export enum NewLineKind { CarriageReturnLineFeed = 0, LineFeed = 1 } - interface LineAndCharacter { + export interface LineAndCharacter { /** 0-based. */ line: number; character: number; } - enum ScriptKind { + export enum ScriptKind { Unknown = 0, JS = 1, JSX = 2, @@ -2624,7 +2642,7 @@ declare namespace ts { */ Deferred = 7 } - enum ScriptTarget { + export enum ScriptTarget { ES3 = 0, ES5 = 1, ES2015 = 2, @@ -2633,16 +2651,16 @@ declare namespace ts { ES2018 = 5, ES2019 = 6, ES2020 = 7, - ESNext = 8, + ESNext = 99, JSON = 100, - Latest = 8 + Latest = 99 } - enum LanguageVariant { + export enum LanguageVariant { Standard = 0, JSX = 1 } /** Either a parsed command line or a parsed tsconfig.json */ - interface ParsedCommandLine { + export interface ParsedCommandLine { options: CompilerOptions; typeAcquisition?: TypeAcquisition; fileNames: string[]; @@ -2652,15 +2670,15 @@ declare namespace ts { wildcardDirectories?: MapLike; compileOnSave?: boolean; } - enum WatchDirectoryFlags { + export enum WatchDirectoryFlags { None = 0, Recursive = 1 } - interface ExpandResult { + export interface ExpandResult { fileNames: string[]; wildcardDirectories: MapLike; } - interface CreateProgramOptions { + export interface CreateProgramOptions { rootNames: ReadonlyArray; options: CompilerOptions; projectReferences?: ReadonlyArray; @@ -2668,7 +2686,7 @@ declare namespace ts { oldProgram?: Program; configFileParsingDiagnostics?: ReadonlyArray; } - interface ModuleResolutionHost { + export interface ModuleResolutionHost { fileExists(fileName: string): boolean; readFile(fileName: string): string | undefined; trace?(s: string): void; @@ -2688,7 +2706,7 @@ declare namespace ts { * * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred. */ - interface ResolvedModule { + export interface ResolvedModule { /** Path of the file the module was resolved to. */ resolvedFileName: string; /** True if `resolvedFileName` comes from `node_modules`. */ @@ -2699,7 +2717,7 @@ declare namespace ts { * Prefer this over `ResolvedModule`. * If changing this, remember to change `moduleResolutionIsEqualTo`. */ - interface ResolvedModuleFull extends ResolvedModule { + export interface ResolvedModuleFull extends ResolvedModule { /** * Extension of resolvedFileName. This must match what's at the end of resolvedFileName. * This is optional for backwards-compatibility, but will be added if not provided. @@ -2711,7 +2729,7 @@ declare namespace ts { * Unique identifier with a package name and version. * If changing this, remember to change `packageIdIsEqual`. */ - interface PackageId { + export interface PackageId { /** * Name of the package. * Should not include `@types`. @@ -2726,7 +2744,7 @@ declare namespace ts { /** Version of the package, e.g. "1.2.3" */ version: string; } - enum Extension { + export enum Extension { Ts = ".ts", Tsx = ".tsx", Dts = ".d.ts", @@ -2735,21 +2753,21 @@ declare namespace ts { Json = ".json", TsBuildInfo = ".tsbuildinfo" } - interface ResolvedModuleWithFailedLookupLocations { + export interface ResolvedModuleWithFailedLookupLocations { readonly resolvedModule: ResolvedModuleFull | undefined; } - interface ResolvedTypeReferenceDirective { + export interface ResolvedTypeReferenceDirective { primary: boolean; resolvedFileName: string | undefined; packageId?: PackageId; /** True if `resolvedFileName` comes from `node_modules`. */ isExternalLibraryImport?: boolean; } - interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations { + export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations { readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined; readonly failedLookupLocations: ReadonlyArray; } - interface CompilerHost extends ModuleResolutionHost { + export interface CompilerHost extends ModuleResolutionHost { getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; getCancellationToken?(): CancellationToken; @@ -2761,24 +2779,24 @@ declare namespace ts { useCaseSensitiveFileNames(): boolean; getNewLine(): string; readDirectory?(rootDir: string, extensions: ReadonlyArray, excludes: ReadonlyArray | undefined, includes: ReadonlyArray, depth?: number): string[]; - resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference): (ResolvedModule | undefined)[]; + resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[]; /** * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files */ - resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference): (ResolvedTypeReferenceDirective | undefined)[]; + resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[]; getEnvironmentVariable?(name: string): string | undefined; createHash?(data: string): string; getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; } - interface SourceMapRange extends TextRange { + export interface SourceMapRange extends TextRange { source?: SourceMapSource; } - interface SourceMapSource { + export interface SourceMapSource { fileName: string; text: string; skipTrivia?: (pos: number) => number; } - enum EmitFlags { + export enum EmitFlags { None = 0, SingleLine = 1, AdviseOnEmitNode = 2, @@ -2809,18 +2827,18 @@ declare namespace ts { Iterator = 8388608, NoAsciiEscaping = 16777216, } - interface EmitHelper { + export interface EmitHelper { readonly name: string; readonly scoped: boolean; readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); readonly priority?: number; } - interface UnscopedEmitHelper extends EmitHelper { + export interface UnscopedEmitHelper extends EmitHelper { readonly scoped: false; readonly text: string; } - type EmitHelperUniqueNameCallback = (name: string) => string; - enum EmitHint { + export type EmitHelperUniqueNameCallback = (name: string) => string; + export enum EmitHint { SourceFile = 0, Expression = 1, IdentifierName = 2, @@ -2828,7 +2846,7 @@ declare namespace ts { Unspecified = 4, EmbeddedStatement = 5 } - interface TransformationContext { + export interface TransformationContext { /** Gets the compiler options supplied to the transformer. */ getCompilerOptions(): CompilerOptions; /** Starts a new lexical environment. */ @@ -2878,7 +2896,7 @@ declare namespace ts { */ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; } - interface TransformationResult { + export interface TransformationResult { /** Gets the transformed source files. */ transformed: T[]; /** Gets diagnostics for the transformation. */ @@ -2907,17 +2925,17 @@ declare namespace ts { * A function that is used to initialize and return a `Transformer` callback, which in turn * will be used to transform one or more nodes. */ - type TransformerFactory = (context: TransformationContext) => Transformer; + export type TransformerFactory = (context: TransformationContext) => Transformer; /** * A function that transforms a node. */ - type Transformer = (node: T) => T; + export type Transformer = (node: T) => T; /** * A function that accepts and possibly transforms a node. */ - type Visitor = (node: Node) => VisitResult; - type VisitResult = T | T[] | undefined; - interface Printer { + export type Visitor = (node: Node) => VisitResult; + export type VisitResult = T | T[] | undefined; + export interface Printer { /** * Print a node and its subtree as-is, without any emit transformations. * @param hint A value indicating the purpose of a node. This is primarily used to @@ -2945,7 +2963,7 @@ declare namespace ts { */ printBundle(bundle: Bundle): string; } - interface PrintHandlers { + export interface PrintHandlers { /** * A hook used by the Printer when generating unique names to avoid collisions with * globally defined names that exist outside of the current source file. @@ -2988,28 +3006,28 @@ declare namespace ts { */ substituteNode?(hint: EmitHint, node: Node): Node; } - interface PrinterOptions { + export interface PrinterOptions { removeComments?: boolean; newLine?: NewLineKind; omitTrailingSemicolon?: boolean; noEmitHelpers?: boolean; } - interface GetEffectiveTypeRootsHost { + export interface GetEffectiveTypeRootsHost { directoryExists?(directoryName: string): boolean; getCurrentDirectory?(): string; } - interface TextSpan { + export interface TextSpan { start: number; length: number; } - interface TextChangeRange { + export interface TextChangeRange { span: TextSpan; newLength: number; } - interface SyntaxList extends Node { + export interface SyntaxList extends Node { _children: Node[]; } - enum ListFormat { + export enum ListFormat { None = 0, SingleLine = 0, MultiLine = 1, @@ -3076,7 +3094,7 @@ declare namespace ts { IndexSignatureParameters = 8848, JSDocComment = 33 } - interface UserPreferences { + export interface UserPreferences { readonly disableSuggestions?: boolean; readonly quotePreference?: "auto" | "double" | "single"; readonly includeCompletionsForModuleExports?: boolean; @@ -3088,22 +3106,23 @@ declare namespace ts { readonly providePrefixAndSuffixTextForRename?: boolean; } /** Represents a bigint literal value without requiring bigint support */ - interface PseudoBigInt { + export interface PseudoBigInt { negative: boolean; base10Value: string; } + export {}; } declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any; declare function clearTimeout(handle: any): void; declare namespace ts { - enum FileWatcherEventKind { + export enum FileWatcherEventKind { Created = 0, Changed = 1, Deleted = 2 } - type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind) => void; - type DirectoryWatcherCallback = (fileName: string) => void; - interface System { + export type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind) => void; + export type DirectoryWatcherCallback = (fileName: string) => void; + export interface System { args: string[]; newLine: string; useCaseSensitiveFileNames: boolean; @@ -3144,11 +3163,12 @@ declare namespace ts { base64decode?(input: string): string; base64encode?(input: string): string; } - interface FileWatcher { + export interface FileWatcher { close(): void; } - function getNodeMajorVersion(): number | undefined; - let sys: System; + export function getNodeMajorVersion(): number | undefined; + export let sys: System; + export {}; } declare namespace ts { type ErrorCallback = (message: DiagnosticMessage, length: number) => void; @@ -3159,6 +3179,7 @@ declare namespace ts { getTokenPos(): number; getTokenText(): string; getTokenValue(): string; + hasUnicodeEscape(): boolean; hasExtendedUnicodeEscape(): boolean; hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; @@ -3243,7 +3264,7 @@ declare namespace ts { parent: ConstructorDeclaration; name: Identifier; }; - function isParameterPropertyDeclaration(node: Node): node is ParameterPropertyDeclaration; + function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration; function isEmptyBindingPattern(node: BindingName): node is BindingPattern; function isEmptyBindingElement(node: BindingElement): boolean; function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration; @@ -3530,6 +3551,7 @@ declare namespace ts { function isJSDocFunctionType(node: Node): node is JSDocFunctionType; function isJSDocVariadicType(node: Node): node is JSDocVariadicType; function isJSDoc(node: Node): node is JSDoc; + function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; function isJSDocClassTag(node: Node): node is JSDocClassTag; function isJSDocEnumTag(node: Node): node is JSDocEnumTag; @@ -3593,7 +3615,7 @@ declare namespace ts { function isStringLiteralLike(node: Node): node is StringLiteralLike; } declare namespace ts { - function createNode(kind: SyntaxKind, pos?: number, end?: number): Node; + export function createNode(kind: SyntaxKind, pos?: number, end?: number): Node; /** * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, @@ -3607,25 +3629,26 @@ declare namespace ts { * @remarks `forEachChild` must visit the children of a node in the order * that they appear in the source code. The language service depends on this property to locate nodes by position. */ - function forEachChild(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined; - function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile; - function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; + export function forEachChild(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined; + export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile; + export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; /** * Parse json text into SyntaxTree and return node and parse errors if any * @param fileName * @param sourceText */ - function parseJsonText(fileName: string, sourceText: string): JsonSourceFile; - function isExternalModule(file: SourceFile): boolean; - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; + export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile; + export function isExternalModule(file: SourceFile): boolean; + export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; + export {}; } declare namespace ts { - function parseCommandLine(commandLine: ReadonlyArray, readFile?: (path: string) => string | undefined): ParsedCommandLine; - type DiagnosticReporter = (diagnostic: Diagnostic) => void; + export function parseCommandLine(commandLine: ReadonlyArray, readFile?: (path: string) => string | undefined): ParsedCommandLine; + export type DiagnosticReporter = (diagnostic: Diagnostic) => void; /** * Reports config file diagnostics */ - interface ConfigFileDiagnosticsReporter { + export interface ConfigFileDiagnosticsReporter { /** * Reports unrecoverable error when parsing config file */ @@ -3634,18 +3657,18 @@ declare namespace ts { /** * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors */ - interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter { + export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter { getCurrentDirectory(): string; } /** * Reads the config file, reports errors if any and exits if the config file cannot be found */ - function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost, extendedConfigCache?: Map): ParsedCommandLine | undefined; + export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost, extendedConfigCache?: Map): ParsedCommandLine | undefined; /** * Read tsconfig.json file * @param fileName The path to the config file */ - function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { + export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { config?: any; error?: Diagnostic; }; @@ -3654,7 +3677,7 @@ declare namespace ts { * @param fileName The path to the config file * @param jsonText The text of the config file */ - function parseConfigFileTextToJson(fileName: string, jsonText: string): { + export function parseConfigFileTextToJson(fileName: string, jsonText: string): { config?: any; error?: Diagnostic; }; @@ -3662,11 +3685,11 @@ declare namespace ts { * Read tsconfig.json file * @param fileName The path to the config file */ - function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile; + export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile; /** * Convert the json syntax tree into the json value */ - function convertToObject(sourceFile: JsonSourceFile, errors: Push): any; + export function convertToObject(sourceFile: JsonSourceFile, errors: Push): any; /** * Parse the contents of a config file (tsconfig.json). * @param json The contents of the config file to parse @@ -3674,7 +3697,7 @@ declare namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine; + export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine; /** * Parse the contents of a config file (tsconfig.json). * @param jsonNode The contents of the config file to parse @@ -3682,8 +3705,8 @@ declare namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine; - interface ParsedTsconfig { + export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine; + export interface ParsedTsconfig { raw: any; options?: CompilerOptions; typeAcquisition?: TypeAcquisition; @@ -3692,18 +3715,19 @@ declare namespace ts { */ extendedConfigPath?: string; } - interface ExtendedConfigCacheEntry { + export interface ExtendedConfigCacheEntry { extendedResult: TsConfigSourceFile; extendedConfig: ParsedTsconfig | undefined; } - function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { + export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { options: CompilerOptions; errors: Diagnostic[]; }; - function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): { + export function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): { options: TypeAcquisition; errors: Diagnostic[]; }; + export {}; } declare namespace ts { function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; @@ -3902,10 +3926,10 @@ declare namespace ts { function updateConditional(node: ConditionalExpression, condition: Expression, questionToken: Token, whenTrue: Expression, colonToken: Token, whenFalse: Expression): ConditionalExpression; function createTemplateExpression(head: TemplateHead, templateSpans: ReadonlyArray): TemplateExpression; function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: ReadonlyArray): TemplateExpression; - function createTemplateHead(text: string): TemplateHead; - function createTemplateMiddle(text: string): TemplateMiddle; - function createTemplateTail(text: string): TemplateTail; - function createNoSubstitutionTemplateLiteral(text: string): NoSubstitutionTemplateLiteral; + function createTemplateHead(text: string, rawText?: string): TemplateHead; + function createTemplateMiddle(text: string, rawText?: string): TemplateMiddle; + function createTemplateTail(text: string, rawText?: string): TemplateTail; + function createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral; function createYield(expression?: Expression): YieldExpression; function createYield(asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression; function updateYield(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression; @@ -4258,20 +4282,20 @@ declare namespace ts { function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; } declare namespace ts { - function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined; - function resolveTripleslashReference(moduleName: string, containingFile: string): string; - function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; - function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): ReadonlyArray; - interface FormatDiagnosticsHost { + export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined; + export function resolveTripleslashReference(moduleName: string, containingFile: string): string; + export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; + export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): ReadonlyArray; + export interface FormatDiagnosticsHost { getCurrentDirectory(): string; getCanonicalFileName(fileName: string): string; getNewLine(): string; } - function formatDiagnostics(diagnostics: ReadonlyArray, host: FormatDiagnosticsHost): string; - function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string; - function formatDiagnosticsWithColorAndContext(diagnostics: ReadonlyArray, host: FormatDiagnosticsHost): string; - function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain | undefined, newLine: string): string; - function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): ReadonlyArray; + export function formatDiagnostics(diagnostics: ReadonlyArray, host: FormatDiagnosticsHost): string; + export function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string; + export function formatDiagnosticsWithColorAndContext(diagnostics: ReadonlyArray, host: FormatDiagnosticsHost): string; + export function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string; + export function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): ReadonlyArray; /** * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' * that represent a compilation unit. @@ -4282,7 +4306,7 @@ declare namespace ts { * @param createProgramOptions - The options for creating a program. * @returns A 'Program' object. */ - function createProgram(createProgramOptions: CreateProgramOptions): Program; + export function createProgram(createProgramOptions: CreateProgramOptions): Program; /** * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' * that represent a compilation unit. @@ -4297,16 +4321,17 @@ declare namespace ts { * @param configFileParsingDiagnostics - error during config file parsing * @returns A 'Program' object. */ - function createProgram(rootNames: ReadonlyArray, options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: ReadonlyArray): Program; - /** @deprecated */ interface ResolveProjectReferencePathHost { + export function createProgram(rootNames: ReadonlyArray, options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: ReadonlyArray): Program; + /** @deprecated */ export interface ResolveProjectReferencePathHost { fileExists(fileName: string): boolean; } /** * Returns the target config filename of a project reference. * Note: The file might not exist. */ - function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; - /** @deprecated */ function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; + export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; + /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName; + export {}; } declare namespace ts { interface EmitOutput { @@ -4423,7 +4448,7 @@ declare namespace ts { * The builder that can handle the changes in program and iterate through changed file to emit the files * The semantic diagnostics are cached per file and managed by clearing for the changed/affected files */ - interface EmitAndSemanticDiagnosticsBuilderProgram extends BuilderProgram { + interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram { /** * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host @@ -4449,6 +4474,22 @@ declare namespace ts { function createAbstractBuilder(rootNames: ReadonlyArray | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: ReadonlyArray, projectReferences?: ReadonlyArray): BuilderProgram; } declare namespace ts { + interface ReadBuildProgramHost { + useCaseSensitiveFileNames(): boolean; + getCurrentDirectory(): string; + readFile(fileName: string): string | undefined; + } + function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): EmitAndSemanticDiagnosticsBuilderProgram | undefined; + function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost; + interface IncrementalProgramOptions { + rootNames: ReadonlyArray; + options: CompilerOptions; + configFileParsingDiagnostics?: ReadonlyArray; + projectReferences?: ReadonlyArray; + host?: CompilerHost; + createProgram?: CreateProgram; + } + function createIncrementalProgram({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions): T; type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions) => void; /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */ type CreateProgram = (rootNames: ReadonlyArray | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: ReadonlyArray, projectReferences?: ReadonlyArray | undefined) => T; @@ -4499,9 +4540,9 @@ declare namespace ts { /** If provided is used to get the environment variable */ getEnvironmentVariable?(name: string): string | undefined; /** If provided, used to resolve the module names, otherwise typescript's default module resolution */ - resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference): (ResolvedModule | undefined)[]; + resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[]; /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */ - resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference): (ResolvedTypeReferenceDirective | undefined)[]; + resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[]; } interface WatchCompilerHost extends ProgramHost, WatchHost { /** If provided, callback to invoke after every new program creation */ @@ -4535,6 +4576,8 @@ declare namespace ts { interface Watch { /** Synchronize with host and get updated program */ getProgram(): T; + /** Closes the watch */ + close(): void; } /** * Creates the watch what generates program using the config file @@ -4562,6 +4605,91 @@ declare namespace ts { */ function createWatchProgram(host: WatchCompilerHostOfConfigFile): WatchOfConfigFile; } +declare namespace ts { + interface BuildOptions { + dry?: boolean; + force?: boolean; + verbose?: boolean; + incremental?: boolean; + traceResolution?: boolean; + [option: string]: CompilerOptionsValue | undefined; + } + type ReportEmitErrorSummary = (errorCount: number) => void; + interface SolutionBuilderHostBase extends ProgramHost { + createDirectory?(path: string): void; + /** + * Should provide create directory and writeFile if done of invalidatedProjects is not invoked with + * writeFileCallback + */ + writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void; + getModifiedTime(fileName: string): Date | undefined; + setModifiedTime(fileName: string, date: Date): void; + deleteFile(fileName: string): void; + getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; + reportDiagnostic: DiagnosticReporter; + reportSolutionBuilderStatus: DiagnosticReporter; + afterProgramEmitAndDiagnostics?(program: T): void; + } + interface SolutionBuilderHost extends SolutionBuilderHostBase { + reportErrorSummary?: ReportEmitErrorSummary; + } + interface SolutionBuilderWithWatchHost extends SolutionBuilderHostBase, WatchHost { + } + interface SolutionBuilder { + build(project?: string, cancellationToken?: CancellationToken): ExitStatus; + clean(project?: string): ExitStatus; + buildReferences(project: string, cancellationToken?: CancellationToken): ExitStatus; + cleanReferences(project?: string): ExitStatus; + getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject | undefined; + } + /** + * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic + */ + function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter; + function createSolutionBuilderHost(system?: System, createProgram?: CreateProgram, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost; + function createSolutionBuilderWithWatchHost(system?: System, createProgram?: CreateProgram, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost; + function createSolutionBuilder(host: SolutionBuilderHost, rootNames: ReadonlyArray, defaultOptions: BuildOptions): SolutionBuilder; + function createSolutionBuilderWithWatch(host: SolutionBuilderWithWatchHost, rootNames: ReadonlyArray, defaultOptions: BuildOptions): SolutionBuilder; + enum InvalidatedProjectKind { + Build = 0, + UpdateBundle = 1, + UpdateOutputFileStamps = 2 + } + interface InvalidatedProjectBase { + readonly kind: InvalidatedProjectKind; + readonly project: ResolvedConfigFileName; + /** + * To dispose this project and ensure that all the necessary actions are taken and state is updated accordingly + */ + done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus; + getCompilerOptions(): CompilerOptions; + getCurrentDirectory(): string; + } + interface UpdateOutputFileStampsProject extends InvalidatedProjectBase { + readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps; + updateOutputFileStatmps(): void; + } + interface BuildInvalidedProject extends InvalidatedProjectBase { + readonly kind: InvalidatedProjectKind.Build; + getBuilderProgram(): T | undefined; + getProgram(): Program | undefined; + getSourceFile(fileName: string): SourceFile | undefined; + getSourceFiles(): ReadonlyArray; + getOptionsDiagnostics(cancellationToken?: CancellationToken): ReadonlyArray; + getGlobalDiagnostics(cancellationToken?: CancellationToken): ReadonlyArray; + getConfigFileParsingDiagnostics(): ReadonlyArray; + getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): ReadonlyArray; + getAllDependencies(sourceFile: SourceFile): ReadonlyArray; + getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): ReadonlyArray; + getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult>; + emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined; + } + interface UpdateBundleProject extends InvalidatedProjectBase { + readonly kind: InvalidatedProjectKind.UpdateBundle; + emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject | undefined; + } + type InvalidatedProject = UpdateOutputFileStampsProject | BuildInvalidedProject | UpdateBundleProject; +} declare namespace ts.server { type ActionSet = "action::set"; type ActionInvalidate = "action::invalidate"; @@ -4769,9 +4897,9 @@ declare namespace ts { realpath?(path: string): string; fileExists?(path: string): boolean; getTypeRootsVersion?(): number; - resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference): (ResolvedModule | undefined)[]; + resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[]; getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined; - resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference): (ResolvedTypeReferenceDirective | undefined)[]; + resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[]; getDirectories?(directoryName: string): string[]; /** * Gets a set of custom transformers to use during emit. @@ -5071,6 +5199,12 @@ declare namespace ts { */ originalTextSpan?: TextSpan; originalFileName?: string; + /** + * If DocumentSpan.textSpan is the span for name of the declaration, + * then this is the span for relevant declaration + */ + contextSpan?: TextSpan; + originalContextSpan?: TextSpan; } interface RenameLocation extends DocumentSpan { readonly prefixText?: string; @@ -5099,6 +5233,7 @@ declare namespace ts { fileName?: string; isInString?: true; textSpan: TextSpan; + contextSpan?: TextSpan; kind: HighlightSpanKind; } interface NavigateToItem { @@ -5286,7 +5421,7 @@ declare namespace ts { argumentCount: number; } interface CompletionInfo { - /** Not true for all glboal completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ + /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ isGlobalCompletion: boolean; isMemberCompletion: boolean; /** @@ -5547,6 +5682,7 @@ declare namespace ts { } } declare namespace ts { + /** The classifier is used for syntactic highlighting in editors via the TSServer */ function createClassifier(): Classifier; } declare namespace ts { @@ -5663,4 +5799,4 @@ declare namespace ts { function transform(source: T | T[], transformers: TransformerFactory[], compilerOptions?: CompilerOptions): TransformationResult; } -export = ts; \ No newline at end of file +export = ts; diff --git a/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js b/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js index 56ae492c34c3..fd7aaa5b59f0 100644 --- a/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +++ b/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js @@ -14,6 +14,13 @@ and limitations under the License. ***************************************************************************** */ "use strict"; +var __spreadArrays = (this && this.__spreadArrays) || function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { @@ -73,9 +80,9 @@ var ts; (function (ts) { // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configureNightly` too. - ts.versionMajorMinor = "3.5"; + ts.versionMajorMinor = "3.6"; /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".3"; + ts.version = ts.versionMajorMinor + ".4"; })(ts || (ts = {})); (function (ts) { /* @internal */ @@ -254,11 +261,12 @@ var ts; class_1.prototype.forEach = function (action) { var iterator = this.entries(); while (true) { - var _a = iterator.next(), entry = _a.value, done = _a.done; - if (done) { + var iterResult = iterator.next(); + if (iterResult.done) { break; } - action(entry[1], entry[0]); + var _a = iterResult.value, key = _a[0], value = _a[1]; + action(value, key); } }; return class_1; @@ -302,11 +310,11 @@ var ts; ts.firstDefined = firstDefined; function firstDefinedIterator(iter, callback) { while (true) { - var _a = iter.next(), value = _a.value, done = _a.done; - if (done) { + var iterResult = iter.next(); + if (iterResult.done) { return undefined; } - var result = callback(value); + var result = callback(iterResult.value); if (result !== undefined) { return result; } @@ -529,19 +537,21 @@ var ts; return array; } ts.sameMap = sameMap; + /** + * Flattens an array containing a mix of array or non-array elements. + * + * @param array The array to flatten. + */ function flatten(array) { - var result; - if (array) { - result = []; - for (var _i = 0, array_2 = array; _i < array_2.length; _i++) { - var v = array_2[_i]; - if (v) { - if (isArray(v)) { - addRange(result, v); - } - else { - result.push(v); - } + var result = []; + for (var _i = 0, array_2 = array; _i < array_2.length; _i++) { + var v = array_2[_i]; + if (v) { + if (isArray(v)) { + addRange(result, v); + } + else { + result.push(v); } } } @@ -780,7 +790,7 @@ var ts; return array1; if (!some(array1)) return array2; - return array1.concat(array2); + return __spreadArrays(array1, array2); } ts.concatenate = concatenate; function deduplicateRelational(array, equalityComparer, comparer) { @@ -1227,6 +1237,18 @@ var ts; return keys; } ts.getOwnKeys = getOwnKeys; + function getAllKeys(obj) { + var result = []; + do { + var names = Object.getOwnPropertyNames(obj); + for (var _i = 0, names_1 = names; _i < names_1.length; _i++) { + var name = names_1[_i]; + pushIfUnique(result, name); + } + } while (obj = Object.getPrototypeOf(obj)); + return result; + } + ts.getAllKeys = getAllKeys; function getOwnValues(sparseArray) { var values = []; for (var key in sparseArray) { @@ -1238,10 +1260,9 @@ var ts; } ts.getOwnValues = getOwnValues; function arrayFrom(iterator, map) { - var _a; var result = []; - for (var _b = iterator.next(), value = _b.value, done = _b.done; !done; _a = iterator.next(), value = _a.value, done = _a.done, _a) { - result.push(map ? map(value) : value); + for (var iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) { + result.push(map ? map(iterResult.value) : iterResult.value); } return result; } @@ -2367,6 +2388,47 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var nullLogger = { + logEvent: ts.noop, + logErrEvent: ts.noop, + logPerfEvent: ts.noop, + logInfoEvent: ts.noop, + logStartCommand: ts.noop, + logStopCommand: ts.noop, + logStartUpdateProgram: ts.noop, + logStopUpdateProgram: ts.noop, + logStartUpdateGraph: ts.noop, + logStopUpdateGraph: ts.noop, + logStartResolveModule: ts.noop, + logStopResolveModule: ts.noop, + logStartParseSourceFile: ts.noop, + logStopParseSourceFile: ts.noop, + logStartReadFile: ts.noop, + logStopReadFile: ts.noop, + logStartBindFile: ts.noop, + logStopBindFile: ts.noop, + logStartScheduledOperation: ts.noop, + logStopScheduledOperation: ts.noop, + }; + // Load optional module to enable Event Tracing for Windows + // See https://github.com/microsoft/typescript-etw for more information + var etwModule; + try { + // require() will throw an exception if the module is not installed + // It may also return undefined if not installed properly + etwModule = require("@microsoft/typescript-etw"); // tslint:disable-line:no-implicit-dependencies + } + catch (e) { + etwModule = undefined; + } + /** Performance logger that will generate ETW events if possible - check for `logEvent` member, as `etwModule` will be `{}` when browserified */ + ts.perfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger; + var args = typeof process === "undefined" ? [] : process.argv; + ts.perfLogger.logInfoEvent("Starting TypeScript v" + ts.versionMajorMinor + " with command line: " + JSON.stringify(args)); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { // https://semver.org/#spec-item-2 // > A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative @@ -3059,31 +3121,34 @@ var ts; SyntaxKind[SyntaxKind["JSDocOptionalType"] = 294] = "JSDocOptionalType"; SyntaxKind[SyntaxKind["JSDocFunctionType"] = 295] = "JSDocFunctionType"; SyntaxKind[SyntaxKind["JSDocVariadicType"] = 296] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 297] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 298] = "JSDocTypeLiteral"; - SyntaxKind[SyntaxKind["JSDocSignature"] = 299] = "JSDocSignature"; - SyntaxKind[SyntaxKind["JSDocTag"] = 300] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 301] = "JSDocAugmentsTag"; - SyntaxKind[SyntaxKind["JSDocClassTag"] = 302] = "JSDocClassTag"; - SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 303] = "JSDocCallbackTag"; - SyntaxKind[SyntaxKind["JSDocEnumTag"] = 304] = "JSDocEnumTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 305] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 306] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocThisTag"] = 307] = "JSDocThisTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 308] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 309] = "JSDocTemplateTag"; - SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 310] = "JSDocTypedefTag"; - SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 311] = "JSDocPropertyTag"; + // https://jsdoc.app/about-namepaths.html + SyntaxKind[SyntaxKind["JSDocNamepathType"] = 297] = "JSDocNamepathType"; + SyntaxKind[SyntaxKind["JSDocComment"] = 298] = "JSDocComment"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 299] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocSignature"] = 300] = "JSDocSignature"; + SyntaxKind[SyntaxKind["JSDocTag"] = 301] = "JSDocTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 302] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocAuthorTag"] = 303] = "JSDocAuthorTag"; + SyntaxKind[SyntaxKind["JSDocClassTag"] = 304] = "JSDocClassTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 305] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocEnumTag"] = 306] = "JSDocEnumTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 307] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 308] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 309] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 310] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 311] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 312] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 313] = "JSDocPropertyTag"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 312] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 314] = "SyntaxList"; // Transformation nodes - SyntaxKind[SyntaxKind["NotEmittedStatement"] = 313] = "NotEmittedStatement"; - SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 314] = "PartiallyEmittedExpression"; - SyntaxKind[SyntaxKind["CommaListExpression"] = 315] = "CommaListExpression"; - SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 316] = "MergeDeclarationMarker"; - SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 317] = "EndOfDeclarationMarker"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 315] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 316] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["CommaListExpression"] = 317] = "CommaListExpression"; + SyntaxKind[SyntaxKind["MergeDeclarationMarker"] = 318] = "MergeDeclarationMarker"; + SyntaxKind[SyntaxKind["EndOfDeclarationMarker"] = 319] = "EndOfDeclarationMarker"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 318] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 320] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 60] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 72] = "LastAssignment"; @@ -3111,9 +3176,9 @@ var ts; SyntaxKind[SyntaxKind["LastBinaryOperator"] = 72] = "LastBinaryOperator"; SyntaxKind[SyntaxKind["FirstNode"] = 149] = "FirstNode"; SyntaxKind[SyntaxKind["FirstJSDocNode"] = 289] = "FirstJSDocNode"; - SyntaxKind[SyntaxKind["LastJSDocNode"] = 311] = "LastJSDocNode"; - SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 300] = "FirstJSDocTagNode"; - SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 311] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 313] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 301] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 313] = "LastJSDocTagNode"; /* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 119] = "FirstContextualKeyword"; /* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 148] = "LastContextualKeyword"; })(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {})); @@ -3239,6 +3304,8 @@ var ts; /* @internal */ TokenFlags[TokenFlags["ContainsSeparator"] = 512] = "ContainsSeparator"; /* @internal */ + TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; + /* @internal */ TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; /* @internal */ TokenFlags[TokenFlags["NumericLiteralFlags"] = 1008] = "NumericLiteralFlags"; @@ -3287,6 +3354,8 @@ var ts; ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped"; // Diagnostics were produced and outputs were generated in spite of them. ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated"; + // When build skipped because passed in project is invalid + ExitStatus[ExitStatus["InvalidProject_OutputsSkipped"] = 3] = "InvalidProject_OutputsSkipped"; })(ExitStatus = ts.ExitStatus || (ts.ExitStatus = {})); /* @internal */ var UnionReduction; @@ -3460,32 +3529,32 @@ var ts; SymbolFlags[SymbolFlags["All"] = 67108863] = "All"; SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; - SymbolFlags[SymbolFlags["Value"] = 67220415] = "Value"; - SymbolFlags[SymbolFlags["Type"] = 67897832] = "Type"; + SymbolFlags[SymbolFlags["Value"] = 111551] = "Value"; + SymbolFlags[SymbolFlags["Type"] = 788968] = "Type"; SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace"; SymbolFlags[SymbolFlags["Module"] = 1536] = "Module"; SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor"; // Variables can be redeclared, but can not redeclare a block-scoped declaration with the // same name, or any other value that is not a variable, e.g. ValueModule or Class - SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 67220414] = "FunctionScopedVariableExcludes"; + SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 111550] = "FunctionScopedVariableExcludes"; // Block-scoped declarations are not allowed to be re-declared // they can not merge with anything in the value space - SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 67220415] = "BlockScopedVariableExcludes"; - SymbolFlags[SymbolFlags["ParameterExcludes"] = 67220415] = "ParameterExcludes"; + SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 111551] = "BlockScopedVariableExcludes"; + SymbolFlags[SymbolFlags["ParameterExcludes"] = 111551] = "ParameterExcludes"; SymbolFlags[SymbolFlags["PropertyExcludes"] = 0] = "PropertyExcludes"; - SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 68008959] = "EnumMemberExcludes"; - SymbolFlags[SymbolFlags["FunctionExcludes"] = 67219887] = "FunctionExcludes"; - SymbolFlags[SymbolFlags["ClassExcludes"] = 68008383] = "ClassExcludes"; - SymbolFlags[SymbolFlags["InterfaceExcludes"] = 67897736] = "InterfaceExcludes"; - SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 68008191] = "RegularEnumExcludes"; - SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 68008831] = "ConstEnumExcludes"; + SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes"; + SymbolFlags[SymbolFlags["FunctionExcludes"] = 110991] = "FunctionExcludes"; + SymbolFlags[SymbolFlags["ClassExcludes"] = 899503] = "ClassExcludes"; + SymbolFlags[SymbolFlags["InterfaceExcludes"] = 788872] = "InterfaceExcludes"; + SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; + SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 110735] = "ValueModuleExcludes"; SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes"; - SymbolFlags[SymbolFlags["MethodExcludes"] = 67212223] = "MethodExcludes"; - SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 67154879] = "GetAccessorExcludes"; - SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 67187647] = "SetAccessorExcludes"; - SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 67635688] = "TypeParameterExcludes"; - SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 67897832] = "TypeAliasExcludes"; + SymbolFlags[SymbolFlags["MethodExcludes"] = 103359] = "MethodExcludes"; + SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 46015] = "GetAccessorExcludes"; + SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 78783] = "SetAccessorExcludes"; + SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 526824] = "TypeParameterExcludes"; + SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 788968] = "TypeAliasExcludes"; SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes"; SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember"; SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; @@ -3648,7 +3717,7 @@ var ts; TypeFlags[TypeFlags["NotPrimitiveUnion"] = 66994211] = "NotPrimitiveUnion"; // The following flags are aggregated during union and intersection type construction /* @internal */ - TypeFlags[TypeFlags["IncludesMask"] = 1835007] = "IncludesMask"; + TypeFlags[TypeFlags["IncludesMask"] = 68943871] = "IncludesMask"; // The following flags are used for different purposes during union and intersection type construction /* @internal */ TypeFlags[TypeFlags["IncludesStructuredOrInstantiable"] = 262144] = "IncludesStructuredOrInstantiable"; @@ -3680,19 +3749,20 @@ var ts; ObjectFlags[ObjectFlags["MarkerType"] = 8192] = "MarkerType"; ObjectFlags[ObjectFlags["JSLiteral"] = 16384] = "JSLiteral"; ObjectFlags[ObjectFlags["FreshLiteral"] = 32768] = "FreshLiteral"; + ObjectFlags[ObjectFlags["ArrayLiteral"] = 65536] = "ArrayLiteral"; /* @internal */ - ObjectFlags[ObjectFlags["PrimitiveUnion"] = 65536] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 131072] = "PrimitiveUnion"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsWideningType"] = 131072] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 262144] = "ContainsWideningType"; /* @internal */ - ObjectFlags[ObjectFlags["ContainsObjectLiteral"] = 262144] = "ContainsObjectLiteral"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 524288] = "ContainsObjectOrArrayLiteral"; /* @internal */ - ObjectFlags[ObjectFlags["NonInferrableType"] = 524288] = "NonInferrableType"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 1048576] = "NonInferrableType"; ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; /* @internal */ - ObjectFlags[ObjectFlags["RequiresWidening"] = 393216] = "RequiresWidening"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 786432] = "RequiresWidening"; /* @internal */ - ObjectFlags[ObjectFlags["PropagatingFlags"] = 917504] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 1835008] = "PropagatingFlags"; })(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {})); /* @internal */ var VarianceFlags; @@ -3734,7 +3804,9 @@ var ts; InferencePriority[InferencePriority["LiteralKeyof"] = 32] = "LiteralKeyof"; InferencePriority[InferencePriority["NoConstraints"] = 64] = "NoConstraints"; InferencePriority[InferencePriority["AlwaysStrict"] = 128] = "AlwaysStrict"; + InferencePriority[InferencePriority["MaxValue"] = 256] = "MaxValue"; InferencePriority[InferencePriority["PriorityImpliesCombination"] = 56] = "PriorityImpliesCombination"; + InferencePriority[InferencePriority["Circularity"] = -1] = "Circularity"; })(InferencePriority = ts.InferencePriority || (ts.InferencePriority = {})); /* @internal */ var InferenceFlags; @@ -3812,8 +3884,11 @@ var ts; ModuleKind[ModuleKind["AMD"] = 2] = "AMD"; ModuleKind[ModuleKind["UMD"] = 3] = "UMD"; ModuleKind[ModuleKind["System"] = 4] = "System"; + // NOTE: ES module kinds should be contiguous to more easily check whether a module kind is *any* ES module kind. + // Non-ES module kinds should not come between ES2015 (the earliest ES module kind) and ESNext (the last ES + // module kind). ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015"; - ModuleKind[ModuleKind["ESNext"] = 6] = "ESNext"; + ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext"; })(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {})); var JsxEmit; (function (JsxEmit) { @@ -3852,9 +3927,9 @@ var ts; ScriptTarget[ScriptTarget["ES2018"] = 5] = "ES2018"; ScriptTarget[ScriptTarget["ES2019"] = 6] = "ES2019"; ScriptTarget[ScriptTarget["ES2020"] = 7] = "ES2020"; - ScriptTarget[ScriptTarget["ESNext"] = 8] = "ESNext"; + ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext"; ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON"; - ScriptTarget[ScriptTarget["Latest"] = 8] = "Latest"; + ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest"; })(ScriptTarget = ts.ScriptTarget || (ts.ScriptTarget = {})); var LanguageVariant; (function (LanguageVariant) { @@ -4033,6 +4108,7 @@ var ts; TransformFlags[TransformFlags["ContainsYield"] = 131072] = "ContainsYield"; TransformFlags[TransformFlags["ContainsHoistedDeclarationOrCompletion"] = 262144] = "ContainsHoistedDeclarationOrCompletion"; TransformFlags[TransformFlags["ContainsDynamicImport"] = 524288] = "ContainsDynamicImport"; + TransformFlags[TransformFlags["ContainsClassFields"] = 1048576] = "ContainsClassFields"; // Please leave this as 1 << 29. // It is the maximum bit we can set before we outgrow the size of a v8 small integer (SMI) on an x86 system. // It is a good reminder of how much room we have left @@ -4127,22 +4203,23 @@ var ts; ExternalEmitHelpers[ExternalEmitHelpers["Values"] = 256] = "Values"; ExternalEmitHelpers[ExternalEmitHelpers["Read"] = 512] = "Read"; ExternalEmitHelpers[ExternalEmitHelpers["Spread"] = 1024] = "Spread"; - ExternalEmitHelpers[ExternalEmitHelpers["Await"] = 2048] = "Await"; - ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 4096] = "AsyncGenerator"; - ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 8192] = "AsyncDelegator"; - ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 16384] = "AsyncValues"; - ExternalEmitHelpers[ExternalEmitHelpers["ExportStar"] = 32768] = "ExportStar"; - ExternalEmitHelpers[ExternalEmitHelpers["MakeTemplateObject"] = 65536] = "MakeTemplateObject"; + ExternalEmitHelpers[ExternalEmitHelpers["SpreadArrays"] = 2048] = "SpreadArrays"; + ExternalEmitHelpers[ExternalEmitHelpers["Await"] = 4096] = "Await"; + ExternalEmitHelpers[ExternalEmitHelpers["AsyncGenerator"] = 8192] = "AsyncGenerator"; + ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegator"] = 16384] = "AsyncDelegator"; + ExternalEmitHelpers[ExternalEmitHelpers["AsyncValues"] = 32768] = "AsyncValues"; + ExternalEmitHelpers[ExternalEmitHelpers["ExportStar"] = 65536] = "ExportStar"; + ExternalEmitHelpers[ExternalEmitHelpers["MakeTemplateObject"] = 131072] = "MakeTemplateObject"; ExternalEmitHelpers[ExternalEmitHelpers["FirstEmitHelper"] = 1] = "FirstEmitHelper"; - ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 65536] = "LastEmitHelper"; + ExternalEmitHelpers[ExternalEmitHelpers["LastEmitHelper"] = 131072] = "LastEmitHelper"; // Helpers included by ES2015 for..of ExternalEmitHelpers[ExternalEmitHelpers["ForOfIncludes"] = 256] = "ForOfIncludes"; // Helpers included by ES2017 for..await..of - ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 16384] = "ForAwaitOfIncludes"; + ExternalEmitHelpers[ExternalEmitHelpers["ForAwaitOfIncludes"] = 32768] = "ForAwaitOfIncludes"; // Helpers included by ES2017 async generators - ExternalEmitHelpers[ExternalEmitHelpers["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes"; + ExternalEmitHelpers[ExternalEmitHelpers["AsyncGeneratorIncludes"] = 12288] = "AsyncGeneratorIncludes"; // Helpers included by yield* in ES2017 async generators - ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegatorIncludes"] = 26624] = "AsyncDelegatorIncludes"; + ExternalEmitHelpers[ExternalEmitHelpers["AsyncDelegatorIncludes"] = 53248] = "AsyncDelegatorIncludes"; // Helpers included by ES2015 spread ExternalEmitHelpers[ExternalEmitHelpers["SpreadIncludes"] = 1536] = "SpreadIncludes"; })(ExternalEmitHelpers = ts.ExternalEmitHelpers || (ts.ExternalEmitHelpers = {})); @@ -4394,7 +4471,7 @@ var ts; function getCustomPollingBasedLevels(baseVariable, defaultLevels) { var customLevels = getCustomLevels(baseVariable); return (pollingIntervalChanged || customLevels) && - createPollingIntervalBasedLevels(customLevels ? __assign({}, defaultLevels, customLevels) : defaultLevels); + createPollingIntervalBasedLevels(customLevels ? __assign(__assign({}, defaultLevels), customLevels) : defaultLevels); } } ts.setCustomPollingValues = setCustomPollingValues; @@ -4548,6 +4625,38 @@ var ts; } } ts.createDynamicPriorityPollingWatchFile = createDynamicPriorityPollingWatchFile; + /* @internal */ + function createSingleFileWatcherPerName(watchFile, useCaseSensitiveFileNames) { + var cache = ts.createMap(); + var callbacksCache = ts.createMultiMap(); + var toCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames); + return function (fileName, callback, pollingInterval) { + var path = toCanonicalFileName(fileName); + var existing = cache.get(path); + if (existing) { + existing.refCount++; + } + else { + cache.set(path, { + watcher: watchFile(fileName, function (fileName, eventKind) { return ts.forEach(callbacksCache.get(path), function (cb) { return cb(fileName, eventKind); }); }, pollingInterval), + refCount: 1 + }); + } + callbacksCache.add(path, callback); + return { + close: function () { + var watcher = ts.Debug.assertDefined(cache.get(path)); + callbacksCache.remove(path, callback); + watcher.refCount--; + if (watcher.refCount) + return; + cache.delete(path); + ts.closeFileWatcherOf(watcher); + } + }; + }; + } + ts.createSingleFileWatcherPerName = createSingleFileWatcherPerName; /** * Returns true if file status changed */ @@ -4573,7 +4682,9 @@ var ts; } ts.getFileWatcherEventKind = getFileWatcherEventKind; /*@internal*/ - ts.ignoredPaths = ["/node_modules/.", "/.git"]; + ts.ignoredPaths = ["/node_modules/.", "/.git", "/.#"]; + /*@internal*/ + ts.sysLog = ts.noop; /** * Watch the directory recursively using host provided method to watch child directories * that means if this is recursive watcher, watch the children directories as well @@ -4714,6 +4825,7 @@ var ts; var Buffer = require("buffer").Buffer; var nodeVersion = getNodeMajorVersion(); var isNode4OrLater = nodeVersion >= 4; + var isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin"; var platform = _os.platform(); var useCaseSensitiveFileNames = isFileSystemCaseSensitive(); var FileSystemEntryKind; @@ -4724,6 +4836,7 @@ var ts; var useNonPollingWatchers = process.env.TSC_NONPOLLING_WATCHER; var tscWatchFile = process.env.TSC_WATCHFILE; var tscWatchDirectory = process.env.TSC_WATCHDIRECTORY; + var fsWatchFile = createSingleFileWatcherPerName(fsWatchFileWorker, useCaseSensitiveFileNames); var dynamicPollingWatchFile; var nodeSystem = { args: process.argv.slice(2), @@ -4860,7 +4973,7 @@ var ts; return useNonPollingWatchers ? createNonPollingWatchFile() : // Default to do not use polling interval as it is before this experiment branch - function (fileName, callback) { return fsWatchFile(fileName, callback); }; + function (fileName, callback) { return fsWatchFile(fileName, callback, /*pollingInterval*/ undefined); }; } function getWatchDirectory() { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows @@ -4934,7 +5047,7 @@ var ts; return watcher; } } - function fsWatchFile(fileName, callback, pollingInterval) { + function fsWatchFileWorker(fileName, callback, pollingInterval) { _fs.watchFile(fileName, { persistent: true, interval: pollingInterval || 250 }, fileChanged); var eventKind; return { @@ -4992,6 +5105,12 @@ var ts; } function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingWatchFile, pollingInterval) { var options; + var lastDirectoryPartWithDirectorySeparator; + var lastDirectoryPart; + if (isLinuxOrMacOs) { + lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substr(fileOrDirectory.lastIndexOf(ts.directorySeparator)); + lastDirectoryPart = lastDirectoryPartWithDirectorySeparator.slice(ts.directorySeparator.length); + } /** Watcher for the file system entry depending on whether it is missing or present */ var watcher = !fileSystemEntryExists(fileOrDirectory, entryKind) ? watchMissingFileSystemEntry() : @@ -5008,6 +5127,7 @@ var ts; * @param createWatcher */ function invokeCallbackAndUpdateWatcher(createWatcher) { + ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher"); // Call the callback for current directory callback("rename", ""); // If watcher is not closed, update it @@ -5032,7 +5152,9 @@ var ts; } } try { - var presentWatcher = _fs.watch(fileOrDirectory, options, callback); + var presentWatcher = _fs.watch(fileOrDirectory, options, isLinuxOrMacOs ? + callbackChangingToMissingFileSystemEntry : + callback); // Watch the missing file or directory or error presentWatcher.on("error", function () { return invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry); }); return presentWatcher; @@ -5044,11 +5166,23 @@ var ts; return watchPresentFileSystemEntryWithFsWatchFile(); } } + function callbackChangingToMissingFileSystemEntry(event, relativeName) { + // because relativeName is not guaranteed to be correct we need to check on each rename with few combinations + // Eg on ubuntu while watching app/node_modules the relativeName is "node_modules" which is neither relative nor full path + return event === "rename" && + (!relativeName || + relativeName === lastDirectoryPart || + relativeName.lastIndexOf(lastDirectoryPartWithDirectorySeparator) === relativeName.length - lastDirectoryPartWithDirectorySeparator.length) && + !fileSystemEntryExists(fileOrDirectory, entryKind) ? + invokeCallbackAndUpdateWatcher(watchMissingFileSystemEntry) : + callback(event, relativeName); + } /** * Watch the file or directory using fs.watchFile since fs.watch threw exception * Eg. on linux the number of watches are limited and one could easily exhaust watches and the exception ENOSPC is thrown when creating watcher at that point */ function watchPresentFileSystemEntryWithFsWatchFile() { + ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile"); return fallbackPollingWatchFile(fileOrDirectory, createFileWatcherCallback(callback), pollingInterval); } /** @@ -5081,7 +5215,7 @@ var ts; function createWatchDirectoryUsing(fsWatchFile) { return function (directoryName, callback) { return fsWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium); }; } - function readFile(fileName, _encoding) { + function readFileWorker(fileName, _encoding) { if (!fileExists(fileName)) { return undefined; } @@ -5109,7 +5243,14 @@ var ts; // Default is UTF-8 with no byte order mark return buffer.toString("utf8"); } + function readFile(fileName, _encoding) { + ts.perfLogger.logStartReadFile(fileName); + var file = readFileWorker(fileName, _encoding); + ts.perfLogger.logStopReadFile(); + return file; + } function writeFile(fileName, data, writeByteOrderMark) { + ts.perfLogger.logEvent("WriteFile: " + fileName); // If a BOM is required, emit one if (writeByteOrderMark) { data = byteOrderMarkIndicator + data; @@ -5126,6 +5267,7 @@ var ts; } } function getAccessibleFileSystemEntries(path) { + ts.perfLogger.logEvent("ReadDir: " + (path || ".")); try { var entries = _fs.readdirSync(path || ".").sort(); var files = []; @@ -5181,6 +5323,7 @@ var ts; return fileSystemEntryExists(path, 1 /* Directory */); } function getDirectories(path) { + ts.perfLogger.logEvent("ReadDir: " + path); return ts.filter(_fs.readdirSync(path), function (dir) { return fileSystemEntryExists(ts.combinePaths(path, dir), 1 /* Directory */); }); } function realpath(path) { @@ -5371,7 +5514,6 @@ var ts; A_0_modifier_cannot_be_used_with_an_import_declaration: diag(1079, ts.DiagnosticCategory.Error, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), Invalid_reference_directive_syntax: diag(1084, ts.DiagnosticCategory.Error, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: diag(1085, ts.DiagnosticCategory.Error, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."), - An_accessor_cannot_be_declared_in_an_ambient_context: diag(1086, ts.DiagnosticCategory.Error, "An_accessor_cannot_be_declared_in_an_ambient_context_1086", "An accessor cannot be declared in an ambient context."), _0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, ts.DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), _0_modifier_cannot_appear_on_a_parameter: diag(1090, ts.DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: diag(1091, ts.DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), @@ -5524,6 +5666,7 @@ var ts; A_required_element_cannot_follow_an_optional_element: diag(1257, ts.DiagnosticCategory.Error, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation: diag(1258, ts.DiagnosticCategory.Error, "Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258", "Definite assignment assertions can only be used along with a type annotation."), Module_0_can_only_be_default_imported_using_the_1_flag: diag(1259, ts.DiagnosticCategory.Error, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"), + Keywords_cannot_contain_escape_characters: diag(1260, ts.DiagnosticCategory.Error, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."), with_statements_are_not_allowed_in_an_async_function_block: diag(1300, ts.DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), await_expression_is_only_allowed_within_an_async_function: diag(1308, ts.DiagnosticCategory.Error, "await_expression_is_only_allowed_within_an_async_function_1308", "'await' expression is only allowed within an async function."), can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment: diag(1312, ts.DiagnosticCategory.Error, "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312", "'=' can only be used in an object literal property inside a destructuring assignment."), @@ -5556,7 +5699,7 @@ var ts; Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."), - The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_options: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_option_1343", "The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options."), + The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'."), A_label_is_not_allowed_here: diag(1344, ts.DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, ts.DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness"), This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, ts.DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), @@ -5619,9 +5762,9 @@ var ts; Call_target_does_not_contain_any_signatures: diag(2346, ts.DiagnosticCategory.Error, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), Untyped_function_calls_may_not_accept_type_arguments: diag(2347, ts.DiagnosticCategory.Error, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, ts.DiagnosticCategory.Error, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), - Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures: diag(2349, ts.DiagnosticCategory.Error, "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatur_2349", "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures."), + This_expression_is_not_callable: diag(2349, ts.DiagnosticCategory.Error, "This_expression_is_not_callable_2349", "This expression is not callable."), Only_a_void_function_can_be_called_with_the_new_keyword: diag(2350, ts.DiagnosticCategory.Error, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), - Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: diag(2351, ts.DiagnosticCategory.Error, "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", "Cannot use 'new' with an expression whose type lacks a call or construct signature."), + This_expression_is_not_constructable: diag(2351, ts.DiagnosticCategory.Error, "This_expression_is_not_constructable_2351", "This expression is not constructable."), Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: diag(2352, ts.DiagnosticCategory.Error, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."), Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: diag(2353, ts.DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: diag(2354, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), @@ -5751,7 +5894,7 @@ var ts; The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: diag(2487, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2488, ts.DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), An_iterator_must_have_a_next_method: diag(2489, ts.DiagnosticCategory.Error, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), - The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: diag(2490, ts.DiagnosticCategory.Error, "The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the 'next()' method of an iterator must have a 'value' property."), + The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: diag(2490, ts.DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."), The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: diag(2491, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), Cannot_redeclare_identifier_0_in_catch_clause: diag(2492, ts.DiagnosticCategory.Error, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), Tuple_type_0_of_length_1_has_no_element_at_index_2: diag(2493, ts.DiagnosticCategory.Error, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."), @@ -5808,7 +5951,7 @@ var ts; Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: diag(2544, ts.DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: diag(2545, ts.DiagnosticCategory.Error, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1: diag(2546, ts.DiagnosticCategory.Error, "Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546", "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'."), - The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, ts.DiagnosticCategory.Error, "The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value__2547", "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property."), + The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, ts.DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."), Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2548, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2549, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), Property_0_does_not_exist_on_type_1_Did_you_mean_2: diag(2551, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), @@ -5829,7 +5972,6 @@ var ts; A_rest_element_cannot_have_a_property_name: diag(2566, ts.DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, ts.DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators: diag(2569, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569", "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."), - Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await: diag(2570, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await_2570", "Property '{0}' does not exist on type '{1}'. Did you forget to use 'await'?"), Object_is_of_type_unknown: diag(2571, ts.DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), Rest_signatures_are_incompatible: diag(2572, ts.DiagnosticCategory.Error, "Rest_signatures_are_incompatible_2572", "Rest signatures are incompatible."), Property_0_is_incompatible_with_rest_element_type: diag(2573, ts.DiagnosticCategory.Error, "Property_0_is_incompatible_with_rest_element_type_2573", "Property '{0}' is incompatible with rest element type."), @@ -5965,6 +6107,25 @@ var ts; The_first_export_default_is_here: diag(2752, ts.DiagnosticCategory.Error, "The_first_export_default_is_here_2752", "The first export default is here."), Another_export_default_is_here: diag(2753, ts.DiagnosticCategory.Error, "Another_export_default_is_here_2753", "Another export default is here."), super_may_not_use_type_arguments: diag(2754, ts.DiagnosticCategory.Error, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), + No_constituent_of_type_0_is_callable: diag(2755, ts.DiagnosticCategory.Error, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), + Not_all_constituents_of_type_0_are_callable: diag(2756, ts.DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), + Type_0_has_no_call_signatures: diag(2757, ts.DiagnosticCategory.Error, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."), + Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2758, ts.DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."), + No_constituent_of_type_0_is_constructable: diag(2759, ts.DiagnosticCategory.Error, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), + Not_all_constituents_of_type_0_are_constructable: diag(2760, ts.DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), + Type_0_has_no_construct_signatures: diag(2761, ts.DiagnosticCategory.Error, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."), + Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2762, ts.DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: diag(2763, ts.DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: diag(2764, ts.DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: diag(2765, ts.DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."), + Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: diag(2766, ts.DiagnosticCategory.Error, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."), + The_0_property_of_an_iterator_must_be_a_method: diag(2767, ts.DiagnosticCategory.Error, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."), + The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, ts.DiagnosticCategory.Error, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."), + No_overload_matches_this_call: diag(2769, ts.DiagnosticCategory.Error, "No_overload_matches_this_call_2769", "No overload matches this call."), + The_last_overload_gave_the_following_error: diag(2770, ts.DiagnosticCategory.Error, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), + The_last_overload_is_declared_here: diag(2771, ts.DiagnosticCategory.Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), + Overload_0_of_1_2_gave_the_following_error: diag(2772, ts.DiagnosticCategory.Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."), + Did_you_forget_to_use_await: diag(2773, ts.DiagnosticCategory.Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), @@ -6050,6 +6211,7 @@ var ts; Method_0_of_exported_interface_has_or_is_using_private_name_1: diag(4102, ts.DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: diag(4103, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."), The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: diag(4104, ts.DiagnosticCategory.Error, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."), + Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: diag(4105, ts.DiagnosticCategory.Error, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."), The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), @@ -6296,7 +6458,7 @@ var ts; Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), Output_file_0_has_not_been_built_from_source_file_1: diag(6305, ts.DiagnosticCategory.Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), Referenced_project_0_must_have_setting_composite_Colon_true: diag(6306, ts.DiagnosticCategory.Error, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", "Referenced project '{0}' must have setting \"composite\": true."), - File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern: diag(6307, ts.DiagnosticCategory.Error, "File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern_6307", "File '{0}' is not in project file list. Projects must list all files or use an 'include' pattern."), + File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: diag(6307, ts.DiagnosticCategory.Error, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."), Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, ts.DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"), Output_file_0_from_project_1_does_not_exist: diag(6309, ts.DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"), Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2: diag(6350, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350", "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"), @@ -6351,7 +6513,7 @@ var ts; _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: diag(7022, ts.DiagnosticCategory.Error, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7023, ts.DiagnosticCategory.Error, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7024, ts.DiagnosticCategory.Error, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), - Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: diag(7025, ts.DiagnosticCategory.Error, "Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025", "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type."), + Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation: diag(7025, ts.DiagnosticCategory.Error, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."), JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: diag(7026, ts.DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), Unreachable_code_detected: diag(7027, ts.DiagnosticCategory.Error, "Unreachable_code_detected_7027", "Unreachable code detected.", /*reportsUnnecessary*/ true), Unused_label: diag(7028, ts.DiagnosticCategory.Error, "Unused_label_7028", "Unused label.", /*reportsUnnecessary*/ true), @@ -6381,6 +6543,7 @@ var ts; Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: diag(7052, ts.DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}' ?"), Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: diag(7053, ts.DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."), No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: diag(7054, ts.DiagnosticCategory.Error, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: diag(7055, ts.DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."), You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."), You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), import_can_only_be_used_in_a_ts_file: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_a_ts_file_8002", "'import ... =' can only be used in a .ts file."), @@ -6444,6 +6607,7 @@ var ts; JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, ts.DiagnosticCategory.Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), require_call_may_be_converted_to_an_import: diag(80005, ts.DiagnosticCategory.Suggestion, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), This_may_be_converted_to_an_async_function: diag(80006, ts.DiagnosticCategory.Suggestion, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."), + await_has_no_effect_on_the_type_of_this_expression: diag(80007, ts.DiagnosticCategory.Suggestion, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."), Add_missing_super_call: diag(90001, ts.DiagnosticCategory.Message, "Add_missing_super_call_90001", "Add missing 'super()' call"), Make_super_call_the_first_statement_in_the_constructor: diag(90002, ts.DiagnosticCategory.Message, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), Change_extends_to_implements: diag(90003, ts.DiagnosticCategory.Message, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), @@ -6553,9 +6717,17 @@ var ts; Extract_type: diag(95077, ts.DiagnosticCategory.Message, "Extract_type_95077", "Extract type"), Extract_to_type_alias: diag(95078, ts.DiagnosticCategory.Message, "Extract_to_type_alias_95078", "Extract to type alias"), Extract_to_typedef: diag(95079, ts.DiagnosticCategory.Message, "Extract_to_typedef_95079", "Extract to typedef"), + Infer_this_type_of_0_from_usage: diag(95080, ts.DiagnosticCategory.Message, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), + Add_const_to_unresolved_variable: diag(95081, ts.DiagnosticCategory.Message, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), + Add_const_to_all_unresolved_variables: diag(95082, ts.DiagnosticCategory.Message, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), + Add_await: diag(95083, ts.DiagnosticCategory.Message, "Add_await_95083", "Add 'await'"), + Add_await_to_initializer_for_0: diag(95084, ts.DiagnosticCategory.Message, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), + Fix_all_expressions_possibly_missing_await: diag(95085, ts.DiagnosticCategory.Message, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), + Remove_unnecessary_await: diag(95086, ts.DiagnosticCategory.Message, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), + Remove_all_unnecessary_uses_of_await: diag(95087, ts.DiagnosticCategory.Message, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), - Quoted_constructors_have_previously_been_interpreted_as_methods_which_is_incorrect_In_TypeScript_3_6_they_will_be_correctly_parsed_as_constructors_In_the_meantime_consider_using_constructor_to_write_a_constructor_or_constructor_to_write_a_method: diag(18005, ts.DiagnosticCategory.Error, "Quoted_constructors_have_previously_been_interpreted_as_methods_which_is_incorrect_In_TypeScript_3_6_18005", "Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '[\"constructor\"]()' to write a method."), Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), + JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), }; })(ts || (ts = {})); var ts; @@ -6650,7 +6822,7 @@ var ts; _a.of = 148 /* OfKeyword */, _a); var textToKeyword = ts.createMapFromTemplate(textToKeywordObj); - var textToToken = ts.createMapFromTemplate(__assign({}, textToKeywordObj, { "{": 18 /* OpenBraceToken */, "}": 19 /* CloseBraceToken */, "(": 20 /* OpenParenToken */, ")": 21 /* CloseParenToken */, "[": 22 /* OpenBracketToken */, "]": 23 /* CloseBracketToken */, ".": 24 /* DotToken */, "...": 25 /* DotDotDotToken */, ";": 26 /* SemicolonToken */, ",": 27 /* CommaToken */, "<": 28 /* LessThanToken */, ">": 30 /* GreaterThanToken */, "<=": 31 /* LessThanEqualsToken */, ">=": 32 /* GreaterThanEqualsToken */, "==": 33 /* EqualsEqualsToken */, "!=": 34 /* ExclamationEqualsToken */, "===": 35 /* EqualsEqualsEqualsToken */, "!==": 36 /* ExclamationEqualsEqualsToken */, "=>": 37 /* EqualsGreaterThanToken */, "+": 38 /* PlusToken */, "-": 39 /* MinusToken */, "**": 41 /* AsteriskAsteriskToken */, "*": 40 /* AsteriskToken */, "/": 42 /* SlashToken */, "%": 43 /* PercentToken */, "++": 44 /* PlusPlusToken */, "--": 45 /* MinusMinusToken */, "<<": 46 /* LessThanLessThanToken */, ">": 47 /* GreaterThanGreaterThanToken */, ">>>": 48 /* GreaterThanGreaterThanGreaterThanToken */, "&": 49 /* AmpersandToken */, "|": 50 /* BarToken */, "^": 51 /* CaretToken */, "!": 52 /* ExclamationToken */, "~": 53 /* TildeToken */, "&&": 54 /* AmpersandAmpersandToken */, "||": 55 /* BarBarToken */, "?": 56 /* QuestionToken */, ":": 57 /* ColonToken */, "=": 60 /* EqualsToken */, "+=": 61 /* PlusEqualsToken */, "-=": 62 /* MinusEqualsToken */, "*=": 63 /* AsteriskEqualsToken */, "**=": 64 /* AsteriskAsteriskEqualsToken */, "/=": 65 /* SlashEqualsToken */, "%=": 66 /* PercentEqualsToken */, "<<=": 67 /* LessThanLessThanEqualsToken */, ">>=": 68 /* GreaterThanGreaterThanEqualsToken */, ">>>=": 69 /* GreaterThanGreaterThanGreaterThanEqualsToken */, "&=": 70 /* AmpersandEqualsToken */, "|=": 71 /* BarEqualsToken */, "^=": 72 /* CaretEqualsToken */, "@": 58 /* AtToken */ })); + var textToToken = ts.createMapFromTemplate(__assign(__assign({}, textToKeywordObj), { "{": 18 /* OpenBraceToken */, "}": 19 /* CloseBraceToken */, "(": 20 /* OpenParenToken */, ")": 21 /* CloseParenToken */, "[": 22 /* OpenBracketToken */, "]": 23 /* CloseBracketToken */, ".": 24 /* DotToken */, "...": 25 /* DotDotDotToken */, ";": 26 /* SemicolonToken */, ",": 27 /* CommaToken */, "<": 28 /* LessThanToken */, ">": 30 /* GreaterThanToken */, "<=": 31 /* LessThanEqualsToken */, ">=": 32 /* GreaterThanEqualsToken */, "==": 33 /* EqualsEqualsToken */, "!=": 34 /* ExclamationEqualsToken */, "===": 35 /* EqualsEqualsEqualsToken */, "!==": 36 /* ExclamationEqualsEqualsToken */, "=>": 37 /* EqualsGreaterThanToken */, "+": 38 /* PlusToken */, "-": 39 /* MinusToken */, "**": 41 /* AsteriskAsteriskToken */, "*": 40 /* AsteriskToken */, "/": 42 /* SlashToken */, "%": 43 /* PercentToken */, "++": 44 /* PlusPlusToken */, "--": 45 /* MinusMinusToken */, "<<": 46 /* LessThanLessThanToken */, ">": 47 /* GreaterThanGreaterThanToken */, ">>>": 48 /* GreaterThanGreaterThanGreaterThanToken */, "&": 49 /* AmpersandToken */, "|": 50 /* BarToken */, "^": 51 /* CaretToken */, "!": 52 /* ExclamationToken */, "~": 53 /* TildeToken */, "&&": 54 /* AmpersandAmpersandToken */, "||": 55 /* BarBarToken */, "?": 56 /* QuestionToken */, ":": 57 /* ColonToken */, "=": 60 /* EqualsToken */, "+=": 61 /* PlusEqualsToken */, "-=": 62 /* MinusEqualsToken */, "*=": 63 /* AsteriskEqualsToken */, "**=": 64 /* AsteriskAsteriskEqualsToken */, "/=": 65 /* SlashEqualsToken */, "%=": 66 /* PercentEqualsToken */, "<<=": 67 /* LessThanLessThanEqualsToken */, ">>=": 68 /* GreaterThanGreaterThanEqualsToken */, ">>>=": 69 /* GreaterThanGreaterThanGreaterThanEqualsToken */, "&=": 70 /* AmpersandEqualsToken */, "|=": 71 /* BarEqualsToken */, "^=": 72 /* CaretEqualsToken */, "@": 58 /* AtToken */, "`": 59 /* BacktickToken */ })); /* As per ECMAScript Language Specification 3th Edition, Section 7.6: Identifiers IdentifierStart :: @@ -6697,6 +6869,14 @@ var ts; */ var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; + /** + * Generated by scripts/regenerate-unicode-identifier-parts.js on node v12.4.0 with unicode 12.1 + * based on http://www.unicode.org/reports/tr31/ and https://www.ecma-international.org/ecma-262/6.0/#sec-names-and-keywords + * unicodeESNextIdentifierStart corresponds to the ID_Start and Other_ID_Start property, and + * unicodeESNextIdentifierPart corresponds to ID_Continue, Other_ID_Continue, plus ID_Start and Other_ID_Start + */ + var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2208, 2228, 2230, 2237, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69376, 69404, 69415, 69415, 69424, 69445, 69600, 69622, 69635, 69687, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70751, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71680, 71723, 71840, 71903, 71935, 71935, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 123136, 123180, 123191, 123197, 123214, 123214, 123584, 123627, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101]; + var unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2208, 2228, 2230, 2237, 2259, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3331, 3333, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7673, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69376, 69404, 69415, 69415, 69424, 69456, 69600, 69622, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69958, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70096, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70751, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71680, 71738, 71840, 71913, 71935, 71935, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123584, 123641, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 917760, 917999]; function lookupInUnicodeMap(code, map) { // Bail out quickly if it couldn't possibly be in the map. if (code < map[0]) { @@ -6723,15 +6903,17 @@ var ts; return false; } /* @internal */ function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion >= 1 /* ES5 */ ? - lookupInUnicodeMap(code, unicodeES5IdentifierStart) : - lookupInUnicodeMap(code, unicodeES3IdentifierStart); + return languageVersion >= 2 /* ES2015 */ ? + lookupInUnicodeMap(code, unicodeESNextIdentifierStart) : + languageVersion === 1 /* ES5 */ ? lookupInUnicodeMap(code, unicodeES5IdentifierStart) : + lookupInUnicodeMap(code, unicodeES3IdentifierStart); } ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart; function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion >= 1 /* ES5 */ ? - lookupInUnicodeMap(code, unicodeES5IdentifierPart) : - lookupInUnicodeMap(code, unicodeES3IdentifierPart); + return languageVersion >= 2 /* ES2015 */ ? + lookupInUnicodeMap(code, unicodeESNextIdentifierPart) : + languageVersion === 1 /* ES5 */ ? lookupInUnicodeMap(code, unicodeES5IdentifierPart) : + lookupInUnicodeMap(code, unicodeES3IdentifierPart); } function makeReverseMap(source) { var result = []; @@ -7227,11 +7409,12 @@ var ts; ts.isIdentifierPart = isIdentifierPart; /* @internal */ function isIdentifierText(name, languageVersion) { - if (!isIdentifierStart(name.charCodeAt(0), languageVersion)) { + var ch = codePointAt(name, 0); + if (!isIdentifierStart(ch, languageVersion)) { return false; } - for (var i = 1; i < name.length; i++) { - if (!isIdentifierPart(name.charCodeAt(i), languageVersion)) { + for (var i = charSize(ch); i < name.length; i += charSize(ch)) { + if (!isIdentifierPart(ch = codePointAt(name, i), languageVersion)) { return false; } } @@ -7262,6 +7445,7 @@ var ts; getTokenPos: function () { return tokenPos; }, getTokenText: function () { return text.substring(tokenPos, pos); }, getTokenValue: function () { return tokenValue; }, + hasUnicodeEscape: function () { return (tokenFlags & 1024 /* UnicodeEscape */) !== 0; }, hasExtendedUnicodeEscape: function () { return (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0; }, hasPrecedingLineBreak: function () { return (tokenFlags & 1 /* PrecedingLineBreak */) !== 0; }, isIdentifier: function () { return token === 73 /* Identifier */ || token > 109 /* LastReservedWord */; }, @@ -7388,7 +7572,7 @@ var ts; } } function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) { - if (!isIdentifierStart(text.charCodeAt(pos), languageVersion)) { + if (!isIdentifierStart(codePointAt(text, pos), languageVersion)) { return; } var identifierStart = pos; @@ -7596,6 +7780,7 @@ var ts; pos++; return scanExtendedUnicodeEscape(); } + tokenFlags |= 1024 /* UnicodeEscape */; // '\uDDDD' return scanHexadecimalEscape(/*numDigits*/ 4); case 120 /* x */: @@ -7678,21 +7863,41 @@ var ts; } return -1; } + function peekExtendedUnicodeEscape() { + if (languageVersion >= 2 /* ES2015 */ && codePointAt(text, pos + 1) === 117 /* u */ && codePointAt(text, pos + 2) === 123 /* openBrace */) { + var start_2 = pos; + pos += 3; + var escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + var escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + pos = start_2; + return escapedValue; + } + return -1; + } function scanIdentifierParts() { var result = ""; var start = pos; while (pos < end) { - var ch = text.charCodeAt(pos); + var ch = codePointAt(text, pos); if (isIdentifierPart(ch, languageVersion)) { - pos++; + pos += charSize(ch); } else if (ch === 92 /* backslash */) { + ch = peekExtendedUnicodeEscape(); + if (ch >= 0 && isIdentifierPart(ch, languageVersion)) { + pos += 3; + tokenFlags |= 8 /* ExtendedUnicodeEscape */; + result += scanExtendedUnicodeEscape(); + start = pos; + continue; + } ch = peekUnicodeEscape(); if (!(ch >= 0 && isIdentifierPart(ch, languageVersion))) { break; } + tokenFlags |= 1024 /* UnicodeEscape */; result += text.substring(start, pos); - result += String.fromCharCode(ch); + result += utf16EncodeAsString(ch); // Valid Unicode escape is always six characters pos += 6; start = pos; @@ -7787,7 +7992,7 @@ var ts; if (pos >= end) { return token = 1 /* EndOfFileToken */; } - var ch = text.charCodeAt(pos); + var ch = codePointAt(text, pos); // Special handling for shebang if (ch === 35 /* hash */ && pos === 0 && isShebangTrivia(text, pos)) { pos = scanShebangTrivia(text, pos); @@ -8152,9 +8357,17 @@ var ts; pos++; return token = 58 /* AtToken */; case 92 /* backslash */: + var extendedCookedChar = peekExtendedUnicodeEscape(); + if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) { + pos += 3; + tokenFlags |= 8 /* ExtendedUnicodeEscape */; + tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts(); + return token = getIdentifierToken(); + } var cookedChar = peekUnicodeEscape(); if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { pos += 6; + tokenFlags |= 1024 /* UnicodeEscape */; tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } @@ -8163,9 +8376,9 @@ var ts; return token = 0 /* Unknown */; default: if (isIdentifierStart(ch, languageVersion)) { - pos++; - while (pos < end && isIdentifierPart(ch = text.charCodeAt(pos), languageVersion)) - pos++; + pos += charSize(ch); + while (pos < end && isIdentifierPart(ch = codePointAt(text, pos), languageVersion)) + pos += charSize(ch); tokenValue = text.substring(tokenPos, pos); if (ch === 92 /* backslash */) { tokenValue += scanIdentifierParts(); @@ -8173,16 +8386,16 @@ var ts; return token = getIdentifierToken(); } else if (isWhiteSpaceSingleLine(ch)) { - pos++; + pos += charSize(ch); continue; } else if (isLineBreak(ch)) { tokenFlags |= 1 /* PrecedingLineBreak */; - pos++; + pos += charSize(ch); continue; } error(ts.Diagnostics.Invalid_character); - pos++; + pos += charSize(ch); return token = 0 /* Unknown */; } } @@ -8299,7 +8512,7 @@ var ts; // First non-whitespace character on this line. var firstNonWhitespace = 0; // These initial values are special because the first line is: - // firstNonWhitespace = 0 to indicate that we want leading whitspace, + // firstNonWhitespace = 0 to indicate that we want leading whitespace, while (pos < end) { char = text.charCodeAt(pos); if (char === 123 /* openBrace */) { @@ -8333,17 +8546,22 @@ var ts; // they allow dashes function scanJsxIdentifier() { if (tokenIsIdentifierOrKeyword(token)) { - var firstCharPosition = pos; + // An identifier or keyword has already been parsed - check for a `-` and then append it and everything after it to the token + // Do note that this means that `scanJsxIdentifier` effectively _mutates_ the visible token without advancing to a new token + // Any caller should be expecting this behavior and should only read the pos or token value after calling it. while (pos < end) { var ch = text.charCodeAt(pos); - if (ch === 45 /* minus */ || ((firstCharPosition === pos) ? isIdentifierStart(ch, languageVersion) : isIdentifierPart(ch, languageVersion))) { + if (ch === 45 /* minus */) { + tokenValue += "-"; pos++; + continue; } - else { + var oldPos = pos; + tokenValue += scanIdentifierParts(); // reuse `scanIdentifierParts` so unicode escapes are handled + if (pos === oldPos) { break; } } - tokenValue += text.substring(firstCharPosition, pos); } return token; } @@ -8365,8 +8583,8 @@ var ts; if (pos >= end) { return token = 1 /* EndOfFileToken */; } - var ch = text.charCodeAt(pos); - pos++; + var ch = codePointAt(text, pos); + pos += charSize(ch); switch (ch) { case 9 /* tab */: case 11 /* verticalTab */: @@ -8394,6 +8612,8 @@ var ts; return token = 23 /* CloseBracketToken */; case 60 /* lessThan */: return token = 28 /* LessThanToken */; + case 62 /* greaterThan */: + return token = 30 /* GreaterThanToken */; case 61 /* equals */: return token = 60 /* EqualsToken */; case 44 /* comma */: @@ -8402,12 +8622,33 @@ var ts; return token = 24 /* DotToken */; case 96 /* backtick */: return token = 59 /* BacktickToken */; - } - if (isIdentifierStart(ch, 8 /* Latest */)) { - while (isIdentifierPart(text.charCodeAt(pos), 8 /* Latest */) && pos < end) { + case 92 /* backslash */: + pos--; + var extendedCookedChar = peekExtendedUnicodeEscape(); + if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) { + pos += 3; + tokenFlags |= 8 /* ExtendedUnicodeEscape */; + tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts(); + return token = getIdentifierToken(); + } + var cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { + pos += 6; + tokenFlags |= 1024 /* UnicodeEscape */; + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); + return token = getIdentifierToken(); + } pos++; - } + return token = 0 /* Unknown */; + } + if (isIdentifierStart(ch, languageVersion)) { + var char = ch; + while (pos < end && isIdentifierPart(char = codePointAt(text, pos), languageVersion)) + pos += charSize(char); tokenValue = text.substring(tokenPos, pos); + if (char === 92 /* backslash */) { + tokenValue += scanIdentifierParts(); + } return token = getIdentifierToken(); } else { @@ -8490,6 +8731,33 @@ var ts; } } ts.createScanner = createScanner; + /* @internal */ + var codePointAt = String.prototype.codePointAt ? function (s, i) { return s.codePointAt(i); } : function codePointAt(str, i) { + // from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt + var size = str.length; + // Account for out-of-bounds indices: + if (i < 0 || i >= size) { + return undefined; // String.codePointAt returns `undefined` for OOB indexes + } + // Get the first code unit + var first = str.charCodeAt(i); + // check if it’s the start of a surrogate pair + if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) { // high surrogate and there is a next code unit + var second = str.charCodeAt(i + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; + }; + /* @internal */ + function charSize(ch) { + if (ch >= 0x10000) { + return 2; + } + return 1; + } })(ts || (ts = {})); var ts; (function (ts) { @@ -8627,10 +8895,9 @@ var ts; } ts.forEachAncestor = forEachAncestor; function forEachEntry(map, callback) { - var _a; var iterator = map.entries(); - for (var _b = iterator.next(), pair = _b.value, done = _b.done; !done; _a = iterator.next(), pair = _a.value, done = _a.done, _a) { - var key = pair[0], value = pair[1]; + for (var iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) { + var _a = iterResult.value, key = _a[0], value = _a[1]; var result = callback(value, key); if (result) { return result; @@ -8640,10 +8907,9 @@ var ts; } ts.forEachEntry = forEachEntry; function forEachKey(map, callback) { - var _a; var iterator = map.keys(); - for (var _b = iterator.next(), key = _b.value, done = _b.done; !done; _a = iterator.next(), key = _a.value, done = _a.done, _a) { - var result = callback(key); + for (var iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) { + var result = callback(iterResult.value); if (result) { return result; } @@ -8864,7 +9130,7 @@ var ts; break; } } - to.splice.apply(to, [statementIndex, 0].concat(from)); + to.splice.apply(to, __spreadArrays([statementIndex, 0], from)); return to; } function insertStatementAfterPrologue(to, statement, isPrologueDirective) { @@ -8947,7 +9213,7 @@ var ts; // the syntax list itself considers them as normal trivia. Therefore if we simply skip // trivia for the list, we may have skipped the JSDocComment as well. So we should process its // first child to determine the actual position of its first token. - if (node.kind === 312 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 314 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); @@ -9012,6 +9278,8 @@ var ts; ts.isBigIntLiteral(node))) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); } + // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text + // had to include a backslash: `not \${a} substitution`. var escapeText = neverAsciiEscape || (getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? escapeString : escapeNonAsciiString; // If we can't reach the original source text, use the canonical form if it's a number, // or a (possibly escaped) quoted form of the original text if it's string-like. @@ -9024,15 +9292,23 @@ var ts; return '"' + escapeText(node.text, 34 /* doubleQuote */) + '"'; } case 14 /* NoSubstitutionTemplateLiteral */: - return "`" + escapeText(node.text, 96 /* backtick */) + "`"; case 15 /* TemplateHead */: - // tslint:disable-next-line no-invalid-template-strings - return "`" + escapeText(node.text, 96 /* backtick */) + "${"; case 16 /* TemplateMiddle */: - // tslint:disable-next-line no-invalid-template-strings - return "}" + escapeText(node.text, 96 /* backtick */) + "${"; case 17 /* TemplateTail */: - return "}" + escapeText(node.text, 96 /* backtick */) + "`"; + var rawText = node.rawText || escapeTemplateSubstitution(escapeText(node.text, 96 /* backtick */)); + switch (node.kind) { + case 14 /* NoSubstitutionTemplateLiteral */: + return "`" + rawText + "`"; + case 15 /* TemplateHead */: + // tslint:disable-next-line no-invalid-template-strings + return "`" + rawText + "${"; + case 16 /* TemplateMiddle */: + // tslint:disable-next-line no-invalid-template-strings + return "}" + rawText + "${"; + case 17 /* TemplateTail */: + return "}" + rawText + "`"; + } + break; case 8 /* NumericLiteral */: case 9 /* BigIntLiteral */: case 13 /* RegularExpressionLiteral */: @@ -9127,6 +9403,43 @@ var ts; return ts.isExternalModule(node) || compilerOptions.isolatedModules || ((ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS) && !!node.commonJsModuleIndicator); } ts.isEffectiveExternalModule = isEffectiveExternalModule; + /** + * Returns whether the source file will be treated as if it were in strict mode at runtime. + */ + function isEffectiveStrictModeSourceFile(node, compilerOptions) { + // We can only verify strict mode for JS/TS files + switch (node.scriptKind) { + case 1 /* JS */: + case 3 /* TS */: + case 2 /* JSX */: + case 4 /* TSX */: + break; + default: + return false; + } + // Strict mode does not matter for declaration files. + if (node.isDeclarationFile) { + return false; + } + // If `alwaysStrict` is set, then treat the file as strict. + if (ts.getStrictOptionValue(compilerOptions, "alwaysStrict")) { + return true; + } + // Starting with a "use strict" directive indicates the file is strict. + if (ts.startsWithUseStrict(node.statements)) { + return true; + } + if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { + // ECMAScript Modules are always strict. + if (ts.getEmitModuleKind(compilerOptions) >= ts.ModuleKind.ES2015) { + return true; + } + // Other modules are strict unless otherwise specified. + return !compilerOptions.noImplicitUseStrict; + } + return false; + } + ts.isEffectiveStrictModeSourceFile = isEffectiveStrictModeSourceFile; function isBlockScope(node, parentNode) { switch (node.kind) { case 285 /* SourceFile */: @@ -9154,9 +9467,9 @@ var ts; ts.isBlockScope = isBlockScope; function isDeclarationWithTypeParameters(node) { switch (node.kind) { - case 303 /* JSDocCallbackTag */: - case 310 /* JSDocTypedefTag */: - case 299 /* JSDocSignature */: + case 305 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 300 /* JSDocSignature */: return true; default: ts.assertType(node); @@ -9177,7 +9490,7 @@ var ts; case 210 /* ClassExpression */: case 242 /* InterfaceDeclaration */: case 243 /* TypeAliasDeclaration */: - case 309 /* JSDocTemplateTag */: + case 311 /* JSDocTemplateTag */: case 240 /* FunctionDeclaration */: case 157 /* MethodDeclaration */: case 158 /* Constructor */: @@ -9386,7 +9699,7 @@ var ts; } ts.isEnumConst = isEnumConst; function isDeclarationReadonly(declaration) { - return !!(ts.getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !ts.isParameterPropertyDeclaration(declaration)); + return !!(ts.getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !ts.isParameterPropertyDeclaration(declaration, declaration.parent)); } ts.isDeclarationReadonly = isDeclarationReadonly; function isVarConst(node) { @@ -9405,6 +9718,12 @@ var ts; return n.kind === 192 /* CallExpression */ && n.expression.kind === 93 /* ImportKeyword */; } ts.isImportCall = isImportCall; + function isImportMeta(n) { + return ts.isMetaProperty(n) + && n.keywordToken === 93 /* ImportKeyword */ + && n.name.escapedText === "meta"; + } + ts.isImportMeta = isImportMeta; function isLiteralImportTypeNode(n) { return ts.isImportTypeNode(n) && ts.isLiteralTypeNode(n.argument) && ts.isStringLiteral(n.argument.literal); } @@ -9497,7 +9816,7 @@ var ts; return !isExpressionWithTypeArgumentsInClassExtendsClause(parent); case 151 /* TypeParameter */: return node === parent.constraint; - case 309 /* JSDocTemplateTag */: + case 311 /* JSDocTemplateTag */: return node === parent.constraint; case 155 /* PropertyDeclaration */: case 154 /* PropertySignature */: @@ -10528,7 +10847,7 @@ var ts; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function isJSDocTypeAlias(node) { - return node.kind === 310 /* JSDocTypedefTag */ || node.kind === 303 /* JSDocCallbackTag */; + return node.kind === 312 /* JSDocTypedefTag */ || node.kind === 305 /* JSDocCallbackTag */ || node.kind === 306 /* JSDocEnumTag */; } ts.isJSDocTypeAlias = isJSDocTypeAlias; function isTypeAlias(node) { @@ -10577,12 +10896,12 @@ var ts; var result; // Pull parameter comments from declaring function as well if (isVariableLike(hostNode) && ts.hasInitializer(hostNode) && ts.hasJSDocNodes(hostNode.initializer)) { - result = ts.addRange(result, hostNode.initializer.jsDoc); + result = ts.append(result, ts.last(hostNode.initializer.jsDoc)); } var node = hostNode; while (node && node.parent) { if (ts.hasJSDocNodes(node)) { - result = ts.addRange(result, node.jsDoc); + result = ts.append(result, ts.last(node.jsDoc)); } if (node.kind === 152 /* Parameter */) { result = ts.addRange(result, ts.getJSDocParameterTags(node)); @@ -10956,13 +11275,6 @@ var ts; return undefined; } ts.getHeritageClause = getHeritageClause; - function tryResolveScriptReference(host, sourceFile, reference) { - if (!host.getCompilerOptions().noResolve) { - var referenceFileName = ts.isRootedDiskPath(reference.fileName) ? reference.fileName : ts.combinePaths(ts.getDirectoryPath(sourceFile.fileName), reference.fileName); - return host.getSourceFile(referenceFileName); - } - } - ts.tryResolveScriptReference = tryResolveScriptReference; function getAncestor(node, kind) { while (node) { if (node.kind === kind) { @@ -10985,6 +11297,10 @@ var ts; return isKeyword(token) && !isContextualKeyword(token); } ts.isNonContextualKeyword = isNonContextualKeyword; + function isFutureReservedKeyword(token) { + return 110 /* FirstFutureReservedWord */ <= token && token <= 118 /* LastFutureReservedWord */; + } + ts.isFutureReservedKeyword = isFutureReservedKeyword; function isStringANonContextualKeyword(name) { var token = ts.stringToToken(name); return token !== undefined && isNonContextualKeyword(token); @@ -11049,11 +11365,19 @@ var ts; return ts.isStringLiteralLike(node) || ts.isNumericLiteral(node); } ts.isStringOrNumericLiteralLike = isStringOrNumericLiteralLike; + function isSignedNumericLiteral(node) { + return ts.isPrefixUnaryExpression(node) && (node.operator === 38 /* PlusToken */ || node.operator === 39 /* MinusToken */) && ts.isNumericLiteral(node.operand); + } + ts.isSignedNumericLiteral = isSignedNumericLiteral; /** - * A declaration has a dynamic name if both of the following are true: - * 1. The declaration has a computed property name - * 2. The computed name is *not* expressed as Symbol., where name - * is a property of the Symbol constructor that denotes a built in + * A declaration has a dynamic name if all of the following are true: + * 1. The declaration has a computed property name. + * 2. The computed name is *not* expressed as a StringLiteral. + * 3. The computed name is *not* expressed as a NumericLiteral. + * 4. The computed name is *not* expressed as a PlusToken or MinusToken + * immediately followed by a NumericLiteral. + * 5. The computed name is *not* expressed as `Symbol.`, where `` + * is a property of the Symbol constructor that denotes a built-in * Symbol. */ function hasDynamicName(declaration) { @@ -11064,6 +11388,7 @@ var ts; function isDynamicName(name) { return name.kind === 150 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression) && + !isSignedNumericLiteral(name.expression) && !isWellKnownSymbolSyntactically(name.expression); } ts.isDynamicName = isDynamicName; @@ -11235,7 +11560,7 @@ var ts; ts.getOperator = getOperator; function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 315 /* CommaListExpression */: + case 317 /* CommaListExpression */: return 0; case 209 /* SpreadElement */: return 1; @@ -11421,6 +11746,10 @@ var ts; } } ts.createDiagnosticCollection = createDiagnosticCollection; + var templateSubstitutionRegExp = /\$\{/g; + function escapeTemplateSubstitution(str) { + return str.replace(templateSubstitutionRegExp, "\\${"); + } // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in // the language service. These characters should be escaped when printing, and if any characters are added, @@ -11428,7 +11757,8 @@ var ts; // There is no reason for this other than that JSON.stringify does not handle it either. var doubleQuoteEscapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var singleQuoteEscapedCharsRegExp = /[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var backtickQuoteEscapedCharsRegExp = /[\\\`\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; + // Template strings should be preserved as much as possible + var backtickQuoteEscapedCharsRegExp = /[\\\`]/g; var escapedCharsMap = ts.createMapFromTemplate({ "\t": "\\t", "\v": "\\v", @@ -11456,6 +11786,23 @@ var ts; return s.replace(escapedCharsRegExp, getReplacement); } ts.escapeString = escapeString; + /** + * Strip off existed single quotes or double quotes from a given string + * + * @return non-quoted string + */ + function stripQuotes(name) { + var length = name.length; + if (length >= 2 && name.charCodeAt(0) === name.charCodeAt(length - 1) && startsWithQuote(name)) { + return name.substring(1, length - 1); + } + return name; + } + ts.stripQuotes = stripQuotes; + function startsWithQuote(name) { + return isSingleOrDoubleQuote(name.charCodeAt(0)); + } + ts.startsWithQuote = startsWithQuote; function getReplacement(c, offset, input) { if (c.charCodeAt(0) === 0 /* nullCharacter */) { var lookAhead = input.charCodeAt(offset + c.length); @@ -11597,7 +11944,7 @@ var ts; pendingTrailingSemicolon = false; } } - return __assign({}, writer, { writeTrailingSemicolon: function () { + return __assign(__assign({}, writer), { writeTrailingSemicolon: function () { pendingTrailingSemicolon = true; }, writeLiteral: function (s) { @@ -11772,6 +12119,7 @@ var ts; return accessor.parameters[hasThis ? 1 : 0]; } } + ts.getSetAccessorValueParameter = getSetAccessorValueParameter; /** Get the type annotation for the value parameter. */ function getSetAccessorTypeAnnotationNode(accessor) { var parameter = getSetAccessorValueParameter(accessor); @@ -11880,7 +12228,7 @@ var ts; ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations; /** template tags are only available when a typedef isn't already using them */ function isNonTypeAliasTemplate(tag) { - return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 297 /* JSDocComment */ && tag.parent.tags.some(isJSDocTypeAlias)); + return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 298 /* JSDocComment */ && tag.parent.tags.some(isJSDocTypeAlias)); } /** * Gets the effective type annotation of the value parameter of a set accessor. If the node @@ -12671,8 +13019,8 @@ var ts; /** * Mutates the map with newMap such that keys in map will be same as newMap. */ - function mutateMap(map, newMap, options) { - var createNewValue = options.createNewValue, onDeleteValue = options.onDeleteValue, onExistingValue = options.onExistingValue; + function mutateMapSkippingNewValues(map, newMap, options) { + var onDeleteValue = options.onDeleteValue, onExistingValue = options.onExistingValue; // Needs update map.forEach(function (existingValue, key) { var valueInNewMap = newMap.get(key); @@ -12686,6 +13034,15 @@ var ts; onExistingValue(existingValue, valueInNewMap, key); } }); + } + ts.mutateMapSkippingNewValues = mutateMapSkippingNewValues; + /** + * Mutates the map with newMap such that keys in map will be same as newMap. + */ + function mutateMap(map, newMap, options) { + // Needs update + mutateMapSkippingNewValues(map, newMap, options); + var createNewValue = options.createNewValue; // Add new values that are not already present newMap.forEach(function (valueInNewMap, key) { if (!map.has(key)) { @@ -12822,7 +13179,7 @@ var ts; (function (ts) { function getDefaultLibFileName(options) { switch (options.target) { - case 8 /* ESNext */: + case 99 /* ESNext */: return "lib.esnext.full.d.ts"; case 7 /* ES2020 */: return "lib.es2020.full.d.ts"; @@ -13051,8 +13408,8 @@ var ts; } } ts.getTypeParameterOwner = getTypeParameterOwner; - function isParameterPropertyDeclaration(node) { - return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && node.parent.kind === 158 /* Constructor */; + function isParameterPropertyDeclaration(node, parent) { + return ts.hasModifier(node, 92 /* ParameterPropertyModifier */) && parent.kind === 158 /* Constructor */; } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; function isEmptyBindingPattern(node) { @@ -13242,6 +13599,9 @@ var ts; break; case 222 /* ExpressionStatement */: var expr = hostNode.expression; + if (expr.kind === 205 /* BinaryExpression */ && expr.operatorToken.kind === 60 /* EqualsToken */) { + expr = expr.left; + } switch (expr.kind) { case 190 /* PropertyAccessExpression */: return expr.name; @@ -13281,8 +13641,8 @@ var ts; switch (declaration.kind) { case 73 /* Identifier */: return declaration; - case 311 /* JSDocPropertyTag */: - case 305 /* JSDocParameterTag */: { + case 313 /* JSDocPropertyTag */: + case 307 /* JSDocParameterTag */: { var name = declaration.name; if (name.kind === 149 /* QualifiedName */) { return name.right; @@ -13306,8 +13666,10 @@ var ts; return undefined; } } - case 310 /* JSDocTypedefTag */: + case 312 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); + case 306 /* JSDocEnumTag */: + return nameForNamelessJSDocTypedef(declaration); case 255 /* ExportAssignment */: { var expression = declaration.expression; return ts.isIdentifier(expression) ? expression : undefined; @@ -13338,6 +13700,9 @@ var ts; return node.parent.left.name; } } + else if (ts.isVariableDeclaration(node.parent) && ts.isIdentifier(node.parent.name)) { + return node.parent.name; + } } /** * Gets the JSDoc parameter tags for the node if present. @@ -13510,7 +13875,7 @@ var ts; return ts.emptyArray; } if (ts.isJSDocTypeAlias(node)) { - ts.Debug.assert(node.parent.kind === 297 /* JSDocComment */); + ts.Debug.assert(node.parent.kind === 298 /* JSDocComment */); return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; }); } if (node.typeParameters) { @@ -13782,7 +14147,7 @@ var ts; } ts.isParenthesizedExpression = isParenthesizedExpression; function skipPartiallyEmittedExpressions(node) { - while (node.kind === 314 /* PartiallyEmittedExpression */) { + while (node.kind === 316 /* PartiallyEmittedExpression */) { node = node.expression; } return node; @@ -14194,63 +14559,67 @@ var ts; } ts.isJSDocVariadicType = isJSDocVariadicType; function isJSDoc(node) { - return node.kind === 297 /* JSDocComment */; + return node.kind === 298 /* JSDocComment */; } ts.isJSDoc = isJSDoc; + function isJSDocAuthorTag(node) { + return node.kind === 303 /* JSDocAuthorTag */; + } + ts.isJSDocAuthorTag = isJSDocAuthorTag; function isJSDocAugmentsTag(node) { - return node.kind === 301 /* JSDocAugmentsTag */; + return node.kind === 302 /* JSDocAugmentsTag */; } ts.isJSDocAugmentsTag = isJSDocAugmentsTag; function isJSDocClassTag(node) { - return node.kind === 302 /* JSDocClassTag */; + return node.kind === 304 /* JSDocClassTag */; } ts.isJSDocClassTag = isJSDocClassTag; function isJSDocEnumTag(node) { - return node.kind === 304 /* JSDocEnumTag */; + return node.kind === 306 /* JSDocEnumTag */; } ts.isJSDocEnumTag = isJSDocEnumTag; function isJSDocThisTag(node) { - return node.kind === 307 /* JSDocThisTag */; + return node.kind === 309 /* JSDocThisTag */; } ts.isJSDocThisTag = isJSDocThisTag; function isJSDocParameterTag(node) { - return node.kind === 305 /* JSDocParameterTag */; + return node.kind === 307 /* JSDocParameterTag */; } ts.isJSDocParameterTag = isJSDocParameterTag; function isJSDocReturnTag(node) { - return node.kind === 306 /* JSDocReturnTag */; + return node.kind === 308 /* JSDocReturnTag */; } ts.isJSDocReturnTag = isJSDocReturnTag; function isJSDocTypeTag(node) { - return node.kind === 308 /* JSDocTypeTag */; + return node.kind === 310 /* JSDocTypeTag */; } ts.isJSDocTypeTag = isJSDocTypeTag; function isJSDocTemplateTag(node) { - return node.kind === 309 /* JSDocTemplateTag */; + return node.kind === 311 /* JSDocTemplateTag */; } ts.isJSDocTemplateTag = isJSDocTemplateTag; function isJSDocTypedefTag(node) { - return node.kind === 310 /* JSDocTypedefTag */; + return node.kind === 312 /* JSDocTypedefTag */; } ts.isJSDocTypedefTag = isJSDocTypedefTag; function isJSDocPropertyTag(node) { - return node.kind === 311 /* JSDocPropertyTag */; + return node.kind === 313 /* JSDocPropertyTag */; } ts.isJSDocPropertyTag = isJSDocPropertyTag; function isJSDocPropertyLikeTag(node) { - return node.kind === 311 /* JSDocPropertyTag */ || node.kind === 305 /* JSDocParameterTag */; + return node.kind === 313 /* JSDocPropertyTag */ || node.kind === 307 /* JSDocParameterTag */; } ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag; function isJSDocTypeLiteral(node) { - return node.kind === 298 /* JSDocTypeLiteral */; + return node.kind === 299 /* JSDocTypeLiteral */; } ts.isJSDocTypeLiteral = isJSDocTypeLiteral; function isJSDocCallbackTag(node) { - return node.kind === 303 /* JSDocCallbackTag */; + return node.kind === 305 /* JSDocCallbackTag */; } ts.isJSDocCallbackTag = isJSDocCallbackTag; function isJSDocSignature(node) { - return node.kind === 299 /* JSDocSignature */; + return node.kind === 300 /* JSDocSignature */; } ts.isJSDocSignature = isJSDocSignature; })(ts || (ts = {})); @@ -14261,7 +14630,7 @@ var ts; (function (ts) { /* @internal */ function isSyntaxList(n) { - return n.kind === 312 /* SyntaxList */; + return n.kind === 314 /* SyntaxList */; } ts.isSyntaxList = isSyntaxList; /* @internal */ @@ -14413,7 +14782,7 @@ var ts; switch (kind) { case 156 /* MethodSignature */: case 161 /* CallSignature */: - case 299 /* JSDocSignature */: + case 300 /* JSDocSignature */: case 162 /* ConstructSignature */: case 163 /* IndexSignature */: case 166 /* FunctionType */: @@ -14708,8 +15077,8 @@ var ts; case 209 /* SpreadElement */: case 213 /* AsExpression */: case 211 /* OmittedExpression */: - case 315 /* CommaListExpression */: - case 314 /* PartiallyEmittedExpression */: + case 317 /* CommaListExpression */: + case 316 /* PartiallyEmittedExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -14723,12 +15092,12 @@ var ts; ts.isAssertionExpression = isAssertionExpression; /* @internal */ function isPartiallyEmittedExpression(node) { - return node.kind === 314 /* PartiallyEmittedExpression */; + return node.kind === 316 /* PartiallyEmittedExpression */; } ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression; /* @internal */ function isNotEmittedStatement(node) { - return node.kind === 313 /* NotEmittedStatement */; + return node.kind === 315 /* NotEmittedStatement */; } ts.isNotEmittedStatement = isNotEmittedStatement; /* @internal */ @@ -14839,9 +15208,9 @@ var ts; || kind === 243 /* TypeAliasDeclaration */ || kind === 151 /* TypeParameter */ || kind === 238 /* VariableDeclaration */ - || kind === 310 /* JSDocTypedefTag */ - || kind === 303 /* JSDocCallbackTag */ - || kind === 311 /* JSDocPropertyTag */; + || kind === 312 /* JSDocTypedefTag */ + || kind === 305 /* JSDocCallbackTag */ + || kind === 313 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { return kind === 240 /* FunctionDeclaration */ @@ -14876,14 +15245,14 @@ var ts; || kind === 220 /* VariableStatement */ || kind === 225 /* WhileStatement */ || kind === 232 /* WithStatement */ - || kind === 313 /* NotEmittedStatement */ - || kind === 317 /* EndOfDeclarationMarker */ - || kind === 316 /* MergeDeclarationMarker */; + || kind === 315 /* NotEmittedStatement */ + || kind === 319 /* EndOfDeclarationMarker */ + || kind === 318 /* MergeDeclarationMarker */; } /* @internal */ function isDeclaration(node) { if (node.kind === 151 /* TypeParameter */) { - return (node.parent && node.parent.kind !== 309 /* JSDocTemplateTag */) || ts.isInJSFile(node); + return (node.parent && node.parent.kind !== 311 /* JSDocTemplateTag */) || ts.isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -14978,18 +15347,18 @@ var ts; /** True if node is of some JSDoc syntax kind. */ /* @internal */ function isJSDocNode(node) { - return node.kind >= 289 /* FirstJSDocNode */ && node.kind <= 311 /* LastJSDocNode */; + return node.kind >= 289 /* FirstJSDocNode */ && node.kind <= 313 /* LastJSDocNode */; } ts.isJSDocNode = isJSDocNode; /** True if node is of a kind that may contain comment text. */ function isJSDocCommentContainingNode(node) { - return node.kind === 297 /* JSDocComment */ || isJSDocTag(node) || ts.isJSDocTypeLiteral(node) || ts.isJSDocSignature(node); + return node.kind === 298 /* JSDocComment */ || isJSDocTag(node) || ts.isJSDocTypeLiteral(node) || ts.isJSDocSignature(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; // TODO: determine what this does before making it public. /* @internal */ function isJSDocTag(node) { - return node.kind >= 300 /* FirstJSDocTagNode */ && node.kind <= 311 /* LastJSDocTagNode */; + return node.kind >= 301 /* FirstJSDocTagNode */ && node.kind <= 313 /* LastJSDocTagNode */; } ts.isJSDocTag = isJSDocTag; function isSetAccessor(node) { @@ -15188,17 +15557,16 @@ var ts; messageText: text, category: message.category, code: message.code, - next: details + next: details === undefined || Array.isArray(details) ? details : [details] }; } ts.chainDiagnosticMessages = chainDiagnosticMessages; function concatenateDiagnosticMessageChains(headChain, tailChain) { var lastChain = headChain; while (lastChain.next) { - lastChain = lastChain.next; + lastChain = lastChain.next[0]; } - lastChain.next = tailChain; - return headChain; + lastChain.next = [tailChain]; } ts.concatenateDiagnosticMessageChains = concatenateDiagnosticMessageChains; function getDiagnosticFilePath(diagnostic) { @@ -15232,25 +15600,42 @@ var ts; return d1.relatedInformation ? -1 /* LessThan */ : 1 /* GreaterThan */; } function compareMessageText(t1, t2) { - var text1 = t1; - var text2 = t2; - while (text1 && text2) { - // We still have both chains. - var string1 = ts.isString(text1) ? text1 : text1.messageText; - var string2 = ts.isString(text2) ? text2 : text2.messageText; - var res = ts.compareStringsCaseSensitive(string1, string2); + if (typeof t1 === "string" && typeof t2 === "string") { + return ts.compareStringsCaseSensitive(t1, t2); + } + else if (typeof t1 === "string") { + return -1 /* LessThan */; + } + else if (typeof t2 === "string") { + return 1 /* GreaterThan */; + } + var res = ts.compareStringsCaseSensitive(t1.messageText, t2.messageText); + if (res) { + return res; + } + if (!t1.next && !t2.next) { + return 0 /* EqualTo */; + } + if (!t1.next) { + return -1 /* LessThan */; + } + if (!t2.next) { + return 1 /* GreaterThan */; + } + var len = Math.min(t1.next.length, t2.next.length); + for (var i = 0; i < len; i++) { + res = compareMessageText(t1.next[i], t2.next[i]); if (res) { return res; } - text1 = ts.isString(text1) ? undefined : text1.next; - text2 = ts.isString(text2) ? undefined : text2.next; } - if (!text1 && !text2) { - // if the chains are done, then these messages are the same. - return 0 /* EqualTo */; + if (t1.next.length < t2.next.length) { + return -1 /* LessThan */; + } + else if (t1.next.length > t2.next.length) { + return 1 /* GreaterThan */; } - // We still have one chain remaining. The shorter chain should come first. - return text1 ? 1 /* GreaterThan */ : -1 /* LessThan */; + return 0 /* EqualTo */; } function getEmitScriptTarget(compilerOptions) { return compilerOptions.target || 0 /* ES3 */; @@ -15533,7 +15918,7 @@ var ts; var rest = path.substring(rootLength).split(ts.directorySeparator); if (rest.length && !ts.lastOrUndefined(rest)) rest.pop(); - return [root].concat(rest); + return __spreadArrays([root], rest); } /** * Parse a path into an array containing a root component (at index 0) and zero or more path @@ -15633,7 +16018,7 @@ var ts; for (; start < fromComponents.length; start++) { relative.push(".."); } - return [""].concat(relative, components); + return __spreadArrays([""], relative, components); } ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo; function getRelativePathFromFile(from, to, getCanonicalFileName) { @@ -15714,7 +16099,7 @@ var ts; for (var _i = 1; _i < arguments.length; _i++) { paths[_i - 1] = arguments[_i]; } - var combined = ts.some(paths) ? combinePaths.apply(void 0, [path].concat(paths)) : ts.normalizeSlashes(path); + var combined = ts.some(paths) ? combinePaths.apply(void 0, __spreadArrays([path], paths)) : ts.normalizeSlashes(path); var normalized = ts.getPathFromPathComponents(ts.reducePathComponents(ts.getPathComponents(combined))); return normalized && hasTrailingDirectorySeparator(combined) ? ensureTrailingDirectorySeparator(normalized) : normalized; } @@ -16153,14 +16538,14 @@ var ts; ts.supportedTSExtensionsForExtractExtension = [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */]; ts.supportedJSExtensions = [".js" /* Js */, ".jsx" /* Jsx */]; ts.supportedJSAndJsonExtensions = [".js" /* Js */, ".jsx" /* Jsx */, ".json" /* Json */]; - var allSupportedExtensions = ts.supportedTSExtensions.concat(ts.supportedJSExtensions); - var allSupportedExtensionsWithJson = ts.supportedTSExtensions.concat(ts.supportedJSExtensions, [".json" /* Json */]); + var allSupportedExtensions = __spreadArrays(ts.supportedTSExtensions, ts.supportedJSExtensions); + var allSupportedExtensionsWithJson = __spreadArrays(ts.supportedTSExtensions, ts.supportedJSExtensions, [".json" /* Json */]); function getSupportedExtensions(options, extraFileExtensions) { var needJsExtensions = options && options.allowJs; if (!extraFileExtensions || extraFileExtensions.length === 0) { return needJsExtensions ? allSupportedExtensions : ts.supportedTSExtensions; } - var extensions = (needJsExtensions ? allSupportedExtensions : ts.supportedTSExtensions).concat(ts.mapDefined(extraFileExtensions, function (x) { return x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) ? x.extension : undefined; })); + var extensions = __spreadArrays(needJsExtensions ? allSupportedExtensions : ts.supportedTSExtensions, ts.mapDefined(extraFileExtensions, function (x) { return x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) ? x.extension : undefined; })); return ts.deduplicate(extensions, ts.equateStringsCaseSensitive, ts.compareStringsCaseSensitive); } ts.getSupportedExtensions = getSupportedExtensions; @@ -16174,7 +16559,7 @@ var ts; if (supportedExtensions === ts.supportedTSExtensions) { return ts.supportedTSExtensionsWithJson; } - return supportedExtensions.concat([".json" /* Json */]); + return __spreadArrays(supportedExtensions, [".json" /* Json */]); } ts.getSuppoertedExtensionsWithJsonIfResolveJsonModule = getSuppoertedExtensionsWithJsonIfResolveJsonModule; function isJSLike(scriptKind) { @@ -17004,7 +17389,7 @@ var ts; return visitNode(cbNode, node.expression); case 259 /* MissingDeclaration */: return visitNodes(cbNode, cbNodes, node.decorators); - case 315 /* CommaListExpression */: + case 317 /* CommaListExpression */: return visitNodes(cbNode, cbNodes, node.elements); case 261 /* JsxElement */: return visitNode(cbNode, node.openingElement) || @@ -17042,24 +17427,26 @@ var ts; case 295 /* JSDocFunctionType */: return visitNodes(cbNode, cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 297 /* JSDocComment */: + case 298 /* JSDocComment */: return visitNodes(cbNode, cbNodes, node.tags); - case 305 /* JSDocParameterTag */: - case 311 /* JSDocPropertyTag */: + case 307 /* JSDocParameterTag */: + case 313 /* JSDocPropertyTag */: return visitNode(cbNode, node.tagName) || (node.isNameFirst ? visitNode(cbNode, node.name) || visitNode(cbNode, node.typeExpression) : visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.name)); - case 301 /* JSDocAugmentsTag */: + case 303 /* JSDocAuthorTag */: + return visitNode(cbNode, node.tagName); + case 302 /* JSDocAugmentsTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.class); - case 309 /* JSDocTemplateTag */: + case 311 /* JSDocTemplateTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters); - case 310 /* JSDocTypedefTag */: + case 312 /* JSDocTypedefTag */: return visitNode(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 289 /* JSDocTypeExpression */ @@ -17067,26 +17454,26 @@ var ts; visitNode(cbNode, node.fullName) : visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression)); - case 303 /* JSDocCallbackTag */: + case 305 /* JSDocCallbackTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.fullName) || visitNode(cbNode, node.typeExpression); - case 306 /* JSDocReturnTag */: - case 308 /* JSDocTypeTag */: - case 307 /* JSDocThisTag */: - case 304 /* JSDocEnumTag */: + case 308 /* JSDocReturnTag */: + case 310 /* JSDocTypeTag */: + case 309 /* JSDocThisTag */: + case 306 /* JSDocEnumTag */: return visitNode(cbNode, node.tagName) || visitNode(cbNode, node.typeExpression); - case 299 /* JSDocSignature */: + case 300 /* JSDocSignature */: return ts.forEach(node.typeParameters, cbNode) || ts.forEach(node.parameters, cbNode) || visitNode(cbNode, node.type); - case 298 /* JSDocTypeLiteral */: + case 299 /* JSDocTypeLiteral */: return ts.forEach(node.jsDocPropertyTags, cbNode); - case 300 /* JSDocTag */: - case 302 /* JSDocClassTag */: + case 301 /* JSDocTag */: + case 304 /* JSDocClassTag */: return visitNode(cbNode, node.tagName); - case 314 /* PartiallyEmittedExpression */: + case 316 /* PartiallyEmittedExpression */: return visitNode(cbNode, node.expression); } } @@ -17095,12 +17482,14 @@ var ts; if (setParentNodes === void 0) { setParentNodes = false; } ts.performance.mark("beforeParse"); var result; + ts.perfLogger.logStartParseSourceFile(fileName); if (languageVersion === 100 /* JSON */) { result = Parser.parseSourceFile(fileName, sourceText, languageVersion, /*syntaxCursor*/ undefined, setParentNodes, 6 /* JSON */); } else { result = Parser.parseSourceFile(fileName, sourceText, languageVersion, /*syntaxCursor*/ undefined, setParentNodes, scriptKind); } + ts.perfLogger.logStopParseSourceFile(); ts.performance.mark("afterParse"); ts.performance.measure("Parse", "beforeParse", "afterParse"); return result; @@ -17166,7 +17555,7 @@ var ts; (function (Parser) { // Share a single scanner across all calls to parse a source file. This helps speed things // up by avoiding the cost of creating/compiling scanners over and over again. - var scanner = ts.createScanner(8 /* Latest */, /*skipTrivia*/ true); + var scanner = ts.createScanner(99 /* Latest */, /*skipTrivia*/ true); var disallowInAndDecoratorContext = 2048 /* DisallowInContext */ | 8192 /* DecoratorContext */; // capture constructors in 'initializeState' to avoid null checks // tslint:disable variable-name @@ -17184,6 +17573,7 @@ var ts; var identifiers; var identifierCount; var parsingContext; + var notParenthesizedArrow; // Flags that dictate what parsing context we're in. For example: // Whether or not we are in strict parsing mode. All that changes in strict parsing mode is // that some tokens that would be considered identifiers may be considered keywords. @@ -17391,6 +17781,7 @@ var ts; identifiers = undefined; syntaxCursor = undefined; sourceText = undefined; + notParenthesizedArrow = undefined; } function parseSourceFileWorker(fileName, languageVersion, setParentNodes, scriptKind) { var isDeclarationFile = isDeclarationFileName(fileName); @@ -17600,9 +17991,17 @@ var ts; function token() { return currentToken; } - function nextToken() { + function nextTokenWithoutCheck() { return currentToken = scanner.scan(); } + function nextToken() { + // if the keyword had an escape + if (ts.isKeyword(currentToken) && (scanner.hasUnicodeEscape() || scanner.hasExtendedUnicodeEscape())) { + // issue a parse error for the escape + parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), ts.Diagnostics.Keywords_cannot_contain_escape_characters); + } + return nextTokenWithoutCheck(); + } function nextTokenJSDoc() { return currentToken = scanner.scanJsDocToken(); } @@ -17841,7 +18240,7 @@ var ts; node.originalKeywordKind = token(); } node.escapedText = ts.escapeLeadingUnderscores(internIdentifier(scanner.getTokenValue())); - nextToken(); + nextTokenWithoutCheck(); return finishNode(node); } // Only for end of file because the error gets reported incorrectly on embedded script tags. @@ -18629,6 +19028,16 @@ var ts; function parseLiteralLikeNode(kind) { var node = createNode(kind); node.text = scanner.getTokenValue(); + switch (kind) { + case 14 /* NoSubstitutionTemplateLiteral */: + case 15 /* TemplateHead */: + case 16 /* TemplateMiddle */: + case 17 /* TemplateTail */: + var isLast = kind === 14 /* NoSubstitutionTemplateLiteral */ || kind === 17 /* TemplateTail */; + var tokenText = scanner.getTokenText(); + node.rawText = tokenText.substring(1, tokenText.length - (scanner.isUnterminated() ? 0 : isLast ? 1 : 2)); + break; + } if (scanner.hasExtendedUnicodeEscape()) { node.hasExtendedUnicodeEscape = true; } @@ -18751,6 +19160,23 @@ var ts; } function parseJSDocType() { scanner.setInJSDocType(true); + var moduleSpecifier = parseOptionalToken(131 /* ModuleKeyword */); + if (moduleSpecifier) { + var moduleTag = createNode(297 /* JSDocNamepathType */, moduleSpecifier.pos); + terminate: while (true) { + switch (token()) { + case 19 /* CloseBraceToken */: + case 1 /* EndOfFileToken */: + case 27 /* CommaToken */: + case 5 /* WhitespaceTrivia */: + break terminate; + default: + nextTokenJSDoc(); + } + } + scanner.setInJSDocType(false); + return finishNode(moduleTag); + } var dotdotdot = parseOptionalToken(25 /* DotDotDotToken */); var type = parseTypeOrTypePredicate(); scanner.setInJSDocType(false); @@ -19874,7 +20300,15 @@ var ts; } } function parsePossibleParenthesizedArrowFunctionExpressionHead() { - return parseParenthesizedArrowFunctionExpressionHead(/*allowAmbiguity*/ false); + var tokenPos = scanner.getTokenPos(); + if (notParenthesizedArrow && notParenthesizedArrow.has(tokenPos.toString())) { + return undefined; + } + var result = parseParenthesizedArrowFunctionExpressionHead(/*allowAmbiguity*/ false); + if (!result) { + (notParenthesizedArrow || (notParenthesizedArrow = ts.createMap())).set(tokenPos.toString(), true); + } + return result; } function tryParseAsyncSimpleArrowFunctionExpression() { // We do a check here so that we won't be doing unnecessarily call to "lookAhead" @@ -20558,14 +20992,18 @@ var ts; } if (token() !== 19 /* CloseBraceToken */) { node.dotDotDotToken = parseOptionalToken(25 /* DotDotDotToken */); - node.expression = parseAssignmentExpressionOrHigher(); + // Only an AssignmentExpression is valid here per the JSX spec, + // but we can unambiguously parse a comma sequence and provide + // a better error message in grammar checking. + node.expression = parseExpression(); } if (inExpressionContext) { parseExpected(19 /* CloseBraceToken */); } else { - parseExpected(19 /* CloseBraceToken */, /*message*/ undefined, /*shouldAdvance*/ false); - scanJsxText(); + if (parseExpected(19 /* CloseBraceToken */, /*message*/ undefined, /*shouldAdvance*/ false)) { + scanJsxText(); + } } return finishNode(node); } @@ -21637,12 +22075,26 @@ var ts; node.body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, ts.Diagnostics.or_expected); return finishNode(node); } - function parseConstructorDeclaration(node) { - node.kind = 158 /* Constructor */; - parseExpected(125 /* ConstructorKeyword */); - fillSignature(57 /* ColonToken */, 0 /* None */, node); - node.body = parseFunctionBlockOrSemicolon(0 /* None */, ts.Diagnostics.or_expected); - return finishNode(node); + function parseConstructorName() { + if (token() === 125 /* ConstructorKeyword */) { + return parseExpected(125 /* ConstructorKeyword */); + } + if (token() === 10 /* StringLiteral */ && lookAhead(nextToken) === 20 /* OpenParenToken */) { + return tryParse(function () { + var literalNode = parseLiteralNode(); + return literalNode.text === "constructor" ? literalNode : undefined; + }); + } + } + function tryParseConstructorDeclaration(node) { + return tryParse(function () { + if (parseConstructorName()) { + node.kind = 158 /* Constructor */; + fillSignature(57 /* ColonToken */, 0 /* None */, node); + node.body = parseFunctionBlockOrSemicolon(0 /* None */, ts.Diagnostics.or_expected); + return finishNode(node); + } + }); } function parseMethodDeclaration(node, asteriskToken, diagnosticMessage) { node.kind = 157 /* MethodDeclaration */; @@ -21822,8 +22274,11 @@ var ts; if (parseContextualModifier(138 /* SetKeyword */)) { return parseAccessorDeclaration(node, 160 /* SetAccessor */); } - if (token() === 125 /* ConstructorKeyword */) { - return parseConstructorDeclaration(node); + if (token() === 125 /* ConstructorKeyword */ || token() === 10 /* StringLiteral */) { + var constructorDeclaration = tryParseConstructorDeclaration(node); + if (constructorDeclaration) { + return constructorDeclaration; + } } if (isIndexSignature()) { return parseIndexSignatureDeclaration(node); @@ -22264,8 +22719,8 @@ var ts; var JSDocParser; (function (JSDocParser) { function parseJSDocTypeExpressionForTests(content, start, length) { - initializeState(content, 8 /* Latest */, /*_syntaxCursor:*/ undefined, 1 /* JS */); - sourceFile = createSourceFile("file.js", 8 /* Latest */, 1 /* JS */, /*isDeclarationFile*/ false); + initializeState(content, 99 /* Latest */, /*_syntaxCursor:*/ undefined, 1 /* JS */); + sourceFile = createSourceFile("file.js", 99 /* Latest */, 1 /* JS */, /*isDeclarationFile*/ false); scanner.setText(content, start, length); currentToken = scanner.scan(); var jsDocTypeExpression = parseJSDocTypeExpression(); @@ -22287,9 +22742,9 @@ var ts; } JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression; function parseIsolatedJSDocComment(content, start, length) { - initializeState(content, 8 /* Latest */, /*_syntaxCursor:*/ undefined, 1 /* JS */); + initializeState(content, 99 /* Latest */, /*_syntaxCursor:*/ undefined, 1 /* JS */); sourceFile = { languageVariant: 0 /* Standard */, text: content }; // tslint:disable-line no-object-literal-type-assertion - var jsDoc = parseJSDocCommentWorker(start, length); + var jsDoc = doInsideOfContext(2097152 /* JSDoc */, function () { return parseJSDocCommentWorker(start, length); }); var diagnostics = parseDiagnostics; clearState(); return jsDoc ? { jsDoc: jsDoc, diagnostics: diagnostics } : undefined; @@ -22300,7 +22755,7 @@ var ts; var saveToken = currentToken; var saveParseDiagnosticsLength = parseDiagnostics.length; var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - var comment = parseJSDocCommentWorker(start, length); + var comment = doInsideOfContext(2097152 /* JSDoc */, function () { return parseJSDocCommentWorker(start, length); }); if (comment) { comment.parent = parent; } @@ -22321,6 +22776,7 @@ var ts; JSDocState[JSDocState["BeginningOfLine"] = 0] = "BeginningOfLine"; JSDocState[JSDocState["SawAsterisk"] = 1] = "SawAsterisk"; JSDocState[JSDocState["SavingComments"] = 2] = "SavingComments"; + JSDocState[JSDocState["SavingBackticks"] = 3] = "SavingBackticks"; })(JSDocState || (JSDocState = {})); var PropertyLikeParse; (function (PropertyLikeParse) { @@ -22438,7 +22894,7 @@ var ts; } } function createJSDocComment() { - var result = createNode(297 /* JSDocComment */, start); + var result = createNode(298 /* JSDocComment */, start); result.tags = tags && createNodeArray(tags, tagsPos, tagsEnd); result.comment = comments.length ? comments.join("") : undefined; return finishNode(result, end); @@ -22496,6 +22952,9 @@ var ts; var indentText = skipWhitespaceOrAsterisk(); var tag; switch (tagName.escapedText) { + case "author": + tag = parseAuthorTag(start, tagName, margin); + break; case "augments": case "extends": tag = parseAugmentsTag(start, tagName); @@ -22565,18 +23024,23 @@ var ts; case 4 /* NewLineTrivia */: if (state >= 1 /* SawAsterisk */) { state = 0 /* BeginningOfLine */; + // don't use pushComment here because we want to keep the margin unchanged comments.push(scanner.getTokenText()); } indent = 0; break; case 58 /* AtToken */: + if (state === 3 /* SavingBackticks */) { + comments.push(scanner.getTokenText()); + break; + } scanner.setTextPos(scanner.getTextPos() - 1); // falls through case 1 /* EndOfFileToken */: // Done break loop; case 5 /* WhitespaceTrivia */: - if (state === 2 /* SavingComments */) { + if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { pushComment(scanner.getTokenText()); } else { @@ -22598,6 +23062,15 @@ var ts; } pushComment(scanner.getTokenText()); break; + case 59 /* BacktickToken */: + if (state === 3 /* SavingBackticks */) { + state = 2 /* SavingComments */; + } + else { + state = 3 /* SavingBackticks */; + } + pushComment(scanner.getTokenText()); + break; case 40 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { // leading asterisks start recording on the *next* (non-whitespace) token @@ -22608,7 +23081,9 @@ var ts; // record the * as a comment // falls through default: - state = 2 /* SavingComments */; // leading identifiers start recording as well + if (state !== 3 /* SavingBackticks */) { + state = 2 /* SavingComments */; // leading identifiers start recording as well + } pushComment(scanner.getTokenText()); break; } @@ -22619,7 +23094,7 @@ var ts; return comments.length === 0 ? undefined : comments.join(""); } function parseUnknownTag(start, tagName) { - var result = createNode(300 /* JSDocTag */, start); + var result = createNode(301 /* JSDocTag */, start); result.tagName = tagName; return finishNode(result); } @@ -22682,8 +23157,8 @@ var ts; typeExpression = tryParseTypeExpression(); } var result = target === 1 /* Property */ ? - createNode(311 /* JSDocPropertyTag */, start) : - createNode(305 /* JSDocParameterTag */, start); + createNode(313 /* JSDocPropertyTag */, start) : + createNode(307 /* JSDocParameterTag */, start); var comment = parseTagComments(indent + scanner.getStartPos() - start); var nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { @@ -22703,15 +23178,15 @@ var ts; var typeLiteralExpression = createNode(289 /* JSDocTypeExpression */, scanner.getTokenPos()); var child = void 0; var jsdocTypeLiteral = void 0; - var start_2 = scanner.getStartPos(); + var start_3 = scanner.getStartPos(); var children = void 0; while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) { - if (child.kind === 305 /* JSDocParameterTag */ || child.kind === 311 /* JSDocPropertyTag */) { + if (child.kind === 307 /* JSDocParameterTag */ || child.kind === 313 /* JSDocPropertyTag */) { children = ts.append(children, child); } } if (children) { - jsdocTypeLiteral = createNode(298 /* JSDocTypeLiteral */, start_2); + jsdocTypeLiteral = createNode(299 /* JSDocTypeLiteral */, start_3); jsdocTypeLiteral.jsDocPropertyTags = children; if (typeExpression.type.kind === 170 /* ArrayType */) { jsdocTypeLiteral.isArrayType = true; @@ -22725,7 +23200,7 @@ var ts; if (ts.some(tags, ts.isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(306 /* JSDocReturnTag */, start); + var result = createNode(308 /* JSDocReturnTag */, start); result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); @@ -22734,13 +23209,67 @@ var ts; if (ts.some(tags, ts.isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText); } - var result = createNode(308 /* JSDocTypeTag */, start); + var result = createNode(310 /* JSDocTypeTag */, start); result.tagName = tagName; result.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); return finishNode(result); } + function parseAuthorTag(start, tagName, indent) { + var result = createNode(303 /* JSDocAuthorTag */, start); + result.tagName = tagName; + var authorInfoWithEmail = tryParse(function () { return tryParseAuthorNameAndEmail(); }); + if (!authorInfoWithEmail) { + return finishNode(result); + } + result.comment = authorInfoWithEmail; + if (lookAhead(function () { return nextToken() !== 4 /* NewLineTrivia */; })) { + var comment = parseTagComments(indent); + if (comment) { + result.comment += comment; + } + } + return finishNode(result); + } + function tryParseAuthorNameAndEmail() { + var comments = []; + var seenLessThan = false; + var seenGreaterThan = false; + var token = scanner.getToken(); + loop: while (true) { + switch (token) { + case 73 /* Identifier */: + case 5 /* WhitespaceTrivia */: + case 24 /* DotToken */: + case 58 /* AtToken */: + comments.push(scanner.getTokenText()); + break; + case 28 /* LessThanToken */: + if (seenLessThan || seenGreaterThan) { + return; + } + seenLessThan = true; + comments.push(scanner.getTokenText()); + break; + case 30 /* GreaterThanToken */: + if (!seenLessThan || seenGreaterThan) { + return; + } + seenGreaterThan = true; + comments.push(scanner.getTokenText()); + scanner.setTextPos(scanner.getTokenPos() + 1); + break loop; + case 4 /* NewLineTrivia */: + case 1 /* EndOfFileToken */: + break loop; + } + token = nextTokenJSDoc(); + } + if (seenLessThan && seenGreaterThan) { + return comments.length === 0 ? undefined : comments.join(""); + } + } function parseAugmentsTag(start, tagName) { - var result = createNode(301 /* JSDocAugmentsTag */, start); + var result = createNode(302 /* JSDocAugmentsTag */, start); result.tagName = tagName; result.class = parseExpressionWithTypeArgumentsForAugments(); return finishNode(result); @@ -22767,19 +23296,19 @@ var ts; return node; } function parseClassTag(start, tagName) { - var tag = createNode(302 /* JSDocClassTag */, start); + var tag = createNode(304 /* JSDocClassTag */, start); tag.tagName = tagName; return finishNode(tag); } function parseThisTag(start, tagName) { - var tag = createNode(307 /* JSDocThisTag */, start); + var tag = createNode(309 /* JSDocThisTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); return finishNode(tag); } function parseEnumTag(start, tagName) { - var tag = createNode(304 /* JSDocEnumTag */, start); + var tag = createNode(306 /* JSDocEnumTag */, start); tag.tagName = tagName; tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true); skipWhitespace(); @@ -22788,7 +23317,7 @@ var ts; function parseTypedefTag(start, tagName, indent) { var typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); - var typedefTag = createNode(310 /* JSDocTypedefTag */, start); + var typedefTag = createNode(312 /* JSDocTypedefTag */, start); typedefTag.tagName = tagName; typedefTag.fullName = parseJSDocTypeNameWithNamespace(); typedefTag.name = getJSDocTypeAliasName(typedefTag.fullName); @@ -22802,9 +23331,9 @@ var ts; var childTypeTag = void 0; while (child = tryParse(function () { return parseChildPropertyTag(indent); })) { if (!jsdocTypeLiteral) { - jsdocTypeLiteral = createNode(298 /* JSDocTypeLiteral */, start); + jsdocTypeLiteral = createNode(299 /* JSDocTypeLiteral */, start); } - if (child.kind === 308 /* JSDocTypeTag */) { + if (child.kind === 310 /* JSDocTypeTag */) { if (childTypeTag) { break; } @@ -22850,14 +23379,14 @@ var ts; return typeNameOrNamespaceName; } function parseCallbackTag(start, tagName, indent) { - var callbackTag = createNode(303 /* JSDocCallbackTag */, start); + var callbackTag = createNode(305 /* JSDocCallbackTag */, start); callbackTag.tagName = tagName; callbackTag.fullName = parseJSDocTypeNameWithNamespace(); callbackTag.name = getJSDocTypeAliasName(callbackTag.fullName); skipWhitespace(); callbackTag.comment = parseTagComments(indent); var child; - var jsdocSignature = createNode(299 /* JSDocSignature */, start); + var jsdocSignature = createNode(300 /* JSDocSignature */, start); jsdocSignature.parameters = []; while (child = tryParse(function () { return parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent); })) { jsdocSignature.parameters = ts.append(jsdocSignature.parameters, child); @@ -22865,7 +23394,7 @@ var ts; var returnTag = tryParse(function () { if (parseOptionalJsdoc(58 /* AtToken */)) { var tag = parseTag(indent); - if (tag && tag.kind === 306 /* JSDocReturnTag */) { + if (tag && tag.kind === 308 /* JSDocReturnTag */) { return tag; } } @@ -22910,7 +23439,7 @@ var ts; case 58 /* AtToken */: if (canParseTag) { var child = tryParseChildTag(target, indent); - if (child && (child.kind === 305 /* JSDocParameterTag */ || child.kind === 311 /* JSDocPropertyTag */) && + if (child && (child.kind === 307 /* JSDocParameterTag */ || child.kind === 313 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; @@ -22980,7 +23509,7 @@ var ts; skipWhitespace(); typeParameters.push(typeParameter); } while (parseOptionalJsdoc(27 /* CommaToken */)); - var result = createNode(309 /* JSDocTemplateTag */, start); + var result = createNode(311 /* JSDocTemplateTag */, start); result.tagName = tagName; result.constraint = constraint; result.typeParameters = createNodeArray(typeParameters, typeParametersPos); @@ -23015,16 +23544,19 @@ var ts; if (!ts.tokenIsIdentifierOrKeyword(token())) { return createMissingNode(73 /* Identifier */, /*reportAtCurrentPosition*/ !message, message || ts.Diagnostics.Identifier_expected); } + identifierCount++; var pos = scanner.getTokenPos(); var end = scanner.getTextPos(); var result = createNode(73 /* Identifier */, pos); - result.escapedText = ts.escapeLeadingUnderscores(scanner.getTokenText()); + if (token() !== 73 /* Identifier */) { + result.originalKeywordKind = token(); + } + result.escapedText = ts.escapeLeadingUnderscores(internIdentifier(scanner.getTokenValue())); finishNode(result, end); nextTokenJSDoc(); return result; } } - JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); })(Parser || (Parser = {})); var IncrementalParser; @@ -23767,6 +24299,7 @@ var ts; ["es2017.string", "lib.es2017.string.d.ts"], ["es2017.intl", "lib.es2017.intl.d.ts"], ["es2017.typedarrays", "lib.es2017.typedarrays.d.ts"], + ["es2018.asyncgenerator", "lib.es2018.asyncgenerator.d.ts"], ["es2018.asynciterable", "lib.es2018.asynciterable.d.ts"], ["es2018.intl", "lib.es2018.intl.d.ts"], ["es2018.promise", "lib.es2018.promise.d.ts"], @@ -23869,10 +24402,17 @@ var ts; type: "boolean", category: ts.Diagnostics.Basic_Options, description: ts.Diagnostics.Enable_incremental_compilation, + transpileOptionValue: undefined + }, + { + name: "locale", + type: "string", + category: ts.Diagnostics.Advanced_Options, + description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us }, ]; /* @internal */ - ts.optionDeclarations = ts.commonOptionsWithBuild.concat([ + ts.optionDeclarations = __spreadArrays(ts.commonOptionsWithBuild, [ { name: "all", type: "boolean", @@ -23934,7 +24474,7 @@ var ts; es2018: 5 /* ES2018 */, es2019: 6 /* ES2019 */, es2020: 7 /* ES2020 */, - esnext: 8 /* ESNext */, + esnext: 99 /* ESNext */, }), affectsSourceFile: true, affectsModuleResolution: true, @@ -23958,6 +24498,7 @@ var ts; esnext: ts.ModuleKind.ESNext }), affectsModuleResolution: true, + affectsEmit: true, paramType: ts.Diagnostics.KIND, showInSimplifiedHelpView: true, category: ts.Diagnostics.Basic_Options, @@ -23973,7 +24514,8 @@ var ts; affectsModuleResolution: true, showInSimplifiedHelpView: true, category: ts.Diagnostics.Basic_Options, - description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation + description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation, + transpileOptionValue: undefined }, { name: "allowJs", @@ -24010,6 +24552,7 @@ var ts; showInSimplifiedHelpView: true, category: ts.Diagnostics.Basic_Options, description: ts.Diagnostics.Generates_corresponding_d_ts_file, + transpileOptionValue: undefined }, { name: "declarationMap", @@ -24018,6 +24561,7 @@ var ts; showInSimplifiedHelpView: true, category: ts.Diagnostics.Basic_Options, description: ts.Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file, + transpileOptionValue: undefined }, { name: "emitDeclarationOnly", @@ -24025,6 +24569,7 @@ var ts; affectsEmit: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Only_emit_d_ts_declaration_files, + transpileOptionValue: undefined }, { name: "sourceMap", @@ -24043,6 +24588,7 @@ var ts; showInSimplifiedHelpView: true, category: ts.Diagnostics.Basic_Options, description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file, + transpileOptionValue: undefined }, { name: "outDir", @@ -24070,6 +24616,7 @@ var ts; isTSConfigOnly: true, category: ts.Diagnostics.Basic_Options, description: ts.Diagnostics.Enable_project_compilation, + transpileOptionValue: undefined }, { name: "tsBuildInfoFile", @@ -24079,6 +24626,7 @@ var ts; paramType: ts.Diagnostics.FILE, category: ts.Diagnostics.Basic_Options, description: ts.Diagnostics.Specify_file_to_store_incremental_compilation_information, + transpileOptionValue: undefined }, { name: "removeComments", @@ -24095,6 +24643,7 @@ var ts; showInSimplifiedHelpView: true, category: ts.Diagnostics.Basic_Options, description: ts.Diagnostics.Do_not_emit_outputs, + transpileOptionValue: undefined }, { name: "importHelpers", @@ -24114,7 +24663,8 @@ var ts; name: "isolatedModules", type: "boolean", category: ts.Diagnostics.Basic_Options, - description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule + description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule, + transpileOptionValue: true }, // Strict Type Checks { @@ -24248,7 +24798,8 @@ var ts; affectsModuleResolution: true, isTSConfigOnly: true, category: ts.Diagnostics.Module_Resolution_Options, - description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl + description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl, + transpileOptionValue: undefined }, { // this option can only be specified in tsconfig.json @@ -24263,7 +24814,8 @@ var ts; }, affectsModuleResolution: true, category: ts.Diagnostics.Module_Resolution_Options, - description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime + description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime, + transpileOptionValue: undefined }, { name: "typeRoots", @@ -24287,7 +24839,8 @@ var ts; affectsModuleResolution: true, showInSimplifiedHelpView: true, category: ts.Diagnostics.Module_Resolution_Options, - description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation + description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation, + transpileOptionValue: undefined }, { name: "allowSyntheticDefaultImports", @@ -24300,6 +24853,7 @@ var ts; name: "esModuleInterop", type: "boolean", affectsSemanticDiagnostics: true, + affectsEmit: true, showInSimplifiedHelpView: true, category: ts.Diagnostics.Module_Resolution_Options, description: ts.Diagnostics.Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports @@ -24383,6 +24937,7 @@ var ts; category: ts.Diagnostics.Advanced_Options, paramType: ts.Diagnostics.FILE, description: ts.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file, + transpileOptionValue: undefined }, { name: "reactNamespace", @@ -24410,12 +24965,6 @@ var ts; category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files }, - { - name: "locale", - type: "string", - category: ts.Diagnostics.Advanced_Options, - description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us - }, { name: "newLine", type: ts.createMapFromTemplate({ @@ -24438,14 +24987,20 @@ var ts; type: "boolean", affectsModuleResolution: true, category: ts.Diagnostics.Advanced_Options, - description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts + description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts, + // We are not returning a sourceFile for lib file when asked by the program, + // so pass --noLib to avoid reporting a file not found error. + transpileOptionValue: true }, { name: "noResolve", type: "boolean", affectsModuleResolution: true, category: ts.Diagnostics.Advanced_Options, - description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files + description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files, + // We are not doing a full typecheck, we are not resolving the whole context, + // so pass --noResolve to avoid reporting missing file errors. + transpileOptionValue: true }, { name: "stripInternal", @@ -24481,6 +25036,7 @@ var ts; affectsEmit: true, category: ts.Diagnostics.Advanced_Options, description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported, + transpileOptionValue: undefined }, { name: "preserveConstEnums", @@ -24496,7 +25052,8 @@ var ts; isFilePath: true, paramType: ts.Diagnostics.DIRECTORY, category: ts.Diagnostics.Advanced_Options, - description: ts.Diagnostics.Output_directory_for_generated_declaration_files + description: ts.Diagnostics.Output_directory_for_generated_declaration_files, + transpileOptionValue: undefined }, { name: "skipLibCheck", @@ -24583,7 +25140,11 @@ var ts; return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics; }); /* @internal */ - ts.buildOpts = ts.commonOptionsWithBuild.concat([ + ts.transpileOptionValueCompilerOptions = ts.optionDeclarations.filter(function (option) { + return ts.hasProperty(option, "transpileOptionValue"); + }); + /* @internal */ + ts.buildOpts = __spreadArrays(ts.commonOptionsWithBuild, [ { name: "verbose", shortName: "v", @@ -24663,9 +25224,11 @@ var ts; return typeAcquisition; } ts.convertEnableAutoDiscoveryToEnable = convertEnableAutoDiscoveryToEnable; + /* @internal */ function getOptionNameMap() { return optionNameMapCache || (optionNameMapCache = createOptionNameMap(ts.optionDeclarations)); } + ts.getOptionNameMap = getOptionNameMap; /*@internal*/ function createOptionNameMap(optionDeclarations) { var optionNameMap = ts.createMap(); @@ -25301,13 +25864,13 @@ var ts; var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames); var files = ts.map(ts.filter(configParseResult.fileNames, (!configParseResult.configFileSpecs || !configParseResult.configFileSpecs.validatedIncludeSpecs) ? function (_) { return true; } : matchesSpecs(configFileName, configParseResult.configFileSpecs.validatedIncludeSpecs, configParseResult.configFileSpecs.validatedExcludeSpecs)), function (f) { return ts.getRelativePathFromFile(ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), ts.getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName); }); var optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: ts.getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); - var config = __assign({ compilerOptions: __assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { + var config = __assign(__assign({ compilerOptions: __assign(__assign({}, ts.arrayFrom(optionMap.entries()).reduce(function (prev, cur) { var _a; - return (__assign({}, prev, (_a = {}, _a[cur[0]] = cur[1], _a))); - }, {}), { showConfig: undefined, configFile: undefined, configFilePath: undefined, help: undefined, init: undefined, listFiles: undefined, listEmittedFiles: undefined, project: undefined, build: undefined, version: undefined }), references: ts.map(configParseResult.projectReferences, function (r) { return (__assign({}, r, { path: r.originalPath, originalPath: undefined })); }), files: ts.length(files) ? files : undefined }, (configParseResult.configFileSpecs ? { + return (__assign(__assign({}, prev), (_a = {}, _a[cur[0]] = cur[1], _a))); + }, {})), { showConfig: undefined, configFile: undefined, configFilePath: undefined, help: undefined, init: undefined, listFiles: undefined, listEmittedFiles: undefined, project: undefined, build: undefined, version: undefined }), references: ts.map(configParseResult.projectReferences, function (r) { return (__assign(__assign({}, r), { path: r.originalPath ? r.originalPath : "", originalPath: undefined })); }), files: ts.length(files) ? files : undefined }, (configParseResult.configFileSpecs ? { include: filterSameAsDefaultInclude(configParseResult.configFileSpecs.validatedIncludeSpecs), exclude: configParseResult.configFileSpecs.validatedExcludeSpecs - } : {}), { compilerOnSave: !!configParseResult.compileOnSave ? true : undefined }); + } : {})), { compileOnSave: !!configParseResult.compileOnSave ? true : undefined }); return config; } ts.convertToTSConfig = convertToTSConfig; @@ -25422,7 +25985,10 @@ var ts; case "object": return {}; default: - return option.type.keys().next().value; + var iterResult = option.type.keys().next(); + if (!iterResult.done) + return iterResult.value; + return ts.Debug.fail("Expected 'option.type' to have entries."); } } function makePadding(paddingLength) { @@ -25696,7 +26262,7 @@ var ts; basePath = ts.normalizeSlashes(basePath); var resolvedPath = ts.getNormalizedAbsolutePath(configFileName || "", basePath); if (resolutionStack.indexOf(resolvedPath) >= 0) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> "))); + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, __spreadArrays(resolutionStack, [resolvedPath]).join(" -> "))); return { raw: json || convertToObject(sourceFile, errors) }; } var ownConfig = json ? @@ -26829,6 +27395,7 @@ var ts; trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]); } } + ts.perfLogger.logStartResolveModule(moduleName /* , containingFile, ModuleResolutionKind[moduleResolution]*/); switch (moduleResolution) { case ts.ModuleResolutionKind.NodeJs: result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); @@ -26839,6 +27406,9 @@ var ts; default: return ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution); } + if (result && result.resolvedModule) + ts.perfLogger.logInfoEvent("Module \"" + moduleName + "\" resolved to \"" + result.resolvedModule.resolvedFileName + "\""); + ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null"); if (perFolderCache) { perFolderCache.set(moduleName, result); if (!ts.isExternalModuleNameRelative(moduleName)) { @@ -27048,7 +27618,7 @@ var ts; ts.tryResolveJSModule = tryResolveJSModule; var jsOnlyExtensions = [Extensions.JavaScript]; var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript]; - var tsPlusJsonExtensions = tsExtensions.concat([Extensions.Json]); + var tsPlusJsonExtensions = __spreadArrays(tsExtensions, [Extensions.Json]); var tsconfigExtensions = [Extensions.TSConfig]; function tryResolveJSModuleWorker(moduleName, initialDir, host) { return nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined); @@ -27084,7 +27654,7 @@ var ts; if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) { var path = realPath(resolvedValue.path, host, traceEnabled); var originalPath = path === resolvedValue.path ? undefined : resolvedValue.path; - resolvedValue = __assign({}, resolvedValue, { path: path, originalPath: originalPath }); + resolvedValue = __assign(__assign({}, resolvedValue), { path: path, originalPath: originalPath }); } // For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files. return { value: resolvedValue && { resolved: resolvedValue, isExternalLibraryImport: true } }; @@ -27553,8 +28123,8 @@ var ts; } ts.classicNameResolver = classicNameResolver; /** - * LSHost may load a module from a global cache of typings. - * This is the minumum code needed to expose that functionality; the rest is in LSHost. + * A host may load a module from a global cache of typings. + * This is the minumum code needed to expose that functionality; the rest is in the host. */ /* @internal */ function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache) { @@ -27671,7 +28241,9 @@ var ts; var binder = createBinder(); function bindSourceFile(file, options) { ts.performance.mark("beforeBind"); + ts.perfLogger.logStartBindFile("" + file.fileName); binder(file, options); + ts.perfLogger.logStopBindFile(); ts.performance.mark("afterBind"); ts.performance.measure("Bind", "beforeBind", "afterBind"); } @@ -27784,7 +28356,7 @@ var ts; if (symbol.constEnumOnlyModule && (symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */))) { symbol.constEnumOnlyModule = false; } - if (symbolFlags & 67220415 /* Value */) { + if (symbolFlags & 111551 /* Value */) { setValueDeclaration(symbol, node); } } @@ -27815,6 +28387,9 @@ var ts; if (ts.isStringOrNumericLiteralLike(nameExpression)) { return ts.escapeLeadingUnderscores(nameExpression.text); } + if (ts.isSignedNumericLiteral(nameExpression)) { + return ts.tokenToString(nameExpression.operator) + nameExpression.operand.text; + } ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression)); return ts.getPropertyNameForKnownSymbolName(ts.idText(nameExpression.name)); } @@ -27825,7 +28400,7 @@ var ts; return "__constructor" /* Constructor */; case 166 /* FunctionType */: case 161 /* CallSignature */: - case 299 /* JSDocSignature */: + case 300 /* JSDocSignature */: return "__call" /* Call */; case 167 /* ConstructorType */: case 162 /* ConstructSignature */: @@ -27968,7 +28543,7 @@ var ts; } }); var diag = createDiagnosticForNode(declarationName_1, message_1, messageNeedsName_1 ? getDisplayName(node) : undefined); - file.bindDiagnostics.push(multipleDefaultExports_1 ? ts.addRelatedInfo.apply(void 0, [diag].concat(relatedInformation_1)) : diag); + file.bindDiagnostics.push(multipleDefaultExports_1 ? ts.addRelatedInfo.apply(void 0, __spreadArrays([diag], relatedInformation_1)) : diag); symbol = createSymbol(0 /* None */, name); } } @@ -28010,10 +28585,10 @@ var ts; if (ts.isJSDocTypeAlias(node)) ts.Debug.assert(ts.isInJSFile(node)); // We shouldn't add symbols for JSDoc nodes if not in a JS file. if ((!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 32 /* ExportContext */)) || ts.isJSDocTypeAlias(node)) { - if (ts.hasModifier(node, 512 /* Default */) && !getDeclarationName(node)) { + if (!container.locals || (ts.hasModifier(node, 512 /* Default */) && !getDeclarationName(node))) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); // No local symbol for an unnamed default! } - var exportKind = symbolFlags & 67220415 /* Value */ ? 1048576 /* ExportValue */ : 0; + var exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0; var local = declareSymbol(container.locals, /*parent*/ undefined, node, exportKind, symbolExcludes); local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); node.localSymbol = local; @@ -28243,8 +28818,9 @@ var ts; case 192 /* CallExpression */: bindCallExpressionFlow(node); break; - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 306 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; // In source files and blocks, bind functions first to match hoisting that occurs at runtime @@ -28901,7 +29477,7 @@ var ts; } function bindJSDocTypeAlias(node) { node.tagName.parent = node; - if (node.fullName) { + if (node.kind !== 306 /* JSDocEnumTag */ && node.fullName) { setParentPointers(node, node.fullName); } } @@ -28935,7 +29511,7 @@ var ts; case 244 /* EnumDeclaration */: case 189 /* ObjectLiteralExpression */: case 169 /* TypeLiteral */: - case 298 /* JSDocTypeLiteral */: + case 299 /* JSDocTypeLiteral */: case 269 /* JsxAttributes */: return 1 /* IsContainer */; case 242 /* InterfaceDeclaration */: @@ -28957,7 +29533,7 @@ var ts; case 159 /* GetAccessor */: case 160 /* SetAccessor */: case 161 /* CallSignature */: - case 299 /* JSDocSignature */: + case 300 /* JSDocSignature */: case 295 /* JSDocFunctionType */: case 166 /* FunctionType */: case 162 /* ConstructSignature */: @@ -29020,7 +29596,7 @@ var ts; case 244 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); case 169 /* TypeLiteral */: - case 298 /* JSDocTypeLiteral */: + case 299 /* JSDocTypeLiteral */: case 189 /* ObjectLiteralExpression */: case 242 /* InterfaceDeclaration */: case 269 /* JsxAttributes */: @@ -29034,7 +29610,7 @@ var ts; case 167 /* ConstructorType */: case 161 /* CallSignature */: case 162 /* ConstructSignature */: - case 299 /* JSDocSignature */: + case 300 /* JSDocSignature */: case 163 /* IndexSignature */: case 157 /* MethodDeclaration */: case 156 /* MethodSignature */: @@ -29045,8 +29621,8 @@ var ts; case 197 /* FunctionExpression */: case 198 /* ArrowFunction */: case 295 /* JSDocFunctionType */: - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: case 243 /* TypeAliasDeclaration */: case 182 /* MappedType */: // All the children of these container types are never visible through another @@ -29227,9 +29803,37 @@ var ts; currentFlow = { flags: 2 /* Start */ }; parent = typeAlias; bind(typeAlias.typeExpression); - if (!typeAlias.fullName || typeAlias.fullName.kind === 73 /* Identifier */) { + var declName = ts.getNameOfDeclaration(typeAlias); + if ((ts.isJSDocEnumTag(typeAlias) || !typeAlias.fullName) && declName && ts.isPropertyAccessEntityNameExpression(declName.parent)) { + // typedef anchored to an A.B.C assignment - we need to bind into B's namespace under name C + var isTopLevel = isTopLevelNamespaceAssignment(declName.parent); + if (isTopLevel) { + bindPotentiallyMissingNamespaces(file.symbol, declName.parent, isTopLevel, !!ts.findAncestor(declName, function (d) { return ts.isPropertyAccessExpression(d) && d.name.escapedText === "prototype"; })); + var oldContainer = container; + switch (ts.getAssignmentDeclarationPropertyAccessKind(declName.parent)) { + case 1 /* ExportsProperty */: + case 2 /* ModuleExports */: + container = file; + break; + case 4 /* ThisProperty */: + container = declName.parent.expression; + break; + case 3 /* PrototypeProperty */: + container = declName.parent.expression.name; + break; + case 5 /* Property */: + container = ts.isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + break; + case 0 /* None */: + return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); + } + declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); + container = oldContainer; + } + } + else if (ts.isJSDocEnumTag(typeAlias) || !typeAlias.fullName || typeAlias.fullName.kind === 73 /* Identifier */) { parent = typeAlias.parent; - bindBlockScopedDeclaration(typeAlias, 524288 /* TypeAlias */, 67897832 /* TypeAliasExcludes */); + bindBlockScopedDeclaration(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); } else { bind(typeAlias.fullName); @@ -29248,7 +29852,8 @@ var ts; node.originalKeywordKind >= 110 /* FirstFutureReservedWord */ && node.originalKeywordKind <= 118 /* LastFutureReservedWord */ && !ts.isIdentifierName(node) && - !(node.flags & 4194304 /* Ambient */)) { + !(node.flags & 4194304 /* Ambient */) && + !(node.flags & 2097152 /* JSDoc */)) { // Report error only if there are no parse errors in file if (!file.parseDiagnostics.length) { file.bindDiagnostics.push(createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node))); @@ -29396,7 +30001,7 @@ var ts; file.bindDiagnostics.push(diag); } else { - file.bindSuggestionDiagnostics = ts.append(file.bindSuggestionDiagnostics, __assign({}, diag, { category: ts.DiagnosticCategory.Suggestion })); + file.bindSuggestionDiagnostics = ts.append(file.bindSuggestionDiagnostics, __assign(__assign({}, diag), { category: ts.DiagnosticCategory.Suggestion })); } } function bind(node) { @@ -29501,7 +30106,7 @@ var ts; while (parentNode && !ts.isJSDocTypeAlias(parentNode)) { parentNode = parentNode.parent; } - bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 67897832 /* TypeAliasExcludes */); + bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); break; } // falls through @@ -29522,7 +30127,7 @@ var ts; file.commonJsModuleIndicator && ts.isModuleExportsPropertyAccessExpression(node) && !lookupSymbolForNameWorker(blockScopeContainer, "module")) { - declareSymbol(file.locals, /*parent*/ undefined, node.expression, 1 /* FunctionScopedVariable */ | 134217728 /* ModuleExports */, 67220414 /* FunctionScopedVariableExcludes */); + declareSymbol(file.locals, /*parent*/ undefined, node.expression, 1 /* FunctionScopedVariable */ | 134217728 /* ModuleExports */, 111550 /* FunctionScopedVariableExcludes */); } break; case 205 /* BinaryExpression */: @@ -29588,7 +30193,7 @@ var ts; case 277 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); case 279 /* EnumMember */: - return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 68008959 /* EnumMemberExcludes */); + return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); case 161 /* CallSignature */: case 162 /* ConstructSignature */: case 163 /* IndexSignature */: @@ -29599,22 +30204,22 @@ var ts; // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes // so that it will conflict with any other object literal members with the same // name. - return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 67212223 /* MethodExcludes */); + return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */); case 240 /* FunctionDeclaration */: return bindFunctionDeclaration(node); case 158 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); case 159 /* GetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 67154879 /* GetAccessorExcludes */); + return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); case 160 /* SetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 67187647 /* SetAccessorExcludes */); + return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); case 166 /* FunctionType */: case 295 /* JSDocFunctionType */: - case 299 /* JSDocSignature */: + case 300 /* JSDocSignature */: case 167 /* ConstructorType */: return bindFunctionOrConstructorType(node); case 169 /* TypeLiteral */: - case 298 /* JSDocTypeLiteral */: + case 299 /* JSDocTypeLiteral */: case 182 /* MappedType */: return bindAnonymousTypeWorker(node); case 189 /* ObjectLiteralExpression */: @@ -29647,9 +30252,9 @@ var ts; inStrictMode = true; return bindClassLikeDeclaration(node); case 242 /* InterfaceDeclaration */: - return bindBlockScopedDeclaration(node, 64 /* Interface */, 67897736 /* InterfaceExcludes */); + return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); case 243 /* TypeAliasDeclaration */: - return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 67897832 /* TypeAliasExcludes */); + return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); case 244 /* EnumDeclaration */: return bindEnumDeclaration(node); case 245 /* ModuleDeclaration */: @@ -29683,22 +30288,23 @@ var ts; // falls through case 246 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 305 /* JSDocParameterTag */: - if (node.parent.kind === 299 /* JSDocSignature */) { + case 307 /* JSDocParameterTag */: + if (node.parent.kind === 300 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 298 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 299 /* JSDocTypeLiteral */) { break; } // falls through - case 311 /* JSDocPropertyTag */: + case 313 /* JSDocPropertyTag */: var propTag = node; var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 294 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 306 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); } } @@ -29876,7 +30482,7 @@ var ts; declareSymbol(thisContainer.symbol.exports, thisContainer.symbol, node, 4 /* Property */ | 1048576 /* ExportValue */, 0 /* None */); } else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 67220414 /* FunctionScopedVariableExcludes */); + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); } break; default: @@ -29957,7 +30563,7 @@ var ts; bindPropertyAssignment(node.expression, node, /*isPrototypeProperty*/ false); } function bindPotentiallyMissingNamespaces(namespaceSymbol, entityName, isToplevel, isPrototypeProperty) { - if (isToplevel && !isPrototypeProperty && (!namespaceSymbol || !(namespaceSymbol.flags & 1920 /* Namespace */))) { + if (isToplevel && !isPrototypeProperty) { // make symbols or add declarations for intermediate containers var flags_1 = 1536 /* Module */ | 67108864 /* Assignment */; var excludeFlags_1 = 110735 /* ValueModuleExcludes */ & ~67108864 /* Assignment */; @@ -29985,14 +30591,17 @@ var ts; (namespaceSymbol.exports || (namespaceSymbol.exports = ts.createSymbolTable())); var isMethod = ts.isFunctionLikeDeclaration(ts.getAssignedExpandoInitializer(declaration)); var includes = isMethod ? 8192 /* Method */ : 4 /* Property */; - var excludes = isMethod ? 67212223 /* MethodExcludes */ : 0 /* PropertyExcludes */; + var excludes = isMethod ? 103359 /* MethodExcludes */ : 0 /* PropertyExcludes */; declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } - function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty) { - var namespaceSymbol = lookupSymbolForPropertyAccess(name); - var isToplevel = ts.isBinaryExpression(propertyAccess.parent) + function isTopLevelNamespaceAssignment(propertyAccess) { + return ts.isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 285 /* SourceFile */ : propertyAccess.parent.parent.kind === 285 /* SourceFile */; + } + function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty) { + var namespaceSymbol = lookupSymbolForPropertyAccess(name); + var isToplevel = isTopLevelNamespaceAssignment(propertyAccess); namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, propertyAccess.expression, isToplevel, isPrototypeProperty); bindPotentiallyNewExpandoMemberToNamespace(propertyAccess, namespaceSymbol, isPrototypeProperty); } @@ -30063,7 +30672,7 @@ var ts; } function bindClassLikeDeclaration(node) { if (node.kind === 241 /* ClassDeclaration */) { - bindBlockScopedDeclaration(node, 32 /* Class */, 68008383 /* ClassExcludes */); + bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { var bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -30096,19 +30705,16 @@ var ts; } function bindEnumDeclaration(node) { return ts.isEnumConst(node) - ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 68008831 /* ConstEnumExcludes */) - : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 68008191 /* RegularEnumExcludes */); + ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) + : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); } function bindVariableDeclarationOrBindingElement(node) { if (inStrictMode) { checkStrictModeEvalOrArguments(node, node.name); } if (!ts.isBindingPattern(node.name)) { - var isEnum = ts.isInJSFile(node) && !!ts.getJSDocEnumTag(node); - var enumFlags = (isEnum ? 256 /* RegularEnum */ : 0 /* None */); - var enumExcludes = (isEnum ? 68008191 /* RegularEnumExcludes */ : 0 /* None */); if (ts.isBlockOrCatchScoped(node)) { - bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */ | enumFlags, 67220415 /* BlockScopedVariableExcludes */ | enumExcludes); + bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */); } else if (ts.isParameterDeclaration(node)) { // It is safe to walk up parent chain to find whether the node is a destructuring parameter declaration @@ -30120,15 +30726,15 @@ var ts; // function foo([a,a]) {} // Duplicate Identifier error // function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter // // which correctly set excluded symbols - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 67220415 /* ParameterExcludes */); + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111551 /* ParameterExcludes */); } else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */ | enumFlags, 67220414 /* FunctionScopedVariableExcludes */ | enumExcludes); + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); } } } function bindParameter(node) { - if (node.kind === 305 /* JSDocParameterTag */ && container.kind !== 299 /* JSDocSignature */) { + if (node.kind === 307 /* JSDocParameterTag */ && container.kind !== 300 /* JSDocSignature */) { return; } if (inStrictMode && !(node.flags & 4194304 /* Ambient */)) { @@ -30140,11 +30746,11 @@ var ts; bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, "__" + node.parent.parameters.indexOf(node)); } else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 67220415 /* ParameterExcludes */); + declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111551 /* ParameterExcludes */); } // If this is a property-parameter, then also declare the property symbol into the // containing class. - if (ts.isParameterPropertyDeclaration(node)) { + if (ts.isParameterPropertyDeclaration(node, node.parent)) { var classDeclaration = node.parent.parent; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); } @@ -30158,10 +30764,10 @@ var ts; checkStrictModeFunctionName(node); if (inStrictMode) { checkStrictModeFunctionDeclaration(node); - bindBlockScopedDeclaration(node, 16 /* Function */, 67219887 /* FunctionExcludes */); + bindBlockScopedDeclaration(node, 16 /* Function */, 110991 /* FunctionExcludes */); } else { - declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 67219887 /* FunctionExcludes */); + declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 110991 /* FunctionExcludes */); } } function bindFunctionExpression(node) { @@ -30199,10 +30805,10 @@ var ts; if (!container_1.locals) { container_1.locals = ts.createSymbolTable(); } - declareSymbol(container_1.locals, /*parent*/ undefined, node, 262144 /* TypeParameter */, 67635688 /* TypeParameterExcludes */); + declareSymbol(container_1.locals, /*parent*/ undefined, node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } else { - declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 67635688 /* TypeParameterExcludes */); + declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } } else if (node.parent.kind === 177 /* InferType */) { @@ -30211,14 +30817,14 @@ var ts; if (!container_2.locals) { container_2.locals = ts.createSymbolTable(); } - declareSymbol(container_2.locals, /*parent*/ undefined, node, 262144 /* TypeParameter */, 67635688 /* TypeParameterExcludes */); + declareSymbol(container_2.locals, /*parent*/ undefined, node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } else { bindAnonymousDeclaration(node, 262144 /* TypeParameter */, getDeclarationName(node)); // TODO: GH#18217 } } else { - declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 67635688 /* TypeParameterExcludes */); + declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } } // reachability checks @@ -30500,8 +31106,7 @@ var ts; else { // A ClassDeclaration is ES6 syntax. transformFlags = subtreeFlags | 128 /* AssertES2015 */; - // A class with a parameter property assignment, property initializer, computed property name, or decorator is - // TypeScript syntax. + // A class with a parameter property assignment or decorator is TypeScript syntax. // An exported declaration may be TypeScript syntax, but is handled by the visitor // for a namespace declaration. if ((subtreeFlags & 1024 /* ContainsTypeScriptClassSyntax */) @@ -30515,8 +31120,7 @@ var ts; function computeClassExpression(node, subtreeFlags) { // A ClassExpression is ES6 syntax. var transformFlags = subtreeFlags | 128 /* AssertES2015 */; - // A class with a parameter property assignment, property initializer, or decorator is - // TypeScript syntax. + // A class with a parameter property assignment or decorator is TypeScript syntax. if (subtreeFlags & 1024 /* ContainsTypeScriptClassSyntax */ || node.typeParameters) { transformFlags |= 1 /* AssertTypeScript */; @@ -30588,7 +31192,6 @@ var ts; || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.typeParameters || node.type - || (node.name && ts.isComputedPropertyName(node.name)) // While computed method names aren't typescript, the TS transform must visit them to emit property declarations correctly || !node.body) { transformFlags |= 1 /* AssertTypeScript */; } @@ -30613,7 +31216,6 @@ var ts; if (node.decorators || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type - || (node.name && ts.isComputedPropertyName(node.name)) // While computed accessor names aren't typescript, the TS transform must visit them to emit property declarations correctly || !node.body) { transformFlags |= 1 /* AssertTypeScript */; } @@ -30625,11 +31227,13 @@ var ts; return propagatePropertyNameFlags(node.name, transformFlags & ~537372672 /* MethodOrAccessorExcludes */); } function computePropertyDeclaration(node, subtreeFlags) { - // A PropertyDeclaration is TypeScript syntax. - var transformFlags = subtreeFlags | 1 /* AssertTypeScript */; - // If the PropertyDeclaration has an initializer or a computed name, we need to inform its ancestor - // so that it handle the transformation. - if (node.initializer || ts.isComputedPropertyName(node.name)) { + var transformFlags = subtreeFlags | 1048576 /* ContainsClassFields */; + // Decorators, TypeScript-specific modifiers, and type annotations are TypeScript syntax. + if (ts.some(node.decorators) || ts.hasModifier(node, 2270 /* TypeScriptModifier */) || node.type) { + transformFlags |= 1 /* AssertTypeScript */; + } + // Hoisted variables related to class properties should live within the TypeScript class wrapper. + if (ts.isComputedPropertyName(node.name) || (ts.hasStaticModifier(node) && node.initializer)) { transformFlags |= 1024 /* ContainsTypeScriptClassSyntax */; } node.transformFlags = transformFlags | 536870912 /* HasComputedFlags */; @@ -30831,7 +31435,7 @@ var ts; break; case 195 /* TypeAssertionExpression */: case 213 /* AsExpression */: - case 314 /* PartiallyEmittedExpression */: + case 316 /* PartiallyEmittedExpression */: // These nodes are TypeScript syntax. transformFlags |= 1 /* AssertTypeScript */; excludeFlags = 536870912 /* OuterExpressionExcludes */; @@ -31090,7 +31694,7 @@ var ts; return 536875008 /* BindingPatternExcludes */; case 195 /* TypeAssertionExpression */: case 213 /* AsExpression */: - case 314 /* PartiallyEmittedExpression */: + case 316 /* PartiallyEmittedExpression */: case 196 /* ParenthesizedExpression */: case 99 /* SuperKeyword */: return 536870912 /* OuterExpressionExcludes */; @@ -31290,6 +31894,210 @@ var ts; var nextNodeId = 1; var nextMergeId = 1; var nextFlowId = 1; + var IterationUse; + (function (IterationUse) { + IterationUse[IterationUse["AllowsSyncIterablesFlag"] = 1] = "AllowsSyncIterablesFlag"; + IterationUse[IterationUse["AllowsAsyncIterablesFlag"] = 2] = "AllowsAsyncIterablesFlag"; + IterationUse[IterationUse["AllowsStringInputFlag"] = 4] = "AllowsStringInputFlag"; + IterationUse[IterationUse["ForOfFlag"] = 8] = "ForOfFlag"; + IterationUse[IterationUse["YieldStarFlag"] = 16] = "YieldStarFlag"; + IterationUse[IterationUse["SpreadFlag"] = 32] = "SpreadFlag"; + IterationUse[IterationUse["DestructuringFlag"] = 64] = "DestructuringFlag"; + // Spread, Destructuring, Array element assignment + IterationUse[IterationUse["Element"] = 1] = "Element"; + IterationUse[IterationUse["Spread"] = 33] = "Spread"; + IterationUse[IterationUse["Destructuring"] = 65] = "Destructuring"; + IterationUse[IterationUse["ForOf"] = 13] = "ForOf"; + IterationUse[IterationUse["ForAwaitOf"] = 15] = "ForAwaitOf"; + IterationUse[IterationUse["YieldStar"] = 17] = "YieldStar"; + IterationUse[IterationUse["AsyncYieldStar"] = 19] = "AsyncYieldStar"; + IterationUse[IterationUse["GeneratorReturnType"] = 1] = "GeneratorReturnType"; + IterationUse[IterationUse["AsyncGeneratorReturnType"] = 2] = "AsyncGeneratorReturnType"; + })(IterationUse || (IterationUse = {})); + var IterationTypeKind; + (function (IterationTypeKind) { + IterationTypeKind[IterationTypeKind["Yield"] = 0] = "Yield"; + IterationTypeKind[IterationTypeKind["Return"] = 1] = "Return"; + IterationTypeKind[IterationTypeKind["Next"] = 2] = "Next"; + })(IterationTypeKind || (IterationTypeKind = {})); + var WideningKind; + (function (WideningKind) { + WideningKind[WideningKind["Normal"] = 0] = "Normal"; + WideningKind[WideningKind["GeneratorYield"] = 1] = "GeneratorYield"; + })(WideningKind || (WideningKind = {})); + var TypeFacts; + (function (TypeFacts) { + TypeFacts[TypeFacts["None"] = 0] = "None"; + TypeFacts[TypeFacts["TypeofEQString"] = 1] = "TypeofEQString"; + TypeFacts[TypeFacts["TypeofEQNumber"] = 2] = "TypeofEQNumber"; + TypeFacts[TypeFacts["TypeofEQBigInt"] = 4] = "TypeofEQBigInt"; + TypeFacts[TypeFacts["TypeofEQBoolean"] = 8] = "TypeofEQBoolean"; + TypeFacts[TypeFacts["TypeofEQSymbol"] = 16] = "TypeofEQSymbol"; + TypeFacts[TypeFacts["TypeofEQObject"] = 32] = "TypeofEQObject"; + TypeFacts[TypeFacts["TypeofEQFunction"] = 64] = "TypeofEQFunction"; + TypeFacts[TypeFacts["TypeofEQHostObject"] = 128] = "TypeofEQHostObject"; + TypeFacts[TypeFacts["TypeofNEString"] = 256] = "TypeofNEString"; + TypeFacts[TypeFacts["TypeofNENumber"] = 512] = "TypeofNENumber"; + TypeFacts[TypeFacts["TypeofNEBigInt"] = 1024] = "TypeofNEBigInt"; + TypeFacts[TypeFacts["TypeofNEBoolean"] = 2048] = "TypeofNEBoolean"; + TypeFacts[TypeFacts["TypeofNESymbol"] = 4096] = "TypeofNESymbol"; + TypeFacts[TypeFacts["TypeofNEObject"] = 8192] = "TypeofNEObject"; + TypeFacts[TypeFacts["TypeofNEFunction"] = 16384] = "TypeofNEFunction"; + TypeFacts[TypeFacts["TypeofNEHostObject"] = 32768] = "TypeofNEHostObject"; + TypeFacts[TypeFacts["EQUndefined"] = 65536] = "EQUndefined"; + TypeFacts[TypeFacts["EQNull"] = 131072] = "EQNull"; + TypeFacts[TypeFacts["EQUndefinedOrNull"] = 262144] = "EQUndefinedOrNull"; + TypeFacts[TypeFacts["NEUndefined"] = 524288] = "NEUndefined"; + TypeFacts[TypeFacts["NENull"] = 1048576] = "NENull"; + TypeFacts[TypeFacts["NEUndefinedOrNull"] = 2097152] = "NEUndefinedOrNull"; + TypeFacts[TypeFacts["Truthy"] = 4194304] = "Truthy"; + TypeFacts[TypeFacts["Falsy"] = 8388608] = "Falsy"; + TypeFacts[TypeFacts["All"] = 16777215] = "All"; + // The following members encode facts about particular kinds of types for use in the getTypeFacts function. + // The presence of a particular fact means that the given test is true for some (and possibly all) values + // of that kind of type. + TypeFacts[TypeFacts["BaseStringStrictFacts"] = 3735041] = "BaseStringStrictFacts"; + TypeFacts[TypeFacts["BaseStringFacts"] = 12582401] = "BaseStringFacts"; + TypeFacts[TypeFacts["StringStrictFacts"] = 16317953] = "StringStrictFacts"; + TypeFacts[TypeFacts["StringFacts"] = 16776705] = "StringFacts"; + TypeFacts[TypeFacts["EmptyStringStrictFacts"] = 12123649] = "EmptyStringStrictFacts"; + TypeFacts[TypeFacts["EmptyStringFacts"] = 12582401] = "EmptyStringFacts"; + TypeFacts[TypeFacts["NonEmptyStringStrictFacts"] = 7929345] = "NonEmptyStringStrictFacts"; + TypeFacts[TypeFacts["NonEmptyStringFacts"] = 16776705] = "NonEmptyStringFacts"; + TypeFacts[TypeFacts["BaseNumberStrictFacts"] = 3734786] = "BaseNumberStrictFacts"; + TypeFacts[TypeFacts["BaseNumberFacts"] = 12582146] = "BaseNumberFacts"; + TypeFacts[TypeFacts["NumberStrictFacts"] = 16317698] = "NumberStrictFacts"; + TypeFacts[TypeFacts["NumberFacts"] = 16776450] = "NumberFacts"; + TypeFacts[TypeFacts["ZeroNumberStrictFacts"] = 12123394] = "ZeroNumberStrictFacts"; + TypeFacts[TypeFacts["ZeroNumberFacts"] = 12582146] = "ZeroNumberFacts"; + TypeFacts[TypeFacts["NonZeroNumberStrictFacts"] = 7929090] = "NonZeroNumberStrictFacts"; + TypeFacts[TypeFacts["NonZeroNumberFacts"] = 16776450] = "NonZeroNumberFacts"; + TypeFacts[TypeFacts["BaseBigIntStrictFacts"] = 3734276] = "BaseBigIntStrictFacts"; + TypeFacts[TypeFacts["BaseBigIntFacts"] = 12581636] = "BaseBigIntFacts"; + TypeFacts[TypeFacts["BigIntStrictFacts"] = 16317188] = "BigIntStrictFacts"; + TypeFacts[TypeFacts["BigIntFacts"] = 16775940] = "BigIntFacts"; + TypeFacts[TypeFacts["ZeroBigIntStrictFacts"] = 12122884] = "ZeroBigIntStrictFacts"; + TypeFacts[TypeFacts["ZeroBigIntFacts"] = 12581636] = "ZeroBigIntFacts"; + TypeFacts[TypeFacts["NonZeroBigIntStrictFacts"] = 7928580] = "NonZeroBigIntStrictFacts"; + TypeFacts[TypeFacts["NonZeroBigIntFacts"] = 16775940] = "NonZeroBigIntFacts"; + TypeFacts[TypeFacts["BaseBooleanStrictFacts"] = 3733256] = "BaseBooleanStrictFacts"; + TypeFacts[TypeFacts["BaseBooleanFacts"] = 12580616] = "BaseBooleanFacts"; + TypeFacts[TypeFacts["BooleanStrictFacts"] = 16316168] = "BooleanStrictFacts"; + TypeFacts[TypeFacts["BooleanFacts"] = 16774920] = "BooleanFacts"; + TypeFacts[TypeFacts["FalseStrictFacts"] = 12121864] = "FalseStrictFacts"; + TypeFacts[TypeFacts["FalseFacts"] = 12580616] = "FalseFacts"; + TypeFacts[TypeFacts["TrueStrictFacts"] = 7927560] = "TrueStrictFacts"; + TypeFacts[TypeFacts["TrueFacts"] = 16774920] = "TrueFacts"; + TypeFacts[TypeFacts["SymbolStrictFacts"] = 7925520] = "SymbolStrictFacts"; + TypeFacts[TypeFacts["SymbolFacts"] = 16772880] = "SymbolFacts"; + TypeFacts[TypeFacts["ObjectStrictFacts"] = 7888800] = "ObjectStrictFacts"; + TypeFacts[TypeFacts["ObjectFacts"] = 16736160] = "ObjectFacts"; + TypeFacts[TypeFacts["FunctionStrictFacts"] = 7880640] = "FunctionStrictFacts"; + TypeFacts[TypeFacts["FunctionFacts"] = 16728000] = "FunctionFacts"; + TypeFacts[TypeFacts["UndefinedFacts"] = 9830144] = "UndefinedFacts"; + TypeFacts[TypeFacts["NullFacts"] = 9363232] = "NullFacts"; + TypeFacts[TypeFacts["EmptyObjectStrictFacts"] = 16318463] = "EmptyObjectStrictFacts"; + TypeFacts[TypeFacts["EmptyObjectFacts"] = 16777215] = "EmptyObjectFacts"; + })(TypeFacts || (TypeFacts = {})); + var typeofEQFacts = ts.createMapFromTemplate({ + string: 1 /* TypeofEQString */, + number: 2 /* TypeofEQNumber */, + bigint: 4 /* TypeofEQBigInt */, + boolean: 8 /* TypeofEQBoolean */, + symbol: 16 /* TypeofEQSymbol */, + undefined: 65536 /* EQUndefined */, + object: 32 /* TypeofEQObject */, + function: 64 /* TypeofEQFunction */ + }); + var typeofNEFacts = ts.createMapFromTemplate({ + string: 256 /* TypeofNEString */, + number: 512 /* TypeofNENumber */, + bigint: 1024 /* TypeofNEBigInt */, + boolean: 2048 /* TypeofNEBoolean */, + symbol: 4096 /* TypeofNESymbol */, + undefined: 524288 /* NEUndefined */, + object: 8192 /* TypeofNEObject */, + function: 16384 /* TypeofNEFunction */ + }); + var TypeSystemPropertyName; + (function (TypeSystemPropertyName) { + TypeSystemPropertyName[TypeSystemPropertyName["Type"] = 0] = "Type"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedBaseConstructorType"] = 1] = "ResolvedBaseConstructorType"; + TypeSystemPropertyName[TypeSystemPropertyName["DeclaredType"] = 2] = "DeclaredType"; + TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType"; + TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; + TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; + TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; + })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); + var CheckMode; + (function (CheckMode) { + CheckMode[CheckMode["Normal"] = 0] = "Normal"; + CheckMode[CheckMode["Contextual"] = 1] = "Contextual"; + CheckMode[CheckMode["Inferential"] = 2] = "Inferential"; + CheckMode[CheckMode["SkipContextSensitive"] = 4] = "SkipContextSensitive"; + CheckMode[CheckMode["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; + CheckMode[CheckMode["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; + })(CheckMode || (CheckMode = {})); + var ContextFlags; + (function (ContextFlags) { + ContextFlags[ContextFlags["None"] = 0] = "None"; + ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; + })(ContextFlags || (ContextFlags = {})); + var AccessFlags; + (function (AccessFlags) { + AccessFlags[AccessFlags["None"] = 0] = "None"; + AccessFlags[AccessFlags["NoIndexSignatures"] = 1] = "NoIndexSignatures"; + AccessFlags[AccessFlags["Writing"] = 2] = "Writing"; + AccessFlags[AccessFlags["CacheSymbol"] = 4] = "CacheSymbol"; + AccessFlags[AccessFlags["NoTupleBoundsCheck"] = 8] = "NoTupleBoundsCheck"; + })(AccessFlags || (AccessFlags = {})); + var CallbackCheck; + (function (CallbackCheck) { + CallbackCheck[CallbackCheck["None"] = 0] = "None"; + CallbackCheck[CallbackCheck["Bivariant"] = 1] = "Bivariant"; + CallbackCheck[CallbackCheck["Strict"] = 2] = "Strict"; + })(CallbackCheck || (CallbackCheck = {})); + var MappedTypeModifiers; + (function (MappedTypeModifiers) { + MappedTypeModifiers[MappedTypeModifiers["IncludeReadonly"] = 1] = "IncludeReadonly"; + MappedTypeModifiers[MappedTypeModifiers["ExcludeReadonly"] = 2] = "ExcludeReadonly"; + MappedTypeModifiers[MappedTypeModifiers["IncludeOptional"] = 4] = "IncludeOptional"; + MappedTypeModifiers[MappedTypeModifiers["ExcludeOptional"] = 8] = "ExcludeOptional"; + })(MappedTypeModifiers || (MappedTypeModifiers = {})); + var ExpandingFlags; + (function (ExpandingFlags) { + ExpandingFlags[ExpandingFlags["None"] = 0] = "None"; + ExpandingFlags[ExpandingFlags["Source"] = 1] = "Source"; + ExpandingFlags[ExpandingFlags["Target"] = 2] = "Target"; + ExpandingFlags[ExpandingFlags["Both"] = 3] = "Both"; + })(ExpandingFlags || (ExpandingFlags = {})); + var MembersOrExportsResolutionKind; + (function (MembersOrExportsResolutionKind) { + MembersOrExportsResolutionKind["resolvedExports"] = "resolvedExports"; + MembersOrExportsResolutionKind["resolvedMembers"] = "resolvedMembers"; + })(MembersOrExportsResolutionKind || (MembersOrExportsResolutionKind = {})); + var UnusedKind; + (function (UnusedKind) { + UnusedKind[UnusedKind["Local"] = 0] = "Local"; + UnusedKind[UnusedKind["Parameter"] = 1] = "Parameter"; + })(UnusedKind || (UnusedKind = {})); + var isNotOverloadAndNotAccessor = ts.and(isNotOverload, isNotAccessor); + var DeclarationMeaning; + (function (DeclarationMeaning) { + DeclarationMeaning[DeclarationMeaning["GetAccessor"] = 1] = "GetAccessor"; + DeclarationMeaning[DeclarationMeaning["SetAccessor"] = 2] = "SetAccessor"; + DeclarationMeaning[DeclarationMeaning["PropertyAssignment"] = 4] = "PropertyAssignment"; + DeclarationMeaning[DeclarationMeaning["Method"] = 8] = "Method"; + DeclarationMeaning[DeclarationMeaning["GetOrSetAccessor"] = 3] = "GetOrSetAccessor"; + DeclarationMeaning[DeclarationMeaning["PropertyAssignmentOrMethod"] = 12] = "PropertyAssignmentOrMethod"; + })(DeclarationMeaning || (DeclarationMeaning = {})); + var DeclarationSpaces; + (function (DeclarationSpaces) { + DeclarationSpaces[DeclarationSpaces["None"] = 0] = "None"; + DeclarationSpaces[DeclarationSpaces["ExportValue"] = 1] = "ExportValue"; + DeclarationSpaces[DeclarationSpaces["ExportType"] = 2] = "ExportType"; + DeclarationSpaces[DeclarationSpaces["ExportNamespace"] = 4] = "ExportNamespace"; + })(DeclarationSpaces || (DeclarationSpaces = {})); function getNodeId(node) { if (!node.id) { node.id = nextNodeId; @@ -31345,6 +32153,7 @@ var ts; var typeCount = 0; var symbolCount = 0; var enumCount = 0; + var instantiationCount = 0; var instantiationDepth = 0; var constraintDepth = 0; var currentNode; @@ -31614,7 +32423,7 @@ var ts; // Ensure file is type checked checkSourceFile(file); ts.Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */)); - diagnostics = ts.addRange(diagnostics, suggestionDiagnostics.get(file.fileName)); + diagnostics = ts.addRange(diagnostics, suggestionDiagnostics.getDiagnostics(file.fileName)); if (!file.isDeclarationFile && (!unusedIsError(0 /* Local */) || !unusedIsError(1 /* Parameter */))) { addUnusedDiagnostics(); } @@ -31626,7 +32435,7 @@ var ts; function addUnusedDiagnostics() { checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), function (containingNode, kind, diag) { if (!ts.containsParseError(containingNode) && !unusedIsError(kind)) { - (diagnostics || (diagnostics = [])).push(__assign({}, diag, { category: ts.DiagnosticCategory.Suggestion })); + (diagnostics || (diagnostics = [])).push(__assign(__assign({}, diag), { category: ts.DiagnosticCategory.Suggestion })); } }); } @@ -31665,9 +32474,9 @@ var ts; var errorType = createIntrinsicType(1 /* Any */, "error"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 131072 /* ContainsWideningType */); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 262144 /* ContainsWideningType */); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 131072 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 262144 /* ContainsWideningType */); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); @@ -31693,7 +32502,7 @@ var ts; var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); var silentNeverType = createIntrinsicType(131072 /* Never */, "never"); - var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 524288 /* NonInferrableType */); + var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 1048576 /* NonInferrableType */); var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]); @@ -31710,7 +32519,7 @@ var ts; var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); // The anyFunctionType contains the anyFunctionType by definition. The flag is further propagated // in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes. - anyFunctionType.objectFlags |= 524288 /* NonInferrableType */; + anyFunctionType.objectFlags |= 1048576 /* NonInferrableType */; var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined); @@ -31724,6 +32533,41 @@ var ts; var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); + var iterationTypesCache = ts.createMap(); // cache for common IterationTypes instances + var noIterationTypes = { + get yieldType() { throw new Error("Not supported"); }, + get returnType() { throw new Error("Not supported"); }, + get nextType() { throw new Error("Not supported"); }, + }; + var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); + var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); + var defaultIterationTypes = createIterationTypes(neverType, anyType, undefinedType); // default iteration types for `Iterator`. + var asyncIterationTypesResolver = { + iterableCacheKey: "iterationTypesOfAsyncIterable", + iteratorCacheKey: "iterationTypesOfAsyncIterator", + iteratorSymbolName: "asyncIterator", + getGlobalIteratorType: getGlobalAsyncIteratorType, + getGlobalIterableType: getGlobalAsyncIterableType, + getGlobalIterableIteratorType: getGlobalAsyncIterableIteratorType, + getGlobalGeneratorType: getGlobalAsyncGeneratorType, + resolveIterationType: getAwaitedType, + mustHaveANextMethodDiagnostic: ts.Diagnostics.An_async_iterator_must_have_a_next_method, + mustBeAMethodDiagnostic: ts.Diagnostics.The_0_property_of_an_async_iterator_must_be_a_method, + mustHaveAValueDiagnostic: ts.Diagnostics.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property, + }; + var syncIterationTypesResolver = { + iterableCacheKey: "iterationTypesOfIterable", + iteratorCacheKey: "iterationTypesOfIterator", + iteratorSymbolName: "iterator", + getGlobalIteratorType: getGlobalIteratorType, + getGlobalIterableType: getGlobalIterableType, + getGlobalIterableIteratorType: getGlobalIterableIteratorType, + getGlobalGeneratorType: getGlobalGeneratorType, + resolveIterationType: function (type, _errorNode) { return type; }, + mustHaveANextMethodDiagnostic: ts.Diagnostics.An_iterator_must_have_a_next_method, + mustBeAMethodDiagnostic: ts.Diagnostics.The_0_property_of_an_iterator_must_be_a_method, + mustHaveAValueDiagnostic: ts.Diagnostics.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property, + }; /** Key is "/path/to/a.ts|/path/to/b.ts". */ var amalgamatedDuplicates; var reverseMappedCache = ts.createMap(); @@ -31763,9 +32607,13 @@ var ts; var deferredGlobalIterableType; var deferredGlobalIteratorType; var deferredGlobalIterableIteratorType; + var deferredGlobalGeneratorType; + var deferredGlobalIteratorYieldResultType; + var deferredGlobalIteratorReturnResultType; var deferredGlobalAsyncIterableType; var deferredGlobalAsyncIteratorType; var deferredGlobalAsyncIterableIteratorType; + var deferredGlobalAsyncGeneratorType; var deferredGlobalTemplateStringsArrayType; var deferredGlobalImportMetaType; var deferredGlobalExtractSymbol; @@ -31799,102 +32647,7 @@ var ts; var potentialNewTargetCollisions = []; var awaitedTypeStack = []; var diagnostics = ts.createDiagnosticCollection(); - // Suggestion diagnostics must have a file. Keyed by source file name. - var suggestionDiagnostics = ts.createMultiMap(); - var TypeFacts; - (function (TypeFacts) { - TypeFacts[TypeFacts["None"] = 0] = "None"; - TypeFacts[TypeFacts["TypeofEQString"] = 1] = "TypeofEQString"; - TypeFacts[TypeFacts["TypeofEQNumber"] = 2] = "TypeofEQNumber"; - TypeFacts[TypeFacts["TypeofEQBigInt"] = 4] = "TypeofEQBigInt"; - TypeFacts[TypeFacts["TypeofEQBoolean"] = 8] = "TypeofEQBoolean"; - TypeFacts[TypeFacts["TypeofEQSymbol"] = 16] = "TypeofEQSymbol"; - TypeFacts[TypeFacts["TypeofEQObject"] = 32] = "TypeofEQObject"; - TypeFacts[TypeFacts["TypeofEQFunction"] = 64] = "TypeofEQFunction"; - TypeFacts[TypeFacts["TypeofEQHostObject"] = 128] = "TypeofEQHostObject"; - TypeFacts[TypeFacts["TypeofNEString"] = 256] = "TypeofNEString"; - TypeFacts[TypeFacts["TypeofNENumber"] = 512] = "TypeofNENumber"; - TypeFacts[TypeFacts["TypeofNEBigInt"] = 1024] = "TypeofNEBigInt"; - TypeFacts[TypeFacts["TypeofNEBoolean"] = 2048] = "TypeofNEBoolean"; - TypeFacts[TypeFacts["TypeofNESymbol"] = 4096] = "TypeofNESymbol"; - TypeFacts[TypeFacts["TypeofNEObject"] = 8192] = "TypeofNEObject"; - TypeFacts[TypeFacts["TypeofNEFunction"] = 16384] = "TypeofNEFunction"; - TypeFacts[TypeFacts["TypeofNEHostObject"] = 32768] = "TypeofNEHostObject"; - TypeFacts[TypeFacts["EQUndefined"] = 65536] = "EQUndefined"; - TypeFacts[TypeFacts["EQNull"] = 131072] = "EQNull"; - TypeFacts[TypeFacts["EQUndefinedOrNull"] = 262144] = "EQUndefinedOrNull"; - TypeFacts[TypeFacts["NEUndefined"] = 524288] = "NEUndefined"; - TypeFacts[TypeFacts["NENull"] = 1048576] = "NENull"; - TypeFacts[TypeFacts["NEUndefinedOrNull"] = 2097152] = "NEUndefinedOrNull"; - TypeFacts[TypeFacts["Truthy"] = 4194304] = "Truthy"; - TypeFacts[TypeFacts["Falsy"] = 8388608] = "Falsy"; - TypeFacts[TypeFacts["All"] = 16777215] = "All"; - // The following members encode facts about particular kinds of types for use in the getTypeFacts function. - // The presence of a particular fact means that the given test is true for some (and possibly all) values - // of that kind of type. - TypeFacts[TypeFacts["BaseStringStrictFacts"] = 3735041] = "BaseStringStrictFacts"; - TypeFacts[TypeFacts["BaseStringFacts"] = 12582401] = "BaseStringFacts"; - TypeFacts[TypeFacts["StringStrictFacts"] = 16317953] = "StringStrictFacts"; - TypeFacts[TypeFacts["StringFacts"] = 16776705] = "StringFacts"; - TypeFacts[TypeFacts["EmptyStringStrictFacts"] = 12123649] = "EmptyStringStrictFacts"; - TypeFacts[TypeFacts["EmptyStringFacts"] = 12582401] = "EmptyStringFacts"; - TypeFacts[TypeFacts["NonEmptyStringStrictFacts"] = 7929345] = "NonEmptyStringStrictFacts"; - TypeFacts[TypeFacts["NonEmptyStringFacts"] = 16776705] = "NonEmptyStringFacts"; - TypeFacts[TypeFacts["BaseNumberStrictFacts"] = 3734786] = "BaseNumberStrictFacts"; - TypeFacts[TypeFacts["BaseNumberFacts"] = 12582146] = "BaseNumberFacts"; - TypeFacts[TypeFacts["NumberStrictFacts"] = 16317698] = "NumberStrictFacts"; - TypeFacts[TypeFacts["NumberFacts"] = 16776450] = "NumberFacts"; - TypeFacts[TypeFacts["ZeroNumberStrictFacts"] = 12123394] = "ZeroNumberStrictFacts"; - TypeFacts[TypeFacts["ZeroNumberFacts"] = 12582146] = "ZeroNumberFacts"; - TypeFacts[TypeFacts["NonZeroNumberStrictFacts"] = 7929090] = "NonZeroNumberStrictFacts"; - TypeFacts[TypeFacts["NonZeroNumberFacts"] = 16776450] = "NonZeroNumberFacts"; - TypeFacts[TypeFacts["BaseBigIntStrictFacts"] = 3734276] = "BaseBigIntStrictFacts"; - TypeFacts[TypeFacts["BaseBigIntFacts"] = 12581636] = "BaseBigIntFacts"; - TypeFacts[TypeFacts["BigIntStrictFacts"] = 16317188] = "BigIntStrictFacts"; - TypeFacts[TypeFacts["BigIntFacts"] = 16775940] = "BigIntFacts"; - TypeFacts[TypeFacts["ZeroBigIntStrictFacts"] = 12122884] = "ZeroBigIntStrictFacts"; - TypeFacts[TypeFacts["ZeroBigIntFacts"] = 12581636] = "ZeroBigIntFacts"; - TypeFacts[TypeFacts["NonZeroBigIntStrictFacts"] = 7928580] = "NonZeroBigIntStrictFacts"; - TypeFacts[TypeFacts["NonZeroBigIntFacts"] = 16775940] = "NonZeroBigIntFacts"; - TypeFacts[TypeFacts["BaseBooleanStrictFacts"] = 3733256] = "BaseBooleanStrictFacts"; - TypeFacts[TypeFacts["BaseBooleanFacts"] = 12580616] = "BaseBooleanFacts"; - TypeFacts[TypeFacts["BooleanStrictFacts"] = 16316168] = "BooleanStrictFacts"; - TypeFacts[TypeFacts["BooleanFacts"] = 16774920] = "BooleanFacts"; - TypeFacts[TypeFacts["FalseStrictFacts"] = 12121864] = "FalseStrictFacts"; - TypeFacts[TypeFacts["FalseFacts"] = 12580616] = "FalseFacts"; - TypeFacts[TypeFacts["TrueStrictFacts"] = 7927560] = "TrueStrictFacts"; - TypeFacts[TypeFacts["TrueFacts"] = 16774920] = "TrueFacts"; - TypeFacts[TypeFacts["SymbolStrictFacts"] = 7925520] = "SymbolStrictFacts"; - TypeFacts[TypeFacts["SymbolFacts"] = 16772880] = "SymbolFacts"; - TypeFacts[TypeFacts["ObjectStrictFacts"] = 7888800] = "ObjectStrictFacts"; - TypeFacts[TypeFacts["ObjectFacts"] = 16736160] = "ObjectFacts"; - TypeFacts[TypeFacts["FunctionStrictFacts"] = 7880640] = "FunctionStrictFacts"; - TypeFacts[TypeFacts["FunctionFacts"] = 16728000] = "FunctionFacts"; - TypeFacts[TypeFacts["UndefinedFacts"] = 9830144] = "UndefinedFacts"; - TypeFacts[TypeFacts["NullFacts"] = 9363232] = "NullFacts"; - TypeFacts[TypeFacts["EmptyObjectStrictFacts"] = 16318463] = "EmptyObjectStrictFacts"; - TypeFacts[TypeFacts["EmptyObjectFacts"] = 16777215] = "EmptyObjectFacts"; - })(TypeFacts || (TypeFacts = {})); - var typeofEQFacts = ts.createMapFromTemplate({ - string: 1 /* TypeofEQString */, - number: 2 /* TypeofEQNumber */, - bigint: 4 /* TypeofEQBigInt */, - boolean: 8 /* TypeofEQBoolean */, - symbol: 16 /* TypeofEQSymbol */, - undefined: 65536 /* EQUndefined */, - object: 32 /* TypeofEQObject */, - function: 64 /* TypeofEQFunction */ - }); - var typeofNEFacts = ts.createMapFromTemplate({ - string: 256 /* TypeofNEString */, - number: 512 /* TypeofNENumber */, - bigint: 1024 /* TypeofNEBigInt */, - boolean: 2048 /* TypeofNEBoolean */, - symbol: 4096 /* TypeofNESymbol */, - undefined: 524288 /* NEUndefined */, - object: 8192 /* TypeofNEObject */, - function: 16384 /* TypeofNEFunction */ - }); + var suggestionDiagnostics = ts.createDiagnosticCollection(); var typeofTypesByName = ts.createMapFromTemplate({ string: stringType, number: numberType, @@ -31912,70 +32665,8 @@ var ts; var comparableRelation = ts.createMap(); var identityRelation = ts.createMap(); var enumRelation = ts.createMap(); - var TypeSystemPropertyName; - (function (TypeSystemPropertyName) { - TypeSystemPropertyName[TypeSystemPropertyName["Type"] = 0] = "Type"; - TypeSystemPropertyName[TypeSystemPropertyName["ResolvedBaseConstructorType"] = 1] = "ResolvedBaseConstructorType"; - TypeSystemPropertyName[TypeSystemPropertyName["DeclaredType"] = 2] = "DeclaredType"; - TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType"; - TypeSystemPropertyName[TypeSystemPropertyName["ImmediateBaseConstraint"] = 4] = "ImmediateBaseConstraint"; - TypeSystemPropertyName[TypeSystemPropertyName["EnumTagType"] = 5] = "EnumTagType"; - TypeSystemPropertyName[TypeSystemPropertyName["JSDocTypeReference"] = 6] = "JSDocTypeReference"; - })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); - var CheckMode; - (function (CheckMode) { - CheckMode[CheckMode["Normal"] = 0] = "Normal"; - CheckMode[CheckMode["Contextual"] = 1] = "Contextual"; - CheckMode[CheckMode["Inferential"] = 2] = "Inferential"; - CheckMode[CheckMode["SkipContextSensitive"] = 4] = "SkipContextSensitive"; - CheckMode[CheckMode["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; - CheckMode[CheckMode["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; - })(CheckMode || (CheckMode = {})); - var ContextFlags; - (function (ContextFlags) { - ContextFlags[ContextFlags["None"] = 0] = "None"; - ContextFlags[ContextFlags["Signature"] = 1] = "Signature"; - })(ContextFlags || (ContextFlags = {})); - var AccessFlags; - (function (AccessFlags) { - AccessFlags[AccessFlags["None"] = 0] = "None"; - AccessFlags[AccessFlags["NoIndexSignatures"] = 1] = "NoIndexSignatures"; - AccessFlags[AccessFlags["Writing"] = 2] = "Writing"; - AccessFlags[AccessFlags["CacheSymbol"] = 4] = "CacheSymbol"; - })(AccessFlags || (AccessFlags = {})); - var CallbackCheck; - (function (CallbackCheck) { - CallbackCheck[CallbackCheck["None"] = 0] = "None"; - CallbackCheck[CallbackCheck["Bivariant"] = 1] = "Bivariant"; - CallbackCheck[CallbackCheck["Strict"] = 2] = "Strict"; - })(CallbackCheck || (CallbackCheck = {})); - var MappedTypeModifiers; - (function (MappedTypeModifiers) { - MappedTypeModifiers[MappedTypeModifiers["IncludeReadonly"] = 1] = "IncludeReadonly"; - MappedTypeModifiers[MappedTypeModifiers["ExcludeReadonly"] = 2] = "ExcludeReadonly"; - MappedTypeModifiers[MappedTypeModifiers["IncludeOptional"] = 4] = "IncludeOptional"; - MappedTypeModifiers[MappedTypeModifiers["ExcludeOptional"] = 8] = "ExcludeOptional"; - })(MappedTypeModifiers || (MappedTypeModifiers = {})); - var ExpandingFlags; - (function (ExpandingFlags) { - ExpandingFlags[ExpandingFlags["None"] = 0] = "None"; - ExpandingFlags[ExpandingFlags["Source"] = 1] = "Source"; - ExpandingFlags[ExpandingFlags["Target"] = 2] = "Target"; - ExpandingFlags[ExpandingFlags["Both"] = 3] = "Both"; - })(ExpandingFlags || (ExpandingFlags = {})); - var MembersOrExportsResolutionKind; - (function (MembersOrExportsResolutionKind) { - MembersOrExportsResolutionKind["resolvedExports"] = "resolvedExports"; - MembersOrExportsResolutionKind["resolvedMembers"] = "resolvedMembers"; - })(MembersOrExportsResolutionKind || (MembersOrExportsResolutionKind = {})); - var UnusedKind; - (function (UnusedKind) { - UnusedKind[UnusedKind["Local"] = 0] = "Local"; - UnusedKind[UnusedKind["Parameter"] = 1] = "Parameter"; - })(UnusedKind || (UnusedKind = {})); var builtinGlobals = ts.createSymbolTable(); builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol); - var isNotOverloadAndNotAccessor = ts.and(isNotOverload, isNotAccessor); initializeTypeChecker(); return checker; function getJsxNamespace(location) { @@ -32040,12 +32731,20 @@ var ts; diagnostics.add(diagnostic); } else { - suggestionDiagnostics.add(diagnostic.file.fileName, __assign({}, diagnostic, { category: ts.DiagnosticCategory.Suggestion })); + suggestionDiagnostics.add(__assign(__assign({}, diagnostic), { category: ts.DiagnosticCategory.Suggestion })); } } function errorOrSuggestion(isError, location, message, arg0, arg1, arg2, arg3) { addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); } + function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, arg0, arg1, arg2, arg3) { + var diagnostic = error(location, message, arg0, arg1, arg2, arg3); + if (maybeMissingAwait) { + var related = ts.createDiagnosticForNode(location, ts.Diagnostics.Did_you_forget_to_use_await); + ts.addRelatedInfo(diagnostic, related); + } + return diagnostic; + } function createSymbol(flags, name, checkFlags) { symbolCount++; var symbol = (new Symbol(flags | 33554432 /* Transient */, name)); @@ -32058,35 +32757,35 @@ var ts; function getExcludedSymbolFlags(flags) { var result = 0; if (flags & 2 /* BlockScopedVariable */) - result |= 67220415 /* BlockScopedVariableExcludes */; + result |= 111551 /* BlockScopedVariableExcludes */; if (flags & 1 /* FunctionScopedVariable */) - result |= 67220414 /* FunctionScopedVariableExcludes */; + result |= 111550 /* FunctionScopedVariableExcludes */; if (flags & 4 /* Property */) result |= 0 /* PropertyExcludes */; if (flags & 8 /* EnumMember */) - result |= 68008959 /* EnumMemberExcludes */; + result |= 900095 /* EnumMemberExcludes */; if (flags & 16 /* Function */) - result |= 67219887 /* FunctionExcludes */; + result |= 110991 /* FunctionExcludes */; if (flags & 32 /* Class */) - result |= 68008383 /* ClassExcludes */; + result |= 899503 /* ClassExcludes */; if (flags & 64 /* Interface */) - result |= 67897736 /* InterfaceExcludes */; + result |= 788872 /* InterfaceExcludes */; if (flags & 256 /* RegularEnum */) - result |= 68008191 /* RegularEnumExcludes */; + result |= 899327 /* RegularEnumExcludes */; if (flags & 128 /* ConstEnum */) - result |= 68008831 /* ConstEnumExcludes */; + result |= 899967 /* ConstEnumExcludes */; if (flags & 512 /* ValueModule */) result |= 110735 /* ValueModuleExcludes */; if (flags & 8192 /* Method */) - result |= 67212223 /* MethodExcludes */; + result |= 103359 /* MethodExcludes */; if (flags & 32768 /* GetAccessor */) - result |= 67154879 /* GetAccessorExcludes */; + result |= 46015 /* GetAccessorExcludes */; if (flags & 65536 /* SetAccessor */) - result |= 67187647 /* SetAccessorExcludes */; + result |= 78783 /* SetAccessorExcludes */; if (flags & 262144 /* TypeParameter */) - result |= 67635688 /* TypeParameterExcludes */; + result |= 526824 /* TypeParameterExcludes */; if (flags & 524288 /* TypeAlias */) - result |= 67897832 /* TypeAliasExcludes */; + result |= 788968 /* TypeAliasExcludes */; if (flags & 2097152 /* Alias */) result |= 2097152 /* AliasExcludes */; return result; @@ -32339,8 +33038,8 @@ var ts; function getSymbolsOfParameterPropertyDeclaration(parameter, parameterName) { var constructorDeclaration = parameter.parent; var classDeclaration = parameter.parent.parent; - var parameterSymbol = getSymbol(constructorDeclaration.locals, parameterName, 67220415 /* Value */); - var propertySymbol = getSymbol(getMembersOfSymbol(classDeclaration.symbol), parameterName, 67220415 /* Value */); + var parameterSymbol = getSymbol(constructorDeclaration.locals, parameterName, 111551 /* Value */); + var propertySymbol = getSymbol(getMembersOfSymbol(classDeclaration.symbol), parameterName, 111551 /* Value */); if (parameterSymbol && propertySymbol) { return [parameterSymbol, propertySymbol]; } @@ -32519,7 +33218,7 @@ var ts; // - parameters are only in the scope of function body // This restriction does not apply to JSDoc comment types because they are parented // at a higher level than type parameters would normally be - if (meaning & result.flags & 67897832 /* Type */ && lastLocation.kind !== 297 /* JSDocComment */) { + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 298 /* JSDocComment */) { useResult = result.flags & 262144 /* TypeParameter */ // type parameters are visible in parameter list, return type and type parameter list ? lastLocation === location.type || @@ -32622,7 +33321,7 @@ var ts; if (!ts.hasModifier(location, 32 /* Static */)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { - if (lookup(ctor.locals, name, meaning & 67220415 /* Value */)) { + if (lookup(ctor.locals, name, meaning & 111551 /* Value */)) { // Remember the property node, it will be used later to report appropriate error propertyWithInvalidInitializer = location; } @@ -32635,7 +33334,7 @@ var ts; // The below is used to lookup type parameters within a class or interface, as they are added to the class/interface locals // These can never be latebound, so the symbol's raw members are sufficient. `getMembersOfNode` cannot be used, as it would // trigger resolving late-bound names, which we may already be in the process of doing while we're here! - if (result = lookup(getSymbolOfNode(location).members || emptySymbols, name, meaning & 67897832 /* Type */)) { + if (result = lookup(getSymbolOfNode(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { // ignore type parameters not declared in this container result = undefined; @@ -32662,7 +33361,7 @@ var ts; // The type parameters of a class are not in scope in the base class expression. if (lastLocation === location.expression && location.parent.token === 87 /* ExtendsKeyword */) { var container = location.parent.parent; - if (ts.isClassLike(container) && (result = lookup(getSymbolOfNode(container).members, name, meaning & 67897832 /* Type */))) { + if (ts.isClassLike(container) && (result = lookup(getSymbolOfNode(container).members, name, meaning & 788968 /* Type */))) { if (nameNotFoundMessage) { error(errorLocation, ts.Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); } @@ -32682,7 +33381,7 @@ var ts; grandparent = location.parent.parent; if (ts.isClassLike(grandparent) || grandparent.kind === 242 /* InterfaceDeclaration */) { // A reference to this grandparent's type parameters would be an error - if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 67897832 /* Type */)) { + if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 788968 /* Type */)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); return undefined; } @@ -32746,8 +33445,9 @@ var ts; location = location.parent; } break; - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 306 /* JSDocEnumTag */: // js type aliases do not resolve names from their host, so skip past it location = ts.getJSDocHost(location); break; @@ -32845,21 +33545,21 @@ var ts; // we want to check for block-scoped if (errorLocation && (meaning & 2 /* BlockScopedVariable */ || - ((meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 67220415 /* Value */) === 67220415 /* Value */))) { + ((meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 111551 /* Value */) === 111551 /* Value */))) { var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result); if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */ || exportOrLocalSymbol.flags & 32 /* Class */ || exportOrLocalSymbol.flags & 384 /* Enum */) { checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } // If we're in an external module, we can't reference value symbols created from UMD export declarations - if (result && isInExternalModule && (meaning & 67220415 /* Value */) === 67220415 /* Value */ && !(originalLocation.flags & 2097152 /* JSDoc */)) { + if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 2097152 /* JSDoc */)) { var merged = getMergedSymbol(result); if (ts.length(merged.declarations) && ts.every(merged.declarations, function (d) { return ts.isNamespaceExportDeclaration(d) || ts.isSourceFile(d) && !!d.symbol.globalExports; })) { errorOrSuggestion(!compilerOptions.allowUmdGlobalAccess, errorLocation, ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, ts.unescapeLeadingUnderscores(name)); } } // If we're in a parameter initializer, we can't reference the values of the parameter whose initializer we're within or parameters to the right - if (result && associatedDeclarationForContainingInitializer && !withinDeferredContext && (meaning & 67220415 /* Value */) === 67220415 /* Value */) { + if (result && associatedDeclarationForContainingInitializer && !withinDeferredContext && (meaning & 111551 /* Value */) === 111551 /* Value */) { var candidate = getMergedSymbol(getLateBoundSymbol(result)); var root = ts.getRootDeclaration(associatedDeclarationForContainingInitializer); // A parameter initializer or binding pattern initializer within a parameter cannot refer to itself @@ -32976,9 +33676,9 @@ var ts; } } function checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) { - var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(errorLocation) ? 67220415 /* Value */ : 0); + var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(errorLocation) ? 111551 /* Value */ : 0); if (meaning === namespaceMeaning) { - var symbol = resolveSymbol(resolveName(errorLocation, name, 67897832 /* Type */ & ~namespaceMeaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); + var symbol = resolveSymbol(resolveName(errorLocation, name, 788968 /* Type */ & ~namespaceMeaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); var parent = errorLocation.parent; if (symbol) { if (ts.isQualifiedName(parent)) { @@ -32997,8 +33697,8 @@ var ts; return false; } function checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning) { - if (meaning & (67897832 /* Type */ & ~1920 /* Namespace */)) { - var symbol = resolveSymbol(resolveName(errorLocation, name, ~67897832 /* Type */ & 67220415 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); + if (meaning & (788968 /* Type */ & ~1920 /* Namespace */)) { + var symbol = resolveSymbol(resolveName(errorLocation, name, ~788968 /* Type */ & 111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol && !(symbol.flags & 1920 /* Namespace */)) { error(errorLocation, ts.Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here, ts.unescapeLeadingUnderscores(name)); return true; @@ -33007,12 +33707,12 @@ var ts; return false; } function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { - if (meaning & (67220415 /* Value */ & ~1024 /* NamespaceModule */)) { + if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */)) { if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") { error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name)); return true; } - var symbol = resolveSymbol(resolveName(errorLocation, name, 67897832 /* Type */ & ~67220415 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); + var symbol = resolveSymbol(resolveName(errorLocation, name, 788968 /* Type */ & ~111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol && !(symbol.flags & 1024 /* NamespaceModule */)) { var message = isES2015OrLaterConstructorName(name) ? ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later @@ -33036,15 +33736,15 @@ var ts; return false; } function checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) { - if (meaning & (67220415 /* Value */ & ~1024 /* NamespaceModule */ & ~67897832 /* Type */)) { - var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~67220415 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); + if (meaning & (111551 /* Value */ & ~1024 /* NamespaceModule */ & ~788968 /* Type */)) { + var symbol = resolveSymbol(resolveName(errorLocation, name, 1024 /* NamespaceModule */ & ~111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol) { error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_value, ts.unescapeLeadingUnderscores(name)); return true; } } - else if (meaning & (67897832 /* Type */ & ~1024 /* NamespaceModule */ & ~67220415 /* Value */)) { - var symbol = resolveSymbol(resolveName(errorLocation, name, (512 /* ValueModule */ | 1024 /* NamespaceModule */) & ~67897832 /* Type */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); + else if (meaning & (788968 /* Type */ & ~1024 /* NamespaceModule */ & ~111551 /* Value */)) { + var symbol = resolveSymbol(resolveName(errorLocation, name, (512 /* ValueModule */ | 1024 /* NamespaceModule */) & ~788968 /* Type */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol) { error(errorLocation, ts.Diagnostics.Cannot_use_namespace_0_as_a_type, ts.unescapeLeadingUnderscores(name)); return true; @@ -33055,7 +33755,7 @@ var ts; function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */)); // Block-scoped variables cannot be used before their definition - var declaration = ts.find(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 244 /* EnumDeclaration */) || ts.isInJSFile(d) && !!ts.getJSDocEnumTag(d); }); + var declaration = ts.find(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 244 /* EnumDeclaration */); }); if (declaration === undefined) return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined"); if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { @@ -33207,7 +33907,7 @@ var ts; if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) { return unknownSymbol; } - if (valueSymbol.flags & (67897832 /* Type */ | 1920 /* Namespace */)) { + if (valueSymbol.flags & (788968 /* Type */ | 1920 /* Namespace */)) { return valueSymbol; } var result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName); @@ -33297,7 +33997,7 @@ var ts; if (ts.isClassExpression(expression)) { return checkExpression(expression).symbol; } - var aliasLike = resolveEntityName(expression, 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ true, dontResolveAlias); + var aliasLike = resolveEntityName(expression, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ true, dontResolveAlias); if (aliasLike) { return aliasLike; } @@ -33316,7 +34016,7 @@ var ts; case 254 /* ImportSpecifier */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); case 258 /* ExportSpecifier */: - return getTargetOfExportSpecifier(node, 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); + return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); case 255 /* ExportAssignment */: case 205 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); @@ -33331,7 +34031,7 @@ var ts; * OR Is a JSContainer which may merge an alias with a local declaration */ function isNonLocalAlias(symbol, excludes) { - if (excludes === void 0) { excludes = 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */; } + if (excludes === void 0) { excludes = 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */; } if (!symbol) return false; return (symbol.flags & (2097152 /* Alias */ | excludes)) === 2097152 /* Alias */ || !!(symbol.flags & 2097152 /* Alias */ && symbol.flags & 67108864 /* Assignment */); @@ -33365,7 +34065,7 @@ var ts; var target = resolveAlias(symbol); if (target) { var markAlias = target === unknownSymbol || - ((target.flags & 67220415 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); + ((target.flags & 111551 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -33381,17 +34081,15 @@ var ts; var node = getDeclarationOfAliasSymbol(symbol); if (!node) return ts.Debug.fail(); - if (node.kind === 255 /* ExportAssignment */) { - // export default - checkExpressionCached(node.expression); - } - else if (node.kind === 258 /* ExportSpecifier */) { - // export { } or export { as foo } - checkExpressionCached(node.propertyName || node.name); - } - else if (ts.isInternalModuleImportEqualsDeclaration(node)) { - // import foo = - checkExpressionCached(node.moduleReference); + // We defer checking of the reference of an `import =` until the import itself is referenced, + // This way a chain of imports can be elided if ultimately the final input is only used in a type + // position. + if (ts.isInternalModuleImportEqualsDeclaration(node)) { + var target = resolveSymbol(symbol); + if (target === unknownSymbol || target.flags & 111551 /* Value */) { + // import foo = + checkExpressionCached(node.moduleReference); + } } } } @@ -33414,7 +34112,7 @@ var ts; // Case 2 in above example // entityName.kind could be a QualifiedName or a Missing identifier ts.Debug.assert(entityName.parent.kind === 249 /* ImportEqualsDeclaration */); - return resolveEntityName(entityName, 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias); + return resolveEntityName(entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias); } } function getFullyQualifiedName(symbol, containingLocation) { @@ -33427,7 +34125,7 @@ var ts; if (ts.nodeIsMissing(name)) { return undefined; } - var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 67220415 /* Value */ : 0); + var namespaceMeaning = 1920 /* Namespace */ | (ts.isInJSFile(name) ? meaning & 111551 /* Value */ : 0); var symbol; if (name.kind === 73 /* Identifier */) { var message = meaning === namespaceMeaning ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); @@ -33928,7 +34626,7 @@ var ts; return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 ? symbol.exportSymbol : symbol); } function symbolIsValue(symbol) { - return !!(symbol.flags & 67220415 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 67220415 /* Value */); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */); } function findConstructorDeclaration(node) { var members = node.members; @@ -34036,7 +34734,7 @@ var ts; } function getQualifiedLeftMeaning(rightMeaning) { // If we are looking in value space, the parent meaning is value, other wise it is namespace - return rightMeaning === 67220415 /* Value */ ? 67220415 /* Value */ : 1920 /* Namespace */; + return rightMeaning === 111551 /* Value */ ? 111551 /* Value */ : 1920 /* Namespace */; } function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing, visitedSymbolTablesMap) { if (visitedSymbolTablesMap === void 0) { visitedSymbolTablesMap = ts.createMap(); } @@ -34154,11 +34852,11 @@ var ts; return false; } function isTypeSymbolAccessible(typeSymbol, enclosingDeclaration) { - var access = isSymbolAccessible(typeSymbol, enclosingDeclaration, 67897832 /* Type */, /*shouldComputeAliasesToMakeVisible*/ false); + var access = isSymbolAccessible(typeSymbol, enclosingDeclaration, 788968 /* Type */, /*shouldComputeAliasesToMakeVisible*/ false); return access.accessibility === 0 /* Accessible */; } function isValueSymbolAccessible(typeSymbol, enclosingDeclaration) { - var access = isSymbolAccessible(typeSymbol, enclosingDeclaration, 67220415 /* Value */, /*shouldComputeAliasesToMakeVisible*/ false); + var access = isSymbolAccessible(typeSymbol, enclosingDeclaration, 111551 /* Value */, /*shouldComputeAliasesToMakeVisible*/ false); return access.accessibility === 0 /* Accessible */; } function isAnySymbolAccessible(symbols, enclosingDeclaration, initialSymbol, meaning, shouldComputeAliasesToMakeVisible) { @@ -34201,7 +34899,7 @@ var ts; // from the symbol of the declaration it is being assigned to. Since we can use the declaration to refer to the literal, however, // we'd like to make that connection here - potentially causing us to paint the declaration's visibility, and therefore the literal. var firstDecl = ts.first(symbol.declarations); - if (!ts.length(containers) && meaning & 67220415 /* Value */ && firstDecl && ts.isObjectLiteralExpression(firstDecl)) { + if (!ts.length(containers) && meaning & 111551 /* Value */ && firstDecl && ts.isObjectLiteralExpression(firstDecl)) { if (firstDecl.parent && ts.isVariableDeclaration(firstDecl.parent) && firstDecl === firstDecl.parent.initializer) { containers = [getSymbolOfNode(firstDecl.parent)]; } @@ -34267,7 +34965,7 @@ var ts; } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { var aliasesToMakeVisible; - if (!ts.every(symbol.declarations, getIsDeclarationVisible)) { + if (!ts.every(ts.filter(symbol.declarations, function (d) { return d.kind !== 73 /* Identifier */; }), getIsDeclarationVisible)) { return undefined; } return { accessibility: 0 /* Accessible */, aliasesToMakeVisible: aliasesToMakeVisible }; @@ -34314,7 +35012,7 @@ var ts; ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent) || entityName.parent.kind === 150 /* ComputedPropertyName */) { // Typeof value - meaning = 67220415 /* Value */ | 1048576 /* ExportValue */; + meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else if (entityName.kind === 149 /* QualifiedName */ || entityName.kind === 190 /* PropertyAccessExpression */ || entityName.parent.kind === 249 /* ImportEqualsDeclaration */) { @@ -34324,7 +35022,7 @@ var ts; } else { // Type Reference or TypeAlias entity = Identifier - meaning = 67897832 /* Type */; + meaning = 788968 /* Type */; } var firstIdentifier = getFirstIdentifier(entityName); var symbol = resolveName(enclosingDeclaration, firstIdentifier.escapedText, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); @@ -34496,14 +35194,14 @@ var ts; } if (type.flags & 1024 /* EnumLiteral */ && !(type.flags & 1048576 /* Union */)) { var parentSymbol = getParentOfSymbol(type.symbol); - var parentName = symbolToTypeNode(parentSymbol, context, 67897832 /* Type */); + var parentName = symbolToTypeNode(parentSymbol, context, 788968 /* Type */); var enumLiteralName = getDeclaredTypeOfSymbol(parentSymbol) === type ? parentName : appendReferenceToType(parentName, ts.createTypeReferenceNode(ts.symbolName(type.symbol), /*typeArguments*/ undefined)); return enumLiteralName; } if (type.flags & 1056 /* EnumLike */) { - return symbolToTypeNode(type.symbol, context, 67897832 /* Type */); + return symbolToTypeNode(type.symbol, context, 788968 /* Type */); } if (type.flags & 128 /* StringLiteral */) { context.approximateLength += (type.value.length + 2); @@ -34526,7 +35224,7 @@ var ts; if (!(context.flags & 1048576 /* AllowUniqueESSymbolType */)) { if (isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) { context.approximateLength += 6; - return symbolToTypeNode(type.symbol, context, 67220415 /* Value */); + return symbolToTypeNode(type.symbol, context, 111551 /* Value */); } if (context.tracker.reportInaccessibleUniqueSymbolError) { context.tracker.reportInaccessibleUniqueSymbolError(); @@ -34582,25 +35280,21 @@ var ts; return ts.createInferTypeNode(typeParameterToDeclarationWithConstraint(type, context, /*constraintNode*/ undefined)); } if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && - type.flags & 262144 /* TypeParameter */ && - ts.length(type.symbol.declarations) && - ts.isTypeParameterDeclaration(type.symbol.declarations[0]) && - typeParameterShadowsNameInScope(type, context) && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration)) { - var name = type.symbol.declarations[0].name; + var name = typeParameterToName(type, context); context.approximateLength += ts.idText(name).length; - return ts.createTypeReferenceNode(ts.getGeneratedNameForNode(name, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */), /*typeArguments*/ undefined); + return ts.createTypeReferenceNode(ts.createIdentifier(ts.idText(name)), /*typeArguments*/ undefined); } // Ignore constraint/default when creating a usage (as opposed to declaration) of a type parameter. return type.symbol - ? symbolToTypeNode(type.symbol, context, 67897832 /* Type */) + ? symbolToTypeNode(type.symbol, context, 788968 /* Type */) : ts.createTypeReferenceNode(ts.createIdentifier("?"), /*typeArguments*/ undefined); } if (!inTypeAlias && type.aliasSymbol && (context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */ || isTypeSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration))) { var typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & 32 /* Class */)) return ts.createTypeReferenceNode(ts.createIdentifier(""), typeArgumentNodes); - return symbolToTypeNode(type.aliasSymbol, context, 67897832 /* Type */, typeArgumentNodes); + return symbolToTypeNode(type.aliasSymbol, context, 788968 /* Type */, typeArgumentNodes); } if (type.flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { var types = type.flags & 1048576 /* Union */ ? formatUnionTypes(type.types) : type.types; @@ -34679,21 +35373,21 @@ var ts; id = (isConstructorObject ? "+" : "") + getSymbolId(symbol); if (isJSConstructor(symbol.valueDeclaration)) { // Instance and static types share the same symbol; only add 'typeof' for the static side. - var isInstanceType = type === getInferredClassType(symbol) ? 67897832 /* Type */ : 67220415 /* Value */; + var isInstanceType = type === getInferredClassType(symbol) ? 788968 /* Type */ : 111551 /* Value */; return symbolToTypeNode(symbol, context, isInstanceType); } // Always use 'typeof T' for type of class, enum, and module objects else if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) && !(symbol.valueDeclaration.kind === 210 /* ClassExpression */ && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) { - return symbolToTypeNode(symbol, context, 67220415 /* Value */); + return symbolToTypeNode(symbol, context, 111551 /* Value */); } else if (context.visitedTypes && context.visitedTypes.has(typeId)) { // If type is an anonymous type literal in a type alias declaration, use type alias name var typeAlias = getTypeAliasForTypeLiteral(type); if (typeAlias) { // The specified symbol flags need to be reinterpreted as type flags - return symbolToTypeNode(typeAlias, context, 67897832 /* Type */); + return symbolToTypeNode(typeAlias, context, 788968 /* Type */); } else { return createElidedInformationPlaceholder(context); @@ -34826,7 +35520,7 @@ var ts; var typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context); var flags_2 = context.flags; context.flags |= 16 /* ForbidIndexedAccessSymbolReferences */; - var ref = symbolToTypeNode(parent, context, 67897832 /* Type */, typeArgumentSlice); + var ref = symbolToTypeNode(parent, context, 788968 /* Type */, typeArgumentSlice); context.flags = flags_2; resultType = !resultType ? ref : appendReferenceToType(resultType, ref); } @@ -34839,7 +35533,7 @@ var ts; } var flags = context.flags; context.flags |= 16 /* ForbidIndexedAccessSymbolReferences */; - var finalRef = symbolToTypeNode(type.symbol, context, 67897832 /* Type */, typeArgumentNodes); + var finalRef = symbolToTypeNode(type.symbol, context, 788968 /* Type */, typeArgumentNodes); context.flags = flags; return !resultType ? finalRef : appendReferenceToType(resultType, finalRef); } @@ -34956,12 +35650,12 @@ var ts; trackComputedName(decl.name, saveEnclosingDeclaration, context); } } - var propertyName = symbolToName(propertySymbol, context, 67220415 /* Value */, /*expectsIdentifier*/ true); + var propertyName = symbolToName(propertySymbol, context, 111551 /* Value */, /*expectsIdentifier*/ true); context.approximateLength += (ts.symbolName(propertySymbol).length + 1); context.enclosingDeclaration = saveEnclosingDeclaration; var optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? ts.createToken(56 /* QuestionToken */) : undefined; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { - var signatures = getSignaturesOfType(propertyType, 0 /* Call */); + var signatures = getSignaturesOfType(filterType(propertyType, function (t) { return !(t.flags & 32768 /* Undefined */); }), 0 /* Call */); for (var _i = 0, signatures_1 = signatures; _i < signatures_1.length; _i++) { var signature = signatures_1[_i]; var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 156 /* MethodSignature */, context); @@ -35089,19 +35783,10 @@ var ts; context.approximateLength += 3; // Usually a signature contributes a few more characters than this, but 3 is the minimum return ts.createSignatureDeclaration(kind, typeParameters, parameters, returnTypeNode, typeArguments); } - function typeParameterShadowsNameInScope(type, context) { - return !!resolveName(context.enclosingDeclaration, type.symbol.escapedName, 67897832 /* Type */, /*nameNotFoundArg*/ undefined, type.symbol.escapedName, /*isUse*/ false); - } function typeParameterToDeclarationWithConstraint(type, context, constraintNode) { var savedContextFlags = context.flags; context.flags &= ~512 /* WriteTypeParametersInQualifiedName */; // Avoids potential infinite loop when building for a claimspace with a generic - var shouldUseGeneratedName = context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && - type.symbol.declarations && type.symbol.declarations[0] && - ts.isTypeParameterDeclaration(type.symbol.declarations[0]) && - typeParameterShadowsNameInScope(type, context); - var name = shouldUseGeneratedName - ? ts.getGeneratedNameForNode(type.symbol.declarations[0].name, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */) - : symbolToName(type.symbol, context, 67897832 /* Type */, /*expectsIdentifier*/ true); + var name = typeParameterToName(type, context); var defaultParameter = getDefaultFromTypeParameter(type); var defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context); context.flags = savedContextFlags; @@ -35115,7 +35800,7 @@ var ts; function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags) { var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 152 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 305 /* JSDocParameterTag */); + parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 307 /* JSDocParameterTag */); } var parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -35159,9 +35844,9 @@ var ts; return; // get symbol of the first identifier of the entityName var firstIdentifier = getFirstIdentifier(node.expression); - var name = resolveName(firstIdentifier, firstIdentifier.escapedText, 67220415 /* Value */ | 1048576 /* ExportValue */, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); + var name = resolveName(firstIdentifier, firstIdentifier.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); if (name) { - context.tracker.trackSymbol(name, enclosingDeclaration, 67220415 /* Value */); + context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */); } } function lookupSymbolChain(symbol, context, meaning, yieldModuleSymbol) { @@ -35314,7 +35999,7 @@ var ts; // using the `baseUrl` compiler option (which we would otherwise never use in declaration emit) and a non-relative // specifier preference var moduleResolverHost = context.tracker.moduleResolverHost; - var specifierCompilerOptions = isBundle_1 ? __assign({}, compilerOptions, { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions; + var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions; specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, specifierCompilerOptions, contextFile, moduleResolverHost, host.getSourceFiles(), { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "relative" }, host.redirectTargetsMap)); links.specifierCache = links.specifierCache || ts.createMap(); links.specifierCache.set(contextFile.path, specifier); @@ -35323,7 +36008,7 @@ var ts; } function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) { var chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */)); // If we're using aliases outside the current scope, dont bother with the module - var isTypeOf = meaning === 67220415 /* Value */; + var isTypeOf = meaning === 111551 /* Value */; if (ts.some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { // module is root, must use `ImportTypeNode` var nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : undefined; @@ -35401,6 +36086,33 @@ var ts; return identifier; } } + function typeParameterShadowsNameInScope(escapedName, context) { + return !!resolveName(context.enclosingDeclaration, escapedName, 788968 /* Type */, /*nameNotFoundArg*/ undefined, escapedName, /*isUse*/ false); + } + function typeParameterToName(type, context) { + if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && context.typeParameterNames) { + var cached = context.typeParameterNames.get("" + getTypeId(type)); + if (cached) { + return cached; + } + } + var result = symbolToName(type.symbol, context, 788968 /* Type */, /*expectsIdentifier*/ true); + if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { + var rawtext = result.escapedText; + var i = 0; + var text = rawtext; + while ((context.typeParameterNamesByText && context.typeParameterNamesByText.get(text)) || typeParameterShadowsNameInScope(text, context)) { + i++; + text = rawtext + "_" + i; + } + if (text !== rawtext) { + result = ts.createIdentifier(text, result.typeArguments); + } + (context.typeParameterNames || (context.typeParameterNames = ts.createMap())).set("" + getTypeId(type), result); + (context.typeParameterNamesByText || (context.typeParameterNamesByText = ts.createMap())).set(result.escapedText, true); + } + return result; + } function symbolToName(symbol, context, meaning, expectsIdentifier) { var chain = lookupSymbolChain(symbol, context, meaning); if (expectsIdentifier && chain.length !== 1 @@ -35541,6 +36253,9 @@ var ts; if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) { return "\"" + ts.escapeString(name, 34 /* doubleQuote */) + "\""; } + if (isNumericLiteralName(name) && ts.startsWith(name, "-")) { + return "[" + name + "]"; + } return name; } if (nameType.flags & 8192 /* UniqueESSymbol */) { @@ -35608,8 +36323,9 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 303 /* JSDocCallbackTag */: - case 310 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 306 /* JSDocEnumTag */: // Top-level jsdoc type aliases are considered exported // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent)); @@ -35692,10 +36408,10 @@ var ts; function collectLinkedAliases(node, setVisibility) { var exportSymbol; if (node.parent && node.parent.kind === 255 /* ExportAssignment */) { - exportSymbol = resolveName(node, node.escapedText, 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*nameNotFoundMessage*/ undefined, node, /*isUse*/ false); + exportSymbol = resolveName(node, node.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*nameNotFoundMessage*/ undefined, node, /*isUse*/ false); } else if (node.parent.kind === 258 /* ExportSpecifier */) { - exportSymbol = getTargetOfExportSpecifier(node.parent, 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); + exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } var result; if (exportSymbol) { @@ -35716,7 +36432,7 @@ var ts; // Add the referenced top container visible var internalModuleReference = declaration.moduleReference; var firstIdentifier = getFirstIdentifier(internalModuleReference); - var importSymbol = resolveName(declaration, firstIdentifier.escapedText, 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */, undefined, undefined, /*isUse*/ false); + var importSymbol = resolveName(declaration, firstIdentifier.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, undefined, undefined, /*isUse*/ false); if (importSymbol) { buildVisibleNodeList(importSymbol.declarations); } @@ -35780,8 +36496,10 @@ var ts; } return ts.Debug.assertNever(propertyName); } - // Pop an entry from the type resolution stack and return its associated result value. The result value will - // be true if no circularities were detected, or false if a circularity was found. + /** + * Pop an entry from the type resolution stack and return its associated result value. The result value will + * be true if no circularities were detected, or false if a circularity was found. + */ function popTypeResolution() { resolutionTargets.pop(); resolutionPropertyNames.pop(); @@ -35960,7 +36678,7 @@ var ts; // This elementType will be used if the specific property corresponding to this index is not // present (aka the tuple element property). This call also checks that the parentType is in // fact an iterable or array (depending on target language). - var elementType = checkIteratedTypeOrElementType(parentType, pattern, /*allowStringInput*/ false, /*allowAsyncIterables*/ false); + var elementType = checkIteratedTypeOrElementType(65 /* Destructuring */, parentType, undefinedType, pattern); var index_1 = pattern.elements.indexOf(declaration); if (declaration.dotDotDotToken) { // If the parent is a tuple type, the rest element has a tuple type of the @@ -35972,21 +36690,25 @@ var ts; } else if (isArrayLikeType(parentType)) { var indexType = getLiteralType(index_1); - var declaredType = getConstraintForLocation(getIndexedAccessType(parentType, indexType, declaration.name), declaration.name); + var accessFlags = hasDefaultValue(declaration) ? 8 /* NoTupleBoundsCheck */ : 0; + var declaredType = getConstraintForLocation(getIndexedAccessTypeOrUndefined(parentType, indexType, declaration.name, accessFlags) || errorType, declaration.name); type = getFlowTypeOfDestructuring(declaration, declaredType); } else { type = elementType; } } - // In strict null checking mode, if a default value of a non-undefined type is specified, remove - // undefined from the final type. - if (strictNullChecks && declaration.initializer && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & 32768 /* Undefined */)) { - type = getTypeWithFacts(type, 524288 /* NEUndefined */); + if (!declaration.initializer) { + return type; } - return declaration.initializer && !ts.getEffectiveTypeAnnotationNode(ts.walkUpBindingElementsAndPatterns(declaration)) ? - getUnionType([type, checkDeclarationInitializer(declaration)], 2 /* Subtype */) : - type; + if (ts.getEffectiveTypeAnnotationNode(ts.walkUpBindingElementsAndPatterns(declaration))) { + // In strict null checking mode, if a default value of a non-undefined type is specified, remove + // undefined from the final type. + return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & 32768 /* Undefined */) ? + getTypeWithFacts(type, 524288 /* NEUndefined */) : + type; + } + return getUnionType([getTypeWithFacts(type, 524288 /* NEUndefined */), checkDeclarationInitializer(declaration)], 2 /* Subtype */); } function getTypeForDeclarationFromJSDocComment(declaration) { var jsdocType = ts.getJSDocType(declaration); @@ -36076,7 +36798,7 @@ var ts; } } // Use contextual parameter type if one is available - var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration); + var type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration, /*forCache*/ true); if (type) { return addOptionality(type, isOptional); } @@ -36106,7 +36828,7 @@ var ts; // No type specified and nothing can be inferred return undefined; } - function getWidenedTypeFromAssignmentDeclaration(symbol, resolvedSymbol) { + function getWidenedTypeForAssignmentDeclaration(symbol, resolvedSymbol) { // function/class/{} initializers are themselves containers, so they won't merge in the same way as other initializers var container = ts.getAssignedExpandoInitializer(symbol.valueDeclaration); if (container) { @@ -36139,7 +36861,7 @@ var ts; } } if (!ts.isCallExpression(expression)) { - jsdocType = getJSDocTypeFromAssignmentDeclaration(jsdocType, expression, symbol, declaration); + jsdocType = getAnnotatedTypeForAssignmentDeclaration(jsdocType, expression, symbol, declaration); } if (!jsdocType) { (types || (types = [])).push((ts.isBinaryExpression(expression) || ts.isCallExpression(expression)) ? getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) : neverType); @@ -36186,8 +36908,8 @@ var ts; type.objectFlags |= 16384 /* JSLiteral */; return type; } - function getJSDocTypeFromAssignmentDeclaration(declaredType, expression, _symbol, declaration) { - var typeNode = ts.getJSDocType(expression.parent); + function getAnnotatedTypeForAssignmentDeclaration(declaredType, expression, symbol, declaration) { + var typeNode = ts.getEffectiveTypeAnnotationNode(expression.parent); if (typeNode) { var type = getWidenedType(getTypeFromTypeNode(typeNode)); if (!declaredType) { @@ -36197,6 +36919,12 @@ var ts; errorNextVariableOrPropertyDeclarationMustHaveSameType(/*firstDeclaration*/ undefined, declaredType, declaration, type); } } + if (symbol.parent) { + var typeNode_2 = ts.getEffectiveTypeAnnotationNode(symbol.parent.valueDeclaration); + if (typeNode_2) { + return getTypeOfPropertyOfType(getTypeFromTypeNode(typeNode_2), symbol.escapedName); + } + } return declaredType; } /** If we don't have an explicit JSDoc type, get the type from the initializer. */ @@ -36307,7 +37035,7 @@ var ts; function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { var members = ts.createSymbolTable(); var stringIndexInfo; - var objectFlags = 128 /* ObjectLiteral */ | 262144 /* ContainsObjectLiteral */; + var objectFlags = 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; if (e.dotDotDotToken) { @@ -36467,7 +37195,7 @@ var ts; } else if (ts.isInJSFile(declaration) && (ts.isCallExpression(declaration) || ts.isBinaryExpression(declaration) || ts.isPropertyAccessExpression(declaration) && ts.isBinaryExpression(declaration.parent))) { - type = getWidenedTypeFromAssignmentDeclaration(symbol); + type = getWidenedTypeForAssignmentDeclaration(symbol); } else if (ts.isJSDocPropertyLikeTag(declaration) || ts.isPropertyAccessExpression(declaration) @@ -36482,7 +37210,7 @@ var ts; return getTypeOfFuncClassEnumModule(symbol); } type = ts.isBinaryExpression(declaration.parent) ? - getWidenedTypeFromAssignmentDeclaration(symbol) : + getWidenedTypeForAssignmentDeclaration(symbol) : tryGetTypeFromEffectiveTypeNode(declaration) || anyType; } else if (ts.isPropertyAssignment(declaration)) { @@ -36584,7 +37312,9 @@ var ts; // Otherwise, fall back to 'any'. else { if (setter) { - errorOrSuggestion(noImplicitAny, setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol)); + if (!isPrivateWithinAmbient(setter)) { + errorOrSuggestion(noImplicitAny, setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol)); + } } else { ts.Debug.assert(!!getter, "there must existed getter as we are current checking either setter or getter in this function"); @@ -36639,7 +37369,7 @@ var ts; } else if (declaration.kind === 205 /* BinaryExpression */ || declaration.kind === 190 /* PropertyAccessExpression */ && declaration.parent.kind === 205 /* BinaryExpression */) { - return getWidenedTypeFromAssignmentDeclaration(symbol); + return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && ts.isSourceFile(declaration) && declaration.commonJsModuleIndicator) { var resolvedModule = resolveExternalModuleSymbol(symbol); @@ -36648,7 +37378,7 @@ var ts; return errorType; } var exportEquals = getMergedSymbol(symbol.exports.get("export=" /* ExportEquals */)); - var type_2 = getWidenedTypeFromAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); + var type_2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule); if (!popTypeResolution()) { return reportCircularityError(symbol); } @@ -36677,7 +37407,7 @@ var ts; // type symbol, call getDeclaredTypeOfSymbol. // This check is important because without it, a call to getTypeOfSymbol could end // up recursively calling getTypeOfAlias, causing a stack overflow. - links.type = targetSymbol.flags & 67220415 /* Value */ + links.type = targetSymbol.flags & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; } @@ -36804,9 +37534,10 @@ var ts; case 197 /* FunctionExpression */: case 198 /* ArrowFunction */: case 243 /* TypeAliasDeclaration */: - case 309 /* JSDocTemplateTag */: - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: + case 311 /* JSDocTemplateTag */: + case 312 /* JSDocTypedefTag */: + case 306 /* JSDocEnumTag */: + case 305 /* JSDocCallbackTag */: case 182 /* MappedType */: case 176 /* ConditionalType */: var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); @@ -37076,7 +37807,7 @@ var ts; for (var _b = 0, baseTypeNodes_1 = baseTypeNodes; _b < baseTypeNodes_1.length; _b++) { var node = baseTypeNodes_1[_b]; if (ts.isEntityNameExpression(node.expression)) { - var baseSymbol = resolveEntityName(node.expression, 67897832 /* Type */, /*ignoreErrors*/ true); + var baseSymbol = resolveEntityName(node.expression, 788968 /* Type */, /*ignoreErrors*/ true); if (!baseSymbol || !(baseSymbol.flags & 64 /* Interface */) || getDeclaredTypeOfClassOrInterface(baseSymbol).thisType) { return false; } @@ -37123,9 +37854,10 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return errorType; } - var declaration = ts.find(symbol.declarations, function (d) { - return ts.isJSDocTypeAlias(d) || d.kind === 243 /* TypeAliasDeclaration */; - }); + var declaration = ts.find(symbol.declarations, ts.isTypeAlias); + if (!declaration) { + return ts.Debug.fail("Type alias symbol with no valid declaration found"); + } var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; // If typeNode is missing, we will error in checkJSDocTypedefTag. var type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; @@ -37141,7 +37873,7 @@ var ts; } else { type = errorType; - error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + error(ts.isJSDocEnumTag(declaration) ? declaration : declaration.name || declaration, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } links.declaredType = type; } @@ -37214,7 +37946,8 @@ var ts; if (declaration.kind === 244 /* EnumDeclaration */) { for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { var member = _c[_b]; - var memberType = getFreshTypeOfLiteralType(getLiteralType(getEnumMemberValue(member), enumCount, getSymbolOfNode(member))); // TODO: GH#18217 + var value = getEnumMemberValue(member); + var memberType = getFreshTypeOfLiteralType(getLiteralType(value !== undefined ? value : 0, enumCount, getSymbolOfNode(member))); getSymbolLinks(getSymbolOfNode(member)).declaredType = memberType; memberTypeList.push(getRegularTypeOfLiteralType(memberType)); } @@ -37457,7 +38190,7 @@ var ts; else { symbol.declarations.push(member); } - if (symbolFlags & 67220415 /* Value */) { + if (symbolFlags & 111551 /* Value */) { if (!symbol.valueDeclaration || symbol.valueDeclaration.kind !== member.kind) { symbol.valueDeclaration = member; } @@ -37763,8 +38496,9 @@ var ts; } var result; for (var i = 0; i < signatureLists.length; i++) { - // Allow matching non-generic signatures to have excess parameters and different return types - var match = i === listIndex ? signature : findMatchingSignature(signatureLists[i], signature, /*partialMatch*/ true, /*ignoreThisTypes*/ true, /*ignoreReturnTypes*/ true); + // Allow matching non-generic signatures to have excess parameters and different return types. + // Prefer matching this types if possible. + var match = i === listIndex ? signature : findMatchingSignature(signatureLists[i], signature, /*partialMatch*/ true, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ true); if (!match) { return undefined; } @@ -37788,7 +38522,7 @@ var ts; for (var _i = 0, _a = signatureLists[i]; _i < _a.length; _i++) { var signature = _a[_i]; // Only process signatures with parameter lists that aren't already in the result list - if (!result || !findMatchingSignature(result, signature, /*partialMatch*/ false, /*ignoreThisTypes*/ true, /*ignoreReturnTypes*/ true)) { + if (!result || !findMatchingSignature(result, signature, /*partialMatch*/ false, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ true)) { var unionSignatures = findMatchingSignatures(signatureLists, signature, i); if (unionSignatures) { var s = signature; @@ -37797,7 +38531,7 @@ var ts; var thisParameter = signature.thisParameter; var firstThisParameterOfUnionSignatures = ts.forEach(unionSignatures, function (sig) { return sig.thisParameter; }); if (firstThisParameterOfUnionSignatures) { - var thisType = getUnionType(ts.map(unionSignatures, function (sig) { return sig.thisParameter ? getTypeOfSymbol(sig.thisParameter) : anyType; }), 2 /* Subtype */); + var thisType = getIntersectionType(ts.mapDefined(unionSignatures, function (sig) { return sig.thisParameter && getTypeOfSymbol(sig.thisParameter); })); thisParameter = createSymbolWithType(firstThisParameterOfUnionSignatures, thisType); } s = createUnionSignature(signature, unionSignatures); @@ -37841,14 +38575,16 @@ var ts; } // A signature `this` type might be a read or a write position... It's very possible that it should be invariant // and we should refuse to merge signatures if there are `this` types and they do not match. However, so as to be - // permissive when calling, for now, we'll union the `this` types just like the overlapping-union-signature check does - var thisType = getUnionType([getTypeOfSymbol(left), getTypeOfSymbol(right)], 2 /* Subtype */); + // permissive when calling, for now, we'll intersect the `this` types just like we do for param types in union signatures. + var thisType = getIntersectionType([getTypeOfSymbol(left), getTypeOfSymbol(right)]); return createSymbolWithType(left, thisType); } function combineUnionParameters(left, right) { - var longest = getParameterCount(left) >= getParameterCount(right) ? left : right; + var leftCount = getParameterCount(left); + var rightCount = getParameterCount(right); + var longest = leftCount >= rightCount ? left : right; var shorter = longest === left ? right : left; - var longestCount = getParameterCount(longest); + var longestCount = longest === left ? leftCount : rightCount; var eitherHasEffectiveRest = (hasEffectiveRestParameter(left) || hasEffectiveRestParameter(right)); var needsExtraRestElement = eitherHasEffectiveRest && !hasEffectiveRestParameter(longest); var params = new Array(longestCount + (needsExtraRestElement ? 1 : 0)); @@ -37858,9 +38594,13 @@ var ts; var unionParamType = getIntersectionType([longestParamType, shorterParamType]); var isRestParam = eitherHasEffectiveRest && !needsExtraRestElement && i === (longestCount - 1); var isOptional = i >= getMinArgumentCount(longest) && i >= getMinArgumentCount(shorter); - var leftName = getParameterNameAtPosition(left, i); - var rightName = getParameterNameAtPosition(right, i); - var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), leftName === rightName ? leftName : "arg" + i); + var leftName = i >= leftCount ? undefined : getParameterNameAtPosition(left, i); + var rightName = i >= rightCount ? undefined : getParameterNameAtPosition(right, i); + var paramName = leftName === rightName ? leftName : + !leftName ? rightName : + !rightName ? leftName : + undefined; + var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg" + i); paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType; params[i] = paramSymbol; } @@ -37940,8 +38680,8 @@ var ts; function resolveIntersectionTypeMembers(type) { // The members and properties collections are empty for intersection types. To get all properties of an // intersection type use getPropertiesOfType (only the language service uses this). - var callSignatures = ts.emptyArray; - var constructSignatures = ts.emptyArray; + var callSignatures; + var constructSignatures; var stringIndexInfo; var numberIndexInfo; var types = type.types; @@ -37963,16 +38703,28 @@ var ts; return clone; }); } - constructSignatures = ts.concatenate(constructSignatures, signatures); + constructSignatures = appendSignatures(constructSignatures, signatures); } - callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(t, 0 /* Call */)); + callSignatures = appendSignatures(callSignatures, getSignaturesOfType(t, 0 /* Call */)); stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, 0 /* String */)); numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, 1 /* Number */)); }; for (var i = 0; i < types.length; i++) { _loop_6(i); } - setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); + setStructuredTypeMembers(type, emptySymbols, callSignatures || ts.emptyArray, constructSignatures || ts.emptyArray, stringIndexInfo, numberIndexInfo); + } + function appendSignatures(signatures, newSignatures) { + var _loop_7 = function (sig) { + if (!signatures || ts.every(signatures, function (s) { return !compareSignaturesIdentical(s, sig, /*partialMatch*/ false, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ false, compareTypesIdentical); })) { + signatures = ts.append(signatures, sig); + } + }; + for (var _i = 0, newSignatures_1 = newSignatures; _i < newSignatures_1.length; _i++) { + var sig = newSignatures_1[_i]; + _loop_7(sig); + } + return signatures; } /** * Converts an AnonymousType to a ResolvedType. @@ -38025,7 +38777,8 @@ var ts; stringIndexInfo = createIndexInfo(anyType, /*isReadonly*/ false); } } - var numberIndexInfo = symbol.flags & 384 /* Enum */ ? enumNumberIndexInfo : undefined; + var numberIndexInfo = symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || + ts.some(type.properties, function (prop) { return !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */); })) ? enumNumberIndexInfo : undefined; setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); // We resolve the members before computing the signatures because a signature may use // typeof with a qualified name expression that circularly references the type we are @@ -38159,8 +38912,8 @@ var ts; else if (t.flags & (1 /* Any */ | 4 /* String */)) { stringIndexInfo = createIndexInfo(propType, !!(templateModifiers & 1 /* IncludeReadonly */)); } - else if (t.flags & 8 /* Number */) { - numberIndexInfo = createIndexInfo(propType, !!(templateModifiers & 1 /* IncludeReadonly */)); + else if (t.flags & (8 /* Number */ | 32 /* Enum */)) { + numberIndexInfo = createIndexInfo(numberIndexInfo ? getUnionType([numberIndexInfo.type, propType]) : propType, !!(templateModifiers & 1 /* IncludeReadonly */)); } } } @@ -38197,7 +38950,7 @@ var ts; else { // Otherwise, get the declared constraint type, and if the constraint type is a type parameter, // get the constraint of that type parameter. If the resulting type is an indexed type 'keyof T', - // the modifiers type is T. Otherwise, the modifiers type is {}. + // the modifiers type is T. Otherwise, the modifiers type is unknown. var declaredType = getTypeFromMappedTypeNode(type.declaration); var constraint = getConstraintTypeFromMappedType(declaredType); var extendedConstraint = constraint && constraint.flags & 262144 /* TypeParameter */ ? getConstraintOfTypeParameter(constraint) : constraint; @@ -38642,7 +39395,7 @@ var ts; t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 132 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : - t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= 8 /* ESNext */) : + t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType(/*reportErrors*/ languageVersion >= 99 /* ESNext */) : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= 2 /* ES2015 */) : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : @@ -38688,10 +39441,13 @@ var ts; else if (isUnion) { var indexInfo = !isLateBoundName(name) && (isNumericLiteralName(name) && getIndexInfoOfType(type, 1 /* Number */) || getIndexInfoOfType(type, 0 /* String */)); if (indexInfo) { - checkFlags |= indexInfo.isReadonly ? 8 /* Readonly */ : 0; - checkFlags |= 32 /* WritePartial */; + checkFlags |= 32 /* WritePartial */ | (indexInfo.isReadonly ? 8 /* Readonly */ : 0); indexTypes = ts.append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type); } + else if (isObjectLiteralType(type)) { + checkFlags |= 32 /* WritePartial */; + indexTypes = ts.append(indexTypes, undefinedType); + } else { checkFlags |= 16 /* ReadPartial */; } @@ -38853,6 +39609,9 @@ var ts; propTypes.push(getTypeOfSymbol(prop)); } } + if (kind === 0 /* String */) { + ts.append(propTypes, getIndexTypeOfType(type, 1 /* Number */)); + } if (propTypes.length) { return getUnionType(propTypes, 2 /* Subtype */); } @@ -38990,7 +39749,7 @@ var ts; var type = ts.isJSDocParameterTag(param) ? (param.typeExpression && param.typeExpression.type) : param.type; // Include parameter symbol instead of property symbol in the signature if (paramSymbol && !!(paramSymbol.flags & 4 /* Property */) && !ts.isBindingPattern(param.name)) { - var resolvedSymbol = resolveName(param, paramSymbol.escapedName, 67220415 /* Value */, undefined, undefined, /*isUse*/ false); + var resolvedSymbol = resolveName(param, paramSymbol.escapedName, 111551 /* Value */, undefined, undefined, /*isUse*/ false); paramSymbol = resolvedSymbol; } if (i === 0 && paramSymbol.escapedName === "this" /* This */) { @@ -39349,8 +40108,7 @@ var ts; return undefined; } function getConstraintDeclaration(type) { - var decl = type.symbol && ts.getDeclarationOfKind(type.symbol, 151 /* TypeParameter */); - return decl && ts.getEffectiveConstraintOfTypeParameter(decl); + return ts.mapDefined(ts.filter(type.symbol && type.symbol.declarations, ts.isTypeParameterDeclaration), ts.getEffectiveConstraintOfTypeParameter)[0]; } function getInferredTypeParameterConstraint(typeParameter) { var inferences; @@ -39451,7 +40209,7 @@ var ts; result |= ts.getObjectFlags(type); } } - return result & 917504 /* PropagatingFlags */; + return result & 1835008 /* PropagatingFlags */; } function createTypeReference(target, typeArguments) { var id = getTypeListId(typeArguments); @@ -39558,11 +40316,11 @@ var ts; } return undefined; } - function resolveTypeReferenceName(typeReferenceName, meaning) { + function resolveTypeReferenceName(typeReferenceName, meaning, ignoreErrors) { if (!typeReferenceName) { return unknownSymbol; } - return resolveEntityName(typeReferenceName, meaning) || unknownSymbol; + return resolveEntityName(typeReferenceName, meaning, ignoreErrors) || unknownSymbol; } function getTypeReferenceType(node, symbol) { var typeArguments = typeArgumentsFromTypeReferenceNode(node); // Do unconditionally so we mark type arguments as referenced. @@ -39573,20 +40331,6 @@ var ts; if (type) { return type; } - // JS enums are 'string' or 'number', not an enum type. - var enumTag = ts.isInJSFile(node) && symbol.valueDeclaration && ts.getJSDocEnumTag(symbol.valueDeclaration); - if (enumTag) { - var links = getNodeLinks(enumTag); - if (!pushTypeResolution(enumTag, 5 /* EnumTagType */)) { - return errorType; - } - var type_4 = enumTag.typeExpression ? getTypeFromTypeNode(enumTag.typeExpression) : errorType; - if (!popTypeResolution()) { - type_4 = errorType; - error(node, ts.Diagnostics.Enum_type_0_circularly_references_itself, symbolToString(symbol)); - } - return (links.resolvedEnumType = type_4); - } // Get type from reference to named type that cannot be generic (enum or type parameter) var res = tryGetDeclaredTypeOfSymbol(symbol); if (res) { @@ -39594,7 +40338,7 @@ var ts; res.flags & 262144 /* TypeParameter */ ? getConstrainedTypeVariable(res, node) : getRegularTypeOfLiteralType(res) : errorType; } - if (!(symbol.flags & 67220415 /* Value */ && isJSDocTypeReference(node))) { + if (!(symbol.flags & 111551 /* Value */ && isJSDocTypeReference(node))) { return errorType; } var jsdocType = getJSDocTypeReference(node, symbol, typeArguments); @@ -39602,7 +40346,7 @@ var ts; return jsdocType; } // Resolve the type reference as a Type for the purpose of reporting errors. - resolveTypeReferenceName(getTypeReferenceName(node), 67897832 /* Type */); + resolveTypeReferenceName(getTypeReferenceName(node), 788968 /* Type */); return getTypeOfSymbol(symbol); } /** @@ -39670,7 +40414,7 @@ var ts; } function getConstrainedTypeVariable(typeVariable, node) { var constraints; - while (node && !ts.isStatement(node) && node.kind !== 297 /* JSDocComment */) { + while (node && !ts.isStatement(node) && node.kind !== 298 /* JSDocComment */) { var parent = node.parent; if (parent.kind === 176 /* ConditionalType */ && node === parent.trueType) { var constraint = getImpliedConstraint(typeVariable, parent.checkType, parent.extendsType); @@ -39748,10 +40492,19 @@ var ts; if (!links.resolvedType) { var symbol = void 0; var type = void 0; - var meaning = 67897832 /* Type */; + var meaning = 788968 /* Type */; if (isJSDocTypeReference(node)) { type = getIntendedTypeFromJSDocTypeReference(node); - meaning |= 67220415 /* Value */; + if (!type) { + symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning, /*ignoreErrors*/ true); + if (symbol === unknownSymbol) { + symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning | 111551 /* Value */); + } + else { + resolveTypeReferenceName(getTypeReferenceName(node), meaning); // Resolve again to mark errors, if any + } + type = getTypeReferenceType(node, symbol); + } } if (!type) { symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning); @@ -39806,10 +40559,10 @@ var ts; return type; } function getGlobalValueSymbol(name, reportErrors) { - return getGlobalSymbol(name, 67220415 /* Value */, reportErrors ? ts.Diagnostics.Cannot_find_global_value_0 : undefined); + return getGlobalSymbol(name, 111551 /* Value */, reportErrors ? ts.Diagnostics.Cannot_find_global_value_0 : undefined); } function getGlobalTypeSymbol(name, reportErrors) { - return getGlobalSymbol(name, 67897832 /* Type */, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined); + return getGlobalSymbol(name, 788968 /* Type */, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined); } function getGlobalSymbol(name, meaning, diagnostic) { // Don't track references for global symbols anyway, so value if `isReference` is arbitrary @@ -39850,23 +40603,35 @@ var ts; return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType("AsyncIterable", /*arity*/ 1, reportErrors)) || emptyGenericType; } function getGlobalAsyncIteratorType(reportErrors) { - return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", /*arity*/ 1, reportErrors)) || emptyGenericType; + return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", /*arity*/ 3, reportErrors)) || emptyGenericType; } function getGlobalAsyncIterableIteratorType(reportErrors) { return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType("AsyncIterableIterator", /*arity*/ 1, reportErrors)) || emptyGenericType; } + function getGlobalAsyncGeneratorType(reportErrors) { + return deferredGlobalAsyncGeneratorType || (deferredGlobalAsyncGeneratorType = getGlobalType("AsyncGenerator", /*arity*/ 3, reportErrors)) || emptyGenericType; + } function getGlobalIterableType(reportErrors) { return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType("Iterable", /*arity*/ 1, reportErrors)) || emptyGenericType; } function getGlobalIteratorType(reportErrors) { - return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", /*arity*/ 1, reportErrors)) || emptyGenericType; + return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", /*arity*/ 3, reportErrors)) || emptyGenericType; } function getGlobalIterableIteratorType(reportErrors) { return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType("IterableIterator", /*arity*/ 1, reportErrors)) || emptyGenericType; } + function getGlobalGeneratorType(reportErrors) { + return deferredGlobalGeneratorType || (deferredGlobalGeneratorType = getGlobalType("Generator", /*arity*/ 3, reportErrors)) || emptyGenericType; + } + function getGlobalIteratorYieldResultType(reportErrors) { + return deferredGlobalIteratorYieldResultType || (deferredGlobalIteratorYieldResultType = getGlobalType("IteratorYieldResult", /*arity*/ 1, reportErrors)) || emptyGenericType; + } + function getGlobalIteratorReturnResultType(reportErrors) { + return deferredGlobalIteratorReturnResultType || (deferredGlobalIteratorReturnResultType = getGlobalType("IteratorReturnResult", /*arity*/ 1, reportErrors)) || emptyGenericType; + } function getGlobalTypeOrUndefined(name, arity) { if (arity === void 0) { arity = 0; } - var symbol = getGlobalSymbol(name, 67897832 /* Type */, /*diagnostic*/ undefined); + var symbol = getGlobalSymbol(name, 788968 /* Type */, /*diagnostic*/ undefined); return symbol && getTypeOfGlobalSymbol(symbol, arity); } function getGlobalExtractSymbol() { @@ -39887,18 +40652,9 @@ var ts; function createTypedPropertyDescriptorType(propertyType) { return createTypeFromGenericGlobalType(getGlobalTypedPropertyDescriptorType(), [propertyType]); } - function createAsyncIterableType(iteratedType) { - return createTypeFromGenericGlobalType(getGlobalAsyncIterableType(/*reportErrors*/ true), [iteratedType]); - } - function createAsyncIterableIteratorType(iteratedType) { - return createTypeFromGenericGlobalType(getGlobalAsyncIterableIteratorType(/*reportErrors*/ true), [iteratedType]); - } function createIterableType(iteratedType) { return createTypeFromGenericGlobalType(getGlobalIterableType(/*reportErrors*/ true), [iteratedType]); } - function createIterableIteratorType(iteratedType) { - return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(/*reportErrors*/ true), [iteratedType]); - } function createArrayType(elementType, readonly) { return createTypeFromGenericGlobalType(readonly ? globalReadonlyArrayType : globalArrayType, [elementType]); } @@ -40021,51 +40777,20 @@ var ts; } return false; } - // Return true if the given intersection type contains - // more than one unit type or, - // an object type and a nullable type (null or undefined), or - // a string-like type and a type known to be non-string-like, or - // a number-like type and a type known to be non-number-like, or - // a symbol-like type and a type known to be non-symbol-like, or - // a void-like type and a type known to be non-void-like, or - // a non-primitive type and a type known to be primitive. - function isEmptyIntersectionType(type) { - var combined = 0; - for (var _i = 0, _a = type.types; _i < _a.length; _i++) { - var t = _a[_i]; - if (t.flags & 109440 /* Unit */ && combined & 109440 /* Unit */) { - return true; - } - combined |= t.flags; - if (combined & 98304 /* Nullable */ && combined & (524288 /* Object */ | 67108864 /* NonPrimitive */) || - combined & 67108864 /* NonPrimitive */ && combined & (67238908 /* DisjointDomains */ & ~67108864 /* NonPrimitive */) || - combined & 132 /* StringLike */ && combined & (67238908 /* DisjointDomains */ & ~132 /* StringLike */) || - combined & 296 /* NumberLike */ && combined & (67238908 /* DisjointDomains */ & ~296 /* NumberLike */) || - combined & 2112 /* BigIntLike */ && combined & (67238908 /* DisjointDomains */ & ~2112 /* BigIntLike */) || - combined & 12288 /* ESSymbolLike */ && combined & (67238908 /* DisjointDomains */ & ~12288 /* ESSymbolLike */) || - combined & 49152 /* VoidLike */ && combined & (67238908 /* DisjointDomains */ & ~49152 /* VoidLike */)) { - return true; - } - } - return false; - } function addTypeToUnion(typeSet, includes, type) { var flags = type.flags; if (flags & 1048576 /* Union */) { return addTypesToUnion(typeSet, includes, type.types); } - // We ignore 'never' types in unions. Likewise, we ignore intersections of unit types as they are - // another form of 'never' (in that they have an empty value domain). We could in theory turn - // intersections of unit types into 'never' upon construction, but deferring the reduction makes it - // easier to reason about their origin. - if (!(flags & 131072 /* Never */ || flags & 2097152 /* Intersection */ && isEmptyIntersectionType(type))) { - includes |= flags & 1835007 /* IncludesMask */; + // We ignore 'never' types in unions + if (!(flags & 131072 /* Never */)) { + includes |= flags & 68943871 /* IncludesMask */; if (flags & 66846720 /* StructuredOrInstantiable */) includes |= 262144 /* IncludesStructuredOrInstantiable */; if (type === wildcardType) includes |= 4194304 /* IncludesWildcard */; if (!strictNullChecks && flags & 98304 /* Nullable */) { - if (!(ts.getObjectFlags(type) & 131072 /* ContainsWideningType */)) + if (!(ts.getObjectFlags(type) & 262144 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */; } else { @@ -40192,7 +40917,7 @@ var ts; neverType; } } - return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); + return getUnionTypeFromSortedList(typeSet, includes & 66994211 /* NotPrimitiveUnion */ ? 0 : 131072 /* PrimitiveUnion */, aliasSymbol, aliasTypeArguments); } function getUnionTypePredicate(signatures) { var first; @@ -40270,18 +40995,23 @@ var ts; if (isEmptyAnonymousObjectType(type)) { if (!(includes & 8388608 /* IncludesEmptyObject */)) { includes |= 8388608 /* IncludesEmptyObject */; - typeSet.push(type); + typeSet.set(type.id.toString(), type); } } else { - includes |= flags & 1835007 /* IncludesMask */; if (flags & 3 /* AnyOrUnknown */) { if (type === wildcardType) includes |= 4194304 /* IncludesWildcard */; } - else if ((strictNullChecks || !(flags & 98304 /* Nullable */)) && !ts.contains(typeSet, type)) { - typeSet.push(type); + else if ((strictNullChecks || !(flags & 98304 /* Nullable */)) && !typeSet.has(type.id.toString())) { + if (type.flags & 109440 /* Unit */ && includes & 109440 /* Unit */) { + // We have seen two distinct unit types which means we should reduce to an + // empty intersection. Adding TypeFlags.NonPrimitive causes that to happen. + includes |= 67108864 /* NonPrimitive */; + } + typeSet.set(type.id.toString(), type); } + includes |= flags & 68943871 /* IncludesMask */; } return includes; } @@ -40327,12 +41057,21 @@ var ts; } return true; } + function extractIrreducible(types, flag) { + if (ts.every(types, function (t) { return !!(t.flags & 1048576 /* Union */) && ts.some(t.types, function (tt) { return !!(tt.flags & flag); }); })) { + for (var i = 0; i < types.length; i++) { + types[i] = filterType(types[i], function (t) { return !(t.flags & flag); }); + } + return true; + } + return false; + } // If the given list of types contains more than one union of primitive types, replace the // first with a union containing an intersection of those primitive types, then remove the // other unions and return true. Otherwise, do nothing and return false. function intersectUnionsOfPrimitiveTypes(types) { var unionTypes; - var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 65536 /* PrimitiveUnion */); }); + var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */); }); if (index < 0) { return false; } @@ -40341,7 +41080,7 @@ var ts; // the unionTypes array. while (i < types.length) { var t = types[i]; - if (ts.getObjectFlags(t) & 65536 /* PrimitiveUnion */) { + if (ts.getObjectFlags(t) & 131072 /* PrimitiveUnion */) { (unionTypes || (unionTypes = [types[index]])).push(t); ts.orderedRemoveItemAt(types, i); } @@ -40370,7 +41109,7 @@ var ts; } } // Finally replace the first union with the result - types[index] = getUnionTypeFromSortedList(result, 65536 /* PrimitiveUnion */); + types[index] = getUnionTypeFromSortedList(result, 131072 /* PrimitiveUnion */); return true; } function createIntersectionType(types, aliasSymbol, aliasTypeArguments) { @@ -40392,9 +41131,26 @@ var ts; // Also, unlike union types, the order of the constituent types is preserved in order that overload resolution // for intersections of types with signatures can be deterministic. function getIntersectionType(types, aliasSymbol, aliasTypeArguments) { - var typeSet = []; - var includes = addTypesToIntersection(typeSet, 0, types); - if (includes & 131072 /* Never */) { + var typeMembershipMap = ts.createMap(); + var includes = addTypesToIntersection(typeMembershipMap, 0, types); + var typeSet = ts.arrayFrom(typeMembershipMap.values()); + // An intersection type is considered empty if it contains + // the type never, or + // more than one unit type or, + // an object type and a nullable type (null or undefined), or + // a string-like type and a type known to be non-string-like, or + // a number-like type and a type known to be non-number-like, or + // a symbol-like type and a type known to be non-symbol-like, or + // a void-like type and a type known to be non-void-like, or + // a non-primitive type and a type known to be primitive. + if (includes & 131072 /* Never */ || + strictNullChecks && includes & 98304 /* Nullable */ && includes & (524288 /* Object */ | 67108864 /* NonPrimitive */ | 8388608 /* IncludesEmptyObject */) || + includes & 67108864 /* NonPrimitive */ && includes & (67238908 /* DisjointDomains */ & ~67108864 /* NonPrimitive */) || + includes & 132 /* StringLike */ && includes & (67238908 /* DisjointDomains */ & ~132 /* StringLike */) || + includes & 296 /* NumberLike */ && includes & (67238908 /* DisjointDomains */ & ~296 /* NumberLike */) || + includes & 2112 /* BigIntLike */ && includes & (67238908 /* DisjointDomains */ & ~2112 /* BigIntLike */) || + includes & 12288 /* ESSymbolLike */ && includes & (67238908 /* DisjointDomains */ & ~12288 /* ESSymbolLike */) || + includes & 49152 /* VoidLike */ && includes & (67238908 /* DisjointDomains */ & ~49152 /* VoidLike */)) { return neverType; } if (includes & 1 /* Any */) { @@ -40428,6 +41184,12 @@ var ts; // reduced we'll never reduce again, so this occurs at most once. result = getIntersectionType(typeSet, aliasSymbol, aliasTypeArguments); } + else if (extractIrreducible(typeSet, 32768 /* Undefined */)) { + result = getUnionType([getIntersectionType(typeSet), undefinedType], 1 /* Literal */, aliasSymbol, aliasTypeArguments); + } + else if (extractIrreducible(typeSet, 65536 /* Null */)) { + result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments); + } else { // We are attempting to construct a type of the form X & (A | B) & Y. Transform this into a type of // the form X & A & Y | X & B & Y and recursively reduce until no union type constituents remain. @@ -40545,6 +41307,7 @@ var ts; break; } } + // tslint:disable no-unnecessary-type-assertion return links.resolvedType; // TODO: GH#18217 } function createIndexedAccessType(objectType, indexType) { @@ -40580,9 +41343,9 @@ var ts; } return false; } - function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, suppressNoImplicitAnyError, accessNode, accessFlags) { + function getPropertyNameFromIndex(indexType, accessNode) { var accessExpression = accessNode && accessNode.kind === 191 /* ElementAccessExpression */ ? accessNode : undefined; - var propName = isTypeUsableAsPropertyName(indexType) ? + return isTypeUsableAsPropertyName(indexType) ? getPropertyNameFromType(indexType) : accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ? ts.getPropertyNameForKnownSymbolName(ts.idText(accessExpression.argumentExpression.name)) : @@ -40590,6 +41353,10 @@ var ts; // late bound names are handled in the first branch, so here we only need to handle normal names ts.getPropertyNameForPropertyNameNode(accessNode) : undefined; + } + function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, suppressNoImplicitAnyError, accessNode, accessFlags) { + var accessExpression = accessNode && accessNode.kind === 191 /* ElementAccessExpression */ ? accessNode : undefined; + var propName = getPropertyNameFromIndex(indexType, accessNode); if (propName !== undefined) { var prop = getPropertyOfType(objectType, propName); if (prop) { @@ -40609,7 +41376,7 @@ var ts; propType; } if (everyType(objectType, isTupleType) && isNumericLiteralName(propName) && +propName >= 0) { - if (accessNode && everyType(objectType, function (t) { return !t.target.hasRestElement; })) { + if (accessNode && everyType(objectType, function (t) { return !t.target.hasRestElement; }) && !(accessFlags & 8 /* NoTupleBoundsCheck */)) { var indexNode = getIndexNodeForAccessExpression(accessNode); if (isTupleType(objectType)) { error(indexNode, ts.Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), getTypeReferenceArity(objectType), ts.unescapeLeadingUnderscores(propName)); @@ -41068,7 +41835,7 @@ var ts; links.resolvedSymbol = unknownSymbol; return links.resolvedType = errorType; } - var targetMeaning = node.isTypeOf ? 67220415 /* Value */ : node.flags & 2097152 /* JSDoc */ ? 67220415 /* Value */ | 67897832 /* Type */ : 67897832 /* Type */; + var targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 2097152 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; // TODO: Future work: support unions/generics/whatever via a deferred import-type var innerModuleSymbol = resolveExternalModuleName(node, node.argument.literal); if (!innerModuleSymbol) { @@ -41098,7 +41865,7 @@ var ts; resolveImportSymbolType(node, links, moduleSymbol, targetMeaning); } else { - var errorMessage = targetMeaning === 67220415 /* Value */ + var errorMessage = targetMeaning === 111551 /* Value */ ? ts.Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : ts.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0; error(node, errorMessage, node.argument.literal.text); @@ -41112,7 +41879,7 @@ var ts; function resolveImportSymbolType(node, links, symbol, meaning) { var resolvedSymbol = resolveSymbol(symbol); links.resolvedSymbol = resolvedSymbol; - if (meaning === 67220415 /* Value */) { + if (meaning === 111551 /* Value */) { return links.resolvedType = getTypeOfSymbol(symbol); // intentionally doesn't use resolved symbol so type is cached as expected on the alias } else { @@ -41238,7 +42005,7 @@ var ts; } } var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoWithReadonly(stringIndexInfo, readonly), getIndexInfoWithReadonly(numberIndexInfo, readonly)); - spread.objectFlags |= 128 /* ObjectLiteral */ | 262144 /* ContainsObjectLiteral */ | 1024 /* ContainsSpread */ | objectFlags; + spread.objectFlags |= 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */ | 1024 /* ContainsSpread */ | objectFlags; return spread; } /** We approximate own properties as non-methods plus methods that are inside the object literal */ @@ -41410,9 +42177,9 @@ var ts; case 166 /* FunctionType */: case 167 /* ConstructorType */: case 169 /* TypeLiteral */: - case 298 /* JSDocTypeLiteral */: + case 299 /* JSDocTypeLiteral */: case 295 /* JSDocFunctionType */: - case 299 /* JSDocSignature */: + case 300 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); case 180 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); @@ -41639,7 +42406,8 @@ var ts; } function maybeTypeParameterReference(node) { return !(node.kind === 149 /* QualifiedName */ || - node.parent.kind === 165 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName); + node.parent.kind === 165 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || + node.parent.kind === 184 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { // If the type parameter doesn't have exactly one declaration, if there are invening statement blocks @@ -41787,13 +42555,14 @@ var ts; if (!type || !mapper || mapper === identityMapper) { return type; } - if (instantiationDepth === 50) { + if (instantiationDepth === 50 || instantiationCount >= 5000000) { // We have reached 50 recursive type instantiations and there is a very high likelyhood we're dealing // with a combination of infinite generic types that perpetually generate new type identities. We stop // the recursion here by yielding the error type. error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } + instantiationCount++; instantiationDepth++; var result = instantiateTypeWorker(type, mapper); instantiationDepth--; @@ -41888,6 +42657,7 @@ var ts; case 197 /* FunctionExpression */: case 198 /* ArrowFunction */: case 157 /* MethodDeclaration */: + case 240 /* FunctionDeclaration */: // Function declarations can have context when annotated with a jsdoc @type return isContextSensitiveFunctionLikeDeclaration(node); case 189 /* ObjectLiteralExpression */: return ts.some(node.properties, isContextSensitive); @@ -41919,6 +42689,9 @@ var ts; return false; } function isContextSensitiveFunctionLikeDeclaration(node) { + if (ts.isFunctionDeclaration(node) && (!ts.isInJSFile(node) || !getTypeForDeclarationFromJSDocComment(node))) { + return false; + } // Functions with type parameters are not context sensitive. if (node.typeParameters) { return false; @@ -42021,48 +42794,49 @@ var ts; * attempt to issue more specific errors on, for example, specific object literal properties or tuple members. */ function checkTypeAssignableToAndOptionallyElaborate(source, target, errorNode, expr, headMessage, containingMessageChain) { - return checkTypeRelatedToAndOptionallyElaborate(source, target, assignableRelation, errorNode, expr, headMessage, containingMessageChain); + return checkTypeRelatedToAndOptionallyElaborate(source, target, assignableRelation, errorNode, expr, headMessage, containingMessageChain, /*errorOutputContainer*/ undefined); } - function checkTypeRelatedToAndOptionallyElaborate(source, target, relation, errorNode, expr, headMessage, containingMessageChain) { + function checkTypeRelatedToAndOptionallyElaborate(source, target, relation, errorNode, expr, headMessage, containingMessageChain, errorOutputContainer) { if (isTypeRelatedTo(source, target, relation)) return true; - if (!errorNode || !elaborateError(expr, source, target, relation, headMessage)) { - return checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain); + if (!errorNode || !elaborateError(expr, source, target, relation, headMessage, containingMessageChain, errorOutputContainer)) { + return checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer); } return false; } function isOrHasGenericConditional(type) { return !!(type.flags & 16777216 /* Conditional */ || (type.flags & 2097152 /* Intersection */ && ts.some(type.types, isOrHasGenericConditional))); } - function elaborateError(node, source, target, relation, headMessage) { + function elaborateError(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer) { if (!node || isOrHasGenericConditional(target)) return false; - if (!checkTypeRelatedTo(source, target, relation, /*errorNode*/ undefined) && elaborateDidYouMeanToCallOrConstruct(node, source, target, relation, headMessage)) { + if (!checkTypeRelatedTo(source, target, relation, /*errorNode*/ undefined) + && elaborateDidYouMeanToCallOrConstruct(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer)) { return true; } switch (node.kind) { case 271 /* JsxExpression */: case 196 /* ParenthesizedExpression */: - return elaborateError(node.expression, source, target, relation, headMessage); + return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); case 205 /* BinaryExpression */: switch (node.operatorToken.kind) { case 60 /* EqualsToken */: case 27 /* CommaToken */: - return elaborateError(node.right, source, target, relation, headMessage); + return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; case 189 /* ObjectLiteralExpression */: - return elaborateObjectLiteral(node, source, target, relation); + return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); case 188 /* ArrayLiteralExpression */: - return elaborateArrayLiteral(node, source, target, relation); + return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); case 269 /* JsxAttributes */: - return elaborateJsxComponents(node, source, target, relation); + return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); case 198 /* ArrowFunction */: - return elaborateArrowFunction(node, source, target, relation); + return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; } - function elaborateDidYouMeanToCallOrConstruct(node, source, target, relation, headMessage) { + function elaborateDidYouMeanToCallOrConstruct(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer) { var callSignatures = getSignaturesOfType(source, 0 /* Call */); var constructSignatures = getSignaturesOfType(source, 1 /* Construct */); for (var _i = 0, _a = [constructSignatures, callSignatures]; _i < _a.length; _i++) { @@ -42071,16 +42845,16 @@ var ts; var returnType = getReturnTypeOfSignature(s); return !(returnType.flags & (1 /* Any */ | 131072 /* Never */)) && checkTypeRelatedTo(returnType, target, relation, /*errorNode*/ undefined); })) { - var resultObj = {}; - checkTypeAssignableTo(source, target, node, headMessage, /*containingChain*/ undefined, resultObj); - var diagnostic = resultObj.error; + var resultObj = errorOutputContainer || {}; + checkTypeAssignableTo(source, target, node, headMessage, containingMessageChain, resultObj); + var diagnostic = resultObj.errors[resultObj.errors.length - 1]; ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(node, signatures === constructSignatures ? ts.Diagnostics.Did_you_mean_to_use_new_with_this_expression : ts.Diagnostics.Did_you_mean_to_call_this_expression)); return true; } } return false; } - function elaborateArrowFunction(node, source, target, relation) { + function elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer) { // Don't elaborate blocks if (ts.isBlock(node.body)) { return false; @@ -42101,15 +42875,15 @@ var ts; var sourceReturn = getReturnTypeOfSignature(sourceSig); var targetReturn = getUnionType(ts.map(targetSignatures, getReturnTypeOfSignature)); if (!checkTypeRelatedTo(sourceReturn, targetReturn, relation, /*errorNode*/ undefined)) { - var elaborated = returnExpression && elaborateError(returnExpression, sourceReturn, targetReturn, relation, /*headMessage*/ undefined); + var elaborated = returnExpression && elaborateError(returnExpression, sourceReturn, targetReturn, relation, /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); if (elaborated) { return elaborated; } - var resultObj = {}; - checkTypeRelatedTo(sourceReturn, targetReturn, relation, returnExpression, /*message*/ undefined, /*chain*/ undefined, resultObj); - if (resultObj.error) { + var resultObj = errorOutputContainer || {}; + checkTypeRelatedTo(sourceReturn, targetReturn, relation, returnExpression, /*message*/ undefined, containingMessageChain, resultObj); + if (resultObj.errors) { if (target.symbol && ts.length(target.symbol.declarations)) { - ts.addRelatedInfo(resultObj.error, ts.createDiagnosticForNode(target.symbol.declarations[0], ts.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)); + ts.addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], ts.createDiagnosticForNode(target.symbol.declarations[0], ts.Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature)); } return true; } @@ -42121,7 +42895,7 @@ var ts; * If that element would issue an error, we first attempt to dive into that element's inner expression and issue a more specific error by recuring into `elaborateError` * Otherwise, we issue an error on _every_ element which fail the assignability check */ - function elaborateElementwise(iterator, source, target, relation) { + function elaborateElementwise(iterator, source, target, relation, containingMessageChain, errorOutputContainer) { // Assignability failure - check each prop individually, and if that fails, fall back on the bad error span var reportedError = false; for (var status = iterator.next(); !status.done; status = iterator.next()) { @@ -42131,22 +42905,22 @@ var ts; continue; // Don't elaborate on indexes on generic variables var sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType); if (sourcePropType && !checkTypeRelatedTo(sourcePropType, targetPropType, relation, /*errorNode*/ undefined)) { - var elaborated = next && elaborateError(next, sourcePropType, targetPropType, relation, /*headMessage*/ undefined); + var elaborated = next && elaborateError(next, sourcePropType, targetPropType, relation, /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); if (elaborated) { reportedError = true; } else { // Issue error on the prop itself, since the prop couldn't elaborate the error - var resultObj = {}; + var resultObj = errorOutputContainer || {}; // Use the expression type, if available var specificSource = next ? checkExpressionForMutableLocation(next, 0 /* Normal */, sourcePropType) : sourcePropType; - var result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, /*containingChain*/ undefined, resultObj); + var result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj); if (result && specificSource !== sourcePropType) { // If for whatever reason the expression type doesn't yield an error, make sure we still issue an error on the sourcePropType - checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, /*containingChain*/ undefined, resultObj); + checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj); } - if (resultObj.error) { - var reportedDiag = resultObj.error; + if (resultObj.errors) { + var reportedDiag = resultObj.errors[resultObj.errors.length - 1]; var propertyName = isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : undefined; var targetProp = propertyName !== undefined ? getPropertyOfType(target, propertyName) : undefined; var issuedElaboration = false; @@ -42250,8 +43024,8 @@ var ts; function getSemanticJsxChildren(children) { return ts.filter(children, function (i) { return !ts.isJsxText(i) || !i.containsOnlyTriviaWhiteSpaces; }); } - function elaborateJsxComponents(node, source, target, relation) { - var result = elaborateElementwise(generateJsxAttributes(node), source, target, relation); + function elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer) { + var result = elaborateElementwise(generateJsxAttributes(node), source, target, relation, containingMessageChain, errorOutputContainer); var invalidTextDiagnostic; if (ts.isJsxOpeningElement(node.parent) && ts.isJsxElement(node.parent.parent)) { var containingElement = node.parent.parent; @@ -42269,12 +43043,16 @@ var ts; if (moreThanOneRealChildren) { if (arrayLikeTargetParts !== neverType) { var realSource = createTupleType(checkJsxChildren(containingElement, 0 /* Normal */)); - result = elaborateElementwise(generateJsxChildren(containingElement, getInvalidTextualChildDiagnostic), realSource, arrayLikeTargetParts, relation) || result; + var children = generateJsxChildren(containingElement, getInvalidTextualChildDiagnostic); + result = elaborateElementwise(children, realSource, arrayLikeTargetParts, relation, containingMessageChain, errorOutputContainer) || result; } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { // arity mismatch result = true; - error(containingElement.openingElement.tagName, ts.Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, childrenPropName, typeToString(childrenTargetType)); + var diag = error(containingElement.openingElement.tagName, ts.Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, childrenPropName, typeToString(childrenTargetType)); + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } } } else { @@ -42289,13 +43067,16 @@ var ts; _a.sent(); return [2 /*return*/]; } - }); })(), source, target, relation) || result; + }); })(), source, target, relation, containingMessageChain, errorOutputContainer) || result; } } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { // arity mismatch result = true; - error(containingElement.openingElement.tagName, ts.Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, childrenPropName, typeToString(childrenTargetType)); + var diag = error(containingElement.openingElement.tagName, ts.Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, childrenPropName, typeToString(childrenTargetType)); + if (errorOutputContainer && errorOutputContainer.skipLogging) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } } } } @@ -42307,7 +43088,7 @@ var ts; var childrenPropName = childPropName === undefined ? "children" : ts.unescapeLeadingUnderscores(childPropName); var childrenTargetType = getIndexedAccessType(target, getLiteralType(childrenPropName)); var diagnostic = ts.Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2; - invalidTextDiagnostic = __assign({}, diagnostic, { key: "!!ALREADY FORMATTED!!", message: ts.formatMessage(/*_dummy*/ undefined, diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) }); + invalidTextDiagnostic = __assign(__assign({}, diagnostic), { key: "!!ALREADY FORMATTED!!", message: ts.formatMessage(/*_dummy*/ undefined, diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) }); } return invalidTextDiagnostic; } @@ -42342,16 +43123,16 @@ var ts; } }); } - function elaborateArrayLiteral(node, source, target, relation) { + function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { if (target.flags & 131068 /* Primitive */) return false; if (isTupleLikeType(source)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation); + return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); } // recreate a tuple from the elements, if possible var tupleizedType = checkArrayLiteral(node, 1 /* Contextual */, /*forceTuple*/ true); if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation); + return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); } return false; } @@ -42400,10 +43181,10 @@ var ts; } }); } - function elaborateObjectLiteral(node, source, target, relation) { + function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { if (target.flags & 131068 /* Primitive */) return false; - return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation); + return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer); } /** * This is *not* a bi-directional relationship. @@ -42711,6 +43492,7 @@ var ts; * @param errorNode The suggested node upon which all errors will be reported, if defined. This may or may not be the actual node used. * @param headMessage If the error chain should be prepended by a head message, then headMessage will be used. * @param containingMessageChain A chain of errors to prepend any new errors found. + * @param errorOutputContainer Return the diagnostic. Do not log if 'skipLogging' is truthy. */ function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) { var errorInfo; @@ -42726,13 +43508,17 @@ var ts; ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); var result = isRelatedTo(source, target, /*reportErrors*/ !!errorNode, headMessage); if (overflow) { - error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); + var diag = error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); + if (errorOutputContainer) { + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); + } } else if (errorInfo) { if (containingMessageChain) { var chain = containingMessageChain(); if (chain) { - errorInfo = ts.concatenateDiagnosticMessageChains(chain, errorInfo); + ts.concatenateDiagnosticMessageChains(chain, errorInfo); + errorInfo = chain; } } var relatedInformation = void 0; @@ -42750,12 +43536,17 @@ var ts; } var diag = ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo, relatedInformation); if (relatedInfo) { - ts.addRelatedInfo.apply(void 0, [diag].concat(relatedInfo)); + ts.addRelatedInfo.apply(void 0, __spreadArrays([diag], relatedInfo)); } if (errorOutputContainer) { - errorOutputContainer.error = diag; + (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); } - diagnostics.add(diag); // TODO: GH#18217 + if (!errorOutputContainer || !errorOutputContainer.skipLogging) { + diagnostics.add(diag); + } + } + if (errorNode && errorOutputContainer && errorOutputContainer.skipLogging && result === 0 /* False */) { + ts.Debug.assert(!!errorOutputContainer.errors, "missed opportunity to interact with error."); } return result !== 0 /* False */; function reportError(message, arg0, arg1, arg2, arg3) { @@ -42884,7 +43675,7 @@ var ts; isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return -1 /* True */; var isComparingJsxAttributes = !!(ts.getObjectFlags(source) & 4096 /* JsxAttributes */); - var isPerformingExcessPropertyChecks = (isObjectLiteralType(source) && ts.getObjectFlags(source) & 32768 /* FreshLiteral */); + var isPerformingExcessPropertyChecks = !isApparentIntersectionConstituent && (isObjectLiteralType(source) && ts.getObjectFlags(source) & 32768 /* FreshLiteral */); if (isPerformingExcessPropertyChecks) { var discriminantType = target.flags & 1048576 /* Union */ ? findMatchingDiscriminantType(source, target) : undefined; if (hasExcessProperties(source, target, discriminantType, reportErrors)) { @@ -42894,11 +43685,11 @@ var ts; return 0 /* False */; } } - if (relation !== comparableRelation && !isApparentIntersectionConstituent && + var isPerformingCommonPropertyChecks = relation !== comparableRelation && !isApparentIntersectionConstituent && source.flags & (131068 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source !== globalObjectType && target.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target) && - (getPropertiesOfType(source).length > 0 || typeHasCallOrConstructSignatures(source)) && - !hasCommonProperties(source, target, isComparingJsxAttributes)) { + (getPropertiesOfType(source).length > 0 || typeHasCallOrConstructSignatures(source)); + if (isPerformingCommonPropertyChecks && !hasCommonProperties(source, target, isComparingJsxAttributes)) { if (reportErrors) { var calls = getSignaturesOfType(source, 0 /* Call */); var constructs = getSignaturesOfType(source, 1 /* Construct */); @@ -42920,16 +43711,16 @@ var ts; // and we need to handle "each" relations before "some" relations for the same kind of type. if (source.flags & 1048576 /* Union */) { result = relation === comparableRelation ? - someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)) : + someTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */), isIntersectionConstituent) : eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 131068 /* Primitive */)); } else { if (target.flags & 1048576 /* Union */) { result = typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source), target, reportErrors && !(source.flags & 131068 /* Primitive */) && !(target.flags & 131068 /* Primitive */)); - if (result && isPerformingExcessPropertyChecks) { + if (result && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks)) { // Validate against excess props using the original `source` - var discriminantType = target.flags & 1048576 /* Union */ ? findMatchingDiscriminantType(source, target) : undefined; - if (!propertiesRelatedTo(source, discriminantType || target, reportErrors, /*excludedProperties*/ undefined)) { + var discriminantType = findMatchingDiscriminantType(source, target) || filterPrimitivesIfContainsNonPrimitive(target); + if (!propertiesRelatedTo(source, discriminantType, reportErrors, /*excludedProperties*/ undefined, isIntersectionConstituent)) { return 0 /* False */; } } @@ -42937,9 +43728,9 @@ var ts; else if (target.flags & 2097152 /* Intersection */) { isIntersectionConstituent = true; // set here to affect the following trio of checks result = typeRelatedToEachType(getRegularTypeOfObjectLiteral(source), target, reportErrors); - if (result && isPerformingExcessPropertyChecks) { + if (result && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks)) { // Validate against excess props using the original `source` - if (!propertiesRelatedTo(source, target, reportErrors, /*excludedProperties*/ undefined)) { + if (!propertiesRelatedTo(source, target, reportErrors, /*excludedProperties*/ undefined, /*isIntersectionConstituent*/ false)) { return 0 /* False */; } } @@ -42958,7 +43749,7 @@ var ts; // // - For a primitive type or type parameter (such as 'number = A & B') there is no point in // breaking the intersection apart. - result = someTypeRelatedToType(source, target, /*reportErrors*/ false); + result = someTypeRelatedToType(source, target, /*reportErrors*/ false, /*isIntersectionConstituent*/ true); } if (!result && (source.flags & 66846720 /* StructuredOrInstantiable */ || target.flags & 66846720 /* StructuredOrInstantiable */)) { if (result = recursiveTypeRelatedTo(source, target, reportErrors, isIntersectionConstituent)) { @@ -43046,7 +43837,7 @@ var ts; // check excess properties against discriminant type only, not the entire union return hasExcessProperties(source, discriminant, /*discriminant*/ undefined, reportErrors); } - var _loop_7 = function (prop) { + var _loop_8 = function (prop) { if (shouldCheckAsExcessProperty(prop, source.symbol) && !isKnownProperty(target, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { // Report error in terms of object types in the target as those are the only ones @@ -43089,7 +43880,7 @@ var ts; }; for (var _i = 0, _a = getPropertiesOfType(source); _i < _a.length; _i++) { var prop = _a[_i]; - var state_3 = _loop_7(prop); + var state_3 = _loop_8(prop); if (typeof state_3 === "object") return state_3.value; } @@ -43192,6 +43983,15 @@ var ts; } return bestMatch; } + function filterPrimitivesIfContainsNonPrimitive(type) { + if (maybeTypeOfKind(type, 67108864 /* NonPrimitive */)) { + var result_3 = filterType(type, function (t) { return !(t.flags & 131068 /* Primitive */); }); + if (!(result_3.flags & 131072 /* Never */)) { + return result_3; + } + } + return type; + } // Keep this up-to-date with the same logic within `getApparentTypeOfContextualType`, since they should behave similarly function findMatchingDiscriminantType(source, target) { if (target.flags & 1048576 /* Union */ && source.flags & (2097152 /* Intersection */ | 524288 /* Object */)) { @@ -43218,14 +44018,14 @@ var ts; } return result; } - function someTypeRelatedToType(source, target, reportErrors) { + function someTypeRelatedToType(source, target, reportErrors, isIntersectionConstituent) { var sourceTypes = source.types; if (source.flags & 1048576 /* Union */ && containsType(sourceTypes, target)) { return -1 /* True */; } var len = sourceTypes.length; for (var i = 0; i < len; i++) { - var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); + var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1, /*headMessage*/ undefined, isIntersectionConstituent); if (related) { return related; } @@ -43245,7 +44045,7 @@ var ts; } return result; } - function typeArgumentsRelatedTo(sources, targets, variances, reportErrors) { + function typeArgumentsRelatedTo(sources, targets, variances, reportErrors, isIntersectionConstituent) { if (sources === void 0) { sources = ts.emptyArray; } if (targets === void 0) { targets = ts.emptyArray; } if (variances === void 0) { variances = ts.emptyArray; } @@ -43272,10 +44072,10 @@ var ts; related = relation === identityRelation ? isRelatedTo(s, t, /*reportErrors*/ false) : compareTypesIdentical(s, t); } else if (variance === 1 /* Covariant */) { - related = isRelatedTo(s, t, reportErrors); + related = isRelatedTo(s, t, reportErrors, /*headMessage*/ undefined, isIntersectionConstituent); } else if (variance === 2 /* Contravariant */) { - related = isRelatedTo(t, s, reportErrors); + related = isRelatedTo(t, s, reportErrors, /*headMessage*/ undefined, isIntersectionConstituent); } else if (variance === 3 /* Bivariant */) { // In the bivariant case we first compare contravariantly without reporting @@ -43284,16 +44084,16 @@ var ts; // which is generally easier to reason about. related = isRelatedTo(t, s, /*reportErrors*/ false); if (!related) { - related = isRelatedTo(s, t, reportErrors); + related = isRelatedTo(s, t, reportErrors, /*headMessage*/ undefined, isIntersectionConstituent); } } else { // In the invariant case we first compare covariantly, and only when that // succeeds do we proceed to compare contravariantly. Thus, error elaboration // will typically be based on the covariant check. - related = isRelatedTo(s, t, reportErrors); + related = isRelatedTo(s, t, reportErrors, /*headMessage*/ undefined, isIntersectionConstituent); if (related) { - related &= isRelatedTo(t, s, reportErrors); + related &= isRelatedTo(t, s, reportErrors, /*headMessage*/ undefined, isIntersectionConstituent); } } if (!related) { @@ -43399,21 +44199,21 @@ var ts; if (flags & 4194304 /* Index */) { return isRelatedTo(source.type, target.type, /*reportErrors*/ false); } - var result_3 = 0 /* False */; + var result_4 = 0 /* False */; if (flags & 8388608 /* IndexedAccess */) { - if (result_3 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.objectType, target.objectType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.indexType, target.indexType, /*reportErrors*/ false)) { + return result_4; } } } if (flags & 16777216 /* Conditional */) { if (source.root.isDistributive === target.root.isDistributive) { - if (result_3 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { - if (result_3 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { - return result_3; + if (result_4 = isRelatedTo(source.checkType, target.checkType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(source.extendsType, target.extendsType, /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), /*reportErrors*/ false)) { + if (result_4 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), /*reportErrors*/ false)) { + return result_4; } } } @@ -43436,7 +44236,7 @@ var ts; source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol && !(source.aliasTypeArgumentsContainsMarker || target.aliasTypeArgumentsContainsMarker)) { var variances = getAliasVariances(source.aliasSymbol); - var varianceResult = relateVariances(source.aliasTypeArguments, target.aliasTypeArguments, variances); + var varianceResult = relateVariances(source.aliasTypeArguments, target.aliasTypeArguments, variances, isIntersectionConstituent); if (varianceResult !== undefined) { return varianceResult; } @@ -43501,15 +44301,16 @@ var ts; } if (!isGenericMappedType(source)) { var targetConstraint = getConstraintTypeFromMappedType(target); - var sourceKeys_1 = getIndexType(source, /*stringsOnly*/ undefined, /*noIndexSignatures*/ true); - var hasOptionalUnionKeys = modifiers & 4 /* IncludeOptional */ && targetConstraint.flags & 1048576 /* Union */; - var filteredByApplicability = hasOptionalUnionKeys ? filterType(targetConstraint, function (t) { return !!isRelatedTo(t, sourceKeys_1); }) : undefined; + var sourceKeys = getIndexType(source, /*stringsOnly*/ undefined, /*noIndexSignatures*/ true); + var includeOptional = modifiers & 4 /* IncludeOptional */; + var filteredByApplicability = includeOptional ? intersectTypes(targetConstraint, sourceKeys) : undefined; // A source type T is related to a target type { [P in Q]: X } if Q is related to keyof T and T[Q] is related to X. // A source type T is related to a target type { [P in Q]?: X } if some constituent Q' of Q is related to keyof T and T[Q'] is related to X. - if (hasOptionalUnionKeys + if (includeOptional ? !(filteredByApplicability.flags & 131072 /* Never */) - : isRelatedTo(targetConstraint, sourceKeys_1)) { - var indexingType = hasOptionalUnionKeys ? filteredByApplicability : getTypeParameterFromMappedType(target); + : isRelatedTo(targetConstraint, sourceKeys)) { + var typeParameter = getTypeParameterFromMappedType(target); + var indexingType = filteredByApplicability ? getIntersectionType([filteredByApplicability, typeParameter]) : typeParameter; var indexedAccessType = getIndexedAccessType(source, indexingType); var templateType = getTemplateTypeFromMappedType(target); if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) { @@ -43610,19 +44411,29 @@ var ts; if (relation !== identityRelation) { source = getApparentType(source); } + else if (isGenericMappedType(source)) { + return 0 /* False */; + } if (ts.getObjectFlags(source) & 4 /* Reference */ && ts.getObjectFlags(target) & 4 /* Reference */ && source.target === target.target && !(ts.getObjectFlags(source) & 8192 /* MarkerType */ || ts.getObjectFlags(target) & 8192 /* MarkerType */)) { // We have type references to the same generic type, and the type references are not marker // type references (which are intended by be compared structurally). Obtain the variance // information for the type parameters and relate the type arguments accordingly. var variances = getVariances(source.target); - var varianceResult = relateVariances(source.typeArguments, target.typeArguments, variances); + var varianceResult = relateVariances(source.typeArguments, target.typeArguments, variances, isIntersectionConstituent); if (varianceResult !== undefined) { return varianceResult; } } else if (isReadonlyArrayType(target) ? isArrayType(source) || isTupleType(source) : isArrayType(target) && isTupleType(source) && !source.target.readonly) { - return isRelatedTo(getIndexTypeOfType(source, 1 /* Number */) || anyType, getIndexTypeOfType(target, 1 /* Number */) || anyType, reportErrors); + if (relation !== identityRelation) { + return isRelatedTo(getIndexTypeOfType(source, 1 /* Number */) || anyType, getIndexTypeOfType(target, 1 /* Number */) || anyType, reportErrors); + } + else { + // By flags alone, we know that the `target` is a readonly array while the source is a normal array or tuple + // or `target` is an array and source is a tuple - in both cases the types cannot be identical, by construction + return 0 /* False */; + } } // Consider a fresh empty object literal type "closed" under the subtype relationship - this way `{} <- {[idx: string]: any} <- fresh({})` // and not `{} <- fresh({}) <- {[idx: string]: any}` @@ -43637,7 +44448,7 @@ var ts; if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */) && target.flags & 524288 /* Object */) { // Report structural errors only if we haven't reported any errors yet var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !sourceIsPrimitive; - result = propertiesRelatedTo(source, target, reportStructuralErrors, /*excludedProperties*/ undefined); + result = propertiesRelatedTo(source, target, reportStructuralErrors, /*excludedProperties*/ undefined, isIntersectionConstituent); if (result) { result &= signaturesRelatedTo(source, target, 0 /* Call */, reportStructuralErrors); if (result) { @@ -43664,16 +44475,16 @@ var ts; if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */) && target.flags & 1048576 /* Union */) { var objectOnlyTarget = extractTypesOfKind(target, 524288 /* Object */); if (objectOnlyTarget.flags & 1048576 /* Union */) { - var result_4 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); - if (result_4) { - return result_4; + var result_5 = typeRelatedToDiscriminatedType(source, objectOnlyTarget); + if (result_5) { + return result_5; } } } } return 0 /* False */; - function relateVariances(sourceTypeArguments, targetTypeArguments, variances) { - if (result = typeArgumentsRelatedTo(sourceTypeArguments, targetTypeArguments, variances, reportErrors)) { + function relateVariances(sourceTypeArguments, targetTypeArguments, variances, isIntersectionConstituent) { + if (result = typeArgumentsRelatedTo(sourceTypeArguments, targetTypeArguments, variances, reportErrors, isIntersectionConstituent)) { return result; } if (ts.some(variances, function (v) { return !!(v & 24 /* AllowsStructuralFallback */); })) { @@ -43733,12 +44544,12 @@ var ts; var modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source) === getMappedTypeModifiers(target) : getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target)); if (modifiersRelated) { - var result_5; + var result_6; var targetConstraint = getConstraintTypeFromMappedType(target); var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers); - if (result_5 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { + if (result_6 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); - return result_5 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + return result_6 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); } } return 0 /* False */; @@ -43786,11 +44597,11 @@ var ts; // constituents of 'target'. If any combination does not have a match then 'source' is not relatable. var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes); var matchingTypes = []; - var _loop_8 = function (combination) { + var _loop_9 = function (combination) { var hasMatch = false; outer: for (var _i = 0, _a = target.types; _i < _a.length; _i++) { var type = _a[_i]; - var _loop_9 = function (i) { + var _loop_10 = function (i) { var sourceProperty = sourcePropertiesFiltered[i]; var targetProperty = getPropertyOfObjectType(type, sourceProperty.escapedName); if (!targetProperty) @@ -43798,7 +44609,7 @@ var ts; if (sourceProperty === targetProperty) return "continue"; // We compare the source property to the target in the context of a single discriminant type. - var related = propertyRelatedTo(source, target, sourceProperty, targetProperty, function (_) { return combination[i]; }, /*reportErrors*/ false); + var related = propertyRelatedTo(source, target, sourceProperty, targetProperty, function (_) { return combination[i]; }, /*reportErrors*/ false, /*isIntersectionConstituent*/ false); // If the target property could not be found, or if the properties were not related, // then this constituent is not a match. if (!related) { @@ -43806,7 +44617,7 @@ var ts; } }; for (var i = 0; i < sourcePropertiesFiltered.length; i++) { - var state_5 = _loop_9(i); + var state_5 = _loop_10(i); switch (state_5) { case "continue-outer": continue outer; } @@ -43820,7 +44631,7 @@ var ts; }; for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) { var combination = discriminantCombinations_1[_a]; - var state_4 = _loop_8(combination); + var state_4 = _loop_9(combination); if (typeof state_4 === "object") return state_4.value; } @@ -43828,7 +44639,7 @@ var ts; var result = -1 /* True */; for (var _b = 0, matchingTypes_1 = matchingTypes; _b < matchingTypes_1.length; _b++) { var type = matchingTypes_1[_b]; - result &= propertiesRelatedTo(source, type, /*reportErrors*/ false, excludedProperties); + result &= propertiesRelatedTo(source, type, /*reportErrors*/ false, excludedProperties, /*isIntersectionConstituent*/ false); if (result) { result &= signaturesRelatedTo(source, type, 0 /* Call */, /*reportStructuralErrors*/ false); if (result) { @@ -43863,7 +44674,7 @@ var ts; } return result || properties; } - function isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors) { + function isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, isIntersectionConstituent) { var targetIsOptional = strictNullChecks && !!(ts.getCheckFlags(targetProp) & 48 /* Partial */); var source = getTypeOfSourceProperty(sourceProp); if (ts.getCheckFlags(targetProp) & 65536 /* DeferredType */ && !getSymbolLinks(targetProp).type) { @@ -43872,7 +44683,7 @@ var ts; ts.Debug.assertDefined(links.deferralParent); ts.Debug.assertDefined(links.deferralConstituents); var unionParent = !!(links.deferralParent.flags & 1048576 /* Union */); - var result_6 = unionParent ? 0 /* False */ : -1 /* True */; + var result_7 = unionParent ? 0 /* False */ : -1 /* True */; var targetTypes = links.deferralConstituents; for (var _i = 0, targetTypes_3 = targetTypes; _i < targetTypes_3.length; _i++) { var targetType = targetTypes_3[_i]; @@ -43882,7 +44693,7 @@ var ts; // Can't assign to a target individually - have to fallback to assigning to the _whole_ intersection (which forces normalization) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - result_6 &= related; + result_7 &= related; } else { if (related) { @@ -43890,23 +44701,23 @@ var ts; } } } - if (unionParent && !result_6 && targetIsOptional) { - result_6 = isRelatedTo(source, undefinedType); + if (unionParent && !result_7 && targetIsOptional) { + result_7 = isRelatedTo(source, undefinedType); } - if (unionParent && !result_6 && reportErrors) { + if (unionParent && !result_7 && reportErrors) { // The easiest way to get the right errors here is to un-defer (which may be costly) // If it turns out this is too costly too often, we can replicate the error handling logic within // typeRelatedToSomeType without the discriminatable type branch (as that requires a manifest union // type on which to hand discriminable properties, which we are expressly trying to avoid here) return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); } - return result_6; + return result_7; } else { - return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors); + return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors, /*headMessage*/ undefined, isIntersectionConstituent); } } - function propertyRelatedTo(source, target, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors) { + function propertyRelatedTo(source, target, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, isIntersectionConstituent) { var sourcePropFlags = ts.getDeclarationModifierFlagsFromSymbol(sourceProp); var targetPropFlags = ts.getDeclarationModifierFlagsFromSymbol(targetProp); if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) { @@ -43944,7 +44755,7 @@ var ts; return 0 /* False */; } // If the target comes from a partial union prop, allow `undefined` in the target type - var related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors); + var related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, isIntersectionConstituent); if (!related) { if (reportErrors) { reportError(ts.Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp)); @@ -43967,7 +44778,7 @@ var ts; } return related; } - function propertiesRelatedTo(source, target, reportErrors, excludedProperties) { + function propertiesRelatedTo(source, target, reportErrors, excludedProperties, isIntersectionConstituent) { if (relation === identityRelation) { return propertiesIdenticalTo(source, target, excludedProperties); } @@ -43983,7 +44794,7 @@ var ts; } if (props.length === 1) { var propName = symbolToString(unmatchedProperty); - reportError.apply(void 0, [ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName].concat(getTypeNamesForErrorDisplay(source, target))); + reportError.apply(void 0, __spreadArrays([ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName], getTypeNamesForErrorDisplay(source, target))); if (ts.length(unmatchedProperty.declarations)) { associateRelatedInfo(ts.createDiagnosticForNode(unmatchedProperty.declarations[0], ts.Diagnostics._0_is_declared_here, propName)); } @@ -44056,7 +44867,7 @@ var ts; if (!(targetProp.flags & 4194304 /* Prototype */)) { var sourceProp = getPropertyOfType(source, targetProp.escapedName); if (sourceProp && sourceProp !== targetProp) { - var related = propertyRelatedTo(source, target, sourceProp, targetProp, getTypeOfSymbol, reportErrors); + var related = propertyRelatedTo(source, target, sourceProp, targetProp, getTypeOfSymbol, reportErrors, isIntersectionConstituent); if (!related) { return 0 /* False */; } @@ -44291,23 +45102,27 @@ var ts; } } function discriminateTypeByDiscriminableItems(target, discriminators, related, defaultValue) { - var match; + // undefined=unknown, true=discriminated, false=not discriminated + // The state of each type progresses from left to right. Discriminated types stop at 'true'. + var discriminable = target.types.map(function (_) { return undefined; }); for (var _i = 0, discriminators_1 = discriminators; _i < discriminators_1.length; _i++) { var _a = discriminators_1[_i], getDiscriminatingType = _a[0], propertyName = _a[1]; + var i = 0; for (var _b = 0, _c = target.types; _b < _c.length; _b++) { var type = _c[_b]; var targetType = getTypeOfPropertyOfType(type, propertyName); if (targetType && related(getDiscriminatingType(), targetType)) { - if (match) { - if (type === match) - continue; // Finding multiple fields which discriminate to the same type is fine - return defaultValue; - } - match = type; + discriminable[i] = discriminable[i] === undefined ? true : discriminable[i]; } + else { + discriminable[i] = false; + } + i++; } } - return match || defaultValue; + var match = discriminable.indexOf(/*searchElement*/ true); + // make sure exactly 1 matches before returning it + return match === -1 || discriminable.indexOf(/*searchElement*/ true, match + 1) !== -1 ? defaultValue : target.types[match]; } /** * A type is 'weak' if it is an object type with at least one optional property @@ -44363,7 +45178,7 @@ var ts; // The emptyArray singleton is used to signal a recursive invocation. cache.variances = ts.emptyArray; variances = []; - var _loop_10 = function (tp) { + var _loop_11 = function (tp) { var unmeasurable = false; var unreliable = false; var oldHandler = outofbandVarianceMarkerHandler; @@ -44395,7 +45210,7 @@ var ts; }; for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) { var tp = typeParameters_1[_i]; - _loop_10(tp); + _loop_11(tp); } cache.variances = variances; } @@ -44510,6 +45325,9 @@ var ts; // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely // expanding. Effectively, we will generate a false positive when two types are structurally equal to at least 5 // levels, but unequal at some level beyond that. + // In addition, this will also detect when an indexed access has been chained off of 5 or more times (which is essentially + // the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding false positives + // for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`). function isDeeplyNestedType(type, stack, depth) { // We track all object types that have an associated symbol (representing the origin of the type) if (depth >= 5 && type.flags & 524288 /* Object */) { @@ -44526,8 +45344,30 @@ var ts; } } } + if (depth >= 5 && type.flags & 8388608 /* IndexedAccess */) { + var root = getRootObjectTypeFromIndexedAccessChain(type); + var count = 0; + for (var i = 0; i < depth; i++) { + var t = stack[i]; + if (getRootObjectTypeFromIndexedAccessChain(t) === root) { + count++; + if (count >= 5) + return true; + } + } + } return false; } + /** + * Gets the leftmost object type in a chain of indexed accesses, eg, in A[P][Q], returns A + */ + function getRootObjectTypeFromIndexedAccessChain(type) { + var t = type; + while (t.flags & 8388608 /* IndexedAccess */) { + t = t.objectType; + } + return t; + } function isPropertyIdenticalTo(sourceProp, targetProp) { return compareProperties(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */; } @@ -44590,18 +45430,24 @@ var ts; if (!(isMatchingSignature(source, target, partialMatch))) { return 0 /* False */; } - // Check that the two signatures have the same number of type parameters. We might consider - // also checking that any type parameter constraints match, but that would require instantiating - // the constraints with a common set of type arguments to get relatable entities in places where - // type parameters occur in the constraints. The complexity of doing that doesn't seem worthwhile, - // particularly as we're comparing erased versions of the signatures below. + // Check that the two signatures have the same number of type parameters. if (ts.length(source.typeParameters) !== ts.length(target.typeParameters)) { return 0 /* False */; } - // Spec 1.0 Section 3.8.3 & 3.8.4: - // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N - source = getErasedSignature(source); - target = getErasedSignature(target); + // Check that type parameter constraints and defaults match. If they do, instantiate the source + // signature with the type parameters of the target signature and continue the comparison. + if (target.typeParameters) { + var mapper = createTypeMapper(source.typeParameters, target.typeParameters); + for (var i = 0; i < target.typeParameters.length; i++) { + var s = source.typeParameters[i]; + var t = target.typeParameters[i]; + if (!(s === t || compareTypes(instantiateType(getConstraintFromTypeParameter(s), mapper) || unknownType, getConstraintFromTypeParameter(t) || unknownType) && + compareTypes(instantiateType(getDefaultFromTypeParameter(s), mapper) || unknownType, getDefaultFromTypeParameter(t) || unknownType))) { + return 0 /* False */; + } + } + source = instantiateSignature(source, mapper, /*eraseTypeParameters*/ true); + } var result = -1 /* True */; if (!ignoreThisTypes) { var sourceThisType = getThisTypeOfSignature(source); @@ -44703,7 +45549,7 @@ var ts; if (propType) { return propType; } - if (everyType(type, isTupleType) && !everyType(type, function (t) { return !t.target.hasRestElement; })) { + if (everyType(type, isTupleType)) { return mapType(type, function (t) { return getRestTypeOfTupleType(t) || undefinedType; }); } return undefined; @@ -44748,6 +45594,23 @@ var ts; } return type; } + function getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(type, contextualSignatureReturnType, isAsync) { + if (type && isUnitType(type)) { + var contextualType = !contextualSignatureReturnType ? undefined : + isAsync ? getPromisedTypeOfPromise(contextualSignatureReturnType) : + contextualSignatureReturnType; + type = getWidenedLiteralLikeTypeForContextualType(type, contextualType); + } + return type; + } + function getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(type, contextualSignatureReturnType, kind, isAsyncGenerator) { + if (type && isUnitType(type)) { + var contextualType = !contextualSignatureReturnType ? undefined : + getIterationTypeOfGeneratorFunctionReturnType(kind, contextualSignatureReturnType, isAsyncGenerator); + type = getWidenedLiteralLikeTypeForContextualType(type, contextualType); + } + return type; + } /** * Check if a Type was written as a tuple type literal. * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. @@ -44866,11 +45729,11 @@ var ts; * with no call or construct signatures. */ function isObjectTypeWithInferableIndex(type) { - return type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */ | 512 /* ValueModule */)) !== 0 && + return type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */ | 384 /* Enum */ | 512 /* ValueModule */)) !== 0 && !typeHasCallOrConstructSignatures(type); } function createSymbolWithType(source, type) { - var symbol = createSymbol(source.flags, source.escapedName); + var symbol = createSymbol(source.flags, source.escapedName, ts.getCheckFlags(source) & 8 /* Readonly */); symbol.declarations = source.declarations; symbol.parent = source.parent; symbol.type = type; @@ -44989,14 +45852,14 @@ var ts; var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */); var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */); var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); - result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 524288 /* NonInferrableType */)); // Retain js literal flag through widening + result.objectFlags |= (ts.getObjectFlags(type) & (16384 /* JSLiteral */ | 1048576 /* NonInferrableType */)); // Retain js literal flag through widening return result; } function getWidenedType(type) { return getWidenedTypeWithContext(type, /*context*/ undefined); } function getWidenedTypeWithContext(type, context) { - if (ts.getObjectFlags(type) & 393216 /* RequiresWidening */) { + if (ts.getObjectFlags(type) & 786432 /* RequiresWidening */) { if (context === undefined && type.widened) { return type.widened; } @@ -45041,7 +45904,7 @@ var ts; */ function reportWideningErrorsInType(type) { var errorReported = false; - if (ts.getObjectFlags(type) & 131072 /* ContainsWideningType */) { + if (ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { if (type.flags & 1048576 /* Union */) { if (ts.some(type.types, isEmptyObjectType)) { errorReported = true; @@ -45067,7 +45930,7 @@ var ts; for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); - if (ts.getObjectFlags(t) & 131072 /* ContainsWideningType */) { + if (ts.getObjectFlags(t) & 262144 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } @@ -45078,7 +45941,7 @@ var ts; } return errorReported; } - function reportImplicitAny(declaration, type) { + function reportImplicitAny(declaration, type, wideningKind) { var typeAsString = typeToString(getWidenedType(type)); if (ts.isInJSFile(declaration) && !ts.isCheckJsEnabledForFile(ts.getSourceFileOfNode(declaration), compilerOptions)) { // Only report implicit any errors/suggestions in TS and ts-check JS files @@ -45096,7 +45959,7 @@ var ts; if (ts.isIdentifier(param.name) && (ts.isCallSignatureDeclaration(param.parent) || ts.isMethodSignature(param.parent) || ts.isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && - (resolveName(param, param.name.escapedText, 67897832 /* Type */, undefined, param.name.escapedText, /*isUse*/ true) || + (resolveName(param, param.name.escapedText, 788968 /* Type */, undefined, param.name.escapedText, /*isUse*/ true) || param.name.originalKeywordKind && ts.isTypeNodeKind(param.name.originalKeywordKind))) { var newName = "arg" + param.parent.parameters.indexOf(param); errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, ts.declarationNameToString(param.name)); @@ -45124,10 +45987,17 @@ var ts; case 197 /* FunctionExpression */: case 198 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { - error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); + if (wideningKind === 1 /* GeneratorYield */) { + error(declaration, ts.Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); + } + else { + error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); + } return; } - diagnostic = noImplicitAny ? ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type : ts.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage; + diagnostic = !noImplicitAny ? ts.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : + wideningKind === 1 /* GeneratorYield */ ? ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : + ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; case 182 /* MappedType */: if (noImplicitAny) { @@ -45139,11 +46009,11 @@ var ts; } errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString); } - function reportErrorsFromWidening(declaration, type) { - if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 131072 /* ContainsWideningType */) { + function reportErrorsFromWidening(declaration, type, wideningKind) { + if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 262144 /* ContainsWideningType */) { // Report implicit any error within type if possible, otherwise report error on declaration if (!reportWideningErrorsInType(type)) { - reportImplicitAny(declaration, type); + reportImplicitAny(declaration, type, wideningKind); } } } @@ -45186,12 +46056,6 @@ var ts; if (extraFlags === void 0) { extraFlags = 0; } return context && createInferenceContextWorker(ts.map(context.inferences, cloneInferenceInfo), context.signature, context.flags | extraFlags, context.compareTypes); } - function cloneInferredPartOfContext(context) { - var inferences = ts.filter(context.inferences, hasInferenceCandidates); - return inferences.length ? - createInferenceContextWorker(ts.map(inferences, cloneInferenceInfo), context.signature, context.flags, context.compareTypes) : - undefined; - } function createInferenceContextWorker(inferences, signature, flags, compareTypes) { var context = { inferences: inferences, @@ -45209,14 +46073,22 @@ var ts; var inference = inferences[i]; if (t === inference.typeParameter) { if (fix && !inference.isFixed) { + clearCachedInferences(inferences); inference.isFixed = true; - inference.inferredType = undefined; } return getInferredType(context, i); } } return t; } + function clearCachedInferences(inferences) { + for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) { + var inference = inferences_1[_i]; + if (!inference.isFixed) { + inference.inferredType = undefined; + } + } + } function createInferenceInfo(typeParameter) { return { typeParameter: typeParameter, @@ -45251,7 +46123,7 @@ var ts; objectFlags & 4 /* Reference */ && ts.forEach(type.typeArguments, couldContainTypeVariables) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & 32 /* Mapped */ || - type.flags & 3145728 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeVariables(type)); + type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && couldUnionOrIntersectionContainTypeVariables(type)); } function couldUnionOrIntersectionContainTypeVariables(type) { if (type.couldContainTypeVariables === undefined) { @@ -45260,7 +46132,10 @@ var ts; return type.couldContainTypeVariables; } function isTypeParameterAtTopLevel(type, typeParameter) { - return type === typeParameter || !!(type.flags & 3145728 /* UnionOrIntersection */) && ts.some(type.types, function (t) { return isTypeParameterAtTopLevel(t, typeParameter); }); + return !!(type === typeParameter || + type.flags & 3145728 /* UnionOrIntersection */ && ts.some(type.types, function (t) { return isTypeParameterAtTopLevel(t, typeParameter); }) || + type.flags & 16777216 /* Conditional */ && (isTypeParameterAtTopLevel(getTrueTypeFromConditionalType(type), typeParameter) || + isTypeParameterAtTopLevel(getFalseTypeFromConditionalType(type), typeParameter))); } /** Create an object with properties named in the string literal type. Every property has type `any` */ function createEmptyObjectTypeFromStringLiteral(type) { @@ -45302,7 +46177,7 @@ var ts; // literal { a: 123, b: x => true } is marked non-inferable because it contains a context sensitive // arrow function, but is considered partially inferable because property 'a' has an inferable type. function isPartiallyInferableType(type) { - return !(ts.getObjectFlags(type) & 524288 /* NonInferrableType */) || + return !(ts.getObjectFlags(type) & 1048576 /* NonInferrableType */) || isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }); } function createReverseMappedType(source, target, constraint) { @@ -45376,7 +46251,9 @@ var ts; }); } function getUnmatchedProperty(source, target, requireOptionalProperties, matchDiscriminantProperties) { - return getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties).next().value; + var result = getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties).next(); + if (!result.done) + return result.value; } function tupleTypesDefinitelyUnrelated(source, target) { return target.target.minLength > source.target.minLength || @@ -45401,6 +46278,7 @@ var ts; var visited; var bivariant = false; var propagationType; + var inferencePriority = 256 /* MaxValue */; var allowComplexConstraintInference = true; inferFromTypes(originalSource, originalTarget); function inferFromTypes(source, target) { @@ -45420,50 +46298,59 @@ var ts; if (source.aliasSymbol && source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol) { // Source and target are types originating in the same generic type alias declaration. // Simply infer from source type arguments to target type arguments. - var sourceTypes = source.aliasTypeArguments; - var targetTypes = target.aliasTypeArguments; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], targetTypes[i]); + inferFromTypeArguments(source.aliasTypeArguments, target.aliasTypeArguments, getAliasVariances(source.aliasSymbol)); + return; + } + if (source === target && source.flags & 3145728 /* UnionOrIntersection */) { + // When source and target are the same union or intersection type, just relate each constituent + // type to itself. + for (var _i = 0, _a = source.types; _i < _a.length; _i++) { + var t = _a[_i]; + inferFromTypes(t, t); } return; } - if (source.flags & 1048576 /* Union */ && target.flags & 1048576 /* Union */ && !(source.flags & 1024 /* EnumLiteral */ && target.flags & 1024 /* EnumLiteral */) || - source.flags & 2097152 /* Intersection */ && target.flags & 2097152 /* Intersection */) { - // Source and target are both unions or both intersections. If source and target - // are the same type, just relate each constituent type to itself. - if (source === target) { - for (var _i = 0, _a = source.types; _i < _a.length; _i++) { - var t = _a[_i]; - inferFromTypes(t, t); - } + if (target.flags & 1048576 /* Union */) { + // First, infer between identically matching source and target constituents and remove the + // matching types. + var _b = inferFromMatchingTypes(source.flags & 1048576 /* Union */ ? source.types : [source], target.types, isTypeOrBaseIdenticalTo), tempSources = _b[0], tempTargets = _b[1]; + // Next, infer between closely matching source and target constituents and remove + // the matching types. Types closely match when they are instantiations of the same + // object type or instantiations of the same type alias. + var _c = inferFromMatchingTypes(tempSources, tempTargets, isTypeCloselyMatchedBy), sources = _c[0], targets = _c[1]; + if (targets.length === 0) { return; } - // Find each source constituent type that has an identically matching target constituent - // type, and for each such type infer from the type to itself. When inferring from a - // type to itself we effectively find all type parameter occurrences within that type - // and infer themselves as their type arguments. We have special handling for numeric - // and string literals because the number and string types are not represented as unions - // of all their possible values. - var matchingTypes = void 0; - for (var _b = 0, _c = source.types; _b < _c.length; _b++) { - var t = _c[_b]; - if (typeIdenticalToSomeType(t, target.types)) { - (matchingTypes || (matchingTypes = [])).push(t); - inferFromTypes(t, t); - } - else if (t.flags & (256 /* NumberLiteral */ | 128 /* StringLiteral */)) { - var b = getBaseTypeOfLiteralType(t); - if (typeIdenticalToSomeType(b, target.types)) { - (matchingTypes || (matchingTypes = [])).push(t, b); - } - } + target = getUnionType(targets); + if (sources.length === 0) { + // All source constituents have been matched and there is nothing further to infer from. + // However, simply making no inferences is undesirable because it could ultimately mean + // inferring a type parameter constraint. Instead, make a lower priority inference from + // the full source to whatever remains in the target. For example, when inferring from + // string to 'string | T', make a lower priority inference of string for T. + var savePriority = priority; + priority |= 1 /* NakedTypeVariable */; + inferFromTypes(source, target); + priority = savePriority; + return; } - // Next, to improve the quality of inferences, reduce the source and target types by - // removing the identically matched constituents. For example, when inferring from - // 'string | string[]' to 'string | T' we reduce the types to 'string[]' and 'T'. - if (matchingTypes) { - source = removeTypesFromUnionOrIntersection(source, matchingTypes); - target = removeTypesFromUnionOrIntersection(target, matchingTypes); + source = getUnionType(sources); + } + else if (target.flags & 2097152 /* Intersection */ && ts.some(target.types, function (t) { return !!getInferenceInfoForType(t) || (isGenericMappedType(t) && !!getInferenceInfoForType(getHomomorphicTypeVariable(t) || neverType)); })) { + // We reduce intersection types only when they contain naked type parameters. For example, when + // inferring from 'string[] & { extra: any }' to 'string[] & T' we want to remove string[] and + // infer { extra: any } for T. But when inferring to 'string[] & Iterable' we want to keep the + // string[] on the source side and infer string for T. + // Likewise, we consider a homomorphic mapped type constrainted to the target type parameter as similar to a "naked type variable" + // in such scenarios. + if (!(source.flags & 1048576 /* Union */)) { + // Infer between identically matching source and target constituents and remove the matching types. + var _d = inferFromMatchingTypes(source.flags & 2097152 /* Intersection */ ? source.types : [source], target.types, isTypeIdenticalTo), sources = _d[0], targets = _d[1]; + if (sources.length === 0 || targets.length === 0) { + return; + } + source = getIntersectionType(sources); + target = getIntersectionType(targets); } } else if (target.flags & (8388608 /* IndexedAccess */ | 33554432 /* Substitution */)) { @@ -45477,7 +46364,7 @@ var ts; // not contain anyFunctionType when we come back to this argument for its second round // of inference. Also, we exclude inferences for silentNeverType (which is used as a wildcard // when constructing types from type parameters that had no inference candidates). - if (ts.getObjectFlags(source) & 524288 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { + if (ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ || source === silentNeverType || (priority & 16 /* ReturnType */ && (source === autoType || source === autoArrayType))) { return; } var inference = getInferenceInfoForType(target); @@ -45496,26 +46383,27 @@ var ts; if (contravariant && !bivariant) { if (!ts.contains(inference.contraCandidates, candidate)) { inference.contraCandidates = ts.append(inference.contraCandidates, candidate); - inference.inferredType = undefined; + clearCachedInferences(inferences); } } else if (!ts.contains(inference.candidates, candidate)) { inference.candidates = ts.append(inference.candidates, candidate); - inference.inferredType = undefined; + clearCachedInferences(inferences); } } if (!(priority & 16 /* ReturnType */) && target.flags & 262144 /* TypeParameter */ && inference.topLevel && !isTypeParameterAtTopLevel(originalTarget, target)) { inference.topLevel = false; - inference.inferredType = undefined; + clearCachedInferences(inferences); } } + inferencePriority = Math.min(inferencePriority, priority); return; } else { // Infer to the simplified version of an indexed access, if possible, to (hopefully) expose more bare type parameters to the inference engine var simplified = getSimplifiedType(target, /*writing*/ false); if (simplified !== target) { - inferFromTypesOnce(source, simplified); + invokeOnce(source, simplified, inferFromTypes); } else if (target.flags & 8388608 /* IndexedAccess */) { var indexType = getSimplifiedType(target.indexType, /*writing*/ false); @@ -45524,26 +46412,15 @@ var ts; if (indexType.flags & 63176704 /* Instantiable */) { var simplified_1 = distributeIndexOverObjectType(getSimplifiedType(target.objectType, /*writing*/ false), indexType, /*writing*/ false); if (simplified_1 && simplified_1 !== target) { - inferFromTypesOnce(source, simplified_1); + invokeOnce(source, simplified_1, inferFromTypes); } } } } } - if (ts.getObjectFlags(source) & 4 /* Reference */ && ts.getObjectFlags(target) & 4 /* Reference */ && source.target === target.target) { + if (ts.getObjectFlags(source) & 4 /* Reference */ && ts.getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target))) { // If source and target are references to the same generic type, infer from type arguments - var sourceTypes = source.typeArguments || ts.emptyArray; - var targetTypes = target.typeArguments || ts.emptyArray; - var count = sourceTypes.length < targetTypes.length ? sourceTypes.length : targetTypes.length; - var variances = getVariances(source.target); - for (var i = 0; i < count; i++) { - if (i < variances.length && (variances[i] & 7 /* VarianceMask */) === 2 /* Contravariant */) { - inferFromContravariantTypes(sourceTypes[i], targetTypes[i]); - } - else { - inferFromTypes(sourceTypes[i], targetTypes[i]); - } - } + inferFromTypeArguments(source.typeArguments || ts.emptyArray, target.typeArguments || ts.emptyArray, getVariances(source.target)); } else if (source.flags & 4194304 /* Index */ && target.flags & 4194304 /* Index */) { contravariant = !contravariant; @@ -45570,44 +46447,17 @@ var ts; inferFromTypes(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target)); } else if (target.flags & 16777216 /* Conditional */ && !contravariant) { - inferFromTypes(source, getTrueTypeFromConditionalType(target)); - inferFromTypes(source, getFalseTypeFromConditionalType(target)); + var targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)]; + inferToMultipleTypes(source, targetTypes, target.flags); } else if (target.flags & 3145728 /* UnionOrIntersection */) { - // We infer from types that are not naked type variables first so that inferences we - // make from nested naked type variables and given slightly higher priority by virtue - // of being first in the candidates array. - var typeVariableCount = 0; - for (var _d = 0, _e = target.types; _d < _e.length; _d++) { - var t = _e[_d]; - if (getInferenceInfoForType(t)) { - typeVariableCount++; - } - else { - inferFromTypes(source, t); - } - } - // Inferences directly to naked type variables are given lower priority as they are - // less specific. For example, when inferring from Promise to T | Promise, - // we want to infer string for T, not Promise | string. For intersection types - // we only infer to single naked type variables. - if (target.flags & 1048576 /* Union */ ? typeVariableCount !== 0 : typeVariableCount === 1) { - var savePriority = priority; - priority |= 1 /* NakedTypeVariable */; - for (var _f = 0, _g = target.types; _f < _g.length; _f++) { - var t = _g[_f]; - if (getInferenceInfoForType(t)) { - inferFromTypes(source, t); - } - } - priority = savePriority; - } + inferToMultipleTypes(source, target.types, target.flags); } else if (source.flags & 1048576 /* Union */) { // Source is a union or intersection type, infer from each constituent type var sourceTypes = source.types; - for (var _h = 0, sourceTypes_3 = sourceTypes; _h < sourceTypes_3.length; _h++) { - var sourceType = sourceTypes_3[_h]; + for (var _e = 0, sourceTypes_3 = sourceTypes; _e < sourceTypes_3.length; _e++) { + var sourceType = sourceTypes_3[_e]; inferFromTypes(sourceType, target); } } @@ -45631,36 +46481,51 @@ var ts; source = apparentSource; } if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */)) { - var key = source.id + "," + target.id; - if (visited && visited.get(key)) { - return; - } - (visited || (visited = ts.createMap())).set(key, true); - // If we are already processing another target type with the same associated symbol (such as - // an instantiation of the same generic type), we do not explore this target as it would yield - // no further inferences. We exclude the static side of classes from this check since it shares - // its symbol with the instance side which would lead to false positives. - var isNonConstructorObject = target.flags & 524288 /* Object */ && - !(ts.getObjectFlags(target) & 16 /* Anonymous */ && target.symbol && target.symbol.flags & 32 /* Class */); - var symbol = isNonConstructorObject ? target.symbol : undefined; - if (symbol) { - if (ts.contains(symbolStack, symbol)) { - return; - } - (symbolStack || (symbolStack = [])).push(symbol); - inferFromObjectTypes(source, target); - symbolStack.pop(); - } - else { - inferFromObjectTypes(source, target); + invokeOnce(source, target, inferFromObjectTypes); + } + } + } + function invokeOnce(source, target, action) { + var key = source.id + "," + target.id; + var status = visited && visited.get(key); + if (status !== undefined) { + inferencePriority = Math.min(inferencePriority, status); + return; + } + (visited || (visited = ts.createMap())).set(key, -1 /* Circularity */); + var saveInferencePriority = inferencePriority; + inferencePriority = 256 /* MaxValue */; + action(source, target); + visited.set(key, inferencePriority); + inferencePriority = Math.min(inferencePriority, saveInferencePriority); + } + function inferFromMatchingTypes(sources, targets, matches) { + var matchedSources; + var matchedTargets; + for (var _i = 0, targets_1 = targets; _i < targets_1.length; _i++) { + var t = targets_1[_i]; + for (var _a = 0, sources_1 = sources; _a < sources_1.length; _a++) { + var s = sources_1[_a]; + if (matches(s, t)) { + inferFromTypes(s, t); + matchedSources = ts.appendIfUnique(matchedSources, s); + matchedTargets = ts.appendIfUnique(matchedTargets, t); } } } - function inferFromTypesOnce(source, target) { - var key = source.id + "," + target.id; - if (!visited || !visited.get(key)) { - (visited || (visited = ts.createMap())).set(key, true); - inferFromTypes(source, target); + return [ + matchedSources ? ts.filter(sources, function (t) { return !ts.contains(matchedSources, t); }) : sources, + matchedTargets ? ts.filter(targets, function (t) { return !ts.contains(matchedTargets, t); }) : targets, + ]; + } + function inferFromTypeArguments(sourceTypes, targetTypes, variances) { + var count = sourceTypes.length < targetTypes.length ? sourceTypes.length : targetTypes.length; + for (var i = 0; i < count; i++) { + if (i < variances.length && (variances[i] & 7 /* VarianceMask */) === 2 /* Contravariant */) { + inferFromContravariantTypes(sourceTypes[i], targetTypes[i]); + } + else { + inferFromTypes(sourceTypes[i], targetTypes[i]); } } } @@ -45676,8 +46541,8 @@ var ts; } function getInferenceInfoForType(type) { if (type.flags & 8650752 /* TypeVariable */) { - for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) { - var inference = inferences_1[_i]; + for (var _i = 0, inferences_2 = inferences; _i < inferences_2.length; _i++) { + var inference = inferences_2[_i]; if (type === inference.typeParameter) { return inference; } @@ -45685,6 +46550,77 @@ var ts; } return undefined; } + function inferToMultipleTypes(source, targets, targetFlags) { + var typeVariableCount = 0; + if (targetFlags & 1048576 /* Union */) { + var nakedTypeVariable = void 0; + var sources = source.flags & 1048576 /* Union */ ? source.types : [source]; + var matched_1 = new Array(sources.length); + var inferenceCircularity = false; + // First infer to types that are not naked type variables. For each source type we + // track whether inferences were made from that particular type to some target with + // equal priority (i.e. of equal quality) to what we would infer for a naked type + // parameter. + for (var _i = 0, targets_2 = targets; _i < targets_2.length; _i++) { + var t = targets_2[_i]; + if (getInferenceInfoForType(t)) { + nakedTypeVariable = t; + typeVariableCount++; + } + else { + for (var i = 0; i < sources.length; i++) { + var saveInferencePriority = inferencePriority; + inferencePriority = 256 /* MaxValue */; + inferFromTypes(sources[i], t); + if (inferencePriority === priority) + matched_1[i] = true; + inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */; + inferencePriority = Math.min(inferencePriority, saveInferencePriority); + } + } + } + // If the target has a single naked type variable and no inference circularities were + // encountered above (meaning we explored the types fully), create a union of the source + // types from which no inferences have been made so far and infer from that union to the + // naked type variable. + if (typeVariableCount === 1 && !inferenceCircularity) { + var unmatched = ts.flatMap(sources, function (s, i) { return matched_1[i] ? undefined : s; }); + if (unmatched.length) { + inferFromTypes(getUnionType(unmatched), nakedTypeVariable); + return; + } + } + } + else { + // We infer from types that are not naked type variables first so that inferences we + // make from nested naked type variables and given slightly higher priority by virtue + // of being first in the candidates array. + for (var _a = 0, targets_3 = targets; _a < targets_3.length; _a++) { + var t = targets_3[_a]; + if (getInferenceInfoForType(t)) { + typeVariableCount++; + } + else { + inferFromTypes(source, t); + } + } + } + // Inferences directly to naked type variables are given lower priority as they are + // less specific. For example, when inferring from Promise to T | Promise, + // we want to infer string for T, not Promise | string. For intersection types + // we only infer to single naked type variables. + if (targetFlags & 2097152 /* Intersection */ ? typeVariableCount === 1 : typeVariableCount > 0) { + var savePriority = priority; + priority |= 1 /* NakedTypeVariable */; + for (var _b = 0, targets_4 = targets; _b < targets_4.length; _b++) { + var t = targets_4[_b]; + if (getInferenceInfoForType(t)) { + inferFromTypes(source, t); + } + } + priority = savePriority; + } + } function inferToMappedType(source, target, constraintType) { if (constraintType.flags & 1048576 /* Union */) { var result = false; @@ -45707,7 +46643,7 @@ var ts; // We assign a lower priority to inferences made from types containing non-inferrable // types because we may only have a partial result (i.e. we may have failed to make // reverse inferences for some properties). - priority |= ts.getObjectFlags(source) & 524288 /* NonInferrableType */ ? + priority |= ts.getObjectFlags(source) & 1048576 /* NonInferrableType */ ? 4 /* PartialHomomorphicMappedType */ : 2 /* HomomorphicMappedType */; inferFromTypes(inferredType, inference.typeParameter); priority = savePriority; @@ -45742,6 +46678,27 @@ var ts; return false; } function inferFromObjectTypes(source, target) { + // If we are already processing another target type with the same associated symbol (such as + // an instantiation of the same generic type), we do not explore this target as it would yield + // no further inferences. We exclude the static side of classes from this check since it shares + // its symbol with the instance side which would lead to false positives. + var isNonConstructorObject = target.flags & 524288 /* Object */ && + !(ts.getObjectFlags(target) & 16 /* Anonymous */ && target.symbol && target.symbol.flags & 32 /* Class */); + var symbol = isNonConstructorObject ? target.symbol : undefined; + if (symbol) { + if (ts.contains(symbolStack, symbol)) { + inferencePriority = -1 /* Circularity */; + return; + } + (symbolStack || (symbolStack = [])).push(symbol); + inferFromObjectTypesWorker(source, target); + symbolStack.pop(); + } + else { + inferFromObjectTypesWorker(source, target); + } + } + function inferFromObjectTypesWorker(source, target) { if (isGenericMappedType(source) && isGenericMappedType(target)) { // The source and target types are generic types { [P in S]: X } and { [P in T]: Y }, so we infer // from S to T and from X to Y. @@ -45804,7 +46761,7 @@ var ts; var sourceLen = sourceSignatures.length; var targetLen = targetSignatures.length; var len = sourceLen < targetLen ? sourceLen : targetLen; - var skipParameters = !!(ts.getObjectFlags(source) & 524288 /* NonInferrableType */); + var skipParameters = !!(ts.getObjectFlags(source) & 1048576 /* NonInferrableType */); for (var i = 0; i < len; i++) { inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getBaseSignature(targetSignatures[targetLen - len + i]), skipParameters); } @@ -45840,28 +46797,12 @@ var ts; } } } - function typeIdenticalToSomeType(type, types) { - for (var _i = 0, types_11 = types; _i < types_11.length; _i++) { - var t = types_11[_i]; - if (isTypeIdenticalTo(t, type)) { - return true; - } - } - return false; + function isTypeOrBaseIdenticalTo(s, t) { + return isTypeIdenticalTo(s, t) || !!(s.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) && isTypeIdenticalTo(getBaseTypeOfLiteralType(s), t); } - /** - * Return a new union or intersection type computed by removing a given set of types - * from a given union or intersection type. - */ - function removeTypesFromUnionOrIntersection(type, typesToRemove) { - var reducedTypes = []; - for (var _i = 0, _a = type.types; _i < _a.length; _i++) { - var t = _a[_i]; - if (!typeIdenticalToSomeType(t, typesToRemove)) { - reducedTypes.push(t); - } - } - return type.flags & 1048576 /* Union */ ? getUnionType(reducedTypes) : getIntersectionType(reducedTypes); + function isTypeCloselyMatchedBy(s, t) { + return !!(s.flags & 524288 /* Object */ && t.flags & 524288 /* Object */ && s.symbol && s.symbol === t.symbol || + s.aliasSymbol && s.aliasTypeArguments && s.aliasSymbol === t.aliasSymbol); } function hasPrimitiveConstraint(type) { var constraint = getConstraintOfTypeParameter(type); @@ -45870,12 +46811,15 @@ var ts; function isObjectLiteralType(type) { return !!(ts.getObjectFlags(type) & 128 /* ObjectLiteral */); } - function widenObjectLiteralCandidates(candidates) { + function isObjectOrArrayLiteralType(type) { + return !!(ts.getObjectFlags(type) & (128 /* ObjectLiteral */ | 65536 /* ArrayLiteral */)); + } + function unionObjectAndArrayLiteralCandidates(candidates) { if (candidates.length > 1) { - var objectLiterals = ts.filter(candidates, isObjectLiteralType); + var objectLiterals = ts.filter(candidates, isObjectOrArrayLiteralType); if (objectLiterals.length) { - var objectLiteralsType = getWidenedType(getUnionType(objectLiterals, 2 /* Subtype */)); - return ts.concatenate(ts.filter(candidates, function (t) { return !isObjectLiteralType(t); }), [objectLiteralsType]); + var literalsType = getUnionType(objectLiterals, 2 /* Subtype */); + return ts.concatenate(ts.filter(candidates, function (t) { return !isObjectOrArrayLiteralType(t); }), [literalsType]); } } return candidates; @@ -45884,8 +46828,8 @@ var ts; return inference.priority & 56 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates); } function getCovariantInference(inference, signature) { - // Extract all object literal types and replace them with a single widened and normalized type. - var candidates = widenObjectLiteralCandidates(inference.candidates); + // Extract all object and array literal types and replace them with a single widened and normalized type. + var candidates = unionObjectAndArrayLiteralCandidates(inference.candidates); // We widen inferred literal types if // all inferences were made to top-level occurrences of the type parameter, and // the type parameter has no constraint or its constraint includes no primitive or literal types, and @@ -46009,7 +46953,7 @@ var ts; var links = getNodeLinks(node); if (!links.resolvedSymbol) { links.resolvedSymbol = !ts.nodeIsMissing(node) && - resolveName(node, node.escapedText, 67220415 /* Value */ | 1048576 /* ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node), + resolveName(node, node.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node), /*excludeGlobals*/ false, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1) || unknownSymbol; } return links.resolvedSymbol; @@ -46206,8 +47150,8 @@ var ts; } function getTypeFactsOfTypes(types) { var result = 0 /* None */; - for (var _i = 0, types_12 = types; _i < types_12.length; _i++) { - var t = types_12[_i]; + for (var _i = 0, types_11 = types; _i < types_11.length; _i++) { + var t = types_11[_i]; result |= getTypeFacts(t); } return result; @@ -46305,11 +47249,11 @@ var ts; } function getTypeOfDestructuredArrayElement(type, index) { return everyType(type, isTupleLikeType) && getTupleElementType(type, index) || - checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || + checkIteratedTypeOrElementType(65 /* Destructuring */, type, undefinedType, /*errorNode*/ undefined) || errorType; } function getTypeOfDestructuredSpreadExpression(type) { - return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || errorType); + return createArrayType(checkIteratedTypeOrElementType(65 /* Destructuring */, type, undefinedType, /*errorNode*/ undefined) || errorType); } function getAssignedTypeOfBinaryExpression(node) { var isDestructuringDefaultAssignment = node.parent.kind === 188 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || @@ -46582,8 +47526,8 @@ var ts; } function isEvolvingArrayTypeList(types) { var hasEvolvingArrayType = false; - for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { - var t = types_13[_i]; + for (var _i = 0, types_12 = types; _i < types_12.length; _i++) { + var t = types_12[_i]; if (!(t.flags & 131072 /* Never */)) { if (!(ts.getObjectFlags(t) & 256 /* EvolvingArray */)) { return false; @@ -47535,8 +48479,11 @@ var ts; } return type; } + function isExportOrExportExpression(location) { + return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); }); + } function markAliasReferenced(symbol, location) { - if (isNonLocalAlias(symbol, /*excludes*/ 67220415 /* Value */) && !isInTypeQuery(location) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && ((compilerOptions.preserveConstEnums && isExportOrExportExpression(location)) || !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol)))) { markAliasSymbolAsReferenced(symbol); } } @@ -48266,7 +49213,7 @@ var ts; // There was no contextual ThisType for the containing object literal, so the contextual type // for 'this' is the non-null form of the contextual type for the containing object literal or // the type of the object literal itself. - return contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral); + return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } // In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the // contextual type for 'this' is 'obj'. @@ -48282,14 +49229,14 @@ var ts; return undefined; } } - return checkExpressionCached(expression); + return getWidenedType(checkExpressionCached(expression)); } } } return undefined; } // Return contextual type of parameter or undefined if no contextual type is available - function getContextuallyTypedParameterType(parameter) { + function getContextuallyTypedParameterType(parameter, forCache) { var func = parameter.parent; if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) { return undefined; @@ -48312,6 +49259,19 @@ var ts; } var contextualSignature = getContextualSignature(func); if (contextualSignature) { + if (forCache) { + // Calling the below guarantees the types are primed and assigned in the same way + // as when the parameter is reached via `checkFunctionExpressionOrObjectLiteralMethod`. + // This should prevent any uninstantiated inference variables in the contextual signature + // from leaking, and should lock in cached parameter types via `assignContextualParameterTypes` + // which we will then immediately use the results of below. + contextuallyCheckFunctionExpressionOrObjectLiteralMethod(func); + var type = getTypeOfSymbol(getMergedSymbol(func.symbol)); + if (isTypeAny(type)) { + return type; + } + contextualSignature = getSignaturesOfType(type, 0 /* Call */)[0]; + } var index = func.parameters.indexOf(parameter) - (ts.getThisParameter(func) ? 1 : 0); return parameter.dotDotDotToken && ts.lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : @@ -48325,7 +49285,7 @@ var ts; } switch (declaration.kind) { case 152 /* Parameter */: - return getContextuallyTypedParameterType(declaration); + return getContextuallyTypedParameterType(declaration, /*forCache*/ false); case 187 /* BindingElement */: return getContextualTypeForBindingElement(declaration); // By default, do nothing and return undefined - only parameters and binding elements have context implied by a parent @@ -48398,7 +49358,7 @@ var ts; if (contextualReturnType) { return node.asteriskToken ? contextualReturnType - : getIteratedTypeOfGenerator(contextualReturnType, (functionFlags & 2 /* Async */) !== 0); + : getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, contextualReturnType, (functionFlags & 2 /* Async */) !== 0); } } return undefined; @@ -48416,6 +49376,15 @@ var ts; } return false; } + function getContextualIterationType(kind, functionDecl) { + var isAsync = !!(ts.getFunctionFlags(functionDecl) & 2 /* Async */); + var contextualReturnType = getContextualReturnType(functionDecl); + if (contextualReturnType) { + return getIterationTypeOfGeneratorFunctionReturnType(kind, contextualReturnType, isAsync) + || undefined; + } + return undefined; + } function getContextualReturnType(functionDecl) { // If the containing function has a return type annotation, is a constructor, or is a get accessor whose // corresponding set accessor has a type annotation, return statements in the function are contextually typed @@ -48466,11 +49435,13 @@ var ts; } return contextSensitive === true ? getTypeOfExpression(left) : contextSensitive; case 55 /* BarBarToken */: - // When an || expression has a contextual type, the operands are contextually typed by that type. When an || - // expression has no contextual type, the right operand is contextually typed by the type of the left operand, - // except for the special case of Javascript declarations of the form `namespace.prop = namespace.prop || {}` + // When an || expression has a contextual type, the operands are contextually typed by that type, except + // when that type originates in a binding pattern, the right operand is contextually typed by the type of + // the left operand. When an || expression has no contextual type, the right operand is contextually typed + // by the type of the left operand, except for the special case of Javascript declarations of the form + // `namespace.prop = namespace.prop || {}`. var type = getContextualType(binaryExpression, contextFlags); - return !type && node === right && !ts.isDefaultedExpandoInitializer(binaryExpression) ? + return node === right && (type && type.pattern || !type && !ts.isDefaultedExpandoInitializer(binaryExpression)) ? getTypeOfExpression(left) : type; case 54 /* AmpersandAmpersandToken */: case 27 /* CommaToken */: @@ -48507,7 +49478,7 @@ var ts; } else if (ts.isIdentifier(lhs.expression)) { var id = lhs.expression; - var parentSymbol = resolveName(id, id.escapedText, 67220415 /* Value */, undefined, id.escapedText, /*isUse*/ true); + var parentSymbol = resolveName(id, id.escapedText, 111551 /* Value */, undefined, id.escapedText, /*isUse*/ true); if (parentSymbol) { var annotated = ts.getEffectiveTypeAnnotationNode(parentSymbol.valueDeclaration); if (annotated) { @@ -48614,7 +49585,7 @@ var ts; // type of T. function getContextualTypeForElementExpression(arrayContextualType, index) { return arrayContextualType && (getTypeOfPropertyOfContextualType(arrayContextualType, "" + index) - || getIteratedTypeOrElementType(arrayContextualType, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false, /*checkAssignability*/ false)); + || getIteratedTypeOrElementType(1 /* Element */, arrayContextualType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false)); } // In a contextually typed conditional expression, the true/false expressions are contextually typed by the same type. function getContextualTypeForConditionalOperand(node, contextFlags) { @@ -48695,9 +49666,12 @@ var ts; // Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily // be "pushed" onto a node using the contextualType property. function getApparentTypeOfContextualType(node, contextFlags) { - var contextualType = instantiateContextualType(getContextualType(node, contextFlags), node, contextFlags); - if (contextualType) { - var apparentType = mapType(contextualType, getApparentType, /*noReductions*/ true); + var contextualType = ts.isObjectLiteralMethod(node) ? + getContextualTypeForObjectLiteralMethod(node, contextFlags) : + getContextualType(node, contextFlags); + var instantiatedType = instantiateContextualType(contextualType, node, contextFlags); + if (instantiatedType) { + var apparentType = mapType(instantiatedType, getApparentType, /*noReductions*/ true); if (apparentType.flags & 1048576 /* Union */) { if (ts.isObjectLiteralExpression(node)) { return discriminateContextualTypeByObjectMembers(node, apparentType); @@ -48747,7 +49721,7 @@ var ts; return type; } /** - * Woah! Do you really want to use this function? + * Whoa! Do you really want to use this function? * * Unless you're trying to get the *non-apparent* type for a * value-literal type or you're authoring relevant portions of this algorithm, @@ -48787,6 +49761,10 @@ var ts; case 202 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent); case 192 /* CallExpression */: + if (parent.expression.kind === 93 /* ImportKeyword */) { + return stringType; + } + /* falls through */ case 193 /* NewExpression */: return getContextualTypeForArgument(parent, node); case 195 /* TypeAssertionExpression */: @@ -48994,9 +49972,7 @@ var ts; if (typeTagSignature) { return typeTagSignature; } - var type = ts.isObjectLiteralMethod(node) ? - getContextualTypeForObjectLiteralMethod(node, 1 /* Signature */) : - getApparentTypeOfContextualType(node, 1 /* Signature */); + var type = getApparentTypeOfContextualType(node, 1 /* Signature */); if (!type) { return undefined; } @@ -49005,8 +49981,8 @@ var ts; } var signatureList; var types = type.types; - for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { - var current = types_14[_i]; + for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { + var current = types_13[_i]; var signature = getContextualCallSignature(current, node); if (signature) { if (!signatureList) { @@ -49024,14 +50000,16 @@ var ts; } } // Result is union of signatures collected (return type is union of return types of this signature set) - return signatureList && createUnionSignature(signatureList[0], signatureList); + if (signatureList) { + return signatureList.length === 1 ? signatureList[0] : createUnionSignature(signatureList[0], signatureList); + } } function checkSpreadExpression(node, checkMode) { - if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { - checkExternalEmitHelpers(node, 1536 /* SpreadIncludes */); + if (languageVersion < 2 /* ES2015 */) { + checkExternalEmitHelpers(node, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 2048 /* SpreadArrays */); } var arrayOrIterableType = checkExpression(node.expression, checkMode); - return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false, /*allowAsyncIterables*/ false); + return checkIteratedTypeOrElementType(33 /* Spread */, arrayOrIterableType, undefinedType, node.expression); } function hasDefaultValue(node) { return (node.kind === 187 /* BindingElement */ && !!node.initializer) || @@ -49062,7 +50040,7 @@ var ts; // if there is no index type / iterated type. var restArrayType = checkExpression(e.expression, checkMode, forceTuple); var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) || - getIteratedTypeOrElementType(restArrayType, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false, /*checkAssignability*/ false); + getIteratedTypeOrElementType(65 /* Destructuring */, restArrayType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false); if (restElementType) { elementTypes.push(restElementType); } @@ -49088,41 +50066,33 @@ var ts; return type; } else if (tupleResult = getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, inConstContext)) { - return tupleResult; + return createArrayLiteralType(tupleResult); } else if (forceTuple) { - return createTupleType(elementTypes, minLength, hasRestElement); + return createArrayLiteralType(createTupleType(elementTypes, minLength, hasRestElement)); } } - return createArrayType(elementTypes.length ? + return createArrayLiteralType(createArrayType(elementTypes.length ? getUnionType(elementTypes, 2 /* Subtype */) : - strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext); + strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext)); + } + function createArrayLiteralType(type) { + if (!(ts.getObjectFlags(type) & 4 /* Reference */)) { + return type; + } + var literalType = type.literalType; + if (!literalType) { + literalType = type.literalType = cloneTypeReference(type); + literalType.objectFlags |= 65536 /* ArrayLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; + } + return literalType; } function getArrayLiteralTupleTypeIfApplicable(elementTypes, contextualType, hasRestElement, elementCount, readonly) { if (elementCount === void 0) { elementCount = elementTypes.length; } if (readonly === void 0) { readonly = false; } // Infer a tuple type when the contextual type is or contains a tuple-like type if (readonly || (contextualType && forEachType(contextualType, isTupleLikeType))) { - var minLength = elementCount - (hasRestElement ? 1 : 0); - var pattern = contextualType && contextualType.pattern; - // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting - // tuple type with the corresponding binding or assignment element types to make the lengths equal. - if (!hasRestElement && pattern && (pattern.kind === 186 /* ArrayBindingPattern */ || pattern.kind === 188 /* ArrayLiteralExpression */)) { - var patternElements = pattern.elements; - for (var i = elementCount; i < patternElements.length; i++) { - var e = patternElements[i]; - if (hasDefaultValue(e)) { - elementTypes.push(contextualType.typeArguments[i]); - } - else if (i < patternElements.length - 1 || !(e.kind === 187 /* BindingElement */ && e.dotDotDotToken || e.kind === 209 /* SpreadElement */)) { - if (e.kind !== 211 /* OmittedExpression */) { - error(e, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); - } - elementTypes.push(strictNullChecks ? implicitNeverType : undefinedWideningType); - } - } - } - return createTupleType(elementTypes, minLength, hasRestElement, readonly); + return createTupleType(elementTypes, elementCount - (hasRestElement ? 1 : 0), hasRestElement, readonly); } } function isNumericName(name) { @@ -49250,7 +50220,7 @@ var ts; checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl); } } - objectFlags |= ts.getObjectFlags(type) & 917504 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(type) & 1835008 /* PropagatingFlags */; var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined; var prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : @@ -49359,7 +50329,7 @@ var ts; var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 0 /* String */) : undefined; var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 1 /* Number */) : undefined; var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 262144 /* ContainsObjectLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; if (isJSObjectLiteral) { result.objectFlags |= 16384 /* JSLiteral */; } @@ -49451,7 +50421,7 @@ var ts; var member = attributeDecl.symbol; if (ts.isJsxAttribute(attributeDecl)) { var exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= ts.getObjectFlags(exprType) & 917504 /* PropagatingFlags */; + objectFlags |= ts.getObjectFlags(exprType) & 1835008 /* PropagatingFlags */; var attributeSymbol = createSymbol(4 /* Property */ | 33554432 /* Transient */ | member.flags, member.escapedName); attributeSymbol.declarations = member.declarations; attributeSymbol.parent = member.parent; @@ -49531,7 +50501,7 @@ var ts; function createJsxAttributesType() { objectFlags |= freshObjectLiteralFlag; var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, /*stringIndexInfo*/ undefined, /*numberIndexInfo*/ undefined); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 262144 /* ContainsObjectLiteral */; + result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 524288 /* ContainsObjectOrArrayLiteral */; return result; } } @@ -49563,7 +50533,7 @@ var ts; function getJsxType(name, location) { var namespace = getJsxNamespaceAt(location); var exports = namespace && getExportsOfSymbol(namespace); - var typeSymbol = exports && getSymbol(exports, name, 67897832 /* Type */); + var typeSymbol = exports && getSymbol(exports, name, 788968 /* Type */); return typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType; } /** @@ -49637,7 +50607,7 @@ var ts; */ function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer, jsxNamespace) { // JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute [symbol] - var jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol(jsxNamespace.exports, nameOfAttribPropContainer, 67897832 /* Type */); + var jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol(jsxNamespace.exports, nameOfAttribPropContainer, 788968 /* Type */); // JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute [type] var jsxElementAttribPropInterfaceType = jsxElementAttribPropInterfaceSym && getDeclaredTypeOfSymbol(jsxElementAttribPropInterfaceSym); // The properties of JSX.ElementAttributesProperty | JSX.ElementChildrenAttribute @@ -49661,7 +50631,7 @@ var ts; } function getJsxLibraryManagedAttributes(jsxNamespace) { // JSX.LibraryManagedAttributes [symbol] - return jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.LibraryManagedAttributes, 67897832 /* Type */); + return jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.LibraryManagedAttributes, 788968 /* Type */); } /// e.g. "props" for React.d.ts, /// or 'undefined' if ElementAttributesProperty doesn't exist (which means all @@ -49813,13 +50783,13 @@ var ts; var reactRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined; var reactNamespace = getJsxNamespace(node); var reactLocation = isNodeOpeningLikeElement ? node.tagName : node; - var reactSym = resolveName(reactLocation, reactNamespace, 67220415 /* Value */, reactRefErr, reactNamespace, /*isUse*/ true); + var reactSym = resolveName(reactLocation, reactNamespace, 111551 /* Value */, reactRefErr, reactNamespace, /*isUse*/ true); if (reactSym) { // Mark local symbol as referenced here because it might not have been marked // if jsx emit was not react as there wont be error being emitted reactSym.isReferenced = 67108863 /* All */; - // If react symbol is alias, mark it as referenced - if (reactSym.flags & 2097152 /* Alias */ && !isConstEnumOrConstEnumOnlyModule(resolveAlias(reactSym))) { + // If react symbol is alias, mark it as refereced + if (reactSym.flags & 2097152 /* Alias */) { markAliasSymbolAsReferenced(reactSym); } } @@ -49869,6 +50839,7 @@ var ts; type.flags & 2097152 /* Intersection */ && ts.every(type.types, isExcessPropertyCheckTarget)); } function checkJsxExpression(node, checkMode) { + checkGrammarJsxExpression(node); if (node.expression) { var type = checkExpression(node.expression, checkMode); if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) { @@ -50041,24 +51012,30 @@ var ts; function checkQualifiedName(node) { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); } + function isMethodAccessForCall(node) { + while (node.parent.kind === 196 /* ParenthesizedExpression */) { + node = node.parent; + } + return ts.isCallOrNewExpression(node.parent) && node.parent.expression === node; + } function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { var propType; var leftType = checkNonNullExpression(left); var parentSymbol = getNodeLinks(left).resolvedSymbol; - var apparentType = getApparentType(getWidenedType(leftType)); + var assignmentKind = ts.getAssignmentTargetKind(node); + var apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); if (isTypeAny(apparentType) || apparentType === silentNeverType) { if (ts.isIdentifier(left) && parentSymbol) { markAliasReferenced(parentSymbol, node); } return apparentType; } - var assignmentKind = ts.getAssignmentTargetKind(node); var prop = getPropertyOfType(apparentType, right.escapedText); if (ts.isIdentifier(left) && parentSymbol && !(prop && isConstEnumOrConstEnumOnlyModule(prop))) { markAliasReferenced(parentSymbol, node); } if (!prop) { - var indexInfo = assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) ? getIndexInfoOfType(apparentType, 0 /* String */) : undefined; + var indexInfo = assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || isThisTypeParameter(leftType) ? getIndexInfoOfType(apparentType, 0 /* String */) : undefined; if (!(indexInfo && indexInfo.type)) { if (isJSLiteralType(leftType)) { return anyType; @@ -50095,10 +51072,14 @@ var ts; } propType = getConstraintForLocation(getTypeOfSymbol(prop), node); } + return getFlowTypeOfAccessExpression(node, prop, propType, right); + } + function getFlowTypeOfAccessExpression(node, prop, propType, errorNode) { // Only compute control flow type if this is a property access expression that isn't an // assignment target, and the referenced property was declared as a variable, property, // accessor, or optional method. - if (node.kind !== 190 /* PropertyAccessExpression */ || + var assignmentKind = ts.getAssignmentTargetKind(node); + if (node.kind !== 191 /* ElementAccessExpression */ && node.kind !== 190 /* PropertyAccessExpression */ || assignmentKind === 1 /* Definite */ || prop && !(prop.flags & (3 /* Variable */ | 4 /* Property */ | 98304 /* Accessor */)) && !(prop.flags & 8192 /* Method */ && propType.flags & 1048576 /* Union */)) { return propType; @@ -50108,7 +51089,7 @@ var ts; // and if we are in a constructor of the same class as the property declaration, assume that // the property is uninitialized at the top of the control flow. var assumeUninitialized = false; - if (strictNullChecks && strictPropertyInitialization && left.kind === 101 /* ThisKeyword */) { + if (strictNullChecks && strictPropertyInitialization && node.expression.kind === 101 /* ThisKeyword */) { var declaration = prop && prop.valueDeclaration; if (declaration && isInstancePropertyWithoutInitializer(declaration)) { var flowContainer = getControlFlowContainer(node); @@ -50125,7 +51106,7 @@ var ts; } var flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType); if (assumeUninitialized && !(getFalsyFlags(propType) & 32768 /* Undefined */) && getFalsyFlags(flowType) & 32768 /* Undefined */) { - error(right, ts.Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); // TODO: GH#18217 + error(errorNode, ts.Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); // TODO: GH#18217 // Return the declared type to reduce follow-on errors return propType; } @@ -50133,7 +51114,7 @@ var ts; } function checkPropertyNotUsedBeforeDeclaration(prop, node, right) { var valueDeclaration = prop.valueDeclaration; - if (!valueDeclaration) { + if (!valueDeclaration || ts.getSourceFileOfNode(node).isDeclarationFile) { return; } var diagnosticMessage; @@ -50223,7 +51204,8 @@ var ts; else { var promisedType = getPromisedTypeOfPromise(containingType); if (promisedType && getPropertyOfType(promisedType, propNode.escapedText)) { - errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_forget_to_use_await, ts.declarationNameToString(propNode), typeToString(containingType)); + errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(containingType)); + relatedInfo = ts.createDiagnosticForNode(propNode, ts.Diagnostics.Did_you_forget_to_use_await); } else { var suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType); @@ -50248,7 +51230,7 @@ var ts; return prop !== undefined && prop.valueDeclaration && ts.hasModifier(prop.valueDeclaration, 32 /* Static */); } function getSuggestedSymbolForNonexistentProperty(name, containingType) { - return getSpellingSuggestionForName(ts.isString(name) ? name : ts.idText(name), getPropertiesOfType(containingType), 67220415 /* Value */); + return getSpellingSuggestionForName(ts.isString(name) ? name : ts.idText(name), getPropertiesOfType(containingType), 111551 /* Value */); } function getSuggestionForNonexistentProperty(name, containingType) { var suggestion = getSuggestedSymbolForNonexistentProperty(name, containingType); @@ -50412,7 +51394,8 @@ var ts; return false; } function checkIndexedAccess(node) { - var objectType = checkNonNullExpression(node.expression); + var exprType = checkNonNullExpression(node.expression); + var objectType = ts.getAssignmentTargetKind(node) !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType; var indexExpression = node.argumentExpression; if (!indexExpression) { var sourceFile = ts.getSourceFileOfNode(node); @@ -50441,7 +51424,7 @@ var ts; 2 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 1 /* NoIndexSignatures */ : 0) : 0 /* None */; var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags) || errorType; - return checkIndexedAccessIndexType(indexedAccessType, node); + return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node); } function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { if (expressionType === errorType) { @@ -50702,7 +51685,8 @@ var ts; // We clone the inference context to avoid disturbing a resolution in progress for an // outer call expression. Effectively we just want a snapshot of whatever has been // inferred for any outer call expression so far. - var outerMapper = getMapperFromContext(cloneInferenceContext(getInferenceContext(node), 1 /* NoDefault */)); + var outerContext = getInferenceContext(node); + var outerMapper = getMapperFromContext(cloneInferenceContext(outerContext, 1 /* NoDefault */)); var instantiatedType = instantiateType(contextualType, outerMapper); // If the contextual type is a generic function type with a single call signature, we // instantiate the type with its own type parameters and type arguments. This ensures that @@ -50719,8 +51703,13 @@ var ts; // Inferences made from return types have lower priority than all other inferences. inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 16 /* ReturnType */); // Create a type mapper for instantiating generic contextual types using the inferences made - // from the return type. - context.returnMapper = getMapperFromContext(cloneInferredPartOfContext(context)); + // from the return type. We need a separate inference pass here because (a) instantiation of + // the source type uses the outer context's return mapper (which excludes inferences made from + // outer arguments), and (b) we don't want any further inferences going into this context. + var returnContext = createInferenceContext(signature.typeParameters, signature, context.flags); + var returnSourceType = instantiateType(contextualType, outerContext && outerContext.returnMapper); + inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType); + context.returnMapper = ts.some(returnContext.inferences, hasInferenceCandidates) ? getMapperFromContext(returnContext) : undefined; } } var thisType = getThisTypeOfSignature(signature); @@ -50818,17 +51807,23 @@ var ts; * @param signature a candidate signature we are trying whether it is a call signature * @param relation a relationship to check parameter and argument type */ - function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors) { + function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors, containingMessageChain, errorOutputContainer) { // Stateless function components can have maximum of three arguments: "props", "context", and "updater". // However "context" and "updater" are implicit and can't be specify by users. Only the first parameter, props, // can be specified by users through attributes property. var paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); var attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode); - return checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes); + return checkTypeRelatedToAndOptionallyElaborate(attributesType, paramType, relation, reportErrors ? node.tagName : undefined, node.attributes, + /*headMessage*/ undefined, containingMessageChain, errorOutputContainer); } - function checkApplicableSignature(node, args, signature, relation, checkMode, reportErrors) { + function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors, containingMessageChain) { + var errorOutputContainer = { errors: undefined, skipLogging: true }; if (ts.isJsxOpeningLikeElement(node)) { - return checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors); + if (!checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors, containingMessageChain, errorOutputContainer)) { + ts.Debug.assert(!reportErrors || !!errorOutputContainer.errors, "jsx should have errors when reporting errors"); + return errorOutputContainer.errors || ts.emptyArray; + } + return undefined; } var thisType = getThisTypeOfSignature(signature); if (thisType && thisType !== voidType && node.kind !== 193 /* NewExpression */) { @@ -50839,8 +51834,9 @@ var ts; var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; var headMessage_1 = ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; - if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage_1)) { - return false; + if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage_1, containingMessageChain, errorOutputContainer)) { + ts.Debug.assert(!reportErrors || !!errorOutputContainer.errors, "this parameter should have errors when reporting errors"); + return errorOutputContainer.errors || ts.emptyArray; } } var headMessage = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1; @@ -50855,17 +51851,35 @@ var ts; // we obtain the regular type of any object literal arguments because we may not have inferred complete // parameter types yet and therefore excess property checks may yield false positives (see #17041). var checkArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType; - if (!checkTypeRelatedToAndOptionallyElaborate(checkArgType, paramType, relation, reportErrors ? arg : undefined, arg, headMessage)) { - return false; + if (!checkTypeRelatedToAndOptionallyElaborate(checkArgType, paramType, relation, reportErrors ? arg : undefined, arg, headMessage, containingMessageChain, errorOutputContainer)) { + ts.Debug.assert(!reportErrors || !!errorOutputContainer.errors, "parameter should have errors when reporting errors"); + maybeAddMissingAwaitInfo(arg, checkArgType, paramType); + return errorOutputContainer.errors || ts.emptyArray; } } } if (restType) { var spreadType = getSpreadArgumentType(args, argCount, args.length, restType, /*context*/ undefined); var errorNode = reportErrors ? argCount < args.length ? args[argCount] : node : undefined; - return checkTypeRelatedTo(spreadType, restType, relation, errorNode, headMessage); + if (!checkTypeRelatedTo(spreadType, restType, relation, errorNode, headMessage, /*containingMessageChain*/ undefined, errorOutputContainer)) { + ts.Debug.assert(!reportErrors || !!errorOutputContainer.errors, "rest parameter should have errors when reporting errors"); + maybeAddMissingAwaitInfo(errorNode, spreadType, restType); + return errorOutputContainer.errors || ts.emptyArray; + } + } + return undefined; + function maybeAddMissingAwaitInfo(errorNode, source, target) { + if (errorNode && reportErrors && errorOutputContainer.errors && errorOutputContainer.errors.length) { + // Bail if target is Promise-like---something else is wrong + if (getAwaitedTypeOfPromise(target)) { + return; + } + var awaitedTypeOfSource = getAwaitedTypeOfPromise(source); + if (awaitedTypeOfSource && isTypeRelatedTo(awaitedTypeOfSource, target, relation)) { + ts.addRelatedInfo(errorOutputContainer.errors[0], ts.createDiagnosticForNode(errorNode, ts.Diagnostics.Did_you_forget_to_use_await)); + } + } } - return true; } /** * Returns the this argument in calls like x.f(...) and x[f](...). Undefined otherwise. @@ -50982,6 +51996,31 @@ var ts; return ts.Debug.fail(); } } + function getDiagnosticSpanForCallNode(node, doNotIncludeArguments) { + var start; + var length; + var sourceFile = ts.getSourceFileOfNode(node); + if (ts.isPropertyAccessExpression(node.expression)) { + var nameSpan = ts.getErrorSpanForNode(sourceFile, node.expression.name); + start = nameSpan.start; + length = doNotIncludeArguments ? nameSpan.length : node.end - start; + } + else { + var expressionSpan = ts.getErrorSpanForNode(sourceFile, node.expression); + start = expressionSpan.start; + length = doNotIncludeArguments ? expressionSpan.length : node.end - start; + } + return { start: start, length: length, sourceFile: sourceFile }; + } + function getDiagnosticForCallNode(node, message, arg0, arg1, arg2, arg3) { + if (ts.isCallExpression(node)) { + var _a = getDiagnosticSpanForCallNode(node), sourceFile = _a.sourceFile, start = _a.start, length_4 = _a.length; + return ts.createFileDiagnostic(sourceFile, start, length_4, message, arg0, arg1, arg2, arg3); + } + else { + return ts.createDiagnosticForNode(node, message, arg0, arg1, arg2, arg3); + } + } function getArgumentArityError(node, signatures, args) { var min = Number.POSITIVE_INFINITY; var max = Number.NEGATIVE_INFINITY; @@ -51023,10 +52062,10 @@ var ts; } } if (min < argCount && argCount < max) { - return ts.createDiagnosticForNode(node, ts.Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, argCount, belowArgCount, aboveArgCount); + return getDiagnosticForCallNode(node, ts.Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, argCount, belowArgCount, aboveArgCount); } if (!hasSpreadArgument && argCount < min) { - var diagnostic_1 = ts.createDiagnosticForNode(node, error, paramRange, argCount); + var diagnostic_1 = getDiagnosticForCallNode(node, error, paramRange, argCount); return related ? ts.addRelatedInfo(diagnostic_1, related) : diagnostic_1; } if (hasRestParameter || hasSpreadArgument) { @@ -51093,7 +52132,7 @@ var ts; reorderCandidates(signatures, candidates); if (!candidates.length) { if (reportErrors) { - diagnostics.add(ts.createDiagnosticForNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures)); + diagnostics.add(getDiagnosticForCallNode(node, ts.Diagnostics.Call_target_does_not_contain_any_signatures)); } return resolveErrorCall(node); } @@ -51133,7 +52172,7 @@ var ts; // function foo(): void; // foo(0); // - var candidateForArgumentError; + var candidatesForArgumentError; var candidateForArgumentArityError; var candidateForTypeArgumentError; var result; @@ -51164,8 +52203,66 @@ var ts; // If candidate is undefined, it means that no candidates had a suitable arity. In that case, // skip the checkApplicableSignature check. if (reportErrors) { - if (candidateForArgumentError) { - checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, 0 /* Normal */, /*reportErrors*/ true); + if (candidatesForArgumentError) { + if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) { + var last_2 = candidatesForArgumentError[candidatesForArgumentError.length - 1]; + var chain_1; + if (candidatesForArgumentError.length > 3) { + chain_1 = ts.chainDiagnosticMessages(chain_1, ts.Diagnostics.The_last_overload_gave_the_following_error); + chain_1 = ts.chainDiagnosticMessages(chain_1, ts.Diagnostics.No_overload_matches_this_call); + } + var diags = getSignatureApplicabilityError(node, args, last_2, assignableRelation, 0 /* Normal */, /*reportErrors*/ true, function () { return chain_1; }); + if (diags) { + for (var _i = 0, diags_1 = diags; _i < diags_1.length; _i++) { + var d = diags_1[_i]; + if (last_2.declaration && candidatesForArgumentError.length > 3) { + ts.addRelatedInfo(d, ts.createDiagnosticForNode(last_2.declaration, ts.Diagnostics.The_last_overload_is_declared_here)); + } + diagnostics.add(d); + } + } + else { + ts.Debug.fail("No error for last overload signature"); + } + } + else { + var allDiagnostics = []; + var max = 0; + var min_3 = Number.MAX_VALUE; + var minIndex = 0; + var i_1 = 0; + var _loop_12 = function (c) { + var chain_2 = function () { return ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); }; + var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0 /* Normal */, /*reportErrors*/ true, chain_2); + if (diags_2) { + if (diags_2.length <= min_3) { + min_3 = diags_2.length; + minIndex = i_1; + } + max = Math.max(max, diags_2.length); + allDiagnostics.push(diags_2); + } + else { + ts.Debug.fail("No error for 3 or fewer overload signatures"); + } + i_1++; + }; + for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) { + var c = candidatesForArgumentError_1[_a]; + _loop_12(c); + } + var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics); + ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures"); + var chain = ts.chainDiagnosticMessages(ts.map(diags_3, function (d) { return typeof d.messageText === "string" ? d : d.messageText; }), ts.Diagnostics.No_overload_matches_this_call); + var related = ts.flatMap(diags_3, function (d) { return d.relatedInformation; }); + if (ts.every(diags_3, function (d) { return d.start === diags_3[0].start && d.length === diags_3[0].length && d.file === diags_3[0].file; })) { + var _b = diags_3[0], file = _b.file, start = _b.start, length_5 = _b.length; + diagnostics.add({ file: file, start: start, length: length_5, code: chain.code, category: chain.category, messageText: chain, relatedInformation: related }); + } + else { + diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(node, chain, related)); + } + } } else if (candidateForArgumentArityError) { diagnostics.add(getArgumentArityError(node, [candidateForArgumentArityError], args)); @@ -51182,14 +52279,14 @@ var ts; diagnostics.add(getArgumentArityError(node, signaturesWithCorrectTypeArgumentArity, args)); } else if (fallbackError) { - diagnostics.add(ts.createDiagnosticForNode(node, fallbackError)); + diagnostics.add(getDiagnosticForCallNode(node, fallbackError)); } } } return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray); function chooseOverload(candidates, relation, signatureHelpTrailingComma) { if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } - candidateForArgumentError = undefined; + candidatesForArgumentError = undefined; candidateForArgumentArityError = undefined; candidateForTypeArgumentError = undefined; if (isSingleNonGenericCandidate) { @@ -51197,8 +52294,8 @@ var ts; if (typeArguments || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma)) { return undefined; } - if (!checkApplicableSignature(node, args, candidate, relation, 0 /* Normal */, /*reportErrors*/ false)) { - candidateForArgumentError = candidate; + if (getSignatureApplicabilityError(node, args, candidate, relation, 0 /* Normal */, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { + candidatesForArgumentError = [candidate]; return undefined; } return candidate; @@ -51235,11 +52332,9 @@ var ts; else { checkCandidate = candidate; } - if (!checkApplicableSignature(node, args, checkCandidate, relation, argCheckMode, /*reportErrors*/ false)) { + if (getSignatureApplicabilityError(node, args, checkCandidate, relation, argCheckMode, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { // Give preference to error candidates that have no rest parameters (as they are more specific) - if (!candidateForArgumentError || getEffectiveRestType(candidateForArgumentError) || !getEffectiveRestType(checkCandidate)) { - candidateForArgumentError = checkCandidate; - } + (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate); continue; } if (argCheckMode) { @@ -51257,11 +52352,9 @@ var ts; continue; } } - if (!checkApplicableSignature(node, args, checkCandidate, relation, argCheckMode, /*reportErrors*/ false)) { + if (getSignatureApplicabilityError(node, args, checkCandidate, relation, argCheckMode, /*reportErrors*/ false, /*containingMessageChain*/ undefined)) { // Give preference to error candidates that have no rest parameters (as they are more specific) - if (!candidateForArgumentError || getEffectiveRestType(candidateForArgumentError) || !getEffectiveRestType(checkCandidate)) { - candidateForArgumentError = checkCandidate; - } + (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate); continue; } } @@ -51290,7 +52383,7 @@ var ts; } var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max; var parameters = []; - var _loop_11 = function (i) { + var _loop_13 = function (i) { var symbols = ts.mapDefined(candidates, function (_a) { var parameters = _a.parameters, hasRestParameter = _a.hasRestParameter; return hasRestParameter ? @@ -51301,7 +52394,7 @@ var ts; parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); }))); }; for (var i = 0; i < maxNonRestParam; i++) { - _loop_11(i); + _loop_13(i); } var restParameterSymbols = ts.mapDefined(candidates, function (c) { return c.hasRestParameter ? ts.last(c.parameters) : undefined; }); var hasRestParameter = restParameterSymbols.length !== 0; @@ -51440,7 +52533,7 @@ var ts; relatedInformation = ts.createDiagnosticForNode(node.expression, ts.Diagnostics.It_is_highly_likely_that_you_are_missing_a_semicolon); } } - invocationError(node, apparentType, 0 /* Call */, relatedInformation); + invocationError(node.expression, apparentType, 0 /* Call */, relatedInformation); } return resolveErrorCall(node); } @@ -51547,7 +52640,7 @@ var ts; } return signature; } - invocationError(node, expressionType, 1 /* Construct */); + invocationError(node.expression, expressionType, 1 /* Construct */); return resolveErrorCall(node); } function typeHasProtectedAccessibleBase(target, type) { @@ -51613,10 +52706,74 @@ var ts; } return true; } - function invocationError(node, apparentType, kind, relatedInformation) { - var diagnostic = error(node, (kind === 0 /* Call */ ? - ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures : - ts.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature), typeToString(apparentType)); + function invocationErrorDetails(apparentType, kind) { + var errorInfo; + var isCall = kind === 0 /* Call */; + var awaitedType = getAwaitedType(apparentType); + var maybeMissingAwait = awaitedType && getSignaturesOfType(awaitedType, kind).length > 0; + if (apparentType.flags & 1048576 /* Union */) { + var types = apparentType.types; + var hasSignatures = false; + for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { + var constituent = types_14[_i]; + var signatures = getSignaturesOfType(constituent, kind); + if (signatures.length !== 0) { + hasSignatures = true; + if (errorInfo) { + // Bail early if we already have an error, no chance of "No constituent of type is callable" + break; + } + } + else { + // Error on the first non callable constituent only + if (!errorInfo) { + errorInfo = ts.chainDiagnosticMessages(errorInfo, isCall ? + ts.Diagnostics.Type_0_has_no_call_signatures : + ts.Diagnostics.Type_0_has_no_construct_signatures, typeToString(constituent)); + errorInfo = ts.chainDiagnosticMessages(errorInfo, isCall ? + ts.Diagnostics.Not_all_constituents_of_type_0_are_callable : + ts.Diagnostics.Not_all_constituents_of_type_0_are_constructable, typeToString(apparentType)); + } + if (hasSignatures) { + // Bail early if we already found a siganture, no chance of "No constituent of type is callable" + break; + } + } + } + if (!hasSignatures) { + errorInfo = ts.chainDiagnosticMessages( + /* detials */ undefined, isCall ? + ts.Diagnostics.No_constituent_of_type_0_is_callable : + ts.Diagnostics.No_constituent_of_type_0_is_constructable, typeToString(apparentType)); + } + if (!errorInfo) { + errorInfo = ts.chainDiagnosticMessages(errorInfo, isCall ? + ts.Diagnostics.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other : + ts.Diagnostics.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other, typeToString(apparentType)); + } + } + else { + errorInfo = ts.chainDiagnosticMessages(errorInfo, isCall ? + ts.Diagnostics.Type_0_has_no_call_signatures : + ts.Diagnostics.Type_0_has_no_construct_signatures, typeToString(apparentType)); + } + return { + messageChain: ts.chainDiagnosticMessages(errorInfo, isCall ? ts.Diagnostics.This_expression_is_not_callable : ts.Diagnostics.This_expression_is_not_constructable), + relatedMessage: maybeMissingAwait ? ts.Diagnostics.Did_you_forget_to_use_await : undefined, + }; + } + function invocationError(errorTarget, apparentType, kind, relatedInformation) { + var _a = invocationErrorDetails(apparentType, kind), messageChain = _a.messageChain, relatedInfo = _a.relatedMessage; + var diagnostic = ts.createDiagnosticForNodeFromMessageChain(errorTarget, messageChain); + if (relatedInfo) { + ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(errorTarget, relatedInfo)); + } + if (ts.isCallExpression(errorTarget.parent)) { + var _b = getDiagnosticSpanForCallNode(errorTarget.parent, /* doNotIncludeArguments */ true), start = _b.start, length_6 = _b.length; + diagnostic.start = start; + diagnostic.length = length_6; + } + diagnostics.add(diagnostic); invocationErrorRecovery(apparentType, kind, relatedInformation ? ts.addRelatedInfo(diagnostic, relatedInformation) : diagnostic); } function invocationErrorRecovery(apparentType, kind, diagnostic) { @@ -51646,7 +52803,7 @@ var ts; return resolveUntypedCall(node); } if (!callSignatures.length) { - invocationError(node, apparentType, 0 /* Call */); + invocationError(node.tag, apparentType, 0 /* Call */); return resolveErrorCall(node); } return resolveCall(node, callSignatures, candidatesOutArray, checkMode); @@ -51692,9 +52849,12 @@ var ts; } var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); if (!callSignatures.length) { - var errorInfo = ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures, typeToString(apparentType)); - errorInfo = ts.chainDiagnosticMessages(errorInfo, headMessage); - var diag = ts.createDiagnosticForNodeFromMessageChain(node, errorInfo); + var errorDetails = invocationErrorDetails(apparentType, 0 /* Call */); + var messageChain = ts.chainDiagnosticMessages(errorDetails.messageChain, headMessage); + var diag = ts.createDiagnosticForNodeFromMessageChain(node.expression, messageChain); + if (errorDetails.relatedMessage) { + ts.addRelatedInfo(diag, ts.createDiagnosticForNode(node.expression, errorDetails.relatedMessage)); + } diagnostics.add(diag); invocationErrorRecovery(apparentType, 0 /* Call */, diag); return resolveErrorCall(node); @@ -51706,8 +52866,8 @@ var ts; var exports = namespace && getExportsOfSymbol(namespace); // We fake up a SFC signature for each intrinsic, however a more specific per-element signature drawn from the JSX declaration // file would probably be preferable. - var typeSymbol = exports && getSymbol(exports, JsxNames.Element, 67897832 /* Type */); - var returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 67897832 /* Type */, node); + var typeSymbol = exports && getSymbol(exports, JsxNames.Element, 788968 /* Type */); + var returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 788968 /* Type */, node); var declaration = ts.createFunctionTypeNode(/*typeParameters*/ undefined, [ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotdotdot*/ undefined, "props", /*questionMark*/ undefined, nodeBuilder.typeToTypeNode(result, node))], returnNode ? ts.createTypeReferenceNode(returnNode, /*typeArguments*/ undefined) : ts.createKeywordTypeNode(121 /* AnyKeyword */)); var parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, "props"); parameterSymbol.type = result; @@ -51844,7 +53004,7 @@ var ts; ts.isVariableDeclaration(decl.parent) && getSymbolOfNode(decl.parent)); var prototype = assignmentSymbol && assignmentSymbol.exports && assignmentSymbol.exports.get("prototype"); var init = prototype && prototype.valueDeclaration && getAssignedJSPrototype(prototype.valueDeclaration); - return init ? checkExpression(init) : undefined; + return init ? getWidenedType(checkExpressionCached(init)) : undefined; } function getAssignedJSPrototype(node) { if (!node.parent) { @@ -51936,7 +53096,7 @@ var ts; if (!globalESSymbol) { return false; } - return globalESSymbol === resolveName(left, "Symbol", 67220415 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); + return globalESSymbol === resolveName(left, "Symbol", 111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false); } function checkImportCallExpression(node) { // Check grammar of dynamic import @@ -51996,7 +53156,7 @@ var ts; // Make sure require is not a local function if (!ts.isIdentifier(node.expression)) return ts.Debug.fail(); - var resolvedRequire = resolveName(node.expression, node.expression.escapedText, 67220415 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); // TODO: GH#18217 + var resolvedRequire = resolveName(node.expression, node.expression.escapedText, 111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); // TODO: GH#18217 if (resolvedRequire === requireSymbol) { return true; } @@ -52019,7 +53179,7 @@ var ts; function checkTaggedTemplateExpression(node) { checkGrammarTypeArguments(node, node.typeArguments); if (languageVersion < 2 /* ES2015 */) { - checkExternalEmitHelpers(node, 65536 /* MakeTemplateObject */); + checkExternalEmitHelpers(node, 131072 /* MakeTemplateObject */); } return getReturnTypeOfSignature(getResolvedSignature(node)); } @@ -52049,6 +53209,9 @@ var ts; var expr = node.expression; if (ts.isIdentifier(expr)) { var symbol = getSymbolAtLocation(expr); + if (symbol && symbol.flags & 2097152 /* Alias */) { + symbol = resolveAlias(symbol); + } return !!(symbol && (symbol.flags & 384 /* Enum */) && getEnumKind(symbol) === 1 /* Literal */); } } @@ -52102,8 +53265,8 @@ var ts; } } function checkImportMetaProperty(node) { - if (languageVersion < 8 /* ESNext */ || moduleKind < ts.ModuleKind.ESNext) { - error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_using_ESNext_for_the_target_and_module_compiler_options); + if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System) { + error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system); } var file = ts.getSourceFileOfNode(node); ts.Debug.assert(!!(file.flags & 1048576 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); @@ -52293,7 +53456,7 @@ var ts; links.type = contextualType; var decl = parameter.valueDeclaration; if (decl.name.kind !== 73 /* Identifier */) { - // if inference didn't come up with anything but {}, fall back to the binding pattern if present. + // if inference didn't come up with anything but unknown, fall back to the binding pattern if present. if (links.type === unknownType) { links.type = getTypeFromBindingPattern(decl.name); } @@ -52341,99 +53504,148 @@ var ts; return errorType; } var functionFlags = ts.getFunctionFlags(func); - var type; - if (func.body.kind !== 219 /* Block */) { - type = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); - if (functionFlags & 2 /* Async */) { + var isAsync = (functionFlags & 2 /* Async */) !== 0; + var isGenerator = (functionFlags & 1 /* Generator */) !== 0; + var returnType; + var yieldType; + var nextType; + var fallbackReturnType = voidType; + if (func.body.kind !== 219 /* Block */) { // Async or normal arrow function + returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); + if (isAsync) { // From within an async function you can return either a non-promise value or a promise. Any // Promise/A+ compatible implementation will always assimilate any foreign promise, so the // return type of the body should be unwrapped to its awaited type, which we will wrap in // the native Promise type later in this function. - type = checkAwaitedType(type, /*errorNode*/ func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); + returnType = checkAwaitedType(returnType, /*errorNode*/ func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); } } - else { + else if (isGenerator) { // Generator or AsyncGenerator function + var returnTypes = checkAndAggregateReturnExpressionTypes(func, checkMode); + if (!returnTypes) { + fallbackReturnType = neverType; + } + else if (returnTypes.length > 0) { + returnType = getUnionType(returnTypes, 2 /* Subtype */); + } + var _a = checkAndAggregateYieldOperandTypes(func, checkMode), yieldTypes = _a.yieldTypes, nextTypes = _a.nextTypes; + yieldType = ts.some(yieldTypes) ? getUnionType(yieldTypes, 2 /* Subtype */) : undefined; + nextType = ts.some(nextTypes) ? getIntersectionType(nextTypes) : undefined; + } + else { // Async or normal function var types = checkAndAggregateReturnExpressionTypes(func, checkMode); - if (functionFlags & 1 /* Generator */) { // Generator or AsyncGenerator function - types = ts.concatenate(checkAndAggregateYieldOperandTypes(func, checkMode), types); - if (!types || types.length === 0) { - var iterableIteratorAny = functionFlags & 2 /* Async */ - ? createAsyncIterableIteratorType(anyType) // AsyncGenerator function - : createIterableIteratorType(anyType); // Generator function - if (noImplicitAny) { - error(func.asteriskToken, ts.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type, typeToString(iterableIteratorAny)); - } - return iterableIteratorAny; - } + if (!types) { + // For an async function, the return type will not be never, but rather a Promise for never. + return functionFlags & 2 /* Async */ + ? createPromiseReturnType(func, neverType) // Async function + : neverType; // Normal function } - else { - if (!types) { - // For an async function, the return type will not be never, but rather a Promise for never. - return functionFlags & 2 /* Async */ - ? createPromiseReturnType(func, neverType) // Async function - : neverType; // Normal function - } - if (types.length === 0) { - // For an async function, the return type will not be void, but rather a Promise for void. - return functionFlags & 2 /* Async */ - ? createPromiseReturnType(func, voidType) // Async function - : voidType; // Normal function - } + if (types.length === 0) { + // For an async function, the return type will not be void, but rather a Promise for void. + return functionFlags & 2 /* Async */ + ? createPromiseReturnType(func, voidType) // Async function + : voidType; // Normal function } // Return a union of the return expression types. - type = getUnionType(types, 2 /* Subtype */); - } - var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); - if (!contextualSignature) { - reportErrorsFromWidening(func, type); + returnType = getUnionType(types, 2 /* Subtype */); } - if (isUnitType(type)) { - var contextualType = !contextualSignature ? undefined : - contextualSignature === getSignatureFromDeclaration(func) ? type : - getReturnTypeOfSignature(contextualSignature); - if (contextualType) { - switch (functionFlags & 3 /* AsyncGenerator */) { - case 3 /* AsyncGenerator */: - contextualType = getIteratedTypeOfGenerator(contextualType, /*isAsyncGenerator*/ true); - break; - case 1 /* Generator */: - contextualType = getIteratedTypeOfGenerator(contextualType, /*isAsyncGenerator*/ false); - break; - case 2 /* Async */: - contextualType = getPromisedTypeOfPromise(contextualType); - break; + if (returnType || yieldType || nextType) { + var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); + if (!contextualSignature) { + if (yieldType) + reportErrorsFromWidening(func, yieldType, 1 /* GeneratorYield */); + if (returnType) + reportErrorsFromWidening(func, returnType); + if (nextType) + reportErrorsFromWidening(func, nextType); + } + if (returnType && isUnitType(returnType) || + yieldType && isUnitType(yieldType) || + nextType && isUnitType(nextType)) { + var contextualType = !contextualSignature ? undefined : + contextualSignature === getSignatureFromDeclaration(func) ? isGenerator ? undefined : returnType : + instantiateContextualType(getReturnTypeOfSignature(contextualSignature), func); + if (isGenerator) { + yieldType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(yieldType, contextualType, 0 /* Yield */, isAsync); + returnType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(returnType, contextualType, 1 /* Return */, isAsync); + nextType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(nextType, contextualType, 2 /* Next */, isAsync); + } + else { + returnType = getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(returnType, contextualType, isAsync); } } - type = getWidenedLiteralLikeTypeForContextualType(type, contextualType); + if (yieldType) + yieldType = getWidenedType(yieldType); + if (returnType) + returnType = getWidenedType(returnType); + if (nextType) + nextType = getWidenedType(nextType); } - var widenedType = getWidenedType(type); - switch (functionFlags & 3 /* AsyncGenerator */) { - case 3 /* AsyncGenerator */: - return createAsyncIterableIteratorType(widenedType); - case 1 /* Generator */: - return createIterableIteratorType(widenedType); - case 2 /* Async */: - // From within an async function you can return either a non-promise value or a promise. Any - // Promise/A+ compatible implementation will always assimilate any foreign promise, so the - // return type of the body is awaited type of the body, wrapped in a native Promise type. - return createPromiseType(widenedType); - default: - return widenedType; + if (isGenerator) { + return createGeneratorReturnType(yieldType || neverType, returnType || fallbackReturnType, nextType || getContextualIterationType(2 /* Next */, func) || unknownType, isAsync); + } + else { + // From within an async function you can return either a non-promise value or a promise. Any + // Promise/A+ compatible implementation will always assimilate any foreign promise, so the + // return type of the body is awaited type of the body, wrapped in a native Promise type. + return isAsync + ? createPromiseType(returnType || fallbackReturnType) + : returnType || fallbackReturnType; + } + } + function createGeneratorReturnType(yieldType, returnType, nextType, isAsyncGenerator) { + var resolver = isAsyncGenerator ? asyncIterationTypesResolver : syncIterationTypesResolver; + var globalGeneratorType = resolver.getGlobalGeneratorType(/*reportErrors*/ false); + yieldType = resolver.resolveIterationType(yieldType, /*errorNode*/ undefined) || unknownType; + returnType = resolver.resolveIterationType(returnType, /*errorNode*/ undefined) || unknownType; + nextType = resolver.resolveIterationType(nextType, /*errorNode*/ undefined) || unknownType; + if (globalGeneratorType === emptyGenericType) { + // Fall back to the global IterableIterator if returnType is assignable to the expected return iteration + // type of IterableIterator, and the expected next iteration type of IterableIterator is assignable to + // nextType. + var globalType = resolver.getGlobalIterableIteratorType(/*reportErrors*/ false); + var iterationTypes = globalType !== emptyGenericType ? getIterationTypesOfGlobalIterableType(globalType, resolver) : undefined; + var iterableIteratorReturnType = iterationTypes ? iterationTypes.returnType : anyType; + var iterableIteratorNextType = iterationTypes ? iterationTypes.nextType : undefinedType; + if (isTypeAssignableTo(returnType, iterableIteratorReturnType) && + isTypeAssignableTo(iterableIteratorNextType, nextType)) { + if (globalType !== emptyGenericType) { + return createTypeFromGenericGlobalType(globalType, [yieldType]); + } + // The global IterableIterator type doesn't exist, so report an error + resolver.getGlobalIterableIteratorType(/*reportErrors*/ true); + return emptyObjectType; + } + // The global Generator type doesn't exist, so report an error + resolver.getGlobalGeneratorType(/*reportErrors*/ true); + return emptyObjectType; } + return createTypeFromGenericGlobalType(globalGeneratorType, [yieldType, returnType, nextType]); } function checkAndAggregateYieldOperandTypes(func, checkMode) { - var aggregatedTypes = []; + var yieldTypes = []; + var nextTypes = []; var isAsync = (ts.getFunctionFlags(func) & 2 /* Async */) !== 0; ts.forEachYieldExpression(func.body, function (yieldExpression) { - ts.pushIfUnique(aggregatedTypes, getYieldedTypeOfYieldExpression(yieldExpression, isAsync, checkMode)); + var yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType; + ts.pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync)); + var nextType; + if (yieldExpression.asteriskToken) { + var iterationTypes = getIterationTypesOfIterable(yieldExpressionType, isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, yieldExpression.expression); + nextType = iterationTypes && iterationTypes.nextType; + } + else { + nextType = getContextualType(yieldExpression); + } + if (nextType) + ts.pushIfUnique(nextTypes, nextType); }); - return aggregatedTypes; + return { yieldTypes: yieldTypes, nextTypes: nextTypes }; } - function getYieldedTypeOfYieldExpression(node, isAsync, checkMode) { + function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) { var errorNode = node.expression || node; - var expressionType = node.expression ? checkExpression(node.expression, checkMode) : undefinedWideningType; // A `yield*` expression effectively yields everything that its operand yields - var yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(expressionType, errorNode, /*allowStringInput*/ false, isAsync) : expressionType; + var yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType; return !isAsync ? yieldedType : getAwaitedType(yieldedType, errorNode, node.asteriskToken ? ts.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : ts.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); @@ -52490,8 +53702,8 @@ var ts; var witnesses = getSwitchClauseTypeOfWitnesses(node); // notEqualFacts states that the type of the switched value is not equal to every type in the switch. var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, /*hasDefault*/ true); - var type_5 = getBaseConstraintOfType(operandType) || operandType; - return !!(filterType(type_5, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); + var type_4 = getBaseConstraintOfType(operandType) || operandType; + return !!(filterType(type_4, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072 /* Never */); } var type = getTypeOfExpression(node.expression); if (!isLiteralType(type)) { @@ -52572,8 +53784,10 @@ var ts; if (!produceDiagnostics) { return; } + var functionFlags = ts.getFunctionFlags(func); + var type = returnType && getReturnOrPromisedType(returnType, functionFlags); // Functions with with an explicitly specified 'void' or 'any' return type don't need any return expressions. - if (returnType && maybeTypeOfKind(returnType, 1 /* Any */ | 16384 /* Void */)) { + if (type && maybeTypeOfKind(type, 1 /* Any */ | 16384 /* Void */)) { return; } // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. @@ -52582,20 +53796,20 @@ var ts; return; } var hasExplicitReturn = func.flags & 256 /* HasExplicitReturn */; - if (returnType && returnType.flags & 131072 /* Never */) { + if (type && type.flags & 131072 /* Never */) { error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); } - else if (returnType && !hasExplicitReturn) { + else if (type && !hasExplicitReturn) { // minimal check: function has syntactic return type annotation and no explicit return statements in the body // this function does not conform to the specification. // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } - else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) { + else if (type && strictNullChecks && !isTypeAssignableTo(undefinedType, type)) { error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); } else if (compilerOptions.noImplicitReturns) { - if (!returnType) { + if (!type) { // If return type annotation is omitted check if function has any explicit return statements. // If it does not have any - its inferred return type is void - don't do any checks. // Otherwise get inferred return type from function body and report error only if it is not void / anytype @@ -52617,15 +53831,15 @@ var ts; if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) { // Skip parameters, return signature with return type that retains noncontextual parts so inferences can still be drawn in an early stage if (!ts.getEffectiveReturnTypeNode(node) && hasContextSensitiveReturnExpression(node)) { - var links_1 = getNodeLinks(node); - if (links_1.contextFreeType) { - return links_1.contextFreeType; + var links = getNodeLinks(node); + if (links.contextFreeType) { + return links.contextFreeType; } var returnType = getReturnTypeFromBody(node, checkMode); var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, undefined, undefined); - returnOnlyType.objectFlags |= 524288 /* NonInferrableType */; - return links_1.contextFreeType = returnOnlyType; + returnOnlyType.objectFlags |= 1048576 /* NonInferrableType */; + return links.contextFreeType = returnOnlyType; } return anyFunctionType; } @@ -52634,11 +53848,15 @@ var ts; if (!hasGrammarError && node.kind === 197 /* FunctionExpression */) { checkGrammarForGenerator(node); } - var links = getNodeLinks(node); var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); if (isTypeAny(type)) { return type; } + contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); + return type; + } + function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) { + var links = getNodeLinks(node); // Check if function expression is contextually typed and assign parameter types if so. if (!(links.flags & 1024 /* ContextChecked */)) { var contextualSignature = getContextualSignature(node); @@ -52648,6 +53866,10 @@ var ts; if (!(links.flags & 1024 /* ContextChecked */)) { links.flags |= 1024 /* ContextChecked */; if (contextualSignature) { + var type = getTypeOfSymbol(getMergedSymbol(node.symbol)); + if (isTypeAny(type)) { + return; + } var signature = getSignaturesOfType(type, 0 /* Call */)[0]; if (isContextSensitive(node)) { var inferenceContext = getInferenceContext(node); @@ -52668,21 +53890,19 @@ var ts; checkSignatureDeclaration(node); } } - return type; } - function getReturnOrPromisedType(node, functionFlags) { - var type = getReturnTypeFromAnnotation(node); - return type && ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */) ? - getAwaitedType(type) || errorType : type; + function getReturnOrPromisedType(type, functionFlags) { + var isGenerator = !!(functionFlags & 1 /* Generator */); + var isAsync = !!(functionFlags & 2 /* Async */); + return type && isGenerator ? getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, type, isAsync) || errorType : + type && isAsync ? getAwaitedType(type) || errorType : + type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { ts.Debug.assert(node.kind !== 157 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var functionFlags = ts.getFunctionFlags(node); - var returnOrPromisedType = getReturnOrPromisedType(node, functionFlags); - if ((functionFlags & 1 /* Generator */) === 0) { // Async function or normal function - // return is not necessary in the body of generators - checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType); - } + var returnType = getReturnTypeFromAnnotation(node); + checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); if (node.body) { if (!ts.getEffectiveReturnTypeNode(node)) { // There are some checks that are only performed in getReturnTypeFromBody, that may produce errors @@ -52702,6 +53922,7 @@ var ts; // check assignability of the awaited type of the expression body against the promised type of // its return type annotation. var exprType = checkExpression(node.body); + var returnOrPromisedType = getReturnOrPromisedType(returnType, functionFlags); if (returnOrPromisedType) { if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */) { // Async function var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); @@ -52714,9 +53935,11 @@ var ts; } } } - function checkArithmeticOperandType(operand, type, diagnostic) { + function checkArithmeticOperandType(operand, type, diagnostic, isAwaitValid) { + if (isAwaitValid === void 0) { isAwaitValid = false; } if (!isTypeAssignableTo(type, numberOrBigIntType)) { - error(operand, diagnostic); + var awaitedType = isAwaitValid && getAwaitedTypeOfPromise(type); + errorAndMaybeSuggestAwait(operand, !!awaitedType && isTypeAssignableTo(awaitedType, numberOrBigIntType), diagnostic); return false; } return true; @@ -52853,7 +54076,11 @@ var ts; } } var operandType = checkExpression(node.expression); - return checkAwaitedType(operandType, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); + var awaitedType = checkAwaitedType(operandType, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); + if (awaitedType === operandType && awaitedType !== errorType && !(operandType.flags & 3 /* AnyOrUnknown */)) { + addErrorOrSuggestion(/*isError*/ false, ts.createDiagnosticForNode(node, ts.Diagnostics.await_has_no_effect_on_the_type_of_this_expression)); + } + return awaitedType; } function checkPrefixUnaryExpression(node) { var operandType = checkExpression(node.operand); @@ -53048,7 +54275,7 @@ var ts; error(property, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { - if (languageVersion < 8 /* ESNext */) { + if (languageVersion < 99 /* ESNext */) { checkExternalEmitHelpers(property, 4 /* Rest */); } var nonRestNames = []; @@ -53077,7 +54304,7 @@ var ts; // This elementType will be used if the specific property corresponding to this index is not // present (aka the tuple element property). This call also checks that the parentType is in // fact an iterable or array (depending on target language). - var elementType = checkIteratedTypeOrElementType(sourceType, node, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || errorType; + var elementType = checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType; for (var i = 0; i < elements.length; i++) { checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode); } @@ -53092,8 +54319,10 @@ var ts; if (isArrayLikeType(sourceType)) { // We create a synthetic expression so that getIndexedAccessType doesn't get confused // when the element is a SyntaxKind.ElementAccessExpression. - var elementType_2 = getIndexedAccessType(sourceType, indexType, createSyntheticExpression(element, indexType)); - var type = getFlowTypeOfDestructuring(element, elementType_2); + var accessFlags = hasDefaultValue(element) ? 8 /* NoTupleBoundsCheck */ : 0; + var elementType_2 = getIndexedAccessTypeOrUndefined(sourceType, indexType, createSyntheticExpression(element, indexType), accessFlags) || errorType; + var assignedType = hasDefaultValue(element) ? getTypeWithFacts(elementType_2, 524288 /* NEUndefined */) : elementType_2; + var type = getFlowTypeOfDestructuring(element, assignedType); return checkDestructuringAssignment(element, type, checkMode); } return checkDestructuringAssignment(element, elementType, checkMode); @@ -53280,8 +54509,8 @@ var ts; } else { // otherwise just check each operand separately and report errors as normal - var leftOk = checkArithmeticOperandType(left, leftType, ts.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type); - var rightOk = checkArithmeticOperandType(right, rightType, ts.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type); + var leftOk = checkArithmeticOperandType(left, leftType, ts.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, /*isAwaitValid*/ true); + var rightOk = checkArithmeticOperandType(right, rightType, ts.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, /*isAwaitValid*/ true); var resultType_1; // If both are any or unknown, allow operation; assume it will resolve to number if ((isTypeAssignableToKind(leftType, 3 /* AnyOrUnknown */) && isTypeAssignableToKind(rightType, 3 /* AnyOrUnknown */)) || @@ -53289,7 +54518,7 @@ var ts; !(maybeTypeOfKind(leftType, 2112 /* BigIntLike */) || maybeTypeOfKind(rightType, 2112 /* BigIntLike */))) { resultType_1 = numberType; } - // At least one is assignable to bigint, so both should be only assignable to bigint + // At least one is assignable to bigint, so check that both are else if (isTypeAssignableToKind(leftType, 2112 /* BigIntLike */) && isTypeAssignableToKind(rightType, 2112 /* BigIntLike */)) { switch (operator) { case 48 /* GreaterThanGreaterThanGreaterThanToken */: @@ -53298,8 +54527,9 @@ var ts; } resultType_1 = bigintType; } + // Exactly one of leftType/rightType is assignable to bigint else { - reportOperatorError(); + reportOperatorError(function (awaitedLeft, awaitedRight) { return isTypeAssignableToKind(awaitedLeft, 2112 /* BigIntLike */) && isTypeAssignableToKind(awaitedRight, 2112 /* BigIntLike */); }); resultType_1 = errorType; } if (leftOk && rightOk) { @@ -53340,7 +54570,15 @@ var ts; return resultType; } if (!resultType) { - reportOperatorError(); + // Types that have a reasonably good chance of being a valid operand type. + // If both types have an awaited type of one of these, we’ll assume the user + // might be missing an await without doing an exhaustive check that inserting + // await(s) will actually be a completely valid binary expression. + var closeEnoughKind_1 = 296 /* NumberLike */ | 2112 /* BigIntLike */ | 132 /* StringLike */ | 3 /* AnyOrUnknown */; + reportOperatorError(function (awaitedLeft, awaitedRight) { + return isTypeAssignableToKind(awaitedLeft, closeEnoughKind_1) && + isTypeAssignableToKind(awaitedRight, closeEnoughKind_1); + }); return anyType; } if (operator === 61 /* PlusEqualsToken */) { @@ -53354,19 +54592,16 @@ var ts; if (checkForDisallowedESSymbolOperand(operator)) { leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left)); rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right)); - if (!(isTypeComparableTo(leftType, rightType) || isTypeComparableTo(rightType, leftType) || - (isTypeAssignableTo(leftType, numberOrBigIntType) && isTypeAssignableTo(rightType, numberOrBigIntType)))) { - reportOperatorError(); - } + reportOperatorErrorUnless(function (left, right) { + return isTypeComparableTo(left, right) || isTypeComparableTo(right, left) || (isTypeAssignableTo(left, numberOrBigIntType) && isTypeAssignableTo(right, numberOrBigIntType)); + }); } return booleanType; case 33 /* EqualsEqualsToken */: case 34 /* ExclamationEqualsToken */: case 35 /* EqualsEqualsEqualsToken */: case 36 /* ExclamationEqualsEqualsToken */: - if (!isTypeEqualityComparableTo(leftType, rightType) && !isTypeEqualityComparableTo(rightType, leftType)) { - reportOperatorError(); - } + reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); }); return booleanType; case 95 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); @@ -53414,7 +54649,7 @@ var ts; var propType = getTypeOfSymbol(prop); if (propType.symbol && propType.symbol.flags & 32 /* Class */) { var name = prop.escapedName; - var symbol = resolveName(prop.valueDeclaration, name, 67897832 /* Type */, undefined, name, /*isUse*/ false); + var symbol = resolveName(prop.valueDeclaration, name, 788968 /* Type */, undefined, name, /*isUse*/ false); if (symbol && symbol.declarations.some(ts.isJSDocTypedefTag)) { grammarErrorOnNode(symbol.declarations[0], ts.Diagnostics.Duplicate_identifier_0, ts.unescapeLeadingUnderscores(name)); return grammarErrorOnNode(prop.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0, ts.unescapeLeadingUnderscores(name)); @@ -53484,21 +54719,44 @@ var ts; return false; } } - function reportOperatorError() { - var _a = getTypeNamesForErrorDisplay(leftType, rightType), leftStr = _a[0], rightStr = _a[1]; + /** + * Returns true if an error is reported + */ + function reportOperatorErrorUnless(typesAreCompatible) { + if (!typesAreCompatible(leftType, rightType)) { + reportOperatorError(typesAreCompatible); + return true; + } + return false; + } + function reportOperatorError(awaitedTypesAreCompatible) { + var wouldWorkWithAwait = false; var errNode = errorNode || operatorToken; - if (!tryGiveBetterPrimaryError(errNode, leftStr, rightStr)) { - error(errNode, ts.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2, ts.tokenToString(operatorToken.kind), leftStr, rightStr); + var _a = getTypeNamesForErrorDisplay(leftType, rightType), leftStr = _a[0], rightStr = _a[1]; + if (awaitedTypesAreCompatible) { + var awaitedLeftType = getAwaitedType(leftType); + var awaitedRightType = getAwaitedType(rightType); + wouldWorkWithAwait = !(awaitedLeftType === leftType && awaitedRightType === rightType) + && !!(awaitedLeftType && awaitedRightType) + && awaitedTypesAreCompatible(awaitedLeftType, awaitedRightType); + } + if (!tryGiveBetterPrimaryError(errNode, wouldWorkWithAwait, leftStr, rightStr)) { + errorAndMaybeSuggestAwait(errNode, wouldWorkWithAwait, ts.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2, ts.tokenToString(operatorToken.kind), leftStr, rightStr); } } - function tryGiveBetterPrimaryError(errNode, leftStr, rightStr) { + function tryGiveBetterPrimaryError(errNode, maybeMissingAwait, leftStr, rightStr) { + var typeName; switch (operatorToken.kind) { case 35 /* EqualsEqualsEqualsToken */: case 33 /* EqualsEqualsToken */: - return error(errNode, ts.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap, "false", leftStr, rightStr); + typeName = "false"; + break; case 36 /* ExclamationEqualsEqualsToken */: case 34 /* ExclamationEqualsToken */: - return error(errNode, ts.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap, "true", leftStr, rightStr); + typeName = "true"; + } + if (typeName) { + return errorAndMaybeSuggestAwait(errNode, maybeMissingAwait, ts.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap, typeName, leftStr, rightStr); } return undefined; } @@ -53536,31 +54794,41 @@ var ts; // If the user's code is syntactically correct, the func should always have a star. After all, we are in a yield context. return anyType; } + var isAsync = (functionFlags & 2 /* Async */) !== 0; if (node.asteriskToken) { // Async generator functions prior to ESNext require the __await, __asyncDelegator, // and __asyncValues helpers - if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && - languageVersion < 8 /* ESNext */) { - checkExternalEmitHelpers(node, 26624 /* AsyncDelegatorIncludes */); + if (isAsync && languageVersion < 99 /* ESNext */) { + checkExternalEmitHelpers(node, 53248 /* AsyncDelegatorIncludes */); } // Generator functions prior to ES2015 require the __values helper - if ((functionFlags & 3 /* AsyncGenerator */) === 1 /* Generator */ && - languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (!isAsync && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 256 /* Values */); } } - var isAsync = (functionFlags & 2 /* Async */) !== 0; - var yieldedType = getYieldedTypeOfYieldExpression(node, isAsync); // TODO: GH#18217 // There is no point in doing an assignability check if the function // has no explicit return type because the return type is directly computed // from the yield expressions. var returnType = getReturnTypeFromAnnotation(func); - if (returnType) { - var signatureElementType = getIteratedTypeOfGenerator(returnType, isAsync) || anyType; - checkTypeAssignableToAndOptionallyElaborate(yieldedType, signatureElementType, node.expression || node, node.expression); + var iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync); + var signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType; + var signatureNextType = iterationTypes && iterationTypes.nextType || anyType; + var resolvedSignatureNextType = isAsync ? getAwaitedType(signatureNextType) || anyType : signatureNextType; + var yieldExpressionType = node.expression ? checkExpression(node.expression) : undefinedWideningType; + var yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, resolvedSignatureNextType, isAsync); + if (returnType && yieldedType) { + checkTypeAssignableToAndOptionallyElaborate(yieldedType, signatureYieldType, node.expression || node, node.expression); } - // Both yield and yield* expressions have type 'any' - return anyType; + if (node.asteriskToken) { + var use = isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */; + return getIterationTypeOfIterable(use, 1 /* Return */, yieldExpressionType, node.expression) + || anyType; + } + else if (returnType) { + return getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, isAsync) + || anyType; + } + return getContextualIterationType(2 /* Next */, func) || anyType; } function checkConditionalExpression(node, checkMode) { checkTruthinessExpression(node.condition); @@ -53626,10 +54894,13 @@ var ts; function checkDeclarationInitializer(declaration) { var initializer = ts.getEffectiveInitializer(declaration); var type = getTypeOfExpression(initializer, /*cache*/ true); + var padded = ts.isParameter(declaration) && declaration.name.kind === 186 /* ArrayBindingPattern */ && + isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? + padTupleType(type, declaration.name) : type; var widened = ts.getCombinedNodeFlags(declaration) & 2 /* Const */ || ts.isDeclarationReadonly(declaration) || isTypeAssertion(initializer) || - isLiteralOfContextualType(type, getContextualType(initializer)) ? type : getWidenedLiteralType(type); + isLiteralOfContextualType(padded, getContextualType(initializer)) ? padded : getWidenedLiteralType(padded); if (ts.isInJSFile(declaration)) { if (widened.flags & 98304 /* Nullable */) { reportImplicitAny(declaration, anyType); @@ -53642,6 +54913,21 @@ var ts; } return widened; } + function padTupleType(type, pattern) { + var patternElements = pattern.elements; + var arity = getTypeReferenceArity(type); + var elementTypes = arity ? type.typeArguments.slice() : []; + for (var i = arity; i < patternElements.length; i++) { + var e = patternElements[i]; + if (i < patternElements.length - 1 || !(e.kind === 187 /* BindingElement */ && e.dotDotDotToken)) { + elementTypes.push(!ts.isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement(e, /*includePatternInType*/ false, /*reportErrors*/ false) : anyType); + if (!ts.isOmittedExpression(e) && !hasDefaultValue(e)) { + reportImplicitAny(e, anyType); + } + } + } + return createTupleType(elementTypes, type.target.minLength, /*hasRestElement*/ false, type.target.readonly); + } function isLiteralOfContextualType(candidateType, contextualType) { if (contextualType) { if (contextualType.flags & 3145728 /* UnionOrIntersection */) { @@ -53732,21 +55018,21 @@ var ts; var instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters); // Infer from the parameters of the instantiated signature to the parameters of the // contextual signature starting with an empty set of inference candidates. - var inferences_2 = ts.map(context.inferences, function (info) { return createInferenceInfo(info.typeParameter); }); + var inferences_3 = ts.map(context.inferences, function (info) { return createInferenceInfo(info.typeParameter); }); applyToParameterTypes(instantiatedSignature, contextualSignature, function (source, target) { - inferTypes(inferences_2, source, target, /*priority*/ 0, /*contravariant*/ true); + inferTypes(inferences_3, source, target, /*priority*/ 0, /*contravariant*/ true); }); - if (ts.some(inferences_2, hasInferenceCandidates)) { + if (ts.some(inferences_3, hasInferenceCandidates)) { // We have inference candidates, indicating that one or more type parameters are referenced // in the parameter types of the contextual signature. Now also infer from the return type. applyToReturnTypes(instantiatedSignature, contextualSignature, function (source, target) { - inferTypes(inferences_2, source, target); + inferTypes(inferences_3, source, target); }); // If the type parameters for which we produced candidates do not have any inferences yet, // we adopt the new inference candidates and add the type parameters of the expression type // to the set of inferred type parameters for the outer function return type. - if (!hasOverlappingInferences(context.inferences, inferences_2)) { - mergeInferences(context.inferences, inferences_2); + if (!hasOverlappingInferences(context.inferences, inferences_3)) { + mergeInferences(context.inferences, inferences_3); context.inferredTypeParameters = ts.concatenate(context.inferredTypeParameters, uniqueTypeParameters); return getOrCreateTypeFromSignature(instantiatedSignature); } @@ -53875,6 +55161,7 @@ var ts; function checkExpression(node, checkMode, forceTuple) { var saveCurrentNode = currentNode; currentNode = node; + instantiationCount = 0; var uninstantiatedType = checkExpressionWorker(node, checkMode, forceTuple); var type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode); if (isConstEnumObjectType(type)) { @@ -53891,7 +55178,8 @@ var ts; var ok = (node.parent.kind === 190 /* PropertyAccessExpression */ && node.parent.expression === node) || (node.parent.kind === 191 /* ElementAccessExpression */ && node.parent.expression === node) || ((node.kind === 73 /* Identifier */ || node.kind === 149 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || - (node.parent.kind === 168 /* TypeQuery */ && node.parent.exprName === node)); + (node.parent.kind === 168 /* TypeQuery */ && node.parent.exprName === node)) || + (node.parent.kind === 258 /* ExportSpecifier */ && (compilerOptions.preserveConstEnums || node.flags & 4194304 /* Ambient */)); // We allow reexporting const enums if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } @@ -53911,7 +55199,18 @@ var ts; return checkExpression(node.expression, checkMode); } function checkExpressionWorker(node, checkMode, forceTuple) { - switch (node.kind) { + var kind = node.kind; + if (cancellationToken) { + // Only bother checking on a few construct kinds. We don't want to be excessively + // hitting the cancellation token on every node we check. + switch (kind) { + case 210 /* ClassExpression */: + case 197 /* FunctionExpression */: + case 198 /* ArrowFunction */: + cancellationToken.throwIfCancellationRequested(); + } + } + switch (kind) { case 73 /* Identifier */: return checkIdentifier(node); case 101 /* ThisKeyword */: @@ -54156,8 +55455,8 @@ var ts; var functionFlags = ts.getFunctionFlags(node); if (!(functionFlags & 4 /* Invalid */)) { // Async generators prior to ESNext require the __await and __asyncGenerator helpers - if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && languageVersion < 8 /* ESNext */) { - checkExternalEmitHelpers(node, 6144 /* AsyncGeneratorIncludes */); + if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && languageVersion < 99 /* ESNext */) { + checkExternalEmitHelpers(node, 12288 /* AsyncGeneratorIncludes */); } // Async functions prior to ES2017 require the __awaiter helper if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ && languageVersion < 4 /* ES2017 */) { @@ -54196,17 +55495,17 @@ var ts; error(returnTypeNode, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { - var generatorElementType = getIteratedTypeOfGenerator(returnType, (functionFlags_1 & 2 /* Async */) !== 0) || anyType; - var iterableIteratorInstantiation = functionFlags_1 & 2 /* Async */ - ? createAsyncIterableIteratorType(generatorElementType) // AsyncGenerator function - : createIterableIteratorType(generatorElementType); // Generator function - // Naively, one could check that IterableIterator is assignable to the return type annotation. + // Naively, one could check that Generator is assignable to the return type annotation. // However, that would not catch the error in the following case. // // interface BadGenerator extends Iterable, Iterator { } // function* g(): BadGenerator { } // Iterable and Iterator have different types! // - checkTypeAssignableTo(iterableIteratorInstantiation, returnType, returnTypeNode); + var generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags_1 & 2 /* Async */) !== 0) || anyType; + var generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags_1 & 2 /* Async */) !== 0) || generatorYieldType; + var generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags_1 & 2 /* Async */) !== 0) || unknownType; + var generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags_1 & 2 /* Async */)); + checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeNode); } } else if ((functionFlags_1 & 3 /* AsyncGenerator */) === 2 /* Async */) { @@ -54219,13 +55518,6 @@ var ts; } } function checkClassForDuplicateDeclarations(node) { - var Declaration; - (function (Declaration) { - Declaration[Declaration["Getter"] = 1] = "Getter"; - Declaration[Declaration["Setter"] = 2] = "Setter"; - Declaration[Declaration["Method"] = 4] = "Method"; - Declaration[Declaration["Property"] = 3] = "Property"; - })(Declaration || (Declaration = {})); var instanceNames = ts.createUnderscoreEscapedMap(); var staticNames = ts.createUnderscoreEscapedMap(); for (var _i = 0, _a = node.members; _i < _a.length; _i++) { @@ -54233,8 +55525,8 @@ var ts; if (member.kind === 158 /* Constructor */) { for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { var param = _c[_b]; - if (ts.isParameterPropertyDeclaration(param) && !ts.isBindingPattern(param.name)) { - addName(instanceNames, param.name, param.name.escapedText, 3 /* Property */); + if (ts.isParameterPropertyDeclaration(param, member) && !ts.isBindingPattern(param.name)) { + addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); } } } @@ -54246,16 +55538,16 @@ var ts; if (name && memberName) { switch (member.kind) { case 159 /* GetAccessor */: - addName(names, name, memberName, 1 /* Getter */); + addName(names, name, memberName, 1 /* GetAccessor */); break; case 160 /* SetAccessor */: - addName(names, name, memberName, 2 /* Setter */); + addName(names, name, memberName, 2 /* SetAccessor */); break; case 155 /* PropertyDeclaration */: - addName(names, name, memberName, 3 /* Property */); + addName(names, name, memberName, 3 /* GetOrSetAccessor */); break; case 157 /* MethodDeclaration */: - addName(names, name, memberName, 4 /* Method */); + addName(names, name, memberName, 8 /* Method */); break; } } @@ -54264,8 +55556,8 @@ var ts; function addName(names, location, name, meaning) { var prev = names.get(name); if (prev) { - if (prev & 4 /* Method */) { - if (meaning !== 4 /* Method */) { + if (prev & 8 /* Method */) { + if (meaning !== 8 /* Method */) { error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location)); } } @@ -54645,9 +55937,20 @@ var ts; } // Check if we're indexing with a numeric type and if either object or index types // is a generic type with a constraint that has a numeric index signature. - if (getIndexInfoOfType(getApparentType(objectType), 1 /* Number */) && isTypeAssignableToKind(indexType, 296 /* NumberLike */)) { + var apparentObjectType = getApparentType(objectType); + if (getIndexInfoOfType(apparentObjectType, 1 /* Number */) && isTypeAssignableToKind(indexType, 296 /* NumberLike */)) { return type; } + if (isGenericObjectType(objectType)) { + var propertyName_1 = getPropertyNameFromIndex(indexType, accessNode); + if (propertyName_1) { + var propertySymbol = forEachType(apparentObjectType, function (t) { return getPropertyOfType(t, propertyName_1); }); + if (propertySymbol && ts.getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) { + error(accessNode, ts.Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, ts.unescapeLeadingUnderscores(propertyName_1)); + return errorType; + } + } + } error(accessNode, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType)); return errorType; } @@ -54822,6 +56125,7 @@ var ts; } var duplicateFunctionDeclaration = false; var multipleConstructorImplementation = false; + var hasNonAmbientClass = false; for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { var current = declarations_4[_i]; var node = current; @@ -54837,6 +56141,9 @@ var ts; // 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one previousDeclaration = undefined; } + if ((node.kind === 241 /* ClassDeclaration */ || node.kind === 210 /* ClassExpression */) && !inAmbientContext) { + hasNonAmbientClass = true; + } if (node.kind === 240 /* FunctionDeclaration */ || node.kind === 157 /* MethodDeclaration */ || node.kind === 156 /* MethodSignature */ || node.kind === 158 /* Constructor */) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -54878,6 +56185,15 @@ var ts; error(ts.getNameOfDeclaration(declaration), ts.Diagnostics.Duplicate_function_implementation); }); } + if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */) { + // A non-ambient class cannot be an implementation for a non-constructor function/class merge + // TODO: The below just replicates our older error from when classes and functions were + // entirely unable to merge - a more helpful message like "Class declaration cannot implement overload list" + // might be warranted. :shrug: + ts.forEach(declarations, function (declaration) { + addDuplicateDeclarationError(ts.getNameOfDeclaration(declaration) || declaration, ts.Diagnostics.Duplicate_identifier_0, ts.symbolName(symbol), ts.filter(declarations, function (d) { return d !== declaration; })); + }); + } // Abstract methods can't have an implementation -- in particular, they don't need one. if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !ts.hasModifier(lastSeenNonAmbientDeclaration, 128 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { @@ -54899,13 +56215,6 @@ var ts; } } } - var DeclarationSpaces; - (function (DeclarationSpaces) { - DeclarationSpaces[DeclarationSpaces["None"] = 0] = "None"; - DeclarationSpaces[DeclarationSpaces["ExportValue"] = 1] = "ExportValue"; - DeclarationSpaces[DeclarationSpaces["ExportType"] = 2] = "ExportType"; - DeclarationSpaces[DeclarationSpaces["ExportNamespace"] = 4] = "ExportNamespace"; - })(DeclarationSpaces || (DeclarationSpaces = {})); function checkExportsOnMergedDeclarations(node) { if (!produceDiagnostics) { return; @@ -54969,8 +56278,9 @@ var ts; case 242 /* InterfaceDeclaration */: case 243 /* TypeAliasDeclaration */: // A jsdoc typedef and callback are, by definition, type aliases - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 306 /* JSDocEnumTag */: return 2 /* ExportType */; case 245 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ @@ -54992,10 +56302,10 @@ var ts; case 249 /* ImportEqualsDeclaration */: case 252 /* NamespaceImport */: case 251 /* ImportClause */: - var result_7 = 0 /* None */; + var result_8 = 0 /* None */; var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result_7 |= getDeclarationSpaces(d); }); - return result_7; + ts.forEach(target.declarations, function (d) { result_8 |= getDeclarationSpaces(d); }); + return result_8; case 238 /* VariableDeclaration */: case 187 /* BindingElement */: case 240 /* FunctionDeclaration */: @@ -55006,9 +56316,9 @@ var ts; } } } - function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage) { + function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage, arg0) { var promisedType = getPromisedTypeOfPromise(type, errorNode); - return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage); + return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage, arg0); } /** * Gets the "promised type" of a promise. @@ -55066,10 +56376,11 @@ var ts; * Promise-like type; otherwise, it is the type of the expression. This is used to reflect * The runtime behavior of the `await` keyword. */ - function checkAwaitedType(type, errorNode, diagnosticMessage) { - return getAwaitedType(type, errorNode, diagnosticMessage) || errorType; + function checkAwaitedType(type, errorNode, diagnosticMessage, arg0) { + var awaitedType = getAwaitedType(type, errorNode, diagnosticMessage, arg0); + return awaitedType || errorType; } - function getAwaitedType(type, errorNode, diagnosticMessage) { + function getAwaitedType(type, errorNode, diagnosticMessage, arg0) { var typeAsAwaitable = type; if (typeAsAwaitable.awaitedTypeOfType) { return typeAsAwaitable.awaitedTypeOfType; @@ -55081,7 +56392,7 @@ var ts; var types = void 0; for (var _i = 0, _a = type.types; _i < _a.length; _i++) { var constituentType = _a[_i]; - types = ts.append(types, getAwaitedType(constituentType, errorNode, diagnosticMessage)); + types = ts.append(types, getAwaitedType(constituentType, errorNode, diagnosticMessage, arg0)); } if (!types) { return undefined; @@ -55131,7 +56442,7 @@ var ts; // Keep track of the type we're about to unwrap to avoid bad recursive promise types. // See the comments above for more information. awaitedTypeStack.push(type.id); - var awaitedType = getAwaitedType(promisedType, errorNode, diagnosticMessage); + var awaitedType = getAwaitedType(promisedType, errorNode, diagnosticMessage, arg0); awaitedTypeStack.pop(); if (!awaitedType) { return undefined; @@ -55158,7 +56469,7 @@ var ts; if (errorNode) { if (!diagnosticMessage) return ts.Debug.fail(); - error(errorNode, diagnosticMessage); + error(errorNode, diagnosticMessage, arg0); } return undefined; } @@ -55225,7 +56536,7 @@ var ts; error(returnTypeNode, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, typeToString(returnType)); return; } - var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 67220415 /* Value */, /*ignoreErrors*/ true); + var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 111551 /* Value */, /*ignoreErrors*/ true); var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : errorType; if (promiseConstructorType === errorType) { if (promiseConstructorName.kind === 73 /* Identifier */ && promiseConstructorName.escapedText === "Promise" && getTargetType(returnType) === getGlobalPromiseType(/*reportErrors*/ false)) { @@ -55248,7 +56559,7 @@ var ts; } // Verify there is no local declaration that could collide with the promise constructor. var rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); - var collidingSymbol = getSymbol(node.locals, rootName.escapedText, 67220415 /* Value */); + var collidingSymbol = getSymbol(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { error(collidingSymbol.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, ts.idText(rootName), ts.entityNameToString(promiseConstructorName)); return; @@ -55305,7 +56616,7 @@ var ts; if (!typeName) return; var rootName = getFirstIdentifier(typeName); - var meaning = (typeName.kind === 73 /* Identifier */ ? 67897832 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */; + var meaning = (typeName.kind === 73 /* Identifier */ ? 788968 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */; var rootSymbol = resolveName(rootName, rootName.escapedText, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isRefernce*/ true); if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */ @@ -55572,10 +56883,7 @@ var ts; } var body = node.kind === 156 /* MethodSignature */ ? undefined : node.body; checkSourceElement(body); - if ((functionFlags & 1 /* Generator */) === 0) { // Async function or normal function - var returnOrPromisedType = getReturnOrPromisedType(node, functionFlags); - checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnOrPromisedType); - } + checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); if (produceDiagnostics && !ts.getEffectiveReturnTypeNode(node)) { // Report an implicit any error if there is no body, no explicit return type, and node is not a private method // in an ambient context @@ -55789,7 +57097,7 @@ var ts; var parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration); var name = local.valueDeclaration && ts.getNameOfDeclaration(local.valueDeclaration); if (parameter && name) { - if (!ts.isParameterPropertyDeclaration(parameter) && !ts.parameterIsThisKeyword(parameter) && !isIdentifierThatStartsWithUnderscore(name)) { + if (!ts.isParameterPropertyDeclaration(parameter, parameter.parent) && !ts.parameterIsThisKeyword(parameter) && !isIdentifierThatStartsWithUnderscore(name)) { addDiagnostic(parameter, 1 /* Parameter */, ts.createDiagnosticForNode(name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, ts.symbolName(local))); } } @@ -56076,7 +57384,7 @@ var ts; } } if (node.kind === 187 /* BindingElement */) { - if (node.parent.kind === 185 /* ObjectBindingPattern */ && languageVersion < 8 /* ESNext */) { + if (node.parent.kind === 185 /* ObjectBindingPattern */ && languageVersion < 99 /* ESNext */) { checkExternalEmitHelpers(node, 4 /* Rest */); } // check computed properties inside property names of binding elements @@ -56130,7 +57438,7 @@ var ts; // check the binding pattern with empty elements if (needCheckWidenedType) { if (ts.isArrayBindingPattern(node.name)) { - checkIteratedTypeOrElementType(widenedType, node, /* allowStringInput */ false, /* allowAsyncIterables */ false); + checkIteratedTypeOrElementType(65 /* Destructuring */, widenedType, undefinedType, node); } else if (strictNullChecks) { checkNonNullNonVoidType(widenedType, node); @@ -56290,9 +57598,9 @@ var ts; checkGrammarForInOrForOfStatement(node); if (node.awaitModifier) { var functionFlags = ts.getFunctionFlags(ts.getContainingFunction(node)); - if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 8 /* ESNext */) { + if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 99 /* ESNext */) { // for..await..of in an async function or async generator function prior to ESNext requires the __asyncValues helper - checkExternalEmitHelpers(node, 16384 /* ForAwaitOfIncludes */); + checkExternalEmitHelpers(node, 32768 /* ForAwaitOfIncludes */); } } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { @@ -56388,20 +57696,22 @@ var ts; } function checkRightHandSideOfForOf(rhsExpression, awaitModifier) { var expressionType = checkNonNullExpression(rhsExpression); - return checkIteratedTypeOrElementType(expressionType, rhsExpression, /*allowStringInput*/ true, awaitModifier !== undefined); + var use = awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */; + return checkIteratedTypeOrElementType(use, expressionType, undefinedType, rhsExpression); } - function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables) { + function checkIteratedTypeOrElementType(use, inputType, sentType, errorNode) { if (isTypeAny(inputType)) { return inputType; } - return getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, /*checkAssignability*/ true) || anyType; + return getIteratedTypeOrElementType(use, inputType, sentType, errorNode, /*checkAssignability*/ true) || anyType; } /** * When consuming an iterable type in a for..of, spread, or iterator destructuring assignment * we want to get the iterated type of an iterable for ES2015 or later, or the iterated type * of a iterable (if defined globally) or element type of an array like for ES2015 or earlier. */ - function getIteratedTypeOrElementType(inputType, errorNode, allowStringInput, allowAsyncIterables, checkAssignability) { + function getIteratedTypeOrElementType(use, inputType, sentType, errorNode, checkAssignability) { + var allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0; if (inputType === neverType) { reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables); // TODO: GH#18217 return undefined; @@ -56413,9 +57723,21 @@ var ts; // downlevelIteration is requested. if (uplevelIteration || downlevelIteration || allowAsyncIterables) { // We only report errors for an invalid iterable type in ES2015 or higher. - var iteratedType = getIteratedTypeOfIterable(inputType, uplevelIteration ? errorNode : undefined, allowAsyncIterables, /*allowSyncIterables*/ true, checkAssignability); - if (iteratedType || uplevelIteration) { - return iteratedType; + var iterationTypes = getIterationTypesOfIterable(inputType, use, uplevelIteration ? errorNode : undefined); + if (checkAssignability) { + if (iterationTypes) { + var diagnostic = use & 8 /* ForOfFlag */ ? ts.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0 : + use & 32 /* SpreadFlag */ ? ts.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0 : + use & 64 /* DestructuringFlag */ ? ts.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0 : + use & 16 /* YieldStarFlag */ ? ts.Diagnostics.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0 : + undefined; + if (diagnostic) { + checkTypeAssignableTo(sentType, iterationTypes.nextType, errorNode, diagnostic); + } + } + } + if (iterationTypes || uplevelIteration) { + return iterationTypes && iterationTypes.yieldType; } } var arrayType = inputType; @@ -56424,7 +57746,7 @@ var ts; // If strings are permitted, remove any string-like constituents from the array type. // This allows us to find other non-string element types from an array unioned with // a string. - if (allowStringInput) { + if (use & 4 /* AllowsStringInputFlag */) { if (arrayType.flags & 1048576 /* Union */) { // After we remove all types that are StringLike, we will know if there was a string constituent // based on whether the result of filter is a new array. @@ -56459,19 +57781,19 @@ var ts; // want to say that number is not an array type. But if the input was just // number and string input is allowed, we want to say that number is not an // array type or a string type. - var isIterable = !!getIteratedTypeOfIterable(inputType, /* errorNode */ undefined, allowAsyncIterables, /*allowSyncIterables*/ true, checkAssignability); - var diagnostic = !allowStringInput || hasStringConstituent + var yieldType = getIterationTypeOfIterable(use, 0 /* Yield */, inputType, /*errorNode*/ undefined); + var _a = !(use & 4 /* AllowsStringInputFlag */) || hasStringConstituent ? downlevelIteration - ? ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator - : isIterable - ? ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators - : ts.Diagnostics.Type_0_is_not_an_array_type + ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true] + : yieldType + ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators, false] + : [ts.Diagnostics.Type_0_is_not_an_array_type, true] : downlevelIteration - ? ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator - : isIterable - ? ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators - : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type; - error(errorNode, diagnostic, typeToString(arrayType)); + ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true] + : yieldType + ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators, false] + : [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type, true], defaultDiagnostic = _a[0], maybeMissingAwait = _a[1]; + errorAndMaybeSuggestAwait(errorNode, maybeMissingAwait && !!getAwaitedTypeOfPromise(arrayType), defaultDiagnostic, typeToString(arrayType)); } return hasStringConstituent ? stringType : undefined; } @@ -56486,33 +57808,78 @@ var ts; return arrayElementType; } /** - * We want to treat type as an iterable, and get the type it is an iterable of. The iterable - * must have the following structure (annotated with the names of the variables below): - * - * { // iterable - * [Symbol.iterator]: { // iteratorMethod - * (): Iterator - * } - * } - * - * For an async iterable, we expect the following structure: + * Gets the requested "iteration type" from an `Iterable`-like or `AsyncIterable`-like type. + */ + function getIterationTypeOfIterable(use, typeKind, inputType, errorNode) { + if (isTypeAny(inputType)) { + return undefined; + } + var iterationTypes = getIterationTypesOfIterable(inputType, use, errorNode); + return iterationTypes && iterationTypes[getIterationTypesKeyFromIterationTypeKind(typeKind)]; + } + function createIterationTypes(yieldType, returnType, nextType) { + // `yieldType` and `returnType` are defaulted to `neverType` they each will be combined + // via `getUnionType` when merging iteration types. `nextType` is defined as `unknownType` + // as it is combined via `getIntersectionType` when merging iteration types. + if (yieldType === void 0) { yieldType = neverType; } + if (returnType === void 0) { returnType = neverType; } + if (nextType === void 0) { nextType = unknownType; } + // Use the cache only for intrinsic types to keep it small as they are likely to be + // more frequently created (i.e. `Iterator`). Iteration types + // are also cached on the type they are requested for, so we shouldn't need to maintain + // the cache for less-frequently used types. + if (yieldType.flags & 67359327 /* Intrinsic */ && + returnType.flags & (1 /* Any */ | 131072 /* Never */ | 2 /* Unknown */ | 16384 /* Void */ | 32768 /* Undefined */) && + nextType.flags & (1 /* Any */ | 131072 /* Never */ | 2 /* Unknown */ | 16384 /* Void */ | 32768 /* Undefined */)) { + var id = getTypeListId([yieldType, returnType, nextType]); + var iterationTypes = iterationTypesCache.get(id); + if (!iterationTypes) { + iterationTypes = { yieldType: yieldType, returnType: returnType, nextType: nextType }; + iterationTypesCache.set(id, iterationTypes); + } + return iterationTypes; + } + return { yieldType: yieldType, returnType: returnType, nextType: nextType }; + } + /** + * Combines multiple `IterationTypes` records. * - * { // iterable - * [Symbol.asyncIterator]: { // iteratorMethod - * (): AsyncIterator - * } - * } + * If `array` is empty or all elements are missing or are references to `noIterationTypes`, + * then `noIterationTypes` is returned. Otherwise, an `IterationTypes` record is returned + * for the combined iteration types. + */ + function combineIterationTypes(array) { + var yieldTypes; + var returnTypes; + var nextTypes; + for (var _i = 0, array_10 = array; _i < array_10.length; _i++) { + var iterationTypes = array_10[_i]; + if (iterationTypes === undefined || iterationTypes === noIterationTypes) { + continue; + } + if (iterationTypes === anyIterationTypes) { + return anyIterationTypes; + } + yieldTypes = ts.append(yieldTypes, iterationTypes.yieldType); + returnTypes = ts.append(returnTypes, iterationTypes.returnType); + nextTypes = ts.append(nextTypes, iterationTypes.nextType); + } + if (yieldTypes || returnTypes || nextTypes) { + return createIterationTypes(yieldTypes && getUnionType(yieldTypes), returnTypes && getUnionType(returnTypes), nextTypes && getIntersectionType(nextTypes)); + } + return noIterationTypes; + } + /** + * Gets the *yield*, *return*, and *next* types from an `Iterable`-like or `AsyncIterable`-like type. * - * T is the type we are after. At every level that involves analyzing return types - * of signatures, we union the return types of all the signatures. + * At every level that involves analyzing return types of signatures, we union the return types of all the signatures. * * Another thing to note is that at any step of this process, we could run into a dead end, * meaning either the property is missing, or we run into the anyType. If either of these things - * happens, we return undefined to signal that we could not find the iterated type. If a property - * is missing, and the previous step did not result in 'any', then we also give an error if the + * happens, we return `undefined` to signal that we could not find the iteration type. If a property + * is missing, and the previous step did not result in `any`, then we also give an error if the * caller requested it. Then the caller can decide what to do in the case where there is no iterated - * type. This is different from returning anyType, because that would signify that we have matched the - * whole pattern and that T (above) is 'any'. + * type. * * For a **for-of** statement, `yield*` (in a normal generator), spread, array * destructuring, or normal generator we will only ever look for a `[Symbol.iterator]()` @@ -56523,164 +57890,412 @@ var ts; * For a **for-await-of** statement or a `yield*` in an async generator we will look for * the `[Symbol.asyncIterator]()` method first, and then the `[Symbol.iterator]()` method. */ - function getIteratedTypeOfIterable(type, errorNode, allowAsyncIterables, allowSyncIterables, checkAssignability) { + function getIterationTypesOfIterable(type, use, errorNode) { if (isTypeAny(type)) { - return undefined; + return anyIterationTypes; } - return mapType(type, getIteratedType); - function getIteratedType(type) { - var typeAsIterable = type; - if (allowAsyncIterables) { - if (typeAsIterable.iteratedTypeOfAsyncIterable) { - return typeAsIterable.iteratedTypeOfAsyncIterable; - } - // As an optimization, if the type is an instantiation of the global `AsyncIterable` - // or the global `AsyncIterableIterator` then just grab its type argument. - if (isReferenceToType(type, getGlobalAsyncIterableType(/*reportErrors*/ false)) || - isReferenceToType(type, getGlobalAsyncIterableIteratorType(/*reportErrors*/ false))) { - return typeAsIterable.iteratedTypeOfAsyncIterable = type.typeArguments[0]; - } - } - if (allowSyncIterables) { - if (typeAsIterable.iteratedTypeOfIterable) { - return allowAsyncIterables - ? typeAsIterable.iteratedTypeOfAsyncIterable = getAwaitedType(typeAsIterable.iteratedTypeOfIterable) - : typeAsIterable.iteratedTypeOfIterable; - } - // As an optimization, if the type is an instantiation of the global `Iterable` or - // `IterableIterator` then just grab its type argument. - if (isReferenceToType(type, getGlobalIterableType(/*reportErrors*/ false)) || - isReferenceToType(type, getGlobalIterableIteratorType(/*reportErrors*/ false))) { - return allowAsyncIterables - ? typeAsIterable.iteratedTypeOfAsyncIterable = getAwaitedType(type.typeArguments[0]) - : typeAsIterable.iteratedTypeOfIterable = type.typeArguments[0]; - } - } - var asyncMethodType = allowAsyncIterables && getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("asyncIterator")); - var methodType = asyncMethodType || (allowSyncIterables ? getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator")) : undefined); - if (isTypeAny(methodType)) { + if (!(type.flags & 1048576 /* Union */)) { + var iterationTypes_1 = getIterationTypesOfIterableWorker(type, use, errorNode); + if (iterationTypes_1 === noIterationTypes) { + if (errorNode) { + reportTypeNotIterableError(errorNode, type, !!(use & 2 /* AllowsAsyncIterablesFlag */)); + } return undefined; } - var signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : undefined; - if (!ts.some(signatures)) { + return iterationTypes_1; + } + var cacheKey = use & 2 /* AllowsAsyncIterablesFlag */ ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable"; + var cachedTypes = type[cacheKey]; + if (cachedTypes) + return cachedTypes === noIterationTypes ? undefined : cachedTypes; + var allIterationTypes; + for (var _i = 0, _a = type.types; _i < _a.length; _i++) { + var constituent = _a[_i]; + var iterationTypes_2 = getIterationTypesOfIterableWorker(constituent, use, errorNode); + if (iterationTypes_2 === noIterationTypes) { if (errorNode) { - // only report on the first error - reportTypeNotIterableError(errorNode, type, allowAsyncIterables); + reportTypeNotIterableError(errorNode, type, !!(use & 2 /* AllowsAsyncIterablesFlag */)); errorNode = undefined; } - return undefined; } - var returnType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), 2 /* Subtype */); - var iteratedType = getIteratedTypeOfIterator(returnType, errorNode, /*isAsyncIterator*/ !!asyncMethodType); - if (checkAssignability && errorNode && iteratedType) { - // If `checkAssignability` was specified, we were called from - // `checkIteratedTypeOrElementType`. As such, we need to validate that - // the type passed in is actually an Iterable. - checkTypeAssignableTo(type, asyncMethodType - ? createAsyncIterableType(iteratedType) - : createIterableType(iteratedType), errorNode); + else { + allIterationTypes = ts.append(allIterationTypes, iterationTypes_2); + } + } + var iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes; + type[cacheKey] = iterationTypes; + return iterationTypes === noIterationTypes ? undefined : iterationTypes; + } + function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) { + if (iterationTypes === noIterationTypes) + return noIterationTypes; + if (iterationTypes === anyIterationTypes) + return anyIterationTypes; + var yieldType = iterationTypes.yieldType, returnType = iterationTypes.returnType, nextType = iterationTypes.nextType; + return createIterationTypes(getAwaitedType(yieldType, errorNode) || anyType, getAwaitedType(returnType, errorNode) || anyType, nextType); + } + /** + * Gets the *yield*, *return*, and *next* types from a non-union type. + * + * If we are unable to find the *yield*, *return*, and *next* types, `noIterationTypes` is + * returned to indicate to the caller that it should report an error. Otherwise, an + * `IterationTypes` record is returned. + * + * NOTE: You probably don't want to call this directly and should be calling + * `getIterationTypesOfIterable` instead. + */ + function getIterationTypesOfIterableWorker(type, use, errorNode) { + if (isTypeAny(type)) { + return anyIterationTypes; + } + if (use & 2 /* AllowsAsyncIterablesFlag */) { + var iterationTypes = getIterationTypesOfIterableCached(type, asyncIterationTypesResolver) || + getIterationTypesOfIterableFast(type, asyncIterationTypesResolver); + if (iterationTypes) { + return iterationTypes; + } + } + if (use & 1 /* AllowsSyncIterablesFlag */) { + var iterationTypes = getIterationTypesOfIterableCached(type, syncIterationTypesResolver) || + getIterationTypesOfIterableFast(type, syncIterationTypesResolver); + if (iterationTypes) { + if (use & 2 /* AllowsAsyncIterablesFlag */) { + // for a sync iterable in an async context, only use the cached types if they are valid. + if (iterationTypes !== noIterationTypes) { + return type.iterationTypesOfAsyncIterable = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); + } + } + else { + return iterationTypes; + } } - if (iteratedType) { - return allowAsyncIterables - ? typeAsIterable.iteratedTypeOfAsyncIterable = asyncMethodType ? iteratedType : getAwaitedType(iteratedType) - : typeAsIterable.iteratedTypeOfIterable = iteratedType; + } + if (use & 2 /* AllowsAsyncIterablesFlag */) { + var iterationTypes = getIterationTypesOfIterableSlow(type, asyncIterationTypesResolver, errorNode); + if (iterationTypes !== noIterationTypes) { + return iterationTypes; } } + if (use & 1 /* AllowsSyncIterablesFlag */) { + var iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode); + if (iterationTypes !== noIterationTypes) { + if (use & 2 /* AllowsAsyncIterablesFlag */) { + return type.iterationTypesOfAsyncIterable = iterationTypes + ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) + : noIterationTypes; + } + else { + return iterationTypes; + } + } + } + return noIterationTypes; + } + /** + * Gets the *yield*, *return*, and *next* types of an `Iterable`-like or + * `AsyncIterable`-like type from the cache. + * + * NOTE: You probably don't want to call this directly and should be calling + * `getIterationTypesOfIterable` instead. + */ + function getIterationTypesOfIterableCached(type, resolver) { + return type[resolver.iterableCacheKey]; + } + function getIterationTypesOfGlobalIterableType(globalType, resolver) { + var globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || + getIterationTypesOfIterableSlow(globalType, resolver, /*errorNode*/ undefined); + return globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes; + } + /** + * Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like + * type from from common heuristics. + * + * If we previously analyzed this type and found no iteration types, `noIterationTypes` is + * returned. If we found iteration types, an `IterationTypes` record is returned. + * Otherwise, we return `undefined` to indicate to the caller it should perform a more + * exhaustive analysis. + * + * NOTE: You probably don't want to call this directly and should be calling + * `getIterationTypesOfIterable` instead. + */ + function getIterationTypesOfIterableFast(type, resolver) { + // As an optimization, if the type is an instantiation of one of the following global types, then + // just grab its related type argument: + // - `Iterable` or `AsyncIterable` + // - `IterableIterator` or `AsyncIterableIterator` + var globalType; + if (isReferenceToType(type, globalType = resolver.getGlobalIterableType(/*reportErrors*/ false)) || + isReferenceToType(type, globalType = resolver.getGlobalIterableIteratorType(/*reportErrors*/ false))) { + var yieldType = type.typeArguments[0]; + // The "return" and "next" types of `Iterable` and `IterableIterator` are defined by the + // iteration types of their `[Symbol.iterator]()` method. The same is true for their async cousins. + // While we define these as `any` and `undefined` in our libs by default, a custom lib *could* use + // different definitions. + var _a = getIterationTypesOfGlobalIterableType(globalType, resolver), returnType = _a.returnType, nextType = _a.nextType; + return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + } + // As an optimization, if the type is an instantiation of the following global type, then + // just grab its related type arguments: + // - `Generator` or `AsyncGenerator` + if (isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { + var _b = type.typeArguments, yieldType = _b[0], returnType = _b[1], nextType = _b[2]; + return type[resolver.iterableCacheKey] = createIterationTypes(yieldType, returnType, nextType); + } + } + /** + * Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like + * type from its members. + * + * If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes` + * record is returned. Otherwise, `noIterationTypes` is returned. + * + * NOTE: You probably don't want to call this directly and should be calling + * `getIterationTypesOfIterable` instead. + */ + function getIterationTypesOfIterableSlow(type, resolver, errorNode) { + var method = getPropertyOfType(type, ts.getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName)); + var methodType = method && !(method.flags & 16777216 /* Optional */) ? getTypeOfSymbol(method) : undefined; + if (isTypeAny(methodType)) { + return type[resolver.iterableCacheKey] = anyIterationTypes; + } + var signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : undefined; + if (!ts.some(signatures)) { + return type[resolver.iterableCacheKey] = noIterationTypes; + } + var iteratorType = getUnionType(ts.map(signatures, getReturnTypeOfSignature), 2 /* Subtype */); + var iterationTypes = getIterationTypesOfIterator(iteratorType, resolver, errorNode) || noIterationTypes; + return type[resolver.iterableCacheKey] = iterationTypes; } function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) { - error(errorNode, allowAsyncIterables + var message = allowAsyncIterables ? ts.Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator - : ts.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator, typeToString(type)); + : ts.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator; + errorAndMaybeSuggestAwait(errorNode, !!getAwaitedTypeOfPromise(type), message, typeToString(type)); + } + /** + * Gets the *yield*, *return*, and *next* types from an `Iterator`-like or `AsyncIterator`-like type. + * + * If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes` + * record is returned. Otherwise, `undefined` is returned. + */ + function getIterationTypesOfIterator(type, resolver, errorNode) { + if (isTypeAny(type)) { + return anyIterationTypes; + } + var iterationTypes = getIterationTypesOfIteratorCached(type, resolver) || + getIterationTypesOfIteratorFast(type, resolver) || + getIterationTypesOfIteratorSlow(type, resolver, errorNode); + return iterationTypes === noIterationTypes ? undefined : iterationTypes; + } + /** + * Gets the iteration types of an `Iterator`-like or `AsyncIterator`-like type from the + * cache. + * + * NOTE: You probably don't want to call this directly and should be calling + * `getIterationTypesOfIterator` instead. + */ + function getIterationTypesOfIteratorCached(type, resolver) { + return type[resolver.iteratorCacheKey]; } /** - * This function has very similar logic as getIteratedTypeOfIterable, except that it operates on - * Iterators instead of Iterables. Here is the structure: + * Gets the iteration types of an `Iterator`-like or `AsyncIterator`-like type from the + * cache or from common heuristics. * - * { // iterator - * next: { // nextMethod - * (): { // nextResult - * value: T // nextValue - * } - * } - * } + * If we previously analyzed this type and found no iteration types, `noIterationTypes` is + * returned. If we found iteration types, an `IterationTypes` record is returned. + * Otherwise, we return `undefined` to indicate to the caller it should perform a more + * exhaustive analysis. * - * For an async iterator, we expect the following structure: + * NOTE: You probably don't want to call this directly and should be calling + * `getIterationTypesOfIterator` instead. + */ + function getIterationTypesOfIteratorFast(type, resolver) { + // As an optimization, if the type is an instantiation of one of the following global types, + // then just grab its related type argument: + // - `IterableIterator` or `AsyncIterableIterator` + // - `Iterator` or `AsyncIterator` + // - `Generator` or `AsyncGenerator` + var globalType = resolver.getGlobalIterableIteratorType(/*reportErrors*/ false); + if (isReferenceToType(type, globalType)) { + var yieldType = type.typeArguments[0]; + // The "return" and "next" types of `IterableIterator` and `AsyncIterableIterator` are defined by the + // iteration types of their `next`, `return`, and `throw` methods. While we define these as `any` + // and `undefined` in our libs by default, a custom lib *could* use different definitions. + var globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || + getIterationTypesOfIteratorSlow(globalType, resolver, /*errorNode*/ undefined); + var _a = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes, returnType = _a.returnType, nextType = _a.nextType; + return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + } + if (isReferenceToType(type, resolver.getGlobalIteratorType(/*reportErrors*/ false)) || + isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false))) { + var _b = type.typeArguments, yieldType = _b[0], returnType = _b[1], nextType = _b[2]; + return type[resolver.iteratorCacheKey] = createIterationTypes(yieldType, returnType, nextType); + } + } + function isIteratorResult(type, kind) { + // From https://tc39.github.io/ecma262/#sec-iteratorresult-interface: + // > [done] is the result status of an iterator `next` method call. If the end of the iterator was reached `done` is `true`. + // > If the end was not reached `done` is `false` and a value is available. + // > If a `done` property (either own or inherited) does not exist, it is consider to have the value `false`. + var doneType = getTypeOfPropertyOfType(type, "done") || falseType; + return isTypeAssignableTo(kind === 0 /* Yield */ ? falseType : trueType, doneType); + } + function isYieldIteratorResult(type) { + return isIteratorResult(type, 0 /* Yield */); + } + function isReturnIteratorResult(type) { + return isIteratorResult(type, 1 /* Return */); + } + /** + * Gets the *yield* and *return* types of an `IteratorResult`-like type. * - * { // iterator - * next: { // nextMethod - * (): PromiseLike<{ // nextResult - * value: T // nextValue - * }> - * } - * } - */ - function getIteratedTypeOfIterator(type, errorNode, isAsyncIterator) { + * If we are unable to determine a *yield* or a *return* type, `noIterationTypes` is + * returned to indicate to the caller that it should handle the error. Otherwise, an + * `IterationTypes` record is returned. + */ + function getIterationTypesOfIteratorResult(type) { if (isTypeAny(type)) { + return anyIterationTypes; + } + var cachedTypes = type.iterationTypesOfIteratorResult; + if (cachedTypes) { + return cachedTypes; + } + // As an optimization, if the type is an instantiation of one of the global `IteratorYieldResult` + // or `IteratorReturnResult` types, then just grab its type argument. + if (isReferenceToType(type, getGlobalIteratorYieldResultType(/*reportErrors*/ false))) { + var yieldType_1 = type.typeArguments[0]; + return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType_1, /*returnType*/ undefined, /*nextType*/ undefined); + } + if (isReferenceToType(type, getGlobalIteratorReturnResultType(/*reportErrors*/ false))) { + var returnType_1 = type.typeArguments[0]; + return type.iterationTypesOfIteratorResult = createIterationTypes(/*yieldType*/ undefined, returnType_1, /*nextType*/ undefined); + } + // Choose any constituents that can produce the requested iteration type. + var yieldIteratorResult = filterType(type, isYieldIteratorResult); + var yieldType = yieldIteratorResult !== neverType ? getTypeOfPropertyOfType(yieldIteratorResult, "value") : undefined; + var returnIteratorResult = filterType(type, isReturnIteratorResult); + var returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, "value") : undefined; + if (!yieldType && !returnType) { + return type.iterationTypesOfIteratorResult = noIterationTypes; + } + // From https://tc39.github.io/ecma262/#sec-iteratorresult-interface + // > ... If the iterator does not have a return value, `value` is `undefined`. In that case, the + // > `value` property may be absent from the conforming object if it does not inherit an explicit + // > `value` property. + return type.iterationTypesOfIteratorResult = createIterationTypes(yieldType, returnType || voidType, /*nextType*/ undefined); + } + /** + * Gets the *yield*, *return*, and *next* types of a the `next()`, `return()`, or + * `throw()` method of an `Iterator`-like or `AsyncIterator`-like type. + * + * If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes` + * record is returned. Otherwise, we return `undefined`. + */ + function getIterationTypesOfMethod(type, resolver, methodName, errorNode) { + var method = getPropertyOfType(type, methodName); + // Ignore 'return' or 'throw' if they are missing. + if (!method && methodName !== "next") { return undefined; } - var typeAsIterator = type; - if (isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator) { - return isAsyncIterator ? typeAsIterator.iteratedTypeOfAsyncIterator : typeAsIterator.iteratedTypeOfIterator; - } - // As an optimization, if the type is an instantiation of the global `Iterator` (for - // a non-async iterator) or the global `AsyncIterator` (for an async-iterator) then - // just grab its type argument. - var getIteratorType = isAsyncIterator ? getGlobalAsyncIteratorType : getGlobalIteratorType; - if (isReferenceToType(type, getIteratorType(/*reportErrors*/ false))) { - return isAsyncIterator - ? typeAsIterator.iteratedTypeOfAsyncIterator = type.typeArguments[0] - : typeAsIterator.iteratedTypeOfIterator = type.typeArguments[0]; - } - // Both async and non-async iterators must have a `next` method. - var nextMethod = getTypeOfPropertyOfType(type, "next"); - if (isTypeAny(nextMethod)) { - return undefined; + var methodType = method && !(methodName === "next" && (method.flags & 16777216 /* Optional */)) + ? methodName === "next" ? getTypeOfSymbol(method) : getTypeWithFacts(getTypeOfSymbol(method), 2097152 /* NEUndefinedOrNull */) + : undefined; + if (isTypeAny(methodType)) { + // `return()` and `throw()` don't provide a *next* type. + return methodName === "next" ? anyIterationTypes : anyIterationTypesExceptNext; } - var nextMethodSignatures = nextMethod ? getSignaturesOfType(nextMethod, 0 /* Call */) : ts.emptyArray; - if (nextMethodSignatures.length === 0) { + // Both async and non-async iterators *must* have a `next` method. + var methodSignatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : ts.emptyArray; + if (methodSignatures.length === 0) { if (errorNode) { - error(errorNode, isAsyncIterator - ? ts.Diagnostics.An_async_iterator_must_have_a_next_method - : ts.Diagnostics.An_iterator_must_have_a_next_method); - } - return undefined; - } - var nextResult = getUnionType(ts.map(nextMethodSignatures, getReturnTypeOfSignature), 2 /* Subtype */); - if (isTypeAny(nextResult)) { - return undefined; - } - // For an async iterator, we must get the awaited type of the return type. - if (isAsyncIterator) { - nextResult = getAwaitedTypeOfPromise(nextResult, errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property); - if (isTypeAny(nextResult)) { - return undefined; - } - } - var nextValue = nextResult && getTypeOfPropertyOfType(nextResult, "value"); - if (!nextValue) { + var diagnostic = methodName === "next" + ? resolver.mustHaveANextMethodDiagnostic + : resolver.mustBeAMethodDiagnostic; + error(errorNode, diagnostic, methodName); + } + return methodName === "next" ? anyIterationTypes : undefined; + } + // Extract the first parameter and return type of each signature. + var methodParameterTypes; + var methodReturnTypes; + for (var _i = 0, methodSignatures_1 = methodSignatures; _i < methodSignatures_1.length; _i++) { + var signature = methodSignatures_1[_i]; + if (methodName !== "throw" && ts.some(signature.parameters)) { + methodParameterTypes = ts.append(methodParameterTypes, getTypeAtPosition(signature, 0)); + } + methodReturnTypes = ts.append(methodReturnTypes, getReturnTypeOfSignature(signature)); + } + // Resolve the *next* or *return* type from the first parameter of a `next()` or + // `return()` method, respectively. + var returnTypes; + var nextType; + if (methodName !== "throw") { + var methodParameterType = methodParameterTypes ? getUnionType(methodParameterTypes) : unknownType; + var resolvedMethodParameterType = resolver.resolveIterationType(methodParameterType, errorNode) || anyType; + if (methodName === "next") { + nextType = resolvedMethodParameterType; + } + else if (methodName === "return") { + returnTypes = ts.append(returnTypes, resolvedMethodParameterType); + } + } + // Resolve the *yield* and *return* types from the return type of the method (i.e. `IteratorResult`) + var yieldType; + var methodReturnType = methodReturnTypes ? getUnionType(methodReturnTypes, 2 /* Subtype */) : neverType; + var resolvedMethodReturnType = resolver.resolveIterationType(methodReturnType, errorNode) || anyType; + var iterationTypes = getIterationTypesOfIteratorResult(resolvedMethodReturnType); + if (iterationTypes === noIterationTypes) { if (errorNode) { - error(errorNode, isAsyncIterator - ? ts.Diagnostics.The_type_returned_by_the_next_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property - : ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property); + error(errorNode, resolver.mustHaveAValueDiagnostic, methodName); } - return undefined; + yieldType = anyType; + returnTypes = ts.append(returnTypes, anyType); } - return isAsyncIterator - ? typeAsIterator.iteratedTypeOfAsyncIterator = nextValue - : typeAsIterator.iteratedTypeOfIterator = nextValue; + else { + yieldType = iterationTypes.yieldType; + returnTypes = ts.append(returnTypes, iterationTypes.returnType); + } + return createIterationTypes(yieldType, getUnionType(returnTypes), nextType); + } + /** + * Gets the *yield*, *return*, and *next* types of an `Iterator`-like or `AsyncIterator`-like + * type from its members. + * + * If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes` + * record is returned. Otherwise, `noIterationTypes` is returned. + * + * NOTE: You probably don't want to call this directly and should be calling + * `getIterationTypesOfIterator` instead. + */ + function getIterationTypesOfIteratorSlow(type, resolver, errorNode) { + var iterationTypes = combineIterationTypes([ + getIterationTypesOfMethod(type, resolver, "next", errorNode), + getIterationTypesOfMethod(type, resolver, "return", errorNode), + getIterationTypesOfMethod(type, resolver, "throw", errorNode), + ]); + return type[resolver.iteratorCacheKey] = iterationTypes; } /** - * A generator may have a return type of `Iterator`, `Iterable`, or - * `IterableIterator`. An async generator may have a return type of `AsyncIterator`, - * `AsyncIterable`, or `AsyncIterableIterator`. This function can be used to extract - * the iterated type from this return type for contextual typing and verifying signatures. + * Gets the requested "iteration type" from a type that is either `Iterable`-like, `Iterator`-like, + * `IterableIterator`-like, or `Generator`-like (for a non-async generator); or `AsyncIterable`-like, + * `AsyncIterator`-like, `AsyncIterableIterator`-like, or `AsyncGenerator`-like (for an async generator). */ - function getIteratedTypeOfGenerator(returnType, isAsyncGenerator) { + function getIterationTypeOfGeneratorFunctionReturnType(kind, returnType, isAsyncGenerator) { if (isTypeAny(returnType)) { return undefined; } - return getIteratedTypeOfIterable(returnType, /*errorNode*/ undefined, /*allowAsyncIterables*/ isAsyncGenerator, /*allowSyncIterables*/ !isAsyncGenerator, /*checkAssignability*/ false) - || getIteratedTypeOfIterator(returnType, /*errorNode*/ undefined, isAsyncGenerator); + var iterationTypes = getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsyncGenerator); + return iterationTypes && iterationTypes[getIterationTypesKeyFromIterationTypeKind(kind)]; + } + function getIterationTypesOfGeneratorFunctionReturnType(type, isAsyncGenerator) { + if (isTypeAny(type)) { + return anyIterationTypes; + } + var use = isAsyncGenerator ? 2 /* AsyncGeneratorReturnType */ : 1 /* GeneratorReturnType */; + var resolver = isAsyncGenerator ? asyncIterationTypesResolver : syncIterationTypesResolver; + return getIterationTypesOfIterable(type, use, /*errorNode*/ undefined) || + getIterationTypesOfIterator(type, resolver, /*errorNode*/ undefined); } function checkBreakOrContinueStatement(node) { // Grammar checking @@ -56688,10 +58303,15 @@ var ts; checkGrammarBreakOrContinueStatement(node); // TODO: Check that target label is valid } + function unwrapReturnType(returnType, functionFlags) { + var isGenerator = !!(functionFlags & 1 /* Generator */); + var isAsync = !!(functionFlags & 2 /* Async */); + return isGenerator ? getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, isAsync) || errorType : + isAsync ? getPromisedTypeOfPromise(returnType) || errorType : + returnType; + } function isUnwrappedReturnTypeVoidOrAny(func, returnType) { - var unwrappedReturnType = (ts.getFunctionFlags(func) & 3 /* AsyncGenerator */) === 2 /* Async */ - ? getPromisedTypeOfPromise(returnType) // Async function - : returnType; // AsyncGenerator function, Generator function, or normal function + var unwrappedReturnType = unwrapReturnType(returnType, ts.getFunctionFlags(func)); return !!unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 16384 /* Void */ | 3 /* AnyOrUnknown */); } function checkReturnStatement(node) { @@ -56707,17 +58327,9 @@ var ts; var signature = getSignatureFromDeclaration(func); var returnType = getReturnTypeOfSignature(signature); var functionFlags = ts.getFunctionFlags(func); - var isGenerator = functionFlags & 1 /* Generator */; if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { var exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (isGenerator) { // AsyncGenerator function or Generator function - // A generator does not need its return expressions checked against its return type. - // Instead, the yield expressions are checked against the element type. - // TODO: Check return types of generators when return type tracking is added - // for generators. - return; - } - else if (func.kind === 160 /* SetAccessor */) { + if (func.kind === 160 /* SetAccessor */) { if (node.expression) { error(node, ts.Diagnostics.Setters_cannot_return_a_value); } @@ -56728,22 +58340,19 @@ var ts; } } else if (getReturnTypeFromAnnotation(func)) { - if (functionFlags & 2 /* Async */) { // Async function - var promisedType = getPromisedTypeOfPromise(returnType); - var awaitedType = checkAwaitedType(exprType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); - if (promisedType) { - // If the function has a return type, but promisedType is - // undefined, an error will be reported in checkAsyncFunctionReturnType - // so we don't need to report one here. - checkTypeAssignableToAndOptionallyElaborate(awaitedType, promisedType, node, node.expression); - } - } - else { - checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression); + var unwrappedReturnType = unwrapReturnType(returnType, functionFlags); + var unwrappedExprType = functionFlags & 2 /* Async */ + ? checkAwaitedType(exprType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member) + : exprType; + if (unwrappedReturnType) { + // If the function has a return type, but promisedType is + // undefined, an error will be reported in checkAsyncFunctionReturnType + // so we don't need to report one here. + checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } } - else if (func.kind !== 158 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType) && !isGenerator) { + else if (func.kind !== 158 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { // The function has a return type, but the return statement doesn't have an expression. error(node, ts.Diagnostics.Not_all_code_paths_return_a_value); } @@ -57058,11 +58667,10 @@ var ts; var constraint = ts.getEffectiveConstraintOfTypeParameter(source); var sourceConstraint = constraint && getTypeFromTypeNode(constraint); var targetConstraint = getConstraintOfTypeParameter(target); - if (sourceConstraint) { - // relax check if later interface augmentation has no constraint - if (!targetConstraint || !isTypeIdenticalTo(sourceConstraint, targetConstraint)) { - return false; - } + // relax check if later interface augmentation has no constraint, it's more broad and is OK to merge with + // a more constrained interface (this could be generalized to a full heirarchy check, but that's maybe overkill) + if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) { + return false; } // If the type parameter node has a default and it is not identical to the default // for the type parameter at this position, we report an error. @@ -57202,7 +58810,7 @@ var ts; function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) { // iterate over all implemented properties and issue errors on each one which isn't compatible, rather than the class as a whole, if possible var issuedMemberError = false; - var _loop_12 = function (member) { + var _loop_14 = function (member) { if (ts.hasStaticModifier(member)) { return "continue"; } @@ -57221,7 +58829,7 @@ var ts; }; for (var _i = 0, _a = node.members; _i < _a.length; _i++) { var member = _a[_i]; - _loop_12(member); + _loop_14(member); } if (!issuedMemberError) { // check again with diagnostics to generate a less-specific error @@ -57266,7 +58874,7 @@ var ts; // derived class instance member variables and accessors, but not by other kinds of members. // NOTE: assignability is checked in checkClassDeclaration var baseProperties = getPropertiesOfType(baseType); - for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) { + basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) { var baseProperty = baseProperties_1[_i]; var base = getTargetSymbol(baseProperty); if (base.flags & 4194304 /* Prototype */) { @@ -57275,53 +58883,64 @@ var ts; var derived = getTargetSymbol(getPropertyOfObjectType(type, base.escapedName)); // TODO: GH#18217 var baseDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(base); ts.Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration."); - if (derived) { - // In order to resolve whether the inherited method was overridden in the base class or not, - // we compare the Symbols obtained. Since getTargetSymbol returns the symbol on the *uninstantiated* - // type declaration, derived and base resolve to the same symbol even in the case of generic classes. - if (derived === base) { - // derived class inherits base without override/redeclaration - var derivedClassDecl = ts.getClassLikeDeclarationOfSymbol(type.symbol); - // It is an error to inherit an abstract member without implementing it or being declared abstract. - // If there is no declaration for the derived class (as in the case of class expressions), - // then the class cannot be declared abstract. - if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !ts.hasModifier(derivedClassDecl, 128 /* Abstract */))) { - if (derivedClassDecl.kind === 210 /* ClassExpression */) { - error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); - } - else { - error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, typeToString(type), symbolToString(baseProperty), typeToString(baseType)); + // In order to resolve whether the inherited method was overridden in the base class or not, + // we compare the Symbols obtained. Since getTargetSymbol returns the symbol on the *uninstantiated* + // type declaration, derived and base resolve to the same symbol even in the case of generic classes. + if (derived === base) { + // derived class inherits base without override/redeclaration + var derivedClassDecl = ts.getClassLikeDeclarationOfSymbol(type.symbol); + // It is an error to inherit an abstract member without implementing it or being declared abstract. + // If there is no declaration for the derived class (as in the case of class expressions), + // then the class cannot be declared abstract. + if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !ts.hasModifier(derivedClassDecl, 128 /* Abstract */))) { + // Searches other base types for a declaration that would satisfy the inherited abstract member. + // (The class may have more than one base type via declaration merging with an interface with the + // same name.) + for (var _a = 0, _b = getBaseTypes(type); _a < _b.length; _a++) { + var otherBaseType = _b[_a]; + if (otherBaseType === baseType) + continue; + var baseSymbol = getPropertyOfObjectType(otherBaseType, base.escapedName); + var derivedElsewhere = baseSymbol && getTargetSymbol(baseSymbol); + if (derivedElsewhere && derivedElsewhere !== base) { + continue basePropertyCheck; } } - } - else { - // derived overrides base. - var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived); - if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) { - // either base or derived property is private - not override, skip it - continue; + if (derivedClassDecl.kind === 210 /* ClassExpression */) { + error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } - if (isPrototypeProperty(base) || base.flags & 98308 /* PropertyOrAccessor */ && derived.flags & 98308 /* PropertyOrAccessor */) { - // method is overridden with method or property/accessor is overridden with property/accessor - correct case - continue; - } - var errorMessage = void 0; - if (isPrototypeProperty(base)) { - if (derived.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } - else { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; - } + else { + error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, typeToString(type), symbolToString(baseProperty), typeToString(baseType)); } - else if (base.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function; + } + } + else { + // derived overrides base. + var derivedDeclarationFlags = ts.getDeclarationModifierFlagsFromSymbol(derived); + if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) { + // either base or derived property is private - not override, skip it + continue; + } + if (isPrototypeProperty(base) || base.flags & 98308 /* PropertyOrAccessor */ && derived.flags & 98308 /* PropertyOrAccessor */) { + // method is overridden with method or property/accessor is overridden with property/accessor - correct case + continue; + } + var errorMessage = void 0; + if (isPrototypeProperty(base)) { + if (derived.flags & 98304 /* Accessor */) { + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; } else { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; } - error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); } + else if (base.flags & 98304 /* Accessor */) { + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function; + } + else { + errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; + } + error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); } } } @@ -57463,9 +59082,9 @@ var ts; if (member.initializer) { return computeConstantValue(member); } - // In ambient enum declarations that specify no const modifier, enum member declarations that omit - // a value are considered computed members (as opposed to having auto-incremented values). - if (member.parent.flags & 4194304 /* Ambient */ && !ts.isEnumConst(member.parent)) { + // In ambient non-const numeric enum declarations, enum members without initializers are + // considered computed members (as opposed to having auto-incremented values). + if (member.parent.flags & 4194304 /* Ambient */ && !ts.isEnumConst(member.parent) && getEnumKind(getSymbolOfNode(member.parent)) === 0 /* Numeric */) { return undefined; } // If the member declaration specifies no value, the member is considered a constant enum member. @@ -57866,15 +59485,16 @@ var ts; function checkAliasSymbol(node) { var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); - if (target !== unknownSymbol) { - // For external modules symbol represent local symbol for an alias. + var shouldSkipWithJSExpandoTargets = symbol.flags & 67108864 /* Assignment */; + if (!shouldSkipWithJSExpandoTargets && target !== unknownSymbol) { + // For external modules symbol represents local symbol for an alias. // This local symbol will merge any other local declarations (excluding other aliases) // and symbol.flags will contains combined representation for all merged declaration. // Based on symbol.flags we can compute a set of excluded meanings (meaning that resolved alias should not have, // otherwise it will conflict with some local declaration). Note that in addition to normal flags we include matching SymbolFlags.Export* // in order to prevent collisions with declarations that were exported from the current module (they still contribute to local names). - var excludedMeanings = (symbol.flags & (67220415 /* Value */ | 1048576 /* ExportValue */) ? 67220415 /* Value */ : 0) | - (symbol.flags & 67897832 /* Type */ ? 67897832 /* Type */ : 0) | + var excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | + (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (target.flags & excludedMeanings) { var message = node.kind === 258 /* ExportSpecifier */ ? @@ -57885,7 +59505,7 @@ var ts; // Don't allow to re-export something with no value side when `--isolatedModules` is set. if (compilerOptions.isolatedModules && node.kind === 258 /* ExportSpecifier */ - && !(target.flags & 67220415 /* Value */) + && !(target.flags & 111551 /* Value */) && !(node.flags & 4194304 /* Ambient */)) { error(node, ts.Diagnostics.Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided); } @@ -57938,14 +59558,14 @@ var ts; if (node.moduleReference.kind !== 260 /* ExternalModuleReference */) { var target = resolveAlias(getSymbolOfNode(node)); if (target !== unknownSymbol) { - if (target.flags & 67220415 /* Value */) { + if (target.flags & 111551 /* Value */) { // Target is a value symbol, check that it is not hidden by a local declaration with the same name var moduleName = getFirstIdentifier(node.moduleReference); - if (!(resolveEntityName(moduleName, 67220415 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { + if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } } - if (target.flags & 67897832 /* Type */) { + if (target.flags & 788968 /* Type */) { checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); } } @@ -57985,7 +59605,7 @@ var ts; error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); } if (moduleKind !== ts.ModuleKind.System && moduleKind !== ts.ModuleKind.ES2015 && moduleKind !== ts.ModuleKind.ESNext) { - checkExternalEmitHelpers(node, 32768 /* ExportStar */); + checkExternalEmitHelpers(node, 65536 /* ExportStar */); } } } @@ -58005,13 +59625,17 @@ var ts; if (!node.parent.parent.moduleSpecifier) { var exportedName = node.propertyName || node.name; // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) - var symbol = resolveName(exportedName, exportedName.escapedText, 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, + var symbol = resolveName(exportedName, exportedName.escapedText, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName)); } else { markExportAsReferenced(node); + var target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol); + if (!target || target === unknownSymbol || target.flags & 111551 /* Value */) { + checkExpressionCached(node.propertyName || node.name); + } } } } @@ -58035,7 +59659,17 @@ var ts; grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } if (node.expression.kind === 73 /* Identifier */) { - markExportAsReferenced(node); + var id = node.expression; + var sym = resolveEntityName(id, 67108863 /* All */, /*ignoreErrors*/ true, /*dontResolveAlias*/ true, node); + if (sym) { + markAliasReferenced(sym, id); + // If not a value, we're interpreting the identifier as a type export, along the lines of (`export { Id as default }`) + var target = sym.flags & 2097152 /* Alias */ ? resolveAlias(sym) : sym; + if (target === unknownSymbol || target.flags & 111551 /* Value */) { + // However if it is a value, we need to check it's being used correctly + checkExpressionCached(node.expression); + } + } if (ts.getEmitDeclarations(compilerOptions)) { collectLinkedAliases(node.expression, /*setVisibility*/ true); } @@ -58104,18 +59738,11 @@ var ts; links.exportsChecked = true; } } - function isNotAccessor(declaration) { - // Accessors check for their own matching duplicates, and in contexts where they are valid, there are already duplicate identifier checks - return !ts.isAccessor(declaration); - } - function isNotOverload(declaration) { - return (declaration.kind !== 240 /* FunctionDeclaration */ && declaration.kind !== 157 /* MethodDeclaration */) || - !!declaration.body; - } function checkSourceElement(node) { if (node) { var saveCurrentNode = currentNode; currentNode = node; + instantiationCount = 0; checkSourceElementWorker(node); currentNode = saveCurrentNode; } @@ -58190,16 +59817,17 @@ var ts; return checkInferType(node); case 184 /* ImportType */: return checkImportType(node); - case 301 /* JSDocAugmentsTag */: + case 302 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 306 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 309 /* JSDocTemplateTag */: + case 311 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 308 /* JSDocTypeTag */: + case 310 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 305 /* JSDocParameterTag */: + case 307 /* JSDocParameterTag */: return checkJSDocParameterTag(node); case 295 /* JSDocFunctionType */: checkJSDocFunctionType(node); @@ -58208,7 +59836,7 @@ var ts; case 292 /* JSDocNullableType */: case 290 /* JSDocAllType */: case 291 /* JSDocUnknownType */: - case 298 /* JSDocTypeLiteral */: + case 299 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); ts.forEachChild(node, checkSourceElement); return; @@ -58376,6 +60004,7 @@ var ts; function checkDeferredNode(node) { var saveCurrentNode = currentNode; currentNode = node; + instantiationCount = 0; switch (node.kind) { case 197 /* FunctionExpression */: case 198 /* ArrowFunction */: @@ -58548,7 +60177,7 @@ var ts; // (type parameters of classDeclaration/classExpression and interface are in member property of the symbol. // Note: that the memberFlags come from previous iteration. if (!isStatic) { - copySymbols(getMembersOfSymbol(getSymbolOfNode(location)), meaning & 67897832 /* Type */); + copySymbols(getMembersOfSymbol(getSymbolOfNode(location)), meaning & 788968 /* Type */); } break; case 197 /* FunctionExpression */: @@ -58701,7 +60330,7 @@ var ts; if (entityName.parent.kind === 255 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) { // Even an entity name expression that doesn't resolve as an entityname may still typecheck as a property access expression var success = resolveEntityName(entityName, - /*all meanings*/ 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*ignoreErrors*/ true); + /*all meanings*/ 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, /*ignoreErrors*/ true); if (success && success !== unknownSymbol) { return success; } @@ -58727,10 +60356,10 @@ var ts; var meaning = 0 /* None */; // In an interface or class, we're definitely interested in a type. if (entityName.parent.kind === 212 /* ExpressionWithTypeArguments */) { - meaning = 67897832 /* Type */; + meaning = 788968 /* Type */; // In a class 'extends' clause we are also looking for a value. if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { - meaning |= 67220415 /* Value */; + meaning |= 111551 /* Value */; } } else { @@ -58742,10 +60371,10 @@ var ts; return entityNameSymbol; } } - if (entityName.parent.kind === 305 /* JSDocParameterTag */) { + if (entityName.parent.kind === 307 /* JSDocParameterTag */) { return ts.getParameterSymbolFromJSDoc(entityName.parent); } - if (entityName.parent.kind === 151 /* TypeParameter */ && entityName.parent.parent.kind === 309 /* JSDocTemplateTag */) { + if (entityName.parent.kind === 151 /* TypeParameter */ && entityName.parent.parent.kind === 311 /* JSDocTemplateTag */) { ts.Debug.assert(!ts.isInJSFile(entityName)); // Otherwise `isDeclarationName` would have been true. var typeParameter = ts.getTypeParameterFromJsDoc(entityName.parent); return typeParameter && typeParameter.symbol; @@ -58760,7 +60389,7 @@ var ts; var symbol = getIntrinsicTagSymbol(entityName.parent); return symbol === unknownSymbol ? undefined : symbol; } - return resolveEntityName(entityName, 67220415 /* Value */, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); + return resolveEntityName(entityName, 111551 /* Value */, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } else if (entityName.kind === 190 /* PropertyAccessExpression */ || entityName.kind === 149 /* QualifiedName */) { var links = getNodeLinks(entityName); @@ -58777,7 +60406,7 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 165 /* TypeReference */ ? 67897832 /* Type */ : 1920 /* Namespace */; + var meaning = entityName.parent.kind === 165 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; return resolveEntityName(entityName, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } if (entityName.parent.kind === 164 /* TypePredicate */) { @@ -58887,7 +60516,7 @@ var ts; } function getShorthandAssignmentValueSymbol(location) { if (location && location.kind === 277 /* ShorthandPropertyAssignment */) { - return resolveEntityName(location.name, 67220415 /* Value */ | 2097152 /* Alias */); + return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return undefined; } @@ -58895,7 +60524,7 @@ var ts; function getExportSpecifierLocalTargetSymbol(node) { return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : - resolveEntityName(node.propertyName || node.name, 67220415 /* Value */ | 67897832 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); + resolveEntityName(node.propertyName || node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } function getTypeOfNode(node) { if (node.flags & 8388608 /* InWithStatement */) { @@ -58980,7 +60609,7 @@ var ts; var node = ts.cast(expr.parent, ts.isArrayLiteralExpression); // [{ property1: p1, property2 }] = elems; var typeOfArrayLiteral = getTypeOfAssignmentPattern(node) || errorType; - var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral, expr.parent, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || errorType; + var elementType = checkIteratedTypeOrElementType(65 /* Destructuring */, typeOfArrayLiteral, undefinedType, expr.parent) || errorType; return checkArrayLiteralDestructuringElementAssignment(node, typeOfArrayLiteral, node.elements.indexOf(expr), elementType); } // Gets the property symbol corresponding to the property in destructuring assignment @@ -59096,13 +60725,13 @@ var ts; // for export assignments - check if resolved symbol for RHS is itself a value // otherwise - check if at least one export is value symbolLinks.exportsSomeValue = hasExportAssignment - ? !!(moduleSymbol.flags & 67220415 /* Value */) + ? !!(moduleSymbol.flags & 111551 /* Value */) : ts.forEachEntry(getExportsOfModule(moduleSymbol), isValue); } return symbolLinks.exportsSomeValue; function isValue(s) { s = resolveSymbol(s); - return s && !!(s.flags & 67220415 /* Value */); + return s && !!(s.flags & 111551 /* Value */); } } function isNameOfModuleOrEnumDeclaration(node) { @@ -59151,7 +60780,7 @@ var ts; var symbol = getReferencedValueSymbol(node); // We should only get the declaration of an alias if there isn't a local value // declaration for the symbol - if (isNonLocalAlias(symbol, /*excludes*/ 67220415 /* Value */)) { + if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */)) { return getDeclarationOfAliasSymbol(symbol); } } @@ -59168,7 +60797,7 @@ var ts; var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); if (ts.isStatementWithLocals(container) || isSymbolOfDestructuredElementOfCatchBinding(symbol)) { var nodeLinks_1 = getNodeLinks(symbol.valueDeclaration); - if (resolveName(container.parent, symbol.escapedName, 67220415 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)) { + if (resolveName(container.parent, symbol.escapedName, 111551 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ false)) { // redeclaration - always should be renamed links.isDeclarationWithCollidingName = true; } @@ -59264,7 +60893,7 @@ var ts; } // const enums and modules that contain only const enums are not considered values from the emit perspective // unless 'preserveConstEnums' option is set to true - return !!(target.flags & 67220415 /* Value */) && + return !!(target.flags & 111551 /* Value */) && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target)); } function isConstEnumOrConstEnumOnlyModule(s) { @@ -59278,7 +60907,7 @@ var ts; } var target = getSymbolLinks(symbol).target; // TODO: GH#18217 if (target && ts.getModifierFlags(node) & 1 /* Export */ && - target.flags & 67220415 /* Value */ && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { + target.flags & 111551 /* Value */ && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { // An `export import ... =` of a value symbol is always considered referenced return true; } @@ -59332,7 +60961,7 @@ var ts; if (!symbol || !(symbol.flags & 16 /* Function */)) { return false; } - return !!ts.forEachEntry(getExportsOfSymbol(symbol), function (p) { return p.flags & 67220415 /* Value */ && ts.isPropertyAccessExpression(p.valueDeclaration); }); + return !!ts.forEachEntry(getExportsOfSymbol(symbol), function (p) { return p.flags & 111551 /* Value */ && p.valueDeclaration && ts.isPropertyAccessExpression(p.valueDeclaration); }); } function getPropertiesOfContainerFunction(node) { var declaration = ts.getParseTreeNode(node, ts.isFunctionDeclaration); @@ -59386,9 +61015,9 @@ var ts; return ts.TypeReferenceSerializationKind.Unknown; } // Resolve the symbol as a value to ensure the type can be reached at runtime during emit. - var valueSymbol = resolveEntityName(typeName, 67220415 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, location); + var valueSymbol = resolveEntityName(typeName, 111551 /* Value */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, location); // Resolve the symbol as a type so that we can provide a more useful hint for the type serializer. - var typeSymbol = resolveEntityName(typeName, 67897832 /* Type */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, location); + var typeSymbol = resolveEntityName(typeName, 788968 /* Type */, /*ignoreErrors*/ true, /*dontResolveAlias*/ false, location); if (valueSymbol && valueSymbol === typeSymbol) { var globalPromiseSymbol = getGlobalPromiseConstructorSymbol(/*reportErrors*/ false); if (globalPromiseSymbol && valueSymbol === globalPromiseSymbol) { @@ -59493,7 +61122,7 @@ var ts; location = getDeclarationContainer(parent); } } - return resolveName(location, reference.escapedText, 67220415 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); + return resolveName(location, reference.escapedText, 111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true); } function getReferencedValueDeclaration(referenceIn) { if (!ts.isGeneratedIdentifier(referenceIn)) { @@ -59514,7 +61143,7 @@ var ts; return false; } function literalTypeToNode(type, enclosing, tracker) { - var enumResult = type.flags & 1024 /* EnumLiteral */ ? nodeBuilder.symbolToExpression(type.symbol, 67220415 /* Value */, enclosing, /*flags*/ undefined, tracker) + var enumResult = type.flags & 1024 /* EnumLiteral */ ? nodeBuilder.symbolToExpression(type.symbol, 111551 /* Value */, enclosing, /*flags*/ undefined, tracker) : type === trueType ? ts.createTrue() : type === falseType && ts.createFalse(); return enumResult || ts.createLiteral(type.value); } @@ -59627,9 +61256,9 @@ var ts; // property access can only be used as values, or types when within an expression with type arguments inside a heritage clause // qualified names can only be used as types\namespaces // identifiers are treated as values only if they appear in type queries - var meaning = 67897832 /* Type */ | 1920 /* Namespace */; + var meaning = 788968 /* Type */ | 1920 /* Namespace */; if ((node.kind === 73 /* Identifier */ && isInTypeQuery(node)) || (node.kind === 190 /* PropertyAccessExpression */ && !isInHeritageClause(node))) { - meaning = 67220415 /* Value */ | 1048576 /* ExportValue */; + meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } var symbol = resolveEntityName(node, meaning, /*ignoreErrors*/ true); return symbol && symbol !== unknownSymbol ? getTypeReferenceDirectivesForSymbol(symbol, meaning) : undefined; @@ -59849,10 +61478,10 @@ var ts; var helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (var helper = 1 /* FirstEmitHelper */; helper <= 65536 /* LastEmitHelper */; helper <<= 1) { + for (var helper = 1 /* FirstEmitHelper */; helper <= 131072 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { var name = getHelperName(helper); - var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 67220415 /* Value */); + var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 111551 /* Value */); if (!symbol) { error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_but_module_0_has_no_exported_member_1, ts.externalHelpersModuleNameText, name); } @@ -59876,12 +61505,13 @@ var ts; case 256 /* Values */: return "__values"; case 512 /* Read */: return "__read"; case 1024 /* Spread */: return "__spread"; - case 2048 /* Await */: return "__await"; - case 4096 /* AsyncGenerator */: return "__asyncGenerator"; - case 8192 /* AsyncDelegator */: return "__asyncDelegator"; - case 16384 /* AsyncValues */: return "__asyncValues"; - case 32768 /* ExportStar */: return "__exportStar"; - case 65536 /* MakeTemplateObject */: return "__makeTemplateObject"; + case 2048 /* SpreadArrays */: return "__spreadArrays"; + case 4096 /* Await */: return "__await"; + case 8192 /* AsyncGenerator */: return "__asyncGenerator"; + case 16384 /* AsyncDelegator */: return "__asyncDelegator"; + case 32768 /* AsyncValues */: return "__asyncValues"; + case 65536 /* ExportStar */: return "__exportStar"; + case 131072 /* MakeTemplateObject */: return "__makeTemplateObject"; default: return ts.Debug.fail("Unrecognized helper"); } } @@ -60236,7 +61866,7 @@ var ts; ts.addRelatedInfo(error(parameter, ts.Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), ts.createDiagnosticForNode(useStrictDirective_1, ts.Diagnostics.use_strict_directive_used_here)); }); var diagnostics_1 = nonSimpleParameters.map(function (parameter, index) { return (index === 0 ? ts.createDiagnosticForNode(parameter, ts.Diagnostics.Non_simple_parameter_declared_here) : ts.createDiagnosticForNode(parameter, ts.Diagnostics.and_here)); }); - ts.addRelatedInfo.apply(void 0, [error(useStrictDirective_1, ts.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)].concat(diagnostics_1)); + ts.addRelatedInfo.apply(void 0, __spreadArrays([error(useStrictDirective_1, ts.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)], diagnostics_1)); return true; } } @@ -60430,13 +62060,6 @@ var ts; return !!exclamationToken && grammarErrorOnNode(exclamationToken, message); } function checkGrammarObjectLiteralExpression(node, inDestructuring) { - var Flags; - (function (Flags) { - Flags[Flags["Property"] = 1] = "Property"; - Flags[Flags["GetAccessor"] = 2] = "GetAccessor"; - Flags[Flags["SetAccessor"] = 4] = "SetAccessor"; - Flags[Flags["GetOrSetAccessor"] = 6] = "GetOrSetAccessor"; - })(Flags || (Flags = {})); var seen = ts.createUnderscoreEscapedMap(); for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; @@ -60462,6 +62085,7 @@ var ts; } // Modifiers are never allowed on properties except for 'async' on a method declaration if (prop.modifiers) { + // tslint:disable no-unnecessary-type-assertion for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { // TODO: GH#19955 var mod = _c[_b]; if (mod.kind !== 122 /* AsyncKeyword */ || prop.kind !== 157 /* MethodDeclaration */) { @@ -60488,15 +62112,16 @@ var ts; if (name.kind === 8 /* NumericLiteral */) { checkGrammarNumericLiteral(name); } - // falls through + currentKind = 4 /* PropertyAssignment */; + break; case 157 /* MethodDeclaration */: - currentKind = 1 /* Property */; + currentKind = 8 /* Method */; break; case 159 /* GetAccessor */: - currentKind = 2 /* GetAccessor */; + currentKind = 1 /* GetAccessor */; break; case 160 /* SetAccessor */: - currentKind = 4 /* SetAccessor */; + currentKind = 2 /* SetAccessor */; break; default: throw ts.Debug.assertNever(prop, "Unexpected syntax kind:" + prop.kind); @@ -60510,11 +62135,11 @@ var ts; seen.set(effectiveName, currentKind); } else { - if (currentKind === 1 /* Property */ && existingKind === 1 /* Property */) { + if ((currentKind & 12 /* PropertyAssignmentOrMethod */) && (existingKind & 12 /* PropertyAssignmentOrMethod */)) { grammarErrorOnNode(name, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name)); } - else if ((currentKind & 6 /* GetOrSetAccessor */) && (existingKind & 6 /* GetOrSetAccessor */)) { - if (existingKind !== 6 /* GetOrSetAccessor */ && currentKind !== existingKind) { + else if ((currentKind & 3 /* GetOrSetAccessor */) && (existingKind & 3 /* GetOrSetAccessor */)) { + if (existingKind !== 3 /* GetOrSetAccessor */ && currentKind !== existingKind) { seen.set(effectiveName, currentKind | existingKind); } else { @@ -60547,6 +62172,11 @@ var ts; } } } + function checkGrammarJsxExpression(node) { + if (node.expression && ts.isCommaSequence(node.expression)) { + return grammarErrorOnNode(node.expression, ts.Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array); + } + } function checkGrammarForInOrForOfStatement(forInOrOfStatement) { if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; @@ -60607,42 +62237,38 @@ var ts; return false; } function checkGrammarAccessor(accessor) { - var kind = accessor.kind; - if (languageVersion < 1 /* ES5 */) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); - } - else if (accessor.flags & 4194304 /* Ambient */) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_be_declared_in_an_ambient_context); - } - else if (accessor.body === undefined && !ts.hasModifier(accessor, 128 /* Abstract */)) { - return grammarErrorAtPos(accessor, accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); + if (!(accessor.flags & 4194304 /* Ambient */)) { + if (languageVersion < 1 /* ES5 */) { + return grammarErrorOnNode(accessor.name, ts.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); + } + if (accessor.body === undefined && !ts.hasModifier(accessor, 128 /* Abstract */)) { + return grammarErrorAtPos(accessor, accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); + } } - else if (accessor.body && ts.hasModifier(accessor, 128 /* Abstract */)) { + if (accessor.body && ts.hasModifier(accessor, 128 /* Abstract */)) { return grammarErrorOnNode(accessor, ts.Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - else if (accessor.typeParameters) { + if (accessor.typeParameters) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } - else if (!doesAccessorHaveCorrectParameterCount(accessor)) { - return grammarErrorOnNode(accessor.name, kind === 159 /* GetAccessor */ ? + if (!doesAccessorHaveCorrectParameterCount(accessor)) { + return grammarErrorOnNode(accessor.name, accessor.kind === 159 /* GetAccessor */ ? ts.Diagnostics.A_get_accessor_cannot_have_parameters : ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); } - else if (kind === 160 /* SetAccessor */) { + if (accessor.kind === 160 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - else { - var parameter = accessor.parameters[0]; - if (parameter.dotDotDotToken) { - return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); - } - else if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter); - } - else if (parameter.initializer) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer); - } + var parameter = ts.Debug.assertDefined(ts.getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); + if (parameter.dotDotDotToken) { + return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); + } + if (parameter.questionToken) { + return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter); + } + if (parameter.initializer) { + return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer); } } return false; @@ -60724,9 +62350,6 @@ var ts; return grammarErrorAtPos(node, node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); } } - else if (ts.isClassLike(node.parent) && ts.isStringLiteral(node.name) && node.name.text === "constructor" && (!compilerOptions.target || compilerOptions.target < 1 /* ES5 */)) { - return grammarErrorOnNode(node.name, ts.Diagnostics.Quoted_constructors_have_previously_been_interpreted_as_methods_which_is_incorrect_In_TypeScript_3_6_they_will_be_correctly_parsed_as_constructors_In_the_meantime_consider_using_constructor_to_write_a_constructor_or_constructor_to_write_a_method); - } if (checkGrammarForGenerator(node)) { return true; } @@ -61080,13 +62703,9 @@ var ts; } function checkGrammarStatementInAmbientContext(node) { if (node.flags & 4194304 /* Ambient */) { - // An accessors is already reported about the ambient context - if (ts.isAccessor(node.parent)) { - return getNodeLinks(node).hasReportedStatementInAmbientContext = true; - } // Find containing block which is either Block, ModuleBlock, SourceFile var links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { + if (!links.hasReportedStatementInAmbientContext && (ts.isFunctionLike(node.parent) || ts.isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } // We are either parented by another statement, or some sort of block. @@ -61095,10 +62714,10 @@ var ts; // this has already been reported, and don't report if it has. // if (node.parent.kind === 219 /* Block */ || node.parent.kind === 246 /* ModuleBlock */ || node.parent.kind === 285 /* SourceFile */) { - var links_2 = getNodeLinks(node.parent); + var links_1 = getNodeLinks(node.parent); // Check if the containing block ever report this error - if (!links_2.hasReportedStatementInAmbientContext) { - return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); + if (!links_1.hasReportedStatementInAmbientContext) { + return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); } } else { @@ -61134,7 +62753,7 @@ var ts; var literalType = ts.isLiteralTypeNode(node.parent) || ts.isPrefixUnaryExpression(node.parent) && ts.isLiteralTypeNode(node.parent.parent); if (!literalType) { - if (languageVersion < 8 /* ESNext */) { + if (languageVersion < 99 /* ESNext */) { if (grammarErrorOnNode(node, ts.Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ESNext)) { return true; } @@ -61184,6 +62803,14 @@ var ts; } } ts.createTypeChecker = createTypeChecker; + function isNotAccessor(declaration) { + // Accessors check for their own matching duplicates, and in contexts where they are valid, there are already duplicate identifier checks + return !ts.isAccessor(declaration); + } + function isNotOverload(declaration) { + return (declaration.kind !== 240 /* FunctionDeclaration */ && declaration.kind !== 157 /* MethodDeclaration */) || + !!declaration.body; + } /** Like 'isDeclarationName', but returns true for LHS of `import { x as y }` or `export { x as y }`. */ function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { @@ -61222,6 +62849,13 @@ var ts; JsxNames.LibraryManagedAttributes = "LibraryManagedAttributes"; // tslint:enable variable-name })(JsxNames || (JsxNames = {})); + function getIterationTypesKeyFromIterationTypeKind(typeKind) { + switch (typeKind) { + case 0 /* Yield */: return "yieldType"; + case 1 /* Return */: return "returnType"; + case 2 /* Next */: return "nextType"; + } + } })(ts || (ts = {})); var ts; (function (ts) { @@ -62386,27 +64020,88 @@ var ts; : node; } ts.updateTemplateExpression = updateTemplateExpression; - function createTemplateHead(text) { - var node = createSynthesizedNode(15 /* TemplateHead */); + var rawTextScanner; + var invalidValueSentinel = {}; + function getCookedText(kind, rawText) { + if (!rawTextScanner) { + rawTextScanner = ts.createScanner(99 /* Latest */, /*skipTrivia*/ false, 0 /* Standard */); + } + switch (kind) { + case 14 /* NoSubstitutionTemplateLiteral */: + rawTextScanner.setText("`" + rawText + "`"); + break; + case 15 /* TemplateHead */: + // tslint:disable-next-line no-invalid-template-strings + rawTextScanner.setText("`" + rawText + "${"); + break; + case 16 /* TemplateMiddle */: + // tslint:disable-next-line no-invalid-template-strings + rawTextScanner.setText("}" + rawText + "${"); + break; + case 17 /* TemplateTail */: + rawTextScanner.setText("}" + rawText + "`"); + break; + } + var token = rawTextScanner.scan(); + if (token === 23 /* CloseBracketToken */) { + token = rawTextScanner.reScanTemplateToken(); + } + if (rawTextScanner.isUnterminated()) { + rawTextScanner.setText(undefined); + return invalidValueSentinel; + } + var tokenValue; + switch (token) { + case 14 /* NoSubstitutionTemplateLiteral */: + case 15 /* TemplateHead */: + case 16 /* TemplateMiddle */: + case 17 /* TemplateTail */: + tokenValue = rawTextScanner.getTokenValue(); + break; + } + if (rawTextScanner.scan() !== 1 /* EndOfFileToken */) { + rawTextScanner.setText(undefined); + return invalidValueSentinel; + } + rawTextScanner.setText(undefined); + return tokenValue; + } + function createTemplateLiteralLikeNode(kind, text, rawText) { + var node = createSynthesizedNode(kind); + node.text = text; + if (rawText === undefined || text === rawText) { + node.rawText = rawText; + } + else { + var cooked = getCookedText(kind, rawText); + if (typeof cooked === "object") { + return ts.Debug.fail("Invalid raw text"); + } + ts.Debug.assert(text === cooked, "Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'."); + node.rawText = rawText; + } + return node; + } + function createTemplateHead(text, rawText) { + var node = createTemplateLiteralLikeNode(15 /* TemplateHead */, text, rawText); node.text = text; return node; } ts.createTemplateHead = createTemplateHead; - function createTemplateMiddle(text) { - var node = createSynthesizedNode(16 /* TemplateMiddle */); + function createTemplateMiddle(text, rawText) { + var node = createTemplateLiteralLikeNode(16 /* TemplateMiddle */, text, rawText); node.text = text; return node; } ts.createTemplateMiddle = createTemplateMiddle; - function createTemplateTail(text) { - var node = createSynthesizedNode(17 /* TemplateTail */); + function createTemplateTail(text, rawText) { + var node = createTemplateLiteralLikeNode(17 /* TemplateTail */, text, rawText); node.text = text; return node; } ts.createTemplateTail = createTemplateTail; - function createNoSubstitutionTemplateLiteral(text) { - var node = createSynthesizedNode(14 /* NoSubstitutionTemplateLiteral */); - node.text = text; + function createNoSubstitutionTemplateLiteral(text, rawText) { + var node = createTemplateLiteralLikeNode(14 /* NoSubstitutionTemplateLiteral */, text, rawText); return node; } ts.createNoSubstitutionTemplateLiteral = createNoSubstitutionTemplateLiteral; @@ -62586,8 +64281,8 @@ var ts; function createIf(expression, thenStatement, elseStatement) { var node = createSynthesizedNode(223 /* IfStatement */); node.expression = expression; - node.thenStatement = thenStatement; - node.elseStatement = elseStatement; + node.thenStatement = asEmbeddedStatement(thenStatement); + node.elseStatement = asEmbeddedStatement(elseStatement); return node; } ts.createIf = createIf; @@ -62601,7 +64296,7 @@ var ts; ts.updateIf = updateIf; function createDo(statement, expression) { var node = createSynthesizedNode(224 /* DoStatement */); - node.statement = statement; + node.statement = asEmbeddedStatement(statement); node.expression = expression; return node; } @@ -62616,7 +64311,7 @@ var ts; function createWhile(expression, statement) { var node = createSynthesizedNode(225 /* WhileStatement */); node.expression = expression; - node.statement = statement; + node.statement = asEmbeddedStatement(statement); return node; } ts.createWhile = createWhile; @@ -62632,7 +64327,7 @@ var ts; node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; - node.statement = statement; + node.statement = asEmbeddedStatement(statement); return node; } ts.createFor = createFor; @@ -62649,7 +64344,7 @@ var ts; var node = createSynthesizedNode(227 /* ForInStatement */); node.initializer = initializer; node.expression = expression; - node.statement = statement; + node.statement = asEmbeddedStatement(statement); return node; } ts.createForIn = createForIn; @@ -62666,7 +64361,7 @@ var ts; node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = expression; - node.statement = statement; + node.statement = asEmbeddedStatement(statement); return node; } ts.createForOf = createForOf; @@ -62718,7 +64413,7 @@ var ts; function createWith(expression, statement) { var node = createSynthesizedNode(232 /* WithStatement */); node.expression = expression; - node.statement = statement; + node.statement = asEmbeddedStatement(statement); return node; } ts.createWith = createWith; @@ -62746,7 +64441,7 @@ var ts; function createLabel(label, statement) { var node = createSynthesizedNode(234 /* LabeledStatement */); node.label = asName(label); - node.statement = statement; + node.statement = asEmbeddedStatement(statement); return node; } ts.createLabel = createLabel; @@ -63155,7 +64850,7 @@ var ts; ts.createJSDocTypeExpression = createJSDocTypeExpression; /* @internal */ function createJSDocTypeTag(typeExpression, comment) { - var tag = createJSDocTag(308 /* JSDocTypeTag */, "type"); + var tag = createJSDocTag(310 /* JSDocTypeTag */, "type"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; @@ -63163,15 +64858,22 @@ var ts; ts.createJSDocTypeTag = createJSDocTypeTag; /* @internal */ function createJSDocReturnTag(typeExpression, comment) { - var tag = createJSDocTag(306 /* JSDocReturnTag */, "returns"); + var tag = createJSDocTag(308 /* JSDocReturnTag */, "returns"); tag.typeExpression = typeExpression; tag.comment = comment; return tag; } ts.createJSDocReturnTag = createJSDocReturnTag; + /** @internal */ + function createJSDocThisTag(typeExpression) { + var tag = createJSDocTag(309 /* JSDocThisTag */, "this"); + tag.typeExpression = typeExpression; + return tag; + } + ts.createJSDocThisTag = createJSDocThisTag; /* @internal */ function createJSDocParamTag(name, isBracketed, typeExpression, comment) { - var tag = createJSDocTag(305 /* JSDocParameterTag */, "param"); + var tag = createJSDocTag(307 /* JSDocParameterTag */, "param"); tag.typeExpression = typeExpression; tag.name = name; tag.isBracketed = isBracketed; @@ -63181,7 +64883,7 @@ var ts; ts.createJSDocParamTag = createJSDocParamTag; /* @internal */ function createJSDocComment(comment, tags) { - var node = createSynthesizedNode(297 /* JSDocComment */); + var node = createSynthesizedNode(298 /* JSDocComment */); node.comment = comment; node.tags = tags; return node; @@ -63546,7 +65248,7 @@ var ts; * @param original The original statement. */ function createNotEmittedStatement(original) { - var node = createSynthesizedNode(313 /* NotEmittedStatement */); + var node = createSynthesizedNode(315 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; @@ -63558,7 +65260,7 @@ var ts; */ /* @internal */ function createEndOfDeclarationMarker(original) { - var node = createSynthesizedNode(317 /* EndOfDeclarationMarker */); + var node = createSynthesizedNode(319 /* EndOfDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -63570,7 +65272,7 @@ var ts; */ /* @internal */ function createMergeDeclarationMarker(original) { - var node = createSynthesizedNode(316 /* MergeDeclarationMarker */); + var node = createSynthesizedNode(318 /* MergeDeclarationMarker */); node.emitNode = {}; node.original = original; return node; @@ -63585,7 +65287,7 @@ var ts; * @param location The location for the expression. Defaults to the positions from "original" if provided. */ function createPartiallyEmittedExpression(expression, original) { - var node = createSynthesizedNode(314 /* PartiallyEmittedExpression */); + var node = createSynthesizedNode(316 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; setTextRange(node, original); @@ -63601,7 +65303,7 @@ var ts; ts.updatePartiallyEmittedExpression = updatePartiallyEmittedExpression; function flattenCommaElements(node) { if (ts.nodeIsSynthesized(node) && !ts.isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { - if (node.kind === 315 /* CommaListExpression */) { + if (node.kind === 317 /* CommaListExpression */) { return node.elements; } if (ts.isBinaryExpression(node) && node.operatorToken.kind === 27 /* CommaToken */) { @@ -63611,7 +65313,7 @@ var ts; return node; } function createCommaList(elements) { - var node = createSynthesizedNode(315 /* CommaListExpression */); + var node = createSynthesizedNode(317 /* CommaListExpression */); node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements)); return node; } @@ -63636,6 +65338,7 @@ var ts; ts.valuesHelper, ts.readHelper, ts.spreadHelper, + ts.spreadArraysHelper, ts.restHelper, ts.decorateHelper, ts.metadataHelper, @@ -63968,6 +65671,9 @@ var ts; function asToken(value) { return typeof value === "number" ? createToken(value) : value; } + function asEmbeddedStatement(statement) { + return statement && ts.isNotEmittedStatement(statement) ? setTextRange(setOriginalNode(createEmptyStatement(), statement), statement) : statement; + } /** * Clears any EmitNode entries from parse-tree nodes. * @param sourceFile A source file. @@ -64012,6 +65718,18 @@ var ts; return node.emitNode; } ts.getOrCreateEmitNode = getOrCreateEmitNode; + /** + * Sets `EmitFlags.NoComments` on a node and removes any leading and trailing synthetic comments. + * @internal + */ + function removeAllComments(node) { + var emitNode = getOrCreateEmitNode(node); + emitNode.flags |= 1536 /* NoComments */; + emitNode.leadingComments = undefined; + emitNode.trailingComments = undefined; + return node; + } + ts.removeAllComments = removeAllComments; function setTextRange(range, location) { if (location) { range.pos = location.pos; @@ -64340,9 +66058,9 @@ var ts; ts.createMemberAccessForPropertyName = createMemberAccessForPropertyName; function createFunctionCall(func, thisArg, argumentsList, location) { return ts.setTextRange(ts.createCall(ts.createPropertyAccess(func, "call"), - /*typeArguments*/ undefined, [ + /*typeArguments*/ undefined, __spreadArrays([ thisArg - ].concat(argumentsList)), location); + ], argumentsList)), location); } ts.createFunctionCall = createFunctionCall; function createFunctionApply(func, thisArg, argumentsExpression, location) { @@ -64443,29 +66161,34 @@ var ts; } ts.createExpressionForJsxFragment = createExpressionForJsxFragment; // Helpers - function getHelperName(name) { + /** + * Gets an identifier for the name of an *unscoped* emit helper. + */ + function getUnscopedHelperName(name) { return ts.setEmitFlags(ts.createIdentifier(name), 4096 /* HelperName */ | 2 /* AdviseOnEmitNode */); } - ts.getHelperName = getHelperName; + ts.getUnscopedHelperName = getUnscopedHelperName; ts.valuesHelper = { name: "typescript:values", + importName: "__values", scoped: false, - text: "\n var __values = (this && this.__values) || function (o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n };" + text: "\n var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n };" }; function createValuesHelper(context, expression, location) { context.requestEmitHelper(ts.valuesHelper); - return ts.setTextRange(ts.createCall(getHelperName("__values"), + return ts.setTextRange(ts.createCall(getUnscopedHelperName("__values"), /*typeArguments*/ undefined, [expression]), location); } ts.createValuesHelper = createValuesHelper; ts.readHelper = { name: "typescript:read", + importName: "__read", scoped: false, text: "\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };" }; function createReadHelper(context, iteratorRecord, count, location) { context.requestEmitHelper(ts.readHelper); - return ts.setTextRange(ts.createCall(getHelperName("__read"), + return ts.setTextRange(ts.createCall(getUnscopedHelperName("__read"), /*typeArguments*/ undefined, count !== undefined ? [iteratorRecord, ts.createLiteral(count)] : [iteratorRecord]), location); @@ -64473,16 +66196,29 @@ var ts; ts.createReadHelper = createReadHelper; ts.spreadHelper = { name: "typescript:spread", + importName: "__spread", scoped: false, text: "\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };" }; function createSpreadHelper(context, argumentList, location) { context.requestEmitHelper(ts.readHelper); context.requestEmitHelper(ts.spreadHelper); - return ts.setTextRange(ts.createCall(getHelperName("__spread"), + return ts.setTextRange(ts.createCall(getUnscopedHelperName("__spread"), /*typeArguments*/ undefined, argumentList), location); } ts.createSpreadHelper = createSpreadHelper; + ts.spreadArraysHelper = { + name: "typescript:spreadArrays", + importName: "__spreadArrays", + scoped: false, + text: "\n var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n };" + }; + function createSpreadArraysHelper(context, argumentList, location) { + context.requestEmitHelper(ts.spreadArraysHelper); + return ts.setTextRange(ts.createCall(getUnscopedHelperName("__spreadArrays"), + /*typeArguments*/ undefined, argumentList), location); + } + ts.createSpreadArraysHelper = createSpreadArraysHelper; // Utilities function createForOfBindingStatement(node, boundValue) { if (ts.isVariableDeclarationList(node)) { @@ -64501,7 +66237,7 @@ var ts; ts.createForOfBindingStatement = createForOfBindingStatement; function insertLeadingStatement(dest, source) { if (ts.isBlock(dest)) { - return ts.updateBlock(dest, ts.setTextRange(ts.createNodeArray([source].concat(dest.statements)), dest.statements)); + return ts.updateBlock(dest, ts.setTextRange(ts.createNodeArray(__spreadArrays([source], dest.statements)), dest.statements)); } else { return ts.createBlock(ts.createNodeArray([dest, source]), /*multiLine*/ true); @@ -64948,9 +66684,9 @@ var ts; function ensureUseStrict(statements) { var foundUseStrict = findUseStrictPrologue(statements); if (!foundUseStrict) { - return ts.setTextRange(ts.createNodeArray([ + return ts.setTextRange(ts.createNodeArray(__spreadArrays([ startOnNewLine(ts.createStatement(ts.createLiteral("use strict"))) - ].concat(statements)), statements); + ], statements)), statements); } return statements; } @@ -65324,13 +67060,14 @@ var ts; case 191 /* ElementAccessExpression */: case 190 /* PropertyAccessExpression */: case 214 /* NonNullExpression */: - case 314 /* PartiallyEmittedExpression */: + case 316 /* PartiallyEmittedExpression */: node = node.expression; continue; } return node; } } + ts.getLeftmostExpression = getLeftmostExpression; function parenthesizeConciseBody(body) { if (!ts.isBlock(body) && (isCommaSequence(body) || getLeftmostExpression(body, /*stopAtCallExpressions*/ false).kind === 189 /* ObjectLiteralExpression */)) { return ts.setTextRange(ts.createParen(body), body); @@ -65340,7 +67077,7 @@ var ts; ts.parenthesizeConciseBody = parenthesizeConciseBody; function isCommaSequence(node) { return node.kind === 205 /* BinaryExpression */ && node.operatorToken.kind === 27 /* CommaToken */ || - node.kind === 315 /* CommaListExpression */; + node.kind === 317 /* CommaListExpression */; } ts.isCommaSequence = isCommaSequence; var OuterExpressionKinds; @@ -65359,7 +67096,7 @@ var ts; case 213 /* AsExpression */: case 214 /* NonNullExpression */: return (kinds & 2 /* Assertions */) !== 0; - case 314 /* PartiallyEmittedExpression */: + case 316 /* PartiallyEmittedExpression */: return (kinds & 4 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -65396,7 +67133,7 @@ var ts; case 195 /* TypeAssertionExpression */: return ts.updateTypeAssertion(outerExpression, outerExpression.type, expression); case 213 /* AsExpression */: return ts.updateAsExpression(outerExpression, expression, outerExpression.type); case 214 /* NonNullExpression */: return ts.updateNonNullExpression(outerExpression, expression); - case 314 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); + case 316 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(outerExpression, expression); } } /** @@ -65439,6 +67176,60 @@ var ts; return emitNode && emitNode.externalHelpersModuleName; } ts.getExternalHelpersModuleName = getExternalHelpersModuleName; + function hasRecordedExternalHelpers(sourceFile) { + var parseNode = ts.getOriginalNode(sourceFile, ts.isSourceFile); + var emitNode = parseNode && parseNode.emitNode; + return !!emitNode && (!!emitNode.externalHelpersModuleName || !!emitNode.externalHelpers); + } + ts.hasRecordedExternalHelpers = hasRecordedExternalHelpers; + function createExternalHelpersImportDeclarationIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar, hasImportDefault) { + if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(sourceFile, compilerOptions)) { + var namedBindings = void 0; + var moduleKind = ts.getEmitModuleKind(compilerOptions); + if (moduleKind >= ts.ModuleKind.ES2015 && moduleKind <= ts.ModuleKind.ESNext) { + // use named imports + var helpers = ts.getEmitHelpers(sourceFile); + if (helpers) { + var helperNames = []; + for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) { + var helper = helpers_2[_i]; + if (!helper.scoped) { + var importName = helper.importName; + if (importName) { + ts.pushIfUnique(helperNames, importName); + } + } + } + if (ts.some(helperNames)) { + helperNames.sort(ts.compareStringsCaseSensitive); + // Alias the imports if the names are used somewhere in the file. + // NOTE: We don't need to care about global import collisions as this is a module. + namedBindings = ts.createNamedImports(ts.map(helperNames, function (name) { return ts.isFileLevelUniqueName(sourceFile, name) + ? ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(name)) + : ts.createImportSpecifier(ts.createIdentifier(name), getUnscopedHelperName(name)); })); + var parseNode = ts.getOriginalNode(sourceFile, ts.isSourceFile); + var emitNode = ts.getOrCreateEmitNode(parseNode); + emitNode.externalHelpers = true; + } + } + } + else { + // use a namespace import + var externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar || hasImportDefault); + if (externalHelpersModuleName) { + namedBindings = ts.createNamespaceImport(externalHelpersModuleName); + } + } + if (namedBindings) { + var externalHelpersImportDeclaration = ts.createImportDeclaration( + /*decorators*/ undefined, + /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, namedBindings), ts.createLiteral(ts.externalHelpersModuleNameText)); + ts.addEmitFlags(externalHelpersImportDeclaration, 67108864 /* NeverApplyImportHelper */); + return externalHelpersImportDeclaration; + } + } + } + ts.createExternalHelpersImportDeclarationIfNeeded = createExternalHelpersImportDeclarationIfNeeded; function getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions, hasExportStarsToExportValues, hasImportStarOrImportDefault) { if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(node, compilerOptions)) { var externalHelpersModuleName = getExternalHelpersModuleName(node); @@ -65453,8 +67244,8 @@ var ts; if (!create) { var helpers = ts.getEmitHelpers(node); if (helpers) { - for (var _i = 0, helpers_2 = helpers; _i < helpers_2.length; _i++) { - var helper = helpers_2[_i]; + for (var _i = 0, helpers_3 = helpers; _i < helpers_3.length; _i++) { + var helper = helpers_3[_i]; if (!helper.scoped) { create = true; break; @@ -65886,11 +67677,9 @@ var ts; function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict) { context.startLexicalEnvironment(); statements = visitNodes(statements, visitor, ts.isStatement, start); - if (ensureUseStrict && !ts.startsWithUseStrict(statements)) { - statements = ts.setTextRange(ts.createNodeArray([ts.createExpressionStatement(ts.createLiteral("use strict"))].concat(statements)), statements); - } - var declarations = context.endLexicalEnvironment(); - return ts.setTextRange(ts.createNodeArray(ts.concatenate(declarations, statements)), statements); + if (ensureUseStrict) + statements = ts.ensureUseStrict(statements); // tslint:disable-line no-unnecessary-qualifier + return ts.mergeLexicalEnvironment(statements, context.endLexicalEnvironment()); } ts.visitLexicalEnvironment = visitLexicalEnvironment; /** @@ -66193,9 +67982,9 @@ var ts; case 285 /* SourceFile */: return ts.updateSourceFileNode(node, visitLexicalEnvironment(node.statements, visitor, context)); // Transformation nodes - case 314 /* PartiallyEmittedExpression */: + case 316 /* PartiallyEmittedExpression */: return ts.updatePartiallyEmittedExpression(node, visitNode(node.expression, visitor, ts.isExpression)); - case 315 /* CommaListExpression */: + case 317 /* CommaListExpression */: return ts.updateCommaList(node, nodesVisitor(node.elements, visitor, ts.isExpression)); default: // No need to visit nodes with no children. @@ -66251,7 +68040,7 @@ var ts; case 221 /* EmptyStatement */: case 211 /* OmittedExpression */: case 237 /* DebuggerStatement */: - case 313 /* NotEmittedStatement */: + case 315 /* NotEmittedStatement */: // No need to visit nodes with no children. break; // Names @@ -66632,10 +68421,10 @@ var ts; result = reduceNodes(node.statements, cbNodes, result); break; // Transformation nodes - case 314 /* PartiallyEmittedExpression */: + case 316 /* PartiallyEmittedExpression */: result = reduceNode(node.expression, cbNode, result); break; - case 315 /* CommaListExpression */: + case 317 /* CommaListExpression */: result = reduceNodes(node.elements, cbNodes, result); break; default: @@ -66850,7 +68639,6 @@ var ts; exit(); } function appendSourceMap(generatedLine, generatedCharacter, map, sourceMapPath, start, end) { - var _a; ts.Debug.assert(generatedLine >= pendingGeneratedLine, "generatedLine cannot backtrack"); ts.Debug.assert(generatedCharacter >= 0, "generatedCharacter cannot be negative"); enter(); @@ -66858,7 +68646,8 @@ var ts; var sourceIndexToNewSourceIndexMap = []; var nameIndexToNewNameIndexMap; var mappingIterator = decodeMappings(map.mappings); - for (var _b = mappingIterator.next(), raw = _b.value, done = _b.done; !done; _a = mappingIterator.next(), raw = _a.value, done = _a.done, _a) { + for (var iterResult = mappingIterator.next(); !iterResult.done; iterResult = mappingIterator.next()) { + var raw = iterResult.value; if (end && (raw.generatedLine > end.line || (raw.generatedLine === end.line && raw.generatedCharacter > end.character))) { break; @@ -67423,7 +69212,8 @@ var ts; var hasExportDefault = false; var exportEquals; var hasExportStarsToExportValues = false; - var hasImportStarOrImportDefault = false; + var hasImportStar = false; + var hasImportDefault = false; for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { var node = _a[_i]; switch (node.kind) { @@ -67433,7 +69223,12 @@ var ts; // import * as x from "mod" // import { x, y } from "mod" externalImports.push(node); - hasImportStarOrImportDefault = hasImportStarOrImportDefault || getImportNeedsImportStarHelper(node) || getImportNeedsImportDefaultHelper(node); + if (!hasImportStar && getImportNeedsImportStarHelper(node)) { + hasImportStar = true; + } + if (!hasImportDefault && getImportNeedsImportDefaultHelper(node)) { + hasImportDefault = true; + } break; case 249 /* ImportEqualsDeclaration */: if (node.moduleReference.kind === 260 /* ExternalModuleReference */) { @@ -67527,12 +69322,8 @@ var ts; break; } } - var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStarOrImportDefault); - var externalHelpersImportDeclaration = externalHelpersModuleName && ts.createImportDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)); + var externalHelpersImportDeclaration = ts.createExternalHelpersImportDeclarationIfNeeded(sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar, hasImportDefault); if (externalHelpersImportDeclaration) { - ts.addEmitFlags(externalHelpersImportDeclaration, 67108864 /* NeverApplyImportHelper */); externalImports.unshift(externalHelpersImportDeclaration); } return { externalImports: externalImports, exportSpecifiers: exportSpecifiers, exportEquals: exportEquals, hasExportStarsToExportValues: hasExportStarsToExportValues, exportedBindings: exportedBindings, exportedNames: exportedNames, externalHelpersImportDeclaration: externalHelpersImportDeclaration }; @@ -67579,6 +69370,43 @@ var ts; ts.isIdentifier(expression); } ts.isSimpleCopiableExpression = isSimpleCopiableExpression; + /** + * A simple inlinable expression is an expression which can be copied into multiple locations + * without risk of repeating any sideeffects and whose value could not possibly change between + * any such locations + */ + function isSimpleInlineableExpression(expression) { + return !ts.isIdentifier(expression) && isSimpleCopiableExpression(expression) || + ts.isWellKnownSymbolSyntactically(expression); + } + ts.isSimpleInlineableExpression = isSimpleInlineableExpression; + /** + * Adds super call and preceding prologue directives into the list of statements. + * + * @param ctor The constructor node. + * @param result The list of statements. + * @param visitor The visitor to apply to each node added to the result array. + * @returns index of the statement that follows super call + */ + function addPrologueDirectivesAndInitialSuperCall(ctor, result, visitor) { + if (ctor.body) { + var statements = ctor.body.statements; + // add prologue directives to the list (if any) + var index = ts.addPrologue(result, statements, /*ensureUseStrict*/ false, visitor); + if (index === statements.length) { + // list contains nothing but prologue directives (or empty) - exit + return index; + } + var statement = statements[index]; + if (statement.kind === 222 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { + result.push(ts.visitNode(statement, visitor, ts.isStatement)); + return index + 1; + } + return index; + } + return 0; + } + ts.addPrologueDirectivesAndInitialSuperCall = addPrologueDirectivesAndInitialSuperCall; /** * @param input Template string input strings * @param args Names which need to be made file-level unique @@ -67599,6 +69427,45 @@ var ts; }; } ts.helperString = helperString; + /** + * Gets all property declarations with initializers on either the static or instance side of a class. + * + * @param node The class node. + * @param isStatic A value indicating whether to get properties from the static or instance side of the class. + */ + function getInitializedProperties(node, isStatic) { + return ts.filter(node.members, isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty); + } + ts.getInitializedProperties = getInitializedProperties; + /** + * Gets a value indicating whether a class element is a static property declaration with an initializer. + * + * @param member The class element node. + */ + function isStaticInitializedProperty(member) { + return isInitializedProperty(member) && ts.hasStaticModifier(member); + } + ts.isStaticInitializedProperty = isStaticInitializedProperty; + /** + * Gets a value indicating whether a class element is an instance property declaration with an initializer. + * + * @param member The class element node. + */ + function isInstanceInitializedProperty(member) { + return isInitializedProperty(member) && !ts.hasStaticModifier(member); + } + ts.isInstanceInitializedProperty = isInstanceInitializedProperty; + /** + * Gets a value indicating whether a class element is either a static or an instance property declaration with an initializer. + * + * @param member The class element node. + * @param isStatic A value indicating whether the member should be a static or instance member. + */ + function isInitializedProperty(member) { + return member.kind === 155 /* PropertyDeclaration */ + && member.initializer !== undefined; + } + ts.isInitializedProperty = isInitializedProperty; })(ts || (ts = {})); /*@internal*/ var ts; @@ -68044,6 +69911,7 @@ var ts; } ts.restHelper = { name: "typescript:rest", + importName: "__rest", scoped: false, text: "\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n };" }; @@ -68068,7 +69936,7 @@ var ts; } } } - return ts.createCall(ts.getHelperName("__rest"), + return ts.createCall(ts.getUnscopedHelperName("__rest"), /*typeArguments*/ undefined, [ value, ts.setTextRange(ts.createArrayLiteral(propertyNames), location) @@ -68130,6 +69998,7 @@ var ts; var currentLexicalScope; var currentNameScope; var currentScopeFirstDeclarationsOfName; + var currentClassHasParameterProperties; /** * Keeps track of whether expression substitution has been enabled for specific edge cases. * They are persisted between each SourceFile transformation and should not be reset. @@ -68145,11 +70014,6 @@ var ts; * just-in-time substitution while printing an expression identifier. */ var applicableSubstitutions; - /** - * Tracks what computed name expressions originating from elided names must be inlined - * at the next execution site, in document order - */ - var pendingExpressions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { if (node.kind === 286 /* Bundle */) { @@ -68190,6 +70054,7 @@ var ts; var savedCurrentScope = currentLexicalScope; var savedCurrentNameScope = currentNameScope; var savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName; + var savedCurrentClassHasParameterProperties = currentClassHasParameterProperties; // Handle state changes before visiting a node. onBeforeVisitNode(node); var visited = f(node); @@ -68199,6 +70064,7 @@ var ts; } currentLexicalScope = savedCurrentScope; currentNameScope = savedCurrentNameScope; + currentClassHasParameterProperties = savedCurrentClassHasParameterProperties; return visited; } /** @@ -68351,11 +70217,11 @@ var ts; function classElementVisitorWorker(node) { switch (node.kind) { case 158 /* Constructor */: - // TypeScript constructors are transformed in `visitClassDeclaration`. - // We elide them here as `visitorWorker` checks transform flags, which could - // erronously include an ES6 constructor without TypeScript syntax. - return undefined; + return visitConstructor(node); case 155 /* PropertyDeclaration */: + // Property declarations are not TypeScript syntax, but they must be visited + // for the decorator transformation. + return visitPropertyDeclaration(node); case 163 /* IndexSignature */: case 159 /* GetAccessor */: case 160 /* SetAccessor */: @@ -68456,7 +70322,6 @@ var ts; // - decorators // - optional `implements` heritage clause // - parameter property assignments in the constructor - // - property declarations // - index signatures // - method overload signatures return visitClassDeclaration(node); @@ -68467,7 +70332,6 @@ var ts; // - decorators // - optional `implements` heritage clause // - parameter property assignments in the constructor - // - property declarations // - index signatures // - method overload signatures return visitClassExpression(node); @@ -68604,31 +70468,16 @@ var ts; if (!isClassLikeDeclarationWithTypeScriptSyntax(node) && !(currentNamespace && ts.hasModifier(node, 1 /* Export */))) { return ts.visitEachChild(node, visitor, context); } - var savedPendingExpressions = pendingExpressions; - pendingExpressions = undefined; - var staticProperties = getInitializedProperties(node, /*isStatic*/ true); + var staticProperties = ts.getInitializedProperties(node, /*isStatic*/ true); var facts = getClassFacts(node, staticProperties); if (facts & 128 /* UseImmediatelyInvokedFunctionExpression */) { context.startLexicalEnvironment(); } var name = node.name || (facts & 5 /* NeedsName */ ? ts.getGeneratedNameForNode(node) : undefined); var classStatement = facts & 2 /* HasConstructorDecorators */ - ? createClassDeclarationHeadWithDecorators(node, name, facts) + ? createClassDeclarationHeadWithDecorators(node, name) : createClassDeclarationHeadWithoutDecorators(node, name, facts); var statements = [classStatement]; - // Write any pending expressions from elided or moved computed property names - if (ts.some(pendingExpressions)) { - statements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); - } - pendingExpressions = savedPendingExpressions; - // Emit static property assignment. Because classDeclaration is lexically evaluated, - // it is safe to emit static property assignment after classDeclaration - // From ES6 specification: - // HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using - // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. - if (facts & 1 /* HasStaticInitializedProperties */) { - addInitializedPropertyStatements(statements, staticProperties, facts & 128 /* UseImmediatelyInvokedFunctionExpression */ ? ts.getInternalName(node) : ts.getLocalName(node)); - } // Write any decorators of the node. addClassElementDecorationStatements(statements, node, /*isStatic*/ false); addClassElementDecorationStatements(statements, node, /*isStatic*/ true); @@ -68708,13 +70557,14 @@ var ts; : undefined; var classDeclaration = ts.createClassDeclaration( /*decorators*/ undefined, modifiers, name, - /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, (facts & 64 /* IsDerivedClass */) !== 0)); + /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node)); // To better align with the old emitter, we should not emit a trailing source map // entry if the class has static properties. var emitFlags = ts.getEmitFlags(node); if (facts & 1 /* HasStaticInitializedProperties */) { emitFlags |= 32 /* NoTrailingSourceMap */; } + ts.aggregateTransformFlags(classDeclaration); ts.setTextRange(classDeclaration, node); ts.setOriginalNode(classDeclaration, node); ts.setEmitFlags(classDeclaration, emitFlags); @@ -68724,7 +70574,7 @@ var ts; * Transforms a decorated class declaration and appends the resulting statements. If * the class requires an alias to avoid issues with double-binding, the alias is returned. */ - function createClassDeclarationHeadWithDecorators(node, name, facts) { + function createClassDeclarationHeadWithDecorators(node, name) { // When we emit an ES6 class that has a class decorator, we must tailor the // emit to certain specific cases. // @@ -68817,8 +70667,9 @@ var ts; // ${members} // } var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause); - var members = transformClassMembers(node, (facts & 64 /* IsDerivedClass */) !== 0); + var members = transformClassMembers(node); var classExpression = ts.createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members); + ts.aggregateTransformFlags(classExpression); ts.setOriginalNode(classExpression, node); ts.setTextRange(classExpression, location); // let ${name} = ${classExpression} where name is either declaredName if the class doesn't contain self-reference @@ -68837,310 +70688,39 @@ var ts; if (!isClassLikeDeclarationWithTypeScriptSyntax(node)) { return ts.visitEachChild(node, visitor, context); } - var savedPendingExpressions = pendingExpressions; - pendingExpressions = undefined; - var staticProperties = getInitializedProperties(node, /*isStatic*/ true); - var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause); - var members = transformClassMembers(node, ts.some(heritageClauses, function (c) { return c.token === 87 /* ExtendsKeyword */; })); var classExpression = ts.createClassExpression( /*modifiers*/ undefined, node.name, - /*typeParameters*/ undefined, heritageClauses, members); + /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node)); + ts.aggregateTransformFlags(classExpression); ts.setOriginalNode(classExpression, node); ts.setTextRange(classExpression, node); - if (ts.some(staticProperties) || ts.some(pendingExpressions)) { - var expressions = []; - var isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 16777216 /* ClassWithConstructorReference */; - var temp = ts.createTempVariable(hoistVariableDeclaration, !!isClassWithConstructorReference); - if (isClassWithConstructorReference) { - // record an alias as the class name is not in scope for statics. - enableSubstitutionForClassAliases(); - var alias = ts.getSynthesizedClone(temp); - alias.autoGenerateFlags &= ~8 /* ReservedInNestedScopes */; - classAliases[ts.getOriginalNodeId(node)] = alias; - } - // To preserve the behavior of the old emitter, we explicitly indent - // the body of a class with static initializers. - ts.setEmitFlags(classExpression, 65536 /* Indented */ | ts.getEmitFlags(classExpression)); - expressions.push(ts.startOnNewLine(ts.createAssignment(temp, classExpression))); - // Add any pending expressions leftover from elided or relocated computed property names - ts.addRange(expressions, ts.map(pendingExpressions, ts.startOnNewLine)); - pendingExpressions = savedPendingExpressions; - ts.addRange(expressions, generateInitializedPropertyExpressions(staticProperties, temp)); - expressions.push(ts.startOnNewLine(temp)); - return ts.inlineExpressions(expressions); - } - pendingExpressions = savedPendingExpressions; return classExpression; } /** * Transforms the members of a class. * * @param node The current class. - * @param isDerivedClass A value indicating whether the class has an extends clause that does not extend 'null'. */ - function transformClassMembers(node, isDerivedClass) { + function transformClassMembers(node) { var members = []; - var constructor = transformConstructor(node, isDerivedClass); - if (constructor) { - members.push(constructor); - } - ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement)); - return ts.setTextRange(ts.createNodeArray(members), /*location*/ node.members); - } - /** - * Transforms (or creates) a constructor for a class. - * - * @param node The current class. - * @param isDerivedClass A value indicating whether the class has an extends clause that does not extend 'null'. - */ - function transformConstructor(node, isDerivedClass) { - // Check if we have property assignment inside class declaration. - // If there is a property assignment, we need to emit constructor whether users define it or not - // If there is no property assignment, we can omit constructor if users do not define it var constructor = ts.getFirstConstructorWithBody(node); - var hasInstancePropertyWithInitializer = ts.forEach(node.members, isInstanceInitializedProperty); - var hasParameterPropertyAssignments = constructor && - constructor.transformFlags & 1024 /* ContainsTypeScriptClassSyntax */ && - ts.forEach(constructor.parameters, isParameterWithPropertyAssignment); - // If the class does not contain nodes that require a synthesized constructor, - // accept the current constructor if it exists. - if (!hasInstancePropertyWithInitializer && !hasParameterPropertyAssignments) { - return ts.visitEachChild(constructor, visitor, context); - } - var parameters = transformConstructorParameters(constructor); - var body = transformConstructorBody(node, constructor, isDerivedClass); - // constructor(${parameters}) { - // ${body} - // } - return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(ts.createConstructor( - /*decorators*/ undefined, - /*modifiers*/ undefined, parameters, body), constructor || node), constructor)); - } - /** - * Transforms (or creates) the parameters for the constructor of a class with - * parameter property assignments or instance property initializers. - * - * @param constructor The constructor declaration. - */ - function transformConstructorParameters(constructor) { - // The ES2015 spec specifies in 14.5.14. Runtime Semantics: ClassDefinitionEvaluation: - // If constructor is empty, then - // If ClassHeritag_eopt is present and protoParent is not null, then - // Let constructor be the result of parsing the source text - // constructor(...args) { super (...args);} - // using the syntactic grammar with the goal symbol MethodDefinition[~Yield]. - // Else, - // Let constructor be the result of parsing the source text - // constructor( ){ } - // using the syntactic grammar with the goal symbol MethodDefinition[~Yield]. - // - // While we could emit the '...args' rest parameter, certain later tools in the pipeline might - // downlevel the '...args' portion less efficiently by naively copying the contents of 'arguments' to an array. - // Instead, we'll avoid using a rest parameter and spread into the super call as - // 'super(...arguments)' instead of 'super(...args)', as you can see in "transformConstructorBody". - return ts.visitParameterList(constructor && constructor.parameters, visitor, context) - || []; - } - /** - * Transforms (or creates) a constructor body for a class with parameter property - * assignments or instance property initializers. - * - * @param node The current class. - * @param constructor The current class constructor. - * @param isDerivedClass A value indicating whether the class has an extends clause that does not extend 'null'. - */ - function transformConstructorBody(node, constructor, isDerivedClass) { - var statements = []; - var indexOfFirstStatement = 0; - resumeLexicalEnvironment(); - if (constructor) { - indexOfFirstStatement = addPrologueDirectivesAndInitialSuperCall(constructor, statements); - // Add parameters with property assignments. Transforms this: - // - // constructor (public x, public y) { - // } - // - // Into this: - // - // constructor (x, y) { - // this.x = x; - // this.y = y; - // } - // - var propertyAssignments = getParametersWithPropertyAssignments(constructor); - ts.addRange(statements, ts.map(propertyAssignments, transformParameterWithPropertyAssignment)); - } - else if (isDerivedClass) { - // Add a synthetic `super` call: - // - // super(...arguments); - // - statements.push(ts.createExpressionStatement(ts.createCall(ts.createSuper(), - /*typeArguments*/ undefined, [ts.createSpread(ts.createIdentifier("arguments"))]))); - } - // Add the property initializers. Transforms this: - // - // public x = 1; - // - // Into this: - // - // constructor() { - // this.x = 1; - // } - // - var properties = getInitializedProperties(node, /*isStatic*/ false); - addInitializedPropertyStatements(statements, properties, ts.createThis()); - if (constructor) { - // The class already had a constructor, so we should add the existing statements, skipping the initial super call. - ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement)); - } - // End the lexical environment. - statements = ts.mergeLexicalEnvironment(statements, endLexicalEnvironment()); - return ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), - /*location*/ constructor ? constructor.body.statements : node.members), - /*multiLine*/ true), - /*location*/ constructor ? constructor.body : undefined); - } - /** - * Adds super call and preceding prologue directives into the list of statements. - * - * @param ctor The constructor node. - * @returns index of the statement that follows super call - */ - function addPrologueDirectivesAndInitialSuperCall(ctor, result) { - if (ctor.body) { - var statements = ctor.body.statements; - // add prologue directives to the list (if any) - var index = ts.addPrologue(result, statements, /*ensureUseStrict*/ false, visitor); - if (index === statements.length) { - // list contains nothing but prologue directives (or empty) - exit - return index; - } - var statement = statements[index]; - if (statement.kind === 222 /* ExpressionStatement */ && ts.isSuperCall(statement.expression)) { - result.push(ts.visitNode(statement, visitor, ts.isStatement)); - return index + 1; + var parametersWithPropertyAssignments = constructor && + ts.filter(constructor.parameters, function (p) { return ts.isParameterPropertyDeclaration(p, constructor); }); + if (parametersWithPropertyAssignments) { + for (var _i = 0, parametersWithPropertyAssignments_1 = parametersWithPropertyAssignments; _i < parametersWithPropertyAssignments_1.length; _i++) { + var parameter = parametersWithPropertyAssignments_1[_i]; + if (ts.isIdentifier(parameter.name)) { + members.push(ts.aggregateTransformFlags(ts.createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, parameter.name, + /*questionOrExclamationToken*/ undefined, + /*type*/ undefined, + /*initializer*/ undefined))); + } } - return index; } - return 0; - } - /** - * Gets all parameters of a constructor that should be transformed into property assignments. - * - * @param node The constructor node. - */ - function getParametersWithPropertyAssignments(node) { - return ts.filter(node.parameters, isParameterWithPropertyAssignment); - } - /** - * Determines whether a parameter should be transformed into a property assignment. - * - * @param parameter The parameter node. - */ - function isParameterWithPropertyAssignment(parameter) { - return ts.hasModifier(parameter, 92 /* ParameterPropertyModifier */) - && ts.isIdentifier(parameter.name); - } - /** - * Transforms a parameter into a property assignment statement. - * - * @param node The parameter declaration. - */ - function transformParameterWithPropertyAssignment(node) { - ts.Debug.assert(ts.isIdentifier(node.name)); - var name = node.name; - var propertyName = ts.getMutableClone(name); - ts.setEmitFlags(propertyName, 1536 /* NoComments */ | 48 /* NoSourceMap */); - var localName = ts.getMutableClone(name); - ts.setEmitFlags(localName, 1536 /* NoComments */); - return ts.startOnNewLine(ts.setEmitFlags(ts.setTextRange(ts.createExpressionStatement(ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createThis(), propertyName), node.name), localName)), ts.moveRangePos(node, -1)), 1536 /* NoComments */)); - } - /** - * Gets all property declarations with initializers on either the static or instance side of a class. - * - * @param node The class node. - * @param isStatic A value indicating whether to get properties from the static or instance side of the class. - */ - function getInitializedProperties(node, isStatic) { - return ts.filter(node.members, isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty); - } - /** - * Gets a value indicating whether a class element is a static property declaration with an initializer. - * - * @param member The class element node. - */ - function isStaticInitializedProperty(member) { - return isInitializedProperty(member, /*isStatic*/ true); - } - /** - * Gets a value indicating whether a class element is an instance property declaration with an initializer. - * - * @param member The class element node. - */ - function isInstanceInitializedProperty(member) { - return isInitializedProperty(member, /*isStatic*/ false); - } - /** - * Gets a value indicating whether a class element is either a static or an instance property declaration with an initializer. - * - * @param member The class element node. - * @param isStatic A value indicating whether the member should be a static or instance member. - */ - function isInitializedProperty(member, isStatic) { - return member.kind === 155 /* PropertyDeclaration */ - && isStatic === ts.hasModifier(member, 32 /* Static */) - && member.initializer !== undefined; - } - /** - * Generates assignment statements for property initializers. - * - * @param properties An array of property declarations to transform. - * @param receiver The receiver on which each property should be assigned. - */ - function addInitializedPropertyStatements(statements, properties, receiver) { - for (var _i = 0, properties_6 = properties; _i < properties_6.length; _i++) { - var property = properties_6[_i]; - var statement = ts.createExpressionStatement(transformInitializedProperty(property, receiver)); - ts.setSourceMapRange(statement, ts.moveRangePastModifiers(property)); - ts.setCommentRange(statement, property); - ts.setOriginalNode(statement, property); - statements.push(statement); - } - } - /** - * Generates assignment expressions for property initializers. - * - * @param properties An array of property declarations to transform. - * @param receiver The receiver on which each property should be assigned. - */ - function generateInitializedPropertyExpressions(properties, receiver) { - var expressions = []; - for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) { - var property = properties_7[_i]; - var expression = transformInitializedProperty(property, receiver); - ts.startOnNewLine(expression); - ts.setSourceMapRange(expression, ts.moveRangePastModifiers(property)); - ts.setCommentRange(expression, property); - ts.setOriginalNode(expression, property); - expressions.push(expression); - } - return expressions; - } - /** - * Transforms a property initializer into an assignment statement. - * - * @param property The property declaration. - * @param receiver The object receiving the property assignment. - */ - function transformInitializedProperty(property, receiver) { - // We generate a name here in order to reuse the value cached by the relocated computed name expression (which uses the same generated name) - var propertyName = ts.isComputedPropertyName(property.name) && !isSimpleInlineableExpression(property.name.expression) - ? ts.updateComputedPropertyName(property.name, ts.getGeneratedNameForNode(property.name)) - : property.name; - var initializer = ts.visitNode(property.initializer, visitor, ts.isExpression); - var memberAccess = ts.createMemberAccessForPropertyName(receiver, propertyName, /*location*/ propertyName); - return ts.createAssignment(memberAccess, initializer); + ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement)); + return ts.setTextRange(ts.createNodeArray(members), /*location*/ node.members); } /** * Gets either the static or instance members of a class that are decorated, or have @@ -69864,19 +71444,10 @@ var ts; * available. */ function getGlobalBigIntNameWithFallback() { - return languageVersion < 8 /* ESNext */ + return languageVersion < 99 /* ESNext */ ? ts.createConditional(ts.createTypeCheck(ts.createIdentifier("BigInt"), "function"), ts.createIdentifier("BigInt"), ts.createIdentifier("Object")) : ts.createIdentifier("BigInt"); } - /** - * A simple inlinable expression is an expression which can be copied into multiple locations - * without risk of repeating any sideeffects and whose value could not possibly change between - * any such locations - */ - function isSimpleInlineableExpression(expression) { - return !ts.isIdentifier(expression) && ts.isSimpleCopiableExpression(expression) || - ts.isWellKnownSymbolSyntactically(expression); - } /** * Gets an expression that represents a property name. For a computed property, a * name is generated for the node. @@ -69886,7 +71457,7 @@ var ts; function getExpressionForPropertyName(member, generateNameForComputedPropertyName) { var name = member.name; if (ts.isComputedPropertyName(name)) { - return generateNameForComputedPropertyName && !isSimpleInlineableExpression(name.expression) + return generateNameForComputedPropertyName && !ts.isSimpleInlineableExpression(name.expression) ? ts.getGeneratedNameForNode(name) : name.expression; } @@ -69897,25 +71468,6 @@ var ts; return ts.getSynthesizedClone(name); } } - /** - * If the name is a computed property, this function transforms it, then either returns an expression which caches the - * value of the result or the expression itself if the value is either unused or safe to inline into multiple locations - * @param shouldHoist Does the expression need to be reused? (ie, for an initializer or a decorator) - * @param omitSimple Should expressions with no observable side-effects be elided? (ie, the expression is not hoisted for a decorator or initializer and is a literal) - */ - function getPropertyNameExpressionIfNeeded(name, shouldHoist, omitSimple) { - if (ts.isComputedPropertyName(name)) { - var expression = ts.visitNode(name.expression, visitor, ts.isExpression); - var innerExpression = ts.skipPartiallyEmittedExpressions(expression); - var inlinable = isSimpleInlineableExpression(innerExpression); - if (!inlinable && shouldHoist) { - var generatedName = ts.getGeneratedNameForNode(name); - hoistVariableDeclaration(generatedName); - return ts.createAssignment(generatedName, expression); - } - return (omitSimple && (inlinable || ts.isIdentifier(innerExpression))) ? undefined : expression; - } - } /** * Visits the property name of a class element, for use when emitting property * initializers. For a computed property on a node with decorators, a temporary @@ -69925,18 +71477,20 @@ var ts; */ function visitPropertyNameOfClassElement(member) { var name = member.name; - var expr = getPropertyNameExpressionIfNeeded(name, ts.some(member.decorators), /*omitSimple*/ false); - if (expr) { // expr only exists if `name` is a computed property name - // Inline any pending expressions from previous elided or relocated computed property name expressions in order to preserve execution order - if (ts.some(pendingExpressions)) { - expr = ts.inlineExpressions(pendingExpressions.concat([expr])); - pendingExpressions.length = 0; + // Computed property names need to be transformed into a hoisted variable when they are used more than once. + // The names are used more than once when: + // - the property is non-static and its initializer is moved to the constructor (when there are parameter property assignments). + // - the property has a decorator. + if (ts.isComputedPropertyName(name) && ((!ts.hasStaticModifier(member) && currentClassHasParameterProperties) || ts.some(member.decorators))) { + var expression = ts.visitNode(name.expression, visitor, ts.isExpression); + var innerExpression = ts.skipPartiallyEmittedExpressions(expression); + if (!ts.isSimpleInlineableExpression(innerExpression)) { + var generatedName = ts.getGeneratedNameForNode(name); + hoistVariableDeclaration(generatedName); + return ts.updateComputedPropertyName(name, ts.createAssignment(generatedName, expression)); } - return ts.updateComputedPropertyName(name, expr); - } - else { - return name; } + return ts.visitNode(name, visitor, ts.isPropertyName); } /** * Transforms a HeritageClause with TypeScript syntax. @@ -69976,17 +71530,73 @@ var ts; return !ts.nodeIsMissing(node.body); } function visitPropertyDeclaration(node) { - var expr = getPropertyNameExpressionIfNeeded(node.name, ts.some(node.decorators) || !!node.initializer, /*omitSimple*/ true); - if (expr && !isSimpleInlineableExpression(expr)) { - (pendingExpressions || (pendingExpressions = [])).push(expr); + var updated = ts.updateProperty(node, + /*decorators*/ undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), visitPropertyNameOfClassElement(node), + /*questionOrExclamationToken*/ undefined, + /*type*/ undefined, ts.visitNode(node.initializer, visitor)); + if (updated !== node) { + // While we emit the source map for the node after skipping decorators and modifiers, + // we need to emit the comments for the original range. + ts.setCommentRange(updated, node); + ts.setSourceMapRange(updated, ts.moveRangePastDecorators(node)); } - return undefined; + return updated; } function visitConstructor(node) { if (!shouldEmitFunctionLikeDeclaration(node)) { return undefined; } - return ts.updateConstructor(node, ts.visitNodes(node.decorators, visitor, ts.isDecorator), ts.visitNodes(node.modifiers, visitor, ts.isModifier), ts.visitParameterList(node.parameters, visitor, context), ts.visitFunctionBody(node.body, visitor, context)); + return ts.updateConstructor(node, + /*decorators*/ undefined, + /*modifiers*/ undefined, ts.visitParameterList(node.parameters, visitor, context), transformConstructorBody(node.body, node)); + } + function transformConstructorBody(body, constructor) { + var parametersWithPropertyAssignments = constructor && + ts.filter(constructor.parameters, function (p) { return ts.isParameterPropertyDeclaration(p, constructor); }); + if (!ts.some(parametersWithPropertyAssignments)) { + return ts.visitFunctionBody(body, visitor, context); + } + var statements = []; + var indexOfFirstStatement = 0; + resumeLexicalEnvironment(); + indexOfFirstStatement = ts.addPrologueDirectivesAndInitialSuperCall(constructor, statements, visitor); + // Add parameters with property assignments. Transforms this: + // + // constructor (public x, public y) { + // } + // + // Into this: + // + // constructor (x, y) { + // this.x = x; + // this.y = y; + // } + // + ts.addRange(statements, ts.map(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment)); + // Add the existing statements, skipping the initial super call. + ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, indexOfFirstStatement)); + // End the lexical environment. + statements = ts.mergeLexicalEnvironment(statements, endLexicalEnvironment()); + var block = ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), body.statements), /*multiLine*/ true); + ts.setTextRange(block, /*location*/ body); + ts.setOriginalNode(block, body); + return block; + } + /** + * Transforms a parameter into a property assignment statement. + * + * @param node The parameter declaration. + */ + function transformParameterWithPropertyAssignment(node) { + var name = node.name; + if (!ts.isIdentifier(name)) { + return undefined; + } + var propertyName = ts.getMutableClone(name); + ts.setEmitFlags(propertyName, 1536 /* NoComments */ | 48 /* NoSourceMap */); + var localName = ts.getMutableClone(name); + ts.setEmitFlags(localName, 1536 /* NoComments */); + return ts.startOnNewLine(ts.removeAllComments(ts.setTextRange(ts.setOriginalNode(ts.createExpressionStatement(ts.createAssignment(ts.setTextRange(ts.createPropertyAccess(ts.createThis(), propertyName), node.name), localName)), node), ts.moveRangePos(node, -1)))); } function visitMethodDeclaration(node) { if (!shouldEmitFunctionLikeDeclaration(node)) { @@ -70972,18 +72582,19 @@ var ts; } } context.requestEmitHelper(ts.decorateHelper); - return ts.setTextRange(ts.createCall(ts.getHelperName("__decorate"), + return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__decorate"), /*typeArguments*/ undefined, argumentsArray), location); } ts.decorateHelper = { name: "typescript:decorate", + importName: "__decorate", scoped: false, priority: 2, text: "\n var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };" }; function createMetadataHelper(context, metadataKey, metadataValue) { context.requestEmitHelper(ts.metadataHelper); - return ts.createCall(ts.getHelperName("__metadata"), + return ts.createCall(ts.getUnscopedHelperName("__metadata"), /*typeArguments*/ undefined, [ ts.createLiteral(metadataKey), metadataValue @@ -70991,13 +72602,14 @@ var ts; } ts.metadataHelper = { name: "typescript:metadata", + importName: "__metadata", scoped: false, priority: 3, text: "\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n };" }; function createParamHelper(context, expression, parameterOffset, location) { context.requestEmitHelper(ts.paramHelper); - return ts.setTextRange(ts.createCall(ts.getHelperName("__param"), + return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__param"), /*typeArguments*/ undefined, [ ts.createLiteral(parameterOffset), expression @@ -71005,6 +72617,7 @@ var ts; } ts.paramHelper = { name: "typescript:param", + importName: "__param", scoped: false, priority: 4, text: "\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };" @@ -71012,6 +72625,413 @@ var ts; })(ts || (ts = {})); /*@internal*/ var ts; +(function (ts) { + var ClassPropertySubstitutionFlags; + (function (ClassPropertySubstitutionFlags) { + /** + * Enables substitutions for class expressions with static fields + * which have initializers that reference the class name. + */ + ClassPropertySubstitutionFlags[ClassPropertySubstitutionFlags["ClassAliases"] = 1] = "ClassAliases"; + })(ClassPropertySubstitutionFlags || (ClassPropertySubstitutionFlags = {})); + /** + * Transforms ECMAScript Class Syntax. + * TypeScript parameter property syntax is transformed in the TypeScript transformer. + * For now, this transforms public field declarations using TypeScript class semantics + * (where the declarations get elided and initializers are transformed as assignments in the constructor). + * Eventually, this transform will change to the ECMAScript semantics (with Object.defineProperty). + */ + function transformClassFields(context) { + var hoistVariableDeclaration = context.hoistVariableDeclaration, endLexicalEnvironment = context.endLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment; + var resolver = context.getEmitResolver(); + var previousOnSubstituteNode = context.onSubstituteNode; + context.onSubstituteNode = onSubstituteNode; + var enabledSubstitutions; + var classAliases; + /** + * Tracks what computed name expressions originating from elided names must be inlined + * at the next execution site, in document order + */ + var pendingExpressions; + /** + * Tracks what computed name expression statements and static property initializers must be + * emitted at the next execution site, in document order (for decorated classes). + */ + var pendingStatements; + return ts.chainBundle(transformSourceFile); + function transformSourceFile(node) { + if (node.isDeclarationFile) { + return node; + } + var visited = ts.visitEachChild(node, visitor, context); + ts.addEmitHelpers(visited, context.readEmitHelpers()); + return visited; + } + function visitor(node) { + if (!(node.transformFlags & 1048576 /* ContainsClassFields */)) + return node; + switch (node.kind) { + case 210 /* ClassExpression */: + return visitClassExpression(node); + case 241 /* ClassDeclaration */: + return visitClassDeclaration(node); + case 220 /* VariableStatement */: + return visitVariableStatement(node); + } + return ts.visitEachChild(node, visitor, context); + } + /** + * Visits the members of a class that has fields. + * + * @param node The node to visit. + */ + function classElementVisitor(node) { + switch (node.kind) { + case 158 /* Constructor */: + // Constructors for classes using class fields are transformed in + // `visitClassDeclaration` or `visitClassExpression`. + return undefined; + case 159 /* GetAccessor */: + case 160 /* SetAccessor */: + case 157 /* MethodDeclaration */: + // Visit the name of the member (if it's a computed property name). + return ts.visitEachChild(node, classElementVisitor, context); + case 155 /* PropertyDeclaration */: + return visitPropertyDeclaration(node); + case 150 /* ComputedPropertyName */: + return visitComputedPropertyName(node); + case 218 /* SemicolonClassElement */: + return node; + default: + return visitor(node); + } + } + function visitVariableStatement(node) { + var savedPendingStatements = pendingStatements; + pendingStatements = []; + var visitedNode = ts.visitEachChild(node, visitor, context); + var statement = ts.some(pendingStatements) ? __spreadArrays([visitedNode], pendingStatements) : + visitedNode; + pendingStatements = savedPendingStatements; + return statement; + } + function visitComputedPropertyName(name) { + var node = ts.visitEachChild(name, visitor, context); + if (ts.some(pendingExpressions)) { + var expressions = pendingExpressions; + expressions.push(name.expression); + pendingExpressions = []; + node = ts.updateComputedPropertyName(node, ts.inlineExpressions(expressions)); + } + return node; + } + function visitPropertyDeclaration(node) { + ts.Debug.assert(!ts.some(node.decorators)); + // Create a temporary variable to store a computed property name (if necessary). + // If it's not inlineable, then we emit an expression after the class which assigns + // the property name to the temporary variable. + var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer); + if (expr && !ts.isSimpleInlineableExpression(expr)) { + (pendingExpressions || (pendingExpressions = [])).push(expr); + } + return undefined; + } + function visitClassDeclaration(node) { + if (!ts.forEach(node.members, ts.isPropertyDeclaration)) { + return ts.visitEachChild(node, visitor, context); + } + var savedPendingExpressions = pendingExpressions; + pendingExpressions = undefined; + var extendsClauseElement = ts.getEffectiveBaseTypeNode(node); + var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 97 /* NullKeyword */); + var statements = [ + ts.updateClassDeclaration(node, + /*decorators*/ undefined, node.modifiers, node.name, + /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass)) + ]; + // Write any pending expressions from elided or moved computed property names + if (ts.some(pendingExpressions)) { + statements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); + } + pendingExpressions = savedPendingExpressions; + // Emit static property assignment. Because classDeclaration is lexically evaluated, + // it is safe to emit static property assignment after classDeclaration + // From ES6 specification: + // HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using + // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. + var staticProperties = ts.getInitializedProperties(node, /*isStatic*/ true); + if (ts.some(staticProperties)) { + addInitializedPropertyStatements(statements, staticProperties, ts.getInternalName(node)); + } + return statements; + } + function visitClassExpression(node) { + if (!ts.forEach(node.members, ts.isPropertyDeclaration)) { + return ts.visitEachChild(node, visitor, context); + } + var savedPendingExpressions = pendingExpressions; + pendingExpressions = undefined; + // If this class expression is a transformation of a decorated class declaration, + // then we want to output the pendingExpressions as statements, not as inlined + // expressions with the class statement. + // + // In this case, we use pendingStatements to produce the same output as the + // class declaration transformation. The VariableStatement visitor will insert + // these statements after the class expression variable statement. + var isDecoratedClassDeclaration = ts.isClassDeclaration(ts.getOriginalNode(node)); + var staticProperties = ts.getInitializedProperties(node, /*isStatic*/ true); + var extendsClauseElement = ts.getEffectiveBaseTypeNode(node); + var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 97 /* NullKeyword */); + var classExpression = ts.updateClassExpression(node, node.modifiers, node.name, + /*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass)); + if (ts.some(staticProperties) || ts.some(pendingExpressions)) { + if (isDecoratedClassDeclaration) { + ts.Debug.assertDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); + // Write any pending expressions from elided or moved computed property names + if (pendingStatements && pendingExpressions && ts.some(pendingExpressions)) { + pendingStatements.push(ts.createExpressionStatement(ts.inlineExpressions(pendingExpressions))); + } + pendingExpressions = savedPendingExpressions; + if (pendingStatements && ts.some(staticProperties)) { + addInitializedPropertyStatements(pendingStatements, staticProperties, ts.getInternalName(node)); + } + return classExpression; + } + else { + var expressions = []; + var isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 16777216 /* ClassWithConstructorReference */; + var temp = ts.createTempVariable(hoistVariableDeclaration, !!isClassWithConstructorReference); + if (isClassWithConstructorReference) { + // record an alias as the class name is not in scope for statics. + enableSubstitutionForClassAliases(); + var alias = ts.getSynthesizedClone(temp); + alias.autoGenerateFlags &= ~8 /* ReservedInNestedScopes */; + classAliases[ts.getOriginalNodeId(node)] = alias; + } + // To preserve the behavior of the old emitter, we explicitly indent + // the body of a class with static initializers. + ts.setEmitFlags(classExpression, 65536 /* Indented */ | ts.getEmitFlags(classExpression)); + expressions.push(ts.startOnNewLine(ts.createAssignment(temp, classExpression))); + // Add any pending expressions leftover from elided or relocated computed property names + ts.addRange(expressions, ts.map(pendingExpressions, ts.startOnNewLine)); + ts.addRange(expressions, generateInitializedPropertyExpressions(staticProperties, temp)); + expressions.push(ts.startOnNewLine(temp)); + pendingExpressions = savedPendingExpressions; + return ts.inlineExpressions(expressions); + } + } + pendingExpressions = savedPendingExpressions; + return classExpression; + } + function transformClassMembers(node, isDerivedClass) { + var members = []; + var constructor = transformConstructor(node, isDerivedClass); + if (constructor) { + members.push(constructor); + } + ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement)); + return ts.setTextRange(ts.createNodeArray(members), /*location*/ node.members); + } + function transformConstructor(node, isDerivedClass) { + var constructor = ts.visitNode(ts.getFirstConstructorWithBody(node), visitor, ts.isConstructorDeclaration); + var containsPropertyInitializer = ts.forEach(node.members, ts.isInitializedProperty); + if (!containsPropertyInitializer) { + return constructor; + } + var parameters = ts.visitParameterList(constructor ? constructor.parameters : undefined, visitor, context); + var body = transformConstructorBody(node, constructor, isDerivedClass); + if (!body) { + return undefined; + } + return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(ts.createConstructor( + /*decorators*/ undefined, + /*modifiers*/ undefined, parameters, body), constructor || node), constructor)); + } + function transformConstructorBody(node, constructor, isDerivedClass) { + var properties = ts.getInitializedProperties(node, /*isStatic*/ false); + // Only generate synthetic constructor when there are property initializers to move. + if (!constructor && !ts.some(properties)) { + return ts.visitFunctionBody(/*node*/ undefined, visitor, context); + } + resumeLexicalEnvironment(); + var indexOfFirstStatement = 0; + var statements = []; + if (!constructor && isDerivedClass) { + // Add a synthetic `super` call: + // + // super(...arguments); + // + statements.push(ts.createExpressionStatement(ts.createCall(ts.createSuper(), + /*typeArguments*/ undefined, [ts.createSpread(ts.createIdentifier("arguments"))]))); + } + if (constructor) { + indexOfFirstStatement = ts.addPrologueDirectivesAndInitialSuperCall(constructor, statements, visitor); + } + // Add the property initializers. Transforms this: + // + // public x = 1; + // + // Into this: + // + // constructor() { + // this.x = 1; + // } + // + if (constructor && constructor.body) { + var parameterPropertyDeclarationCount = 0; + for (var i = indexOfFirstStatement; i < constructor.body.statements.length; i++) { + if (ts.isParameterPropertyDeclaration(ts.getOriginalNode(constructor.body.statements[i]), constructor)) { + parameterPropertyDeclarationCount++; + } + else { + break; + } + } + if (parameterPropertyDeclarationCount > 0) { + ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement, parameterPropertyDeclarationCount)); + indexOfFirstStatement += parameterPropertyDeclarationCount; + } + } + addInitializedPropertyStatements(statements, properties, ts.createThis()); + // Add existing statements, skipping the initial super call. + if (constructor) { + ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement)); + } + statements = ts.mergeLexicalEnvironment(statements, endLexicalEnvironment()); + return ts.setTextRange(ts.createBlock(ts.setTextRange(ts.createNodeArray(statements), + /*location*/ constructor ? constructor.body.statements : node.members), + /*multiLine*/ true), + /*location*/ constructor ? constructor.body : undefined); + } + /** + * Generates assignment statements for property initializers. + * + * @param properties An array of property declarations to transform. + * @param receiver The receiver on which each property should be assigned. + */ + function addInitializedPropertyStatements(statements, properties, receiver) { + for (var _i = 0, properties_6 = properties; _i < properties_6.length; _i++) { + var property = properties_6[_i]; + var statement = ts.createExpressionStatement(transformInitializedProperty(property, receiver)); + ts.setSourceMapRange(statement, ts.moveRangePastModifiers(property)); + ts.setCommentRange(statement, property); + ts.setOriginalNode(statement, property); + statements.push(statement); + } + } + /** + * Generates assignment expressions for property initializers. + * + * @param properties An array of property declarations to transform. + * @param receiver The receiver on which each property should be assigned. + */ + function generateInitializedPropertyExpressions(properties, receiver) { + var expressions = []; + for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) { + var property = properties_7[_i]; + var expression = transformInitializedProperty(property, receiver); + ts.startOnNewLine(expression); + ts.setSourceMapRange(expression, ts.moveRangePastModifiers(property)); + ts.setCommentRange(expression, property); + ts.setOriginalNode(expression, property); + expressions.push(expression); + } + return expressions; + } + /** + * Transforms a property initializer into an assignment statement. + * + * @param property The property declaration. + * @param receiver The object receiving the property assignment. + */ + function transformInitializedProperty(property, receiver) { + // We generate a name here in order to reuse the value cached by the relocated computed name expression (which uses the same generated name) + var propertyName = ts.isComputedPropertyName(property.name) && !ts.isSimpleInlineableExpression(property.name.expression) + ? ts.updateComputedPropertyName(property.name, ts.getGeneratedNameForNode(property.name)) + : property.name; + var initializer = ts.visitNode(property.initializer, visitor, ts.isExpression); + var memberAccess = ts.createMemberAccessForPropertyName(receiver, propertyName, /*location*/ propertyName); + return ts.createAssignment(memberAccess, initializer); + } + function enableSubstitutionForClassAliases() { + if ((enabledSubstitutions & 1 /* ClassAliases */) === 0) { + enabledSubstitutions |= 1 /* ClassAliases */; + // We need to enable substitutions for identifiers. This allows us to + // substitute class names inside of a class declaration. + context.enableSubstitution(73 /* Identifier */); + // Keep track of class aliases. + classAliases = []; + } + } + /** + * Hooks node substitutions. + * + * @param hint The context for the emitter. + * @param node The node to substitute. + */ + function onSubstituteNode(hint, node) { + node = previousOnSubstituteNode(hint, node); + if (hint === 1 /* Expression */) { + return substituteExpression(node); + } + return node; + } + function substituteExpression(node) { + switch (node.kind) { + case 73 /* Identifier */: + return substituteExpressionIdentifier(node); + } + return node; + } + function substituteExpressionIdentifier(node) { + return trySubstituteClassAlias(node) || node; + } + function trySubstituteClassAlias(node) { + if (enabledSubstitutions & 1 /* ClassAliases */) { + if (resolver.getNodeCheckFlags(node) & 33554432 /* ConstructorReferenceInClass */) { + // Due to the emit for class decorators, any reference to the class from inside of the class body + // must instead be rewritten to point to a temporary variable to avoid issues with the double-bind + // behavior of class names in ES6. + // Also, when emitting statics for class expressions, we must substitute a class alias for + // constructor references in static property initializers. + var declaration = resolver.getReferencedValueDeclaration(node); + if (declaration) { + var classAlias = classAliases[declaration.id]; // TODO: GH#18217 + if (classAlias) { + var clone_2 = ts.getSynthesizedClone(classAlias); + ts.setSourceMapRange(clone_2, node); + ts.setCommentRange(clone_2, node); + return clone_2; + } + } + } + } + return undefined; + } + /** + * If the name is a computed property, this function transforms it, then either returns an expression which caches the + * value of the result or the expression itself if the value is either unused or safe to inline into multiple locations + * @param shouldHoist Does the expression need to be reused? (ie, for an initializer or a decorator) + */ + function getPropertyNameExpressionIfNeeded(name, shouldHoist) { + if (ts.isComputedPropertyName(name)) { + var expression = ts.visitNode(name.expression, visitor, ts.isExpression); + var innerExpression = ts.skipPartiallyEmittedExpressions(expression); + var inlinable = ts.isSimpleInlineableExpression(innerExpression); + var alreadyTransformed = ts.isAssignmentExpression(innerExpression) && ts.isGeneratedIdentifier(innerExpression.left); + if (!alreadyTransformed && !inlinable && shouldHoist) { + var generatedName = ts.getGeneratedNameForNode(name); + hoistVariableDeclaration(generatedName); + return ts.createAssignment(generatedName, expression); + } + return (inlinable || ts.isIdentifier(innerExpression)) ? undefined : expression; + } + } + } + ts.transformClassFields = transformClassFields; +})(ts || (ts = {})); +/*@internal*/ +var ts; (function (ts) { var ES2017SubstitutionFlags; (function (ES2017SubstitutionFlags) { @@ -71042,6 +73062,7 @@ var ts; var hasSuperElementAccess; /** A set of node IDs for generated super accessors (variable statements). */ var substitutedSuperAccessors = []; + var topLevel; // Save the previous transformation hooks. var previousOnEmitNode = context.onEmitNode; var previousOnSubstituteNode = context.onSubstituteNode; @@ -71053,10 +73074,23 @@ var ts; if (node.isDeclarationFile) { return node; } + topLevel = ts.isEffectiveStrictModeSourceFile(node, compilerOptions); var visited = ts.visitEachChild(node, visitor, context); ts.addEmitHelpers(visited, context.readEmitHelpers()); return visited; } + function doOutsideOfTopLevel(cb, value) { + if (topLevel) { + topLevel = false; + var result = cb(value); + topLevel = true; + return result; + } + return cb(value); + } + function visitDefault(node) { + return ts.visitEachChild(node, visitor, context); + } function visitor(node) { if ((node.transformFlags & 32 /* ContainsES2017 */) === 0) { return node; @@ -71068,11 +73102,11 @@ var ts; case 202 /* AwaitExpression */: return visitAwaitExpression(node); case 157 /* MethodDeclaration */: - return visitMethodDeclaration(node); + return doOutsideOfTopLevel(visitMethodDeclaration, node); case 240 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); + return doOutsideOfTopLevel(visitFunctionDeclaration, node); case 197 /* FunctionExpression */: - return visitFunctionExpression(node); + return doOutsideOfTopLevel(visitFunctionExpression, node); case 198 /* ArrowFunction */: return visitArrowFunction(node); case 190 /* PropertyAccessExpression */: @@ -71085,6 +73119,12 @@ var ts; hasSuperElementAccess = true; } return ts.visitEachChild(node, visitor, context); + case 159 /* GetAccessor */: + case 160 /* SetAccessor */: + case 158 /* Constructor */: + case 241 /* ClassDeclaration */: + case 210 /* ClassExpression */: + return doOutsideOfTopLevel(visitDefault, node); default: return ts.visitEachChild(node, visitor, context); } @@ -71336,7 +73376,7 @@ var ts; if (!isArrowFunction) { var statements = []; var statementOffset = ts.addPrologue(statements, node.body.statements, /*ensureUseStrict*/ false, visitor); - statements.push(ts.createReturn(createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformAsyncFunctionBodyWorker(node.body, statementOffset)))); + statements.push(ts.createReturn(createAwaiterHelper(context, !topLevel, hasLexicalArguments, promiseConstructor, transformAsyncFunctionBodyWorker(node.body, statementOffset)))); ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); // Minor optimization, emit `_super` helper to capture `super` access in an arrow. // This step isn't needed if we eventually transform this to ES5. @@ -71363,7 +73403,7 @@ var ts; result = block; } else { - var expression = createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, transformAsyncFunctionBodyWorker(node.body)); + var expression = createAwaiterHelper(context, !topLevel, hasLexicalArguments, promiseConstructor, transformAsyncFunctionBodyWorker(node.body)); var declarations = endLexicalEnvironment(); if (ts.some(declarations)) { var block = ts.convertToFunctionBody(expression); @@ -71490,9 +73530,9 @@ var ts; ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression); return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), - /*typeArguments*/ undefined, [ + /*typeArguments*/ undefined, __spreadArrays([ ts.createThis() - ].concat(node.arguments)); + ], node.arguments)); } return node; } @@ -71562,11 +73602,12 @@ var ts; ts.createSuperAccessVariableStatement = createSuperAccessVariableStatement; ts.awaiterHelper = { name: "typescript:awaiter", + importName: "__awaiter", scoped: false, priority: 5, - text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };" + text: "\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };" }; - function createAwaiterHelper(context, hasLexicalArguments, promiseConstructor, body) { + function createAwaiterHelper(context, hasLexicalThis, hasLexicalArguments, promiseConstructor, body) { context.requestEmitHelper(ts.awaiterHelper); var generatorFunc = ts.createFunctionExpression( /*modifiers*/ undefined, ts.createToken(40 /* AsteriskToken */), @@ -71576,9 +73617,9 @@ var ts; /*type*/ undefined, body); // Mark this node as originally an async function (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */ | 524288 /* ReuseTempVariableScope */; - return ts.createCall(ts.getHelperName("__awaiter"), + return ts.createCall(ts.getUnscopedHelperName("__awaiter"), /*typeArguments*/ undefined, [ - ts.createThis(), + hasLexicalThis ? ts.createThis() : ts.createVoidZero(), hasLexicalArguments ? ts.createIdentifier("arguments") : ts.createVoidZero(), promiseConstructor ? ts.createExpressionFromEntityName(promiseConstructor) : ts.createVoidZero(), generatorFunc @@ -71612,9 +73653,11 @@ var ts; context.onEmitNode = onEmitNode; var previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; + var exportedVariableStatement = false; var enabledSubstitutions; var enclosingFunctionFlags; var enclosingSuperContainerFlags = 0; + var topLevel; /** Keeps track of property names accessed on super (`super.x`) within async functions. */ var capturedSuperProperties; /** Whether the async function contains an element access on super (`super[x]`). */ @@ -71626,6 +73669,8 @@ var ts; if (node.isDeclarationFile) { return node; } + exportedVariableStatement = false; + topLevel = ts.isEffectiveStrictModeSourceFile(node, compilerOptions); var visited = ts.visitEachChild(node, visitor, context); ts.addEmitHelpers(visited, context.readEmitHelpers()); return visited; @@ -71642,6 +73687,18 @@ var ts; } return node; } + function doOutsideOfTopLevel(cb, value) { + if (topLevel) { + topLevel = false; + var result = cb(value); + topLevel = true; + return result; + } + return cb(value); + } + function visitDefault(node) { + return ts.visitEachChild(node, visitor, context); + } function visitorWorker(node, noDestructuringValue) { if ((node.transformFlags & 16 /* ContainsES2018 */) === 0) { return node; @@ -71661,6 +73718,8 @@ var ts; return visitBinaryExpression(node, noDestructuringValue); case 275 /* CatchClause */: return visitCatchClause(node); + case 220 /* VariableStatement */: + return visitVariableStatement(node); case 238 /* VariableDeclaration */: return visitVariableDeclaration(node); case 228 /* ForOfStatement */: @@ -71670,17 +73729,17 @@ var ts; case 201 /* VoidExpression */: return visitVoidExpression(node); case 158 /* Constructor */: - return visitConstructorDeclaration(node); + return doOutsideOfTopLevel(visitConstructorDeclaration, node); case 157 /* MethodDeclaration */: - return visitMethodDeclaration(node); + return doOutsideOfTopLevel(visitMethodDeclaration, node); case 159 /* GetAccessor */: - return visitGetAccessorDeclaration(node); + return doOutsideOfTopLevel(visitGetAccessorDeclaration, node); case 160 /* SetAccessor */: - return visitSetAccessorDeclaration(node); + return doOutsideOfTopLevel(visitSetAccessorDeclaration, node); case 240 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); + return doOutsideOfTopLevel(visitFunctionDeclaration, node); case 197 /* FunctionExpression */: - return visitFunctionExpression(node); + return doOutsideOfTopLevel(visitFunctionExpression, node); case 198 /* ArrowFunction */: return visitArrowFunction(node); case 152 /* Parameter */: @@ -71699,6 +73758,9 @@ var ts; hasSuperElementAccess = true; } return ts.visitEachChild(node, visitor, context); + case 241 /* ClassDeclaration */: + case 210 /* ClassExpression */: + return doOutsideOfTopLevel(visitDefault, node); default: return ts.visitEachChild(node, visitor, context); } @@ -71766,14 +73828,39 @@ var ts; if (node.transformFlags & 8192 /* ContainsObjectRestOrSpread */) { // spread elements emit like so: // non-spread elements are chunked together into object literals, and then all are passed to __assign: - // { a, ...o, b } => __assign({a}, o, {b}); + // { a, ...o, b } => __assign(__assign({a}, o), {b}); // If the first element is a spread element, then the first argument to __assign is {}: - // { ...o, a, b, ...o2 } => __assign({}, o, {a, b}, o2) + // { ...o, a, b, ...o2 } => __assign(__assign(__assign({}, o), {a, b}), o2) + // + // We cannot call __assign with more than two elements, since any element could cause side effects. For + // example: + // var k = { a: 1, b: 2 }; + // var o = { a: 3, ...k, b: k.a++ }; + // // expected: { a: 1, b: 1 } + // If we translate the above to `__assign({ a: 3 }, k, { b: k.a++ })`, the `k.a++` will evaluate before + // `k` is spread and we end up with `{ a: 2, b: 1 }`. + // + // This also occurs for spread elements, not just property assignments: + // var k = { a: 1, get b() { l = { z: 9 }; return 2; } }; + // var l = { c: 3 }; + // var o = { ...k, ...l }; + // // expected: { a: 1, b: 2, z: 9 } + // If we translate the above to `__assign({}, k, l)`, the `l` will evaluate before `k` is spread and we + // end up with `{ a: 1, b: 2, c: 3 }` var objects = chunkObjectLiteralElements(node.properties); if (objects.length && objects[0].kind !== 189 /* ObjectLiteralExpression */) { objects.unshift(ts.createObjectLiteral()); } - return createAssignHelper(context, objects); + var expression = objects[0]; + if (objects.length > 1) { + for (var i = 1; i < objects.length; i++) { + expression = createAssignHelper(context, [expression, objects[i]]); + } + return expression; + } + else { + return createAssignHelper(context, objects); + } } return ts.visitEachChild(node, visitor, context); } @@ -71806,23 +73893,44 @@ var ts; var visitedBindings = ts.flattenDestructuringBinding(updatedDecl, visitor, context, 1 /* ObjectRest */); var block = ts.visitNode(node.block, visitor, ts.isBlock); if (ts.some(visitedBindings)) { - block = ts.updateBlock(block, [ + block = ts.updateBlock(block, __spreadArrays([ ts.createVariableStatement(/*modifiers*/ undefined, visitedBindings) - ].concat(block.statements)); + ], block.statements)); } return ts.updateCatchClause(node, ts.updateVariableDeclaration(node.variableDeclaration, name, /*type*/ undefined, /*initializer*/ undefined), block); } return ts.visitEachChild(node, visitor, context); } + function visitVariableStatement(node) { + if (ts.hasModifier(node, 1 /* Export */)) { + var savedExportedVariableStatement = exportedVariableStatement; + exportedVariableStatement = true; + var visited = ts.visitEachChild(node, visitor, context); + exportedVariableStatement = savedExportedVariableStatement; + return visited; + } + return ts.visitEachChild(node, visitor, context); + } /** * Visits a VariableDeclaration node with a binding pattern. * * @param node A VariableDeclaration node. */ function visitVariableDeclaration(node) { + if (exportedVariableStatement) { + var savedExportedVariableStatement = exportedVariableStatement; + exportedVariableStatement = false; + var visited = visitVariableDeclarationWorker(node, /*exportedVariableStatement*/ true); + exportedVariableStatement = savedExportedVariableStatement; + return visited; + } + return visitVariableDeclarationWorker(node, /*exportedVariableStatement*/ false); + } + function visitVariableDeclarationWorker(node, exportedVariableStatement) { // If we are here it is because the name contains a binding pattern with a rest somewhere in it. if (ts.isBindingPattern(node.name) && node.name.transformFlags & 8192 /* ContainsObjectRestOrSpread */) { - return ts.flattenDestructuringBinding(node, visitor, context, 1 /* ObjectRest */); + return ts.flattenDestructuringBinding(node, visitor, context, 1 /* ObjectRest */, + /*rval*/ undefined, exportedVariableStatement); } return ts.visitEachChild(node, visitor, context); } @@ -72040,7 +74148,7 @@ var ts; /*modifiers*/ undefined, ts.createToken(40 /* AsteriskToken */), node.name && ts.getGeneratedNameForNode(node.name), /*typeParameters*/ undefined, /*parameters*/ [], - /*type*/ undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset))))); + /*type*/ undefined, ts.updateBlock(node.body, ts.visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset))), !topLevel)); // Minor optimization, emit `_super` helper to capture `super` access in an arrow. // This step isn't needed if we eventually transform this to ES5. var emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (4096 /* AsyncMethodWithSuperBinding */ | 2048 /* AsyncMethodWithSuper */); @@ -72192,9 +74300,9 @@ var ts; ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression); return ts.createCall(ts.createPropertyAccess(argumentExpression, "call"), - /*typeArguments*/ undefined, [ + /*typeArguments*/ undefined, __spreadArrays([ ts.createThis() - ].concat(node.arguments)); + ], node.arguments)); } return node; } @@ -72220,6 +74328,7 @@ var ts; ts.transformES2018 = transformES2018; ts.assignHelper = { name: "typescript:assign", + importName: "__assign", scoped: false, priority: 1, text: "\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };" @@ -72230,55 +74339,59 @@ var ts; /*typeArguments*/ undefined, attributesSegments); } context.requestEmitHelper(ts.assignHelper); - return ts.createCall(ts.getHelperName("__assign"), + return ts.createCall(ts.getUnscopedHelperName("__assign"), /*typeArguments*/ undefined, attributesSegments); } ts.createAssignHelper = createAssignHelper; ts.awaitHelper = { name: "typescript:await", + importName: "__await", scoped: false, text: "\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }" }; function createAwaitHelper(context, expression) { context.requestEmitHelper(ts.awaitHelper); - return ts.createCall(ts.getHelperName("__await"), /*typeArguments*/ undefined, [expression]); + return ts.createCall(ts.getUnscopedHelperName("__await"), /*typeArguments*/ undefined, [expression]); } ts.asyncGeneratorHelper = { name: "typescript:asyncGenerator", + importName: "__asyncGenerator", scoped: false, text: "\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };" }; - function createAsyncGeneratorHelper(context, generatorFunc) { + function createAsyncGeneratorHelper(context, generatorFunc, hasLexicalThis) { context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncGeneratorHelper); // Mark this node as originally an async function (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 262144 /* AsyncFunctionBody */; - return ts.createCall(ts.getHelperName("__asyncGenerator"), + return ts.createCall(ts.getUnscopedHelperName("__asyncGenerator"), /*typeArguments*/ undefined, [ - ts.createThis(), + hasLexicalThis ? ts.createThis() : ts.createVoidZero(), ts.createIdentifier("arguments"), generatorFunc ]); } ts.asyncDelegator = { name: "typescript:asyncDelegator", + importName: "__asyncDelegator", scoped: false, text: "\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n };" }; function createAsyncDelegatorHelper(context, expression, location) { context.requestEmitHelper(ts.awaitHelper); context.requestEmitHelper(ts.asyncDelegator); - return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncDelegator"), + return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__asyncDelegator"), /*typeArguments*/ undefined, [expression]), location); } ts.asyncValues = { name: "typescript:asyncValues", + importName: "__asyncValues", scoped: false, text: "\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };" }; function createAsyncValuesHelper(context, expression, location) { context.requestEmitHelper(ts.asyncValues); - return ts.setTextRange(ts.createCall(ts.getHelperName("__asyncValues"), + return ts.setTextRange(ts.createCall(ts.getUnscopedHelperName("__asyncValues"), /*typeArguments*/ undefined, [expression]), location); } })(ts || (ts = {})); @@ -73993,7 +76106,7 @@ var ts; // Constructors are handled in visitClassExpression/visitClassDeclaration break; default: - ts.Debug.failBadSyntaxKind(node); + ts.Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); break; } } @@ -74480,9 +76593,9 @@ var ts; return visitVariableDeclaration(node); } if (!node.initializer && shouldEmitExplicitInitializerForLetDeclaration(node)) { - var clone_2 = ts.getMutableClone(node); - clone_2.initializer = ts.createVoidZero(); - return clone_2; + var clone_3 = ts.getMutableClone(node); + clone_3.initializer = ts.createVoidZero(); + return clone_3; } return ts.visitEachChild(node, visitor, context); } @@ -74822,15 +76935,15 @@ var ts; loop = convert(node, outermostLabeledStatement, bodyFunction.part, ancestorFacts); } else { - var clone_3 = convertIterationStatementCore(node, initializerFunction, ts.createBlock(bodyFunction.part, /*multiLine*/ true)); - ts.aggregateTransformFlags(clone_3); - loop = ts.restoreEnclosingLabel(clone_3, outermostLabeledStatement, convertedLoopState && resetLabel); + var clone_4 = convertIterationStatementCore(node, initializerFunction, ts.createBlock(bodyFunction.part, /*multiLine*/ true)); + ts.aggregateTransformFlags(clone_4); + loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel); } } else { - var clone_4 = convertIterationStatementCore(node, initializerFunction, ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); - ts.aggregateTransformFlags(clone_4); - loop = ts.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel); + var clone_5 = convertIterationStatementCore(node, initializerFunction, ts.visitNode(node.statement, visitor, ts.isStatement, ts.liftToBlock)); + ts.aggregateTransformFlags(clone_5); + loop = ts.restoreEnclosingLabel(clone_5, outermostLabeledStatement, convertedLoopState && resetLabel); } statements.push(loop); return statements; @@ -75358,7 +77471,7 @@ var ts; } function addStatementToStartOfBlock(block, statement) { var transformedStatements = ts.visitNodes(block.statements, visitor, ts.isStatement); - return ts.updateBlock(block, [statement].concat(transformedStatements)); + return ts.updateBlock(block, __spreadArrays([statement], transformedStatements)); } /** * Visits a MethodDeclaration of an ObjectLiteralExpression and transforms it into a @@ -75626,7 +77739,7 @@ var ts; // [output] // new ((_a = C).bind.apply(_a, [void 0].concat(a)))() var _a = ts.createCallBinding(ts.createPropertyAccess(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg; - return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray([ts.createVoidZero()].concat(node.arguments)), /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false)), + return ts.createNew(ts.createFunctionApply(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(ts.createNodeArray(__spreadArrays([ts.createVoidZero()], node.arguments)), /*needsUniqueCopy*/ false, /*multiLine*/ false, /*hasTrailingComma*/ false)), /*typeArguments*/ undefined, []); } return ts.visitEachChild(node, visitor, context); @@ -75642,8 +77755,11 @@ var ts; // [source] // [a, ...b, c] // + // [output (downlevelIteration)] + // __spread([a], b, [c]) + // // [output] - // [a].concat(b, [c]) + // __spreadArrays([a], b, [c]) // Map spans of spread expressions into their expressions and spans of other // expressions into an array literal. var numElements = elements.length; @@ -75653,10 +77769,7 @@ var ts; if (compilerOptions.downlevelIteration) { if (segments.length === 1) { var firstSegment = segments[0]; - if (ts.isCallExpression(firstSegment) - && ts.isIdentifier(firstSegment.expression) - && (ts.getEmitFlags(firstSegment.expression) & 4096 /* HelperName */) - && firstSegment.expression.escapedText === "___spread") { + if (isCallToHelper(firstSegment, "___spread")) { return segments[0]; } } @@ -75664,15 +77777,28 @@ var ts; } else { if (segments.length === 1) { - var firstElement = elements[0]; - return needsUniqueCopy && ts.isSpreadElement(firstElement) && firstElement.expression.kind !== 188 /* ArrayLiteralExpression */ - ? ts.createArraySlice(segments[0]) - : segments[0]; + var firstSegment = segments[0]; + if (!needsUniqueCopy + || isPackedArrayLiteral(firstSegment) + || isCallToHelper(firstSegment, "___spreadArrays")) { + return segments[0]; + } } - // Rewrite using the pattern .concat(, , ...) - return ts.createArrayConcat(segments.shift(), segments); + return ts.createSpreadArraysHelper(context, segments); } } + function isPackedElement(node) { + return !ts.isOmittedExpression(node); + } + function isPackedArrayLiteral(node) { + return ts.isArrayLiteralExpression(node) && ts.every(node.elements, isPackedElement); + } + function isCallToHelper(firstSegment, helperName) { + return ts.isCallExpression(firstSegment) + && ts.isIdentifier(firstSegment.expression) + && (ts.getEmitFlags(firstSegment.expression) & 4096 /* HelperName */) + && firstSegment.expression.escapedText === helperName; + } function partitionSpread(node) { return ts.isSpreadElement(node) ? visitSpanOfSpreads @@ -75777,13 +77903,16 @@ var ts; // Find original source text, since we need to emit the raw strings of the tagged template. // The raw strings contain the (escaped) strings of what the user wrote. // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); + var text = node.rawText; + if (text === undefined) { + text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); + // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), + // thus we need to remove those characters. + // First template piece starts with "`", others with "}" + // Last template piece ends with "`", others with "${" + var isLast = node.kind === 14 /* NoSubstitutionTemplateLiteral */ || node.kind === 17 /* TemplateTail */; + text = text.substring(1, text.length - (isLast ? 1 : 2)); + } // Newline normalization: // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's // and LineTerminatorSequences are normalized to for both TV and TRV. @@ -76077,7 +78206,7 @@ var ts; ts.transformES2015 = transformES2015; function createExtendsHelper(context, name) { context.requestEmitHelper(ts.extendsHelper); - return ts.createCall(ts.getHelperName("__extends"), + return ts.createCall(ts.getUnscopedHelperName("__extends"), /*typeArguments*/ undefined, [ name, ts.createFileLevelUniqueName("_super") @@ -76085,7 +78214,7 @@ var ts; } function createTemplateObjectHelper(context, cooked, raw) { context.requestEmitHelper(ts.templateObjectHelper); - return ts.createCall(ts.getHelperName("__makeTemplateObject"), + return ts.createCall(ts.getUnscopedHelperName("__makeTemplateObject"), /*typeArguments*/ undefined, [ cooked, raw @@ -76093,12 +78222,14 @@ var ts; } ts.extendsHelper = { name: "typescript:extends", + importName: "__extends", scoped: false, priority: 0, text: "\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();" }; ts.templateObjectHelper = { name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", scoped: false, priority: 0, text: "\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };" @@ -76850,10 +78981,10 @@ var ts; // _a = a(); // .yield resumeLabel // _a + %sent% + c() - var clone_5 = ts.getMutableClone(node); - clone_5.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression)); - clone_5.right = ts.visitNode(node.right, visitor, ts.isExpression); - return clone_5; + var clone_6 = ts.getMutableClone(node); + clone_6.left = cacheExpression(ts.visitNode(node.left, visitor, ts.isExpression)); + clone_6.right = ts.visitNode(node.right, visitor, ts.isExpression); + return clone_6; } return ts.visitEachChild(node, visitor, context); } @@ -77033,13 +79164,13 @@ var ts; temp = declareLocal(); var initialElements = ts.visitNodes(elements, visitor, ts.isExpression, 0, numInitialElements); emitAssignment(temp, ts.createArrayLiteral(leadingElement - ? [leadingElement].concat(initialElements) : initialElements)); + ? __spreadArrays([leadingElement], initialElements) : initialElements)); leadingElement = undefined; } var expressions = ts.reduceLeft(elements, reduceElement, [], numInitialElements); return temp ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)]) - : ts.setTextRange(ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine), location); + : ts.setTextRange(ts.createArrayLiteral(leadingElement ? __spreadArrays([leadingElement], expressions) : expressions, multiLine), location); function reduceElement(expressions, element) { if (containsYield(element) && expressions.length > 0) { var hasAssignedTemp = temp !== undefined; @@ -77048,7 +79179,7 @@ var ts; } emitAssignment(temp, hasAssignedTemp ? ts.createArrayConcat(temp, [ts.createArrayLiteral(expressions, multiLine)]) - : ts.createArrayLiteral(leadingElement ? [leadingElement].concat(expressions) : expressions, multiLine)); + : ts.createArrayLiteral(leadingElement ? __spreadArrays([leadingElement], expressions) : expressions, multiLine)); leadingElement = undefined; expressions = []; } @@ -77114,10 +79245,10 @@ var ts; // .yield resumeLabel // .mark resumeLabel // a = _a[%sent%] - var clone_6 = ts.getMutableClone(node); - clone_6.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression)); - clone_6.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression); - return clone_6; + var clone_7 = ts.getMutableClone(node); + clone_7.expression = cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression)); + clone_7.argumentExpression = ts.visitNode(node.argumentExpression, visitor, ts.isExpression); + return clone_7; } return ts.visitEachChild(node, visitor, context); } @@ -77816,10 +79947,10 @@ var ts; if (declaration) { var name = renamedCatchVariableDeclarations[ts.getOriginalNodeId(declaration)]; if (name) { - var clone_7 = ts.getMutableClone(name); - ts.setSourceMapRange(clone_7, node); - ts.setCommentRange(clone_7, node); - return clone_7; + var clone_8 = ts.getMutableClone(name); + ts.setSourceMapRange(clone_8, node); + ts.setCommentRange(clone_8, node); + return clone_8; } } } @@ -78792,7 +80923,7 @@ var ts; ts.transformGenerators = transformGenerators; function createGeneratorHelper(context, body) { context.requestEmitHelper(ts.generatorHelper); - return ts.createCall(ts.getHelperName("__generator"), + return ts.createCall(ts.getUnscopedHelperName("__generator"), /*typeArguments*/ undefined, [ts.createThis(), body]); } // The __generator helper is used by down-level transformations to emulate the runtime @@ -78856,6 +80987,7 @@ var ts; // For examples of how these are used, see the comments in ./transformers/generators.ts ts.generatorHelper = { name: "typescript:generator", + importName: "__generator", scoped: false, priority: 6, text: "\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };" @@ -78985,14 +81117,14 @@ var ts; // define(moduleName?, ["module1", "module2"], function ... var updated = ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray([ ts.createExpressionStatement(ts.createCall(define, - /*typeArguments*/ undefined, (moduleName ? [moduleName] : []).concat([ + /*typeArguments*/ undefined, __spreadArrays((moduleName ? [moduleName] : []), [ // Add the dependency array argument: // // ["require", "exports", module1", "module2", ...] - ts.createArrayLiteral(jsonSourceFile ? ts.emptyArray : [ + ts.createArrayLiteral(jsonSourceFile ? ts.emptyArray : __spreadArrays([ ts.createLiteral("require"), ts.createLiteral("exports") - ].concat(aliasedModuleNames, unaliasedModuleNames)), + ], aliasedModuleNames, unaliasedModuleNames)), // Add the module body function argument: // // function (require, exports, module1, module2) ... @@ -79002,10 +81134,10 @@ var ts; /*modifiers*/ undefined, /*asteriskToken*/ undefined, /*name*/ undefined, - /*typeParameters*/ undefined, [ + /*typeParameters*/ undefined, __spreadArrays([ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"), ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports") - ].concat(importAliasNames), + ], importAliasNames), /*type*/ undefined, transformAsynchronousModuleBody(node)) ]))) ]), @@ -79040,11 +81172,11 @@ var ts; ts.setEmitFlags(ts.createIf(ts.createStrictInequality(ts.createIdentifier("v"), ts.createIdentifier("undefined")), ts.createExpressionStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier("module"), "exports"), ts.createIdentifier("v")))), 1 /* SingleLine */) ]), ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier("define"), "function"), ts.createPropertyAccess(ts.createIdentifier("define"), "amd")), ts.createBlock([ ts.createExpressionStatement(ts.createCall(ts.createIdentifier("define"), - /*typeArguments*/ undefined, (moduleName ? [moduleName] : []).concat([ - ts.createArrayLiteral([ + /*typeArguments*/ undefined, __spreadArrays((moduleName ? [moduleName] : []), [ + ts.createArrayLiteral(__spreadArrays([ ts.createLiteral("require"), ts.createLiteral("exports") - ].concat(aliasedModuleNames, unaliasedModuleNames)), + ], aliasedModuleNames, unaliasedModuleNames)), ts.createIdentifier("factory") ]))) ]))) @@ -79072,10 +81204,10 @@ var ts; /*modifiers*/ undefined, /*asteriskToken*/ undefined, /*name*/ undefined, - /*typeParameters*/ undefined, [ + /*typeParameters*/ undefined, __spreadArrays([ ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"), ts.createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports") - ].concat(importAliasNames), + ], importAliasNames), /*type*/ undefined, transformAsynchronousModuleBody(node)) ])) ]), @@ -79229,9 +81361,9 @@ var ts; return visitFunctionDeclaration(node); case 241 /* ClassDeclaration */: return visitClassDeclaration(node); - case 316 /* MergeDeclarationMarker */: + case 318 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 317 /* EndOfDeclarationMarker */: + case 319 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return ts.visitEachChild(node, moduleExpressionElementVisitor, context); @@ -79390,7 +81522,7 @@ var ts; var promise = ts.createNew(ts.createIdentifier("Promise"), /*typeArguments*/ undefined, [func]); if (compilerOptions.esModuleInterop) { context.requestEmitHelper(ts.importStarHelper); - return ts.createCall(ts.createPropertyAccess(promise, ts.createIdentifier("then")), /*typeArguments*/ undefined, [ts.getHelperName("__importStar")]); + return ts.createCall(ts.createPropertyAccess(promise, ts.createIdentifier("then")), /*typeArguments*/ undefined, [ts.getUnscopedHelperName("__importStar")]); } return promise; } @@ -79404,7 +81536,7 @@ var ts; var requireCall = ts.createCall(ts.createIdentifier("require"), /*typeArguments*/ undefined, arg ? [arg] : []); if (compilerOptions.esModuleInterop) { context.requestEmitHelper(ts.importStarHelper); - requireCall = ts.createCall(ts.getHelperName("__importStar"), /*typeArguments*/ undefined, [requireCall]); + requireCall = ts.createCall(ts.getUnscopedHelperName("__importStar"), /*typeArguments*/ undefined, [requireCall]); } var func; if (languageVersion >= 2 /* ES2015 */) { @@ -79438,11 +81570,11 @@ var ts; } if (ts.getImportNeedsImportStarHelper(node)) { context.requestEmitHelper(ts.importStarHelper); - return ts.createCall(ts.getHelperName("__importStar"), /*typeArguments*/ undefined, [innerExpr]); + return ts.createCall(ts.getUnscopedHelperName("__importStar"), /*typeArguments*/ undefined, [innerExpr]); } if (ts.getImportNeedsImportDefaultHelper(node)) { context.requestEmitHelper(ts.importDefaultHelper); - return ts.createCall(ts.getHelperName("__importDefault"), /*typeArguments*/ undefined, [innerExpr]); + return ts.createCall(ts.getUnscopedHelperName("__importDefault"), /*typeArguments*/ undefined, [innerExpr]); } return innerExpr; } @@ -80214,7 +82346,7 @@ var ts; function createExportStarHelper(context, module) { var compilerOptions = context.getCompilerOptions(); return compilerOptions.importHelpers - ? ts.createCall(ts.getHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]) + ? ts.createCall(ts.getUnscopedHelperName("__exportStar"), /*typeArguments*/ undefined, [module, ts.createIdentifier("exports")]) : ts.createCall(ts.createIdentifier("__export"), /*typeArguments*/ undefined, [module]); } // emit helper for dynamic import @@ -80226,12 +82358,14 @@ var ts; // emit helper for `import * as Name from "foo"` ts.importStarHelper = { name: "typescript:commonjsimportstar", + importName: "__importStar", scoped: false, text: "\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};" }; // emit helper for `import Name from "foo"` ts.importDefaultHelper = { name: "typescript:commonjsimportdefault", + importName: "__importDefault", scoped: false, text: "\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};" }; @@ -80253,11 +82387,13 @@ var ts; context.enableSubstitution(205 /* BinaryExpression */); // Substitutes assignments to exported symbols. context.enableSubstitution(203 /* PrefixUnaryExpression */); // Substitutes updates to exported symbols. context.enableSubstitution(204 /* PostfixUnaryExpression */); // Substitutes updates to exported symbols. + context.enableSubstitution(215 /* MetaProperty */); // Substitutes 'import.meta' context.enableEmitNotification(285 /* SourceFile */); // Restore state when substituting nodes in a file. var moduleInfoMap = []; // The ExternalModuleInfo for each file. var deferredExports = []; // Exports to defer until an EndOfDeclarationMarker is found. var exportFunctionsMap = []; // The export function associated with a source file. var noSubstitutionMap = []; // Set of nodes for which substitution rules should be ignored for each file. + var contextObjectMap = []; // The context object associated with a source file. var currentSourceFile; // The current file. var moduleInfo; // ExternalModuleInfo for the current file. var exportFunction; // The export function for the current file. @@ -80296,7 +82432,7 @@ var ts; // existing identifiers. exportFunction = ts.createUniqueName("exports"); exportFunctionsMap[id] = exportFunction; - contextObject = ts.createUniqueName("context"); + contextObject = contextObjectMap[id] = ts.createUniqueName("context"); // Add the body of the module. var dependencyGroups = collectDependencyGroups(moduleInfo.externalImports); var moduleBodyBlock = createSystemModuleBody(node, dependencyGroups); @@ -81166,9 +83302,9 @@ var ts; return visitCatchClause(node); case 219 /* Block */: return visitBlock(node); - case 316 /* MergeDeclarationMarker */: + case 318 /* MergeDeclarationMarker */: return visitMergeDeclarationMarker(node); - case 317 /* EndOfDeclarationMarker */: + case 319 /* EndOfDeclarationMarker */: return visitEndOfDeclarationMarker(node); default: return destructuringAndImportCallVisitor(node); @@ -81454,6 +83590,7 @@ var ts; moduleInfo = moduleInfoMap[id]; exportFunction = exportFunctionsMap[id]; noSubstitution = noSubstitutionMap[id]; + contextObject = contextObjectMap[id]; if (noSubstitution) { delete noSubstitutionMap[id]; } @@ -81461,6 +83598,7 @@ var ts; currentSourceFile = undefined; moduleInfo = undefined; exportFunction = undefined; + contextObject = undefined; noSubstitution = undefined; } else { @@ -81537,6 +83675,8 @@ var ts; case 203 /* PrefixUnaryExpression */: case 204 /* PostfixUnaryExpression */: return substituteUnaryExpression(node); + case 215 /* MetaProperty */: + return substituteMetaProperty(node); } return node; } @@ -81645,6 +83785,12 @@ var ts; } return node; } + function substituteMetaProperty(node) { + if (ts.isImportMeta(node)) { + return ts.createPropertyAccess(contextObject, ts.createIdentifier("meta")); + } + return node; + } /** * Gets the exports of a name. * @@ -81698,22 +83844,18 @@ var ts; context.onSubstituteNode = onSubstituteNode; context.enableEmitNotification(285 /* SourceFile */); context.enableSubstitution(73 /* Identifier */); - var currentSourceFile; + var helperNameSubstitutions; return ts.chainBundle(transformSourceFile); function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { - var externalHelpersModuleName = ts.getOrCreateExternalHelpersModuleNameIfNeeded(node, compilerOptions); - if (externalHelpersModuleName) { + var externalHelpersImportDeclaration = ts.createExternalHelpersImportDeclarationIfNeeded(node, compilerOptions); + if (externalHelpersImportDeclaration) { var statements = []; var statementOffset = ts.addPrologue(statements, node.statements); - var tslibImport = ts.createImportDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(externalHelpersModuleName)), ts.createLiteral(ts.externalHelpersModuleNameText)); - ts.addEmitFlags(tslibImport, 67108864 /* NeverApplyImportHelper */); - ts.append(statements, tslibImport); + ts.append(statements, externalHelpersImportDeclaration); ts.addRange(statements, ts.visitNodes(node.statements, visitor, ts.isStatement, statementOffset)); return ts.updateSourceFileNode(node, ts.setTextRange(ts.createNodeArray(statements), node.statements)); } @@ -81749,9 +83891,9 @@ var ts; */ function onEmitNode(hint, node, emitCallback) { if (ts.isSourceFile(node)) { - currentSourceFile = node; + helperNameSubstitutions = ts.createMap(); previousOnEmitNode(hint, node, emitCallback); - currentSourceFile = undefined; + helperNameSubstitutions = undefined; } else { previousOnEmitNode(hint, node, emitCallback); @@ -81768,19 +83910,18 @@ var ts; */ function onSubstituteNode(hint, node) { node = previousOnSubstituteNode(hint, node); - if (ts.isIdentifier(node) && hint === 1 /* Expression */) { - return substituteExpressionIdentifier(node); + if (helperNameSubstitutions && ts.isIdentifier(node) && ts.getEmitFlags(node) & 4096 /* HelperName */) { + return substituteHelperName(node); } return node; } - function substituteExpressionIdentifier(node) { - if (ts.getEmitFlags(node) & 4096 /* HelperName */) { - var externalHelpersModuleName = ts.getExternalHelpersModuleName(currentSourceFile); - if (externalHelpersModuleName) { - return ts.createPropertyAccess(externalHelpersModuleName, node); - } + function substituteHelperName(node) { + var name = ts.idText(node); + var substitution = helperNameSubstitutions.get(name); + if (!substitution) { + helperNameSubstitutions.set(name, substitution = ts.createFileLevelUniqueName(name)); } - return node; + return substitution; } } ts.transformES2015Module = transformES2015Module; @@ -81891,7 +84032,7 @@ var ts; return getReturnTypeVisibilityError; } else if (ts.isParameter(node)) { - if (ts.isParameterPropertyDeclaration(node) && ts.hasModifier(node.parent, 8 /* Private */)) { + if (ts.isParameterPropertyDeclaration(node, node.parent) && ts.hasModifier(node.parent, 8 /* Private */)) { return getVariableDeclarationTypeVisibilityError; } return getParameterDeclarationTypeVisibilityError; @@ -82279,6 +84420,7 @@ var ts; var currentSourceFile; var refs; var libs; + var emittedImports; // must be declared in container so it can be `undefined` while transformer's first pass var resolver = context.getEmitResolver(); var options = context.getCompilerOptions(); var newLine = ts.getNewLineCharacter(options); @@ -82364,6 +84506,9 @@ var ts; context.addDiagnostic(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, ts.declarationNameToString(errorNameNode), specifier)); } } + function createEmptyExports() { + return ts.createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createNamedExports([]), /*moduleSpecifier*/ undefined); + } function transformRoot(node) { if (node.kind === 285 /* SourceFile */ && (node.isDeclarationFile || ts.isSourceFileJS(node))) { return node; @@ -82438,9 +84583,9 @@ var ts; var statements = ts.visitNodes(node.statements, visitDeclarationStatements); var combinedStatements = ts.setTextRange(ts.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements); refs.forEach(referenceVisitor); - var emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax); + emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax); if (ts.isExternalModule(node) && (!resultHasExternalModuleIndicator || (needsScopeFixMarker && !resultHasScopeMarker))) { - combinedStatements = ts.setTextRange(ts.createNodeArray(combinedStatements.concat([ts.createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createNamedExports([]), /*moduleSpecifier*/ undefined)])), combinedStatements); + combinedStatements = ts.setTextRange(ts.createNodeArray(__spreadArrays(combinedStatements, [createEmptyExports()])), combinedStatements); } var updated = ts.updateSourceFileNode(node, combinedStatements, /*isDeclarationFile*/ true, references, getFileReferencesForUsedTypeReferences(), node.hasNoDefaultLib, getLibReferences()); updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit; @@ -82482,6 +84627,15 @@ var ts; declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName; } if (declFileName) { + var specifier = ts.moduleSpecifiers.getModuleSpecifier(__assign(__assign({}, options), { baseUrl: options.baseUrl && ts.toPath(options.baseUrl, host.getCurrentDirectory(), host.getCanonicalFileName) }), currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host, host.getSourceFiles(), + /*preferences*/ undefined, host.redirectTargetsMap); + if (!ts.pathIsRelative(specifier)) { + // If some compiler option/symlink/whatever allows access to the file containing the ambient module declaration + // via a non-relative name, emit a type reference directive to that non-relative name, rather than + // a relative path to the declaration file + recordTypeReferenceDirectivesIfNecessary([specifier]); + return; + } var fileName = ts.getRelativePathToDirectoryOrUrl(outputFilePath, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); if (ts.startsWith(fileName, "./") && ts.hasExtension(fileName)) { @@ -82501,7 +84655,7 @@ var ts; if (noResolve || (!ts.isUnparsedSource(sourceFile) && ts.isSourceFileJS(sourceFile))) return ret; ts.forEach(sourceFile.referencedFiles, function (f) { - var elem = ts.tryResolveScriptReference(host, sourceFile, f); + var elem = host.getSourceFileFromReference(sourceFile, f); if (elem) { ret.set("" + ts.getOriginalNodeId(elem), elem); } @@ -82536,14 +84690,14 @@ var ts; return ts.updateBindingElement(elem, elem.dotDotDotToken, elem.propertyName, filterBindingPatternInitializers(elem.name), shouldPrintWithInitializer(elem) ? elem.initializer : undefined); } } - function ensureParameter(p, modifierMask) { + function ensureParameter(p, modifierMask, type) { var oldDiag; if (!suppressNewDiagnosticContexts) { oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p); } var newParam = ts.updateParameter(p, - /*decorators*/ undefined, maskModifiers(p, modifierMask), p.dotDotDotToken, filterBindingPatternInitializers(p.name), resolver.isOptionalParameter(p) ? (p.questionToken || ts.createToken(56 /* QuestionToken */)) : undefined, ensureType(p, p.type, /*ignorePrivate*/ true), // Ignore private param props, since this type is going straight back into a param + /*decorators*/ undefined, maskModifiers(p, modifierMask), p.dotDotDotToken, filterBindingPatternInitializers(p.name), resolver.isOptionalParameter(p) ? (p.questionToken || ts.createToken(56 /* QuestionToken */)) : undefined, ensureType(p, type || p.type, /*ignorePrivate*/ true), // Ignore private param props, since this type is going straight back into a param ensureNoInitializer(p)); if (!suppressNewDiagnosticContexts) { getSymbolAccessibilityDiagnostic = oldDiag; @@ -82650,6 +84804,33 @@ var ts; } return ts.createNodeArray(newParams, params.hasTrailingComma); } + function updateAccessorParamsList(input, isPrivate) { + var newParams; + if (!isPrivate) { + var thisParameter = ts.getThisParameter(input); + if (thisParameter) { + newParams = [ensureParameter(thisParameter)]; + } + } + if (ts.isSetAccessorDeclaration(input)) { + var newValueParameter = void 0; + if (!isPrivate) { + var valueParameter = ts.getSetAccessorValueParameter(input); + if (valueParameter) { + var accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); + newValueParameter = ensureParameter(valueParameter, /*modifierMask*/ undefined, accessorType); + } + } + if (!newValueParameter) { + newValueParameter = ts.createParameter( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*dotDotDotToken*/ undefined, "value"); + } + newParams = ts.append(newParams, newValueParameter); + } + return ts.createNodeArray(newParams || ts.emptyArray); + } function ensureTypeParams(node, params) { return ts.hasModifier(node, 8 /* Private */) ? undefined : ts.visitNodes(params, visitDeclarationSubtree); } @@ -82759,7 +84940,7 @@ var ts; } var priorNeedsDeclare = needsDeclare; needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit); - var result = transformTopLevelDeclaration(i, /*privateDeclaration*/ true); + var result = transformTopLevelDeclaration(i); needsDeclare = priorNeedsDeclare; lateStatementReplacementMap.set("" + ts.getOriginalNodeId(i), result); } @@ -82772,12 +84953,12 @@ var ts; if (lateStatementReplacementMap.has(key)) { var result = lateStatementReplacementMap.get(key); lateStatementReplacementMap.delete(key); - if (result && ts.isSourceFile(statement.parent)) { + if (result) { if (ts.isArray(result) ? ts.some(result, needsScopeMarker) : needsScopeMarker(result)) { // Top-level declarations in .d.ts files are always considered exported even without a modifier unless there's an export assignment or specifier needsScopeFixMarker = true; } - if (ts.isArray(result) ? ts.some(result, isExternalModuleIndicator) : isExternalModuleIndicator(result)) { + if (ts.isSourceFile(statement.parent) && (ts.isArray(result) ? ts.some(result, isExternalModuleIndicator) : isExternalModuleIndicator(result))) { resultHasExternalModuleIndicator = true; } } @@ -82816,6 +84997,11 @@ var ts; enclosingDeclaration = input; } var oldDiag = getSymbolAccessibilityDiagnostic; + // Setup diagnostic-related flags before first potential `cleanup` call, otherwise + // We'd see a TDZ violation at runtime + var canProduceDiagnostic = ts.canProduceDiagnostics(input); + var oldWithinObjectLiteralType = suppressNewDiagnosticContexts; + var shouldEnterSuppressNewDiagnosticsContextContext = ((input.kind === 169 /* TypeLiteral */ || input.kind === 182 /* MappedType */) && input.parent.kind !== 243 /* TypeAliasDeclaration */); // Emit methods which are private as properties with no type information if (ts.isMethodDeclaration(input) || ts.isMethodSignature(input)) { if (ts.hasModifier(input, 8 /* Private */)) { @@ -82824,15 +85010,12 @@ var ts; return cleanup(ts.createProperty(/*decorators*/ undefined, ensureModifiers(input), input.name, /*questionToken*/ undefined, /*type*/ undefined, /*initializer*/ undefined)); } } - var canProdiceDiagnostic = ts.canProduceDiagnostics(input); - if (canProdiceDiagnostic && !suppressNewDiagnosticContexts) { + if (canProduceDiagnostic && !suppressNewDiagnosticContexts) { getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(input); } if (ts.isTypeQueryNode(input)) { checkEntityNameVisibility(input.exprName, enclosingDeclaration); } - var oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - var shouldEnterSuppressNewDiagnosticsContextContext = ((input.kind === 169 /* TypeLiteral */ || input.kind === 182 /* MappedType */) && input.parent.kind !== 243 /* TypeAliasDeclaration */); if (shouldEnterSuppressNewDiagnosticsContextContext) { // We stop making new diagnostic contexts within object literal types. Unless it's an object type on the RHS of a type alias declaration. Then we do. suppressNewDiagnosticContexts = true; @@ -82871,10 +85054,24 @@ var ts; return cleanup(sig); } case 159 /* GetAccessor */: { + // For now, only emit class accessors as accessors if they were already declared in an ambient context. + if (input.flags & 4194304 /* Ambient */) { + var isPrivate = ts.hasModifier(input, 8 /* Private */); + var accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); + return cleanup(ts.updateGetAccessor(input, + /*decorators*/ undefined, ensureModifiers(input), input.name, updateAccessorParamsList(input, isPrivate), !isPrivate ? ensureType(input, accessorType) : undefined, + /*body*/ undefined)); + } var newNode = ensureAccessor(input); return cleanup(newNode); } case 160 /* SetAccessor */: { + // For now, only emit class accessors as accessors if they were already declared in an ambient context. + if (input.flags & 4194304 /* Ambient */) { + return cleanup(ts.updateSetAccessor(input, + /*decorators*/ undefined, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasModifier(input, 8 /* Private */)), + /*body*/ undefined)); + } var newNode = ensureAccessor(input); return cleanup(newNode); } @@ -82935,13 +85132,13 @@ var ts; } return cleanup(ts.visitEachChild(input, visitDeclarationSubtree, context)); function cleanup(returnValue) { - if (returnValue && canProdiceDiagnostic && ts.hasDynamicName(input)) { + if (returnValue && canProduceDiagnostic && ts.hasDynamicName(input)) { checkName(input); } if (isEnclosingDeclaration(input)) { enclosingDeclaration = previousEnclosingDeclaration; } - if (canProdiceDiagnostic && !suppressNewDiagnosticContexts) { + if (canProduceDiagnostic && !suppressNewDiagnosticContexts) { getSymbolAccessibilityDiagnostic = oldDiag; } if (shouldEnterSuppressNewDiagnosticsContextContext) { @@ -82967,8 +85164,8 @@ var ts; case 256 /* ExportDeclaration */: { if (ts.isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; - resultHasScopeMarker = true; } + resultHasScopeMarker = true; // Always visible if the parent node isn't dropped for being not visible // Rewrite external module names if necessary return ts.updateExportDeclaration(input, /*decorators*/ undefined, input.modifiers, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier)); @@ -82977,8 +85174,8 @@ var ts; // Always visible if the parent node isn't dropped for being not visible if (ts.isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; - resultHasScopeMarker = true; } + resultHasScopeMarker = true; if (input.expression.kind === 73 /* Identifier */) { return input; } @@ -82999,7 +85196,18 @@ var ts; lateStatementReplacementMap.set("" + ts.getOriginalNodeId(input), result); return input; } - function transformTopLevelDeclaration(input, isPrivate) { + function stripExportModifiers(statement) { + if (ts.isImportEqualsDeclaration(statement) || ts.hasModifier(statement, 512 /* Default */)) { + // `export import` statements should remain as-is, as imports are _not_ implicitly exported in an ambient namespace + // Likewise, `export default` classes and the like and just be `default`, so we preserve their `export` modifiers, too + return statement; + } + var clone = ts.getMutableClone(statement); + var modifiers = ts.createModifiersFromModifierFlags(ts.getModifierFlags(statement) & (3071 /* All */ ^ 1 /* Export */)); + clone.modifiers = modifiers.length ? ts.createNodeArray(modifiers) : undefined; + return clone; + } + function transformTopLevelDeclaration(input) { if (shouldStripInternal(input)) return; switch (input.kind) { @@ -83029,15 +85237,15 @@ var ts; switch (input.kind) { case 243 /* TypeAliasDeclaration */: // Type aliases get `declare`d if need be (for legacy support), but that's all return cleanup(ts.updateTypeAliasDeclaration(input, - /*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name, ts.visitNodes(input.typeParameters, visitDeclarationSubtree, ts.isTypeParameterDeclaration), ts.visitNode(input.type, visitDeclarationSubtree, ts.isTypeNode))); + /*decorators*/ undefined, ensureModifiers(input), input.name, ts.visitNodes(input.typeParameters, visitDeclarationSubtree, ts.isTypeParameterDeclaration), ts.visitNode(input.type, visitDeclarationSubtree, ts.isTypeNode))); case 242 /* InterfaceDeclaration */: { return cleanup(ts.updateInterfaceDeclaration(input, - /*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree))); + /*decorators*/ undefined, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree))); } case 240 /* FunctionDeclaration */: { // Generators lose their generator-ness, excepting their return type var clean = cleanup(ts.updateFunctionDeclaration(input, - /*decorators*/ undefined, ensureModifiers(input, isPrivate), + /*decorators*/ undefined, ensureModifiers(input), /*asteriskToken*/ undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type), /*body*/ undefined)); if (clean && resolver.isExpandoFunctionDeclaration(input)) { @@ -83057,7 +85265,7 @@ var ts; var varDecl = ts.createVariableDeclaration(ts.unescapeLeadingUnderscores(p.escapedName), type, /*initializer*/ undefined); return ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([varDecl])); }); - var namespaceDecl = ts.createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input, isPrivate), input.name, ts.createModuleBlock(declarations), 16 /* Namespace */); + var namespaceDecl = ts.createModuleDeclaration(/*decorators*/ undefined, ensureModifiers(input), input.name, ts.createModuleBlock(declarations), 16 /* Namespace */); if (!ts.hasModifier(clean, 512 /* Default */)) { return [clean, namespaceDecl]; } @@ -83072,7 +85280,9 @@ var ts; /*decorators*/ undefined, /*modifiers*/ undefined, /*isExportEquals*/ false, namespaceDecl.name); - resultHasExternalModuleIndicator = true; + if (ts.isSourceFile(input.parent)) { + resultHasExternalModuleIndicator = true; + } resultHasScopeMarker = true; return [cleanDeclaration, namespaceDeclaration, exportDefaultDeclaration]; } @@ -83084,16 +85294,38 @@ var ts; needsDeclare = false; var inner = input.body; if (inner && inner.kind === 246 /* ModuleBlock */) { + var oldNeedsScopeFix = needsScopeFixMarker; + var oldHasScopeFix = resultHasScopeMarker; + resultHasScopeMarker = false; + needsScopeFixMarker = false; var statements = ts.visitNodes(inner.statements, visitDeclarationStatements); - var body = ts.updateModuleBlock(inner, transformAndReplaceLatePaintedStatements(statements)); + var lateStatements = transformAndReplaceLatePaintedStatements(statements); + if (input.flags & 4194304 /* Ambient */) { + needsScopeFixMarker = false; // If it was `declare`'d everything is implicitly exported already, ignore late printed "privates" + } + // With the final list of statements, there are 3 possibilities: + // 1. There's an export assignment or export declaration in the namespace - do nothing + // 2. Everything is exported and there are no export assignments or export declarations - strip all export modifiers + // 3. Some things are exported, some are not, and there's no marker - add an empty marker + if (!ts.isGlobalScopeAugmentation(input) && !hasScopeMarker(lateStatements) && !resultHasScopeMarker) { + if (needsScopeFixMarker) { + lateStatements = ts.createNodeArray(__spreadArrays(lateStatements, [createEmptyExports()])); + } + else { + lateStatements = ts.visitNodes(lateStatements, stripExportModifiers); + } + } + var body = ts.updateModuleBlock(inner, lateStatements); needsDeclare = previousNeedsDeclare; - var mods = ensureModifiers(input, isPrivate); + needsScopeFixMarker = oldNeedsScopeFix; + resultHasScopeMarker = oldHasScopeFix; + var mods = ensureModifiers(input); return cleanup(ts.updateModuleDeclaration(input, /*decorators*/ undefined, mods, ts.isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, body)); } else { needsDeclare = previousNeedsDeclare; - var mods = ensureModifiers(input, isPrivate); + var mods = ensureModifiers(input); needsDeclare = false; ts.visitNode(inner, visitDeclarationStatements); // eagerly transform nested namespaces (the nesting doesn't need any elision or painting done) @@ -83105,7 +85337,7 @@ var ts; } } case 241 /* ClassDeclaration */: { - var modifiers = ts.createNodeArray(ensureModifiers(input, isPrivate)); + var modifiers = ts.createNodeArray(ensureModifiers(input)); var typeParameters = ensureTypeParams(input, input.typeParameters); var ctor = ts.getFirstConstructorWithBody(input); var parameterProperties = void 0; @@ -83176,10 +85408,10 @@ var ts; } } case 220 /* VariableStatement */: { - return cleanup(transformVariableStatement(input, isPrivate)); + return cleanup(transformVariableStatement(input)); } case 244 /* EnumDeclaration */: { - return cleanup(ts.updateEnumDeclaration(input, /*decorators*/ undefined, ts.createNodeArray(ensureModifiers(input, isPrivate)), input.name, ts.createNodeArray(ts.mapDefined(input.members, function (m) { + return cleanup(ts.updateEnumDeclaration(input, /*decorators*/ undefined, ts.createNodeArray(ensureModifiers(input)), input.name, ts.createNodeArray(ts.mapDefined(input.members, function (m) { if (shouldStripInternal(m)) return; // Rewrite enum values to their constants, if available @@ -83206,13 +85438,13 @@ var ts; return node && ts.setOriginalNode(preserveJsDoc(node, input), input); } } - function transformVariableStatement(input, privateDeclaration) { + function transformVariableStatement(input) { if (!ts.forEach(input.declarationList.declarations, getBindingNameVisible)) return; var nodes = ts.visitNodes(input.declarationList.declarations, visitDeclarationSubtree); if (!ts.length(nodes)) return; - return ts.updateVariableStatement(input, ts.createNodeArray(ensureModifiers(input, privateDeclaration)), ts.updateVariableDeclarationList(input.declarationList, nodes)); + return ts.updateVariableStatement(input, ts.createNodeArray(ensureModifiers(input)), ts.updateVariableDeclarationList(input.declarationList, nodes)); } function recreateBindingPattern(d) { return ts.flatten(ts.mapDefined(d.elements, function (e) { return recreateBindingElement(e); })); @@ -83254,59 +85486,65 @@ var ts; function isScopeMarker(node) { return ts.isExportAssignment(node) || ts.isExportDeclaration(node); } - function hasScopeMarker(node) { - if (ts.isModuleBlock(node)) { - return ts.some(node.statements, isScopeMarker); - } - return false; + function hasScopeMarker(statements) { + return ts.some(statements, isScopeMarker); } - function ensureModifiers(node, privateDeclaration) { + function ensureModifiers(node) { var currentFlags = ts.getModifierFlags(node); - var newFlags = ensureModifierFlags(node, privateDeclaration); + var newFlags = ensureModifierFlags(node); if (currentFlags === newFlags) { return node.modifiers; } return ts.createModifiersFromModifierFlags(newFlags); } - function ensureModifierFlags(node, privateDeclaration) { + function ensureModifierFlags(node) { var mask = 3071 /* All */ ^ (4 /* Public */ | 256 /* Async */); // No async modifiers in declaration files var additions = (needsDeclare && !isAlwaysType(node)) ? 2 /* Ambient */ : 0 /* None */; var parentIsFile = node.parent.kind === 285 /* SourceFile */; if (!parentIsFile || (isBundledEmit && parentIsFile && ts.isExternalModule(node.parent))) { - mask ^= ((privateDeclaration || (isBundledEmit && parentIsFile) || hasScopeMarker(node.parent) ? 0 : 1 /* Export */) | 2 /* Ambient */); + mask ^= 2 /* Ambient */; additions = 0 /* None */; } return maskModifierFlags(node, mask, additions); } - function ensureAccessor(node) { - var accessors = resolver.getAllAccessorDeclarations(node); - if (node.kind !== accessors.firstAccessor.kind) { - return; - } + function getTypeAnnotationFromAllAccessorDeclarations(node, accessors) { var accessorType = getTypeAnnotationFromAccessor(node); - if (!accessorType && accessors.secondAccessor) { + if (!accessorType && node !== accessors.firstAccessor) { + accessorType = getTypeAnnotationFromAccessor(accessors.firstAccessor); + // If we end up pulling the type from the second accessor, we also need to change the diagnostic context to get the expected error message + getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(accessors.firstAccessor); + } + if (!accessorType && accessors.secondAccessor && node !== accessors.secondAccessor) { accessorType = getTypeAnnotationFromAccessor(accessors.secondAccessor); // If we end up pulling the type from the second accessor, we also need to change the diagnostic context to get the expected error message getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(accessors.secondAccessor); } + return accessorType; + } + function ensureAccessor(node) { + var accessors = resolver.getAllAccessorDeclarations(node); + if (node.kind !== accessors.firstAccessor.kind) { + return; + } + var accessorType = getTypeAnnotationFromAllAccessorDeclarations(node, accessors); var prop = ts.createProperty(/*decorators*/ undefined, maskModifiers(node, /*mask*/ undefined, (!accessors.setAccessor) ? 64 /* Readonly */ : 0 /* None */), node.name, node.questionToken, ensureType(node, accessorType), /*initializer*/ undefined); var leadingsSyntheticCommentRanges = accessors.secondAccessor && ts.getLeadingCommentRangesOfNode(accessors.secondAccessor, currentSourceFile); if (leadingsSyntheticCommentRanges) { - var _loop_13 = function (range) { + var _loop_15 = function (range) { if (range.kind === 3 /* MultiLineCommentTrivia */) { var text = currentSourceFile.text.slice(range.pos + 2, range.end - 2); var lines = text.split(/\r\n?|\n/g); if (lines.length > 1) { var lastLines = lines.slice(1); var indentation_1 = ts.guessIndentation(lastLines); - text = [lines[0]].concat(ts.map(lastLines, function (l) { return l.slice(indentation_1); })).join(newLine); + text = __spreadArrays([lines[0]], ts.map(lastLines, function (l) { return l.slice(indentation_1); })).join(newLine); } ts.addSyntheticLeadingComment(prop, range.kind, text, range.hasTrailingNewLine); } }; for (var _i = 0, leadingsSyntheticCommentRanges_1 = leadingsSyntheticCommentRanges; _i < leadingsSyntheticCommentRanges_1.length; _i++) { var range = leadingsSyntheticCommentRanges_1[_i]; - _loop_13(range); + _loop_15(range); } } return prop; @@ -83447,10 +85685,11 @@ var ts; var transformers = []; ts.addRange(transformers, customTransformers && ts.map(customTransformers.before, wrapScriptTransformerFactory)); transformers.push(ts.transformTypeScript); + transformers.push(ts.transformClassFields); if (jsx === 2 /* React */) { transformers.push(ts.transformJsx); } - if (languageVersion < 8 /* ESNext */) { + if (languageVersion < 99 /* ESNext */) { transformers.push(ts.transformESNext); } if (languageVersion < 6 /* ES2019 */) { @@ -83526,7 +85765,7 @@ var ts; * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. */ function transformNodes(resolver, host, options, nodes, transformers, allowDtsFiles) { - var enabledSyntaxKindFeatures = new Array(318 /* Count */); + var enabledSyntaxKindFeatures = new Array(320 /* Count */); var lexicalEnvironmentVariableDeclarations; var lexicalEnvironmentFunctionDeclarations; var lexicalEnvironmentVariableDeclarationsStack = []; @@ -83733,7 +85972,7 @@ var ts; var statements; if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations) { if (lexicalEnvironmentFunctionDeclarations) { - statements = lexicalEnvironmentFunctionDeclarations.slice(); + statements = __spreadArrays(lexicalEnvironmentFunctionDeclarations); } if (lexicalEnvironmentVariableDeclarations) { var statement = ts.createVariableStatement( @@ -83940,6 +86179,8 @@ var ts; } ts.getOutputDeclarationFileName = getOutputDeclarationFileName; function getOutputJSFileName(inputFileName, configFile, ignoreCase) { + if (configFile.options.emitDeclarationOnly) + return undefined; var isJsonFile = ts.fileExtensionIs(inputFileName, ".json" /* Json */); var outputFileName = ts.changeExtension(getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.outDir), isJsonFile ? ".json" /* Json */ : @@ -83971,7 +86212,7 @@ var ts; addOutput(js); if (ts.fileExtensionIs(inputFileName, ".json" /* Json */)) continue; - if (configFile.options.sourceMap) { + if (js && configFile.options.sourceMap) { addOutput(js + ".map"); } if (ts.getEmitDeclarations(configFile.options) && ts.hasTSFileExtension(inputFileName)) { @@ -84000,6 +86241,11 @@ var ts; var jsFilePath = getOutputJSFileName(inputFileName, configFile, ignoreCase); if (jsFilePath) return jsFilePath; + if (ts.fileExtensionIs(inputFileName, ".json" /* Json */)) + continue; + if (ts.getEmitDeclarations(configFile.options) && ts.hasTSFileExtension(inputFileName)) { + return getOutputDeclarationFileName(inputFileName, configFile, ignoreCase); + } } var buildInfoPath = getOutputPathForBuildInfo(configFile.options); if (buildInfoPath) @@ -84034,14 +86280,16 @@ var ts; }; function emitSourceFileOrBundle(_a, sourceFileOrBundle) { var jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath, buildInfoPath = _a.buildInfoPath; + var buildInfoDirectory; if (buildInfoPath && sourceFileOrBundle && ts.isBundle(sourceFileOrBundle)) { + buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); bundleBuildInfo = { - commonSourceDirectory: host.getCommonSourceDirectory(), - sourceFiles: sourceFileOrBundle.sourceFiles.map(function (file) { return file.fileName; }) + commonSourceDirectory: relativeToBuildInfo(host.getCommonSourceDirectory()), + sourceFiles: sourceFileOrBundle.sourceFiles.map(function (file) { return relativeToBuildInfo(ts.getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory())); }) }; } - emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath); - emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath); + emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo); + emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo); emitBuildInfo(bundleBuildInfo, buildInfoPath); if (!emitSkipped && emittedFilesList) { if (!emitOnlyDtsFiles) { @@ -84062,21 +86310,22 @@ var ts; emittedFilesList.push(declarationMapPath); } } + function relativeToBuildInfo(path) { + return ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(buildInfoDirectory, path, host.getCanonicalFileName)); + } } function emitBuildInfo(bundle, buildInfoPath) { // Write build information if applicable if (!buildInfoPath || targetSourceFile || emitSkipped) return; var program = host.getProgramBuildInfo(); - if (!bundle && !program) - return; if (host.isEmitBlocked(buildInfoPath) || compilerOptions.noEmit) { emitSkipped = true; return; } ts.writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText({ bundle: bundle, program: program, version: ts.version }), /*writeByteOrderMark*/ false); } - function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath) { + function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) { if (!sourceFileOrBundle || emitOnlyDtsFiles || !jsFilePath) { return; } @@ -84097,7 +86346,8 @@ var ts; inlineSourceMap: compilerOptions.inlineSourceMap, inlineSources: compilerOptions.inlineSources, extendedDiagnostics: compilerOptions.extendedDiagnostics, - writeBundleFileInfo: !!bundleBuildInfo + writeBundleFileInfo: !!bundleBuildInfo, + relativeToBuildInfo: relativeToBuildInfo }; // Create a printer to print the nodes var printer = createPrinter(printerOptions, { @@ -84114,7 +86364,7 @@ var ts; if (bundleBuildInfo) bundleBuildInfo.js = printer.bundleFileInfo; } - function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath) { + function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) { if (!sourceFileOrBundle || !(declarationFilePath && !ts.isInJSFile(sourceFileOrBundle))) { return; } @@ -84145,7 +86395,8 @@ var ts; extendedDiagnostics: compilerOptions.extendedDiagnostics, onlyPrintJsDocStyle: true, writeBundleFileInfo: !!bundleBuildInfo, - recordInternalSection: !!bundleBuildInfo + recordInternalSection: !!bundleBuildInfo, + relativeToBuildInfo: relativeToBuildInfo }; var declarationPrinter = createPrinter(printerOptions, { // resolver hooks @@ -84337,10 +86588,10 @@ var ts; getSymbolOfExternalModuleSpecifier: ts.notImplemented, isBindingCapturedByNode: ts.notImplemented, }; - function createSourceFilesFromBundleBuildInfo(bundle) { + function createSourceFilesFromBundleBuildInfo(bundle, buildInfoDirectory, host) { var sourceFiles = bundle.sourceFiles.map(function (fileName) { var sourceFile = ts.createNode(285 /* SourceFile */, 0, 0); - sourceFile.fileName = fileName; + sourceFile.fileName = ts.getRelativePathFromDirectory(host.getCurrentDirectory(), ts.getNormalizedAbsolutePath(fileName, buildInfoDirectory), !host.useCaseSensitiveFileNames()); sourceFile.text = ""; sourceFile.statements = ts.createNodeArray(); return sourceFile; @@ -84360,7 +86611,7 @@ var ts; return sourceFiles; } /*@internal*/ - function emitUsingBuildInfo(config, host, getCommandLine) { + function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) { var _a = getOutputPathsForBundle(config.options, /*forceDtsPaths*/ false), buildInfoPath = _a.buildInfoPath, jsFilePath = _a.jsFilePath, sourceMapFilePath = _a.sourceMapFilePath, declarationFilePath = _a.declarationFilePath, declarationMapPath = _a.declarationMapPath; var buildInfoText = host.readFile(ts.Debug.assertDefined(buildInfoPath)); if (!buildInfoText) @@ -84383,15 +86634,16 @@ var ts; var buildInfo = getBuildInfo(buildInfoText); if (!buildInfo.bundle || !buildInfo.bundle.js || (declarationText && !buildInfo.bundle.dts)) return buildInfoPath; + var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); var ownPrependInput = ts.createInputFiles(jsFileText, declarationText, sourceMapFilePath, sourceMapText, declarationMapPath, declarationMapText, jsFilePath, declarationFilePath, buildInfoPath, buildInfo, /*onlyOwnText*/ true); var outputFiles = []; var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); }); - var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle); + var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host); var emitHost = { - getPrependNodes: ts.memoize(function () { return prependNodes.concat([ownPrependInput]); }), + getPrependNodes: ts.memoize(function () { return __spreadArrays(prependNodes, [ownPrependInput]); }), getCanonicalFileName: host.getCanonicalFileName, - getCommonSourceDirectory: function () { return buildInfo.bundle.commonSourceDirectory; }, + getCommonSourceDirectory: function () { return ts.getNormalizedAbsolutePath(buildInfo.bundle.commonSourceDirectory, buildInfoDirectory); }, getCompilerOptions: function () { return config.options; }, getCurrentDirectory: function () { return host.getCurrentDirectory(); }, getNewLine: function () { return host.getNewLine(); }, @@ -84441,9 +86693,12 @@ var ts; fileExists: function (f) { return host.fileExists(f); }, directoryExists: host.directoryExists && (function (f) { return host.directoryExists(f); }), useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, - getProgramBuildInfo: ts.returnUndefined + getProgramBuildInfo: ts.returnUndefined, + getSourceFileFromReference: ts.returnUndefined, + redirectTargetsMap: ts.createMultiMap() }; - emitFiles(ts.notImplementedResolver, emitHost, /*targetSourceFile*/ undefined, ts.getTransformers(config.options), /*emitOnlyDtsFiles*/ false); + emitFiles(ts.notImplementedResolver, emitHost, + /*targetSourceFile*/ undefined, ts.getTransformers(config.options, customTransformers)); return outputFiles; } ts.emitUsingBuildInfo = emitUsingBuildInfo; @@ -84476,6 +86731,7 @@ var ts; var write = writeBase; var isOwnFileEmit; var bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } : undefined; + var relativeToBuildInfo = bundleFileInfo ? ts.Debug.assertDefined(printerOptions.relativeToBuildInfo) : undefined; var recordInternalSection = printerOptions.recordInternalSection; var sourceFileTextPos = 0; var sourceFileTextKind = "text" /* Text */; @@ -84625,7 +86881,13 @@ var ts; (_a = bundleFileInfo.sections).push.apply(_a, newSections); else { newSections.forEach(function (section) { return ts.Debug.assert(ts.isBundleFileTextLike(section)); }); - bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "prepend" /* Prepend */, data: prepend.fileName, texts: newSections }); + bundleFileInfo.sections.push({ + pos: pos, + end: writer.getTextPos(), + kind: "prepend" /* Prepend */, + data: relativeToBuildInfo(prepend.fileName), + texts: newSections + }); } } } @@ -85036,30 +87298,30 @@ var ts; case 279 /* EnumMember */: return emitEnumMember(node); // JSDoc nodes (only used in codefixes currently) - case 305 /* JSDocParameterTag */: - case 311 /* JSDocPropertyTag */: + case 307 /* JSDocParameterTag */: + case 313 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 306 /* JSDocReturnTag */: - case 308 /* JSDocTypeTag */: - case 307 /* JSDocThisTag */: - case 304 /* JSDocEnumTag */: + case 308 /* JSDocReturnTag */: + case 310 /* JSDocTypeTag */: + case 309 /* JSDocThisTag */: + case 306 /* JSDocEnumTag */: return emitJSDocSimpleTypedTag(node); - case 301 /* JSDocAugmentsTag */: + case 302 /* JSDocAugmentsTag */: return emitJSDocAugmentsTag(node); - case 309 /* JSDocTemplateTag */: + case 311 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 310 /* JSDocTypedefTag */: + case 312 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 303 /* JSDocCallbackTag */: + case 305 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 299 /* JSDocSignature */: + case 300 /* JSDocSignature */: return emitJSDocSignature(node); - case 298 /* JSDocTypeLiteral */: + case 299 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 302 /* JSDocClassTag */: - case 300 /* JSDocTag */: + case 304 /* JSDocClassTag */: + case 301 /* JSDocTag */: return emitJSDocSimpleTag(node); - case 297 /* JSDocComment */: + case 298 /* JSDocComment */: return emitJSDoc(node); // Transformation nodes (ignored) } @@ -85158,9 +87420,9 @@ var ts; case 265 /* JsxFragment */: return emitJsxFragment(node); // Transformation nodes - case 314 /* PartiallyEmittedExpression */: + case 316 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 315 /* CommaListExpression */: + case 317 /* CommaListExpression */: return emitCommaList(node); } } @@ -85188,8 +87450,8 @@ var ts; var helpers = getSortedEmitHelpers(sourceFile); if (!helpers) continue; - for (var _c = 0, helpers_3 = helpers; _c < helpers_3.length; _c++) { - var helper = helpers_3[_c]; + for (var _c = 0, helpers_4 = helpers; _c < helpers_4.length; _c++) { + var helper = helpers_4[_c]; if (!helper.scoped && !shouldSkip && !bundledHelpers.get(helper.name)) { bundledHelpers.set(helper.name, true); (result || (result = [])).push(helper.name); @@ -85209,12 +87471,12 @@ var ts; for (var i = 0; i < numNodes; i++) { var currentNode = bundle ? i < numPrepends ? bundle.prepends[i] : bundle.sourceFiles[i - numPrepends] : node; var sourceFile = ts.isSourceFile(currentNode) ? currentNode : ts.isUnparsedSource(currentNode) ? undefined : currentSourceFile; - var shouldSkip = printerOptions.noEmitHelpers || (!!sourceFile && ts.getExternalHelpersModuleName(sourceFile) !== undefined); + var shouldSkip = printerOptions.noEmitHelpers || (!!sourceFile && ts.hasRecordedExternalHelpers(sourceFile)); var shouldBundle = (ts.isSourceFile(currentNode) || ts.isUnparsedSource(currentNode)) && !isOwnFileEmit; var helpers = ts.isUnparsedSource(currentNode) ? currentNode.helpers : getSortedEmitHelpers(currentNode); if (helpers) { - for (var _a = 0, helpers_4 = helpers; _a < helpers_4.length; _a++) { - var helper = helpers_4[_a]; + for (var _a = 0, helpers_5 = helpers; _a < helpers_5.length; _a++) { + var helper = helpers_5[_a]; if (!helper.scoped) { // Skip the helper if it can be skipped and the noEmitHelpers compiler // option is set, or if it can be imported and the importHelpers compiler @@ -86654,7 +88916,7 @@ var ts; } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 308 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 310 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } @@ -86707,7 +88969,7 @@ var ts; emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 298 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 299 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -87696,7 +89958,7 @@ var ts; if (node.locals) { var local = node.locals.get(ts.escapeLeadingUnderscores(name)); // We conservatively include alias symbols to cover cases where they're emitted as locals - if (local && local.flags & (67220415 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */)) { + if (local && local.flags & (111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */)) { return false; } } @@ -87883,7 +90145,7 @@ var ts; hasWrittenComment = false; var emitFlags = ts.getEmitFlags(node); var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end; - var isEmittedNode = node.kind !== 313 /* NotEmittedStatement */; + var isEmittedNode = node.kind !== 315 /* NotEmittedStatement */; // We have to explicitly check that the node is JsxText because if the compilerOptions.jsx is "preserve" we will not do any transformation. // It is expensive to walk entire tree just to set one kind of node to have no comments. var skipLeadingComments = pos < 0 || (emitFlags & 512 /* NoLeadingComments */) !== 0 || node.kind === 11 /* JsxText */; @@ -88164,7 +90426,7 @@ var ts; else { var _a = ts.getSourceMapRange(node), pos = _a.pos, end = _a.end, _b = _a.source, source = _b === void 0 ? sourceMapSource : _b; var emitFlags = ts.getEmitFlags(node); - if (node.kind !== 313 /* NotEmittedStatement */ + if (node.kind !== 315 /* NotEmittedStatement */ && (emitFlags & 16 /* NoLeadingSourceMap */) === 0 && pos >= 0) { emitSourcePos(source, skipSourceTrivia(source, pos)); @@ -88177,7 +90439,7 @@ var ts; else { pipelinePhase(hint, node); } - if (node.kind !== 313 /* NotEmittedStatement */ + if (node.kind !== 315 /* NotEmittedStatement */ && (emitFlags & 32 /* NoTrailingSourceMap */) === 0 && end >= 0) { emitSourcePos(source, end); @@ -88545,6 +90807,9 @@ var ts; var createFileWatcher = getCreateFileWatcher(watchLogLevel, watchFile); var createFilePathWatcher = watchLogLevel === WatchLogLevel.None ? watchFilePath : createFileWatcher; var createDirectoryWatcher = getCreateFileWatcher(watchLogLevel, watchDirectory); + if (watchLogLevel === WatchLogLevel.Verbose && ts.sysLog === ts.noop) { + ts.sysLog = function (s) { return log(s); }; + } return { watchFile: function (host, file, callback, pollingInterval, detailInfo1, detailInfo2) { return createFileWatcher(host, file, callback, pollingInterval, /*passThrough*/ undefined, detailInfo1, detailInfo2, watchFile, log, "FileWatcher", getDetailWatchInfo); @@ -88900,7 +91165,7 @@ var ts; } ts.changeCompilerHostLikeToUseCache = changeCompilerHostLikeToUseCache; function getPreEmitDiagnostics(program, sourceFile, cancellationToken) { - var diagnostics = program.getConfigFileParsingDiagnostics().concat(program.getOptionsDiagnostics(cancellationToken), program.getSyntacticDiagnostics(sourceFile, cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSemanticDiagnostics(sourceFile, cancellationToken)); + var diagnostics = __spreadArrays(program.getConfigFileParsingDiagnostics(), program.getOptionsDiagnostics(cancellationToken), program.getSyntacticDiagnostics(sourceFile, cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSemanticDiagnostics(sourceFile, cancellationToken)); if (ts.getEmitDeclarations(program.getCompilerOptions())) { ts.addRange(diagnostics, program.getDeclarationDiagnostics(sourceFile, cancellationToken)); } @@ -89040,11 +91305,11 @@ var ts; if (diagnostic.relatedInformation) { output += host.getNewLine(); for (var _a = 0, _b = diagnostic.relatedInformation; _a < _b.length; _a++) { - var _c = _b[_a], file = _c.file, start = _c.start, length_4 = _c.length, messageText = _c.messageText; + var _c = _b[_a], file = _c.file, start = _c.start, length_7 = _c.length, messageText = _c.messageText; if (file) { output += host.getNewLine(); output += halfIndent + formatLocation(file, start, host); // TODO: GH#18217 - output += formatCodeSpan(file, start, length_4, indent, ForegroundColorEscapeSequences.Cyan, host); // TODO: GH#18217 + output += formatCodeSpan(file, start, length_7, indent, ForegroundColorEscapeSequences.Cyan, host); // TODO: GH#18217 } output += host.getNewLine(); output += indent + flattenDiagnosticMessageText(messageText, host.getNewLine()); @@ -89056,27 +91321,30 @@ var ts; return output; } ts.formatDiagnosticsWithColorAndContext = formatDiagnosticsWithColorAndContext; - function flattenDiagnosticMessageText(messageText, newLine) { - if (ts.isString(messageText)) { - return messageText; + function flattenDiagnosticMessageText(diag, newLine, indent) { + if (indent === void 0) { indent = 0; } + if (ts.isString(diag)) { + return diag; } - else { - var diagnosticChain = messageText; - var result = ""; - var indent_1 = 0; - while (diagnosticChain) { - if (indent_1) { - result += newLine; - for (var i = 0; i < indent_1; i++) { - result += " "; - } - } - result += diagnosticChain.messageText; - indent_1++; - diagnosticChain = diagnosticChain.next; + else if (diag === undefined) { + return ""; + } + var result = ""; + if (indent) { + result += newLine; + for (var i = 0; i < indent; i++) { + result += " "; + } + } + result += diag.messageText; + indent++; + if (diag.next) { + for (var _i = 0, _a = diag.next; _i < _a.length; _i++) { + var kid = _a[_i]; + result += flattenDiagnosticMessageText(kid, newLine, indent); } - return result; } + return result; } ts.flattenDiagnosticMessageText = flattenDiagnosticMessageText; /* @internal */ @@ -89086,8 +91354,8 @@ var ts; } var resolutions = []; var cache = ts.createMap(); - for (var _i = 0, names_1 = names; _i < names_1.length; _i++) { - var name = names_1[_i]; + for (var _i = 0, names_2 = names; _i < names_2.length; _i++) { + var name = names_2[_i]; var result = void 0; if (cache.has(name)) { result = cache.get(name); @@ -89174,7 +91442,7 @@ var ts; } ts.isProgramUptoDate = isProgramUptoDate; function getConfigFileParsingDiagnostics(configFileParseResult) { - return configFileParseResult.options.configFile ? configFileParseResult.options.configFile.parseDiagnostics.concat(configFileParseResult.errors) : + return configFileParseResult.options.configFile ? __spreadArrays(configFileParseResult.options.configFile.parseDiagnostics, configFileParseResult.errors) : configFileParseResult.errors; } ts.getConfigFileParsingDiagnostics = getConfigFileParsingDiagnostics; @@ -89248,7 +91516,7 @@ var ts; var resolveModuleNamesWorker; var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse; if (host.resolveModuleNames) { - resolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference).map(function (resolved) { + resolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.assertEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. if (!resolved || resolved.extension !== undefined) { return resolved; @@ -89265,7 +91533,7 @@ var ts; } var resolveTypeReferenceDirectiveNamesWorker; if (host.resolveTypeReferenceDirectives) { - resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference); }; + resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.assertEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); }; } else { var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective; }; // TODO: GH#18217 @@ -89295,7 +91563,10 @@ var ts; var projectReferenceRedirects; var mapFromFileToProjectReferenceRedirects; var shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options); - var structuralIsReused = tryReuseStructureFromOldProgram(); + // We set `structuralIsReused` to `undefined` because `tryReuseStructureFromOldProgram` calls `tryReuseStructureFromOldProgram` which checks + // `structuralIsReused`, which would be a TDZ violation if it was not set in advance to `undefined`. + var structuralIsReused; + structuralIsReused = tryReuseStructureFromOldProgram(); if (structuralIsReused !== 2 /* Completely */) { processingDefaultLibFiles = []; processingOtherFiles = []; @@ -89503,13 +91774,13 @@ var ts; // which per above occurred during the current program creation. // Since we assume the filesystem does not change during program creation, // it is safe to reuse resolutions from the earlier call. - var result_8 = []; + var result_9 = []; for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { var moduleName = moduleNames_1[_i]; var resolvedModule = file.resolvedModules.get(moduleName); - result_8.push(resolvedModule); + result_9.push(resolvedModule); } - return result_8; + return result_9; } // At this point, we know at least one of the following hold: // - file has local declarations for ambient modules @@ -89825,7 +92096,7 @@ var ts; var filePath = newSourceFile.path; addFileToFilesByName(newSourceFile, filePath, newSourceFile.resolvedPath); // Set the file as found during node modules search if it was found that way in old progra, - if (oldProgram.isSourceFileFromExternalLibrary(oldProgram.getSourceFileByPath(filePath))) { + if (oldProgram.isSourceFileFromExternalLibrary(oldProgram.getSourceFileByPath(newSourceFile.resolvedPath))) { sourceFilesFoundSearchingNodeModules.set(filePath, true); } } @@ -89841,7 +92112,7 @@ var ts; return oldProgram.structureIsReused = 2 /* Completely */; } function getEmitHost(writeFileCallback) { - return __assign({ getPrependNodes: getPrependNodes, + return __assign(__assign({ getPrependNodes: getPrependNodes, getCanonicalFileName: getCanonicalFileName, getCommonSourceDirectory: program.getCommonSourceDirectory, getCompilerOptions: program.getCompilerOptions, getCurrentDirectory: function () { return currentDirectory; }, getNewLine: function () { return host.getNewLine(); }, getSourceFile: program.getSourceFile, getSourceFileByPath: program.getSourceFileByPath, getSourceFiles: program.getSourceFiles, getLibFileFromReference: program.getLibFileFromReference, isSourceFileFromExternalLibrary: isSourceFileFromExternalLibrary, getResolvedProjectReferenceToRedirect: getResolvedProjectReferenceToRedirect, writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError, sourceFiles) { return host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles); }), isEmitBlocked: isEmitBlocked, readFile: function (f) { return host.readFile(f); }, fileExists: function (f) { // Use local caches @@ -89852,7 +92123,7 @@ var ts; return false; // Before falling back to the host return host.fileExists(f); - } }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {}), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); } }); + } }, (host.directoryExists ? { directoryExists: function (f) { return host.directoryExists(f); } } : {})), { useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); }, redirectTargetsMap: redirectTargetsMap }); } function emitBuildInfo(writeFileCallback) { ts.Debug.assert(!options.out && !options.outFile); @@ -89924,7 +92195,7 @@ var ts; // immediately bail out. Note that we pass 'undefined' for 'sourceFile' so that we // get any preEmit diagnostics, not just the ones if (options.noEmitOnError) { - var diagnostics = program.getOptionsDiagnostics(cancellationToken).concat(program.getSyntacticDiagnostics(sourceFile, cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSemanticDiagnostics(sourceFile, cancellationToken)); + var diagnostics = __spreadArrays(program.getOptionsDiagnostics(cancellationToken), program.getSyntacticDiagnostics(sourceFile, cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSemanticDiagnostics(sourceFile, cancellationToken)); if (diagnostics.length === 0 && ts.getEmitDeclarations(program.getCompilerOptions())) { declarationDiagnostics = program.getDeclarationDiagnostics(/*sourceFile*/ undefined, cancellationToken); } @@ -90040,8 +92311,8 @@ var ts; for (var _i = 0, _a = [bindDiagnostics, checkDiagnostics, fileProcessingDiagnosticsInFile, programDiagnosticsInFile, isCheckJs ? sourceFile.jsDocDiagnostics : undefined]; _i < _a.length; _i++) { var diags = _a[_i]; if (diags) { - for (var _b = 0, diags_1 = diags; _b < diags_1.length; _b++) { - var diag = diags_1[_b]; + for (var _b = 0, diags_4 = diags; _b < diags_4.length; _b++) { + var diag = diags_4[_b]; if (shouldReportDiagnostic(diag)) { diagnostics = ts.append(diagnostics, diag); } @@ -90484,7 +92755,7 @@ var ts; args[_i - 1] = arguments[_i]; } fileProcessingDiagnostics.add(refFile !== undefined && refEnd !== undefined && refPos !== undefined - ? ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(args)) : ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(args))); + ? ts.createFileDiagnostic.apply(void 0, __spreadArrays([refFile, refPos, refEnd - refPos, diagnostic], args)) : ts.createCompilerDiagnostic.apply(void 0, __spreadArrays([diagnostic], args))); }, refFile); } function reportFileNamesDifferOnlyInCasingError(fileName, existingFileName, refFile, refPos, refEnd) { @@ -90816,10 +93087,10 @@ var ts; args[_i - 4] = arguments[_i]; } if (refFile === undefined || refPos === undefined || refEnd === undefined) { - return ts.createCompilerDiagnostic.apply(void 0, [message].concat(args)); + return ts.createCompilerDiagnostic.apply(void 0, __spreadArrays([message], args)); } else { - return ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, message].concat(args)); + return ts.createFileDiagnostic.apply(void 0, __spreadArrays([refFile, refPos, refEnd - refPos, message], args)); } } function getCanonicalFileName(fileName) { @@ -90994,7 +93265,7 @@ var ts; if (!ts.sourceFileMayBeEmitted(file, options, isSourceFileFromExternalLibrary, getResolvedProjectReferenceToRedirect)) continue; if (rootPaths.indexOf(file.path) === -1) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern, file.fileName)); + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, file.fileName, options.configFilePath || "")); } } } @@ -91683,11 +93954,16 @@ var ts; } } else { - var emitOutput = ts.getFileEmitOutput(programOfThisState, sourceFile, /*emitOnlyDtsFiles*/ true, cancellationToken); - if (emitOutput.outputFiles && emitOutput.outputFiles.length > 0) { - latestSignature = computeHash(emitOutput.outputFiles[0].text); + var emitOutput_1 = ts.getFileEmitOutput(programOfThisState, sourceFile, /*emitOnlyDtsFiles*/ true, cancellationToken); + var firstDts_1 = emitOutput_1.outputFiles && + programOfThisState.getCompilerOptions().declarationMap ? + emitOutput_1.outputFiles.length > 1 ? emitOutput_1.outputFiles[1] : undefined : + emitOutput_1.outputFiles.length > 0 ? emitOutput_1.outputFiles[0] : undefined; + if (firstDts_1) { + ts.Debug.assert(ts.fileExtensionIs(firstDts_1.name, ".d.ts" /* Dts */), "File extension for signature expected to be dts", function () { return "Found: " + ts.getAnyExtensionFromPath(firstDts_1.name) + " for " + firstDts_1.name + ":: All output files: " + JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; })); }); + latestSignature = computeHash(firstDts_1.text); if (exportedModulesMapCache && latestSignature !== prevSignature) { - updateExportedModules(sourceFile, emitOutput.exportedModulesFromDeclarationEmit, exportedModulesMapCache); + updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache); } } else { @@ -91740,7 +94016,6 @@ var ts; * Get all the dependencies of the sourceFile */ function getAllDependencies(state, programOfThisState, sourceFile) { - var _a; var compilerOptions = programOfThisState.getCompilerOptions(); // With --out or --outFile all outputs go into single file, all files depend on each other if (compilerOptions.outFile || compilerOptions.out) { @@ -91760,8 +94035,8 @@ var ts; var references = state.referencedMap.get(path); if (references) { var iterator = references.keys(); - for (var _b = iterator.next(), value = _b.value, done = _b.done; !done; _a = iterator.next(), value = _a.value, done = _a.done, _a) { - queue.push(value); + for (var iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) { + queue.push(iterResult.value); } } } @@ -91967,7 +94242,7 @@ var ts; // Unchanged file copy diagnostics var diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath); if (diagnostics) { - state.semanticDiagnosticsPerFile.set(sourceFilePath, oldState.hasReusableDiagnostic ? convertToDiagnostics(diagnostics, newProgram) : diagnostics); + state.semanticDiagnosticsPerFile.set(sourceFilePath, oldState.hasReusableDiagnostic ? convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) : diagnostics); if (!state.semanticDiagnosticsFromOldState) { state.semanticDiagnosticsFromOldState = ts.createMap(); } @@ -91983,30 +94258,29 @@ var ts; } return state; } - function convertToDiagnostics(diagnostics, newProgram) { + function convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) { if (!diagnostics.length) return ts.emptyArray; + var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getOutputPathForBuildInfo(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory())); return diagnostics.map(function (diagnostic) { - var result = convertToDiagnosticRelatedInformation(diagnostic, newProgram); + var result = convertToDiagnosticRelatedInformation(diagnostic, newProgram, toPath); result.reportsUnnecessary = diagnostic.reportsUnnecessary; result.source = diagnostic.source; var relatedInformation = diagnostic.relatedInformation; result.relatedInformation = relatedInformation ? relatedInformation.length ? - relatedInformation.map(function (r) { return convertToDiagnosticRelatedInformation(r, newProgram); }) : + relatedInformation.map(function (r) { return convertToDiagnosticRelatedInformation(r, newProgram, toPath); }) : ts.emptyArray : undefined; return result; }); + function toPath(path) { + return ts.toPath(path, buildInfoDirectory, getCanonicalFileName); + } } - function convertToDiagnosticRelatedInformation(diagnostic, newProgram) { - var file = diagnostic.file, messageText = diagnostic.messageText; - return __assign({}, diagnostic, { file: file && newProgram.getSourceFileByPath(file), messageText: messageText === undefined || ts.isString(messageText) ? - messageText : - convertToDiagnosticMessageChain(messageText, newProgram) }); - } - function convertToDiagnosticMessageChain(diagnostic, newProgram) { - return __assign({}, diagnostic, { next: diagnostic.next && convertToDiagnosticMessageChain(diagnostic.next, newProgram) }); + function convertToDiagnosticRelatedInformation(diagnostic, newProgram, toPath) { + var file = diagnostic.file; + return __assign(__assign({}, diagnostic), { file: file ? newProgram.getSourceFileByPath(toPath(file)) : undefined }); } /** * Releases program and other related not needed properties @@ -92064,7 +94338,6 @@ var ts; handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash); return affectedFile; } - seenAffectedFiles.set(affectedFile.path, true); affectedFilesIndex++; } // Remove the changed file from the change set @@ -92254,7 +94527,7 @@ var ts; * This is called after completing operation on the next affected file. * The operations here are postponed to ensure that cancellation during the iteration is handled correctly */ - function doneWithAffectedFile(state, affected, isPendingEmit, isBuildInfoEmit) { + function doneWithAffectedFile(state, affected, isPendingEmit, isBuildInfoEmit, isEmitResult) { if (isBuildInfoEmit) { state.emittedBuildInfo = true; } @@ -92264,6 +94537,9 @@ var ts; } else { state.seenAffectedFiles.set(affected.path, true); + if (isEmitResult) { + (state.seenEmittedFiles || (state.seenEmittedFiles = ts.createMap())).set(affected.path, true); + } if (isPendingEmit) { state.affectedFilesPendingEmitIndex++; } @@ -92279,6 +94555,13 @@ var ts; doneWithAffectedFile(state, affected, isPendingEmit, isBuildInfoEmit); return { result: result, affected: affected }; } + /** + * Returns the result with affected file + */ + function toAffectedFileEmitResult(state, result, affected, isPendingEmit, isBuildInfoEmit) { + doneWithAffectedFile(state, affected, isPendingEmit, isBuildInfoEmit, /*isEmitResult*/ true); + return { result: result, affected: affected }; + } /** * Gets the semantic diagnostics either from cache if present, or otherwise from program and caches it * Note that it is assumed that the when asked about semantic diagnostics, the file has been taken out of affected files/changed file set @@ -92302,19 +94585,24 @@ var ts; /** * Gets the program information to be emitted in buildInfo so that we can use it to create new program */ - function getProgramBuildInfo(state) { + function getProgramBuildInfo(state, getCanonicalFileName) { if (state.compilerOptions.outFile || state.compilerOptions.out) return undefined; + var currentDirectory = ts.Debug.assertDefined(state.program).getCurrentDirectory(); + var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getOutputPathForBuildInfo(state.compilerOptions), currentDirectory)); var fileInfos = {}; state.fileInfos.forEach(function (value, key) { var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key); - fileInfos[key] = signature === undefined ? value : { version: value.version, signature: signature }; + fileInfos[relativeToBuildInfo(key)] = signature === undefined ? value : { version: value.version, signature: signature }; }); - var result = { fileInfos: fileInfos, options: state.compilerOptions }; + var result = { + fileInfos: fileInfos, + options: convertToReusableCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath) + }; if (state.referencedMap) { var referencedMap_1 = {}; state.referencedMap.forEach(function (value, key) { - referencedMap_1[key] = ts.arrayFrom(value.keys()); + referencedMap_1[relativeToBuildInfo(key)] = ts.arrayFrom(value.keys(), relativeToBuildInfo); }); result.referencedMap = referencedMap_1; } @@ -92324,10 +94612,10 @@ var ts; var newValue = state.currentAffectedFilesExportedModulesMap && state.currentAffectedFilesExportedModulesMap.get(key); // Not in temporary cache, use existing value if (newValue === undefined) - exportedModulesMap_1[key] = ts.arrayFrom(value.keys()); + exportedModulesMap_1[relativeToBuildInfo(key)] = ts.arrayFrom(value.keys(), relativeToBuildInfo); // Value in cache and has updated value map, use that else if (newValue) - exportedModulesMap_1[key] = ts.arrayFrom(newValue.keys()); + exportedModulesMap_1[relativeToBuildInfo(key)] = ts.arrayFrom(newValue.keys(), relativeToBuildInfo); }); result.exportedModulesMap = exportedModulesMap_1; } @@ -92336,39 +94624,67 @@ var ts; // Currently not recording actual errors since those mean no emit for tsc --build state.semanticDiagnosticsPerFile.forEach(function (value, key) { return semanticDiagnosticsPerFile_1.push(value.length ? [ - key, + relativeToBuildInfo(key), state.hasReusableDiagnostic ? value : - convertToReusableDiagnostics(value) + convertToReusableDiagnostics(value, relativeToBuildInfo) ] : - key); }); + relativeToBuildInfo(key)); }); result.semanticDiagnosticsPerFile = semanticDiagnosticsPerFile_1; } return result; + function relativeToBuildInfoEnsuringAbsolutePath(path) { + return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory)); + } + function relativeToBuildInfo(path) { + return ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(buildInfoDirectory, path, getCanonicalFileName)); + } } - function convertToReusableDiagnostics(diagnostics) { + function convertToReusableCompilerOptions(options, relativeToBuildInfo) { + var result = {}; + var optionsNameMap = ts.getOptionNameMap().optionNameMap; + for (var name in options) { + if (ts.hasProperty(options, name)) { + result[name] = convertToReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], relativeToBuildInfo); + } + } + if (result.configFilePath) { + result.configFilePath = relativeToBuildInfo(result.configFilePath); + } + return result; + } + function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) { + if (option) { + if (option.type === "list") { + var values = value; + if (option.element.isFilePath && values.length) { + return values.map(relativeToBuildInfo); + } + } + else if (option.isFilePath) { + return relativeToBuildInfo(value); + } + } + return value; + } + function convertToReusableDiagnostics(diagnostics, relativeToBuildInfo) { ts.Debug.assert(!!diagnostics.length); return diagnostics.map(function (diagnostic) { - var result = convertToReusableDiagnosticRelatedInformation(diagnostic); + var result = convertToReusableDiagnosticRelatedInformation(diagnostic, relativeToBuildInfo); result.reportsUnnecessary = diagnostic.reportsUnnecessary; result.source = diagnostic.source; var relatedInformation = diagnostic.relatedInformation; result.relatedInformation = relatedInformation ? relatedInformation.length ? - relatedInformation.map(function (r) { return convertToReusableDiagnosticRelatedInformation(r); }) : + relatedInformation.map(function (r) { return convertToReusableDiagnosticRelatedInformation(r, relativeToBuildInfo); }) : ts.emptyArray : undefined; return result; }); } - function convertToReusableDiagnosticRelatedInformation(diagnostic) { - var file = diagnostic.file, messageText = diagnostic.messageText; - return __assign({}, diagnostic, { file: file && file.path, messageText: messageText === undefined || ts.isString(messageText) ? - messageText : - convertToReusableDiagnosticMessageChain(messageText) }); - } - function convertToReusableDiagnosticMessageChain(diagnostic) { - return __assign({}, diagnostic, { next: diagnostic.next && convertToReusableDiagnosticMessageChain(diagnostic.next) }); + function convertToReusableDiagnosticRelatedInformation(diagnostic, relativeToBuildInfo) { + var file = diagnostic.file; + return __assign(__assign({}, diagnostic), { file: file ? relativeToBuildInfo(file.path) : undefined }); } var BuilderProgramKind; (function (BuilderProgramKind) { @@ -92426,7 +94742,7 @@ var ts; var computeHash = host.createHash || ts.generateDjb2Hash; var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState); var backupState; - newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state); }; + newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); }; // To ensure that we arent storing any references to old program or new program without state newProgram = undefined; // TODO: GH#18217 oldProgram = undefined; @@ -92452,6 +94768,7 @@ var ts; result.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; } else if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) { + result.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; result.emitNextAffectedFile = emitNextAffectedFile; } else { @@ -92474,7 +94791,7 @@ var ts; return undefined; } var affected_1 = ts.Debug.assertDefined(state.program); - return toAffectedFileResult(state, + return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file affected_1.emitBuildInfo(writeFile || ts.maybeBind(host, host.writeFile), cancellationToken), affected_1, @@ -92493,7 +94810,7 @@ var ts; affected = program; } } - return toAffectedFileResult(state, + return toAffectedFileEmitResult(state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file ts.Debug.assertDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers), affected, isPendingEmitFile); @@ -92550,6 +94867,10 @@ var ts; // When whole program is affected, get all semantic diagnostics (eg when --out or --outFile is specified) return toAffectedFileResult(state, state.program.getSemanticDiagnostics(/*targetSourceFile*/ undefined, cancellationToken), affected); } + // Add file to affected file pending emit to handle for later emit time + if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) { + addToAffectedFilesPendingEmit(state, [affected.path]); + } // Get diagnostics for the affected file if its not ignored if (ignoreSourceFile && ignoreSourceFile(affected)) { // Get next affected file @@ -92580,17 +94901,8 @@ var ts; } // When semantic builder asks for diagnostics of the whole program, // ensure that all the affected files are handled - var affected; - var affectedFilesPendingEmit; - while (affected = getNextAffectedFile(state, cancellationToken, computeHash)) { - if (affected !== state.program && kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) { - (affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push(affected.path); - } - doneWithAffectedFile(state, affected); - } - // In case of emit builder, cache the files to be emitted - if (affectedFilesPendingEmit) { - addToAffectedFilesPendingEmit(state, affectedFilesPendingEmit); + // tslint:disable-next-line no-empty + while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { } var diagnostics; for (var _i = 0, _a = ts.Debug.assertDefined(state.program).getSourceFiles(); _i < _a.length; _i++) { @@ -92611,7 +94923,7 @@ var ts; state.affectedFilesPendingEmitIndex = 0; } } - function getMapOfReferencedSet(mapLike) { + function getMapOfReferencedSet(mapLike, toPath) { if (!mapLike) return undefined; var map = ts.createMap(); @@ -92619,19 +94931,26 @@ var ts; // template is undefined, and instead will just exit the loop. for (var key in mapLike) { if (ts.hasProperty(mapLike, key)) { - map.set(key, ts.arrayToSet(mapLike[key])); + map.set(toPath(key), ts.arrayToSet(mapLike[key], toPath)); } } return map; } - function createBuildProgramUsingProgramBuildInfo(program) { - var fileInfos = ts.createMapFromTemplate(program.fileInfos); + function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) { + var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); + var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames()); + var fileInfos = ts.createMap(); + for (var key in program.fileInfos) { + if (ts.hasProperty(program.fileInfos, key)) { + fileInfos.set(toPath(key), program.fileInfos[key]); + } + } var state = { fileInfos: fileInfos, - compilerOptions: program.options, - referencedMap: getMapOfReferencedSet(program.referencedMap), - exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap), - semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return ts.isString(value) ? value : value[0]; }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }), + compilerOptions: convertFromReusableCompilerOptions(program.options, toAbsolutePath), + referencedMap: getMapOfReferencedSet(program.referencedMap, toPath), + exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath), + semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toPath(ts.isString(value) ? value : value[0]); }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }), hasReusableDiagnostic: true }; return { @@ -92656,8 +94975,41 @@ var ts; emitNextAffectedFile: ts.notImplemented, getSemanticDiagnosticsOfNextAffectedFile: ts.notImplemented, }; + function toPath(path) { + return ts.toPath(path, buildInfoDirectory, getCanonicalFileName); + } + function toAbsolutePath(path) { + return ts.getNormalizedAbsolutePath(path, buildInfoDirectory); + } } ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo; + function convertFromReusableCompilerOptions(options, toAbsolutePath) { + var result = {}; + var optionsNameMap = ts.getOptionNameMap().optionNameMap; + for (var name in options) { + if (ts.hasProperty(options, name)) { + result[name] = convertFromReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], toAbsolutePath); + } + } + if (result.configFilePath) { + result.configFilePath = toAbsolutePath(result.configFilePath); + } + return result; + } + function convertFromReusableCompilerOptionValue(option, value, toAbsolutePath) { + if (option) { + if (option.type === "list") { + var values = value; + if (option.element.isFilePath && values.length) { + return values.map(toAbsolutePath); + } + } + else if (option.isFilePath) { + return toAbsolutePath(value); + } + } + return value; + } function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) { return { getState: ts.notImplemented, @@ -92707,6 +95059,38 @@ var ts; return ts.some(ts.ignoredPaths, function (searchPath) { return ts.stringContains(path, searchPath); }); } ts.isPathIgnored = isPathIgnored; + /** + * Filter out paths like + * "/", "/user", "/user/username", "/user/username/folderAtRoot", + * "c:/", "c:/users", "c:/users/username", "c:/users/username/folderAtRoot", "c:/folderAtRoot" + * @param dirPath + */ + function canWatchDirectory(dirPath) { + var rootLength = ts.getRootLength(dirPath); + if (dirPath.length === rootLength) { + // Ignore "/", "c:/" + return false; + } + var nextDirectorySeparator = dirPath.indexOf(ts.directorySeparator, rootLength); + if (nextDirectorySeparator === -1) { + // ignore "/user", "c:/users" or "c:/folderAtRoot" + return false; + } + if (dirPath.charCodeAt(0) !== 47 /* slash */ && + dirPath.substr(rootLength, nextDirectorySeparator).search(/users/i) === -1) { + // Paths like c:/folderAtRoot/subFolder are allowed + return true; + } + for (var searchIndex = nextDirectorySeparator + 1, searchLevels = 2; searchLevels > 0; searchLevels--) { + searchIndex = dirPath.indexOf(ts.directorySeparator, searchIndex) + 1; + if (searchIndex === 0) { + // Folder isnt at expected minimun levels + return false; + } + } + return true; + } + ts.canWatchDirectory = canWatchDirectory; ts.maxNumberOfFilesToIterateForInvalidation = 256; function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) { var filesWithChangedSetOfUnresolvedImports; @@ -92837,7 +95221,7 @@ var ts; if (globalCache !== undefined && !ts.isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTS(primaryResult.resolvedModule.extension))) { // create different collection of failed lookup locations for second pass // if it will fail and we've already found something during the first pass - we don't want to pollute its results - var _a = ts.loadModuleFromGlobalCache(moduleName, resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; + var _a = ts.loadModuleFromGlobalCache(ts.Debug.assertDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations; if (resolvedModule) { return { resolvedModule: resolvedModule, failedLookupLocations: ts.addRange(primaryResult.failedLookupLocations, failedLookupLocations) }; } @@ -92865,8 +95249,8 @@ var ts; !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference; var seenNamesInFile = ts.createMap(); - for (var _i = 0, names_2 = names; _i < names_2.length; _i++) { - var name = names_2[_i]; + for (var _i = 0, names_3 = names; _i < names_3.length; _i++) { + var name = names_3[_i]; var resolution = resolutionsInFile.get(name); // Resolution is valid if it is present and not invalidated if (!seenNamesInFile.has(name) && @@ -92942,37 +95326,6 @@ var ts; function isNodeModulesAtTypesDirectory(dirPath) { return ts.endsWith(dirPath, "/node_modules/@types"); } - /** - * Filter out paths like - * "/", "/user", "/user/username", "/user/username/folderAtRoot", - * "c:/", "c:/users", "c:/users/username", "c:/users/username/folderAtRoot", "c:/folderAtRoot" - * @param dirPath - */ - function canWatchDirectory(dirPath) { - var rootLength = ts.getRootLength(dirPath); - if (dirPath.length === rootLength) { - // Ignore "/", "c:/" - return false; - } - var nextDirectorySeparator = dirPath.indexOf(ts.directorySeparator, rootLength); - if (nextDirectorySeparator === -1) { - // ignore "/user", "c:/users" or "c:/folderAtRoot" - return false; - } - if (dirPath.charCodeAt(0) !== 47 /* slash */ && - dirPath.substr(rootLength, nextDirectorySeparator).search(/users/i) === -1) { - // Paths like c:/folderAtRoot/subFolder are allowed - return true; - } - for (var searchIndex = nextDirectorySeparator + 1, searchLevels = 2; searchLevels > 0; searchLevels--) { - searchIndex = dirPath.indexOf(ts.directorySeparator, searchIndex) + 1; - if (searchIndex === 0) { - // Folder isnt at expected minimun levels - return false; - } - } - return true; - } function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath) { if (isInDirectoryPath(rootPath, failedLookupLocationPath)) { // Ensure failed look up is normalized path @@ -93403,7 +95756,7 @@ var ts; return [ambient]; var info = getInfo(importingSourceFile.path, host); var moduleSourceFile = ts.getSourceFileOfNode(moduleSymbol.valueDeclaration || ts.getNonAugmentationDeclaration(moduleSymbol)); - var modulePaths = getAllModulePaths(files, importingSourceFile.path, moduleSourceFile.fileName, info.getCanonicalFileName, host, redirectTargetsMap); + var modulePaths = getAllModulePaths(files, importingSourceFile.path, moduleSourceFile.originalFileName, info.getCanonicalFileName, host, redirectTargetsMap); var preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile); var global = ts.mapDefined(modulePaths, function (moduleFileName) { return tryGetModuleNameAsNodeModule(moduleFileName, info, host, compilerOptions); }); return global.length ? global : modulePaths.map(function (moduleFileName) { return getLocalModuleSpecifier(moduleFileName, info, compilerOptions, preferences); }); @@ -93419,7 +95772,7 @@ var ts; var getCanonicalFileName = _a.getCanonicalFileName, sourceDirectory = _a.sourceDirectory; var ending = _b.ending, relativePreference = _b.relativePreference; var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths, rootDirs = compilerOptions.rootDirs; - var relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName) || + var relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) || removeExtensionAndIndexPostFix(ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(sourceDirectory, moduleFileName, getCanonicalFileName)), ending, compilerOptions); if (!baseUrl || relativePreference === 0 /* Relative */) { return relativePath; @@ -93494,7 +95847,7 @@ var ts; */ function getAllModulePaths(files, importingFileName, importedFileName, getCanonicalFileName, host, redirectTargetsMap) { var redirects = redirectTargetsMap.get(importedFileName); - var importedFileNames = redirects ? redirects.concat([importedFileName]) : [importedFileName]; + var importedFileNames = redirects ? __spreadArrays(redirects, [importedFileName]) : [importedFileName]; var cwd = host.getCurrentDirectory ? host.getCurrentDirectory() : ""; var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); }); var links = discoverProbableSymlinks(files, getCanonicalFileName, cwd); @@ -93545,14 +95898,16 @@ var ts; } } } - function tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName) { + function tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) { var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, rootDirs, getCanonicalFileName); if (normalizedTargetPath === undefined) { return undefined; } var normalizedSourcePath = getPathRelativeToRootDirs(sourceDirectory, rootDirs, getCanonicalFileName); var relativePath = normalizedSourcePath !== undefined ? ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(normalizedSourcePath, normalizedTargetPath, getCanonicalFileName)) : normalizedTargetPath; - return ts.removeFileExtension(relativePath); + return ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeJs + ? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions) + : ts.removeFileExtension(relativePath); } function tryGetModuleNameAsNodeModule(moduleFileName, _a, host, options) { var getCanonicalFileName = _a.getCanonicalFileName, sourceDirectory = _a.sourceDirectory; @@ -93834,22 +96189,23 @@ var ts; /** * Helper that emit files, report diagnostics and lists emitted and/or source files depending on compiler options */ - function emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile) { + function emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { // First get and report any syntactic errors. var diagnostics = program.getConfigFileParsingDiagnostics().slice(); var configFileParsingDiagnosticsLength = diagnostics.length; - ts.addRange(diagnostics, program.getSyntacticDiagnostics()); + ts.addRange(diagnostics, program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); // If we didn't have any syntactic errors, then also try getting the global and // semantic errors. if (diagnostics.length === configFileParsingDiagnosticsLength) { - ts.addRange(diagnostics, program.getOptionsDiagnostics()); - ts.addRange(diagnostics, program.getGlobalDiagnostics()); + ts.addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); + ts.addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); if (diagnostics.length === configFileParsingDiagnosticsLength) { - ts.addRange(diagnostics, program.getSemanticDiagnostics()); + ts.addRange(diagnostics, program.getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken)); } } // Emit and report any errors we ran into. - var _a = program.emit(/*targetSourceFile*/ undefined, writeFile), emittedFiles = _a.emittedFiles, emitSkipped = _a.emitSkipped, emitDiagnostics = _a.diagnostics; + var emitResult = program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); + var emittedFiles = emitResult.emittedFiles, emitDiagnostics = emitResult.diagnostics; ts.addRange(diagnostics, emitDiagnostics); ts.sortAndDeduplicateDiagnostics(diagnostics).forEach(reportDiagnostic); if (writeFileName) { @@ -93863,7 +96219,15 @@ var ts; if (reportSummary) { reportSummary(getErrorCountForSummary(diagnostics)); } - if (emitSkipped && diagnostics.length > 0) { + return { + emitResult: emitResult, + diagnostics: diagnostics, + }; + } + ts.emitFilesAndReportErrors = emitFilesAndReportErrors; + function emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { + var _a = emitFilesAndReportErrors(program, reportDiagnostic, writeFileName, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers), emitResult = _a.emitResult, diagnostics = _a.diagnostics; + if (emitResult.emitSkipped && diagnostics.length > 0) { // If the emitter didn't emit anything, then pass that value along. return ts.ExitStatus.DiagnosticsPresent_OutputsSkipped; } @@ -93874,15 +96238,15 @@ var ts; } return ts.ExitStatus.Success; } - ts.emitFilesAndReportErrors = emitFilesAndReportErrors; - var noopFileWatcher = { close: ts.noop }; + ts.emitFilesAndReportErrorsAndGetExitStatus = emitFilesAndReportErrorsAndGetExitStatus; + ts.noopFileWatcher = { close: ts.noop }; function createWatchHost(system, reportWatchStatus) { if (system === void 0) { system = ts.sys; } var onWatchStatusChange = reportWatchStatus || createWatchStatusReporter(system); return { onWatchStatusChange: onWatchStatusChange, - watchFile: ts.maybeBind(system, system.watchFile) || (function () { return noopFileWatcher; }), - watchDirectory: ts.maybeBind(system, system.watchDirectory) || (function () { return noopFileWatcher; }), + watchFile: ts.maybeBind(system, system.watchFile) || (function () { return ts.noopFileWatcher; }), + watchDirectory: ts.maybeBind(system, system.watchDirectory) || (function () { return ts.noopFileWatcher; }), setTimeout: ts.maybeBind(system, system.setTimeout) || ts.noop, clearTimeout: ts.maybeBind(system, system.clearTimeout) || ts.noop }; @@ -93975,7 +96339,7 @@ var ts; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } - var result = originalGetSourceFile.call.apply(originalGetSourceFile, [compilerHost].concat(args)); + var result = originalGetSourceFile.call.apply(originalGetSourceFile, __spreadArrays([compilerHost], args)); if (result) { result.version = computeHash.call(host, result.text); } @@ -94057,13 +96421,25 @@ var ts; return host; } ts.createWatchCompilerHostOfFilesAndCompilerOptions = createWatchCompilerHostOfFilesAndCompilerOptions; - function readBuilderProgram(compilerOptions, readFile) { + function performIncrementalCompilation(input) { + var system = input.system || ts.sys; + var host = input.host || (input.host = ts.createIncrementalCompilerHost(input.options, system)); + var builderProgram = ts.createIncrementalProgram(input); + var exitStatus = emitFilesAndReportErrorsAndGetExitStatus(builderProgram, input.reportDiagnostic || createDiagnosticReporter(system), function (s) { return host.trace && host.trace(s); }, input.reportErrorSummary || input.options.pretty ? function (errorCount) { return system.write(getErrorSummaryText(errorCount, system.newLine)); } : undefined); + if (input.afterProgramEmitAndDiagnostics) + input.afterProgramEmitAndDiagnostics(builderProgram); + return exitStatus; + } + ts.performIncrementalCompilation = performIncrementalCompilation; +})(ts || (ts = {})); +(function (ts) { + function readBuilderProgram(compilerOptions, host) { if (compilerOptions.out || compilerOptions.outFile) return undefined; var buildInfoPath = ts.getOutputPathForBuildInfo(compilerOptions); if (!buildInfoPath) return undefined; - var content = readFile(buildInfoPath); + var content = host.readFile(buildInfoPath); if (!content) return undefined; var buildInfo = ts.getBuildInfo(content); @@ -94071,14 +96447,14 @@ var ts; return undefined; if (!buildInfo.program) return undefined; - return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program); + return ts.createBuildProgramUsingProgramBuildInfo(buildInfo.program, buildInfoPath, host); } ts.readBuilderProgram = readBuilderProgram; function createIncrementalCompilerHost(options, system) { if (system === void 0) { system = ts.sys; } var host = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, system); host.createHash = ts.maybeBind(system, system.createHash); - setGetSourceFileAsHashVersioned(host, system); + ts.setGetSourceFileAsHashVersioned(host, system); ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); }); return host; } @@ -94087,21 +96463,10 @@ var ts; var rootNames = _a.rootNames, options = _a.options, configFileParsingDiagnostics = _a.configFileParsingDiagnostics, projectReferences = _a.projectReferences, host = _a.host, createProgram = _a.createProgram; host = host || createIncrementalCompilerHost(options); createProgram = createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram; - var oldProgram = readBuilderProgram(options, function (path) { return host.readFile(path); }); + var oldProgram = readBuilderProgram(options, host); return createProgram(rootNames, options, host, oldProgram, configFileParsingDiagnostics, projectReferences); } - function performIncrementalCompilation(input) { - var system = input.system || ts.sys; - var host = input.host || (input.host = createIncrementalCompilerHost(input.options, system)); - var builderProgram = createIncrementalProgram(input); - var exitStatus = emitFilesAndReportErrors(builderProgram, input.reportDiagnostic || createDiagnosticReporter(system), function (s) { return host.trace && host.trace(s); }, input.reportErrorSummary || input.options.pretty ? function (errorCount) { return system.write(getErrorSummaryText(errorCount, system.newLine)); } : undefined); - if (input.afterProgramEmitAndDiagnostics) - input.afterProgramEmitAndDiagnostics(builderProgram); - return exitStatus; - } - ts.performIncrementalCompilation = performIncrementalCompilation; -})(ts || (ts = {})); -(function (ts) { + ts.createIncrementalProgram = createIncrementalProgram; function createWatchCompilerHost(rootFilesOrConfigFileName, options, system, createProgram, reportDiagnostic, reportWatchStatus, projectReferences) { if (ts.isArray(rootFilesOrConfigFileName)) { return ts.createWatchCompilerHostOfFilesAndCompilerOptions(rootFilesOrConfigFileName, options, system, createProgram, reportDiagnostic, reportWatchStatus, projectReferences); // TODO: GH#18217 @@ -94164,7 +96529,7 @@ var ts; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } - return getVersionedSourceFileByPath.apply(void 0, [fileName, toPath(fileName)].concat(args)); + return getVersionedSourceFileByPath.apply(void 0, __spreadArrays([fileName, toPath(fileName)], args)); }; compilerHost.getSourceFileByPath = getVersionedSourceFileByPath; compilerHost.getNewLine = function () { return newLine; }; @@ -94192,13 +96557,25 @@ var ts; /*logChangesWhenResolvingModule*/ false); // Resolve module using host module resolution strategy if provided otherwise use resolution cache to resolve module names compilerHost.resolveModuleNames = host.resolveModuleNames ? - (function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference); }) : + (function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return host.resolveModuleNames.apply(host, args); + }) : (function (moduleNames, containingFile, reusedNames, redirectedReference) { return resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference); }); compilerHost.resolveTypeReferenceDirectives = host.resolveTypeReferenceDirectives ? - (function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference); }) : + (function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return host.resolveTypeReferenceDirectives.apply(host, args); + }) : (function (typeDirectiveNames, containingFile, redirectedReference) { return resolutionCache.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile, redirectedReference); }); var userProvidedResolution = !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives; - builderProgram = ts.readBuilderProgram(compilerOptions, function (path) { return compilerHost.readFile(path); }); + builderProgram = readBuilderProgram(compilerOptions, compilerHost); synchronizeProgram(); // Update the wild card directory watch watchConfigFileWildCardDirectories(); @@ -94421,13 +96798,19 @@ var ts; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); switch (reloadLevel) { case ts.ConfigFileProgramReloadLevel.Partial: - return reloadFileNamesFromConfigFile(); + ts.perfLogger.logStartUpdateProgram("PartialConfigReload"); + reloadFileNamesFromConfigFile(); + break; case ts.ConfigFileProgramReloadLevel.Full: - return reloadConfigFile(); + ts.perfLogger.logStartUpdateProgram("FullConfigReload"); + reloadConfigFile(); + break; default: + ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); - return; + break; } + ts.perfLogger.logStopUpdateProgram("Done"); } function reloadFileNamesFromConfigFile() { writeLog("Reloading new file names and options"); @@ -94529,31 +96912,9 @@ var ts; } ts.createWatchProgram = createWatchProgram; })(ts || (ts = {})); -// Currently we do not want to expose API for build, we should work out the API, and then expose it just like we did for builder/watch /*@internal*/ var ts; (function (ts) { - var minimumDate = new Date(-8640000000000000); - var maximumDate = new Date(8640000000000000); - var BuildResultFlags; - (function (BuildResultFlags) { - BuildResultFlags[BuildResultFlags["None"] = 0] = "None"; - /** - * No errors of any kind occurred during build - */ - BuildResultFlags[BuildResultFlags["Success"] = 1] = "Success"; - /** - * None of the .d.ts files emitted by this build were - * different from the existing files on disk - */ - BuildResultFlags[BuildResultFlags["DeclarationOutputUnchanged"] = 2] = "DeclarationOutputUnchanged"; - BuildResultFlags[BuildResultFlags["ConfigFileErrors"] = 4] = "ConfigFileErrors"; - BuildResultFlags[BuildResultFlags["SyntaxErrors"] = 8] = "SyntaxErrors"; - BuildResultFlags[BuildResultFlags["TypeErrors"] = 16] = "TypeErrors"; - BuildResultFlags[BuildResultFlags["DeclarationEmitErrors"] = 32] = "DeclarationEmitErrors"; - BuildResultFlags[BuildResultFlags["EmitErrors"] = 64] = "EmitErrors"; - BuildResultFlags[BuildResultFlags["AnyErrors"] = 124] = "AnyErrors"; - })(BuildResultFlags || (BuildResultFlags = {})); var UpToDateStatusType; (function (UpToDateStatusType) { UpToDateStatusType[UpToDateStatusType["Unbuildable"] = 0] = "Unbuildable"; @@ -94582,46 +96943,45 @@ var ts; */ UpToDateStatusType[UpToDateStatusType["ContainerOnly"] = 11] = "ContainerOnly"; })(UpToDateStatusType = ts.UpToDateStatusType || (ts.UpToDateStatusType = {})); - function createFileMap(toPath) { - // tslint:disable-next-line:no-null-keyword - var lookup = ts.createMap(); - return { - setValue: setValue, - getValue: getValue, - removeKey: removeKey, - forEach: forEach, - hasKey: hasKey, - getSize: getSize, - clear: clear - }; - function forEach(action) { - lookup.forEach(action); - } - function hasKey(fileName) { - return lookup.has(toPath(fileName)); - } - function removeKey(fileName) { - lookup.delete(toPath(fileName)); - } - function setValue(fileName, value) { - lookup.set(toPath(fileName), value); - } - function getValue(fileName) { - return lookup.get(toPath(fileName)); - } - function getSize() { - return lookup.size; - } - function clear() { - lookup.clear(); + function resolveConfigFileProjectName(project) { + if (ts.fileExtensionIs(project, ".json" /* Json */)) { + return project; } + return ts.combinePaths(project, "tsconfig.json"); + } + ts.resolveConfigFileProjectName = resolveConfigFileProjectName; +})(ts || (ts = {})); +(function (ts) { + var minimumDate = new Date(-8640000000000000); + var maximumDate = new Date(8640000000000000); + var BuildResultFlags; + (function (BuildResultFlags) { + BuildResultFlags[BuildResultFlags["None"] = 0] = "None"; + /** + * No errors of any kind occurred during build + */ + BuildResultFlags[BuildResultFlags["Success"] = 1] = "Success"; + /** + * None of the .d.ts files emitted by this build were + * different from the existing files on disk + */ + BuildResultFlags[BuildResultFlags["DeclarationOutputUnchanged"] = 2] = "DeclarationOutputUnchanged"; + BuildResultFlags[BuildResultFlags["ConfigFileErrors"] = 4] = "ConfigFileErrors"; + BuildResultFlags[BuildResultFlags["SyntaxErrors"] = 8] = "SyntaxErrors"; + BuildResultFlags[BuildResultFlags["TypeErrors"] = 16] = "TypeErrors"; + BuildResultFlags[BuildResultFlags["DeclarationEmitErrors"] = 32] = "DeclarationEmitErrors"; + BuildResultFlags[BuildResultFlags["EmitErrors"] = 64] = "EmitErrors"; + BuildResultFlags[BuildResultFlags["AnyErrors"] = 124] = "AnyErrors"; + })(BuildResultFlags || (BuildResultFlags = {})); + function createConfigFileMap() { + return ts.createMap(); } function getOrCreateValueFromConfigFileMap(configFileMap, resolved, createT) { - var existingValue = configFileMap.getValue(resolved); + var existingValue = configFileMap.get(resolved); var newValue; if (!existingValue) { newValue = createT(); - configFileMap.setValue(resolved, newValue); + configFileMap.set(resolved, newValue); } return existingValue || newValue; } @@ -94678,691 +97038,476 @@ var ts; return result; } function createSolutionBuilder(host, rootNames, defaultOptions) { - var hostWithWatch = host; + return createSolutionBuilderWorker(/*watch*/ false, host, rootNames, defaultOptions); + } + ts.createSolutionBuilder = createSolutionBuilder; + function createSolutionBuilderWithWatch(host, rootNames, defaultOptions) { + return createSolutionBuilderWorker(/*watch*/ true, host, rootNames, defaultOptions); + } + ts.createSolutionBuilderWithWatch = createSolutionBuilderWithWatch; + function createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options) { + var host = hostOrHostWithWatch; + var hostWithWatch = hostOrHostWithWatch; var currentDirectory = host.getCurrentDirectory(); var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames()); - var parseConfigFileHost = ts.parseConfigHostFromCompilerHostLike(host); // State of the solution - var options = defaultOptions; var baseCompilerOptions = getCompilerOptionsOfBuildOptions(options); - var configFileCache = createFileMap(toPath); - /** Map from output file name to its pre-build timestamp */ - var unchangedOutputs = createFileMap(toPath); - /** Map from config file name to up-to-date status */ - var projectStatus = createFileMap(toPath); - var missingRoots = ts.createMap(); - var globalDependencyGraph; - var writeFileName = host.trace ? function (s) { return host.trace(s); } : undefined; - var readFileWithCache = function (f) { return host.readFile(f); }; - var projectCompilerOptions = baseCompilerOptions; - var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return projectCompilerOptions; }); + var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return state.projectCompilerOptions; }); ts.setGetSourceFileAsHashVersioned(compilerHost, host); - compilerHost.getParsedCommandLine = parseConfigFile; + compilerHost.getParsedCommandLine = function (fileName) { return parseConfigFile(state, fileName, toResolvedConfigFilePath(state, fileName)); }; compilerHost.resolveModuleNames = ts.maybeBind(host, host.resolveModuleNames); compilerHost.resolveTypeReferenceDirectives = ts.maybeBind(host, host.resolveTypeReferenceDirectives); var moduleResolutionCache = !compilerHost.resolveModuleNames ? ts.createModuleResolutionCache(currentDirectory, getCanonicalFileName) : undefined; - var cacheState; - var buildInfoChecked = createFileMap(toPath); - var extendedConfigCache = ts.createMap(); - // Watch state - var builderPrograms = createFileMap(toPath); - var diagnostics = createFileMap(toPath); - var projectPendingBuild = createFileMap(toPath); - var projectErrorsReported = createFileMap(toPath); - var invalidatedProjectQueue = []; - var nextProjectToBuild = 0; - var timerToBuildInvalidatedProject; - var reportFileChangeDetected = false; - var _a = ts.createWatchFactory(host, options), watchFile = _a.watchFile, watchFilePath = _a.watchFilePath, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; - // Watches for the solution - var allWatchedWildcardDirectories = createFileMap(toPath); - var allWatchedInputFiles = createFileMap(toPath); - var allWatchedConfigFiles = createFileMap(toPath); - return { - buildAllProjects: buildAllProjects, - getUpToDateStatusOfFile: getUpToDateStatusOfFile, - cleanAllProjects: cleanAllProjects, - resetBuildContext: resetBuildContext, - getBuildGraph: getBuildGraph, - invalidateProject: invalidateProject, - buildInvalidatedProject: buildInvalidatedProject, - resolveProjectName: resolveProjectName, - startWatching: startWatching + if (!compilerHost.resolveModuleNames) { + var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; }; + compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) { + return ts.loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_3); + }; + } + var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchFilePath = _a.watchFilePath, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog; + var state = { + host: host, + hostWithWatch: hostWithWatch, + currentDirectory: currentDirectory, + getCanonicalFileName: getCanonicalFileName, + parseConfigFileHost: ts.parseConfigHostFromCompilerHostLike(host), + writeFileName: host.trace ? function (s) { return host.trace(s); } : undefined, + // State of solution + options: options, + baseCompilerOptions: baseCompilerOptions, + rootNames: rootNames, + resolvedConfigFilePaths: ts.createMap(), + configFileCache: createConfigFileMap(), + projectStatus: createConfigFileMap(), + buildInfoChecked: createConfigFileMap(), + extendedConfigCache: ts.createMap(), + builderPrograms: createConfigFileMap(), + diagnostics: createConfigFileMap(), + projectPendingBuild: createConfigFileMap(), + projectErrorsReported: createConfigFileMap(), + compilerHost: compilerHost, + moduleResolutionCache: moduleResolutionCache, + // Mutable state + buildOrder: undefined, + readFileWithCache: function (f) { return host.readFile(f); }, + projectCompilerOptions: baseCompilerOptions, + cache: undefined, + allProjectBuildPending: true, + needsSummary: true, + watchAllProjectsPending: watch, + currentInvalidatedProject: undefined, + // Watch state + watch: watch, + allWatchedWildcardDirectories: createConfigFileMap(), + allWatchedInputFiles: createConfigFileMap(), + allWatchedConfigFiles: createConfigFileMap(), + timerToBuildInvalidatedProject: undefined, + reportFileChangeDetected: false, + watchFile: watchFile, + watchFilePath: watchFilePath, + watchDirectory: watchDirectory, + writeLog: writeLog, }; - function toPath(fileName) { - return ts.toPath(fileName, currentDirectory, getCanonicalFileName); + return state; + } + function toPath(state, fileName) { + return ts.toPath(fileName, state.currentDirectory, state.getCanonicalFileName); + } + function toResolvedConfigFilePath(state, fileName) { + var resolvedConfigFilePaths = state.resolvedConfigFilePaths; + var path = resolvedConfigFilePaths.get(fileName); + if (path !== undefined) + return path; + var resolvedPath = toPath(state, fileName); + resolvedConfigFilePaths.set(fileName, resolvedPath); + return resolvedPath; + } + function isParsedCommandLine(entry) { + return !!entry.options; + } + function parseConfigFile(state, configFileName, configFilePath) { + var configFileCache = state.configFileCache; + var value = configFileCache.get(configFilePath); + if (value) { + return isParsedCommandLine(value) ? value : undefined; } - function resetBuildContext(opts) { - if (opts === void 0) { opts = defaultOptions; } - options = opts; - baseCompilerOptions = getCompilerOptionsOfBuildOptions(options); - configFileCache.clear(); - unchangedOutputs.clear(); - projectStatus.clear(); - missingRoots.clear(); - globalDependencyGraph = undefined; - buildInfoChecked.clear(); - diagnostics.clear(); - projectPendingBuild.clear(); - projectErrorsReported.clear(); - invalidatedProjectQueue.length = 0; - nextProjectToBuild = 0; - if (timerToBuildInvalidatedProject) { - clearTimeout(timerToBuildInvalidatedProject); - timerToBuildInvalidatedProject = undefined; - } - reportFileChangeDetected = false; - ts.clearMap(allWatchedWildcardDirectories, function (wildCardWatches) { return ts.clearMap(wildCardWatches, ts.closeFileWatcherOf); }); - ts.clearMap(allWatchedInputFiles, function (inputFileWatches) { return ts.clearMap(inputFileWatches, ts.closeFileWatcher); }); - ts.clearMap(allWatchedConfigFiles, ts.closeFileWatcher); - builderPrograms.clear(); - } - function isParsedCommandLine(entry) { - return !!entry.options; - } - function parseConfigFile(configFilePath) { - var value = configFileCache.getValue(configFilePath); - if (value) { - return isParsedCommandLine(value) ? value : undefined; - } - var diagnostic; + var diagnostic; + var parseConfigFileHost = state.parseConfigFileHost, baseCompilerOptions = state.baseCompilerOptions, extendedConfigCache = state.extendedConfigCache, host = state.host; + var parsed; + if (host.getParsedCommandLine) { + parsed = host.getParsedCommandLine(configFileName); + if (!parsed) + diagnostic = ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, configFileName); + } + else { parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = function (d) { return diagnostic = d; }; - var parsed = ts.getParsedCommandLineOfConfigFile(configFilePath, baseCompilerOptions, parseConfigFileHost, extendedConfigCache); + parsed = ts.getParsedCommandLineOfConfigFile(configFileName, baseCompilerOptions, parseConfigFileHost, extendedConfigCache); parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop; - configFileCache.setValue(configFilePath, parsed || diagnostic); - return parsed; } - function reportStatus(message) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - host.reportSolutionBuilderStatus(ts.createCompilerDiagnostic.apply(void 0, [message].concat(args))); - } - function reportWatchStatus(message) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - if (hostWithWatch.onWatchStatusChange) { - hostWithWatch.onWatchStatusChange(ts.createCompilerDiagnostic.apply(void 0, [message].concat(args)), host.getNewLine(), baseCompilerOptions); - } - } - function startWatching() { - var graph = getGlobalDependencyGraph(); - for (var _i = 0, _a = graph.buildQueue; _i < _a.length; _i++) { - var resolved = _a[_i]; - // Watch this file - watchConfigFile(resolved); - var cfg = parseConfigFile(resolved); - if (cfg) { - // Update watchers for wildcard directories - watchWildCardDirectories(resolved, cfg); - // Watch input files - watchInputFiles(resolved, cfg); - } - } - } - function watchConfigFile(resolved) { - if (options.watch && !allWatchedConfigFiles.hasKey(resolved)) { - allWatchedConfigFiles.setValue(resolved, watchFile(hostWithWatch, resolved, function () { - invalidateProjectAndScheduleBuilds(resolved, ts.ConfigFileProgramReloadLevel.Full); - }, ts.PollingInterval.High, "Config file" /* ConfigFile */, resolved)); - } + configFileCache.set(configFilePath, parsed || diagnostic); + return parsed; + } + function resolveProjectName(state, name) { + return ts.resolveConfigFileProjectName(ts.resolvePath(state.currentDirectory, name)); + } + function createBuildOrder(state, roots) { + var temporaryMarks = ts.createMap(); + var permanentMarks = ts.createMap(); + var circularityReportStack = []; + var buildOrder; + for (var _i = 0, roots_1 = roots; _i < roots_1.length; _i++) { + var root = roots_1[_i]; + visit(root); } - function watchWildCardDirectories(resolved, parsed) { - if (!options.watch) + return buildOrder || ts.emptyArray; + function visit(configFileName, inCircularContext) { + var projPath = toResolvedConfigFilePath(state, configFileName); + // Already visited + if (permanentMarks.has(projPath)) return; - ts.updateWatchingWildcardDirectories(getOrCreateValueMapFromConfigFileMap(allWatchedWildcardDirectories, resolved), ts.createMapFromTemplate(parsed.configFileSpecs.wildcardDirectories), function (dir, flags) { - return watchDirectory(hostWithWatch, dir, function (fileOrDirectory) { - var fileOrDirectoryPath = toPath(fileOrDirectory); - if (fileOrDirectoryPath !== toPath(dir) && ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, parsed.options)) { - writeLog("Project: " + resolved + " Detected file add/remove of non supported extension: " + fileOrDirectory); - return; - } - if (isOutputFile(fileOrDirectory, parsed)) { - writeLog(fileOrDirectory + " is output file"); - return; - } - invalidateProjectAndScheduleBuilds(resolved, ts.ConfigFileProgramReloadLevel.Partial); - }, flags, "Wild card directory" /* WildcardDirectory */, resolved); - }); - } - function watchInputFiles(resolved, parsed) { - if (!options.watch) + // Circular + if (temporaryMarks.has(projPath)) { + if (!inCircularContext) { + // TODO:: Do we report this as error? + reportStatus(state, ts.Diagnostics.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0, circularityReportStack.join("\r\n")); + } return; - ts.mutateMap(getOrCreateValueMapFromConfigFileMap(allWatchedInputFiles, resolved), ts.arrayToMap(parsed.fileNames, toPath), { - createNewValue: function (path, input) { return watchFilePath(hostWithWatch, input, function () { return invalidateProjectAndScheduleBuilds(resolved, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.Low, path, "Source file" /* SourceFile */, resolved); }, - onDeleteValue: ts.closeFileWatcher, - }); - } - function isOutputFile(fileName, configFile) { - if (configFile.options.noEmit) - return false; - // ts or tsx files are not output - if (!ts.fileExtensionIs(fileName, ".d.ts" /* Dts */) && - (ts.fileExtensionIs(fileName, ".ts" /* Ts */) || ts.fileExtensionIs(fileName, ".tsx" /* Tsx */))) { - return false; - } - // If options have --outFile or --out, check if its that - var out = configFile.options.outFile || configFile.options.out; - if (out && (isSameFile(fileName, out) || isSameFile(fileName, ts.removeFileExtension(out) + ".d.ts" /* Dts */))) { - return true; - } - // If declarationDir is specified, return if its a file in that directory - if (configFile.options.declarationDir && ts.containsPath(configFile.options.declarationDir, fileName, currentDirectory, !host.useCaseSensitiveFileNames())) { - return true; - } - // If --outDir, check if file is in that directory - if (configFile.options.outDir && ts.containsPath(configFile.options.outDir, fileName, currentDirectory, !host.useCaseSensitiveFileNames())) { - return true; } - return !ts.forEach(configFile.fileNames, function (inputFile) { return isSameFile(fileName, inputFile); }); - } - function isSameFile(file1, file2) { - return ts.comparePaths(file1, file2, currentDirectory, !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */; - } - function invalidateProjectAndScheduleBuilds(resolved, reloadLevel) { - reportFileChangeDetected = true; - invalidateResolvedProject(resolved, reloadLevel); - scheduleBuildInvalidatedProject(); - } - function getUpToDateStatusOfFile(configFileName) { - return getUpToDateStatus(parseConfigFile(configFileName)); - } - function getBuildGraph(configFileNames) { - return createDependencyGraph(resolveProjectNames(configFileNames)); + temporaryMarks.set(projPath, true); + circularityReportStack.push(configFileName); + var parsed = parseConfigFile(state, configFileName, projPath); + if (parsed && parsed.projectReferences) { + for (var _i = 0, _a = parsed.projectReferences; _i < _a.length; _i++) { + var ref = _a[_i]; + var resolvedRefPath = resolveProjectName(state, ref.path); + visit(resolvedRefPath, inCircularContext || ref.circular); + } + } + circularityReportStack.pop(); + permanentMarks.set(projPath, true); + (buildOrder || (buildOrder = [])).push(configFileName); + } + } + function getBuildOrder(state) { + return state.buildOrder || createStateBuildOrder(state); + } + function createStateBuildOrder(state) { + var buildOrder = createBuildOrder(state, state.rootNames.map(function (f) { return resolveProjectName(state, f); })); + if (ts.arrayIsEqualTo(state.buildOrder, buildOrder)) + return state.buildOrder; + // Clear all to ResolvedConfigFilePaths cache to start fresh + state.resolvedConfigFilePaths.clear(); + var currentProjects = ts.arrayToSet(buildOrder, function (resolved) { return toResolvedConfigFilePath(state, resolved); }); + var noopOnDelete = { onDeleteValue: ts.noop }; + // Config file cache + ts.mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete); + ts.mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete); + ts.mutateMapSkippingNewValues(state.buildInfoChecked, currentProjects, noopOnDelete); + ts.mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete); + ts.mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete); + ts.mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete); + ts.mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete); + // Remove watches for the program no longer in the solution + if (state.watch) { + ts.mutateMapSkippingNewValues(state.allWatchedConfigFiles, currentProjects, { onDeleteValue: ts.closeFileWatcher }); + ts.mutateMapSkippingNewValues(state.allWatchedWildcardDirectories, currentProjects, { onDeleteValue: function (existingMap) { return existingMap.forEach(ts.closeFileWatcherOf); } }); + ts.mutateMapSkippingNewValues(state.allWatchedInputFiles, currentProjects, { onDeleteValue: function (existingMap) { return existingMap.forEach(ts.closeFileWatcher); } }); + } + return state.buildOrder = buildOrder; + } + function getBuildOrderFor(state, project, onlyReferences) { + var resolvedProject = project && resolveProjectName(state, project); + var buildOrderFromState = getBuildOrder(state); + if (resolvedProject) { + var projectPath_1 = toResolvedConfigFilePath(state, resolvedProject); + var projectIndex = ts.findIndex(buildOrderFromState, function (configFileName) { return toResolvedConfigFilePath(state, configFileName) === projectPath_1; }); + if (projectIndex === -1) + return undefined; } - function getGlobalDependencyGraph() { - return globalDependencyGraph || (globalDependencyGraph = getBuildGraph(rootNames)); + var buildOrder = resolvedProject ? createBuildOrder(state, [resolvedProject]) : buildOrderFromState; + ts.Debug.assert(!onlyReferences || resolvedProject !== undefined); + ts.Debug.assert(!onlyReferences || buildOrder[buildOrder.length - 1] === resolvedProject); + return onlyReferences ? buildOrder.slice(0, buildOrder.length - 1) : buildOrder; + } + function enableCache(state) { + if (state.cache) { + disableCache(state); } - function getUpToDateStatus(project) { - if (project === undefined) { - return { type: UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" }; - } - var prior = projectStatus.getValue(project.options.configFilePath); - if (prior !== undefined) { - return prior; + var compilerHost = state.compilerHost, host = state.host; + var originalReadFileWithCache = state.readFileWithCache; + var originalGetSourceFile = compilerHost.getSourceFile; + var _a = ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return toPath(state, fileName); }, function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; } - var actual = getUpToDateStatusWorker(project); - projectStatus.setValue(project.options.configFilePath, actual); - return actual; + return originalGetSourceFile.call.apply(originalGetSourceFile, __spreadArrays([compilerHost], args)); + }), originalReadFile = _a.originalReadFile, originalFileExists = _a.originalFileExists, originalDirectoryExists = _a.originalDirectoryExists, originalCreateDirectory = _a.originalCreateDirectory, originalWriteFile = _a.originalWriteFile, getSourceFileWithCache = _a.getSourceFileWithCache, readFileWithCache = _a.readFileWithCache; + state.readFileWithCache = readFileWithCache; + compilerHost.getSourceFile = getSourceFileWithCache; + state.cache = { + originalReadFile: originalReadFile, + originalFileExists: originalFileExists, + originalDirectoryExists: originalDirectoryExists, + originalCreateDirectory: originalCreateDirectory, + originalWriteFile: originalWriteFile, + originalReadFileWithCache: originalReadFileWithCache, + originalGetSourceFile: originalGetSourceFile, + }; + } + function disableCache(state) { + if (!state.cache) + return; + var cache = state.cache, host = state.host, compilerHost = state.compilerHost, extendedConfigCache = state.extendedConfigCache, moduleResolutionCache = state.moduleResolutionCache; + host.readFile = cache.originalReadFile; + host.fileExists = cache.originalFileExists; + host.directoryExists = cache.originalDirectoryExists; + host.createDirectory = cache.originalCreateDirectory; + host.writeFile = cache.originalWriteFile; + compilerHost.getSourceFile = cache.originalGetSourceFile; + state.readFileWithCache = cache.originalReadFileWithCache; + extendedConfigCache.clear(); + if (moduleResolutionCache) { + moduleResolutionCache.directoryToModuleNameMap.clear(); + moduleResolutionCache.moduleNameToDirectoryMap.clear(); + } + state.cache = undefined; + } + function clearProjectStatus(state, resolved) { + state.projectStatus.delete(resolved); + state.diagnostics.delete(resolved); + } + function addProjToQueue(_a, proj, reloadLevel) { + var projectPendingBuild = _a.projectPendingBuild; + var value = projectPendingBuild.get(proj); + if (value === undefined) { + projectPendingBuild.set(proj, reloadLevel); + } + else if (value < reloadLevel) { + projectPendingBuild.set(proj, reloadLevel); + } + } + function setupInitialBuild(state, cancellationToken) { + // Set initial build if not already built + if (!state.allProjectBuildPending) + return; + state.allProjectBuildPending = false; + if (state.options.watch) { + reportWatchStatus(state, ts.Diagnostics.Starting_compilation_in_watch_mode); + } + enableCache(state); + var buildOrder = getBuildOrder(state); + buildOrder.forEach(function (configFileName) { + return state.projectPendingBuild.set(toResolvedConfigFilePath(state, configFileName), ts.ConfigFileProgramReloadLevel.None); + }); + if (cancellationToken) { + cancellationToken.throwIfCancellationRequested(); } - function getUpToDateStatusWorker(project) { - var newestInputFileName = undefined; - var newestInputFileTime = minimumDate; - // Get timestamps of input files - for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) { - var inputFile = _a[_i]; - if (!host.fileExists(inputFile)) { - return { - type: UpToDateStatusType.Unbuildable, - reason: inputFile + " does not exist" - }; - } - var inputTime = host.getModifiedTime(inputFile) || ts.missingFileModifiedTime; - if (inputTime > newestInputFileTime) { - newestInputFileName = inputFile; - newestInputFileTime = inputTime; - } - } - // Container if no files are specified in the project - if (!project.fileNames.length && !ts.canJsonReportNoInutFiles(project.raw)) { - return { - type: UpToDateStatusType.ContainerOnly - }; - } - // Collect the expected outputs of this project - var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames()); - // Now see if all outputs are newer than the newest input - var oldestOutputFileName = "(none)"; - var oldestOutputFileTime = maximumDate; - var newestOutputFileName = "(none)"; - var newestOutputFileTime = minimumDate; - var missingOutputFileName; - var newestDeclarationFileContentChangedTime = minimumDate; - var isOutOfDateWithInputs = false; - for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) { - var output = outputs_1[_b]; - // Output is missing; can stop checking - // Don't immediately return because we can still be upstream-blocked, which is a higher-priority status - if (!host.fileExists(output)) { - missingOutputFileName = output; - break; - } - var outputTime = host.getModifiedTime(output) || ts.missingFileModifiedTime; - if (outputTime < oldestOutputFileTime) { - oldestOutputFileTime = outputTime; - oldestOutputFileName = output; - } - // If an output is older than the newest input, we can stop checking - // Don't immediately return because we can still be upstream-blocked, which is a higher-priority status - if (outputTime < newestInputFileTime) { - isOutOfDateWithInputs = true; - break; - } - if (outputTime > newestOutputFileTime) { - newestOutputFileTime = outputTime; - newestOutputFileName = output; - } - // Keep track of when the most recent time a .d.ts file was changed. - // In addition to file timestamps, we also keep track of when a .d.ts file - // had its file touched but not had its contents changed - this allows us - // to skip a downstream typecheck - if (isDeclarationFile(output)) { - var unchangedTime = unchangedOutputs.getValue(output); - if (unchangedTime !== undefined) { - newestDeclarationFileContentChangedTime = newer(unchangedTime, newestDeclarationFileContentChangedTime); - } - else { - var outputModifiedTime = host.getModifiedTime(output) || ts.missingFileModifiedTime; - newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime); - } - } - } - var pseudoUpToDate = false; - var usesPrepend = false; - var upstreamChangedProject; - if (project.projectReferences) { - projectStatus.setValue(project.options.configFilePath, { type: UpToDateStatusType.ComputingUpstream }); - for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) { - var ref = _d[_c]; - usesPrepend = usesPrepend || !!(ref.prepend); - var resolvedRef = ts.resolveProjectReferencePath(ref); - var refStatus = getUpToDateStatus(parseConfigFile(resolvedRef)); - // Its a circular reference ignore the status of this project - if (refStatus.type === UpToDateStatusType.ComputingUpstream) { - continue; - } - // An upstream project is blocked - if (refStatus.type === UpToDateStatusType.Unbuildable) { - return { - type: UpToDateStatusType.UpstreamBlocked, - upstreamProjectName: ref.path - }; - } - // If the upstream project is out of date, then so are we (someone shouldn't have asked, though?) - if (refStatus.type !== UpToDateStatusType.UpToDate) { - return { - type: UpToDateStatusType.UpstreamOutOfDate, - upstreamProjectName: ref.path - }; - } - // Check oldest output file name only if there is no missing output file name - if (!missingOutputFileName) { - // If the upstream project's newest file is older than our oldest output, we - // can't be out of date because of it - if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) { - continue; - } - // If the upstream project has only change .d.ts files, and we've built - // *after* those files, then we're "psuedo up to date" and eligible for a fast rebuild - if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) { - pseudoUpToDate = true; - upstreamChangedProject = ref.path; - continue; - } - // We have an output older than an upstream output - we are out of date - ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here"); - return { - type: UpToDateStatusType.OutOfDateWithUpstream, - outOfDateOutputFileName: oldestOutputFileName, - newerProjectName: ref.path - }; - } + } + var InvalidatedProjectKind; + (function (InvalidatedProjectKind) { + InvalidatedProjectKind[InvalidatedProjectKind["Build"] = 0] = "Build"; + InvalidatedProjectKind[InvalidatedProjectKind["UpdateBundle"] = 1] = "UpdateBundle"; + InvalidatedProjectKind[InvalidatedProjectKind["UpdateOutputFileStamps"] = 2] = "UpdateOutputFileStamps"; + })(InvalidatedProjectKind = ts.InvalidatedProjectKind || (ts.InvalidatedProjectKind = {})); + function doneInvalidatedProject(state, projectPath) { + state.projectPendingBuild.delete(projectPath); + state.currentInvalidatedProject = undefined; + return state.diagnostics.has(projectPath) ? + ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : + ts.ExitStatus.Success; + } + function createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder) { + var updateOutputFileStampsPending = true; + return { + kind: InvalidatedProjectKind.UpdateOutputFileStamps, + project: project, + projectPath: projectPath, + buildOrder: buildOrder, + getCompilerOptions: function () { return config.options; }, + getCurrentDirectory: function () { return state.currentDirectory; }, + updateOutputFileStatmps: function () { + updateOutputTimestamps(state, config, projectPath); + updateOutputFileStampsPending = false; + }, + done: function () { + if (updateOutputFileStampsPending) { + updateOutputTimestamps(state, config, projectPath); } + return doneInvalidatedProject(state, projectPath); } - if (missingOutputFileName !== undefined) { - return { - type: UpToDateStatusType.OutputMissing, - missingOutputFileName: missingOutputFileName - }; - } - if (isOutOfDateWithInputs) { - return { - type: UpToDateStatusType.OutOfDateWithSelf, - outOfDateOutputFileName: oldestOutputFileName, - newerInputFileName: newestInputFileName - }; - } - else { - // Check tsconfig time - var configStatus = checkConfigFileUpToDateStatus(project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName); - if (configStatus) - return configStatus; - // Check extended config time - var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(configFile, oldestOutputFileTime, oldestOutputFileName); }); - if (extendedConfigStatus) - return extendedConfigStatus; - } - if (!buildInfoChecked.hasKey(project.options.configFilePath)) { - buildInfoChecked.setValue(project.options.configFilePath, true); - var buildInfoPath = ts.getOutputPathForBuildInfo(project.options); - if (buildInfoPath) { - var value = readFileWithCache(buildInfoPath); - var buildInfo = value && ts.getBuildInfo(value); - if (buildInfo && buildInfo.version !== ts.version) { - return { - type: UpToDateStatusType.TsVersionOutputOfDate, - version: buildInfo.version - }; + }; + } + function createBuildOrUpdateInvalidedProject(kind, state, project, projectPath, projectIndex, config, buildOrder) { + var Step; + (function (Step) { + Step[Step["CreateProgram"] = 0] = "CreateProgram"; + Step[Step["SyntaxDiagnostics"] = 1] = "SyntaxDiagnostics"; + Step[Step["SemanticDiagnostics"] = 2] = "SemanticDiagnostics"; + Step[Step["Emit"] = 3] = "Emit"; + Step[Step["EmitBundle"] = 4] = "EmitBundle"; + Step[Step["BuildInvalidatedProjectOfBundle"] = 5] = "BuildInvalidatedProjectOfBundle"; + Step[Step["QueueReferencingProjects"] = 6] = "QueueReferencingProjects"; + Step[Step["Done"] = 7] = "Done"; + })(Step || (Step = {})); + var step = kind === InvalidatedProjectKind.Build ? Step.CreateProgram : Step.EmitBundle; + var program; + var buildResult; + var invalidatedProjectOfBundle; + return kind === InvalidatedProjectKind.Build ? + { + kind: kind, + project: project, + projectPath: projectPath, + buildOrder: buildOrder, + getCompilerOptions: function () { return config.options; }, + getCurrentDirectory: function () { return state.currentDirectory; }, + getBuilderProgram: function () { return withProgramOrUndefined(ts.identity); }, + getProgram: function () { + return withProgramOrUndefined(function (program) { return program.getProgramOrUndefined(); }); + }, + getSourceFile: function (fileName) { + return withProgramOrUndefined(function (program) { return program.getSourceFile(fileName); }); + }, + getSourceFiles: function () { + return withProgramOrEmptyArray(function (program) { return program.getSourceFiles(); }); + }, + getOptionsDiagnostics: function (cancellationToken) { + return withProgramOrEmptyArray(function (program) { return program.getOptionsDiagnostics(cancellationToken); }); + }, + getGlobalDiagnostics: function (cancellationToken) { + return withProgramOrEmptyArray(function (program) { return program.getGlobalDiagnostics(cancellationToken); }); + }, + getConfigFileParsingDiagnostics: function () { + return withProgramOrEmptyArray(function (program) { return program.getConfigFileParsingDiagnostics(); }); + }, + getSyntacticDiagnostics: function (sourceFile, cancellationToken) { + return withProgramOrEmptyArray(function (program) { return program.getSyntacticDiagnostics(sourceFile, cancellationToken); }); + }, + getAllDependencies: function (sourceFile) { + return withProgramOrEmptyArray(function (program) { return program.getAllDependencies(sourceFile); }); + }, + getSemanticDiagnostics: function (sourceFile, cancellationToken) { + return withProgramOrEmptyArray(function (program) { return program.getSemanticDiagnostics(sourceFile, cancellationToken); }); + }, + getSemanticDiagnosticsOfNextAffectedFile: function (cancellationToken, ignoreSourceFile) { + return withProgramOrUndefined(function (program) { + return (program.getSemanticDiagnosticsOfNextAffectedFile) && + program.getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile); + }); + }, + emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) { + if (targetSourceFile || emitOnlyDtsFiles) { + return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); }); } - } - } - if (usesPrepend && pseudoUpToDate) { - return { - type: UpToDateStatusType.OutOfDateWithPrepend, - outOfDateOutputFileName: oldestOutputFileName, - newerProjectName: upstreamChangedProject - }; - } - // Up to date - return { - type: pseudoUpToDate ? UpToDateStatusType.UpToDateWithUpstreamTypes : UpToDateStatusType.UpToDate, - newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime, - newestInputFileTime: newestInputFileTime, - newestOutputFileTime: newestOutputFileTime, - newestInputFileName: newestInputFileName, - newestOutputFileName: newestOutputFileName, - oldestOutputFileName: oldestOutputFileName + executeSteps(Step.SemanticDiagnostics, cancellationToken); + if (step !== Step.Emit) + return undefined; + return emit(writeFile, cancellationToken, customTransformers); + }, + done: done + } : + { + kind: kind, + project: project, + projectPath: projectPath, + buildOrder: buildOrder, + getCompilerOptions: function () { return config.options; }, + getCurrentDirectory: function () { return state.currentDirectory; }, + emit: function (writeFile, customTransformers) { + if (step !== Step.EmitBundle) + return invalidatedProjectOfBundle; + return emitBundle(writeFile, customTransformers); + }, + done: done, }; - } - function checkConfigFileUpToDateStatus(configFile, oldestOutputFileTime, oldestOutputFileName) { - // Check tsconfig time - var tsconfigTime = host.getModifiedTime(configFile) || ts.missingFileModifiedTime; - if (oldestOutputFileTime < tsconfigTime) { - return { - type: UpToDateStatusType.OutOfDateWithSelf, - outOfDateOutputFileName: oldestOutputFileName, - newerInputFileName: configFile - }; - } - } - function invalidateProject(configFileName, reloadLevel) { - invalidateResolvedProject(resolveProjectName(configFileName), reloadLevel); - } - function invalidateResolvedProject(resolved, reloadLevel) { - if (reloadLevel === ts.ConfigFileProgramReloadLevel.Full) { - configFileCache.removeKey(resolved); - globalDependencyGraph = undefined; - } - projectStatus.removeKey(resolved); - diagnostics.removeKey(resolved); - addProjToQueue(resolved, reloadLevel); - enableCache(); - } - /** - * return true if new addition - */ - function addProjToQueue(proj, reloadLevel) { - var value = projectPendingBuild.getValue(proj); - if (value === undefined) { - projectPendingBuild.setValue(proj, reloadLevel || ts.ConfigFileProgramReloadLevel.None); - invalidatedProjectQueue.push(proj); - } - else if (value < (reloadLevel || ts.ConfigFileProgramReloadLevel.None)) { - projectPendingBuild.setValue(proj, reloadLevel || ts.ConfigFileProgramReloadLevel.None); - } - } - function getNextInvalidatedProject() { - if (nextProjectToBuild < invalidatedProjectQueue.length) { - var project = invalidatedProjectQueue[nextProjectToBuild]; - nextProjectToBuild++; - var reloadLevel = projectPendingBuild.getValue(project); - projectPendingBuild.removeKey(project); - if (!projectPendingBuild.getSize()) { - invalidatedProjectQueue.length = 0; - nextProjectToBuild = 0; - } - return { project: project, reloadLevel: reloadLevel }; - } - } - function hasPendingInvalidatedProjects() { - return !!projectPendingBuild.getSize(); - } - function scheduleBuildInvalidatedProject() { - if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) { + function done(cancellationToken, writeFile, customTransformers) { + executeSteps(Step.Done, cancellationToken, writeFile, customTransformers); + return doneInvalidatedProject(state, projectPath); + } + function withProgramOrUndefined(action) { + executeSteps(Step.CreateProgram); + return program && action(program); + } + function withProgramOrEmptyArray(action) { + return withProgramOrUndefined(action) || ts.emptyArray; + } + function createProgram() { + ts.Debug.assert(program === undefined); + if (state.options.dry) { + reportStatus(state, ts.Diagnostics.A_non_dry_build_would_build_project_0, project); + buildResult = BuildResultFlags.Success; + step = Step.QueueReferencingProjects; return; } - if (timerToBuildInvalidatedProject) { - hostWithWatch.clearTimeout(timerToBuildInvalidatedProject); + if (state.options.verbose) + reportStatus(state, ts.Diagnostics.Building_project_0, project); + if (config.fileNames.length === 0) { + reportAndStoreErrors(state, projectPath, config.errors); + // Nothing to build - must be a solution file, basically + buildResult = BuildResultFlags.None; + step = Step.QueueReferencingProjects; + return; } - timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildInvalidatedProject, 250); + var host = state.host, compilerHost = state.compilerHost; + state.projectCompilerOptions = config.options; + // Update module resolution cache if needed + updateModuleResolutionCache(state, project, config); + // Create program + program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), config.errors, config.projectReferences); + step++; } - function buildInvalidatedProject() { - timerToBuildInvalidatedProject = undefined; - if (reportFileChangeDetected) { - reportFileChangeDetected = false; - projectErrorsReported.clear(); - reportWatchStatus(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); + function handleDiagnostics(diagnostics, errorFlags, errorType) { + if (diagnostics.length) { + buildResult = buildErrors(state, projectPath, program, diagnostics, errorFlags, errorType); + step = Step.QueueReferencingProjects; } - var buildProject = getNextInvalidatedProject(); - if (buildProject) { - buildSingleInvalidatedProject(buildProject.project, buildProject.reloadLevel); - if (hasPendingInvalidatedProjects()) { - if (options.watch && !timerToBuildInvalidatedProject) { - scheduleBuildInvalidatedProject(); - } - } - else { - disableCache(); - reportErrorSummary(); - } + else { + step++; } } - function reportErrorSummary() { - if (options.watch || host.reportErrorSummary) { - // Report errors from the other projects - getGlobalDependencyGraph().buildQueue.forEach(function (project) { - if (!projectErrorsReported.hasKey(project)) { - reportErrors(diagnostics.getValue(project) || ts.emptyArray); - } - }); - var totalErrors_1 = 0; - diagnostics.forEach(function (singleProjectErrors) { return totalErrors_1 += ts.getErrorCountForSummary(singleProjectErrors); }); - if (options.watch) { - reportWatchStatus(ts.getWatchErrorSummaryDiagnosticMessage(totalErrors_1), totalErrors_1); - } - else { - host.reportErrorSummary(totalErrors_1); - } - } + function getSyntaxDiagnostics(cancellationToken) { + ts.Debug.assertDefined(program); + handleDiagnostics(__spreadArrays(program.getConfigFileParsingDiagnostics(), program.getOptionsDiagnostics(cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken)), BuildResultFlags.SyntaxErrors, "Syntactic"); } - function buildSingleInvalidatedProject(resolved, reloadLevel) { - var proj = parseConfigFile(resolved); - if (!proj) { - reportParseConfigFileDiagnostic(resolved); - return; - } - if (reloadLevel === ts.ConfigFileProgramReloadLevel.Full) { - watchConfigFile(resolved); - watchWildCardDirectories(resolved, proj); - watchInputFiles(resolved, proj); - } - else if (reloadLevel === ts.ConfigFileProgramReloadLevel.Partial) { - // Update file names - var result = ts.getFileNamesFromConfigSpecs(proj.configFileSpecs, ts.getDirectoryPath(resolved), proj.options, parseConfigFileHost); - ts.updateErrorForNoInputFiles(result, resolved, proj.configFileSpecs, proj.errors, ts.canJsonReportNoInutFiles(proj.raw)); - proj.fileNames = result.fileNames; - watchInputFiles(resolved, proj); - } - var status = getUpToDateStatus(proj); - verboseReportProjectStatus(resolved, status); - if (status.type === UpToDateStatusType.UpstreamBlocked) { - if (options.verbose) - reportStatus(ts.Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors, resolved, status.upstreamProjectName); - return; - } - if (status.type === UpToDateStatusType.UpToDateWithUpstreamTypes) { - // Fake that files have been built by updating output file stamps - updateOutputTimestamps(proj); - return; - } - var buildResult = needsBuild(status, resolved) ? - buildSingleProject(resolved) : // Actual build - updateBundle(resolved); // Fake that files have been built by manipulating prepend and existing output - if (buildResult & BuildResultFlags.AnyErrors) - return; - var _a = getGlobalDependencyGraph(), referencingProjectsMap = _a.referencingProjectsMap, buildQueue = _a.buildQueue; - var referencingProjects = referencingProjectsMap.getValue(resolved); - if (!referencingProjects) - return; - // Always use build order to queue projects - for (var index = buildQueue.indexOf(resolved) + 1; index < buildQueue.length; index++) { - var project = buildQueue[index]; - var prepend = referencingProjects.getValue(project); - if (prepend !== undefined) { - // If the project is referenced with prepend, always build downstream projects, - // If declaration output is changed, build the project - // otherwise mark the project UpToDateWithUpstreamTypes so it updates output time stamps - var status_1 = projectStatus.getValue(project); - if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) { - if (status_1 && (status_1.type === UpToDateStatusType.UpToDate || status_1.type === UpToDateStatusType.UpToDateWithUpstreamTypes || status_1.type === UpToDateStatusType.OutOfDateWithPrepend)) { - projectStatus.setValue(project, { - type: UpToDateStatusType.OutOfDateWithUpstream, - outOfDateOutputFileName: status_1.type === UpToDateStatusType.OutOfDateWithPrepend ? status_1.outOfDateOutputFileName : status_1.oldestOutputFileName, - newerProjectName: resolved - }); - } - } - else if (status_1 && status_1.type === UpToDateStatusType.UpToDate) { - if (prepend) { - projectStatus.setValue(project, { - type: UpToDateStatusType.OutOfDateWithPrepend, - outOfDateOutputFileName: status_1.oldestOutputFileName, - newerProjectName: resolved - }); - } - else { - status_1.type = UpToDateStatusType.UpToDateWithUpstreamTypes; - } - } - addProjToQueue(project); - } - } - } - function createDependencyGraph(roots) { - var temporaryMarks = createFileMap(toPath); - var permanentMarks = createFileMap(toPath); - var circularityReportStack = []; - var buildOrder = []; - var referencingProjectsMap = createFileMap(toPath); - for (var _i = 0, roots_1 = roots; _i < roots_1.length; _i++) { - var root = roots_1[_i]; - visit(root); - } - return { - buildQueue: buildOrder, - referencingProjectsMap: referencingProjectsMap - }; - function visit(projPath, inCircularContext) { - // Already visited - if (permanentMarks.hasKey(projPath)) - return; - // Circular - if (temporaryMarks.hasKey(projPath)) { - if (!inCircularContext) { - // TODO:: Do we report this as error? - reportStatus(ts.Diagnostics.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0, circularityReportStack.join("\r\n")); - } - return; - } - temporaryMarks.setValue(projPath, true); - circularityReportStack.push(projPath); - var parsed = parseConfigFile(projPath); - if (parsed && parsed.projectReferences) { - for (var _i = 0, _a = parsed.projectReferences; _i < _a.length; _i++) { - var ref = _a[_i]; - var resolvedRefPath = resolveProjectName(ref.path); - visit(resolvedRefPath, inCircularContext || ref.circular); - // Get projects referencing resolvedRefPath and add projPath to it - var referencingProjects = getOrCreateValueFromConfigFileMap(referencingProjectsMap, resolvedRefPath, function () { return createFileMap(toPath); }); - referencingProjects.setValue(projPath, !!ref.prepend); - } - } - circularityReportStack.pop(); - permanentMarks.setValue(projPath, true); - buildOrder.push(projPath); - } + function getSemanticDiagnostics(cancellationToken) { + handleDiagnostics(ts.Debug.assertDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic"); } - function buildSingleProject(proj) { - if (options.dry) { - reportStatus(ts.Diagnostics.A_non_dry_build_would_build_project_0, proj); - return BuildResultFlags.Success; - } - if (options.verbose) - reportStatus(ts.Diagnostics.Building_project_0, proj); - var resultFlags = BuildResultFlags.DeclarationOutputUnchanged; - var configFile = parseConfigFile(proj); - if (!configFile) { - // Failed to read the config file - resultFlags |= BuildResultFlags.ConfigFileErrors; - reportParseConfigFileDiagnostic(proj); - projectStatus.setValue(proj, { type: UpToDateStatusType.Unbuildable, reason: "Config file errors" }); - return resultFlags; - } - if (configFile.fileNames.length === 0) { - reportAndStoreErrors(proj, configFile.errors); - // Nothing to build - must be a solution file, basically - return BuildResultFlags.None; - } - // TODO: handle resolve module name to cache result in project reference redirect - projectCompilerOptions = configFile.options; - // Update module resolution cache if needed - if (moduleResolutionCache) { - var projPath = toPath(proj); - if (moduleResolutionCache.directoryToModuleNameMap.redirectsMap.size === 0) { - // The own map will be for projectCompilerOptions - ts.Debug.assert(moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.size === 0); - moduleResolutionCache.directoryToModuleNameMap.redirectsMap.set(projPath, moduleResolutionCache.directoryToModuleNameMap.ownMap); - moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.set(projPath, moduleResolutionCache.moduleNameToDirectoryMap.ownMap); - } - else { - // Set correct own map - ts.Debug.assert(moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.size > 0); - var ref = { - sourceFile: projectCompilerOptions.configFile, - commandLine: configFile - }; - moduleResolutionCache.directoryToModuleNameMap.setOwnMap(moduleResolutionCache.directoryToModuleNameMap.getOrCreateMapOfCacheRedirects(ref)); - moduleResolutionCache.moduleNameToDirectoryMap.setOwnMap(moduleResolutionCache.moduleNameToDirectoryMap.getOrCreateMapOfCacheRedirects(ref)); - } - moduleResolutionCache.directoryToModuleNameMap.setOwnOptions(projectCompilerOptions); - moduleResolutionCache.moduleNameToDirectoryMap.setOwnOptions(projectCompilerOptions); - } - var program = host.createProgram(configFile.fileNames, configFile.options, compilerHost, getOldProgram(proj, configFile), configFile.errors, configFile.projectReferences); - // Don't emit anything in the presence of syntactic errors or options diagnostics - var syntaxDiagnostics = program.getConfigFileParsingDiagnostics().concat(program.getOptionsDiagnostics(), program.getGlobalDiagnostics(), program.getSyntacticDiagnostics()); - if (syntaxDiagnostics.length) { - return buildErrors(syntaxDiagnostics, BuildResultFlags.SyntaxErrors, "Syntactic"); - } - // Same as above but now for semantic diagnostics - var semanticDiagnostics = program.getSemanticDiagnostics(); - if (semanticDiagnostics.length) { - return buildErrors(semanticDiagnostics, BuildResultFlags.TypeErrors, "Semantic"); - } + function emit(writeFileCallback, cancellationToken, customTransformers) { + ts.Debug.assertDefined(program); + ts.Debug.assert(step === Step.Emit); // Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly program.backupState(); - var newestDeclarationFileContentChangedTime = minimumDate; - var anyDtsChanged = false; var declDiagnostics; var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); }; var outputFiles = []; - ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, /*writeFileName*/ undefined, /*reportSummary*/ undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }); + var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, + /*writeFileName*/ undefined, + /*reportSummary*/ undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, + /*emitOnlyDts*/ false, customTransformers).emitResult; // Don't emit .d.ts if there are decl file errors if (declDiagnostics) { program.restoreState(); - return buildErrors(declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"); + buildResult = buildErrors(state, projectPath, program, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"); + step = Step.QueueReferencingProjects; + return { + emitSkipped: true, + diagnostics: emitResult.diagnostics + }; } // Actual Emit + var host = state.host, compilerHost = state.compilerHost; + var resultFlags = BuildResultFlags.DeclarationOutputUnchanged; + var newestDeclarationFileContentChangedTime = minimumDate; + var anyDtsChanged = false; var emitterDiagnostics = ts.createDiagnosticCollection(); - var emittedOutputs = createFileMap(toPath); + var emittedOutputs = ts.createMap(); outputFiles.forEach(function (_a) { var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark; var priorChangeTime; if (!anyDtsChanged && isDeclarationFile(name)) { // Check for unchanged .d.ts files - if (host.fileExists(name) && readFileWithCache(name) === text) { + if (host.fileExists(name) && state.readFileWithCache(name) === text) { priorChangeTime = host.getModifiedTime(name); } else { @@ -95370,377 +97515,874 @@ var ts; anyDtsChanged = true; } } - emittedOutputs.setValue(name, name); - ts.writeFile(compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); + emittedOutputs.set(toPath(state, name), name); + ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); if (priorChangeTime !== undefined) { newestDeclarationFileContentChangedTime = newer(priorChangeTime, newestDeclarationFileContentChangedTime); - unchangedOutputs.setValue(name, priorChangeTime); } }); + finishEmit(emitterDiagnostics, emittedOutputs, newestDeclarationFileContentChangedTime, + /*newestDeclarationFileContentChangedTimeIsMaximumDate*/ anyDtsChanged, outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), resultFlags); + return emitResult; + } + function finishEmit(emitterDiagnostics, emittedOutputs, priorNewestUpdateTime, newestDeclarationFileContentChangedTimeIsMaximumDate, oldestOutputFileName, resultFlags) { var emitDiagnostics = emitterDiagnostics.getDiagnostics(); if (emitDiagnostics.length) { - return buildErrors(emitDiagnostics, BuildResultFlags.EmitErrors, "Emit"); + buildResult = buildErrors(state, projectPath, program, emitDiagnostics, BuildResultFlags.EmitErrors, "Emit"); + step = Step.QueueReferencingProjects; + return emitDiagnostics; } - if (writeFileName) { - emittedOutputs.forEach(function (name) { return listEmittedFile(configFile, name); }); - ts.listFiles(program, writeFileName); + if (state.writeFileName) { + emittedOutputs.forEach(function (name) { return listEmittedFile(state, config, name); }); + if (program) + ts.listFiles(program, state.writeFileName); } // Update time stamps for rest of the outputs - newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(configFile, newestDeclarationFileContentChangedTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs); - var status = { - type: UpToDateStatusType.UpToDate, - newestDeclarationFileContentChangedTime: anyDtsChanged ? maximumDate : newestDeclarationFileContentChangedTime, - oldestOutputFileName: outputFiles.length ? outputFiles[0].name : ts.getFirstProjectOutput(configFile, !host.useCaseSensitiveFileNames()) - }; - diagnostics.removeKey(proj); - projectStatus.setValue(proj, status); - afterProgramCreate(proj, program); - projectCompilerOptions = baseCompilerOptions; - return resultFlags; - function buildErrors(diagnostics, errorFlags, errorType) { - resultFlags |= errorFlags; - reportAndStoreErrors(proj, diagnostics); - // List files if any other build error using program (emit errors already report files) - if (writeFileName) - ts.listFiles(program, writeFileName); - projectStatus.setValue(proj, { type: UpToDateStatusType.Unbuildable, reason: errorType + " errors" }); - afterProgramCreate(proj, program); - projectCompilerOptions = baseCompilerOptions; - return resultFlags; - } - } - function listEmittedFile(proj, file) { - if (writeFileName && proj.options.listEmittedFiles) { - writeFileName("TSFILE: " + file); - } - } - function afterProgramCreate(proj, program) { - if (host.afterProgramEmitAndDiagnostics) { - host.afterProgramEmitAndDiagnostics(program); - } - if (options.watch) { - program.releaseProgram(); - builderPrograms.setValue(proj, program); - } - } - function getOldProgram(proj, parsed) { - if (options.force) + var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(state, config, priorNewestUpdateTime, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs); + state.diagnostics.delete(projectPath); + state.projectStatus.set(projectPath, { + type: ts.UpToDateStatusType.UpToDate, + newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTimeIsMaximumDate ? + maximumDate : + newestDeclarationFileContentChangedTime, + oldestOutputFileName: oldestOutputFileName + }); + if (program) + afterProgramCreate(state, projectPath, program); + state.projectCompilerOptions = state.baseCompilerOptions; + step = Step.QueueReferencingProjects; + buildResult = resultFlags; + return emitDiagnostics; + } + function emitBundle(writeFileCallback, customTransformers) { + ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle); + if (state.options.dry) { + reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project); + buildResult = BuildResultFlags.Success; + step = Step.QueueReferencingProjects; return undefined; - var value = builderPrograms.getValue(proj); - if (value) - return value; - return ts.readBuilderProgram(parsed.options, readFileWithCache); - } - function updateBundle(proj) { - if (options.dry) { - reportStatus(ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, proj); - return BuildResultFlags.Success; } - if (options.verbose) - reportStatus(ts.Diagnostics.Updating_output_of_project_0, proj); + if (state.options.verbose) + reportStatus(state, ts.Diagnostics.Updating_output_of_project_0, project); // Update js, and source map - var config = ts.Debug.assertDefined(parseConfigFile(proj)); - projectCompilerOptions = config.options; - var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) { return parseConfigFile(resolveProjectName(ref.path)); }); + var compilerHost = state.compilerHost; + state.projectCompilerOptions = config.options; + var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) { + var refName = resolveProjectName(state, ref.path); + return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName)); + }, customTransformers); if (ts.isString(outputFiles)) { - reportStatus(ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, proj, relName(outputFiles)); - return buildSingleProject(proj); + reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles)); + step = Step.BuildInvalidatedProjectOfBundle; + return invalidatedProjectOfBundle = createBuildOrUpdateInvalidedProject(InvalidatedProjectKind.Build, state, project, projectPath, projectIndex, config, buildOrder); } // Actual Emit ts.Debug.assert(!!outputFiles.length); var emitterDiagnostics = ts.createDiagnosticCollection(); - var emittedOutputs = createFileMap(toPath); + var emittedOutputs = ts.createMap(); outputFiles.forEach(function (_a) { var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark; - emittedOutputs.setValue(name, name); - ts.writeFile(compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); + emittedOutputs.set(toPath(state, name), name); + ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); }); - var emitDiagnostics = emitterDiagnostics.getDiagnostics(); - if (emitDiagnostics.length) { - reportAndStoreErrors(proj, emitDiagnostics); - projectStatus.setValue(proj, { type: UpToDateStatusType.Unbuildable, reason: "Emit errors" }); - projectCompilerOptions = baseCompilerOptions; - return BuildResultFlags.DeclarationOutputUnchanged | BuildResultFlags.EmitErrors; - } - if (writeFileName) { - emittedOutputs.forEach(function (name) { return listEmittedFile(config, name); }); - } - // Update timestamps for dts - var newestDeclarationFileContentChangedTime = updateOutputTimestampsWorker(config, minimumDate, ts.Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs); - var status = { - type: UpToDateStatusType.UpToDate, - newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime, - oldestOutputFileName: outputFiles[0].name - }; - diagnostics.removeKey(proj); - projectStatus.setValue(proj, status); - projectCompilerOptions = baseCompilerOptions; - return BuildResultFlags.DeclarationOutputUnchanged; - } - function updateOutputTimestamps(proj) { - if (options.dry) { - return reportStatus(ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath); - } - var priorNewestUpdateTime = updateOutputTimestampsWorker(proj, minimumDate, ts.Diagnostics.Updating_output_timestamps_of_project_0); - var status = { - type: UpToDateStatusType.UpToDate, - newestDeclarationFileContentChangedTime: priorNewestUpdateTime, - oldestOutputFileName: ts.getFirstProjectOutput(proj, !host.useCaseSensitiveFileNames()) - }; - projectStatus.setValue(proj.options.configFilePath, status); - } - function updateOutputTimestampsWorker(proj, priorNewestUpdateTime, verboseMessage, skipOutputs) { - var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames()); - if (!skipOutputs || outputs.length !== skipOutputs.getSize()) { - if (options.verbose) { - reportStatus(verboseMessage, proj.options.configFilePath); - } - var now = host.now ? host.now() : new Date(); - for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) { - var file = outputs_2[_i]; - if (skipOutputs && skipOutputs.hasKey(file)) { - continue; - } - if (isDeclarationFile(file)) { - priorNewestUpdateTime = newer(priorNewestUpdateTime, host.getModifiedTime(file) || ts.missingFileModifiedTime); - } - host.setModifiedTime(file, now); - listEmittedFile(proj, file); + var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, minimumDate, + /*newestDeclarationFileContentChangedTimeIsMaximumDate*/ false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged); + return { emitSkipped: false, diagnostics: emitDiagnostics }; + } + function executeSteps(till, cancellationToken, writeFile, customTransformers) { + while (step <= till && step < Step.Done) { + var currentStep = step; + switch (step) { + case Step.CreateProgram: + createProgram(); + break; + case Step.SyntaxDiagnostics: + getSyntaxDiagnostics(cancellationToken); + break; + case Step.SemanticDiagnostics: + getSemanticDiagnostics(cancellationToken); + break; + case Step.Emit: + emit(writeFile, cancellationToken, customTransformers); + break; + case Step.EmitBundle: + emitBundle(writeFile, customTransformers); + break; + case Step.BuildInvalidatedProjectOfBundle: + ts.Debug.assertDefined(invalidatedProjectOfBundle).done(cancellationToken); + step = Step.Done; + break; + case Step.QueueReferencingProjects: + queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, ts.Debug.assertDefined(buildResult)); + step++; + break; + // Should never be done + case Step.Done: + default: + ts.assertType(step); } + ts.Debug.assert(step > currentStep); } - return priorNewestUpdateTime; } - function getFilesToClean() { - // Get the same graph for cleaning we'd use for building - var graph = getGlobalDependencyGraph(); - var filesToDelete = []; - for (var _i = 0, _a = graph.buildQueue; _i < _a.length; _i++) { - var proj = _a[_i]; - var parsed = parseConfigFile(proj); - if (parsed === undefined) { - // File has gone missing; fine to ignore here - reportParseConfigFileDiagnostic(proj); + } + function needsBuild(_a, status, config) { + var options = _a.options; + if (status.type !== ts.UpToDateStatusType.OutOfDateWithPrepend || options.force) + return true; + return config.fileNames.length === 0 || + !!config.errors.length || + !ts.isIncrementalCompilation(config.options); + } + function getNextInvalidatedProject(state, buildOrder, reportQueue) { + if (!state.projectPendingBuild.size) + return undefined; + if (state.currentInvalidatedProject) { + // Only if same buildOrder the currentInvalidated project can be sent again + return ts.arrayIsEqualTo(state.currentInvalidatedProject.buildOrder, buildOrder) ? + state.currentInvalidatedProject : + undefined; + } + var options = state.options, projectPendingBuild = state.projectPendingBuild; + for (var projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) { + var project = buildOrder[projectIndex]; + var projectPath = toResolvedConfigFilePath(state, project); + var reloadLevel = state.projectPendingBuild.get(projectPath); + if (reloadLevel === undefined) + continue; + if (reportQueue) { + reportQueue = false; + reportBuildQueue(state, buildOrder); + } + var config = parseConfigFile(state, project, projectPath); + if (!config) { + reportParseConfigFileDiagnostic(state, projectPath); + projectPendingBuild.delete(projectPath); + continue; + } + if (reloadLevel === ts.ConfigFileProgramReloadLevel.Full) { + watchConfigFile(state, project, projectPath); + watchWildCardDirectories(state, project, projectPath, config); + watchInputFiles(state, project, projectPath, config); + } + else if (reloadLevel === ts.ConfigFileProgramReloadLevel.Partial) { + // Update file names + var result = ts.getFileNamesFromConfigSpecs(config.configFileSpecs, ts.getDirectoryPath(project), config.options, state.parseConfigFileHost); + ts.updateErrorForNoInputFiles(result, project, config.configFileSpecs, config.errors, ts.canJsonReportNoInutFiles(config.raw)); + config.fileNames = result.fileNames; + watchInputFiles(state, project, projectPath, config); + } + var status = getUpToDateStatus(state, config, projectPath); + verboseReportProjectStatus(state, project, status); + if (!options.force) { + if (status.type === ts.UpToDateStatusType.UpToDate) { + reportAndStoreErrors(state, projectPath, config.errors); + projectPendingBuild.delete(projectPath); + // Up to date, skip + if (options.dry) { + // In a dry build, inform the user of this fact + reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date, project); + } continue; } - var outputs = ts.getAllProjectOutputs(parsed, !host.useCaseSensitiveFileNames()); - for (var _b = 0, outputs_3 = outputs; _b < outputs_3.length; _b++) { - var output = outputs_3[_b]; - if (host.fileExists(output)) { - filesToDelete.push(output); - } + if (status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes) { + reportAndStoreErrors(state, projectPath, config.errors); + return createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder); } } - return filesToDelete; - } - function cleanAllProjects() { - var filesToDelete = getFilesToClean(); - if (options.dry) { - reportStatus(ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * " + f; }).join("")); - return ts.ExitStatus.Success; + if (status.type === ts.UpToDateStatusType.UpstreamBlocked) { + reportAndStoreErrors(state, projectPath, config.errors); + projectPendingBuild.delete(projectPath); + if (options.verbose) + reportStatus(state, ts.Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors, project, status.upstreamProjectName); + continue; } - for (var _i = 0, filesToDelete_1 = filesToDelete; _i < filesToDelete_1.length; _i++) { - var output = filesToDelete_1[_i]; - host.deleteFile(output); + if (status.type === ts.UpToDateStatusType.ContainerOnly) { + reportAndStoreErrors(state, projectPath, config.errors); + projectPendingBuild.delete(projectPath); + // Do nothing + continue; } - return ts.ExitStatus.Success; + return createBuildOrUpdateInvalidedProject(needsBuild(state, status, config) ? + InvalidatedProjectKind.Build : + InvalidatedProjectKind.UpdateBundle, state, project, projectPath, projectIndex, config, buildOrder); } - function resolveProjectName(name) { - return resolveConfigFileProjectName(ts.resolvePath(host.getCurrentDirectory(), name)); + return undefined; + } + function listEmittedFile(_a, proj, file) { + var writeFileName = _a.writeFileName; + if (writeFileName && proj.options.listEmittedFiles) { + writeFileName("TSFILE: " + file); } - function resolveProjectNames(configFileNames) { - return configFileNames.map(resolveProjectName); + } + function getOldProgram(_a, proj, parsed) { + var options = _a.options, builderPrograms = _a.builderPrograms, compilerHost = _a.compilerHost; + if (options.force) + return undefined; + var value = builderPrograms.get(proj); + if (value) + return value; + return ts.readBuilderProgram(parsed.options, compilerHost); + } + function afterProgramCreate(_a, proj, program) { + var host = _a.host, watch = _a.watch, builderPrograms = _a.builderPrograms; + if (host.afterProgramEmitAndDiagnostics) { + host.afterProgramEmitAndDiagnostics(program); + } + if (watch) { + program.releaseProgram(); + builderPrograms.set(proj, program); + } + } + function buildErrors(state, resolvedPath, program, diagnostics, errorFlags, errorType) { + reportAndStoreErrors(state, resolvedPath, diagnostics); + // List files if any other build error using program (emit errors already report files) + if (program && state.writeFileName) + ts.listFiles(program, state.writeFileName); + state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" }); + if (program) + afterProgramCreate(state, resolvedPath, program); + state.projectCompilerOptions = state.baseCompilerOptions; + return errorFlags; + } + function updateModuleResolutionCache(state, proj, config) { + if (!state.moduleResolutionCache) + return; + // Update module resolution cache if needed + var moduleResolutionCache = state.moduleResolutionCache; + var projPath = toPath(state, proj); + if (moduleResolutionCache.directoryToModuleNameMap.redirectsMap.size === 0) { + // The own map will be for projectCompilerOptions + ts.Debug.assert(moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.size === 0); + moduleResolutionCache.directoryToModuleNameMap.redirectsMap.set(projPath, moduleResolutionCache.directoryToModuleNameMap.ownMap); + moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.set(projPath, moduleResolutionCache.moduleNameToDirectoryMap.ownMap); } - function enableCache() { - if (cacheState) { - disableCache(); - } - var originalReadFileWithCache = readFileWithCache; - var originalGetSourceFile = compilerHost.getSourceFile; - var _a = ts.changeCompilerHostLikeToUseCache(host, toPath, function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return originalGetSourceFile.call.apply(originalGetSourceFile, [compilerHost].concat(args)); - }), originalReadFile = _a.originalReadFile, originalFileExists = _a.originalFileExists, originalDirectoryExists = _a.originalDirectoryExists, originalCreateDirectory = _a.originalCreateDirectory, originalWriteFile = _a.originalWriteFile, getSourceFileWithCache = _a.getSourceFileWithCache, newReadFileWithCache = _a.readFileWithCache; - readFileWithCache = newReadFileWithCache; - compilerHost.getSourceFile = getSourceFileWithCache; - var originalResolveModuleNames = compilerHost.resolveModuleNames; - if (!compilerHost.resolveModuleNames) { - var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; }; - compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) { - return ts.loadWithLocalCache(ts.Debug.assertEachDefined(moduleNames), containingFile, redirectedReference, loader_3); + else { + // Set correct own map + ts.Debug.assert(moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.size > 0); + var ref = { + sourceFile: config.options.configFile, + commandLine: config + }; + moduleResolutionCache.directoryToModuleNameMap.setOwnMap(moduleResolutionCache.directoryToModuleNameMap.getOrCreateMapOfCacheRedirects(ref)); + moduleResolutionCache.moduleNameToDirectoryMap.setOwnMap(moduleResolutionCache.moduleNameToDirectoryMap.getOrCreateMapOfCacheRedirects(ref)); + } + moduleResolutionCache.directoryToModuleNameMap.setOwnOptions(config.options); + moduleResolutionCache.moduleNameToDirectoryMap.setOwnOptions(config.options); + } + function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) { + // Check tsconfig time + var tsconfigTime = state.host.getModifiedTime(configFile) || ts.missingFileModifiedTime; + if (oldestOutputFileTime < tsconfigTime) { + return { + type: ts.UpToDateStatusType.OutOfDateWithSelf, + outOfDateOutputFileName: oldestOutputFileName, + newerInputFileName: configFile + }; + } + } + function getUpToDateStatusWorker(state, project, resolvedPath) { + var newestInputFileName = undefined; + var newestInputFileTime = minimumDate; + var host = state.host; + // Get timestamps of input files + for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) { + var inputFile = _a[_i]; + if (!host.fileExists(inputFile)) { + return { + type: ts.UpToDateStatusType.Unbuildable, + reason: inputFile + " does not exist" }; } - cacheState = { - originalReadFile: originalReadFile, - originalFileExists: originalFileExists, - originalDirectoryExists: originalDirectoryExists, - originalCreateDirectory: originalCreateDirectory, - originalWriteFile: originalWriteFile, - originalReadFileWithCache: originalReadFileWithCache, - originalGetSourceFile: originalGetSourceFile, - originalResolveModuleNames: originalResolveModuleNames + var inputTime = host.getModifiedTime(inputFile) || ts.missingFileModifiedTime; + if (inputTime > newestInputFileTime) { + newestInputFileName = inputFile; + newestInputFileTime = inputTime; + } + } + // Container if no files are specified in the project + if (!project.fileNames.length && !ts.canJsonReportNoInutFiles(project.raw)) { + return { + type: ts.UpToDateStatusType.ContainerOnly }; } - function disableCache() { - if (!cacheState) - return; - host.readFile = cacheState.originalReadFile; - host.fileExists = cacheState.originalFileExists; - host.directoryExists = cacheState.originalDirectoryExists; - host.createDirectory = cacheState.originalCreateDirectory; - host.writeFile = cacheState.originalWriteFile; - compilerHost.getSourceFile = cacheState.originalGetSourceFile; - readFileWithCache = cacheState.originalReadFileWithCache; - compilerHost.resolveModuleNames = cacheState.originalResolveModuleNames; - extendedConfigCache.clear(); - if (moduleResolutionCache) { - moduleResolutionCache.directoryToModuleNameMap.clear(); - moduleResolutionCache.moduleNameToDirectoryMap.clear(); - } - cacheState = undefined; - } - function buildAllProjects() { - if (options.watch) { - reportWatchStatus(ts.Diagnostics.Starting_compilation_in_watch_mode); - } - enableCache(); - var graph = getGlobalDependencyGraph(); - reportBuildQueue(graph); - var anyFailed = false; - for (var _i = 0, _a = graph.buildQueue; _i < _a.length; _i++) { - var next = _a[_i]; - var proj = parseConfigFile(next); - if (proj === undefined) { - reportParseConfigFileDiagnostic(next); - anyFailed = true; - break; + // Collect the expected outputs of this project + var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames()); + // Now see if all outputs are newer than the newest input + var oldestOutputFileName = "(none)"; + var oldestOutputFileTime = maximumDate; + var newestOutputFileName = "(none)"; + var newestOutputFileTime = minimumDate; + var missingOutputFileName; + var newestDeclarationFileContentChangedTime = minimumDate; + var isOutOfDateWithInputs = false; + for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) { + var output = outputs_1[_b]; + // Output is missing; can stop checking + // Don't immediately return because we can still be upstream-blocked, which is a higher-priority status + if (!host.fileExists(output)) { + missingOutputFileName = output; + break; + } + var outputTime = host.getModifiedTime(output) || ts.missingFileModifiedTime; + if (outputTime < oldestOutputFileTime) { + oldestOutputFileTime = outputTime; + oldestOutputFileName = output; + } + // If an output is older than the newest input, we can stop checking + // Don't immediately return because we can still be upstream-blocked, which is a higher-priority status + if (outputTime < newestInputFileTime) { + isOutOfDateWithInputs = true; + break; + } + if (outputTime > newestOutputFileTime) { + newestOutputFileTime = outputTime; + newestOutputFileName = output; + } + // Keep track of when the most recent time a .d.ts file was changed. + // In addition to file timestamps, we also keep track of when a .d.ts file + // had its file touched but not had its contents changed - this allows us + // to skip a downstream typecheck + if (isDeclarationFile(output)) { + var outputModifiedTime = host.getModifiedTime(output) || ts.missingFileModifiedTime; + newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime); + } + } + var pseudoUpToDate = false; + var usesPrepend = false; + var upstreamChangedProject; + if (project.projectReferences) { + state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream }); + for (var _c = 0, _d = project.projectReferences; _c < _d.length; _c++) { + var ref = _d[_c]; + usesPrepend = usesPrepend || !!(ref.prepend); + var resolvedRef = ts.resolveProjectReferencePath(ref); + var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef); + var refStatus = getUpToDateStatus(state, parseConfigFile(state, resolvedRef, resolvedRefPath), resolvedRefPath); + // Its a circular reference ignore the status of this project + if (refStatus.type === ts.UpToDateStatusType.ComputingUpstream || + refStatus.type === ts.UpToDateStatusType.ContainerOnly) { // Container only ignore this project + continue; } - // report errors early when using continue or break statements - var errors = proj.errors; - var status = getUpToDateStatus(proj); - verboseReportProjectStatus(next, status); - var projName = proj.options.configFilePath; - if (status.type === UpToDateStatusType.UpToDate && !options.force) { - reportAndStoreErrors(next, errors); - // Up to date, skip - if (defaultOptions.dry) { - // In a dry build, inform the user of this fact - reportStatus(ts.Diagnostics.Project_0_is_up_to_date, projName); + // An upstream project is blocked + if (refStatus.type === ts.UpToDateStatusType.Unbuildable) { + return { + type: ts.UpToDateStatusType.UpstreamBlocked, + upstreamProjectName: ref.path + }; + } + // If the upstream project is out of date, then so are we (someone shouldn't have asked, though?) + if (refStatus.type !== ts.UpToDateStatusType.UpToDate) { + return { + type: ts.UpToDateStatusType.UpstreamOutOfDate, + upstreamProjectName: ref.path + }; + } + // Check oldest output file name only if there is no missing output file name + if (!missingOutputFileName) { + // If the upstream project's newest file is older than our oldest output, we + // can't be out of date because of it + if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) { + continue; } - continue; + // If the upstream project has only change .d.ts files, and we've built + // *after* those files, then we're "psuedo up to date" and eligible for a fast rebuild + if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) { + pseudoUpToDate = true; + upstreamChangedProject = ref.path; + continue; + } + // We have an output older than an upstream output - we are out of date + ts.Debug.assert(oldestOutputFileName !== undefined, "Should have an oldest output filename here"); + return { + type: ts.UpToDateStatusType.OutOfDateWithUpstream, + outOfDateOutputFileName: oldestOutputFileName, + newerProjectName: ref.path + }; } - if (status.type === UpToDateStatusType.UpToDateWithUpstreamTypes && !options.force) { - reportAndStoreErrors(next, errors); - // Fake build - updateOutputTimestamps(proj); - continue; + } + } + if (missingOutputFileName !== undefined) { + return { + type: ts.UpToDateStatusType.OutputMissing, + missingOutputFileName: missingOutputFileName + }; + } + if (isOutOfDateWithInputs) { + return { + type: ts.UpToDateStatusType.OutOfDateWithSelf, + outOfDateOutputFileName: oldestOutputFileName, + newerInputFileName: newestInputFileName + }; + } + else { + // Check tsconfig time + var configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName); + if (configStatus) + return configStatus; + // Check extended config time + var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); }); + if (extendedConfigStatus) + return extendedConfigStatus; + } + if (!state.buildInfoChecked.has(resolvedPath)) { + state.buildInfoChecked.set(resolvedPath, true); + var buildInfoPath = ts.getOutputPathForBuildInfo(project.options); + if (buildInfoPath) { + var value = state.readFileWithCache(buildInfoPath); + var buildInfo = value && ts.getBuildInfo(value); + if (buildInfo && (buildInfo.bundle || buildInfo.program) && buildInfo.version !== ts.version) { + return { + type: ts.UpToDateStatusType.TsVersionOutputOfDate, + version: buildInfo.version + }; } - if (status.type === UpToDateStatusType.UpstreamBlocked) { - reportAndStoreErrors(next, errors); - if (options.verbose) - reportStatus(ts.Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors, projName, status.upstreamProjectName); + } + } + if (usesPrepend && pseudoUpToDate) { + return { + type: ts.UpToDateStatusType.OutOfDateWithPrepend, + outOfDateOutputFileName: oldestOutputFileName, + newerProjectName: upstreamChangedProject + }; + } + // Up to date + return { + type: pseudoUpToDate ? ts.UpToDateStatusType.UpToDateWithUpstreamTypes : ts.UpToDateStatusType.UpToDate, + newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime, + newestInputFileTime: newestInputFileTime, + newestOutputFileTime: newestOutputFileTime, + newestInputFileName: newestInputFileName, + newestOutputFileName: newestOutputFileName, + oldestOutputFileName: oldestOutputFileName + }; + } + function getUpToDateStatus(state, project, resolvedPath) { + if (project === undefined) { + return { type: ts.UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" }; + } + var prior = state.projectStatus.get(resolvedPath); + if (prior !== undefined) { + return prior; + } + var actual = getUpToDateStatusWorker(state, project, resolvedPath); + state.projectStatus.set(resolvedPath, actual); + return actual; + } + function updateOutputTimestampsWorker(state, proj, priorNewestUpdateTime, verboseMessage, skipOutputs) { + var host = state.host; + var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames()); + if (!skipOutputs || outputs.length !== skipOutputs.size) { + var reportVerbose = !!state.options.verbose; + var now = host.now ? host.now() : new Date(); + for (var _i = 0, outputs_2 = outputs; _i < outputs_2.length; _i++) { + var file = outputs_2[_i]; + if (skipOutputs && skipOutputs.has(toPath(state, file))) { continue; } - if (status.type === UpToDateStatusType.ContainerOnly) { - reportAndStoreErrors(next, errors); - // Do nothing + if (reportVerbose) { + reportVerbose = false; + reportStatus(state, verboseMessage, proj.options.configFilePath); + } + if (isDeclarationFile(file)) { + priorNewestUpdateTime = newer(priorNewestUpdateTime, host.getModifiedTime(file) || ts.missingFileModifiedTime); + } + host.setModifiedTime(file, now); + listEmittedFile(state, proj, file); + } + } + return priorNewestUpdateTime; + } + function updateOutputTimestamps(state, proj, resolvedPath) { + if (state.options.dry) { + return reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath); + } + var priorNewestUpdateTime = updateOutputTimestampsWorker(state, proj, minimumDate, ts.Diagnostics.Updating_output_timestamps_of_project_0); + state.projectStatus.set(resolvedPath, { + type: ts.UpToDateStatusType.UpToDate, + newestDeclarationFileContentChangedTime: priorNewestUpdateTime, + oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames()) + }); + } + function queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, buildResult) { + // Queue only if there are no errors + if (buildResult & BuildResultFlags.AnyErrors) + return; + // Only composite projects can be referenced by other projects + if (!config.options.composite) + return; + // Always use build order to queue projects + for (var index = projectIndex + 1; index < buildOrder.length; index++) { + var nextProject = buildOrder[index]; + var nextProjectPath = toResolvedConfigFilePath(state, nextProject); + if (state.projectPendingBuild.has(nextProjectPath)) + continue; + var nextProjectConfig = parseConfigFile(state, nextProject, nextProjectPath); + if (!nextProjectConfig || !nextProjectConfig.projectReferences) + continue; + for (var _i = 0, _a = nextProjectConfig.projectReferences; _i < _a.length; _i++) { + var ref = _a[_i]; + var resolvedRefPath = resolveProjectName(state, ref.path); + if (toResolvedConfigFilePath(state, resolvedRefPath) !== projectPath) continue; + // If the project is referenced with prepend, always build downstream projects, + // If declaration output is changed, build the project + // otherwise mark the project UpToDateWithUpstreamTypes so it updates output time stamps + var status = state.projectStatus.get(nextProjectPath); + if (status) { + switch (status.type) { + case ts.UpToDateStatusType.UpToDate: + if (buildResult & BuildResultFlags.DeclarationOutputUnchanged) { + if (ref.prepend) { + state.projectStatus.set(nextProjectPath, { + type: ts.UpToDateStatusType.OutOfDateWithPrepend, + outOfDateOutputFileName: status.oldestOutputFileName, + newerProjectName: project + }); + } + else { + status.type = ts.UpToDateStatusType.UpToDateWithUpstreamTypes; + } + break; + } + // falls through + case ts.UpToDateStatusType.UpToDateWithUpstreamTypes: + case ts.UpToDateStatusType.OutOfDateWithPrepend: + if (!(buildResult & BuildResultFlags.DeclarationOutputUnchanged)) { + state.projectStatus.set(nextProjectPath, { + type: ts.UpToDateStatusType.OutOfDateWithUpstream, + outOfDateOutputFileName: status.type === ts.UpToDateStatusType.OutOfDateWithPrepend ? status.outOfDateOutputFileName : status.oldestOutputFileName, + newerProjectName: project + }); + } + break; + case ts.UpToDateStatusType.UpstreamBlocked: + if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) { + clearProjectStatus(state, nextProjectPath); + } + break; + } } - var buildResult = needsBuild(status, next) ? - buildSingleProject(next) : // Actual build - updateBundle(next); // Fake that files have been built by manipulating prepend and existing output - anyFailed = anyFailed || !!(buildResult & BuildResultFlags.AnyErrors); + addProjToQueue(state, nextProjectPath, ts.ConfigFileProgramReloadLevel.None); + break; } - reportErrorSummary(); - disableCache(); - return anyFailed ? ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : ts.ExitStatus.Success; } - function needsBuild(status, configFile) { - if (status.type !== UpToDateStatusType.OutOfDateWithPrepend || options.force) - return true; - var config = parseConfigFile(configFile); - return !config || - config.fileNames.length === 0 || - !!config.errors.length || - !ts.isIncrementalCompilation(config.options); + } + function build(state, project, cancellationToken, onlyReferences) { + var buildOrder = getBuildOrderFor(state, project, onlyReferences); + if (!buildOrder) + return ts.ExitStatus.InvalidProject_OutputsSkipped; + setupInitialBuild(state, cancellationToken); + var reportQueue = true; + var successfulProjects = 0; + var errorProjects = 0; + while (true) { + var invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue); + if (!invalidatedProject) + break; + reportQueue = false; + invalidatedProject.done(cancellationToken); + if (state.diagnostics.has(invalidatedProject.projectPath)) { + errorProjects++; + } + else { + successfulProjects++; + } + } + disableCache(state); + reportErrorSummary(state, buildOrder); + startWatching(state, buildOrder); + return errorProjects ? + successfulProjects ? + ts.ExitStatus.DiagnosticsPresent_OutputsGenerated : + ts.ExitStatus.DiagnosticsPresent_OutputsSkipped : + ts.ExitStatus.Success; + } + function clean(state, project, onlyReferences) { + var buildOrder = getBuildOrderFor(state, project, onlyReferences); + if (!buildOrder) + return ts.ExitStatus.InvalidProject_OutputsSkipped; + var options = state.options, host = state.host; + var filesToDelete = options.dry ? [] : undefined; + for (var _i = 0, buildOrder_1 = buildOrder; _i < buildOrder_1.length; _i++) { + var proj = buildOrder_1[_i]; + var resolvedPath = toResolvedConfigFilePath(state, proj); + var parsed = parseConfigFile(state, proj, resolvedPath); + if (parsed === undefined) { + // File has gone missing; fine to ignore here + reportParseConfigFileDiagnostic(state, resolvedPath); + continue; + } + var outputs = ts.getAllProjectOutputs(parsed, !host.useCaseSensitiveFileNames()); + for (var _a = 0, outputs_3 = outputs; _a < outputs_3.length; _a++) { + var output = outputs_3[_a]; + if (host.fileExists(output)) { + if (filesToDelete) { + filesToDelete.push(output); + } + else { + host.deleteFile(output); + invalidateProject(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); + } + } + } } - function reportParseConfigFileDiagnostic(proj) { - reportAndStoreErrors(proj, [configFileCache.getValue(proj)]); + if (filesToDelete) { + reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * " + f; }).join("")); } - function reportAndStoreErrors(proj, errors) { - reportErrors(errors); - projectErrorsReported.setValue(proj, true); - diagnostics.setValue(proj, errors); + return ts.ExitStatus.Success; + } + function invalidateProject(state, resolved, reloadLevel) { + // If host implements getParsedCommandLine, we cant get list of files from parseConfigFileHost + if (state.host.getParsedCommandLine && reloadLevel === ts.ConfigFileProgramReloadLevel.Partial) { + reloadLevel = ts.ConfigFileProgramReloadLevel.Full; } - function reportErrors(errors) { - errors.forEach(function (err) { return host.reportDiagnostic(err); }); + if (reloadLevel === ts.ConfigFileProgramReloadLevel.Full) { + state.configFileCache.delete(resolved); + state.buildOrder = undefined; } - /** - * Report the build ordering inferred from the current project graph if we're in verbose mode - */ - function reportBuildQueue(graph) { - if (options.verbose) { - reportStatus(ts.Diagnostics.Projects_in_this_build_Colon_0, graph.buildQueue.map(function (s) { return "\r\n * " + relName(s); }).join("")); + state.needsSummary = true; + clearProjectStatus(state, resolved); + addProjToQueue(state, resolved, reloadLevel); + enableCache(state); + } + function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) { + state.reportFileChangeDetected = true; + invalidateProject(state, resolvedPath, reloadLevel); + scheduleBuildInvalidatedProject(state); + } + function scheduleBuildInvalidatedProject(state) { + var hostWithWatch = state.hostWithWatch; + if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) { + return; + } + if (state.timerToBuildInvalidatedProject) { + hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject); + } + state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, 250, state); + } + function buildNextInvalidatedProject(state) { + state.timerToBuildInvalidatedProject = undefined; + if (state.reportFileChangeDetected) { + state.reportFileChangeDetected = false; + state.projectErrorsReported.clear(); + reportWatchStatus(state, ts.Diagnostics.File_change_detected_Starting_incremental_compilation); + } + var buildOrder = getBuildOrder(state); + var invalidatedProject = getNextInvalidatedProject(state, buildOrder, /*reportQueue*/ false); + if (invalidatedProject) { + invalidatedProject.done(); + if (state.projectPendingBuild.size) { + // Schedule next project for build + if (state.watch && !state.timerToBuildInvalidatedProject) { + scheduleBuildInvalidatedProject(state); + } + return; } } - function relName(path) { - return ts.convertToRelativePath(path, host.getCurrentDirectory(), function (f) { return compilerHost.getCanonicalFileName(f); }); + disableCache(state); + reportErrorSummary(state, buildOrder); + } + function watchConfigFile(state, resolved, resolvedPath) { + if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath)) + return; + state.allWatchedConfigFiles.set(resolvedPath, state.watchFile(state.hostWithWatch, resolved, function () { + invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full); + }, ts.PollingInterval.High, "Config file" /* ConfigFile */, resolved)); + } + function isSameFile(state, file1, file2) { + return ts.comparePaths(file1, file2, state.currentDirectory, !state.host.useCaseSensitiveFileNames()) === 0 /* EqualTo */; + } + function isOutputFile(state, fileName, configFile) { + if (configFile.options.noEmit) + return false; + // ts or tsx files are not output + if (!ts.fileExtensionIs(fileName, ".d.ts" /* Dts */) && + (ts.fileExtensionIs(fileName, ".ts" /* Ts */) || ts.fileExtensionIs(fileName, ".tsx" /* Tsx */))) { + return false; } - /** - * Report the up-to-date status of a project if we're in verbose mode - */ - function verboseReportProjectStatus(configFileName, status) { - if (!options.verbose) + // If options have --outFile or --out, check if its that + var out = configFile.options.outFile || configFile.options.out; + if (out && (isSameFile(state, fileName, out) || isSameFile(state, fileName, ts.removeFileExtension(out) + ".d.ts" /* Dts */))) { + return true; + } + // If declarationDir is specified, return if its a file in that directory + if (configFile.options.declarationDir && ts.containsPath(configFile.options.declarationDir, fileName, state.currentDirectory, !state.host.useCaseSensitiveFileNames())) { + return true; + } + // If --outDir, check if file is in that directory + if (configFile.options.outDir && ts.containsPath(configFile.options.outDir, fileName, state.currentDirectory, !state.host.useCaseSensitiveFileNames())) { + return true; + } + return !ts.forEach(configFile.fileNames, function (inputFile) { return isSameFile(state, fileName, inputFile); }); + } + function watchWildCardDirectories(state, resolved, resolvedPath, parsed) { + if (!state.watch) + return; + ts.updateWatchingWildcardDirectories(getOrCreateValueMapFromConfigFileMap(state.allWatchedWildcardDirectories, resolvedPath), ts.createMapFromTemplate(parsed.configFileSpecs.wildcardDirectories), function (dir, flags) { return state.watchDirectory(state.hostWithWatch, dir, function (fileOrDirectory) { + var fileOrDirectoryPath = toPath(state, fileOrDirectory); + if (fileOrDirectoryPath !== toPath(state, dir) && ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, parsed.options)) { + state.writeLog("Project: " + resolved + " Detected file add/remove of non supported extension: " + fileOrDirectory); return; - return formatUpToDateStatus(configFileName, status, relName, reportStatus); + } + if (isOutputFile(state, fileOrDirectory, parsed)) { + state.writeLog(fileOrDirectory + " is output file"); + return; + } + invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Partial); + }, flags, "Wild card directory" /* WildcardDirectory */, resolved); }); + } + function watchInputFiles(state, resolved, resolvedPath, parsed) { + if (!state.watch) + return; + ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts.arrayToMap(parsed.fileNames, function (fileName) { return toPath(state, fileName); }), { + createNewValue: function (path, input) { return state.watchFilePath(state.hostWithWatch, input, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.None); }, ts.PollingInterval.Low, path, "Source file" /* SourceFile */, resolved); }, + onDeleteValue: ts.closeFileWatcher, + }); + } + function startWatching(state, buildOrder) { + if (!state.watchAllProjectsPending) + return; + state.watchAllProjectsPending = false; + for (var _i = 0, buildOrder_2 = buildOrder; _i < buildOrder_2.length; _i++) { + var resolved = buildOrder_2[_i]; + var resolvedPath = toResolvedConfigFilePath(state, resolved); + // Watch this file + watchConfigFile(state, resolved, resolvedPath); + var cfg = parseConfigFile(state, resolved, resolvedPath); + if (cfg) { + // Update watchers for wildcard directories + watchWildCardDirectories(state, resolved, resolvedPath, cfg); + // Watch input files + watchInputFiles(state, resolved, resolvedPath, cfg); + } + } + } + function createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, options) { + var state = createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options); + return { + build: function (project, cancellationToken) { return build(state, project, cancellationToken); }, + clean: function (project) { return clean(state, project); }, + buildReferences: function (project, cancellationToken) { return build(state, project, cancellationToken, /*onlyReferences*/ true); }, + cleanReferences: function (project) { return clean(state, project, /*onlyReferences*/ true); }, + getNextInvalidatedProject: function (cancellationToken) { + setupInitialBuild(state, cancellationToken); + return getNextInvalidatedProject(state, getBuildOrder(state), /*reportQueue*/ false); + }, + getBuildOrder: function () { return getBuildOrder(state); }, + getUpToDateStatusOfProject: function (project) { + var configFileName = resolveProjectName(state, project); + var configFilePath = toResolvedConfigFilePath(state, configFileName); + return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath); + }, + invalidateProject: function (configFilePath, reloadLevel) { return invalidateProject(state, configFilePath, reloadLevel || ts.ConfigFileProgramReloadLevel.None); }, + buildNextInvalidatedProject: function () { return buildNextInvalidatedProject(state); }, + }; + } + function relName(state, path) { + return ts.convertToRelativePath(path, state.currentDirectory, function (f) { return state.getCanonicalFileName(f); }); + } + function reportStatus(state, message) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; } + state.host.reportSolutionBuilderStatus(ts.createCompilerDiagnostic.apply(void 0, __spreadArrays([message], args))); } - ts.createSolutionBuilder = createSolutionBuilder; - function resolveConfigFileProjectName(project) { - if (ts.fileExtensionIs(project, ".json" /* Json */)) { - return project; + function reportWatchStatus(state, message) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + if (state.hostWithWatch.onWatchStatusChange) { + state.hostWithWatch.onWatchStatusChange(ts.createCompilerDiagnostic.apply(void 0, __spreadArrays([message], args)), state.host.getNewLine(), state.baseCompilerOptions); } - return ts.combinePaths(project, "tsconfig.json"); } - ts.resolveConfigFileProjectName = resolveConfigFileProjectName; - function formatUpToDateStatus(configFileName, status, relName, formatMessage) { + function reportErrors(_a, errors) { + var host = _a.host; + errors.forEach(function (err) { return host.reportDiagnostic(err); }); + } + function reportAndStoreErrors(state, proj, errors) { + reportErrors(state, errors); + state.projectErrorsReported.set(proj, true); + if (errors.length) { + state.diagnostics.set(proj, errors); + } + } + function reportParseConfigFileDiagnostic(state, proj) { + reportAndStoreErrors(state, proj, [state.configFileCache.get(proj)]); + } + function reportErrorSummary(state, buildOrder) { + if (!state.needsSummary || (!state.watch && !state.host.reportErrorSummary)) + return; + state.needsSummary = false; + var diagnostics = state.diagnostics; + // Report errors from the other projects + buildOrder.forEach(function (project) { + var projectPath = toResolvedConfigFilePath(state, project); + if (!state.projectErrorsReported.has(projectPath)) { + reportErrors(state, diagnostics.get(projectPath) || ts.emptyArray); + } + }); + var totalErrors = 0; + diagnostics.forEach(function (singleProjectErrors) { return totalErrors += ts.getErrorCountForSummary(singleProjectErrors); }); + if (state.watch) { + reportWatchStatus(state, ts.getWatchErrorSummaryDiagnosticMessage(totalErrors), totalErrors); + } + else { + state.host.reportErrorSummary(totalErrors); + } + } + /** + * Report the build ordering inferred from the current project graph if we're in verbose mode + */ + function reportBuildQueue(state, buildQueue) { + if (state.options.verbose) { + reportStatus(state, ts.Diagnostics.Projects_in_this_build_Colon_0, buildQueue.map(function (s) { return "\r\n * " + relName(state, s); }).join("")); + } + } + function reportUpToDateStatus(state, configFileName, status) { switch (status.type) { - case UpToDateStatusType.OutOfDateWithSelf: - return formatMessage(ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(configFileName), relName(status.outOfDateOutputFileName), relName(status.newerInputFileName)); - case UpToDateStatusType.OutOfDateWithUpstream: - return formatMessage(ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(configFileName), relName(status.outOfDateOutputFileName), relName(status.newerProjectName)); - case UpToDateStatusType.OutputMissing: - return formatMessage(ts.Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, relName(configFileName), relName(status.missingOutputFileName)); - case UpToDateStatusType.UpToDate: + case ts.UpToDateStatusType.OutOfDateWithSelf: + return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerInputFileName)); + case ts.UpToDateStatusType.OutOfDateWithUpstream: + return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerProjectName)); + case ts.UpToDateStatusType.OutputMissing: + return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, relName(state, configFileName), relName(state, status.missingOutputFileName)); + case ts.UpToDateStatusType.UpToDate: if (status.newestInputFileTime !== undefined) { - return formatMessage(ts.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, relName(configFileName), relName(status.newestInputFileName || ""), relName(status.oldestOutputFileName || "")); + return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, relName(state, configFileName), relName(state, status.newestInputFileName || ""), relName(state, status.oldestOutputFileName || "")); } // Don't report anything for "up to date because it was already built" -- too verbose break; - case UpToDateStatusType.OutOfDateWithPrepend: - return formatMessage(ts.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relName(configFileName), relName(status.newerProjectName)); - case UpToDateStatusType.UpToDateWithUpstreamTypes: - return formatMessage(ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(configFileName)); - case UpToDateStatusType.UpstreamOutOfDate: - return formatMessage(ts.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(configFileName), relName(status.upstreamProjectName)); - case UpToDateStatusType.UpstreamBlocked: - return formatMessage(ts.Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors, relName(configFileName), relName(status.upstreamProjectName)); - case UpToDateStatusType.Unbuildable: - return formatMessage(ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(configFileName), status.reason); - case UpToDateStatusType.TsVersionOutputOfDate: - return formatMessage(ts.Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, relName(configFileName), status.version, ts.version); - case UpToDateStatusType.ContainerOnly: + case ts.UpToDateStatusType.OutOfDateWithPrepend: + return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relName(state, configFileName), relName(state, status.newerProjectName)); + case ts.UpToDateStatusType.UpToDateWithUpstreamTypes: + return reportStatus(state, ts.Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, relName(state, configFileName)); + case ts.UpToDateStatusType.UpstreamOutOfDate: + return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, relName(state, configFileName), relName(state, status.upstreamProjectName)); + case ts.UpToDateStatusType.UpstreamBlocked: + return reportStatus(state, ts.Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors, relName(state, configFileName), relName(state, status.upstreamProjectName)); + case ts.UpToDateStatusType.Unbuildable: + return reportStatus(state, ts.Diagnostics.Failed_to_parse_file_0_Colon_1, relName(state, configFileName), status.reason); + case ts.UpToDateStatusType.TsVersionOutputOfDate: + return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, relName(state, configFileName), status.version, ts.version); + case ts.UpToDateStatusType.ContainerOnly: // Don't report status on "solution" projects - case UpToDateStatusType.ComputingUpstream: + case ts.UpToDateStatusType.ComputingUpstream: // Should never leak from getUptoDateStatusWorker break; default: ts.assertType(status); } } - ts.formatUpToDateStatus = formatUpToDateStatus; + /** + * Report the up-to-date status of a project if we're in verbose mode + */ + function verboseReportProjectStatus(state, configFileName, status) { + if (state.options.verbose) { + reportUpToDateStatus(state, configFileName, status); + } + } })(ts || (ts = {})); /* @internal */ var ts; @@ -95841,6 +98483,10 @@ var ts; "zlib" ]; JsTyping.nodeCoreModules = ts.arrayToSet(JsTyping.nodeCoreModuleList); + function nonRelativeModuleNameForTypingCache(moduleName) { + return JsTyping.nodeCoreModules.has(moduleName) ? "node" : moduleName; + } + JsTyping.nonRelativeModuleNameForTypingCache = nonRelativeModuleNameForTypingCache; function loadSafeList(host, safeListPath) { var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); }); return ts.createMapFromTemplate(result.config); @@ -95896,7 +98542,7 @@ var ts; getTypingNamesFromSourceFileNames(fileNames); // add typings for unresolved imports if (unresolvedImports) { - var module_1 = ts.deduplicate(unresolvedImports.map(function (moduleId) { return JsTyping.nodeCoreModules.has(moduleId) ? "node" : moduleId; }), ts.equateStringsCaseSensitive, ts.compareStringsCaseSensitive); + var module_1 = ts.deduplicate(unresolvedImports.map(nonRelativeModuleNameForTypingCache), ts.equateStringsCaseSensitive, ts.compareStringsCaseSensitive); addInferredTypings(module_1, "Inferred typings from unresolved imports"); } // Add the cached typing locations for inferred typings that are already installed @@ -96024,66 +98670,82 @@ var ts; } } JsTyping.discoverTypings = discoverTypings; - var PackageNameValidationResult; - (function (PackageNameValidationResult) { - PackageNameValidationResult[PackageNameValidationResult["Ok"] = 0] = "Ok"; - PackageNameValidationResult[PackageNameValidationResult["ScopedPackagesNotSupported"] = 1] = "ScopedPackagesNotSupported"; - PackageNameValidationResult[PackageNameValidationResult["EmptyName"] = 2] = "EmptyName"; - PackageNameValidationResult[PackageNameValidationResult["NameTooLong"] = 3] = "NameTooLong"; - PackageNameValidationResult[PackageNameValidationResult["NameStartsWithDot"] = 4] = "NameStartsWithDot"; - PackageNameValidationResult[PackageNameValidationResult["NameStartsWithUnderscore"] = 5] = "NameStartsWithUnderscore"; - PackageNameValidationResult[PackageNameValidationResult["NameContainsNonURISafeCharacters"] = 6] = "NameContainsNonURISafeCharacters"; - })(PackageNameValidationResult = JsTyping.PackageNameValidationResult || (JsTyping.PackageNameValidationResult = {})); + var NameValidationResult; + (function (NameValidationResult) { + NameValidationResult[NameValidationResult["Ok"] = 0] = "Ok"; + NameValidationResult[NameValidationResult["EmptyName"] = 1] = "EmptyName"; + NameValidationResult[NameValidationResult["NameTooLong"] = 2] = "NameTooLong"; + NameValidationResult[NameValidationResult["NameStartsWithDot"] = 3] = "NameStartsWithDot"; + NameValidationResult[NameValidationResult["NameStartsWithUnderscore"] = 4] = "NameStartsWithUnderscore"; + NameValidationResult[NameValidationResult["NameContainsNonURISafeCharacters"] = 5] = "NameContainsNonURISafeCharacters"; + })(NameValidationResult = JsTyping.NameValidationResult || (JsTyping.NameValidationResult = {})); var maxPackageNameLength = 214; /** * Validates package name using rules defined at https://docs.npmjs.com/files/package.json */ function validatePackageName(packageName) { + return validatePackageNameWorker(packageName, /*supportScopedPackage*/ true); + } + JsTyping.validatePackageName = validatePackageName; + function validatePackageNameWorker(packageName, supportScopedPackage) { if (!packageName) { - return 2 /* EmptyName */; + return 1 /* EmptyName */; } if (packageName.length > maxPackageNameLength) { - return 3 /* NameTooLong */; + return 2 /* NameTooLong */; } if (packageName.charCodeAt(0) === 46 /* dot */) { - return 4 /* NameStartsWithDot */; + return 3 /* NameStartsWithDot */; } if (packageName.charCodeAt(0) === 95 /* _ */) { - return 5 /* NameStartsWithUnderscore */; + return 4 /* NameStartsWithUnderscore */; } // check if name is scope package like: starts with @ and has one '/' in the middle // scoped packages are not currently supported - // TODO: when support will be added we'll need to split and check both scope and package name - if (/^@[^/]+\/[^/]+$/.test(packageName)) { - return 1 /* ScopedPackagesNotSupported */; + if (supportScopedPackage) { + var matches = /^@([^/]+)\/([^/]+)$/.exec(packageName); + if (matches) { + var scopeResult = validatePackageNameWorker(matches[1], /*supportScopedPackage*/ false); + if (scopeResult !== 0 /* Ok */) { + return { name: matches[1], isScopeName: true, result: scopeResult }; + } + var packageResult = validatePackageNameWorker(matches[2], /*supportScopedPackage*/ false); + if (packageResult !== 0 /* Ok */) { + return { name: matches[2], isScopeName: false, result: packageResult }; + } + return 0 /* Ok */; + } } if (encodeURIComponent(packageName) !== packageName) { - return 6 /* NameContainsNonURISafeCharacters */; + return 5 /* NameContainsNonURISafeCharacters */; } return 0 /* Ok */; } - JsTyping.validatePackageName = validatePackageName; function renderPackageNameValidationFailure(result, typing) { + return typeof result === "object" ? + renderPackageNameValidationFailureWorker(typing, result.result, result.name, result.isScopeName) : + renderPackageNameValidationFailureWorker(typing, result, typing, /*isScopeName*/ false); + } + JsTyping.renderPackageNameValidationFailure = renderPackageNameValidationFailure; + function renderPackageNameValidationFailureWorker(typing, result, name, isScopeName) { + var kind = isScopeName ? "Scope" : "Package"; switch (result) { - case 2 /* EmptyName */: - return "Package name '" + typing + "' cannot be empty"; - case 3 /* NameTooLong */: - return "Package name '" + typing + "' should be less than " + maxPackageNameLength + " characters"; - case 4 /* NameStartsWithDot */: - return "Package name '" + typing + "' cannot start with '.'"; - case 5 /* NameStartsWithUnderscore */: - return "Package name '" + typing + "' cannot start with '_'"; - case 1 /* ScopedPackagesNotSupported */: - return "Package '" + typing + "' is scoped and currently is not supported"; - case 6 /* NameContainsNonURISafeCharacters */: - return "Package name '" + typing + "' contains non URI safe characters"; + case 1 /* EmptyName */: + return "'" + typing + "':: " + kind + " name '" + name + "' cannot be empty"; + case 2 /* NameTooLong */: + return "'" + typing + "':: " + kind + " name '" + name + "' should be less than " + maxPackageNameLength + " characters"; + case 3 /* NameStartsWithDot */: + return "'" + typing + "':: " + kind + " name '" + name + "' cannot start with '.'"; + case 4 /* NameStartsWithUnderscore */: + return "'" + typing + "':: " + kind + " name '" + name + "' cannot start with '_'"; + case 5 /* NameContainsNonURISafeCharacters */: + return "'" + typing + "':: " + kind + " name '" + name + "' contains non URI safe characters"; case 0 /* Ok */: return ts.Debug.fail(); // Shouldn't have called this. default: throw ts.Debug.assertNever(result); } } - JsTyping.renderPackageNameValidationFailure = renderPackageNameValidationFailure; })(JsTyping = ts.JsTyping || (ts.JsTyping = {})); })(ts || (ts = {})); var ts; @@ -96368,7 +99030,7 @@ var ts; /* @internal */ var ts; (function (ts) { - ts.scanner = ts.createScanner(8 /* Latest */, /*skipTrivia*/ true); + ts.scanner = ts.createScanner(99 /* Latest */, /*skipTrivia*/ true); var SemanticMeaning; (function (SemanticMeaning) { SemanticMeaning[SemanticMeaning["None"] = 0] = "None"; @@ -96403,7 +99065,7 @@ var ts; case 243 /* TypeAliasDeclaration */: case 169 /* TypeLiteral */: return 2 /* Type */; - case 310 /* JSDocTypedefTag */: + case 312 /* JSDocTypedefTag */: // If it has no name node, it shares the name with the value declaration below it. return node.name === undefined ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; case 279 /* EnumMember */: @@ -96668,8 +99330,8 @@ var ts; return "class" /* classElement */; case 242 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; case 243 /* TypeAliasDeclaration */: - case 303 /* JSDocCallbackTag */: - case 310 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: return "type" /* typeElement */; case 244 /* EnumDeclaration */: return "enum" /* enumElement */; case 238 /* VariableDeclaration */: @@ -97447,8 +100109,8 @@ var ts; var range = isInComment(sourceFile, position, /*tokenAtPosition*/ undefined); return !!range && shouldBeReference === tripleSlashDirectivePrefixRegex.test(sourceFile.text.substring(range.pos, range.end)); } - function createTextSpanFromNode(node, sourceFile) { - return ts.createTextSpanFromBounds(node.getStart(sourceFile), node.getEnd()); + function createTextSpanFromNode(node, sourceFile, endNode) { + return ts.createTextSpanFromBounds(node.getStart(sourceFile), (endNode || node).getEnd()); } ts.createTextSpanFromNode = createTextSpanFromNode; function createTextRangeFromNode(node, sourceFile) { @@ -97481,6 +100143,7 @@ var ts; 97 /* NullKeyword */, 136 /* NumberKeyword */, 137 /* ObjectKeyword */, + 134 /* ReadonlyKeyword */, 139 /* StringKeyword */, 140 /* SymbolKeyword */, 103 /* TrueKeyword */, @@ -97910,23 +100573,6 @@ var ts; return !!location.parent && ts.isImportOrExportSpecifier(location.parent) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; - /** - * Strip off existed single quotes or double quotes from a given string - * - * @return non-quoted string - */ - function stripQuotes(name) { - var length = name.length; - if (length >= 2 && name.charCodeAt(0) === name.charCodeAt(length - 1) && startsWithQuote(name)) { - return name.substring(1, length - 1); - } - return name; - } - ts.stripQuotes = stripQuotes; - function startsWithQuote(name) { - return ts.isSingleOrDoubleQuote(name.charCodeAt(0)); - } - ts.startsWithQuote = startsWithQuote; function scriptKindIs(fileName, host) { var scriptKinds = []; for (var _i = 2; _i < arguments.length; _i++) { @@ -98195,7 +100841,7 @@ var ts; case "double": return quoted; case "single": - return "'" + stripQuotes(quoted).replace("'", "\\'").replace('\\"', '"') + "'"; + return "'" + ts.stripQuotes(quoted).replace("'", "\\'").replace('\\"', '"') + "'"; default: return ts.Debug.assertNever(quotePreference); } @@ -98257,11 +100903,56 @@ var ts; return typeIsAccessible ? res : undefined; } ts.getTypeNodeIfAccessible = getTypeNodeIfAccessible; + function syntaxUsuallyHasTrailingSemicolon(kind) { + return kind === 220 /* VariableStatement */ + || kind === 222 /* ExpressionStatement */ + || kind === 224 /* DoStatement */ + || kind === 229 /* ContinueStatement */ + || kind === 230 /* BreakStatement */ + || kind === 231 /* ReturnStatement */ + || kind === 235 /* ThrowStatement */ + || kind === 237 /* DebuggerStatement */ + || kind === 155 /* PropertyDeclaration */ + || kind === 243 /* TypeAliasDeclaration */ + || kind === 250 /* ImportDeclaration */ + || kind === 249 /* ImportEqualsDeclaration */ + || kind === 256 /* ExportDeclaration */; + } + ts.syntaxUsuallyHasTrailingSemicolon = syntaxUsuallyHasTrailingSemicolon; + function probablyUsesSemicolons(sourceFile) { + var withSemicolon = 0; + var withoutSemicolon = 0; + var nStatementsToObserve = 5; + ts.forEachChild(sourceFile, function visit(node) { + if (syntaxUsuallyHasTrailingSemicolon(node.kind)) { + var lastToken = node.getLastToken(sourceFile); + if (lastToken && lastToken.kind === 26 /* SemicolonToken */) { + withSemicolon++; + } + else { + withoutSemicolon++; + } + } + if (withSemicolon + withoutSemicolon >= nStatementsToObserve) { + return true; + } + return ts.forEachChild(node, visit); + }); + // One statement missing a semicolon isn’t sufficient evidence to say the user + // doesn’t want semicolons, because they may not even be done writing that statement. + if (withSemicolon === 0 && withoutSemicolon <= 1) { + return true; + } + // If even 2/5 places have a semicolon, the user probably wants semicolons + return withSemicolon / withoutSemicolon > 1 / nStatementsToObserve; + } + ts.probablyUsesSemicolons = probablyUsesSemicolons; })(ts || (ts = {})); var ts; (function (ts) { + /** The classifier is used for syntactic highlighting in editors via the TSServer */ function createClassifier() { - var scanner = ts.createScanner(8 /* Latest */, /*skipTrivia*/ false); + var scanner = ts.createScanner(99 /* Latest */, /*skipTrivia*/ false); function getClassificationsForLine(text, lexState, syntacticClassifierAbsent) { return convertClassificationsToResult(getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent), text); } @@ -98815,8 +101506,8 @@ var ts; var spanStart = span.start; var spanLength = span.length; // Make a scanner we can get trivia from. - var triviaScanner = ts.createScanner(8 /* Latest */, /*skipTrivia*/ false, sourceFile.languageVariant, sourceFile.text); - var mergeConflictScanner = ts.createScanner(8 /* Latest */, /*skipTrivia*/ false, sourceFile.languageVariant, sourceFile.text); + var triviaScanner = ts.createScanner(99 /* Latest */, /*skipTrivia*/ false, sourceFile.languageVariant, sourceFile.text); + var mergeConflictScanner = ts.createScanner(99 /* Latest */, /*skipTrivia*/ false, sourceFile.languageVariant, sourceFile.text); var result = []; processElement(sourceFile); return { spans: result, endOfLineState: 0 /* None */ }; @@ -98888,6 +101579,11 @@ var ts; return; } } + else if (kind === 2 /* SingleLineCommentTrivia */) { + if (tryClassifyTripleSlashComment(start, width)) { + return; + } + } // Simple comment. Just add as is. pushCommentRange(start, width); } @@ -98908,18 +101604,18 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); // e.g. "param" pos = tag.tagName.end; switch (tag.kind) { - case 305 /* JSDocParameterTag */: + case 307 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 309 /* JSDocTemplateTag */: + case 311 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; break; - case 308 /* JSDocTypeTag */: + case 310 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; break; - case 306 /* JSDocReturnTag */: + case 308 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; break; @@ -98948,6 +101644,69 @@ var ts; } } } + function tryClassifyTripleSlashComment(start, width) { + var tripleSlashXMLCommentRegEx = /^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/im; + var attributeRegex = /(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/img; + var text = sourceFile.text.substr(start, width); + var match = tripleSlashXMLCommentRegEx.exec(text); + if (!match) { + return false; + } + // Limiting classification to exactly the elements and attributes + // defined in `ts.commentPragmas` would be excessive, but we can avoid + // some obvious false positives (e.g. in XML-like doc comments) by + // checking the element name. + if (!match[3] || !(match[3] in ts.commentPragmas)) { + return false; + } + var pos = start; + pushCommentRange(pos, match[1].length); // /// + pos += match[1].length; + pushClassification(pos, match[2].length, 10 /* punctuation */); // < + pos += match[2].length; + pushClassification(pos, match[3].length, 21 /* jsxSelfClosingTagName */); // element name + pos += match[3].length; + var attrText = match[4]; + var attrPos = pos; + while (true) { + var attrMatch = attributeRegex.exec(attrText); + if (!attrMatch) { + break; + } + var newAttrPos = pos + attrMatch.index; + if (newAttrPos > attrPos) { + pushCommentRange(attrPos, newAttrPos - attrPos); + attrPos = newAttrPos; + } + pushClassification(attrPos, attrMatch[1].length, 22 /* jsxAttribute */); // attribute name + attrPos += attrMatch[1].length; + if (attrMatch[2].length) { + pushCommentRange(attrPos, attrMatch[2].length); // whitespace + attrPos += attrMatch[2].length; + } + pushClassification(attrPos, attrMatch[3].length, 5 /* operator */); // = + attrPos += attrMatch[3].length; + if (attrMatch[4].length) { + pushCommentRange(attrPos, attrMatch[4].length); // whitespace + attrPos += attrMatch[4].length; + } + pushClassification(attrPos, attrMatch[5].length, 24 /* jsxAttributeStringLiteralValue */); // attribute value + attrPos += attrMatch[5].length; + } + pos += match[4].length; + if (pos > attrPos) { + pushCommentRange(attrPos, pos - attrPos); + } + if (match[5]) { + pushClassification(pos, match[5].length, 10 /* punctuation */); // /> + pos += match[5].length; + } + var end = start + width; + if (pos < end) { + pushCommentRange(pos, end - pos); + } + return true; + } function processJSDocTemplateTag(tag) { for (var _i = 0, _a = tag.getChildren(); _i < _a.length; _i++) { var child = _a[_i]; @@ -99172,7 +101931,7 @@ var ts; return convertPathCompletions(completion.paths); case 1 /* Properties */: { var entries = []; - Completions.getCompletionEntriesFromSymbols(completion.symbols, entries, sourceFile, sourceFile, checker, 8 /* ESNext */, log, 4 /* String */, preferences); // Target will not be used, so arbitrary + Completions.getCompletionEntriesFromSymbols(completion.symbols, entries, sourceFile, sourceFile, checker, 99 /* ESNext */, log, 4 /* String */, preferences); // Target will not be used, so arbitrary return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, entries: entries }; } case 2 /* Types */: { @@ -99409,7 +102168,7 @@ var ts; return ts.containsPath(rootDirectory, scriptDirectory, basePath, ignoreCase) ? scriptDirectory.substr(rootDirectory.length) : undefined; }); // TODO: GH#18217 // Now find a path for each potential directory that is to be merged with the one containing the script - return ts.deduplicate(rootDirs.map(function (rootDirectory) { return ts.combinePaths(rootDirectory, relativeDirectory); }).concat([scriptDirectory]), ts.equateStringsCaseSensitive, ts.compareStringsCaseSensitive); + return ts.deduplicate(__spreadArrays(rootDirs.map(function (rootDirectory) { return ts.combinePaths(rootDirectory, relativeDirectory); }), [scriptDirectory]), ts.equateStringsCaseSensitive, ts.compareStringsCaseSensitive); } function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptDirectory, extensionOptions, compilerOptions, host, exclude) { var basePath = compilerOptions.project || host.getCurrentDirectory(); @@ -99616,7 +102375,7 @@ var ts; var name = trimPrefixAndSuffix(dir); return name === undefined ? undefined : directoryResult(name); }); - return matches.concat(directories); + return __spreadArrays(matches, directories); function trimPrefixAndSuffix(path) { var inner = withoutStartAndEnd(ts.normalizePath(path), completePrefix, normalizedSuffix); return inner === undefined ? undefined : removeLeadingDirectorySeparator(inner); @@ -99751,7 +102510,7 @@ var ts; var offset = index !== -1 ? index + 1 : 0; // If the range is an identifier, span is unnecessary. var length = text.length - offset; - return length === 0 || ts.isIdentifierText(text.substr(offset, length), 8 /* ESNext */) ? undefined : ts.createTextSpan(textStart + offset, length); + return length === 0 || ts.isIdentifierText(text.substr(offset, length), 99 /* ESNext */) ? undefined : ts.createTextSpan(textStart + offset, length); } // Returns true if the path is explicitly relative to the script (i.e. relative to . or ..) function isPathRelativeToScript(path) { @@ -99843,8 +102602,9 @@ var ts; KeywordCompletionFilters[KeywordCompletionFilters["InterfaceElementKeywords"] = 3] = "InterfaceElementKeywords"; KeywordCompletionFilters[KeywordCompletionFilters["ConstructorParameterKeywords"] = 4] = "ConstructorParameterKeywords"; KeywordCompletionFilters[KeywordCompletionFilters["FunctionLikeBodyKeywords"] = 5] = "FunctionLikeBodyKeywords"; - KeywordCompletionFilters[KeywordCompletionFilters["TypeKeywords"] = 6] = "TypeKeywords"; - KeywordCompletionFilters[KeywordCompletionFilters["Last"] = 6] = "Last"; + KeywordCompletionFilters[KeywordCompletionFilters["TypeAssertionKeywords"] = 6] = "TypeAssertionKeywords"; + KeywordCompletionFilters[KeywordCompletionFilters["TypeKeywords"] = 7] = "TypeKeywords"; + KeywordCompletionFilters[KeywordCompletionFilters["Last"] = 7] = "Last"; })(KeywordCompletionFilters || (KeywordCompletionFilters = {})); var GlobalsSearch; (function (GlobalsSearch) { @@ -100312,7 +103072,7 @@ var ts; currentToken = ts.getTokenAtPosition(sourceFile, position); if (!currentToken || (!ts.isDeclarationName(currentToken) && - (currentToken.parent.kind !== 311 /* JSDocPropertyTag */ || + (currentToken.parent.kind !== 313 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken))) { // Use as type location if inside tag's type expression insideJsDocTagTypeExpression = isCurrentlyEditingNode(tag.typeExpression); @@ -100508,11 +103268,11 @@ var ts; }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 305 /* JSDocParameterTag */: - case 311 /* JSDocPropertyTag */: - case 306 /* JSDocReturnTag */: - case 308 /* JSDocTypeTag */: - case 310 /* JSDocTypedefTag */: + case 307 /* JSDocParameterTag */: + case 313 /* JSDocPropertyTag */: + case 308 /* JSDocReturnTag */: + case 310 /* JSDocTypeTag */: + case 312 /* JSDocTypedefTag */: return true; default: return false; @@ -100521,11 +103281,13 @@ var ts; function getTypeScriptMemberSymbols() { // Right of dot member completion list completionKind = 2 /* PropertyAccess */; - // Since this is qualified name check its a type node location + // Since this is qualified name check it's a type node location var isImportType = ts.isLiteralImportTypeNode(node); - var isTypeLocation = insideJsDocTagTypeExpression || (isImportType && !node.isTypeOf) || ts.isPartOfTypeNode(node.parent); + var isTypeLocation = insideJsDocTagTypeExpression + || (isImportType && !node.isTypeOf) + || ts.isPartOfTypeNode(node.parent) + || ts.isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); var isRhsOfImportDeclaration = ts.isInRightSideOfInternalImportEqualsDeclaration(node); - var allowTypeOrValue = isRhsOfImportDeclaration || (!isTypeLocation && ts.isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker)); if (ts.isEntityName(node) || isImportType) { var isNamespaceName = ts.isModuleDeclaration(node.parent); if (isNamespaceName) @@ -100541,7 +103303,7 @@ var ts; var isValidAccess = isNamespaceName // At `namespace N.M/**/`, if this is the only declaration of `M`, don't include `M` as a completion. ? function (symbol) { return !!(symbol.flags & 1920 /* Namespace */) && !symbol.declarations.every(function (d) { return d.parent === node.parent; }); } - : allowTypeOrValue ? + : isRhsOfImportDeclaration ? // Any kind is allowed when dotting off namespace in internal import equals declaration function (symbol) { return isValidTypeAccess_1(symbol) || isValidValueAccess_1(symbol); } : isTypeLocation ? isValidTypeAccess_1 : isValidValueAccess_1; @@ -100605,6 +103367,9 @@ var ts; symbolToOriginInfoMap[ts.getSymbolId(firstAccessibleSymbol)] = !moduleSymbol || !ts.isExternalModuleSymbol(moduleSymbol) ? { kind: 1 /* SymbolMemberNoExport */ } : { kind: 2 /* SymbolMemberExport */, moduleSymbol: moduleSymbol, isDefaultExport: false }; } + else if (preferences.includeCompletionsWithInsertText) { + symbols.push(symbol); + } } else { symbols.push(symbol); @@ -100684,7 +103449,7 @@ var ts; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; isInSnippetScope = isSnippetScope(scopeNode); var isTypeOnly = isTypeOnlyCompletion(); - var symbolMeanings = (isTypeOnly ? 0 /* None */ : 67220415 /* Value */) | 67897832 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */; + var symbolMeanings = (isTypeOnly ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */; symbols = ts.Debug.assertEachDefined(typeChecker.getSymbolsInScope(scopeNode, symbolMeanings), "getSymbolsInScope() should all be defined"); for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { var symbol = symbols_2[_i]; @@ -100739,9 +103504,11 @@ var ts; } function filterGlobalCompletion(symbols) { var isTypeOnly = isTypeOnlyCompletion(); - var allowTypes = isTypeOnly || !isContextTokenValueLocation(contextToken) && ts.isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); - if (isTypeOnly) - keywordFilters = 6 /* TypeKeywords */; + if (isTypeOnly) { + keywordFilters = isTypeAssertion() + ? 6 /* TypeAssertionKeywords */ + : 7 /* TypeKeywords */; + } ts.filterMutate(symbols, function (symbol) { if (!ts.isSourceFile(location)) { // export = /**/ here we want to get all meanings, so any symbol is ok @@ -100753,20 +103520,24 @@ var ts; if (ts.isInRightSideOfInternalImportEqualsDeclaration(location)) { return !!(symbol.flags & 1920 /* Namespace */); } - if (allowTypes) { - // Its a type, but you can reach it by namespace.type as well - var symbolAllowedAsType = symbolCanBeReferencedAtTypeLocation(symbol); - if (symbolAllowedAsType || isTypeOnly) { - return symbolAllowedAsType; - } + if (isTypeOnly) { + // It's a type, but you can reach it by namespace.type as well + return symbolCanBeReferencedAtTypeLocation(symbol); } } // expressions are value space (which includes the value namespaces) - return !!(ts.getCombinedLocalAndExportSymbolFlags(symbol) & 67220415 /* Value */); + return !!(ts.getCombinedLocalAndExportSymbolFlags(symbol) & 111551 /* Value */); }); } + function isTypeAssertion() { + return ts.isAssertionExpression(contextToken.parent); + } function isTypeOnlyCompletion() { - return insideJsDocTagTypeExpression || !isContextTokenValueLocation(contextToken) && (ts.isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); + return insideJsDocTagTypeExpression + || !isContextTokenValueLocation(contextToken) && + (ts.isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) + || ts.isPartOfTypeNode(location) + || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken) { return contextToken && @@ -100787,6 +103558,9 @@ var ts; return parentKind === 243 /* TypeAliasDeclaration */; case 120 /* AsKeyword */: return parentKind === 213 /* AsExpression */; + case 28 /* LessThanToken */: + return parentKind === 165 /* TypeReference */ || + parentKind === 195 /* TypeAssertionExpression */; case 87 /* ExtendsKeyword */: return parentKind === 151 /* TypeParameter */; } @@ -100797,7 +103571,7 @@ var ts; function symbolCanBeReferencedAtTypeLocation(symbol, seenModules) { if (seenModules === void 0) { seenModules = ts.createMap(); } var sym = ts.skipAlias(symbol.exportSymbol || symbol, typeChecker); - return !!(sym.flags & 67897832 /* Type */) || + return !!(sym.flags & 788968 /* Type */) || !!(sym.flags & 1536 /* Module */) && ts.addToSeen(seenModules, ts.getSymbolId(sym)) && typeChecker.getExportsOfModule(sym).some(function (e) { return symbolCanBeReferencedAtTypeLocation(e, seenModules); }); @@ -100818,7 +103592,7 @@ var ts; if (resolvedModuleSymbol !== moduleSymbol && // Don't add another completion for `export =` of a symbol that's already global. // So in `declare namespace foo {} declare module "foo" { export = foo; }`, there will just be the global completion for `foo`. - ts.some(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) { + ts.every(resolvedModuleSymbol.declarations, function (d) { return !!d.getSourceFile().externalModuleIndicator; })) { symbols.push(resolvedModuleSymbol); symbolToSortTextMap[ts.getSymbolId(resolvedModuleSymbol)] = SortText.AutoImportSuggestions; symbolToOriginInfoMap[ts.getSymbolId(resolvedModuleSymbol)] = { kind: 3 /* Export */, moduleSymbol: moduleSymbol, isDefaultExport: false }; @@ -101055,7 +103829,7 @@ var ts; * Relevant symbols are stored in the captured 'symbols' variable. */ function tryGetClassLikeCompletionSymbols() { - var decl = tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location); + var decl = tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position); if (!decl) return 0 /* Continue */; // We're looking up possible property names from parent type. @@ -101067,7 +103841,7 @@ var ts; // If you're in an interface you don't want to repeat things from super-interface. So just stop here. if (!ts.isClassLike(decl)) return 1 /* Success */; - var classElement = contextToken.parent; + var classElement = contextToken.kind === 26 /* SemicolonToken */ ? contextToken.parent.parent : contextToken.parent; var classElementModifierFlags = ts.isClassElement(classElement) ? ts.getModifierFlags(classElement) : 0 /* None */; // If this is context token is not something we are editing now, consider if this would lead to be modifier if (contextToken.kind === 73 /* Identifier */ && !isCurrentlyEditingNode(contextToken)) { @@ -101490,7 +104264,7 @@ var ts; function getKeywordCompletions(keywordFilter, filterOutTsOnlyKeywords) { if (!filterOutTsOnlyKeywords) return getTypescriptKeywordCompletions(keywordFilter); - var index = keywordFilter + 6 /* Last */ + 1; + var index = keywordFilter + 7 /* Last */ + 1; return _keywordCompletions[index] || (_keywordCompletions[index] = getTypescriptKeywordCompletions(keywordFilter) .filter(function (entry) { return !isTypeScriptOnlyKeyword(ts.stringToToken(entry.name)); })); @@ -101502,17 +104276,21 @@ var ts; case 0 /* None */: return false; case 1 /* All */: - return kind === 122 /* AsyncKeyword */ || 123 /* AwaitKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind) || kind === 126 /* DeclareKeyword */ || kind === 131 /* ModuleKeyword */ + return isFunctionLikeBodyKeyword(kind) + || kind === 126 /* DeclareKeyword */ + || kind === 131 /* ModuleKeyword */ || ts.isTypeKeyword(kind) && kind !== 142 /* UndefinedKeyword */; + case 5 /* FunctionLikeBodyKeywords */: + return isFunctionLikeBodyKeyword(kind); case 2 /* ClassElementKeywords */: return isClassMemberCompletionKeyword(kind); case 3 /* InterfaceElementKeywords */: return isInterfaceOrTypeLiteralCompletionKeyword(kind); case 4 /* ConstructorParameterKeywords */: return ts.isParameterPropertyModifier(kind); - case 5 /* FunctionLikeBodyKeywords */: - return isFunctionLikeBodyKeyword(kind); - case 6 /* TypeKeywords */: + case 6 /* TypeAssertionKeywords */: + return ts.isTypeKeyword(kind) || kind === 78 /* ConstKeyword */; + case 7 /* TypeKeywords */: return ts.isTypeKeyword(kind); default: return ts.Debug.assertNever(keywordFilter); @@ -101568,7 +104346,9 @@ var ts; } } function isFunctionLikeBodyKeyword(kind) { - return kind === 122 /* AsyncKeyword */ || kind === 123 /* AwaitKeyword */ || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); + return kind === 122 /* AsyncKeyword */ + || kind === 123 /* AwaitKeyword */ + || !ts.isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); } function keywordForNode(node) { return ts.isIdentifier(node) ? node.originalKeywordKind || 0 /* Unknown */ : node.kind; @@ -101602,16 +104382,21 @@ var ts; * Returns the immediate owning class declaration of a context token, * on the condition that one exists and that the context implies completion should be given. */ - function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location) { + function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { // class c { method() { } | method2() { } } switch (location.kind) { - case 312 /* SyntaxList */: + case 314 /* SyntaxList */: return ts.tryCast(location.parent, ts.isObjectTypeDeclaration); case 1 /* EndOfFileToken */: var cls = ts.tryCast(ts.lastOrUndefined(ts.cast(location.parent, ts.isSourceFile).statements), ts.isObjectTypeDeclaration); if (cls && !ts.findChildOfKind(cls, 19 /* CloseBraceToken */, sourceFile)) { return cls; } + break; + case 73 /* Identifier */: // class c extends React.Component { a: () => 1\n compon| } + if (isFromObjectTypeDeclaration(location)) { + return ts.findAncestor(location, ts.isObjectTypeDeclaration); + } } if (!contextToken) return undefined; @@ -101626,8 +104411,13 @@ var ts; case 27 /* CommaToken */: // class c {getValue(): number, | } return ts.tryCast(contextToken.parent, ts.isObjectTypeDeclaration); default: - if (!isFromObjectTypeDeclaration(contextToken)) + if (!isFromObjectTypeDeclaration(contextToken)) { + // class c extends React.Component { a: () => 1\n| } + if (ts.getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== ts.getLineAndCharacterOfPosition(sourceFile, position).line && ts.isObjectTypeDeclaration(location)) { + return location; + } return undefined; + } var isValidKeyword = ts.isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword; return (isValidKeyword(contextToken.kind) || contextToken.kind === 40 /* AsteriskToken */ || ts.isIdentifier(contextToken) && isValidKeyword(ts.stringToToken(contextToken.text))) // TODO: GH#18217 ? contextToken.parent.parent : undefined; @@ -101854,7 +104644,7 @@ var ts; case 273 /* DefaultClause */: // Container is either a class declaration or the declaration is a classDeclaration if (modifierFlag & 128 /* Abstract */ && ts.isClassDeclaration(declaration)) { - return declaration.members.concat([declaration]); + return __spreadArrays(declaration.members, [declaration]); } else { return container.statements; @@ -101862,20 +104652,22 @@ var ts; case 158 /* Constructor */: case 157 /* MethodDeclaration */: case 240 /* FunctionDeclaration */: - return container.parameters.concat((ts.isClassLike(container.parent) ? container.parent.members : [])); + return __spreadArrays(container.parameters, (ts.isClassLike(container.parent) ? container.parent.members : [])); case 241 /* ClassDeclaration */: case 210 /* ClassExpression */: + case 242 /* InterfaceDeclaration */: + case 169 /* TypeLiteral */: var nodes = container.members; // If we're an accessibility modifier, we're in an instance member and should search // the constructor's parameter list for instance members as well. - if (modifierFlag & 28 /* AccessibilityModifier */) { + if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { var constructor = ts.find(container.members, ts.isConstructorDeclaration); if (constructor) { - return nodes.concat(constructor.parameters); + return __spreadArrays(nodes, constructor.parameters); } } else if (modifierFlag & 128 /* Abstract */) { - return nodes.concat([container]); + return __spreadArrays(nodes, [container]); } return nodes; default: @@ -102600,7 +105392,7 @@ var ts; /** * Given a local reference, we might notice that it's an import/export and recursively search for references of that. * If at an import, look locally for the symbol it imports. - * If an an export, look for all imports of it. + * If at an export, look for all imports of it. * This doesn't handle export specifiers; that is done in `getReferencesAtExportSpecifier`. * @param comingFromExport If we are doing a search for all exports, don't bother looking backwards for the imported symbol, since that's the reason we're here. */ @@ -102732,10 +105524,10 @@ var ts; // If a reference is a class expression, the exported node would be its parent. // If a reference is a variable declaration, the exported node would be the variable statement. function getExportNode(parent, node) { - if (parent.kind === 238 /* VariableDeclaration */) { - var p = parent; - return p.name !== node ? undefined : - p.parent.kind === 275 /* CatchClause */ ? undefined : p.parent.parent.kind === 220 /* VariableStatement */ ? p.parent.parent : undefined; + var declaration = ts.isVariableDeclaration(parent) ? parent : ts.isBindingElement(parent) ? ts.walkUpBindingElementsAndPatterns(parent) : undefined; + if (declaration) { + return parent.name !== node ? undefined : + ts.isCatchClause(declaration.parent) ? undefined : ts.isVariableStatement(declaration.parent.parent) ? declaration.parent.parent : undefined; } else { return parent; @@ -102824,9 +105616,131 @@ var ts; })(EntryKind = FindAllReferences.EntryKind || (FindAllReferences.EntryKind = {})); function nodeEntry(node, kind) { if (kind === void 0) { kind = 1 /* Node */; } - return { kind: kind, node: node.name || node }; + return { + kind: kind, + node: node.name || node, + context: getContextNodeForNodeEntry(node) + }; } FindAllReferences.nodeEntry = nodeEntry; + function isContextWithStartAndEndNode(node) { + return node && node.kind === undefined; + } + FindAllReferences.isContextWithStartAndEndNode = isContextWithStartAndEndNode; + function getContextNodeForNodeEntry(node) { + if (ts.isDeclaration(node)) { + return getContextNode(node); + } + if (!node.parent) + return undefined; + if (!ts.isDeclaration(node.parent) && !ts.isExportAssignment(node.parent)) { + // Special property assignment in javascript + if (ts.isInJSFile(node)) { + var binaryExpression = ts.isBinaryExpression(node.parent) ? + node.parent : + ts.isPropertyAccessExpression(node.parent) && + ts.isBinaryExpression(node.parent.parent) && + node.parent.parent.left === node.parent ? + node.parent.parent : + undefined; + if (binaryExpression && ts.getAssignmentDeclarationKind(binaryExpression) !== 0 /* None */) { + return getContextNode(binaryExpression); + } + } + // Jsx Tags + if (ts.isJsxOpeningElement(node.parent) || ts.isJsxClosingElement(node.parent)) { + return node.parent.parent; + } + else if (ts.isJsxSelfClosingElement(node.parent) || + ts.isLabeledStatement(node.parent) || + ts.isBreakOrContinueStatement(node.parent)) { + return node.parent; + } + else if (ts.isStringLiteralLike(node)) { + var validImport = ts.tryGetImportFromModuleSpecifier(node); + if (validImport) { + var declOrStatement = ts.findAncestor(validImport, function (node) { + return ts.isDeclaration(node) || + ts.isStatement(node) || + ts.isJSDocTag(node); + }); + return ts.isDeclaration(declOrStatement) ? + getContextNode(declOrStatement) : + declOrStatement; + } + } + // Handle computed property name + var propertyName = ts.findAncestor(node, ts.isComputedPropertyName); + return propertyName ? + getContextNode(propertyName.parent) : + undefined; + } + if (node.parent.name === node || // node is name of declaration, use parent + ts.isConstructorDeclaration(node.parent) || + ts.isExportAssignment(node.parent) || + // Property name of the import export specifier or binding pattern, use parent + ((ts.isImportOrExportSpecifier(node.parent) || ts.isBindingElement(node.parent)) + && node.parent.propertyName === node) || + // Is default export + (node.kind === 81 /* DefaultKeyword */ && ts.hasModifier(node.parent, 513 /* ExportDefault */))) { + return getContextNode(node.parent); + } + return undefined; + } + function getContextNode(node) { + if (!node) + return undefined; + switch (node.kind) { + case 238 /* VariableDeclaration */: + return !ts.isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? + node : + ts.isVariableStatement(node.parent.parent) ? + node.parent.parent : + ts.isForInOrOfStatement(node.parent.parent) ? + getContextNode(node.parent.parent) : + node.parent; + case 187 /* BindingElement */: + return getContextNode(node.parent.parent); + case 254 /* ImportSpecifier */: + return node.parent.parent.parent; + case 258 /* ExportSpecifier */: + case 252 /* NamespaceImport */: + return node.parent.parent; + case 251 /* ImportClause */: + return node.parent; + case 205 /* BinaryExpression */: + return ts.isExpressionStatement(node.parent) ? + node.parent : + node; + case 228 /* ForOfStatement */: + case 227 /* ForInStatement */: + return { + start: node.initializer, + end: node.expression + }; + case 276 /* PropertyAssignment */: + case 277 /* ShorthandPropertyAssignment */: + return ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? + getContextNode(ts.findAncestor(node.parent, function (node) { + return ts.isBinaryExpression(node) || ts.isForInOrOfStatement(node); + })) : + node; + default: + return node; + } + } + FindAllReferences.getContextNode = getContextNode; + function toContextSpan(textSpan, sourceFile, context) { + if (!context) + return undefined; + var contextSpan = isContextWithStartAndEndNode(context) ? + getTextSpan(context.start, sourceFile, context.end) : + getTextSpan(context, sourceFile); + return contextSpan.start !== textSpan.start || contextSpan.length !== textSpan.length ? + { contextSpan: contextSpan } : + undefined; + } + FindAllReferences.toContextSpan = toContextSpan; function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) { var node = ts.getTouchingPropertyName(sourceFile, position); var referencedSymbols = FindAllReferences.Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken); @@ -102891,7 +105805,16 @@ var ts; var symbol = def.symbol; var _a = getDefinitionKindAndDisplayParts(symbol, checker, originalNode), displayParts_1 = _a.displayParts, kind_1 = _a.kind; var name_1 = displayParts_1.map(function (p) { return p.text; }).join(""); - return { node: symbol.declarations ? ts.getNameOfDeclaration(ts.first(symbol.declarations)) || ts.first(symbol.declarations) : originalNode, name: name_1, kind: kind_1, displayParts: displayParts_1 }; + var declaration = symbol.declarations ? ts.first(symbol.declarations) : undefined; + return { + node: declaration ? + ts.getNameOfDeclaration(declaration) || declaration : + originalNode, + name: name_1, + kind: kind_1, + displayParts: displayParts_1, + context: getContextNode(declaration) + }; } case 1 /* Label */: { var node_1 = def.node; @@ -102916,9 +105839,13 @@ var ts; return ts.Debug.assertNever(def); } })(); - var node = info.node, name = info.name, kind = info.kind, displayParts = info.displayParts; + var node = info.node, name = info.name, kind = info.kind, displayParts = info.displayParts, context = info.context; var sourceFile = node.getSourceFile(); - return { containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind, name: name, textSpan: getTextSpan(ts.isComputedPropertyName(node) ? node.expression : node, sourceFile), displayParts: displayParts }; + var textSpan = getTextSpan(ts.isComputedPropertyName(node) ? node.expression : node, sourceFile); + return __assign({ containerKind: "" /* unknown */, containerName: "", fileName: sourceFile.fileName, kind: kind, + name: name, + textSpan: textSpan, + displayParts: displayParts }, toContextSpan(textSpan, sourceFile, context)); } function getDefinitionKindAndDisplayParts(symbol, checker, node) { var meaning = FindAllReferences.Core.getIntersectingMeaningFromDeclarations(node, symbol); @@ -102927,24 +105854,18 @@ var ts; return { displayParts: displayParts, kind: symbolKind }; } function toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixText) { - return __assign({}, entryToDocumentSpan(entry), (providePrefixAndSuffixText && getPrefixAndSuffixText(entry, originalNode, checker))); + return __assign(__assign({}, entryToDocumentSpan(entry)), (providePrefixAndSuffixText && getPrefixAndSuffixText(entry, originalNode, checker))); } FindAllReferences.toRenameLocation = toRenameLocation; function toReferenceEntry(entry) { - var _a = entryToDocumentSpan(entry), textSpan = _a.textSpan, fileName = _a.fileName; + var documentSpan = entryToDocumentSpan(entry); if (entry.kind === 0 /* Span */) { - return { textSpan: textSpan, fileName: fileName, isWriteAccess: false, isDefinition: false }; + return __assign(__assign({}, documentSpan), { isWriteAccess: false, isDefinition: false }); } var kind = entry.kind, node = entry.node; - return { - textSpan: textSpan, - fileName: fileName, - isWriteAccess: isWriteAccessForReference(node), - isDefinition: node.kind === 81 /* DefaultKeyword */ + return __assign(__assign({}, documentSpan), { isWriteAccess: isWriteAccessForReference(node), isDefinition: node.kind === 81 /* DefaultKeyword */ || !!ts.getDeclarationFromName(node) - || ts.isLiteralComputedPropertyDeclarationName(node), - isInString: kind === 2 /* StringLiteral */ ? true : undefined, - }; + || ts.isLiteralComputedPropertyDeclarationName(node), isInString: kind === 2 /* StringLiteral */ ? true : undefined }); } FindAllReferences.toReferenceEntry = toReferenceEntry; function entryToDocumentSpan(entry) { @@ -102953,7 +105874,8 @@ var ts; } else { var sourceFile = entry.node.getSourceFile(); - return { textSpan: getTextSpan(entry.node, sourceFile), fileName: sourceFile.fileName }; + var textSpan = getTextSpan(entry.node, sourceFile); + return __assign({ textSpan: textSpan, fileName: sourceFile.fileName }, toContextSpan(textSpan, sourceFile, entry.context)); } } function getPrefixAndSuffixText(entry, originalNode, checker) { @@ -102982,14 +105904,13 @@ var ts; return ts.emptyOptions; } function toImplementationLocation(entry, checker) { + var documentSpan = entryToDocumentSpan(entry); if (entry.kind !== 0 /* Span */) { var node = entry.node; - var sourceFile = node.getSourceFile(); - return __assign({ textSpan: getTextSpan(node, sourceFile), fileName: sourceFile.fileName }, implementationKindDisplayParts(node, checker)); + return __assign(__assign({}, documentSpan), implementationKindDisplayParts(node, checker)); } else { - var textSpan = entry.textSpan, fileName = entry.fileName; - return { textSpan: textSpan, fileName: fileName, kind: "" /* unknown */, displayParts: [] }; + return __assign(__assign({}, documentSpan), { kind: "" /* unknown */, displayParts: [] }); } } function implementationKindDisplayParts(node, checker) { @@ -103014,25 +105935,26 @@ var ts; } } function toHighlightSpan(entry) { + var documentSpan = entryToDocumentSpan(entry); if (entry.kind === 0 /* Span */) { - var fileName = entry.fileName, textSpan = entry.textSpan; - return { fileName: fileName, span: { textSpan: textSpan, kind: "reference" /* reference */ } }; + return { + fileName: documentSpan.fileName, + span: { + textSpan: documentSpan.textSpan, + kind: "reference" /* reference */ + } + }; } - var node = entry.node, kind = entry.kind; - var sourceFile = node.getSourceFile(); - var writeAccess = isWriteAccessForReference(node); - var span = { - textSpan: getTextSpan(node, sourceFile), - kind: writeAccess ? "writtenReference" /* writtenReference */ : "reference" /* reference */, - isInString: kind === 2 /* StringLiteral */ ? true : undefined, - }; - return { fileName: sourceFile.fileName, span: span }; + var writeAccess = isWriteAccessForReference(entry.node); + var span = __assign({ textSpan: documentSpan.textSpan, kind: writeAccess ? "writtenReference" /* writtenReference */ : "reference" /* reference */, isInString: entry.kind === 2 /* StringLiteral */ ? true : undefined }, documentSpan.contextSpan && { contextSpan: documentSpan.contextSpan }); + return { fileName: documentSpan.fileName, span: span }; } FindAllReferences.toHighlightSpan = toHighlightSpan; - function getTextSpan(node, sourceFile) { + function getTextSpan(node, sourceFile, endNode) { var start = node.getStart(sourceFile); - var end = node.getEnd(); + var end = (endNode || node).getEnd(); if (node.kind === 10 /* StringLiteral */) { + ts.Debug.assert(endNode === undefined); start += 1; end -= 1; } @@ -103069,8 +105991,8 @@ var ts; case 249 /* ImportEqualsDeclaration */: case 254 /* ImportSpecifier */: case 242 /* InterfaceDeclaration */: - case 303 /* JSDocCallbackTag */: - case 310 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: case 268 /* JsxAttribute */: case 245 /* ModuleDeclaration */: case 248 /* NamespaceExportDeclaration */: @@ -103095,8 +106017,8 @@ var ts; return !!decl.initializer || ts.isCatchClause(decl.parent); case 156 /* MethodSignature */: case 154 /* PropertySignature */: - case 311 /* JSDocPropertyTag */: - case 305 /* JSDocParameterTag */: + case 313 /* JSDocPropertyTag */: + case 307 /* JSDocParameterTag */: return false; default: return ts.Debug.failBadSyntaxKind(decl); @@ -103287,10 +106209,23 @@ var ts; } return references.length ? [{ definition: { type: 0 /* Symbol */, symbol: symbol }, references: references }] : ts.emptyArray; } + /** As in a `readonly prop: any` or `constructor(readonly prop: any)`, not a `readonly any[]`. */ + function isReadonlyTypeOperator(node) { + return node.kind === 134 /* ReadonlyKeyword */ + && ts.isTypeOperatorNode(node.parent) + && node.parent.operator === 134 /* ReadonlyKeyword */; + } /** getReferencedSymbols for special node kinds. */ function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { if (ts.isTypeKeyword(node.kind)) { - return getAllReferencesForKeyword(sourceFiles, node.kind, cancellationToken); + // A modifier readonly (like on a property declaration) is not special; + // a readonly type keyword (like `readonly string[]`) is. + if (node.kind === 134 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { + return undefined; + } + // Likewise, when we *are* looking for a special keyword, make sure we + // *don’t* include readonly member modifiers. + return getAllReferencesForKeyword(sourceFiles, node.kind, cancellationToken, node.kind === 134 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : undefined); } // Labels if (ts.isJumpStatementTarget(node)) { @@ -103649,7 +106584,7 @@ var ts; } Core.isSymbolReferencedInFile = isSymbolReferencedInFile; function eachSymbolReferenceInFile(definition, checker, sourceFile, cb) { - var symbol = ts.isParameterPropertyDeclaration(definition.parent) + var symbol = ts.isParameterPropertyDeclaration(definition.parent, definition.parent.parent) ? ts.first(checker.getSymbolsOfParameterPropertyDeclaration(definition.parent, definition.text)) : checker.getSymbolAtLocation(definition); if (!symbol) @@ -103715,8 +106650,8 @@ var ts; // We found a match. Make sure it's not part of a larger word (i.e. the char // before and after it have to be a non-identifier char). var endPosition = position + symbolNameLength; - if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 8 /* Latest */)) && - (endPosition === sourceLength || !ts.isIdentifierPart(text.charCodeAt(endPosition), 8 /* Latest */))) { + if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 99 /* Latest */)) && + (endPosition === sourceLength || !ts.isIdentifierPart(text.charCodeAt(endPosition), 99 /* Latest */))) { // Found a real match. Keep searching. positions.push(position); } @@ -103751,11 +106686,13 @@ var ts; return false; } } - function getAllReferencesForKeyword(sourceFiles, keywordKind, cancellationToken) { + function getAllReferencesForKeyword(sourceFiles, keywordKind, cancellationToken, filter) { var references = ts.flatMap(sourceFiles, function (sourceFile) { cancellationToken.throwIfCancellationRequested(); return ts.mapDefined(getPossibleSymbolReferenceNodes(sourceFile, ts.tokenToString(keywordKind), sourceFile), function (referenceLocation) { - return referenceLocation.kind === keywordKind ? FindAllReferences.nodeEntry(referenceLocation) : undefined; + if (referenceLocation.kind === keywordKind && (!filter || filter(referenceLocation))) { + return FindAllReferences.nodeEntry(referenceLocation); + } }); }); return references.length ? [{ definition: { type: 2 /* Keyword */, node: references[0].node }, references: references }] : undefined; @@ -104318,7 +107255,7 @@ var ts; var res = fromRoot(symbol); if (res) return res; - if (symbol.valueDeclaration && ts.isParameterPropertyDeclaration(symbol.valueDeclaration)) { + if (symbol.valueDeclaration && ts.isParameterPropertyDeclaration(symbol.valueDeclaration, symbol.valueDeclaration.parent)) { // For a parameter property, now try on the other symbol (property if this was a parameter, parameter if this was a property). var paramProps = checker.getSymbolsOfParameterPropertyDeclaration(ts.cast(symbol.valueDeclaration, ts.isParameter), symbol.name); ts.Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); // is [parameter, property] @@ -104719,7 +107656,7 @@ var ts; else { var defs = getDefinitionFromSymbol(typeChecker, symbol, node) || ts.emptyArray; // For a 'super()' call, put the signature first, else put the variable first. - return node.kind === 99 /* SuperKeyword */ ? [sigInfo].concat(defs) : defs.concat([sigInfo]); + return node.kind === 99 /* SuperKeyword */ ? __spreadArrays([sigInfo], defs) : __spreadArrays(defs, [sigInfo]); } } // Because name in short-hand property assignment has two different meanings: property name and property value, @@ -104783,7 +107720,7 @@ var ts; function getReferenceAtPosition(sourceFile, position, program) { var referencePath = findReferenceInPosition(sourceFile.referencedFiles, position); if (referencePath) { - var file = ts.tryResolveScriptReference(program, sourceFile, referencePath); + var file = program.getSourceFileFromReference(sourceFile, referencePath); return file && { fileName: referencePath.fileName, file: file }; } var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position); @@ -104897,18 +107834,21 @@ var ts; } } function getDefinitionFromSymbol(typeChecker, symbol, node) { - return getConstructSignatureDefinition() || getCallSignatureDefinition() || ts.map(symbol.declarations, function (declaration) { return createDefinitionInfo(declaration, typeChecker, symbol, node); }); + // There are cases when you extend a function by adding properties to it afterwards, + // we want to strip those extra properties + var filteredDeclarations = ts.filter(symbol.declarations, function (d) { return !ts.isAssignmentDeclaration(d) || d === symbol.valueDeclaration; }) || undefined; + return getConstructSignatureDefinition() || getCallSignatureDefinition() || ts.map(filteredDeclarations, function (declaration) { return createDefinitionInfo(declaration, typeChecker, symbol, node); }); function getConstructSignatureDefinition() { // Applicable only if we are in a new expression, or we are on a constructor declaration // and in either case the symbol has a construct signature definition, i.e. class if (symbol.flags & 32 /* Class */ && (ts.isNewExpressionTarget(node) || node.kind === 125 /* ConstructorKeyword */)) { - var cls = ts.find(symbol.declarations, ts.isClassLike) || ts.Debug.fail("Expected declaration to have at least one class-like declaration"); + var cls = ts.find(filteredDeclarations, ts.isClassLike) || ts.Debug.fail("Expected declaration to have at least one class-like declaration"); return getSignatureDefinition(cls.members, /*selectConstructors*/ true); } } function getCallSignatureDefinition() { return ts.isCallOrNewExpressionTarget(node) || ts.isNameOfFunctionDeclaration(node) - ? getSignatureDefinition(symbol.declarations, /*selectConstructors*/ false) + ? getSignatureDefinition(filteredDeclarations, /*selectConstructors*/ false) : undefined; } function getSignatureDefinition(signatureDeclarations, selectConstructors) { @@ -104932,14 +107872,9 @@ var ts; function createDefinitionInfoFromName(declaration, symbolKind, symbolName, containerName) { var name = ts.getNameOfDeclaration(declaration) || declaration; var sourceFile = name.getSourceFile(); - return { - fileName: sourceFile.fileName, - textSpan: ts.createTextSpanFromNode(name, sourceFile), - kind: symbolKind, - name: symbolName, - containerKind: undefined, - containerName: containerName - }; + var textSpan = ts.createTextSpanFromNode(name, sourceFile); + return __assign({ fileName: sourceFile.fileName, textSpan: textSpan, kind: symbolKind, name: symbolName, containerKind: undefined, // TODO: GH#18217 + containerName: containerName }, ts.FindAllReferences.toContextSpan(textSpan, sourceFile, ts.FindAllReferences.getContextNode(declaration))); } function createDefinitionFromSignatureDeclaration(typeChecker, decl) { return createDefinitionInfo(decl, typeChecker, decl.symbol, decl); @@ -105095,11 +108030,11 @@ var ts; JsDoc.getJsDocCommentsFromDeclarations = getJsDocCommentsFromDeclarations; function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 305 /* JSDocParameterTag */: - case 311 /* JSDocPropertyTag */: + case 307 /* JSDocParameterTag */: + case 313 /* JSDocPropertyTag */: return [declaration]; - case 303 /* JSDocCallbackTag */: - case 310 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return ts.getJSDocCommentsAndTags(declaration); @@ -105120,16 +108055,16 @@ var ts; function getCommentText(tag) { var comment = tag.comment; switch (tag.kind) { - case 301 /* JSDocAugmentsTag */: + case 302 /* JSDocAugmentsTag */: return withNode(tag.class); - case 309 /* JSDocTemplateTag */: + case 311 /* JSDocTemplateTag */: return withList(tag.typeParameters); - case 308 /* JSDocTypeTag */: + case 310 /* JSDocTypeTag */: return withNode(tag.typeExpression); - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: - case 311 /* JSDocPropertyTag */: - case 305 /* JSDocParameterTag */: + case 312 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: + case 313 /* JSDocPropertyTag */: + case 307 /* JSDocParameterTag */: var name = tag.name; return name ? withNode(name) : comment; default: @@ -105640,7 +108575,7 @@ var ts; // Parameter properties are children of the class, not the constructor. for (var _i = 0, _a = ctr.parameters; _i < _a.length; _i++) { var param = _a[_i]; - if (ts.isParameterPropertyDeclaration(param)) { + if (ts.isParameterPropertyDeclaration(param, ctr)) { addLeafNode(param); } } @@ -105954,8 +108889,8 @@ var ts; case 245 /* ModuleDeclaration */: case 285 /* SourceFile */: case 243 /* TypeAliasDeclaration */: - case 310 /* JSDocTypedefTag */: - case 303 /* JSDocCallbackTag */: + case 312 /* JSDocTypedefTag */: + case 305 /* JSDocCallbackTag */: return true; case 158 /* Constructor */: case 157 /* MethodDeclaration */: @@ -106201,7 +109136,7 @@ var ts; var usedImports = []; for (var _i = 0, oldImports_1 = oldImports; _i < oldImports_1.length; _i++) { var importDecl = oldImports_1[_i]; - var importClause = importDecl.importClause; + var importClause = importDecl.importClause, moduleSpecifier = importDecl.moduleSpecifier; if (!importClause) { // Imports without import clauses are assumed to be included for their side effects and are not removed. usedImports.push(importDecl); @@ -106232,6 +109167,20 @@ var ts; if (name || namedBindings) { usedImports.push(updateImportDeclarationAndClause(importDecl, name, namedBindings)); } + // If a module is imported to be augmented, it’s used + else if (hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier)) { + // If we’re in a declaration file, it’s safe to remove the import clause from it + if (sourceFile.isDeclarationFile) { + usedImports.push(ts.createImportDeclaration(importDecl.decorators, importDecl.modifiers, + /*importClause*/ undefined, moduleSpecifier)); + } + // If we’re not in a declaration file, we can’t remove the import clause even though + // the imported symbols are unused, because removing them makes it look like the import + // declaration has side effects, which will cause it to be preserved in the JS emit. + else { + usedImports.push(importDecl); + } + } } return usedImports; function isDeclarationUsed(identifier) { @@ -106239,6 +109188,13 @@ var ts; return jsxElementsPresent && (identifier.text === jsxNamespace) || ts.FindAllReferences.Core.isSymbolReferencedInFile(identifier, typeChecker, sourceFile); } } + function hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier) { + var moduleSpecifierText = ts.isStringLiteral(moduleSpecifier) && moduleSpecifier.text; + return ts.isString(moduleSpecifierText) && ts.some(sourceFile.moduleAugmentations, function (moduleName) { + return ts.isStringLiteral(moduleName) + && moduleName.text === moduleSpecifierText; + }); + } function getExternalModuleName(specifier) { return specifier !== undefined && ts.isStringLiteralLike(specifier) ? specifier.text @@ -106487,9 +109443,9 @@ var ts; function addRegionOutliningSpans(sourceFile, out) { var regions = []; var lineStarts = sourceFile.getLineStarts(); - for (var i = 0; i < lineStarts.length; i++) { - var currentLineStart = lineStarts[i]; - var lineEnd = i + 1 === lineStarts.length ? sourceFile.getEnd() : lineStarts[i + 1] - 1; + for (var _i = 0, lineStarts_1 = lineStarts; _i < lineStarts_1.length; _i++) { + var currentLineStart = lineStarts_1[_i]; + var lineEnd = sourceFile.getLineEndOfPosition(currentLineStart); var lineText = sourceFile.text.substring(currentLineStart, lineEnd); var result = isRegionDelimiter(lineText); if (!result || ts.isInComment(sourceFile, currentLineStart)) { @@ -106609,6 +109565,8 @@ var ts; return spanForObjectOrArrayLiteral(n, 22 /* OpenBracketToken */); case 261 /* JsxElement */: return spanForJSXElement(n); + case 265 /* JsxFragment */: + return spanForJSXFragment(n); case 262 /* JsxSelfClosingElement */: case 263 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); @@ -106619,6 +109577,11 @@ var ts; var bannerText = "<" + tagName + ">..."; return createOutliningSpan(textSpan, "code" /* Code */, textSpan, /*autoCollapse*/ false, bannerText); } + function spanForJSXFragment(node) { + var textSpan = ts.createTextSpanFromBounds(node.openingFragment.getStart(sourceFile), node.closingFragment.getEnd()); + var bannerText = "<>..."; + return createOutliningSpan(textSpan, "code" /* Code */, textSpan, /*autoCollapse*/ false, bannerText); + } function spanForJSXAttributes(node) { if (node.properties.length === 0) { return undefined; @@ -106917,7 +109880,7 @@ var ts; if (ch >= 65 /* A */ && ch <= 90 /* Z */) { return true; } - if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 8 /* Latest */)) { + if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 99 /* Latest */)) { return false; } // TODO: find a way to determine this for any unicode characters in a @@ -106930,7 +109893,7 @@ var ts; if (ch >= 97 /* a */ && ch <= 122 /* z */) { return true; } - if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 8 /* Latest */)) { + if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 99 /* Latest */)) { return false; } // TODO: find a way to determine this for any unicode characters in a @@ -107580,7 +110543,7 @@ var ts; if (node.getStart(sourceFile) > pos) { break outer; } - if (positionShouldSnapToNode(pos, node, nextNode)) { + if (positionShouldSnapToNode(sourceFile, pos, node)) { // 1. Blocks are effectively redundant with SyntaxLists. // 2. TemplateSpans, along with the SyntaxLists containing them, are a somewhat unintuitive grouping // of things that should be considered independently. @@ -107623,15 +110586,24 @@ var ts; parentNode = node; break; } + // If we made it to the end of the for loop, we’re done. + // In practice, I’ve only seen this happen at the very end + // of a SourceFile. + if (i === children.length - 1) { + break outer; + } } } return selectionRange; function pushSelectionRange(start, end) { // Skip empty ranges if (start !== end) { - // Skip ranges that are identical to the parent var textSpan = ts.createTextSpanFromBounds(start, end); - if (!selectionRange || !ts.textSpansEqual(textSpan, selectionRange.textSpan)) { + if (!selectionRange || ( + // Skip ranges that are identical to the parent + !ts.textSpansEqual(textSpan, selectionRange.textSpan) && + // Skip ranges that don’t contain the original position + ts.textSpanIntersectsWithPosition(textSpan, pos))) { selectionRange = __assign({ textSpan: textSpan }, selectionRange && { parent: selectionRange }); } } @@ -107643,12 +110615,11 @@ var ts; * count too, unless that position belongs to the next node. In effect, makes * selections able to snap to preceding tokens when the cursor is on the tail * end of them with only whitespace ahead. + * @param sourceFile The source file containing the nodes. * @param pos The position to check. * @param node The candidate node to snap to. - * @param nextNode The next sibling node in the tree. - * @param sourceFile The source file containing the nodes. */ - function positionShouldSnapToNode(pos, node, nextNode) { + function positionShouldSnapToNode(sourceFile, pos, node) { // Can’t use 'ts.positionBelongsToNode()' here because it cleverly accounts // for missing nodes, which can’t really be considered when deciding what // to select. @@ -107657,9 +110628,8 @@ var ts; return true; } var nodeEnd = node.getEnd(); - var nextNodeStart = nextNode && nextNode.getStart(); if (nodeEnd === pos) { - return pos !== nextNodeStart; + return ts.getTouchingPropertyName(sourceFile, pos).pos < node.end; } return false; } @@ -107808,7 +110778,7 @@ var ts; } function createSyntaxList(children) { ts.Debug.assertGreaterThanOrEqual(children.length, 1); - var syntaxList = ts.createNode(312 /* SyntaxList */, children[0].pos, ts.last(children).end); + var syntaxList = ts.createNode(314 /* SyntaxList */, children[0].pos, ts.last(children).end); syntaxList._children = children; return syntaxList; } @@ -108298,14 +111268,14 @@ var ts; var parameters = typeParameters.map(function (t) { return createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer); }); var documentation = symbol.getDocumentationComment(checker); var tags = symbol.getJsDocTags(); - var prefixDisplayParts = typeSymbolDisplay.concat([ts.punctuationPart(28 /* LessThanToken */)]); + var prefixDisplayParts = __spreadArrays(typeSymbolDisplay, [ts.punctuationPart(28 /* LessThanToken */)]); return { isVariadic: false, prefixDisplayParts: prefixDisplayParts, suffixDisplayParts: [ts.punctuationPart(30 /* GreaterThanToken */)], separatorDisplayParts: separatorDisplayParts, parameters: parameters, documentation: documentation, tags: tags }; } var separatorDisplayParts = [ts.punctuationPart(27 /* CommaToken */), ts.spacePart()]; function getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, checker, enclosingDeclaration, sourceFile) { var _a = (isTypeParameterList ? itemInfoForTypeParameters : itemInfoForParameters)(candidateSignature, checker, enclosingDeclaration, sourceFile), isVariadic = _a.isVariadic, parameters = _a.parameters, prefix = _a.prefix, suffix = _a.suffix; - var prefixDisplayParts = callTargetDisplayParts.concat(prefix); - var suffixDisplayParts = suffix.concat(returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker)); + var prefixDisplayParts = __spreadArrays(callTargetDisplayParts, prefix); + var suffixDisplayParts = __spreadArrays(suffix, returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker)); var documentation = candidateSignature.getDocumentationComment(checker); var tags = candidateSignature.getJsDocTags(); return { isVariadic: isVariadic, prefixDisplayParts: prefixDisplayParts, suffixDisplayParts: suffixDisplayParts, separatorDisplayParts: separatorDisplayParts, parameters: parameters, documentation: documentation, tags: tags }; @@ -108329,10 +111299,10 @@ var ts; var parameters = (typeParameters || ts.emptyArray).map(function (t) { return createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer); }); var parameterParts = ts.mapToDisplayParts(function (writer) { var thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : []; - var params = ts.createNodeArray(thisParameter.concat(checker.getExpandedParameters(candidateSignature).map(function (param) { return checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags); }))); + var params = ts.createNodeArray(__spreadArrays(thisParameter, checker.getExpandedParameters(candidateSignature).map(function (param) { return checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags); }))); printer.writeList(2576 /* CallExpressionArguments */, params, sourceFile, writer); }); - return { isVariadic: false, parameters: parameters, prefix: [ts.punctuationPart(28 /* LessThanToken */)], suffix: [ts.punctuationPart(30 /* GreaterThanToken */)].concat(parameterParts) }; + return { isVariadic: false, parameters: parameters, prefix: [ts.punctuationPart(28 /* LessThanToken */)], suffix: __spreadArrays([ts.punctuationPart(30 /* GreaterThanToken */)], parameterParts) }; } function itemInfoForParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) { var isVariadic = checker.hasEffectiveRestParameter(candidateSignature); @@ -108344,7 +111314,7 @@ var ts; } }); var parameters = checker.getExpandedParameters(candidateSignature).map(function (p) { return createSignatureHelpParameterForParameter(p, checker, enclosingDeclaration, sourceFile, printer); }); - return { isVariadic: isVariadic, parameters: parameters, prefix: typeParameterParts.concat([ts.punctuationPart(20 /* OpenParenToken */)]), suffix: [ts.punctuationPart(21 /* CloseParenToken */)] }; + return { isVariadic: isVariadic, parameters: parameters, prefix: __spreadArrays(typeParameterParts, [ts.punctuationPart(20 /* OpenParenToken */)]), suffix: [ts.punctuationPart(21 /* CloseParenToken */)] }; } function createSignatureHelpParameterForParameter(parameter, checker, enclosingDeclaration, sourceFile, printer) { var displayParts = ts.mapToDisplayParts(function (writer) { @@ -109317,32 +112287,24 @@ var ts; */ function transpileModule(input, transpileOptions) { var diagnostics = []; - var options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : ts.getDefaultCompilerOptions(); - options.isolatedModules = true; + var options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : {}; + // mix in default options + var defaultOptions = ts.getDefaultCompilerOptions(); + for (var key in defaultOptions) { + if (ts.hasProperty(defaultOptions, key) && options[key] === undefined) { + options[key] = defaultOptions[key]; + } + } + for (var _i = 0, transpileOptionValueCompilerOptions_1 = ts.transpileOptionValueCompilerOptions; _i < transpileOptionValueCompilerOptions_1.length; _i++) { + var option = transpileOptionValueCompilerOptions_1[_i]; + options[option.name] = option.transpileOptionValue; + } // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths. options.suppressOutputPathCheck = true; // Filename can be non-ts file. options.allowNonTsExtensions = true; - // We are not returning a sourceFile for lib file when asked by the program, - // so pass --noLib to avoid reporting a file not found error. - options.noLib = true; - // Clear out other settings that would not be used in transpiling this module - options.lib = undefined; - options.types = undefined; - options.noEmit = undefined; - options.noEmitOnError = undefined; - options.paths = undefined; - options.rootDirs = undefined; - options.declaration = undefined; - options.composite = undefined; - options.declarationDir = undefined; - options.out = undefined; - options.outFile = undefined; - // We are not doing a full typecheck, we are not resolving the whole context, - // so pass --noResolve to avoid reporting missing file errors. - options.noResolve = true; // if jsx is specified then treat file as .tsx - var inputFileName = transpileOptions.fileName || (options.jsx ? "module.tsx" : "module.ts"); + var inputFileName = transpileOptions.fileName || (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx ? "module.tsx" : "module.ts"); var sourceFile = ts.createSourceFile(inputFileName, input, options.target); // TODO: GH#18217 if (transpileOptions.moduleName) { sourceFile.moduleName = transpileOptions.moduleName; @@ -109523,8 +112485,8 @@ var ts; (function (ts) { var formatting; (function (formatting) { - var standardScanner = ts.createScanner(8 /* Latest */, /*skipTrivia*/ false, 0 /* Standard */); - var jsxScanner = ts.createScanner(8 /* Latest */, /*skipTrivia*/ false, 1 /* JSX */); + var standardScanner = ts.createScanner(99 /* Latest */, /*skipTrivia*/ false, 0 /* Standard */); + var jsxScanner = ts.createScanner(99 /* Latest */, /*skipTrivia*/ false, 1 /* JSX */); var ScanAction; (function (ScanAction) { ScanAction[ScanAction["Scan"] = 0] = "Scan"; @@ -109790,7 +112752,7 @@ var ts; return { tokens: allTokens.filter(function (t) { return !tokens.some(function (t2) { return t2 === t; }); }), isSpecific: false }; } var anyToken = { tokens: allTokens, isSpecific: false }; - var anyTokenIncludingMultilineComments = tokenRangeFrom(allTokens.concat([3 /* MultiLineCommentTrivia */])); + var anyTokenIncludingMultilineComments = tokenRangeFrom(__spreadArrays(allTokens, [3 /* MultiLineCommentTrivia */])); var keywords = tokenRangeFromRange(74 /* FirstKeyword */, 148 /* LastKeyword */); var binaryOperators = tokenRangeFromRange(28 /* FirstBinaryOperator */, 72 /* LastBinaryOperator */); var binaryKeywordOperators = [94 /* InKeyword */, 95 /* InstanceOfKeyword */, 148 /* OfKeyword */, 120 /* AsKeyword */, 129 /* IsKeyword */]; @@ -109804,7 +112766,7 @@ var ts; var unaryPredecrementExpressions = [73 /* Identifier */, 20 /* OpenParenToken */, 101 /* ThisKeyword */, 96 /* NewKeyword */]; var unaryPostdecrementExpressions = [73 /* Identifier */, 21 /* CloseParenToken */, 23 /* CloseBracketToken */, 96 /* NewKeyword */]; var comments = [2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]; - var typeNames = [73 /* Identifier */].concat(ts.typeKeywords); + var typeNames = __spreadArrays([73 /* Identifier */], ts.typeKeywords); // Place a space before open brace in a function declaration // TypeScript: Function can have return types, which can be made of tons of different token kinds var functionOpenBraceLeftTokenRange = anyTokenIncludingMultilineComments; @@ -109956,6 +112918,7 @@ var ts; ], [isEndOfDecoratorContextOnSameLine], 2 /* Space */), rule("NoSpaceBeforeNonNullAssertionOperator", anyToken, 52 /* ExclamationToken */, [isNonJsxSameLineTokenContext, isNonNullAssertionContext], 8 /* Delete */), rule("NoSpaceAfterNewKeywordOnConstructorSignature", 96 /* NewKeyword */, 20 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 8 /* Delete */), + rule("SpaceLessThanAndNonJSXTypeAnnotation", 28 /* LessThanToken */, 28 /* LessThanToken */, [isNonJsxSameLineTokenContext], 2 /* Space */), ]; // These rules are applied after high priority var userConfigurableRules = [ @@ -110041,9 +113004,21 @@ var ts; // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. rule("SpaceAfterTryFinally", [104 /* TryKeyword */, 89 /* FinallyKeyword */], 18 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 2 /* Space */), ]; - return highPriorityCommonRules.concat(userConfigurableRules, lowPriorityCommonRules); + return __spreadArrays(highPriorityCommonRules, userConfigurableRules, lowPriorityCommonRules); } formatting.getAllRules = getAllRules; + /** + * A rule takes a two tokens (left/right) and a particular context + * for which you're meant to look at them. You then declare what should the + * whitespace annotation be between these tokens via the action param. + * + * @param debugName Name to print + * @param left The left side of the comparison + * @param right The right side of the comparison + * @param context A set of filters to narrow down the space in which this formatter rule applies + * @param action a declaration of the expected whitespace + * @param flags whether the rule deletes a line or not, defaults to no-op + */ function rule(debugName, left, right, context, action, flags) { if (flags === void 0) { flags = 0 /* None */; } return { leftTokenRange: toTokenRange(left), rightTokenRange: toTokenRange(right), rule: { debugName: debugName, context: context, action: action, flags: flags } }; @@ -110832,6 +113807,9 @@ var ts; else if (formatting.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { return { indentation: parentDynamicIndentation.getIndentation(), delta: delta }; } + else if (formatting.SmartIndenter.argumentStartsOnSameLineAsPreviousArgument(parent, node, startLine, sourceFile)) { + return { indentation: parentDynamicIndentation.getIndentation(), delta: delta }; + } else { return { indentation: parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(node), delta: delta }; } @@ -111795,6 +114773,23 @@ var ts; return false; } SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement; + function argumentStartsOnSameLineAsPreviousArgument(parent, child, childStartLine, sourceFile) { + if (ts.isCallOrNewExpression(parent)) { + if (!parent.arguments) + return false; + var currentNode = ts.Debug.assertDefined(ts.find(parent.arguments, function (arg) { return arg.pos === child.pos; })); + var currentIndex = parent.arguments.indexOf(currentNode); + if (currentIndex === 0) + return false; // Can't look at previous node if first + var previousNode = parent.arguments[currentIndex - 1]; + var lineOfPreviousNode = ts.getLineAndCharacterOfPosition(sourceFile, previousNode.getEnd()).line; + if (childStartLine === lineOfPreviousNode) { + return true; + } + } + return false; + } + SmartIndenter.argumentStartsOnSameLineAsPreviousArgument = argumentStartsOnSameLineAsPreviousArgument; function getContainingList(node, sourceFile) { return node.parent && getListByRange(node.getStart(sourceFile), node.getEnd(), node.parent, sourceFile); } @@ -111826,7 +114821,7 @@ var ts; case 210 /* ClassExpression */: case 242 /* InterfaceDeclaration */: case 243 /* TypeAliasDeclaration */: - case 309 /* JSDocTemplateTag */: + case 311 /* JSDocTemplateTag */: return getList(node.typeParameters); case 193 /* NewExpression */: case 192 /* CallExpression */: @@ -112175,6 +115170,10 @@ var ts; } return s; } + function isThisTypeAnnotatable(containingFunction) { + return ts.isFunctionExpression(containingFunction) || ts.isFunctionDeclaration(containingFunction); + } + textChanges_3.isThisTypeAnnotatable = isThisTypeAnnotatable; var ChangeTracker = /** @class */ (function () { /** Public for tests only. Other callers should use `ChangeTracker.with`. */ function ChangeTracker(newLineCharacter, formatContext) { @@ -112331,6 +115330,11 @@ var ts; } this.insertNodeAt(sourceFile, endNode.end, type, { prefix: ": " }); }; + ChangeTracker.prototype.tryInsertThisTypeAnnotation = function (sourceFile, node, type) { + var start = ts.findChildOfKind(node, 20 /* OpenParenToken */, sourceFile).getStart(sourceFile) + 1; + var suffix = node.parameters.length ? ", " : ""; + this.insertNodeAt(sourceFile, start, type, { prefix: "this: ", suffix: suffix }); + }; ChangeTracker.prototype.insertTypeParameters = function (sourceFile, node, typeParameters) { // If no `(`, is an arrow function `x => x`, so use the pos of the first parameter var start = (ts.findChildOfKind(node, 20 /* OpenParenToken */, sourceFile) || ts.first(node.parameters)).getStart(sourceFile); @@ -112354,7 +115358,7 @@ var ts; ChangeTracker.prototype.insertNodeAtConstructorStart = function (sourceFile, ctr, newStatement) { var firstStatement = ts.firstOrUndefined(ctr.body.statements); if (!firstStatement || !ctr.body.multiLine) { - this.replaceConstructorBody(sourceFile, ctr, [newStatement].concat(ctr.body.statements)); + this.replaceConstructorBody(sourceFile, ctr, __spreadArrays([newStatement], ctr.body.statements)); } else { this.insertNodeBefore(sourceFile, firstStatement, newStatement); @@ -112363,7 +115367,7 @@ var ts; ChangeTracker.prototype.insertNodeAtConstructorEnd = function (sourceFile, ctr, newStatement) { var lastStatement = ts.lastOrUndefined(ctr.body.statements); if (!lastStatement || !ctr.body.multiLine) { - this.replaceConstructorBody(sourceFile, ctr, ctr.body.statements.concat([newStatement])); + this.replaceConstructorBody(sourceFile, ctr, __spreadArrays(ctr.body.statements, [newStatement])); } else { this.insertNodeAfter(sourceFile, lastStatement, newStatement); @@ -112396,7 +115400,7 @@ var ts; if (getMembersOrProperties(cls).length === 0) { if (ts.addToSeen(this.classesWithNodesInsertedAtStart, ts.getNodeId(cls), { node: cls, sourceFile: sourceFile })) { // For `class C {\n}`, don't add the trailing "\n" - var shouldSuffix = ts.positionsAreOnSameLine.apply(void 0, getClassOrObjectBraceEnds(cls, sourceFile).concat([sourceFile])); // TODO: GH#4130 remove 'as any' + var shouldSuffix = ts.positionsAreOnSameLine.apply(void 0, __spreadArrays(getClassOrObjectBraceEnds(cls, sourceFile), [sourceFile])); // TODO: GH#4130 remove 'as any' return { prefix: this.newLineCharacter, suffix: comma + (shouldSuffix ? this.newLineCharacter : "") }; } else { @@ -112435,7 +115439,7 @@ var ts; }; ChangeTracker.prototype.getInsertNodeAfterOptions = function (sourceFile, after) { var options = this.getInsertNodeAfterOptionsWorker(after); - return __assign({}, options, { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n" + options.prefix : "\n") : options.prefix }); + return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n" + options.prefix : "\n") : options.prefix }); }; ChangeTracker.prototype.getInsertNodeAfterOptionsWorker = function (node) { switch (node.kind) { @@ -112599,6 +115603,9 @@ var ts; } } }; + ChangeTracker.prototype.parenthesizeExpression = function (sourceFile, expression) { + this.replaceRange(sourceFile, ts.rangeOfNode(expression), ts.createParen(expression)); + }; ChangeTracker.prototype.finishClassesWithNodesInsertedAtStart = function () { var _this = this; this.classesWithNodesInsertedAtStart.forEach(function (_a) { @@ -112707,7 +115714,7 @@ var ts; function newFileChangesWorker(oldFile, scriptKind, statements, newLineCharacter, formatContext) { // TODO: this emits the file, parses it back, then formats it that -- may be a less roundabout way to do this var nonFormattedText = statements.map(function (s) { return getNonformattedText(s, oldFile, newLineCharacter).text; }).join(newLineCharacter); - var sourceFile = ts.createSourceFile("any file name", nonFormattedText, 8 /* ESNext */, /*setParentNodes*/ true, scriptKind); + var sourceFile = ts.createSourceFile("any file name", nonFormattedText, 99 /* ESNext */, /*setParentNodes*/ true, scriptKind); var changes = ts.formatting.formatDocument(sourceFile, formatContext); return applyChanges(nonFormattedText, changes) + newLineCharacter; } @@ -112747,9 +115754,10 @@ var ts; } /** Note: output node may be mutated input node. */ function getNonformattedText(node, sourceFile, newLineCharacter) { - var writer = new Writer(newLineCharacter); + var omitTrailingSemicolon = !!sourceFile && !ts.probablyUsesSemicolons(sourceFile); + var writer = createWriter(newLineCharacter, omitTrailingSemicolon); var newLine = newLineCharacter === "\n" ? 1 /* LineFeed */ : 0 /* CarriageReturnLineFeed */; - ts.createPrinter({ newLine: newLine, neverAsciiEscape: true }, writer).writeNode(4 /* Unspecified */, node, sourceFile, writer); + ts.createPrinter({ newLine: newLine, neverAsciiEscape: true, omitTrailingSemicolon: omitTrailingSemicolon }, writer).writeNode(4 /* Unspecified */, node, sourceFile, writer); return { text: writer.getText(), node: assignPositionsToNode(node) }; } changesToText.getNonformattedText = getNonformattedText; @@ -112784,136 +115792,162 @@ var ts; nodeArray.end = getEnd(nodes); return nodeArray; } - var Writer = /** @class */ (function () { - function Writer(newLine) { - var _this = this; - this.lastNonTriviaPosition = 0; - this.writer = ts.createTextWriter(newLine); - this.onEmitNode = function (hint, node, printCallback) { - if (node) { - setPos(node, _this.lastNonTriviaPosition); - } - printCallback(hint, node); - if (node) { - setEnd(node, _this.lastNonTriviaPosition); - } - }; - this.onBeforeEmitNodeArray = function (nodes) { - if (nodes) { - setPos(nodes, _this.lastNonTriviaPosition); - } - }; - this.onAfterEmitNodeArray = function (nodes) { - if (nodes) { - setEnd(nodes, _this.lastNonTriviaPosition); - } - }; - this.onBeforeEmitToken = function (node) { - if (node) { - setPos(node, _this.lastNonTriviaPosition); - } - }; - this.onAfterEmitToken = function (node) { - if (node) { - setEnd(node, _this.lastNonTriviaPosition); - } - }; - } - Writer.prototype.setLastNonTriviaPosition = function (s, force) { + function createWriter(newLine, omitTrailingSemicolon) { + var lastNonTriviaPosition = 0; + var writer = omitTrailingSemicolon ? ts.getTrailingSemicolonOmittingWriter(ts.createTextWriter(newLine)) : ts.createTextWriter(newLine); + var onEmitNode = function (hint, node, printCallback) { + if (node) { + setPos(node, lastNonTriviaPosition); + } + printCallback(hint, node); + if (node) { + setEnd(node, lastNonTriviaPosition); + } + }; + var onBeforeEmitNodeArray = function (nodes) { + if (nodes) { + setPos(nodes, lastNonTriviaPosition); + } + }; + var onAfterEmitNodeArray = function (nodes) { + if (nodes) { + setEnd(nodes, lastNonTriviaPosition); + } + }; + var onBeforeEmitToken = function (node) { + if (node) { + setPos(node, lastNonTriviaPosition); + } + }; + var onAfterEmitToken = function (node) { + if (node) { + setEnd(node, lastNonTriviaPosition); + } + }; + function setLastNonTriviaPosition(s, force) { if (force || !isTrivia(s)) { - this.lastNonTriviaPosition = this.writer.getTextPos(); + lastNonTriviaPosition = writer.getTextPos(); var i = 0; while (ts.isWhiteSpaceLike(s.charCodeAt(s.length - i - 1))) { i++; } // trim trailing whitespaces - this.lastNonTriviaPosition -= i; + lastNonTriviaPosition -= i; } + } + function write(s) { + writer.write(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeComment(s) { + writer.writeComment(s); + } + function writeKeyword(s) { + writer.writeKeyword(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeOperator(s) { + writer.writeOperator(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writePunctuation(s) { + writer.writePunctuation(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeTrailingSemicolon(s) { + writer.writeTrailingSemicolon(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeParameter(s) { + writer.writeParameter(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeProperty(s) { + writer.writeProperty(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeSpace(s) { + writer.writeSpace(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeStringLiteral(s) { + writer.writeStringLiteral(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeSymbol(s, sym) { + writer.writeSymbol(s, sym); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeLine() { + writer.writeLine(); + } + function increaseIndent() { + writer.increaseIndent(); + } + function decreaseIndent() { + writer.decreaseIndent(); + } + function getText() { + return writer.getText(); + } + function rawWrite(s) { + writer.rawWrite(s); + setLastNonTriviaPosition(s, /*force*/ false); + } + function writeLiteral(s) { + writer.writeLiteral(s); + setLastNonTriviaPosition(s, /*force*/ true); + } + function getTextPos() { + return writer.getTextPos(); + } + function getLine() { + return writer.getLine(); + } + function getColumn() { + return writer.getColumn(); + } + function getIndent() { + return writer.getIndent(); + } + function isAtStartOfLine() { + return writer.isAtStartOfLine(); + } + function clear() { + writer.clear(); + lastNonTriviaPosition = 0; + } + return { + onEmitNode: onEmitNode, + onBeforeEmitNodeArray: onBeforeEmitNodeArray, + onAfterEmitNodeArray: onAfterEmitNodeArray, + onBeforeEmitToken: onBeforeEmitToken, + onAfterEmitToken: onAfterEmitToken, + write: write, + writeComment: writeComment, + writeKeyword: writeKeyword, + writeOperator: writeOperator, + writePunctuation: writePunctuation, + writeTrailingSemicolon: writeTrailingSemicolon, + writeParameter: writeParameter, + writeProperty: writeProperty, + writeSpace: writeSpace, + writeStringLiteral: writeStringLiteral, + writeSymbol: writeSymbol, + writeLine: writeLine, + increaseIndent: increaseIndent, + decreaseIndent: decreaseIndent, + getText: getText, + rawWrite: rawWrite, + writeLiteral: writeLiteral, + getTextPos: getTextPos, + getLine: getLine, + getColumn: getColumn, + getIndent: getIndent, + isAtStartOfLine: isAtStartOfLine, + clear: clear }; - Writer.prototype.write = function (s) { - this.writer.write(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeComment = function (s) { - this.writer.writeComment(s); - }; - Writer.prototype.writeKeyword = function (s) { - this.writer.writeKeyword(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeOperator = function (s) { - this.writer.writeOperator(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writePunctuation = function (s) { - this.writer.writePunctuation(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeTrailingSemicolon = function (s) { - this.writer.writeTrailingSemicolon(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeParameter = function (s) { - this.writer.writeParameter(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeProperty = function (s) { - this.writer.writeProperty(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeSpace = function (s) { - this.writer.writeSpace(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeStringLiteral = function (s) { - this.writer.writeStringLiteral(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeSymbol = function (s, sym) { - this.writer.writeSymbol(s, sym); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeLine = function () { - this.writer.writeLine(); - }; - Writer.prototype.increaseIndent = function () { - this.writer.increaseIndent(); - }; - Writer.prototype.decreaseIndent = function () { - this.writer.decreaseIndent(); - }; - Writer.prototype.getText = function () { - return this.writer.getText(); - }; - Writer.prototype.rawWrite = function (s) { - this.writer.rawWrite(s); - this.setLastNonTriviaPosition(s, /*force*/ false); - }; - Writer.prototype.writeLiteral = function (s) { - this.writer.writeLiteral(s); - this.setLastNonTriviaPosition(s, /*force*/ true); - }; - Writer.prototype.getTextPos = function () { - return this.writer.getTextPos(); - }; - Writer.prototype.getLine = function () { - return this.writer.getLine(); - }; - Writer.prototype.getColumn = function () { - return this.writer.getColumn(); - }; - Writer.prototype.getIndent = function () { - return this.writer.getIndent(); - }; - Writer.prototype.isAtStartOfLine = function () { - return this.writer.isAtStartOfLine(); - }; - Writer.prototype.clear = function () { - this.writer.clear(); - this.lastNonTriviaPosition = 0; - }; - return Writer; - }()); + } function getInsertionPositionAtSourceFileTop(sourceFile) { var lastPrologue; for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { @@ -113269,6 +116303,262 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixId = "addMissingAwait"; + var propertyAccessCode = ts.Diagnostics.Property_0_does_not_exist_on_type_1.code; + var callableConstructableErrorCodes = [ + ts.Diagnostics.This_expression_is_not_callable.code, + ts.Diagnostics.This_expression_is_not_constructable.code, + ]; + var errorCodes = __spreadArrays([ + ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code, + ts.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code, + ts.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code, + ts.Diagnostics.Operator_0_cannot_be_applied_to_type_1.code, + ts.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2.code, + ts.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap.code, + ts.Diagnostics.Type_0_is_not_an_array_type.code, + ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type.code, + ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators.code, + ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + ts.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + ts.Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code, + ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + propertyAccessCode + ], callableConstructableErrorCodes); + codefix.registerCodeFix({ + fixIds: [fixId], + errorCodes: errorCodes, + getCodeActions: function (context) { + var sourceFile = context.sourceFile, errorCode = context.errorCode, span = context.span, cancellationToken = context.cancellationToken, program = context.program; + var expression = getAwaitableExpression(sourceFile, errorCode, span, cancellationToken, program); + if (!expression) { + return; + } + var checker = context.program.getTypeChecker(); + var trackChanges = function (cb) { return ts.textChanges.ChangeTracker.with(context, cb); }; + return ts.compact([ + getDeclarationSiteFix(context, expression, errorCode, checker, trackChanges), + getUseSiteFix(context, expression, errorCode, checker, trackChanges) + ]); + }, + getAllCodeActions: function (context) { + var sourceFile = context.sourceFile, program = context.program, cancellationToken = context.cancellationToken; + var checker = context.program.getTypeChecker(); + return codefix.codeFixAll(context, errorCodes, function (t, diagnostic) { + var expression = getAwaitableExpression(sourceFile, diagnostic.code, diagnostic, cancellationToken, program); + if (!expression) { + return; + } + var trackChanges = function (cb) { return (cb(t), []); }; + return getDeclarationSiteFix(context, expression, diagnostic.code, checker, trackChanges) + || getUseSiteFix(context, expression, diagnostic.code, checker, trackChanges); + }); + }, + }); + function getDeclarationSiteFix(context, expression, errorCode, checker, trackChanges) { + var sourceFile = context.sourceFile; + var awaitableInitializer = findAwaitableInitializer(expression, sourceFile, checker); + if (awaitableInitializer) { + var initializerChanges = trackChanges(function (t) { return makeChange(t, errorCode, sourceFile, checker, awaitableInitializer); }); + return codefix.createCodeFixActionNoFixId("addMissingAwaitToInitializer", initializerChanges, [ts.Diagnostics.Add_await_to_initializer_for_0, expression.getText(sourceFile)]); + } + } + function getUseSiteFix(context, expression, errorCode, checker, trackChanges) { + var changes = trackChanges(function (t) { return makeChange(t, errorCode, context.sourceFile, checker, expression); }); + return codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_await, fixId, ts.Diagnostics.Fix_all_expressions_possibly_missing_await); + } + function isMissingAwaitError(sourceFile, errorCode, span, cancellationToken, program) { + var checker = program.getDiagnosticsProducingTypeChecker(); + var diagnostics = checker.getDiagnostics(sourceFile, cancellationToken); + return ts.some(diagnostics, function (_a) { + var start = _a.start, length = _a.length, relatedInformation = _a.relatedInformation, code = _a.code; + return ts.isNumber(start) && ts.isNumber(length) && ts.textSpansEqual({ start: start, length: length }, span) && + code === errorCode && + !!relatedInformation && + ts.some(relatedInformation, function (related) { return related.code === ts.Diagnostics.Did_you_forget_to_use_await.code; }); + }); + } + function getAwaitableExpression(sourceFile, errorCode, span, cancellationToken, program) { + var token = ts.getTokenAtPosition(sourceFile, span.start); + // Checker has already done work to determine that await might be possible, and has attached + // related info to the node, so start by finding the expression that exactly matches up + // with the diagnostic range. + var expression = ts.findAncestor(token, function (node) { + if (node.getStart(sourceFile) < span.start || node.getEnd() > ts.textSpanEnd(span)) { + return "quit"; + } + return ts.isExpression(node) && ts.textSpansEqual(span, ts.createTextSpanFromNode(node, sourceFile)); + }); + return expression + && isMissingAwaitError(sourceFile, errorCode, span, cancellationToken, program) + && isInsideAwaitableBody(expression) + ? expression + : undefined; + } + function findAwaitableInitializer(expression, sourceFile, checker) { + if (!ts.isIdentifier(expression)) { + return; + } + var symbol = checker.getSymbolAtLocation(expression); + if (!symbol) { + return; + } + var declaration = ts.tryCast(symbol.valueDeclaration, ts.isVariableDeclaration); + var variableName = ts.tryCast(declaration && declaration.name, ts.isIdentifier); + var variableStatement = ts.getAncestor(declaration, 220 /* VariableStatement */); + if (!declaration || !variableStatement || + declaration.type || + !declaration.initializer || + variableStatement.getSourceFile() !== sourceFile || + ts.hasModifier(variableStatement, 1 /* Export */) || + !variableName || + !isInsideAwaitableBody(declaration.initializer)) { + return; + } + var isUsedElsewhere = ts.FindAllReferences.Core.eachSymbolReferenceInFile(variableName, checker, sourceFile, function (identifier) { + return identifier !== expression; + }); + if (isUsedElsewhere) { + return; + } + return declaration.initializer; + } + function isInsideAwaitableBody(node) { + return node.kind & 16384 /* AwaitContext */ || !!ts.findAncestor(node, function (ancestor) { + return ancestor.parent && ts.isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || + ts.isBlock(ancestor) && (ancestor.parent.kind === 240 /* FunctionDeclaration */ || + ancestor.parent.kind === 197 /* FunctionExpression */ || + ancestor.parent.kind === 198 /* ArrowFunction */ || + ancestor.parent.kind === 157 /* MethodDeclaration */); + }); + } + function makeChange(changeTracker, errorCode, sourceFile, checker, insertionSite) { + if (ts.isBinaryExpression(insertionSite)) { + var left = insertionSite.left, right = insertionSite.right; + var leftType = checker.getTypeAtLocation(left); + var rightType = checker.getTypeAtLocation(right); + var newLeft = checker.getPromisedTypeOfPromise(leftType) ? ts.createAwait(left) : left; + var newRight = checker.getPromisedTypeOfPromise(rightType) ? ts.createAwait(right) : right; + changeTracker.replaceNode(sourceFile, left, newLeft); + changeTracker.replaceNode(sourceFile, right, newRight); + } + else if (errorCode === propertyAccessCode && ts.isPropertyAccessExpression(insertionSite.parent)) { + changeTracker.replaceNode(sourceFile, insertionSite.parent.expression, ts.createParen(ts.createAwait(insertionSite.parent.expression))); + } + else if (ts.contains(callableConstructableErrorCodes, errorCode) && ts.isCallOrNewExpression(insertionSite.parent)) { + changeTracker.replaceNode(sourceFile, insertionSite, ts.createParen(ts.createAwait(insertionSite))); + } + else { + changeTracker.replaceNode(sourceFile, insertionSite, ts.createAwait(insertionSite)); + } + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixId = "addMissingConst"; + var errorCodes = [ + ts.Diagnostics.Cannot_find_name_0.code, + ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code + ]; + codefix.registerCodeFix({ + errorCodes: errorCodes, + getCodeActions: function (context) { + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start, context.program); }); + if (changes.length > 0) { + return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_const_to_unresolved_variable, fixId, ts.Diagnostics.Add_const_to_all_unresolved_variables)]; + } + }, + fixIds: [fixId], + getAllCodeActions: function (context) { + var fixedNodes = new ts.NodeSet(); + return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return makeChange(changes, diag.file, diag.start, context.program, fixedNodes); }); + }, + }); + function makeChange(changeTracker, sourceFile, pos, program, fixedNodes) { + var token = ts.getTokenAtPosition(sourceFile, pos); + var forInitializer = ts.findAncestor(token, function (node) { + return ts.isForInOrOfStatement(node.parent) ? node.parent.initializer === node : + isPossiblyPartOfDestructuring(node) ? false : "quit"; + }); + if (forInitializer) + return applyChange(changeTracker, forInitializer, sourceFile, fixedNodes); + var parent = token.parent; + if (ts.isBinaryExpression(parent) && ts.isExpressionStatement(parent.parent)) { + return applyChange(changeTracker, token, sourceFile, fixedNodes); + } + if (ts.isArrayLiteralExpression(parent)) { + var checker_1 = program.getTypeChecker(); + if (!ts.every(parent.elements, function (element) { return arrayElementCouldBeVariableDeclaration(element, checker_1); })) { + return; + } + return applyChange(changeTracker, parent, sourceFile, fixedNodes); + } + var commaExpression = ts.findAncestor(token, function (node) { + return ts.isExpressionStatement(node.parent) ? true : + isPossiblyPartOfCommaSeperatedInitializer(node) ? false : "quit"; + }); + if (commaExpression) { + var checker = program.getTypeChecker(); + if (!expressionCouldBeVariableDeclaration(commaExpression, checker)) { + return; + } + return applyChange(changeTracker, commaExpression, sourceFile, fixedNodes); + } + } + function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { + if (!fixedNodes || fixedNodes.tryAdd(initializer)) { + changeTracker.insertModifierBefore(sourceFile, 78 /* ConstKeyword */, initializer); + } + } + function isPossiblyPartOfDestructuring(node) { + switch (node.kind) { + case 73 /* Identifier */: + case 188 /* ArrayLiteralExpression */: + case 189 /* ObjectLiteralExpression */: + case 276 /* PropertyAssignment */: + case 277 /* ShorthandPropertyAssignment */: + return true; + default: + return false; + } + } + function arrayElementCouldBeVariableDeclaration(expression, checker) { + var identifier = ts.isIdentifier(expression) ? expression : + ts.isAssignmentExpression(expression, /*excludeCompoundAssignment*/ true) && ts.isIdentifier(expression.left) ? expression.left : + undefined; + return !!identifier && !checker.getSymbolAtLocation(identifier); + } + function isPossiblyPartOfCommaSeperatedInitializer(node) { + switch (node.kind) { + case 73 /* Identifier */: + case 205 /* BinaryExpression */: + case 27 /* CommaToken */: + return true; + default: + return false; + } + } + function expressionCouldBeVariableDeclaration(expression, checker) { + if (!ts.isBinaryExpression(expression)) { + return false; + } + if (expression.operatorToken.kind === 27 /* CommaToken */) { + return ts.every([expression.left, expression.right], function (expression) { return expressionCouldBeVariableDeclaration(expression, checker); }); + } + return ts.isIdentifier(expression.left) && !checker.getSymbolAtLocation(expression.left); + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var codefix; (function (codefix) { @@ -113523,6 +116813,8 @@ var ts; ts.Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code, // Property declarations ts.Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, + // Function expressions and declarations + ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code, ]; codefix.registerCodeFix({ errorCodes: errorCodes, @@ -113552,6 +116844,8 @@ var ts; case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: case ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code: return ts.Diagnostics.Infer_parameter_types_from_usage; + case ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: + return ts.Diagnostics.Infer_this_type_of_0_from_usage; default: return ts.Diagnostics.Infer_type_of_0_from_usage; } @@ -113646,6 +116940,13 @@ var ts; return containingFunction; } return undefined; + // Function 'this' + case ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: + if (ts.textChanges.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) { + annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken); + return containingFunction; + } + return undefined; default: return ts.Debug.fail(String(errorCode)); } @@ -113659,7 +116960,8 @@ var ts; if (!ts.isIdentifier(parameterDeclaration.name)) { return; } - var parameterInferences = inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken) || + var references = inferFunctionReferencesFromUsage(containingFunction, sourceFile, program, cancellationToken); + var parameterInferences = InferFromReference.inferTypeForParametersFromReferences(references, containingFunction, program, cancellationToken) || containingFunction.parameters.map(function (p) { return ({ declaration: p, type: ts.isIdentifier(p.name) ? inferTypeForVariableFromUsage(p.name, program, cancellationToken) : program.getTypeChecker().getAnyType() @@ -113682,6 +116984,31 @@ var ts; changes.insertNodeAfter(sourceFile, ts.last(containingFunction.parameters), ts.createToken(21 /* CloseParenToken */)); } } + function annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken) { + var references = inferFunctionReferencesFromUsage(containingFunction, sourceFile, program, cancellationToken); + if (!references) { + return; + } + var thisInference = InferFromReference.inferTypeForThisFromReferences(references, program, cancellationToken); + if (!thisInference) { + return; + } + var typeNode = ts.getTypeNodeIfAccessible(thisInference, containingFunction, program, host); + if (!typeNode) { + return; + } + if (ts.isInJSFile(containingFunction)) { + annotateJSDocThis(changes, sourceFile, containingFunction, typeNode); + } + else { + changes.tryInsertThisTypeAnnotation(sourceFile, containingFunction, typeNode); + } + } + function annotateJSDocThis(changes, sourceFile, containingFunction, typeNode) { + addJSDocTags(changes, sourceFile, containingFunction, [ + ts.createJSDocThisTag(ts.createJSDocTypeExpression(typeNode)), + ]); + } function annotateSetAccessor(changes, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { var param = ts.firstOrUndefined(setAccessorDeclaration.parameters); if (param && ts.isIdentifier(setAccessorDeclaration.name) && ts.isIdentifier(param.name)) { @@ -113740,7 +117067,7 @@ var ts; oldTags[i] = merged; return !!merged; }); }); - var tag = ts.createJSDocComment(comments.join("\n"), ts.createNodeArray((oldTags || ts.emptyArray).concat(unmergedNewTags))); + var tag = ts.createJSDocComment(comments.join("\n"), ts.createNodeArray(__spreadArrays((oldTags || ts.emptyArray), unmergedNewTags))); var jsDocNode = parent.kind === 198 /* ArrowFunction */ ? getJsDocNodeForArrowFunction(parent) : parent; jsDocNode.jsDoc = parent.jsDoc; jsDocNode.jsDocCache = parent.jsDocCache; @@ -113757,14 +117084,14 @@ var ts; return undefined; } switch (oldTag.kind) { - case 305 /* JSDocParameterTag */: { + case 307 /* JSDocParameterTag */: { var oldParam = oldTag; var newParam = newTag; return ts.isIdentifier(oldParam.name) && ts.isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? ts.createJSDocParamTag(newParam.name, newParam.isBracketed, newParam.typeExpression, oldParam.comment) : undefined; } - case 306 /* JSDocReturnTag */: + case 308 /* JSDocReturnTag */: return ts.createJSDocReturnTag(newTag.typeExpression, oldTag.comment); } } @@ -113780,7 +117107,7 @@ var ts; var types = InferFromReference.inferTypesFromReferences(references, checker, cancellationToken); return InferFromReference.unifyFromContext(types, checker); } - function inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken) { + function inferFunctionReferencesFromUsage(containingFunction, sourceFile, program, cancellationToken) { var searchToken; switch (containingFunction.kind) { case 158 /* Constructor */: @@ -113798,9 +117125,10 @@ var ts; searchToken = containingFunction.name; break; } - if (searchToken) { - return InferFromReference.inferTypeForParametersFromReferences(getReferences(searchToken, program, cancellationToken), containingFunction, program, cancellationToken); + if (!searchToken) { + return undefined; } + return getReferences(searchToken, program, cancellationToken); } var InferFromReference; (function (InferFromReference) { @@ -113815,20 +117143,17 @@ var ts; } InferFromReference.inferTypesFromReferences = inferTypesFromReferences; function inferTypeForParametersFromReferences(references, declaration, program, cancellationToken) { - var checker = program.getTypeChecker(); - if (references.length === 0) { - return undefined; - } - if (!declaration.parameters) { + if (references === undefined || references.length === 0 || !declaration.parameters) { return undefined; } + var checker = program.getTypeChecker(); var usageContext = {}; for (var _i = 0, references_3 = references; _i < references_3.length; _i++) { var reference = references_3[_i]; cancellationToken.throwIfCancellationRequested(); inferTypeFromContext(reference, checker, usageContext); } - var callContexts = (usageContext.constructContexts || []).concat(usageContext.callContexts || []); + var callContexts = __spreadArrays(usageContext.constructContexts || [], usageContext.callContexts || []); return declaration.parameters.map(function (parameter, parameterIndex) { var types = []; var isRest = ts.isRestParameter(parameter); @@ -113861,6 +117186,20 @@ var ts; }); } InferFromReference.inferTypeForParametersFromReferences = inferTypeForParametersFromReferences; + function inferTypeForThisFromReferences(references, program, cancellationToken) { + if (references.length === 0) { + return undefined; + } + var checker = program.getTypeChecker(); + var usageContext = {}; + for (var _i = 0, references_4 = references; _i < references_4.length; _i++) { + var reference = references_4[_i]; + cancellationToken.throwIfCancellationRequested(); + inferTypeFromContext(reference, checker, usageContext); + } + return unifyFromContext(usageContext.candidateThisTypes || ts.emptyArray, checker); + } + InferFromReference.inferTypeForThisFromReferences = inferTypeForThisFromReferences; function inferTypeFromContext(node, checker, usageContext) { while (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; @@ -113894,6 +117233,13 @@ var ts; case 191 /* ElementAccessExpression */: inferTypeFromPropertyElementExpressionContext(node.parent, node, checker, usageContext); break; + case 276 /* PropertyAssignment */: + case 277 /* ShorthandPropertyAssignment */: + inferTypeFromPropertyAssignment(node.parent, checker, usageContext); + break; + case 155 /* PropertyDeclaration */: + inferTypeFromPropertyDeclaration(node.parent, checker, usageContext); + break; case 238 /* VariableDeclaration */: { var _a = node.parent, name = _a.name, initializer = _a.initializer; if (node === name) { @@ -114064,6 +117410,18 @@ var ts; } } } + function inferTypeFromPropertyAssignment(assignment, checker, usageContext) { + var objectLiteral = ts.isShorthandPropertyAssignment(assignment) ? + assignment.parent : + assignment.parent.parent; + var nodeWithRealType = ts.isVariableDeclaration(objectLiteral.parent) ? + objectLiteral.parent : + objectLiteral; + addCandidateThisType(usageContext, checker.getTypeAtLocation(nodeWithRealType)); + } + function inferTypeFromPropertyDeclaration(declaration, checker, usageContext) { + addCandidateThisType(usageContext, checker.getTypeAtLocation(declaration.parent)); + } function removeLowPriorityInferences(inferences, priorities) { var toRemove = []; for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) { @@ -114239,6 +117597,11 @@ var ts; (context.candidateTypes || (context.candidateTypes = [])).push(type); } } + function addCandidateThisType(context, type) { + if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) { + (context.candidateThisTypes || (context.candidateThisTypes = [])).push(type); + } + } function hasCallContext(usageContext) { return !!usageContext && !!usageContext.callContexts; } @@ -115033,7 +118396,7 @@ var ts; forEachExportReference(sourceFile, function (node) { var _a = node.name, text = _a.text, originalKeywordKind = _a.originalKeywordKind; if (!res.has(text) && (originalKeywordKind !== undefined && ts.isNonContextualKeyword(originalKeywordKind) - || checker.resolveName(node.name.text, node, 67220415 /* Value */, /*excludeGlobals*/ true))) { + || checker.resolveName(node.name.text, node, 111551 /* Value */, /*excludeGlobals*/ true))) { // Unconditionally add an underscore in case `text` is a keyword. res.set(text, makeUniqueName("_" + text, identifiers)); } @@ -115634,9 +118997,10 @@ var ts; ImportKind[ImportKind["Default"] = 1] = "Default"; ImportKind[ImportKind["Namespace"] = 2] = "Namespace"; ImportKind[ImportKind["Equals"] = 3] = "Equals"; + ImportKind[ImportKind["ConstEquals"] = 4] = "ConstEquals"; })(ImportKind || (ImportKind = {})); function getImportCompletionAction(exportedSymbol, moduleSymbol, sourceFile, symbolName, host, program, formatContext, position, preferences) { - var exportInfos = getAllReExportingModules(exportedSymbol, moduleSymbol, symbolName, sourceFile, program.getCompilerOptions(), program.getTypeChecker(), program.getSourceFiles()); + var exportInfos = getAllReExportingModules(sourceFile, exportedSymbol, moduleSymbol, symbolName, sourceFile, program.getCompilerOptions(), program.getTypeChecker(), program.getSourceFiles()); ts.Debug.assert(exportInfos.some(function (info) { return info.moduleSymbol === moduleSymbol; })); // We sort the best codefixes first, so taking `first` is best for completions. var moduleSpecifier = ts.first(getNewImportInfos(program, sourceFile, position, exportInfos, host, preferences)).moduleSpecifier; @@ -115648,14 +119012,14 @@ var ts; var description = _a.description, changes = _a.changes, commands = _a.commands; return { description: description, changes: changes, commands: commands }; } - function getAllReExportingModules(exportedSymbol, exportingModuleSymbol, symbolName, sourceFile, compilerOptions, checker, allSourceFiles) { + function getAllReExportingModules(importingFile, exportedSymbol, exportingModuleSymbol, symbolName, sourceFile, compilerOptions, checker, allSourceFiles) { var result = []; forEachExternalModule(checker, allSourceFiles, function (moduleSymbol, moduleFile) { // Don't import from a re-export when looking "up" like to `./index` or `../index`. if (moduleFile && moduleSymbol !== exportingModuleSymbol && ts.startsWith(sourceFile.fileName, ts.getDirectoryPath(moduleFile.fileName))) { return; } - var defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions); + var defaultInfo = getDefaultLikeExportInfo(importingFile, moduleSymbol, checker, compilerOptions); if (defaultInfo && defaultInfo.name === symbolName && ts.skipAlias(defaultInfo.symbol, checker) === exportedSymbol) { result.push({ moduleSymbol: moduleSymbol, importKind: defaultInfo.kind, exportedSymbolIsTypeOnly: isTypeOnlySymbol(defaultInfo.symbol, checker) }); } @@ -115669,7 +119033,7 @@ var ts; return result; } function isTypeOnlySymbol(s, checker) { - return !(ts.skipAlias(s, checker).flags & 67220415 /* Value */); + return !(ts.skipAlias(s, checker).flags & 111551 /* Value */); } function getFixForImport(exportInfos, symbolName, position, program, sourceFile, host, preferences) { var checker = program.getTypeChecker(); @@ -115678,7 +119042,7 @@ var ts; var addToExisting = tryAddToExistingImport(existingImports); // Don't bother providing an action to add a new import if we can add to an existing one. var addImport = addToExisting ? [addToExisting] : getFixesForAddImport(exportInfos, existingImports, program, sourceFile, position, host, preferences); - return (useNamespace ? [useNamespace] : ts.emptyArray).concat(addImport); + return __spreadArrays((useNamespace ? [useNamespace] : ts.emptyArray), addImport); } function tryUseExistingNamespaceImport(existingImports, symbolName, position, checker) { // It is possible that multiple import statements with the same specifier exist in the file. @@ -115767,7 +119131,7 @@ var ts; var info = errorCode === ts.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code ? getFixesInfoForUMDImport(context, symbolToken) : ts.isIdentifier(symbolToken) ? getFixesInfoForNonUMDImport(context, symbolToken) : undefined; - return info && __assign({}, info, { fixes: ts.sort(info.fixes, function (a, b) { return a.kind - b.kind; }) }); + return info && __assign(__assign({}, info), { fixes: ts.sort(info.fixes, function (a, b) { return a.kind - b.kind; }) }); } function getFixesInfoForUMDImport(_a, token) { var sourceFile = _a.sourceFile, program = _a.program, host = _a.host, preferences = _a.preferences; @@ -115777,7 +119141,7 @@ var ts; return undefined; var symbol = checker.getAliasedSymbol(umdSymbol); var symbolName = umdSymbol.name; - var exportInfos = [{ moduleSymbol: symbol, importKind: getUmdImportKind(program.getCompilerOptions()), exportedSymbolIsTypeOnly: false }]; + var exportInfos = [{ moduleSymbol: symbol, importKind: getUmdImportKind(sourceFile, program.getCompilerOptions()), exportedSymbolIsTypeOnly: false }]; var fixes = getFixForImport(exportInfos, symbolName, ts.isIdentifier(token) ? token.getStart(sourceFile) : undefined, program, sourceFile, host, preferences); return { fixes: fixes, symbolName: symbolName }; } @@ -115789,10 +119153,10 @@ var ts; // The error wasn't for the symbolAtLocation, it was for the JSX tag itself, which needs access to e.g. `React`. var parent = token.parent; return (ts.isJsxOpeningLikeElement(parent) && parent.tagName === token) || ts.isJsxOpeningFragment(parent) - ? ts.tryCast(checker.resolveName(checker.getJsxNamespace(parent), ts.isJsxOpeningLikeElement(parent) ? token : parent, 67220415 /* Value */, /*excludeGlobals*/ false), ts.isUMDExportSymbol) + ? ts.tryCast(checker.resolveName(checker.getJsxNamespace(parent), ts.isJsxOpeningLikeElement(parent) ? token : parent, 111551 /* Value */, /*excludeGlobals*/ false), ts.isUMDExportSymbol) : undefined; } - function getUmdImportKind(compilerOptions) { + function getUmdImportKind(importingFile, compilerOptions) { // Import a synthetic `default` if enabled. if (ts.getAllowSyntheticDefaultImports(compilerOptions)) { return 1 /* Default */; @@ -115803,6 +119167,9 @@ var ts; case ts.ModuleKind.AMD: case ts.ModuleKind.CommonJS: case ts.ModuleKind.UMD: + if (ts.isInJSFile(importingFile)) { + return ts.isExternalModule(importingFile) ? 2 /* Namespace */ : 4 /* ConstEquals */; + } return 3 /* Equals */; case ts.ModuleKind.System: case ts.ModuleKind.ES2015: @@ -115841,7 +119208,7 @@ var ts; } forEachExternalModuleToImportFrom(checker, sourceFile, program.getSourceFiles(), function (moduleSymbol) { cancellationToken.throwIfCancellationRequested(); - var defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, program.getCompilerOptions()); + var defaultInfo = getDefaultLikeExportInfo(sourceFile, moduleSymbol, checker, program.getCompilerOptions()); if (defaultInfo && defaultInfo.name === symbolName && symbolHasMeaning(defaultInfo.symbolForMeaning, currentTokenMeaning)) { addSymbol(moduleSymbol, defaultInfo.symbol, defaultInfo.kind); } @@ -115853,20 +119220,41 @@ var ts; }); return originalSymbolToExportInfos; } - function getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions) { - var exported = getDefaultLikeExportWorker(moduleSymbol, checker); + function getDefaultLikeExportInfo(importingFile, moduleSymbol, checker, compilerOptions) { + var exported = getDefaultLikeExportWorker(importingFile, moduleSymbol, checker, compilerOptions); if (!exported) return undefined; var symbol = exported.symbol, kind = exported.kind; var info = getDefaultExportInfoWorker(symbol, moduleSymbol, checker, compilerOptions); return info && __assign({ symbol: symbol, kind: kind }, info); } - function getDefaultLikeExportWorker(moduleSymbol, checker) { + function getDefaultLikeExportWorker(importingFile, moduleSymbol, checker, compilerOptions) { var defaultExport = checker.tryGetMemberInModuleExports("default" /* Default */, moduleSymbol); if (defaultExport) return { symbol: defaultExport, kind: 1 /* Default */ }; var exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol); - return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: 3 /* Equals */ }; + return exportEquals === moduleSymbol ? undefined : { symbol: exportEquals, kind: getExportEqualsImportKind(importingFile, compilerOptions, checker) }; + } + function getExportEqualsImportKind(importingFile, compilerOptions, checker) { + if (ts.getAllowSyntheticDefaultImports(compilerOptions) && ts.getEmitModuleKind(compilerOptions) >= ts.ModuleKind.ES2015) { + return 1 /* Default */; + } + if (ts.isInJSFile(importingFile)) { + return ts.isExternalModule(importingFile) ? 1 /* Default */ : 4 /* ConstEquals */; + } + for (var _i = 0, _a = importingFile.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + if (ts.isImportEqualsDeclaration(statement)) { + return 3 /* Equals */; + } + if (ts.isImportDeclaration(statement) && statement.importClause && statement.importClause.name) { + var moduleSymbol = checker.getImmediateAliasedSymbol(statement.importClause.symbol); + if (moduleSymbol && moduleSymbol.name !== "default" /* Default */) { + return 1 /* Default */; + } + } + } + return 3 /* Equals */; } function getDefaultExportInfoWorker(defaultExport, moduleSymbol, checker, compilerOptions) { var localSymbol = ts.getLocalSymbolForExportDefault(defaultExport); @@ -115879,9 +119267,11 @@ var ts; var aliased = checker.getImmediateAliasedSymbol(defaultExport); return aliased && getDefaultExportInfoWorker(aliased, ts.Debug.assertDefined(aliased.parent), checker, compilerOptions); } - else { - return { symbolForMeaning: defaultExport, name: moduleSymbolToValidIdentifier(moduleSymbol, compilerOptions.target) }; + if (defaultExport.escapedName !== "default" /* Default */ && + defaultExport.escapedName !== "export=" /* ExportEquals */) { + return { symbolForMeaning: defaultExport, name: defaultExport.getName() }; } + return { symbolForMeaning: defaultExport, name: moduleSymbolToValidIdentifier(moduleSymbol, compilerOptions.target) }; } function getNameForExportDefault(symbol) { return symbol.declarations && ts.firstDefined(symbol.declarations, function (declaration) { @@ -115973,11 +119363,17 @@ var ts; ts.insertImport(changes, sourceFile, ts.makeImport(defaultImport === undefined ? undefined : ts.createIdentifier(defaultImport), namedImports.map(function (n) { return ts.createImportSpecifier(/*propertyName*/ undefined, ts.createIdentifier(n)); }), moduleSpecifier, quotePreference)); } if (namespaceLikeImport) { - ts.insertImport(changes, sourceFile, namespaceLikeImport.importKind === 3 /* Equals */ - ? ts.createImportEqualsDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createIdentifier(namespaceLikeImport.name), ts.createExternalModuleReference(quotedModuleSpecifier)) - : ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name))), quotedModuleSpecifier)); + ts.insertImport(changes, sourceFile, namespaceLikeImport.importKind === 3 /* Equals */ ? ts.createImportEqualsDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createIdentifier(namespaceLikeImport.name), ts.createExternalModuleReference(quotedModuleSpecifier)) : + namespaceLikeImport.importKind === 4 /* ConstEquals */ ? createConstEqualsRequireDeclaration(namespaceLikeImport.name, quotedModuleSpecifier) : + ts.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, ts.createImportClause(/*name*/ undefined, ts.createNamespaceImport(ts.createIdentifier(namespaceLikeImport.name))), quotedModuleSpecifier)); } } + function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) { + return ts.createVariableStatement(/*modifiers*/ undefined, ts.createVariableDeclarationList([ + ts.createVariableDeclaration(ts.createIdentifier(name), + /*type*/ undefined, ts.createCall(ts.createIdentifier("require"), /*typeArguments*/ undefined, [quotedModuleSpecifier])) + ], 2 /* Const */)); + } function symbolHasMeaning(_a, meaning) { var declarations = _a.declarations; return ts.some(declarations, function (decl) { return !!(ts.getMeaningFromDeclaration(decl) & meaning); }); @@ -116119,10 +119515,10 @@ var ts; flags |= 1920 /* Namespace */; } if (meaning & 2 /* Type */) { - flags |= 67897832 /* Type */; + flags |= 788968 /* Type */; } if (meaning & 1 /* Value */) { - flags |= 67220415 /* Value */; + flags |= 111551 /* Value */; } return flags; } @@ -117347,9 +120743,8 @@ var ts; var modifiers = visibilityModifier ? ts.createNodeArray([visibilityModifier]) : undefined; var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); var optional = !!(symbol.flags & 16777216 /* Optional */); + var ambient = !!(enclosingDeclaration.flags & 4194304 /* Ambient */); switch (declaration.kind) { - case 159 /* GetAccessor */: - case 160 /* SetAccessor */: case 154 /* PropertySignature */: case 155 /* PropertyDeclaration */: var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); @@ -117357,6 +120752,29 @@ var ts; /*decorators*/ undefined, modifiers, name, optional ? ts.createToken(56 /* QuestionToken */) : undefined, typeNode, /*initializer*/ undefined)); break; + case 159 /* GetAccessor */: + case 160 /* SetAccessor */: { + var allAccessors = ts.getAllAccessorDeclarations(declarations, declaration); + var typeNode_1 = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); + var orderedAccessors = allAccessors.secondAccessor + ? [allAccessors.firstAccessor, allAccessors.secondAccessor] + : [allAccessors.firstAccessor]; + for (var _i = 0, orderedAccessors_1 = orderedAccessors; _i < orderedAccessors_1.length; _i++) { + var accessor = orderedAccessors_1[_i]; + if (ts.isGetAccessorDeclaration(accessor)) { + out(ts.createGetAccessor( + /*decorators*/ undefined, modifiers, name, ts.emptyArray, typeNode_1, ambient ? undefined : createStubbedMethodBody(preferences))); + } + else { + ts.Debug.assertNode(accessor, ts.isSetAccessorDeclaration); + var parameter = ts.getSetAccessorValueParameter(accessor); + var parameterName = parameter && ts.isIdentifier(parameter.name) ? ts.idText(parameter.name) : undefined; + out(ts.createSetAccessor( + /*decorators*/ undefined, modifiers, name, createDummyParameters(1, [parameterName], [typeNode_1], 1, /*inJs*/ false), ambient ? undefined : createStubbedMethodBody(preferences))); + } + } + break; + } case 156 /* MethodSignature */: case 157 /* MethodDeclaration */: // The signature for the implementation appears as an entry in `signatures` iff @@ -117373,21 +120791,23 @@ var ts; if (declarations.length === 1) { ts.Debug.assert(signatures.length === 1); var signature = signatures[0]; - outputMethod(signature, modifiers, name, createStubbedMethodBody(preferences)); + outputMethod(signature, modifiers, name, ambient ? undefined : createStubbedMethodBody(preferences)); break; } - for (var _i = 0, signatures_1 = signatures; _i < signatures_1.length; _i++) { - var signature = signatures_1[_i]; + for (var _a = 0, signatures_1 = signatures; _a < signatures_1.length; _a++) { + var signature = signatures_1[_a]; // Need to ensure nodes are fresh each time so they can have different positions. outputMethod(signature, ts.getSynthesizedDeepClones(modifiers, /*includeTrivia*/ false), ts.getSynthesizedDeepClone(name, /*includeTrivia*/ false)); } - if (declarations.length > signatures.length) { - var signature = checker.getSignatureFromDeclaration(declarations[declarations.length - 1]); - outputMethod(signature, modifiers, name, createStubbedMethodBody(preferences)); - } - else { - ts.Debug.assert(declarations.length === signatures.length); - out(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); + if (!ambient) { + if (declarations.length > signatures.length) { + var signature = checker.getSignatureFromDeclaration(declarations[declarations.length - 1]); + outputMethod(signature, modifiers, name, createStubbedMethodBody(preferences)); + } + else { + ts.Debug.assert(declarations.length === signatures.length); + out(createMethodImplementingSignatures(signatures, name, optional, modifiers, preferences)); + } } break; } @@ -117568,15 +120988,15 @@ var ts; } codefix.registerCodeFix({ errorCodes: [ - ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures.code, - ts.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature.code, + ts.Diagnostics.This_expression_is_not_callable.code, + ts.Diagnostics.This_expression_is_not_constructable.code, ], getCodeActions: getActionsForUsageOfInvalidImport }); function getActionsForUsageOfInvalidImport(context) { var sourceFile = context.sourceFile; - var targetKind = ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures.code === context.errorCode ? 192 /* CallExpression */ : 193 /* NewExpression */; - var node = ts.findAncestor(ts.getTokenAtPosition(sourceFile, context.span.start), function (a) { return a.kind === targetKind && a.getStart() === context.span.start && a.getEnd() === (context.span.start + context.span.length); }); + var targetKind = ts.Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 192 /* CallExpression */ : 193 /* NewExpression */; + var node = ts.findAncestor(ts.getTokenAtPosition(sourceFile, context.span.start), function (a) { return a.kind === targetKind; }); if (!node) { return []; } @@ -117890,7 +121310,7 @@ var ts; var parameter = ts.first(indexSignature.parameters); var mappedTypeParameter = ts.createTypeParameterDeclaration(ts.cast(parameter.name, ts.isIdentifier), parameter.type); var mappedIntersectionType = ts.createMappedTypeNode(ts.hasReadonlyModifier(indexSignature) ? ts.createModifier(134 /* ReadonlyKeyword */) : undefined, mappedTypeParameter, indexSignature.questionToken, indexSignature.type); - var intersectionType = ts.createIntersectionTypeNode(ts.getAllSuperTypeNodes(container).concat([ + var intersectionType = ts.createIntersectionTypeNode(__spreadArrays(ts.getAllSuperTypeNodes(container), [ mappedIntersectionType ], (otherMembers.length ? [ts.createTypeLiteralNode(otherMembers)] : ts.emptyArray))); changes.replaceNode(sourceFile, container, createTypeAliasFromInterface(container, intersectionType)); @@ -117899,6 +121319,49 @@ var ts; })(ts || (ts = {})); /* @internal */ var ts; +(function (ts) { + var codefix; + (function (codefix) { + var fixId = "removeUnnecessaryAwait"; + var errorCodes = [ + ts.Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code, + ]; + codefix.registerCodeFix({ + errorCodes: errorCodes, + getCodeActions: function (context) { + var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span); }); + if (changes.length > 0) { + return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Remove_unnecessary_await, fixId, ts.Diagnostics.Remove_all_unnecessary_uses_of_await)]; + } + }, + fixIds: [fixId], + getAllCodeActions: function (context) { + return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return makeChange(changes, diag.file, diag); }); + }, + }); + function makeChange(changeTracker, sourceFile, span) { + var awaitKeyword = ts.tryCast(ts.getTokenAtPosition(sourceFile, span.start), function (node) { return node.kind === 123 /* AwaitKeyword */; }); + var awaitExpression = awaitKeyword && ts.tryCast(awaitKeyword.parent, ts.isAwaitExpression); + if (!awaitExpression) { + return; + } + var expressionToReplace = awaitExpression; + var hasSurroundingParens = ts.isParenthesizedExpression(awaitExpression.parent); + if (hasSurroundingParens) { + var leftMostExpression = ts.getLeftmostExpression(awaitExpression.expression, /*stopAtCallExpressions*/ false); + if (ts.isIdentifier(leftMostExpression)) { + var precedingToken = ts.findPrecedingToken(awaitExpression.parent.pos, sourceFile); + if (precedingToken && precedingToken.kind !== 96 /* NewKeyword */) { + expressionToReplace = awaitExpression.parent; + } + } + } + changeTracker.replaceNode(sourceFile, expressionToReplace, awaitExpression.expression); + } + })(codefix = ts.codefix || (ts.codefix = {})); +})(ts || (ts = {})); +/* @internal */ +var ts; (function (ts) { var refactor; (function (refactor) { @@ -118181,7 +121644,7 @@ var ts; function doChangeNamedToNamespace(sourceFile, checker, changes, toConvert) { var importDecl = toConvert.parent.parent; var moduleSpecifier = importDecl.moduleSpecifier; - var preferredName = moduleSpecifier && ts.isStringLiteral(moduleSpecifier) ? ts.codefix.moduleSpecifierToValidIdentifier(moduleSpecifier.text, 8 /* ESNext */) : "module"; + var preferredName = moduleSpecifier && ts.isStringLiteral(moduleSpecifier) ? ts.codefix.moduleSpecifierToValidIdentifier(moduleSpecifier.text, 99 /* ESNext */) : "module"; var namespaceNameConflicts = toConvert.elements.some(function (element) { return ts.FindAllReferences.Core.eachSymbolReferenceInFile(element.name, checker, sourceFile, function (id) { return !!checker.resolveName(preferredName, id, 67108863 /* All */, /*excludeGlobals*/ true); @@ -119810,7 +123273,7 @@ var ts; } else if (ts.isTypeQueryNode(node)) { if (ts.isIdentifier(node.exprName)) { - var symbol = checker.resolveName(node.exprName.text, node.exprName, 67220415 /* Value */, /* excludeGlobals */ false); + var symbol = checker.resolveName(node.exprName.text, node.exprName, 111551 /* Value */, /* excludeGlobals */ false); if (symbol && rangeContainsSkipTrivia(statement, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selection, symbol.valueDeclaration, file)) { return true; } @@ -119832,7 +123295,7 @@ var ts; changes.replaceNode(file, selection, ts.createTypeReferenceNode(name, typeParameters.map(function (id) { return ts.createTypeReferenceNode(id.name, /* typeArguments */ undefined); }))); } function doTypedefChange(changes, file, name, firstStatement, selection, typeParameters) { - var node = ts.createNode(310 /* JSDocTypedefTag */); + var node = ts.createNode(312 /* JSDocTypedefTag */); node.tagName = ts.createIdentifier("typedef"); // TODO: jsdoc factory https://github.com/Microsoft/TypeScript/pull/29539 node.fullName = ts.createIdentifier(name); node.name = node.fullName; @@ -119840,7 +123303,7 @@ var ts; var templates = []; ts.forEach(typeParameters, function (typeParameter) { var constraint = ts.getEffectiveConstraintOfTypeParameter(typeParameter); - var template = ts.createNode(309 /* JSDocTemplateTag */); + var template = ts.createNode(311 /* JSDocTemplateTag */); template.tagName = ts.createIdentifier("template"); template.constraint = constraint && ts.cast(constraint, ts.isJSDocTypeExpression); var parameter = ts.createNode(151 /* TypeParameter */); @@ -119924,7 +123387,7 @@ var ts; return ts.isIdentifier(name) || ts.isStringLiteral(name); } function isAcceptedDeclaration(node) { - return ts.isParameterPropertyDeclaration(node) || ts.isPropertyDeclaration(node) || ts.isPropertyAssignment(node); + return ts.isParameterPropertyDeclaration(node, node.parent) || ts.isPropertyDeclaration(node) || ts.isPropertyAssignment(node); } function createPropertyName(name, originalName) { return ts.isIdentifier(originalName) ? ts.createIdentifier(name) : ts.createLiteral(name); @@ -120003,7 +123466,7 @@ var ts; } } function insertAccessor(changeTracker, file, accessor, declaration, container) { - ts.isParameterPropertyDeclaration(declaration) + ts.isParameterPropertyDeclaration(declaration, declaration.parent) ? changeTracker.insertNodeAtClassStart(file, container, accessor) : ts.isPropertyAssignment(declaration) ? changeTracker.insertNodeAfterComma(file, declaration, accessor) @@ -120141,7 +123604,7 @@ var ts; deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); updateImportsInOtherFiles(changes, program, oldFile, usage.movedSymbols, newModuleName); - return getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, useEs6ModuleSyntax, quotePreference).concat(addExports(oldFile, toMove.all, usage.oldFileImportsFromNewFile, useEs6ModuleSyntax)); + return __spreadArrays(getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, useEs6ModuleSyntax, quotePreference), addExports(oldFile, toMove.all, usage.oldFileImportsFromNewFile, useEs6ModuleSyntax)); } function deleteMovedStatements(sourceFile, moved, changes) { for (var _i = 0, moved_1 = moved; _i < moved_1.length; _i++) { @@ -120206,7 +123669,7 @@ var ts; } } function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleName, newModuleSpecifier, oldImportId, oldImportNode) { - var preferredNewNamespaceName = ts.codefix.moduleSpecifierToValidIdentifier(newModuleName, 8 /* ESNext */); + var preferredNewNamespaceName = ts.codefix.moduleSpecifierToValidIdentifier(newModuleName, 99 /* ESNext */); var needUniqueName = false; var toChange = []; ts.FindAllReferences.Core.eachSymbolReferenceInFile(oldImportId, checker, sourceFile, function (ref) { @@ -120344,7 +123807,7 @@ var ts; } if (namedBindings) { if (namedBindingsUnused) { - changes.delete(sourceFile, namedBindings); + changes.replaceNode(sourceFile, importDecl.importClause, ts.updateImportClause(importDecl.importClause, name, /*namedBindings*/ undefined)); } else if (namedBindings.kind === 253 /* NamedImports */) { for (var _i = 0, _b = namedBindings.elements; _i < _b.length; _i++) { @@ -120709,7 +124172,7 @@ var ts; } } function addCommonjsExport(decl) { - return [decl].concat(getNamesToExportInCommonJS(decl).map(createExportAssignment)); + return __spreadArrays([decl], getNamesToExportInCommonJS(decl).map(createExportAssignment)); } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { @@ -120887,7 +124350,7 @@ var ts; function getGroupedReferences(functionDeclaration, program, cancellationToken) { var functionNames = getFunctionNames(functionDeclaration); var classNames = ts.isConstructorDeclaration(functionDeclaration) ? getClassNames(functionDeclaration) : []; - var names = ts.deduplicate(functionNames.concat(classNames), ts.equateValues); + var names = ts.deduplicate(__spreadArrays(functionNames, classNames), ts.equateValues); var checker = program.getTypeChecker(); var references = ts.flatMap(names, /*mapfn*/ function (/*mapfn*/ name) { return ts.FindAllReferences.getReferenceEntriesForNode(-1, name, program, program.getSourceFiles(), cancellationToken); }); var groupedReferences = groupReferences(references); @@ -121392,7 +124855,7 @@ var ts; if (!children.length) { return undefined; } - var child = ts.find(children, function (kid) { return kid.kind < 289 /* FirstJSDocNode */ || kid.kind > 311 /* LastJSDocNode */; }); + var child = ts.find(children, function (kid) { return kid.kind < 289 /* FirstJSDocNode */ || kid.kind > 313 /* LastJSDocNode */; }); return child.kind < 149 /* FirstNode */ ? child : child.getFirstToken(sourceFile); @@ -121462,7 +124925,7 @@ var ts; } } function createSyntaxList(nodes, parent) { - var list = createNode(312 /* SyntaxList */, nodes.pos, nodes.end, parent); + var list = createNode(314 /* SyntaxList */, nodes.pos, nodes.end, parent); list._children = []; var pos = nodes.pos; for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { @@ -122057,7 +125520,7 @@ var ts; var sourceFile; if (this.currentFileName !== fileName) { // This is a new file, just parse it - sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 8 /* Latest */, version, /*setNodeParents*/ true, scriptKind); + sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 99 /* Latest */, version, /*setNodeParents*/ true, scriptKind); } else if (this.currentFileVersion !== version) { // This is the same file, just a newer version. Incrementally parse the file. @@ -122214,7 +125677,11 @@ var ts; function getValidSourceFile(fileName) { var sourceFile = program.getSourceFile(fileName); if (!sourceFile) { - throw new Error("Could not find sourceFile: '" + fileName + "' in " + (program && JSON.stringify(program.getSourceFiles().map(function (f) { return f.fileName; }))) + "."); + var error = new Error("Could not find source file: '" + fileName + "'."); + // We've been having trouble debugging this, so attach sidecar data for the tsserver log. + // See https://github.com/microsoft/TypeScript/issues/30180. + error.ProgramFiles = program.getSourceFiles().map(function (f) { return f.fileName; }); + throw error; } return sourceFile; } @@ -122283,11 +125750,21 @@ var ts; compilerHost.trace = function (message) { return host.trace(message); }; } if (host.resolveModuleNames) { - compilerHost.resolveModuleNames = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference); }; + compilerHost.resolveModuleNames = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return host.resolveModuleNames.apply(host, args); + }; } if (host.resolveTypeReferenceDirectives) { - compilerHost.resolveTypeReferenceDirectives = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { - return host.resolveTypeReferenceDirectives(typeReferenceDirectiveNames, containingFile, redirectedReference); + compilerHost.resolveTypeReferenceDirectives = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return host.resolveTypeReferenceDirectives.apply(host, args); }; } var documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings); @@ -122425,7 +125902,7 @@ var ts; } // If '-d' is enabled, check for emitter error. One example of emitter error is export class implements non-export interface var declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile, cancellationToken); - return semanticDiagnostics.concat(declarationDiagnostics); + return __spreadArrays(semanticDiagnostics, declarationDiagnostics); } function getSuggestionDiagnostics(fileName) { synchronizeHostData(); @@ -122433,12 +125910,12 @@ var ts; } function getCompilerOptionsDiagnostics() { synchronizeHostData(); - return program.getOptionsDiagnostics(cancellationToken).concat(program.getGlobalDiagnostics(cancellationToken)); + return __spreadArrays(program.getOptionsDiagnostics(cancellationToken), program.getGlobalDiagnostics(cancellationToken)); } function getCompletionsAtPosition(fileName, position, options) { if (options === void 0) { options = ts.emptyOptions; } // Convert from deprecated options names to new names - var fullPreferences = __assign({}, ts.identity(options), { includeCompletionsForModuleExports: options.includeCompletionsForModuleExports || options.includeExternalModuleExports, includeCompletionsWithInsertText: options.includeCompletionsWithInsertText || options.includeInsertTextCompletions }); + var fullPreferences = __assign(__assign({}, ts.identity(options)), { includeCompletionsForModuleExports: options.includeCompletionsForModuleExports || options.includeExternalModuleExports, includeCompletionsWithInsertText: options.includeCompletionsWithInsertText || options.includeInsertTextCompletions }); synchronizeHostData(); return ts.Completions.getCompletionsAtPosition(host, program, log, getValidSourceFile(fileName), position, fullPreferences, options.triggerCharacter); } @@ -122528,19 +126005,13 @@ var ts; } /// References and Occurrences function getOccurrencesAtPosition(fileName, position) { - return ts.flatMap(getDocumentHighlights(fileName, position, [fileName]), function (entry) { return entry.highlightSpans.map(function (highlightSpan) { return ({ - fileName: entry.fileName, - textSpan: highlightSpan.textSpan, - isWriteAccess: highlightSpan.kind === "writtenReference" /* writtenReference */, - isDefinition: false, - isInString: highlightSpan.isInString, - }); }); }); + return ts.flatMap(getDocumentHighlights(fileName, position, [fileName]), function (entry) { return entry.highlightSpans.map(function (highlightSpan) { return (__assign(__assign({ fileName: entry.fileName, textSpan: highlightSpan.textSpan, isWriteAccess: highlightSpan.kind === "writtenReference" /* writtenReference */, isDefinition: false }, highlightSpan.isInString && { isInString: true }), highlightSpan.contextSpan && { contextSpan: highlightSpan.contextSpan })); }); }); } function getDocumentHighlights(fileName, position, filesToSearch) { var normalizedFileName = ts.normalizePath(fileName); ts.Debug.assert(filesToSearch.some(function (f) { return ts.normalizePath(f) === normalizedFileName; })); synchronizeHostData(); - var sourceFilesToSearch = filesToSearch.map(getValidSourceFile); + var sourceFilesToSearch = ts.mapDefined(filesToSearch, function (fileName) { return program.getSourceFile(fileName); }); var sourceFile = getValidSourceFile(fileName); return ts.DocumentHighlights.getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch); } @@ -122551,7 +126022,8 @@ var ts; if (ts.isIdentifier(node) && (ts.isJsxOpeningElement(node.parent) || ts.isJsxClosingElement(node.parent)) && ts.isIntrinsicJsxName(node.escapedText)) { var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement; return [openingElement, closingElement].map(function (node) { - return ({ fileName: sourceFile.fileName, textSpan: ts.createTextSpanFromNode(node.tagName, sourceFile) }); + var textSpan = ts.createTextSpanFromNode(node.tagName, sourceFile); + return __assign({ fileName: sourceFile.fileName, textSpan: textSpan }, ts.FindAllReferences.toContextSpan(textSpan, sourceFile, node.parent)); }); } else { @@ -124478,7 +127950,7 @@ var ts; typeAcquisition: configFile.typeAcquisition, files: configFile.fileNames, raw: configFile.raw, - errors: realizeDiagnostics(result.parseDiagnostics.concat(configFile.errors), "\r\n") + errors: realizeDiagnostics(__spreadArrays(result.parseDiagnostics, configFile.errors), "\r\n") }; }); }; diff --git a/packages/schematics/schematics/blank/project-files/package.json.template b/packages/schematics/schematics/blank/project-files/package.json.template index 4416c8dbad09..448729d5d43f 100644 --- a/packages/schematics/schematics/blank/project-files/package.json.template +++ b/packages/schematics/schematics/blank/project-files/package.json.template @@ -15,7 +15,7 @@ "dependencies": { "@angular-devkit/core": "^<%= coreVersion %>", "@angular-devkit/schematics": "^<%= schematicsVersion %>", - "typescript": "~3.5.3" + "typescript": "~3.6.4" }, "devDependencies": { "@types/node": "~10.14.0", diff --git a/packages/schematics/schematics/schematic/files/package.json b/packages/schematics/schematics/schematic/files/package.json index 21ff709b2bf3..8c983871e282 100644 --- a/packages/schematics/schematics/schematic/files/package.json +++ b/packages/schematics/schematics/schematic/files/package.json @@ -15,7 +15,7 @@ "dependencies": { "@angular-devkit/core": "^<%= coreVersion %>", "@angular-devkit/schematics": "^<%= schematicsVersion %>", - "typescript": "~3.5.3" + "typescript": "~3.6.4" }, "devDependencies": { "@types/node": "~10.14.0", diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json index 084987d33cdc..5ee8e2d26152 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json @@ -21,7 +21,7 @@ "preprocess-loader": "^0.2.2", "raw-loader": "^0.5.1", "sass-loader": "^6.0.0", - "typescript": "~3.5.3", + "typescript": "~3.6.4", "webpack": "~4.0.1", "webpack-cli": "~2.0.9" } diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json index b444992d3479..841d11ac4e02 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json @@ -20,7 +20,7 @@ "performance-now": "^0.2.0", "raw-loader": "^0.5.1", "sass-loader": "^6.0.0", - "typescript": "~3.5.3", + "typescript": "~3.6.4", "webpack": "~4.0.1", "webpack-cli": "~2.0.9" } diff --git a/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json index cd1f314e91a1..ea3222917bac 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json @@ -21,7 +21,7 @@ "performance-now": "^0.2.0", "raw-loader": "^0.5.1", "sass-loader": "^6.0.3", - "typescript": "~3.5.3", + "typescript": "~3.6.4", "webpack": "~4.0.1", "webpack-cli": "~2.0.9" } diff --git a/yarn.lock b/yarn.lock index 2d6576c94a74..9af35714b27e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10431,10 +10431,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" - integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g== +typescript@3.6.4: + version "3.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d" + integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg== uglify-js@^3.1.4: version "3.6.1" From fd49f2e2fcb4c106ff2b7ae9b7cb658b2d3504d7 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 16 Oct 2019 12:40:36 +0100 Subject: [PATCH 0316/1070] test: disable typescript version check --- .../hello-world-app-ve/tsconfig.json | 3 ++- .../hello-world-app/tsconfig.json | 4 ++++ .../ng-packaged-ve/tsconfig.json | 3 ++- .../build_webpack/angular-app/tsconfig.json | 3 ++- .../test-app-weird/not/so/source/tsconfig.json | 2 ++ .../assets/webpack/test-app-weird/package.json | 16 ++++++++-------- .../e2e/assets/webpack/test-app/package.json | 16 ++++++++-------- .../e2e/assets/webpack/test-app/tsconfig.json | 2 ++ .../webpack/test-server-app/package.json | 18 +++++++++--------- .../webpack/test-server-app/tsconfig.json | 2 ++ tests/legacy-cli/e2e/utils/project.ts | 8 ++++++++ 11 files changed, 49 insertions(+), 28 deletions(-) diff --git a/tests/angular_devkit/build_angular/hello-world-app-ve/tsconfig.json b/tests/angular_devkit/build_angular/hello-world-app-ve/tsconfig.json index e47a98ffb98a..641ccb244858 100644 --- a/tests/angular_devkit/build_angular/hello-world-app-ve/tsconfig.json +++ b/tests/angular_devkit/build_angular/hello-world-app-ve/tsconfig.json @@ -19,6 +19,7 @@ ] }, "angularCompilerOptions": { - "enableIvy": false + "enableIvy": false, + "disableTypeScriptVersionCheck": true } } diff --git a/tests/angular_devkit/build_angular/hello-world-app/tsconfig.json b/tests/angular_devkit/build_angular/hello-world-app/tsconfig.json index 944d93dc8215..0b2d4a18fce3 100644 --- a/tests/angular_devkit/build_angular/hello-world-app/tsconfig.json +++ b/tests/angular_devkit/build_angular/hello-world-app/tsconfig.json @@ -17,5 +17,9 @@ "es2017", "dom" ] + }, + "angularCompilerOptions": { + "enableIvy": true, + "disableTypeScriptVersionCheck": true } } diff --git a/tests/angular_devkit/build_ng_packagr/ng-packaged-ve/tsconfig.json b/tests/angular_devkit/build_ng_packagr/ng-packaged-ve/tsconfig.json index a85aeb5a0fa8..cc264e55b22d 100644 --- a/tests/angular_devkit/build_ng_packagr/ng-packaged-ve/tsconfig.json +++ b/tests/angular_devkit/build_ng_packagr/ng-packaged-ve/tsconfig.json @@ -18,6 +18,7 @@ ] }, "angularCompilerOptions": { - "enableIvy": false + "enableIvy": false, + "disableTypeScriptVersionCheck": true } } diff --git a/tests/angular_devkit/build_webpack/angular-app/tsconfig.json b/tests/angular_devkit/build_webpack/angular-app/tsconfig.json index a85aeb5a0fa8..31ac2a6ecc0b 100644 --- a/tests/angular_devkit/build_webpack/angular-app/tsconfig.json +++ b/tests/angular_devkit/build_webpack/angular-app/tsconfig.json @@ -18,6 +18,7 @@ ] }, "angularCompilerOptions": { - "enableIvy": false + "enableIvy": true, + "disableTypeScriptVersionCheck": true } } diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/tsconfig.json b/tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/tsconfig.json index df35f5efe991..20c6851c877c 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/tsconfig.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/tsconfig.json @@ -17,6 +17,8 @@ "rootDir": "." }, "angularCompilerOptions": { + "enableIvy": true, + "disableTypeScriptVersionCheck": true "genDir": "app/generated/", "entryModule": "app/app.module#AppModule" } diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json index 5ee8e2d26152..89f2612aecff 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "^8.0.0-rc.0", - "@angular/compiler": "^8.0.0-rc.0", - "@angular/compiler-cli": "^8.0.0-rc.0", - "@angular/core": "^8.0.0-rc.0", - "@angular/platform-browser": "^8.0.0-rc.0", - "@angular/platform-browser-dynamic": "^8.0.0-rc.0", - "@angular/platform-server": "^8.0.0-rc.0", - "@angular/router": "^8.0.0-rc.0", + "@angular/common": "9.0.0-next.11", + "@angular/compiler": "9.0.0-next.11", + "@angular/compiler-cli": "9.0.0-next.11", + "@angular/core": "9.0.0-next.11", + "@angular/platform-browser": "9.0.0-next.11", + "@angular/platform-browser-dynamic": "9.0.0-next.11", + "@angular/platform-server": "9.0.0-next.11", + "@angular/router": "9.0.0-next.11", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.2", diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json index 841d11ac4e02..b068a17fd97e 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "9.0.0-next.7", - "@angular/compiler": "9.0.0-next.7", - "@angular/compiler-cli": "9.0.0-next.7", - "@angular/core": "9.0.0-next.7", - "@angular/platform-browser": "9.0.0-next.7", - "@angular/platform-browser-dynamic": "9.0.0-next.7", - "@angular/platform-server": "9.0.0-next.7", - "@angular/router": "9.0.0-next.7", + "@angular/common": "9.0.0-next.11", + "@angular/compiler": "9.0.0-next.11", + "@angular/compiler-cli": "9.0.0-next.11", + "@angular/core": "9.0.0-next.11", + "@angular/platform-browser": "9.0.0-next.11", + "@angular/platform-browser-dynamic": "9.0.0-next.11", + "@angular/platform-server": "9.0.0-next.11", + "@angular/router": "9.0.0-next.11", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.0", diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/tsconfig.json b/tests/legacy-cli/e2e/assets/webpack/test-app/tsconfig.json index 5822e780bfc7..7a47bfc4b3ac 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/tsconfig.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/tsconfig.json @@ -18,6 +18,8 @@ "rootDir": "." }, "angularCompilerOptions": { + "enableIvy": true, + "disableTypeScriptVersionCheck": true, "genDir": "./app/ngfactory", "entryModule": "app/app.module#AppModule" } diff --git a/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json index ea3222917bac..31096c2551f6 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json @@ -2,15 +2,15 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/animations": "^8.0.0-rc.0", - "@angular/common": "^8.0.0-rc.0", - "@angular/compiler": "^8.0.0-rc.0", - "@angular/compiler-cli": "^8.0.0-rc.0", - "@angular/core": "^8.0.0-rc.0", - "@angular/platform-browser": "^8.0.0-rc.0", - "@angular/platform-browser-dynamic": "^8.0.0-rc.0", - "@angular/platform-server": "^8.0.0-rc.0", - "@angular/router": "^8.0.0-rc.0", + "@angular/animations": "9.0.0-next.11", + "@angular/common": "9.0.0-next.11", + "@angular/compiler": "9.0.0-next.11", + "@angular/compiler-cli": "9.0.0-next.11", + "@angular/core": "9.0.0-next.11", + "@angular/platform-browser": "9.0.0-next.11", + "@angular/platform-browser-dynamic": "9.0.0-next.11", + "@angular/platform-server": "9.0.0-next.11", + "@angular/router": "9.0.0-next.11", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.2", diff --git a/tests/legacy-cli/e2e/assets/webpack/test-server-app/tsconfig.json b/tests/legacy-cli/e2e/assets/webpack/test-server-app/tsconfig.json index 5822e780bfc7..5e63e01f6871 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-server-app/tsconfig.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-server-app/tsconfig.json @@ -18,6 +18,8 @@ "rootDir": "." }, "angularCompilerOptions": { + "enableIvy": false, + "disableTypeScriptVersionCheck": true, "genDir": "./app/ngfactory", "entryModule": "app/app.module#AppModule" } diff --git a/tests/legacy-cli/e2e/utils/project.ts b/tests/legacy-cli/e2e/utils/project.ts index a3fd823b83a4..bc2d7348f8fc 100644 --- a/tests/legacy-cli/e2e/utils/project.ts +++ b/tests/legacy-cli/e2e/utils/project.ts @@ -39,6 +39,14 @@ export async function createProject(name: string, ...args: string[]) { await ng('new', name, '--skip-install', ...extraArgs, ...args); process.chdir(name); + if (fs.existsSync('tsconfig.json')) { + // Disable the TS version check to make TS updates easier. + // Only VE does it, but on Ivy the i18n extraction uses VE. + await updateJsonFile('tsconfig.json', config => { + config.angularCompilerOptions.disableTypeScriptVersionCheck = true; + }); + } + await prepareProjectForE2e(name); } From fb05ce4fdf2a09be07d240d4202d4297f6f5ce7d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 16 Oct 2019 14:38:16 +0100 Subject: [PATCH 0317/1070] feat(@ngtools/webpack): update peer dependency support --- packages/ngtools/webpack/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 845bd1390a9a..2334b9f579a0 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -28,8 +28,8 @@ "webpack-sources": "1.4.3" }, "peerDependencies": { - "@angular/compiler-cli": "^8.0.0-beta.0 || ^8.1.0-beta.0 || ^8.2.0-beta.0 || ^8.3.0-beta.0 || ^8.4.0-beta.0 || >=9.0.0-beta < 9", - "typescript": ">=3.4 < 3.7", + "@angular/compiler-cli": ">=9.0.0-beta < 10", + "typescript": ">=3.6 < 3.7", "webpack": "^4.0.0" }, "devDependencies": { From 1f52cda2e5d0c895ff9cc9eabc1cd05ab5bc8e80 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 16 Oct 2019 14:50:45 +0100 Subject: [PATCH 0318/1070] feat(@angular-devkit/build-angular): update peer dependency support --- packages/angular_devkit/build_angular/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 643d891a86f2..5df62ed970c0 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -97,7 +97,7 @@ "zone.js": "^0.10.0" }, "peerDependencies": { - "@angular/compiler-cli": "^8.0.0-beta.0 || ^8.1.0-beta.0 || ^8.2.0-beta.0 || ^8.3.0-beta.0 || ^8.4.0-beta.0 || >=9.0.0-beta < 9", - "typescript": ">=3.1 < 3.7" + "@angular/compiler-cli": ">=9.0.0-beta < 10", + "typescript": ">=3.6 < 3.7" } } From 7d3460d1154718dd80ecb044e8e2991327f79efb Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 16 Oct 2019 15:34:03 +0100 Subject: [PATCH 0319/1070] fix(@angular-devkit/build-angular): roll angular app test back to VE This should really be using Ivy but was getting the error below on every second build. `ERROR in Cannot read property 'incrementalState' of null` --- tests/angular_devkit/build_webpack/angular-app/tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/angular_devkit/build_webpack/angular-app/tsconfig.json b/tests/angular_devkit/build_webpack/angular-app/tsconfig.json index 31ac2a6ecc0b..c0c533570022 100644 --- a/tests/angular_devkit/build_webpack/angular-app/tsconfig.json +++ b/tests/angular_devkit/build_webpack/angular-app/tsconfig.json @@ -18,7 +18,10 @@ ] }, "angularCompilerOptions": { - "enableIvy": true, + // TODO: debug this problem. + // This should really be true but was getting the error below on every second build. + // `ERROR in Cannot read property 'incrementalState' of null` + "enableIvy": false, "disableTypeScriptVersionCheck": true } } From e8cdfa6020b8856498f9ea86b1fbbddb3f767975 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Wed, 16 Oct 2019 10:02:58 -0700 Subject: [PATCH 0320/1070] release: v9.0.0-next.11 --- packages/schematics/angular/utility/latest-versions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 926dae9a3d5f..377dfd5bfab8 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,9 +15,9 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.10', - DevkitBuildNgPackagr: '~0.900.0-next.10', - DevkitBuildWebpack: '~0.900.0-next.10', + DevkitBuildAngular: '~0.900.0-next.11', + DevkitBuildNgPackagr: '~0.900.0-next.11', + DevkitBuildWebpack: '~0.900.0-next.11', ngPackagr: '^5.5.1', }; From 4ede5b61f5db253f8697465da7878bb351b92b1a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 17 Oct 2019 15:36:26 +0100 Subject: [PATCH 0321/1070] test: add jit-prod e2e --- tests/legacy-cli/e2e/tests/build/jit-prod.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/legacy-cli/e2e/tests/build/jit-prod.ts diff --git a/tests/legacy-cli/e2e/tests/build/jit-prod.ts b/tests/legacy-cli/e2e/tests/build/jit-prod.ts new file mode 100644 index 000000000000..b4c8fe67a1a8 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/build/jit-prod.ts @@ -0,0 +1,15 @@ +import { ng } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; + + +export default async function () { + // Make prod use JIT. + await updateJsonFile('angular.json', configJson => { + const appArchitect = configJson.projects['test-project'].architect; + appArchitect.build.configurations['production'].aot = false; + appArchitect.build.configurations['production'].buildOptimizer = false; + }); + + // Test it works + await ng('e2e', '--prod'); +} From 2b41cd1e8160d62d0e3a36911d0c7decc99a152b Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sun, 6 Oct 2019 20:06:04 -0400 Subject: [PATCH 0322/1070] feat(@angular-devkit/build-angular): initial support for i18n translation inlining --- .../angular_devkit/build_angular/package.json | 6 + .../build_angular/src/browser/index.ts | 262 ++++++++++++++---- .../build_angular/src/utils/i18n-options.ts | 51 +++- .../src/utils/load-translations.ts | 39 +++ .../build_angular/src/utils/process-bundle.ts | 2 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 1 + .../legacy-cli/e2e/tests/i18n/ivy-localize.ts | 151 ++++++++++ 7 files changed, 448 insertions(+), 64 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/utils/load-translations.ts create mode 100644 tests/legacy-cli/e2e/tests/i18n/ivy-localize.ts diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 5df62ed970c0..e42365f35fda 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -98,6 +98,12 @@ }, "peerDependencies": { "@angular/compiler-cli": ">=9.0.0-beta < 10", + "@angular/localize": "^9.0.0-next.10", "typescript": ">=3.6 < 3.7" + }, + "peerDependenciesMeta": { + "@angular/localize": { + "optional": true + } } } diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 79a813c64759..564e2123fca3 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -11,20 +11,14 @@ import { WebpackLoggingCallback, runWebpack, } from '@angular-devkit/build-webpack'; -import { - join, - json, - logging, - normalize, - tags, - virtualFs, -} from '@angular-devkit/core'; +import { join, json, logging, normalize, tags, virtualFs } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import * as findCacheDirectory from 'find-cache-dir'; import * as fs from 'fs'; +import * as os from 'os'; import * as path from 'path'; import { Observable, from, of } from 'rxjs'; -import { catchError, concatMap, map, switchMap } from 'rxjs/operators'; +import { concatMap, map, switchMap } from 'rxjs/operators'; import { ScriptTarget } from 'typescript'; import * as webpack from 'webpack'; import { NgBuildAnalyticsPlugin } from '../../plugins/webpack/analytics'; @@ -62,6 +56,7 @@ import { } from '../utils'; import { copyAssets } from '../utils/copy-assets'; import { I18nOptions, createI18nOptions } from '../utils/i18n-options'; +import { createTranslationLoader } from '../utils/load-translations'; import { ProcessBundleFile, ProcessBundleOptions, @@ -167,17 +162,54 @@ async function initialize( projectSourceRoot?: string; i18n: I18nOptions; }> { + if (!context.target) { + throw new Error('The builder requires a target.'); + } + + const metadata = await context.getProjectMetadata(context.target); + const i18n = createI18nOptions(metadata, options.localize); + + if (i18n.inlineLocales.size > 0) { + // Load locales + const loader = await createTranslationLoader(); + + const usedFormats = new Set(); + for (const [locale, desc] of Object.entries(i18n.locales)) { + if (i18n.inlineLocales.has(locale)) { + const result = loader(desc.file); + + usedFormats.add(result.format); + if (usedFormats.size > 1) { + // This limitation is technically only for legacy message id support + throw new Error( + 'Localization currently only supports using one type of translation file format for the entire application.', + ); + } + + desc.format = result.format; + desc.translation = result.translation; + } + } + + // Legacy message id's require the format of the translations + if (usedFormats.size > 0) { + options.i18nFormat = [...usedFormats][0]; + } + } + + const originalOutputPath = options.outputPath; + + // If inlining store the output in a temporary location to facilitate post-processing + if (i18n.shouldInline) { + options.outputPath = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'angular-cli-')); + } + const { config, projectRoot, projectSourceRoot } = await buildBrowserWebpackConfigFromContext( options, context, host, ); - // target is verified in the above call - // tslint:disable-next-line: no-non-null-assertion - const metadata = await context.getProjectMetadata(context.target!); - const i18n = createI18nOptions(metadata); - let transformedConfig; if (webpackConfigurationTransform) { transformedConfig = await webpackConfigurationTransform(config); @@ -186,7 +218,7 @@ async function initialize( if (options.deleteOutputPath) { await deleteOutputDir( normalize(context.workspaceRoot), - normalize(options.outputPath), + normalize(originalOutputPath), host, ).toPromise(); } @@ -254,6 +286,10 @@ export function buildWebpackBrowser( return { success }; } else if (success) { + if (!fs.existsSync(baseOutputPath)) { + fs.mkdirSync(baseOutputPath, { recursive: true }); + } + let noModuleFiles: EmittedFiles[] | undefined; let moduleFiles: EmittedFiles[] | undefined; let files: EmittedFiles[] | undefined; @@ -272,6 +308,10 @@ export function buildWebpackBrowser( moduleFiles = []; noModuleFiles = []; + if (!webpackStats) { + throw new Error('Webpack stats build result is required.'); + } + // Common options for all bundle process actions const sourceMapOptions = normalizeSourceMaps(options.sourceMap || false); const actionOptions: Partial = { @@ -324,7 +364,8 @@ export function buildWebpackBrowser( // Retrieve the content/map for the file // NOTE: Additional future optimizations will read directly from memory - let filename = path.join(baseOutputPath, file.file); + // tslint:disable-next-line: no-non-null-assertion + let filename = path.join(webpackStats.outputPath!, file.file); const code = fs.readFileSync(filename, 'utf8'); let map; if (actionOptions.sourceMaps) { @@ -368,9 +409,6 @@ export function buildWebpackBrowser( noModuleFiles.push({ ...file, file: newFilename }); } - // Execute the bundle processing actions - context.logger.info('Generating ES5 bundles for differential loading...'); - const processActions: typeof actions = []; let processRuntimeAction: ProcessBundleOptions | undefined; const processResults: ProcessBundleResult[] = []; @@ -389,29 +427,118 @@ export function buildWebpackBrowser( options.subresourceIntegrity ? 'sha384' : undefined, ); + // Execute the bundle processing actions try { + context.logger.info('Generating ES5 bundles for differential loading...'); + for await (const result of executor.processAll(processActions)) { processResults.push(result); } + + // Runtime must be processed after all other files + if (processRuntimeAction) { + const runtimeOptions = { + ...processRuntimeAction, + runtimeData: processResults, + }; + processResults.push( + await import('../utils/process-bundle').then(m => m.process(runtimeOptions)), + ); + } + + context.logger.info('ES5 bundle generation complete.'); } finally { executor.stop(); } - // Runtime must be processed after all other files - if (processRuntimeAction) { - const runtimeOptions = { - ...processRuntimeAction, - runtimeData: processResults, - }; - processResults.push( - await import('../utils/process-bundle').then(m => m.process(runtimeOptions)), + if (i18n.shouldInline) { + context.logger.info('Generating localized bundles...'); + + const localize = await import('@angular/localize/src/tools/src/translate/main'); + const localizeDiag = await import('@angular/localize/src/tools/src/diagnostics'); + + const diagnostics = new localizeDiag.Diagnostics(); + const translationFilePaths = []; + let copySourceLocale = false; + for (const locale of i18n.inlineLocales) { + if (locale === i18n.sourceLocale) { + copySourceLocale = true; + continue; + } + translationFilePaths.push(i18n.locales[locale].file); + } + + if (copySourceLocale) { + await copyAssets( + [ + { + glob: '**/*', + // tslint:disable-next-line: no-non-null-assertion + input: webpackStats.outputPath!, + output: i18n.sourceLocale, + }, + ], + [baseOutputPath], + '', + ); + } + + if (translationFilePaths.length > 0) { + const sourceFilePaths = []; + for (const result of processResults) { + if (result.original) { + sourceFilePaths.push(result.original.filename); + } + if (result.downlevel) { + sourceFilePaths.push(result.downlevel.filename); + } + } + try { + localize.translateFiles({ + // tslint:disable-next-line: no-non-null-assertion + sourceRootPath: webpackStats.outputPath!, + sourceFilePaths, + translationFilePaths, + outputPathFn: (locale, relativePath) => + path.join(baseOutputPath, locale, relativePath), + diagnostics, + missingTranslation: options.i18nMissingTranslation || 'warning', + }); + } catch (err) { + context.logger.error('Localized bundle generation failed: ' + err.message); + + return { success: false }; + } finally { + try { + // Remove temporary directory used for i18n processing + // tslint:disable-next-line: no-non-null-assertion + await host.delete(normalize(webpackStats.outputPath!)).toPromise(); + } catch {} + } + } + + context.logger.info( + `Localized bundle generation ${diagnostics.hasErrors ? 'failed' : 'complete'}.`, ); - } - context.logger.info('ES5 bundle generation complete.'); + for (const message of diagnostics.messages) { + if (message.type === 'error') { + context.logger.error(message.message); + } else { + context.logger.warn(message.message); + } + } + + if (diagnostics.hasErrors) { + return { success: false }; + } + } // Copy assets if (options.assets) { + const outputPaths = i18n.shouldInline + ? [...i18n.inlineLocales].map(l => path.join(baseOutputPath, l)) + : [baseOutputPath]; try { await copyAssets( normalizeAssetPatterns( @@ -421,7 +548,7 @@ export function buildWebpackBrowser( normalize(projectRoot), projectSourceRoot === undefined ? undefined : normalize(projectSourceRoot), ), - [baseOutputPath], + outputPaths, context.workspaceRoot, ); } catch (err) { @@ -503,33 +630,29 @@ export function buildWebpackBrowser( } if (options.index) { - return writeIndexHtml({ - host, - outputPath: join(normalize(baseOutputPath), getIndexOutputFile(options)), - indexPath: join(root, getIndexInputFile(options)), - files, - noModuleFiles, - moduleFiles, - baseHref: options.baseHref, - deployUrl: options.deployUrl, - sri: options.subresourceIntegrity, - scripts: options.scripts, - styles: options.styles, - postTransform: transforms.indexHtml, - crossOrigin: options.crossOrigin, - lang: options.i18nLocale, - }) - .pipe( - map(() => ({ success: true })), - catchError(error => of({ success: false, error: mapErrorToMessage(error) })), - ) - .toPromise(); - } else { - return { success }; + const outputPaths = i18n.shouldInline + ? [...i18n.inlineLocales].map(l => path.join(baseOutputPath, l)) + : [baseOutputPath]; + + for (const outputPath of outputPaths) { + try { + await generateIndex( + outputPath, + options, + root, + files, + noModuleFiles, + moduleFiles, + transforms.indexHtml, + ); + } catch (err) { + return { success: false, error: mapErrorToMessage(err) }; + } + } } - } else { - return { success }; } + + return { success }; }), concatMap(buildEvent => { if (buildEvent.success && !options.watch && options.serviceWorker) { @@ -563,6 +686,35 @@ export function buildWebpackBrowser( ); } +function generateIndex( + baseOutputPath: string, + options: BrowserBuilderSchema, + root: string, + files: EmittedFiles[] | undefined, + noModuleFiles: EmittedFiles[] | undefined, + moduleFiles: EmittedFiles[] | undefined, + transformer?: IndexHtmlTransform, +): Promise { + const host = new NodeJsSyncHost(); + + return writeIndexHtml({ + host, + outputPath: join(normalize(baseOutputPath), getIndexOutputFile(options)), + indexPath: join(normalize(root), getIndexInputFile(options)), + files, + noModuleFiles, + moduleFiles, + baseHref: options.baseHref, + deployUrl: options.deployUrl, + sri: options.subresourceIntegrity, + scripts: options.scripts, + styles: options.styles, + postTransform: transformer, + crossOrigin: options.crossOrigin, + lang: options.i18nLocale, + }).toPromise(); +} + function mapErrorToMessage(error: unknown): string | undefined { if (error instanceof Error) { return error.message; diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index dbc7fad8820a..89b03da22a51 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -8,19 +8,37 @@ import { json } from '@angular-devkit/core'; export interface I18nOptions { - sourceLocale?: string; - locales: Record; + inlineLocales: Set; + sourceLocale: string; + locales: Record; + readonly shouldInline: boolean; } -export function createI18nOptions(metadata: json.JsonObject): I18nOptions { - const i18n: I18nOptions = { locales: {} }; +export function createI18nOptions( + metadata: json.JsonObject, + inline?: boolean | string[], +): I18nOptions { + if ( + metadata.i18n !== undefined && + (typeof metadata.i18n !== 'object' || !metadata.i18n || Array.isArray(metadata.i18n)) + ) { + throw new Error('Project i18n field is malformed. Expected an object.'); + } + metadata = metadata.i18n || {}; if (metadata.sourceLocale !== undefined && typeof metadata.sourceLocale !== 'string') { throw new Error('Project i18n sourceLocale field is malformed. Expected a string.'); } - // en-US is the default locale added to Angular applications (https://angular.io/guide/i18n#i18n-pipes) - i18n.sourceLocale = metadata.sourceLocale || 'en-US'; + const i18n: I18nOptions = { + inlineLocales: new Set(), + // en-US is the default locale added to Angular applications (https://angular.io/guide/i18n#i18n-pipes) + sourceLocale: metadata.sourceLocale || 'en-US', + locales: {}, + get shouldInline() { + return this.inlineLocales.size > 0; + }, + }; if ( metadata.locales !== undefined && @@ -35,13 +53,30 @@ export function createI18nOptions(metadata: json.JsonObject): I18nOptions { ); } - // TODO: Integrate translation file parsing from FW when available + if (locale === i18n.sourceLocale) { + throw new Error( + `An i18n locale identifier ('${locale}') cannot both be a source locale and provide a translation.`, + ); + } + i18n.locales[locale] = { file: translationFile, - translation: {}, }; } } + if (inline === true) { + i18n.inlineLocales.add(i18n.sourceLocale); + Object.keys(i18n.locales).forEach(locale => i18n.inlineLocales.add(locale)); + } else if (inline) { + for (const locale of inline) { + if (!i18n.locales[locale]) { + throw new Error(`Requested inline locale '${locale}' is not defined for the project.`); + } + + i18n.inlineLocales.add(locale); + } + } + return i18n; } diff --git a/packages/angular_devkit/build_angular/src/utils/load-translations.ts b/packages/angular_devkit/build_angular/src/utils/load-translations.ts new file mode 100644 index 000000000000..3e5a89e22c62 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/load-translations.ts @@ -0,0 +1,39 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import * as fs from 'fs'; + +export type TranslationLoader = (path: string) => { translation: unknown; format: string }; + +export async function createTranslationLoader(): Promise { + const parsers = { + json: new (await import( + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json/simple_json_translation_parser' + )).SimpleJsonTranslationParser(), + xlf: new (await import( + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1/xliff1_translation_parser' + )).Xliff1TranslationParser(), + xlf2: new (await import( + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2/xliff2_translation_parser' + )).Xliff2TranslationParser(), + }; + + return (path: string) => { + const content = fs.readFileSync(path, 'utf8'); + + for (const [format, parser] of Object.entries(parsers)) { + if (parser.canParse(path, content)) { + return { format, translation: parser.parse(path, content) }; + } + } + + throw new Error('Unsupported translation file format.'); + }; +} diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 82da8993e5c3..6e45bf448826 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -161,7 +161,7 @@ export async function process(options: ProcessBundleOptions): Promise { + const appProject = workspaceJson.projects['test-project']; + const appArchitect = appProject.architect || appProject.targets; + const serveConfigs = appArchitect['serve'].configurations; + const e2eConfigs = appArchitect['e2e'].configurations; + + // Make default builds prod. + appArchitect['build'].options.optimization = true; + appArchitect['build'].options.buildOptimizer = true; + appArchitect['build'].options.aot = true; + appArchitect['build'].options.fileReplacements = [ + { + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }, + ]; + + // Enable localization for all locales + appArchitect['build'].options.localize = true; + + // Add locale definitions to the project + // tslint:disable-next-line: no-any + const i18n: Record = (appProject.i18n = { locales: {} }); + for (const { lang } of langTranslations) { + if (lang == 'en-US') { + i18n.sourceLocale = lang; + } else { + i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; + } + serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; + e2eConfigs[lang] = { + specs: [`./src/app.${lang}.e2e-spec.ts`], + devServerTarget: `test-project:serve:${lang}`, + }; + } + }); + + // Add a translatable element. + await writeFile( + 'src/app/app.component.html', + '

Hello i18n!

', + ); + + // Extract the translation messages and copy them for each language. + await ng('xi18n', '--output-path=src/locale'); + await expectFileToExist('src/locale/messages.xlf'); + await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); + await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); + + for (const { lang, translation } of langTranslations) { + if (lang != 'en-US') { + await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'source-language="en-US"', + `source-language="en-US" target-language="${lang}"`, + ); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'Hello i18n!', + `Hello i18n!\n${translation}`, + ); + } + } + + // Build each locale and verify the output. + await ng('build', '--i18n-missing-translation', 'error'); + for (const { lang, translation } of langTranslations) { + await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, translation); + await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, translation); + + // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. + const app = express(); + app.use(express.static(resolve(baseDir, lang))); + const server = app.listen(4200, 'localhost'); + try { + // Add E2E test for locale + await writeFile( + 'e2e/src/app.e2e-spec.ts', + ` + import { browser, logging, element, by } from 'protractor'; + describe('workspace-project App', () => { + it('should display welcome message', () => { + browser.get(browser.baseUrl); + expect(element(by.css('h1')).getText()).toEqual('${translation}'); + }); + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); + }); + `, + ); + + // Execute without a devserver. + await ng('e2e', '--devServerTarget='); + } finally { + server.close(); + } + } + + // Verify missing translation behaviour. + await appendToFile('src/app/app.component.html', '

Other content

'); + await ng('build', '--i18n-missing-translation', 'ignore'); + await expectFileToMatch(`${baseDir}/fr/main-es5.js`, /Other content/); + await expectFileToMatch(`${baseDir}/fr/main-es2015.js`, /Other content/); + await expectToFail(() => ng('build', '--i18n-missing-translation', 'error')); +} From 9fca29a254a26abd1c802fa34df856666aaebb9b Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 8 Oct 2019 09:50:48 -0400 Subject: [PATCH 0323/1070] refactor(@angular-devkit/build-angular): use copy file utility in action cache --- .../build_angular/src/browser/action-cache.ts | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/action-cache.ts b/packages/angular_devkit/build_angular/src/browser/action-cache.ts index f04e4053b07b..59b1a9c34143 100644 --- a/packages/angular_devkit/build_angular/src/browser/action-cache.ts +++ b/packages/angular_devkit/build_angular/src/browser/action-cache.ts @@ -8,6 +8,7 @@ import { createHash } from 'crypto'; import * as findCacheDirectory from 'find-cache-dir'; import * as fs from 'fs'; +import { copyFile } from '../utils/copy-file'; import { manglingDisabled } from '../utils/mangle-options'; import { CacheKey, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; @@ -15,16 +16,6 @@ const cacache = require('cacache'); const cacheDownlevelPath = findCacheDirectory({ name: 'angular-build-dl' }); const packageVersion = require('../../package.json').version; -// Workaround Node.js issue prior to 10.16 with copyFile on macOS -// https://github.com/angular/angular-cli/issues/15544 & https://github.com/nodejs/node/pull/27241 -let copyFileWorkaround = false; -if (process.platform === 'darwin') { - const version = process.versions.node.split('.').map(part => Number(part)); - if (version[0] < 10 || version[0] === 11 || (version[0] === 10 && version[1] < 16)) { - copyFileWorkaround = true; - } -} - export interface CacheEntry { path: string; size: number; @@ -35,17 +26,8 @@ export class BundleActionCache { constructor(private readonly integrityAlgorithm?: string) {} static copyEntryContent(entry: CacheEntry | string, dest: fs.PathLike): void { - if (copyFileWorkaround) { - try { - fs.unlinkSync(dest); - } catch {} - } + copyFile(typeof entry === 'string' ? entry : entry.path, dest); - fs.copyFileSync( - typeof entry === 'string' ? entry : entry.path, - dest, - fs.constants.COPYFILE_FICLONE, - ); if (process.platform !== 'win32') { // The cache writes entries as readonly and when using copyFile the permissions will also be copied. // See: https://github.com/npm/cacache/blob/073fbe1a9f789ba42d9a41de7b8429c93cf61579/lib/util/move-file.js#L36 From cf116da464f85d6c5f78c4c2da7f6e7fde2d9ad8 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:26:52 -0400 Subject: [PATCH 0324/1070] fix(@angular-devkit/build-angular): normalize extract i18n format option --- .../build_angular/src/extract-i18n/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts index 50136fe9c3f3..bfa0f28b8f96 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts @@ -63,6 +63,18 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte options.format = options.i18nFormat; } + switch (options.format) { + case Format.Xlf: + case Format.Xlif: + case Format.Xliff: + options.format = Format.Xlf; + break; + case Format.Xlf2: + case Format.Xliff2: + options.format = Format.Xlf2; + break; + } + // We need to determine the outFile name so that AngularCompiler can retrieve it. let outFile = options.outFile || getI18nOutfile(options.format); if (options.outputPath) { From cda57ae0e514f6e1fabfe966f568199c7310c419 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 16 Oct 2019 11:19:44 -0400 Subject: [PATCH 0325/1070] feat(@angular-devkit/build-angular): optimize i18n localize usage in source locale --- .../angular_devkit/build_angular/package.json | 2 +- .../build_angular/src/browser/index.ts | 20 +++---------------- .../legacy-cli/e2e/tests/i18n/ivy-localize.ts | 6 ++---- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index e42365f35fda..421d8d7e6fbf 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -98,7 +98,7 @@ }, "peerDependencies": { "@angular/compiler-cli": ">=9.0.0-beta < 10", - "@angular/localize": "^9.0.0-next.10", + "@angular/localize": "^9.0.0-next.11", "typescript": ">=3.6 < 3.7" }, "peerDependenciesMeta": { diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 564e2123fca3..640136b3cd96 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -459,30 +459,15 @@ export function buildWebpackBrowser( const diagnostics = new localizeDiag.Diagnostics(); const translationFilePaths = []; - let copySourceLocale = false; + let handleSourceLocale = false; for (const locale of i18n.inlineLocales) { if (locale === i18n.sourceLocale) { - copySourceLocale = true; + handleSourceLocale = true; continue; } translationFilePaths.push(i18n.locales[locale].file); } - if (copySourceLocale) { - await copyAssets( - [ - { - glob: '**/*', - // tslint:disable-next-line: no-non-null-assertion - input: webpackStats.outputPath!, - output: i18n.sourceLocale, - }, - ], - [baseOutputPath], - '', - ); - } - if (translationFilePaths.length > 0) { const sourceFilePaths = []; for (const result of processResults) { @@ -503,6 +488,7 @@ export function buildWebpackBrowser( path.join(baseOutputPath, locale, relativePath), diagnostics, missingTranslation: options.i18nMissingTranslation || 'warning', + sourceLocale: handleSourceLocale ? i18n.sourceLocale : undefined, }); } catch (err) { context.logger.error('Localized bundle generation failed: ' + err.message); diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize.ts index fe4a4e544633..a35ca635f7b7 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize.ts @@ -25,10 +25,6 @@ export default async function() { } await npm('install', `${localizeVersion}`); - // Temporarily add the localize "polyfill" -- release version will not need this - // TODO: Remove after next framework release - await appendToFile('src/polyfills.ts', '\nimport "@angular/localize/init";'); - const baseDir = 'dist/test-project'; // Set configurations for each locale. @@ -108,6 +104,8 @@ export default async function() { for (const { lang, translation } of langTranslations) { await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, translation); await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, translation); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, '$localize')); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, '$localize')); // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. const app = express(); From ab70e61d02ecb384ff33a8d39707c1d09ba86bd1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 17 Oct 2019 16:01:24 +0100 Subject: [PATCH 0326/1070] fix(@ngtools/webpack): don't set ngprogram to null It should be undefined instead: https://github.com/angular/angular/blob/cd7b1992193be85f3317a4ef793b13c03ac2b215/packages/compiler-cli/src/ngtsc/program.ts#L161 Fix https://github.com/angular/angular-cli/issues/15857 --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 6 +++--- .../angular_devkit/build_webpack/angular-app/tsconfig.json | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index a7f0ad7a8c17..5622c50bb1b9 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -91,7 +91,7 @@ export class AngularCompilerPlugin { // TS compilation. private _compilerOptions: CompilerOptions; private _rootNames: string[]; - private _program: (ts.Program | Program) | null; + private _program: (ts.Program | Program) | undefined; private _compilerHost: WebpackCompilerHost & CompilerHost; private _moduleResolutionCache: ts.ModuleResolutionCache; private _resourceLoader?: WebpackResourceLoader; @@ -673,7 +673,7 @@ export class AngularCompilerPlugin { // only present for webpack 4.23.0+, assume true otherwise const watchMode = rootCompiler.watchMode === undefined ? true : rootCompiler.watchMode; if (!watchMode) { - this._program = null; + this._program = undefined; this._transformers = []; this._resourceLoader = undefined; this._compilerHost.reset(); @@ -1385,7 +1385,7 @@ export class AngularCompilerPlugin { } else { errMsg = e.stack; // It is not a syntax error we might have a program with unknown state, discard it. - this._program = null; + this._program = undefined; code = UNKNOWN_ERROR_CODE; } allDiagnostics.push( diff --git a/tests/angular_devkit/build_webpack/angular-app/tsconfig.json b/tests/angular_devkit/build_webpack/angular-app/tsconfig.json index c0c533570022..31ac2a6ecc0b 100644 --- a/tests/angular_devkit/build_webpack/angular-app/tsconfig.json +++ b/tests/angular_devkit/build_webpack/angular-app/tsconfig.json @@ -18,10 +18,7 @@ ] }, "angularCompilerOptions": { - // TODO: debug this problem. - // This should really be true but was getting the error below on every second build. - // `ERROR in Cannot read property 'incrementalState' of null` - "enableIvy": false, + "enableIvy": true, "disableTypeScriptVersionCheck": true } } From 6c6ae08ec71c658478fe868afb406d185fa73ea9 Mon Sep 17 00:00:00 2001 From: Tom Sullivan Date: Mon, 14 Oct 2019 17:02:12 +1100 Subject: [PATCH 0327/1070] fix(@angular/cli): Determine relative paths correctly As `git status --porcelain` always shows paths relative to the top level, fetch the top level path in `checkCleanGit` and properly determine whether any modified files are actually within the Angular workspace root. --- packages/angular/cli/commands/update-impl.ts | 3 ++- .../misc/update-git-clean-subdirectory.ts | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/legacy-cli/e2e/tests/misc/update-git-clean-subdirectory.ts diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 9330e86125d3..727ec35924ef 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -551,6 +551,7 @@ export class UpdateCommand extends Command { checkCleanGit() { try { + const topLevel = execSync('git rev-parse --show-toplevel', { encoding: 'utf8', stdio: 'pipe' }); const result = execSync('git status --porcelain', { encoding: 'utf8', stdio: 'pipe' }); if (result.trim().length === 0) { return true; @@ -560,7 +561,7 @@ export class UpdateCommand extends Command { for (const entry of result.split('\n')) { const relativeEntry = path.relative( path.resolve(this.workspace.root), - path.resolve(entry.slice(3).trim()), + path.resolve(topLevel.trim(), entry.slice(3).trim()), ); if (!relativeEntry.startsWith('..') && !path.isAbsolute(relativeEntry)) { diff --git a/tests/legacy-cli/e2e/tests/misc/update-git-clean-subdirectory.ts b/tests/legacy-cli/e2e/tests/misc/update-git-clean-subdirectory.ts new file mode 100644 index 000000000000..b561735fe5c3 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/misc/update-git-clean-subdirectory.ts @@ -0,0 +1,26 @@ +import { createDir, writeFile } from '../../utils/fs'; +import { expectToFail } from '../../utils/utils'; +import { getGlobalVariable } from '../../utils/env'; +import { ng, silentGit } from '../../utils/process'; +import { prepareProjectForE2e } from '../../utils/project' + +export default async function() { + process.chdir(getGlobalVariable('tmp-root')); + + await createDir('./subdirectory'); + process.chdir('./subdirectory'); + + await silentGit('init', '.'); + + await ng('new', 'subdirectory-test-project', '--skip-install'); + process.chdir('./subdirectory-test-project'); + await prepareProjectForE2e('subdirectory-test-project'); + + await writeFile('../added.ts', 'console.log(\'created\');\n'); + await silentGit('add', '../added.ts'); + + const { message } = await expectToFail(() => ng('update', '--all')); + if (message && message.includes('Repository is not clean.')) { + throw new Error('Expected clean repository'); + } +} From 13bdf064732242fea0f36617d856bdd63906c687 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 17 Oct 2019 18:56:16 +0000 Subject: [PATCH 0328/1070] build: update @angular/animations to version --- tests/legacy-cli/e2e/ng-snapshot/package.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 3937b943e6d9..a5a714ae2767 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,16 +2,16 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#06199648629a68084af81ecdbc73a4a425ff3a92", - "@angular/common": "github:angular/common-builds#239bb4eb52905c57a8a0207e4f1e95f8e018bd54", - "@angular/compiler": "github:angular/compiler-builds#ad0588213a4ae15b585efdca549bb04221129014", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#46061561d517698fc9608a44d207540bfda2fede", - "@angular/core": "github:angular/core-builds#e05a7ec0414fe552ac3632d3735927e026157db3", - "@angular/forms": "github:angular/forms-builds#e3910afb6188c86e9f51c615e24e3e65587142f5", - "@angular/language-service": "github:angular/language-service-builds#5f99caab4c5bcfbdd8aecafc9c70d8c7ce703004", - "@angular/localize": "github:angular/localize-builds#838dec9a95dd7ecb4431627a99c6a91aa41cd78e", - "@angular/platform-browser": "github:angular/platform-browser-builds#16497ae98fc072c69910e3042e622980645340ad", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#73fe229bcd3b0e644b946296805939757a2b9f83", - "@angular/router": "github:angular/router-builds#f9822e15092516892cb3817ec3bf6524c0188adc" + "@angular/animations": "github:angular/animations-builds#05df60e4f3b6f0dea2ec026d32c6f752e6a3c49b", + "@angular/common": "github:angular/common-builds#31e48afda3bfdc0640f9b5e92c1b608a732d19b7", + "@angular/compiler": "github:angular/compiler-builds#b18ca4c44d4bed3e9ef8eeafbc1bb7f0f7d5dcf2", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#3ad9332a78a23222d905cb378dd8857a2ab652fc", + "@angular/core": "github:angular/core-builds#6a025edda28522cd18f0f6c5b35c5afaf610ffab", + "@angular/forms": "github:angular/forms-builds#e733ca7f033e6d90a840ae9300783737ea7d683f", + "@angular/language-service": "github:angular/language-service-builds#48a11b13abf1211d6200ec5e12e7c8e7b3abb0eb", + "@angular/localize": "github:angular/localize-builds#c59008f4b912a097088360291dc6ea6a4b35086b", + "@angular/platform-browser": "github:angular/platform-browser-builds#90d03ac0eabd634d0cd87bb9e386a027a0da8ef3", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#248369089788724e0d4c2c3670163de28157bd27", + "@angular/router": "github:angular/router-builds#48442471d7dd1a646aa9c66f6f0fc7517457536c" } } \ No newline at end of file From 95776fed6713c3d911c876272cdb25c4e8fd3599 Mon Sep 17 00:00:00 2001 From: vikerman Date: Thu, 17 Oct 2019 14:20:40 -0700 Subject: [PATCH 0329/1070] release: v9.0.0-next.12 --- packages/schematics/angular/utility/latest-versions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 377dfd5bfab8..2afb935f4b95 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,9 +15,9 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.11', - DevkitBuildNgPackagr: '~0.900.0-next.11', - DevkitBuildWebpack: '~0.900.0-next.11', + DevkitBuildAngular: '~0.900.0-next.12', + DevkitBuildNgPackagr: '~0.900.0-next.12', + DevkitBuildWebpack: '~0.900.0-next.12', ngPackagr: '^5.5.1', }; From 0074abfbe87cd99d9f9d2f85c51cb264e36509dd Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 19 Oct 2019 12:34:43 +0200 Subject: [PATCH 0330/1070] feat(@schematics/angular): update to TypeScript 3.6 --- packages/schematics/angular/utility/latest-versions.ts | 2 +- .../schematics/angular/workspace/files/package.json.template | 2 +- .../schematics/blank/project-files/package.json.template | 2 +- packages/schematics/schematics/schematic/files/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 2afb935f4b95..6a76405516e6 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -11,7 +11,7 @@ export const latestVersions = { Angular: '~9.0.0-next.11', RxJs: '~6.5.3', ZoneJs: '~0.10.2', - TypeScript: '~3.5.3', + TypeScript: '~3.6.4', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. diff --git a/packages/schematics/angular/workspace/files/package.json.template b/packages/schematics/angular/workspace/files/package.json.template index 78d695e562b9..dbcf8cd83d81 100644 --- a/packages/schematics/angular/workspace/files/package.json.template +++ b/packages/schematics/angular/workspace/files/package.json.template @@ -28,7 +28,7 @@ "@angular/cli": "<%= '~' + version %>", "@angular/compiler-cli": "<%= latestVersions.Angular %>", "@angular/language-service": "<%= latestVersions.Angular %>", - "@types/node": "~10.14.0",<% if (!minimal) { %> + "@types/node": "^12.11.1",<% if (!minimal) { %> "@types/jasmine": "~3.4.0", "@types/jasminewd2": "~2.0.3", "codelyzer": "^5.1.2", diff --git a/packages/schematics/schematics/blank/project-files/package.json.template b/packages/schematics/schematics/blank/project-files/package.json.template index 448729d5d43f..66c29e001dca 100644 --- a/packages/schematics/schematics/blank/project-files/package.json.template +++ b/packages/schematics/schematics/blank/project-files/package.json.template @@ -18,7 +18,7 @@ "typescript": "~3.6.4" }, "devDependencies": { - "@types/node": "~10.14.0", + "@types/node": "^12.11.1", "@types/jasmine": "~3.4.0", "jasmine": "^3.5.0" } diff --git a/packages/schematics/schematics/schematic/files/package.json b/packages/schematics/schematics/schematic/files/package.json index 8c983871e282..5332c45c9eae 100644 --- a/packages/schematics/schematics/schematic/files/package.json +++ b/packages/schematics/schematics/schematic/files/package.json @@ -18,7 +18,7 @@ "typescript": "~3.6.4" }, "devDependencies": { - "@types/node": "~10.14.0", + "@types/node": "^12.11.1", "@types/jasmine": "~3.4.0", "jasmine": "^3.5.0" } From 3fc4c91ffff9a7d44b9155fb68bc859d303789f0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 18 Oct 2019 20:17:39 +0100 Subject: [PATCH 0331/1070] feat(@schematics/angular): update @types/node for version 9 Angular will only support TS 3.6+ on version 9, and older versions of `@types/node` are incompatible with it and will cause all builds to fail. Related to https://github.com/angular/angular/pull/33250 --- .../angular/migrations/update-9/update-dependencies.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/schematics/angular/migrations/update-9/update-dependencies.ts b/packages/schematics/angular/migrations/update-9/update-dependencies.ts index 2e10c0026d8e..db910f64f511 100644 --- a/packages/schematics/angular/migrations/update-9/update-dependencies.ts +++ b/packages/schematics/angular/migrations/update-9/update-dependencies.ts @@ -23,6 +23,7 @@ export function updateDependencies(): Rule { 'ng-packagr': latestVersions.ngPackagr, 'web-animations-js': '^2.3.2', 'codelyzer': '^5.1.2', + '@types/node': '^12.11.1', }; for (const [name, version] of Object.entries(dependenciesToUpdate)) { From 3c9305b37c4251ac97ef373d65aa9b90c273aaa9 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 19 Oct 2019 15:10:44 +0200 Subject: [PATCH 0332/1070] test: fix update-git-clean-subdirectory test --- .../e2e/tests/misc/update-git-clean-subdirectory.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/misc/update-git-clean-subdirectory.ts b/tests/legacy-cli/e2e/tests/misc/update-git-clean-subdirectory.ts index b561735fe5c3..33dddb8d50a2 100644 --- a/tests/legacy-cli/e2e/tests/misc/update-git-clean-subdirectory.ts +++ b/tests/legacy-cli/e2e/tests/misc/update-git-clean-subdirectory.ts @@ -1,8 +1,7 @@ -import { createDir, writeFile } from '../../utils/fs'; -import { expectToFail } from '../../utils/utils'; import { getGlobalVariable } from '../../utils/env'; +import { createDir, writeFile } from '../../utils/fs'; import { ng, silentGit } from '../../utils/process'; -import { prepareProjectForE2e } from '../../utils/project' +import { prepareProjectForE2e } from '../../utils/project'; export default async function() { process.chdir(getGlobalVariable('tmp-root')); @@ -19,8 +18,8 @@ export default async function() { await writeFile('../added.ts', 'console.log(\'created\');\n'); await silentGit('add', '../added.ts'); - const { message } = await expectToFail(() => ng('update', '--all')); - if (message && message.includes('Repository is not clean.')) { + const { stderr } = await ng('update', '--all', '--force'); + if (stderr && stderr.includes('Repository is not clean.')) { throw new Error('Expected clean repository'); } } From 3ec4f613576efec43696138ba557b06aa631a0fb Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Thu, 17 Oct 2019 17:05:29 +0200 Subject: [PATCH 0333/1070] fix(@schematics/angular): remove unneeded debugElement in test The generate tests in `app.component.spec.ts` are using `fixture.debugElement.componentInstance` whereas we can directly use `fixture.componentInstance`. This fixes the generated test to show a better example to users discovering unit tests. --- .../application/other-files/app.component.spec.ts.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/application/other-files/app.component.spec.ts.template b/packages/schematics/angular/application/other-files/app.component.spec.ts.template index 9ffbfc0a3127..08513f442052 100644 --- a/packages/schematics/angular/application/other-files/app.component.spec.ts.template +++ b/packages/schematics/angular/application/other-files/app.component.spec.ts.template @@ -16,20 +16,20 @@ describe('AppComponent', () => { it('should create the app', () => { const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; + const app = fixture.componentInstance; expect(app).toBeTruthy(); }); it(`should have as title '<%= name %>'`, () => { const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; + const app = fixture.componentInstance; expect(app.title).toEqual('<%= name %>'); }); it('should render title', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; + const compiled = fixture.nativeElement; expect(compiled.querySelector('.content span').textContent).toContain('<%= name %> app is running!'); }); }); From 18c79af31fb632818849d51e6a173b8164068bbe Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 18 Oct 2019 06:21:07 +0000 Subject: [PATCH 0334/1070] build: update browserslist to version 4.7.1 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 23 ++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 421d8d7e6fbf..0e2c5b56db54 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -16,7 +16,7 @@ "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", "autoprefixer": "9.6.5", - "browserslist": "4.7.0", + "browserslist": "4.7.1", "cacache": "13.0.1", "caniuse-lite": "1.0.30000999", "circular-dependency-plugin": "5.2.0", diff --git a/yarn.lock b/yarn.lock index 9af35714b27e..3183be4add3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2373,7 +2373,16 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.0, browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.7.0: +browserslist@4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.1.tgz#bd400d1aea56538580e8c4d5f1c54ac11b5ab468" + integrity sha512-QtULFqKIAtiyNx7NhZ/p4rB8m3xDozVo/pi5VgTlADLF2tNigz/QH+v0m5qhn7XfHT7u+607NcCNOnC0HZAlMg== + dependencies: + caniuse-lite "^1.0.30000999" + electron-to-chromium "^1.3.284" + node-releases "^1.1.36" + +browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== @@ -3873,6 +3882,11 @@ electron-to-chromium@^1.3.247: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.282.tgz#16118ae9c79a32ea93a17591d5b16e28d10fc08d" integrity sha512-irSaDeCGgfMu1OA30bhqIBr+dx+pDJjRbwCpob7YWqVZbzXblybNzPGklVnWqv4EXxbkEAzQYqiNCqNTgu00lQ== +electron-to-chromium@^1.3.284: + version "1.3.285" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.285.tgz#909576db2ee4dfec74a87aa30c92f66ebfc78748" + integrity sha512-DYR9KW723sUbGK++DCmCmM95AbNXT4Q0tlCFMcYijFjayhuDqlGYR68OemlP8MJj0gjkwdeItIUfd0oLCgw+4A== + elliptic@^6.0.0: version "6.5.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.1.tgz#c380f5f909bf1b9b4428d028cd18d3b0efd6b52b" @@ -7290,6 +7304,13 @@ node-releases@^1.1.29: dependencies: semver "^6.3.0" +node-releases@^1.1.36: + version "1.1.36" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.36.tgz#44b7cb8254138e87bdbfa47761d0f825e20900b4" + integrity sha512-ggXhX6QGyJSjj3r+6ml2LqqC28XOWmKtpb+a15/Zpr9V3yoNazxJNlcQDS9bYaid5FReEWHEgToH1mwoUceWwg== + dependencies: + semver "^6.3.0" + node-sass-tilde-importer@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz#1a15105c153f648323b4347693fdb0f331bad1ce" From 035187aa3274f6742f1bf04c025ea3ef5cbcac3b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 18 Oct 2019 07:22:08 +0000 Subject: [PATCH 0335/1070] build: update terser to version 4.3.9 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 0e2c5b56db54..46f85bf7ec93 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -55,7 +55,7 @@ "stylus": "0.54.7", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", - "terser": "4.3.8", + "terser": "4.3.9", "terser-webpack-plugin": "2.1.3", "webpack": "4.41.1", "webpack-dev-middleware": "3.7.2", diff --git a/yarn.lock b/yarn.lock index 3183be4add3c..a8d3ce0b3089 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10109,7 +10109,16 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.8, terser@^4.1.2, terser@^4.3.8: +terser@4.3.9: + version "4.3.9" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.9.tgz#e4be37f80553d02645668727777687dad26bbca8" + integrity sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + +terser@^4.1.2, terser@^4.3.8: version "4.3.8" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.8.tgz#707f05f3f4c1c70c840e626addfdb1c158a17136" integrity sha512-otmIRlRVmLChAWsnSFNO0Bfk6YySuBp6G9qrHiJwlLDd4mxe2ta4sjI7TzIR+W1nBMjilzrMcPOz9pSusgx3hQ== From 91d41b5ea4b44fb67e7b6ee58e8e98356ef28cb0 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 18 Oct 2019 07:22:23 +0000 Subject: [PATCH 0336/1070] build: update webpack to version 4.41.2 --- packages/angular_devkit/build_angular/package.json | 2 +- packages/angular_devkit/build_webpack/package.json | 2 +- packages/ngtools/webpack/package.json | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 46f85bf7ec93..32afe01e414a 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -57,7 +57,7 @@ "tree-kill": "1.2.1", "terser": "4.3.9", "terser-webpack-plugin": "2.1.3", - "webpack": "4.41.1", + "webpack": "4.41.2", "webpack-dev-middleware": "3.7.2", "webpack-dev-server": "3.8.2", "webpack-merge": "4.2.2", diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json index 1dc1d3f3c372..fe99af1167a8 100644 --- a/packages/angular_devkit/build_webpack/package.json +++ b/packages/angular_devkit/build_webpack/package.json @@ -16,7 +16,7 @@ "webpack-dev-server": "^3.1.4" }, "devDependencies": { - "webpack": "4.41.1", + "webpack": "4.41.2", "webpack-dev-server": "^3.1.4" } } diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 2334b9f579a0..fa3947e39b82 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -36,6 +36,6 @@ "@angular/compiler": "9.0.0-next.11", "@angular/compiler-cli": "9.0.0-next.11", "typescript": "3.6.4", - "webpack": "4.41.1" + "webpack": "4.41.2" } } diff --git a/yarn.lock b/yarn.lock index a8d3ce0b3089..4ccd13f4c4c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10967,10 +10967,10 @@ webpack-subresource-integrity@1.3.4: dependencies: webpack-sources "^1.3.0" -webpack@4.41.1: - version "4.41.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.1.tgz#5388dd3047d680d5d382a84249fd4750e87372fd" - integrity sha512-ak7u4tUu/U63sCVxA571IuPZO/Q0pZ9cEXKg+R/woxkDzVovq57uB6L2Hlg/pC8LCU+TWpvtcYwsstivQwMJmw== +webpack@4.41.2: + version "4.41.2" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.2.tgz#c34ec76daa3a8468c9b61a50336d8e3303dce74e" + integrity sha512-Zhw69edTGfbz9/8JJoyRQ/pq8FYUoY0diOXqW0T6yhgdhCv6wr0hra5DwwWexNRns2Z2+gsnrNcbe9hbGBgk/A== dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" From 987aebec1491e2cacc14c3e72efd30d2f7cec4a4 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 21 Oct 2019 17:23:57 +0000 Subject: [PATCH 0337/1070] build: update @angular/animations to version 9.0.0-next.12 --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 24 ++--- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 22 ++--- yarn.lock | 96 +++++++++---------- 6 files changed, 77 insertions(+), 77 deletions(-) diff --git a/package.json b/package.json index f21e4e04b485..153b91e5255c 100644 --- a/package.json +++ b/package.json @@ -80,8 +80,8 @@ "typescript": "3.6.4" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.11", - "@angular/compiler-cli": "9.0.0-next.11", + "@angular/compiler": "9.0.0-next.12", + "@angular/compiler-cli": "9.0.0-next.12", "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.37.1", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 32afe01e414a..bca9ca273ac1 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -66,20 +66,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.11", + "@angular/animations": "9.0.0-next.12", "@angular/cdk": "8.2.3", - "@angular/common": "9.0.0-next.11", - "@angular/compiler": "9.0.0-next.11", - "@angular/compiler-cli": "9.0.0-next.11", - "@angular/core": "9.0.0-next.11", - "@angular/forms": "9.0.0-next.11", - "@angular/localize": "9.0.0-next.11", + "@angular/common": "9.0.0-next.12", + "@angular/compiler": "9.0.0-next.12", + "@angular/compiler-cli": "9.0.0-next.12", + "@angular/core": "9.0.0-next.12", + "@angular/forms": "9.0.0-next.12", + "@angular/localize": "9.0.0-next.12", "@angular/material": "8.2.3", - "@angular/platform-browser": "9.0.0-next.11", - "@angular/platform-browser-dynamic": "9.0.0-next.11", - "@angular/platform-server": "9.0.0-next.11", - "@angular/router": "9.0.0-next.11", - "@angular/service-worker": "9.0.0-next.11", + "@angular/platform-browser": "9.0.0-next.12", + "@angular/platform-browser-dynamic": "9.0.0-next.12", + "@angular/platform-server": "9.0.0-next.12", + "@angular/router": "9.0.0-next.12", + "@angular/service-worker": "9.0.0-next.12", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 32bcd70d2d1b..76191532ae8a 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^4.0.0 || ^5.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.11", - "@angular/compiler-cli": "9.0.0-next.11", + "@angular/compiler": "9.0.0-next.12", + "@angular/compiler-cli": "9.0.0-next.12", "@angular-devkit/core": "0.0.0", "ng-packagr": "~5.7.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index fa3947e39b82..ec147e5eed2c 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -33,8 +33,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.11", - "@angular/compiler-cli": "9.0.0-next.11", + "@angular/compiler": "9.0.0-next.12", + "@angular/compiler-cli": "9.0.0-next.12", "typescript": "3.6.4", "webpack": "4.41.2" } diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index a5a714ae2767..1118aa205344 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,16 +2,16 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#05df60e4f3b6f0dea2ec026d32c6f752e6a3c49b", - "@angular/common": "github:angular/common-builds#31e48afda3bfdc0640f9b5e92c1b608a732d19b7", - "@angular/compiler": "github:angular/compiler-builds#b18ca4c44d4bed3e9ef8eeafbc1bb7f0f7d5dcf2", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#3ad9332a78a23222d905cb378dd8857a2ab652fc", - "@angular/core": "github:angular/core-builds#6a025edda28522cd18f0f6c5b35c5afaf610ffab", - "@angular/forms": "github:angular/forms-builds#e733ca7f033e6d90a840ae9300783737ea7d683f", - "@angular/language-service": "github:angular/language-service-builds#48a11b13abf1211d6200ec5e12e7c8e7b3abb0eb", - "@angular/localize": "github:angular/localize-builds#c59008f4b912a097088360291dc6ea6a4b35086b", - "@angular/platform-browser": "github:angular/platform-browser-builds#90d03ac0eabd634d0cd87bb9e386a027a0da8ef3", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#248369089788724e0d4c2c3670163de28157bd27", - "@angular/router": "github:angular/router-builds#48442471d7dd1a646aa9c66f6f0fc7517457536c" + "@angular/animations": "github:angular/animations-builds#a4845a95e1da64a94901e9d7c0532d75c4592b2a", + "@angular/common": "github:angular/common-builds#48de3a939d1a2603f946d63387b8b7e1db981017", + "@angular/compiler": "github:angular/compiler-builds#8550378f61803b32eb80513f505d0ccd883cb4fb", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#a9e7866f4c1fd29c90d766ac615181545dc996b6", + "@angular/core": "github:angular/core-builds#bbff63b26e8c8cad59d08bc913969c914bd59a31", + "@angular/forms": "github:angular/forms-builds#643bbc2ff93e927322dbaef7f0f4a560c7b34472", + "@angular/language-service": "github:angular/language-service-builds#aca17f9cde00e2c78e083e9fd4683e7c018194ee", + "@angular/localize": "github:angular/localize-builds#ccc3fcd68cfc3e61fd9e0d2138e1174c6c5b028a", + "@angular/platform-browser": "github:angular/platform-browser-builds#3c131ffea86f51624c6174575e0ed45fe7ea60c7", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d622dda35d9371b8ae18351f2fe6e5416909c8e3", + "@angular/router": "github:angular/router-builds#1b1c6945d60b81182ca84b18c5d52ac44d645d96" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 4ccd13f4c4c3..f11abe03b0d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.11.tgz#49a1502d0611017f8ea77719207ace416e8a55a2" - integrity sha512-p6gY6sv/dpVxTN0oM/PZzKKlGHLhlgZ/TtpsRST1iQy2DiYhW932Adr+0CsjJc9eJcnAaHY+pYPR2YJaB7U/dw== +"@angular/animations@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.12.tgz#80319c1cd8ff0a4c8980daa64ff480440da0624a" + integrity sha512-XMQVf5BSD26I+gEOswUIVpFf7hAJthAnLPG/j3gNKFUm3eoDlXOkQg8I+bCAW/1Dr8oXDTmiSXbMQPOinfdP+w== "@angular/cdk@8.2.3": version "8.2.3" @@ -16,15 +16,15 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.11.tgz#6079b966edc3c3eb318a6e005f8bfde8ca385177" - integrity sha512-BfjVJOAZFVl/2MUJPZk5UTGSNax9WT5/dH1jrxzAqMpHfhw+xixvvSiixn3FXY/nKqelhB7HwnUvNEnzE5zflA== +"@angular/common@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.12.tgz#1bc0f1e90918ab9094388d06608b78d6e8b7c648" + integrity sha512-jDvnd+cN58GyGw2Kr2Rc++iPP9NIgIfPR7nb2XWlURwP22z+jGbLjIhtvA+TVpBRV/uya7xH9qti8ttc7a5rqg== -"@angular/compiler-cli@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.11.tgz#be15bd58261d2ca8afef60f83e7f85f6f3dc4b86" - integrity sha512-52ebMVn8MBMSvkoaYgNk7HKQwubrHGBnZxzF0qU6NLqrNAs3mHfPLKyL1coksYCEmNNn69XjYacumi7PTebSyA== +"@angular/compiler-cli@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.12.tgz#e0e647f9cb736db640ef957bced1d3175bd52a74" + integrity sha512-XY43SFkb5f+WrSlFetNmqObtILSVC5st2JORanVc//1LWp8Mdfqe3s57sUEVsJWfhnFk2VKNnHVP+efwl6jA5g== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -37,25 +37,25 @@ source-map "^0.6.1" yargs "13.1.0" -"@angular/compiler@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.11.tgz#9b931dcff9bf661eb8e572d3349542408031067c" - integrity sha512-wmJnNn5mI1oI7C+IiqDfshK/Se+d6/5e4wWV+YOZweSpwml9mTuporMHunfnGe0uR1bxfWt2TVxmtXlHnQReIA== +"@angular/compiler@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.12.tgz#e4e56fc5a45816da832f8df3cfc0e24e019086a5" + integrity sha512-mMpsuq8jD50kKZixYRqhoIl9hNRlkrsUeGWLW0NJlVCErH89B4jhF1w2tGG4WbRvFPyaw+NfuvcGFViGXwjpMw== -"@angular/core@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.11.tgz#61e4432d72cc75ca4a0c2c1d50bdfffd9d06676c" - integrity sha512-SkyulD9geB2us362yorkG0CU8UzgtnkjEW3+l8qf7LG4nWFWL/5Nyqyxv80pDLDuLdf0GtFo2sZGZ+KHccUmpQ== +"@angular/core@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.12.tgz#4eb12f50feda8ea3cb342ee456403a547afb5c2f" + integrity sha512-+QZqp7uVVLKoTgZ4yM8haX56D2Zo3Za4mSFhFtci3CacfGxzf3lxS57IcjWJUOplbA2DaCv5nPYbQTBh5zKKFQ== -"@angular/forms@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.11.tgz#2a940e83069fcf65488bce4fd985964426e64ec8" - integrity sha512-9gXnhR1TJ6tUpvUxQffdyT5A5R7l1oUjusN2tPZuxClEqOwG17nWajx97Wn3cHaVXfemtov5ExNQyMQ8xXASGg== +"@angular/forms@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.12.tgz#3cd7dc2cb79ac19a59e644340746094bd752815a" + integrity sha512-sVKIXAJZWckANltsVEeW0YXwl4LPu6MQlZqLyOq0HVCZiWuCBmHB4Y56uFXWFCO7lwqTu5cJPvdA3vuRhobnTQ== -"@angular/localize@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.11.tgz#53be7c0ae80c5872f952d2a4c958d38de0a3fd50" - integrity sha512-62C5HnC3CQ/0CUqEm6J9NV4Dvadg9thV6Ecq2PpoNznYH9Yh3THCieWq+XCzKXqoOMWdl7jTCFNAP7TzkXtXnw== +"@angular/localize@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.12.tgz#da06ba36335b859faefc50734e1af8a536c9d602" + integrity sha512-TWhViKeyygm51KyFCiOaRw8lhW3ouHbL/NcFUQyf195GplCpTOJftWj2PF22JQuFk1dyC0OKv8vIa46bxPkPlw== dependencies: "@babel/core" "^7.5.5" glob "7.1.2" @@ -68,33 +68,33 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.11.tgz#67bfa6cf0714be4f318bed2b5685609f2ff9ccae" - integrity sha512-7/0DJLm/XeyTGpZUcUdSByD1GY6SBwdskn6SpWc563EQ6wMb/A1lus0AUT2khUgW/4ArTJldCScei946KRfD5Q== +"@angular/platform-browser-dynamic@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.12.tgz#8ba9555be9afcb884cb0767e48793f75e3b2cb39" + integrity sha512-BcGd8ooMQ+mS/UZmQUDHc5jxDiZs3U/YveK+auVtyOBLkaiRUVv5SAifKRN1N0SKNecFoIg+qXwbO1TKDRgZmA== -"@angular/platform-browser@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.11.tgz#61562bacd79fcbc8daf17d061c11e90dddd23dc1" - integrity sha512-MBAbCfPR+dBNEWqPqiTcoKHLotfCwAAoBFwx3tUQi6oz1+SPJIownBHyUiyBSG0FqfHcLDqCO1FYkSIiLVysEw== +"@angular/platform-browser@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.12.tgz#244fdb3063624ecc760999fe4e4a5b8f96d83a33" + integrity sha512-Ad1SQ1OHUp+8MD2XOQ3iKb0BF8KTj55Bg73hgDcMz7zRx2E2lTdCUYhcLV8acLfGEe7jwaqExD3wPOBFdT4AeA== -"@angular/platform-server@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.11.tgz#55fb51f3fc487f9b39f801d9c338f2481a9ba91f" - integrity sha512-jbIwPSUPGoVREAv5aNxBvHUmO1f9fpzMVm4sP0KwFSNdO9rarljmyy86G5sh2n8c2/eEsVAm9wfpN/5JHgsnqg== +"@angular/platform-server@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.12.tgz#83204fddaeba89faf1c2ffdbdc4b23679af72cba" + integrity sha512-mWu+CKlFQxz3crUfbk9bbUCeQMen2DEMyBUJZ/0CnVVdfbCbc6yF9rzD6zD8m+cKFIMwRkGGYXfiABDOHSwnsA== dependencies: domino "^2.1.2" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.11.tgz#ccce71094dcf846ec12a804a59333e8ccd7f1835" - integrity sha512-JFdxfbZEkOIPHg2/vL/JMuu668uyq10fqwu2rmvoFKVqfHj0zHbcG86kank7NfNpmn+LlJwxeZVRps/yWt4pUA== +"@angular/router@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.12.tgz#f3cfe7995a31817086ad014b720f8b8255584039" + integrity sha512-0ko2VuSMjgY023SXLBhPUqfVqluTpOiBGU81nljcifUbduIvSAWyyBvX7wcNILQ50WtHqT67xXZEnaNUbxBAog== -"@angular/service-worker@9.0.0-next.11": - version "9.0.0-next.11" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.11.tgz#ea0f23643d413efc65650b2adc0a4d7cad2b8d80" - integrity sha512-klF7vW8vwlGUWc/mZjB6zMZzfqs7Nn3h+MMDnJK9Kw7Lzb5zZPXcsPCFTEkhWsVLFeeGO5i5l7VwR4Xir9BetA== +"@angular/service-worker@9.0.0-next.12": + version "9.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.12.tgz#3a75638327773d9dabfc312371af86a4855acfcd" + integrity sha512-sS06WAA63yMIdwE38WjqMvvaFgFKcthqgnU8K2i79rqRO68hm3BqVIoM2erHr+fbJ03fByr5BJZAr2HS5dRitQ== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" From bc831e8ff50f403a675e48c365c963117d72d2a5 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 16 Oct 2019 13:04:43 -0400 Subject: [PATCH 0338/1070] feat(@angular-devkit/build-angular): support parallel i18n localization --- .../angular_devkit/build_angular/package.json | 2 + .../src/browser/action-executor.ts | 56 +++++-- .../build_angular/src/browser/index.ts | 136 ++++++++++------- .../src/utils/load-translations.ts | 2 +- .../build_angular/src/utils/process-bundle.ts | 140 +++++++++++++++++- yarn.lock | 3 +- 6 files changed, 266 insertions(+), 73 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index bca9ca273ac1..5f976f1c206c 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -12,6 +12,7 @@ "@angular-devkit/build-webpack": "0.0.0", "@angular-devkit/core": "0.0.0", "@babel/core": "7.6.4", + "@babel/generator": "7.6.4", "@babel/preset-env": "7.6.3", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", @@ -33,6 +34,7 @@ "less-loader": "5.0.0", "license-webpack-plugin": "2.1.3", "loader-utils": "1.2.3", + "magic-string": "0.25.4", "mini-css-extract-plugin": "0.8.0", "minimatch": "3.0.4", "parse5": "4.0.0", diff --git a/packages/angular_devkit/build_angular/src/browser/action-executor.ts b/packages/angular_devkit/build_angular/src/browser/action-executor.ts index 8e24c3d5d27e..c9576e70784c 100644 --- a/packages/angular_devkit/build_angular/src/browser/action-executor.ts +++ b/packages/angular_devkit/build_angular/src/browser/action-executor.ts @@ -8,9 +8,25 @@ import JestWorker from 'jest-worker'; import * as os from 'os'; import * as path from 'path'; -import { ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; +import * as v8 from 'v8'; +import { InlineOptions, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; import { BundleActionCache } from './action-cache'; +const hasThreadSupport = (() => { + try { + require('worker_threads'); + + return true; + } catch { + return false; + } +})(); + +// This is used to normalize serialization messaging across threads and processes +// Threads use the structured clone algorithm which handles more types +// Processes use JSON which is much more limited +const serialize = ((v8 as unknown) as { serialize(value: unknown): Buffer }).serialize; + let workerFile = require.resolve('../utils/process-bundle'); workerFile = path.extname(workerFile) === '.ts' @@ -41,8 +57,8 @@ export class BundleActionExecutor { // larger files are processed in a separate process to limit memory usage in the main process return (this.largeWorker = new JestWorker(workerFile, { - exposedMethods: ['process'], - setupArgs: [this.workerOptions], + exposedMethods: ['process', 'inlineLocales'], + setupArgs: [[...serialize(this.workerOptions)]], })); } @@ -54,11 +70,10 @@ export class BundleActionExecutor { // small files are processed in a limited number of threads to improve speed // The limited number also prevents a large increase in memory usage for an otherwise short operation return (this.smallWorker = new JestWorker(workerFile, { - exposedMethods: ['process'], - setupArgs: [this.workerOptions], + exposedMethods: ['process', 'inlineLocales'], + setupArgs: hasThreadSupport ? [this.workerOptions] : [[...serialize(this.workerOptions)]], numWorkers: os.cpus().length < 2 ? 1 : 2, - // Will automatically fallback to processes if not supported - enableWorkerThreads: true, + enableWorkerThreads: hasThreadSupport, })); } @@ -71,7 +86,7 @@ export class BundleActionExecutor { } } - async process(action: ProcessBundleOptions) { + async process(action: ProcessBundleOptions): Promise { const cacheKeys = this.cache.generateCacheKeys(action); action.cacheKeys = cacheKeys; @@ -86,10 +101,27 @@ export class BundleActionExecutor { return this.executeAction('process', action); } - async *processAll(actions: Iterable) { - const executions = new Map, Promise>(); + processAll(actions: Iterable): AsyncIterable { + return BundleActionExecutor.executeAll(actions, action => this.process(action)); + } + + async inline( + action: InlineOptions, + ): Promise<{ file: string; diagnostics: { type: string; message: string }[]; count: number; }> { + return this.executeAction('inlineLocales', action); + } + + inlineAll(actions: Iterable) { + return BundleActionExecutor.executeAll(actions, action => this.inline(action)); + } + + private static async *executeAll( + actions: Iterable, + executor: (action: I) => Promise, + ): AsyncIterable { + const executions = new Map, Promise>(); for (const action of actions) { - const execution = this.process(action); + const execution = executor(action); executions.set( execution, execution.then(result => { @@ -105,7 +137,7 @@ export class BundleActionExecutor { } } - stop() { + stop(): void { if (this.largeWorker) { this.largeWorker.end(); } diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 640136b3cd96..215cc757d9de 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -6,11 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect'; -import { - EmittedFiles, - WebpackLoggingCallback, - runWebpack, -} from '@angular-devkit/build-webpack'; +import { EmittedFiles, WebpackLoggingCallback, runWebpack } from '@angular-devkit/build-webpack'; import { join, json, logging, normalize, tags, virtualFs } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import * as findCacheDirectory from 'find-cache-dir'; @@ -58,6 +54,7 @@ import { copyAssets } from '../utils/copy-assets'; import { I18nOptions, createI18nOptions } from '../utils/i18n-options'; import { createTranslationLoader } from '../utils/load-translations'; import { + InlineOptions, ProcessBundleFile, ProcessBundleOptions, ProcessBundleResult, @@ -447,76 +444,103 @@ export function buildWebpackBrowser( } context.logger.info('ES5 bundle generation complete.'); - } finally { - executor.stop(); - } - - if (i18n.shouldInline) { - context.logger.info('Generating localized bundles...'); - - const localize = await import('@angular/localize/src/tools/src/translate/main'); - const localizeDiag = await import('@angular/localize/src/tools/src/diagnostics'); - const diagnostics = new localizeDiag.Diagnostics(); - const translationFilePaths = []; - let handleSourceLocale = false; - for (const locale of i18n.inlineLocales) { - if (locale === i18n.sourceLocale) { - handleSourceLocale = true; - continue; - } - translationFilePaths.push(i18n.locales[locale].file); - } + if (i18n.shouldInline) { + context.logger.info('Generating localized bundles...'); - if (translationFilePaths.length > 0) { - const sourceFilePaths = []; + const inlineActions: InlineOptions[] = []; + const processedFiles = new Set(); for (const result of processResults) { if (result.original) { - sourceFilePaths.push(result.original.filename); + inlineActions.push({ + filename: path.basename(result.original.filename), + code: fs.readFileSync(result.original.filename, 'utf8'), + outputPath: baseOutputPath, + es5: false, + missingTranslation: options.i18nMissingTranslation, + }); + processedFiles.add(result.original.filename); } if (result.downlevel) { - sourceFilePaths.push(result.downlevel.filename); + inlineActions.push({ + filename: path.basename(result.downlevel.filename), + code: fs.readFileSync(result.downlevel.filename, 'utf8'), + outputPath: baseOutputPath, + es5: true, + missingTranslation: options.i18nMissingTranslation, + }); + processedFiles.add(result.downlevel.filename); } } + + let hasErrors = false; try { - localize.translateFiles({ - // tslint:disable-next-line: no-non-null-assertion - sourceRootPath: webpackStats.outputPath!, - sourceFilePaths, - translationFilePaths, - outputPathFn: (locale, relativePath) => - path.join(baseOutputPath, locale, relativePath), - diagnostics, - missingTranslation: options.i18nMissingTranslation || 'warning', - sourceLocale: handleSourceLocale ? i18n.sourceLocale : undefined, - }); + for (const locale of i18n.inlineLocales) { + const localeOutputPath = path.join(baseOutputPath, locale); + if (!fs.existsSync(localeOutputPath)) { + fs.mkdirSync(localeOutputPath, { recursive: true }); + } + } + + for await (const result of executor.inlineAll(inlineActions)) { + if (options.verbose) { + context.logger.info( + `Localized "${result.file}" [${result.count} translation(s)].`, + ); + } + for (const diagnostic of result.diagnostics) { + if (diagnostic.type === 'error') { + hasErrors = true; + context.logger.error(diagnostic.message); + } else { + context.logger.warn(diagnostic.message); + } + } + } + + // Copy any non-processed files into the output locations + const outputPaths = [...i18n.inlineLocales].map(l => + path.join(baseOutputPath, l), + ); + await copyAssets( + [ + { + glob: '**/*', + // tslint:disable-next-line: no-non-null-assertion + input: webpackStats.outputPath!, + output: '', + ignore: [...processedFiles].map(f => + // tslint:disable-next-line: no-non-null-assertion + path.relative(webpackStats.outputPath!, f), + ), + }, + ], + outputPaths, + '', + ); } catch (err) { context.logger.error('Localized bundle generation failed: ' + err.message); return { success: false }; - } finally { - try { - // Remove temporary directory used for i18n processing - // tslint:disable-next-line: no-non-null-assertion - await host.delete(normalize(webpackStats.outputPath!)).toPromise(); - } catch {} } - } - context.logger.info( - `Localized bundle generation ${diagnostics.hasErrors ? 'failed' : 'complete'}.`, - ); + context.logger.info( + `Localized bundle generation ${hasErrors ? 'failed' : 'complete'}.`, + ); - for (const message of diagnostics.messages) { - if (message.type === 'error') { - context.logger.error(message.message); - } else { - context.logger.warn(message.message); + if (hasErrors) { + return { success: false }; } } + } finally { + executor.stop(); - if (diagnostics.hasErrors) { - return { success: false }; + if (i18n.shouldInline) { + try { + // Remove temporary directory used for i18n processing + // tslint:disable-next-line: no-non-null-assertion + await host.delete(normalize(webpackStats.outputPath!)).toPromise(); + } catch {} } } diff --git a/packages/angular_devkit/build_angular/src/utils/load-translations.ts b/packages/angular_devkit/build_angular/src/utils/load-translations.ts index 3e5a89e22c62..a34b16102219 100644 --- a/packages/angular_devkit/build_angular/src/utils/load-translations.ts +++ b/packages/angular_devkit/build_angular/src/utils/load-translations.ts @@ -30,7 +30,7 @@ export async function createTranslationLoader(): Promise { for (const [format, parser] of Object.entries(parsers)) { if (parser.canParse(path, content)) { - return { format, translation: parser.parse(path, content) }; + return { format, translation: parser.parse(path, content).translations }; } } diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 6e45bf448826..1c455a60c311 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -5,15 +5,18 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { transformAsync } from '@babel/core'; +import { NodePath, parseSync, transformAsync, traverse, types } from '@babel/core'; import { createHash } from 'crypto'; import * as fs from 'fs'; import * as path from 'path'; import { RawSourceMap, SourceMapConsumer, SourceMapGenerator } from 'source-map'; import { minify } from 'terser'; +import * as v8 from 'v8'; +import { I18nOptions } from './i18n-options'; import { manglingDisabled } from './mangle-options'; const cacache = require('cacache'); +const deserialize = ((v8 as unknown) as { deserialize(buffer: Buffer): unknown }).deserialize; export interface ProcessBundleOptions { filename: string; @@ -57,9 +60,14 @@ export const enum CacheKey { } let cachePath: string | undefined; +let i18n: I18nOptions | undefined; -export function setup(options: { cachePath: string }): void { +export function setup(data: number[] | { cachePath: string; i18n: I18nOptions }): void { + const options = Array.isArray(data) + ? (deserialize(Buffer.from(data)) as { cachePath: string; i18n: I18nOptions }) + : data; cachePath = options.cachePath; + i18n = options.i18n; } async function cachePut(content: string, key: string | null, integrity?: string): Promise { @@ -434,3 +442,131 @@ async function processRuntime( return result; } + +export interface InlineOptions { + filename: string; + code: string; + es5: boolean; + outputPath: string; + missingTranslation?: 'warning' | 'error' | 'ignore'; +} + +interface LocalizePosition { + start: number; + end: number; + messageParts: TemplateStringsArray; + expressions: types.Expression[]; +} + +const localizeName = '$localize'; + +export async function inlineLocales(options: InlineOptions) { + if (!i18n || i18n.inlineLocales.size === 0) { + return { file: options.filename, diagnostics: [], count: 0 }; + } + + if (!options.code.includes(localizeName)) { + for (const locale of i18n.inlineLocales) { + fs.writeFileSync(path.join(options.outputPath, locale, options.filename), options.code); + } + + return { file: options.filename, diagnostics: [], count: 0 }; + } + + const { default: MagicString } = await import('magic-string'); + const { default: generate } = await import('@babel/generator'); + const utils = await import( + // tslint:disable-next-line: trailing-comma + '@angular/localize/src/tools/src/translate/source_files/source_file_utils' + ); + const localizeDiag = await import('@angular/localize/src/tools/src/diagnostics'); + + const diagnostics = new localizeDiag.Diagnostics(); + + const positions = findLocalizePositions(options, utils); + const content = new MagicString(options.code); + + for (const locale of i18n.inlineLocales) { + const isSourceLocale = locale === i18n.sourceLocale; + // tslint:disable-next-line: no-any + const translations: any = isSourceLocale ? {} : i18n.locales[locale].translation || {}; + for (const position of positions) { + const translated = utils.translate( + diagnostics, + translations, + position.messageParts, + position.expressions, + isSourceLocale ? 'ignore' : options.missingTranslation || 'warning', + ); + + const expression = utils.buildLocalizeReplacement(translated[0], translated[1]); + const { code } = generate(expression); + + content.overwrite(position.start, position.end, code); + } + + const output = content.toString(); + fs.writeFileSync(path.join(options.outputPath, locale, options.filename), output); + } + + return { file: options.filename, diagnostics: diagnostics.messages, count: positions.length }; +} + +function findLocalizePositions( + options: InlineOptions, + utils: typeof import('@angular/localize/src/tools/src/translate/source_files/source_file_utils'), +): LocalizePosition[] { + const ast = parseSync(options.code, { babelrc: false }); + if (!ast) { + throw new Error(`Unknown error occurred inlining file "${options.filename}"`); + } + + const positions: LocalizePosition[] = []; + + if (options.es5) { + traverse(ast, { + CallExpression(path: NodePath) { + const callee = path.get('callee'); + if ( + callee.isIdentifier() && + callee.node.name === localizeName + ) { + const messageParts = utils.unwrapMessagePartsFromLocalizeCall(path); + const expressions = utils.unwrapSubstitutionsFromLocalizeCall(path.node); + positions.push({ + // tslint:disable-next-line: no-non-null-assertion + start: path.node.start!, + // tslint:disable-next-line: no-non-null-assertion + end: path.node.end!, + messageParts, + expressions, + }); + } + }, + }); + } else { + const traverseFast = ((types as unknown) as { + traverseFast: (node: types.Node, enter: (node: types.Node) => void) => void; + }).traverseFast; + + traverseFast(ast, node => { + if ( + node.type === 'TaggedTemplateExpression' && + types.isIdentifier(node.tag) && + node.tag.name === localizeName + ) { + const messageParts = utils.unwrapMessagePartsFromTemplateLiteral(node.quasi.quasis); + positions.push({ + // tslint:disable-next-line: no-non-null-assertion + start: node.start!, + // tslint:disable-next-line: no-non-null-assertion + end: node.end!, + messageParts, + expressions: node.quasi.expressions, + }); + } + }); + } + + return positions; +} diff --git a/yarn.lock b/yarn.lock index f11abe03b0d9..669d1b7d0e5d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -123,7 +123,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.6.3", "@babel/generator@^7.6.4": +"@babel/generator@7.6.4", "@babel/generator@^7.4.0", "@babel/generator@^7.6.3", "@babel/generator@^7.6.4": version "7.6.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" integrity sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w== @@ -9122,7 +9122,6 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" - uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: From 895fa620a27442bcbdcbba2df2b2f300a74aaa72 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 18 Oct 2019 18:09:28 -0400 Subject: [PATCH 0339/1070] feat(@angular-devkit/build-angular): support deprecated i18n options with new configuration --- .../build_angular/src/browser/index.ts | 43 ++++++++++--------- .../build_angular/src/utils/i18n-options.ts | 19 ++++++++ .../build_angular/src/utils/process-bundle.ts | 13 +++++- 3 files changed, 52 insertions(+), 23 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 215cc757d9de..7ec600f840db 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -51,7 +51,7 @@ import { normalizeSourceMaps, } from '../utils'; import { copyAssets } from '../utils/copy-assets'; -import { I18nOptions, createI18nOptions } from '../utils/i18n-options'; +import { I18nOptions, createI18nOptions, mergeDeprecatedI18nOptions } from '../utils/i18n-options'; import { createTranslationLoader } from '../utils/load-translations'; import { InlineOptions, @@ -163,9 +163,21 @@ async function initialize( throw new Error('The builder requires a target.'); } + const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); + const usingIvy = tsConfig.options.enableIvy !== false; const metadata = await context.getProjectMetadata(context.target); const i18n = createI18nOptions(metadata, options.localize); + // Until 11.0, support deprecated i18n options when not using new localize option + // i18nFormat is automatically calculated + if (options.localize === undefined && usingIvy) { + mergeDeprecatedI18nOptions(i18n, options.i18nLocale, options.i18nFile); + } else if (options.localize !== undefined && !usingIvy) { + options.localize = undefined; + + context.logger.warn(`Option 'localize' is not supported with View Engine.`); + } + if (i18n.inlineLocales.size > 0) { // Load locales const loader = await createTranslationLoader(); @@ -283,8 +295,14 @@ export function buildWebpackBrowser( return { success }; } else if (success) { - if (!fs.existsSync(baseOutputPath)) { - fs.mkdirSync(baseOutputPath, { recursive: true }); + const outputPaths = + i18n.shouldInline && !i18n.flatOutput + ? [...i18n.inlineLocales].map(l => path.join(baseOutputPath, l)) + : [baseOutputPath]; + for (const outputPath of outputPaths) { + if (!fs.existsSync(outputPath)) { + fs.mkdirSync(outputPath, { recursive: true }); + } } let noModuleFiles: EmittedFiles[] | undefined; @@ -475,13 +493,6 @@ export function buildWebpackBrowser( let hasErrors = false; try { - for (const locale of i18n.inlineLocales) { - const localeOutputPath = path.join(baseOutputPath, locale); - if (!fs.existsSync(localeOutputPath)) { - fs.mkdirSync(localeOutputPath, { recursive: true }); - } - } - for await (const result of executor.inlineAll(inlineActions)) { if (options.verbose) { context.logger.info( @@ -499,9 +510,6 @@ export function buildWebpackBrowser( } // Copy any non-processed files into the output locations - const outputPaths = [...i18n.inlineLocales].map(l => - path.join(baseOutputPath, l), - ); await copyAssets( [ { @@ -510,7 +518,7 @@ export function buildWebpackBrowser( input: webpackStats.outputPath!, output: '', ignore: [...processedFiles].map(f => - // tslint:disable-next-line: no-non-null-assertion + // tslint:disable-next-line: no-non-null-assertion path.relative(webpackStats.outputPath!, f), ), }, @@ -546,9 +554,6 @@ export function buildWebpackBrowser( // Copy assets if (options.assets) { - const outputPaths = i18n.shouldInline - ? [...i18n.inlineLocales].map(l => path.join(baseOutputPath, l)) - : [baseOutputPath]; try { await copyAssets( normalizeAssetPatterns( @@ -640,10 +645,6 @@ export function buildWebpackBrowser( } if (options.index) { - const outputPaths = i18n.shouldInline - ? [...i18n.inlineLocales].map(l => path.join(baseOutputPath, l)) - : [baseOutputPath]; - for (const outputPath of outputPaths) { try { await generateIndex( diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index 89b03da22a51..4db1ef7a606d 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -11,6 +11,7 @@ export interface I18nOptions { inlineLocales: Set; sourceLocale: string; locales: Record; + flatOutput?: boolean; readonly shouldInline: boolean; } @@ -80,3 +81,21 @@ export function createI18nOptions( return i18n; } + +export function mergeDeprecatedI18nOptions(i18n: I18nOptions, i18nLocale: string | undefined, i18nFile: string | undefined): I18nOptions { + if (i18nFile !== undefined && i18nLocale === undefined) { + throw new Error(`Option 'i18nFile' cannot be used without the 'i18nLocale' option.`); + } + + if (i18nLocale !== undefined) { + i18n.inlineLocales.clear(); + i18n.inlineLocales.add(i18nLocale); + + if (i18nFile !== undefined) { + i18n.locales[i18nLocale] = { file: i18nFile }; + i18n.flatOutput = true; + } + } + + return i18n; +} diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 1c455a60c311..7ec3af174316 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -464,10 +464,16 @@ export async function inlineLocales(options: InlineOptions) { if (!i18n || i18n.inlineLocales.size === 0) { return { file: options.filename, diagnostics: [], count: 0 }; } + if (i18n.flatOutput && i18n.inlineLocales.size > 1) { + throw new Error('Flat output is only supported when inlining one locale.'); + } if (!options.code.includes(localizeName)) { for (const locale of i18n.inlineLocales) { - fs.writeFileSync(path.join(options.outputPath, locale, options.filename), options.code); + fs.writeFileSync( + path.join(options.outputPath, i18n.flatOutput ? '' : locale, options.filename), + options.code, + ); } return { file: options.filename, diagnostics: [], count: 0 }; @@ -506,7 +512,10 @@ export async function inlineLocales(options: InlineOptions) { } const output = content.toString(); - fs.writeFileSync(path.join(options.outputPath, locale, options.filename), output); + fs.writeFileSync( + path.join(options.outputPath, i18n.flatOutput ? '' : locale, options.filename), + output, + ); } return { file: options.filename, diagnostics: diagnostics.messages, count: positions.length }; From e9279bbe1aea724ddcaadcd97704a5df4f3d6938 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sat, 19 Oct 2019 20:50:55 -0400 Subject: [PATCH 0340/1070] fix(@angular-devkit/build-angular): update sourcemaps during localization --- .../build_angular/src/browser/index.ts | 6 ++ .../build_angular/src/utils/process-bundle.ts | 83 +++++++++++++++---- 2 files changed, 72 insertions(+), 17 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 7ec600f840db..01fb52d1d1e0 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -473,6 +473,9 @@ export function buildWebpackBrowser( inlineActions.push({ filename: path.basename(result.original.filename), code: fs.readFileSync(result.original.filename, 'utf8'), + map: + result.original.map && + fs.readFileSync(result.original.map.filename, 'utf8'), outputPath: baseOutputPath, es5: false, missingTranslation: options.i18nMissingTranslation, @@ -483,6 +486,9 @@ export function buildWebpackBrowser( inlineActions.push({ filename: path.basename(result.downlevel.filename), code: fs.readFileSync(result.downlevel.filename, 'utf8'), + map: + result.downlevel.map && + fs.readFileSync(result.downlevel.map.filename, 'utf8'), outputPath: baseOutputPath, es5: true, missingTranslation: options.i18nMissingTranslation, diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 7ec3af174316..469f6c653294 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -12,6 +12,7 @@ import * as path from 'path'; import { RawSourceMap, SourceMapConsumer, SourceMapGenerator } from 'source-map'; import { minify } from 'terser'; import * as v8 from 'v8'; +import { SourceMapSource } from 'webpack-sources'; import { I18nOptions } from './i18n-options'; import { manglingDisabled } from './mangle-options'; @@ -131,7 +132,7 @@ export async function process(options: ProcessBundleOptions): Promise) { const callee = path.get('callee'); - if ( - callee.isIdentifier() && - callee.node.name === localizeName - ) { + if (callee.isIdentifier() && callee.node.name === localizeName) { const messageParts = utils.unwrapMessagePartsFromLocalizeCall(path); const expressions = utils.unwrapSubstitutionsFromLocalizeCall(path.node); positions.push({ From 358bc128568eb0bb6aeeba0916296da1a7818911 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sat, 19 Oct 2019 15:11:06 -0400 Subject: [PATCH 0341/1070] feat(@angular-devkit/build-angular): support i18n localization for non-differential builds --- .../build_angular/src/browser/index.ts | 106 +++++++++++- .../build_angular/src/utils/i18n-inlining.ts | 56 +++++++ .../legacy-cli/e2e/tests/i18n/build-locale.ts | 16 +- .../{ivy-localize.ts => ivy-localize-dl.ts} | 5 + .../e2e/tests/i18n/ivy-localize-es2015.ts | 154 ++++++++++++++++++ .../e2e/tests/i18n/ivy-localize-es5.ts | 153 +++++++++++++++++ 6 files changed, 477 insertions(+), 13 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts rename tests/legacy-cli/e2e/tests/i18n/{ivy-localize.ts => ivy-localize-dl.ts} (96%) create mode 100644 tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts create mode 100644 tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 01fb52d1d1e0..9840d61483ea 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -51,6 +51,7 @@ import { normalizeSourceMaps, } from '../utils'; import { copyAssets } from '../utils/copy-assets'; +import { emittedFilesToInlineOptions } from '../utils/i18n-inlining'; import { I18nOptions, createI18nOptions, mergeDeprecatedI18nOptions } from '../utils/i18n-options'; import { createTranslationLoader } from '../utils/load-translations'; import { @@ -282,6 +283,9 @@ export function buildWebpackBrowser( // tslint:disable-next-line: no-big-function concatMap(async buildEvent => { const { webpackStats, success, emittedFiles = [] } = buildEvent; + if (!webpackStats) { + throw new Error('Webpack stats build result is required.'); + } if (!success && useBundleDownleveling) { // If using bundle downleveling then there is only one build @@ -319,14 +323,27 @@ export function buildWebpackBrowser( files = moduleFiles.filter( x => x.extension === '.css' || (x.name && scriptsEntryPointName.includes(x.name)), ); + if (i18n.shouldInline) { + const success = await i18nInlineEmittedFiles( + context, + emittedFiles, + i18n, + baseOutputPath, + outputPaths, + scriptsEntryPointName, + // tslint:disable-next-line: no-non-null-assertion + webpackStats.outputPath!, + target <= ScriptTarget.ES5, + options.i18nMissingTranslation, + ); + if (!success) { + return { success: false }; + } + } } else if (isDifferentialLoadingNeeded) { moduleFiles = []; noModuleFiles = []; - if (!webpackStats) { - throw new Error('Webpack stats build result is required.'); - } - // Common options for all bundle process actions const sourceMapOptions = normalizeSourceMaps(options.sourceMap || false); const actionOptions: Partial = { @@ -648,6 +665,23 @@ export function buildWebpackBrowser( } else { files = emittedFiles.filter(x => x.name !== 'polyfills-es5'); noModuleFiles = emittedFiles.filter(x => x.name === 'polyfills-es5'); + if (i18n.shouldInline) { + const success = await i18nInlineEmittedFiles( + context, + emittedFiles, + i18n, + baseOutputPath, + outputPaths, + scriptsEntryPointName, + // tslint:disable-next-line: no-non-null-assertion + webpackStats.outputPath!, + target <= ScriptTarget.ES5, + options.i18nMissingTranslation, + ); + if (!success) { + return { success: false }; + } + } } if (options.index) { @@ -732,6 +766,70 @@ function generateIndex( }).toPromise(); } +async function i18nInlineEmittedFiles( + context: BuilderContext, + emittedFiles: EmittedFiles[], + i18n: I18nOptions, + baseOutputPath: string, + outputPaths: string[], + scriptsEntryPointName: string[], + emittedPath: string, + es5: boolean, + missingTranslation: 'error' | 'warning' | 'ignore' | undefined, +) { + const executor = new BundleActionExecutor({ i18n }); + let hasErrors = false; + try { + const { options, originalFiles: processedFiles } = emittedFilesToInlineOptions( + emittedFiles, + scriptsEntryPointName, + emittedPath, + baseOutputPath, + es5, + missingTranslation, + ); + + for await (const result of executor.inlineAll(options)) { + for (const diagnostic of result.diagnostics) { + if (diagnostic.type === 'error') { + hasErrors = true; + context.logger.error(diagnostic.message); + } else { + context.logger.warn(diagnostic.message); + } + } + } + + // Copy any non-processed files into the output locations + await copyAssets( + [ + { + glob: '**/*', + input: emittedPath, + output: '', + ignore: [...processedFiles].map(f => path.relative(emittedPath, f)), + }, + ], + outputPaths, + '', + ); + } catch (err) { + context.logger.error('Localized bundle generation failed: ' + err.message); + + return false; + } finally { + executor.stop(); + } + + context.logger.info(`Localized bundle generation ${hasErrors ? 'failed' : 'complete'}.`); + + if (hasErrors) { + return false; + } + + return true; +} + function mapErrorToMessage(error: unknown): string | undefined { if (error instanceof Error) { return error.message; diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts new file mode 100644 index 000000000000..5609e1d35a00 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts @@ -0,0 +1,56 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import { EmittedFiles } from '@angular-devkit/build-webpack'; +import * as fs from 'fs'; +import * as path from 'path'; +import { InlineOptions } from './process-bundle'; + +export function emittedFilesToInlineOptions( + emittedFiles: EmittedFiles[], + scriptsEntryPointName: string[], + emittedPath: string, + outputPath: string, + es5: boolean, + missingTranslation: 'error' | 'warning' | 'ignore' | undefined, +): { options: InlineOptions[]; originalFiles: string[] } { + const options: InlineOptions[] = []; + const originalFiles: string[] = []; + for (const emittedFile of emittedFiles) { + if ( + emittedFile.asset || + emittedFile.extension !== '.js' || + (emittedFile.name && scriptsEntryPointName.includes(emittedFile.name)) + ) { + continue; + } + + const originalPath = path.join(emittedPath, emittedFile.file); + const action: InlineOptions = { + filename: emittedFile.file, + code: fs.readFileSync(originalPath, 'utf8'), + es5, + outputPath, + missingTranslation, + }; + originalFiles.push(originalPath); + + try { + const originalMapPath = originalPath + '.map'; + action.map = fs.readFileSync(originalMapPath, 'utf8'); + originalFiles.push(originalMapPath); + } catch (err) { + if (err.code !== 'ENOENT') { + throw err; + } + } + + options.push(action); + } + + return { options, originalFiles }; +} diff --git a/tests/legacy-cli/e2e/tests/i18n/build-locale.ts b/tests/legacy-cli/e2e/tests/i18n/build-locale.ts index 6fd4f6166f42..cfc3ef2120cc 100644 --- a/tests/legacy-cli/e2e/tests/i18n/build-locale.ts +++ b/tests/legacy-cli/e2e/tests/i18n/build-locale.ts @@ -1,14 +1,12 @@ -import { ng } from '../../utils/process'; -import { expectFileToMatch, rimraf } from '../../utils/fs'; import { getGlobalVariable } from '../../utils/env'; +import { expectFileToMatch, rimraf } from '../../utils/fs'; +import { ng } from '../../utils/process'; - -export default function () { - // TODO(architect): Delete this test. It is now in devkit/build-angular. - - // Skip this test in Angular 2/4. - if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) { - return Promise.resolve(); +export default async function () { + const argv = getGlobalVariable('argv'); + const veEnabled = argv['ve']; + if (!veEnabled) { + return; } // These tests should be moved to the default when we use ng5 in new projects. diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts similarity index 96% rename from tests/legacy-cli/e2e/tests/i18n/ivy-localize.ts rename to tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index a35ca635f7b7..b71a56516b60 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -25,6 +25,11 @@ export default async function() { } await npm('install', `${localizeVersion}`); + await updateJsonFile('tsconfig.json', config => { + config.compilerOptions.target = 'es2015'; + config.angularCompilerOptions.disableTypeScriptVersionCheck = true; + }); + const baseDir = 'dist/test-project'; // Set configurations for each locale. diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts new file mode 100644 index 000000000000..90c254be6117 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts @@ -0,0 +1,154 @@ +import * as express from 'express'; +import { resolve } from 'path'; +import { getGlobalVariable } from '../../utils/env'; +import { + appendToFile, + copyFile, + expectFileNotToExist, + expectFileToExist, + expectFileToMatch, + replaceInFile, + writeFile, +} from '../../utils/fs'; +import { ng, npm } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; +import { expectToFail } from '../../utils/utils'; +import { readNgVersion } from '../../utils/version'; + +export default async function() { + if (getGlobalVariable('argv').ve) { + return; + } + + let localizeVersion = '@angular/localize@' + readNgVersion(); + if (getGlobalVariable('argv')['ng-snapshots']) { + localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; + } + await npm('install', `${localizeVersion}`); + + await writeFile('browserslist', 'Chrome 65'); + await updateJsonFile('tsconfig.json', config => { + config.compilerOptions.target = 'es2015'; + config.angularCompilerOptions.disableTypeScriptVersionCheck = true; + }); + + const baseDir = 'dist/test-project'; + + // Set configurations for each locale. + const langTranslations = [ + { lang: 'en-US', translation: 'Hello i18n!' }, + { lang: 'fr', translation: 'Bonjour i18n!' }, + { lang: 'de', translation: 'Hallo i18n!' }, + ]; + + await updateJsonFile('angular.json', workspaceJson => { + const appProject = workspaceJson.projects['test-project']; + const appArchitect = appProject.architect || appProject.targets; + const serveConfigs = appArchitect['serve'].configurations; + const e2eConfigs = appArchitect['e2e'].configurations; + + // Make default builds prod. + appArchitect['build'].options.optimization = true; + appArchitect['build'].options.buildOptimizer = true; + appArchitect['build'].options.aot = true; + appArchitect['build'].options.fileReplacements = [ + { + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }, + ]; + + // Enable localization for all locales + appArchitect['build'].options.localize = true; + + // Add locale definitions to the project + // tslint:disable-next-line: no-any + const i18n: Record = (appProject.i18n = { locales: {} }); + for (const { lang } of langTranslations) { + if (lang == 'en-US') { + i18n.sourceLocale = lang; + } else { + i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; + } + serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; + e2eConfigs[lang] = { + specs: [`./src/app.${lang}.e2e-spec.ts`], + devServerTarget: `test-project:serve:${lang}`, + }; + } + }); + + // Add a translatable element. + await writeFile( + 'src/app/app.component.html', + '

Hello i18n!

', + ); + + // Extract the translation messages and copy them for each language. + await ng('xi18n', '--output-path=src/locale'); + await expectFileToExist('src/locale/messages.xlf'); + await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); + await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); + + for (const { lang, translation } of langTranslations) { + if (lang != 'en-US') { + await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'source-language="en-US"', + `source-language="en-US" target-language="${lang}"`, + ); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'Hello i18n!', + `Hello i18n!\n${translation}`, + ); + } + } + + // Build each locale and verify the output. + await ng('build', '--i18n-missing-translation', 'error'); + for (const { lang, translation } of langTranslations) { + await expectFileToMatch(`${baseDir}/${lang}/main.js`, translation); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize')); + await expectFileNotToExist(`${baseDir}/${lang}/main-es5.js`); + + // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. + const app = express(); + app.use(express.static(resolve(baseDir, lang))); + const server = app.listen(4200, 'localhost'); + try { + // Add E2E test for locale + await writeFile( + 'e2e/src/app.e2e-spec.ts', + ` + import { browser, logging, element, by } from 'protractor'; + describe('workspace-project App', () => { + it('should display welcome message', () => { + browser.get(browser.baseUrl); + expect(element(by.css('h1')).getText()).toEqual('${translation}'); + }); + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); + }); + `, + ); + + // Execute without a devserver. + await ng('e2e', '--devServerTarget='); + } finally { + server.close(); + } + } + + // Verify missing translation behaviour. + await appendToFile('src/app/app.component.html', '

Other content

'); + await ng('build', '--i18n-missing-translation', 'ignore'); + await expectFileToMatch(`${baseDir}/fr/main.js`, /Other content/); + await expectToFail(() => ng('build', '--i18n-missing-translation', 'error')); +} diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts new file mode 100644 index 000000000000..d85a047f346d --- /dev/null +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts @@ -0,0 +1,153 @@ +import * as express from 'express'; +import { resolve } from 'path'; +import { getGlobalVariable } from '../../utils/env'; +import { + appendToFile, + copyFile, + expectFileNotToExist, + expectFileToExist, + expectFileToMatch, + replaceInFile, + writeFile, +} from '../../utils/fs'; +import { ng, npm } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; +import { expectToFail } from '../../utils/utils'; +import { readNgVersion } from '../../utils/version'; + +export default async function() { + if (getGlobalVariable('argv').ve) { + return; + } + + let localizeVersion = '@angular/localize@' + readNgVersion(); + if (getGlobalVariable('argv')['ng-snapshots']) { + localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; + } + await npm('install', `${localizeVersion}`); + + await updateJsonFile('tsconfig.json', config => { + config.compilerOptions.target = 'es5'; + config.angularCompilerOptions.disableTypeScriptVersionCheck = true; + }); + + const baseDir = 'dist/test-project'; + + // Set configurations for each locale. + const langTranslations = [ + { lang: 'en-US', translation: 'Hello i18n!' }, + { lang: 'fr', translation: 'Bonjour i18n!' }, + { lang: 'de', translation: 'Hallo i18n!' }, + ]; + + await updateJsonFile('angular.json', workspaceJson => { + const appProject = workspaceJson.projects['test-project']; + const appArchitect = appProject.architect || appProject.targets; + const serveConfigs = appArchitect['serve'].configurations; + const e2eConfigs = appArchitect['e2e'].configurations; + + // Make default builds prod. + appArchitect['build'].options.optimization = true; + appArchitect['build'].options.buildOptimizer = true; + appArchitect['build'].options.aot = true; + appArchitect['build'].options.fileReplacements = [ + { + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }, + ]; + + // Enable localization for all locales + appArchitect['build'].options.localize = true; + + // Add locale definitions to the project + // tslint:disable-next-line: no-any + const i18n: Record = (appProject.i18n = { locales: {} }); + for (const { lang } of langTranslations) { + if (lang == 'en-US') { + i18n.sourceLocale = lang; + } else { + i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; + } + serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; + e2eConfigs[lang] = { + specs: [`./src/app.${lang}.e2e-spec.ts`], + devServerTarget: `test-project:serve:${lang}`, + }; + } + }); + + // Add a translatable element. + await writeFile( + 'src/app/app.component.html', + '

Hello i18n!

', + ); + + // Extract the translation messages and copy them for each language. + await ng('xi18n', '--output-path=src/locale'); + await expectFileToExist('src/locale/messages.xlf'); + await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); + await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); + + for (const { lang, translation } of langTranslations) { + if (lang != 'en-US') { + await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'source-language="en-US"', + `source-language="en-US" target-language="${lang}"`, + ); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'Hello i18n!', + `Hello i18n!\n${translation}`, + ); + } + } + + // Build each locale and verify the output. + await ng('build', '--i18n-missing-translation', 'error'); + for (const { lang, translation } of langTranslations) { + await expectFileToMatch(`${baseDir}/${lang}/main.js`, translation); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize')); + await expectFileNotToExist(`${baseDir}/${lang}/main-es2015.js`); + + // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. + const app = express(); + app.use(express.static(resolve(baseDir, lang))); + const server = app.listen(4200, 'localhost'); + try { + // Add E2E test for locale + await writeFile( + 'e2e/src/app.e2e-spec.ts', + ` + import { browser, logging, element, by } from 'protractor'; + describe('workspace-project App', () => { + it('should display welcome message', () => { + browser.get(browser.baseUrl); + expect(element(by.css('h1')).getText()).toEqual('${translation}'); + }); + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); + }); + `, + ); + + // Execute without a devserver. + await ng('e2e', '--devServerTarget='); + } finally { + server.close(); + } + } + + // Verify missing translation behaviour. + await appendToFile('src/app/app.component.html', '

Other content

'); + await ng('build', '--i18n-missing-translation', 'ignore'); + await expectFileToMatch(`${baseDir}/fr/main.js`, /Other content/); + await expectToFail(() => ng('build', '--i18n-missing-translation', 'error')); +} From 1c5e3586caf41976816f473985dfe76956086296 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 18 Oct 2019 08:22:49 +0000 Subject: [PATCH 0342/1070] build: update open to version 7.0.0 --- packages/angular/cli/package.json | 2 +- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 15 ++++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 83770de1dc39..9346ff7e67e3 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -37,7 +37,7 @@ "inquirer": "7.0.0", "npm-package-arg": "6.1.1", "npm-pick-manifest": "3.0.2", - "open": "6.4.0", + "open": "7.0.0", "pacote": "9.5.8", "read-package-tree": "5.3.1", "semver": "6.3.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 5f976f1c206c..dbd49ab0db16 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -38,7 +38,7 @@ "mini-css-extract-plugin": "0.8.0", "minimatch": "3.0.4", "parse5": "4.0.0", - "open": "6.4.0", + "open": "7.0.0", "postcss": "7.0.18", "postcss-import": "12.0.1", "postcss-loader": "3.0.0", diff --git a/yarn.lock b/yarn.lock index 669d1b7d0e5d..e549970dbe6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5719,6 +5719,11 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= +is-wsl@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" + integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog== + is-yarn-global@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" @@ -7581,12 +7586,12 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -open@6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" - integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== +open@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/open/-/open-7.0.0.tgz#7e52999b14eb73f90f0f0807fe93897c4ae73ec9" + integrity sha512-K6EKzYqnwQzk+/dzJAQSBORub3xlBTxMz+ntpZpH/LyCa1o6KjXhuN+2npAaI9jaSmU3R1Q8NWf4KUWcyytGsQ== dependencies: - is-wsl "^1.1.0" + is-wsl "^2.1.0" opencollective-postinstall@^2.0.0: version "2.0.2" From 395c97912800af435021432e708cbdfab28783fe Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 21 Oct 2019 18:35:50 +0000 Subject: [PATCH 0343/1070] build: update rollup to version 1.25.1 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index dbd49ab0db16..c6a9b1507f22 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -44,7 +44,7 @@ "postcss-loader": "3.0.0", "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", - "rollup": "1.24.0", + "rollup": "1.25.1", "rxjs": "6.5.3", "sass": "1.23.0", "sass-loader": "8.0.0", diff --git a/yarn.lock b/yarn.lock index e549970dbe6b..8fb78accd5ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9025,10 +9025,10 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.24.0: - version "1.24.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.24.0.tgz#0ace969508babb7a5fcb228e831e9c9a2873c2b0" - integrity sha512-PiFETY/rPwodQ8TTC52Nz2DSCYUATznGh/ChnxActCr8rV5FIk3afBUb3uxNritQW/Jpbdn3kq1Rwh1HHYMwdQ== +rollup@1.25.1: + version "1.25.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.1.tgz#905707d686dc8d7218af63dcfb9e37d1f3dc3c34" + integrity sha512-K8ytdEzMa6anHSnfTIs2BLB+NXlQ4qmWwdNHBpYQNWCbZAzj+DRVk7+ssbLSgddwpFW1nThr2GElR+jASF2NPA== dependencies: "@types/estree" "*" "@types/node" "*" From 151ced8df069803e342313fd0f177f7ff8a365c7 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 21 Oct 2019 18:35:31 +0000 Subject: [PATCH 0344/1070] build: update caniuse-lite to version 1.0.30001002 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index c6a9b1507f22..ef3d82cd9cd9 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -19,7 +19,7 @@ "autoprefixer": "9.6.5", "browserslist": "4.7.1", "cacache": "13.0.1", - "caniuse-lite": "1.0.30000999", + "caniuse-lite": "1.0.30001002", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", diff --git a/yarn.lock b/yarn.lock index 8fb78accd5ed..b6f7f5a4fb7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2639,7 +2639,12 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30000999, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000999: +caniuse-lite@1.0.30001002: + version "1.0.30001002" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001002.tgz#ba999a737b1abd5bf0fd47efe43a09b9cadbe9b0" + integrity sha512-pRuxPE8wdrWmVPKcDmJJiGBxr6lFJq4ivdSeo9FTmGj5Rb8NX3Mby2pARG57MXF15hYAhZ0nHV5XxT2ig4bz3g== + +caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000999: version "1.0.30000999" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== From 0a959abc60a6060ae6d989b6d2dfc4fea5ea6a23 Mon Sep 17 00:00:00 2001 From: vikerman Date: Mon, 21 Oct 2019 13:29:16 -0700 Subject: [PATCH 0345/1070] release: v9.0.0-next.13 --- packages/schematics/angular/utility/latest-versions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 6a76405516e6..f5ac81ef862c 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,16 +8,16 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.11', + Angular: '~9.0.0-next.12', RxJs: '~6.5.3', ZoneJs: '~0.10.2', TypeScript: '~3.6.4', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.12', - DevkitBuildNgPackagr: '~0.900.0-next.12', - DevkitBuildWebpack: '~0.900.0-next.12', + DevkitBuildAngular: '~0.900.0-next.13', + DevkitBuildNgPackagr: '~0.900.0-next.13', + DevkitBuildWebpack: '~0.900.0-next.13', ngPackagr: '^5.5.1', }; From b0dcfd08a062c74f18511cb9b918fd0e1d6f410e Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 22 Oct 2019 08:49:44 +0200 Subject: [PATCH 0346/1070] fix(@angular/cli): logic to determine if the installed CLI is out of date With this change we now check if the current CLI version is the latest published version. If it is not, we install a temporary version to run the `ng update` with. --- .../angular_devkit/core/node/_golden-api.d.ts | 2 +- package.json | 1 + packages/angular/cli/BUILD | 8 +- packages/angular/cli/commands/add-impl.ts | 23 +-- packages/angular/cli/commands/update-impl.ts | 59 ++++-- packages/angular/cli/lib/cli/index.ts | 8 +- packages/angular/cli/lib/init.ts | 28 ++- packages/angular/cli/package.json | 1 + packages/angular/cli/tasks/install-package.ts | 183 ++++++++++++++++++ packages/angular/cli/tasks/npm-install.ts | 68 ------- packages/angular/cli/tasks/npm-uninstall.ts | 53 ----- .../angular/cli/utilities/package-manager.ts | 15 +- packages/angular_devkit/core/node/resolve.ts | 30 +-- .../e2e/tests/commands/add/add-pwa-yarn.ts | 21 ++ .../e2e/tests/commands/add/add-pwa.ts | 4 +- yarn.lock | 24 ++- 16 files changed, 342 insertions(+), 186 deletions(-) create mode 100644 packages/angular/cli/tasks/install-package.ts delete mode 100644 packages/angular/cli/tasks/npm-install.ts delete mode 100644 packages/angular/cli/tasks/npm-uninstall.ts create mode 100644 tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts diff --git a/etc/api/angular_devkit/core/node/_golden-api.d.ts b/etc/api/angular_devkit/core/node/_golden-api.d.ts index df5f96cf2958..ecfdde7ab110 100644 --- a/etc/api/angular_devkit/core/node/_golden-api.d.ts +++ b/etc/api/angular_devkit/core/node/_golden-api.d.ts @@ -48,7 +48,7 @@ export interface ProcessOutput { write(buffer: string | Buffer): boolean; } -export declare function resolve(x: string, options: ResolveOptions): string; +export declare function resolve(packageName: string, options: ResolveOptions): string; export interface ResolveOptions { basedir: string; diff --git a/package.json b/package.json index 153b91e5255c..3e68698301a6 100644 --- a/package.json +++ b/package.json @@ -103,6 +103,7 @@ "@types/minimist": "^1.2.0", "@types/node": "10.12.30", "@types/request": "^2.47.1", + "@types/rimraf": "^2.0.2", "@types/semver": "^6.0.0", "@types/webpack": "^4.32.1", "@types/webpack-dev-server": "^3.1.7", diff --git a/packages/angular/cli/BUILD b/packages/angular/cli/BUILD index dbddc4551ece..337de03004b9 100644 --- a/packages/angular/cli/BUILD +++ b/packages/angular/cli/BUILD @@ -37,11 +37,11 @@ ts_library( "@npm//@types/debug", "@npm//@types/node", "@npm//@types/inquirer", + "@npm//@types/rimraf", "@npm//@types/semver", "@npm//@types/universal-analytics", "@npm//@types/uuid", "@npm//ansi-colors", - "@npm//rxjs", ], ) @@ -52,6 +52,7 @@ ts_library( ":add_schema", ":analytics_schema", ":build_schema", + ":cli_schema", ":config_schema", ":deploy_schema", ":deprecated_schema", @@ -71,6 +72,11 @@ ts_library( ], ) +ts_json_schema( + name = "cli_schema", + src = "lib/config/schema.json", +) + ts_json_schema( name = "analytics_schema", src = "commands/analytics.json", diff --git a/packages/angular/cli/commands/add-impl.ts b/packages/angular/cli/commands/add-impl.ts index 9e0e213eabe4..a110138693ab 100644 --- a/packages/angular/cli/commands/add-impl.ts +++ b/packages/angular/cli/commands/add-impl.ts @@ -9,11 +9,11 @@ import { analytics, tags } from '@angular-devkit/core'; import { NodePackageDoesNotSupportSchematics } from '@angular-devkit/schematics/tools'; import { dirname, join } from 'path'; import { intersects, prerelease, rcompare, satisfies, valid, validRange } from 'semver'; +import { PackageManager } from '../lib/config/schema'; import { isPackageNameSafeForAnalytics } from '../models/analytics'; import { Arguments } from '../models/interface'; import { RunSchematicOptions, SchematicCommand } from '../models/schematic-command'; -import npmInstall from '../tasks/npm-install'; -import npmUninstall from '../tasks/npm-uninstall'; +import { installPackage, installTempPackage } from '../tasks/install-package'; import { colors } from '../utilities/color'; import { getPackageManager } from '../utilities/package-manager'; import { @@ -57,7 +57,7 @@ export class AddCommand extends SchematicCommand { } const packageManager = await getPackageManager(this.workspace.root); - const usingYarn = packageManager === 'yarn'; + const usingYarn = packageManager === PackageManager.Yarn; if (packageIdentifier.type === 'tag' && !packageIdentifier.rawSpec) { // only package name provided; search for viable version @@ -115,7 +115,7 @@ export class AddCommand extends SchematicCommand { } let collectionName = packageIdentifier.name; - let dependencyType: NgAddSaveDepedency | undefined; + let savePackage: NgAddSaveDepedency | undefined; try { const manifest = await fetchPackageManifest(packageIdentifier, this.logger, { @@ -124,7 +124,7 @@ export class AddCommand extends SchematicCommand { usingYarn, }); - dependencyType = manifest['ng-add'] && manifest['ng-add'].save; + savePackage = manifest['ng-add'] && manifest['ng-add'].save; collectionName = manifest.name; if (await this.hasMismatchedPeer(manifest)) { @@ -138,16 +138,13 @@ export class AddCommand extends SchematicCommand { return 1; } - await npmInstall(packageIdentifier.raw, this.logger, packageManager, dependencyType); - - const schematicResult = await this.executeSchematic(collectionName, options['--']); - - if (dependencyType === false) { - // Uninstall the package if it was not meant to be retained. - return npmUninstall(packageIdentifier.raw, this.logger, packageManager); + if (savePackage === false) { + installTempPackage(packageIdentifier.raw, this.logger, packageManager); + } else { + installPackage(packageIdentifier.raw, this.logger, packageManager, savePackage); } - return schematicResult; + return this.executeSchematic(collectionName, options['--']); } async reportAnalytics( diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 727ec35924ef..df1c21970ac2 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -13,14 +13,17 @@ import { execSync } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; import * as semver from 'semver'; +import { PackageManager } from '../lib/config/schema'; import { Command } from '../models/command'; import { Arguments } from '../models/interface'; +import { runTempPackageBin } from '../tasks/install-package'; import { colors } from '../utilities/color'; import { getPackageManager } from '../utilities/package-manager'; import { PackageIdentifier, PackageManifest, PackageMetadata, + fetchPackageManifest, fetchPackageMetadata, } from '../utilities/package-metadata'; import { PackageTreeNode, findNodeDependencies, readPackageTree } from '../utilities/package-tree'; @@ -38,22 +41,23 @@ export class UpdateCommand extends Command { public readonly allowMissingWorkspace = true; private workflow: NodeWorkflow; + private packageManager: PackageManager; async initialize() { + this.packageManager = await getPackageManager(this.workspace.root); this.workflow = new NodeWorkflow( new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(this.workspace.root)), { - packageManager: await getPackageManager(this.workspace.root), + packageManager: this.packageManager, root: normalize(this.workspace.root), }, ); - this.workflow.engineHost.registerOptionsTransform( validateOptionsWithSchema(this.workflow.registry), ); } - async executeSchematic( + private async executeSchematic( collection: string, schematic: string, options = {}, @@ -127,7 +131,7 @@ export class UpdateCommand extends Command { } } - async executeMigrations( + private async executeMigrations( packageName: string, collectionPath: string, range: semver.Range, @@ -190,6 +194,21 @@ export class UpdateCommand extends Command { // tslint:disable-next-line:no-big-function async run(options: UpdateCommandSchema & Arguments) { + // Check if the current installed CLI version is older than the latest version. + if (await this.checkCLILatestVersion(options.verbose)) { + this.logger.warn( + 'The installed Angular CLI version is older than the latest published version.\n' + + 'Installing a temporary version to perform the update.', + ); + + return runTempPackageBin( + '@angular/cli@latest', + this.logger, + this.packageManager, + process.argv.slice(2), + ); + } + const packages: PackageIdentifier[] = []; for (const request of options['--'] || []) { try { @@ -252,8 +271,7 @@ export class UpdateCommand extends Command { } } - const packageManager = await getPackageManager(this.workspace.root); - this.logger.info(`Using package manager: '${packageManager}'`); + this.logger.info(`Using package manager: '${this.packageManager}'`); // Special handling for Angular CLI 1.x migrations if ( @@ -293,7 +311,7 @@ export class UpdateCommand extends Command { force: options.force || false, next: options.next || false, verbose: options.verbose || false, - packageManager, + packageManager: this.packageManager, packages: options.all ? Object.keys(rootDependencies) : [], }); @@ -513,7 +531,7 @@ export class UpdateCommand extends Command { const { success } = await this.executeSchematic('@schematics/update', 'update', { verbose: options.verbose || false, force: options.force || false, - packageManager, + packageManager: this.packageManager, packages: packagesToUpdate, migrateExternal: true, }); @@ -549,7 +567,7 @@ export class UpdateCommand extends Command { return success ? 0 : 1; } - checkCleanGit() { + private checkCleanGit(): boolean { try { const topLevel = execSync('git rev-parse --show-toplevel', { encoding: 'utf8', stdio: 'pipe' }); const result = execSync('git status --porcelain', { encoding: 'utf8', stdio: 'pipe' }); @@ -573,7 +591,7 @@ export class UpdateCommand extends Command { return true; } - createCommit(message: string, files: string[]) { + private createCommit(message: string, files: string[]) { try { execSync('git add -A ' + files.join(' '), { encoding: 'utf8', stdio: 'pipe' }); @@ -581,7 +599,7 @@ export class UpdateCommand extends Command { } catch (error) {} } - findCurrentGitSha(): string | null { + private findCurrentGitSha(): string | null { try { const result = execSync('git rev-parse HEAD', { encoding: 'utf8', stdio: 'pipe' }); @@ -590,6 +608,25 @@ export class UpdateCommand extends Command { return null; } } + + /** + * Checks if the current installed CLI version is older than the latest version. + * @returns `true` when the installed version is older. + */ + private async checkCLILatestVersion(verbose = false): Promise { + const { version: installedCLIVersion } = require('../package.json'); + + const LatestCLIManifest = await fetchPackageManifest( + '@angular/cli@latest', + this.logger, + { + verbose, + usingYarn: this.packageManager === PackageManager.Yarn, + }, + ); + + return semver.lt(installedCLIVersion, LatestCLIManifest.version); + } } function coerceVersionNumber(version: string | undefined): string | null { diff --git a/packages/angular/cli/lib/cli/index.ts b/packages/angular/cli/lib/cli/index.ts index 370040cb90d4..1ee9faf9f240 100644 --- a/packages/angular/cli/lib/cli/index.ts +++ b/packages/angular/cli/lib/cli/index.ts @@ -13,9 +13,15 @@ import { colors, supportsColor } from '../../utilities/color'; import { getWorkspaceRaw } from '../../utilities/config'; import { getWorkspaceDetails } from '../../utilities/project'; +const debugEnv = process.env['NG_DEBUG']; +const isDebug = + debugEnv !== undefined && + debugEnv !== '0' && + debugEnv.toLowerCase() !== 'false'; + // tslint:disable: no-console export default async function(options: { testing?: boolean; cliArgs: string[] }) { - const logger = createConsoleLogger(false, process.stdout, process.stderr, { + const logger = createConsoleLogger(isDebug, process.stdout, process.stderr, { info: s => (supportsColor ? s : colors.unstyle(s)), debug: s => (supportsColor ? s : colors.unstyle(s)), warn: s => (supportsColor ? colors.bold.yellow(s) : colors.unstyle(s)), diff --git a/packages/angular/cli/lib/init.ts b/packages/angular/cli/lib/init.ts index 3028e60950bc..dad435df9040 100644 --- a/packages/angular/cli/lib/init.ts +++ b/packages/angular/cli/lib/init.ts @@ -19,17 +19,15 @@ import { isWarningEnabled } from '../utilities/config'; const packageJson = require('../package.json'); -function _fromPackageJson(cwd?: string) { - cwd = cwd || process.cwd(); - +function _fromPackageJson(cwd = process.cwd()): SemVer | null { do { const packageJsonPath = path.join(cwd, 'node_modules/@angular/cli/package.json'); if (fs.existsSync(packageJsonPath)) { const content = fs.readFileSync(packageJsonPath, 'utf-8'); if (content) { - const json = JSON.parse(content); - if (json['version']) { - return new SemVer(json['version']); + const { version } = JSON.parse(content); + if (version) { + return new SemVer(version); } } } @@ -78,6 +76,20 @@ if (process.env['NG_CLI_PROFILING']) { } (async () => { + const disableVersionCheckEnv = process.env['NG_DISABLE_VERSION_CHECK']; + /** + * Disable CLI version mismatch checks and forces usage of the invoked CLI + * instead of invoking the local installed version. + */ + const disableVersionCheck = + disableVersionCheckEnv !== undefined && + disableVersionCheckEnv !== '0' && + disableVersionCheckEnv.toLowerCase() !== 'false'; + + if (disableVersionCheck) { + return (await import('./cli')).default; + } + let cli; try { const projectLocalCli = require.resolve('@angular/cli', { paths: [process.cwd()] }); @@ -116,13 +128,13 @@ if (process.env['NG_CLI_PROFILING']) { // No error implies a projectLocalCli, which will load whatever // version of ng-cli you have installed in a local package.json - cli = require(projectLocalCli); + cli = await import(projectLocalCli); } catch { // If there is an error, resolve could not find the ng-cli // library from a package.json. Instead, include it from a relative // path to this script file (which is likely a globally installed // npm package). Most common cause for hitting this is `ng new` - cli = require('./cli'); + cli = await import('./cli'); } if ('default' in cli) { diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 9346ff7e67e3..697b4728a446 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -40,6 +40,7 @@ "open": "7.0.0", "pacote": "9.5.8", "read-package-tree": "5.3.1", + "rimraf": "3.0.0", "semver": "6.3.0", "symbol-observable": "1.2.0", "universal-analytics": "^0.4.20", diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts new file mode 100644 index 000000000000..a000bcaa0641 --- /dev/null +++ b/packages/angular/cli/tasks/install-package.ts @@ -0,0 +1,183 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { logging } from '@angular-devkit/core'; +import { spawnSync } from 'child_process'; +import { + existsSync, + mkdtempSync, + readFileSync, + realpathSync, +} from 'fs'; +import { tmpdir } from 'os'; +import { join, resolve } from 'path'; +import * as rimraf from 'rimraf'; +import { PackageManager } from '../lib/config/schema'; +import { colors } from '../utilities/color'; +import { NgAddSaveDepedency } from '../utilities/package-metadata'; + +interface PackageManagerOptions { + silent: string; + saveDev: string; + install: string; + prefix: string; +} + +export function installPackage( + packageName: string, + logger: logging.Logger, + packageManager: PackageManager = PackageManager.Npm, + save: Exclude = true, + extraArgs: string[] = [], + global = false, +) { + const packageManagerArgs = getPackageManagerArguments(packageManager); + + const installArgs: string[] = [ + packageManagerArgs.install, + packageName, + packageManagerArgs.silent, + ]; + + logger.info(colors.green(`Installing packages for tooling via ${packageManager}.`)); + + if (save === 'devDependencies') { + installArgs.push(packageManagerArgs.saveDev); + } + + if (global) { + if (packageManager === PackageManager.Yarn) { + installArgs.unshift('global'); + } else { + installArgs.push('--global'); + } + } + + const { status } = spawnSync( + packageManager, + [ + ...installArgs, + ...extraArgs, + ], + { + stdio: 'inherit', + shell: true, + }, + ); + + if (status !== 0) { + throw new Error('Package install failed, see above.'); + } + + logger.info(colors.green(`Installed packages for tooling via ${packageManager}.`)); +} + +export function installTempPackage( + packageName: string, + logger: logging.Logger, + packageManager: PackageManager = PackageManager.Npm, +): string { + const tempPath = mkdtempSync(join(realpathSync(tmpdir()), '.ng-temp-packages-')); + + // clean up temp directory on process exit + process.on('exit', () => rimraf.sync(tempPath)); + + // setup prefix/global modules path + const packageManagerArgs = getPackageManagerArguments(packageManager); + const installArgs: string[] = [ + packageManagerArgs.prefix, + tempPath, + ]; + + installPackage(packageName, logger, packageManager, true, installArgs, true); + + let tempNodeModules: string; + if (packageManager !== PackageManager.Yarn && process.platform !== 'win32') { + // Global installs on Unix systems go to {prefix}/lib/node_modules. + // Global installs on Windows go to {prefix}/node_modules (that is, no lib folder.) + tempNodeModules = join(tempPath, 'lib', 'node_modules'); + } else { + tempNodeModules = join(tempPath, 'node_modules'); + } + + // Needed to resolve schematics from this location since we use a custom + // resolve strategy in '@angular/devkit-core/node' + // todo: this should be removed when we change the resolutions to use require.resolve + process.env.NG_TEMP_MODULES_DIR = tempNodeModules; + + return tempNodeModules; +} + +export function runTempPackageBin( + packageName: string, + logger: logging.Logger, + packageManager: PackageManager = PackageManager.Npm, + args: string[] = [], +): number { + const tempNodeModulesPath = installTempPackage(packageName, logger, packageManager); + + // Remove version/tag etc... from package name + // Ex: @angular/cli@latest -> @angular/cli + const packageNameNoVersion = packageName.substring(0, packageName.lastIndexOf('@')); + const pkgLocation = join(tempNodeModulesPath, packageNameNoVersion); + const packageJsonPath = join(pkgLocation, 'package.json'); + + // Get a binary location for this package + let binPath: string | undefined; + if (existsSync(packageJsonPath)) { + const content = readFileSync(packageJsonPath, 'utf-8'); + if (content) { + const { bin = {} } = JSON.parse(content); + const binKeys = Object.keys(bin); + + if (binKeys.length) { + binPath = resolve(pkgLocation, bin[binKeys[0]]); + } + } + } + + if (!binPath) { + throw new Error(`Cannot locate bin for temporary package: ${packageNameNoVersion}.`); + } + + const argv = [ + binPath, + ...args, + ]; + + const { status, error } = spawnSync('node', argv, { + stdio: 'inherit', + shell: true, + env: { + ...process.env, + NG_DISABLE_VERSION_CHECK: 'true', + }, + }); + + if (status === null && error) { + throw error; + } + + return status || 0; +} + +function getPackageManagerArguments(packageManager: PackageManager): PackageManagerOptions { + return packageManager === PackageManager.Yarn + ? { + silent: '--silent', + saveDev: '--dev', + install: 'add', + prefix: '--global-folder', + } + : { + silent: '--quiet', + saveDev: '--save-dev', + install: 'install', + prefix: '--prefix', + }; +} diff --git a/packages/angular/cli/tasks/npm-install.ts b/packages/angular/cli/tasks/npm-install.ts deleted file mode 100644 index 33deaabd3964..000000000000 --- a/packages/angular/cli/tasks/npm-install.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { logging } from '@angular-devkit/core'; -import { spawn } from 'child_process'; -import { colors } from '../utilities/color'; -import { NgAddSaveDepedency } from '../utilities/package-metadata'; - -export default async function( - packageName: string, - logger: logging.Logger, - packageManager: string, - save: NgAddSaveDepedency = true, -) { - const installArgs: string[] = []; - switch (packageManager) { - case 'cnpm': - case 'pnpm': - case 'npm': - installArgs.push('install'); - break; - - case 'yarn': - installArgs.push('add'); - break; - - default: - packageManager = 'npm'; - installArgs.push('install'); - break; - } - - logger.info(colors.green(`Installing packages for tooling via ${packageManager}.`)); - - if (packageName) { - installArgs.push(packageName); - } - - if (!save) { - // IMP: yarn doesn't have a no-save option - installArgs.push('--no-save'); - } - - if (save === 'devDependencies') { - installArgs.push(packageManager === 'yarn' ? '--dev' : '--save-dev'); - } - - installArgs.push('--quiet'); - - await new Promise((resolve, reject) => { - spawn(packageManager, installArgs, { stdio: 'inherit', shell: true }).on( - 'close', - (code: number) => { - if (code === 0) { - logger.info(colors.green(`Installed packages for tooling via ${packageManager}.`)); - resolve(); - } else { - reject('Package install failed, see above.'); - } - }, - ); - }); -} diff --git a/packages/angular/cli/tasks/npm-uninstall.ts b/packages/angular/cli/tasks/npm-uninstall.ts deleted file mode 100644 index a30160195a0d..000000000000 --- a/packages/angular/cli/tasks/npm-uninstall.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -import { logging } from '@angular-devkit/core'; -import { spawn } from 'child_process'; -import { colors } from '../utilities/color'; - -export default async function( - packageName: string, - logger: logging.Logger, - packageManager: string, -) { - const installArgs: string[] = []; - switch (packageManager) { - case 'cnpm': - case 'pnpm': - case 'npm': - installArgs.push('uninstall'); - break; - - case 'yarn': - installArgs.push('remove'); - break; - - default: - packageManager = 'npm'; - installArgs.push('uninstall'); - break; - } - - installArgs.push(packageName, '--quiet'); - - logger.info(colors.green(`Uninstalling packages for tooling via ${packageManager}.`)); - - await new Promise((resolve, reject) => { - spawn(packageManager, installArgs, { stdio: 'inherit', shell: true }).on( - 'close', - (code: number) => { - if (code === 0) { - logger.info(colors.green(`Uninstalling packages for tooling via ${packageManager}.`)); - resolve(); - } else { - reject('Package uninstallation failed, see above.'); - } - }, - ); - }); -} diff --git a/packages/angular/cli/utilities/package-manager.ts b/packages/angular/cli/utilities/package-manager.ts index ecc4ac78dc8e..77d1318750f9 100644 --- a/packages/angular/cli/utilities/package-manager.ts +++ b/packages/angular/cli/utilities/package-manager.ts @@ -8,6 +8,7 @@ import { execSync } from 'child_process'; import { existsSync } from 'fs'; import { join } from 'path'; +import { PackageManager } from '../lib/config/schema'; import { getConfiguredPackageManager } from './config'; function supports(name: string): boolean { @@ -28,8 +29,8 @@ export function supportsNpm(): boolean { return supports('npm'); } -export async function getPackageManager(root: string): Promise { - let packageManager = await getConfiguredPackageManager(); +export async function getPackageManager(root: string): Promise { + let packageManager = await getConfiguredPackageManager() as PackageManager | null; if (packageManager) { return packageManager; } @@ -40,16 +41,16 @@ export async function getPackageManager(root: string): Promise { const hasNpmLock = existsSync(join(root, 'package-lock.json')); if (hasYarn && hasYarnLock && !hasNpmLock) { - packageManager = 'yarn'; + packageManager = PackageManager.Yarn; } else if (hasNpm && hasNpmLock && !hasYarnLock) { - packageManager = 'npm'; + packageManager = PackageManager.Npm; } else if (hasYarn && !hasNpm) { - packageManager = 'yarn'; + packageManager = PackageManager.Yarn; } else if (hasNpm && !hasYarn) { - packageManager = 'npm'; + packageManager = PackageManager.Npm; } // TODO: This should eventually inform the user of ambiguous package manager usage. // Potentially with a prompt to choose and optionally set as the default. - return packageManager || 'npm'; + return packageManager || PackageManager.Npm; } diff --git a/packages/angular_devkit/core/node/resolve.ts b/packages/angular_devkit/core/node/resolve.ts index 5a3e0712e6f6..a2fc8702cc3e 100644 --- a/packages/angular_devkit/core/node/resolve.ts +++ b/packages/angular_devkit/core/node/resolve.ts @@ -120,15 +120,15 @@ export function setResolveHook( /** * Resolve a package using a logic similar to npm require.resolve, but with more options. - * @param x The package name to resolve. + * @param packageName The package name to resolve. * @param options A list of options. See documentation of those options. * @returns {string} Path to the index to include, or if `resolvePackageJson` option was * passed, a path to that file. * @throws {ModuleNotFoundException} If no module with that name was found anywhere. */ -export function resolve(x: string, options: ResolveOptions): string { +export function resolve(packageName: string, options: ResolveOptions): string { if (_resolveHook) { - const maybe = _resolveHook(x, options); + const maybe = _resolveHook(packageName, options); if (maybe) { return maybe; } @@ -141,9 +141,9 @@ export function resolve(x: string, options: ResolveOptions): string { options.paths = options.paths || []; - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { - let res = path.resolve(basePath, x); - if (x === '..' || x.slice(-1) === '/') { + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\/\\])/.test(packageName)) { + let res = path.resolve(basePath, packageName); + if (packageName === '..' || packageName.slice(-1) === '/') { res += '/'; } @@ -152,7 +152,7 @@ export function resolve(x: string, options: ResolveOptions): string { return m; } } else { - const n = loadNodeModulesSync(x, basePath); + const n = loadNodeModulesSync(packageName, basePath); if (n) { return n; } @@ -165,7 +165,7 @@ export function resolve(x: string, options: ResolveOptions): string { const localDir = path.dirname(caller); if (localDir !== options.basedir) { try { - return resolve(x, { + return resolve(packageName, { ...options, checkLocal: false, checkGlobal: false, @@ -186,7 +186,7 @@ export function resolve(x: string, options: ResolveOptions): string { const globalDir = path.dirname(_getGlobalNodeModules()); if (globalDir !== options.basedir) { try { - return resolve(x, { + return resolve(packageName, { ...options, checkLocal: false, checkGlobal: false, @@ -201,7 +201,7 @@ export function resolve(x: string, options: ResolveOptions): string { } } - throw new ModuleNotFoundException(x, basePath); + throw new ModuleNotFoundException(packageName, basePath); function loadAsFileSync(x: string): string | null { if (isFile(x)) { @@ -245,11 +245,11 @@ export function resolve(x: string, options: ResolveOptions): string { function loadNodeModulesSync(x: string, start: string): string | null { const dirs = nodeModulesPaths(start, options); for (const dir of dirs) { - const m = loadAsFileSync(path.join(dir, '/', x)); + const m = loadAsFileSync(path.join(dir, x)); if (m) { return m; } - const n = loadAsDirectorySync(path.join(dir, '/', x)); + const n = loadAsDirectorySync(path.join(dir, x)); if (n) { return n; } @@ -301,6 +301,12 @@ export function resolve(x: string, options: ResolveOptions): string { })); }, []); + if (process.env.NG_TEMP_MODULES_DIR) { + // When running from a temporary installations, node_modules have to be resolved + // differently and they should be prefered over others. + dirs.unshift(process.env.NG_TEMP_MODULES_DIR); + } + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; } } diff --git a/tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts b/tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts new file mode 100644 index 000000000000..9c996c8c3197 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts @@ -0,0 +1,21 @@ +import { join } from 'path'; +import { expectFileToExist, readFile, rimraf } from '../../../utils/fs'; +import { ng } from '../../../utils/process'; + +export default async function () { + // forcibly remove in case another test doesn't clean itself up + await rimraf('node_modules/@angular/pwa'); + + // set yarn as package manager + await ng('config', 'cli.packageManager', 'yarn'); + await ng('add', '@angular/pwa'); + await expectFileToExist(join(process.cwd(), 'src/manifest.webmanifest')); + + // Angular PWA doesn't install as a dependency + const { dependencies, devDependencies } = JSON.parse(await readFile(join(process.cwd(), 'package.json'))); + const hasPWADep = Object.keys({ ...dependencies, ...devDependencies }) + .some(d => d === '@angular/pwa'); + if (hasPWADep) { + throw new Error(`Expected 'package.json' not to contain a dependency on '@angular/pwa'.`); + } +} diff --git a/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts b/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts index 330297ec1866..e4737cd71c36 100644 --- a/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts +++ b/tests/legacy-cli/e2e/tests/commands/add/add-pwa.ts @@ -1,13 +1,11 @@ import { join } from 'path'; -import { expectFileToExist, expectFileToMatch, rimraf, readFile } from '../../../utils/fs'; +import { expectFileToExist, readFile, rimraf } from '../../../utils/fs'; import { ng } from '../../../utils/process'; export default async function () { // forcibly remove in case another test doesn't clean itself up await rimraf('node_modules/@angular/pwa'); - await ng('add', '@angular/pwa'); - await expectFileToExist(join(process.cwd(), 'src/manifest.webmanifest')); // Angular PWA doesn't install as a dependency diff --git a/yarn.lock b/yarn.lock index b6f7f5a4fb7b..ef7940102e31 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1041,7 +1041,7 @@ resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-2.0.0.tgz#6ee79b947b8e51ce8c565fc8278822b2605609db" integrity sha512-LHAReDNv7IVTE2Q+nPcRBgUZAUKPJIvR7efMrWgx69442KMoMK+QYjtTtK9WGUdaqUYVLkd/0cvCfb55LFWsVw== -"@types/glob@^7.0.0", "@types/glob@^7.1.1": +"@types/glob@*", "@types/glob@^7.0.0", "@types/glob@^7.1.1": version "7.1.1" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== @@ -1177,6 +1177,14 @@ dependencies: "@types/node" "*" +"@types/rimraf@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" + integrity sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ== + dependencies: + "@types/glob" "*" + "@types/node" "*" + "@types/rx-core-binding@*": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/rx-core-binding/-/rx-core-binding-4.0.4.tgz#d969d32f15a62b89e2862c17b3ee78fe329818d3" @@ -8950,6 +8958,13 @@ rfdc@^1.1.2, rfdc@^1.1.4: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" integrity sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug== +rimraf@3.0.0, rimraf@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" + integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== + dependencies: + glob "^7.1.3" + rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -8957,13 +8972,6 @@ rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimra dependencies: glob "^7.1.3" -rimraf@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" - integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== - dependencies: - glob "^7.1.3" - rimraf@~2.4.0: version "2.4.5" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.4.5.tgz#ee710ce5d93a8fdb856fb5ea8ff0e2d75934b2da" From 6d6fc05795426fa43a1336bda01f64b9f7c27830 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 22 Oct 2019 15:28:59 +0200 Subject: [PATCH 0347/1070] test: run webdriver update in ivy-localize-dl --- tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index b71a56516b60..c49cb9db5bf8 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -24,6 +24,7 @@ export default async function() { localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; } await npm('install', `${localizeVersion}`); + await npm('run', 'webdriver-update'); await updateJsonFile('tsconfig.json', config => { config.compilerOptions.target = 'es2015'; From 6bcbe0dfe86e86ec4e0a55d059b6cee76429dd6e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 21 Oct 2019 19:15:59 +0000 Subject: [PATCH 0348/1070] build: update karma to version ~4.4.0 --- package.json | 2 +- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 34 ++++++++++++++++++- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3e68698301a6..5bdde9b3e8a3 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "husky": "^1.3.1", "jasmine": "^3.3.1", "jasmine-spec-reporter": "^4.2.1", - "karma": "~4.3.0", + "karma": "~4.4.0", "karma-jasmine": "^2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "license-checker": "^20.1.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ef3d82cd9cd9..9de2e97428bd 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -88,7 +88,7 @@ "jquery": "^3.3.1", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~4.2.1", - "karma": "~4.3.0", + "karma": "~4.4.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.1.0", "karma-jasmine": "~2.0.1", diff --git a/yarn.lock b/yarn.lock index ef7940102e31..8374c0446255 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6222,7 +6222,7 @@ karma-sourcemap-loader@0.3.7: dependencies: graceful-fs "^4.1.2" -karma@^4.0.0, karma@~4.3.0: +karma@^4.0.0: version "4.3.0" resolved "https://registry.yarnpkg.com/karma/-/karma-4.3.0.tgz#e14471ea090a952265a42ebb442b1a3c09832559" integrity sha512-NSPViHOt+RW38oJklvYxQC4BSQsv737oQlr/r06pCM+slDOr4myuI1ivkRmp+3dVpJDfZt2DmaPJ2wkx+ZZuMQ== @@ -6255,6 +6255,38 @@ karma@^4.0.0, karma@~4.3.0: tmp "0.0.33" useragent "2.3.0" +karma@~4.4.0: + version "4.4.1" + resolved "https://registry.yarnpkg.com/karma/-/karma-4.4.1.tgz#6d9aaab037a31136dc074002620ee11e8c2e32ab" + integrity sha512-L5SIaXEYqzrh6b1wqYC42tNsFMx2PWuxky84pK9coK09MvmL7mxii3G3bZBh/0rvD27lqDd0le9jyhzvwif73A== + dependencies: + bluebird "^3.3.0" + body-parser "^1.16.1" + braces "^3.0.2" + chokidar "^3.0.0" + colors "^1.1.0" + connect "^3.6.0" + di "^0.0.1" + dom-serialize "^2.2.0" + flatted "^2.0.0" + glob "^7.1.1" + graceful-fs "^4.1.2" + http-proxy "^1.13.0" + isbinaryfile "^3.0.0" + lodash "^4.17.14" + log4js "^4.0.0" + mime "^2.3.1" + minimatch "^3.0.2" + optimist "^0.6.1" + qjobs "^1.1.4" + range-parser "^1.2.0" + rimraf "^2.6.0" + safe-buffer "^5.0.1" + socket.io "2.1.1" + source-map "^0.6.1" + tmp "0.0.33" + useragent "2.3.0" + keygrip@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.0.3.tgz#399d709f0aed2bab0a059e0cdd3a5023a053e1dc" From 7677f26219c065240dc0bf216916add0386ede3a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 21 Oct 2019 14:28:07 -0400 Subject: [PATCH 0349/1070] refactor(@ngtools/webpack): remove unneeded tree-kill dependency --- packages/ngtools/webpack/package.json | 1 - packages/ngtools/webpack/src/angular_compiler_plugin.ts | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index ec147e5eed2c..9c78840fbbdb 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -24,7 +24,6 @@ "@angular-devkit/core": "0.0.0", "enhanced-resolve": "4.1.1", "rxjs": "6.5.3", - "tree-kill": "1.2.1", "webpack-sources": "1.4.3" }, "peerDependencies": { diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 5622c50bb1b9..13415446ed13 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -83,8 +83,6 @@ import { } from './webpack'; import { WebpackInputHost } from './webpack-input-host'; -const treeKill = require('tree-kill'); - export class AngularCompilerPlugin { private _options: AngularCompilerPluginOptions; @@ -570,8 +568,10 @@ export class AngularCompilerPlugin { } private _killForkedTypeChecker() { - if (this._typeCheckerProcess && this._typeCheckerProcess.pid) { - treeKill(this._typeCheckerProcess.pid, 'SIGTERM'); + if (this._typeCheckerProcess && !this._typeCheckerProcess.killed) { + try { + this._typeCheckerProcess.kill(); + } catch {} this._typeCheckerProcess = null; } } From 98e0ca4542c3973d3b5f57859bb3400eff666d56 Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Mon, 21 Oct 2019 12:40:45 -0700 Subject: [PATCH 0350/1070] docs: include major-verson update advice --- packages/angular/cli/commands/update-long.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/angular/cli/commands/update-long.md b/packages/angular/cli/commands/update-long.md index 2132f0ed69dd..c443c31ec6c6 100644 --- a/packages/angular/cli/commands/update-long.md +++ b/packages/angular/cli/commands/update-long.md @@ -6,4 +6,12 @@ ng update @angular/cli @angular/core To update to the next beta or pre-release version, use the `--next=true` option. +To update from one major version to another, use the format +`ng update @angular/cli@^ @angular/core@^`. + +We recommend that you always update to the latest patch version, as it contains fixes we released since the initial major release. +For example, use the following command to take the latest 7.x.x version and use that to update. + +`ng update @angular/cli@^7 @angular/core@^7` + For detailed information and guidance on updating your application, see the interactive [Angular Update Guide](https://update.angular.io/). From c4cf2634f664660d181390c0933da14126899ee6 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 22 Oct 2019 05:25:05 +0000 Subject: [PATCH 0351/1070] build: update core-js to version 3.3.3 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 9de2e97428bd..eaf5acc1d149 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -23,7 +23,7 @@ "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", - "core-js": "3.3.2", + "core-js": "3.3.3", "file-loader": "4.2.0", "find-cache-dir": "3.0.0", "glob": "7.1.4", diff --git a/yarn.lock b/yarn.lock index 8374c0446255..b7317ea6c8dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3284,16 +3284,21 @@ core-js-compat@^3.1.1: browserslist "^4.7.0" semver "^6.3.0" -core-js@3.3.2, core-js@^3.1.3: - version "3.3.2" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.2.tgz#cd42da1d7b0bb33ef11326be3a721934277ceb42" - integrity sha512-S1FfZpeBchkhyoY76YAdFzKS4zz9aOK7EeFaNA2aJlyXyA+sgqz6xdxmLPGXEAf0nF44MVN1kSjrA9Kt3ATDQg== +core-js@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.3.tgz#b7048d3c6c1a52b5fe55a729c1d4ccdffe0891bb" + integrity sha512-0xmD4vUJRY8nfLyV9zcpC17FtSie5STXzw+HyYw2t8IIvmDnbq7RJUULECCo+NstpJtwK9kx8S+898iyqgeUow== core-js@^2.4.0: version "2.6.10" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== +core-js@^3.1.3: + version "3.3.2" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.2.tgz#cd42da1d7b0bb33ef11326be3a721934277ceb42" + integrity sha512-S1FfZpeBchkhyoY76YAdFzKS4zz9aOK7EeFaNA2aJlyXyA+sgqz6xdxmLPGXEAf0nF44MVN1kSjrA9Kt3ATDQg== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" From 98460ef44cff371a9e9cd7bfae750e5bfc84f629 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 22 Oct 2019 06:22:46 +0000 Subject: [PATCH 0352/1070] build: update glob to version 7.1.5 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 20 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index eaf5acc1d149..38e9ba8460e4 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -26,7 +26,7 @@ "core-js": "3.3.3", "file-loader": "4.2.0", "find-cache-dir": "3.0.0", - "glob": "7.1.4", + "glob": "7.1.5", "istanbul-instrumenter-loader": "3.0.1", "jest-worker": "24.9.0", "karma-source-map-support": "1.4.0", diff --git a/yarn.lock b/yarn.lock index b7317ea6c8dd..587b3d7b2eb3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4814,10 +4814,10 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.4, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== +glob@7.1.5: + version "7.1.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" + integrity sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -4837,6 +4837,18 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" From 8d892160d3ba23c9dd758c1e461763b8c6981215 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 22 Oct 2019 15:18:10 +0200 Subject: [PATCH 0353/1070] feat(@angular-devkit/build-ng-packagr): limit support to version 9.0 ng-packagr version 9 removes support for previous versions of Angular. --- .../build_ng_packagr/package.json | 4 +- .../angular/utility/latest-versions.ts | 2 +- yarn.lock | 93 +++++++++++-------- 3 files changed, 56 insertions(+), 43 deletions(-) diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 76191532ae8a..0cf00888d3e1 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -11,13 +11,13 @@ "rxjs": "6.5.3" }, "peerDependencies": { - "ng-packagr": "^4.0.0 || ^5.0.0" + "ng-packagr": "^9.0.0-rc.0" }, "devDependencies": { "@angular/compiler": "9.0.0-next.12", "@angular/compiler-cli": "9.0.0-next.12", "@angular-devkit/core": "0.0.0", - "ng-packagr": "~5.7.0", + "ng-packagr": "~9.0.0-rc.0", "tslib": "^1.10.0" } } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index f5ac81ef862c..9b09e70c9e1d 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -19,5 +19,5 @@ export const latestVersions = { DevkitBuildNgPackagr: '~0.900.0-next.13', DevkitBuildWebpack: '~0.900.0-next.13', - ngPackagr: '^5.5.1', + ngPackagr: '^9.0.0-rc.0', }; diff --git a/yarn.lock b/yarn.lock index 587b3d7b2eb3..f5cb501a9a02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2009,7 +2009,7 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.6.5, autoprefixer@^9.6.0: +autoprefixer@9.6.5, autoprefixer@^9.6.5: version "9.6.5" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.5.tgz#98f4afe7e93cccf323287515d426019619775e5e" integrity sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g== @@ -2390,7 +2390,7 @@ browserslist@4.7.1: electron-to-chromium "^1.3.284" node-releases "^1.1.36" -browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.7.0: +browserslist@^4.6.0, browserslist@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== @@ -2726,6 +2726,21 @@ chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" +chokidar@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.2.tgz#a433973350021e09f2b853a2287781022c0dc935" + integrity sha512-bw3pm7kZ2Wa6+jQWYP/c7bAZy3i4GwiIiMO2EeRjrE48l8vBqC/WvFhSF0xyM8fQiPEGvwMY/5bqDG7sSEOuhg== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + chownr@^1.1.1, chownr@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" @@ -2911,7 +2926,7 @@ commander@2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== -commander@3.0.2, commander@^3.0.0: +commander@3.0.2, commander@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== @@ -4598,7 +4613,7 @@ fs-extra@^7.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^8.0.0: +fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== @@ -4644,7 +4659,7 @@ fsevents@^1.2.7: nan "^2.12.1" node-pre-gyp "^0.12.0" -fsevents@~2.1.0: +fsevents@~2.1.0, fsevents@~2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.1.tgz#74c64e21df71721845d0c44fe54b7f56b82995a9" integrity sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw== @@ -6381,7 +6396,7 @@ less-plugin-npm-import@^2.1.0: promise "~7.0.1" resolve "~1.1.6" -less@3.10.3, less@^3.8.0: +less@3.10.3, less@^3.10.3: version "3.10.3" resolved "https://registry.yarnpkg.com/less/-/less-3.10.3.tgz#417a0975d5eeecc52cff4bcfa3c09d35781e6792" integrity sha512-vz32vqfgmoxF1h3K4J+yKCtajH0PWmjkIFgbs5d78E/c/e+UQTnI+lWK+1eQRE95PXM2mC3rJlLSSP9VQHnaow== @@ -7257,37 +7272,37 @@ neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -ng-packagr@~5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-5.7.0.tgz#3a450d2264724a900dbf6270a8b4c5439eb1f236" - integrity sha512-/75eqAyk2ef8J0aMLl7XCx1QXmqUUTsQDu+fNCFDIYpkpWBh0C8Rkdd72hMLPv3MMo63pfaNeiMXa0zzpQINyA== +ng-packagr@~9.0.0-rc.0: + version "9.0.0-rc.0" + resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-9.0.0-rc.0.tgz#7007ebd442f4ea5a435259f9b8b2d8b5455f7edd" + integrity sha512-Oau3uhOVUB05mpCPlcXwzYkR+4SqXEqzu3IS7CKBs0Alk333kBQljacVKHeFjssD7eQKCFT07IljPKwJS2a7YQ== dependencies: ajv "^6.10.2" - autoprefixer "^9.6.0" - browserslist "^4.0.0" - chalk "^2.3.1" - chokidar "^3.0.0" + autoprefixer "^9.6.5" + browserslist "^4.7.0" + chalk "^2.4.2" + chokidar "^3.2.1" clean-css "^4.1.11" - commander "^3.0.0" - fs-extra "^8.0.0" + commander "^3.0.2" + fs-extra "^8.1.0" glob "^7.1.2" injection-js "^2.2.1" - less "^3.8.0" + less "^3.10.3" less-plugin-npm-import "^2.1.0" node-sass-tilde-importer "^1.0.0" - postcss "^7.0.0" + postcss "^7.0.18" postcss-url "^8.0.0" read-pkg-up "^5.0.0" rimraf "^3.0.0" - rollup "^1.12.1" - rollup-plugin-commonjs "^10.0.0" + rollup "^1.24.0" + rollup-plugin-commonjs "^10.1.0" rollup-plugin-json "^4.0.0" - rollup-plugin-node-resolve "^5.0.0" + rollup-plugin-node-resolve "^5.2.0" rollup-plugin-sourcemaps "^0.4.2" - rxjs "^6.0.0" - sass "^1.17.3" - stylus "^0.54.5" - terser "^4.1.2" + rxjs "^6.5.0" + sass "^1.23.0" + stylus "^0.54.7" + terser "^4.3.8" update-notifier "^3.0.0" nice-try@^1.0.4: @@ -8703,6 +8718,13 @@ readdirp@~3.1.3: dependencies: picomatch "^2.0.4" +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -9043,7 +9065,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollup-plugin-commonjs@^10.0.0: +rollup-plugin-commonjs@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz#417af3b54503878e084d127adf4d1caf8beb86fb" integrity sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q== @@ -9061,7 +9083,7 @@ rollup-plugin-json@^4.0.0: dependencies: rollup-pluginutils "^2.5.0" -rollup-plugin-node-resolve@^5.0.0: +rollup-plugin-node-resolve@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523" integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== @@ -9087,7 +9109,7 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.25.1: +rollup@1.25.1, rollup@^1.24.0: version "1.25.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.1.tgz#905707d686dc8d7218af63dcfb9e37d1f3dc3c34" integrity sha512-K8ytdEzMa6anHSnfTIs2BLB+NXlQ4qmWwdNHBpYQNWCbZAzj+DRVk7+ssbLSgddwpFW1nThr2GElR+jASF2NPA== @@ -9096,15 +9118,6 @@ rollup@1.25.1: "@types/node" "*" acorn "^7.1.0" -rollup@^1.12.1: - version "1.23.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.23.1.tgz#0315a0f5d0dfb056e6363e1dff05b89ac2da6b8e" - integrity sha512-95C1GZQpr/NIA0kMUQmSjuMDQ45oZfPgDBcN0yZwBG7Kee//m7H68vgIyg+SPuyrTZ5PrXfyLK80OzXeKG5dAA== - dependencies: - "@types/estree" "*" - "@types/node" "*" - acorn "^7.1.0" - run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -9124,7 +9137,7 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@6.5.3, rxjs@^6.0.0, rxjs@^6.4.0: +rxjs@6.5.3, rxjs@^6.4.0, rxjs@^6.5.0: version "6.5.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== @@ -9169,7 +9182,7 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.23.0, sass@^1.17.3: +sass@1.23.0, sass@^1.23.0: version "1.23.0" resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.0.tgz#bd526ff40dbc5d09a4ed69e2cffa849749977710" integrity sha512-W4HT8+WE31Rzk3EPQC++CXjD5O+lOxgYBIB8Ohvt7/zeE2UzYW+TOczDrRU3KcEy3+xwXXbmDsOZFkoqgD4TKw== @@ -10064,7 +10077,7 @@ stylus-loader@3.0.2: lodash.clonedeep "^4.5.0" when "~3.6.x" -stylus@0.54.7, stylus@^0.54.5: +stylus@0.54.7, stylus@^0.54.7: version "0.54.7" resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.7.tgz#c6ce4793965ee538bcebe50f31537bfc04d88cd2" integrity sha512-Yw3WMTzVwevT6ZTrLCYNHAFmanMxdylelL3hkWNgPMeTCpMwpV3nXjpOHuBXtFv7aiO2xRuQS6OoAdgkNcSNug== From a384a983fa78748544f2308683e831e2ddcdc803 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 22 Oct 2019 15:23:13 +0200 Subject: [PATCH 0354/1070] feat(@schematics/angular): add tslib as a peerDependencies in library package.json This is to align with https://github.com/angular/angular/pull/32167 --- .../schematics/angular/library/files/package.json.template | 3 ++- packages/schematics/angular/library/index.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/library/files/package.json.template b/packages/schematics/angular/library/files/package.json.template index 8d8b5ad6aace..ad5c43cf5631 100644 --- a/packages/schematics/angular/library/files/package.json.template +++ b/packages/schematics/angular/library/files/package.json.template @@ -3,6 +3,7 @@ "version": "0.0.1", "peerDependencies": { "@angular/common": "^<%= angularLatestVersion %>", - "@angular/core": "^<%= angularLatestVersion %>" + "@angular/core": "^<%= angularLatestVersion %>", + "tslib": "^<%= tsLibLatestVersion %>" } } \ No newline at end of file diff --git a/packages/schematics/angular/library/index.ts b/packages/schematics/angular/library/index.ts index 8d33a1870d38..506dff3d7161 100644 --- a/packages/schematics/angular/library/index.ts +++ b/packages/schematics/angular/library/index.ts @@ -211,6 +211,7 @@ export default function (options: LibraryOptions): Rule { relativePathToWorkspaceRoot: relativePathToWorkspaceRoot(projectRoot), prefix, angularLatestVersion: latestVersions.Angular.replace('~', '').replace('^', ''), + tsLibLatestVersion: latestVersions.TsLib.replace('~', '').replace('^', ''), folderName, }), move(projectRoot), From 613f7dbcd426cc0072d9da640c27cb6355a85630 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 22 Oct 2019 17:51:50 +0200 Subject: [PATCH 0355/1070] refactor(@angular-devkit/core): deprecate old terminal and resolve APIs --- packages/angular_devkit/core/node/resolve.ts | 4 ++++ packages/angular_devkit/core/src/index.ts | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/core/node/resolve.ts b/packages/angular_devkit/core/node/resolve.ts index a2fc8702cc3e..47c0578940ec 100644 --- a/packages/angular_devkit/core/node/resolve.ts +++ b/packages/angular_devkit/core/node/resolve.ts @@ -12,6 +12,7 @@ import { isFile } from './fs'; /** * Exception thrown when a module could not be resolved. + * @deprecated since version 8. Use `MODULE_NOT_FOUND` Node error code instead. */ export class ModuleNotFoundException extends BaseException { public readonly code: string; @@ -70,6 +71,7 @@ function _getGlobalNodeModules() { } +/** @deprecated since version 8. Use `require.resolve` instead. */ export interface ResolveOptions { /** * The basedir to use from which to resolve. @@ -111,6 +113,7 @@ export interface ResolveOptions { let _resolveHook: ((x: string, options: ResolveOptions) => string | null) | null = null; +/** @deprecated since version 8. Use `require.resolve` instead. */ export function setResolveHook( hook: ((x: string, options: ResolveOptions) => string | null) | null, ) { @@ -125,6 +128,7 @@ export function setResolveHook( * @returns {string} Path to the index to include, or if `resolvePackageJson` option was * passed, a path to that file. * @throws {ModuleNotFoundException} If no module with that name was found anywhere. + * @deprecated since version 8. Use `require.resolve` instead. */ export function resolve(packageName: string, options: ResolveOptions): string { if (_resolveHook) { diff --git a/packages/angular_devkit/core/src/index.ts b/packages/angular_devkit/core/src/index.ts index 4e372e55f445..b30525e2d2fb 100644 --- a/packages/angular_devkit/core/src/index.ts +++ b/packages/angular_devkit/core/src/index.ts @@ -9,7 +9,7 @@ import * as analytics from './analytics'; import * as experimental from './experimental'; import * as json from './json/index'; import * as logging from './logger/index'; -import * as terminal from './terminal/index'; +import * as ɵterminal from './terminal/index'; import * as workspaces from './workspace'; export * from './exception/exception'; @@ -17,11 +17,13 @@ export * from './json/index'; export * from './utils/index'; export * from './virtual-fs/index'; + /** @deprecated since version 8 - Instead use other 3rd party libraries like `colors` and `chalk`. */ +export const terminal = ɵterminal; + export { analytics, experimental, json, logging, - terminal, workspaces, }; From e92c46a3cf01d44e9393b661a03a48e3775e821f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 22 Oct 2019 18:57:55 +0200 Subject: [PATCH 0356/1070] refactor(@schematics/angular): remove deprecated `spec` and `styleext` options BREAKING CHANGE: Deprecated `styleext` and `spec` options have been removed. Use `style` and `skipTests` options instead. --- packages/angular/cli/lib/config/schema.json | 30 ------------------- packages/schematics/angular/class/index.ts | 3 -- .../schematics/angular/class/index_spec.ts | 4 +-- packages/schematics/angular/class/schema.json | 6 ---- .../schematics/angular/component/index.ts | 7 ----- .../angular/component/index_spec.ts | 29 ------------------ .../schematics/angular/component/schema.json | 12 -------- .../schematics/angular/directive/index.ts | 3 -- .../schematics/angular/directive/schema.json | 6 ---- packages/schematics/angular/pipe/index.ts | 3 -- .../schematics/angular/pipe/index_spec.ts | 1 - packages/schematics/angular/pipe/schema.json | 6 ---- packages/schematics/angular/service/index.ts | 3 -- .../schematics/angular/service/schema.json | 6 ---- .../e2e/tests/commands/new/new-style.ts | 2 +- 15 files changed, 3 insertions(+), 118 deletions(-) diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index 1fde7a4b6541..cdb0ff65b476 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -134,16 +134,6 @@ "description": "Flag to skip the module import.", "default": false }, - "spec": { - "type": "boolean", - "description": "Specifies if a spec file is generated.", - "default": true - }, - "styleext": { - "description": "The file extension to be used for style files.", - "type": "string", - "default": "css" - }, "style": { "description": "The file extension or preprocessor to use for style files.", "type": "string", @@ -199,11 +189,6 @@ "description": "Flag to skip the module import.", "default": false }, - "spec": { - "type": "boolean", - "description": "Specifies if a spec file is generated.", - "default": true - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", @@ -251,11 +236,6 @@ "default": true, "description": "Flag to indicate if a directory is created." }, - "spec": { - "type": "boolean", - "description": "Specifies if a spec file is generated.", - "default": true - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", @@ -271,11 +251,6 @@ "default": true, "description": "Flag to indicate if a directory is created." }, - "spec": { - "type": "boolean", - "description": "Specifies if a spec file is generated.", - "default": true - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", @@ -302,11 +277,6 @@ "@schematics/angular:class": { "type": "object", "properties": { - "spec": { - "type": "boolean", - "description": "Specifies if a spec file is generated.", - "default": true - }, "skipTests": { "type": "boolean", "description": "When true, does not create test files.", diff --git a/packages/schematics/angular/class/index.ts b/packages/schematics/angular/class/index.ts index 46c1f4626bc7..d01184b655a8 100644 --- a/packages/schematics/angular/class/index.ts +++ b/packages/schematics/angular/class/index.ts @@ -35,9 +35,6 @@ export default function (options: ClassOptions): Rule { options.name = parsedPath.name; options.path = parsedPath.path; - // todo remove these when we remove the deprecations - options.skipTests = options.skipTests || !options.spec; - const templateSource = apply(url('./files'), [ options.skipTests ? filter(path => !path.endsWith('.spec.ts.template')) : noop(), applyTemplates({ diff --git a/packages/schematics/angular/class/index_spec.ts b/packages/schematics/angular/class/index_spec.ts index 5e198256e811..674d083d759d 100644 --- a/packages/schematics/angular/class/index_spec.ts +++ b/packages/schematics/angular/class/index_spec.ts @@ -19,7 +19,7 @@ describe('Class Schematic', () => { const defaultOptions: ClassOptions = { name: 'foo', type: '', - spec: false, + skipTests: true, project: 'bar', }; @@ -55,7 +55,7 @@ describe('Class Schematic', () => { it('should create the class and spec file', async () => { const options = { ...defaultOptions, - spec: true, + skipTests: false, }; const tree = await schematicRunner.runSchematicAsync('class', options, appTree) .toPromise(); diff --git a/packages/schematics/angular/class/schema.json b/packages/schematics/angular/class/schema.json index 285cfc55af14..7f432949bc73 100644 --- a/packages/schematics/angular/class/schema.json +++ b/packages/schematics/angular/class/schema.json @@ -27,12 +27,6 @@ "$source": "projectName" } }, - "spec": { - "type": "boolean", - "description": "When true (the default), generates a \"spec.ts\" test file for the new class.", - "default": true, - "x-deprecated": "Use \"skipTests\" instead." - }, "skipTests": { "type": "boolean", "description": "When true, does not create \"spec.ts\" test files for the new class.", diff --git a/packages/schematics/angular/component/index.ts b/packages/schematics/angular/component/index.ts index 84783fe31008..cdeeba206700 100644 --- a/packages/schematics/angular/component/index.ts +++ b/packages/schematics/angular/component/index.ts @@ -143,13 +143,6 @@ export default function (options: ComponentOptions): Rule { options.path = parsedPath.path; options.selector = options.selector || buildSelector(options, project && project.prefix || ''); - // todo remove these when we remove the deprecations - options.style = ( - options.style && options.style !== Style.Css - ? options.style : options.styleext as Style - ) || Style.Css; - options.skipTests = options.skipTests || !options.spec; - validateName(options.name); validateHtmlSelector(options.selector); diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts index 3968de0b552f..696009a249f3 100644 --- a/packages/schematics/angular/component/index_spec.ts +++ b/packages/schematics/angular/component/index_spec.ts @@ -333,33 +333,4 @@ describe('Component Schematic', () => { .toPromise(); expect(appTree.files).toContain('/projects/bar/custom/app/foo/foo.component.ts'); }); - - // testing deprecating options don't cause conflicts - it('should respect the deprecated styleext (scss) option', async () => { - const options = { ...defaultOptions, style: undefined, styleext: 'scss' }; - const tree = await schematicRunner.runSchematicAsync('component', options, appTree).toPromise(); - const files = tree.files; - expect(files).toContain('/projects/bar/src/app/foo/foo.component.scss'); - }); - - it('should respect the deprecated styleext (css) option', async () => { - const options = { ...defaultOptions, style: undefined, styleext: 'css' }; - const tree = await schematicRunner.runSchematicAsync('component', options, appTree).toPromise(); - const files = tree.files; - expect(files).toContain('/projects/bar/src/app/foo/foo.component.css'); - }); - - it('should respect the deprecated spec option when false', async () => { - const options = { ...defaultOptions, skipTests: undefined, spec: false }; - const tree = await schematicRunner.runSchematicAsync('component', options, appTree).toPromise(); - const files = tree.files; - expect(files).not.toContain('/projects/bar/src/app/foo/foo.component.spec.ts'); - }); - - it('should respect the deprecated spec option when true', async () => { - const options = { ...defaultOptions, skipTests: false, spec: true }; - const tree = await schematicRunner.runSchematicAsync('component', options, appTree).toPromise(); - const files = tree.files; - expect(files).toContain('/projects/bar/src/app/foo/foo.component.spec.ts'); - }); }); diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 2cbc2524a8f7..8172eaf9a305 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -69,12 +69,6 @@ } ] }, - "styleext": { - "description": "The file extension to use for style files.", - "type": "string", - "default": "css", - "x-deprecated": "Use \"style\" instead." - }, "style": { "description": "The file extension or preprocessor to use for style files.", "type": "string", @@ -93,12 +87,6 @@ "description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".", "default": "Component" }, - "spec": { - "type": "boolean", - "description": "When true (the default), generates a \"spec.ts\" test file for the new component.", - "default": true, - "x-deprecated": "Use \"skipTests\" instead." - }, "skipTests": { "type": "boolean", "description": "When true, does not create \"spec.ts\" test files for the new component.", diff --git a/packages/schematics/angular/directive/index.ts b/packages/schematics/angular/directive/index.ts index 28d89e5d00e1..056455fb6b3b 100644 --- a/packages/schematics/angular/directive/index.ts +++ b/packages/schematics/angular/directive/index.ts @@ -121,9 +121,6 @@ export default function (options: DirectiveOptions): Rule { validateHtmlSelector(options.selector); - // todo remove these when we remove the deprecations - options.skipTests = options.skipTests || !options.spec; - const templateSource = apply(url('./files'), [ options.skipTests ? filter(path => !path.endsWith('.spec.ts.template')) : noop(), applyTemplates({ diff --git a/packages/schematics/angular/directive/schema.json b/packages/schematics/angular/directive/schema.json index d2ea12577f69..41ec011e366f 100644 --- a/packages/schematics/angular/directive/schema.json +++ b/packages/schematics/angular/directive/schema.json @@ -41,12 +41,6 @@ } ] }, - "spec": { - "type": "boolean", - "description": "When true (the default), generates a \"spec.ts\" test file for the new directive.", - "default": true, - "x-deprecated": "Use \"skipTests\" instead." - }, "skipTests": { "type": "boolean", "description": "When true, does not create \"spec.ts\" test files for the new class.", diff --git a/packages/schematics/angular/pipe/index.ts b/packages/schematics/angular/pipe/index.ts index 54b09cb0a2dd..0e6345076490 100644 --- a/packages/schematics/angular/pipe/index.ts +++ b/packages/schematics/angular/pipe/index.ts @@ -96,9 +96,6 @@ export default function (options: PipeOptions): Rule { options.name = parsedPath.name; options.path = parsedPath.path; - // todo remove these when we remove the deprecations - options.skipTests = options.skipTests || !options.spec; - const templateSource = apply(url('./files'), [ options.skipTests ? filter(path => !path.endsWith('.spec.ts.template')) : noop(), applyTemplates({ diff --git a/packages/schematics/angular/pipe/index_spec.ts b/packages/schematics/angular/pipe/index_spec.ts index 84edd9f654e5..98772fe02470 100644 --- a/packages/schematics/angular/pipe/index_spec.ts +++ b/packages/schematics/angular/pipe/index_spec.ts @@ -19,7 +19,6 @@ describe('Pipe Schematic', () => { ); const defaultOptions: PipeOptions = { name: 'foo', - spec: true, module: undefined, export: false, flat: true, diff --git a/packages/schematics/angular/pipe/schema.json b/packages/schematics/angular/pipe/schema.json index 5f65fffff113..09788e639dcf 100644 --- a/packages/schematics/angular/pipe/schema.json +++ b/packages/schematics/angular/pipe/schema.json @@ -32,12 +32,6 @@ "default": true, "description": "When true (the default) creates files at the top level of the project." }, - "spec": { - "type": "boolean", - "default": true, - "description": "When true (the default), generates a \"spec.ts\" test file for the new pipe.", - "x-deprecated": "Use \"skipTests\" instead." - }, "skipTests": { "type": "boolean", "description": "When true, does not create \"spec.ts\" test files for the new pipe.", diff --git a/packages/schematics/angular/service/index.ts b/packages/schematics/angular/service/index.ts index 2e6681e03b58..c509f05c164f 100644 --- a/packages/schematics/angular/service/index.ts +++ b/packages/schematics/angular/service/index.ts @@ -33,9 +33,6 @@ export default function (options: ServiceOptions): Rule { options.name = parsedPath.name; options.path = parsedPath.path; - // todo remove these when we remove the deprecations - options.skipTests = options.skipTests || !options.spec; - const templateSource = apply(url('./files'), [ options.skipTests ? filter(path => !path.endsWith('.spec.ts.template')) : noop(), applyTemplates({ diff --git a/packages/schematics/angular/service/schema.json b/packages/schematics/angular/service/schema.json index e11a84e1b957..0c84ee245c10 100644 --- a/packages/schematics/angular/service/schema.json +++ b/packages/schematics/angular/service/schema.json @@ -32,12 +32,6 @@ "default": true, "description": "When true (the default), creates files at the top level of the project." }, - "spec": { - "type": "boolean", - "default": true, - "description": "When true (the default), generates a \"spec.ts\" test file for the new service.", - "x-deprecated": "Use \"skipTests\" instead." - }, "skipTests": { "type": "boolean", "description": "When true, does not create \"spec.ts\" test files for the new service.", diff --git a/tests/legacy-cli/e2e/tests/commands/new/new-style.ts b/tests/legacy-cli/e2e/tests/commands/new/new-style.ts index 62958ef392de..c0e2d9e2b894 100644 --- a/tests/legacy-cli/e2e/tests/commands/new/new-style.ts +++ b/tests/legacy-cli/e2e/tests/commands/new/new-style.ts @@ -5,7 +5,7 @@ import {expectFileToExist} from '../../../utils/fs'; export default function() { return Promise.resolve() - .then(() => ng('config', 'defaults.styleExt', 'scss', '--global')) + .then(() => ng('config', 'defaults.style', 'scss', '--global')) .then(() => createProject('style-project')) .then(() => expectFileToExist('src/app/app.component.scss')) From cf47948dcc601be7522eab6483ced4a4ed4e2ee8 Mon Sep 17 00:00:00 2001 From: vikerman Date: Tue, 22 Oct 2019 14:23:06 -0700 Subject: [PATCH 0357/1070] release: v9.0.0-next.14 --- packages/schematics/angular/utility/latest-versions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 9b09e70c9e1d..3d285e7bc47a 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,9 +15,9 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.13', - DevkitBuildNgPackagr: '~0.900.0-next.13', - DevkitBuildWebpack: '~0.900.0-next.13', + DevkitBuildAngular: '~0.900.0-next.14', + DevkitBuildNgPackagr: '~0.900.0-next.14', + DevkitBuildWebpack: '~0.900.0-next.14', ngPackagr: '^9.0.0-rc.0', }; From 5260bbb9a3d17aefb90bcf1b660e252996cf68df Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 19 Oct 2019 12:22:46 -0400 Subject: [PATCH 0358/1070] fix(@angular-devkit/build-angular): sockPath for custom path Set devServer.sockPath to connect to reloading socket via custom path when serving the app on a custom path. --- packages/angular_devkit/build_angular/src/dev-server/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 816ba06c7bfd..c2c65f6b230a 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -423,6 +423,10 @@ function _addLiveReload( if (clientAddress.pathname) { clientAddress.pathname = path.posix.join(clientAddress.pathname, 'sockjs-node'); sockjsPath = '&sockPath=' + clientAddress.pathname; + // ensure webpack-dev-server uses the correct path to connect to the reloading socket + if (webpackConfig.devServer) { + webpackConfig.devServer.sockPath = clientAddress.pathname; + } } const entryPoints = [`${webpackDevServerPath}?${url.format(clientAddress)}${sockjsPath}`]; From 5597f7fedc70d3093bb47716dd8372ced57a1963 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 21 Oct 2019 12:25:32 -0400 Subject: [PATCH 0359/1070] refactor(@angular-devkit/build-angular): allow control of cache location `NG_BUILD_CACHE` can specify an absolute path to be used as the cache location. Caching can also be disabled by setting the variable to 0 or false. --- .../models/webpack-configs/common.ts | 7 ++-- .../build_angular/src/browser/action-cache.ts | 8 ++--- .../src/browser/action-executor.ts | 33 +++++++++++-------- .../build_angular/src/browser/index.ts | 5 +-- .../build_angular/src/utils/cache-path.ts | 19 +++++++++++ .../src/utils/environment-options.ts | 30 +++++++++++++++++ .../build_angular/src/utils/mangle-options.ts | 10 ------ .../build_angular/src/utils/process-bundle.ts | 2 +- 8 files changed, 79 insertions(+), 35 deletions(-) create mode 100644 packages/angular_devkit/build_angular/src/utils/cache-path.ts create mode 100644 packages/angular_devkit/build_angular/src/utils/environment-options.ts delete mode 100644 packages/angular_devkit/build_angular/src/utils/mangle-options.ts diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 385963f807ce..7353eea88e26 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -26,7 +26,8 @@ import { import { RawSource } from 'webpack-sources'; import { AssetPatternClass, ExtraEntryPoint } from '../../../browser/schema'; import { BuildBrowserFeatures } from '../../../utils'; -import { manglingDisabled } from '../../../utils/mangle-options'; +import { findCachePath } from '../../../utils/cache-path'; +import { cachingDisabled, manglingDisabled } from '../../../utils/environment-options'; import { BundleBudgetPlugin } from '../../plugins/bundle-budget'; import { CleanCssWebpackPlugin } from '../../plugins/cleancss-webpack-plugin'; import { NamedLazyChunksPlugin } from '../../plugins/named-chunks-plugin'; @@ -411,7 +412,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { new TerserPlugin({ sourceMap: scriptsSourceMap, parallel: true, - cache: true, + cache: !cachingDisabled && findCachePath('terser-webpack'), extractComments: false, chunkFilter: (chunk: compilation.Chunk) => !globalScriptsByBundleName.some(s => s.bundleName === chunk.name), @@ -422,7 +423,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { new TerserPlugin({ sourceMap: scriptsSourceMap, parallel: true, - cache: true, + cache: !cachingDisabled && findCachePath('terser-webpack'), extractComments: false, chunkFilter: (chunk: compilation.Chunk) => globalScriptsByBundleName.some(s => s.bundleName === chunk.name), diff --git a/packages/angular_devkit/build_angular/src/browser/action-cache.ts b/packages/angular_devkit/build_angular/src/browser/action-cache.ts index 59b1a9c34143..ebd0fd407eaf 100644 --- a/packages/angular_devkit/build_angular/src/browser/action-cache.ts +++ b/packages/angular_devkit/build_angular/src/browser/action-cache.ts @@ -6,14 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ import { createHash } from 'crypto'; -import * as findCacheDirectory from 'find-cache-dir'; import * as fs from 'fs'; import { copyFile } from '../utils/copy-file'; -import { manglingDisabled } from '../utils/mangle-options'; +import { manglingDisabled } from '../utils/environment-options'; import { CacheKey, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; const cacache = require('cacache'); -const cacheDownlevelPath = findCacheDirectory({ name: 'angular-build-dl' }); const packageVersion = require('../../package.json').version; export interface CacheEntry { @@ -23,7 +21,7 @@ export interface CacheEntry { } export class BundleActionCache { - constructor(private readonly integrityAlgorithm?: string) {} + constructor(private readonly cachePath: string, private readonly integrityAlgorithm?: string) {} static copyEntryContent(entry: CacheEntry | string, dest: fs.PathLike): void { copyFile(typeof entry === 'string' ? entry : entry.path, dest); @@ -88,7 +86,7 @@ export class BundleActionCache { const cacheEntries = []; for (const key of cacheKeys) { if (key) { - const entry = await cacache.get.info(cacheDownlevelPath, key); + const entry = await cacache.get.info(this.cachePath, key); if (!entry) { return false; } diff --git a/packages/angular_devkit/build_angular/src/browser/action-executor.ts b/packages/angular_devkit/build_angular/src/browser/action-executor.ts index c9576e70784c..f2995f8e7770 100644 --- a/packages/angular_devkit/build_angular/src/browser/action-executor.ts +++ b/packages/angular_devkit/build_angular/src/browser/action-executor.ts @@ -9,6 +9,7 @@ import JestWorker from 'jest-worker'; import * as os from 'os'; import * as path from 'path'; import * as v8 from 'v8'; +import { I18nOptions } from '../utils/i18n-options'; import { InlineOptions, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; import { BundleActionCache } from './action-cache'; @@ -36,14 +37,16 @@ workerFile = export class BundleActionExecutor { private largeWorker?: JestWorker; private smallWorker?: JestWorker; - private cache: BundleActionCache; + private cache?: BundleActionCache; constructor( - private workerOptions: unknown, + private workerOptions: { cachePath?: string; i18n: I18nOptions }, integrityAlgorithm?: string, private readonly sizeThreshold = 32 * 1024, ) { - this.cache = new BundleActionCache(integrityAlgorithm); + if (workerOptions.cachePath) { + this.cache = new BundleActionCache(workerOptions.cachePath, integrityAlgorithm); + } } private static executeMethod(worker: JestWorker, method: string, input: unknown): Promise { @@ -87,16 +90,18 @@ export class BundleActionExecutor { } async process(action: ProcessBundleOptions): Promise { - const cacheKeys = this.cache.generateCacheKeys(action); - action.cacheKeys = cacheKeys; - - // Try to get cached data, if it fails fallback to processing - try { - const cachedResult = await this.cache.getCachedBundleResult(action); - if (cachedResult) { - return cachedResult; - } - } catch {} + if (this.cache) { + const cacheKeys = this.cache.generateCacheKeys(action); + action.cacheKeys = cacheKeys; + + // Try to get cached data, if it fails fallback to processing + try { + const cachedResult = await this.cache.getCachedBundleResult(action); + if (cachedResult) { + return cachedResult; + } + } catch {} + } return this.executeAction('process', action); } @@ -107,7 +112,7 @@ export class BundleActionExecutor { async inline( action: InlineOptions, - ): Promise<{ file: string; diagnostics: { type: string; message: string }[]; count: number; }> { + ): Promise<{ file: string; diagnostics: { type: string; message: string }[]; count: number }> { return this.executeAction('inlineLocales', action); } diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 9840d61483ea..09403b14609d 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -9,7 +9,6 @@ import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/ar import { EmittedFiles, WebpackLoggingCallback, runWebpack } from '@angular-devkit/build-webpack'; import { join, json, logging, normalize, tags, virtualFs } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import * as findCacheDirectory from 'find-cache-dir'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; @@ -50,7 +49,9 @@ import { normalizeOptimization, normalizeSourceMaps, } from '../utils'; +import { findCachePath } from '../utils/cache-path'; import { copyAssets } from '../utils/copy-assets'; +import { cachingDisabled } from '../utils/environment-options'; import { emittedFilesToInlineOptions } from '../utils/i18n-inlining'; import { I18nOptions, createI18nOptions, mergeDeprecatedI18nOptions } from '../utils/i18n-options'; import { createTranslationLoader } from '../utils/load-translations'; @@ -69,7 +70,7 @@ import { import { BundleActionExecutor } from './action-executor'; import { Schema as BrowserBuilderSchema } from './schema'; -const cacheDownlevelPath = findCacheDirectory({ name: 'angular-build-dl' }); +const cacheDownlevelPath = cachingDisabled ? undefined : findCachePath('angular-build-dl'); export type BrowserBuilderOutput = json.JsonObject & BuilderOutput & { diff --git a/packages/angular_devkit/build_angular/src/utils/cache-path.ts b/packages/angular_devkit/build_angular/src/utils/cache-path.ts new file mode 100644 index 000000000000..a6eeffdd7495 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/cache-path.ts @@ -0,0 +1,19 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import * as findCacheDirectory from 'find-cache-dir'; +import { tmpdir } from 'os'; +import { resolve } from 'path'; +import { cachingBasePath } from './environment-options'; + +export function findCachePath(name: string): string { + if (cachingBasePath) { + return resolve(cachingBasePath, name); + } + + return findCacheDirectory({ name }) || tmpdir(); +} diff --git a/packages/angular_devkit/build_angular/src/utils/environment-options.ts b/packages/angular_devkit/build_angular/src/utils/environment-options.ts new file mode 100644 index 000000000000..7d9e6b1931f2 --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/environment-options.ts @@ -0,0 +1,30 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +import * as path from 'path'; + +const mangleVariable = process.env['NG_BUILD_MANGLE']; +export const manglingDisabled = + !!mangleVariable && (mangleVariable === '0' || mangleVariable.toLowerCase() === 'false'); + +const cacheVariable = process.env['NG_BUILD_CACHE']; +export const cachingDisabled = + !!cacheVariable && (cacheVariable === '0' || cacheVariable.toLowerCase() === 'false'); +export const cachingBasePath = (() => { + if ( + cachingDisabled || + !cacheVariable || + (cacheVariable === '1' || cacheVariable.toLowerCase() === 'true') + ) { + return null; + } + if (!path.isAbsolute(cacheVariable)) { + throw new Error('NG_BUILD_CACHE path value must be absolute.'); + } + + return cacheVariable; +})(); diff --git a/packages/angular_devkit/build_angular/src/utils/mangle-options.ts b/packages/angular_devkit/build_angular/src/utils/mangle-options.ts deleted file mode 100644 index 84be67375d5b..000000000000 --- a/packages/angular_devkit/build_angular/src/utils/mangle-options.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -const mangleVariable = process.env['NG_BUILD_MANGLE']; -export const manglingDisabled = - !!mangleVariable && (mangleVariable === '0' || mangleVariable.toLowerCase() === 'false'); diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 469f6c653294..1dabf9ab46b7 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -13,8 +13,8 @@ import { RawSourceMap, SourceMapConsumer, SourceMapGenerator } from 'source-map' import { minify } from 'terser'; import * as v8 from 'v8'; import { SourceMapSource } from 'webpack-sources'; +import { manglingDisabled } from './environment-options'; import { I18nOptions } from './i18n-options'; -import { manglingDisabled } from './mangle-options'; const cacache = require('cacache'); const deserialize = ((v8 as unknown) as { deserialize(buffer: Buffer): unknown }).deserialize; From e7bc27056d73ccc2b9cd475b989b3773569781af Mon Sep 17 00:00:00 2001 From: Noopur <56669097+noopur-tiwari@users.noreply.github.com> Date: Wed, 23 Oct 2019 22:28:51 +0530 Subject: [PATCH 0360/1070] docs: corrected spelling of `Globally` under `Installation` section (#15905) --- packages/angular/cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/cli/README.md b/packages/angular/cli/README.md index fb5082a4d200..5954f874c883 100644 --- a/packages/angular/cli/README.md +++ b/packages/angular/cli/README.md @@ -43,7 +43,7 @@ with NPM 5.5.1 or higher. **BEFORE YOU INSTALL:** please read the [prerequisites](#prerequisites) -### Install Globablly +### Install Globally ```bash npm install -g @angular/cli ``` From 70e460d6564d678e88d8a22b2241595e01d3cec2 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 23 Oct 2019 18:59:36 +0200 Subject: [PATCH 0361/1070] refactor: use require.resolve instead of custom `resolve` (#15906) --- .../schematics/tools/index.d.ts | 2 - packages/angular/cli/commands/add-impl.ts | 12 +++- packages/angular/cli/tasks/install-package.ts | 5 -- .../tools/node-module-engine-host.ts | 71 ++++--------------- .../tools/node-module-engine-host_spec.ts | 12 +++- 5 files changed, 35 insertions(+), 67 deletions(-) diff --git a/etc/api/angular_devkit/schematics/tools/index.d.ts b/etc/api/angular_devkit/schematics/tools/index.d.ts index 912d3bedcdd6..98adfeac0547 100644 --- a/etc/api/angular_devkit/schematics/tools/index.d.ts +++ b/etc/api/angular_devkit/schematics/tools/index.d.ts @@ -108,8 +108,6 @@ export declare class InvalidCollectionJsonException extends BaseException { export declare class NodeModulesEngineHost extends FileSystemEngineHostBase { constructor(); protected _resolveCollectionPath(name: string): string; - protected _resolvePackageJson(name: string, basedir?: string): string; - protected _resolvePath(name: string, basedir?: string): string; protected _resolveReferenceString(refString: string, parentPath: string): { ref: RuleFactory<{}>; path: string; diff --git a/packages/angular/cli/commands/add-impl.ts b/packages/angular/cli/commands/add-impl.ts index a110138693ab..8932f04dc6dc 100644 --- a/packages/angular/cli/commands/add-impl.ts +++ b/packages/angular/cli/commands/add-impl.ts @@ -139,7 +139,17 @@ export class AddCommand extends SchematicCommand { } if (savePackage === false) { - installTempPackage(packageIdentifier.raw, this.logger, packageManager); + // Temporary packages are located in a different directory + // Hence we need to resolve them using the temp path + const tempPath = installTempPackage(packageIdentifier.raw, this.logger, packageManager); + const resolvedCollectionPath = require.resolve( + join(collectionName, 'package.json'), + { + paths: [tempPath], + }, + ); + + collectionName = dirname(resolvedCollectionPath); } else { installPackage(packageIdentifier.raw, this.logger, packageManager, savePackage); } diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index a000bcaa0641..2505ece1c8d1 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -105,11 +105,6 @@ export function installTempPackage( tempNodeModules = join(tempPath, 'node_modules'); } - // Needed to resolve schematics from this location since we use a custom - // resolve strategy in '@angular/devkit-core/node' - // todo: this should be removed when we change the resolutions to use require.resolve - process.env.NG_TEMP_MODULES_DIR = tempNodeModules; - return tempNodeModules; } diff --git a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts index 9475a87d3440..03a0d1b1e75f 100644 --- a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts @@ -10,8 +10,7 @@ import { InvalidJsonCharacterException, UnexpectedEndOfInputException, } from '@angular-devkit/core'; -import * as core from '@angular-devkit/core/node'; -import { dirname, join, resolve as resolvePath } from 'path'; +import { dirname, extname, join, resolve } from 'path'; import { RuleFactory } from '../src'; import { FileSystemCollectionDesc, @@ -27,7 +26,6 @@ import { } from './file-system-engine-host-base'; import { readJsonFile } from './file-system-utility'; - export class NodePackageDoesNotSupportSchematics extends BaseException { constructor(name: string) { super(`Package ${JSON.stringify(name)} was found but does not support schematics.`); @@ -41,71 +39,30 @@ export class NodePackageDoesNotSupportSchematics extends BaseException { export class NodeModulesEngineHost extends FileSystemEngineHostBase { constructor() { super(); } - protected _resolvePackageJson(name: string, basedir = process.cwd()) { - return core.resolve(name, { - basedir, - checkLocal: true, - checkGlobal: true, - resolvePackageJson: true, - }); - } - - protected _resolvePath(name: string, basedir = process.cwd()) { - // Allow relative / absolute paths. - if (name.startsWith('.') || name.startsWith('/')) { - return resolvePath(basedir, name); - } else { - // If it's a file inside a package, resolve the package then return the file... - if (name.split('/').length > (name[0] == '@' ? 2 : 1)) { - const rest = name.split('/'); - const packageName = rest.shift() + (name[0] == '@' ? '/' + rest.shift() : ''); - - return resolvePath(core.resolve(packageName, { - basedir, - checkLocal: true, - checkGlobal: true, - resolvePackageJson: true, - }), '..', ...rest); - } - - return core.resolve(name, { - basedir, - checkLocal: true, - checkGlobal: true, - }); - } - } - protected _resolveCollectionPath(name: string): string { let collectionPath: string | undefined = undefined; - - if (name.replace(/\\/g, '/').split('/').length > (name[0] == '@' ? 2 : 1)) { - try { - collectionPath = this._resolvePath(name, process.cwd()); - } catch { - } + if (name.startsWith('.') || name.startsWith('/')) { + name = resolve(name); } - if (!collectionPath) { - let packageJsonPath = this._resolvePackageJson(name, process.cwd()); - // If it's a file, use it as is. Otherwise append package.json to it. - if (!core.fs.isFile(packageJsonPath)) { - packageJsonPath = join(packageJsonPath, 'package.json'); - } + if (extname(name)) { + // When having an extension let's just resolve the provided path. + collectionPath = require.resolve(name); + } else { + const packageJsonPath = require.resolve(join(name, 'package.json')); + const { schematics } = require(packageJsonPath); - const pkgJsonSchematics = require(packageJsonPath)['schematics']; - if (!pkgJsonSchematics || typeof pkgJsonSchematics != 'string') { + if (!schematics || typeof schematics !== 'string') { throw new NodePackageDoesNotSupportSchematics(name); } - collectionPath = this._resolvePath(pkgJsonSchematics, dirname(packageJsonPath)); + + collectionPath = resolve(dirname(packageJsonPath), schematics); } try { - if (collectionPath) { - readJsonFile(collectionPath); + readJsonFile(collectionPath); - return collectionPath; - } + return collectionPath; } catch (e) { if ( e instanceof InvalidJsonCharacterException || e instanceof UnexpectedEndOfInputException diff --git a/packages/angular_devkit/schematics/tools/node-module-engine-host_spec.ts b/packages/angular_devkit/schematics/tools/node-module-engine-host_spec.ts index 4d33a745a2b6..7e02d9ff585e 100644 --- a/packages/angular_devkit/schematics/tools/node-module-engine-host_spec.ts +++ b/packages/angular_devkit/schematics/tools/node-module-engine-host_spec.ts @@ -14,7 +14,7 @@ import * as os from 'os'; import * as path from 'path'; import { NodeModulesEngineHost } from './node-module-engine-host'; -const TMP_DIR = process.env['$TEST_TMPDIR'] || os.tmpdir(); +const TMP_DIR = process.env['TEST_TMPDIR'] || os.tmpdir(); describe('NodeModulesEngineHost', () => { let tmpDir!: string; @@ -47,8 +47,16 @@ describe('NodeModulesEngineHost', () => { const engineHost = new NodeModulesEngineHost(); const engine = new SchematicEngine(engineHost); + // Under Bazel 'require.resolve' is patched to use Bazel resolutions from the MANIFEST FILES. + // Adding a temporary file won't be enough to make Bazel aware of this file. + // We provide the full path here just to verify that the underlying logic works + let prefix = ''; + if (process.env['BAZEL_TARGET']) { + prefix = path.join(process.cwd(), 'node_modules'); + } + expect(() => { - engine.createCollection(path.join('@angular/core', './schematics/migrations.json')); + engine.createCollection(path.join(prefix, '@angular/core', './schematics/migrations.json')); }).not.toThrow(); }); }); From cc4abddcdd646647be003cc7e5f52f6941ffd9bd Mon Sep 17 00:00:00 2001 From: Amadou Sall Date: Wed, 23 Oct 2019 19:00:04 +0200 Subject: [PATCH 0362/1070] refactor(@schematics/angular): remove hardcoded value of `newProjectRoot` (#15925) the default value of `newProjectRoot` is already defined in the schema --- packages/schematics/angular/ng-new/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index ee9d2a60b062..ed9d9014e181 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -40,7 +40,7 @@ export default function (options: NgNewOptions): Rule { const workspaceOptions: WorkspaceOptions = { name: options.name, version: options.version, - newProjectRoot: options.newProjectRoot || 'projects', + newProjectRoot: options.newProjectRoot, minimal: options.minimal, strict: options.strict, }; From c0f43a90843bc3a3bebfaa547e60d01263e7294a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2019 13:29:44 -0700 Subject: [PATCH 0363/1070] build: update to version (#15889) --- yarn.lock | 429 +++++++++++++++++++++++------------------------------- 1 file changed, 184 insertions(+), 245 deletions(-) diff --git a/yarn.lock b/yarn.lock index f5cb501a9a02..416990dcd5a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -698,7 +698,7 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/runtime@^7.5.5": +"@babel/runtime@^7.6.3": version "7.6.3" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.3.tgz#935122c74c73d2240cafd32ddb5fc2a6cd35cf1f" integrity sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA== @@ -1015,9 +1015,9 @@ integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== "@types/express-serve-static-core@*": - version "4.16.9" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.9.tgz#69e00643b0819b024bdede95ced3ff239bb54558" - integrity sha512-GqpaVWR0DM8FnRUJYKlWgyARoBUAVfRIeVDZQKOttLFp5SmhhF9YFIYeTPwMd/AXfxlP7xVO2dj1fGu0Q+krKQ== + version "4.16.10" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.10.tgz#3c1313c6e6b75594561b473a286f016a9abf2132" + integrity sha512-gM6evDj0OvTILTRKilh9T5dTaGpv1oYiFcJAfgSejuMJgGJUsD9hKEU2lB4aiTNy4WwChxRnjfYFuBQsULzsJw== dependencies: "@types/node" "*" "@types/range-parser" "*" @@ -1124,9 +1124,9 @@ "@types/node" "*" "@types/node@*": - version "12.7.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.12.tgz#7c6c571cc2f3f3ac4a59a5f2bd48f5bdbc8653cc" - integrity sha512-KPYGmfD0/b1eXurQ59fXD1GBzhSQfz6/lKBxkaHX9dKTzjXbK68Zt7yGUxUsCS1jeTy/8aL+d9JEr+S54mpkWQ== + version "12.11.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.5.tgz#6c3c8dc84988aff11fd2a63d7b5fbf39eaaab7b1" + integrity sha512-LC8ALj/24PhByn39nr5jnTvpE7MujK8y7LQmV74kHYF5iQ0odCPkMH4IZNZw+cobKfSXqaC8GgegcbIsQpffdA== "@types/node@10.12.30": version "10.12.30" @@ -1134,9 +1134,9 @@ integrity sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q== "@types/node@^10.1.0": - version "10.14.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.21.tgz#4a9db7ef1d1671c0015e632c5fa3d46c86c58c1e" - integrity sha512-nuFlRdBiqbF+PJIEVxm2jLFcQWN7q7iWEJGsBV4n7v1dbI9qXB8im2pMMKMCUZe092sQb5SQft2DHfuQGK5hqQ== + version "10.14.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.22.tgz#34bcdf6b6cb5fc0db33d24816ad9d3ece22feea4" + integrity sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1351,9 +1351,9 @@ "@types/node" "*" "@types/webpack-dev-server@^3.1.7": - version "3.1.7" - resolved "https://registry.yarnpkg.com/@types/webpack-dev-server/-/webpack-dev-server-3.1.7.tgz#a3e7a20366e68bc9853c730b56e994634cb78dac" - integrity sha512-VIRkDkBDuOkYRXQ1EG/etisQ3odo6pcjSmA1Si4VYANuNhSBsLxfuPGeGERwCx1nDKxK3aaXnicPzi0gUvxUaw== + version "3.4.0" + resolved "https://registry.yarnpkg.com/@types/webpack-dev-server/-/webpack-dev-server-3.4.0.tgz#8e29afafb8238185c0d4e94fb544f0e12f0248e1" + integrity sha512-cNxiXfGnMxVgXOjmo/SQdsIX2Muan0A44AvPgVfz9y1PfWogOJGEy+/nFkrF/luvFxykJXT+fZYPpyuIGZtRZg== dependencies: "@types/connect-history-api-fallback" "*" "@types/express" "*" @@ -1371,9 +1371,9 @@ source-map "^0.6.1" "@types/webpack@*", "@types/webpack@^4.32.1": - version "4.39.3" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.3.tgz#1d55f8fce117a325368bf7612950552ee4ed4467" - integrity sha512-afGNNuTfKk1YfHrQ+IwF0QhDkSSMIMMt8BRRErTKaGVvWTMABDjT22/4kJ4bRoSzir9LVgxuuceyZ4Z5I82Cyg== + version "4.39.5" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.5.tgz#3671b65928d9e0c6fcd4adff3f8167d48b174681" + integrity sha512-9twG6D97ao13MBLvigwfBJe6rxtb04UY3TcYHBYkW5sXZjUrNhqIRxLYg74VzK/YAE8xlVhOyd+3Whr7E5RrBA== dependencies: "@types/anymatch" "*" "@types/node" "*" @@ -1615,9 +1615,9 @@ abbrev@1: integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== abstract-leveldown@^6.2.1, abstract-leveldown@~6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.1.tgz#37b655151e13c3d9b20fa3a04ce63ccaa345fce4" - integrity sha512-zUgomHedGBCThDkUtc1bfilu2jEhRZ7Dk3RePhtMma/akw7UK2Upm2R5Dd8ynRBEt3uscwbWO0VQNx22/7RtWg== + version "6.2.2" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.2.tgz#677425beeb28204367c7639e264e93ea4b49971a" + integrity sha512-/a+Iwj0rn//CX0EJOasNyZJd2o8xur8Ce9C57Sznti/Ilt/cb6Qd8/k98A4ZOklXgTG+iAYYUs1OTG0s1eH+zQ== dependencies: level-concat-iterator "~2.0.0" level-supports "~1.0.0" @@ -1631,14 +1631,6 @@ abstract-leveldown@~6.0.1: level-concat-iterator "~2.0.0" xtend "~4.0.0" -abstract-leveldown@~6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.1.1.tgz#f44bad5862d71c7b418110d7698ac25bedf24396" - integrity sha512-7fK/KySVqzKIomdhkSWzX4YBQhzkzEMbWSiaB6mSN9e+ZdV3KEeKxia/8xQzCkATA5xnnukdP88cFR0D2FsFXw== - dependencies: - level-concat-iterator "~2.0.0" - xtend "~4.0.0" - accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1987,11 +1979,6 @@ async@3.1.0: resolved "https://registry.yarnpkg.com/async/-/async-3.1.0.tgz#42b3b12ae1b74927b5217d8c0016baaf62463772" integrity sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ== -async@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= - async@^2.1.2, async@^2.5.0, async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" @@ -2215,9 +2202,9 @@ blocking-proxy@^1.0.0: minimist "^1.2.0" bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: - version "3.7.0" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.0.tgz#56a6a886e03f6ae577cffedeb524f8f2450293cf" - integrity sha512-aBQ1FxIa7kSWCcmKHlcHFlT2jt6J/l4FzC7KcPELkOJOsPOb/bccdhmIrKDfXhwFrmc7vDoDrrepFvGqjyXGJg== + version "3.7.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.1.tgz#df70e302b471d7473489acf26a93d63b53f874de" + integrity sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" @@ -2381,7 +2368,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.1: +browserslist@4.7.1, browserslist@^4.6.0, browserslist@^4.7.0, browserslist@^4.7.1: version "4.7.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.1.tgz#bd400d1aea56538580e8c4d5f1c54ac11b5ab468" integrity sha512-QtULFqKIAtiyNx7NhZ/p4rB8m3xDozVo/pi5VgTlADLF2tNigz/QH+v0m5qhn7XfHT7u+607NcCNOnC0HZAlMg== @@ -2390,15 +2377,6 @@ browserslist@4.7.1: electron-to-chromium "^1.3.284" node-releases "^1.1.36" -browserslist@^4.6.0, browserslist@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" - integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== - dependencies: - caniuse-lite "^1.0.30000989" - electron-to-chromium "^1.3.247" - node-releases "^1.1.29" - browserstack@^1.5.1: version "1.5.3" resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.3.tgz#93ab48799a12ef99dbd074dd595410ddb196a7ac" @@ -2647,16 +2625,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001002: +caniuse-lite@1.0.30001002, caniuse-lite@^1.0.30000999: version "1.0.30001002" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001002.tgz#ba999a737b1abd5bf0fd47efe43a09b9cadbe9b0" integrity sha512-pRuxPE8wdrWmVPKcDmJJiGBxr6lFJq4ivdSeo9FTmGj5Rb8NX3Mby2pARG57MXF15hYAhZ0nHV5XxT2ig4bz3g== -caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30000999: - version "1.0.30000999" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000999.tgz#427253a69ad7bea4aa8d8345687b8eec51ca0e43" - integrity sha512-1CUyKyecPeksKwXZvYw0tEoaMCo/RwBlXmEtN5vVnabvO0KPd9RQLcaAuR9/1F+KDMv6esmOFWlsXuzDk+8rxg== - canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" @@ -2692,10 +2665,10 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -"chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.1.tgz#4634772a1924512d990d4505957bf3a510611387" - integrity sha512-/j5PPkb5Feyps9e+jo07jUZGvkB5Aj953NrI4s8xSVScrAo/RHeILrtdb4uzR7N6aaFFxxJ+gt8mA8HfNpw76w== +"chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.2.tgz#a433973350021e09f2b853a2287781022c0dc935" + integrity sha512-bw3pm7kZ2Wa6+jQWYP/c7bAZy3i4GwiIiMO2EeRjrE48l8vBqC/WvFhSF0xyM8fQiPEGvwMY/5bqDG7sSEOuhg== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -2703,9 +2676,9 @@ chardet@^0.7.0: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.1.3" + readdirp "~3.2.0" optionalDependencies: - fsevents "~2.1.0" + fsevents "~2.1.1" chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.8: version "2.1.8" @@ -2726,21 +2699,6 @@ chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.2.tgz#a433973350021e09f2b853a2287781022c0dc935" - integrity sha512-bw3pm7kZ2Wa6+jQWYP/c7bAZy3i4GwiIiMO2EeRjrE48l8vBqC/WvFhSF0xyM8fQiPEGvwMY/5bqDG7sSEOuhg== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.2.0" - optionalDependencies: - fsevents "~2.1.1" - chownr@^1.1.1, chownr@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" @@ -2865,9 +2823,9 @@ code-point-at@^1.0.0: integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= codelyzer@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-5.1.2.tgz#e6c08269f8796483e57e6d9b7c29723572472b1d" - integrity sha512-1z7mtpwxcz5uUqq0HLO0ifj/tz2dWEmeaK+8c5TEZXAwwVxrjjg0118ODCOCCOcpfYaaEHxStNCaWVYo9FUPXw== + version "5.2.0" + resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-5.2.0.tgz#b0ee573a12779c996090e596c5c1755479d83758" + integrity sha512-izfUfhEOOgAizszPlEDxo71DK/C4wprZw0vkY6UWcOSTQvN1JyfXf9DXwaV7WX+/JC+hH0ShXfdtGLA9Rca7LA== dependencies: app-root-path "^2.2.1" aria-query "^3.0.0" @@ -2921,17 +2879,12 @@ combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@2.20.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" - integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== - commander@3.0.2, commander@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== -commander@^2.11.0, commander@^2.12.1, commander@^2.20.0: +commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -3292,11 +3245,11 @@ copy-webpack-plugin@5.0.4: webpack-log "^2.0.0" core-js-compat@^3.1.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.3.2.tgz#1096c989c1b929ede06b5b6b4768dc4439078c03" - integrity sha512-gfiK4QnNXhnnHVOIZst2XHdFfdMTPxtR0EGs0TdILMlGIft+087oH6/Sw2xTTIjpWXC9vEwsJA8VG3XTGcmO5g== + version "3.3.3" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.3.3.tgz#82642808cf484a35292b2f8e83ef9376884e760f" + integrity sha512-GNZkENsx5pMnS7Inwv7ZO/s3B68a9WU5kIjxqrD/tkNR8mtfXJRk8fAKRlbvWZSGPc59/TkiOBDYl5Cb65pTVA== dependencies: - browserslist "^4.7.0" + browserslist "^4.7.1" semver "^6.3.0" core-js@3.3.3: @@ -3309,11 +3262,6 @@ core-js@^2.4.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== -core-js@^3.1.3: - version "3.3.2" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.2.tgz#cd42da1d7b0bb33ef11326be3a721934277ceb42" - integrity sha512-S1FfZpeBchkhyoY76YAdFzKS4zz9aOK7EeFaNA2aJlyXyA+sgqz6xdxmLPGXEAf0nF44MVN1kSjrA9Kt3ATDQg== - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -3557,7 +3505,7 @@ debug@3.1.0, debug@~3.1.0: dependencies: ms "2.0.0" -debug@^3.0.0, debug@^3.1.0, debug@^3.2.5, debug@^3.2.6: +debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -3910,15 +3858,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.247: - version "1.3.282" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.282.tgz#16118ae9c79a32ea93a17591d5b16e28d10fc08d" - integrity sha512-irSaDeCGgfMu1OA30bhqIBr+dx+pDJjRbwCpob7YWqVZbzXblybNzPGklVnWqv4EXxbkEAzQYqiNCqNTgu00lQ== - electron-to-chromium@^1.3.284: - version "1.3.285" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.285.tgz#909576db2ee4dfec74a87aa30c92f66ebfc78748" - integrity sha512-DYR9KW723sUbGK++DCmCmM95AbNXT4Q0tlCFMcYijFjayhuDqlGYR68OemlP8MJj0gjkwdeItIUfd0oLCgw+4A== + version "1.3.293" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.293.tgz#e52a30026b89276e211be36083a4d7136fd480ea" + integrity sha512-DQSBRuU2Z1vG+CEWUIfCEVMHtuaGlhVojzg39mX5dx7PLSFDJ7DSrGUWzaPFFgWR1jo26hj1nXXRQZvFwk7F8w== elliptic@^6.0.0: version "6.5.1" @@ -4056,9 +3999,9 @@ error-ex@^1.2.0, error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.5.1: - version "1.15.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.15.0.tgz#8884928ec7e40a79e3c9bc812d37d10c8b24cc57" - integrity sha512-bhkEqWJ2t2lMeaJDuk7okMkJWI/yqgH/EoGwpcvv0XW9RWQsRspI4wt6xuyuvMvvQE3gg/D9HXppgk21w78GyQ== + version "1.16.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.16.0.tgz#d3a26dc9c3283ac9750dca569586e976d9dcc06d" + integrity sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg== dependencies: es-to-primitive "^1.2.0" function-bind "^1.1.1" @@ -4401,9 +4344,9 @@ figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== figures@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.0.0.tgz#756275c964646163cc6f9197c7a0295dbfd04de9" - integrity sha512-HKri+WoWoUgr83pehn/SIgLOMZ9nAWC6dcGj26RY2R4F50u4+RTUz0RCrUlOV3nKRAICW1UGzyb+kcX2qK1S/g== + version "3.1.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.1.0.tgz#4b198dd07d8d71530642864af2d45dd9e459c4ec" + integrity sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg== dependencies: escape-string-regexp "^1.0.5" @@ -4659,7 +4602,7 @@ fsevents@^1.2.7: nan "^2.12.1" node-pre-gyp "^0.12.0" -fsevents@~2.1.0, fsevents@~2.1.1: +fsevents@~2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.1.tgz#74c64e21df71721845d0c44fe54b7f56b82995a9" integrity sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw== @@ -4829,7 +4772,7 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.5: +glob@7.1.5, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.1.5" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" integrity sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ== @@ -4852,18 +4795,6 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -4955,9 +4886,9 @@ handlebars@4.3.1: uglify-js "^3.1.4" handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.1.2: - version "4.4.3" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.3.tgz#180bae52c1d0e9ec0c15d7e82a4362d662762f6e" - integrity sha512-B0W4A2U1ww3q7VVthTKfh+epHx+q4mCt6iK+zEAzbMBpWQAwxCeKxEGpj/1oQTpzPXDNSOG7hmG14TsISH50yw== + version "4.4.5" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.5.tgz#1b1f94f9bfe7379adda86a8b73fb570265a0dddd" + integrity sha512-0Ce31oWVB7YidkaTq33ZxEbN+UDxMMgThvCe8ptgQViymL5DPis9uLdTA13MiRPhgvqyxIegugrP97iK3JeBHg== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -5213,10 +5144,18 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz#271ea8e90f836ac9f119daccd39c19ff7dfb0793" - integrity sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg== +https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.3.tgz#fb6cd98ed5b9c35056b5a73cd01a8a721d7193d1" + integrity sha512-Ytgnz23gm2DVftnzqRRz2dOXZbGd2uiajSw/95bPp6v53zPRspQjLm/AfBgqbJ2qfeRXWIOMVLpp86+/5yX39Q== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + +https-proxy-agent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.0.tgz#0106efa5d63d6d6f3ab87c999fa4877a3fd1ff97" + integrity sha512-y4jAxNEihqvBI5F3SaO2rtsjIOnnNA8sEbuiP+UhJZJHeM2NRm6c09ax2tgqme+SgUUvjao2fJXF4h3D6Cb2HQ== dependencies: agent-base "^4.3.0" debug "^3.1.0" @@ -6254,40 +6193,7 @@ karma-sourcemap-loader@0.3.7: dependencies: graceful-fs "^4.1.2" -karma@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/karma/-/karma-4.3.0.tgz#e14471ea090a952265a42ebb442b1a3c09832559" - integrity sha512-NSPViHOt+RW38oJklvYxQC4BSQsv737oQlr/r06pCM+slDOr4myuI1ivkRmp+3dVpJDfZt2DmaPJ2wkx+ZZuMQ== - dependencies: - bluebird "^3.3.0" - body-parser "^1.16.1" - braces "^3.0.2" - chokidar "^3.0.0" - colors "^1.1.0" - connect "^3.6.0" - core-js "^3.1.3" - di "^0.0.1" - dom-serialize "^2.2.0" - flatted "^2.0.0" - glob "^7.1.1" - graceful-fs "^4.1.2" - http-proxy "^1.13.0" - isbinaryfile "^3.0.0" - lodash "^4.17.14" - log4js "^4.0.0" - mime "^2.3.1" - minimatch "^3.0.2" - optimist "^0.6.1" - qjobs "^1.1.4" - range-parser "^1.2.0" - rimraf "^2.6.0" - safe-buffer "^5.0.1" - socket.io "2.1.1" - source-map "^0.6.1" - tmp "0.0.33" - useragent "2.3.0" - -karma@~4.4.0: +karma@^4.0.0, karma@~4.4.0: version "4.4.1" resolved "https://registry.yarnpkg.com/karma/-/karma-4.4.1.tgz#6d9aaab037a31136dc074002620ee11e8c2e32ab" integrity sha512-L5SIaXEYqzrh6b1wqYC42tNsFMx2PWuxky84pK9coK09MvmL7mxii3G3bZBh/0rvD27lqDd0le9jyhzvwif73A== @@ -6475,11 +6381,11 @@ level@5.0.1: opencollective-postinstall "^2.0.0" leveldown@^5.0.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.3.0.tgz#cc228088b184901d52b54bd70518543bfb059406" - integrity sha512-PQXwTKMz55rYlg7984VbM7xpcqdiWgVKRms2fEgqVL7spd6+wK8NewScJOYIGpIG7/XxMOc0i+q/NX0WLJEcwA== + version "5.4.0" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.4.0.tgz#fd6731af2c7fd717c878eb05c87c12036e986e93" + integrity sha512-uKwfJT+jgXL3mdb3UR/bOaO13VX85R7yGaunK+WJNuGWSoxskp3JgYwFCKfPruulx/bVn2xI7XmyNHVQkVC/Ig== dependencies: - abstract-leveldown "~6.1.1" + abstract-leveldown "~6.2.1" napi-macros "~2.0.0" node-gyp-build "~4.1.0" @@ -6598,9 +6504,9 @@ locate-path@^5.0.0: p-locate "^4.1.0" lockfile-lint-api@^2.0.0: - version "2.1.3" - resolved "https://registry.yarnpkg.com/lockfile-lint-api/-/lockfile-lint-api-2.1.3.tgz#1c3421c68279e360ea55737f48d9fb357749b1d9" - integrity sha512-UB6HQv2r3D4opC9rw/pO8c9kD/o2ZmZ8wf1KSYEgmIUfDRXXorcHXc4ur0NvFvogsNvJx7/0jm4vv9DSJUQ6aA== + version "2.1.4" + resolved "https://registry.yarnpkg.com/lockfile-lint-api/-/lockfile-lint-api-2.1.4.tgz#42e5378c2ffdb40412555b30315694bd9080a3ff" + integrity sha512-pWTr8u8b1XPpx03GZt2wpd4ZFAnC4qcWqa7gmfKgnal1m/V94RF0KGhLlw2GAMyWblhFGiycJfoli+XrzWvDqg== dependencies: "@yarnpkg/lockfile" "^1.1.0" debug "^4.1.0" @@ -6776,9 +6682,9 @@ lunr-mutable-indexes@2.3.2: lunr ">= 2.3.0 < 2.4.0" "lunr@>= 2.3.0 < 2.4.0": - version "2.3.7" - resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.7.tgz#05ccf3af9d0e169b8f432c97e02fc1bdf3f36343" - integrity sha512-HjFSiy0Y0qZoW5OA1I6qBi7OnsDdqQnaUr03jhorh30maQoaP+4lQCKklYE3Nq3WJMSUfuBl6N+bKY5wxCb9hw== + version "2.3.8" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.8.tgz#a8b89c31f30b5a044b97d2d28e2da191b6ba2072" + integrity sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg== magic-string@0.25.4, magic-string@^0.25.0, magic-string@^0.25.2: version "0.25.4" @@ -6822,15 +6728,15 @@ make-error@^1.1.1: integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== make-fetch-happen@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.0.tgz#a8e3fe41d3415dd656fe7b8e8172e1fb4458b38d" - integrity sha512-nFr/vpL1Jc60etMVKeaLOqfGjMMb3tAHFVJWxHOFCFS04Zmd7kGlMxo0l1tzfhoQje0/UPnd0X8OeGUiXXnfPA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.1.tgz#fac65400ab5f7a9c001862a3e9b0f417f0840175" + integrity sha512-b4dfaMvUDR67zxUq1+GN7Ke9rH5WvGRmoHuMH7l+gmUCR2tCXFP6mpeJ9Dp+jB6z8mShRopSf1vLRBhRs8Cu5w== dependencies: agentkeepalive "^3.4.1" cacache "^12.0.0" http-cache-semantics "^3.8.1" http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.1" + https-proxy-agent "^2.2.3" lru-cache "^5.1.1" mississippi "^3.0.0" node-fetch-npm "^2.0.2" @@ -7150,7 +7056,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1, mkdirp@~0.5.x: +mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1, mkdirp@~0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -7379,17 +7285,10 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.29: - version "1.1.35" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.35.tgz#32a74a3cd497aa77f23d509f483475fd160e4c48" - integrity sha512-JGcM/wndCN/2elJlU0IGdVEJQQnJwsLbgPCFd2pY7V0mxf17bZ0Gb/lgOtL29ZQhvEX5shnVhxQyZz3ex94N8w== - dependencies: - semver "^6.3.0" - node-releases@^1.1.36: - version "1.1.36" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.36.tgz#44b7cb8254138e87bdbfa47761d0f825e20900b4" - integrity sha512-ggXhX6QGyJSjj3r+6ml2LqqC28XOWmKtpb+a15/Zpr9V3yoNazxJNlcQDS9bYaid5FReEWHEgToH1mwoUceWwg== + version "1.1.38" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.38.tgz#d81b365df2936654ba37f509ba2fbe91eff2578b" + integrity sha512-/5NZAaOyTj134Oy5Cp/J8mso8OD/D9CSuL+6TOXXsTKO8yjc5e4up75SRPCganCjwFKMj2jbp5tR0dViVdox7g== dependencies: semver "^6.3.0" @@ -8150,18 +8049,18 @@ pn@^1.1.0: integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== popper.js@^1.14.1: - version "1.15.0" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2" - integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA== + version "1.16.0" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.0.tgz#2e1816bcbbaa518ea6c2e15a466f4cb9c6e2fbb3" + integrity sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw== -portfinder@^1.0.24: - version "1.0.24" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.24.tgz#11efbc6865f12f37624b6531ead1d809ed965cfa" - integrity sha512-ekRl7zD2qxYndYflwiryJwMioBI7LI7rVXg3EnLK3sjkouT5eOuhS3gS255XxBksa30VG8UPZYZCdgfGOfkSUg== +portfinder@^1.0.24, portfinder@^1.0.25: + version "1.0.25" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" + integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== dependencies: - async "^1.5.2" - debug "^2.2.0" - mkdirp "0.5.x" + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" posix-character-classes@^0.1.0: version "0.1.1" @@ -8488,9 +8387,9 @@ quick-lru@^1.0.0: integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= quicktype-core@^6.0.15: - version "6.0.47" - resolved "https://registry.yarnpkg.com/quicktype-core/-/quicktype-core-6.0.47.tgz#4b7964c58c8ba55bb554ab110a035fcde3937fef" - integrity sha512-sHOrqzwF8R4MdeFLrXWpMxzSlPiTE6Jd8DzdYUiFUW1KrrhA3RiFyOOyrtQs0V1cVyWHaFHqd8SUe8Xy3vRZpQ== + version "6.0.51" + resolved "https://registry.yarnpkg.com/quicktype-core/-/quicktype-core-6.0.51.tgz#733c4b253a27398fef70faaf9c2c916f26aea01e" + integrity sha512-qyXZ++kyQZBpA72GSEG5gN0eHCMXXCL/K3ZxO5J3iJI5RmbCuuhMsfTO+uis1UFXfBoP71I6+Zq2+K7H14/W1Q== dependencies: "@mark.probst/unicode-properties" "~1.1.0" "@types/urijs" "^1.19.1" @@ -8711,13 +8610,6 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.1.3.tgz#d6e011ed5b9240a92f08651eeb40f7942ceb6cc1" - integrity sha512-ZOsfTGkjO2kqeR5Mzr5RYDbTGYneSkdNKX2fOX2P5jF7vMrd/GNnIAUtDldeHHumHUCQ3V05YfWUdxMPAsRu9Q== - dependencies: - picomatch "^2.0.4" - readdirp@~3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" @@ -8832,9 +8724,9 @@ regjsgen@^0.2.0: integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= regjsgen@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" - integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== + version "0.5.1" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" + integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== regjsparser@^0.1.4: version "0.1.5" @@ -9109,7 +9001,7 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.25.1, rollup@^1.24.0: +rollup@1.25.1: version "1.25.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.1.tgz#905707d686dc8d7218af63dcfb9e37d1f3dc3c34" integrity sha512-K8ytdEzMa6anHSnfTIs2BLB+NXlQ4qmWwdNHBpYQNWCbZAzj+DRVk7+ssbLSgddwpFW1nThr2GElR+jASF2NPA== @@ -9118,6 +9010,15 @@ rollup@1.25.1, rollup@^1.24.0: "@types/node" "*" acorn "^7.1.0" +rollup@^1.24.0: + version "1.25.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d" + integrity sha512-+7z6Wab/L45QCPcfpuTZKwKiB0tynj05s/+s2U3F2Bi7rOLPr9UcjUwO7/xpjlPNXA/hwnth6jBExFRGyf3tMg== + dependencies: + "@types/estree" "*" + "@types/node" "*" + acorn "^7.1.0" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -9182,26 +9083,34 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.23.0, sass@^1.23.0: +sass@1.23.0: version "1.23.0" resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.0.tgz#bd526ff40dbc5d09a4ed69e2cffa849749977710" integrity sha512-W4HT8+WE31Rzk3EPQC++CXjD5O+lOxgYBIB8Ohvt7/zeE2UzYW+TOczDrRU3KcEy3+xwXXbmDsOZFkoqgD4TKw== dependencies: chokidar ">=2.0.0 <4.0.0" +sass@^1.23.0: + version "1.23.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.1.tgz#0e5b72ba2bd9f0229a637d33f8dd5bf2d810beb3" + integrity sha512-zQzJ3UETUWOMd/pJJGH/zvRsBVO97m11RcpfUhcQUHEXf0yHUBgOIE/Nw8aK0m1XyVJPeq228iIK7gVxsJ/Puw== + dependencies: + chokidar ">=2.0.0 <4.0.0" + sauce-connect-launcher@^1.2.4: - version "1.2.7" - resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.2.7.tgz#c7f8b3d4eb354d07a9922b4cd67356f527192556" - integrity sha512-v07+QhFrxgz3seMFuRSonu3gW1s6DbcLQlFhjsRrmKUauzPbbudHdnn91WYgEwhoZVdPNzeZpAEJwcQyd9xnTA== + version "1.3.1" + resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.3.1.tgz#31137f57b0f7176e1c0525b7fb09c6da746647cf" + integrity sha512-vIf9qDol3q2FlYzrKt0dr3kvec6LSjX2WS+/mVnAJIhqh1evSkPKCR2AzcJrnSmx9Xt9PtV0tLY7jYh0wsQi8A== dependencies: adm-zip "~0.4.3" async "^2.1.2" - https-proxy-agent "^2.2.1" + https-proxy-agent "^3.0.0" lodash "^4.16.6" rimraf "^2.5.4" "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" + uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: @@ -9240,9 +9149,9 @@ schema-utils@^1.0.0: ajv-keywords "^3.1.0" schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.1.0, schema-utils@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.4.1.tgz#e89ade5d056dc8bcaca377574bb4a9c4e1b8be56" - integrity sha512-RqYLpkPZX5Oc3fw/kHHHyP56fg5Y+XBpIpV8nCg0znIALfq3OH+Ea9Hfeac9BAMwG5IICltiZ0vxFvJQONfA5w== + version "2.5.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.5.0.tgz#8f254f618d402cc80257486213c8970edfd7c22f" + integrity sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ== dependencies: ajv "^6.10.2" ajv-keywords "^3.4.1" @@ -10188,7 +10097,7 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.9: +terser@4.3.9, terser@^4.1.2, terser@^4.3.8: version "4.3.9" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.9.tgz#e4be37f80553d02645668727777687dad26bbca8" integrity sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA== @@ -10197,15 +10106,6 @@ terser@4.3.9: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^4.1.2, terser@^4.3.8: - version "4.3.8" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.8.tgz#707f05f3f4c1c70c840e626addfdb1c158a17136" - integrity sha512-otmIRlRVmLChAWsnSFNO0Bfk6YySuBp6G9qrHiJwlLDd4mxe2ta4sjI7TzIR+W1nBMjilzrMcPOz9pSusgx3hQ== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - test-exclude@^5.2.2: version "5.2.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" @@ -10546,11 +10446,11 @@ typescript@3.6.4: integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg== uglify-js@^3.1.4: - version "3.6.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.1.tgz#ae7688c50e1bdcf2f70a0e162410003cf9798311" - integrity sha512-+dSJLJpXBb6oMHP+Yvw8hUgElz4gLTh82XuX68QiJVTXaE5ibl6buzhNkQdYhBlIhozWOC9ge16wyRmjG4TwVQ== + version "3.6.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.4.tgz#88cc880c6ed5cf9868fdfa0760654e7bed463f1d" + integrity sha512-9Yc2i881pF4BPGhjteCXQNaXx1DCwm3dtOyBaG2hitHjLWOczw/ki8vD1bqyT3u6K0Ms/FpCShkmfg+FtlOfYA== dependencies: - commander "2.20.0" + commander "~2.20.3" source-map "~0.6.1" ultron@~1.1.0: @@ -10683,9 +10583,9 @@ uri-js@^4.2.2: punycode "^2.1.0" urijs@^1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.1.tgz#5b0ff530c0cbde8386f6342235ba5ca6e995d25a" - integrity sha512-xVrGVi94ueCJNrBSTjWqjvtgvl3cyOTThp2zaMaFNGp3F542TR6sM3f2o8RqZl+AwteClSVmoCyt0ka4RjQOQg== + version "1.19.2" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.2.tgz#f9be09f00c4c5134b7cb3cf475c1dd394526265a" + integrity sha512-s/UIq9ap4JPZ7H1EB5ULo/aOUbWqfDi7FKzMC2Nz+0Si8GiT1rIEaprt8hy3Vy2Ex2aJPpOQv4P4DuOZ+K1c6w== urix@^0.1.0: version "0.1.0" @@ -10977,7 +10877,7 @@ webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.8.2, webpack-dev-server@^3.1.4: +webpack-dev-server@3.8.2: version "3.8.2" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.2.tgz#3292427bf6510da9a3ac2d500b924a4197667ff9" integrity sha512-0xxogS7n5jHDQWy0WST0q6Ykp7UGj4YvWh+HVN71JoE7BwPxMZrwgraBvmdEMbDVMBzF0u+mEzn8TQzBm5NYJQ== @@ -11016,6 +10916,45 @@ webpack-dev-server@3.8.2, webpack-dev-server@^3.1.4: ws "^6.2.1" yargs "12.0.5" +webpack-dev-server@^3.1.4: + version "3.9.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.9.0.tgz#27c3b5d0f6b6677c4304465ac817623c8b27b89c" + integrity sha512-E6uQ4kRrTX9URN9s/lIbqTAztwEPdvzVrcmHE8EQ9YnuT9J8Es5Wrd8n9BKg1a0oZ5EgEke/EQFgUsp18dSTBw== + dependencies: + ansi-html "0.0.7" + bonjour "^3.5.0" + chokidar "^2.1.8" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" + debug "^4.1.1" + del "^4.1.1" + express "^4.17.1" + html-entities "^1.2.1" + http-proxy-middleware "0.19.1" + import-local "^2.0.0" + internal-ip "^4.3.0" + ip "^1.1.5" + is-absolute-url "^3.0.3" + killable "^1.0.1" + loglevel "^1.6.4" + opn "^5.5.0" + p-retry "^3.0.1" + portfinder "^1.0.25" + schema-utils "^1.0.0" + selfsigned "^1.10.7" + semver "^6.3.0" + serve-index "^1.9.1" + sockjs "0.3.19" + sockjs-client "1.4.0" + spdy "^4.0.1" + strip-ansi "^3.0.1" + supports-color "^6.1.0" + url "^0.11.0" + webpack-dev-middleware "^3.7.2" + webpack-log "^2.0.0" + ws "^6.2.1" + yargs "12.0.5" + webpack-log@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" @@ -11102,9 +11041,9 @@ whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== whatwg-url@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" - integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.1" @@ -11204,9 +11143,9 @@ ws@^6.1.0, ws@^6.2.1: async-limiter "~1.0.0" ws@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.1.2.tgz#c672d1629de8bb27a9699eb599be47aeeedd8f73" - integrity sha512-gftXq3XI81cJCgkUiAVixA0raD9IVmXqsylCrjRygw4+UOOGzPoxnQ6r/CnVL9i+mDncJo94tSkyrtuuQVBmrg== + version "7.2.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.0.tgz#422eda8c02a4b5dba7744ba66eebbd84bcef0ec7" + integrity sha512-+SqNqFbwTm/0DC18KYzIsMTnEWpLwJsiasW/O17la4iDRRIO9uaHbvKiAS3AHgTiuuWerK/brj4O6MYZkei9xg== dependencies: async-limiter "^1.0.0" @@ -11296,11 +11235,11 @@ yallist@^4.0.0: integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^1.5.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.1.tgz#86db1b39a6434a7928d3750cbe08303a50a24d6b" - integrity sha512-sR0mJ2C3LVBgMST+0zrrrsKSijbw64bfHmTt4nEXLZTZFyIAuUVARqA/LO5kaZav2OVQMaZ+5WRrZv7QjxG3uQ== + version "1.7.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.2.tgz#f26aabf738590ab61efaca502358e48dc9f348b2" + integrity sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw== dependencies: - "@babel/runtime" "^7.5.5" + "@babel/runtime" "^7.6.3" yargs-parser@^11.1.1: version "11.1.1" From 99c174c03b101f0118dfb647313fc7a8d5233446 Mon Sep 17 00:00:00 2001 From: vikerman Date: Wed, 23 Oct 2019 15:10:42 -0700 Subject: [PATCH 0364/1070] release: v9.0.0-next.15 --- packages/schematics/angular/utility/latest-versions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 3d285e7bc47a..5a89d34ef550 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,9 +15,9 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.14', - DevkitBuildNgPackagr: '~0.900.0-next.14', - DevkitBuildWebpack: '~0.900.0-next.14', + DevkitBuildAngular: '~0.900.0-next.15', + DevkitBuildNgPackagr: '~0.900.0-next.15', + DevkitBuildWebpack: '~0.900.0-next.15', ngPackagr: '^9.0.0-rc.0', }; From 30536881f90d9a1f0827f2457c70ccf36889da5f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 22 Oct 2019 19:41:43 -0400 Subject: [PATCH 0365/1070] fix(@angular-devkit/build-angular): set locale identifier when localizing --- .../build_angular/src/browser/index.ts | 8 +++++ .../build_angular/src/utils/i18n-inlining.ts | 1 + .../build_angular/src/utils/process-bundle.ts | 35 +++++++++++++++---- .../e2e/tests/i18n/ivy-localize-dl.ts | 6 ++-- .../e2e/tests/i18n/ivy-localize-es2015.ts | 3 +- .../e2e/tests/i18n/ivy-localize-es5.ts | 3 +- 6 files changed, 45 insertions(+), 11 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 09403b14609d..8ea03d8b3a5c 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -355,6 +355,7 @@ export function buildWebpackBrowser( integrityAlgorithm: options.subresourceIntegrity ? 'sha384' : undefined, }; + let mainChunkId; const actions: ProcessBundleOptions[] = []; const seen = new Set(); for (const file of emittedFiles) { @@ -381,6 +382,11 @@ export function buildWebpackBrowser( } seen.add(file.file); + if (file.name === 'main') { + // tslint:disable-next-line: no-non-null-assertion + mainChunkId = file.id!.toString(); + } + // All files at this point except ES5 polyfills are module scripts const es5Polyfills = file.file.startsWith('polyfills-es5') || @@ -497,6 +503,7 @@ export function buildWebpackBrowser( outputPath: baseOutputPath, es5: false, missingTranslation: options.i18nMissingTranslation, + setLocale: result.name === mainChunkId, }); processedFiles.add(result.original.filename); } @@ -510,6 +517,7 @@ export function buildWebpackBrowser( outputPath: baseOutputPath, es5: true, missingTranslation: options.i18nMissingTranslation, + setLocale: result.name === mainChunkId, }); processedFiles.add(result.downlevel.filename); } diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts index 5609e1d35a00..432bd1a5b58a 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts @@ -36,6 +36,7 @@ export function emittedFilesToInlineOptions( es5, outputPath, missingTranslation, + setLocale: emittedFile.name === 'main', }; originalFiles.push(originalPath); diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 1dabf9ab46b7..f8e8df618906 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -472,6 +472,7 @@ export interface InlineOptions { es5: boolean; outputPath: string; missingTranslation?: 'warning' | 'error' | 'ignore'; + setLocale?: boolean; } interface LocalizePosition { @@ -491,7 +492,8 @@ export async function inlineLocales(options: InlineOptions) { throw new Error('Flat output is only supported when inlining one locale.'); } - if (!options.code.includes(localizeName)) { + const hasLocalizeName = options.code.includes(localizeName); + if (!hasLocalizeName && !options.setLocale) { return inlineCopyOnly(options); } @@ -506,13 +508,13 @@ export async function inlineLocales(options: InlineOptions) { const diagnostics = new localizeDiag.Diagnostics(); const positions = findLocalizePositions(options, utils); - if (positions.length === 0) { + if (positions.length === 0 && !options.setLocale) { return inlineCopyOnly(options); } - const content = new MagicString(options.code); - const inputMap = options.map && JSON.parse(options.map) as RawSourceMap; - + let content = new MagicString(options.code); + const inputMap = options.map && (JSON.parse(options.map) as RawSourceMap); + let contentClone; for (const locale of i18n.inlineLocales) { const isSourceLocale = locale === i18n.sourceLocale; // tslint:disable-next-line: no-any @@ -532,6 +534,12 @@ export async function inlineLocales(options: InlineOptions) { content.overwrite(position.start, position.end, code); } + if (options.setLocale) { + const setLocaleText = `var $localize=Object.assign(void 0===$localize?{}:$localize,{locale:"${locale}"});`; + contentClone = content.clone(); + content.prepend(setLocaleText); + } + const output = content.toString(); const outputPath = path.join( options.outputPath, @@ -552,6 +560,11 @@ export async function inlineLocales(options: InlineOptions) { fs.writeFileSync(outputPath + '.map', JSON.stringify(outputMap)); } + + if (contentClone) { + content = contentClone; + contentClone = undefined; + } } return { file: options.filename, diagnostics: diagnostics.messages, count: positions.length }; @@ -563,7 +576,11 @@ function inlineCopyOnly(options: InlineOptions) { } for (const locale of i18n.inlineLocales) { - const outputPath = path.join(options.outputPath, i18n.flatOutput ? '' : locale, options.filename); + const outputPath = path.join( + options.outputPath, + i18n.flatOutput ? '' : locale, + options.filename, + ); fs.writeFileSync(outputPath, options.code); if (options.map) { fs.writeFileSync(outputPath + '.map', options.map); @@ -588,7 +605,11 @@ function findLocalizePositions( traverse(ast, { CallExpression(path: NodePath) { const callee = path.get('callee'); - if (callee.isIdentifier() && callee.node.name === localizeName) { + if ( + callee.isIdentifier() && + callee.node.name === localizeName && + utils.isGlobalIdentifier(callee) + ) { const messageParts = utils.unwrapMessagePartsFromLocalizeCall(path); const expressions = utils.unwrapSubstitutionsFromLocalizeCall(path.node); positions.push({ diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index c49cb9db5bf8..207b16afed05 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -110,8 +110,10 @@ export default async function() { for (const { lang, translation } of langTranslations) { await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, translation); await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, translation); - await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, '$localize')); - await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, '$localize')); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, '$localize`')); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, '$localize`')); + await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, lang); + await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, lang); // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. const app = express(); diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts index 90c254be6117..03cc75a6c96c 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts @@ -110,8 +110,9 @@ export default async function() { await ng('build', '--i18n-missing-translation', 'error'); for (const { lang, translation } of langTranslations) { await expectFileToMatch(`${baseDir}/${lang}/main.js`, translation); - await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize')); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize`')); await expectFileNotToExist(`${baseDir}/${lang}/main-es5.js`); + await expectFileToMatch(`${baseDir}/${lang}/main.js`, lang); // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. const app = express(); diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts index d85a047f346d..67e0586dec4d 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts @@ -109,8 +109,9 @@ export default async function() { await ng('build', '--i18n-missing-translation', 'error'); for (const { lang, translation } of langTranslations) { await expectFileToMatch(`${baseDir}/${lang}/main.js`, translation); - await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize')); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize`')); await expectFileNotToExist(`${baseDir}/${lang}/main-es2015.js`); + await expectFileToMatch(`${baseDir}/${lang}/main.js`, lang); // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. const app = express(); From 294ecdd7f3ee8119698d1e0e5cc917b771d96b3e Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 21 Oct 2019 13:07:57 -0400 Subject: [PATCH 0366/1070] fix(@angular-devkit/build-angular): remove @angular/localize from application if localizing --- .../angular_devkit/build_angular/src/browser/empty.js | 1 + .../angular_devkit/build_angular/src/browser/index.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 packages/angular_devkit/build_angular/src/browser/empty.js diff --git a/packages/angular_devkit/build_angular/src/browser/empty.js b/packages/angular_devkit/build_angular/src/browser/empty.js new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/packages/angular_devkit/build_angular/src/browser/empty.js @@ -0,0 +1 @@ + diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 8ea03d8b3a5c..6c843d985ba1 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -221,6 +221,16 @@ async function initialize( host, ); + if (i18n.shouldInline) { + if (!config.resolve) { + config.resolve = {}; + } + if (!config.resolve.alias) { + config.resolve.alias = {}; + } + config.resolve.alias['@angular/localize/init'] = require.resolve('./empty.js'); + } + let transformedConfig; if (webpackConfigurationTransform) { transformedConfig = await webpackConfigurationTransform(config); From 276032c9628706c21259ec8ab47cd9be5874b9ec Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 22 Oct 2019 19:47:13 -0400 Subject: [PATCH 0367/1070] fix(@angular-devkit/build-angular): use project root as translation file base --- .../build_angular/src/browser/index.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 6c843d985ba1..8bc55bcc515e 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -168,6 +168,7 @@ async function initialize( const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); const usingIvy = tsConfig.options.enableIvy !== false; const metadata = await context.getProjectMetadata(context.target); + const projectRoot = path.join(context.workspaceRoot, (metadata.root as string) || ''); const i18n = createI18nOptions(metadata, options.localize); // Until 11.0, support deprecated i18n options when not using new localize option @@ -180,18 +181,18 @@ async function initialize( context.logger.warn(`Option 'localize' is not supported with View Engine.`); } - if (i18n.inlineLocales.size > 0) { + if (i18n.shouldInline) { // Load locales const loader = await createTranslationLoader(); const usedFormats = new Set(); for (const [locale, desc] of Object.entries(i18n.locales)) { if (i18n.inlineLocales.has(locale)) { - const result = loader(desc.file); + const result = loader(path.join(projectRoot, desc.file)); usedFormats.add(result.format); - if (usedFormats.size > 1) { - // This limitation is technically only for legacy message id support + if (usedFormats.size > 1 && tsConfig.options.enableI18nLegacyMessageIdFormat !== false) { + // This limitation is only for legacy message id support (defaults to true as of 9.0) throw new Error( 'Localization currently only supports using one type of translation file format for the entire application.', ); @@ -215,13 +216,14 @@ async function initialize( options.outputPath = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'angular-cli-')); } - const { config, projectRoot, projectSourceRoot } = await buildBrowserWebpackConfigFromContext( + const { config, projectSourceRoot } = await buildBrowserWebpackConfigFromContext( options, context, host, ); if (i18n.shouldInline) { + // Remove localize "polyfill" if (!config.resolve) { config.resolve = {}; } From bcf88764708f146a59af01b58043a53094d18570 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 24 Oct 2019 11:26:22 -0400 Subject: [PATCH 0368/1070] test: add debug helper package scripts --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 5bdde9b3e8a3..404b3e78a634 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,8 @@ "bazel:test": "bazel test //...", "build": "npm run admin -- build", "build-tsc": "tsc -p tsconfig.json", + "debug:test": "node --inspect-brk ./bin/devkit-admin test", + "debug:test-large": "node --inspect-brk ./bin/devkit-admin test --large --spec-reporter", "fix": "npm run admin -- lint --fix", "lint": "npm run admin -- lint", "templates": "node ./bin/devkit-admin templates", From e31d5d89b7d6da53dc8855e9f700cc901b8ac60c Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 22 Oct 2019 14:54:20 +0200 Subject: [PATCH 0369/1070] build: update bazel packages --- WORKSPACE | 21 ++- package.json | 9 +- packages/angular/cli/BUILD | 2 +- packages/angular/pwa/BUILD | 2 +- packages/angular_devkit/architect/BUILD | 2 +- packages/angular_devkit/architect_cli/BUILD | 2 +- packages/angular_devkit/benchmark/BUILD | 2 +- packages/angular_devkit/build_optimizer/BUILD | 2 +- packages/angular_devkit/core/BUILD | 2 +- packages/angular_devkit/schematics/BUILD | 2 +- packages/angular_devkit/schematics_cli/BUILD | 2 +- packages/schematics/angular/BUILD | 2 +- .../Microsoft/TypeScript/BUILD.bazel | 2 +- packages/schematics/schematics/BUILD | 2 +- packages/schematics/update/BUILD | 2 +- tests/angular_devkit/core/node/jobs/BUILD | 2 +- .../tools/file-system-engine-host/BUILD | 2 +- tools/build_event_protocol/BUILD | 3 +- tools/ts_json_schema.bzl | 2 +- yarn.lock | 168 +++++++++++++----- 20 files changed, 157 insertions(+), 76 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 2eba657cbb57..9a99b2246ed8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") http_archive( name = "build_bazel_rules_nodejs", - sha256 = "da217044d24abd16667324626a33581f3eaccabf80985b2688d6a08ed2f864be", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.37.1/rules_nodejs-0.37.1.tar.gz"], + sha256 = "ad4be2c6f40f5af70c7edf294955f9d9a0222c8e2756109731b25f79ea2ccea0", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.38.3/rules_nodejs-0.38.3.tar.gz"], ) # We use protocol buffers for the Build Event Protocol @@ -91,14 +91,19 @@ load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") install_bazel_dependencies() -load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace") +load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace") ts_setup_workspace() # Load karma dependencies -load("@npm_bazel_karma//:package.bzl", "rules_karma_dependencies") +load("@npm_bazel_karma//:package.bzl", "npm_bazel_karma_dependencies") -rules_karma_dependencies() +npm_bazel_karma_dependencies() + +# Load labs dependencies +load("@npm_bazel_labs//:package.bzl", "npm_bazel_labs_dependencies") + +npm_bazel_labs_dependencies() # Setup the rules_webtesting toolchain load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") @@ -111,9 +116,9 @@ web_test_repositories() # Bring in bazel_toolchains for RBE setup configuration. http_archive( name = "bazel_toolchains", - sha256 = "e08fa958f227ea2e41627b50d9b3f1df9bd3ef8dff5a2bcee3a19bc26bc36070", - strip_prefix = "bazel-toolchains-0.29.7", - url = "https://github.com/bazelbuild/bazel-toolchains/archive/0.29.7.tar.gz", + sha256 = "0b36eef8a66f39c8dbae88e522d5bbbef49d5e66e834a982402c79962281be10", + strip_prefix = "bazel-toolchains-1.0.1", + url = "https://github.com/bazelbuild/bazel-toolchains/archive/1.0.1.tar.gz", ) load("@bazel_toolchains//rules:environments.bzl", "clang_env") diff --git a/package.json b/package.json index 404b3e78a634..c0269e13797c 100644 --- a/package.json +++ b/package.json @@ -84,11 +84,12 @@ "devDependencies": { "@angular/compiler": "9.0.0-next.12", "@angular/compiler-cli": "9.0.0-next.12", - "@bazel/bazel": "0.29.0", + "@bazel/bazel": "1.0.0", "@bazel/buildifier": "0.29.0", - "@bazel/jasmine": "0.37.1", - "@bazel/karma": "0.37.1", - "@bazel/typescript": "0.37.1", + "@bazel/jasmine": "0.38.3", + "@bazel/karma": "0.38.3", + "@bazel/labs": "0.38.3", + "@bazel/typescript": "0.38.3", "@types/babel__core": "7.1.3", "@types/browserslist": "^4.4.0", "@types/caniuse-lite": "^1.0.0", diff --git a/packages/angular/cli/BUILD b/packages/angular/cli/BUILD index 337de03004b9..806b50bc4848 100644 --- a/packages/angular/cli/BUILD +++ b/packages/angular/cli/BUILD @@ -5,7 +5,7 @@ licenses(["notice"]) # MIT -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") load("//tools:ts_json_schema.bzl", "ts_json_schema") package(default_visibility = ["//visibility:public"]) diff --git a/packages/angular/pwa/BUILD b/packages/angular/pwa/BUILD index 62d5bb02bb1b..e82da86cfb9b 100644 --- a/packages/angular/pwa/BUILD +++ b/packages/angular/pwa/BUILD @@ -5,7 +5,7 @@ licenses(["notice"]) # MIT -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") load("//tools:ts_json_schema.bzl", "ts_json_schema") package(default_visibility = ["//visibility:public"]) diff --git a/packages/angular_devkit/architect/BUILD b/packages/angular_devkit/architect/BUILD index 2dbfbb17be58..bbddf7262c1f 100644 --- a/packages/angular_devkit/architect/BUILD +++ b/packages/angular_devkit/architect/BUILD @@ -5,7 +5,7 @@ licenses(["notice"]) # MIT -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") # @external_begin load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") diff --git a/packages/angular_devkit/architect_cli/BUILD b/packages/angular_devkit/architect_cli/BUILD index 9dfd78cf63c9..bec3a8a165a5 100644 --- a/packages/angular_devkit/architect_cli/BUILD +++ b/packages/angular_devkit/architect_cli/BUILD @@ -4,7 +4,7 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") licenses(["notice"]) # MIT diff --git a/packages/angular_devkit/benchmark/BUILD b/packages/angular_devkit/benchmark/BUILD index 423c6a642125..371652ff9db6 100644 --- a/packages/angular_devkit/benchmark/BUILD +++ b/packages/angular_devkit/benchmark/BUILD @@ -6,7 +6,7 @@ licenses(["notice"]) # MIT load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") package(default_visibility = ["//visibility:public"]) diff --git a/packages/angular_devkit/build_optimizer/BUILD b/packages/angular_devkit/build_optimizer/BUILD index ea3c70af6570..4ca6e641289e 100644 --- a/packages/angular_devkit/build_optimizer/BUILD +++ b/packages/angular_devkit/build_optimizer/BUILD @@ -6,7 +6,7 @@ licenses(["notice"]) # MIT load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") package(default_visibility = ["//visibility:public"]) diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index 9d57dad2b058..6644f6462e23 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"]) load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") # @external_begin load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index cbc9558c1990..b98fafa41b83 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"]) load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") # @external_begin load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") diff --git a/packages/angular_devkit/schematics_cli/BUILD b/packages/angular_devkit/schematics_cli/BUILD index e8f0f82c1c2f..929dcd6fe882 100644 --- a/packages/angular_devkit/schematics_cli/BUILD +++ b/packages/angular_devkit/schematics_cli/BUILD @@ -4,7 +4,7 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") licenses(["notice"]) diff --git a/packages/schematics/angular/BUILD b/packages/schematics/angular/BUILD index cfacc05a342f..f32188057d79 100644 --- a/packages/schematics/angular/BUILD +++ b/packages/schematics/angular/BUILD @@ -6,7 +6,7 @@ licenses(["notice"]) # MIT load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") load("//tools:ts_json_schema.bzl", "ts_json_schema") package(default_visibility = ["//visibility:public"]) diff --git a/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/BUILD.bazel b/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/BUILD.bazel index 3f9d7546d25f..ec38eb552b27 100644 --- a/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/BUILD.bazel +++ b/packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/BUILD.bazel @@ -1,4 +1,4 @@ -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") # files fetched on 2019-03-05 from # https://github.com/Microsoft/TypeScript/tree/v3.3.3333 diff --git a/packages/schematics/schematics/BUILD b/packages/schematics/schematics/BUILD index 2534b7fbcb9c..ca27c69e7496 100644 --- a/packages/schematics/schematics/BUILD +++ b/packages/schematics/schematics/BUILD @@ -5,7 +5,7 @@ licenses(["notice"]) # MIT -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") load("//tools:ts_json_schema.bzl", "ts_json_schema") package(default_visibility = ["//visibility:public"]) diff --git a/packages/schematics/update/BUILD b/packages/schematics/update/BUILD index 25f87339837e..8dd76ea86f9d 100644 --- a/packages/schematics/update/BUILD +++ b/packages/schematics/update/BUILD @@ -6,7 +6,7 @@ licenses(["notice"]) # MIT load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") load("//tools:ts_json_schema.bzl", "ts_json_schema") package(default_visibility = ["//visibility:public"]) diff --git a/tests/angular_devkit/core/node/jobs/BUILD b/tests/angular_devkit/core/node/jobs/BUILD index ae5ad1495ef9..5afa48e14d90 100644 --- a/tests/angular_devkit/core/node/jobs/BUILD +++ b/tests/angular_devkit/core/node/jobs/BUILD @@ -4,7 +4,7 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") licenses(["notice"]) # MIT License diff --git a/tests/angular_devkit/schematics/tools/file-system-engine-host/BUILD b/tests/angular_devkit/schematics/tools/file-system-engine-host/BUILD index 3a8d30e24538..a21f8771bd48 100644 --- a/tests/angular_devkit/schematics/tools/file-system-engine-host/BUILD +++ b/tests/angular_devkit/schematics/tools/file-system-engine-host/BUILD @@ -4,7 +4,7 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") licenses(["notice"]) # MIT License diff --git a/tools/build_event_protocol/BUILD b/tools/build_event_protocol/BUILD index aabf6d4b91f1..e0984ab762a9 100644 --- a/tools/build_event_protocol/BUILD +++ b/tools/build_event_protocol/BUILD @@ -2,7 +2,8 @@ # # Use of this source code is governed by an MIT-style license that can be # found in the LICENSE file at https://angular.io/license -load("@npm_bazel_typescript//:defs.bzl", "ts_library", "ts_proto_library") +load("@npm_bazel_labs//:index.bzl", "ts_proto_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") ts_proto_library( diff --git a/tools/ts_json_schema.bzl b/tools/ts_json_schema.bzl index 5cb9483aaa1f..b74d27f12a6f 100644 --- a/tools/ts_json_schema.bzl +++ b/tools/ts_json_schema.bzl @@ -3,7 +3,7 @@ # Use of this source code is governed by an MIT-style license that can be # found in the LICENSE file at https://angular.io/license -load("@npm_bazel_typescript//:defs.bzl", "ts_library") +load("@npm_bazel_typescript//:index.bzl", "ts_library") # @external_begin def _ts_json_schema_interface_impl(ctx): diff --git a/yarn.lock b/yarn.lock index 416990dcd5a4..c29a1ae5c66e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -738,31 +738,31 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@bazel/bazel-darwin_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.29.0.tgz#d2ebcb95bc66031b0545dd8b0e597b3aa5b9024b" - integrity sha512-q6snNakVA3wzv3VIuFlsw3/xcB/ygsAMhkigsuZXv1yHmwnuBOI4UJ2r2+Ttc4HPHflS0aWuI/raHDq81vBYKw== +"@bazel/bazel-darwin_x64@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-1.0.0.tgz#8ab7ecba867130d87e3ecd6cfd5757e59ea274ab" + integrity sha512-2J8qPpUAhSsuZ1P0kMFLvAQUz8zB8mkKmGL3/8raXUnw9TblsykwAdeg3QlJwTLORn+ZqdAjOYEQIarnTpS1NA== -"@bazel/bazel-linux_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.29.0.tgz#95250ad8463425bec81a95736056f432c186cb9d" - integrity sha512-QxWdtlsFKMi3SJ++osjA8QQbWOlGZXU0/TtUTiswsRwWdOEwZhOa2c1ljIQY5QBgzc3CCh2clRnkjWQj0/V/Dw== +"@bazel/bazel-linux_x64@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-1.0.0.tgz#7043cc41eaf7b1d2618766e0759d513873bb9659" + integrity sha512-/ZpOrYyDNGqUyAGPHFr4Y1kn8xCG1G4Lg2VMZtfCZzDohzoYFYs8iyQGU2/8PwldH8XX+oJT9atWqSt1EyoeAw== -"@bazel/bazel-win32_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.29.0.tgz#62af30d4ccf0a31e656a6ac9337e928d29a4598d" - integrity sha512-r0DhNarJrzzcXrvRbey43hGVO4J2QBAS43VrgjrxVw+1kyjKkIOQIh3wKr/OKx2jKOX0y3hCrLpL/aivHqub4g== +"@bazel/bazel-win32_x64@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-1.0.0.tgz#1111e4910c155a1917162ae96fd3737d062d20dd" + integrity sha512-p5LpQ/WiijwOS+eBkdD7UewHL8JwK+8gpb4tIKqgh/a2yawgzEQPJDPBUV9ykss5t+s85BL2kEMhduuDewt/MA== -"@bazel/bazel@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.29.0.tgz#bf4ecf47d6e67e8df8d342d24c146bd732d78640" - integrity sha512-OBxPv+V73PtADVG4qsGJ7Zj0wJrJorRbHgYE8qsRBNKls6e6rf0jkjSIQvAvP1Dyt7x4MGyhIzzK/5IsPeQZIA== +"@bazel/bazel@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-1.0.0.tgz#7c6e306d8ced3a6e087f041861364ef742560342" + integrity sha512-bxNjlieM1HwgIgqx+AqtNeUA6bvqIQ0X5YysWuCCtT24Dd+wTs6fRSx1KGOA1NiRBrg+kpk7ebitOU8yaM+tiA== dependencies: "@bazel/hide-bazel-files" latest optionalDependencies: - "@bazel/bazel-darwin_x64" "0.29.0" - "@bazel/bazel-linux_x64" "0.29.0" - "@bazel/bazel-win32_x64" "0.29.0" + "@bazel/bazel-darwin_x64" "1.0.0" + "@bazel/bazel-linux_x64" "1.0.0" + "@bazel/bazel-win32_x64" "1.0.0" "@bazel/buildifier-darwin_x64@0.29.0": version "0.29.0" @@ -793,22 +793,22 @@ resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.3.tgz#e98231d3d360d51860d9c1a7c3345b40dab4cf81" integrity sha512-o+dNkfDm3qxWQ8h/04cWuTcjR7qnjZi3pQGv4aklVb16oPWx2jF8BzbkwvWuIkdbOl9VnqYP0vaHzwQVJRRcIA== -"@bazel/jasmine@0.37.1": - version "0.37.1" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.37.1.tgz#e5111f4f913b542cbfad767e0f903be026246c5a" - integrity sha512-EQJ2bbmF3w+BeoCMEDY8mKd5lrVuZ4tEc1wqth4Jl2UIYwyEepDAKVMiEeM+seXxmzqle38ksdsf7uSUWMjthA== +"@bazel/jasmine@0.38.3": + version "0.38.3" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.38.3.tgz#f010f0555acd1d363eca9fc90865704fcf510d3f" + integrity sha512-wTD+EoNUvOfLNmicLa7g/09gFHEpJE3A6xhz/UMF2KowCg+yBfzKGa2bSuqIMhwoDH0EpIOWZg2lmiBqz/w9/Q== dependencies: jasmine "~3.4.0" jasmine-core "~3.4.0" v8-coverage "1.0.9" -"@bazel/karma@0.37.1": - version "0.37.1" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.37.1.tgz#1c2ba937f8a2a442a629d4edd5219c3623192b12" - integrity sha512-LwcvQkZJvlSWf7jvZY48GG1PJFINDrKHp59hupK8tTWN726sAAoQzQUp8ZO0e/pHKGcl4X6AvqWw3+MvXsGS7Q== +"@bazel/karma@0.38.3": + version "0.38.3" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.38.3.tgz#4db94a2227d7e8863505dfcfe9de81a2cb1f7d0b" + integrity sha512-5ywjZsigJpdG4wr1iy2UNkfEgQcBvRjHoVfUQqLF1Dp0uBdqG7Qq2quu0Zypd/UodbvTye1pHWQ+Lq7cEz6JWg== dependencies: jasmine-core "2.8.0" - karma "^4.0.0" + karma "~4.1.0" karma-chrome-launcher "2.2.0" karma-firefox-launcher "1.1.0" karma-jasmine "2.0.1" @@ -819,10 +819,17 @@ semver "5.6.0" tmp "0.0.33" -"@bazel/typescript@0.37.1": - version "0.37.1" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.37.1.tgz#e740f311597dc0ed9d479ae7a88ea35cb2411e34" - integrity sha512-RrZ6rYZTQz0tSwGIGoKykNkhpu8xY3IOAzLA3cmtpNa0pCGEb+PpFBlh//wjcnP8jLg5vK2Qa6jh3SZ2pcYZbg== +"@bazel/labs@0.38.3": + version "0.38.3" + resolved "https://registry.yarnpkg.com/@bazel/labs/-/labs-0.38.3.tgz#2982249f6c1a7dc079d1a2d70da7ad287cbc70c2" + integrity sha512-yTMkFUSGUfIAxKopE1NmWt5B1Ri+lU8orGbaq/3QE+Pzf9rX07gZ4PjPgkxoeJEGnFN6ViOyadX/hzujoEHPwg== + dependencies: + webpack "~4.29.3" + +"@bazel/typescript@0.38.3": + version "0.38.3" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.38.3.tgz#0e452413ca81fc9429404ceabf60ebfb4f13474a" + integrity sha512-sFPYNDEE5h/k+Arop3q8XWaqoTwSy0IUS0a/YSeLhR/yz7pNmOltjPyeseLmo004BhgH7X4X+LjUQjcgv7lpXw== dependencies: protobufjs "6.8.8" semver "5.6.0" @@ -1639,6 +1646,11 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +acorn-dynamic-import@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" + integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== + acorn-globals@^4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" @@ -1657,7 +1669,7 @@ acorn@^5.0.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.1.1, acorn@^6.2.1: +acorn@^6.0.1, acorn@^6.0.5, acorn@^6.1.1, acorn@^6.2.1: version "6.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== @@ -2680,7 +2692,7 @@ chardet@^0.7.0: optionalDependencies: fsevents "~2.1.1" -chokidar@^2.0.2, chokidar@^2.1.1, chokidar@^2.1.8: +chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.1.1, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== @@ -2704,7 +2716,7 @@ chownr@^1.1.1, chownr@^1.1.2: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== -chrome-trace-event@^1.0.2: +chrome-trace-event@^1.0.0, chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== @@ -3257,7 +3269,7 @@ core-js@3.3.3: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.3.tgz#b7048d3c6c1a52b5fe55a729c1d4ccdffe0891bb" integrity sha512-0xmD4vUJRY8nfLyV9zcpC17FtSie5STXzw+HyYw2t8IIvmDnbq7RJUULECCo+NstpJtwK9kx8S+898iyqgeUow== -core-js@^2.4.0: +core-js@^2.2.0, core-js@^2.4.0: version "2.6.10" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== @@ -4069,7 +4081,7 @@ escodegen@~1.9.0: optionalDependencies: source-map "~0.6.1" -eslint-scope@^4.0.3: +eslint-scope@^4.0.0, eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== @@ -6193,7 +6205,40 @@ karma-sourcemap-loader@0.3.7: dependencies: graceful-fs "^4.1.2" -karma@^4.0.0, karma@~4.4.0: +karma@~4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/karma/-/karma-4.1.0.tgz#d07387c9743a575b40faf73e8a3eb5421c2193e1" + integrity sha512-xckiDqyNi512U4dXGOOSyLKPwek6X/vUizSy2f3geYevbLj+UIdvNwbn7IwfUIL2g1GXEPWt/87qFD1fBbl/Uw== + dependencies: + bluebird "^3.3.0" + body-parser "^1.16.1" + braces "^2.3.2" + chokidar "^2.0.3" + colors "^1.1.0" + connect "^3.6.0" + core-js "^2.2.0" + di "^0.0.1" + dom-serialize "^2.2.0" + flatted "^2.0.0" + glob "^7.1.1" + graceful-fs "^4.1.2" + http-proxy "^1.13.0" + isbinaryfile "^3.0.0" + lodash "^4.17.11" + log4js "^4.0.0" + mime "^2.3.1" + minimatch "^3.0.2" + optimist "^0.6.1" + qjobs "^1.1.4" + range-parser "^1.2.0" + rimraf "^2.6.0" + safe-buffer "^5.0.1" + socket.io "2.1.1" + source-map "^0.6.1" + tmp "0.0.33" + useragent "2.3.0" + +karma@~4.4.0: version "4.4.1" resolved "https://registry.yarnpkg.com/karma/-/karma-4.4.1.tgz#6d9aaab037a31136dc074002620ee11e8c2e32ab" integrity sha512-L5SIaXEYqzrh6b1wqYC42tNsFMx2PWuxky84pK9coK09MvmL7mxii3G3bZBh/0rvD27lqDd0le9jyhzvwif73A== @@ -6466,7 +6511,7 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -loader-runner@^2.4.0: +loader-runner@^2.3.0, loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== @@ -6806,7 +6851,7 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memory-fs@^0.4.1: +memory-fs@^0.4.1, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= @@ -6875,7 +6920,7 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -7056,7 +7101,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1, mkdirp@~0.5.x: +mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1, mkdirp@~0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -7240,7 +7285,7 @@ node-gyp-build@~4.1.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb" integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== -node-libs-browser@^2.2.1: +node-libs-browser@^2.0.0, node-libs-browser@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== @@ -9110,7 +9155,6 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" - uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: @@ -10036,7 +10080,7 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -tapable@^1.0.0, tapable@^1.1.3: +tapable@^1.0.0, tapable@^1.1.0, tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== @@ -10082,7 +10126,7 @@ terser-webpack-plugin@2.1.3: terser "^4.3.8" webpack-sources "^1.4.3" -terser-webpack-plugin@^1.4.1: +terser-webpack-plugin@^1.1.0, terser-webpack-plugin@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz#61b18e40eaee5be97e771cdbb10ed1280888c2b4" integrity sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg== @@ -10820,7 +10864,7 @@ w3c-xmlserializer@^1.1.2: webidl-conversions "^4.0.2" xml-name-validator "^3.0.0" -watchpack@^1.6.0: +watchpack@^1.5.0, watchpack@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" integrity sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== @@ -11014,6 +11058,36 @@ webpack@4.41.2: watchpack "^1.6.0" webpack-sources "^1.4.1" +webpack@~4.29.3: + version "4.29.6" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.29.6.tgz#66bf0ec8beee4d469f8b598d3988ff9d8d90e955" + integrity sha512-MwBwpiE1BQpMDkbnUUaW6K8RFZjljJHArC6tWQJoFm0oQtfoSebtg4Y7/QHnJ/SddtjYLHaKGX64CFjG5rehJw== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-module-context" "1.8.5" + "@webassemblyjs/wasm-edit" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + acorn "^6.0.5" + acorn-dynamic-import "^4.0.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + chrome-trace-event "^1.0.0" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.0" + json-parse-better-errors "^1.0.2" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + micromatch "^3.1.8" + mkdirp "~0.5.0" + neo-async "^2.5.0" + node-libs-browser "^2.0.0" + schema-utils "^1.0.0" + tapable "^1.1.0" + terser-webpack-plugin "^1.1.0" + watchpack "^1.5.0" + webpack-sources "^1.3.0" + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" From fe5bba54a5d833aee301ff4add2bc25a03b51104 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 23 Oct 2019 17:28:28 -0700 Subject: [PATCH 0370/1070] build: should use data for fine grained npm dependencies in nodejs_binary --- tools/BUILD | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/BUILD b/tools/BUILD index c6d0d401985f..56865b097dbc 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -11,15 +11,10 @@ nodejs_binary( name = "quicktype_runner", data = [ "quicktype_runner.js", + "@npm//quicktype-core", ], entry_point = "quicktype_runner.js", install_source_map_support = False, - node_modules = "@npm//quicktype-core", - templated_args = [ - # Needed so that node doesn't walk back to the source directory. - # From there, the relative imports would point to .ts files. - "--node_options=--preserve-symlinks", - ], ) platform( From 9fc7cc256a01e150ff536e69c264f39a64db0bea Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 23 Oct 2019 17:33:47 -0700 Subject: [PATCH 0371/1070] build: update to nodejs rules 0.39.0 This fixes the @bazel/labs dep on webpack. It is not a peerDependency of that package. --- WORKSPACE | 4 +-- package.json | 8 ++--- yarn.lock | 91 ++++++++++++++++------------------------------------ 3 files changed, 33 insertions(+), 70 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 9a99b2246ed8..c65cea246ef2 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") http_archive( name = "build_bazel_rules_nodejs", - sha256 = "ad4be2c6f40f5af70c7edf294955f9d9a0222c8e2756109731b25f79ea2ccea0", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.38.3/rules_nodejs-0.38.3.tar.gz"], + sha256 = "26c39450ce2d825abee5583a43733863098ed29d3cbaebf084ebaca59a21a1c8", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.39.0/rules_nodejs-0.39.0.tar.gz"], ) # We use protocol buffers for the Build Event Protocol diff --git a/package.json b/package.json index c0269e13797c..64e82b8cc9a1 100644 --- a/package.json +++ b/package.json @@ -86,10 +86,10 @@ "@angular/compiler-cli": "9.0.0-next.12", "@bazel/bazel": "1.0.0", "@bazel/buildifier": "0.29.0", - "@bazel/jasmine": "0.38.3", - "@bazel/karma": "0.38.3", - "@bazel/labs": "0.38.3", - "@bazel/typescript": "0.38.3", + "@bazel/jasmine": "0.39.0", + "@bazel/karma": "0.39.0", + "@bazel/labs": "0.39.0", + "@bazel/typescript": "0.39.0", "@types/babel__core": "7.1.3", "@types/browserslist": "^4.4.0", "@types/caniuse-lite": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index c29a1ae5c66e..79432bab2ed9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -793,19 +793,19 @@ resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.3.tgz#e98231d3d360d51860d9c1a7c3345b40dab4cf81" integrity sha512-o+dNkfDm3qxWQ8h/04cWuTcjR7qnjZi3pQGv4aklVb16oPWx2jF8BzbkwvWuIkdbOl9VnqYP0vaHzwQVJRRcIA== -"@bazel/jasmine@0.38.3": - version "0.38.3" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.38.3.tgz#f010f0555acd1d363eca9fc90865704fcf510d3f" - integrity sha512-wTD+EoNUvOfLNmicLa7g/09gFHEpJE3A6xhz/UMF2KowCg+yBfzKGa2bSuqIMhwoDH0EpIOWZg2lmiBqz/w9/Q== +"@bazel/jasmine@0.39.0": + version "0.39.0" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.39.0.tgz#a567ceabd6caf3e8b14b92d4c28a2535f3a13dd7" + integrity sha512-wGEsXtS8NmnOObbouEKDj1awgpbrg/e+K1LKLaX6zhn37gozUfc+LZdgWhMiY3hLVm22ofdz8qhjIe9nz7uN7w== dependencies: jasmine "~3.4.0" jasmine-core "~3.4.0" v8-coverage "1.0.9" -"@bazel/karma@0.38.3": - version "0.38.3" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.38.3.tgz#4db94a2227d7e8863505dfcfe9de81a2cb1f7d0b" - integrity sha512-5ywjZsigJpdG4wr1iy2UNkfEgQcBvRjHoVfUQqLF1Dp0uBdqG7Qq2quu0Zypd/UodbvTye1pHWQ+Lq7cEz6JWg== +"@bazel/karma@0.39.0": + version "0.39.0" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.39.0.tgz#1e37cf8364f0be0967b9d93f32659ebcb2015e6d" + integrity sha512-tbVl4hZhKm4z99GolgvkZNzcK3Th5XpfCIoC2Ygn+WLD+Z5cKEyFp5F/ga2MY1QVPtChY6EKFWkFvxTIxwehFg== dependencies: jasmine-core "2.8.0" karma "~4.1.0" @@ -819,17 +819,15 @@ semver "5.6.0" tmp "0.0.33" -"@bazel/labs@0.38.3": - version "0.38.3" - resolved "https://registry.yarnpkg.com/@bazel/labs/-/labs-0.38.3.tgz#2982249f6c1a7dc079d1a2d70da7ad287cbc70c2" - integrity sha512-yTMkFUSGUfIAxKopE1NmWt5B1Ri+lU8orGbaq/3QE+Pzf9rX07gZ4PjPgkxoeJEGnFN6ViOyadX/hzujoEHPwg== - dependencies: - webpack "~4.29.3" +"@bazel/labs@0.39.0": + version "0.39.0" + resolved "https://registry.yarnpkg.com/@bazel/labs/-/labs-0.39.0.tgz#b39688cf5e1db23a6bc26b45c17111c02b914a50" + integrity sha512-7HUozbC4llNi790b7koJwZWBCI84Gkwa0Bra3Fxkg9w/TWbkUf3tAJFqZTzeo1mEOjuwqUQ04GKtFKLzKIPg5A== -"@bazel/typescript@0.38.3": - version "0.38.3" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.38.3.tgz#0e452413ca81fc9429404ceabf60ebfb4f13474a" - integrity sha512-sFPYNDEE5h/k+Arop3q8XWaqoTwSy0IUS0a/YSeLhR/yz7pNmOltjPyeseLmo004BhgH7X4X+LjUQjcgv7lpXw== +"@bazel/typescript@0.39.0": + version "0.39.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-0.39.0.tgz#9e4feef3038c94419b15fbe88eef467f0f076056" + integrity sha512-CVzfPXNKVSlxKEo8RyEAGSLf8UHJwpkcNy+Yntpr+TlxLDgMEiXRRoqSf6r3woTbsDDiNW9o6//BK1z+sZYR/Q== dependencies: protobufjs "6.8.8" semver "5.6.0" @@ -1646,11 +1644,6 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-dynamic-import@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" - integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== - acorn-globals@^4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" @@ -1669,7 +1662,7 @@ acorn@^5.0.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.0.5, acorn@^6.1.1, acorn@^6.2.1: +acorn@^6.0.1, acorn@^6.1.1, acorn@^6.2.1: version "6.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== @@ -2716,7 +2709,7 @@ chownr@^1.1.1, chownr@^1.1.2: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== -chrome-trace-event@^1.0.0, chrome-trace-event@^1.0.2: +chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== @@ -4081,7 +4074,7 @@ escodegen@~1.9.0: optionalDependencies: source-map "~0.6.1" -eslint-scope@^4.0.0, eslint-scope@^4.0.3: +eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== @@ -6511,7 +6504,7 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -loader-runner@^2.3.0, loader-runner@^2.4.0: +loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== @@ -6851,7 +6844,7 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memory-fs@^0.4.1, memory-fs@~0.4.1: +memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= @@ -6920,7 +6913,7 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -7101,7 +7094,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1, mkdirp@~0.5.x: +mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1, mkdirp@~0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -7285,7 +7278,7 @@ node-gyp-build@~4.1.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb" integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== -node-libs-browser@^2.0.0, node-libs-browser@^2.2.1: +node-libs-browser@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== @@ -10080,7 +10073,7 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -tapable@^1.0.0, tapable@^1.1.0, tapable@^1.1.3: +tapable@^1.0.0, tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== @@ -10126,7 +10119,7 @@ terser-webpack-plugin@2.1.3: terser "^4.3.8" webpack-sources "^1.4.3" -terser-webpack-plugin@^1.1.0, terser-webpack-plugin@^1.4.1: +terser-webpack-plugin@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz#61b18e40eaee5be97e771cdbb10ed1280888c2b4" integrity sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg== @@ -10864,7 +10857,7 @@ w3c-xmlserializer@^1.1.2: webidl-conversions "^4.0.2" xml-name-validator "^3.0.0" -watchpack@^1.5.0, watchpack@^1.6.0: +watchpack@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" integrity sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== @@ -11058,36 +11051,6 @@ webpack@4.41.2: watchpack "^1.6.0" webpack-sources "^1.4.1" -webpack@~4.29.3: - version "4.29.6" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.29.6.tgz#66bf0ec8beee4d469f8b598d3988ff9d8d90e955" - integrity sha512-MwBwpiE1BQpMDkbnUUaW6K8RFZjljJHArC6tWQJoFm0oQtfoSebtg4Y7/QHnJ/SddtjYLHaKGX64CFjG5rehJw== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-module-context" "1.8.5" - "@webassemblyjs/wasm-edit" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - acorn "^6.0.5" - acorn-dynamic-import "^4.0.0" - ajv "^6.1.0" - ajv-keywords "^3.1.0" - chrome-trace-event "^1.0.0" - enhanced-resolve "^4.1.0" - eslint-scope "^4.0.0" - json-parse-better-errors "^1.0.2" - loader-runner "^2.3.0" - loader-utils "^1.1.0" - memory-fs "~0.4.1" - micromatch "^3.1.8" - mkdirp "~0.5.0" - neo-async "^2.5.0" - node-libs-browser "^2.0.0" - schema-utils "^1.0.0" - tapable "^1.1.0" - terser-webpack-plugin "^1.1.0" - watchpack "^1.5.0" - webpack-sources "^1.3.0" - websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" From 44de74a5e35ef8cd81377c8557368b8e4f91fa8b Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 23 Oct 2019 21:32:21 -0700 Subject: [PATCH 0372/1070] build: back to bazel 0.29.0 --- package.json | 2 +- yarn.lock | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 64e82b8cc9a1..072e7fef1c4e 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "devDependencies": { "@angular/compiler": "9.0.0-next.12", "@angular/compiler-cli": "9.0.0-next.12", - "@bazel/bazel": "1.0.0", + "@bazel/bazel": "0.29.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.39.0", "@bazel/karma": "0.39.0", diff --git a/yarn.lock b/yarn.lock index 79432bab2ed9..014bfd0794f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -738,31 +738,31 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@bazel/bazel-darwin_x64@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-1.0.0.tgz#8ab7ecba867130d87e3ecd6cfd5757e59ea274ab" - integrity sha512-2J8qPpUAhSsuZ1P0kMFLvAQUz8zB8mkKmGL3/8raXUnw9TblsykwAdeg3QlJwTLORn+ZqdAjOYEQIarnTpS1NA== +"@bazel/bazel-darwin_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.29.0.tgz#d2ebcb95bc66031b0545dd8b0e597b3aa5b9024b" + integrity sha512-q6snNakVA3wzv3VIuFlsw3/xcB/ygsAMhkigsuZXv1yHmwnuBOI4UJ2r2+Ttc4HPHflS0aWuI/raHDq81vBYKw== -"@bazel/bazel-linux_x64@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-1.0.0.tgz#7043cc41eaf7b1d2618766e0759d513873bb9659" - integrity sha512-/ZpOrYyDNGqUyAGPHFr4Y1kn8xCG1G4Lg2VMZtfCZzDohzoYFYs8iyQGU2/8PwldH8XX+oJT9atWqSt1EyoeAw== +"@bazel/bazel-linux_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.29.0.tgz#95250ad8463425bec81a95736056f432c186cb9d" + integrity sha512-QxWdtlsFKMi3SJ++osjA8QQbWOlGZXU0/TtUTiswsRwWdOEwZhOa2c1ljIQY5QBgzc3CCh2clRnkjWQj0/V/Dw== -"@bazel/bazel-win32_x64@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-1.0.0.tgz#1111e4910c155a1917162ae96fd3737d062d20dd" - integrity sha512-p5LpQ/WiijwOS+eBkdD7UewHL8JwK+8gpb4tIKqgh/a2yawgzEQPJDPBUV9ykss5t+s85BL2kEMhduuDewt/MA== +"@bazel/bazel-win32_x64@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.29.0.tgz#62af30d4ccf0a31e656a6ac9337e928d29a4598d" + integrity sha512-r0DhNarJrzzcXrvRbey43hGVO4J2QBAS43VrgjrxVw+1kyjKkIOQIh3wKr/OKx2jKOX0y3hCrLpL/aivHqub4g== -"@bazel/bazel@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-1.0.0.tgz#7c6e306d8ced3a6e087f041861364ef742560342" - integrity sha512-bxNjlieM1HwgIgqx+AqtNeUA6bvqIQ0X5YysWuCCtT24Dd+wTs6fRSx1KGOA1NiRBrg+kpk7ebitOU8yaM+tiA== +"@bazel/bazel@0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.29.0.tgz#bf4ecf47d6e67e8df8d342d24c146bd732d78640" + integrity sha512-OBxPv+V73PtADVG4qsGJ7Zj0wJrJorRbHgYE8qsRBNKls6e6rf0jkjSIQvAvP1Dyt7x4MGyhIzzK/5IsPeQZIA== dependencies: "@bazel/hide-bazel-files" latest optionalDependencies: - "@bazel/bazel-darwin_x64" "1.0.0" - "@bazel/bazel-linux_x64" "1.0.0" - "@bazel/bazel-win32_x64" "1.0.0" + "@bazel/bazel-darwin_x64" "0.29.0" + "@bazel/bazel-linux_x64" "0.29.0" + "@bazel/bazel-win32_x64" "0.29.0" "@bazel/buildifier-darwin_x64@0.29.0": version "0.29.0" From 8118ab5e955338fedee9cdeed45cddf2c0e107b2 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 24 Oct 2019 12:13:28 +0200 Subject: [PATCH 0373/1070] build: remove `build:remote --spawn_strategy=remote` from .bazelrc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems that with Bazel 1.0.0 setting `--incompatible_list_based_execution_strategy_selection=false` no longer works around the issue with npm_package that it did when it was added. The error that was originally observed has returned after updating to Bazel 1.0.0: ``` ERROR: /home/circleci/ng/packages/angular_devkit/build_optimizer/BUILD:66:1: Assembling npm package packages/angular_devkit/build_optimizer/npm_package failed: No usable spawn strategy found for spawn with mnemonic Action. Your --spawn_strategy, --genrule_strategy or --strategy flags are probably too strict. Visit bazelbuild/bazel#7480 for migration advice ``` This commit removes both `—incompatible_list_based_execution_strategy_selection=false` as well as `build:remote --spawn_strategy=remote` which means that Bazel will do the default behavior of picking the first available strategy from the default list, which is `remote,worker,sandboxed,local`. See bazelbuild/bazel#7480 for more details. --- .bazelrc | 39 +++++---------------------------------- package.json | 2 +- yarn.lock | 38 +++++++++++++++++++------------------- 3 files changed, 25 insertions(+), 54 deletions(-) diff --git a/.bazelrc b/.bazelrc index 4d6ac000b3fc..0704eeca0a66 100644 --- a/.bazelrc +++ b/.bazelrc @@ -88,19 +88,15 @@ test --test_output=errors # Remote Execution Setup # ################################ - # Use the Angular team internal GCP instance for remote execution. +# Use the Angular team internal GCP instance for remote execution. build:remote --remote_instance_name=projects/internal-200822/instances/default_instance build:remote --project_id=internal-200822 - # Setup the build strategy for various types of actions. Mixing "local" and "remote" -# can cause unexpected results and we want to run everything remotely if possible. -build:remote --spawn_strategy=remote -build:remote --strategy=Javac=remote -build:remote --strategy=Closure=remote -build:remote --strategy=Genrule=remote +# Starting with Bazel 0.27.0 strategies do not need to be explicitly +# defined. See https://github.com/bazelbuild/bazel/issues/7480 build:remote --define=EXECUTOR=remote - # Setup the remote build execution servers. +# Setup the remote build execution servers. build:remote --remote_cache=remotebuildexecution.googleapis.com build:remote --remote_executor=remotebuildexecution.googleapis.com build:remote --tls_enabled=true @@ -138,31 +134,6 @@ build:remote --remote_accept_cached=true # This allows us to avoid installing a second copy of node_modules common --experimental_allow_incremental_repository_updates -# This option is changed to true in Bazel 0.27 and exposes a possible -# regression in Bazel 0.27.0. -# Error observed is in npm_package target `//packages/common/locales:package`: -# ``` -# ERROR: /home/circleci/ng/packages/common/locales/BUILD.bazel:13:1: Assembling -# npm package packages/common/locales/package failed: No usable spawn strategy found -# for spawn with mnemonic SkylarkAction. Your --spawn_strategy or --strategy flags -# are probably too strict. Visit https://github.com/bazelbuild/bazel/issues/7480 for -# migration advises -# ``` -# Suspect is https://github.com/bazelbuild/rules_nodejs/blob/master/internal/npm_package/npm_package.bzl#L75-L82: -# ``` -# execution_requirements = { -# # Never schedule this action remotely because it's not computationally expensive. -# # It just copies files into a directory; it's not worth copying inputs and outputs to a remote worker. -# # Also don't run it in a sandbox, because it resolves an absolute path to the bazel-out directory -# # allowing the .pack and .publish runnables to work with no symlink_prefix -# # See https://github.com/bazelbuild/rules_nodejs/issues/187 -# "local": "1", -# }, -# ``` -build --incompatible_list_based_execution_strategy_selection=false -test --incompatible_list_based_execution_strategy_selection=false -run --incompatible_list_based_execution_strategy_selection=false - #################################################### # User bazel configuration # NOTE: This needs to be the *last* entry in the config. @@ -170,4 +141,4 @@ run --incompatible_list_based_execution_strategy_selection=false # Load any settings which are specific to the current user. Needs to be *last* statement # in this config, as the user configuration should be able to overwrite flags from this file. -try-import .bazelrc.user +try-import .bazelrc.user \ No newline at end of file diff --git a/package.json b/package.json index 072e7fef1c4e..64e82b8cc9a1 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "devDependencies": { "@angular/compiler": "9.0.0-next.12", "@angular/compiler-cli": "9.0.0-next.12", - "@bazel/bazel": "0.29.0", + "@bazel/bazel": "1.0.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.39.0", "@bazel/karma": "0.39.0", diff --git a/yarn.lock b/yarn.lock index 014bfd0794f4..79432bab2ed9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -738,31 +738,31 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@bazel/bazel-darwin_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.29.0.tgz#d2ebcb95bc66031b0545dd8b0e597b3aa5b9024b" - integrity sha512-q6snNakVA3wzv3VIuFlsw3/xcB/ygsAMhkigsuZXv1yHmwnuBOI4UJ2r2+Ttc4HPHflS0aWuI/raHDq81vBYKw== +"@bazel/bazel-darwin_x64@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-1.0.0.tgz#8ab7ecba867130d87e3ecd6cfd5757e59ea274ab" + integrity sha512-2J8qPpUAhSsuZ1P0kMFLvAQUz8zB8mkKmGL3/8raXUnw9TblsykwAdeg3QlJwTLORn+ZqdAjOYEQIarnTpS1NA== -"@bazel/bazel-linux_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.29.0.tgz#95250ad8463425bec81a95736056f432c186cb9d" - integrity sha512-QxWdtlsFKMi3SJ++osjA8QQbWOlGZXU0/TtUTiswsRwWdOEwZhOa2c1ljIQY5QBgzc3CCh2clRnkjWQj0/V/Dw== +"@bazel/bazel-linux_x64@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-1.0.0.tgz#7043cc41eaf7b1d2618766e0759d513873bb9659" + integrity sha512-/ZpOrYyDNGqUyAGPHFr4Y1kn8xCG1G4Lg2VMZtfCZzDohzoYFYs8iyQGU2/8PwldH8XX+oJT9atWqSt1EyoeAw== -"@bazel/bazel-win32_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.29.0.tgz#62af30d4ccf0a31e656a6ac9337e928d29a4598d" - integrity sha512-r0DhNarJrzzcXrvRbey43hGVO4J2QBAS43VrgjrxVw+1kyjKkIOQIh3wKr/OKx2jKOX0y3hCrLpL/aivHqub4g== +"@bazel/bazel-win32_x64@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-1.0.0.tgz#1111e4910c155a1917162ae96fd3737d062d20dd" + integrity sha512-p5LpQ/WiijwOS+eBkdD7UewHL8JwK+8gpb4tIKqgh/a2yawgzEQPJDPBUV9ykss5t+s85BL2kEMhduuDewt/MA== -"@bazel/bazel@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-0.29.0.tgz#bf4ecf47d6e67e8df8d342d24c146bd732d78640" - integrity sha512-OBxPv+V73PtADVG4qsGJ7Zj0wJrJorRbHgYE8qsRBNKls6e6rf0jkjSIQvAvP1Dyt7x4MGyhIzzK/5IsPeQZIA== +"@bazel/bazel@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-1.0.0.tgz#7c6e306d8ced3a6e087f041861364ef742560342" + integrity sha512-bxNjlieM1HwgIgqx+AqtNeUA6bvqIQ0X5YysWuCCtT24Dd+wTs6fRSx1KGOA1NiRBrg+kpk7ebitOU8yaM+tiA== dependencies: "@bazel/hide-bazel-files" latest optionalDependencies: - "@bazel/bazel-darwin_x64" "0.29.0" - "@bazel/bazel-linux_x64" "0.29.0" - "@bazel/bazel-win32_x64" "0.29.0" + "@bazel/bazel-darwin_x64" "1.0.0" + "@bazel/bazel-linux_x64" "1.0.0" + "@bazel/bazel-win32_x64" "1.0.0" "@bazel/buildifier-darwin_x64@0.29.0": version "0.29.0" From 086690a77c9ed8968c68ccfdc3383fe941fc51c0 Mon Sep 17 00:00:00 2001 From: Amadou Sall Date: Thu, 24 Oct 2019 02:43:50 +0200 Subject: [PATCH 0374/1070] docs: state in the README that minimum Node.js version is 10.13 --- README.md | 2 +- scripts/templates/readme.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b50b1394f92..c6b65b18b25a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ To get started locally, follow these instructions: 1. If you haven't done it already, [make a fork of this repo](https://github.com/angular/angular-cli/fork). 1. Clone to your local computer using `git`. -1. Make sure that you have Node 10.9 or later installed. See instructions [here](https://nodejs.org/en/download/). +1. Make sure that you have Node 10.13 or later installed. See instructions [here](https://nodejs.org/en/download/). 1. Make sure that you have `yarn` installed; see instructions [here](https://yarnpkg.com/lang/en/docs/install/). 1. Run `yarn` (no arguments) from the root of your clone of this project. 1. Run `yarn link` to add all custom scripts we use to your global install. diff --git a/scripts/templates/readme.ejs b/scripts/templates/readme.ejs index ff0c5398e0f3..5138da33d422 100644 --- a/scripts/templates/readme.ejs +++ b/scripts/templates/readme.ejs @@ -56,7 +56,7 @@ To get started locally, follow these instructions: 1. If you haven't done it already, [make a fork of this repo](https://github.com/angular/angular-cli/fork). 1. Clone to your local computer using `git`. -1. Make sure that you have Node 10.9 or later installed. See instructions [here](https://nodejs.org/en/download/). +1. Make sure that you have Node 10.13 or later installed. See instructions [here](https://nodejs.org/en/download/). 1. Make sure that you have `yarn` installed; see instructions [here](https://yarnpkg.com/lang/en/docs/install/). 1. Run `yarn` (no arguments) from the root of your clone of this project. 1. Run `yarn link` to add all custom scripts we use to your global install. From d47c7d1e1e6255777cc75cb874b55e0a5e8ccfdd Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 24 Oct 2019 12:54:12 +0000 Subject: [PATCH 0375/1070] build: update sass to version 1.23.1 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 38e9ba8460e4..00e820cfa22d 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -46,7 +46,7 @@ "regenerator-runtime": "0.13.3", "rollup": "1.25.1", "rxjs": "6.5.3", - "sass": "1.23.0", + "sass": "1.23.1", "sass-loader": "8.0.0", "semver": "6.3.0", "source-map": "0.7.3", diff --git a/yarn.lock b/yarn.lock index 79432bab2ed9..90e9e3a19ce0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9121,14 +9121,7 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.23.0: - version "1.23.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.0.tgz#bd526ff40dbc5d09a4ed69e2cffa849749977710" - integrity sha512-W4HT8+WE31Rzk3EPQC++CXjD5O+lOxgYBIB8Ohvt7/zeE2UzYW+TOczDrRU3KcEy3+xwXXbmDsOZFkoqgD4TKw== - dependencies: - chokidar ">=2.0.0 <4.0.0" - -sass@^1.23.0: +sass@1.23.1, sass@^1.23.0: version "1.23.1" resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.1.tgz#0e5b72ba2bd9f0229a637d33f8dd5bf2d810beb3" integrity sha512-zQzJ3UETUWOMd/pJJGH/zvRsBVO97m11RcpfUhcQUHEXf0yHUBgOIE/Nw8aK0m1XyVJPeq228iIK7gVxsJ/Puw== From 7ca2c229126e28f898491b5c6032eae8dda84884 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 24 Oct 2019 14:59:40 +0000 Subject: [PATCH 0376/1070] build: update rollup to version 1.25.2 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 00e820cfa22d..02c75446d584 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -44,7 +44,7 @@ "postcss-loader": "3.0.0", "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", - "rollup": "1.25.1", + "rollup": "1.25.2", "rxjs": "6.5.3", "sass": "1.23.1", "sass-loader": "8.0.0", diff --git a/yarn.lock b/yarn.lock index 90e9e3a19ce0..a219fac0ca7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9039,16 +9039,7 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.25.1: - version "1.25.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.1.tgz#905707d686dc8d7218af63dcfb9e37d1f3dc3c34" - integrity sha512-K8ytdEzMa6anHSnfTIs2BLB+NXlQ4qmWwdNHBpYQNWCbZAzj+DRVk7+ssbLSgddwpFW1nThr2GElR+jASF2NPA== - dependencies: - "@types/estree" "*" - "@types/node" "*" - acorn "^7.1.0" - -rollup@^1.24.0: +rollup@1.25.2, rollup@^1.24.0: version "1.25.2" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d" integrity sha512-+7z6Wab/L45QCPcfpuTZKwKiB0tynj05s/+s2U3F2Bi7rOLPr9UcjUwO7/xpjlPNXA/hwnth6jBExFRGyf3tMg== From 1f5bdd6e78c0328e6e0ac2cf6255d9b27013be8f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 24 Oct 2019 12:54:25 +0000 Subject: [PATCH 0377/1070] build: update terser-webpack-plugin to version 2.2.1 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 02c75446d584..a70d117729d3 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -58,7 +58,7 @@ "stylus-loader": "3.0.2", "tree-kill": "1.2.1", "terser": "4.3.9", - "terser-webpack-plugin": "2.1.3", + "terser-webpack-plugin": "2.2.1", "webpack": "4.41.2", "webpack-dev-middleware": "3.7.2", "webpack-dev-server": "3.8.2", diff --git a/yarn.lock b/yarn.lock index a219fac0ca7b..eb5e4aee7cf7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9169,7 +9169,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.1.0, schema-utils@^2.4.1: +schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.1.0, schema-utils@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.5.0.tgz#8f254f618d402cc80257486213c8970edfd7c22f" integrity sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ== @@ -10089,18 +10089,18 @@ term-size@^1.2.0: dependencies: execa "^0.7.0" -terser-webpack-plugin@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.1.3.tgz#85430da71ba88a60072bf659589eafaf6a00dc22" - integrity sha512-z5Utx0TxmirZvRNL1GC795tlDM+bO83ZfcbtkL1y1VLoWtZ7S2a9+HFCLnabSRE/Yjsu4zCEX6U6CIRo4dVmcQ== +terser-webpack-plugin@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.2.1.tgz#5569e6c7d8be79e5e43d6da23acc3b6ba77d22bd" + integrity sha512-jwdauV5Al7zopR6OAYvIIRcxXCSvLjZjr7uZE8l2tIWb/ryrGN48sJftqGf5k9z09tWhajx53ldp0XPI080YnA== dependencies: cacache "^13.0.1" find-cache-dir "^3.0.0" jest-worker "^24.9.0" - schema-utils "^2.4.1" + schema-utils "^2.5.0" serialize-javascript "^2.1.0" source-map "^0.6.1" - terser "^4.3.8" + terser "^4.3.9" webpack-sources "^1.4.3" terser-webpack-plugin@^1.4.1: @@ -10118,7 +10118,7 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.9, terser@^4.1.2, terser@^4.3.8: +terser@4.3.9, terser@^4.1.2, terser@^4.3.8, terser@^4.3.9: version "4.3.9" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.9.tgz#e4be37f80553d02645668727777687dad26bbca8" integrity sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA== From 092bee01880c2f8b0d614e7675cc6f6695ea8504 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 24 Oct 2019 12:54:39 +0000 Subject: [PATCH 0378/1070] build: update webpack-dev-server to version 3.9.0 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 43 +------------------ 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index a70d117729d3..7a949ebcdd54 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -61,7 +61,7 @@ "terser-webpack-plugin": "2.2.1", "webpack": "4.41.2", "webpack-dev-middleware": "3.7.2", - "webpack-dev-server": "3.8.2", + "webpack-dev-server": "3.9.0", "webpack-merge": "4.2.2", "webpack-sources": "1.4.3", "webpack-subresource-integrity": "1.3.4", diff --git a/yarn.lock b/yarn.lock index eb5e4aee7cf7..3d016bb597b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8091,7 +8091,7 @@ popper.js@^1.14.1: resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.0.tgz#2e1816bcbbaa518ea6c2e15a466f4cb9c6e2fbb3" integrity sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw== -portfinder@^1.0.24, portfinder@^1.0.25: +portfinder@^1.0.25: version "1.0.25" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== @@ -10898,46 +10898,7 @@ webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.2.tgz#3292427bf6510da9a3ac2d500b924a4197667ff9" - integrity sha512-0xxogS7n5jHDQWy0WST0q6Ykp7UGj4YvWh+HVN71JoE7BwPxMZrwgraBvmdEMbDVMBzF0u+mEzn8TQzBm5NYJQ== - dependencies: - ansi-html "0.0.7" - bonjour "^3.5.0" - chokidar "^2.1.8" - compression "^1.7.4" - connect-history-api-fallback "^1.6.0" - debug "^4.1.1" - del "^4.1.1" - express "^4.17.1" - html-entities "^1.2.1" - http-proxy-middleware "0.19.1" - import-local "^2.0.0" - internal-ip "^4.3.0" - ip "^1.1.5" - is-absolute-url "^3.0.3" - killable "^1.0.1" - loglevel "^1.6.4" - opn "^5.5.0" - p-retry "^3.0.1" - portfinder "^1.0.24" - schema-utils "^1.0.0" - selfsigned "^1.10.7" - semver "^6.3.0" - serve-index "^1.9.1" - sockjs "0.3.19" - sockjs-client "1.4.0" - spdy "^4.0.1" - strip-ansi "^3.0.1" - supports-color "^6.1.0" - url "^0.11.0" - webpack-dev-middleware "^3.7.2" - webpack-log "^2.0.0" - ws "^6.2.1" - yargs "12.0.5" - -webpack-dev-server@^3.1.4: +webpack-dev-server@3.9.0, webpack-dev-server@^3.1.4: version "3.9.0" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.9.0.tgz#27c3b5d0f6b6677c4304465ac817623c8b27b89c" integrity sha512-E6uQ4kRrTX9URN9s/lIbqTAztwEPdvzVrcmHE8EQ9YnuT9J8Es5Wrd8n9BKg1a0oZ5EgEke/EQFgUsp18dSTBw== From c33a66fb6ab57437ce842470b0e7c3d7d00146ef Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 24 Oct 2019 06:51:30 +0000 Subject: [PATCH 0379/1070] build: update caniuse-lite to version 1.0.30001004 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 7a949ebcdd54..ea6731a2831e 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -19,7 +19,7 @@ "autoprefixer": "9.6.5", "browserslist": "4.7.1", "cacache": "13.0.1", - "caniuse-lite": "1.0.30001002", + "caniuse-lite": "1.0.30001004", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", diff --git a/yarn.lock b/yarn.lock index 3d016bb597b9..17b0b6317bc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2630,7 +2630,12 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001002, caniuse-lite@^1.0.30000999: +caniuse-lite@1.0.30001004: + version "1.0.30001004" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d879b73981b255488316da946c39327d8c00a586" + integrity sha512-3nfOR4O8Wa2RWoYfJkMtwRVOsK96TQ+eq57wd0iKaEWl8dwG4hKZ/g0MVBfCvysFvMLi9fQGR/DvozMdkEPl3g== + +caniuse-lite@^1.0.30000999: version "1.0.30001002" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001002.tgz#ba999a737b1abd5bf0fd47efe43a09b9cadbe9b0" integrity sha512-pRuxPE8wdrWmVPKcDmJJiGBxr6lFJq4ivdSeo9FTmGj5Rb8NX3Mby2pARG57MXF15hYAhZ0nHV5XxT2ig4bz3g== From 1404e50c7f2608893fcfe9d35f978cd42e8763e4 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 24 Oct 2019 07:19:07 +0000 Subject: [PATCH 0380/1070] build: update browserslist to version 4.7.2 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 23 +++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ea6731a2831e..0a1269c64c3d 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -17,7 +17,7 @@ "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", "autoprefixer": "9.6.5", - "browserslist": "4.7.1", + "browserslist": "4.7.2", "cacache": "13.0.1", "caniuse-lite": "1.0.30001004", "circular-dependency-plugin": "5.2.0", diff --git a/yarn.lock b/yarn.lock index 17b0b6317bc3..9f426068301a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2373,7 +2373,16 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.1, browserslist@^4.6.0, browserslist@^4.7.0, browserslist@^4.7.1: +browserslist@4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.2.tgz#1bb984531a476b5d389cedecb195b2cd69fb1348" + integrity sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw== + dependencies: + caniuse-lite "^1.0.30001004" + electron-to-chromium "^1.3.295" + node-releases "^1.1.38" + +browserslist@^4.6.0, browserslist@^4.7.0, browserslist@^4.7.1: version "4.7.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.1.tgz#bd400d1aea56538580e8c4d5f1c54ac11b5ab468" integrity sha512-QtULFqKIAtiyNx7NhZ/p4rB8m3xDozVo/pi5VgTlADLF2tNigz/QH+v0m5qhn7XfHT7u+607NcCNOnC0HZAlMg== @@ -2640,6 +2649,11 @@ caniuse-lite@^1.0.30000999: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001002.tgz#ba999a737b1abd5bf0fd47efe43a09b9cadbe9b0" integrity sha512-pRuxPE8wdrWmVPKcDmJJiGBxr6lFJq4ivdSeo9FTmGj5Rb8NX3Mby2pARG57MXF15hYAhZ0nHV5XxT2ig4bz3g== +caniuse-lite@^1.0.30001004: + version "1.0.30001004" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d879b73981b255488316da946c39327d8c00a586" + integrity sha512-3nfOR4O8Wa2RWoYfJkMtwRVOsK96TQ+eq57wd0iKaEWl8dwG4hKZ/g0MVBfCvysFvMLi9fQGR/DvozMdkEPl3g== + canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" @@ -3873,6 +3887,11 @@ electron-to-chromium@^1.3.284: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.293.tgz#e52a30026b89276e211be36083a4d7136fd480ea" integrity sha512-DQSBRuU2Z1vG+CEWUIfCEVMHtuaGlhVojzg39mX5dx7PLSFDJ7DSrGUWzaPFFgWR1jo26hj1nXXRQZvFwk7F8w== +electron-to-chromium@^1.3.295: + version "1.3.295" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.295.tgz#4727eabfa2642f9b21c43ec17d794c004724657b" + integrity sha512-KxlGE9GcZTv7xGwYJGMEABHJq2JuTMNF7jD8NwHk6sBY226mW+Dyp9kZmA2Od9tKHMCS7ltPnqFg+zq3jTWN7Q== + elliptic@^6.0.0: version "6.5.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.1.tgz#c380f5f909bf1b9b4428d028cd18d3b0efd6b52b" @@ -7328,7 +7347,7 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.36: +node-releases@^1.1.36, node-releases@^1.1.38: version "1.1.38" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.38.tgz#d81b365df2936654ba37f509ba2fbe91eff2578b" integrity sha512-/5NZAaOyTj134Oy5Cp/J8mso8OD/D9CSuL+6TOXXsTKO8yjc5e4up75SRPCganCjwFKMj2jbp5tR0dViVdox7g== From 341b18d8a686d7c22d7ee59bc378ee9e9378cd09 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 23 Oct 2019 14:44:19 +0200 Subject: [PATCH 0381/1070] refactor(@angular-devkit/schematics): remove several deprecated APIs BREAKING CHANGE: Removed several deprecated APIs: - EngineHost `listSchematics` has been removed in favour of `listSchematicNames`. - `FileSystemSink` - Use the new virtualFs.Host classes from `@angular-devkit/core`. - `optimize` function has been remove as trees are automaticlly optimized. - `DryRunSink` deprecated constructor that allowed to provide a directory path has been removed. Provide a `virtualFs.Host` instead. --- .../schematics/src/_golden-api.d.ts | 6 ------ .../schematics/tools/index.d.ts | 1 - .../schematics/src/engine/interface.ts | 4 ---- .../angular_devkit/schematics/src/index.ts | 5 ++--- .../schematics/src/sink/dryrun.ts | 5 ----- .../schematics/src/sink/dryrun_spec.ts | 5 ++--- .../schematics/src/sink/filesystem.ts | 19 ------------------- .../schematics/src/sink/host_spec.ts | 13 ++++++------- .../schematics/src/tree/static.ts | 5 ----- .../schematics/src/workflow/base.ts | 2 -- .../schematics/tools/fallback-engine-host.ts | 9 --------- .../tools/file-system-engine-host-base.ts | 6 ------ 12 files changed, 10 insertions(+), 70 deletions(-) delete mode 100644 packages/angular_devkit/schematics/src/sink/filesystem.ts diff --git a/etc/api/angular_devkit/schematics/src/_golden-api.d.ts b/etc/api/angular_devkit/schematics/src/_golden-api.d.ts index 5fac0daf1a7b..5204afc755c6 100644 --- a/etc/api/angular_devkit/schematics/src/_golden-api.d.ts +++ b/etc/api/angular_devkit/schematics/src/_golden-api.d.ts @@ -176,7 +176,6 @@ export declare class DryRunSink extends HostSink { protected _fileDoesNotExistExceptionSet: Set; protected _subject: Subject; readonly reporter: Observable; - constructor(dir: string, force?: boolean); constructor(host: virtualFs.Host, force?: boolean); _done(): Observable; protected _fileAlreadyExistException(path: string): void; @@ -215,7 +214,6 @@ export interface EngineHost(schematic: SchematicDescription, collection: CollectionDescription): RuleFactory; hasTaskExecutor(name: string): boolean; listSchematicNames(collection: CollectionDescription): string[]; - listSchematics(collection: Collection): string[]; transformContext(context: TypedSchematicContext): TypedSchematicContext | void; transformOptions(schematic: SchematicDescription, options: OptionT, context?: TypedSchematicContext): Observable; } @@ -246,10 +244,6 @@ export interface FilePredicate { (path: Path, entry?: Readonly | null): T; } -export declare class FileSystemSink extends HostSink { - constructor(dir: string, force?: boolean); -} - export declare type FileVisitor = FilePredicate; export declare const FileVisitorCancelToken: symbol; diff --git a/etc/api/angular_devkit/schematics/tools/index.d.ts b/etc/api/angular_devkit/schematics/tools/index.d.ts index 98adfeac0547..74574a2fe9aa 100644 --- a/etc/api/angular_devkit/schematics/tools/index.d.ts +++ b/etc/api/angular_devkit/schematics/tools/index.d.ts @@ -67,7 +67,6 @@ export declare abstract class FileSystemEngineHostBase implements FileSystemEngi getSchematicRuleFactory(schematic: FileSystemSchematicDesc, _collection: FileSystemCollectionDesc): RuleFactory; hasTaskExecutor(name: string): boolean; listSchematicNames(collection: FileSystemCollectionDesc): string[]; - listSchematics(collection: FileSystemCollection): string[]; registerContextTransform(t: ContextTransform): void; registerOptionsTransform(t: OptionTransform): void; registerTaskExecutor(factory: TaskExecutorFactory, options?: T): void; diff --git a/packages/angular_devkit/schematics/src/engine/interface.ts b/packages/angular_devkit/schematics/src/engine/interface.ts index 5664780e19f1..ac2d9d2409a1 100644 --- a/packages/angular_devkit/schematics/src/engine/interface.ts +++ b/packages/angular_devkit/schematics/src/engine/interface.ts @@ -77,10 +77,6 @@ export type SchematicDescription { createCollectionDescription(name: string): CollectionDescription; - /** - * @deprecated Use `listSchematicNames`. - */ - listSchematics(collection: Collection): string[]; listSchematicNames(collection: CollectionDescription): string[]; createSchematicDescription( diff --git a/packages/angular_devkit/schematics/src/index.ts b/packages/angular_devkit/schematics/src/index.ts index 68390c0f40bb..d0951eb363ad 100644 --- a/packages/angular_devkit/schematics/src/index.ts +++ b/packages/angular_devkit/schematics/src/index.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { FilePredicate, MergeStrategy, Tree as TreeInterface } from './tree/interface'; -import { branch, empty, merge, optimize, partition } from './tree/static'; +import { branch, empty, merge, partition } from './tree/static'; export { SchematicsException } from './exception/exception'; @@ -28,7 +28,6 @@ export * from './tree/host-tree'; export { UpdateRecorder } from './tree/interface'; export * from './engine/schematic'; export * from './sink/dryrun'; -export * from './sink/filesystem'; export * from './sink/host'; export * from './sink/sink'; @@ -58,5 +57,5 @@ export const Tree: TreeConstructor = { partition(tree: TreeInterface, predicate: FilePredicate) { return partition(tree, predicate); }, - optimize(tree: TreeInterface) { return optimize(tree); }, + optimize(tree: TreeInterface) { return tree; }, }; diff --git a/packages/angular_devkit/schematics/src/sink/dryrun.ts b/packages/angular_devkit/schematics/src/sink/dryrun.ts index 5d861e4f549e..b17ddff12aa9 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun.ts @@ -50,11 +50,6 @@ export class DryRunSink extends HostSink { readonly reporter: Observable = this._subject.asObservable(); - /** - * @deprecated Use the virtualFs.Host constructor instead. - */ - constructor(dir: string, force?: boolean); - /** * @param {host} dir The host to use to output. This should be scoped. * @param {boolean} force Whether to force overwriting files that already exist. diff --git a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts index 9cc49ed55cf7..9f624137865e 100644 --- a/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts +++ b/packages/angular_devkit/schematics/src/sink/dryrun_spec.ts @@ -9,7 +9,6 @@ import { Path, normalize, virtualFs } from '@angular-devkit/core'; import { toArray } from 'rxjs/operators'; import { HostCreateTree, HostTree } from '../tree/host-tree'; -import { optimize } from '../tree/static'; import { DryRunSink } from './dryrun'; @@ -47,7 +46,7 @@ describe('DryRunSink', () => { }) .then(done, done.fail); - sink.commit(optimize(tree)) + sink.commit(tree) .toPromise().then(done, done.fail); }); @@ -78,7 +77,7 @@ describe('DryRunSink', () => { }) .then(done, done.fail); - sink.commit(optimize(tree)) + sink.commit(tree) .toPromise().then(done, done.fail); }); }); diff --git a/packages/angular_devkit/schematics/src/sink/filesystem.ts b/packages/angular_devkit/schematics/src/sink/filesystem.ts deleted file mode 100644 index 16e1d0275fa1..000000000000 --- a/packages/angular_devkit/schematics/src/sink/filesystem.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -import { normalize, virtualFs } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import { HostSink } from './host'; - -/** - * @deprecated Use the new virtualFs.Host classes from @angular-devkit/core. - */ -export class FileSystemSink extends HostSink { - constructor(dir: string, force = false) { - super(new virtualFs.ScopedHost(new NodeJsSyncHost(), normalize(dir)), force); - } -} diff --git a/packages/angular_devkit/schematics/src/sink/host_spec.ts b/packages/angular_devkit/schematics/src/sink/host_spec.ts index be52dd477838..8ad2ef8c8cbb 100644 --- a/packages/angular_devkit/schematics/src/sink/host_spec.ts +++ b/packages/angular_devkit/schematics/src/sink/host_spec.ts @@ -9,7 +9,6 @@ import { normalize, virtualFs } from '@angular-devkit/core'; import { HostSink } from '@angular-devkit/schematics'; import { HostCreateTree, HostTree } from '../tree/host-tree'; -import { optimize } from '../tree/static'; describe('FileSystemSink', () => { @@ -34,7 +33,7 @@ describe('FileSystemSink', () => { const outputHost = new virtualFs.test.TestHost(); const sink = new HostSink(outputHost); - sink.commit(optimize(tree)) + sink.commit(tree) .toPromise() .then(() => { const tmpFiles = outputHost.files.sort(); @@ -57,7 +56,7 @@ describe('FileSystemSink', () => { const outputHost = new virtualFs.test.TestHost(); const sink = new HostSink(outputHost); - sink.commit(optimize(tree)) + sink.commit(tree) .toPromise() .then(done, done.fail); }); @@ -70,7 +69,7 @@ describe('FileSystemSink', () => { tree.rename('/file0', '/file1'); const sink = new HostSink(host); - sink.commit(optimize(tree)) + sink.commit(tree) .toPromise() .then(() => { expect(host.sync.exists(normalize('/file0'))).toBe(false); @@ -88,7 +87,7 @@ describe('FileSystemSink', () => { tree.rename('/sub/directory/file2', '/another-directory/file2'); const sink = new HostSink(host); - sink.commit(optimize(tree)) + sink.commit(tree) .toPromise() .then(() => { expect(host.sync.exists(normalize('/sub/directory/file2'))).toBe(false); @@ -106,7 +105,7 @@ describe('FileSystemSink', () => { tree.create('/file0', 'hello'); const sink = new HostSink(host); - sink.commit(optimize(tree)) + sink.commit(tree) .toPromise() .then(() => { expect(host.sync.read(normalize('/file0')).toString()).toBe('hello'); @@ -128,7 +127,7 @@ describe('FileSystemSink', () => { expect(tree.exists('/file0')).toBeTruthy(); const sink = new HostSink(host); - sink.commit(optimize(tree)) + sink.commit(tree) .toPromise() .then(() => { expect(host.sync.read(normalize('/file0')).toString()).toBe('hello'); diff --git a/packages/angular_devkit/schematics/src/tree/static.ts b/packages/angular_devkit/schematics/src/tree/static.ts index 02a45b61dd72..516169abee24 100644 --- a/packages/angular_devkit/schematics/src/tree/static.ts +++ b/packages/angular_devkit/schematics/src/tree/static.ts @@ -34,8 +34,3 @@ export function partition(tree: Tree, predicate: FilePredicate): [Tree, throw new SchematicsException('Tree type is not supported.'); } } - -/** @deprecated Tree's are automically optimized */ -export function optimize(tree: Tree) { - return tree; -} diff --git a/packages/angular_devkit/schematics/src/workflow/base.ts b/packages/angular_devkit/schematics/src/workflow/base.ts index 8e2e1519865b..14b9aee9dd4e 100644 --- a/packages/angular_devkit/schematics/src/workflow/base.ts +++ b/packages/angular_devkit/schematics/src/workflow/base.ts @@ -16,7 +16,6 @@ import { HostSink } from '../sink/host'; import { Sink } from '../sink/sink'; import { HostTree } from '../tree/host-tree'; import { Tree } from '../tree/interface'; -import { optimize } from '../tree/static'; import { LifeCycleEvent, RequiredWorkflowExecutionContext, @@ -165,7 +164,6 @@ export abstract class BaseWorkflow implements Workflow { of(new HostTree(this._host)), { logger: context.logger }, ).pipe( - map(tree => optimize(tree)), concatMap((tree: Tree) => { // Process all sinks. return concat( diff --git a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts index c8e8d3a37430..a0044090a863 100644 --- a/packages/angular_devkit/schematics/tools/fallback-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/fallback-engine-host.ts @@ -109,15 +109,6 @@ export class FallbackEngineHost implements EngineHost<{}, {}> { return result; } - /** - * @deprecated Use `listSchematicNames`. - */ - listSchematics( - collection: Collection, - ): string[] { - return this.listSchematicNames(collection.description); - } - listSchematicNames(collection: CollectionDescription): string[] { const allNames = new Set(); this._hosts.forEach(host => { diff --git a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts index 8c5e560fb6f4..915d36fbc4f2 100644 --- a/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts +++ b/packages/angular_devkit/schematics/tools/file-system-engine-host-base.ts @@ -124,12 +124,6 @@ export abstract class FileSystemEngineHostBase implements FileSystemEngineHost { private _contextTransforms: ContextTransform[] = []; private _taskFactories = new Map Observable>(); - /** - * @deprecated Use `listSchematicNames`. - */ - listSchematics(collection: FileSystemCollection): string[] { - return this.listSchematicNames(collection.description); - } listSchematicNames(collection: FileSystemCollectionDesc) { const schematics: string[] = []; for (const key of Object.keys(collection.schematics)) { From 3163a4391ee43c9ed6bb24a724746c165437a0fb Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 25 Oct 2019 08:50:52 +0200 Subject: [PATCH 0382/1070] test: fix webdriver errors 'yarn' will nuke the entire node_modules when it is triggered during the above tests. Let's restore the previous node_modules state by re-installing using 'npm' and run 'webdriver-update'. --- tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts | 9 ++++++++- tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts b/tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts index 9c996c8c3197..37f929954203 100644 --- a/tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts +++ b/tests/legacy-cli/e2e/tests/commands/add/add-pwa-yarn.ts @@ -1,6 +1,6 @@ import { join } from 'path'; import { expectFileToExist, readFile, rimraf } from '../../../utils/fs'; -import { ng } from '../../../utils/process'; +import { ng, npm } from '../../../utils/process'; export default async function () { // forcibly remove in case another test doesn't clean itself up @@ -18,4 +18,11 @@ export default async function () { if (hasPWADep) { throw new Error(`Expected 'package.json' not to contain a dependency on '@angular/pwa'.`); } + + // 'yarn' will nuke the entire node_modules when it is triggered during the above tests. + // Let's restore the previous node_modules state by re-installing using 'npm' + // and run 'webdriver-update'. Otherwise, we will start seeing errors in CI like: + // Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries. + await npm('install'); + await npm('run', 'webdriver-update'); } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index 207b16afed05..2edfd6619683 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -24,7 +24,6 @@ export default async function() { localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; } await npm('install', `${localizeVersion}`); - await npm('run', 'webdriver-update'); await updateJsonFile('tsconfig.json', config => { config.compilerOptions.target = 'es2015'; From 936a9512ae3231ac74ee33453e095091f2682dc4 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 24 Oct 2019 19:30:38 +0200 Subject: [PATCH 0383/1070] refactor(@angular-devkit/build-angular): move around i18n methods to make them re-usable --- packages/angular/cli/tasks/install-package.ts | 8 +- .../angular_devkit/build_angular/package.json | 1 + .../build_angular/src/browser/index.ts | 220 +++++------------- .../src/{browser => utils}/action-cache.ts | 6 +- .../src/{browser => utils}/action-executor.ts | 8 +- .../src/utils/delete-output-dir.ts | 13 +- .../build_angular/src/utils/i18n-inlining.ts | 71 +++++- .../build_angular/src/utils/i18n-options.ts | 86 ++++++- .../build_angular/src/utils/output-paths.ts | 25 ++ .../build_angular/src/utils/process-bundle.ts | 26 ++- tests/legacy-cli/e2e_runner.ts | 6 +- 11 files changed, 277 insertions(+), 193 deletions(-) rename packages/angular_devkit/build_angular/src/{browser => utils}/action-cache.ts (97%) rename packages/angular_devkit/build_angular/src/{browser => utils}/action-executor.ts (95%) create mode 100644 packages/angular_devkit/build_angular/src/utils/output-paths.ts diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index 2505ece1c8d1..cbc657e3f459 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -82,10 +82,14 @@ export function installTempPackage( logger: logging.Logger, packageManager: PackageManager = PackageManager.Npm, ): string { - const tempPath = mkdtempSync(join(realpathSync(tmpdir()), '.ng-temp-packages-')); + const tempPath = mkdtempSync(join(realpathSync(tmpdir()), 'angular-cli-packages-')); // clean up temp directory on process exit - process.on('exit', () => rimraf.sync(tempPath)); + process.on('exit', () => { + try { + rimraf.sync(tempPath); + } catch { } + }); // setup prefix/global modules path const packageManagerArgs = getPackageManagerArguments(packageManager); diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 0a1269c64c3d..fab7a5d22744 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -44,6 +44,7 @@ "postcss-loader": "3.0.0", "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", + "rimraf": "3.0.0", "rollup": "1.25.2", "rxjs": "6.5.3", "sass": "1.23.1", diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 8bc55bcc515e..00cc9980b3e3 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -10,7 +10,6 @@ import { EmittedFiles, WebpackLoggingCallback, runWebpack } from '@angular-devki import { join, json, logging, normalize, tags, virtualFs } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; -import * as os from 'os'; import * as path from 'path'; import { Observable, from, of } from 'rxjs'; import { concatMap, map, switchMap } from 'rxjs/operators'; @@ -49,12 +48,13 @@ import { normalizeOptimization, normalizeSourceMaps, } from '../utils'; +import { BundleActionExecutor } from '../utils/action-executor'; import { findCachePath } from '../utils/cache-path'; import { copyAssets } from '../utils/copy-assets'; import { cachingDisabled } from '../utils/environment-options'; -import { emittedFilesToInlineOptions } from '../utils/i18n-inlining'; -import { I18nOptions, createI18nOptions, mergeDeprecatedI18nOptions } from '../utils/i18n-options'; -import { createTranslationLoader } from '../utils/load-translations'; +import { i18nInlineEmittedFiles } from '../utils/i18n-inlining'; +import { I18nOptions } from '../utils/i18n-options'; +import { ensureOutputPaths } from '../utils/output-paths'; import { InlineOptions, ProcessBundleFile, @@ -63,11 +63,12 @@ import { } from '../utils/process-bundle'; import { assertCompatibleAngularVersion } from '../utils/version'; import { + BrowserWebpackConfigOptions, generateBrowserWebpackConfigFromContext, + generateI18nBrowserWebpackConfigFromContext, getIndexInputFile, getIndexOutputFile, } from '../utils/webpack-browser-config'; -import { BundleActionExecutor } from './action-executor'; import { Schema as BrowserBuilderSchema } from './schema'; const cacheDownlevelPath = cachingDisabled ? undefined : findCachePath('angular-build-dl'); @@ -99,23 +100,53 @@ export function createBrowserLoggingCallback( }; } +// todo: the below should be cleaned once dev-server support the new i18n +interface ConfigFromContextReturn { + config: webpack.Configuration; + projectRoot: string; + projectSourceRoot?: string; +} + +export async function buildBrowserWebpackConfigFromContext( + options: BrowserBuilderSchema, + context: BuilderContext, + host: virtualFs.Host, + i18n: boolean, +): Promise; +export async function buildBrowserWebpackConfigFromContext( + options: BrowserBuilderSchema, + context: BuilderContext, + host?: virtualFs.Host, +): Promise; export async function buildBrowserWebpackConfigFromContext( options: BrowserBuilderSchema, context: BuilderContext, host: virtualFs.Host = new NodeJsSyncHost(), -): Promise<{ config: webpack.Configuration; projectRoot: string; projectSourceRoot?: string }> { + i18n = false, +): Promise { + const webpackPartialGenerator = (wco: BrowserWebpackConfigOptions) => [ + getCommonConfig(wco), + getBrowserConfig(wco), + getStylesConfig(wco), + getStatsConfig(wco), + getAnalyticsConfig(wco, context), + getCompilerConfig(wco), + wco.buildOptions.webWorkerTsConfig ? getWorkerConfig(wco) : {}, + ]; + + if (i18n) { + return generateI18nBrowserWebpackConfigFromContext( + options, + context, + webpackPartialGenerator, + host, + ); + } + return generateBrowserWebpackConfigFromContext( options, context, - wco => [ - getCommonConfig(wco), - getBrowserConfig(wco), - getStylesConfig(wco), - getStatsConfig(wco), - getAnalyticsConfig(wco, context), - getCompilerConfig(wco), - wco.buildOptions.webWorkerTsConfig ? getWorkerConfig(wco) : {}, - ], + webpackPartialGenerator, host, ); } @@ -161,89 +192,24 @@ async function initialize( projectSourceRoot?: string; i18n: I18nOptions; }> { - if (!context.target) { - throw new Error('The builder requires a target.'); - } - - const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); - const usingIvy = tsConfig.options.enableIvy !== false; - const metadata = await context.getProjectMetadata(context.target); - const projectRoot = path.join(context.workspaceRoot, (metadata.root as string) || ''); - const i18n = createI18nOptions(metadata, options.localize); - - // Until 11.0, support deprecated i18n options when not using new localize option - // i18nFormat is automatically calculated - if (options.localize === undefined && usingIvy) { - mergeDeprecatedI18nOptions(i18n, options.i18nLocale, options.i18nFile); - } else if (options.localize !== undefined && !usingIvy) { - options.localize = undefined; - - context.logger.warn(`Option 'localize' is not supported with View Engine.`); - } - - if (i18n.shouldInline) { - // Load locales - const loader = await createTranslationLoader(); - - const usedFormats = new Set(); - for (const [locale, desc] of Object.entries(i18n.locales)) { - if (i18n.inlineLocales.has(locale)) { - const result = loader(path.join(projectRoot, desc.file)); - - usedFormats.add(result.format); - if (usedFormats.size > 1 && tsConfig.options.enableI18nLegacyMessageIdFormat !== false) { - // This limitation is only for legacy message id support (defaults to true as of 9.0) - throw new Error( - 'Localization currently only supports using one type of translation file format for the entire application.', - ); - } - - desc.format = result.format; - desc.translation = result.translation; - } - } - - // Legacy message id's require the format of the translations - if (usedFormats.size > 0) { - options.i18nFormat = [...usedFormats][0]; - } - } - const originalOutputPath = options.outputPath; - - // If inlining store the output in a temporary location to facilitate post-processing - if (i18n.shouldInline) { - options.outputPath = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'angular-cli-')); - } - - const { config, projectSourceRoot } = await buildBrowserWebpackConfigFromContext( + const { config, projectRoot, projectSourceRoot, i18n } = await buildBrowserWebpackConfigFromContext( options, context, host, + true, ); - if (i18n.shouldInline) { - // Remove localize "polyfill" - if (!config.resolve) { - config.resolve = {}; - } - if (!config.resolve.alias) { - config.resolve.alias = {}; - } - config.resolve.alias['@angular/localize/init'] = require.resolve('./empty.js'); - } - let transformedConfig; if (webpackConfigurationTransform) { transformedConfig = await webpackConfigurationTransform(config); } if (options.deleteOutputPath) { - await deleteOutputDir( - normalize(context.workspaceRoot), - normalize(originalOutputPath), - host, - ).toPromise(); + deleteOutputDir( + context.workspaceRoot, + originalOutputPath, + ); } return { config: transformedConfig || config, projectRoot, projectSourceRoot, i18n }; @@ -312,15 +278,7 @@ export function buildWebpackBrowser( return { success }; } else if (success) { - const outputPaths = - i18n.shouldInline && !i18n.flatOutput - ? [...i18n.inlineLocales].map(l => path.join(baseOutputPath, l)) - : [baseOutputPath]; - for (const outputPath of outputPaths) { - if (!fs.existsSync(outputPath)) { - fs.mkdirSync(outputPath, { recursive: true }); - } - } + const outputPaths = ensureOutputPaths(baseOutputPath, i18n); let noModuleFiles: EmittedFiles[] | undefined; let moduleFiles: EmittedFiles[] | undefined; @@ -586,14 +544,6 @@ export function buildWebpackBrowser( } } finally { executor.stop(); - - if (i18n.shouldInline) { - try { - // Remove temporary directory used for i18n processing - // tslint:disable-next-line: no-non-null-assertion - await host.delete(normalize(webpackStats.outputPath!)).toPromise(); - } catch {} - } } // Copy assets @@ -787,70 +737,6 @@ function generateIndex( }).toPromise(); } -async function i18nInlineEmittedFiles( - context: BuilderContext, - emittedFiles: EmittedFiles[], - i18n: I18nOptions, - baseOutputPath: string, - outputPaths: string[], - scriptsEntryPointName: string[], - emittedPath: string, - es5: boolean, - missingTranslation: 'error' | 'warning' | 'ignore' | undefined, -) { - const executor = new BundleActionExecutor({ i18n }); - let hasErrors = false; - try { - const { options, originalFiles: processedFiles } = emittedFilesToInlineOptions( - emittedFiles, - scriptsEntryPointName, - emittedPath, - baseOutputPath, - es5, - missingTranslation, - ); - - for await (const result of executor.inlineAll(options)) { - for (const diagnostic of result.diagnostics) { - if (diagnostic.type === 'error') { - hasErrors = true; - context.logger.error(diagnostic.message); - } else { - context.logger.warn(diagnostic.message); - } - } - } - - // Copy any non-processed files into the output locations - await copyAssets( - [ - { - glob: '**/*', - input: emittedPath, - output: '', - ignore: [...processedFiles].map(f => path.relative(emittedPath, f)), - }, - ], - outputPaths, - '', - ); - } catch (err) { - context.logger.error('Localized bundle generation failed: ' + err.message); - - return false; - } finally { - executor.stop(); - } - - context.logger.info(`Localized bundle generation ${hasErrors ? 'failed' : 'complete'}.`); - - if (hasErrors) { - return false; - } - - return true; -} - function mapErrorToMessage(error: unknown): string | undefined { if (error instanceof Error) { return error.message; diff --git a/packages/angular_devkit/build_angular/src/browser/action-cache.ts b/packages/angular_devkit/build_angular/src/utils/action-cache.ts similarity index 97% rename from packages/angular_devkit/build_angular/src/browser/action-cache.ts rename to packages/angular_devkit/build_angular/src/utils/action-cache.ts index ebd0fd407eaf..bb8f9695201e 100644 --- a/packages/angular_devkit/build_angular/src/browser/action-cache.ts +++ b/packages/angular_devkit/build_angular/src/utils/action-cache.ts @@ -7,9 +7,9 @@ */ import { createHash } from 'crypto'; import * as fs from 'fs'; -import { copyFile } from '../utils/copy-file'; -import { manglingDisabled } from '../utils/environment-options'; -import { CacheKey, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; +import { copyFile } from './copy-file'; +import { manglingDisabled } from './environment-options'; +import { CacheKey, ProcessBundleOptions, ProcessBundleResult } from './process-bundle'; const cacache = require('cacache'); const packageVersion = require('../../package.json').version; diff --git a/packages/angular_devkit/build_angular/src/browser/action-executor.ts b/packages/angular_devkit/build_angular/src/utils/action-executor.ts similarity index 95% rename from packages/angular_devkit/build_angular/src/browser/action-executor.ts rename to packages/angular_devkit/build_angular/src/utils/action-executor.ts index f2995f8e7770..4e589af63de6 100644 --- a/packages/angular_devkit/build_angular/src/browser/action-executor.ts +++ b/packages/angular_devkit/build_angular/src/utils/action-executor.ts @@ -9,9 +9,9 @@ import JestWorker from 'jest-worker'; import * as os from 'os'; import * as path from 'path'; import * as v8 from 'v8'; -import { I18nOptions } from '../utils/i18n-options'; -import { InlineOptions, ProcessBundleOptions, ProcessBundleResult } from '../utils/process-bundle'; import { BundleActionCache } from './action-cache'; +import { I18nOptions } from './i18n-options'; +import { InlineOptions, ProcessBundleOptions, ProcessBundleResult } from './process-bundle'; const hasThreadSupport = (() => { try { @@ -28,10 +28,10 @@ const hasThreadSupport = (() => { // Processes use JSON which is much more limited const serialize = ((v8 as unknown) as { serialize(value: unknown): Buffer }).serialize; -let workerFile = require.resolve('../utils/process-bundle'); +let workerFile = require.resolve('./process-bundle'); workerFile = path.extname(workerFile) === '.ts' - ? require.resolve('../utils/process-bundle-bootstrap') + ? require.resolve('./process-bundle-bootstrap') : workerFile; export class BundleActionExecutor { diff --git a/packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts b/packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts index b4234cd269f6..bb8c648a1220 100644 --- a/packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts +++ b/packages/angular_devkit/build_angular/src/utils/delete-output-dir.ts @@ -5,22 +5,17 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Path, resolve, virtualFs } from '@angular-devkit/core'; -import { EMPTY, Observable } from 'rxjs'; -import { concatMap, last, map } from 'rxjs/operators'; +import { resolve } from 'path'; +import * as rimraf from 'rimraf'; /** * Delete an output directory, but error out if it's the root of the project. */ -export function deleteOutputDir(root: Path, outputPath: Path, host: virtualFs.Host): Observable { +export function deleteOutputDir(root: string, outputPath: string) { const resolvedOutputPath = resolve(root, outputPath); if (resolvedOutputPath === root) { throw new Error('Output path MUST not be project root directory!'); } - return host.exists(resolvedOutputPath).pipe( - concatMap(exists => exists ? host.delete(resolvedOutputPath) : EMPTY), - last(null, null), - map(() => undefined), - ); + rimraf.sync(resolvedOutputPath); } diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts index 432bd1a5b58a..b202e42f8371 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts @@ -5,12 +5,16 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +import { BuilderContext } from '@angular-devkit/architect'; import { EmittedFiles } from '@angular-devkit/build-webpack'; import * as fs from 'fs'; import * as path from 'path'; +import { BundleActionExecutor } from './action-executor'; +import { copyAssets } from './copy-assets'; +import { I18nOptions } from './i18n-options'; import { InlineOptions } from './process-bundle'; -export function emittedFilesToInlineOptions( +function emittedFilesToInlineOptions( emittedFiles: EmittedFiles[], scriptsEntryPointName: string[], emittedPath: string, @@ -55,3 +59,68 @@ export function emittedFilesToInlineOptions( return { options, originalFiles }; } + + +export async function i18nInlineEmittedFiles( + context: BuilderContext, + emittedFiles: EmittedFiles[], + i18n: I18nOptions, + baseOutputPath: string, + outputPaths: string[], + scriptsEntryPointName: string[], + emittedPath: string, + es5: boolean, + missingTranslation: 'error' | 'warning' | 'ignore' | undefined, +): Promise { + const executor = new BundleActionExecutor({ i18n }); + let hasErrors = false; + try { + const { options, originalFiles: processedFiles } = emittedFilesToInlineOptions( + emittedFiles, + scriptsEntryPointName, + emittedPath, + baseOutputPath, + es5, + missingTranslation, + ); + + for await (const result of executor.inlineAll(options)) { + for (const diagnostic of result.diagnostics) { + if (diagnostic.type === 'error') { + hasErrors = true; + context.logger.error(diagnostic.message); + } else { + context.logger.warn(diagnostic.message); + } + } + } + + // Copy any non-processed files into the output locations + await copyAssets( + [ + { + glob: '**/*', + input: emittedPath, + output: '', + ignore: [...processedFiles].map(f => path.relative(emittedPath, f)), + }, + ], + outputPaths, + '', + ); + } catch (err) { + context.logger.error('Localized bundle generation failed: ' + err.message); + + return false; + } finally { + executor.stop(); + } + + if (hasErrors) { + context.logger.error('Localized bundle generation failed.'); + } else { + context.logger.info('Localized bundle generation complete.'); + } + + return !hasErrors; +} diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index 4db1ef7a606d..35da21a669d4 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -5,7 +5,16 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { json } from '@angular-devkit/core'; +import { BuilderContext } from '@angular-devkit/architect'; +import { json, virtualFs } from '@angular-devkit/core'; +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import * as rimraf from 'rimraf'; +import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; +import { Schema as BrowserBuilderSchema } from '../browser/schema'; +import { Schema as ServerBuilderSchema } from '../server/schema'; +import { createTranslationLoader } from './load-translations'; export interface I18nOptions { inlineLocales: Set; @@ -82,7 +91,80 @@ export function createI18nOptions( return i18n; } -export function mergeDeprecatedI18nOptions(i18n: I18nOptions, i18nLocale: string | undefined, i18nFile: string | undefined): I18nOptions { +export async function configureI18nBuild( + context: BuilderContext, + host: virtualFs.Host, + options: T, +): Promise<{ + buildOptions: T, + i18n: I18nOptions, +}> { + if (!context.target) { + throw new Error('The builder requires a target.'); + } + + const buildOptions = { ... options }; + + const tsConfig = readTsconfig(buildOptions.tsConfig, context.workspaceRoot); + const usingIvy = tsConfig.options.enableIvy !== false; + const metadata = await context.getProjectMetadata(context.target); + const i18n = createI18nOptions(metadata, buildOptions.localize); + + // Until 11.0, support deprecated i18n options when not using new localize option + // i18nFormat is automatically calculated + if (buildOptions.localize === undefined && usingIvy) { + mergeDeprecatedI18nOptions(i18n, buildOptions.i18nLocale, buildOptions.i18nFile); + } else if (buildOptions.localize !== undefined && !usingIvy) { + buildOptions.localize = undefined; + + context.logger.warn(`Option 'localize' is not supported with View Engine.`); + } + + if (i18n.inlineLocales.size > 0) { + // Load locales + const loader = await createTranslationLoader(); + const projectRoot = path.join(context.workspaceRoot, (metadata.root as string) || ''); + const usedFormats = new Set(); + for (const [locale, desc] of Object.entries(i18n.locales)) { + if (i18n.inlineLocales.has(locale)) { + const result = loader(path.join(projectRoot, desc.file)); + + usedFormats.add(result.format); + if (usedFormats.size > 1 && tsConfig.options.enableI18nLegacyMessageIdFormat !== false) { + // This limitation is only for legacy message id support (defaults to true as of 9.0) + throw new Error( + 'Localization currently only supports using one type of translation file format for the entire application.', + ); + } + + desc.format = result.format; + desc.translation = result.translation; + } + } + + // Legacy message id's require the format of the translations + if (usedFormats.size > 0) { + buildOptions.i18nFormat = [...usedFormats][0]; + } + } + + // If inlining store the output in a temporary location to facilitate post-processing + if (i18n.shouldInline) { + const tempPath = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'angular-cli-i18n-')); + buildOptions.outputPath = tempPath; + + // Remove temporary directory used for i18n processing + process.on('exit', () => { + try { + rimraf.sync(tempPath); + } catch { } + }); + } + + return { buildOptions, i18n }; +} + +function mergeDeprecatedI18nOptions(i18n: I18nOptions, i18nLocale: string | undefined, i18nFile: string | undefined): I18nOptions { if (i18nFile !== undefined && i18nLocale === undefined) { throw new Error(`Option 'i18nFile' cannot be used without the 'i18nLocale' option.`); } diff --git a/packages/angular_devkit/build_angular/src/utils/output-paths.ts b/packages/angular_devkit/build_angular/src/utils/output-paths.ts new file mode 100644 index 000000000000..24f8563e664e --- /dev/null +++ b/packages/angular_devkit/build_angular/src/utils/output-paths.ts @@ -0,0 +1,25 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +import { existsSync, mkdirSync } from 'fs'; +import { join } from 'path'; +import { I18nOptions } from './i18n-options'; + +export function ensureOutputPaths(baseOutputPath: string, i18n: I18nOptions): string[] { + const outputPaths = i18n.shouldInline && !i18n.flatOutput + ? [...i18n.inlineLocales].map(l => join(baseOutputPath, l)) + : [baseOutputPath]; + + for (const outputPath of outputPaths) { + if (!existsSync(outputPath)) { + mkdirSync(outputPath, { recursive: true }); + } + } + + return outputPaths; +} diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index f8e8df618906..ab6193e7fb35 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { NodePath, parseSync, transformAsync, traverse, types } from '@babel/core'; +import { NodePath, ParseResult, parseSync, transformAsync, traverse, types } from '@babel/core'; import { createHash } from 'crypto'; import * as fs from 'fs'; import * as path from 'path'; @@ -454,7 +454,9 @@ async function processRuntime( (options.cacheKeys && options.cacheKeys[CacheKey.DownlevelMap]) || null, ); fs.writeFileSync(downlevelFilePath + '.map', downlevelMap); - downlevelCode += `\n//# sourceMappingURL=${path.basename(downlevelFilePath)}.map`; + if (!options.hiddenSourceMaps) { + downlevelCode += `\n//# sourceMappingURL=${path.basename(downlevelFilePath)}.map`; + } } await cachePut( downlevelCode, @@ -594,13 +596,29 @@ function findLocalizePositions( options: InlineOptions, utils: typeof import('@angular/localize/src/tools/src/translate/source_files/source_file_utils'), ): LocalizePosition[] { - const ast = parseSync(options.code, { babelrc: false }); + let ast: ParseResult | undefined | null; + + try { + ast = parseSync(options.code, { + babelrc: false, + sourceType: 'script', + }); + } catch (error) { + if (error.message) { + // Make the error more readable. + // Same errors will contain the full content of the file as the error message + // Which makes it hard to find the actual error message. + const index = error.message.indexOf(')\n'); + const msg = index !== -1 ? error.message.substr(0, index + 1) : error.message; + throw new Error(`${msg}\nAn error occurred inlining file "${options.filename}"`); + } + } + if (!ast) { throw new Error(`Unknown error occurred inlining file "${options.filename}"`); } const positions: LocalizePosition[] = []; - if (options.es5) { traverse(ast, { CallExpression(path: NodePath) { diff --git a/tests/legacy-cli/e2e_runner.ts b/tests/legacy-cli/e2e_runner.ts index 851fbcc3ee57..57c183da4726 100644 --- a/tests/legacy-cli/e2e_runner.ts +++ b/tests/legacy-cli/e2e_runner.ts @@ -93,7 +93,11 @@ allTests = allTests // Disabled on rc.0 due to needed sync with devkit for changes. .filter(name => !name.endsWith('/service-worker.ts')); -if (!argv.ve) { +if (argv.ve) { + // Remove Ivy specific tests + allTests = allTests + .filter(name => !name.includes('tests/i18n/ivy-localize-')); +} else { // These tests are disabled on the Ivy CI jobs because: // - Ivy doesn't support the functionality yet // - The test itself is not applicable to Ivy From 0686ceff6750088a687a4a567c3df969b0a0b0e9 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 24 Oct 2019 19:33:51 +0200 Subject: [PATCH 0384/1070] fix(@angular-devkit/build-angular): i18n with Ivy in universal builder --- .../build_angular/src/server/index.ts | 96 +++++++++++++------ .../src/{browser => utils}/empty.js | 0 .../build_angular/src/utils/i18n-inlining.ts | 1 - .../src/utils/webpack-browser-config.ts | 26 ++++- 4 files changed, 92 insertions(+), 31 deletions(-) rename packages/angular_devkit/build_angular/src/{browser => utils}/empty.js (100%) diff --git a/packages/angular_devkit/build_angular/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts index 8e7b95174450..0882b185f056 100644 --- a/packages/angular_devkit/build_angular/src/server/index.ts +++ b/packages/angular_devkit/build_angular/src/server/index.ts @@ -7,25 +7,29 @@ */ import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect'; import { runWebpack } from '@angular-devkit/build-webpack'; -import { json, normalize } from '@angular-devkit/core'; +import { json, virtualFs } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; +import * as fs from 'fs'; import * as path from 'path'; import { Observable, from, of } from 'rxjs'; import { concatMap, map } from 'rxjs/operators'; +import { ScriptTarget } from 'typescript'; import * as webpack from 'webpack'; -import { WebpackConfigOptions } from '../angular-cli-files/models/build-options'; import { getAotConfig, getCommonConfig, - getNonAotConfig, getServerConfig, getStatsConfig, getStylesConfig, } from '../angular-cli-files/models/webpack-configs'; +import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig'; import { ExecutionTransformer } from '../transforms'; import { NormalizedBrowserBuilderSchema, deleteOutputDir } from '../utils'; +import { i18nInlineEmittedFiles } from '../utils/i18n-inlining'; +import { I18nOptions } from '../utils/i18n-options'; +import { ensureOutputPaths } from '../utils/output-paths'; import { assertCompatibleAngularVersion } from '../utils/version'; -import { generateBrowserWebpackConfigFromContext } from '../utils/webpack-browser-config'; +import { generateI18nBrowserWebpackConfigFromContext } from '../utils/webpack-browser-config'; import { Schema as ServerBuilderOptions } from './schema'; // If success is true, outputPath should be set. @@ -48,20 +52,44 @@ export function execute( // Check Angular version. assertCompatibleAngularVersion(context.workspaceRoot, context.logger); - return from(buildServerWebpackConfig(options, context)).pipe( - concatMap(async v => transforms.webpackConfiguration ? transforms.webpackConfiguration(v) : v), - concatMap(v => { - if (options.deleteOutputPath) { - return deleteOutputDir(normalize(root), normalize(options.outputPath), host).pipe( - map(() => v), - ); - } else { - return of(v); - } + const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); + const target = tsConfig.options.target || ScriptTarget.ES5; + const baseOutputPath = path.resolve(context.workspaceRoot, options.outputPath); + + return from(initialize(options, context, host, transforms.webpackConfiguration)).pipe( + concatMap(({ config, i18n }) => { + return runWebpack(config, context).pipe( + concatMap(async output => { + const { emittedFiles = [], webpackStats } = output; + if (!output.success || !i18n.shouldInline) { + return output; + } + + if (!webpackStats) { + throw new Error('Webpack stats build result is required.'); + } + + const outputPaths = ensureOutputPaths(baseOutputPath, i18n); + + const success = await i18nInlineEmittedFiles( + context, + emittedFiles, + i18n, + baseOutputPath, + outputPaths, + [], + // tslint:disable-next-line: no-non-null-assertion + webpackStats.outputPath!, + target <= ScriptTarget.ES5, + options.i18nMissingTranslation, + ); + + return { output, success }; + }), + ); }), - concatMap(webpackConfig => runWebpack(webpackConfig, context)), map(output => { - if (output.success === false) { + if (!output.success) { return output as ServerBuilderOutput; } @@ -77,19 +105,17 @@ export default createBuilder, + webpackConfigurationTransform?: ExecutionTransformer, +): Promise<{ + config: webpack.Configuration; + i18n: I18nOptions; +}> { + const originalOutputPath = options.outputPath; + const { config, i18n } = await generateI18nBrowserWebpackConfigFromContext( { ...options, buildOptimizer: false, @@ -102,9 +128,21 @@ async function buildServerWebpackConfig( getServerConfig(wco), getStylesConfig(wco), getStatsConfig(wco), - getCompilerConfig(wco), + getAotConfig(wco), ], ); - return config; + let transformedConfig; + if (webpackConfigurationTransform) { + transformedConfig = await webpackConfigurationTransform(config); + } + + if (options.deleteOutputPath) { + deleteOutputDir( + context.workspaceRoot, + originalOutputPath, + ); + } + + return { config: transformedConfig || config, i18n }; } diff --git a/packages/angular_devkit/build_angular/src/browser/empty.js b/packages/angular_devkit/build_angular/src/utils/empty.js similarity index 100% rename from packages/angular_devkit/build_angular/src/browser/empty.js rename to packages/angular_devkit/build_angular/src/utils/empty.js diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts index b202e42f8371..5b9580ef3203 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts @@ -60,7 +60,6 @@ function emittedFilesToInlineOptions( return { options, originalFiles }; } - export async function i18nInlineEmittedFiles( context: BuilderContext, emittedFiles: EmittedFiles[], diff --git a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts index 279c1a213222..56974ffb37c2 100644 --- a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts +++ b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts @@ -27,11 +27,12 @@ import { normalizeBrowserSchema, } from '../utils'; import { BuildBrowserFeatures } from './build-browser-features'; +import { I18nOptions, configureI18nBuild } from './i18n-options'; const SpeedMeasurePlugin = require('speed-measure-webpack-plugin'); const webpackMerge = require('webpack-merge'); -type BrowserWebpackConfigOptions = WebpackConfigOptions; +export type BrowserWebpackConfigOptions = WebpackConfigOptions; export async function generateWebpackConfig( context: BuilderContext, @@ -133,6 +134,29 @@ export async function generateWebpackConfig( return webpackConfig; } +export async function generateI18nBrowserWebpackConfigFromContext( + options: BrowserBuilderSchema, + context: BuilderContext, + webpackPartialGenerator: (wco: BrowserWebpackConfigOptions) => webpack.Configuration[], + host: virtualFs.Host = new NodeJsSyncHost(), +): Promise<{ config: webpack.Configuration; projectRoot: string; projectSourceRoot?: string, i18n: I18nOptions }> { + const { buildOptions, i18n } = await configureI18nBuild(context, host, options); + const result = await generateBrowserWebpackConfigFromContext(buildOptions, context, webpackPartialGenerator, host); + const config = result.config; + + if (i18n.shouldInline) { + // Remove localize "polyfill" + if (!config.resolve) { + config.resolve = {}; + } + if (!config.resolve.alias) { + config.resolve.alias = {}; + } + config.resolve.alias['@angular/localize/init'] = require.resolve('./empty.js'); + } + + return { ...result, i18n }; +} export async function generateBrowserWebpackConfigFromContext( options: BrowserBuilderSchema, context: BuilderContext, From 24d0f7a17b1123bf916fbaec4c4076280bddc17c Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 25 Oct 2019 07:44:48 +0200 Subject: [PATCH 0385/1070] test: clean up ivy-localize tests and add i18n server test --- .../e2e/tests/build/platform-server.ts | 2 +- .../e2e/tests/i18n/ivy-localize-dl.ts | 5 - .../e2e/tests/i18n/ivy-localize-es2015.ts | 4 - .../e2e/tests/i18n/ivy-localize-es5.ts | 4 - .../e2e/tests/i18n/ivy-localize-server.ts | 200 ++++++++++++++++++ 5 files changed, 201 insertions(+), 14 deletions(-) create mode 100644 tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index 6ff3882055b9..d9fb520a7f2c 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -9,7 +9,7 @@ export default async function () { const argv = getGlobalVariable('argv'); const veEnabled = argv['ve']; - await ng('add', '@nguniversal/express-engine@9.0.0-next.5'); + await ng('add', '@nguniversal/express-engine@9.0.0-next.6'); await updateJsonFile('package.json', packageJson => { const dependencies = packageJson['dependencies']; diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index 2edfd6619683..55644a39e273 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -15,10 +15,6 @@ import { expectToFail } from '../../utils/utils'; import { readNgVersion } from '../../utils/version'; export default async function() { - if (getGlobalVariable('argv').ve) { - return; - } - let localizeVersion = '@angular/localize@' + readNgVersion(); if (getGlobalVariable('argv')['ng-snapshots']) { localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; @@ -36,7 +32,6 @@ export default async function() { const langTranslations = [ { lang: 'en-US', translation: 'Hello i18n!' }, { lang: 'fr', translation: 'Bonjour i18n!' }, - { lang: 'de', translation: 'Hallo i18n!' }, ]; await updateJsonFile('angular.json', workspaceJson => { diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts index 03cc75a6c96c..7a856befd65b 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts @@ -16,10 +16,6 @@ import { expectToFail } from '../../utils/utils'; import { readNgVersion } from '../../utils/version'; export default async function() { - if (getGlobalVariable('argv').ve) { - return; - } - let localizeVersion = '@angular/localize@' + readNgVersion(); if (getGlobalVariable('argv')['ng-snapshots']) { localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts index 67e0586dec4d..9a012ee685f1 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts @@ -16,10 +16,6 @@ import { expectToFail } from '../../utils/utils'; import { readNgVersion } from '../../utils/version'; export default async function() { - if (getGlobalVariable('argv').ve) { - return; - } - let localizeVersion = '@angular/localize@' + readNgVersion(); if (getGlobalVariable('argv')['ng-snapshots']) { localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts new file mode 100644 index 000000000000..835e55fdebac --- /dev/null +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts @@ -0,0 +1,200 @@ +import * as express from 'express'; +import * as http from "http"; +import { join } from 'path'; +import { getGlobalVariable } from '../../utils/env'; +import { + appendToFile, + copyFile, + expectFileToMatch, + replaceInFile, + writeFile, +} from '../../utils/fs'; +import { ng, npm } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; +import { expectToFail } from '../../utils/utils'; +import { readNgVersion } from '../../utils/version'; + +export default async function () { + let localizeVersion = '@angular/localize@' + readNgVersion(); + if (getGlobalVariable('argv')['ng-snapshots']) { + localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; + } + + await npm('install', `${localizeVersion}`); + + // Add universal to the project + await ng('add', '@nguniversal/express-engine@9.0.0-next.6'); + + await npm('run', 'webdriver-update'); + + const serverbaseDir = 'dist/test-project/server'; + const serverBuildArgs = ['run', 'test-project:server']; + + // Set configurations for each locale. + const langTranslations = [ + { lang: 'en-US', translation: 'Hello i18n!' }, + { lang: 'fr', translation: 'Bonjour i18n!' }, + { lang: 'de', translation: 'Hallo i18n!' }, + ]; + + await updateJsonFile('angular.json', workspaceJson => { + const appProject = workspaceJson.projects['test-project']; + const appArchitect = appProject.architect || appProject.targets; + const buildOptions = appArchitect['build'].options; + const serverOptions = appArchitect['server'].options; + + // Make default builds prod. + buildOptions.optimization = true; + buildOptions.buildOptimizer = true; + buildOptions.aot = true; + buildOptions.fileReplacements = [ + { + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }, + ]; + + serverOptions.optimization = true; + serverOptions.fileReplacements = [ + { + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }, + ]; + + // Enable localization for all locales + buildOptions.localize = true; + serverOptions.localize = true; + + // Add locale definitions to the project + // tslint:disable-next-line: no-any + const i18n: Record = (appProject.i18n = { locales: {} }); + for (const { lang } of langTranslations) { + if (lang == 'en-US') { + i18n.sourceLocale = lang; + } else { + i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; + } + } + }); + + // Add a translatable element. + await writeFile( + 'src/app/app.component.html', + '

Hello i18n!

', + ); + + // Override 'main.ts' so that we never bootstrap the client side + // This is needed so that we can we can run E2E test against the server view + await writeFile( + 'src/main.ts', + ` + import { enableProdMode } from '@angular/core'; + + import { AppModule } from './app/app.module'; + import { environment } from './environments/environment'; + + if (environment.production) { + enableProdMode(); + } + `, + ); + + // By default the 'server.ts' doesn't support localized dist folders, + // so we create a copy of 'app' function with a locale parameter. + await appendToFile( + 'server.ts', + ` + export function i18nApp(locale: string) { + const server = express(); + const distFolder = join(process.cwd(), \`dist/test-project/browser/\${locale}\`); + + server.engine('html', ngExpressEngine({ + bootstrap: AppServerModule, + })); + + server.set('view engine', 'html'); + server.set('views', distFolder); + + server.get('*.*', express.static(distFolder, { + maxAge: '1y' + })); + + server.get('*', (req, res) => { + res.render('index', { req }); + }); + + return server; + } + `, + ); + + // Extract the translation messages and copy them for each language. + await ng('xi18n', '--output-path=src/locale'); + + for (const { lang, translation } of langTranslations) { + if (lang !== 'en-US') { + await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'source-language="en-US"', + `source-language="en-US" target-language="${lang}"`, + ); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'Hello i18n!', + `Hello i18n!\n${translation}`, + ); + } + } + + // Build each locale and verify the output. + await ng('build', '--i18n-missing-translation', 'error'); + await ng(...serverBuildArgs, '--i18n-missing-translation', 'error'); + + for (const { lang, translation } of langTranslations) { + await expectFileToMatch(`${serverbaseDir}/${lang}/main.js`, translation); + await expectToFail(() => expectFileToMatch(`${serverbaseDir}/${lang}/main.js`, '$localize`')); + + // Add E2E test for locale + await writeFile( + 'e2e/src/app.e2e-spec.ts', + ` + import { browser, logging, by } from 'protractor'; + describe('workspace-project App', () => { + it('should display welcome message', () => { + // Load the page without waiting for Angular since it is not bootstrapped automatically. + browser.driver.get(browser.baseUrl); + + const header = browser.driver.findElement(by.css('h1')); + expect(header.getText()).toEqual('${translation}'); + }); + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); + }); + `, + ); + + // Run the server + const serverBundle = join(process.cwd(), `${serverbaseDir}/${lang}/main.js`); + const { i18nApp } = await import(serverBundle) as { i18nApp(locale: string): express.Express }; + const server = i18nApp(lang).listen(4200, 'localhost'); + try { + // Execute without a devserver. + await ng('e2e', '--devServerTarget='); + } finally { + server.close(); + } + } + + // Verify missing translation behaviour. + await appendToFile('src/app/app.component.html', '

Other content

'); + await ng(...serverBuildArgs, '--i18n-missing-translation', 'ignore'); + await expectFileToMatch(`${serverbaseDir}/fr/main.js`, /Other content/); + await expectToFail(() => ng(...serverBuildArgs, '--i18n-missing-translation', 'error')); +} From 0e3d8e4a642029e765c3e0a6db57111081b6e0eb Mon Sep 17 00:00:00 2001 From: Amadou Sall Date: Fri, 18 Oct 2019 13:50:54 +0200 Subject: [PATCH 0386/1070] feat(@schematics/angular): add packageManager option closes #15875 --- packages/schematics/angular/ng-new/index.ts | 10 ++++++++-- packages/schematics/angular/ng-new/index_spec.ts | 8 ++++++++ packages/schematics/angular/ng-new/schema.json | 5 +++++ .../angular/workspace/files/angular.json.template | 7 +++++-- packages/schematics/angular/workspace/schema.json | 5 +++++ 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/ng-new/index.ts b/packages/schematics/angular/ng-new/index.ts index ed9d9014e181..ac05f30ca8bb 100644 --- a/packages/schematics/angular/ng-new/index.ts +++ b/packages/schematics/angular/ng-new/index.ts @@ -28,7 +28,7 @@ import { Schema as WorkspaceOptions } from '../workspace/schema'; import { Schema as NgNewOptions } from './schema'; -export default function (options: NgNewOptions): Rule { +export default function(options: NgNewOptions): Rule { if (!options.name) { throw new SchematicsException(`Invalid options, "name" is required.`); } @@ -43,6 +43,7 @@ export default function (options: NgNewOptions): Rule { newProjectRoot: options.newProjectRoot, minimal: options.minimal, strict: options.strict, + packageManager: options.packageManager, }; const applicationOptions: ApplicationOptions = { projectRoot: '', @@ -71,7 +72,12 @@ export default function (options: NgNewOptions): Rule { (_host: Tree, context: SchematicContext) => { let packageTask; if (!options.skipInstall) { - packageTask = context.addTask(new NodePackageInstallTask(options.directory)); + packageTask = context.addTask( + new NodePackageInstallTask({ + workingDirectory: options.directory, + packageManager: options.packageManager, + }), + ); if (options.linkCli) { packageTask = context.addTask( new NodePackageLinkTask('@angular/cli', options.directory), diff --git a/packages/schematics/angular/ng-new/index_spec.ts b/packages/schematics/angular/ng-new/index_spec.ts index ec0ed407e4ce..f5bb57985542 100644 --- a/packages/schematics/angular/ng-new/index_spec.ts +++ b/packages/schematics/angular/ng-new/index_spec.ts @@ -79,4 +79,12 @@ describe('Ng New Schematic', () => { const confContent = JSON.parse(tree.readContent('/bar/angular.json')); expect(confContent.projects.foo.e2e).toBeUndefined(); }); + + it('should add packageManager option in angular.json', async () => { + const tree = await schematicRunner + .runSchematicAsync('ng-new', { ...defaultOptions, packageManager: 'npm' }) + .toPromise(); + const { cli } = JSON.parse(tree.readContent('/bar/angular.json')); + expect(cli.packageManager).toBe('npm'); + }); }); diff --git a/packages/schematics/angular/ng-new/schema.json b/packages/schematics/angular/ng-new/schema.json index 1bfd7c25298d..790208570380 100644 --- a/packages/schematics/angular/ng-new/schema.json +++ b/packages/schematics/angular/ng-new/schema.json @@ -132,6 +132,11 @@ "description": "Creates a workspace with stricter TypeScript compiler options.", "type": "boolean", "default": false + }, + "packageManager": { + "description": "The package manager used to install dependencies.", + "type": "string", + "enum": ["npm", "yarn", "pnpm", "cnpm"] } }, "required": ["name", "version"] diff --git a/packages/schematics/angular/workspace/files/angular.json.template b/packages/schematics/angular/workspace/files/angular.json.template index 743540cbd1bb..38a6487f7dc6 100644 --- a/packages/schematics/angular/workspace/files/angular.json.template +++ b/packages/schematics/angular/workspace/files/angular.json.template @@ -1,6 +1,9 @@ { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, + "version": 1, <% if (packageManager) { %> + "cli": { + "packageManager": "<%= packageManager %>" + },<% } %> "newProjectRoot": "<%= newProjectRoot %>", "projects": {} -} \ No newline at end of file +} diff --git a/packages/schematics/angular/workspace/schema.json b/packages/schematics/angular/workspace/schema.json index 827a8ab3f3ba..c0a44d3599b9 100644 --- a/packages/schematics/angular/workspace/schema.json +++ b/packages/schematics/angular/workspace/schema.json @@ -36,6 +36,11 @@ "description": "Creates a workspace with stricter TypeScript compiler options.", "type": "boolean", "default": false + }, + "packageManager": { + "description": "The package manager used to install dependencies.", + "type": "string", + "enum": ["npm", "yarn", "pnpm", "cnpm"] } }, "required": [ From c8f8028e806ae7eab34b9480af9f278cfd1c323c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sun, 20 Oct 2019 19:31:36 -0400 Subject: [PATCH 0387/1070] fix(@angular-devkit/architect): clone workspace objects before builder use --- .../node/node-modules-architect-host.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/architect/node/node-modules-architect-host.ts b/packages/angular_devkit/architect/node/node-modules-architect-host.ts index 4a39e5a52596..4395e8363f63 100644 --- a/packages/angular_devkit/architect/node/node-modules-architect-host.ts +++ b/packages/angular_devkit/architect/node/node-modules-architect-host.ts @@ -7,6 +7,7 @@ */ import { experimental, json, workspaces } from '@angular-devkit/core'; import * as path from 'path'; +import * as v8 from 'v8'; import { BuilderInfo } from '../src'; import { Schema as BuilderSchema } from '../src/builders-schema'; import { Target } from '../src/input-schema'; @@ -17,6 +18,16 @@ export type NodeModulesBuilderInfo = BuilderInfo & { import: string; }; +function clone(obj: unknown): unknown { + const serialize = ((v8 as unknown) as { serialize(value: unknown): Buffer }).serialize; + const deserialize = ((v8 as unknown) as { deserialize(buffer: Buffer): unknown }).deserialize; + + try { + return deserialize(serialize(obj)); + } catch { + return JSON.parse(JSON.stringify(obj)); + } +} // TODO: create a base class for all workspace related hosts. export class WorkspaceNodeModulesArchitectHost implements ArchitectHost { @@ -117,10 +128,12 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost { @@ -139,7 +152,7 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost Date: Sun, 20 Oct 2019 20:38:58 -0400 Subject: [PATCH 0388/1070] refactor(@angular-devkit/architect): remove usage of experimental workspace API --- .../node/node-modules-architect-host.ts | 58 ++++++------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/packages/angular_devkit/architect/node/node-modules-architect-host.ts b/packages/angular_devkit/architect/node/node-modules-architect-host.ts index 4395e8363f63..7d6121d51581 100644 --- a/packages/angular_devkit/architect/node/node-modules-architect-host.ts +++ b/packages/angular_devkit/architect/node/node-modules-architect-host.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { experimental, json, workspaces } from '@angular-devkit/core'; +import { json, workspaces } from '@angular-devkit/core'; import * as path from 'path'; import * as v8 from 'v8'; import { BuilderInfo } from '../src'; @@ -13,7 +13,6 @@ import { Schema as BuilderSchema } from '../src/builders-schema'; import { Target } from '../src/input-schema'; import { ArchitectHost, Builder, BuilderSymbol } from '../src/internal'; - export type NodeModulesBuilderInfo = BuilderInfo & { import: string; }; @@ -31,18 +30,7 @@ function clone(obj: unknown): unknown { // TODO: create a base class for all workspace related hosts. export class WorkspaceNodeModulesArchitectHost implements ArchitectHost { - - /** - * @deprecated - */ - constructor(_workspace: experimental.workspace.Workspace, _root: string) - - constructor(_workspace: workspaces.WorkspaceDefinition, _root: string) - - constructor( - protected _workspace: experimental.workspace.Workspace | workspaces.WorkspaceDefinition, - protected _root: string, - ) {} + constructor(protected _workspace: workspaces.WorkspaceDefinition, protected _root: string) {} async getBuilderNameForTarget(target: Target) { const targetDefinition = this.findProjectTarget(target); @@ -139,24 +127,19 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost { const projectName = typeof target === 'string' ? target : target.project; - // NOTE: Remove conditional when deprecated support for experimental workspace API is removed. - if ('getProject' in this._workspace) { - return this._workspace.getProject(projectName) as unknown as json.JsonObject; - } else { - const projectDefinition = this._workspace.projects.get(projectName); - if (!projectDefinition) { - throw new Error('Project does not exist.'); - } + const projectDefinition = this._workspace.projects.get(projectName); + if (!projectDefinition) { + throw new Error('Project does not exist.'); + } - const metadata = { - root: projectDefinition.root, - sourceRoot: projectDefinition.sourceRoot, - prefix: projectDefinition.prefix, - ...clone(projectDefinition.extensions), - } as unknown as json.JsonObject; + const metadata = ({ + root: projectDefinition.root, + sourceRoot: projectDefinition.sourceRoot, + prefix: projectDefinition.prefix, + ...clone(projectDefinition.extensions), + } as unknown) as json.JsonObject; - return metadata; - } + return metadata; } async loadBuilder(info: NodeModulesBuilderInfo): Promise { @@ -169,16 +152,11 @@ export class WorkspaceNodeModulesArchitectHost implements ArchitectHost Date: Fri, 25 Oct 2019 01:25:34 +0000 Subject: [PATCH 0389/1070] build: update @angular/animations to version 9.0.0-next.13 --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 24 ++-- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 22 ++-- yarn.lock | 103 +++++++++--------- 6 files changed, 78 insertions(+), 83 deletions(-) diff --git a/package.json b/package.json index 64e82b8cc9a1..d16914b7d6af 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,8 @@ "typescript": "3.6.4" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.12", - "@angular/compiler-cli": "9.0.0-next.12", + "@angular/compiler": "9.0.0-next.13", + "@angular/compiler-cli": "9.0.0-next.13", "@bazel/bazel": "1.0.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.39.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index fab7a5d22744..7af9aab72957 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -69,20 +69,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.12", + "@angular/animations": "9.0.0-next.13", "@angular/cdk": "8.2.3", - "@angular/common": "9.0.0-next.12", - "@angular/compiler": "9.0.0-next.12", - "@angular/compiler-cli": "9.0.0-next.12", - "@angular/core": "9.0.0-next.12", - "@angular/forms": "9.0.0-next.12", - "@angular/localize": "9.0.0-next.12", + "@angular/common": "9.0.0-next.13", + "@angular/compiler": "9.0.0-next.13", + "@angular/compiler-cli": "9.0.0-next.13", + "@angular/core": "9.0.0-next.13", + "@angular/forms": "9.0.0-next.13", + "@angular/localize": "9.0.0-next.13", "@angular/material": "8.2.3", - "@angular/platform-browser": "9.0.0-next.12", - "@angular/platform-browser-dynamic": "9.0.0-next.12", - "@angular/platform-server": "9.0.0-next.12", - "@angular/router": "9.0.0-next.12", - "@angular/service-worker": "9.0.0-next.12", + "@angular/platform-browser": "9.0.0-next.13", + "@angular/platform-browser-dynamic": "9.0.0-next.13", + "@angular/platform-server": "9.0.0-next.13", + "@angular/router": "9.0.0-next.13", + "@angular/service-worker": "9.0.0-next.13", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 0cf00888d3e1..6114b088cef8 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^9.0.0-rc.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.12", - "@angular/compiler-cli": "9.0.0-next.12", + "@angular/compiler": "9.0.0-next.13", + "@angular/compiler-cli": "9.0.0-next.13", "@angular-devkit/core": "0.0.0", "ng-packagr": "~9.0.0-rc.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 9c78840fbbdb..a78f1e54c925 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -32,8 +32,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.12", - "@angular/compiler-cli": "9.0.0-next.12", + "@angular/compiler": "9.0.0-next.13", + "@angular/compiler-cli": "9.0.0-next.13", "typescript": "3.6.4", "webpack": "4.41.2" } diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 1118aa205344..1706e4f9c36c 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,16 +2,16 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#a4845a95e1da64a94901e9d7c0532d75c4592b2a", - "@angular/common": "github:angular/common-builds#48de3a939d1a2603f946d63387b8b7e1db981017", - "@angular/compiler": "github:angular/compiler-builds#8550378f61803b32eb80513f505d0ccd883cb4fb", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#a9e7866f4c1fd29c90d766ac615181545dc996b6", - "@angular/core": "github:angular/core-builds#bbff63b26e8c8cad59d08bc913969c914bd59a31", - "@angular/forms": "github:angular/forms-builds#643bbc2ff93e927322dbaef7f0f4a560c7b34472", - "@angular/language-service": "github:angular/language-service-builds#aca17f9cde00e2c78e083e9fd4683e7c018194ee", - "@angular/localize": "github:angular/localize-builds#ccc3fcd68cfc3e61fd9e0d2138e1174c6c5b028a", - "@angular/platform-browser": "github:angular/platform-browser-builds#3c131ffea86f51624c6174575e0ed45fe7ea60c7", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d622dda35d9371b8ae18351f2fe6e5416909c8e3", - "@angular/router": "github:angular/router-builds#1b1c6945d60b81182ca84b18c5d52ac44d645d96" + "@angular/animations": "github:angular/animations-builds#f9e18882896dfc7bfdfe988c9705e87b2049c13b", + "@angular/common": "github:angular/common-builds#527a63df7a6d6cdc647a8983e95e55a5f5375ed8", + "@angular/compiler": "github:angular/compiler-builds#e958caec4b2983de90084eea98d14ab0aabcf6aa", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#da9b52d0648234f6af32b9dc007b81bd211b8b7c", + "@angular/core": "github:angular/core-builds#c409b908bea40b83cff6cde113ad76298a144fd2", + "@angular/forms": "github:angular/forms-builds#852f003739638909543e40413237b1aa2c62bc1b", + "@angular/language-service": "github:angular/language-service-builds#894c903a305945da6d14a1e3c1de8ecc683e42d5", + "@angular/localize": "github:angular/localize-builds#33c7636c27a4f147607cf5a9dbf8cc1f7235da99", + "@angular/platform-browser": "github:angular/platform-browser-builds#ce1e659ca1354adb43047933dcd4197cbd96174f", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d8664790dc89a1d30cf18788479cd5ccb1fb5ee6", + "@angular/router": "github:angular/router-builds#f75458fdef2ef233080332e0a96f4d0cbfad93e9" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9f426068301a..9b7de923aa21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.12.tgz#80319c1cd8ff0a4c8980daa64ff480440da0624a" - integrity sha512-XMQVf5BSD26I+gEOswUIVpFf7hAJthAnLPG/j3gNKFUm3eoDlXOkQg8I+bCAW/1Dr8oXDTmiSXbMQPOinfdP+w== +"@angular/animations@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.13.tgz#51c080e8874a0d43214463878cc4b274e8efae0c" + integrity sha512-PLay+vkMpKJB6SNblnuN7RlLdLsdxF2WApTGpLB6yu8OeNYTjXuve20SHOiYkbffgr1qZMXx/mxDcg4AGV60qw== "@angular/cdk@8.2.3": version "8.2.3" @@ -16,15 +16,15 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.12.tgz#1bc0f1e90918ab9094388d06608b78d6e8b7c648" - integrity sha512-jDvnd+cN58GyGw2Kr2Rc++iPP9NIgIfPR7nb2XWlURwP22z+jGbLjIhtvA+TVpBRV/uya7xH9qti8ttc7a5rqg== +"@angular/common@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.13.tgz#c902c409d066fabc829a3a10e1e2aeb1a13c03bf" + integrity sha512-vViVtqxF7dzYPd+Prs30oUrviQHhp3WIJlbki+aH77CcB66LNl5OvaFzLmnpT6ILpuvJ4GYJIgCi4fcoqC8BNQ== -"@angular/compiler-cli@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.12.tgz#e0e647f9cb736db640ef957bced1d3175bd52a74" - integrity sha512-XY43SFkb5f+WrSlFetNmqObtILSVC5st2JORanVc//1LWp8Mdfqe3s57sUEVsJWfhnFk2VKNnHVP+efwl6jA5g== +"@angular/compiler-cli@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.13.tgz#6c6790165b8ab8c58ecbf4b4bfb95724b23d827c" + integrity sha512-djo983DwKzVBbePWCqlRqs3dvoprE5p/px6c/jwIDp4dxAjBc7YQtJc3jrjuejIUZXBHL2SgzcCBxf16OVRO/w== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -37,25 +37,25 @@ source-map "^0.6.1" yargs "13.1.0" -"@angular/compiler@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.12.tgz#e4e56fc5a45816da832f8df3cfc0e24e019086a5" - integrity sha512-mMpsuq8jD50kKZixYRqhoIl9hNRlkrsUeGWLW0NJlVCErH89B4jhF1w2tGG4WbRvFPyaw+NfuvcGFViGXwjpMw== +"@angular/compiler@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.13.tgz#01613ea39bda122fc40fdf99f26bb36876eef6de" + integrity sha512-ZyfL3a5wf71E/ZVTVynt3uakQLw+Do0Zy2rXJJ1K42w0E6F/RH5dMcr2mc/VnSpeYKE9JvVqTKVA7xgQ0CN+mw== -"@angular/core@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.12.tgz#4eb12f50feda8ea3cb342ee456403a547afb5c2f" - integrity sha512-+QZqp7uVVLKoTgZ4yM8haX56D2Zo3Za4mSFhFtci3CacfGxzf3lxS57IcjWJUOplbA2DaCv5nPYbQTBh5zKKFQ== +"@angular/core@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.13.tgz#172194fb4a5f71dca71d0725a22553abaf26d40b" + integrity sha512-qilnSavpL7boJ2cCd0tVtdDaAZm4jGPeX8OHX2DiaD1anXzJckizCoEcyirAyMCf04lOS6ekA8ccWatN1ueLMg== -"@angular/forms@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.12.tgz#3cd7dc2cb79ac19a59e644340746094bd752815a" - integrity sha512-sVKIXAJZWckANltsVEeW0YXwl4LPu6MQlZqLyOq0HVCZiWuCBmHB4Y56uFXWFCO7lwqTu5cJPvdA3vuRhobnTQ== +"@angular/forms@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.13.tgz#0055daebbb58dc3afa3d38853859c7b9145c11c1" + integrity sha512-/mNYmKUC/7eb9OEZ+wGxaINiPz9vp+s2xDs4b/mbYfKmCTtZZiUj9aujSVlzwSMu81/zq+vu2JgqSQuAh1dlxA== -"@angular/localize@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.12.tgz#da06ba36335b859faefc50734e1af8a536c9d602" - integrity sha512-TWhViKeyygm51KyFCiOaRw8lhW3ouHbL/NcFUQyf195GplCpTOJftWj2PF22JQuFk1dyC0OKv8vIa46bxPkPlw== +"@angular/localize@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.13.tgz#94a0002c535bc1a211c75f96a03245a3c0d07cac" + integrity sha512-AVbLYQeKz95St99jTXBITMCxUzEOwBfwW9ckVZtA9jO7lYzPmCXEYdbRVcmJkrCPDt39cE2qjNQbYCvcpbvVEw== dependencies: "@babel/core" "^7.5.5" glob "7.1.2" @@ -68,33 +68,33 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.12.tgz#8ba9555be9afcb884cb0767e48793f75e3b2cb39" - integrity sha512-BcGd8ooMQ+mS/UZmQUDHc5jxDiZs3U/YveK+auVtyOBLkaiRUVv5SAifKRN1N0SKNecFoIg+qXwbO1TKDRgZmA== +"@angular/platform-browser-dynamic@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.13.tgz#ca6f6465b41da2de767d37b69ec697c3c9c6580c" + integrity sha512-S2hVWYnN8PqaB3q9O360WgbrnJAuZ5uDpDvIv9rIydPx9W10yjiYJfCvYvPpFZwwyPyDYGwP/+XKw2Y7UXJZ7A== -"@angular/platform-browser@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.12.tgz#244fdb3063624ecc760999fe4e4a5b8f96d83a33" - integrity sha512-Ad1SQ1OHUp+8MD2XOQ3iKb0BF8KTj55Bg73hgDcMz7zRx2E2lTdCUYhcLV8acLfGEe7jwaqExD3wPOBFdT4AeA== +"@angular/platform-browser@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.13.tgz#f2419a72c5b729ea3be879ac0909a1ce9bda0cdb" + integrity sha512-dBkX60pKmJDQFWgZrnPle2cUWbIemaYYWE+sB5PZux9Ci9B88Ldy5+x3HSzIaK5d10vk0wtdDf1NnRdD5xRNCw== -"@angular/platform-server@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.12.tgz#83204fddaeba89faf1c2ffdbdc4b23679af72cba" - integrity sha512-mWu+CKlFQxz3crUfbk9bbUCeQMen2DEMyBUJZ/0CnVVdfbCbc6yF9rzD6zD8m+cKFIMwRkGGYXfiABDOHSwnsA== +"@angular/platform-server@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.13.tgz#a40b51d9f37c5a497cfd9a0b10158de2f2b731ce" + integrity sha512-SAZjJ+v0KyDNMQlxnMyyOVltPwUbK20PvvB0bC8qRwuPIqK29EI2lF9MtKIrECVz/KLqfYwiFuVVt4GrzavXfA== dependencies: domino "^2.1.2" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.12.tgz#f3cfe7995a31817086ad014b720f8b8255584039" - integrity sha512-0ko2VuSMjgY023SXLBhPUqfVqluTpOiBGU81nljcifUbduIvSAWyyBvX7wcNILQ50WtHqT67xXZEnaNUbxBAog== +"@angular/router@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.13.tgz#fbee3c0afdb816b43bf356a60a8a5c00056a8d92" + integrity sha512-elF3EUadvGvoLuKThLdDZOyTfTNXdjzsrpsjg6xyqOf55LUVF7rZqFgvTKU6TNlgGLtasNVqnMte4EX7jugFxg== -"@angular/service-worker@9.0.0-next.12": - version "9.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.12.tgz#3a75638327773d9dabfc312371af86a4855acfcd" - integrity sha512-sS06WAA63yMIdwE38WjqMvvaFgFKcthqgnU8K2i79rqRO68hm3BqVIoM2erHr+fbJ03fByr5BJZAr2HS5dRitQ== +"@angular/service-worker@9.0.0-next.13": + version "9.0.0-next.13" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.13.tgz#13bd416fe8a40f6752ed9032a51762bff3ec767f" + integrity sha512-EuSLRIiSubsCxVBjlDVrM3fK+2IMQS35mtk08ccpoca3MOaVJ1C1vmq9zH7eq2oeQ+C1Qi6o78rD9E06DGjMyw== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" @@ -2639,7 +2639,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001004: +caniuse-lite@1.0.30001004, caniuse-lite@^1.0.30001004: version "1.0.30001004" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d879b73981b255488316da946c39327d8c00a586" integrity sha512-3nfOR4O8Wa2RWoYfJkMtwRVOsK96TQ+eq57wd0iKaEWl8dwG4hKZ/g0MVBfCvysFvMLi9fQGR/DvozMdkEPl3g== @@ -2649,11 +2649,6 @@ caniuse-lite@^1.0.30000999: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001002.tgz#ba999a737b1abd5bf0fd47efe43a09b9cadbe9b0" integrity sha512-pRuxPE8wdrWmVPKcDmJJiGBxr6lFJq4ivdSeo9FTmGj5Rb8NX3Mby2pARG57MXF15hYAhZ0nHV5XxT2ig4bz3g== -caniuse-lite@^1.0.30001004: - version "1.0.30001004" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d879b73981b255488316da946c39327d8c00a586" - integrity sha512-3nfOR4O8Wa2RWoYfJkMtwRVOsK96TQ+eq57wd0iKaEWl8dwG4hKZ/g0MVBfCvysFvMLi9fQGR/DvozMdkEPl3g== - canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" From 12f08751512798967f66bc3d8adc2b597e5f7b62 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 24 Oct 2019 22:32:05 +0000 Subject: [PATCH 0390/1070] build: update verdaccio to version 4.3.4 --- package.json | 2 +- yarn.lock | 117 +++++++++++++++++++++++++++------------------------ 2 files changed, 62 insertions(+), 57 deletions(-) diff --git a/package.json b/package.json index d16914b7d6af..903dc0e0d3b7 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "ts-node": "^5.0.0", "tslint-no-circular-imports": "^0.7.0", "tslint-sonarts": "1.9.0", - "verdaccio": "4.3.3" + "verdaccio": "4.3.4" }, "husky": { "hooks": { diff --git a/yarn.lock b/yarn.lock index 9b7de923aa21..57b3be99d62c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1387,10 +1387,10 @@ "@types/webpack-sources" "*" source-map "^0.6.0" -"@verdaccio/commons-api@8.1.2", "@verdaccio/commons-api@^8.1.2": - version "8.1.2" - resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-8.1.2.tgz#725b04dad6c09f6d9c3d6a9ca83fbb9d55f6dae1" - integrity sha512-voJIpdikrSe6aWpRmGoyHGIB0mUgLyNe5oz+jBH81G0/8VsFiIEXye2WTJ4vmEGsZV3tsitMfJM0x+H+uFpE4Q== +"@verdaccio/commons-api@8.2.0", "@verdaccio/commons-api@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-8.2.0.tgz#0ed20a7feba6af02bc525f36c46834971b9fd0a7" + integrity sha512-dypbrd/3gmuAfLW3cUdkQ0NwQdtrGfEjv4qJ+Qw6/jnNf7goGmI/94XwqgIAZdmPN+JH99r7kwa9qHtfUyYWvA== dependencies: http-errors "1.7.3" @@ -1401,39 +1401,39 @@ dependencies: lockfile "1.0.4" -"@verdaccio/file-locking@^8.1.2": - version "8.1.2" - resolved "https://registry.yarnpkg.com/@verdaccio/file-locking/-/file-locking-8.1.2.tgz#6f529a54ad2fa3558068e8c3e8241c6502ec6763" - integrity sha512-23fer5+B+Y254MzHoCvPiqDbB9QEzlDau7Gj/L2vQbFjjVnnBMv85PCokWDU7EguF2mvhjkZ5U4Zoo6bZ5PRKw== +"@verdaccio/file-locking@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@verdaccio/file-locking/-/file-locking-8.2.0.tgz#d6c76315fdf4022ae453f92ac12f1cf4d5a64f1c" + integrity sha512-s3gzuRWN2IgaEUPtwsnB24gRRVFaD26fbh+32RN7hcxlqCtZh8s7spKu5cFYCxtyoYkFVFxn3PsJcWkGaKda7Q== dependencies: lockfile "1.0.4" -"@verdaccio/local-storage@8.1.2": - version "8.1.2" - resolved "https://registry.yarnpkg.com/@verdaccio/local-storage/-/local-storage-8.1.2.tgz#27564856856808bb019ff0453745d25bea04074a" - integrity sha512-49j5nyB7+At3ho/eMBF6WB+Wz0H90MOzvzx8pS+J1rBoqY+nkyeR4iYG7I+kbWCcRjp7aDpwN5djGPyV8ZEsXw== +"@verdaccio/local-storage@8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@verdaccio/local-storage/-/local-storage-8.2.0.tgz#d09406b8738e949ff247fef71386de0e8a1de0f1" + integrity sha512-gIamhfr7TwXAmOv/2NNr/Cisr9UextH/8w3qPnzdAMuZWAyquiZK9/z/DLDZm04H9A6pP9oaSfjXydUVeD4ZYg== dependencies: - "@verdaccio/commons-api" "^8.1.2" - "@verdaccio/file-locking" "^8.1.2" - "@verdaccio/streams" "^8.1.2" + "@verdaccio/commons-api" "^8.2.0" + "@verdaccio/file-locking" "^8.2.0" + "@verdaccio/streams" "^8.2.0" async "3.1.0" level "5.0.1" lodash "4.17.15" mkdirp "0.5.1" -"@verdaccio/readme@8.1.2": - version "8.1.2" - resolved "https://registry.yarnpkg.com/@verdaccio/readme/-/readme-8.1.2.tgz#1022e7bced4c91f0712b66792528b00761ea8031" - integrity sha512-FVa5WQttsf8rLRK3IA/VZD9UWhHAdK/UEcKL0zP+EFqiXQTADYuIPgdLtSeC1w4LTUAUu2Qv05D2vimTAabFKA== +"@verdaccio/readme@8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@verdaccio/readme/-/readme-8.2.0.tgz#a1628f633c46fe86e8b5d55fbba44aba11d23e33" + integrity sha512-fII0jdixadOkQFtFktZw3EMyYGvTs2nzhlkGM9WZfv4QH2pVVmrfx1E9sqBrKLHUvwgrO8sDfcC8wHJQ6tsNVw== dependencies: - dompurify "2.0.3" - jsdom "15.1.1" + dompurify "2.0.7" + jsdom "15.2.0" marked "0.7.0" -"@verdaccio/streams@8.1.2", "@verdaccio/streams@^8.1.2": - version "8.1.2" - resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-8.1.2.tgz#0f74d967415b260b728b35caf05992fdb5bb5fe9" - integrity sha512-mh7qeYFNNt7MtxPZXs8JLs5lwxob1mELNEc6aA3ZHhg90PCKM7v9fzylWZgbsn0XSzTKltosQ/dqYUQvDCd0Dg== +"@verdaccio/streams@8.2.0", "@verdaccio/streams@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-8.2.0.tgz#3135945bd8445b2af27ea888eb9989071df9afa9" + integrity sha512-gwMHKVoJMWuI6dMxrekiv1gcNEpll/K6uj4juOjTwhp6IULUDbza7T6FHj3I5p5zxREEkiNGnCWmZki0437qEQ== "@verdaccio/ui-theme@0.3.2": version "0.3.2" @@ -1662,7 +1662,7 @@ acorn@^5.0.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.1.1, acorn@^6.2.1: +acorn@^6.0.1, acorn@^6.2.1: version "6.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== @@ -3423,17 +3423,22 @@ cssesc@^0.1.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q= -cssom@0.3.x, cssom@^0.3.6: +cssom@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.1.tgz#b24111d236b6dbd00cdfacb5ab67a20473381fe3" + integrity sha512-6Aajq0XmukE7HdXUU6IoSWuH1H6gH9z6qmagsstTiN7cW2FNTsb+J2Chs+ufPgZCsV/yo8oaEudQLrb9dGxSVQ== + +cssom@~0.3.6: version "0.3.8" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssstyle@^1.2.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" - integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== +cssstyle@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.0.0.tgz#911f0fe25532db4f5d44afc83f89cc4b82c97fe3" + integrity sha512-QXSAu2WBsSRXCPjvI43Y40m6fMevvyRm8JVAuF9ksQz5jha4pWP1wpaK7Yu5oLFc6+XAY+hj8YhefyXcBB53gg== dependencies: - cssom "0.3.x" + cssom "~0.3.6" cuint@^0.2.2: version "0.2.2" @@ -3809,10 +3814,10 @@ domino@^2.1.2: resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.3.tgz#0ca1ad02cbd316ebe2e99e0ac9fb0010407d4601" integrity sha512-EwjTbUv1Q/RLQOdn9k7ClHutrQcWGsfXaRQNOnM/KgK4xDBoLFEcIRFuBSxAx13Vfa63X029gXYrNFrSy+DOSg== -dompurify@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.0.3.tgz#5cc4965a487d54aedba6ba9634b137cfbd7eb50d" - integrity sha512-q006uOkD2JGSJgF0qBt7rVhUvUPBWCxpGayALmHvXx2iNlMfNVz7PDGeXEUjNGgIDjADz59VZCv6UE3U8XRWVw== +dompurify@2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.0.7.tgz#f8266ad38fe1602fb5b3222f31eedbf5c16c4fd5" + integrity sha512-S3O0lk6rFJtO01ZTzMollCOGg+WAtCwS3U5E2WSDY/x/sy7q70RjEC4Dmrih5/UqzLLB9XoKJ8KqwBxaNvBu4A== dot-prop@^3.0.0: version "3.0.0" @@ -5995,17 +6000,17 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@15.1.1: - version "15.1.1" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.1.1.tgz#21ed01f81d95ef4327f3e564662aef5e65881252" - integrity sha512-cQZRBB33arrDAeCrAEWn1U3SvrvC8XysBua9Oqg1yWrsY/gYcusloJC3RZJXuY5eehSCmws8f2YeliCqGSkrtQ== +jsdom@15.2.0: + version "15.2.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.2.0.tgz#4baead4f464e733533ed6ac607ce440918cf5cbb" + integrity sha512-+hRyEfjRPFwTYMmSQ3/f7U9nP8ZNZmbkmUek760ZpxnCPWJIhaaLRuUSvpJ36fZKCGENxLwxClzwpOpnXNfChQ== dependencies: abab "^2.0.0" - acorn "^6.1.1" + acorn "^7.1.0" acorn-globals "^4.3.2" array-equal "^1.0.0" - cssom "^0.3.6" - cssstyle "^1.2.2" + cssom "^0.4.1" + cssstyle "^2.0.0" data-urls "^1.1.0" domexception "^1.0.1" escodegen "^1.11.1" @@ -10769,10 +10774,10 @@ verdaccio-audit@8.1.4: express "4.17.1" request "2.88.0" -verdaccio-htpasswd@8.1.2: - version "8.1.2" - resolved "https://registry.yarnpkg.com/verdaccio-htpasswd/-/verdaccio-htpasswd-8.1.2.tgz#594c97eb33e260a699861411235cca3e018d14be" - integrity sha512-GZGnToJ80Cd3qYE2upNxcq6M35wlDCW+iqe9sCooqH0gLo+C3TUTJw54Y6zC1qtlnTV29Bhf07ODr1j5IS6dcA== +verdaccio-htpasswd@8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/verdaccio-htpasswd/-/verdaccio-htpasswd-8.2.0.tgz#fc942bf1e5aab698782b704a6494fc62ef311954" + integrity sha512-ukbKWzH4DtsNH9NF9wKo0axU/uupudANcuG7Hc1FL/PopOq7Z1rLRF7MgA+P8BJGnwaZRB4pq32hblM931AEWg== dependencies: "@verdaccio/file-locking" "1.0.0" apache-md5 "1.1.2" @@ -10780,15 +10785,15 @@ verdaccio-htpasswd@8.1.2: http-errors "1.7.3" unix-crypt-td-js "1.0.0" -verdaccio@4.3.3: - version "4.3.3" - resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.3.3.tgz#4a3e462dc88da9afed22b1a91aa47dc818b110af" - integrity sha512-XE86BmCRVh6qghyO+v9o4VyydvJ/A/AFQul6wzo/tRriQxuOLFdsmVvAd8tZNqE4FKSXowTqQtABmKYB2cBNZw== +verdaccio@4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/verdaccio/-/verdaccio-4.3.4.tgz#236527d579379eadc18f8aaa444cbd63d995de13" + integrity sha512-qoz52LvEqAiR7KVUttMn0/S02TeTSB5LSEhcM+JaQXDZzOSEjMOj+45gTeWR+GbmLL0Ug+njgEPHF/LH4EjZmA== dependencies: - "@verdaccio/commons-api" "8.1.2" - "@verdaccio/local-storage" "8.1.2" - "@verdaccio/readme" "8.1.2" - "@verdaccio/streams" "8.1.2" + "@verdaccio/commons-api" "8.2.0" + "@verdaccio/local-storage" "8.2.0" + "@verdaccio/readme" "8.2.0" + "@verdaccio/streams" "8.2.0" "@verdaccio/ui-theme" "0.3.2" JSONStream "1.3.5" async "3.1.0" @@ -10818,7 +10823,7 @@ verdaccio@4.3.3: request "2.87.0" semver "6.3.0" verdaccio-audit "8.1.4" - verdaccio-htpasswd "8.1.2" + verdaccio-htpasswd "8.2.0" verror@1.10.0: version "1.10.0" From bf03a736b37c1a3076108bb9c512f602c16b44a0 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 25 Oct 2019 05:24:01 +0000 Subject: [PATCH 0391/1070] build: update autoprefixer to version 9.7.0 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 26 +++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 7af9aab72957..f379c3973032 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -16,7 +16,7 @@ "@babel/preset-env": "7.6.3", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", - "autoprefixer": "9.6.5", + "autoprefixer": "9.7.0", "browserslist": "4.7.2", "cacache": "13.0.1", "caniuse-lite": "1.0.30001004", diff --git a/yarn.lock b/yarn.lock index 57b3be99d62c..26c8e9edf3ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2001,7 +2001,20 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.6.5, autoprefixer@^9.6.5: +autoprefixer@9.7.0: + version "9.7.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.0.tgz#905ec19e50f04545fe9ff131182cc9ab25246901" + integrity sha512-j2IRvaCfrUxIiZun9ba4mhJ2omhw4OY88/yVzLO+lHhGBumAAK72PgM6gkbSN8iregPOn1ZlxGkmZh2CQ7X4AQ== + dependencies: + browserslist "^4.7.2" + caniuse-lite "^1.0.30001004" + chalk "^2.4.2" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.19" + postcss-value-parser "^4.0.2" + +autoprefixer@^9.6.5: version "9.6.5" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.5.tgz#98f4afe7e93cccf323287515d426019619775e5e" integrity sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g== @@ -2373,7 +2386,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.2: +browserslist@4.7.2, browserslist@^4.7.2: version "4.7.2" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.2.tgz#1bb984531a476b5d389cedecb195b2cd69fb1348" integrity sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw== @@ -8187,6 +8200,15 @@ postcss@7.0.18, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.18, postcss@^7.0.2: source-map "^0.6.1" supports-color "^6.1.0" +postcss@^7.0.19: + version "7.0.20" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.20.tgz#a107b68ef1ad1c5e6e214ebb3c5ede2799322837" + integrity sha512-VOdO3a5nHVftPSEbG1zaG320b4mH5KAflH+pIeVAF5/hlw6YumELSgHZQBekjg29Oj4qw7XAyp9tIEBpeNWcyg== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" From 125847ba2ccada0895e56123bed86f70f63bdb67 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 25 Oct 2019 21:38:15 +0200 Subject: [PATCH 0392/1070] test: fix platform server e2e test --- tests/legacy-cli/e2e/ng-snapshot/package.json | 1 + .../build/build-app-shell-with-schematic.ts | 2 +- .../e2e/tests/build/build-app-shell.ts | 3 +- .../e2e/tests/build/platform-server.ts | 2 +- .../e2e/tests/i18n/ivy-localize-server.ts | 28 +++++++++++++------ 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 1706e4f9c36c..640048cc6173 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -12,6 +12,7 @@ "@angular/localize": "github:angular/localize-builds#33c7636c27a4f147607cf5a9dbf8cc1f7235da99", "@angular/platform-browser": "github:angular/platform-browser-builds#ce1e659ca1354adb43047933dcd4197cbd96174f", "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d8664790dc89a1d30cf18788479cd5ccb1fb5ee6", + "@angular/platform-server": "github:angular/platform-server-builds#278e7555b936edf9d9292f75e67ba5b233bd285a", "@angular/router": "github:angular/router-builds#f75458fdef2ef233080332e0a96f4d0cbfad93e9" } } \ No newline at end of file diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts index f610c4d2bcc7..6f5c87f12b84 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell-with-schematic.ts @@ -11,7 +11,7 @@ export default async function () { await updateJsonFile('package.json', packageJson => { const dependencies = packageJson['dependencies']; dependencies['@angular/platform-server'] = getGlobalVariable('argv')['ng-snapshots'] - ? 'github:angular/platform-server-builds' + ? require('../../ng-snapshot/package.json').dependencies['@angular/platform-server'] : readNgVersion(); }); diff --git a/tests/legacy-cli/e2e/tests/build/build-app-shell.ts b/tests/legacy-cli/e2e/tests/build/build-app-shell.ts index 796ea16e1395..e74e4f1de8c0 100644 --- a/tests/legacy-cli/e2e/tests/build/build-app-shell.ts +++ b/tests/legacy-cli/e2e/tests/build/build-app-shell.ts @@ -9,7 +9,8 @@ export default function() { let platformServerVersion = readNgVersion(); if (getGlobalVariable('argv')['ng-snapshots']) { - platformServerVersion = 'github:angular/platform-server-builds'; + platformServerVersion = require('../../ng-snapshot/package.json') + .dependencies['@angular/platform-server']; } return Promise.resolve() diff --git a/tests/legacy-cli/e2e/tests/build/platform-server.ts b/tests/legacy-cli/e2e/tests/build/platform-server.ts index d9fb520a7f2c..75096038424c 100644 --- a/tests/legacy-cli/e2e/tests/build/platform-server.ts +++ b/tests/legacy-cli/e2e/tests/build/platform-server.ts @@ -14,7 +14,7 @@ export default async function () { await updateJsonFile('package.json', packageJson => { const dependencies = packageJson['dependencies']; dependencies['@angular/platform-server'] = getGlobalVariable('argv')['ng-snapshots'] - ? 'github:angular/platform-server-builds' + ? require('../../ng-snapshot/package.json').dependencies['@angular/platform-server'] : readNgVersion(); }); diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts index 835e55fdebac..860cc0abc079 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts @@ -9,23 +9,34 @@ import { replaceInFile, writeFile, } from '../../utils/fs'; -import { ng, npm } from '../../utils/process'; +import { ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { expectToFail } from '../../utils/utils'; import { readNgVersion } from '../../utils/version'; +const snapshots = require('../../ng-snapshot/package.json'); + export default async function () { - let localizeVersion = '@angular/localize@' + readNgVersion(); - if (getGlobalVariable('argv')['ng-snapshots']) { - localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; - } + const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots']; - await npm('install', `${localizeVersion}`); + await updateJsonFile('package.json', packageJson => { + const dependencies = packageJson['dependencies']; + dependencies['@angular/localize'] = isSnapshotBuild + ? snapshots.dependencies['@angular/localize'] + : readNgVersion(); + }); // Add universal to the project - await ng('add', '@nguniversal/express-engine@9.0.0-next.6'); + await ng('add', '@nguniversal/express-engine@9.0.0-next.6', '--skip-install'); + + if (isSnapshotBuild) { + await updateJsonFile('package.json', packageJson => { + const dependencies = packageJson['dependencies']; + dependencies['@angular/platform-server'] = snapshots.dependencies['@angular/platform-server']; + }); + } - await npm('run', 'webdriver-update'); + await silentNpm('install'); const serverbaseDir = 'dist/test-project/server'; const serverBuildArgs = ['run', 'test-project:server']; @@ -34,7 +45,6 @@ export default async function () { const langTranslations = [ { lang: 'en-US', translation: 'Hello i18n!' }, { lang: 'fr', translation: 'Bonjour i18n!' }, - { lang: 'de', translation: 'Hallo i18n!' }, ]; await updateJsonFile('angular.json', workspaceJson => { From ef77ce3b10f804891b6006a619f110ba2d400c9a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 25 Oct 2019 15:58:46 +0000 Subject: [PATCH 0393/1070] build: update postcss to version 7.0.21 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index f379c3973032..03e8ee28b5cb 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -39,7 +39,7 @@ "minimatch": "3.0.4", "parse5": "4.0.0", "open": "7.0.0", - "postcss": "7.0.18", + "postcss": "7.0.21", "postcss-import": "12.0.1", "postcss-loader": "3.0.0", "raw-loader": "3.1.0", diff --git a/yarn.lock b/yarn.lock index 26c8e9edf3ac..25e25682dfa2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8191,7 +8191,16 @@ postcss-value-parser@^4.0.2: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== -postcss@7.0.18, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.18, postcss@^7.0.2: +postcss@7.0.21: + version "7.0.21" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" + integrity sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.18, postcss@^7.0.2: version "7.0.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== From dd4bc23a48b3937a48acbe205f88cccabddf4b80 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 25 Oct 2019 13:22:07 -0400 Subject: [PATCH 0394/1070] fix(@angular-devkit/build-angular): keep licenses if extraction is disabled --- .../models/webpack-configs/common.ts | 3 ++- .../test/browser/bundle-budgets_spec_large.ts | 1 + .../e2e/tests/build/extract-licenses.ts | 25 ++++++++++++------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 7353eea88e26..600ecf2f48f3 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -380,7 +380,8 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { safari10: true, output: { ecma: terserEcma, - comments: false, + // default behavior (undefined value) is to keep only important comments (licenses, etc.) + comments: !buildOptions.extractLicenses && undefined, webkit: true, }, // On server, we don't want to compress anything. We still set the ngDevMode = false for it diff --git a/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts index 2ce1a5691e41..61a723c93ba7 100644 --- a/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/bundle-budgets_spec_large.ts @@ -130,6 +130,7 @@ describe('Browser Builder bundle budgets', () => { it(`when 'bundle' budget`, async () => { const overrides = { optimization: true, + extractLicenses: true, budgets: [{ type: 'bundle', name: 'main', maximumError: '3Kb' }], }; diff --git a/tests/legacy-cli/e2e/tests/build/extract-licenses.ts b/tests/legacy-cli/e2e/tests/build/extract-licenses.ts index 73ec571dc25b..b809def92767 100644 --- a/tests/legacy-cli/e2e/tests/build/extract-licenses.ts +++ b/tests/legacy-cli/e2e/tests/build/extract-licenses.ts @@ -1,12 +1,19 @@ -import {join} from 'path'; -import {expectFileToExist} from '../../utils/fs'; -import {expectToFail} from '../../utils/utils'; -import {ng} from '../../utils/process'; +import { expectFileToExist, expectFileToMatch } from '../../utils/fs'; +import { ng } from '../../utils/process'; +import { expectToFail } from '../../utils/utils'; -export default function() { - // TODO(architect): Delete this test. It is now in devkit/build-angular. +export default async function() { + // Licenses should be left intact if extraction is disabled + await ng('build', '--prod', '--extract-licenses=false', '--output-hashing=none'); - return ng('build', '--prod', '--extract-licenses=false') - .then(() => expectFileToExist(join(process.cwd(), 'dist'))) - .then(() => expectToFail(() => expectFileToExist('dist/test-project/3rdpartylicenses.txt'))); + await expectToFail(() => expectFileToExist('dist/test-project/3rdpartylicenses.txt')); + await expectFileToMatch('dist/test-project/main-es2015.js', '@license'); + await expectFileToMatch('dist/test-project/main-es5.js', '@license'); + + // Licenses should be removed if extraction is enabled + await ng('build', '--prod', '--extract-licenses', '--output-hashing=none'); + + await expectFileToExist('dist/test-project/3rdpartylicenses.txt'); + await expectToFail(() => expectFileToMatch('dist/test-project/main-es2015.js', '@license')); + await expectToFail(() => expectFileToMatch('dist/test-project/main-es5.js', '@license')); } From 3f7079038dd4bfed623ec6c667a120a8be82d035 Mon Sep 17 00:00:00 2001 From: vikerman Date: Fri, 25 Oct 2019 15:26:03 -0700 Subject: [PATCH 0395/1070] release: v9.0.0-next.16 --- packages/schematics/angular/utility/latest-versions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 5a89d34ef550..51335c3f578e 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,9 +15,9 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.15', - DevkitBuildNgPackagr: '~0.900.0-next.15', - DevkitBuildWebpack: '~0.900.0-next.15', + DevkitBuildAngular: '~0.900.0-next.16', + DevkitBuildNgPackagr: '~0.900.0-next.16', + DevkitBuildWebpack: '~0.900.0-next.16', ngPackagr: '^9.0.0-rc.0', }; From d4dc16fa28ecc82a5e408018130407ecb83044a0 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 25 Oct 2019 20:11:21 -0400 Subject: [PATCH 0396/1070] fix(@angular/cli): support prerelease CLI versions when bootstrapping update --- packages/angular/cli/commands/update-impl.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index df1c21970ac2..286b5f2bc854 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -195,14 +195,14 @@ export class UpdateCommand extends Command { // tslint:disable-next-line:no-big-function async run(options: UpdateCommandSchema & Arguments) { // Check if the current installed CLI version is older than the latest version. - if (await this.checkCLILatestVersion(options.verbose)) { + if (await this.checkCLILatestVersion(options.verbose, options.next)) { this.logger.warn( 'The installed Angular CLI version is older than the latest published version.\n' + 'Installing a temporary version to perform the update.', ); return runTempPackageBin( - '@angular/cli@latest', + `@angular/cli@${options.next ? 'next' : 'latest'}`, this.logger, this.packageManager, process.argv.slice(2), @@ -613,11 +613,11 @@ export class UpdateCommand extends Command { * Checks if the current installed CLI version is older than the latest version. * @returns `true` when the installed version is older. */ - private async checkCLILatestVersion(verbose = false): Promise { + private async checkCLILatestVersion(verbose = false, next = false): Promise { const { version: installedCLIVersion } = require('../package.json'); const LatestCLIManifest = await fetchPackageManifest( - '@angular/cli@latest', + `@angular/cli@${next ? 'next' : 'latest'}`, this.logger, { verbose, From dfc3b7466560bbebadcea49fa0c116674dec1f65 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 25 Oct 2019 21:08:46 -0400 Subject: [PATCH 0397/1070] fix(@angular/cli): return success in update execute migrations function --- packages/angular/cli/commands/update-impl.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 286b5f2bc854..49d6ec2dee53 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -136,7 +136,7 @@ export class UpdateCommand extends Command { collectionPath: string, range: semver.Range, commit = false, - ) { + ): Promise { const collection = this.workflow.engine.createCollection(collectionPath); const migrations = []; @@ -190,6 +190,8 @@ export class UpdateCommand extends Command { this.createCommit(message, []); } } + + return true; } // tslint:disable-next-line:no-big-function @@ -419,14 +421,14 @@ export class UpdateCommand extends Command { '>' + from + ' <=' + (options.to || packageNode.package.version), ); - const result = await this.executeMigrations( + const success = await this.executeMigrations( packageName, migrations, migrationRange, !options.skipCommits, ); - return result ? 1 : 0; + return success ? 0 : 1; } const requests: { From 7424b2efb1de24c2261e22cfeaadac7d1fed5cc9 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 25 Oct 2019 21:22:21 -0400 Subject: [PATCH 0398/1070] fix(@schematics/update): include prerelease peer dependencies with next option --- packages/schematics/update/update/index.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index e5eeb1407deb..cb989c7d2c96 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -114,6 +114,7 @@ function _validateForwardPeerDependencies( infoMap: Map, peers: {[name: string]: string}, logger: logging.LoggerApi, + next: boolean, ): boolean { for (const [peer, range] of Object.entries(peers)) { logger.debug(`Checking forward peer ${peer}...`); @@ -132,7 +133,7 @@ function _validateForwardPeerDependencies( : maybePeerInfo.installed.version; logger.debug(` Range intersects(${range}, ${peerVersion})...`); - if (!semver.satisfies(peerVersion, range)) { + if (!semver.satisfies(peerVersion, range, { includePrerelease: next || undefined })) { logger.error([ `Package ${JSON.stringify(name)} has an incompatible peer dependency to`, `${JSON.stringify(peer)} (requires ${JSON.stringify(range)},`, @@ -152,6 +153,7 @@ function _validateReversePeerDependencies( version: string, infoMap: Map, logger: logging.LoggerApi, + next: boolean, ) { for (const [installed, installedInfo] of infoMap.entries()) { const installedLogger = logger.createChild(installed); @@ -168,7 +170,7 @@ function _validateReversePeerDependencies( // Override the peer version range if it's whitelisted. const extendedRange = _updatePeerVersion(infoMap, peer, range); - if (!semver.satisfies(version, extendedRange)) { + if (!semver.satisfies(version, extendedRange, { includePrerelease: next || undefined })) { logger.error([ `Package ${JSON.stringify(installed)} has an incompatible peer dependency to`, `${JSON.stringify(name)} (requires`, @@ -187,6 +189,7 @@ function _validateReversePeerDependencies( function _validateUpdatePackages( infoMap: Map, force: boolean, + next: boolean, logger: logging.LoggerApi, ): void { logger.debug('Updating the following packages:'); @@ -207,9 +210,9 @@ function _validateUpdatePackages( logger.debug(`${name}...`); const peers = target.packageJson.peerDependencies || {}; - peerErrors = _validateForwardPeerDependencies(name, infoMap, peers, pkgLogger) || peerErrors; + peerErrors = _validateForwardPeerDependencies(name, infoMap, peers, pkgLogger, next) || peerErrors; peerErrors - = _validateReversePeerDependencies(name, target.version, infoMap, pkgLogger) + = _validateReversePeerDependencies(name, target.version, infoMap, pkgLogger, next) || peerErrors; }); @@ -923,7 +926,7 @@ export default function(options: UpdateSchema): Rule { logger.createChild(''), 'warn', ); - _validateUpdatePackages(infoMap, !!options.force, sublog); + _validateUpdatePackages(infoMap, !!options.force, !!options.next, sublog); return _performUpdate(tree, context, infoMap, logger, !!options.migrateOnly, !!options.migrateExternal); } else { From 3cc2499988493aa6df0af6b219bdbd5dec5b5a7c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 25 Oct 2019 21:26:38 -0400 Subject: [PATCH 0399/1070] fix(@schematics/update): missing peer dependencies are now warnings instead of errors --- packages/schematics/update/update/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index cb989c7d2c96..92ab613d0097 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -120,12 +120,12 @@ function _validateForwardPeerDependencies( logger.debug(`Checking forward peer ${peer}...`); const maybePeerInfo = infoMap.get(peer); if (!maybePeerInfo) { - logger.error([ + logger.warn([ `Package ${JSON.stringify(name)} has a missing peer dependency of`, `${JSON.stringify(peer)} @ ${JSON.stringify(range)}.`, ].join(' ')); - return true; + return false; } const peerVersion = maybePeerInfo.target && maybePeerInfo.target.packageJson.version From 31a35ae060dc20eb611c12c842663ca1a8a092ba Mon Sep 17 00:00:00 2001 From: Eusen <179530591@qq.com> Date: Thu, 12 Sep 2019 19:46:24 +0800 Subject: [PATCH 0400/1070] fix(@angular/cli): scoped project names change projects.patternProperties to npm.name.pattern Closes #14797 --- packages/angular/cli/lib/config/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index cdb0ff65b476..8742495f2b4e 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -27,7 +27,7 @@ "projects": { "type": "object", "patternProperties": { - "^[a-zA-Z][.0-9a-zA-Z]*(-[.0-9a-zA-Z]*)*$": { + "^(?:@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$": { "$ref": "#/definitions/project" } }, From 44c74df7e684b53c8493aa9ebd3eb4033b554c3d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 26 Oct 2019 05:23:18 +0000 Subject: [PATCH 0401/1070] build: update @angular/animations to version 9.0.0-next.14 --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 24 ++--- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 24 ++--- yarn.lock | 96 +++++++++---------- 6 files changed, 78 insertions(+), 78 deletions(-) diff --git a/package.json b/package.json index 903dc0e0d3b7..3f3b56135034 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,8 @@ "typescript": "3.6.4" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.13", - "@angular/compiler-cli": "9.0.0-next.13", + "@angular/compiler": "9.0.0-next.14", + "@angular/compiler-cli": "9.0.0-next.14", "@bazel/bazel": "1.0.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.39.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 03e8ee28b5cb..35375dcdaa7c 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -69,20 +69,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.13", + "@angular/animations": "9.0.0-next.14", "@angular/cdk": "8.2.3", - "@angular/common": "9.0.0-next.13", - "@angular/compiler": "9.0.0-next.13", - "@angular/compiler-cli": "9.0.0-next.13", - "@angular/core": "9.0.0-next.13", - "@angular/forms": "9.0.0-next.13", - "@angular/localize": "9.0.0-next.13", + "@angular/common": "9.0.0-next.14", + "@angular/compiler": "9.0.0-next.14", + "@angular/compiler-cli": "9.0.0-next.14", + "@angular/core": "9.0.0-next.14", + "@angular/forms": "9.0.0-next.14", + "@angular/localize": "9.0.0-next.14", "@angular/material": "8.2.3", - "@angular/platform-browser": "9.0.0-next.13", - "@angular/platform-browser-dynamic": "9.0.0-next.13", - "@angular/platform-server": "9.0.0-next.13", - "@angular/router": "9.0.0-next.13", - "@angular/service-worker": "9.0.0-next.13", + "@angular/platform-browser": "9.0.0-next.14", + "@angular/platform-browser-dynamic": "9.0.0-next.14", + "@angular/platform-server": "9.0.0-next.14", + "@angular/router": "9.0.0-next.14", + "@angular/service-worker": "9.0.0-next.14", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 6114b088cef8..e80a865ede55 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^9.0.0-rc.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.13", - "@angular/compiler-cli": "9.0.0-next.13", + "@angular/compiler": "9.0.0-next.14", + "@angular/compiler-cli": "9.0.0-next.14", "@angular-devkit/core": "0.0.0", "ng-packagr": "~9.0.0-rc.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index a78f1e54c925..1829c111b811 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -32,8 +32,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.13", - "@angular/compiler-cli": "9.0.0-next.13", + "@angular/compiler": "9.0.0-next.14", + "@angular/compiler-cli": "9.0.0-next.14", "typescript": "3.6.4", "webpack": "4.41.2" } diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 640048cc6173..21a13ad69ec7 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,17 +2,17 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#f9e18882896dfc7bfdfe988c9705e87b2049c13b", - "@angular/common": "github:angular/common-builds#527a63df7a6d6cdc647a8983e95e55a5f5375ed8", - "@angular/compiler": "github:angular/compiler-builds#e958caec4b2983de90084eea98d14ab0aabcf6aa", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#da9b52d0648234f6af32b9dc007b81bd211b8b7c", - "@angular/core": "github:angular/core-builds#c409b908bea40b83cff6cde113ad76298a144fd2", - "@angular/forms": "github:angular/forms-builds#852f003739638909543e40413237b1aa2c62bc1b", - "@angular/language-service": "github:angular/language-service-builds#894c903a305945da6d14a1e3c1de8ecc683e42d5", - "@angular/localize": "github:angular/localize-builds#33c7636c27a4f147607cf5a9dbf8cc1f7235da99", - "@angular/platform-browser": "github:angular/platform-browser-builds#ce1e659ca1354adb43047933dcd4197cbd96174f", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#d8664790dc89a1d30cf18788479cd5ccb1fb5ee6", - "@angular/platform-server": "github:angular/platform-server-builds#278e7555b936edf9d9292f75e67ba5b233bd285a", - "@angular/router": "github:angular/router-builds#f75458fdef2ef233080332e0a96f4d0cbfad93e9" + "@angular/animations": "github:angular/animations-builds#7b06909c1906f4a371cad19c635fee78dfcd9ff2", + "@angular/common": "github:angular/common-builds#f4185d87ab2515224f600c19e9814d5f5c08cf18", + "@angular/compiler": "github:angular/compiler-builds#91db20e012f28be2cb5096e39f775394d87d4fd4", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#f1302d558edc6f304bf5e6f99c62b7f8c27c548c", + "@angular/core": "github:angular/core-builds#7a155512f81366a6a2b36a2155fbe1506616b4ac", + "@angular/forms": "github:angular/forms-builds#0a8d879faa6ee54505e5f6c1420dd6ecf8d58d91", + "@angular/language-service": "github:angular/language-service-builds#768fc2a9a835b0e7145e1122c8810d9120676676", + "@angular/localize": "github:angular/localize-builds#8af38a1e1eadc0e225ab245b6f5280ba1c7c8f31", + "@angular/platform-browser": "github:angular/platform-browser-builds#8738334db6d241df2b97d4050927839f692ba85b", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#7a821103d013d983f184ae490317da5df13aa439", + "@angular/platform-server": "github:angular/platform-server-builds#7d2302c278b4a1c287084c5fcf4017f5ff29a538", + "@angular/router": "github:angular/router-builds#213ae9e0a5dc0f0498ca3d6fc3c2cd39c9998243" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 25e25682dfa2..4874c2a7eb4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.13.tgz#51c080e8874a0d43214463878cc4b274e8efae0c" - integrity sha512-PLay+vkMpKJB6SNblnuN7RlLdLsdxF2WApTGpLB6yu8OeNYTjXuve20SHOiYkbffgr1qZMXx/mxDcg4AGV60qw== +"@angular/animations@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.14.tgz#9c967be04f7ed1691df48bf4e517172c7d226559" + integrity sha512-5JDFoXcbS9kJWZTxsFatuYwbsCwBb1kAM8WkrCrANgRxJiJ6JDiOMCL9fFmFq8ihKft4QOpuvGoH6UMkAo3mAQ== "@angular/cdk@8.2.3": version "8.2.3" @@ -16,15 +16,15 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.13.tgz#c902c409d066fabc829a3a10e1e2aeb1a13c03bf" - integrity sha512-vViVtqxF7dzYPd+Prs30oUrviQHhp3WIJlbki+aH77CcB66LNl5OvaFzLmnpT6ILpuvJ4GYJIgCi4fcoqC8BNQ== +"@angular/common@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.14.tgz#a83381e097efc05e173f6b39ba8995e85217ae8a" + integrity sha512-2YfiXyn0vconAT6WDlJH/iIlhdt+/utHnHERE3rEKqL4+xfoGsmRJ0+pm7b729/JlWCykDVxfU4msWvl6EC+pw== -"@angular/compiler-cli@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.13.tgz#6c6790165b8ab8c58ecbf4b4bfb95724b23d827c" - integrity sha512-djo983DwKzVBbePWCqlRqs3dvoprE5p/px6c/jwIDp4dxAjBc7YQtJc3jrjuejIUZXBHL2SgzcCBxf16OVRO/w== +"@angular/compiler-cli@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.14.tgz#d455935c191deadaf5b27807b0eb0718b2711ae1" + integrity sha512-5mAnqyMtMwKGMgScJDzNC+VCZXsbOf+/JIoPJFoSgo0J2j4tAQzEUW7Sq2PCdKxQRzz/k5Go8GWEPQeDz0hGRQ== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -37,25 +37,25 @@ source-map "^0.6.1" yargs "13.1.0" -"@angular/compiler@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.13.tgz#01613ea39bda122fc40fdf99f26bb36876eef6de" - integrity sha512-ZyfL3a5wf71E/ZVTVynt3uakQLw+Do0Zy2rXJJ1K42w0E6F/RH5dMcr2mc/VnSpeYKE9JvVqTKVA7xgQ0CN+mw== +"@angular/compiler@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.14.tgz#d590eee10ac0e8d9cd27400f481f5b4553fa533f" + integrity sha512-6DazT5cunWrGu+035l8IfMRadI5Z6vRe2kZoBF8OS8XldYL3cMZCfpY4WEmmcRRM+41r9QP/FTyAbZFQeMTrog== -"@angular/core@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.13.tgz#172194fb4a5f71dca71d0725a22553abaf26d40b" - integrity sha512-qilnSavpL7boJ2cCd0tVtdDaAZm4jGPeX8OHX2DiaD1anXzJckizCoEcyirAyMCf04lOS6ekA8ccWatN1ueLMg== +"@angular/core@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.14.tgz#b13f0771e52ea931bb845a1b040b4e83b47ba70f" + integrity sha512-/NZAqgbSCoEehTqlnEVIcPdb4UWISnetbkEai7F4PLvoqey3T1qiTdcuQkVcZAK2ahhC89y1FgUbR1biatHrnA== -"@angular/forms@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.13.tgz#0055daebbb58dc3afa3d38853859c7b9145c11c1" - integrity sha512-/mNYmKUC/7eb9OEZ+wGxaINiPz9vp+s2xDs4b/mbYfKmCTtZZiUj9aujSVlzwSMu81/zq+vu2JgqSQuAh1dlxA== +"@angular/forms@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.14.tgz#fcb15807d2621e90423eccd59bd5852892d523e0" + integrity sha512-4DpJSU5MCU15Whmcwt+oDOmDUALo1bIagOr0PqhL7ZQqVyuciOGXrQJNMKXvlM0yCZOHlvkDJw/egTmROkfzDg== -"@angular/localize@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.13.tgz#94a0002c535bc1a211c75f96a03245a3c0d07cac" - integrity sha512-AVbLYQeKz95St99jTXBITMCxUzEOwBfwW9ckVZtA9jO7lYzPmCXEYdbRVcmJkrCPDt39cE2qjNQbYCvcpbvVEw== +"@angular/localize@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.14.tgz#c39ff2f5aa7c66de335a426245e7f7bd170edfee" + integrity sha512-ZzjGVaFZwnFL9vVXFwxbcwpK19aKNSbbWAORGozV8c5cTkoc1AxmDS7ZvvDrFmqM15Y1Ju/6GNNQK+skm8Wqgw== dependencies: "@babel/core" "^7.5.5" glob "7.1.2" @@ -68,33 +68,33 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.13.tgz#ca6f6465b41da2de767d37b69ec697c3c9c6580c" - integrity sha512-S2hVWYnN8PqaB3q9O360WgbrnJAuZ5uDpDvIv9rIydPx9W10yjiYJfCvYvPpFZwwyPyDYGwP/+XKw2Y7UXJZ7A== +"@angular/platform-browser-dynamic@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.14.tgz#2c7f6c8374152ec292f48ec57db62763bf5711f9" + integrity sha512-REkbvBOIE4ssmnJI8nOUSvUxm4dVlfqinqgv4sQdV2G8ioJXFtWkqfjAFvR7QU1/Dadaj2Oo+5Yau110V/sbMw== -"@angular/platform-browser@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.13.tgz#f2419a72c5b729ea3be879ac0909a1ce9bda0cdb" - integrity sha512-dBkX60pKmJDQFWgZrnPle2cUWbIemaYYWE+sB5PZux9Ci9B88Ldy5+x3HSzIaK5d10vk0wtdDf1NnRdD5xRNCw== +"@angular/platform-browser@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.14.tgz#b741e583a60bef778f92b285469c2d0d00ab9a7a" + integrity sha512-ZgB9T2hZytqSr7xpYacLgct5WVQ+xKlsrLymK++SffaGKzj0zlkAMj3mVF+12Zec0Ic5NpG8oTIovH+Lk57IuQ== -"@angular/platform-server@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.13.tgz#a40b51d9f37c5a497cfd9a0b10158de2f2b731ce" - integrity sha512-SAZjJ+v0KyDNMQlxnMyyOVltPwUbK20PvvB0bC8qRwuPIqK29EI2lF9MtKIrECVz/KLqfYwiFuVVt4GrzavXfA== +"@angular/platform-server@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.14.tgz#887e948f9da265f88378aa4ec8273b22433ec951" + integrity sha512-CnBa+Q13xDkr0zJlqhiShF1ovqpvOQCkMAKCPaGyByMC24nys8wNKhw/El743TREwZQXTWNfXveboSmqDVrGtA== dependencies: domino "^2.1.2" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.13.tgz#fbee3c0afdb816b43bf356a60a8a5c00056a8d92" - integrity sha512-elF3EUadvGvoLuKThLdDZOyTfTNXdjzsrpsjg6xyqOf55LUVF7rZqFgvTKU6TNlgGLtasNVqnMte4EX7jugFxg== +"@angular/router@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.14.tgz#3d19e351d533657887b87d8c5abe74a56806854d" + integrity sha512-Uv8Bre1JXjHUaFf6v1dtfHKPWhQiZdy/v9ZS5yZyPjX8xX0lBHQKu+Uryo9EyXldwNDIcqxi9/y4Vl+PB5d0/g== -"@angular/service-worker@9.0.0-next.13": - version "9.0.0-next.13" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.13.tgz#13bd416fe8a40f6752ed9032a51762bff3ec767f" - integrity sha512-EuSLRIiSubsCxVBjlDVrM3fK+2IMQS35mtk08ccpoca3MOaVJ1C1vmq9zH7eq2oeQ+C1Qi6o78rD9E06DGjMyw== +"@angular/service-worker@9.0.0-next.14": + version "9.0.0-next.14" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.14.tgz#57fd4993c14f3155dfbeb228b871dea1483066e6" + integrity sha512-RAPzRfxIyq6yIOHYk+vdLxe4HuCS4S6o6+P2SnBJIkpf+do05aPbin4tmEr5rK+3wDa7QP1E14NAgCYxF0b1hA== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" From f9bcd2e114a4069c28e869d5a80c914fdc0cef41 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 26 Oct 2019 05:23:38 +0000 Subject: [PATCH 0402/1070] build: update core-js to version 3.3.4 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 35375dcdaa7c..66ee3fb3d960 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -23,7 +23,7 @@ "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", - "core-js": "3.3.3", + "core-js": "3.3.4", "file-loader": "4.2.0", "find-cache-dir": "3.0.0", "glob": "7.1.5", diff --git a/yarn.lock b/yarn.lock index 4874c2a7eb4f..16b10e389547 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3284,10 +3284,10 @@ core-js-compat@^3.1.1: browserslist "^4.7.1" semver "^6.3.0" -core-js@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.3.tgz#b7048d3c6c1a52b5fe55a729c1d4ccdffe0891bb" - integrity sha512-0xmD4vUJRY8nfLyV9zcpC17FtSie5STXzw+HyYw2t8IIvmDnbq7RJUULECCo+NstpJtwK9kx8S+898iyqgeUow== +core-js@3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.4.tgz#6b0a23392958317bfb46e40b090529a923add669" + integrity sha512-BtibooaAmSOptGLRccsuX/dqgPtXwNgqcvYA6kOTTMzonRxZ+pJS4e+6mvVutESfXMeTnK8m3M+aBu3bkJbR+w== core-js@^2.2.0, core-js@^2.4.0: version "2.6.10" From 769eea19234bcb1392c1935eec8affd032f33f71 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 27 Oct 2019 06:03:00 +0000 Subject: [PATCH 0403/1070] build: update caniuse-lite to version 1.0.30001005 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 66ee3fb3d960..b6e0e2d60c90 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -19,7 +19,7 @@ "autoprefixer": "9.7.0", "browserslist": "4.7.2", "cacache": "13.0.1", - "caniuse-lite": "1.0.30001004", + "caniuse-lite": "1.0.30001005", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", diff --git a/yarn.lock b/yarn.lock index 16b10e389547..190d84b8aa27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2652,16 +2652,21 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001004, caniuse-lite@^1.0.30001004: - version "1.0.30001004" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d879b73981b255488316da946c39327d8c00a586" - integrity sha512-3nfOR4O8Wa2RWoYfJkMtwRVOsK96TQ+eq57wd0iKaEWl8dwG4hKZ/g0MVBfCvysFvMLi9fQGR/DvozMdkEPl3g== +caniuse-lite@1.0.30001005: + version "1.0.30001005" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001005.tgz#823054210be638c725521edcb869435dae46728d" + integrity sha512-g78miZm1Z5njjYR216a5812oPiLgV1ssndgGxITHWUopmjUrCswMisA0a2kSB7a0vZRox6JOKhM51+efmYN8Mg== caniuse-lite@^1.0.30000999: version "1.0.30001002" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001002.tgz#ba999a737b1abd5bf0fd47efe43a09b9cadbe9b0" integrity sha512-pRuxPE8wdrWmVPKcDmJJiGBxr6lFJq4ivdSeo9FTmGj5Rb8NX3Mby2pARG57MXF15hYAhZ0nHV5XxT2ig4bz3g== +caniuse-lite@^1.0.30001004: + version "1.0.30001004" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d879b73981b255488316da946c39327d8c00a586" + integrity sha512-3nfOR4O8Wa2RWoYfJkMtwRVOsK96TQ+eq57wd0iKaEWl8dwG4hKZ/g0MVBfCvysFvMLi9fQGR/DvozMdkEPl3g== + canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" From 2fc322f5704a7b2a3f768a7f50d4dfbbe6879409 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 28 Oct 2019 11:18:24 +0000 Subject: [PATCH 0404/1070] fix(@schematics/update): validate all peer dependencies --- packages/schematics/update/update/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 92ab613d0097..644c7e503209 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -116,6 +116,7 @@ function _validateForwardPeerDependencies( logger: logging.LoggerApi, next: boolean, ): boolean { + let validationFailed = false; for (const [peer, range] of Object.entries(peers)) { logger.debug(`Checking forward peer ${peer}...`); const maybePeerInfo = infoMap.get(peer); @@ -125,7 +126,7 @@ function _validateForwardPeerDependencies( `${JSON.stringify(peer)} @ ${JSON.stringify(range)}.`, ].join(' ')); - return false; + continue; } const peerVersion = maybePeerInfo.target && maybePeerInfo.target.packageJson.version @@ -140,11 +141,12 @@ function _validateForwardPeerDependencies( `would install ${JSON.stringify(peerVersion)})`, ].join(' ')); - return true; + validationFailed = true; + continue; } } - return false; + return validationFailed; } From 6b9507aaa99e54699711e275ce00e7cec6f4ddb8 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 28 Oct 2019 11:48:28 +0000 Subject: [PATCH 0405/1070] fix(@schematics/update): handle peerDependenciesMeta --- packages/schematics/update/update/index.ts | 17 ++++++---- .../schematics/update/update/index_spec.ts | 33 +++++++++++++++++++ 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/packages/schematics/update/update/index.ts b/packages/schematics/update/update/index.ts index 644c7e503209..c177de50cc92 100644 --- a/packages/schematics/update/update/index.ts +++ b/packages/schematics/update/update/index.ts @@ -113,6 +113,7 @@ function _validateForwardPeerDependencies( name: string, infoMap: Map, peers: {[name: string]: string}, + peersMeta: { [name: string]: { optional?: boolean }}, logger: logging.LoggerApi, next: boolean, ): boolean { @@ -120,11 +121,14 @@ function _validateForwardPeerDependencies( for (const [peer, range] of Object.entries(peers)) { logger.debug(`Checking forward peer ${peer}...`); const maybePeerInfo = infoMap.get(peer); + const isOptional = peersMeta[peer] && !!peersMeta[peer].optional; if (!maybePeerInfo) { - logger.warn([ - `Package ${JSON.stringify(name)} has a missing peer dependency of`, - `${JSON.stringify(peer)} @ ${JSON.stringify(range)}.`, - ].join(' ')); + if (!isOptional) { + logger.warn([ + `Package ${JSON.stringify(name)} has a missing peer dependency of`, + `${JSON.stringify(peer)} @ ${JSON.stringify(range)}.`, + ].join(' ')); + } continue; } @@ -211,8 +215,9 @@ function _validateUpdatePackages( const pkgLogger = logger.createChild(name); logger.debug(`${name}...`); - const peers = target.packageJson.peerDependencies || {}; - peerErrors = _validateForwardPeerDependencies(name, infoMap, peers, pkgLogger, next) || peerErrors; + const { peerDependencies = {}, peerDependenciesMeta = {} } = target.packageJson; + peerErrors = _validateForwardPeerDependencies(name, infoMap, peerDependencies, + peerDependenciesMeta, pkgLogger, next) || peerErrors; peerErrors = _validateReversePeerDependencies(name, target.version, infoMap, pkgLogger, next) || peerErrors; diff --git a/packages/schematics/update/update/index_spec.ts b/packages/schematics/update/update/index_spec.ts index e91a726e0363..c8696b2e41d3 100644 --- a/packages/schematics/update/update/index_spec.ts +++ b/packages/schematics/update/update/index_spec.ts @@ -362,4 +362,37 @@ describe('@schematics/update', () => { }), ).toPromise().then(done, done.fail); }, 45000); + + it('validates peer dependencies', done => { + const content = virtualFs.fileBufferToString(host.sync.read(normalize('/package.json'))); + const packageJson = JSON.parse(content); + const dependencies = packageJson['dependencies']; + // TODO: when we start using a local npm registry for test packages, add a package that includes + // a optional peer dependency and a non-optional one for this test. Use it instead of + // @angular-devkit/build-angular, whose optional peerdep is @angular/localize and non-optional + // are typescript and @angular/compiler-cli. + dependencies['@angular-devkit/build-angular'] = '0.900.0-next.1'; + host.sync.write( + normalize('/package.json'), + virtualFs.stringToFileBuffer(JSON.stringify(packageJson)), + ); + + const messages: string[] = []; + schematicRunner.logger.subscribe(x => messages.push(x.message)); + const hasPeerdepMsg = (dep: string) => + messages.some(str => str.includes(`missing peer dependency of "${dep}"`)); + + schematicRunner.runSchematicAsync('update', { + packages: ['@angular-devkit/build-angular'], + next: true, + }, appTree).pipe( + map(() => { + expect(hasPeerdepMsg('@angular/compiler-cli')) + .toBeTruthy(`Should show @angular/compiler-cli message.`); + expect(hasPeerdepMsg('typescript')).toBeTruthy(`Should show typescript message.`); + expect(hasPeerdepMsg('@angular/localize')) + .toBeFalsy(`Should not show @angular/localize message.`); + }), + ).toPromise().then(done, done.fail); + }, 45000); }); From a26921387b6ab8cfd27386a868184c487c4eb82c Mon Sep 17 00:00:00 2001 From: vikerman Date: Mon, 28 Oct 2019 12:02:17 -0700 Subject: [PATCH 0406/1070] release: v9.0.0-next.17 --- packages/schematics/angular/utility/latest-versions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 51335c3f578e..edcca8f6cdf6 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,16 +8,16 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.12', + Angular: '~9.0.0-next.14', RxJs: '~6.5.3', ZoneJs: '~0.10.2', TypeScript: '~3.6.4', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.16', - DevkitBuildNgPackagr: '~0.900.0-next.16', - DevkitBuildWebpack: '~0.900.0-next.16', + DevkitBuildAngular: '~0.900.0-next.17', + DevkitBuildNgPackagr: '~0.900.0-next.17', + DevkitBuildWebpack: '~0.900.0-next.17', ngPackagr: '^9.0.0-rc.0', }; From 5df776780deadb6be5048b3ab006a5d3383650dc Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 28 Oct 2019 16:48:50 -0400 Subject: [PATCH 0407/1070] fix(@angular-devkit/schematics): use NodeWorkflow root to resolve collections --- etc/api/angular_devkit/schematics/tools/index.d.ts | 3 ++- packages/angular/cli/commands/update-impl.ts | 3 +++ packages/angular/cli/models/schematic-command.ts | 5 +++++ .../schematics/tools/node-module-engine-host.ts | 6 +++--- .../schematics/tools/workflow/node-workflow.ts | 3 ++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/etc/api/angular_devkit/schematics/tools/index.d.ts b/etc/api/angular_devkit/schematics/tools/index.d.ts index 74574a2fe9aa..048278d01f70 100644 --- a/etc/api/angular_devkit/schematics/tools/index.d.ts +++ b/etc/api/angular_devkit/schematics/tools/index.d.ts @@ -105,7 +105,7 @@ export declare class InvalidCollectionJsonException extends BaseException { } export declare class NodeModulesEngineHost extends FileSystemEngineHostBase { - constructor(); + constructor(paths?: string[] | undefined); protected _resolveCollectionPath(name: string): string; protected _resolveReferenceString(refString: string, parentPath: string): { ref: RuleFactory<{}>; @@ -136,6 +136,7 @@ export declare class NodeWorkflow extends workflow.BaseWorkflow { root?: Path; packageManager?: string; registry?: schema.CoreSchemaRegistry; + resolvePaths?: string[]; }); } diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 49d6ec2dee53..129c0d72b3c3 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -50,6 +50,9 @@ export class UpdateCommand extends Command { { packageManager: this.packageManager, root: normalize(this.workspace.root), + // __dirname -> favor @schematics/update from this package + // Otherwise, use packages from the active workspace (migrations) + resolvePaths: [__dirname, this.workspace.root], }, ); this.workflow.engineHost.registerOptionsTransform( diff --git a/packages/angular/cli/models/schematic-command.ts b/packages/angular/cli/models/schematic-command.ts index fe7b4417f492..fde5426ca093 100644 --- a/packages/angular/cli/models/schematic-command.ts +++ b/packages/angular/cli/models/schematic-command.ts @@ -253,6 +253,11 @@ export abstract class SchematicCommand< packageManager: await getPackageManager(this.workspace.root), root: normalize(this.workspace.root), registry: new schema.CoreSchemaRegistry(formats.standardFormats), + resolvePaths: !!this.workspace.configFile + // Workspace + ? [process.cwd(), this.workspace.root] + // Global + : [__dirname, process.cwd()], }); workflow.engineHost.registerContextTransform(context => { // This is run by ALL schematics, so if someone uses `externalSchematics(...)` which diff --git a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts index 03a0d1b1e75f..1d864712cafc 100644 --- a/packages/angular_devkit/schematics/tools/node-module-engine-host.ts +++ b/packages/angular_devkit/schematics/tools/node-module-engine-host.ts @@ -37,7 +37,7 @@ export class NodePackageDoesNotSupportSchematics extends BaseException { * A simple EngineHost that uses NodeModules to resolve collections. */ export class NodeModulesEngineHost extends FileSystemEngineHostBase { - constructor() { super(); } + constructor(private readonly paths?: string[]) { super(); } protected _resolveCollectionPath(name: string): string { let collectionPath: string | undefined = undefined; @@ -47,9 +47,9 @@ export class NodeModulesEngineHost extends FileSystemEngineHostBase { if (extname(name)) { // When having an extension let's just resolve the provided path. - collectionPath = require.resolve(name); + collectionPath = require.resolve(name, { paths: this.paths }); } else { - const packageJsonPath = require.resolve(join(name, 'package.json')); + const packageJsonPath = require.resolve(join(name, 'package.json'), { paths: this.paths }); const { schematics } = require(packageJsonPath); if (!schematics || typeof schematics !== 'string') { diff --git a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts index 64022ad3903d..b06e36a4936b 100644 --- a/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts +++ b/packages/angular_devkit/schematics/tools/workflow/node-workflow.ts @@ -25,9 +25,10 @@ export class NodeWorkflow extends workflow.BaseWorkflow { root?: Path; packageManager?: string; registry?: schema.CoreSchemaRegistry; + resolvePaths?: string[], }, ) { - const engineHost = new NodeModulesEngineHost(); + const engineHost = new NodeModulesEngineHost(options.resolvePaths); super({ host, engineHost, From 4d23a0f0d8b190e3ed5fb8a1b44506a7b5e559b2 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 25 Oct 2019 19:34:33 +0100 Subject: [PATCH 0408/1070] fix(@angular-devkit/schematics): hide install output by default Current output: ``` kamik@RED-X1C6 MINGW64 /d/sandbox/latest-app (master) $ ng update @angular/cli --next --force Using package manager: 'yarn' Collecting installed dependencies... Found 30 dependencies. Fetching dependency metadata from registry... Package "@angular-devkit/build-angular" has a missing peer dependency of "@angular/localize" @ "^9.0.0-next.11". Updating package.json with dependency @angular/cli @ "9.0.0-next.15" (was "9.0.0-next.14")... Updating package.json with dependency @angular-devkit/build-angular @ "0.900.0-next.15" (was "0.900.0-next.14")... Updating package.json with dependency typescript @ "3.6.4" (was "3.5.3")... UPDATE package.json (1353 bytes) warning @angular-devkit/build-angular@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/build-optimizer@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @ngtools/webpack@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/architect@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/build-webpack@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/core@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @angular/cli@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @schematics/update@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/schematics@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @schematics/angular@9.0.0-next.15: The engine "pnpm" appears to be invalid. Compiling @angular/animations : es2015 as esm2015 Compiling @angular/compiler/testing : es2015 as esm2015 Compiling @angular/core : es2015 as esm2015 Compiling @angular/common : es2015 as esm2015 Compiling @angular/animations/browser : es2015 as esm2015 Compiling @angular/animations/browser/testing : es2015 as esm2015 Compiling @angular/core/testing : es2015 as esm2015 Compiling @angular/platform-browser : es2015 as esm2015 Compiling @angular/common/testing : es2015 as esm2015 Compiling @angular/platform-browser/testing : es2015 as esm2015 Compiling @angular/platform-browser/animations : es2015 as esm2015 Compiling @angular/common/http : es2015 as esm2015 Compiling @angular/router : es2015 as esm2015 Compiling @angular/forms : es2015 as esm2015 Compiling @angular/platform-browser-dynamic : es2015 as esm2015 Compiling @angular/common/http/testing : es2015 as esm2015 Compiling @angular/router/testing : es2015 as esm2015 Compiling @angular/platform-browser-dynamic/testing : es2015 as esm2015 ``` New success output: ``` kamik@RED-X1C6 MINGW64 /d/sandbox/latest-app (master) $ ng update @angular/cli --next --force Using package manager: 'yarn' Collecting installed dependencies... Found 30 dependencies. Fetching dependency metadata from registry... Package "@angular-devkit/build-angular" has a missing peer dependency of "@angular/localize" @ "^9.0.0-next.11". Updating package.json with dependency @angular/cli @ "9.0.0-next.15" (was "9.0.0-next.14")... Updating package.json with dependency @angular-devkit/build-angular @ "0.900.0-next.15" (was "0.900.0-next.14")... Updating package.json with dependency typescript @ "3.6.4" (was "3.5.3")... UPDATE package.json (1353 bytes) Installing packages... Packages installed successfully. ``` New error output: ``` kamik@RED-X1C6 MINGW64 /d/sandbox/latest-app (master) $ ng update @angular/cli --next --force Using package manager: 'yarn' Collecting installed dependencies... Found 30 dependencies. Fetching dependency metadata from registry... Package "@angular-devkit/build-angular" has a missing peer dependency of "@angular/localize" @ "^9.0.0-next.11". Updating package.json with dependency @angular/cli @ "9.0.0-next.15" (was "9.0.0-next.14")... Updating package.json with dependency @angular-devkit/build-angular @ "0.900.0-next.15" (was "0.900.0-next.14")... Updating package.json with dependency typescript @ "3.6.4" (was "3.5.3")... UPDATE package.json (1353 bytes) Installing packages... warning @angular-devkit/build-angular@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/architect@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/build-optimizer@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @ngtools/webpack@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/core@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/build-webpack@0.900.0-next.15: The engine "pnpm" appears to be invalid. warning @angular/cli@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @schematics/angular@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @angular-devkit/schematics@9.0.0-next.15: The engine "pnpm" appears to be invalid. warning @schematics/update@0.900.0-next.15: The engine "pnpm" appears to be invalid. Compiling @angular/animations : es2015 as esm2015 Compiling @angular/compiler/testing : es2015 as esm2015 Compiling @angular/core : es2015 as esm2015 Compiling @angular/common : es2015 as esm2015 Compiling @angular/animations/browser : es2015 as esm2015 Compiling @angular/animations/browser/testing : es2015 as esm2015 Compiling @angular/core/testing : es2015 as esm2015 Compiling @angular/platform-browser : es2015 as esm2015 Compiling @angular/common/testing : es2015 as esm2015 Compiling @angular/platform-browser/testing : es2015 as esm2015 Compiling @angular/platform-browser/animations : es2015 as esm2015 Compiling @angular/common/http : es2015 as esm2015 Compiling @angular/forms : es2015 as esm2015 Compiling @angular/router : es2015 as esm2015 Compiling @angular/platform-browser-dynamic : es2015 as esm2015 Compiling @angular/common/http/testing : es2015 as esm2015 Compiling @angular/platform-browser-dynamic/testing : es2015 as esm2015 Compiling @angular/router/testing : es2015 as esm2015 Package install failed, see above. ``` --- .../schematics/tasks/index.d.ts | 1 + .../schematics/tasks/node-package/executor.ts | 20 +++++++++++++++---- .../tasks/node-package/install-task.ts | 6 ++++++ .../schematics/tasks/node-package/options.ts | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/etc/api/angular_devkit/schematics/tasks/index.d.ts b/etc/api/angular_devkit/schematics/tasks/index.d.ts index f802db93d246..3dc96f5b9e23 100644 --- a/etc/api/angular_devkit/schematics/tasks/index.d.ts +++ b/etc/api/angular_devkit/schematics/tasks/index.d.ts @@ -1,4 +1,5 @@ export declare class NodePackageInstallTask implements TaskConfigurationGenerator { + hideOutput: boolean; packageManager?: string; packageName?: string; quiet: boolean; diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index 1c7664077265..a2c26d364e30 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -77,10 +77,9 @@ export default function( taskPackageManagerName = options.packageManager; } - const outputStream = process.stdout; - const errorStream = process.stderr; + const bufferedOutput: {stream: NodeJS.WriteStream, data: Buffer}[] = []; const spawnOptions: SpawnOptions = { - stdio: [ process.stdin, outputStream, errorStream ], + stdio: !!options.hideOutput ? 'pipe' : 'inherit', shell: true, cwd: path.join(rootDirectory, options.workingDirectory || ''), }; @@ -100,16 +99,29 @@ export default function( } return new Observable(obs => { - spawn(taskPackageManagerName, args, spawnOptions) + // tslint:disable-next-line: no-console + console.log('Installing packages...'); + const childProcess = spawn(taskPackageManagerName, args, spawnOptions) .on('close', (code: number) => { if (code === 0) { + // tslint:disable-next-line: no-console + console.log('Packages installed successfully.'); obs.next(); obs.complete(); } else { + if (options.hideOutput) { + bufferedOutput.forEach(({ stream, data }) => stream.write(data)); + } const message = 'Package install failed, see above.'; obs.error(new Error(message)); } }); + if (options.hideOutput) { + childProcess.stdout.on('data', (data: Buffer) => + bufferedOutput.push({ stream: process.stdout, data: data })); + childProcess.stderr.on('data', (data: Buffer) => + bufferedOutput.push({ stream: process.stderr, data: data })); + } }); }; diff --git a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts index 21b1cf4142c3..36ebef3d8652 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/install-task.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/install-task.ts @@ -13,10 +13,12 @@ export class NodePackageInstallTaskOptions { packageName: string; workingDirectory: string; quiet: boolean; + hideOutput: boolean; } export class NodePackageInstallTask implements TaskConfigurationGenerator { quiet = true; + hideOutput = true; workingDirectory?: string; packageManager?: string; packageName?: string; @@ -30,6 +32,9 @@ export class NodePackageInstallTask implements TaskConfigurationGenerator Date: Mon, 28 Oct 2019 19:47:14 +0000 Subject: [PATCH 0409/1070] fix(@angular-devkit/schematics): show spinner for package install --- package.json | 1 + packages/angular_devkit/schematics/BUILD | 1 + .../angular_devkit/schematics/package.json | 1 + .../schematics/tasks/node-package/executor.ts | 18 ++++--- yarn.lock | 49 +++++++++++++++++++ 5 files changed, 63 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 3f3b56135034..37a8195560db 100644 --- a/package.json +++ b/package.json @@ -129,6 +129,7 @@ "minimatch": "^3.0.4", "minimist": "^1.2.0", "npm-registry-client": "8.6.0", + "ora": "^4.0.2", "pacote": "^9.2.3", "pidtree": "^0.3.0", "pidusage": "^2.0.17", diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index b98fafa41b83..4ac938335046 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -91,6 +91,7 @@ ts_library( "//packages/angular_devkit/core", "//packages/angular_devkit/core:node", "@npm//@types/node", + "@npm//ora", "@npm//rxjs", "@npm//tslint", "@npm//typescript", diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index 50b161e7f9f0..8519e7f11cc4 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -14,6 +14,7 @@ ], "dependencies": { "@angular-devkit/core": "0.0.0", + "ora": "4.0.2", "rxjs": "6.5.3" } } diff --git a/packages/angular_devkit/schematics/tasks/node-package/executor.ts b/packages/angular_devkit/schematics/tasks/node-package/executor.ts index a2c26d364e30..585ad2950b81 100644 --- a/packages/angular_devkit/schematics/tasks/node-package/executor.ts +++ b/packages/angular_devkit/schematics/tasks/node-package/executor.ts @@ -7,9 +7,10 @@ */ import { BaseException } from '@angular-devkit/core'; import { SpawnOptions, spawn } from 'child_process'; +import * as ora from 'ora'; import * as path from 'path'; import { Observable } from 'rxjs'; -import { TaskExecutor } from '../../src'; +import { TaskExecutor, UnsuccessfulWorkflowExecution } from '../../src'; import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options'; type PackageManagerProfile = { @@ -99,21 +100,24 @@ export default function( } return new Observable(obs => { - // tslint:disable-next-line: no-console - console.log('Installing packages...'); + const spinner = ora({ + text: 'Installing packages...', + // Workaround for https://github.com/sindresorhus/ora/issues/136. + discardStdin: process.platform != 'win32', + }).start(); const childProcess = spawn(taskPackageManagerName, args, spawnOptions) .on('close', (code: number) => { if (code === 0) { - // tslint:disable-next-line: no-console - console.log('Packages installed successfully.'); + spinner.succeed('Packages installed successfully.'); + spinner.stop(); obs.next(); obs.complete(); } else { if (options.hideOutput) { bufferedOutput.forEach(({ stream, data }) => stream.write(data)); } - const message = 'Package install failed, see above.'; - obs.error(new Error(message)); + spinner.fail('Package install failed, see above.'); + obs.error(new UnsuccessfulWorkflowExecution()); } }); if (options.hideOutput) { diff --git a/yarn.lock b/yarn.lock index 190d84b8aa27..90c105fe2687 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2805,6 +2805,11 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-spinners@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77" + integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ== + cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" @@ -2844,6 +2849,11 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + clone@^2.1.1, clone@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" @@ -3628,6 +3638,13 @@ default-require-extensions@^2.0.0: dependencies: strip-bom "^3.0.0" +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + defer-to-connect@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" @@ -5603,6 +5620,11 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" @@ -6677,6 +6699,13 @@ lodash@4.17.15, lodash@^4.16.6, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.1 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + log4js@^3.0.0: version "3.0.6" resolved "https://registry.yarnpkg.com/log4js/-/log4js-3.0.6.tgz#e6caced94967eeeb9ce399f9f8682a4b2b28c8ff" @@ -7681,6 +7710,19 @@ optionator@^0.8.1: type-check "~0.3.2" wordwrap "~1.0.0" +ora@4.0.2, ora@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.0.2.tgz#0e1e68fd45b135d28648b27cf08081fa6e8a297d" + integrity sha512-YUOZbamht5mfLxPmk4M35CD/5DuOkAacxlEUbStVXpBAt4fyhBf+vZHI/HRkI++QUp3sNoeA2Gw4C+hi4eGSig== + dependencies: + chalk "^2.4.2" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + strip-ansi "^5.2.0" + wcwidth "^1.0.1" + original@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" @@ -10917,6 +10959,13 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + webdriver-js-extender@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz#57d7a93c00db4cc8d556e4d3db4b5db0a80c3bb7" From bc89e678ecc49f4eb4d14dbdb49585201cce1d18 Mon Sep 17 00:00:00 2001 From: vikerman Date: Mon, 28 Oct 2019 17:51:54 -0700 Subject: [PATCH 0410/1070] release: v9.0.0-next.18 --- packages/schematics/angular/utility/latest-versions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index edcca8f6cdf6..4dc351fe1e31 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -15,9 +15,9 @@ export const latestVersions = { TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.17', - DevkitBuildNgPackagr: '~0.900.0-next.17', - DevkitBuildWebpack: '~0.900.0-next.17', + DevkitBuildAngular: '~0.900.0-next.18', + DevkitBuildNgPackagr: '~0.900.0-next.18', + DevkitBuildWebpack: '~0.900.0-next.18', ngPackagr: '^9.0.0-rc.0', }; From aa6aee1ac19e047b4fe6ed22f354a7685ad7060b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 28 Oct 2019 12:10:36 +0100 Subject: [PATCH 0411/1070] fix(@schematics/angular): universal add outputHashing to media In case the browser builder hashes the assets we need to add this setting to the server builder as otherwise when assets it will be requested twice. One for the server which will be unhashed, and other on the client which will be hashed. Closes #15953 --- packages/schematics/angular/universal/index.ts | 17 ++++++++++++++++- .../schematics/angular/universal/index_spec.ts | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/universal/index.ts b/packages/schematics/angular/universal/index.ts index 926150efb45b..31c762d1b4f7 100644 --- a/packages/schematics/angular/universal/index.ts +++ b/packages/schematics/angular/universal/index.ts @@ -36,7 +36,7 @@ import { addPackageJsonDependency, getPackageJsonDependency } from '../utility/d import { findBootstrapModuleCall, findBootstrapModulePath } from '../utility/ng-ast-utils'; import { targetBuildNotFoundError } from '../utility/project-targets'; import { getWorkspace, updateWorkspace } from '../utility/workspace'; -import { BrowserBuilderOptions, Builders } from '../utility/workspace-models'; +import { BrowserBuilderOptions, Builders, OutputHashing } from '../utility/workspace-models'; import { Schema as UniversalOptions } from './schema'; function updateConfigFile(options: UniversalOptions, tsConfigDirectory: Path): Rule { @@ -53,6 +53,20 @@ function updateConfigFile(options: UniversalOptions, tsConfigDirectory: Path): R buildTarget.options.outputPath = `dist/${options.clientProject}/browser`; } + // In case the browser builder hashes the assets + // we need to add this setting to the server builder + // as otherwise when assets it will be requested twice. + // One for the server which will be unhashed, and other on the client which will be hashed. + let outputHashing: OutputHashing | undefined; + if (buildTarget && buildTarget.configurations && buildTarget.configurations.production) { + switch (buildTarget.configurations.production.outputHashing as OutputHashing) { + case 'all': + case 'media': + outputHashing = 'media'; + break; + } + } + const mainPath = options.main as string; clientProject.targets.add({ name: 'server', @@ -64,6 +78,7 @@ function updateConfigFile(options: UniversalOptions, tsConfigDirectory: Path): R }, configurations: { production: { + outputHashing, fileReplacements, sourceMap: false, optimization: true, diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index d2ab6ff616bc..b6d072eef9c4 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -155,6 +155,7 @@ describe('Universal Schematic', () => { const configurations = targets.server.configurations; expect(configurations.production).toBeDefined(); expect(configurations.production.fileReplacements).toBeDefined(); + expect(configurations.production.outputHashing).toBe('media'); const fileReplacements = targets.server.configurations.production.fileReplacements; expect(fileReplacements.length).toEqual(1); expect(fileReplacements[0].replace).toEqual('projects/bar/src/environments/environment.ts'); From 77a4fba45f1b1691ad7eded4e2e649c4d1ebf791 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 28 Oct 2019 12:17:16 +0100 Subject: [PATCH 0412/1070] fix(@angular-devkit/build-angular): don't emit CSS resources during a server build The server should serve the assets emitted by the browser builder. In fact the nguniversal schematics are configured to serve the assets from the browser folder https://github.com/angular/universal/blob/a0cc9ab97a70370eff872664ac46391a193aa45e/modules/express-engine/schematics/install/files/__serverFileName%40stripTsExtension__.ts#L26 Closes #12878 --- .../models/webpack-configs/common.ts | 2 + .../models/webpack-configs/styles.ts | 1 + .../plugins/postcss-cli-resources.ts | 6 +- .../test/server/base_spec_large.ts | 14 ++-- .../resources-output-path_spec_large.ts | 75 +++++++++++++++++++ .../angular/utility/workspace-models.ts | 4 +- 6 files changed, 93 insertions(+), 9 deletions(-) create mode 100644 packages/angular_devkit/build_angular/test/server/resources-output-path_spec_large.ts diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 600ecf2f48f3..1a497d706efa 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -492,6 +492,8 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { loader: 'file-loader', options: { name: `[name]${hashFormat.file}.[ext]`, + // Re-use emitted files from browser builder on the server. + emitFile: wco.buildOptions.platform !== 'server', }, }, { diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts index cd6e8399853e..2f630157c425 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts @@ -72,6 +72,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { loader, rebaseRootRelative: buildOptions.rebaseRootRelativeCssUrls, filename: `[name]${hashFormat.file}.[ext]`, + emitFile: buildOptions.platform !== 'server', }), autoprefixer(), ]; diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/postcss-cli-resources.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/postcss-cli-resources.ts index 2f709376f2dd..b809946daa57 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/postcss-cli-resources.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/postcss-cli-resources.ts @@ -31,6 +31,7 @@ export interface PostcssCliResourcesOptions { rebaseRootRelative?: boolean; filename: string; loader: webpack.loader.LoaderContext; + emitFile: boolean; } async function resolve( @@ -53,6 +54,7 @@ export default postcss.plugin('postcss-cli-resources', (options: PostcssCliResou rebaseRootRelative = false, filename, loader, + emitFile, } = options; const dedupeSlashes = (url: string) => url.replace(/\/\/+/g, '/'); @@ -134,7 +136,9 @@ export default postcss.plugin('postcss-cli-resources', (options: PostcssCliResou } loader.addDependency(result); - loader.emitFile(outputPath, content, undefined); + if (emitFile) { + loader.emitFile(outputPath, content, undefined); + } let outputUrl = outputPath.replace(/\\/g, '/'); if (hash || search) { diff --git a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts index 3ca89cf349b1..7593b880101c 100644 --- a/packages/angular_devkit/build_angular/test/server/base_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/server/base_spec_large.ts @@ -9,7 +9,7 @@ import { Architect } from '@angular-devkit/architect'; import { getSystemPath, join, normalize, virtualFs } from '@angular-devkit/core'; import { take, tap } from 'rxjs/operators'; -import { BrowserBuilderOutput } from '../../src/browser'; +import { ServerBuilderOutput } from '../../src'; import { BundleDependencies } from '../../src/server/schema'; import { createArchitect, host, veEnabled } from '../utils'; @@ -28,7 +28,7 @@ describe('Server Builder', () => { it('works (base)', async () => { const run = await architect.scheduleTarget(target); - const output = await run.result as BrowserBuilderOutput; + const output = await run.result as ServerBuilderOutput; expect(output.success).toBe(true); const fileName = join(outputPath, 'main.js'); @@ -45,7 +45,7 @@ describe('Server Builder', () => { it('should not emit polyfills', async () => { const run = await architect.scheduleTarget(target); - const output = await run.result as BrowserBuilderOutput; + const output = await run.result as ServerBuilderOutput; expect(output.success).toBe(true); expect(host.fileMatchExists(getSystemPath(outputPath), /polyfills/)).not.toBeDefined(); @@ -62,7 +62,7 @@ describe('Server Builder', () => { }); const run = await architect.scheduleTarget(target); - const output = await run.result as BrowserBuilderOutput; + const output = await run.result as ServerBuilderOutput; expect(output.success).toBe(true); expect(host.fileMatchExists(getSystemPath(outputPath), /polyfills/)).not.toBeDefined(); @@ -74,7 +74,7 @@ describe('Server Builder', () => { it('supports sourcemaps', async () => { const overrides = { sourceMap: true }; const run = await architect.scheduleTarget(target, overrides); - const output = await run.result as BrowserBuilderOutput; + const output = await run.result as ServerBuilderOutput; expect(output.success).toBe(true); expect(host.scopedSync().exists(join(outputPath, 'main.js.map'))).toBeTruthy(); await run.stop(); @@ -92,7 +92,7 @@ describe('Server Builder', () => { scripts: true, }, }); - const output = await run.result as BrowserBuilderOutput; + const output = await run.result as ServerBuilderOutput; expect(output.success).toBe(true); expect(host.scopedSync().exists(join(outputPath, 'main.js.map'))).toBe(true); @@ -120,7 +120,7 @@ describe('Server Builder', () => { }); const run = await architect.scheduleTarget(target, overrides); - const output = await run.result as BrowserBuilderOutput; + const output = await run.result as ServerBuilderOutput; expect(output.success).toBe(true); expect(host.scopedSync().exists(join(outputPath, 'main.js.map'))).toBe(true); diff --git a/packages/angular_devkit/build_angular/test/server/resources-output-path_spec_large.ts b/packages/angular_devkit/build_angular/test/server/resources-output-path_spec_large.ts new file mode 100644 index 000000000000..8c10ef66d795 --- /dev/null +++ b/packages/angular_devkit/build_angular/test/server/resources-output-path_spec_large.ts @@ -0,0 +1,75 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// tslint:disable:no-big-function +import { Architect } from '@angular-devkit/architect'; +import { join, normalize, virtualFs } from '@angular-devkit/core'; +import { ServerBuilderOutput } from '../../src'; +import { createArchitect, host } from '../utils'; + + +describe('Server Builder styles resources output path (No emit assets)', () => { + function writeFiles() { + host.copyFile('src/spectrum.png', './src/assets/component-img-relative.png'); + host.copyFile('src/spectrum.png', './src/assets/component-img-absolute.png'); + host.writeMultipleFiles({ + 'src/app/app.component.css': ` + h3 { background: url('/assets/component-img-absolute.png'); } + h4 { background: url('../assets/component-img-relative.png'); } + `, + }); + } + + const target = { project: 'app', target: 'server' }; + let architect: Architect; + + const outputPath = normalize('dist-server'); + + beforeEach(async () => { + await host.initialize().toPromise(); + architect = (await createArchitect(host.root())).architect; + }); + afterEach(async () => host.restore().toPromise()); + + it(`supports resourcesOutputPath in resource urls`, async () => { + writeFiles(); + const overrides = { + resourcesOutputPath: 'out-assets', + }; + + const run = await architect.scheduleTarget(target, overrides); + const output = await run.result as ServerBuilderOutput; + expect(output.success).toBe(true); + + const fileName = join(outputPath, 'main.js'); + + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + + expect(content).toContain(`url('/assets/component-img-absolute.png')`); + expect(content).toContain(`url('out-assets/component-img-relative.png')`); + + expect(host.scopedSync().exists(normalize(`${outputPath}/out-assets/component-img-relative.png`))) + .toBe(false); + }); + + it(`supports blank resourcesOutputPath`, async () => { + writeFiles(); + + const run = await architect.scheduleTarget(target); + const output = await run.result as ServerBuilderOutput; + expect(output.success).toBe(true); + + const fileName = join(outputPath, 'main.js'); + const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName))); + + expect(content).toContain(`url('/assets/component-img-absolute.png')`); + expect(content).toContain(`url('component-img-relative.png')`); + + expect(host.scopedSync().exists(normalize(`${outputPath}/component-img-relative.png`))) + .toBe(false); + }); +}); diff --git a/packages/schematics/angular/utility/workspace-models.ts b/packages/schematics/angular/utility/workspace-models.ts index 4c83b5f18f18..232141360e6f 100644 --- a/packages/schematics/angular/utility/workspace-models.ts +++ b/packages/schematics/angular/utility/workspace-models.ts @@ -43,10 +43,12 @@ export interface BrowserBuilderBaseOptions { sourceMap?: boolean; } +export type OutputHashing = 'all' | 'media' | 'none' | 'bundles'; + export interface BrowserBuilderOptions extends BrowserBuilderBaseOptions { serviceWorker?: boolean; optimization?: boolean; - outputHashing?: 'all'; + outputHashing?: OutputHashing; resourcesOutputPath?: string; extractCss?: boolean; namedChunks?: boolean; From 548617ca4cad2071c38a1a23c6877c614a197d8a Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 29 Oct 2019 19:47:51 +0100 Subject: [PATCH 0413/1070] fix(@angular/cli): updated CLI should not have analytics enabled In the case users don't have analytics globally configured when the CLI will self update during ng update. It will prompt to configure this. However, afterwards the update will fail with `Repository is not clean. Please commit or stash any changes before updating.` as there would be uncommited local changed. --- packages/angular/cli/tasks/install-package.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index cbc657e3f459..a31af312aa58 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -155,6 +155,7 @@ export function runTempPackageBin( env: { ...process.env, NG_DISABLE_VERSION_CHECK: 'true', + NG_CLI_ANALYTICS: 'false', }, }); From a56830d02f383f06f0d267512a95274a04c2c8be Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 30 Oct 2019 01:23:34 +0000 Subject: [PATCH 0414/1070] build: update @angular/animations to version --- tests/legacy-cli/e2e/ng-snapshot/package.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index 21a13ad69ec7..ced1c5e771da 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,17 +2,17 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#7b06909c1906f4a371cad19c635fee78dfcd9ff2", - "@angular/common": "github:angular/common-builds#f4185d87ab2515224f600c19e9814d5f5c08cf18", - "@angular/compiler": "github:angular/compiler-builds#91db20e012f28be2cb5096e39f775394d87d4fd4", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#f1302d558edc6f304bf5e6f99c62b7f8c27c548c", - "@angular/core": "github:angular/core-builds#7a155512f81366a6a2b36a2155fbe1506616b4ac", - "@angular/forms": "github:angular/forms-builds#0a8d879faa6ee54505e5f6c1420dd6ecf8d58d91", - "@angular/language-service": "github:angular/language-service-builds#768fc2a9a835b0e7145e1122c8810d9120676676", - "@angular/localize": "github:angular/localize-builds#8af38a1e1eadc0e225ab245b6f5280ba1c7c8f31", - "@angular/platform-browser": "github:angular/platform-browser-builds#8738334db6d241df2b97d4050927839f692ba85b", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#7a821103d013d983f184ae490317da5df13aa439", - "@angular/platform-server": "github:angular/platform-server-builds#7d2302c278b4a1c287084c5fcf4017f5ff29a538", - "@angular/router": "github:angular/router-builds#213ae9e0a5dc0f0498ca3d6fc3c2cd39c9998243" + "@angular/animations": "github:angular/animations-builds#85f9884ebcc90e1b10146d56d3e4ddb334f2c90a", + "@angular/common": "github:angular/common-builds#860e79de1e12c508fa2df2b75ba4e8f1630ee933", + "@angular/compiler": "github:angular/compiler-builds#28919175504c9f73f4c7ae9446e416991a26e022", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#3d380510d0796fcc92201f77f7bf620fc6a4e235", + "@angular/core": "github:angular/core-builds#8b93e1ae70e90155108ddd73c3353c41d51686ec", + "@angular/forms": "github:angular/forms-builds#9c9ff43e8df9548f13000176a96ccc348335bc51", + "@angular/language-service": "github:angular/language-service-builds#736f348091b205671e613a103c50131905762d3a", + "@angular/localize": "github:angular/localize-builds#035e9f7a68e4862f9a3cd77e01725a6e1c5772dd", + "@angular/platform-browser": "github:angular/platform-browser-builds#9c6956b43585a9d206ae61a24cd996bfd48955d8", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#aa080d8d6ba7b0a873a51a57164a0c5731d5687a", + "@angular/platform-server": "github:angular/platform-server-builds#317d385e1308f42703583b7960dee97c4a798b73", + "@angular/router": "github:angular/router-builds#289c78f9c277c720158faa27034f89ef759d3d64" } } \ No newline at end of file From 193f3e68b16dd9c592226efeb788ff531efe598b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 29 Oct 2019 05:26:13 +0000 Subject: [PATCH 0415/1070] build: update core-js to version 3.3.5 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index b6e0e2d60c90..9e49dae7e8dc 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -23,7 +23,7 @@ "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", - "core-js": "3.3.4", + "core-js": "3.3.5", "file-loader": "4.2.0", "find-cache-dir": "3.0.0", "glob": "7.1.5", diff --git a/yarn.lock b/yarn.lock index 90c105fe2687..98b7c5471470 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3299,10 +3299,10 @@ core-js-compat@^3.1.1: browserslist "^4.7.1" semver "^6.3.0" -core-js@3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.4.tgz#6b0a23392958317bfb46e40b090529a923add669" - integrity sha512-BtibooaAmSOptGLRccsuX/dqgPtXwNgqcvYA6kOTTMzonRxZ+pJS4e+6mvVutESfXMeTnK8m3M+aBu3bkJbR+w== +core-js@3.3.5: + version "3.3.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.5.tgz#58d20f48a95a07304b62ff752742b82b56431ed8" + integrity sha512-0J3K+Par/ZydhKg8pEiTcK/9d65/nqJOzY62uMkjeBmt05fDOt/khUVjDdh8TpeIuGQDy1yLDDCjiWN/8pFIuw== core-js@^2.2.0, core-js@^2.4.0: version "2.6.10" From 7148a16ba28a8add8a11c2275f8e7a5a245c9c91 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 29 Oct 2019 23:09:49 +0000 Subject: [PATCH 0416/1070] build: update source-map-support to version 0.5.16 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 9e49dae7e8dc..5f70f40e8773 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -51,7 +51,7 @@ "sass-loader": "8.0.0", "semver": "6.3.0", "source-map": "0.7.3", - "source-map-support": "0.5.13", + "source-map-support": "0.5.16", "source-map-loader": "0.2.4", "speed-measure-webpack-plugin": "1.3.1", "style-loader": "1.0.0", diff --git a/yarn.lock b/yarn.lock index 98b7c5471470..b2c6bfcaed55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9644,10 +9644,10 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@0.5.13, source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.5, source-map-support@~0.5.12: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== +source-map-support@0.5.16: + version "0.5.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" + integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -9660,6 +9660,14 @@ source-map-support@0.5.9: buffer-from "^1.0.0" source-map "^0.6.0" +source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.5, source-map-support@~0.5.12: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-support@~0.4.0: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" From 8fa93e1b1570c449ec6a928427d60f650fcff308 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 30 Oct 2019 07:21:45 -0400 Subject: [PATCH 0417/1070] fix(@angular-devkit/build-angular): enable locale data transform for single localization --- .../build_angular/src/utils/i18n-options.ts | 8 +++++++- tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index 35da21a669d4..ae5c6f73b052 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -80,7 +80,7 @@ export function createI18nOptions( Object.keys(i18n.locales).forEach(locale => i18n.inlineLocales.add(locale)); } else if (inline) { for (const locale of inline) { - if (!i18n.locales[locale]) { + if (!i18n.locales[locale] && i18n.sourceLocale !== locale) { throw new Error(`Requested inline locale '${locale}' is not defined for the project.`); } @@ -146,6 +146,12 @@ export async function configureI18nBuild 0) { buildOptions.i18nFormat = [...usedFormats][0]; } + + // If only one locale is specified set the deprecated option to enable the webpack plugin + // transform to register the locale directly in the output bundle. + if (i18n.inlineLocales.size === 1) { + buildOptions.i18nLocale = [...i18n.inlineLocales][0]; + } } // If inlining store the output in a temporary location to facilitate post-processing diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index 55644a39e273..4a7c3d5b48ef 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -39,6 +39,7 @@ export default async function() { const appArchitect = appProject.architect || appProject.targets; const serveConfigs = appArchitect['serve'].configurations; const e2eConfigs = appArchitect['e2e'].configurations; + const buildConfigs = appArchitect['build'].configurations; // Make default builds prod. appArchitect['build'].options.optimization = true; @@ -63,6 +64,8 @@ export default async function() { } else { i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; } + + buildConfigs[lang] = { localize: [lang] }; serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; e2eConfigs[lang] = { specs: [`./src/app.${lang}.e2e-spec.ts`], @@ -142,6 +145,11 @@ export default async function() { } } + // Verify locale data registration (currently only for single locale builds) + await ng('build', '--optimization', 'false', '-c', 'fr', '--i18n-missing-translation', 'error'); + await expectFileToMatch(`${baseDir}/fr/main-es5.js`, 'registerLocaleData'); + await expectFileToMatch(`${baseDir}/fr/main-es2015.js`, 'registerLocaleData'); + // Verify missing translation behaviour. await appendToFile('src/app/app.component.html', '

Other content

'); await ng('build', '--i18n-missing-translation', 'ignore'); From 669abae1978b9e3abc43848bf700b2f4d99bf311 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 29 Oct 2019 08:04:12 +0100 Subject: [PATCH 0418/1070] refactor: remove redundant host parameter in configureI18nBuild --- .../build_angular/src/server/index.ts | 16 ++++++---------- .../build_angular/src/utils/i18n-options.ts | 1 - .../src/utils/webpack-browser-config.ts | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts index 0882b185f056..35a5b0d3cf43 100644 --- a/packages/angular_devkit/build_angular/src/server/index.ts +++ b/packages/angular_devkit/build_angular/src/server/index.ts @@ -7,11 +7,9 @@ */ import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect'; import { runWebpack } from '@angular-devkit/build-webpack'; -import { json, virtualFs } from '@angular-devkit/core'; -import { NodeJsSyncHost } from '@angular-devkit/core/node'; -import * as fs from 'fs'; +import { json } from '@angular-devkit/core'; import * as path from 'path'; -import { Observable, from, of } from 'rxjs'; +import { Observable, from } from 'rxjs'; import { concatMap, map } from 'rxjs/operators'; import { ScriptTarget } from 'typescript'; import * as webpack from 'webpack'; @@ -46,17 +44,16 @@ export function execute( webpackConfiguration?: ExecutionTransformer; } = {}, ): Observable { - const host = new NodeJsSyncHost(); const root = context.workspaceRoot; // Check Angular version. - assertCompatibleAngularVersion(context.workspaceRoot, context.logger); + assertCompatibleAngularVersion(root, context.logger); - const tsConfig = readTsconfig(options.tsConfig, context.workspaceRoot); + const tsConfig = readTsconfig(options.tsConfig, root); const target = tsConfig.options.target || ScriptTarget.ES5; - const baseOutputPath = path.resolve(context.workspaceRoot, options.outputPath); + const baseOutputPath = path.resolve(root, options.outputPath); - return from(initialize(options, context, host, transforms.webpackConfiguration)).pipe( + return from(initialize(options, context, transforms.webpackConfiguration)).pipe( concatMap(({ config, i18n }) => { return runWebpack(config, context).pipe( concatMap(async output => { @@ -108,7 +105,6 @@ export default createBuilder, webpackConfigurationTransform?: ExecutionTransformer, ): Promise<{ config: webpack.Configuration; diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index ae5c6f73b052..acbfa4a12b23 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -93,7 +93,6 @@ export function createI18nOptions( export async function configureI18nBuild( context: BuilderContext, - host: virtualFs.Host, options: T, ): Promise<{ buildOptions: T, diff --git a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts index 56974ffb37c2..bee72a206b3f 100644 --- a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts +++ b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts @@ -140,7 +140,7 @@ export async function generateI18nBrowserWebpackConfigFromContext( webpackPartialGenerator: (wco: BrowserWebpackConfigOptions) => webpack.Configuration[], host: virtualFs.Host = new NodeJsSyncHost(), ): Promise<{ config: webpack.Configuration; projectRoot: string; projectSourceRoot?: string, i18n: I18nOptions }> { - const { buildOptions, i18n } = await configureI18nBuild(context, host, options); + const { buildOptions, i18n } = await configureI18nBuild(context, options); const result = await generateBrowserWebpackConfigFromContext(buildOptions, context, webpackPartialGenerator, host); const config = result.config; From 588baa573763426400ad00d003d5dae6c726a545 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 29 Oct 2019 18:26:19 +0100 Subject: [PATCH 0419/1070] fix(@angular-devkit/build-angular): i18n app shell with Ivy --- .../build_angular/src/app-shell/index.ts | 135 +++++++++-------- .../build_angular/src/browser/index.ts | 11 +- .../build_angular/src/server/index.ts | 14 +- .../build_angular/test/utils.ts | 4 +- .../e2e/tests/i18n/ivy-localize-app-shell.ts | 136 ++++++++++++++++++ .../e2e/tests/i18n/ivy-localize-server.ts | 1 - 6 files changed, 231 insertions(+), 70 deletions(-) create mode 100644 tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts diff --git a/packages/angular_devkit/build_angular/src/app-shell/index.ts b/packages/angular_devkit/build_angular/src/app-shell/index.ts index 277dcd70a6bb..4d5680d51706 100644 --- a/packages/angular_devkit/build_angular/src/app-shell/index.ts +++ b/packages/angular_devkit/build_angular/src/app-shell/index.ts @@ -11,7 +11,7 @@ import { createBuilder, targetFromTargetString, } from '@angular-devkit/architect'; -import { JsonObject, join, normalize, resolve, schema } from '@angular-devkit/core'; +import { JsonObject, join, normalize, resolve } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import * as fs from 'fs'; import * as path from 'path'; @@ -27,11 +27,6 @@ async function _renderUniversal( browserResult: BrowserBuilderOutput, serverResult: ServerBuilderOutput, ): Promise { - const browserIndexOutputPath = path.join(browserResult.outputPath || '', 'index.html'); - const indexHtml = fs.readFileSync(browserIndexOutputPath, 'utf8'); - const serverBundlePath = await _getServerModuleBundlePath(options, context, serverResult); - const root = context.workspaceRoot; - // Get browser target options. const browserTarget = targetFromTargetString(options.browserTarget); const rawBrowserOptions = await context.getTargetOptions(browserTarget); @@ -42,65 +37,72 @@ async function _renderUniversal( ); // Initialize zone.js + const root = context.workspaceRoot; const zonePackage = require.resolve('zone.js', { paths: [root] }); await import(zonePackage); - const { - AppServerModule, - AppServerModuleNgFactory, - renderModule, - renderModuleFactory, - } = await import(serverBundlePath); - - let renderModuleFn: (module: unknown, options: {}) => Promise; - let AppServerModuleDef: unknown; - - if (renderModuleFactory && AppServerModuleNgFactory) { - renderModuleFn = renderModuleFactory; - AppServerModuleDef = AppServerModuleNgFactory; - } else if (renderModule && AppServerModule) { - renderModuleFn = renderModule; - AppServerModuleDef = AppServerModule; - } else { - throw new Error(`renderModule method and/or AppServerModule were not exported from: ${serverBundlePath}.`); + const host = new NodeJsSyncHost(); + const projectName = context.target && context.target.project; + if (!projectName) { + throw new Error('The builder requires a target.'); } - // Load platform server module renderer - const renderOpts = { - document: indexHtml, - url: options.route, - }; - - const html = await renderModuleFn(AppServerModuleDef, renderOpts); - // Overwrite the client index file. - const outputIndexPath = options.outputIndexPath - ? path.join(root, options.outputIndexPath) - : browserIndexOutputPath; - - fs.writeFileSync(outputIndexPath, html); - - if (browserOptions.serviceWorker) { - const host = new NodeJsSyncHost(); + const projectMetadata = await context.getProjectMetadata(projectName); + const projectRoot = resolve( + normalize(root), + normalize((projectMetadata.root as string) || ''), + ); - const projectName = context.target && context.target.project; - if (!projectName) { - throw new Error('The builder requires a target.'); + for (const outputPath of browserResult.outputPaths) { + const localeDirectory = path.relative(browserResult.baseOutputPath, outputPath); + const browserIndexOutputPath = path.join(outputPath, 'index.html'); + const indexHtml = fs.readFileSync(browserIndexOutputPath, 'utf8'); + const serverBundlePath = await _getServerModuleBundlePath(options, context, serverResult, localeDirectory); + + const { + AppServerModule, + AppServerModuleNgFactory, + renderModule, + renderModuleFactory, + } = await import(serverBundlePath); + + let renderModuleFn: (module: unknown, options: {}) => Promise; + let AppServerModuleDef: unknown; + + if (renderModuleFactory && AppServerModuleNgFactory) { + renderModuleFn = renderModuleFactory; + AppServerModuleDef = AppServerModuleNgFactory; + } else if (renderModule && AppServerModule) { + renderModuleFn = renderModule; + AppServerModuleDef = AppServerModule; + } else { + throw new Error(`renderModule method and/or AppServerModule were not exported from: ${serverBundlePath}.`); } - const projectMetadata = await context.getProjectMetadata(projectName); - const projectRoot = resolve( - normalize(context.workspaceRoot), - normalize((projectMetadata.root as string) || ''), - ); - - await augmentAppWithServiceWorker( - host, - normalize(root), - projectRoot, - join(normalize(root), browserOptions.outputPath), - browserOptions.baseHref || '/', - browserOptions.ngswConfigPath, - ); + // Load platform server module renderer + const renderOpts = { + document: indexHtml, + url: options.route, + }; + + const html = await renderModuleFn(AppServerModuleDef, renderOpts); + // Overwrite the client index file. + const outputIndexPath = options.outputIndexPath + ? path.join(root, options.outputIndexPath) + : browserIndexOutputPath; + + fs.writeFileSync(outputIndexPath, html); + + if (browserOptions.serviceWorker) { + await augmentAppWithServiceWorker( + host, + normalize(root), + projectRoot, + normalize(outputPath), + browserOptions.baseHref || '/', + browserOptions.ngswConfigPath, + ); + } } return browserResult; @@ -110,11 +112,18 @@ async function _getServerModuleBundlePath( options: BuildWebpackAppShellSchema, context: BuilderContext, serverResult: ServerBuilderOutput, + browserLocaleDirectory: string, ) { if (options.appModuleBundle) { return path.join(context.workspaceRoot, options.appModuleBundle); } else { - const outputPath = serverResult.outputPath || '/'; + const { baseOutputPath = '' } = serverResult; + const outputPath = path.join(baseOutputPath, browserLocaleDirectory); + + if (!fs.existsSync(outputPath)) { + throw new Error(`Could not find server output directory: ${outputPath}.`); + } + const files = fs.readdirSync(outputPath, 'utf8'); const re = /^main\.(?:[a-zA-Z0-9]{20}\.)?(?:bundle\.)?js$/; const maybeMain = files.filter(x => re.test(x))[0]; @@ -140,15 +149,17 @@ async function _appShellBuilder( watch: false, serviceWorker: false, }); - const serverTargetRun = await context.scheduleTarget(serverTarget, {}); + const serverTargetRun = await context.scheduleTarget(serverTarget, { + watch: false, + }); try { const [browserResult, serverResult] = await Promise.all([ - (browserTargetRun.result as {}) as BrowserBuilderOutput, - serverTargetRun.result, + browserTargetRun.result as unknown as BrowserBuilderOutput, + serverTargetRun.result as unknown as ServerBuilderOutput, ]); - if (browserResult.success === false || browserResult.outputPath === undefined) { + if (browserResult.success === false || browserResult.baseOutputPath === undefined) { return browserResult; } else if (serverResult.success === false) { return serverResult; diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 00cc9980b3e3..57ff38866162 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -75,6 +75,11 @@ const cacheDownlevelPath = cachingDisabled ? undefined : findCachePath('angular- export type BrowserBuilderOutput = json.JsonObject & BuilderOutput & { + baseOutputPath: string; + outputPaths: string[]; + /** + * @deprecated in version 9. Use 'outputPaths' instead. + */ outputPath: string; }; @@ -228,6 +233,7 @@ export function buildWebpackBrowser( const host = new NodeJsSyncHost(); const root = normalize(context.workspaceRoot); const baseOutputPath = path.resolve(context.workspaceRoot, options.outputPath); + let outputPaths: undefined | string[]; // Check Angular version. assertCompatibleAngularVersion(context.workspaceRoot, context.logger); @@ -278,7 +284,7 @@ export function buildWebpackBrowser( return { success }; } else if (success) { - const outputPaths = ensureOutputPaths(baseOutputPath, i18n); + outputPaths = ensureOutputPaths(baseOutputPath, i18n); let noModuleFiles: EmittedFiles[] | undefined; let moduleFiles: EmittedFiles[] | undefined; @@ -699,8 +705,9 @@ export function buildWebpackBrowser( event => ({ ...event, - // If we use differential loading, both configs have the same outputs + baseOutputPath, outputPath: baseOutputPath, + outputPaths: outputPaths || [baseOutputPath], } as BrowserBuilderOutput), ), ); diff --git a/packages/angular_devkit/build_angular/src/server/index.ts b/packages/angular_devkit/build_angular/src/server/index.ts index 35a5b0d3cf43..5e586b389faf 100644 --- a/packages/angular_devkit/build_angular/src/server/index.ts +++ b/packages/angular_devkit/build_angular/src/server/index.ts @@ -32,7 +32,12 @@ import { Schema as ServerBuilderOptions } from './schema'; // If success is true, outputPath should be set. export type ServerBuilderOutput = json.JsonObject & BuilderOutput & { - outputPath?: string; + baseOutputPath: string; + outputPaths: string[]; + /** + * @deprecated in version 9. Use 'outputPaths' instead. + */ + outputPath: string; }; export { ServerBuilderOptions }; @@ -52,6 +57,7 @@ export function execute( const tsConfig = readTsconfig(options.tsConfig, root); const target = tsConfig.options.target || ScriptTarget.ES5; const baseOutputPath = path.resolve(root, options.outputPath); + let outputPaths: undefined | string[]; return from(initialize(options, context, transforms.webpackConfiguration)).pipe( concatMap(({ config, i18n }) => { @@ -66,7 +72,7 @@ export function execute( throw new Error('Webpack stats build result is required.'); } - const outputPaths = ensureOutputPaths(baseOutputPath, i18n); + outputPaths = ensureOutputPaths(baseOutputPath, i18n); const success = await i18nInlineEmittedFiles( context, @@ -92,7 +98,9 @@ export function execute( return { ...output, - outputPath: path.resolve(root, options.outputPath), + baseOutputPath, + outputPath: baseOutputPath, + outputPaths: outputPaths || [baseOutputPath], } as ServerBuilderOutput; }), ); diff --git a/packages/angular_devkit/build_angular/test/utils.ts b/packages/angular_devkit/build_angular/test/utils.ts index aadd47ae5a68..263d75d1ba1f 100644 --- a/packages/angular_devkit/build_angular/test/utils.ts +++ b/packages/angular_devkit/build_angular/test/utils.ts @@ -76,8 +76,8 @@ export async function browserBuild( const output = (await run.result) as BrowserBuilderOutput; expect(output.success).toBe(true); - expect(output.outputPath).not.toBeUndefined(); - const outputPath = normalize(output.outputPath); + expect(output.outputPaths[0]).not.toBeUndefined(); + const outputPath = normalize(output.outputPaths[0]); const fileNames = await host.list(outputPath).toPromise(); const files = fileNames.reduce((acc: { [name: string]: Promise }, path) => { diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts new file mode 100644 index 000000000000..ed32984a9df5 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts @@ -0,0 +1,136 @@ +import { getGlobalVariable } from '../../utils/env'; +import { + appendToFile, + copyFile, + expectFileToExist, + expectFileToMatch, + replaceInFile, + writeFile, +} from '../../utils/fs'; +import { ng, silentNpm } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; +import { readNgVersion } from '../../utils/version'; + +const snapshots = require('../../ng-snapshot/package.json'); + +export default async function () { + const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots']; + + await updateJsonFile('package.json', packageJson => { + const dependencies = packageJson['dependencies']; + dependencies['@angular/localize'] = isSnapshotBuild + ? snapshots.dependencies['@angular/localize'] + : readNgVersion(); + }); + + await appendToFile('src/app/app.component.html', ''); + await ng('generate', 'appShell', '--client-project', 'test-project'); + + if (isSnapshotBuild) { + await updateJsonFile('package.json', packageJson => { + const dependencies = packageJson['dependencies']; + dependencies['@angular/platform-server'] = snapshots.dependencies['@angular/platform-server']; + dependencies['@angular/router'] = snapshots.dependencies['@angular/router']; + }); + } + + await silentNpm('install'); + + const browserBaseDir = 'dist/test-project/browser'; + + // Set configurations for each locale. + const langTranslations = [ + { lang: 'en-US', translation: 'Hello i18n!' }, + { lang: 'fr', translation: 'Bonjour i18n!' }, + ]; + + await updateJsonFile('angular.json', workspaceJson => { + const appProject = workspaceJson.projects['test-project']; + const appArchitect = appProject.architect || appProject.targets; + const buildOptions = appArchitect['build'].options; + const serverOptions = appArchitect['server'].options; + + // Make default builds prod. + buildOptions.optimization = true; + buildOptions.buildOptimizer = true; + buildOptions.aot = true; + buildOptions.fileReplacements = [ + { + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }, + ]; + + serverOptions.optimization = true; + serverOptions.fileReplacements = [ + { + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }, + ]; + + // Enable localization for all locales + buildOptions.localize = true; + serverOptions.localize = true; + + // Add locale definitions to the project + // tslint:disable-next-line: no-any + const i18n: Record = (appProject.i18n = { locales: {} }); + for (const { lang } of langTranslations) { + if (lang == 'en-US') { + i18n.sourceLocale = lang; + } else { + i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; + } + } + }); + + await writeFile( + 'src/app/app-shell/app-shell.component.html', + '

Hello i18n!

', + ); + + // Add a translatable element + // Extraction of i18n only works on browser targets. + // Let's add the same translation that there is in the app-shell + await writeFile( + 'src/app/app.component.html', + '

Hello i18n!

', + ); + + // Extract the translation messages and copy them for each language. + await ng('xi18n', '--output-path=src/locale'); + await expectFileToExist('src/locale/messages.xlf'); + await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); + await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); + + // Clean up app.component.html so that we can easily + // find the translation text + await writeFile( + 'src/app/app.component.html', + '', + ); + + for (const { lang, translation } of langTranslations) { + if (lang != 'en-US') { + await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'source-language="en-US"', + `source-language="en-US" target-language="${lang}"`, + ); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'Hello i18n!', + `Hello i18n!\n${translation}`, + ); + } + } + + // Build each locale and verify the output. + await ng('run', 'test-project:app-shell'); + + for (const { lang, translation } of langTranslations) { + await expectFileToMatch(`${browserBaseDir}/${lang}/index.html`, translation); + } +} diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts index 860cc0abc079..b1060450088e 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts @@ -1,5 +1,4 @@ import * as express from 'express'; -import * as http from "http"; import { join } from 'path'; import { getGlobalVariable } from '../../utils/env'; import { From a42054954816242033b08de9c2179515f6e7a0fc Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 29 Oct 2019 11:48:06 -0400 Subject: [PATCH 0420/1070] fix(@angular-devkit/build-angular): augment with serviceworker during localization --- .../build_angular/src/browser/index.ts | 60 +++--- .../tests/i18n/ivy-localize-serviceworker.ts | 180 ++++++++++++++++++ 2 files changed, 205 insertions(+), 35 deletions(-) create mode 100644 tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 57ff38866162..7cdf275cefd4 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -148,12 +148,7 @@ export async function buildBrowserWebpackConfigFromContext( ); } - return generateBrowserWebpackConfigFromContext( - options, - context, - webpackPartialGenerator, - host, - ); + return generateBrowserWebpackConfigFromContext(options, context, webpackPartialGenerator, host); } function getAnalyticsConfig( @@ -198,12 +193,12 @@ async function initialize( i18n: I18nOptions; }> { const originalOutputPath = options.outputPath; - const { config, projectRoot, projectSourceRoot, i18n } = await buildBrowserWebpackConfigFromContext( - options, - context, - host, - true, - ); + const { + config, + projectRoot, + projectSourceRoot, + i18n, + } = await buildBrowserWebpackConfigFromContext(options, context, host, true); let transformedConfig; if (webpackConfigurationTransform) { @@ -211,10 +206,7 @@ async function initialize( } if (options.deleteOutputPath) { - deleteOutputDir( - context.workspaceRoot, - originalOutputPath, - ); + deleteOutputDir(context.workspaceRoot, originalOutputPath); } return { config: transformedConfig || config, projectRoot, projectSourceRoot, i18n }; @@ -678,29 +670,27 @@ export function buildWebpackBrowser( } } } + + if (!options.watch && options.serviceWorker) { + for (const outputPath of outputPaths) { + try { + await augmentAppWithServiceWorker( + host, + root, + normalize(projectRoot), + normalize(outputPath), + options.baseHref || '/', + options.ngswConfigPath, + ); + } catch (err) { + return { success: false, error: mapErrorToMessage(err) }; + } + } + } } return { success }; }), - concatMap(buildEvent => { - if (buildEvent.success && !options.watch && options.serviceWorker) { - return from( - augmentAppWithServiceWorker( - host, - root, - normalize(projectRoot), - normalize(baseOutputPath), - options.baseHref || '/', - options.ngswConfigPath, - ).then( - () => ({ success: true }), - error => ({ success: false, error: mapErrorToMessage(error) }), - ), - ); - } else { - return of(buildEvent); - } - }), map( event => ({ diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts new file mode 100644 index 000000000000..e7815f8377bb --- /dev/null +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts @@ -0,0 +1,180 @@ +import * as express from 'express'; +import { resolve } from 'path'; +import { getGlobalVariable } from '../../utils/env'; +import { + copyFile, + expectFileToExist, + expectFileToMatch, + replaceInFile, + writeFile, +} from '../../utils/fs'; +import { ng, npm } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; +import { expectToFail } from '../../utils/utils'; +import { readNgVersion } from '../../utils/version'; + +export default async function() { + let localizeVersion = '@angular/localize@' + readNgVersion(); + if (getGlobalVariable('argv')['ng-snapshots']) { + localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; + } + await npm('install', `${localizeVersion}`); + + let serviceWorkerVersion = '@angular/service-worker@' + readNgVersion(); + if (getGlobalVariable('argv')['ng-snapshots']) { + serviceWorkerVersion = require('../../ng-snapshot/package.json').dependencies[ + '@angular/service-worker' + ]; + } + await npm('install', `${serviceWorkerVersion}`); + + await updateJsonFile('tsconfig.json', config => { + config.compilerOptions.target = 'es2015'; + config.angularCompilerOptions.disableTypeScriptVersionCheck = true; + }); + + const baseDir = 'dist/test-project'; + + // Set configurations for each locale. + const langTranslations = [ + { lang: 'en-US', translation: 'Hello i18n!' }, + { lang: 'fr', translation: 'Bonjour i18n!' }, + ]; + + await updateJsonFile('angular.json', workspaceJson => { + const appProject = workspaceJson.projects['test-project']; + const appArchitect = appProject.architect || appProject.targets; + const serveConfigs = appArchitect['serve'].configurations; + const e2eConfigs = appArchitect['e2e'].configurations; + + // Make default builds prod. + appArchitect['build'].options.optimization = true; + appArchitect['build'].options.buildOptimizer = true; + appArchitect['build'].options.aot = true; + appArchitect['build'].options.fileReplacements = [ + { + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }, + ]; + + // Enable service worker + appArchitect['build'].options.serviceWorker = true; + + // Enable localization for all locales + appArchitect['build'].options.localize = true; + + // Add locale definitions to the project + // tslint:disable-next-line: no-any + const i18n: Record = (appProject.i18n = { locales: {} }); + for (const { lang } of langTranslations) { + if (lang == 'en-US') { + i18n.sourceLocale = lang; + } else { + i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; + } + serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; + e2eConfigs[lang] = { + specs: [`./src/app.${lang}.e2e-spec.ts`], + devServerTarget: `test-project:serve:${lang}`, + }; + } + }); + + // Add service worker source configuration + const manifest = { + index: '/index.html', + assetGroups: [ + { + name: 'app', + installMode: 'prefetch', + resources: { + files: ['/favicon.ico', '/index.html', '/manifest.webmanifest', '/*.css', '/*.js'], + }, + }, + { + name: 'assets', + installMode: 'lazy', + updateMode: 'prefetch', + resources: { + files: ['/assets/**', '/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)'], + }, + }, + ], + }; + await writeFile('ngsw-config.json', JSON.stringify(manifest)); + + // Add a translatable element. + await writeFile( + 'src/app/app.component.html', + '

Hello i18n!

', + ); + + // Extract the translation messages and copy them for each language. + await ng('xi18n', '--output-path=src/locale'); + await expectFileToExist('src/locale/messages.xlf'); + await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); + await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); + + for (const { lang, translation } of langTranslations) { + if (lang != 'en-US') { + await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'source-language="en-US"', + `source-language="en-US" target-language="${lang}"`, + ); + await replaceInFile( + `src/locale/messages.${lang}.xlf`, + 'Hello i18n!', + `Hello i18n!\n${translation}`, + ); + } + } + + // Build each locale and verify the output. + await ng('build', '--i18n-missing-translation', 'error'); + for (const { lang, translation } of langTranslations) { + await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, translation); + await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, translation); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, '$localize`')); + await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, '$localize`')); + await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, lang); + await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, lang); + + // Expect service worker configuration to be present + await expectFileToExist(`${baseDir}/${lang}/ngsw.json`); + + // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. + const app = express(); + app.use(express.static(resolve(baseDir, lang))); + const server = app.listen(4200, 'localhost'); + try { + // Add E2E test for locale + await writeFile( + 'e2e/src/app.e2e-spec.ts', + ` + import { browser, logging, element, by } from 'protractor'; + describe('workspace-project App', () => { + it('should display welcome message', () => { + browser.get(browser.baseUrl); + expect(element(by.css('h1')).getText()).toEqual('${translation}'); + }); + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); + }); + `, + ); + + // Execute without a devserver. + await ng('e2e', '--devServerTarget='); + } finally { + server.close(); + } + } +} From 1f4a81600f95677a105147e304afbc97e80ea15f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 30 Oct 2019 05:26:19 +0000 Subject: [PATCH 0421/1070] build: update caniuse-lite to version 1.0.30001006 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 5f70f40e8773..4fd7670e3de0 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -19,7 +19,7 @@ "autoprefixer": "9.7.0", "browserslist": "4.7.2", "cacache": "13.0.1", - "caniuse-lite": "1.0.30001005", + "caniuse-lite": "1.0.30001006", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", diff --git a/yarn.lock b/yarn.lock index b2c6bfcaed55..36bd4eea8b5d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2652,10 +2652,10 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001005: - version "1.0.30001005" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001005.tgz#823054210be638c725521edcb869435dae46728d" - integrity sha512-g78miZm1Z5njjYR216a5812oPiLgV1ssndgGxITHWUopmjUrCswMisA0a2kSB7a0vZRox6JOKhM51+efmYN8Mg== +caniuse-lite@1.0.30001006: + version "1.0.30001006" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001006.tgz#5b6e8288792cfa275f007b2819a00ccad7112655" + integrity sha512-MXnUVX27aGs/QINz+QG1sWSLDr3P1A3Hq5EUWoIt0T7K24DuvMxZEnh3Y5aHlJW6Bz2aApJdSewdYLd8zQnUuw== caniuse-lite@^1.0.30000999: version "1.0.30001002" From ea37808cab0ef86e5f040fa07849c3455120ed2a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 30 Oct 2019 13:07:14 -0400 Subject: [PATCH 0422/1070] fix(@angular-devkit/build-angular): adjust translation parser import paths --- .../src/utils/load-translations.ts | 52 ++++++++++++++----- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/load-translations.ts b/packages/angular_devkit/build_angular/src/utils/load-translations.ts index a34b16102219..2436c20ea1e5 100644 --- a/packages/angular_devkit/build_angular/src/utils/load-translations.ts +++ b/packages/angular_devkit/build_angular/src/utils/load-translations.ts @@ -10,20 +10,7 @@ import * as fs from 'fs'; export type TranslationLoader = (path: string) => { translation: unknown; format: string }; export async function createTranslationLoader(): Promise { - const parsers = { - json: new (await import( - // tslint:disable-next-line:trailing-comma - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json/simple_json_translation_parser' - )).SimpleJsonTranslationParser(), - xlf: new (await import( - // tslint:disable-next-line:trailing-comma - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1/xliff1_translation_parser' - )).Xliff1TranslationParser(), - xlf2: new (await import( - // tslint:disable-next-line:trailing-comma - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2/xliff2_translation_parser' - )).Xliff2TranslationParser(), - }; + const parsers = await importParsers(); return (path: string) => { const content = fs.readFileSync(path, 'utf8'); @@ -37,3 +24,40 @@ export async function createTranslationLoader(): Promise { throw new Error('Unsupported translation file format.'); }; } + +async function importParsers() { + try { + return { + json: new (await import( + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json/simple_json_translation_parser' + )).SimpleJsonTranslationParser(), + xlf: new (await import( + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1/xliff1_translation_parser' + )).Xliff1TranslationParser(), + xlf2: new (await import( + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2/xliff2_translation_parser' + )).Xliff2TranslationParser(), + }; + } catch { + return { + json: new (await import( + // @ts-ignore + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser' + )).SimpleJsonTranslationParser(), + xlf: new (await import( + // @ts-ignore + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser' + )).Xliff1TranslationParser(), + xlf2: new (await import( + // @ts-ignore + // tslint:disable-next-line:trailing-comma + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser' + )).Xliff2TranslationParser(), + }; + } +} From 77714cc630561128f3b32b89e2ab9ade4ded243f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 30 Oct 2019 14:21:36 -0400 Subject: [PATCH 0423/1070] fix(@schematics/angular): disable i18n migrations --- .../angular/migrations/update-9/update-workspace-config.ts | 6 ------ .../migrations/update-9/update-workspace-config_spec.ts | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts index f74d9730a688..d81aaa316030 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config.ts @@ -33,7 +33,6 @@ export function updateWorkspaceConfig(): Rule { updateStyleOrScriptOption('scripts', recorder, target); addAnyComponentStyleBudget(recorder, target); updateAotOption(tree, recorder, target); - addBuilderI18NOptions(recorder, target); } for (const { target } of getTargets(workspace, 'test', Builders.Karma)) { @@ -43,11 +42,6 @@ export function updateWorkspaceConfig(): Rule { for (const { target } of getTargets(workspace, 'server', Builders.Server)) { updateOptimizationOption(recorder, target); - addBuilderI18NOptions(recorder, target); - } - - for (const { target, project } of getTargets(workspace, 'extract-i18n', Builders.ExtractI18n)) { - addProjectI18NOptions(recorder, target, project); } tree.commitUpdate(recorder); diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts index 55d3261f78b8..722d96ff6453 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts @@ -297,7 +297,7 @@ describe('Migration to version 9', () => { }); }); - describe('i18n configuration', () => { + xdescribe('i18n configuration', () => { function getI18NConfig(localId: string): object { return { outputPath: `dist/my-project-${localId}/`, From 94b48d734f1417f5383736428af0888b0da674ba Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 28 Oct 2019 10:03:08 +0100 Subject: [PATCH 0424/1070] fix(@angular/cli): improve statues and description logs during update With this change we improve the log messages of migration; > the migration description > the outcome of the migration > we also remove the version of the migration which was misleading (Ex: 9.0.0-beta) --- packages/angular/cli/commands/update-impl.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 129c0d72b3c3..b50b9ecc94ab 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -166,10 +166,12 @@ export class UpdateCommand extends Command { migrations.sort((a, b) => semver.compare(a.version, b.version) || a.name.localeCompare(b.name)); + this.logger.info( + colors.cyan(`** Executing migrations of package '${packageName}' **\n`), + ); + for (const migration of migrations) { - this.logger.info( - `** Executing migrations for version ${migration.version} of package '${packageName}' **`, - ); + this.logger.info(`${colors.symbols.pointer} ${migration.description.replace(/\. /g, '.\n ')}`); const result = await this.executeSchematic(migration.collection.name, migration.name); if (!result.success) { @@ -180,6 +182,8 @@ export class UpdateCommand extends Command { } } + this.logger.error(`${colors.symbols.cross} Migration failed. See above for further details.\n`); + return false; } @@ -192,6 +196,8 @@ export class UpdateCommand extends Command { // TODO: Use result.files once package install tasks are accounted this.createCommit(message, []); } + + this.logger.info(colors.green(`${colors.symbols.check} Migration succeeded.\n`)); } return true; @@ -265,11 +271,11 @@ export class UpdateCommand extends Command { if (!statusCheck && !this.checkCleanGit()) { if (options.allowDirty) { this.logger.warn( - 'Repository is not clean. Update changes will be mixed with pre-existing changes.', + 'Repository is not clean. Update changes will be mixed with pre-existing changes.', ); } else { this.logger.error( - 'Repository is not clean. Please commit or stash any changes before updating.', + 'Repository is not clean. Please commit or stash any changes before updating.', ); return 2; From e40f23007b394b33ffcb7036b1c3f7ed913cfab8 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 28 Oct 2019 10:23:15 +0100 Subject: [PATCH 0425/1070] fix(@angular-devkit/schematics): use error logger method when there is a workflow error --- packages/angular_devkit/schematics_cli/bin/schematics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics_cli/bin/schematics.ts b/packages/angular_devkit/schematics_cli/bin/schematics.ts index 1e0104753967..c39d1ebe0f6b 100644 --- a/packages/angular_devkit/schematics_cli/bin/schematics.ts +++ b/packages/angular_devkit/schematics_cli/bin/schematics.ts @@ -195,7 +195,7 @@ export async function main({ error = true; const desc = event.description == 'alreadyExist' ? 'already exists' : 'does not exist'; - logger.warn(`ERROR! ${event.path} ${desc}.`); + logger.error(`ERROR! ${event.path} ${desc}.`); break; case 'update': loggingQueue.push(tags.oneLine` From b9aad5517b61dee9fb0fdf70640203d4dd41940b Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 30 Oct 2019 15:16:24 +0000 Subject: [PATCH 0426/1070] test: add pluralization tests for non-localize i18n --- .../e2e/tests/build/aot/aot-i18n.ts | 53 +++++++++++++++---- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts index 2178f822f892..be193b50c0a5 100644 --- a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts +++ b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts @@ -14,9 +14,26 @@ export default async function () { // Set configurations for each locale. const langTranslations = [ - { lang: 'en', translation: 'Hello i18n!', outputPath: enDir }, - { lang: 'fr', translation: 'Bonjour i18n!', outputPath: frDist }, - { lang: 'de', translation: 'Hallo i18n!', outputPath: deDir }, + { + lang: 'en', outputPath: enDir, + translation: { hello: 'Hello i18n!', plural: 'Updated 3 minutes ago' }, + }, + { + lang: 'fr', outputPath: frDist, + translation: { hello: 'Bonjour i18n!', plural: 'Mis à jour Il y a 3 minutes' }, + pluralTargets: { + text: 'Mis à jour ', + interpolation: '{VAR_PLURAL, plural, =0 {juste maintenant} =1 {il y a une minute} other {Il y a minutes} }', + }, + }, + { + lang: 'de', outputPath: deDir, + translation: { hello: 'Hallo i18n!', plural: 'Aktualisiert vor 3 Minuten' }, + pluralTargets: { + text: 'Aktualisiert ', + interpolation: '{VAR_PLURAL, plural, =0 {gerade jetzt} =1 {vor einer Minute} other {vor Minuten} }', + }, + }, ]; await updateJsonFile('angular.json', workspaceJson => { @@ -61,7 +78,12 @@ export default async function () { describe('workspace-project App', () => { it('should display welcome message', () => { browser.get(browser.baseUrl); - expect(element(by.css('h1')).getText()).toEqual('${translation}'); + expect(element(by.css('h1')).getText()).toEqual('${translation.hello}'); + }); + + it('should display pluralized message', () => { + browser.get(browser.baseUrl); + expect(element(by.css('h2')).getText()).toEqual('${translation.plural}'); }); afterEach(async () => { @@ -75,9 +97,11 @@ export default async function () { `); } - // Add a translatable element. + // Add translatable elements. await writeFile('src/app/app.component.html', - '

Hello i18n!

'); + '

Hello i18n!

\n' + + '

Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}}

'); + await replaceInFile('src/app/app.component.ts', `title = 'latest-app'`, 'minutes = 3'); // Extract the translation messages and copy them for each language. await ng('xi18n', '--output-path=src/locale'); @@ -85,19 +109,26 @@ export default async function () { await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); - for (const { lang, translation } of langTranslations) { + const helloSrc = 'Hello i18n!'; + const pluralTextSrc = 'Updated '; + const pluralInterpolationSrc = '{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago} }'; + for (const { lang, translation, pluralTargets } of langTranslations) { if (lang != 'en') { await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); - await replaceInFile(`src/locale/messages.${lang}.xlf`, 'Hello i18n!', - `Hello i18n!\n${translation}`); + await replaceInFile(`src/locale/messages.${lang}.xlf`, helloSrc, + `${helloSrc}\n${translation.hello}`); + await replaceInFile(`src/locale/messages.${lang}.xlf`, pluralTextSrc, + `${pluralTextSrc}\n${pluralTargets.text}`); + await replaceInFile(`src/locale/messages.${lang}.xlf`, pluralInterpolationSrc, + `${pluralInterpolationSrc}\n${pluralTargets.interpolation}`); } } for (const { lang, translation, outputPath } of langTranslations) { // Build each locale and verify the output. await ng('build', `--configuration=${lang}`); - await expectFileToMatch(`${outputPath}/main-es5.js`, translation); - await expectFileToMatch(`${outputPath}/main-es2015.js`, translation); + await expectFileToMatch(`${outputPath}/main-es5.js`, translation.hello); + await expectFileToMatch(`${outputPath}/main-es2015.js`, translation.hello); // E2E to verify the output runs and is correct. if (getGlobalVariable('argv')['ve']) { From 1812c82fa769e03ebacd4f791e81b4c13da6f1fb Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 30 Oct 2019 14:33:16 +0000 Subject: [PATCH 0427/1070] fix(@angular-devkit/build-angular): temporarily disable localize for multiple locales Related to https://github.com/angular/angular-cli/issues/15974 --- .../build_angular/src/utils/i18n-options.ts | 21 ++++++++++++++----- .../e2e/tests/build/aot/aot-i18n.ts | 2 ++ .../e2e/tests/i18n/ivy-localize-app-shell.ts | 3 +++ .../e2e/tests/i18n/ivy-localize-dl.ts | 16 ++++++++++---- .../e2e/tests/i18n/ivy-localize-es2015.ts | 16 ++++++++------ .../e2e/tests/i18n/ivy-localize-es5.ts | 19 ++++++++++++----- .../e2e/tests/i18n/ivy-localize-server.ts | 19 +++++++++++------ .../tests/i18n/ivy-localize-serviceworker.ts | 5 ++++- 8 files changed, 74 insertions(+), 27 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index acbfa4a12b23..6d12a392304e 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -95,14 +95,21 @@ export async function configureI18nBuild { if (!context.target) { throw new Error('The builder requires a target.'); } - const buildOptions = { ... options }; + const buildOptions = { ...options }; + + if ( + buildOptions.localize === true || + (Array.isArray(buildOptions.localize) && buildOptions.localize.length > 1) + ) { + throw new Error('Using the localize option for multiple locales is temporarily disabled.'); + } const tsConfig = readTsconfig(buildOptions.tsConfig, context.workspaceRoot); const usingIvy = tsConfig.options.enableIvy !== false; @@ -162,14 +169,18 @@ export async function configureI18nBuild { try { rimraf.sync(tempPath); - } catch { } + } catch {} }); } return { buildOptions, i18n }; } -function mergeDeprecatedI18nOptions(i18n: I18nOptions, i18nLocale: string | undefined, i18nFile: string | undefined): I18nOptions { +function mergeDeprecatedI18nOptions( + i18n: I18nOptions, + i18nLocale: string | undefined, + i18nFile: string | undefined, +): I18nOptions { if (i18nFile !== undefined && i18nLocale === undefined) { throw new Error(`Option 'i18nFile' cannot be used without the 'i18nLocale' option.`); } diff --git a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts index be193b50c0a5..182266f67fce 100644 --- a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts +++ b/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts @@ -36,6 +36,8 @@ export default async function () { }, ]; + await replaceInFile('src/app/app.component.ts', `title = 'test-project';`, `title = 'test-project';minutes=3;`); + await updateJsonFile('angular.json', workspaceJson => { const appArchitect = workspaceJson.projects['test-project'].architect; const browserConfigs = appArchitect['build'].configurations; diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts index ed32984a9df5..bc20ddbbcf78 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts @@ -14,6 +14,9 @@ import { readNgVersion } from '../../utils/version'; const snapshots = require('../../ng-snapshot/package.json'); export default async function () { + // TEMP: disable pending i18n updates + return; + const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots']; await updateJsonFile('package.json', packageJson => { diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index 4a7c3d5b48ef..09a79846765d 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -30,7 +30,8 @@ export default async function() { // Set configurations for each locale. const langTranslations = [ - { lang: 'en-US', translation: 'Hello i18n!' }, + // TODO: re-enable all locales once localeData support is added. + // { lang: 'en-US', translation: 'Hello i18n!' }, { lang: 'fr', translation: 'Bonjour i18n!' }, ]; @@ -53,7 +54,11 @@ export default async function() { ]; // Enable localization for all locales - appArchitect['build'].options.localize = true; + // TODO: re-enable all locales once localeData support is added. + // appArchitect['build'].options.localize = true; + appArchitect['build'].options.localize = ['fr']; + // Always error on missing translations. + appArchitect['build'].options.i18nMissingTranslation = 'error'; // Add locale definitions to the project // tslint:disable-next-line: no-any @@ -103,7 +108,10 @@ export default async function() { } // Build each locale and verify the output. - await ng('build', '--i18n-missing-translation', 'error'); + // NOTE: this should not fail in general, but multi-locale translation is currently disabled. + // TODO: remove expectToFail once localeData support is added. + await expectToFail(() => ng('build', '--localize', 'true')); + await ng('build'); for (const { lang, translation } of langTranslations) { await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, translation); await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, translation); @@ -155,5 +163,5 @@ export default async function() { await ng('build', '--i18n-missing-translation', 'ignore'); await expectFileToMatch(`${baseDir}/fr/main-es5.js`, /Other content/); await expectFileToMatch(`${baseDir}/fr/main-es2015.js`, /Other content/); - await expectToFail(() => ng('build', '--i18n-missing-translation', 'error')); + await expectToFail(() => ng('build')); } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts index 7a856befd65b..4221160b67c6 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts @@ -32,9 +32,10 @@ export default async function() { // Set configurations for each locale. const langTranslations = [ - { lang: 'en-US', translation: 'Hello i18n!' }, + // TODO: re-enable all locales once localeData support is added. + // { lang: 'en-US', translation: 'Hello i18n!' }, + // { lang: 'de', translation: 'Hallo i18n!' }, { lang: 'fr', translation: 'Bonjour i18n!' }, - { lang: 'de', translation: 'Hallo i18n!' }, ]; await updateJsonFile('angular.json', workspaceJson => { @@ -55,7 +56,11 @@ export default async function() { ]; // Enable localization for all locales - appArchitect['build'].options.localize = true; + // TODO: re-enable all locales once localeData support is added. + // appArchitect['build'].options.localize = true; + appArchitect['build'].options.localize = ['fr']; + // Always error on missing translations. + appArchitect['build'].options.i18nMissingTranslation = 'error'; // Add locale definitions to the project // tslint:disable-next-line: no-any @@ -102,8 +107,7 @@ export default async function() { } } - // Build each locale and verify the output. - await ng('build', '--i18n-missing-translation', 'error'); + await ng('build'); for (const { lang, translation } of langTranslations) { await expectFileToMatch(`${baseDir}/${lang}/main.js`, translation); await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize`')); @@ -147,5 +151,5 @@ export default async function() { await appendToFile('src/app/app.component.html', '

Other content

'); await ng('build', '--i18n-missing-translation', 'ignore'); await expectFileToMatch(`${baseDir}/fr/main.js`, /Other content/); - await expectToFail(() => ng('build', '--i18n-missing-translation', 'error')); + await expectToFail(() => ng('build')); } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts index 9a012ee685f1..7658a2081d12 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts @@ -31,9 +31,10 @@ export default async function() { // Set configurations for each locale. const langTranslations = [ - { lang: 'en-US', translation: 'Hello i18n!' }, + // TODO: re-enable all locales once localeData support is added. + // { lang: 'en-US', translation: 'Hello i18n!' }, + // { lang: 'de', translation: 'Hallo i18n!' }, { lang: 'fr', translation: 'Bonjour i18n!' }, - { lang: 'de', translation: 'Hallo i18n!' }, ]; await updateJsonFile('angular.json', workspaceJson => { @@ -54,7 +55,11 @@ export default async function() { ]; // Enable localization for all locales - appArchitect['build'].options.localize = true; + // TODO: re-enable all locales once localeData support is added. + // appArchitect['build'].options.localize = true; + appArchitect['build'].options.localize = ['fr']; + // Always error on missing translations. + appArchitect['build'].options.i18nMissingTranslation = 'error'; // Add locale definitions to the project // tslint:disable-next-line: no-any @@ -102,7 +107,7 @@ export default async function() { } // Build each locale and verify the output. - await ng('build', '--i18n-missing-translation', 'error'); + await ng('build'); for (const { lang, translation } of langTranslations) { await expectFileToMatch(`${baseDir}/${lang}/main.js`, translation); await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize`')); @@ -142,9 +147,13 @@ export default async function() { } } + // Verify locale data registration (currently only for single locale builds) + await ng('build', '--optimization', 'false', '--i18n-missing-translation', 'error'); + await expectFileToMatch(`${baseDir}/fr/main.js`, 'registerLocaleData'); + // Verify missing translation behaviour. await appendToFile('src/app/app.component.html', '

Other content

'); await ng('build', '--i18n-missing-translation', 'ignore'); await expectFileToMatch(`${baseDir}/fr/main.js`, /Other content/); - await expectToFail(() => ng('build', '--i18n-missing-translation', 'error')); + await expectToFail(() => ng('build')); } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts index b1060450088e..856aee21805c 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts @@ -42,7 +42,8 @@ export default async function () { // Set configurations for each locale. const langTranslations = [ - { lang: 'en-US', translation: 'Hello i18n!' }, + // TODO: re-enable all locales once localeData support is added. + // { lang: 'en-US', translation: 'Hello i18n!' }, { lang: 'fr', translation: 'Bonjour i18n!' }, ]; @@ -72,8 +73,14 @@ export default async function () { ]; // Enable localization for all locales - buildOptions.localize = true; - serverOptions.localize = true; + // TODO: re-enable all locales once localeData support is added. + // buildOptions.localize = true; + // serverOptions.localize = true; + buildOptions.localize = ['fr']; + serverOptions.localize = ['fr']; + // Always error on missing translations. + buildOptions.i18nMissingTranslation = 'error'; + serverOptions.i18nMissingTranslation = 'error'; // Add locale definitions to the project // tslint:disable-next-line: no-any @@ -158,8 +165,8 @@ export default async function () { } // Build each locale and verify the output. - await ng('build', '--i18n-missing-translation', 'error'); - await ng(...serverBuildArgs, '--i18n-missing-translation', 'error'); + await ng('build'); + await ng(...serverBuildArgs); for (const { lang, translation } of langTranslations) { await expectFileToMatch(`${serverbaseDir}/${lang}/main.js`, translation); @@ -205,5 +212,5 @@ export default async function () { await appendToFile('src/app/app.component.html', '

Other content

'); await ng(...serverBuildArgs, '--i18n-missing-translation', 'ignore'); await expectFileToMatch(`${serverbaseDir}/fr/main.js`, /Other content/); - await expectToFail(() => ng(...serverBuildArgs, '--i18n-missing-translation', 'error')); + await expectToFail(() => ng(...serverBuildArgs)); } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts index e7815f8377bb..eef7790b0faa 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts @@ -14,6 +14,9 @@ import { expectToFail } from '../../utils/utils'; import { readNgVersion } from '../../utils/version'; export default async function() { + // TEMP: disable pending i18n updates + return; + let localizeVersion = '@angular/localize@' + readNgVersion(); if (getGlobalVariable('argv')['ng-snapshots']) { localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; @@ -62,7 +65,7 @@ export default async function() { appArchitect['build'].options.serviceWorker = true; // Enable localization for all locales - appArchitect['build'].options.localize = true; + // appArchitect['build'].options.localize = true; // Add locale definitions to the project // tslint:disable-next-line: no-any From f7769b81543e79e7677d09fb9e2a51d891641db4 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Wed, 30 Oct 2019 18:38:49 -0700 Subject: [PATCH 0428/1070] release: v9.0.0-next.19 --- packages/schematics/angular/utility/latest-versions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index 4dc351fe1e31..18b42c220503 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,16 +8,16 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-next.14', + Angular: '~9.0.0-next.15', RxJs: '~6.5.3', ZoneJs: '~0.10.2', TypeScript: '~3.6.4', TsLib: '^1.10.0', // The versions below must be manually updated when making a new devkit release. - DevkitBuildAngular: '~0.900.0-next.18', - DevkitBuildNgPackagr: '~0.900.0-next.18', - DevkitBuildWebpack: '~0.900.0-next.18', + DevkitBuildAngular: '~0.900.0-next.19', + DevkitBuildNgPackagr: '~0.900.0-next.19', + DevkitBuildWebpack: '~0.900.0-next.19', ngPackagr: '^9.0.0-rc.0', }; From e70a2b04bd6bcc545e8f994601acecd75d0c6084 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 16 Oct 2019 15:01:04 +0200 Subject: [PATCH 0429/1070] refactor(@angular-devkit/build-angular): use compiler parsed value of enableIvy At the moment we are relying on source content to determine if the compilation is under Ivy or VE. However, we do know what compilation we are in from the parsed tsconfig. With this change we use the `enableIvy` to set the analytics metric --- .../build_angular/plugins/webpack/analytics.ts | 15 +++++---------- .../build_angular/src/browser/index.ts | 7 ++++++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts index a3fceb133f79..7bf7f0a8ba2c 100644 --- a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts +++ b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts @@ -69,7 +69,6 @@ export function countOccurrences(source: string, match: string, wordBreak = fals * Holder of statistics related to the build. */ class AnalyticsBuildStats { - public isIvy = false; public errors: string[] = []; public numberOfNgOnInit = 0; public numberOfComponents = 0; @@ -96,7 +95,9 @@ export class NgBuildAnalyticsPlugin { protected _projectRoot: string, protected _analytics: analytics.Analytics, protected _category: string, - ) {} + private _isIvy: boolean, + ) { + } protected _reset() { this._stats = new AnalyticsBuildStats(); @@ -129,7 +130,7 @@ export class NgBuildAnalyticsPlugin { dimensions[analytics.NgCliAnalyticsDimensions.BuildErrors] = `,${this._stats.errors.join()},`; } - dimensions[analytics.NgCliAnalyticsDimensions.NgIvyEnabled] = this._stats.isIvy; + dimensions[analytics.NgCliAnalyticsDimensions.NgIvyEnabled] = this._isIvy; return dimensions; } @@ -159,13 +160,7 @@ export class NgBuildAnalyticsPlugin { // This does not include View Engine AOT compilation, we use the ngfactory for it. this._stats.numberOfComponents += countOccurrences(module._source.source(), ' Component({'); // For Ivy we just count ɵcmp. - const numIvyComponents = countOccurrences(module._source.source(), 'ɵcmp', true); - this._stats.numberOfComponents += numIvyComponents; - - // Check whether this is an Ivy app so that it can reported as part of analytics. - if (!this._stats.isIvy && numIvyComponents > 0) { - this._stats.isIvy = true; - } + this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵcmp', true); } } diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 7cdf275cefd4..67017235899c 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -166,7 +166,12 @@ function getAnalyticsConfig( // The category is the builder name if it's an angular builder. return { - plugins: [new NgBuildAnalyticsPlugin(wco.projectRoot, context.analytics, category)], + plugins: [new NgBuildAnalyticsPlugin( + wco.projectRoot, + context.analytics, + category, + !!wco.tsConfig.options.enableIvy, + )], }; } From 803f636d6800685dde2e24c96ae4ea7598f4996b Mon Sep 17 00:00:00 2001 From: minijus <3633549+minijus@users.noreply.github.com> Date: Tue, 29 Oct 2019 08:33:17 +0200 Subject: [PATCH 0430/1070] feat(@angular-devkit/build-angular): export protractor builder --- packages/angular_devkit/build_angular/src/index.ts | 5 +++++ .../angular_devkit/build_angular/src/protractor/index.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/index.ts b/packages/angular_devkit/build_angular/src/index.ts index 0b0b1d7e2772..40e046f8c558 100644 --- a/packages/angular_devkit/build_angular/src/index.ts +++ b/packages/angular_devkit/build_angular/src/index.ts @@ -49,6 +49,11 @@ export { KarmaConfigOptions, } from './karma'; +export { + execute as executeProtractorBuilder, + ProtractorBuilderOptions, +} from './protractor'; + export { execute as executeServerBuilder, ServerBuilderOptions, diff --git a/packages/angular_devkit/build_angular/src/protractor/index.ts b/packages/angular_devkit/build_angular/src/protractor/index.ts index ef7768fd7144..48195442de3a 100644 --- a/packages/angular_devkit/build_angular/src/protractor/index.ts +++ b/packages/angular_devkit/build_angular/src/protractor/index.ts @@ -76,7 +76,9 @@ async function updateWebdriver() { } as unknown as JSON); } -async function execute( +export { ProtractorBuilderOptions }; + +export async function execute( options: ProtractorBuilderOptions, context: BuilderContext, ): Promise { From 88a8cc598343a73f7c0624410ac92621c4b0e4bd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 31 Oct 2019 15:26:55 +0000 Subject: [PATCH 0431/1070] test: move aot i18n test to i18n folder --- tests/legacy-cli/e2e/tests/{build/aot/aot-i18n.ts => i18n/aot.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/legacy-cli/e2e/tests/{build/aot/aot-i18n.ts => i18n/aot.ts} (100%) diff --git a/tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts b/tests/legacy-cli/e2e/tests/i18n/aot.ts similarity index 100% rename from tests/legacy-cli/e2e/tests/build/aot/aot-i18n.ts rename to tests/legacy-cli/e2e/tests/i18n/aot.ts From f5c12a66a237cf9f0a8b0f9edd007fa566b785d1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 31 Oct 2019 16:54:29 +0000 Subject: [PATCH 0432/1070] test: refactor i18n tests The app-shell and service worker tests were not refactored because they are disabled. They should be refactored when re-enabled. --- tests/legacy-cli/e2e/tests/i18n/aot.ts | 158 ------------ .../e2e/tests/i18n/ivy-localize-app-shell.ts | 1 + .../e2e/tests/i18n/ivy-localize-dl.ts | 158 ++---------- .../e2e/tests/i18n/ivy-localize-es2015.ts | 148 ++--------- .../e2e/tests/i18n/ivy-localize-es5.ts | 153 ++--------- .../e2e/tests/i18n/ivy-localize-server.ts | 111 +------- .../tests/i18n/ivy-localize-serviceworker.ts | 1 + tests/legacy-cli/e2e/tests/i18n/legacy.ts | 238 ++++++++++++++++++ 8 files changed, 301 insertions(+), 667 deletions(-) delete mode 100644 tests/legacy-cli/e2e/tests/i18n/aot.ts create mode 100644 tests/legacy-cli/e2e/tests/i18n/legacy.ts diff --git a/tests/legacy-cli/e2e/tests/i18n/aot.ts b/tests/legacy-cli/e2e/tests/i18n/aot.ts deleted file mode 100644 index 182266f67fce..000000000000 --- a/tests/legacy-cli/e2e/tests/i18n/aot.ts +++ /dev/null @@ -1,158 +0,0 @@ -import * as express from 'express'; -import { resolve } from 'path'; -import { getGlobalVariable } from '../../../utils/env'; -import { appendToFile, copyFile, expectFileToExist, expectFileToMatch, replaceInFile, writeFile } from '../../../utils/fs'; -import { ng } from '../../../utils/process'; -import { updateJsonFile } from '../../../utils/project'; -import { expectToFail } from '../../../utils/utils'; - -export default async function () { - const baseDir = 'dist/test-project'; - const enDir = `${baseDir}/en`; - const frDist = `${baseDir}/fr`; - const deDir = `${baseDir}/de`; - - // Set configurations for each locale. - const langTranslations = [ - { - lang: 'en', outputPath: enDir, - translation: { hello: 'Hello i18n!', plural: 'Updated 3 minutes ago' }, - }, - { - lang: 'fr', outputPath: frDist, - translation: { hello: 'Bonjour i18n!', plural: 'Mis à jour Il y a 3 minutes' }, - pluralTargets: { - text: 'Mis à jour ', - interpolation: '{VAR_PLURAL, plural, =0 {juste maintenant} =1 {il y a une minute} other {Il y a minutes} }', - }, - }, - { - lang: 'de', outputPath: deDir, - translation: { hello: 'Hallo i18n!', plural: 'Aktualisiert vor 3 Minuten' }, - pluralTargets: { - text: 'Aktualisiert ', - interpolation: '{VAR_PLURAL, plural, =0 {gerade jetzt} =1 {vor einer Minute} other {vor Minuten} }', - }, - }, - ]; - - await replaceInFile('src/app/app.component.ts', `title = 'test-project';`, `title = 'test-project';minutes=3;`); - - await updateJsonFile('angular.json', workspaceJson => { - const appArchitect = workspaceJson.projects['test-project'].architect; - const browserConfigs = appArchitect['build'].configurations; - const serveConfigs = appArchitect['serve'].configurations; - const e2eConfigs = appArchitect['e2e'].configurations; - - // Make default builds prod. - appArchitect['build'].options.optimization = true; - appArchitect['build'].options.buildOptimizer = true; - appArchitect['build'].options.aot = true; - appArchitect['build'].options.fileReplacements = [{ - replace: 'src/environments/environment.ts', - with: 'src/environments/environment.prod.ts', - }]; - - for (const { lang, outputPath } of langTranslations) { - if (lang == 'en') { - browserConfigs[lang] = { outputPath }; - } else { - browserConfigs[lang] = { - outputPath, - i18nFile: `src/locale/messages.${lang}.xlf`, - i18nFormat: `xlf`, - i18nLocale: lang, - }; - } - serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; - e2eConfigs[lang] = { - specs: [`./src/app.${lang}.e2e-spec.ts`], - devServerTarget: `test-project:serve:${lang}`, - }; - } - }); - - // Add e2e specs for each lang. - for (const { lang, translation } of langTranslations) { - await writeFile(`./src/app.${lang}.e2e-spec.ts`, ` - import { browser, logging, element, by } from 'protractor'; - - describe('workspace-project App', () => { - it('should display welcome message', () => { - browser.get(browser.baseUrl); - expect(element(by.css('h1')).getText()).toEqual('${translation.hello}'); - }); - - it('should display pluralized message', () => { - browser.get(browser.baseUrl); - expect(element(by.css('h2')).getText()).toEqual('${translation.plural}'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); - }); - `); - } - - // Add translatable elements. - await writeFile('src/app/app.component.html', - '

Hello i18n!

\n' + - '

Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}}

'); - await replaceInFile('src/app/app.component.ts', `title = 'latest-app'`, 'minutes = 3'); - - // Extract the translation messages and copy them for each language. - await ng('xi18n', '--output-path=src/locale'); - await expectFileToExist('src/locale/messages.xlf'); - await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); - await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); - - const helloSrc = 'Hello i18n!'; - const pluralTextSrc = 'Updated '; - const pluralInterpolationSrc = '{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago} }'; - for (const { lang, translation, pluralTargets } of langTranslations) { - if (lang != 'en') { - await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); - await replaceInFile(`src/locale/messages.${lang}.xlf`, helloSrc, - `${helloSrc}\n${translation.hello}`); - await replaceInFile(`src/locale/messages.${lang}.xlf`, pluralTextSrc, - `${pluralTextSrc}\n${pluralTargets.text}`); - await replaceInFile(`src/locale/messages.${lang}.xlf`, pluralInterpolationSrc, - `${pluralInterpolationSrc}\n${pluralTargets.interpolation}`); - } - } - - for (const { lang, translation, outputPath } of langTranslations) { - // Build each locale and verify the output. - await ng('build', `--configuration=${lang}`); - await expectFileToMatch(`${outputPath}/main-es5.js`, translation.hello); - await expectFileToMatch(`${outputPath}/main-es2015.js`, translation.hello); - - // E2E to verify the output runs and is correct. - if (getGlobalVariable('argv')['ve']) { - await ng('e2e', `--configuration=${lang}`); - } else { - // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. - const app = express(); - app.use(express.static(resolve(outputPath))); - const server = app.listen(4200, 'localhost'); - try { - // Execute without a devserver. - await ng('e2e', '--devServerTarget='); - } finally { - server.close(); - } - } - } - - // Verify missing translation behaviour. - await appendToFile('src/app/app.component.html', '

Other content

'); - await ng('build', '--configuration=fr', '--i18n-missing-translation', 'ignore'); - await expectFileToMatch(`${frDist}/main-es5.js`, /Other content/); - await expectFileToMatch(`${frDist}/main-es2015.js`, /Other content/); - await expectToFail(() => ng('build', '--configuration=fr', '--i18n-missing-translation', 'error')); -} diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts index bc20ddbbcf78..f6be20dfca50 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts @@ -15,6 +15,7 @@ const snapshots = require('../../ng-snapshot/package.json'); export default async function () { // TEMP: disable pending i18n updates + // TODO: when re-enabling, use setupI18nConfig and helpers like other i18n tests. return; const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots']; diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index 09a79846765d..024f203bc3be 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -1,163 +1,45 @@ -import * as express from 'express'; -import { resolve } from 'path'; -import { getGlobalVariable } from '../../utils/env'; -import { - appendToFile, - copyFile, - expectFileToExist, - expectFileToMatch, - replaceInFile, - writeFile, -} from '../../utils/fs'; -import { ng, npm } from '../../utils/process'; +import { appendToFile, expectFileToMatch } from '../../utils/fs'; +import { ng } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { expectToFail } from '../../utils/utils'; -import { readNgVersion } from '../../utils/version'; +import { baseDir, externalServer, langTranslations, setupI18nConfig } from './legacy'; -export default async function() { - let localizeVersion = '@angular/localize@' + readNgVersion(); - if (getGlobalVariable('argv')['ng-snapshots']) { - localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; - } - await npm('install', `${localizeVersion}`); +export default async function () { + // Setup i18n tests and config. + await setupI18nConfig(); + + // Ensure a DL build is used. await updateJsonFile('tsconfig.json', config => { config.compilerOptions.target = 'es2015'; config.angularCompilerOptions.disableTypeScriptVersionCheck = true; }); - const baseDir = 'dist/test-project'; - - // Set configurations for each locale. - const langTranslations = [ - // TODO: re-enable all locales once localeData support is added. - // { lang: 'en-US', translation: 'Hello i18n!' }, - { lang: 'fr', translation: 'Bonjour i18n!' }, - ]; - - await updateJsonFile('angular.json', workspaceJson => { - const appProject = workspaceJson.projects['test-project']; - const appArchitect = appProject.architect || appProject.targets; - const serveConfigs = appArchitect['serve'].configurations; - const e2eConfigs = appArchitect['e2e'].configurations; - const buildConfigs = appArchitect['build'].configurations; - - // Make default builds prod. - appArchitect['build'].options.optimization = true; - appArchitect['build'].options.buildOptimizer = true; - appArchitect['build'].options.aot = true; - appArchitect['build'].options.fileReplacements = [ - { - replace: 'src/environments/environment.ts', - with: 'src/environments/environment.prod.ts', - }, - ]; - - // Enable localization for all locales - // TODO: re-enable all locales once localeData support is added. - // appArchitect['build'].options.localize = true; - appArchitect['build'].options.localize = ['fr']; - // Always error on missing translations. - appArchitect['build'].options.i18nMissingTranslation = 'error'; - - // Add locale definitions to the project - // tslint:disable-next-line: no-any - const i18n: Record = (appProject.i18n = { locales: {} }); - for (const { lang } of langTranslations) { - if (lang == 'en-US') { - i18n.sourceLocale = lang; - } else { - i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; - } - - buildConfigs[lang] = { localize: [lang] }; - serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; - e2eConfigs[lang] = { - specs: [`./src/app.${lang}.e2e-spec.ts`], - devServerTarget: `test-project:serve:${lang}`, - }; - } - }); - - // Add a translatable element. - await writeFile( - 'src/app/app.component.html', - '

Hello i18n!

', - ); - - // Extract the translation messages and copy them for each language. - await ng('xi18n', '--output-path=src/locale'); - await expectFileToExist('src/locale/messages.xlf'); - await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); - await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); - - for (const { lang, translation } of langTranslations) { - if (lang != 'en-US') { - await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); - await replaceInFile( - `src/locale/messages.${lang}.xlf`, - 'source-language="en-US"', - `source-language="en-US" target-language="${lang}"`, - ); - await replaceInFile( - `src/locale/messages.${lang}.xlf`, - 'Hello i18n!', - `Hello i18n!\n${translation}`, - ); - } - } + // TODO: re-enable all locales once localeData support is added. + const tempLangTranslations = langTranslations.filter(l => l.lang == 'fr'); // Build each locale and verify the output. // NOTE: this should not fail in general, but multi-locale translation is currently disabled. // TODO: remove expectToFail once localeData support is added. await expectToFail(() => ng('build', '--localize', 'true')); await ng('build'); - for (const { lang, translation } of langTranslations) { - await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, translation); - await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, translation); - await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, '$localize`')); - await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, '$localize`')); - await expectFileToMatch(`${baseDir}/${lang}/main-es5.js`, lang); - await expectFileToMatch(`${baseDir}/${lang}/main-es2015.js`, lang); - - // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. - const app = express(); - app.use(express.static(resolve(baseDir, lang))); - const server = app.listen(4200, 'localhost'); + for (const { lang, outputPath, translation } of tempLangTranslations) { + await expectFileToMatch(`${outputPath}/main-es5.js`, translation.helloPartial); + await expectFileToMatch(`${outputPath}/main-es2015.js`, translation.helloPartial); + await expectToFail(() => expectFileToMatch(`${outputPath}/main-es5.js`, '$localize`')); + await expectToFail(() => expectFileToMatch(`${outputPath}/main-es2015.js`, '$localize`')); + await expectFileToMatch(`${outputPath}/main-es5.js`, lang); + await expectFileToMatch(`${outputPath}/main-es2015.js`, lang); + + const server = externalServer(outputPath); try { - // Add E2E test for locale - await writeFile( - 'e2e/src/app.e2e-spec.ts', - ` - import { browser, logging, element, by } from 'protractor'; - describe('workspace-project App', () => { - it('should display welcome message', () => { - browser.get(browser.baseUrl); - expect(element(by.css('h1')).getText()).toEqual('${translation}'); - }); - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); - }); - `, - ); - // Execute without a devserver. - await ng('e2e', '--devServerTarget='); + await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); } finally { server.close(); } } - // Verify locale data registration (currently only for single locale builds) - await ng('build', '--optimization', 'false', '-c', 'fr', '--i18n-missing-translation', 'error'); - await expectFileToMatch(`${baseDir}/fr/main-es5.js`, 'registerLocaleData'); - await expectFileToMatch(`${baseDir}/fr/main-es2015.js`, 'registerLocaleData'); - // Verify missing translation behaviour. await appendToFile('src/app/app.component.html', '

Other content

'); await ng('build', '--i18n-missing-translation', 'ignore'); diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts index 4221160b67c6..3b3d2adae701 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts @@ -1,155 +1,37 @@ -import * as express from 'express'; -import { resolve } from 'path'; -import { getGlobalVariable } from '../../utils/env'; -import { - appendToFile, - copyFile, - expectFileNotToExist, - expectFileToExist, - expectFileToMatch, - replaceInFile, - writeFile, -} from '../../utils/fs'; -import { ng, npm } from '../../utils/process'; +import { expectFileNotToExist, expectFileToMatch, writeFile } from '../../utils/fs'; +import { ng } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { expectToFail } from '../../utils/utils'; -import { readNgVersion } from '../../utils/version'; +import { externalServer, langTranslations, setupI18nConfig } from './legacy'; export default async function() { - let localizeVersion = '@angular/localize@' + readNgVersion(); - if (getGlobalVariable('argv')['ng-snapshots']) { - localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; - } - await npm('install', `${localizeVersion}`); + // Setup i18n tests and config. + await setupI18nConfig(); + // Ensure a ES2015 build is used. await writeFile('browserslist', 'Chrome 65'); await updateJsonFile('tsconfig.json', config => { config.compilerOptions.target = 'es2015'; config.angularCompilerOptions.disableTypeScriptVersionCheck = true; }); - const baseDir = 'dist/test-project'; - - // Set configurations for each locale. - const langTranslations = [ - // TODO: re-enable all locales once localeData support is added. - // { lang: 'en-US', translation: 'Hello i18n!' }, - // { lang: 'de', translation: 'Hallo i18n!' }, - { lang: 'fr', translation: 'Bonjour i18n!' }, - ]; - - await updateJsonFile('angular.json', workspaceJson => { - const appProject = workspaceJson.projects['test-project']; - const appArchitect = appProject.architect || appProject.targets; - const serveConfigs = appArchitect['serve'].configurations; - const e2eConfigs = appArchitect['e2e'].configurations; - - // Make default builds prod. - appArchitect['build'].options.optimization = true; - appArchitect['build'].options.buildOptimizer = true; - appArchitect['build'].options.aot = true; - appArchitect['build'].options.fileReplacements = [ - { - replace: 'src/environments/environment.ts', - with: 'src/environments/environment.prod.ts', - }, - ]; - - // Enable localization for all locales - // TODO: re-enable all locales once localeData support is added. - // appArchitect['build'].options.localize = true; - appArchitect['build'].options.localize = ['fr']; - // Always error on missing translations. - appArchitect['build'].options.i18nMissingTranslation = 'error'; - - // Add locale definitions to the project - // tslint:disable-next-line: no-any - const i18n: Record = (appProject.i18n = { locales: {} }); - for (const { lang } of langTranslations) { - if (lang == 'en-US') { - i18n.sourceLocale = lang; - } else { - i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; - } - serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; - e2eConfigs[lang] = { - specs: [`./src/app.${lang}.e2e-spec.ts`], - devServerTarget: `test-project:serve:${lang}`, - }; - } - }); - - // Add a translatable element. - await writeFile( - 'src/app/app.component.html', - '

Hello i18n!

', - ); - // Extract the translation messages and copy them for each language. - await ng('xi18n', '--output-path=src/locale'); - await expectFileToExist('src/locale/messages.xlf'); - await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); - await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); - - for (const { lang, translation } of langTranslations) { - if (lang != 'en-US') { - await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); - await replaceInFile( - `src/locale/messages.${lang}.xlf`, - 'source-language="en-US"', - `source-language="en-US" target-language="${lang}"`, - ); - await replaceInFile( - `src/locale/messages.${lang}.xlf`, - 'Hello i18n!', - `Hello i18n!\n${translation}`, - ); - } - } + // TODO: re-enable all locales once localeData support is added. + const tempLangTranslations = langTranslations.filter(l => l.lang == 'fr'); await ng('build'); - for (const { lang, translation } of langTranslations) { - await expectFileToMatch(`${baseDir}/${lang}/main.js`, translation); - await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize`')); - await expectFileNotToExist(`${baseDir}/${lang}/main-es5.js`); - await expectFileToMatch(`${baseDir}/${lang}/main.js`, lang); + for (const { lang, outputPath, translation } of tempLangTranslations) { + await expectFileToMatch(`${outputPath}/main.js`, translation.helloPartial); + await expectToFail(() => expectFileToMatch(`${outputPath}/main.js`, '$localize`')); + await expectFileNotToExist(`${outputPath}/main-es5.js`); + await expectFileToMatch(`${outputPath}/main.js`, lang); - // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. - const app = express(); - app.use(express.static(resolve(baseDir, lang))); - const server = app.listen(4200, 'localhost'); + const server = externalServer(outputPath); try { - // Add E2E test for locale - await writeFile( - 'e2e/src/app.e2e-spec.ts', - ` - import { browser, logging, element, by } from 'protractor'; - describe('workspace-project App', () => { - it('should display welcome message', () => { - browser.get(browser.baseUrl); - expect(element(by.css('h1')).getText()).toEqual('${translation}'); - }); - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); - }); - `, - ); - // Execute without a devserver. - await ng('e2e', '--devServerTarget='); + await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); } finally { server.close(); } } - - // Verify missing translation behaviour. - await appendToFile('src/app/app.component.html', '

Other content

'); - await ng('build', '--i18n-missing-translation', 'ignore'); - await expectFileToMatch(`${baseDir}/fr/main.js`, /Other content/); - await expectToFail(() => ng('build')); } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts index 7658a2081d12..926066ed903a 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts @@ -1,159 +1,36 @@ -import * as express from 'express'; -import { resolve } from 'path'; -import { getGlobalVariable } from '../../utils/env'; -import { - appendToFile, - copyFile, - expectFileNotToExist, - expectFileToExist, - expectFileToMatch, - replaceInFile, - writeFile, -} from '../../utils/fs'; -import { ng, npm } from '../../utils/process'; +import { expectFileNotToExist, expectFileToMatch } from '../../utils/fs'; +import { ng } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { expectToFail } from '../../utils/utils'; -import { readNgVersion } from '../../utils/version'; +import { externalServer, langTranslations, setupI18nConfig } from './legacy'; export default async function() { - let localizeVersion = '@angular/localize@' + readNgVersion(); - if (getGlobalVariable('argv')['ng-snapshots']) { - localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; - } - await npm('install', `${localizeVersion}`); + // Setup i18n tests and config. + await setupI18nConfig(); + // Ensure a es5 build is used. await updateJsonFile('tsconfig.json', config => { config.compilerOptions.target = 'es5'; config.angularCompilerOptions.disableTypeScriptVersionCheck = true; }); - const baseDir = 'dist/test-project'; - - // Set configurations for each locale. - const langTranslations = [ - // TODO: re-enable all locales once localeData support is added. - // { lang: 'en-US', translation: 'Hello i18n!' }, - // { lang: 'de', translation: 'Hallo i18n!' }, - { lang: 'fr', translation: 'Bonjour i18n!' }, - ]; - - await updateJsonFile('angular.json', workspaceJson => { - const appProject = workspaceJson.projects['test-project']; - const appArchitect = appProject.architect || appProject.targets; - const serveConfigs = appArchitect['serve'].configurations; - const e2eConfigs = appArchitect['e2e'].configurations; - - // Make default builds prod. - appArchitect['build'].options.optimization = true; - appArchitect['build'].options.buildOptimizer = true; - appArchitect['build'].options.aot = true; - appArchitect['build'].options.fileReplacements = [ - { - replace: 'src/environments/environment.ts', - with: 'src/environments/environment.prod.ts', - }, - ]; - - // Enable localization for all locales - // TODO: re-enable all locales once localeData support is added. - // appArchitect['build'].options.localize = true; - appArchitect['build'].options.localize = ['fr']; - // Always error on missing translations. - appArchitect['build'].options.i18nMissingTranslation = 'error'; - - // Add locale definitions to the project - // tslint:disable-next-line: no-any - const i18n: Record = (appProject.i18n = { locales: {} }); - for (const { lang } of langTranslations) { - if (lang == 'en-US') { - i18n.sourceLocale = lang; - } else { - i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; - } - serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; - e2eConfigs[lang] = { - specs: [`./src/app.${lang}.e2e-spec.ts`], - devServerTarget: `test-project:serve:${lang}`, - }; - } - }); - - // Add a translatable element. - await writeFile( - 'src/app/app.component.html', - '

Hello i18n!

', - ); - - // Extract the translation messages and copy them for each language. - await ng('xi18n', '--output-path=src/locale'); - await expectFileToExist('src/locale/messages.xlf'); - await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); - await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); - - for (const { lang, translation } of langTranslations) { - if (lang != 'en-US') { - await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); - await replaceInFile( - `src/locale/messages.${lang}.xlf`, - 'source-language="en-US"', - `source-language="en-US" target-language="${lang}"`, - ); - await replaceInFile( - `src/locale/messages.${lang}.xlf`, - 'Hello i18n!', - `Hello i18n!\n${translation}`, - ); - } - } + // TODO: re-enable all locales once localeData support is added. + const tempLangTranslations = langTranslations.filter(l => l.lang == 'fr'); // Build each locale and verify the output. await ng('build'); - for (const { lang, translation } of langTranslations) { - await expectFileToMatch(`${baseDir}/${lang}/main.js`, translation); - await expectToFail(() => expectFileToMatch(`${baseDir}/${lang}/main.js`, '$localize`')); - await expectFileNotToExist(`${baseDir}/${lang}/main-es2015.js`); - await expectFileToMatch(`${baseDir}/${lang}/main.js`, lang); + for (const { lang, outputPath, translation } of tempLangTranslations) { + await expectFileToMatch(`${outputPath}/main.js`, translation.helloPartial); + await expectToFail(() => expectFileToMatch(`${outputPath}/main.js`, '$localize`')); + await expectFileNotToExist(`${outputPath}/main-es2015.js`); + await expectFileToMatch(`${outputPath}/main.js`, lang); - // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. - const app = express(); - app.use(express.static(resolve(baseDir, lang))); - const server = app.listen(4200, 'localhost'); + const server = externalServer(outputPath); try { - // Add E2E test for locale - await writeFile( - 'e2e/src/app.e2e-spec.ts', - ` - import { browser, logging, element, by } from 'protractor'; - describe('workspace-project App', () => { - it('should display welcome message', () => { - browser.get(browser.baseUrl); - expect(element(by.css('h1')).getText()).toEqual('${translation}'); - }); - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); - }); - `, - ); - // Execute without a devserver. - await ng('e2e', '--devServerTarget='); + await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); } finally { server.close(); } } - - // Verify locale data registration (currently only for single locale builds) - await ng('build', '--optimization', 'false', '--i18n-missing-translation', 'error'); - await expectFileToMatch(`${baseDir}/fr/main.js`, 'registerLocaleData'); - - // Verify missing translation behaviour. - await appendToFile('src/app/app.component.html', '

Other content

'); - await ng('build', '--i18n-missing-translation', 'ignore'); - await expectFileToMatch(`${baseDir}/fr/main.js`, /Other content/); - await expectToFail(() => ng('build')); } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts index 856aee21805c..5411186cd02c 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts @@ -1,31 +1,20 @@ import * as express from 'express'; import { join } from 'path'; import { getGlobalVariable } from '../../utils/env'; -import { - appendToFile, - copyFile, - expectFileToMatch, - replaceInFile, - writeFile, -} from '../../utils/fs'; +import { appendToFile, expectFileToMatch, writeFile } from '../../utils/fs'; import { ng, silentNpm } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { expectToFail } from '../../utils/utils'; -import { readNgVersion } from '../../utils/version'; +import { langTranslations, setupI18nConfig } from './legacy'; const snapshots = require('../../ng-snapshot/package.json'); export default async function () { - const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots']; - - await updateJsonFile('package.json', packageJson => { - const dependencies = packageJson['dependencies']; - dependencies['@angular/localize'] = isSnapshotBuild - ? snapshots.dependencies['@angular/localize'] - : readNgVersion(); - }); + // Setup i18n tests and config. + await setupI18nConfig(); // Add universal to the project + const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots']; await ng('add', '@nguniversal/express-engine@9.0.0-next.6', '--skip-install'); if (isSnapshotBuild) { @@ -40,30 +29,15 @@ export default async function () { const serverbaseDir = 'dist/test-project/server'; const serverBuildArgs = ['run', 'test-project:server']; - // Set configurations for each locale. - const langTranslations = [ - // TODO: re-enable all locales once localeData support is added. - // { lang: 'en-US', translation: 'Hello i18n!' }, - { lang: 'fr', translation: 'Bonjour i18n!' }, - ]; + // TODO: re-enable all locales once localeData support is added. + const tempLangTranslations = langTranslations.filter(l => l.lang == 'fr'); + // Add server-specific config. await updateJsonFile('angular.json', workspaceJson => { const appProject = workspaceJson.projects['test-project']; const appArchitect = appProject.architect || appProject.targets; - const buildOptions = appArchitect['build'].options; const serverOptions = appArchitect['server'].options; - // Make default builds prod. - buildOptions.optimization = true; - buildOptions.buildOptimizer = true; - buildOptions.aot = true; - buildOptions.fileReplacements = [ - { - replace: 'src/environments/environment.ts', - with: 'src/environments/environment.prod.ts', - }, - ]; - serverOptions.optimization = true; serverOptions.fileReplacements = [ { @@ -74,32 +48,12 @@ export default async function () { // Enable localization for all locales // TODO: re-enable all locales once localeData support is added. - // buildOptions.localize = true; // serverOptions.localize = true; - buildOptions.localize = ['fr']; serverOptions.localize = ['fr']; // Always error on missing translations. - buildOptions.i18nMissingTranslation = 'error'; serverOptions.i18nMissingTranslation = 'error'; - - // Add locale definitions to the project - // tslint:disable-next-line: no-any - const i18n: Record = (appProject.i18n = { locales: {} }); - for (const { lang } of langTranslations) { - if (lang == 'en-US') { - i18n.sourceLocale = lang; - } else { - i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; - } - } }); - // Add a translatable element. - await writeFile( - 'src/app/app.component.html', - '

Hello i18n!

', - ); - // Override 'main.ts' so that we never bootstrap the client side // This is needed so that we can we can run E2E test against the server view await writeFile( @@ -145,64 +99,21 @@ export default async function () { `, ); - // Extract the translation messages and copy them for each language. - await ng('xi18n', '--output-path=src/locale'); - - for (const { lang, translation } of langTranslations) { - if (lang !== 'en-US') { - await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); - await replaceInFile( - `src/locale/messages.${lang}.xlf`, - 'source-language="en-US"', - `source-language="en-US" target-language="${lang}"`, - ); - await replaceInFile( - `src/locale/messages.${lang}.xlf`, - 'Hello i18n!', - `Hello i18n!\n${translation}`, - ); - } - } - // Build each locale and verify the output. await ng('build'); await ng(...serverBuildArgs); - for (const { lang, translation } of langTranslations) { - await expectFileToMatch(`${serverbaseDir}/${lang}/main.js`, translation); + for (const { lang, translation } of tempLangTranslations) { + await expectFileToMatch(`${serverbaseDir}/${lang}/main.js`, translation.helloPartial); await expectToFail(() => expectFileToMatch(`${serverbaseDir}/${lang}/main.js`, '$localize`')); - // Add E2E test for locale - await writeFile( - 'e2e/src/app.e2e-spec.ts', - ` - import { browser, logging, by } from 'protractor'; - describe('workspace-project App', () => { - it('should display welcome message', () => { - // Load the page without waiting for Angular since it is not bootstrapped automatically. - browser.driver.get(browser.baseUrl); - - const header = browser.driver.findElement(by.css('h1')); - expect(header.getText()).toEqual('${translation}'); - }); - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); - }); - `, - ); - // Run the server const serverBundle = join(process.cwd(), `${serverbaseDir}/${lang}/main.js`); const { i18nApp } = await import(serverBundle) as { i18nApp(locale: string): express.Express }; const server = i18nApp(lang).listen(4200, 'localhost'); try { // Execute without a devserver. - await ng('e2e', '--devServerTarget='); + await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); } finally { server.close(); } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts index eef7790b0faa..24536c5544c6 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-serviceworker.ts @@ -15,6 +15,7 @@ import { readNgVersion } from '../../utils/version'; export default async function() { // TEMP: disable pending i18n updates + // TODO: when re-enabling, use setupI18nConfig and helpers like other i18n tests. return; let localizeVersion = '@angular/localize@' + readNgVersion(); diff --git a/tests/legacy-cli/e2e/tests/i18n/legacy.ts b/tests/legacy-cli/e2e/tests/i18n/legacy.ts new file mode 100644 index 000000000000..711601291653 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/i18n/legacy.ts @@ -0,0 +1,238 @@ +import * as express from 'express'; +import { resolve } from 'path'; +import { getGlobalVariable } from '../../utils/env'; +import { appendToFile, copyFile, expectFileToExist, expectFileToMatch, replaceInFile, writeFile } from '../../utils/fs'; +import { ng, npm } from '../../utils/process'; +import { updateJsonFile } from '../../utils/project'; +import { expectToFail } from '../../utils/utils'; +import { readNgVersion } from '../../utils/version'; + + +// Configurations for each locale. +export const baseDir = 'dist/test-project'; +export const langTranslations = [ + { + lang: 'en-US', outputPath: `${baseDir}/en`, + translation: { + helloPartial: 'Hello', + hello: 'Hello i18n!', + plural: 'Updated 3 minutes ago', + date: 'January', + }, + }, + { + lang: 'fr', outputPath: `${baseDir}/fr`, + translation: { + helloPartial: 'Bonjour', + hello: 'Bonjour i18n!', + plural: 'Mis à jour Il y a 3 minutes', + date: 'janvier', + }, + translationReplacements: [ + [/source/g, 'target'], + ['Hello', 'Bonjour'], + ['Updated', 'Mis à jour'], + ['just now', 'juste maintenant'], + ['one minute ago', 'il y a une minute'], + ['other {', 'other {Il y a'], + ['minutes ago', 'minutes'], + ], + }, + { + lang: 'de', outputPath: `${baseDir}/de`, + translation: { + helloPartial: 'Hallo', + hello: 'Hallo i18n!', + plural: 'Aktualisiert vor 3 Minuten', + date: 'Januar', + }, + translationReplacements: [ + [/source/g, 'target'], + ['Hello', 'Hallo'], + ['Updated', 'Aktualisiert'], + ['just now', 'gerade jetzt'], + ['one minute ago', 'vor einer Minute'], + ['other {', 'other {vor'], + ['minutes ago', 'Minuten'], + ], + }, +]; +export const sourceLocale = langTranslations[0].lang; +export const externalServer = (outputPath: string) => { + // Ivy i18n doesn't yet work with `ng serve` so we must use a separate server. + const app = express(); + app.use(express.static(resolve(outputPath))); + + // call .close() on the return value to close the server. + return app.listen(4200, 'localhost'); +}; + +export async function setupI18nConfig(useLocalize = true) { + // Add component with i18n content, both translations and localeData (plural, dates). + await writeFile('src/app/app.component.ts', ` + import { Component, Inject, LOCALE_ID } from '@angular/core'; + @Component({ + selector: 'app-root', + templateUrl: './app.component.html' + }) + export class AppComponent { + constructor(@Inject(LOCALE_ID) public locale: string) { } + title = 'i18n'; + jan = new Date(2000, 0, 1); + minutes = 3; + } + `); + await writeFile(`src/app/app.component.html`, ` +

Hello {{ title }}!

+

{{ locale }}

+

{{ jan | date : 'LLLL' }}

+

Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}}

+ `); + + // Add e2e specs for each lang. + for (const { lang, translation } of langTranslations) { + await writeFile(`./src/app.${lang}.e2e-spec.ts`, ` + import { browser, logging, element, by } from 'protractor'; + + describe('workspace-project App', () => { + const getParagraph = (name: string) => element(by.css('app-root p#' + name)).getText(); + beforeEach(() => browser.get(browser.baseUrl);); + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); + + it('should display welcome message', () => + expect(getParagraph('hello')).toEqual('${translation.hello}')); + + it('should display locale', () => + expect(getParagraph('locale')).toEqual('${lang}')); + + it('should display localized date', () => + expect(getParagraph('date')).toEqual('${translation.plural}')); + + it('should display pluralized message', () => + expect(getParagraph('plural')).toEqual('${translation.plural}')); + }); + `); + } + + // Update angular.json to build, serve, and test each locale. + await updateJsonFile('angular.json', workspaceJson => { + const appProject = workspaceJson.projects['test-project']; + const appArchitect = workspaceJson.projects['test-project'].architect; + const buildConfigs = appArchitect['build'].configurations; + const serveConfigs = appArchitect['serve'].configurations; + const e2eConfigs = appArchitect['e2e'].configurations; + + // Make default builds prod. + appArchitect['build'].options.optimization = true; + appArchitect['build'].options.buildOptimizer = true; + appArchitect['build'].options.aot = true; + appArchitect['build'].options.fileReplacements = [{ + replace: 'src/environments/environment.ts', + with: 'src/environments/environment.prod.ts', + }]; + + // Always error on missing translations. + appArchitect['build'].options.i18nMissingTranslation = 'error'; + + if (useLocalize) { + // Enable localization for all locales + // TODO: re-enable all locales once localeData support is added. + // appArchitect['build'].options.localize = true; + appArchitect['build'].options.localize = ['fr']; + } + + // Add i18n config items (app, build, serve, e2e). + // tslint:disable-next-line: no-any + const i18n: Record = (appProject.i18n = { locales: {} }); + for (const { lang, outputPath } of langTranslations) { + if (!useLocalize) { + if (lang == sourceLocale) { + buildConfigs[lang] = { outputPath }; + } else { + buildConfigs[lang] = { + outputPath, + i18nFile: `src/locale/messages.${lang}.xlf`, + i18nFormat: `xlf`, + i18nLocale: lang, + }; + } + } else { + if (lang == sourceLocale) { + i18n.sourceLocale = lang; + } else { + i18n.locales[lang] = `src/locale/messages.${lang}.xlf`; + } + buildConfigs[lang] = { localize: [lang] }; + } + + serveConfigs[lang] = { browserTarget: `test-project:build:${lang}` }; + e2eConfigs[lang] = { + specs: [`./src/app.${lang}.e2e-spec.ts`], + devServerTarget: `test-project:serve:${lang}`, + }; + } + }); + + // Extract the translation messages. + await ng('xi18n', '--output-path=src/locale'); + await expectFileToExist('src/locale/messages.xlf'); + await expectFileToMatch('src/locale/messages.xlf', `source-language="en-US"`); + await expectFileToMatch('src/locale/messages.xlf', `An introduction header for this sample`); + + // Make translations for each language. + for (const { lang, translationReplacements } of langTranslations) { + if (lang != sourceLocale) { + await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); + for (const replacements of translationReplacements) { + await replaceInFile(`src/locale/messages.${lang}.xlf`, replacements[0], replacements[1]); + } + } + } + + if (useLocalize) { + // Install the localize package. + let localizeVersion = '@angular/localize@' + readNgVersion(); + if (getGlobalVariable('argv')['ng-snapshots']) { + localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; + } + await npm('install', `${localizeVersion}`); + } +} + +export default async function () { + // Setup i18n tests and config. + await setupI18nConfig(false); + + // Build each locale and verify the output. + for (const { lang, translation, outputPath } of langTranslations) { + await ng('build', `--configuration=${lang}`); + await expectFileToMatch(`${outputPath}/main-es5.js`, translation.helloPartial); + await expectFileToMatch(`${outputPath}/main-es2015.js`, translation.helloPartial); + + // E2E to verify the output runs and is correct. + if (getGlobalVariable('argv')['ve']) { + await ng('e2e', `--configuration=${lang}`); + } else { + const server = externalServer(outputPath); + try { + // Execute without a devserver. + await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); + } finally { + server.close(); + } + } + } + + // Verify missing translation behaviour. + await appendToFile('src/app/app.component.html', '

Other content

'); + await ng('build', '--configuration=fr', '--i18n-missing-translation', 'ignore'); + await expectFileToMatch(`${baseDir}/fr/main-es5.js`, /Other content/); + await expectFileToMatch(`${baseDir}/fr/main-es2015.js`, /Other content/); + await expectToFail(() => ng('build', '--configuration=fr')); +} From c188a301d44bae8178d5c95bf8a8c9abe245b5cb Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 31 Oct 2019 18:06:58 +0100 Subject: [PATCH 0433/1070] fix(@ngtools/webpack): skip NGCC when file system is read only If the package.json of a module is read only we should skip calling NGCC. Under Bazel when running under sandbox the filesystem is read-only. See also: https://github.com/angular/angular/pull/33366 --- packages/ngtools/webpack/src/ngcc_processor.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/src/ngcc_processor.ts b/packages/ngtools/webpack/src/ngcc_processor.ts index 22115a8ff869..2c899a6dda89 100644 --- a/packages/ngtools/webpack/src/ngcc_processor.ts +++ b/packages/ngtools/webpack/src/ngcc_processor.ts @@ -7,7 +7,7 @@ */ import { Logger, PathMappings, process as mainNgcc } from '@angular/compiler-cli/ngcc'; -import { existsSync } from 'fs'; +import { accessSync, constants, existsSync } from 'fs'; import * as path from 'path'; import * as ts from 'typescript'; import { InputFileSystem } from 'webpack'; @@ -67,6 +67,17 @@ export class NgccProcessor { return; } + // If the package.json is read only we should skip calling NGCC. + // With Bazel when running under sandbox the filesystem is read-only. + try { + accessSync(packageJsonPath, constants.W_OK); + } catch { + // add it to processed so the second time round we skip this. + this._processedModules.add(moduleName); + + return; + } + const timeLabel = `NgccProcessor.processModule.ngcc.process+${moduleName}`; time(timeLabel); mainNgcc({ From 1c855b23654cb03c0885ed184534619faa37a833 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 31 Oct 2019 21:03:52 +0100 Subject: [PATCH 0434/1070] style(@angular/cli): fix alignment of messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before ``` > NGCC postinstall migration. Adds an ngcc invocation to npm/yarn's postinstall script. Read more about this here: https://v9.angular.io/guide/migration-ngcc UPDATE package.json (1490 bytes) √ Packages installed successfully. √ Migration succeeded. ``` After ``` > NGCC postinstall migration. Adds an ngcc invocation to npm/yarn's postinstall script. Read more about this here: https://v9.angular.io/guide/migration-ngcc UPDATE package.json (1490 bytes) √ Packages installed successfully. √ Migration succeeded. ``` --- packages/angular/cli/commands/update-impl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index b50b9ecc94ab..76e7e89630d8 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -171,7 +171,7 @@ export class UpdateCommand extends Command { ); for (const migration of migrations) { - this.logger.info(`${colors.symbols.pointer} ${migration.description.replace(/\. /g, '.\n ')}`); + this.logger.info(`${colors.symbols.pointer} ${migration.description.replace(/\. /g, '.\n ')}`); const result = await this.executeSchematic(migration.collection.name, migration.name); if (!result.success) { @@ -182,7 +182,7 @@ export class UpdateCommand extends Command { } } - this.logger.error(`${colors.symbols.cross} Migration failed. See above for further details.\n`); + this.logger.error(`${colors.symbols.cross} Migration failed. See above for further details.\n`); return false; } @@ -197,7 +197,7 @@ export class UpdateCommand extends Command { this.createCommit(message, []); } - this.logger.info(colors.green(`${colors.symbols.check} Migration succeeded.\n`)); + this.logger.info(colors.green(`${colors.symbols.check} Migration succeeded.\n`)); } return true; From c3651e458b5f48867710c3a1378e0623f20bd410 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 31 Oct 2019 21:03:33 -0400 Subject: [PATCH 0435/1070] fix(@angular-devkit/build-angular): allow missing i18nFile option when using i18nLocale Improves support for the deprecated i18n options when used with Ivy. --- .../build_angular/src/utils/i18n-options.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index 6d12a392304e..ae3b85bbfb06 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -81,7 +81,7 @@ export function createI18nOptions( } else if (inline) { for (const locale of inline) { if (!i18n.locales[locale] && i18n.sourceLocale !== locale) { - throw new Error(`Requested inline locale '${locale}' is not defined for the project.`); + throw new Error(`Requested locale '${locale}' is not defined for the project.`); } i18n.inlineLocales.add(locale); @@ -132,7 +132,7 @@ export async function configureI18nBuild(); for (const [locale, desc] of Object.entries(i18n.locales)) { - if (i18n.inlineLocales.has(locale)) { + if (i18n.inlineLocales.has(locale) && desc.file) { const result = loader(path.join(projectRoot, desc.file)); usedFormats.add(result.format); @@ -191,8 +191,13 @@ function mergeDeprecatedI18nOptions( if (i18nFile !== undefined) { i18n.locales[i18nLocale] = { file: i18nFile }; - i18n.flatOutput = true; + } else { + // If no file, treat the locale as the source locale + // This mimics deprecated behavior + i18n.sourceLocale = i18nLocale; } + + i18n.flatOutput = true; } return i18n; From 3100182ab106898cb1ca9f2971d634ee42a8a138 Mon Sep 17 00:00:00 2001 From: Kayla Altepeter Date: Thu, 31 Oct 2019 21:29:14 -0500 Subject: [PATCH 0436/1070] fix(@angular/cli): change analytics type to boolean or string --- packages/angular/cli/lib/config/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index 8742495f2b4e..d2a5a6c3d0b8 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -67,7 +67,7 @@ } }, "analytics": { - "type": "boolean", + "type": ["boolean", "string"], "description": "Share anonymous usage data with the Angular Team at Google." } }, From 8820093b7ffb2bdb146ebae1eb4bc1883b9abe8c Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 1 Nov 2019 15:28:15 +0100 Subject: [PATCH 0437/1070] fix(@angular/cli): don't install using global command but rather install in a different folder Fixes: #16010 --- packages/angular/cli/tasks/install-package.ts | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index a31af312aa58..cab1c38dae67 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -26,6 +26,8 @@ interface PackageManagerOptions { saveDev: string; install: string; prefix: string; + noBinLinks: string; + noLockfile: string; } export function installPackage( @@ -34,7 +36,7 @@ export function installPackage( packageManager: PackageManager = PackageManager.Npm, save: Exclude = true, extraArgs: string[] = [], - global = false, + cwd = process.cwd(), ) { const packageManagerArgs = getPackageManagerArguments(packageManager); @@ -42,6 +44,7 @@ export function installPackage( packageManagerArgs.install, packageName, packageManagerArgs.silent, + packageManagerArgs.noBinLinks, ]; logger.info(colors.green(`Installing packages for tooling via ${packageManager}.`)); @@ -50,14 +53,6 @@ export function installPackage( installArgs.push(packageManagerArgs.saveDev); } - if (global) { - if (packageManager === PackageManager.Yarn) { - installArgs.unshift('global'); - } else { - installArgs.push('--global'); - } - } - const { status } = spawnSync( packageManager, [ @@ -67,6 +62,7 @@ export function installPackage( { stdio: 'inherit', shell: true, + cwd, }, ); @@ -93,21 +89,15 @@ export function installTempPackage( // setup prefix/global modules path const packageManagerArgs = getPackageManagerArguments(packageManager); + const tempNodeModules = join(tempPath, 'node_modules'); const installArgs: string[] = [ packageManagerArgs.prefix, - tempPath, + // Yarn will no append 'node_modules' to the path + packageManager === PackageManager.Yarn ? tempNodeModules : tempPath, + packageManagerArgs.noLockfile, ]; - installPackage(packageName, logger, packageManager, true, installArgs, true); - - let tempNodeModules: string; - if (packageManager !== PackageManager.Yarn && process.platform !== 'win32') { - // Global installs on Unix systems go to {prefix}/lib/node_modules. - // Global installs on Windows go to {prefix}/node_modules (that is, no lib folder.) - tempNodeModules = join(tempPath, 'lib', 'node_modules'); - } else { - tempNodeModules = join(tempPath, 'node_modules'); - } + installPackage(packageName, logger, packageManager, true, installArgs, tempPath); return tempNodeModules; } @@ -172,12 +162,16 @@ function getPackageManagerArguments(packageManager: PackageManager): PackageMana silent: '--silent', saveDev: '--dev', install: 'add', - prefix: '--global-folder', + prefix: '--modules-folder', + noBinLinks: '--no-bin-links', + noLockfile: '--no-lockfile', } : { silent: '--quiet', saveDev: '--save-dev', install: 'install', prefix: '--prefix', + noBinLinks: '--no-bin-links', + noLockfile: '--no-package-lock', }; } From e7bf10521470417b62711fba40d53f1363413f98 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 1 Nov 2019 20:26:06 -0400 Subject: [PATCH 0438/1070] fix(@angular/cli): skip project analytics prompt when using update The prompt will cause the workspace configuration file to be updated which can result in an unclean repository. Fixes #16012 --- packages/angular/cli/models/command-runner.ts | 13 +++-- .../e2e/tests/misc/ask-analytics-command.ts | 51 +++++++++++++++++++ ...-analytics.ts => ask-analytics-install.ts} | 0 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 tests/legacy-cli/e2e/tests/misc/ask-analytics-command.ts rename tests/legacy-cli/e2e/tests/misc/{ask-analytics.ts => ask-analytics-install.ts} (100%) diff --git a/packages/angular/cli/models/command-runner.ts b/packages/angular/cli/models/command-runner.ts index acc13742f42a..4aa7100dc916 100644 --- a/packages/angular/cli/models/command-runner.ts +++ b/packages/angular/cli/models/command-runner.ts @@ -64,14 +64,19 @@ export interface CommandMapOptions { * Create the analytics instance. * @private */ -async function _createAnalytics(workspace: boolean): Promise { +async function _createAnalytics(workspace: boolean, skipPrompt = false): Promise { let config = await getGlobalAnalytics(); // If in workspace and global analytics is enabled, defer to workspace level if (workspace && config) { + const skipAnalytics = + skipPrompt || + (process.env['NG_CLI_ANALYTICS'] && + (process.env['NG_CLI_ANALYTICS'].toLowerCase() === 'false' || + process.env['NG_CLI_ANALYTICS'] === '0')); // TODO: This should honor the `no-interactive` option. // It is currently not an `ng` option but rather only an option for specific commands. // The concept of `ng`-wide options are needed to cleanly handle this. - if (!(await hasWorkspaceAnalyticsConfiguration())) { + if (!skipAnalytics && !(await hasWorkspaceAnalyticsConfiguration())) { await promptProjectAnalytics(); } config = await getWorkspaceAnalytics(); @@ -231,7 +236,9 @@ export async function runCommand( return map; }); - const analytics = options.analytics || await _createAnalytics(!!workspace.configFile); + const analytics = + options.analytics || + (await _createAnalytics(!!workspace.configFile, description.name === 'update')); const context = { workspace, analytics }; const command = new description.impl(context, description, logger); diff --git a/tests/legacy-cli/e2e/tests/misc/ask-analytics-command.ts b/tests/legacy-cli/e2e/tests/misc/ask-analytics-command.ts new file mode 100644 index 000000000000..d571b38cb671 --- /dev/null +++ b/tests/legacy-cli/e2e/tests/misc/ask-analytics-command.ts @@ -0,0 +1,51 @@ +import { execWithEnv, killAllProcesses, waitForAnyProcessOutputToMatch } from '../../utils/process'; +import { expectToFail } from '../../utils/utils'; + +export default async function() { + try { + // Execute a command with TTY force enabled + const execution = execWithEnv('ng', ['version'], { + ...process.env, + NG_FORCE_TTY: '1', + NG_CLI_ANALYTICS: 'ci', + }); + + // Check if the prompt is shown + await waitForAnyProcessOutputToMatch(/Would you like to share anonymous usage data/); + } finally { + killAllProcesses(); + } + + try { + // Execute a command with TTY force enabled + const execution = execWithEnv('ng', ['version'], { + ...process.env, + NG_FORCE_TTY: '1', + NG_CLI_ANALYTICS: 'false', + }); + + // Check if the prompt is shown + await expectToFail(() => + waitForAnyProcessOutputToMatch(/Would you like to share anonymous usage data/, 5), + ); + } finally { + killAllProcesses(); + } + + // Should not show a prompt when using update + try { + // Execute a command with TTY force enabled + const execution = execWithEnv('ng', ['update'], { + ...process.env, + NG_FORCE_TTY: '1', + NG_CLI_ANALYTICS: 'ci', + }); + + // Check if the prompt is shown + await expectToFail(() => + waitForAnyProcessOutputToMatch(/Would you like to share anonymous usage data/, 5), + ); + } finally { + killAllProcesses(); + } +} diff --git a/tests/legacy-cli/e2e/tests/misc/ask-analytics.ts b/tests/legacy-cli/e2e/tests/misc/ask-analytics-install.ts similarity index 100% rename from tests/legacy-cli/e2e/tests/misc/ask-analytics.ts rename to tests/legacy-cli/e2e/tests/misc/ask-analytics-install.ts From 3f57956c3282361f8909ff8b0d51471d708162eb Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 1 Nov 2019 21:39:10 -0400 Subject: [PATCH 0439/1070] fix(@angular/cli): verify package specifier when adding a package Fixes #16029 --- packages/angular/cli/commands/add-impl.ts | 23 ++++++++++++++++--- .../e2e/tests/commands/add/add-material.ts | 20 ++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/packages/angular/cli/commands/add-impl.ts b/packages/angular/cli/commands/add-impl.ts index 8932f04dc6dc..4e9e87c2ea58 100644 --- a/packages/angular/cli/commands/add-impl.ts +++ b/packages/angular/cli/commands/add-impl.ts @@ -18,6 +18,7 @@ import { colors } from '../utilities/color'; import { getPackageManager } from '../utilities/package-manager'; import { NgAddSaveDepedency, + PackageIdentifier, PackageManifest, fetchPackageManifest, fetchPackageMetadata, @@ -50,10 +51,26 @@ export class AddCommand extends SchematicCommand { } if (packageIdentifier.registry && this.isPackageInstalled(packageIdentifier.name)) { - // Already installed so just run schematic - this.logger.info('Skipping installation: Package already installed'); + let validVersion = false; + const installedVersion = await this.findProjectVersion(packageIdentifier.name); + if (installedVersion) { + if (packageIdentifier.type === 'range') { + validVersion = satisfies(installedVersion, packageIdentifier.fetchSpec); + } else if (packageIdentifier.type === 'version') { + const v1 = valid(packageIdentifier.fetchSpec); + const v2 = valid(installedVersion); + validVersion = v1 !== null && v1 === v2; + } else if (!packageIdentifier.rawSpec) { + validVersion = true; + } + } - return this.executeSchematic(packageIdentifier.name, options['--']); + if (validVersion) { + // Already installed so just run schematic + this.logger.info('Skipping installation: Package already installed'); + + return this.executeSchematic(packageIdentifier.name, options['--']); + } } const packageManager = await getPackageManager(this.workspace.root); diff --git a/tests/legacy-cli/e2e/tests/commands/add/add-material.ts b/tests/legacy-cli/e2e/tests/commands/add/add-material.ts index 44b075a20a0a..ad0c81629ef3 100644 --- a/tests/legacy-cli/e2e/tests/commands/add/add-material.ts +++ b/tests/legacy-cli/e2e/tests/commands/add/add-material.ts @@ -8,4 +8,24 @@ export default async function () { await ng('add', '@angular/material'); await expectFileToMatch('package.json', /@angular\/material/); + + const output1 = await ng('add', '@angular/material'); + if (!output1.stdout.includes('Skipping installation: Package already installed')) { + throw new Error('Installation was not skipped'); + } + + const output2 = await ng('add', '@angular/material@latest'); + if (output2.stdout.includes('Skipping installation: Package already installed')) { + throw new Error('Installation should not have been skipped'); + } + + const output3 = await ng('add', '@angular/material@8.0.0'); + if (output3.stdout.includes('Skipping installation: Package already installed')) { + throw new Error('Installation should not have been skipped'); + } + + const output4 = await ng('add', '@angular/material@8'); + if (!output4.stdout.includes('Skipping installation: Package already installed')) { + throw new Error('Installation was not skipped'); + } } From 673030de1c7023f36acb5751c06b0c54225bd22b Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sat, 2 Nov 2019 14:42:56 -0400 Subject: [PATCH 0440/1070] fix(@angular-devkit/build-angular): temporarily remove localize peer dependency This should be reintroduced in 9.1 or 9.2. The other remaining "hidden" peer dependencies should be included as well (currently `karma` and `node-sass`). --- packages/angular_devkit/build_angular/package.json | 1 - .../build_angular/src/utils/load-translations.ts | 12 ++++++------ .../build_angular/src/utils/process-bundle.ts | 4 +++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 4fd7670e3de0..060be0fea7f4 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -101,7 +101,6 @@ }, "peerDependencies": { "@angular/compiler-cli": ">=9.0.0-beta < 10", - "@angular/localize": "^9.0.0-next.11", "typescript": ">=3.6 < 3.7" }, "peerDependenciesMeta": { diff --git a/packages/angular_devkit/build_angular/src/utils/load-translations.ts b/packages/angular_devkit/build_angular/src/utils/load-translations.ts index 2436c20ea1e5..7d6db707e84e 100644 --- a/packages/angular_devkit/build_angular/src/utils/load-translations.ts +++ b/packages/angular_devkit/build_angular/src/utils/load-translations.ts @@ -29,15 +29,15 @@ async function importParsers() { try { return { json: new (await import( - // tslint:disable-next-line:trailing-comma + // tslint:disable-next-line:trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json/simple_json_translation_parser' )).SimpleJsonTranslationParser(), xlf: new (await import( - // tslint:disable-next-line:trailing-comma + // tslint:disable-next-line:trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1/xliff1_translation_parser' )).Xliff1TranslationParser(), xlf2: new (await import( - // tslint:disable-next-line:trailing-comma + // tslint:disable-next-line:trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2/xliff2_translation_parser' )).Xliff2TranslationParser(), }; @@ -45,17 +45,17 @@ async function importParsers() { return { json: new (await import( // @ts-ignore - // tslint:disable-next-line:trailing-comma + // tslint:disable-next-line:trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser' )).SimpleJsonTranslationParser(), xlf: new (await import( // @ts-ignore - // tslint:disable-next-line:trailing-comma + // tslint:disable-next-line:trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser' )).Xliff1TranslationParser(), xlf2: new (await import( // @ts-ignore - // tslint:disable-next-line:trailing-comma + // tslint:disable-next-line:trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser' )).Xliff2TranslationParser(), }; diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index ab6193e7fb35..9848343021a2 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -502,9 +502,10 @@ export async function inlineLocales(options: InlineOptions) { const { default: MagicString } = await import('magic-string'); const { default: generate } = await import('@babel/generator'); const utils = await import( - // tslint:disable-next-line: trailing-comma + // tslint:disable-next-line: trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/source_files/source_file_utils' ); + // tslint:disable-next-line: no-implicit-dependencies const localizeDiag = await import('@angular/localize/src/tools/src/diagnostics'); const diagnostics = new localizeDiag.Diagnostics(); @@ -594,6 +595,7 @@ function inlineCopyOnly(options: InlineOptions) { function findLocalizePositions( options: InlineOptions, + // tslint:disable-next-line: no-implicit-dependencies utils: typeof import('@angular/localize/src/tools/src/translate/source_files/source_file_utils'), ): LocalizePosition[] { let ast: ParseResult | undefined | null; From 98bc458480e2dfdfa5e6b9fbdc1869894f40f998 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sat, 2 Nov 2019 15:55:46 -0400 Subject: [PATCH 0441/1070] fix(@angular/cli): pass next option to all update logic Fixes #16015 --- packages/angular/cli/commands/update-impl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 76e7e89630d8..a5530cd9b219 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -542,6 +542,7 @@ export class UpdateCommand extends Command { const { success } = await this.executeSchematic('@schematics/update', 'update', { verbose: options.verbose || false, force: options.force || false, + next: !!options.next, packageManager: this.packageManager, packages: packagesToUpdate, migrateExternal: true, From afae476b5102179a52d7ab2f439bfcae5c8ac7c9 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sun, 3 Nov 2019 13:33:25 +0100 Subject: [PATCH 0442/1070] fix(@schematics/angular): replace `'**/*.ts` file inclusion with `**/*.d.ts` This fixes warnings such as the below; ``` WARNING in /test-update/src/environments/environment.prod.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig. ``` When the previous generated add was in VE. --- .../update-9/update-app-tsconfigs.ts | 37 +++++++++++-------- .../update-9/update-app-tsconfigs_spec.ts | 35 +++++++++++++++++- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts index 99c56a37a8fd..7d1645909189 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts @@ -74,6 +74,8 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B } // Add stricter file inclusions to avoid unused file warning during compilation + const rootInSrc = tsConfigPath.includes('src/'); + const rootSrc = rootInSrc ? '' : 'src/'; if (builderName !== Builders.Karma) { // Note: we need to re-read the tsconfig after very commit because // otherwise the updates will be out of sync since we are ammending the same node. @@ -81,26 +83,29 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B const files = findPropertyInAstObject(tsConfigAst, 'files'); const include = findPropertyInAstObject(tsConfigAst, 'include'); - if (!files && !include) { - const rootInSrc = tsConfigPath.includes('src/'); - const rootSrc = rootInSrc ? '' : 'src/'; - const files = builderName === Builders.Server - ? [`${rootSrc}main.server.ts`] - : [`${rootSrc}main.ts`, `${rootSrc}polyfills.ts`]; - - recorder = tree.beginUpdate(tsConfigPath); - insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'files', files, 2); - tree.commitUpdate(recorder); - - if (builderName === Builders.Browser) { - tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); - recorder = tree.beginUpdate(tsConfigPath); - insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'include', [`${rootSrc}**/*.d.ts`], 2); - tree.commitUpdate(recorder); + recorder = tree.beginUpdate(tsConfigPath); + if (include && include.kind === 'array') { + const tsInclude = include.elements.find(({ value }) => typeof value === 'string' && value.endsWith('**/*.ts')); + if (tsInclude) { + const { start, end } = tsInclude; + recorder.remove(start.offset, end.offset - start.offset); + // Replace ts includes with d.ts + recorder.insertLeft(start.offset, tsInclude.text.replace('.ts', '.d.ts')); } + } else { + insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'include', [`${rootSrc}**/*.d.ts`], 2); + } + + tree.commitUpdate(recorder); + if (!files) { tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); recorder = tree.beginUpdate(tsConfigPath); + + const files = builderName === Builders.Server + ? [`${rootSrc}main.server.ts`] + : [`${rootSrc}main.ts`, `${rootSrc}polyfills.ts`]; + insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'files', files, 2); removePropertyInAstObject(recorder, tsConfigAst, 'exclude'); tree.commitUpdate(recorder); } diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts index 1655d9badce6..4cdf76388c2b 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts @@ -64,7 +64,7 @@ describe('Migration to version 9', () => { expect(include).toEqual(['src/**/*.d.ts']); }); - it('should not update apps tsConfig when tsconfig has include', async () => { + it('should update apps tsConfig when tsconfig has include', async () => { const tsConfigContent = { ...defaultTsConfigOptions, include: ['foo.ts'], @@ -74,10 +74,41 @@ describe('Migration to version 9', () => { const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); const { files, include } = JSON.parse(tree2.readContent('tsconfig.app.json')); - expect(files).toEqual(undefined); + expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); expect(include).toEqual(['foo.ts']); }); + it(`should update include '**/*.ts' in apps tsConfig to '**/*.d.ts'`, async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + include: ['src/**/*.ts'], + exclude: ['test.ts'], + }; + + overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { files, include, exclude } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); + expect(include).toEqual(['src/**/*.d.ts']); + expect(exclude).toBeUndefined(); + }); + + it(`should update include '**/*.ts' in apps tsConfig to '**/*.d.ts' when includes contains multiple elements`, async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + include: ['foo.ts', 'src/**/*.ts'], + }; + + overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); + + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { files, include, exclude } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); + expect(include).toEqual(['foo.ts', 'src/**/*.d.ts']); + expect(exclude).toBeUndefined(); + }); + it(`should remove angularCompilerOptions when enableIvy is true and it's the only option`, async () => { overrideJsonFile(tree, 'tsconfig.app.json', defaultTsConfigOptions); const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); From d13387db4dd7d18c98a5ca0ad497c9e3c88228e9 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sun, 3 Nov 2019 13:41:27 +0100 Subject: [PATCH 0443/1070] fix(@schematics/angular): tsconfig creates invalid file references Fixes: #16035 --- .../update-9/update-app-tsconfigs.ts | 38 ++++++++++++------- .../update-9/update-app-tsconfigs_spec.ts | 3 +- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts index 7d1645909189..a3bf37cb7739 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts @@ -7,6 +7,7 @@ */ import { JsonAstObject } from '@angular-devkit/core'; import { Rule, Tree, UpdateRecorder } from '@angular-devkit/schematics'; +import { posix } from 'path'; import { findPropertyInAstObject, insertPropertyInAstObjectInOrder, @@ -74,38 +75,47 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B } // Add stricter file inclusions to avoid unused file warning during compilation - const rootInSrc = tsConfigPath.includes('src/'); - const rootSrc = rootInSrc ? '' : 'src/'; if (builderName !== Builders.Karma) { // Note: we need to re-read the tsconfig after very commit because // otherwise the updates will be out of sync since we are ammending the same node. tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); - const files = findPropertyInAstObject(tsConfigAst, 'files'); const include = findPropertyInAstObject(tsConfigAst, 'include'); - recorder = tree.beginUpdate(tsConfigPath); if (include && include.kind === 'array') { const tsInclude = include.elements.find(({ value }) => typeof value === 'string' && value.endsWith('**/*.ts')); if (tsInclude) { const { start, end } = tsInclude; + recorder = tree.beginUpdate(tsConfigPath); recorder.remove(start.offset, end.offset - start.offset); // Replace ts includes with d.ts recorder.insertLeft(start.offset, tsInclude.text.replace('.ts', '.d.ts')); + tree.commitUpdate(recorder); } - } else { - insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'include', [`${rootSrc}**/*.d.ts`], 2); } - tree.commitUpdate(recorder); - + const files = findPropertyInAstObject(tsConfigAst, 'files'); if (!files) { - tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); - recorder = tree.beginUpdate(tsConfigPath); + const newFiles: string[] = []; + + const mainOption = findPropertyInAstObject(option, 'main'); + if (mainOption && mainOption.kind === 'string') { + newFiles.push(posix.relative(posix.dirname(tsConfigPath), mainOption.value)); + } - const files = builderName === Builders.Server - ? [`${rootSrc}main.server.ts`] - : [`${rootSrc}main.ts`, `${rootSrc}polyfills.ts`]; - insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'files', files, 2); + const polyfillsOption = findPropertyInAstObject(option, 'polyfills'); + if (polyfillsOption && polyfillsOption.kind === 'string') { + newFiles.push(posix.relative(posix.dirname(tsConfigPath), polyfillsOption.value)); + } + + if (newFiles.length) { + recorder = tree.beginUpdate(tsConfigPath); + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); + insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'files', newFiles, 2); + tree.commitUpdate(recorder); + } + + recorder = tree.beginUpdate(tsConfigPath); + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); removePropertyInAstObject(recorder, tsConfigAst, 'exclude'); tree.commitUpdate(recorder); } diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts index 4cdf76388c2b..83359f2778ca 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts @@ -58,10 +58,9 @@ describe('Migration to version 9', () => { it('should update apps tsConfig with stricter files inclusions', async () => { overrideJsonFile(tree, 'tsconfig.app.json', defaultTsConfigOptions); const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); - const { exclude, files, include } = JSON.parse(tree2.readContent('tsconfig.app.json')); + const { exclude, files } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(exclude).toBeUndefined(); expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); - expect(include).toEqual(['src/**/*.d.ts']); }); it('should update apps tsConfig when tsconfig has include', async () => { From 2d66fecee88b95a4cfef5d8379bbe0a09e7fca9b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sun, 3 Nov 2019 14:42:31 +0100 Subject: [PATCH 0444/1070] fix(@angular/cli): add migration name to commit header Closes: #16030 --- packages/angular/cli/commands/update-impl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index a5530cd9b219..9ba90c90d9ef 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -189,7 +189,7 @@ export class UpdateCommand extends Command { // Commit migration if (commit) { - let message = `migrate workspace for ${packageName}@${migration.version}`; + let message = `${packageName} migration - ${migration.name}.`; if (migration.description) { message += '\n' + migration.description; } From c6c099e23e6df76e9b9ae523eda0983ee81c00e0 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 4 Nov 2019 05:14:41 +0000 Subject: [PATCH 0445/1070] build: update sass to version 1.23.3 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 060be0fea7f4..ef33e7004afa 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -47,7 +47,7 @@ "rimraf": "3.0.0", "rollup": "1.25.2", "rxjs": "6.5.3", - "sass": "1.23.1", + "sass": "1.23.3", "sass-loader": "8.0.0", "semver": "6.3.0", "source-map": "0.7.3", diff --git a/yarn.lock b/yarn.lock index 36bd4eea8b5d..08cedcce9d14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9214,7 +9214,14 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.23.1, sass@^1.23.0: +sass@1.23.3: + version "1.23.3" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.3.tgz#f07503b9e8d2bcf06ef69e8beea5d085589b1620" + integrity sha512-1DKRZxJMOh4Bme16AbWTyYeJAjTlrvw2+fWshHHaepeJfGq2soFZTnt0YhWit+bohtDu4LdyPoEj6VFD4APHog== + dependencies: + chokidar ">=2.0.0 <4.0.0" + +sass@^1.23.0: version "1.23.1" resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.1.tgz#0e5b72ba2bd9f0229a637d33f8dd5bf2d810beb3" integrity sha512-zQzJ3UETUWOMd/pJJGH/zvRsBVO97m11RcpfUhcQUHEXf0yHUBgOIE/Nw8aK0m1XyVJPeq228iIK7gVxsJ/Puw== From d780ae6c605670af942bc46f7606ade8bb36468f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 1 Nov 2019 05:21:40 +0000 Subject: [PATCH 0446/1070] build: update core-js to version 3.3.6 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ef33e7004afa..66ac728e7b19 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -23,7 +23,7 @@ "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", - "core-js": "3.3.5", + "core-js": "3.3.6", "file-loader": "4.2.0", "find-cache-dir": "3.0.0", "glob": "7.1.5", diff --git a/yarn.lock b/yarn.lock index 08cedcce9d14..c31f71ce7efb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3299,10 +3299,10 @@ core-js-compat@^3.1.1: browserslist "^4.7.1" semver "^6.3.0" -core-js@3.3.5: - version "3.3.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.5.tgz#58d20f48a95a07304b62ff752742b82b56431ed8" - integrity sha512-0J3K+Par/ZydhKg8pEiTcK/9d65/nqJOzY62uMkjeBmt05fDOt/khUVjDdh8TpeIuGQDy1yLDDCjiWN/8pFIuw== +core-js@3.3.6: + version "3.3.6" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.6.tgz#6ad1650323c441f45379e176ed175c0d021eac92" + integrity sha512-u4oM8SHwmDuh5mWZdDg9UwNVq5s1uqq6ZDLLIs07VY+VJU91i3h4f3K/pgFvtUQPGdeStrZ+odKyfyt4EnKHfA== core-js@^2.2.0, core-js@^2.4.0: version "2.6.10" From 85b671147ed67d7aa6ceb4b8fe4d26b73fff75ba Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 1 Nov 2019 05:21:28 +0000 Subject: [PATCH 0447/1070] build: update autoprefixer to version 9.7.1 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 25 ++++++------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 66ac728e7b19..3d6ab80cd56e 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -16,7 +16,7 @@ "@babel/preset-env": "7.6.3", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", - "autoprefixer": "9.7.0", + "autoprefixer": "9.7.1", "browserslist": "4.7.2", "cacache": "13.0.1", "caniuse-lite": "1.0.30001006", diff --git a/yarn.lock b/yarn.lock index c31f71ce7efb..5960f1d75d03 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2001,17 +2001,17 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.7.0: - version "9.7.0" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.0.tgz#905ec19e50f04545fe9ff131182cc9ab25246901" - integrity sha512-j2IRvaCfrUxIiZun9ba4mhJ2omhw4OY88/yVzLO+lHhGBumAAK72PgM6gkbSN8iregPOn1ZlxGkmZh2CQ7X4AQ== +autoprefixer@9.7.1: + version "9.7.1" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.1.tgz#9ffc44c55f5ca89253d9bb7186cefb01ef57747f" + integrity sha512-w3b5y1PXWlhYulevrTJ0lizkQ5CyqfeU6BIRDbuhsMupstHQOeb1Ur80tcB1zxSu7AwyY/qCQ7Vvqklh31ZBFw== dependencies: browserslist "^4.7.2" - caniuse-lite "^1.0.30001004" + caniuse-lite "^1.0.30001006" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.19" + postcss "^7.0.21" postcss-value-parser "^4.0.2" autoprefixer@^9.6.5: @@ -2652,7 +2652,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001006: +caniuse-lite@1.0.30001006, caniuse-lite@^1.0.30001006: version "1.0.30001006" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001006.tgz#5b6e8288792cfa275f007b2819a00ccad7112655" integrity sha512-MXnUVX27aGs/QINz+QG1sWSLDr3P1A3Hq5EUWoIt0T7K24DuvMxZEnh3Y5aHlJW6Bz2aApJdSewdYLd8zQnUuw== @@ -8238,7 +8238,7 @@ postcss-value-parser@^4.0.2: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== -postcss@7.0.21: +postcss@7.0.21, postcss@^7.0.21: version "7.0.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" integrity sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ== @@ -8256,15 +8256,6 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.18, postcss@^7.0.2: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^7.0.19: - version "7.0.20" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.20.tgz#a107b68ef1ad1c5e6e214ebb3c5ede2799322837" - integrity sha512-VOdO3a5nHVftPSEbG1zaG320b4mH5KAflH+pIeVAF5/hlw6YumELSgHZQBekjg29Oj4qw7XAyp9tIEBpeNWcyg== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" From 82fbda6255e9c057e70f89e47b9cdd7ca5f601bc Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 31 Oct 2019 09:25:29 +0100 Subject: [PATCH 0448/1070] build: update @angular to version 9.0.0-next.15 --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 24 ++--- .../src/utils/load-translations.ts | 14 +-- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 24 ++--- yarn.lock | 96 +++++++++---------- 7 files changed, 86 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index 37a8195560db..e39e6cef1048 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,8 @@ "typescript": "3.6.4" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.14", - "@angular/compiler-cli": "9.0.0-next.14", + "@angular/compiler": "9.0.0-next.15", + "@angular/compiler-cli": "9.0.0-next.15", "@bazel/bazel": "1.0.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.39.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 3d6ab80cd56e..b9a5f11976bd 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -69,20 +69,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.14", + "@angular/animations": "9.0.0-next.15", "@angular/cdk": "8.2.3", - "@angular/common": "9.0.0-next.14", - "@angular/compiler": "9.0.0-next.14", - "@angular/compiler-cli": "9.0.0-next.14", - "@angular/core": "9.0.0-next.14", - "@angular/forms": "9.0.0-next.14", - "@angular/localize": "9.0.0-next.14", + "@angular/common": "9.0.0-next.15", + "@angular/compiler": "9.0.0-next.15", + "@angular/compiler-cli": "9.0.0-next.15", + "@angular/core": "9.0.0-next.15", + "@angular/forms": "9.0.0-next.15", + "@angular/localize": "9.0.0-next.15", "@angular/material": "8.2.3", - "@angular/platform-browser": "9.0.0-next.14", - "@angular/platform-browser-dynamic": "9.0.0-next.14", - "@angular/platform-server": "9.0.0-next.14", - "@angular/router": "9.0.0-next.14", - "@angular/service-worker": "9.0.0-next.14", + "@angular/platform-browser": "9.0.0-next.15", + "@angular/platform-browser-dynamic": "9.0.0-next.15", + "@angular/platform-server": "9.0.0-next.15", + "@angular/router": "9.0.0-next.15", + "@angular/service-worker": "9.0.0-next.15", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_angular/src/utils/load-translations.ts b/packages/angular_devkit/build_angular/src/utils/load-translations.ts index 7d6db707e84e..08c71e0b7869 100644 --- a/packages/angular_devkit/build_angular/src/utils/load-translations.ts +++ b/packages/angular_devkit/build_angular/src/utils/load-translations.ts @@ -27,36 +27,38 @@ export async function createTranslationLoader(): Promise { async function importParsers() { try { + // In @angular/localize version 9.0.0-next.15 the parsers were located in the below locations. return { json: new (await import( // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json/simple_json_translation_parser' + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser' )).SimpleJsonTranslationParser(), xlf: new (await import( // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1/xliff1_translation_parser' + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser' )).Xliff1TranslationParser(), xlf2: new (await import( // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2/xliff2_translation_parser' + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser' )).Xliff2TranslationParser(), }; } catch { + // Prior to @angular/localize version 9.0.0-next.15 the parsers were located in the below locations. return { json: new (await import( // @ts-ignore // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser' + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json/simple_json_translation_parser' )).SimpleJsonTranslationParser(), xlf: new (await import( // @ts-ignore // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser' + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1/xliff1_translation_parser' )).Xliff1TranslationParser(), xlf2: new (await import( // @ts-ignore // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser' + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2/xliff2_translation_parser' )).Xliff2TranslationParser(), }; } diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index e80a865ede55..6b38ada76a35 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^9.0.0-rc.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.14", - "@angular/compiler-cli": "9.0.0-next.14", + "@angular/compiler": "9.0.0-next.15", + "@angular/compiler-cli": "9.0.0-next.15", "@angular-devkit/core": "0.0.0", "ng-packagr": "~9.0.0-rc.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 1829c111b811..3f7d3ca05391 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -32,8 +32,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.14", - "@angular/compiler-cli": "9.0.0-next.14", + "@angular/compiler": "9.0.0-next.15", + "@angular/compiler-cli": "9.0.0-next.15", "typescript": "3.6.4", "webpack": "4.41.2" } diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index ced1c5e771da..a3828cc2cd52 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,17 +2,17 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#85f9884ebcc90e1b10146d56d3e4ddb334f2c90a", - "@angular/common": "github:angular/common-builds#860e79de1e12c508fa2df2b75ba4e8f1630ee933", - "@angular/compiler": "github:angular/compiler-builds#28919175504c9f73f4c7ae9446e416991a26e022", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#3d380510d0796fcc92201f77f7bf620fc6a4e235", - "@angular/core": "github:angular/core-builds#8b93e1ae70e90155108ddd73c3353c41d51686ec", - "@angular/forms": "github:angular/forms-builds#9c9ff43e8df9548f13000176a96ccc348335bc51", - "@angular/language-service": "github:angular/language-service-builds#736f348091b205671e613a103c50131905762d3a", - "@angular/localize": "github:angular/localize-builds#035e9f7a68e4862f9a3cd77e01725a6e1c5772dd", - "@angular/platform-browser": "github:angular/platform-browser-builds#9c6956b43585a9d206ae61a24cd996bfd48955d8", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#aa080d8d6ba7b0a873a51a57164a0c5731d5687a", - "@angular/platform-server": "github:angular/platform-server-builds#317d385e1308f42703583b7960dee97c4a798b73", - "@angular/router": "github:angular/router-builds#289c78f9c277c720158faa27034f89ef759d3d64" + "@angular/animations": "github:angular/animations-builds#ac30ba554580c061d3c0af1b947c2dadc41f28bd", + "@angular/common": "github:angular/common-builds#81519bb882f4f4a635bb288837513e85ac27b16f", + "@angular/compiler": "github:angular/compiler-builds#5089a1bed7cfb0a43062b3d749e7d7504c5e77bb", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#2f61281a3fa5077f838ccd7b67fe4255927e607a", + "@angular/core": "github:angular/core-builds#457bb4e6f6cfdc37b8db46e8c1cd9ea06b0997aa", + "@angular/forms": "github:angular/forms-builds#d5fb1a58893c8ca0a37f15f6e027ca0ef14597a4", + "@angular/language-service": "github:angular/language-service-builds#99233eb6c7bd0784357ba2ff901949fd0c0e5e20", + "@angular/localize": "github:angular/localize-builds#3b63415900cdd82d2663ead33e66904e0641686f", + "@angular/platform-browser": "github:angular/platform-browser-builds#4a2559f20bd8ded16128b35c86fbc8ed1eda598e", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#002af234104ac5fda0aa9801cf99075bec3dd284", + "@angular/platform-server": "github:angular/platform-server-builds#e5444e31215fc389367faa7ec18ed3c3c930fca5", + "@angular/router": "github:angular/router-builds#7a38790e59395d466bb2f51eb43289d438284f51" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 5960f1d75d03..a91b4813a54f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.14.tgz#9c967be04f7ed1691df48bf4e517172c7d226559" - integrity sha512-5JDFoXcbS9kJWZTxsFatuYwbsCwBb1kAM8WkrCrANgRxJiJ6JDiOMCL9fFmFq8ihKft4QOpuvGoH6UMkAo3mAQ== +"@angular/animations@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.15.tgz#00535803601019ee49c45f2f601cd53f60a34973" + integrity sha512-s4hIpoKbx/tGK+7eeUHt2OVtQw5GpFPor5SGrrMSuc8mw67kifKk5SR0lFTunc2FKP9NN3FAqx9nFsEc8Tfhcw== "@angular/cdk@8.2.3": version "8.2.3" @@ -16,15 +16,15 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.14.tgz#a83381e097efc05e173f6b39ba8995e85217ae8a" - integrity sha512-2YfiXyn0vconAT6WDlJH/iIlhdt+/utHnHERE3rEKqL4+xfoGsmRJ0+pm7b729/JlWCykDVxfU4msWvl6EC+pw== +"@angular/common@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.15.tgz#969467f74a5d48d5ac2124b8b432713ba4e35b2e" + integrity sha512-OU19ANOPhee+T7GX4itD8dE+3LCG9rNiw8vVlbN+Uy3soHPKPoiouugnWtK0I5RP5brZC0MEDrhkSKkWg8u9Dg== -"@angular/compiler-cli@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.14.tgz#d455935c191deadaf5b27807b0eb0718b2711ae1" - integrity sha512-5mAnqyMtMwKGMgScJDzNC+VCZXsbOf+/JIoPJFoSgo0J2j4tAQzEUW7Sq2PCdKxQRzz/k5Go8GWEPQeDz0hGRQ== +"@angular/compiler-cli@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.15.tgz#8ec3bfa96de9d959490a8fd23a48ba0799047bdf" + integrity sha512-6XuiGdWd/+bAd8BO8PcNE7bQpHSsfXqP3nBmuDtC4kRVxEnfPyPwzHsLig6tn3tEswLhcHs42owiengXe31kUQ== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -37,25 +37,25 @@ source-map "^0.6.1" yargs "13.1.0" -"@angular/compiler@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.14.tgz#d590eee10ac0e8d9cd27400f481f5b4553fa533f" - integrity sha512-6DazT5cunWrGu+035l8IfMRadI5Z6vRe2kZoBF8OS8XldYL3cMZCfpY4WEmmcRRM+41r9QP/FTyAbZFQeMTrog== +"@angular/compiler@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.15.tgz#cc6157d7d9c63e5dfbbb37f03d9a06ee738eefbc" + integrity sha512-F88fuv6SO2nCDAbvP8cAynxg8KWO1ouUyWVVYH0FUHKw/kWWgSUqax4CB7XtO6NVbpol4IOssUXx/hG/D5XCZA== -"@angular/core@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.14.tgz#b13f0771e52ea931bb845a1b040b4e83b47ba70f" - integrity sha512-/NZAqgbSCoEehTqlnEVIcPdb4UWISnetbkEai7F4PLvoqey3T1qiTdcuQkVcZAK2ahhC89y1FgUbR1biatHrnA== +"@angular/core@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.15.tgz#66fb9ced44f6e72a3ccc5e46d33f32a2f6ccf830" + integrity sha512-ZvhxaHl1dHwseMbMbYfs134yyUZIq13bqejAfSp/ZalRsTV2nbWlBMbYhjemsHSS1UWNb3DXfUXJTKQzqk8QZQ== -"@angular/forms@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.14.tgz#fcb15807d2621e90423eccd59bd5852892d523e0" - integrity sha512-4DpJSU5MCU15Whmcwt+oDOmDUALo1bIagOr0PqhL7ZQqVyuciOGXrQJNMKXvlM0yCZOHlvkDJw/egTmROkfzDg== +"@angular/forms@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.15.tgz#8baefe67e63c64a1104efa10ca8eb86268aa0d3d" + integrity sha512-OudfUyJp2k8x+dgb3NB5i7RSjXT1ImKLUZ2xmsNxtbhijpAVgE2wZ224D/wLiwXqUMRcMnPdz6rnT+Fzuui1jw== -"@angular/localize@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.14.tgz#c39ff2f5aa7c66de335a426245e7f7bd170edfee" - integrity sha512-ZzjGVaFZwnFL9vVXFwxbcwpK19aKNSbbWAORGozV8c5cTkoc1AxmDS7ZvvDrFmqM15Y1Ju/6GNNQK+skm8Wqgw== +"@angular/localize@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.15.tgz#f3a385b76221137da9fcc72e0c1e9767468959d1" + integrity sha512-0h9NzKiEAqsTSNFSf7IVCrZJse+uvx0Ncb6FomW93AJFBVvdWiNfllRJjIzPkyPwC/dnoYhUaF/I9+4q7qxipA== dependencies: "@babel/core" "^7.5.5" glob "7.1.2" @@ -68,33 +68,33 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.14.tgz#2c7f6c8374152ec292f48ec57db62763bf5711f9" - integrity sha512-REkbvBOIE4ssmnJI8nOUSvUxm4dVlfqinqgv4sQdV2G8ioJXFtWkqfjAFvR7QU1/Dadaj2Oo+5Yau110V/sbMw== +"@angular/platform-browser-dynamic@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.15.tgz#385c459c267ff2f9443a4f698a155cbdf7fde7ea" + integrity sha512-oiXozg87f+ijco61Ao9NLy7/O0pBntzXL0FDE+dVZYWxJgb4dHsq0w/ojL0rlLrqLxaxANtEszfsSlEUoC5drg== -"@angular/platform-browser@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.14.tgz#b741e583a60bef778f92b285469c2d0d00ab9a7a" - integrity sha512-ZgB9T2hZytqSr7xpYacLgct5WVQ+xKlsrLymK++SffaGKzj0zlkAMj3mVF+12Zec0Ic5NpG8oTIovH+Lk57IuQ== +"@angular/platform-browser@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.15.tgz#9c698ac1b2c2f2dfba5205f6875ebd5f0504c3c9" + integrity sha512-rT4fMhO75cyLBICxSIX7rEBnaQvn0t/aHBA5L4FLXz/J/fgk+3OBI9pE1zRcyo+Z1vwrWZ+9eiNdmNMFFSXNAg== -"@angular/platform-server@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.14.tgz#887e948f9da265f88378aa4ec8273b22433ec951" - integrity sha512-CnBa+Q13xDkr0zJlqhiShF1ovqpvOQCkMAKCPaGyByMC24nys8wNKhw/El743TREwZQXTWNfXveboSmqDVrGtA== +"@angular/platform-server@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.15.tgz#1c13eaf94e65ec1a7a24ee2a00e78ba60f5f24c1" + integrity sha512-9FmJfwZHrVj7YHvACflAnI0tJ8wpAccymq3Pvr9kHaLnPwD1xeoGGfHINqWTjUoHldpltfHiiwcHXQ3GxbmZrw== dependencies: domino "^2.1.2" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.14.tgz#3d19e351d533657887b87d8c5abe74a56806854d" - integrity sha512-Uv8Bre1JXjHUaFf6v1dtfHKPWhQiZdy/v9ZS5yZyPjX8xX0lBHQKu+Uryo9EyXldwNDIcqxi9/y4Vl+PB5d0/g== +"@angular/router@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.15.tgz#a0e5b07e5f40c0c7d8afd849eb69f9788da21fce" + integrity sha512-klzVn6yWv0NQcE2qYdrD5EVt4ETBJSmtmfF562ibqBBOXuFyU9PY2GzkZ6Ot+rS6Ed4Q/GEg1iigEd8uqB+2lg== -"@angular/service-worker@9.0.0-next.14": - version "9.0.0-next.14" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.14.tgz#57fd4993c14f3155dfbeb228b871dea1483066e6" - integrity sha512-RAPzRfxIyq6yIOHYk+vdLxe4HuCS4S6o6+P2SnBJIkpf+do05aPbin4tmEr5rK+3wDa7QP1E14NAgCYxF0b1hA== +"@angular/service-worker@9.0.0-next.15": + version "9.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.15.tgz#4fec3aca0e338cc8bd1b2efa60413f928546c4b3" + integrity sha512-DuUAbbLM9IMxzbNj+X0FUOyREWHd0MX0BTu5e2WJpfPRQyphGRvtNpDOWUWukkfo1RtlF7cE2rcxfzDSQMKt+w== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" From 6f3d162e419b9d50328461529c1388332b13bb1e Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 1 Nov 2019 20:55:38 -0400 Subject: [PATCH 0449/1070] fix(@angular/cli): remove unneeded git HEAD update message Closes #16031 --- packages/angular/cli/commands/update-impl.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 9ba90c90d9ef..5d84e1ae5a5e 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -162,8 +162,6 @@ export class UpdateCommand extends Command { return true; } - const startingGitSha = this.findCurrentGitSha(); - migrations.sort((a, b) => semver.compare(a.version, b.version) || a.name.localeCompare(b.name)); this.logger.info( @@ -175,13 +173,6 @@ export class UpdateCommand extends Command { const result = await this.executeSchematic(migration.collection.name, migration.name); if (!result.success) { - if (startingGitSha !== null) { - const currentGitSha = this.findCurrentGitSha(); - if (currentGitSha !== startingGitSha) { - this.logger.warn(`git HEAD was at ${startingGitSha} before migrations.`); - } - } - this.logger.error(`${colors.symbols.cross} Migration failed. See above for further details.\n`); return false; From 84ba5d55f093820a0da2f19aa8717d29ba902f34 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 1 Nov 2019 22:13:15 -0400 Subject: [PATCH 0450/1070] fix(@angular/cli): only show add/update package install output on errors Closes #16014 Closes #16027 --- packages/angular/cli/tasks/install-package.ts | 65 ++++++++----------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index cab1c38dae67..00c1d95da889 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -8,12 +8,7 @@ import { logging } from '@angular-devkit/core'; import { spawnSync } from 'child_process'; -import { - existsSync, - mkdtempSync, - readFileSync, - realpathSync, -} from 'fs'; +import { existsSync, mkdtempSync, readFileSync, realpathSync } from 'fs'; import { tmpdir } from 'os'; import { join, resolve } from 'path'; import * as rimraf from 'rimraf'; @@ -53,21 +48,18 @@ export function installPackage( installArgs.push(packageManagerArgs.saveDev); } - const { status } = spawnSync( - packageManager, - [ - ...installArgs, - ...extraArgs, - ], - { - stdio: 'inherit', - shell: true, - cwd, - }, - ); + const { status, stderr } = spawnSync(packageManager, [...installArgs, ...extraArgs], { + stdio: 'pipe', + encoding: 'utf8', + cwd, + }); if (status !== 0) { - throw new Error('Package install failed, see above.'); + let errors = stderr.trim(); + if (errors.length) { + errors += '\n'; + } + throw new Error(errors + `Package install failed${errors.length ? ', see above' : ''}.`); } logger.info(colors.green(`Installed packages for tooling via ${packageManager}.`)); @@ -84,7 +76,7 @@ export function installTempPackage( process.on('exit', () => { try { rimraf.sync(tempPath); - } catch { } + } catch {} }); // setup prefix/global modules path @@ -134,10 +126,7 @@ export function runTempPackageBin( throw new Error(`Cannot locate bin for temporary package: ${packageNameNoVersion}.`); } - const argv = [ - binPath, - ...args, - ]; + const argv = [binPath, ...args]; const { status, error } = spawnSync('node', argv, { stdio: 'inherit', @@ -159,19 +148,19 @@ export function runTempPackageBin( function getPackageManagerArguments(packageManager: PackageManager): PackageManagerOptions { return packageManager === PackageManager.Yarn ? { - silent: '--silent', - saveDev: '--dev', - install: 'add', - prefix: '--modules-folder', - noBinLinks: '--no-bin-links', - noLockfile: '--no-lockfile', - } + silent: '--silent', + saveDev: '--dev', + install: 'add', + prefix: '--modules-folder', + noBinLinks: '--no-bin-links', + noLockfile: '--no-lockfile', + } : { - silent: '--quiet', - saveDev: '--save-dev', - install: 'install', - prefix: '--prefix', - noBinLinks: '--no-bin-links', - noLockfile: '--no-package-lock', - }; + silent: '--quiet', + saveDev: '--save-dev', + install: 'install', + prefix: '--prefix', + noBinLinks: '--no-bin-links', + noLockfile: '--no-package-lock', + }; } From aad8fa1fab7c7fa5571e5ead8de4775cc15c9f79 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 4 Nov 2019 08:04:55 +0100 Subject: [PATCH 0451/1070] refactor(@schematics/angular): deprecate component entryComponents Since version 9.0.0 with Ivy, entryComponents is no longer necessary --- packages/schematics/angular/component/schema.json | 3 ++- packages/schematics/angular/utility/ast-utils.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 8172eaf9a305..3b13e337addd 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -128,7 +128,8 @@ "entryComponent": { "type": "boolean", "default": false, - "description": "When true, the new component is the entry component of the declaring NgModule." + "description": "When true, the new component is the entry component of the declaring NgModule.", + "x-deprecated": "Since version 9.0.0 with Ivy, entryComponents is no longer necessary." }, "lintFix": { "type": "boolean", diff --git a/packages/schematics/angular/utility/ast-utils.ts b/packages/schematics/angular/utility/ast-utils.ts index 541786dd8e49..f00160fb8119 100644 --- a/packages/schematics/angular/utility/ast-utils.ts +++ b/packages/schematics/angular/utility/ast-utils.ts @@ -537,6 +537,7 @@ export function addBootstrapToModule(source: ts.SourceFile, /** * Custom function to insert an entryComponent into NgModule. It also imports it. + * @deprecated - Since version 9.0.0 with Ivy, entryComponents is no longer necessary. */ export function addEntryComponentToModule(source: ts.SourceFile, modulePath: string, classifiedName: string, From 26f5e6ffa3eb6453b50aee24101c4bbf660d4869 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 5 Nov 2019 08:53:26 +0100 Subject: [PATCH 0452/1070] fix(@schematics/angular): `appendValueInAstArray` should not break JSON when using different formatting Fixes: #16024, fixes: #15462 and fixes: #14776 --- .../schematics/angular/utility/json-utils.ts | 35 ++++++++++++++----- .../angular/utility/json-utils_spec.ts | 32 ++++++++++++++++- 2 files changed, 57 insertions(+), 10 deletions(-) diff --git a/packages/schematics/angular/utility/json-utils.ts b/packages/schematics/angular/utility/json-utils.ts index 8684785aef8d..cf1754a9a44d 100644 --- a/packages/schematics/angular/utility/json-utils.ts +++ b/packages/schematics/angular/utility/json-utils.ts @@ -143,7 +143,6 @@ export function removePropertyInAstObject( recorder.remove(start.offset, end.offset - start.offset); if (!nextProp) { - recorder.insertRight(start.offset, '\n'); } } @@ -155,21 +154,39 @@ export function appendValueInAstArray( value: JsonValue, indent = 4, ) { - const indentStr = _buildIndent(indent); + let indentStr = _buildIndent(indent); let index = node.start.offset + 1; + // tslint:disable-next-line: no-any + let newNodes: any[] | undefined; + if (node.elements.length > 0) { // Insert comma. - const last = node.elements[node.elements.length - 1]; - recorder.insertRight(last.end.offset, ','); - index = indent ? last.end.offset + 1 : last.end.offset; + const { end } = node.elements[node.elements.length - 1]; + const isClosingOnSameLine = node.end.offset - end.offset === 1; + + if (isClosingOnSameLine && indent) { + // Reformat the entire array + recorder.remove(node.start.offset, node.end.offset - node.start.offset); + newNodes = [ + ...node.elements.map(({ value }) => value), + value, + ]; + index = node.start.offset; + // In case we are generating the entire node we need to reduce the spacing as + // otherwise we'd end up having incorrect double spacing + indent = indent - 2; + indentStr = _buildIndent(indent); + } else { + recorder.insertRight(end.offset, ','); + index = end.offset; + } } recorder.insertRight( index, - (node.elements.length === 0 && indent ? '\n' : '') - + ' '.repeat(indent) - + _stringifyContent(value, indentStr) - + indentStr.slice(0, -indent), + (newNodes ? '' : indentStr) + + _stringifyContent(newNodes || value, indentStr) + + (node.elements.length === 0 && indent ? indentStr.substr(0, -indent) + '\n' : ''), ); } diff --git a/packages/schematics/angular/utility/json-utils_spec.ts b/packages/schematics/angular/utility/json-utils_spec.ts index becda85f3f1c..400e4e1dd320 100644 --- a/packages/schematics/angular/utility/json-utils_spec.ts +++ b/packages/schematics/angular/utility/json-utils_spec.ts @@ -15,6 +15,7 @@ import { removePropertyInAstObject, } from './json-utils'; +// tslint:disable-next-line: no-big-function describe('json-utils', () => { const a = 'a'; const b = 'b'; @@ -199,6 +200,35 @@ describe('json-utils', () => { expect(JSON.parse(got)).toEqual(want); } }); - }); + it('should insert multiple props with different indentations in Object literal', () => { + const cases: Array<[string[], string, {}, number]> = [ + // initial | value | want | indent + [[], z, [z], 0], + [[z], m, [z, m], 0], + [[m, z], a, [m, z, a], 0], + [[a, m, z], b, [a, m, z, b], 0], + // todo: investigate how to do this this of addition with the correct formatting + // [[], z, [z], 2], + [[z], m, [z, m], 2], + [[m, z], a, [m, z, a], 2], + [[a, m, z], b, [a, m, z, b], 2], + // todo: investigate how to do this this of addition with the correct formatting + // [[], z, [z], 4], + [[z], m, [z, m], 4], + [[m, z], a, [m, z, a], 4], + [[a, m, z], b, [a, m, z, b], 4], + ]; + for (const c of cases) { + const [initial, value, want, indent] = c; + const got = runTest((rec: UpdateRecorder, ast: JsonAstObject) => { + expect(ast.properties[0].value.kind).toBe('array'); + appendValueInAstArray(rec, ast.properties[0].value as unknown as JsonAstArray, value, indent * 2); + }, { data: initial }, indent); + const wantData = { data: want }; + expect(got).toBe(JSON.stringify(wantData, null, indent)); + expect(JSON.parse(got)).toEqual(wantData); + } + }); + }); }); From 9ba78050bb2f77dfb8c170daa6b1b1b385d31d37 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 5 Nov 2019 08:49:12 +0100 Subject: [PATCH 0453/1070] fix(@schematics/angular): warn when target references a missing tsconfig Fixes #16019 --- .../migrations/update-9/ivy-libraries.ts | 13 +++++++--- .../migrations/update-9/ngsw-config.ts | 6 +++-- .../migrations/update-9/remove-tsickle.ts | 21 +++++++--------- .../update-9/update-app-tsconfigs.ts | 25 +++++++++++-------- .../angular/migrations/update-9/utils.ts | 8 ++++-- 5 files changed, 44 insertions(+), 29 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts index a6edb7b5ef4a..7a13886e26f8 100644 --- a/packages/schematics/angular/migrations/update-9/ivy-libraries.ts +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries.ts @@ -23,7 +23,8 @@ import { getTargets, getWorkspace, readJsonFileAsAstObject } from './utils'; * - Create a prod tsconfig for which disables Ivy and enables VE compilations. */ export function updateLibraries(): Rule { - return (tree: Tree) => { + return (tree, context) => { + const logger = context.logger; const workspacePath = getWorkspacePath(tree); const workspace = getWorkspace(tree); @@ -61,8 +62,14 @@ export function updateLibraries(): Rule { } // tsConfig for production already exists. - const tsConfigAst = readJsonFileAsAstObject(tree, tsConfigOption.value); - const tsConfigRecorder = tree.beginUpdate(tsConfigOption.value); + const tsConfigPath = tsConfigOption.value; + const tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); + if (!tsConfigAst) { + logger.warn(`Cannot find file: ${tsConfigPath}`); + continue; + } + + const tsConfigRecorder = tree.beginUpdate(tsConfigPath); const ngCompilerOptions = findPropertyInAstObject(tsConfigAst, 'angularCompilerOptions'); if (!ngCompilerOptions) { // Add angularCompilerOptions to the production tsConfig diff --git a/packages/schematics/angular/migrations/update-9/ngsw-config.ts b/packages/schematics/angular/migrations/update-9/ngsw-config.ts index e6283203dfec..dd8a2baefa50 100644 --- a/packages/schematics/angular/migrations/update-9/ngsw-config.ts +++ b/packages/schematics/angular/migrations/update-9/ngsw-config.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { Rule, Tree } from '@angular-devkit/schematics'; +import { Rule } from '@angular-devkit/schematics'; import { appendValueInAstArray, findPropertyInAstObject } from '../../utility/json-utils'; import { Builders } from '../../utility/workspace-models'; import { getAllOptions, getTargets, getWorkspace, readJsonFileAsAstObject } from './utils'; @@ -15,13 +15,15 @@ import { getAllOptions, getTargets, getWorkspace, readJsonFileAsAstObject } from * Update ngsw-config.json to fix issue https://github.com/angular/angular-cli/pull/15277 */ export function updateNGSWConfig(): Rule { - return (tree: Tree) => { + return (tree, context) => { const workspace = getWorkspace(tree); + const logger = context.logger; for (const { target } of getTargets(workspace, 'build', Builders.Browser)) { for (const options of getAllOptions(target)) { const ngswConfigPath = findPropertyInAstObject(options, 'ngswConfigPath'); if (!ngswConfigPath || ngswConfigPath.kind !== 'string') { + logger.warn(`Cannot find file: ${ngswConfigPath}`); continue; } diff --git a/packages/schematics/angular/migrations/update-9/remove-tsickle.ts b/packages/schematics/angular/migrations/update-9/remove-tsickle.ts index 283cb9c3162e..7d975976e95a 100644 --- a/packages/schematics/angular/migrations/update-9/remove-tsickle.ts +++ b/packages/schematics/angular/migrations/update-9/remove-tsickle.ts @@ -5,20 +5,19 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonParseMode, parseJsonAst } from '@angular-devkit/core'; -import { Rule, Tree } from '@angular-devkit/schematics'; +import { Rule } from '@angular-devkit/schematics'; import { removePackageJsonDependency } from '../../utility/dependencies'; import { findPropertyInAstObject, removePropertyInAstObject } from '../../utility/json-utils'; import { Builders } from '../../utility/workspace-models'; -import { getAllOptions, getTargets, getWorkspace } from './utils'; +import { getAllOptions, getTargets, getWorkspace, readJsonFileAsAstObject } from './utils'; /** * Remove tsickle from libraries */ export function removeTsickle(): Rule { - return (tree: Tree) => { + return (tree, context) => { removePackageJsonDependency(tree, 'tsickle'); - + const logger = context.logger; const workspace = getWorkspace(tree); for (const { target } of getTargets(workspace, 'build', Builders.NgPackagr)) { @@ -28,20 +27,18 @@ export function removeTsickle(): Rule { continue; } - const tsConfigContent = tree.read(tsConfigOption.value); - if (!tsConfigContent) { - continue; - } + const tsConfigPath = tsConfigOption.value; + const tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); + if (!tsConfigAst) { + logger.warn(`Cannot find file: ${tsConfigPath}`); - const tsConfigAst = parseJsonAst(tsConfigContent.toString(), JsonParseMode.Loose); - if (!tsConfigAst || tsConfigAst.kind !== 'object') { continue; } const ngCompilerOptions = findPropertyInAstObject(tsConfigAst, 'angularCompilerOptions'); if (ngCompilerOptions && ngCompilerOptions.kind === 'object') { // remove annotateForClosureCompiler option - const recorder = tree.beginUpdate(tsConfigOption.value); + const recorder = tree.beginUpdate(tsConfigPath); removePropertyInAstObject(recorder, ngCompilerOptions, 'annotateForClosureCompiler'); tree.commitUpdate(recorder); } diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts index a3bf37cb7739..bac0071376c0 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonAstObject } from '@angular-devkit/core'; +import { JsonAstObject, logging } from '@angular-devkit/core'; import { Rule, Tree, UpdateRecorder } from '@angular-devkit/schematics'; import { posix } from 'path'; import { @@ -16,33 +16,32 @@ import { import { Builders } from '../../utility/workspace-models'; import { getAllOptions, getTargets, getWorkspace, readJsonFileAsAstObject } from './utils'; - /** * Update the tsconfig files for applications * - Removes enableIvy: true * - Sets stricter file inclusions */ export function updateApplicationTsConfigs(): Rule { - return (tree: Tree) => { + return (tree, context) => { const workspace = getWorkspace(tree); for (const { target } of getTargets(workspace, 'build', Builders.Browser)) { - updateTsConfig(tree, target, Builders.Browser); + updateTsConfig(tree, target, Builders.Browser, context.logger); } for (const { target } of getTargets(workspace, 'server', Builders.Server)) { - updateTsConfig(tree, target, Builders.Server); + updateTsConfig(tree, target, Builders.Server, context.logger); } for (const { target } of getTargets(workspace, 'test', Builders.Karma)) { - updateTsConfig(tree, target, Builders.Karma); + updateTsConfig(tree, target, Builders.Karma, context.logger); } return tree; }; } -function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: Builders) { +function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: Builders, logger: logging.LoggerApi) { const options = getAllOptions(builderConfig); for (const option of options) { let recorder: UpdateRecorder; @@ -55,6 +54,7 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B const tsConfigPath = tsConfigOption.value; let tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); if (!tsConfigAst) { + logger.warn(`Cannot find file: ${tsConfigPath}`); continue; } @@ -78,7 +78,10 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B if (builderName !== Builders.Karma) { // Note: we need to re-read the tsconfig after very commit because // otherwise the updates will be out of sync since we are ammending the same node. - tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); + + // we are already checking that tsconfig exists above! + // tslint:disable-next-line: no-non-null-assertion + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath) !; const include = findPropertyInAstObject(tsConfigAst, 'include'); if (include && include.kind === 'array') { @@ -109,13 +112,15 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B if (newFiles.length) { recorder = tree.beginUpdate(tsConfigPath); - tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); + // tslint:disable-next-line: no-non-null-assertion + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath) !; insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'files', newFiles, 2); tree.commitUpdate(recorder); } recorder = tree.beginUpdate(tsConfigPath); - tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); + // tslint:disable-next-line: no-non-null-assertion + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath) !; removePropertyInAstObject(recorder, tsConfigAst, 'exclude'); tree.commitUpdate(recorder); } diff --git a/packages/schematics/angular/migrations/update-9/utils.ts b/packages/schematics/angular/migrations/update-9/utils.ts index 074cbf4e67b4..4e51c32cf579 100644 --- a/packages/schematics/angular/migrations/update-9/utils.ts +++ b/packages/schematics/angular/migrations/update-9/utils.ts @@ -85,11 +85,15 @@ export function getAllOptions(builderConfig: JsonAstObject, configurationsOnly = export function getWorkspace(host: Tree): JsonAstObject { const path = getWorkspacePath(host); + const content = readJsonFileAsAstObject(host, path); + if (!content) { + throw new SchematicsException(`Could not find (${path})`); + } - return readJsonFileAsAstObject(host, path); + return content; } -export function readJsonFileAsAstObject(host: Tree, path: string): JsonAstObject { +export function readJsonFileAsAstObject(host: Tree, path: string): JsonAstObject | undefined { const configBuffer = host.read(path); if (!configBuffer) { throw new SchematicsException(`Could not find (${path})`); From 0f3587173a92868b0ffcf7a54fe8571cca8e4577 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 5 Nov 2019 12:27:39 +0100 Subject: [PATCH 0454/1070] test: verify that link in outputpath is not deleted at source Closes: #15183 --- .../test/browser/output-path_spec_large.ts | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts index 53f819eae4b5..f661a9cecade 100644 --- a/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/output-path_spec_large.ts @@ -8,6 +8,7 @@ import { Architect } from '@angular-devkit/architect'; import { getSystemPath, join, virtualFs } from '@angular-devkit/core'; +import * as fs from 'fs'; import { browserBuild, createArchitect, host } from '../utils'; @@ -39,13 +40,42 @@ describe('Browser Builder output path', () => { await run.stop(); }); + it('deletes output path and unlink symbolic link', async () => { + // Write a file to the output path to later verify it was deleted. + host.writeMultipleFiles({ + 'src-link/dummy.txt': '', + 'dist/file.txt': virtualFs.stringToFileBuffer('file'), + }); + + const distLinked = join(host.root(), 'dist', 'linked'); + + // create symbolic link + fs.symlinkSync( + getSystemPath(join(host.root(), 'src-link')), + getSystemPath(distLinked), + 'junction', + ); + + expect(await host.exists(distLinked).toPromise()).toBe(true); + + // Delete an app file to force a failed compilation. + // Failed compilations still delete files, but don't output any. + await host.delete(join(host.root(), 'src', 'app', 'app.component.ts')).toPromise(); + const run = await architect.scheduleTarget(target); + const output = await run.result; + expect(output.success).toBe(false); + + expect(await host.exists(join(host.root(), 'dist')).toPromise()).toBe(false); + expect(await host.exists(join(host.root(), 'src-link')).toPromise()).toBe(true); + }); + it('does not allow output path to be project root', async () => { const overrides = { outputPath: './' }; const run = await architect.scheduleTarget(target, overrides); try { await run.result; expect('THE ABOVE LINE SHOULD THROW').toBe(''); - } catch {} + } catch { } await run.stop(); }); From 3f38e4e57d586cad831a09ac5fdb7414d70663d7 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 5 Nov 2019 14:08:41 +0000 Subject: [PATCH 0455/1070] ci: fix --ve flag on flake jail --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b7ac5a444d3..7d26c0f74ff0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -251,7 +251,7 @@ jobs: - custom_attach_workspace - run: yarn webdriver-update - run: yarn test-large --full --flakey - - run: yarn test-large --full --flakey --ve=true + - run: yarn test-large --full --flakey --ve build-bazel: executor: action-executor From d438cf0f455930dac270f2b4e498c511f598d2ef Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 5 Nov 2019 14:41:03 +0000 Subject: [PATCH 0456/1070] test: increase debounce time for rebuild tests --- .../test/browser/rebuild_spec_large.ts | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts index d1abf2efbc20..56b23dabbd15 100644 --- a/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts @@ -21,6 +21,9 @@ import { describe('Browser Builder rebuilds', () => { const target = { project: 'app', target: 'build' }; + // Rebuild tests are especially sensitive to time between writes due to file watcher + // behaviour. Give them a while. + const rebuildDebounceTime = 3000; let architect: Architect; beforeEach(async () => { @@ -77,7 +80,7 @@ describe('Browser Builder rebuilds', () => { const run = await architect.scheduleTarget(target, overrides); await run.output .pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(result => { expect(result.success).toBe(true, 'build should succeed'); const hasLazyChunk = host.scopedSync().exists(normalize('dist/lazy-lazy-module.js')); @@ -128,7 +131,7 @@ describe('Browser Builder rebuilds', () => { const run = await architect.scheduleTarget(target, overrides); await run.output .pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(buildEvent => expect(buildEvent.success).toBe(true)), tap(() => host.appendToFile('src/app/app.component.css', ':host { color: blue; }')), take(2), @@ -158,7 +161,7 @@ describe('Browser Builder rebuilds', () => { const run = await architect.scheduleTarget(target, overrides, { logger }); await run.output .pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(buildEvent => { buildNumber += 1; switch (buildNumber) { @@ -211,7 +214,7 @@ describe('Browser Builder rebuilds', () => { const run = await architect.scheduleTarget(target, overrides); await run.output .pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(buildEvent => expect(buildEvent.success).toBe(true)), tap(() => host.writeMultipleFiles({ 'src/type.ts': `export type MyType = string;` })), take(2), @@ -234,7 +237,7 @@ describe('Browser Builder rebuilds', () => { const run = await architect.scheduleTarget(target, overrides, { logger }); await run.output .pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(buildEvent => { buildNumber++; switch (buildNumber) { @@ -291,7 +294,7 @@ describe('Browser Builder rebuilds', () => { const run = await architect.scheduleTarget(target, overrides, { logger }); await run.output .pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(buildEvent => { buildNumber += 1; switch (buildNumber) { @@ -365,7 +368,7 @@ describe('Browser Builder rebuilds', () => { const run = await architect.scheduleTarget(target, overrides); await run.output .pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(buildEvent => { buildNumber += 1; const fileName = './dist/main.js'; @@ -455,7 +458,7 @@ describe('Browser Builder rebuilds', () => { const run = await architect.scheduleTarget(target, overrides); await run.output .pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(buildEvent => { buildNumber += 1; switch (buildNumber) { @@ -486,7 +489,7 @@ describe('Browser Builder rebuilds', () => { let buildCount = 1; const run = await architect.scheduleTarget(target, overrides); await run.output.pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(() => { const content = virtualFs.fileBufferToString( host.scopedSync().read(join(outputPath, 'main.js')), @@ -516,7 +519,7 @@ describe('Browser Builder rebuilds', () => { let buildCount = 1; const run = await architect.scheduleTarget(target, overrides); await run.output.pipe( - debounceTime(1000), + debounceTime(rebuildDebounceTime), tap(() => { const content = virtualFs.fileBufferToString( host.scopedSync().read(join(outputPath, 'main.js')), From da6d74a86e208cc5dc0a83718fb9122ca31addd4 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 5 Nov 2019 15:15:11 +0000 Subject: [PATCH 0457/1070] fix(@ngtools/webpack): fix resource dep lookup on windows Fix https://github.com/angular/angular-cli/issues/15863 --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 13415446ed13..6891427808e5 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -1258,8 +1258,10 @@ export class AngularCompilerPlugin { if (!this._resourceLoader) { return []; } + // The source loader uses TS-style forward slash paths for all platforms. + const resolvedFileName = forwardSlashPath(fileName); - return this._resourceLoader.getResourceDependencies(fileName); + return this._resourceLoader.getResourceDependencies(resolvedFileName); } // This code mostly comes from `performCompilation` in `@angular/compiler-cli`. From c5ab958eb3b94b9d6649d8b2f365478c0762ae4d Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 6 Nov 2019 13:36:12 +0100 Subject: [PATCH 0458/1070] fix(@angular/cli): handle null stderr during npm install --- packages/angular/cli/tasks/install-package.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index 00c1d95da889..cdefc9c5c528 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -48,18 +48,18 @@ export function installPackage( installArgs.push(packageManagerArgs.saveDev); } - const { status, stderr } = spawnSync(packageManager, [...installArgs, ...extraArgs], { + const { status, stderr, stdout } = spawnSync(packageManager, [...installArgs, ...extraArgs], { stdio: 'pipe', encoding: 'utf8', cwd, }); if (status !== 0) { - let errors = stderr.trim(); - if (errors.length) { - errors += '\n'; + let error = (stderr || stdout).trim(); + if (error) { + error += '\n'; } - throw new Error(errors + `Package install failed${errors.length ? ', see above' : ''}.`); + throw new Error(error + `Package install failed${error ? ', see above' : ''}.`); } logger.info(colors.green(`Installed packages for tooling via ${packageManager}.`)); From c85fd165ad4a1b4106c15c5b160e187bafc72092 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 2 Nov 2019 11:08:27 +0000 Subject: [PATCH 0459/1070] build: update rollup to version 1.26.3 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index b9a5f11976bd..ab8b7708750d 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -45,7 +45,7 @@ "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", "rimraf": "3.0.0", - "rollup": "1.25.2", + "rollup": "1.26.3", "rxjs": "6.5.3", "sass": "1.23.3", "sass-loader": "8.0.0", diff --git a/yarn.lock b/yarn.lock index a91b4813a54f..d114d6be798a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9132,7 +9132,16 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.25.2, rollup@^1.24.0: +rollup@1.26.3: + version "1.26.3" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.26.3.tgz#3e71b8120a4ccc745a856e926cab0efbe0eead90" + integrity sha512-8MhY/M8gnv3Q/pQQSWYWzbeJ5J1C5anCNY5BK1kV8Yzw9RFS0FF4lbLt+uyPO3wLKWXSXrhAL5pWL85TZAh+Sw== + dependencies: + "@types/estree" "*" + "@types/node" "*" + acorn "^7.1.0" + +rollup@^1.24.0: version "1.25.2" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d" integrity sha512-+7z6Wab/L45QCPcfpuTZKwKiB0tynj05s/+s2U3F2Bi7rOLPr9UcjUwO7/xpjlPNXA/hwnth6jBExFRGyf3tMg== From e8135babd48f0a7c77ad4002142a523d2da7a3b1 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 31 Oct 2019 14:33:34 +0100 Subject: [PATCH 0460/1070] refactor: update pacote to version 10 --- package.json | 2 +- packages/angular/cli/package.json | 2 +- .../angular/cli/utilities/package-metadata.ts | 4 +- packages/schematics/update/package.json | 2 +- packages/schematics/update/update/npm.ts | 2 +- yarn.lock | 205 +++++++++++------- 6 files changed, 133 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index e39e6cef1048..b03a4f61d05e 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "minimist": "^1.2.0", "npm-registry-client": "8.6.0", "ora": "^4.0.2", - "pacote": "^9.2.3", + "pacote": "10.1.1", "pidtree": "^0.3.0", "pidusage": "^2.0.17", "rxjs": "6.5.3", diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 697b4728a446..37eadfb80239 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -38,7 +38,7 @@ "npm-package-arg": "6.1.1", "npm-pick-manifest": "3.0.2", "open": "7.0.0", - "pacote": "9.5.8", + "pacote": "10.1.1", "read-package-tree": "5.3.1", "rimraf": "3.0.0", "semver": "6.3.0", diff --git a/packages/angular/cli/utilities/package-metadata.ts b/packages/angular/cli/utilities/package-metadata.ts index 303468da908d..55be95c8efff 100644 --- a/packages/angular/cli/utilities/package-metadata.ts +++ b/packages/angular/cli/utilities/package-metadata.ts @@ -173,7 +173,7 @@ export async function fetchPackageMetadata( ensureNpmrc(logger, usingYarn, verbose); const response = await pacote.packument(name, { - 'full-metadata': true, + fullMetadata: true, ...npmrc, ...(registry ? { registry } : {}), }); @@ -228,7 +228,7 @@ export async function fetchPackageManifest( ensureNpmrc(logger, usingYarn, verbose); const response = await pacote.manifest(name, { - 'full-metadata': true, + fullMetadata: true, ...npmrc, ...(registry ? { registry } : {}), }); diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index 6cb4128f105b..b3beedfec4de 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -15,7 +15,7 @@ "@angular-devkit/schematics": "0.0.0", "@yarnpkg/lockfile": "1.1.0", "ini": "1.3.5", - "pacote": "9.5.8", + "pacote": "10.1.1", "semver": "6.3.0", "semver-intersect": "1.4.0", "rxjs": "6.5.3" diff --git a/packages/schematics/update/update/npm.ts b/packages/schematics/update/update/npm.ts index ab91f0ad8c5c..15ce9bf17358 100644 --- a/packages/schematics/update/update/npm.ts +++ b/packages/schematics/update/update/npm.ts @@ -129,7 +129,7 @@ export function getNpmPackageJson( const resultPromise: Promise = pacote.packument( packageName, { - 'full-metadata': true, + fullMetadata: true, ...npmrc, ...(options && options.registryUrl ? { registry: options.registryUrl } : {}), }, diff --git a/yarn.lock b/yarn.lock index d114d6be798a..fa27b7e9cd50 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1601,7 +1601,7 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== -JSONStream@1.3.5, JSONStream@^1.0.4, JSONStream@^1.3.4: +JSONStream@1.3.5, JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -2219,7 +2219,7 @@ blocking-proxy@^1.0.0: dependencies: minimist "^1.2.0" -bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: +bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.5: version "3.7.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.1.tgz#df70e302b471d7473489acf26a93d63b53f874de" integrity sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg== @@ -2547,7 +2547,7 @@ cacache@^11.3.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^12.0.0, cacache@^12.0.2: +cacache@^12.0.2: version "12.0.3" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== @@ -2736,7 +2736,7 @@ chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.1.1, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== @@ -3970,7 +3970,7 @@ encoding-down@^6.3.0: level-codec "^9.0.0" level-errors "^2.0.0" -encoding@^0.1.11: +encoding@^0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= @@ -4690,11 +4690,6 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -genfun@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" - integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== - get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" @@ -6092,7 +6087,7 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -6143,7 +6138,7 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsonparse@^1.2.0: +jsonparse@^1.2.0, jsonparse@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= @@ -6836,22 +6831,25 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== -make-fetch-happen@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.1.tgz#fac65400ab5f7a9c001862a3e9b0f417f0840175" - integrity sha512-b4dfaMvUDR67zxUq1+GN7Ke9rH5WvGRmoHuMH7l+gmUCR2tCXFP6mpeJ9Dp+jB6z8mShRopSf1vLRBhRs8Cu5w== +make-fetch-happen@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-6.0.1.tgz#3992b9cc1a0564ac72eef3a9c27427487a985649" + integrity sha512-PAHjh/ohpW1lvc6eWHirvEoyQgRGa9g1Ugrddf0udiRdaVI/R4TMOqzGMEeM5tBzW6p4J+7kAQIKLgAxvLuT/A== dependencies: agentkeepalive "^3.4.1" - cacache "^12.0.0" + cacache "^13.0.1" http-cache-semantics "^3.8.1" http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.3" lru-cache "^5.1.1" - mississippi "^3.0.0" - node-fetch-npm "^2.0.2" + minipass "^3.0.0" + minipass-collect "^1.0.2" + minipass-fetch "^1.1.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" promise-retry "^1.1.1" socks-proxy-agent "^4.0.0" - ssri "^6.0.0" + ssri "^7.0.1" mamacro@^0.0.3: version "0.0.3" @@ -7105,6 +7103,18 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" +minipass-fetch@^1.1.2, minipass-fetch@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.2.1.tgz#1b97ecb559be56b09812d45b2e9509f1f59ece2f" + integrity sha512-ssHt0dkljEDaKmTgQ04DQgx2ag6G2gMPxA5hpcsoeTbfDgRf2fC2gNSRc6kISjD7ckCpHwwQvXxuTBK8402fXg== + dependencies: + minipass "^3.1.0" + minipass-pipeline "^1.2.2" + minipass-sized "^1.0.3" + minizlib "^2.0.0" + optionalDependencies: + encoding "^0.1.12" + minipass-flush@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" @@ -7112,6 +7122,14 @@ minipass-flush@^1.0.5: dependencies: minipass "^3.0.0" +minipass-json-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" + integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== + dependencies: + jsonparse "^1.3.1" + minipass "^3.0.0" + minipass-pipeline@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz#3dcb6bb4a546e32969c7ad710f2c79a86abba93a" @@ -7119,7 +7137,14 @@ minipass-pipeline@^1.2.2: dependencies: minipass "^3.0.0" -minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -7134,6 +7159,13 @@ minipass@^3.0.0: dependencies: yallist "^4.0.0" +minipass@^3.0.1, minipass@^3.1.0, minipass@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" + integrity sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w== + dependencies: + yallist "^4.0.0" + minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -7141,6 +7173,14 @@ minizlib@^1.2.1: dependencies: minipass "^2.9.0" +minizlib@^2.0.0, minizlib@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.0.tgz#fd52c645301ef09a63a2c209697c294c6ce02cf3" + integrity sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -7222,6 +7262,11 @@ multicast-dns@^6.0.1: dns-packet "^1.3.1" thunky "^1.0.2" +mutate-fs@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/mutate-fs/-/mutate-fs-2.1.1.tgz#164facf0cd500ed7884143ce96b35273c3c1b4cc" + integrity sha512-WI5pPPUNiWqaK2XdK94AVpxIc8GmZEXYlLfFbWuc4gUtBGHTK92jdPqFdx/lilxgb5Ep7tQ15NqCcJEOeq6wdA== + mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -7325,15 +7370,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-fetch-npm@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" - integrity sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw== - dependencies: - encoding "^0.1.11" - json-parse-better-errors "^1.0.0" - safe-buffer "^5.1.1" - node-fetch@^2.2.0: version "2.6.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" @@ -7416,7 +7452,7 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0, "normalize-package-data@~1.0.1 || ^2.0.0": +normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.5.0, "normalize-package-data@~1.0.1 || ^2.0.0": version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -7473,7 +7509,7 @@ npm-package-arg@6.1.1, "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", n semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.12, npm-packlist@^1.1.6: +npm-packlist@^1.1.6, npm-packlist@^1.4.6: version "1.4.6" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.6.tgz#53ba3ed11f8523079f1457376dd379ee4ea42ff4" integrity sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg== @@ -7481,7 +7517,7 @@ npm-packlist@^1.1.12, npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-pick-manifest@3.0.2, npm-pick-manifest@^3.0.0: +npm-pick-manifest@3.0.2, npm-pick-manifest@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== @@ -7509,16 +7545,19 @@ npm-registry-client@8.6.0: optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -npm-registry-fetch@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz#2b1434f93ccbe6b6385f8e45f45db93e16921d7a" - integrity sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A== +npm-registry-fetch@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-5.0.0.tgz#43aaadbb4c5e838272203c07ae8ad4a8933bcbdc" + integrity sha512-V28E+QOueq6yhytshlSa+1fJn5ofZcMI8o9WyA5Zdg3QR+QD/dZbBUAepBOOOBDYvmsP/QpB8cjFOFO44aDXFw== dependencies: - JSONStream "^1.3.4" bluebird "^3.5.1" figgy-pudding "^3.4.1" lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" + make-fetch-happen "^6.0.0" + minipass "^3.0.0" + minipass-fetch "^1.1.2" + minipass-json-stream "^1.0.1" + minizlib "^2.0.0" npm-package-arg "^6.1.0" safe-buffer "^5.2.0" @@ -7856,40 +7895,30 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pacote@9.5.8, pacote@^9.2.3: - version "9.5.8" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.8.tgz#23480efdc4fa74515855c9ecf39cf64078f99786" - integrity sha512-0Tl8Oi/K0Lo4MZmH0/6IsT3gpGf9eEAznLXEQPKgPq7FscnbUOyopnVpwXlnQdIbCUaojWy1Wd7VMyqfVsRrIw== +pacote@10.1.1: + version "10.1.1" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-10.1.1.tgz#a0ae11c1b76e0691411df8e469c37281e46e13f0" + integrity sha512-+uv3x0doW6Ax12exSBmtxPaZfS0OOjCwCN2N/OgE5MsOYODtpvkrOtI5/F+rRb+oelKnWu86DuIdeH6Cok4g8w== dependencies: - bluebird "^3.5.3" - cacache "^12.0.2" - chownr "^1.1.2" - figgy-pudding "^3.5.1" - get-stream "^4.1.0" - glob "^7.1.3" + cacache "^13.0.1" + chownr "^1.1.3" + fs-minipass "^2.0.0" infer-owner "^1.0.4" lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - minimatch "^3.0.4" - minipass "^2.3.5" - mississippi "^3.0.0" - mkdirp "^0.5.1" - normalize-package-data "^2.4.0" - npm-package-arg "^6.1.0" - npm-packlist "^1.1.12" - npm-pick-manifest "^3.0.0" - npm-registry-fetch "^4.0.0" + minipass "^3.0.1" + minipass-fetch "^1.2.1" + mutate-fs "^2.1.1" + npm-packlist "^1.4.6" + npm-pick-manifest "^3.0.2" + npm-registry-fetch "^5.0.0" osenv "^0.1.5" promise-inflight "^1.0.1" promise-retry "^1.1.1" - protoduck "^5.0.1" - rimraf "^2.6.2" - safe-buffer "^5.1.2" - semver "^5.6.0" - ssri "^6.0.1" - tar "^4.4.10" - unique-filename "^1.1.1" - which "^1.3.1" + read-package-json "^2.1.0" + semver "^6.3.0" + ssri "^7.1.0" + tar "^5.0.5" + which "^2.0.1" pako@^0.2.5: version "0.2.9" @@ -8342,13 +8371,6 @@ protobufjs@6.8.8: "@types/node" "^10.1.0" long "^4.0.0" -protoduck@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" - integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg== - dependencies: - genfun "^5.0.0" - protractor@~5.4.0: version "5.4.2" resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.2.tgz#329efe37f48b2141ab9467799be2d4d12eb48c13" @@ -8610,7 +8632,7 @@ read-installed@~4.0.3: optionalDependencies: graceful-fs "^4.1.2" -read-package-json@^2.0.0: +read-package-json@^2.0.0, read-package-json@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.0.tgz#e3d42e6c35ea5ae820d9a03ab0c7291217fc51d5" integrity sha512-KLhu8M1ZZNkMcrq1+0UJbR8Dii8KZUqB0Sha4mOx/bknfKI/fyrQVrG/YIt2UOtG667sD8+ee4EXMM91W9dC+A== @@ -9869,7 +9891,7 @@ ssri@^5.2.4: dependencies: safe-buffer "^5.1.1" -ssri@^6.0.0, ssri@^6.0.1: +ssri@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== @@ -9884,6 +9906,14 @@ ssri@^7.0.0: figgy-pudding "^3.5.1" minipass "^3.0.0" +ssri@^7.0.1, ssri@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.1.0.tgz#92c241bf6de82365b5c7fb4bd76e975522e1294d" + integrity sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g== + dependencies: + figgy-pudding "^3.5.1" + minipass "^3.1.1" + static-eval@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.2.tgz#2d1759306b1befa688938454c546b7871f806a42" @@ -10179,7 +10209,7 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar@^4, tar@^4.4.10, tar@^4.4.4: +tar@^4, tar@^4.4.4: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -10192,6 +10222,18 @@ tar@^4, tar@^4.4.10, tar@^4.4.4: safe-buffer "^5.1.2" yallist "^3.0.3" +tar@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/tar/-/tar-5.0.5.tgz#03fcdb7105bc8ea3ce6c86642b9c942495b04f93" + integrity sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ== + dependencies: + chownr "^1.1.3" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.0" + mkdirp "^0.5.0" + yallist "^4.0.0" + temp@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.0.tgz#61391795a11bd9738d4c4d7f55f012cb8f55edaa" @@ -11165,13 +11207,20 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@^1.2.1, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@^1.2.1, which@^1.2.9, which@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" +which@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.1.tgz#f1cf94d07a8e571b6ff006aeb91d0300c47ef0a4" + integrity sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w== + dependencies: + isexe "^2.0.0" + wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" From 7d1247b9e58571e218acc55d295a4ef0b9066383 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 5 Nov 2019 05:56:20 +0000 Subject: [PATCH 0461/1070] build: update caniuse-lite to version 1.0.30001008 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index ab8b7708750d..09c618cfcd1e 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -19,7 +19,7 @@ "autoprefixer": "9.7.1", "browserslist": "4.7.2", "cacache": "13.0.1", - "caniuse-lite": "1.0.30001006", + "caniuse-lite": "1.0.30001008", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", diff --git a/yarn.lock b/yarn.lock index fa27b7e9cd50..ab9ee04c5225 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2652,10 +2652,10 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001006, caniuse-lite@^1.0.30001006: - version "1.0.30001006" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001006.tgz#5b6e8288792cfa275f007b2819a00ccad7112655" - integrity sha512-MXnUVX27aGs/QINz+QG1sWSLDr3P1A3Hq5EUWoIt0T7K24DuvMxZEnh3Y5aHlJW6Bz2aApJdSewdYLd8zQnUuw== +caniuse-lite@1.0.30001008: + version "1.0.30001008" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001008.tgz#b8841b1df78a9f5ed9702537ef592f1f8772c0d9" + integrity sha512-b8DJyb+VVXZGRgJUa30cbk8gKHZ3LOZTBLaUEEVr2P4xpmFigOCc62CO4uzquW641Ouq1Rm9N+rWLWdSYDaDIw== caniuse-lite@^1.0.30000999: version "1.0.30001002" @@ -2667,6 +2667,11 @@ caniuse-lite@^1.0.30001004: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d879b73981b255488316da946c39327d8c00a586" integrity sha512-3nfOR4O8Wa2RWoYfJkMtwRVOsK96TQ+eq57wd0iKaEWl8dwG4hKZ/g0MVBfCvysFvMLi9fQGR/DvozMdkEPl3g== +caniuse-lite@^1.0.30001006: + version "1.0.30001006" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001006.tgz#5b6e8288792cfa275f007b2819a00ccad7112655" + integrity sha512-MXnUVX27aGs/QINz+QG1sWSLDr3P1A3Hq5EUWoIt0T7K24DuvMxZEnh3Y5aHlJW6Bz2aApJdSewdYLd8zQnUuw== + canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" From 355822059661b75a1b7fa5c6ace890b4d63f940e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 7 Nov 2019 13:00:22 +0000 Subject: [PATCH 0462/1070] test: update FW size expectations We verified this size change happens just from increasing FW version from 9.0.0-rc.0 to 9.0.0-rc.1 CLI master with FW rc.1: ``` 141032 Nov 6 20:08 main-es2015.ed01ec5f480fa886325f.js 163321 Nov 6 20:08 main-es5.ed01ec5f480fa886325f.js 36808 Nov 6 20:08 polyfills-es2015.b6fe2b19564e29c5d554.js 127927 Nov 6 20:08 polyfills-es5.9cbeb6b4a192c8c548fe.js 1485 Nov 6 20:08 runtime-es2015.52756d3ab8e6582f0541.js 1485 Nov 6 20:08 runtime-es5.52756d3ab8e6582f0541.js ``` CLI master with FW rc.0: ``` 139902 Nov 6 20:05 main-es2015.cd909d61c6a4766689e9.js 162180 Nov 6 20:05 main-es5.cd909d61c6a4766689e9.js 36808 Nov 6 20:05 polyfills-es2015.b6fe2b19564e29c5d554.js 127927 Nov 6 20:05 polyfills-es5.9cbeb6b4a192c8c548fe.js 1485 Nov 6 20:05 runtime-es2015.52756d3ab8e6582f0541.js 1485 Nov 6 20:05 runtime-es5.52756d3ab8e6582f0541.js ``` Likely related to these PRs: - https://github.com/angular/angular/pull/33602 - https://github.com/angular/angular/pull/33540 - https://github.com/angular/angular/pull/31270 --- tests/legacy-cli/e2e/tests/build/prod-build.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/legacy-cli/e2e/tests/build/prod-build.ts b/tests/legacy-cli/e2e/tests/build/prod-build.ts index 99bc1cb0767e..e60d8f4b3adc 100644 --- a/tests/legacy-cli/e2e/tests/build/prod-build.ts +++ b/tests/legacy-cli/e2e/tests/build/prod-build.ts @@ -57,8 +57,8 @@ export default async function () { verifySize(mainES5Path, 184470); verifySize(mainES2015Path, 163627); } else { - verifySize(mainES5Path, 148031); - verifySize(mainES2015Path, 137494); + verifySize(mainES5Path, 163321); + verifySize(mainES2015Path, 141032); } // Check that the process didn't change local files. From f35b80ebaf903e09572b4c1c785e8766180f9b7e Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 7 Nov 2019 15:50:41 +0100 Subject: [PATCH 0463/1070] fix(@angular/cli): use spawned process error when it's available In some cases when an error occurs in the spawned process the `error` property will be populated instead of `stderr` or `stdout`. See: https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options --- packages/angular/cli/tasks/install-package.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index cdefc9c5c528..105ba4294a40 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -48,18 +48,18 @@ export function installPackage( installArgs.push(packageManagerArgs.saveDev); } - const { status, stderr, stdout } = spawnSync(packageManager, [...installArgs, ...extraArgs], { + const { status, stderr, stdout, error } = spawnSync(packageManager, [...installArgs, ...extraArgs], { stdio: 'pipe', encoding: 'utf8', cwd, }); if (status !== 0) { - let error = (stderr || stdout).trim(); - if (error) { - error += '\n'; + let errorMessage = ((error && error.message) || stderr || stdout || '').trim(); + if (errorMessage) { + errorMessage += '\n'; } - throw new Error(error + `Package install failed${error ? ', see above' : ''}.`); + throw new Error(errorMessage + `Package install failed${errorMessage ? ', see above' : ''}.`); } logger.info(colors.green(`Installed packages for tooling via ${packageManager}.`)); From 19417625521612e5524dbf70dc7692ed9bb35270 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 30 Oct 2019 14:05:14 -0400 Subject: [PATCH 0464/1070] fix(@angular-devkit/build-angular): insert locale data when localizing --- .../build_angular/src/utils/i18n-options.ts | 56 ++++++++++++++++--- .../build_angular/src/utils/process-bundle.ts | 25 +++++++++ .../e2e/tests/i18n/ivy-localize-dl.ts | 11 ++++ 3 files changed, 84 insertions(+), 8 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index ae3b85bbfb06..3091cd22c7fa 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -19,7 +19,10 @@ import { createTranslationLoader } from './load-translations'; export interface I18nOptions { inlineLocales: Set; sourceLocale: string; - locales: Record; + locales: Record< + string, + { file: string; format?: string; translation?: unknown; dataPath?: string } + >; flatOutput?: boolean; readonly shouldInline: boolean; } @@ -127,9 +130,16 @@ export async function configureI18nBuild 0) { + const projectRoot = path.join(context.workspaceRoot, (metadata.root as string) || ''); + const localeDataBasePath = findLocaleDataBasePath(projectRoot); + if (!localeDataBasePath) { + throw new Error( + `Unable to find locale data within '@angular/common'. Please ensure '@angular/common' is installed.`, + ); + } + // Load locales const loader = await createTranslationLoader(); - const projectRoot = path.join(context.workspaceRoot, (metadata.root as string) || ''); const usedFormats = new Set(); for (const [locale, desc] of Object.entries(i18n.locales)) { if (i18n.inlineLocales.has(locale) && desc.file) { @@ -145,6 +155,15 @@ export async function configureI18nBuild 0) { buildOptions.i18nFormat = [...usedFormats][0]; } - - // If only one locale is specified set the deprecated option to enable the webpack plugin - // transform to register the locale directly in the output bundle. - if (i18n.inlineLocales.size === 1) { - buildOptions.i18nLocale = [...i18n.inlineLocales][0]; - } } // If inlining store the output in a temporary location to facilitate post-processing @@ -202,3 +215,30 @@ function mergeDeprecatedI18nOptions( return i18n; } + +function findLocaleDataBasePath(projectRoot: string): string | null { + try { + const commonPath = path.dirname( + require.resolve('@angular/common/package.json', { paths: [projectRoot] }), + ); + const localesPath = path.join(commonPath, 'locales/global'); + + if (!fs.existsSync(localesPath)) { + return null; + } + + return localesPath; + } catch { + return null; + } +} + +function findLocaleDataPath(locale: string, basePath: string): string | null { + const localeDataPath = path.join(basePath, locale + '.js'); + + if (!fs.existsSync(localeDataPath)) { + return null; + } + + return localeDataPath; +} diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 9848343021a2..d8a04314c0ac 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -541,6 +541,14 @@ export async function inlineLocales(options: InlineOptions) { const setLocaleText = `var $localize=Object.assign(void 0===$localize?{}:$localize,{locale:"${locale}"});`; contentClone = content.clone(); content.prepend(setLocaleText); + + // If locale data is provided, load it and prepend to file + const localeDataPath = i18n.locales[locale] && i18n.locales[locale].dataPath; + if (localeDataPath) { + const localDataContent = loadLocaleData(localeDataPath, true); + // The semicolon ensures that there is no syntax error between statements + content.prepend(localDataContent + ';'); + } } const output = content.toString(); @@ -669,3 +677,20 @@ function findLocalizePositions( return positions; } + +function loadLocaleData(path: string, optimize: boolean): string { + // The path is validated during option processing before the build starts + const content = fs.readFileSync(path, 'utf8'); + + // NOTE: This can be removed once the locale data files are preprocessed in the framework + if (optimize) { + const result = terserMangle(content, { + compress: true, + ecma: 5, + }); + + return result.code; + } + + return content; +} diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index 024f203bc3be..32689a493d6d 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -28,9 +28,15 @@ export default async function () { await expectFileToMatch(`${outputPath}/main-es2015.js`, translation.helloPartial); await expectToFail(() => expectFileToMatch(`${outputPath}/main-es5.js`, '$localize`')); await expectToFail(() => expectFileToMatch(`${outputPath}/main-es2015.js`, '$localize`')); + + // Verify the locale ID is present await expectFileToMatch(`${outputPath}/main-es5.js`, lang); await expectFileToMatch(`${outputPath}/main-es2015.js`, lang); + // Verify the locale data is registered using the global files + await expectFileToMatch(`${outputPath}/main-es5.js`, '.ng.common.locales'); + await expectFileToMatch(`${outputPath}/main-es2015.js`, '.ng.common.locales'); + const server = externalServer(outputPath); try { // Execute without a devserver. @@ -40,6 +46,11 @@ export default async function () { } } + // Verify deprecated locale data registration is not present + await ng('build', '--configuration=fr', '--optimization=false'); + await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es5.js`, 'registerLocaleData(')); + await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es2015.js`, 'registerLocaleData(')); + // Verify missing translation behaviour. await appendToFile('src/app/app.component.html', '

Other content

'); await ng('build', '--i18n-missing-translation', 'ignore'); From bcd6d059b3aff081ff60ee7e0aab5216bf02b325 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 7 Nov 2019 12:51:32 +0100 Subject: [PATCH 0465/1070] fix(@schematics/angular): migrate module compiler option This migration coverts the TypeScript `module` compiler option to `esnext` or `commonjs` which is required when using `import()`. Fixes: #16094 --- .../update-9/update-app-tsconfigs.ts | 54 +++++++++++-- .../update-9/update-app-tsconfigs_spec.ts | 76 +++++++++++++++++++ 2 files changed, 124 insertions(+), 6 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts index bac0071376c0..05f6d47e40e6 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts @@ -20,21 +20,26 @@ import { getAllOptions, getTargets, getWorkspace, readJsonFileAsAstObject } from * Update the tsconfig files for applications * - Removes enableIvy: true * - Sets stricter file inclusions + * - Sets module compiler option to esnext or commonjs */ export function updateApplicationTsConfigs(): Rule { return (tree, context) => { const workspace = getWorkspace(tree); + const logger = context.logger; + + // Add `module` option in the workspace tsconfig + updateModuleCompilerOption(tree, '/tsconfig.json'); for (const { target } of getTargets(workspace, 'build', Builders.Browser)) { - updateTsConfig(tree, target, Builders.Browser, context.logger); + updateTsConfig(tree, target, Builders.Browser, logger); } for (const { target } of getTargets(workspace, 'server', Builders.Server)) { - updateTsConfig(tree, target, Builders.Server, context.logger); + updateTsConfig(tree, target, Builders.Server, logger); } for (const { target } of getTargets(workspace, 'test', Builders.Karma)) { - updateTsConfig(tree, target, Builders.Karma, context.logger); + updateTsConfig(tree, target, Builders.Karma, logger); } return tree; @@ -74,6 +79,9 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B } } + // Update 'module' compilerOption + updateModuleCompilerOption(tree, tsConfigPath, builderName); + // Add stricter file inclusions to avoid unused file warning during compilation if (builderName !== Builders.Karma) { // Note: we need to re-read the tsconfig after very commit because @@ -81,7 +89,7 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B // we are already checking that tsconfig exists above! // tslint:disable-next-line: no-non-null-assertion - tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath) !; + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath)!; const include = findPropertyInAstObject(tsConfigAst, 'include'); if (include && include.kind === 'array') { @@ -113,17 +121,51 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B if (newFiles.length) { recorder = tree.beginUpdate(tsConfigPath); // tslint:disable-next-line: no-non-null-assertion - tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath) !; + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath)!; insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'files', newFiles, 2); tree.commitUpdate(recorder); } recorder = tree.beginUpdate(tsConfigPath); // tslint:disable-next-line: no-non-null-assertion - tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath) !; + tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath)!; removePropertyInAstObject(recorder, tsConfigAst, 'exclude'); tree.commitUpdate(recorder); } } } } + +function updateModuleCompilerOption(tree: Tree, tsConfigPath: string, builderName?: Builders) { + const tsConfigAst = readJsonFileAsAstObject(tree, tsConfigPath); + + if (!tsConfigAst) { + return; + } + + const compilerOptions = findPropertyInAstObject(tsConfigAst, 'compilerOptions'); + if (!compilerOptions || compilerOptions.kind !== 'object') { + return; + } + + const configExtends = findPropertyInAstObject(tsConfigAst, 'extends'); + const isExtendedConfig = configExtends && configExtends.kind === 'string'; + const recorder = tree.beginUpdate(tsConfigPath); + + // Server tsconfig should have a module of commonjs + const moduleType = builderName === Builders.Server ? 'commonjs' : 'esnext'; + if (isExtendedConfig && builderName !== Builders.Server) { + removePropertyInAstObject(recorder, compilerOptions, 'module'); + } else { + const scriptModule = findPropertyInAstObject(compilerOptions, 'module'); + if (!scriptModule) { + insertPropertyInAstObjectInOrder(recorder, compilerOptions, 'module', moduleType, 4); + } else if (scriptModule.value !== moduleType) { + const { start, end } = scriptModule; + recorder.remove(start.offset, end.offset - start.offset); + recorder.insertLeft(start.offset, `"${moduleType}"`); + } + } + + tree.commitUpdate(recorder); +} diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts index 83359f2778ca..8baa6d31fc28 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts @@ -17,6 +17,7 @@ function overrideJsonFile(tree: UnitTestTree, path: string, newContent: object) const defaultTsConfigOptions = { extends: './tsconfig.json', compilerOptions: { + module: 'es2015', outDir: './out-tsc/app', types: [], }, @@ -146,5 +147,80 @@ describe('Migration to version 9', () => { expect(angularCompilerOptions.enableIvy).toBe(false); expect(angularCompilerOptions.fullTemplateTypeCheck).toBe(true); }); + + it(`should remove 'module' if in an extended configuration`, async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + angularCompilerOptions: { + enableIvy: true, + fullTemplateTypeCheck: true, + }, + }; + + overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { compilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(compilerOptions.module).toBeUndefined(); + + const { compilerOptions: workspaceCompilerOptions } = JSON.parse(tree2.readContent('tsconfig.json')); + expect(workspaceCompilerOptions.module).toBe('esnext'); + }); + + it(`should set 'module' to 'esnext' if app tsconfig is not extended`, async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + extends: undefined, + angularCompilerOptions: { + enableIvy: true, + fullTemplateTypeCheck: true, + }, + }; + + overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { compilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); + expect(compilerOptions.module).toBe('esnext'); + }); + + it(`should set 'module' to 'commonjs' in server tsconfig`, async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + compilerOptions: { + module: 'es2015', + outDir: './out-tsc/server', + }, + angularCompilerOptions: { + enableIvy: true, + }, + }; + + tree = await schematicRunner + .runExternalSchematicAsync( + require.resolve('../../collection.json'), + 'universal', + { + clientProject: 'migration-test', + }, + tree, + ) + .toPromise(); + + overrideJsonFile(tree, 'tsconfig.server.json', tsConfigContent); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { compilerOptions } = JSON.parse(tree2.readContent('tsconfig.server.json')); + expect(compilerOptions.module).toBe('commonjs'); + }); + + it(`should set 'module' to 'esnext' in workspace tsconfig`, async () => { + const tsConfigContent = { + ...defaultTsConfigOptions, + extends: undefined, + }; + + overrideJsonFile(tree, 'tsconfig.json', tsConfigContent); + const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const { compilerOptions } = JSON.parse(tree2.readContent('tsconfig.json')); + expect(compilerOptions.module).toBe('esnext'); + }); }); }); From 449c51f87ece0f0986683aa420072ed487be4529 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 7 Nov 2019 09:26:22 +0100 Subject: [PATCH 0466/1070] fix(@schematics/angular): only show `ngsw-config.json` file not find warning when `ngswConfigPath` is defined --- packages/schematics/angular/migrations/update-9/ngsw-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-9/ngsw-config.ts b/packages/schematics/angular/migrations/update-9/ngsw-config.ts index dd8a2baefa50..eaaac39a2b5f 100644 --- a/packages/schematics/angular/migrations/update-9/ngsw-config.ts +++ b/packages/schematics/angular/migrations/update-9/ngsw-config.ts @@ -23,13 +23,13 @@ export function updateNGSWConfig(): Rule { for (const options of getAllOptions(target)) { const ngswConfigPath = findPropertyInAstObject(options, 'ngswConfigPath'); if (!ngswConfigPath || ngswConfigPath.kind !== 'string') { - logger.warn(`Cannot find file: ${ngswConfigPath}`); continue; } const path = ngswConfigPath.value; const ngswConfigAst = readJsonFileAsAstObject(tree, path); if (!ngswConfigAst || ngswConfigAst.kind !== 'object') { + logger.warn(`Cannot find file: ${ngswConfigPath}`); continue; } From 77355169497d6fd570041bb7bf4494fff212a7fb Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 7 Nov 2019 13:37:12 -0500 Subject: [PATCH 0467/1070] fix(@angular/cli): disable update commit creation by default Closes #16013 --- packages/angular/cli/commands/update-impl.ts | 6 +++--- packages/angular/cli/commands/update.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 5d84e1ae5a5e..a15e334bda5d 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -425,7 +425,7 @@ export class UpdateCommand extends Command { packageName, migrations, migrationRange, - !options.skipCommits, + options.createCommits, ); return success ? 0 : 1; @@ -539,7 +539,7 @@ export class UpdateCommand extends Command { migrateExternal: true, }); - if (success && !options.skipCommits) { + if (success && options.createCommits) { this.createCommit('Angular CLI update\n' + packagesToUpdate.join('\n'), []); } @@ -558,7 +558,7 @@ export class UpdateCommand extends Command { migration.package, migration.collection, new semver.Range('>' + migration.from + ' <=' + migration.to), - !options.skipCommits, + options.createCommits, ); if (!result) { diff --git a/packages/angular/cli/commands/update.json b/packages/angular/cli/commands/update.json index f9ef123e15cd..855ccb27574f 100644 --- a/packages/angular/cli/commands/update.json +++ b/packages/angular/cli/commands/update.json @@ -63,8 +63,8 @@ "type": "boolean", "default": false }, - "skipCommits": { - "description": "Do not create source control commits for updates and migrations.", + "createCommits": { + "description": "Create source control commits for updates and migrations.", "type": "boolean", "default": false, "aliases": ["C"] From 00aa5bba5a6cc31a96fef0697da110057d63bca1 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 7 Nov 2019 14:30:23 -0500 Subject: [PATCH 0468/1070] fix(@angular-devkit/build-angular): temporarily disable global locale data injection --- .../build_angular/src/utils/i18n-options.ts | 9 ++++++++- tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index 3091cd22c7fa..0b13243a1891 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -162,7 +162,8 @@ export async function configureI18nBuild 0) { buildOptions.i18nFormat = [...usedFormats][0]; } + + // If only one locale is specified set the deprecated option to enable the webpack plugin + // transform to register the locale directly in the output bundle. + if (i18n.inlineLocales.size === 1) { + buildOptions.i18nLocale = [...i18n.inlineLocales][0]; + } } // If inlining store the output in a temporary location to facilitate post-processing diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index 32689a493d6d..3520bddc2f4f 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -34,8 +34,8 @@ export default async function () { await expectFileToMatch(`${outputPath}/main-es2015.js`, lang); // Verify the locale data is registered using the global files - await expectFileToMatch(`${outputPath}/main-es5.js`, '.ng.common.locales'); - await expectFileToMatch(`${outputPath}/main-es2015.js`, '.ng.common.locales'); + // await expectFileToMatch(`${outputPath}/main-es5.js`, '.ng.common.locales'); + // await expectFileToMatch(`${outputPath}/main-es2015.js`, '.ng.common.locales'); const server = externalServer(outputPath); try { @@ -47,9 +47,9 @@ export default async function () { } // Verify deprecated locale data registration is not present - await ng('build', '--configuration=fr', '--optimization=false'); - await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es5.js`, 'registerLocaleData(')); - await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es2015.js`, 'registerLocaleData(')); + // await ng('build', '--configuration=fr', '--optimization=false'); + // await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es5.js`, 'registerLocaleData(')); + // await expectToFail(() => expectFileToMatch(`${baseDir}/fr/main-es2015.js`, 'registerLocaleData(')); // Verify missing translation behaviour. await appendToFile('src/app/app.component.html', '

Other content

'); From bd840b2ea59d4cfc48f658c4b40bb9fee2666330 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 8 Nov 2019 01:41:56 +0100 Subject: [PATCH 0469/1070] fix(@schematics/angular): improve cli migration name and description (#16093) --- packages/angular/cli/commands/update-impl.ts | 2 +- .../migrations/migration-collection.json | 8 ++-- .../migrations/update-9/ivy-libraries_spec.ts | 10 ++--- .../migrations/update-9/ngsw-config_spec.ts | 4 +- .../update-9/remove-tsickle_spec.ts | 4 +- .../update-9/update-app-tsconfigs_spec.ts | 22 +++++----- .../update-9/update-server-main-file_spec.ts | 8 ++-- .../update-9/update-workspace-config_spec.ts | 40 +++++++++---------- 8 files changed, 49 insertions(+), 49 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index a15e334bda5d..610e6182777b 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -180,7 +180,7 @@ export class UpdateCommand extends Command { // Commit migration if (commit) { - let message = `${packageName} migration - ${migration.name}.`; + let message = `${packageName} migration - ${migration.name}`; if (migration.description) { message += '\n' + migration.description; } diff --git a/packages/schematics/angular/migrations/migration-collection.json b/packages/schematics/angular/migrations/migration-collection.json index d25c71ddc348..8e7cb1dec5ca 100644 --- a/packages/schematics/angular/migrations/migration-collection.json +++ b/packages/schematics/angular/migrations/migration-collection.json @@ -40,15 +40,15 @@ "factory": "./update-8/#updateLazyModulePaths", "description": "Update an Angular CLI project to version 8." }, - "migration-09": { + "workspace-version-9": { "version": "9.0.0-beta.0", "factory": "./update-9", - "description": "Update an Angular CLI project to version 9." + "description": "Angular Workspace migration. Update an Angular CLI workspace to version 9." }, - "migration-10": { + "lazy-loading-syntax": { "version": "9.0.0-next.6", "factory": "./update-8/#updateLazyModulePaths", - "description": "Update lazy loading syntax to use dynamic imports." + "description": "Lazy loading syntax migration. Update lazy loading syntax to use dynamic imports." } } } diff --git a/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts b/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts index d7eca2bcffae..f3429f0ab29f 100644 --- a/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts +++ b/packages/schematics/angular/migrations/update-9/ivy-libraries_spec.ts @@ -70,7 +70,7 @@ describe('Migration to version 9', () => { updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.configurations.production.tsConfig).toEqual(libProdTsConfig); expect(tree2.exists(libProdTsConfig)).toBeTruthy(); @@ -82,7 +82,7 @@ describe('Migration to version 9', () => { updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.configurations.production.tsConfig).toEqual(libProdTsConfig); expect(tree2.exists(libProdTsConfig)).toBeTruthy(); @@ -94,7 +94,7 @@ describe('Migration to version 9', () => { updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.configurations.production.tsConfig).toEqual(libProdTsConfig); expect(tree2.exists(libProdTsConfig)).toBeTruthy(); @@ -113,7 +113,7 @@ describe('Migration to version 9', () => { tree.create(prodLibTsConfig, JSON.stringify(tsconfig, undefined, 2)); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.configurations.production.tsConfig).toEqual(prodLibTsConfig); @@ -137,7 +137,7 @@ describe('Migration to version 9', () => { tree.create(prodLibTsConfig, JSON.stringify(tsconfig, undefined, 2)); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.configurations.production.tsConfig).toEqual(prodLibTsConfig); diff --git a/packages/schematics/angular/migrations/update-9/ngsw-config_spec.ts b/packages/schematics/angular/migrations/update-9/ngsw-config_spec.ts index 975e1156a223..b9c10c76cc65 100644 --- a/packages/schematics/angular/migrations/update-9/ngsw-config_spec.ts +++ b/packages/schematics/angular/migrations/update-9/ngsw-config_spec.ts @@ -87,7 +87,7 @@ describe('Migration to version 9', () => { tree.create(ngswConfigPath, ngswConfig); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { assetGroups } = JSON.parse(tree2.readContent(ngswConfigPath)); expect(assetGroups[0].resources.files).toEqual([ '/favicon.ico', @@ -127,7 +127,7 @@ describe('Migration to version 9', () => { tree.create(ngswConfigPath, ngswConfig); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { assetGroups } = JSON.parse(tree2.readContent(ngswConfigPath)); expect(assetGroups[0].resources.files).toEqual([ '/manifest.webmanifest', diff --git a/packages/schematics/angular/migrations/update-9/remove-tsickle_spec.ts b/packages/schematics/angular/migrations/update-9/remove-tsickle_spec.ts index c71cf5816d5f..4829dd2e89a1 100644 --- a/packages/schematics/angular/migrations/update-9/remove-tsickle_spec.ts +++ b/packages/schematics/angular/migrations/update-9/remove-tsickle_spec.ts @@ -59,7 +59,7 @@ describe('Migration to version 9', () => { tree.overwrite(libTsConfig, JSON.stringify(tsconfig, undefined, 2)); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { angularCompilerOptions } = JSON.parse(tree2.readContent(libTsConfig)); expect(angularCompilerOptions).toEqual({ enableIvy: false, skipTemplateCodegen: true }); }); @@ -75,7 +75,7 @@ describe('Migration to version 9', () => { }; tree.overwrite('/package.json', JSON.stringify(packageJson, undefined, 2)); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { dependencies, devDependencies } = JSON.parse(tree2.readContent('/package.json')); expect(dependencies['tsickle']).toBeUndefined(); expect(devDependencies['tsickle']).toBeUndefined(); diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts index 8baa6d31fc28..2459b8c6f218 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts @@ -58,7 +58,7 @@ describe('Migration to version 9', () => { it('should update apps tsConfig with stricter files inclusions', async () => { overrideJsonFile(tree, 'tsconfig.app.json', defaultTsConfigOptions); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { exclude, files } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(exclude).toBeUndefined(); expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); @@ -72,7 +72,7 @@ describe('Migration to version 9', () => { overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { files, include } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); expect(include).toEqual(['foo.ts']); @@ -87,7 +87,7 @@ describe('Migration to version 9', () => { overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { files, include, exclude } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); expect(include).toEqual(['src/**/*.d.ts']); @@ -102,7 +102,7 @@ describe('Migration to version 9', () => { overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { files, include, exclude } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); expect(include).toEqual(['foo.ts', 'src/**/*.d.ts']); @@ -111,7 +111,7 @@ describe('Migration to version 9', () => { it(`should remove angularCompilerOptions when enableIvy is true and it's the only option`, async () => { overrideJsonFile(tree, 'tsconfig.app.json', defaultTsConfigOptions); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { angularCompilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(angularCompilerOptions).toBeUndefined(); }); @@ -126,7 +126,7 @@ describe('Migration to version 9', () => { }; overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { angularCompilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(angularCompilerOptions.enableIvy).toBeUndefined(); expect(angularCompilerOptions.fullTemplateTypeCheck).toBe(true); @@ -142,7 +142,7 @@ describe('Migration to version 9', () => { }; overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { angularCompilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(angularCompilerOptions.enableIvy).toBe(false); expect(angularCompilerOptions.fullTemplateTypeCheck).toBe(true); @@ -158,7 +158,7 @@ describe('Migration to version 9', () => { }; overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { compilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(compilerOptions.module).toBeUndefined(); @@ -177,7 +177,7 @@ describe('Migration to version 9', () => { }; overrideJsonFile(tree, 'tsconfig.app.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { compilerOptions } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(compilerOptions.module).toBe('esnext'); }); @@ -206,7 +206,7 @@ describe('Migration to version 9', () => { .toPromise(); overrideJsonFile(tree, 'tsconfig.server.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { compilerOptions } = JSON.parse(tree2.readContent('tsconfig.server.json')); expect(compilerOptions.module).toBe('commonjs'); }); @@ -218,7 +218,7 @@ describe('Migration to version 9', () => { }; overrideJsonFile(tree, 'tsconfig.json', tsConfigContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const { compilerOptions } = JSON.parse(tree2.readContent('tsconfig.json')); expect(compilerOptions.module).toBe('esnext'); }); diff --git a/packages/schematics/angular/migrations/update-9/update-server-main-file_spec.ts b/packages/schematics/angular/migrations/update-9/update-server-main-file_spec.ts index 517d8efa273d..0d2531415299 100644 --- a/packages/schematics/angular/migrations/update-9/update-server-main-file_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-server-main-file_spec.ts @@ -61,7 +61,7 @@ describe('Migration to version 9', () => { it(`should add exports from '@angular/platform-server'`, async () => { tree.overwrite(mainServerFile, mainServerContent); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); expect(tree2.readContent(mainServerFile)).toContain(tags.stripIndents` export { AppServerModule } from './app/app.server.module'; export { renderModule, renderModuleFactory } from '@angular/platform-server'; @@ -74,7 +74,7 @@ describe('Migration to version 9', () => { export { platformDynamicServer } from '@angular/platform-server'; export { PlatformConfig } from '@angular/platform-server'; `); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); expect(tree2.readContent(mainServerFile)).toContain(tags.stripIndents` export { AppServerModule } from './app/app.server.module'; export { platformDynamicServer, renderModule, renderModuleFactory } from '@angular/platform-server'; @@ -87,7 +87,7 @@ describe('Migration to version 9', () => { ${mainServerContent} export { platformDynamicServer, renderModuleFactory } from '@angular/platform-server'; `); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); expect(tree2.readContent(mainServerFile)).toContain(tags.stripIndents` export { AppServerModule } from './app/app.server.module'; export { platformDynamicServer, renderModuleFactory, renderModule } from '@angular/platform-server'; @@ -101,7 +101,7 @@ describe('Migration to version 9', () => { `; tree.overwrite(mainServerFile, input); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); expect(tree2.readContent(mainServerFile)).toBe(input); }); }); diff --git a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts index 722d96ff6453..9a3b656e9bbb 100644 --- a/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-workspace-config_spec.ts @@ -86,7 +86,7 @@ describe('Migration to version 9', () => { config.build.configurations.production.scripts = scriptsWithLazy; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.options.scripts).toEqual(scriptsExpectWithLazy); expect(config.configurations.production.scripts).toEqual(scriptsExpectWithLazy); @@ -98,7 +98,7 @@ describe('Migration to version 9', () => { config.build.configurations.production.styles = stylesWithLazy; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.options.styles).toEqual(stylesExpectWithLazy); expect(config.configurations.production.styles).toEqual(stylesExpectWithLazy); @@ -110,7 +110,7 @@ describe('Migration to version 9', () => { config.test.configurations = { production: { scripts: scriptsWithLazy } }; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).test; expect(config.options.scripts).toEqual(scriptsExpectWithLazy); expect(config.configurations.production.scripts).toEqual(scriptsExpectWithLazy); @@ -122,7 +122,7 @@ describe('Migration to version 9', () => { config.test.configurations = { production: { styles: stylesWithLazy } }; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).test; expect(config.options.styles).toEqual(stylesExpectWithLazy); expect(config.configurations.production.styles).toEqual(stylesExpectWithLazy); @@ -140,7 +140,7 @@ describe('Migration to version 9', () => { config.build.configurations.production.budgets = defaultBudget; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.configurations.production.budgets).toEqual(defaultBudget); }); @@ -151,7 +151,7 @@ describe('Migration to version 9', () => { config.build.configurations.production.budgets = defaultBudget; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.configurations.production.budgets).toEqual([ ...defaultBudget, @@ -164,7 +164,7 @@ describe('Migration to version 9', () => { config.build.configurations.production.budgets = undefined; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.configurations.production.budgets).toEqual([ANY_COMPONENT_STYLE_BUDGET]); }); @@ -176,7 +176,7 @@ describe('Migration to version 9', () => { config.build.options.aot = false; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.options.aot).toBe(true); }); @@ -186,7 +186,7 @@ describe('Migration to version 9', () => { config.build.options.aot = undefined; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.options.aot).toBe(true); }); @@ -209,7 +209,7 @@ describe('Migration to version 9', () => { config.build.options.aot = false; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.options.aot).toBe(false); }); @@ -231,7 +231,7 @@ describe('Migration to version 9', () => { config.build.options.aot = false; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.options.aot).toBe(false); }); @@ -242,7 +242,7 @@ describe('Migration to version 9', () => { config.build.configurations.production.aot = true; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.options.aot).toBe(true); expect(config.configurations.production.aot).toBeUndefined(); @@ -268,7 +268,7 @@ describe('Migration to version 9', () => { config.server.configurations.production.optimization = undefined; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).server.configurations; expect(config.production.optimization).toBe(true); }); @@ -278,7 +278,7 @@ describe('Migration to version 9', () => { config.server.configurations.production.optimization = false; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).server.configurations; expect(config.production.optimization).toBe(true); }); @@ -291,7 +291,7 @@ describe('Migration to version 9', () => { }; updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).server.configurations; expect(config.production.optimization).toBe(true); }); @@ -315,7 +315,7 @@ describe('Migration to version 9', () => { config.build.configurations.de = getI18NConfig('de'); updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); config = getWorkspaceTargets(tree2).build; expect(config.options.localize).toEqual(['fr']); expect(config.configurations.de.localize).toEqual(['de']); @@ -329,7 +329,7 @@ describe('Migration to version 9', () => { config.build.configurations.de = getI18NConfig('de'); updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const projectConfig = JSON.parse(tree2.readContent(workspacePath)).projects['migration-test']; expect(projectConfig.i18n.sourceLocale).toBe('en-GB'); expect(projectConfig.i18n.locales).toBeDefined(); @@ -342,7 +342,7 @@ describe('Migration to version 9', () => { config.build.configurations.de = getI18NConfig('de'); updateWorkspaceTargets(tree, config); - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const projectConfig = JSON.parse(tree2.readContent(workspacePath)).projects['migration-test']; expect(projectConfig.i18n.sourceLocale).toBeUndefined(); expect(projectConfig.i18n.locales).toEqual({ @@ -354,14 +354,14 @@ describe('Migration to version 9', () => { describe('when i18n builder options are not set', () => { it(`should not add 'localize' option`, async () => { - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const config = getWorkspaceTargets(tree2).build; expect(config.options.localize).toBeUndefined(); expect(config.configurations.production.localize).toBeUndefined(); }); it('should not add i18n project config', async () => { - const tree2 = await schematicRunner.runSchematicAsync('migration-09', {}, tree.branch()).toPromise(); + const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); const projectConfig = JSON.parse(tree2.readContent(workspacePath)).projects['migration-test']; expect(projectConfig.i18n).toBeUndefined(); }); From 722c3cb828fe6b88e2da3a998815564f15a36ee0 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 8 Nov 2019 00:42:47 +0000 Subject: [PATCH 0470/1070] fix(@ngtools/webpack): only remove decorators in VE (#16086) Fix #16070 --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 6891427808e5..376bb1631af5 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -981,8 +981,11 @@ export class AngularCompilerPlugin { // This is required to support forwardRef in ES2015 due to TDZ issues this._transformers.push(downlevelConstructorParameters(getTypeChecker)); } else { - // Remove unneeded angular decorators. - this._transformers.push(removeDecorators(isAppPath, getTypeChecker)); + if (!this._compilerOptions.enableIvy) { + // Remove unneeded angular decorators in VE. + // In Ivy they are removed in ngc directly. + this._transformers.push(removeDecorators(isAppPath, getTypeChecker)); + } // Import ngfactory in loadChildren import syntax if (this._useFactories) { // Only transform imports to use factories with View Engine. From 56a70bcf2bece72d7c99ee895089e06b1ed7ddf1 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 8 Nov 2019 00:43:21 +0000 Subject: [PATCH 0471/1070] fix(@ngtools/webpack): also elide type references on transform (#16085) Fix #14617 --- .../webpack/src/transformers/elide_imports.ts | 4 +- .../src/transformers/elide_imports_spec.ts | 19 +++++++-- .../transformers/remove_decorators_spec.ts | 42 +++++++++++++++++++ 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/packages/ngtools/webpack/src/transformers/elide_imports.ts b/packages/ngtools/webpack/src/transformers/elide_imports.ts index c7b2cd10654e..bc61bc58b762 100644 --- a/packages/ngtools/webpack/src/transformers/elide_imports.ts +++ b/packages/ngtools/webpack/src/transformers/elide_imports.ts @@ -33,8 +33,8 @@ export function elideImports( const imports: ts.ImportDeclaration[] = []; ts.forEachChild(sourceFile, function visit(node) { - // Skip removed nodes - if (removedNodes.includes(node)) { + // Skip type references and removed nodes. We consider both unused. + if (node.kind == ts.SyntaxKind.TypeReference || removedNodes.includes(node)) { return; } diff --git a/packages/ngtools/webpack/src/transformers/elide_imports_spec.ts b/packages/ngtools/webpack/src/transformers/elide_imports_spec.ts index 07ae53b5b173..c7ed3ece60f9 100644 --- a/packages/ngtools/webpack/src/transformers/elide_imports_spec.ts +++ b/packages/ngtools/webpack/src/transformers/elide_imports_spec.ts @@ -33,6 +33,19 @@ describe('@ngtools/webpack transformers', () => { `, }; + it('should remove unused imports', () => { + const input = tags.stripIndent` + import { promise } from './const'; + import { take } from './const'; + const unused = promise; + `; + + const { program, compilerHost } = createTypescriptContext(input, additionalFiles); + const result = transformTypescript(undefined, [transformer(program)], program, compilerHost); + + expect(tags.oneLine`${result}`).toEqual(''); + }); + it('should remove unused aliased imports', () => { const input = tags.stripIndent` import { promise as fromPromise } from './const'; @@ -188,7 +201,7 @@ describe('@ngtools/webpack transformers', () => { expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); - it('should only drop unused default imports when named and default', () => { + it('should only drop unused default imports when named and default (1)', () => { const input = tags.stripIndent` import promise, { promise as fromPromise } from './const'; const used = fromPromise; @@ -206,7 +219,7 @@ describe('@ngtools/webpack transformers', () => { expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); - it('should only drop unused named imports when named and default', () => { + it('should only drop unused named imports when named and default (2)', () => { const input = tags.stripIndent` import promise, { promise as fromPromise, take } from './const'; const used = fromPromise; @@ -224,7 +237,7 @@ describe('@ngtools/webpack transformers', () => { expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); - it('should only drop default imports when having named and default', () => { + it('should only drop default imports when having named and default (3)', () => { const input = tags.stripIndent` import promise, { fromPromise } from './const'; const used = promise; diff --git a/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts b/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts index 4ef3c52e9965..962f4fe9d434 100644 --- a/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts +++ b/packages/ngtools/webpack/src/transformers/remove_decorators_spec.ts @@ -248,5 +248,47 @@ describe('@ngtools/webpack transformers', () => { expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); }); + + it('should not prevent removal of unused imports', () => { + // Note: this is actually testing the behaviour of `./elide_imports.ts`, but the problem + // only came up when used together with `./remove_decorators.ts` so we test it here. + // Originally reported as https://github.com/angular/angular-cli/issues/14617 + // The bug happened because `elideImports` would attempt to remove `BigDependency` and + // in the process modify the import statement, which then prevented TS from removing it + // the interface too. + const input = tags.stripIndent` + import {BigDependency, BigDependencyOptions} from 'src/app/lorem/big-dependency'; + import {Injectable} from '@angular/core'; + + const bigDependencyLoader = () => import('../lorem/big-dependency'); + + @Injectable({providedIn: 'root'}) + export class LoremService { + load(options: BigDependencyOptions): Promise { + return bigDependencyLoader() + .then((m: {BigDependency}) => new m.BigDependency().setOptions(options)); + } + } + + `; + const output = tags.stripIndent` + const bigDependencyLoader = () => import('../lorem/big-dependency'); + export class LoremService { + load(options) { + return bigDependencyLoader() + .then((m) => new m.BigDependency().setOptions(options)); + } + } + `; + + const { program, compilerHost } = createTypescriptContext(input); + const transformer = removeDecorators( + () => true, + () => program.getTypeChecker(), + ); + const result = transformTypescript(undefined, [transformer], program, compilerHost); + + expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`); + }); }); }); From 217eb29b0f896653cc85e188ffcf5417d594d851 Mon Sep 17 00:00:00 2001 From: Douglas Parker Date: Thu, 7 Nov 2019 16:44:31 -0800 Subject: [PATCH 0472/1070] fix(@angular-devkit/benchmark): Allows the CLI repo to be hosted in a directory with spaces. (#16073) child_process.spawn() with `shell: true` does not quote its arguments, so any data passed in must be surrounded by quotes to properly include spaces. This was making tests fail when the repository is checked out to a directory with a space in it. Easiest solution is to simply not use shell escaping which avoids the whole problem. --- packages/angular_devkit/benchmark/src/monitored-process.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/benchmark/src/monitored-process.ts b/packages/angular_devkit/benchmark/src/monitored-process.ts index 885736121e43..4a45fdff6a8c 100644 --- a/packages/angular_devkit/benchmark/src/monitored-process.ts +++ b/packages/angular_devkit/benchmark/src/monitored-process.ts @@ -37,7 +37,7 @@ export class LocalMonitoredProcess implements MonitoredProcess { run(): Observable { return new Observable(obs => { const { cmd, cwd, args } = this.command; - const spawnOptions: SpawnOptions = { cwd: cwd, shell: true }; + const spawnOptions: SpawnOptions = { cwd }; // Spawn the process. const childProcess = spawn(cmd, args, spawnOptions); From 9cd09e6523c562c26502186929098bea6a8f9c07 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 8 Nov 2019 00:45:02 +0000 Subject: [PATCH 0473/1070] ci: bump cache key (#16067) Our yarn cache is now at 4gb: ``` No cache is found for key: angular_devkit-0.11.0-m+RxJhhe6Gc_rzgntffBpEs5LmGYauhWKuRZBYBtlP0= Found a cache from build 106076 at angular_devkit-0.11.0 Size: 4.0 GB Cached paths: * /home/circleci/.cache/yarn Downloading cache archive... Unarchiving cache... ``` By bumping the cache key we'll reset it. --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d26c0f74ff0..2a066447ca89 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,10 +16,10 @@ version: 2.1 # Keep the static part of the cache key as prefix to enable correct fallbacks. # Windows needs its own cache key because binaries in node_modules are different. # See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI. -var_1: &cache_key angular_devkit-0.11.0-{{ checksum "yarn.lock" }} -var_2: &cache_key_fallback angular_devkit-0.11.0 -var_1_win: &cache_key_win angular_devkit-win-0.11.0-{{ checksum "yarn.lock" }} -var_2_win: &cache_key_fallback_win angular_devkit-win-0.11.0 +var_1: &cache_key angular_devkit-0.12.0-{{ checksum "yarn.lock" }} +var_2: &cache_key_fallback angular_devkit-0.12.0 +var_1_win: &cache_key_win angular_devkit-win-0.12.0-{{ checksum "yarn.lock" }} +var_2_win: &cache_key_fallback_win angular_devkit-win-0.12.0 var_3: &default_nodeversion "12.9" # Workspace initially persisted by the `setup` job, and then enhanced by `setup-and-build-win`. # https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs From b8257e276efd3b3ba536913a88ce65643ce19168 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Fri, 8 Nov 2019 10:54:47 -0500 Subject: [PATCH 0474/1070] fix(@angular/cli): re-introduce install package using shell spawn (#16112) This works around a Windows CI failure that related to the PATH environment variable and a failure to located the `npm` command. --- packages/angular/cli/tasks/install-package.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index 105ba4294a40..f4b9121b8756 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -50,6 +50,7 @@ export function installPackage( const { status, stderr, stdout, error } = spawnSync(packageManager, [...installArgs, ...extraArgs], { stdio: 'pipe', + shell: true, encoding: 'utf8', cwd, }); From 862b28f844cddcc406defac6a32d6e266221d499 Mon Sep 17 00:00:00 2001 From: Charles <19598772+clydin@users.noreply.github.com> Date: Fri, 8 Nov 2019 10:56:05 -0500 Subject: [PATCH 0475/1070] fix(@angular-devkit/build-angular): allow localization with development server (#16053) * fix(@angular-devkit/build-angular): allow localization with development server * test: ensure i18n application E2E tests are executed --- .../angular_devkit/build_angular/package.json | 1 + .../build_angular/src/browser/index.ts | 2 +- .../build_angular/src/dev-server/index.ts | 124 ++++++++++++++++-- .../build_angular/src/utils/i18n-inlining.ts | 2 +- .../e2e/tests/i18n/ivy-localize-dl.ts | 15 ++- .../e2e/tests/i18n/ivy-localize-es2015.ts | 5 +- .../e2e/tests/i18n/ivy-localize-es5.ts | 5 +- .../e2e/tests/i18n/ivy-localize-server.ts | 3 + tests/legacy-cli/e2e/tests/i18n/legacy.ts | 45 ++++--- tests/legacy-cli/e2e_runner.ts | 8 -- yarn.lock | 12 +- 11 files changed, 176 insertions(+), 46 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 09c618cfcd1e..8b9bcf82f9b6 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -17,6 +17,7 @@ "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", "autoprefixer": "9.7.1", + "babel-loader": "8.0.6", "browserslist": "4.7.2", "cacache": "13.0.1", "caniuse-lite": "1.0.30001008", diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 67017235899c..40c484e9232c 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -355,7 +355,7 @@ export function buildWebpackBrowser( } seen.add(file.file); - if (file.name === 'main') { + if (file.name === 'vendor' || (!mainChunkId && file.name === 'main')) { // tslint:disable-next-line: no-non-null-assertion mainChunkId = file.id!.toString(); } diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index c2c65f6b230a..875e883ca1f4 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -12,11 +12,7 @@ import { WebpackLoggingCallback, runWebpackDevServer, } from '@angular-devkit/build-webpack'; -import { - json, - logging, - tags, -} from '@angular-devkit/core'; +import { json, logging, tags } from '@angular-devkit/core'; import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { existsSync, readFileSync } from 'fs'; import * as path from 'path'; @@ -58,6 +54,46 @@ const devServerBuildOverriddenKeys: (keyof DevServerBuilderOptions)[] = [ 'deployUrl', ]; +async function createI18nPlugins( + locale: string, + translation: unknown | undefined, + missingTranslation?: 'error' | 'warning' | 'ignore', +) { + const plugins = []; + // tslint:disable-next-line: no-implicit-dependencies + const localizeDiag = await import('@angular/localize/src/tools/src/diagnostics'); + + const diagnostics = new localizeDiag.Diagnostics(); + + if (translation) { + const es2015 = await import( + // tslint:disable-next-line: trailing-comma no-implicit-dependencies + '@angular/localize/src/tools/src/translate/source_files/es2015_translate_plugin' + ); + plugins.push( + // tslint:disable-next-line: no-any + es2015.makeEs2015TranslatePlugin(diagnostics, translation as any, { missingTranslation }), + ); + + const es5 = await import( + // tslint:disable-next-line: trailing-comma no-implicit-dependencies + '@angular/localize/src/tools/src/translate/source_files/es5_translate_plugin' + ); + plugins.push( + // tslint:disable-next-line: no-any + es5.makeEs5TranslatePlugin(diagnostics, translation as any, { missingTranslation }), + ); + } + + const inlineLocale = await import( + // tslint:disable-next-line: trailing-comma no-implicit-dependencies + '@angular/localize/src/tools/src/translate/source_files/locale_plugin' + ); + plugins.push(inlineLocale.makeLocalePlugin(locale)); + + return { diagnostics, plugins }; +} + export type DevServerBuilderOutput = DevServerBuildOutput & { baseUrl: string; }; @@ -69,6 +105,7 @@ export type DevServerBuilderOutput = DevServerBuildOutput & { * @param transforms A map of transforms that can be used to hook into some logic (such as * transforming webpack configuration before passing it to webpack). */ +// tslint:disable-next-line: no-big-function export function serveWebpackBrowser( options: DevServerBuilderOptions, context: BuilderContext, @@ -119,14 +156,83 @@ export function serveWebpackBrowser( browserName, ); - const webpackConfigResult = await buildBrowserWebpackConfigFromContext( + const { config, projectRoot, i18n } = await buildBrowserWebpackConfigFromContext( browserOptions, context, host, + true, ); + let webpackConfig = config; + + const tsConfig = readTsconfig(browserOptions.tsConfig, context.workspaceRoot); + if (i18n.shouldInline && tsConfig.options.enableIvy !== false) { + if (i18n.inlineLocales.size > 1) { + throw new Error( + 'The development server only supports localizing a single locale per build', + ); + } + + const locale = [...i18n.inlineLocales][0]; + const translation = i18n.locales[locale] && i18n.locales[locale].translation; + + const { plugins, diagnostics } = await createI18nPlugins( + locale, + translation, + browserOptions.i18nMissingTranslation, + ); - // No differential loading for dev-server, hence there is just one config - let webpackConfig = webpackConfigResult.config; + // Get the insertion point for the i18n babel loader rule + // This is currently dependent on the rule order/construction in common.ts + // A future refactor of the webpack configuration definition will improve this situation + // tslint:disable-next-line: no-non-null-assertion + const rules = webpackConfig.module!.rules; + const index = rules.findIndex(r => r.enforce === 'pre'); + if (index === -1) { + throw new Error('Invalid internal webpack configuration'); + } + + const i18nRule: webpack.Rule = { + test: /\.(?:m?js|ts)$/, + enforce: 'post', + use: [ + { + loader: 'babel-loader', + options: { + babelrc: false, + compact: false, + cacheCompression: false, + plugins, + }, + }, + ], + }; + + rules.splice(index, 0, i18nRule); + + // Add a plugin to inject the i18n diagnostics + // tslint:disable-next-line: no-non-null-assertion + webpackConfig.plugins!.push({ + // tslint:disable-next-line:no-any + apply: (compiler: webpack.Compiler) => { + compiler.hooks.thisCompilation.tap('build-angular', compilation => { + compilation.hooks.finishModules.tap('build-angular', () => { + if (!diagnostics) { + return; + } + for (const diagnostic of diagnostics.messages) { + if (diagnostic.type === 'error') { + compilation.errors.push(diagnostic.message); + } else { + compilation.warnings.push(diagnostic.message); + } + } + + diagnostics.messages.length = 0; + }); + }); + }, + }); + } const port = await checkPort(options.port || 0, options.host || 'localhost', 4200); const webpackDevServerConfig = (webpackConfig.devServer = buildServerConfig( @@ -145,7 +251,7 @@ export function serveWebpackBrowser( webpackConfig, webpackDevServerConfig, port, - projectRoot: webpackConfigResult.projectRoot, + projectRoot, }; } diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts index 5b9580ef3203..57b52ca35c2f 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-inlining.ts @@ -40,7 +40,7 @@ function emittedFilesToInlineOptions( es5, outputPath, missingTranslation, - setLocale: emittedFile.name === 'main', + setLocale: emittedFile.name === 'main' || emittedFile.name === 'vendor', }; originalFiles.push(originalPath); diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts index 3520bddc2f4f..997467a23fc9 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl.ts @@ -1,11 +1,10 @@ import { appendToFile, expectFileToMatch } from '../../utils/fs'; -import { ng } from '../../utils/process'; +import { execAndWaitForOutputToMatch, killAllProcesses, ng } from '../../utils/process'; import { updateJsonFile } from '../../utils/project'; import { expectToFail } from '../../utils/utils'; import { baseDir, externalServer, langTranslations, setupI18nConfig } from './legacy'; - -export default async function () { +export default async function() { // Setup i18n tests and config. await setupI18nConfig(); @@ -37,9 +36,12 @@ export default async function () { // await expectFileToMatch(`${outputPath}/main-es5.js`, '.ng.common.locales'); // await expectFileToMatch(`${outputPath}/main-es2015.js`, '.ng.common.locales'); + // Execute Application E2E tests with dev server + await ng('e2e', `--configuration=${lang}`, '--port=0'); + + // Execute Application E2E tests for a production build without dev server const server = externalServer(outputPath); try { - // Execute without a devserver. await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); } finally { server.close(); @@ -57,4 +59,9 @@ export default async function () { await expectFileToMatch(`${baseDir}/fr/main-es5.js`, /Other content/); await expectFileToMatch(`${baseDir}/fr/main-es2015.js`, /Other content/); await expectToFail(() => ng('build')); + try { + await execAndWaitForOutputToMatch('ng', ['serve', '--port=0'], /No translation found for/); + } finally { + killAllProcesses(); + } } diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts index 3b3d2adae701..e0055f28bfaf 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es2015.ts @@ -26,9 +26,12 @@ export default async function() { await expectFileNotToExist(`${outputPath}/main-es5.js`); await expectFileToMatch(`${outputPath}/main.js`, lang); + // Execute Application E2E tests with dev server + await ng('e2e', `--configuration=${lang}`, '--port=0'); + + // Execute Application E2E tests for a production build without dev server const server = externalServer(outputPath); try { - // Execute without a devserver. await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); } finally { server.close(); diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts index 926066ed903a..fad15ff6f68b 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-es5.ts @@ -25,9 +25,12 @@ export default async function() { await expectFileNotToExist(`${outputPath}/main-es2015.js`); await expectFileToMatch(`${outputPath}/main.js`, lang); + // Execute Application E2E tests with dev server + await ng('e2e', `--configuration=${lang}`, '--port=0'); + + // Execute Application E2E tests for a production build without dev server const server = externalServer(outputPath); try { - // Execute without a devserver. await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); } finally { server.close(); diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts index 5411186cd02c..07b380eb136f 100644 --- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts +++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-server.ts @@ -10,6 +10,9 @@ import { langTranslations, setupI18nConfig } from './legacy'; const snapshots = require('../../ng-snapshot/package.json'); export default async function () { + // TODO: Re-enable pending further Ivy/Universal/i18n work + return; + // Setup i18n tests and config. await setupI18nConfig(); diff --git a/tests/legacy-cli/e2e/tests/i18n/legacy.ts b/tests/legacy-cli/e2e/tests/i18n/legacy.ts index 711601291653..3ac3248a713e 100644 --- a/tests/legacy-cli/e2e/tests/i18n/legacy.ts +++ b/tests/legacy-cli/e2e/tests/i18n/legacy.ts @@ -25,7 +25,7 @@ export const langTranslations = [ translation: { helloPartial: 'Bonjour', hello: 'Bonjour i18n!', - plural: 'Mis à jour Il y a 3 minutes', + plural: 'Mis à jour il y a 3 minutes', date: 'janvier', }, translationReplacements: [ @@ -34,7 +34,7 @@ export const langTranslations = [ ['Updated', 'Mis à jour'], ['just now', 'juste maintenant'], ['one minute ago', 'il y a une minute'], - ['other {', 'other {Il y a'], + [/other {/g, 'other {il y a '], ['minutes ago', 'minutes'], ], }, @@ -52,7 +52,7 @@ export const langTranslations = [ ['Updated', 'Aktualisiert'], ['just now', 'gerade jetzt'], ['one minute ago', 'vor einer Minute'], - ['other {', 'other {vor'], + [/other {/g, 'other {vor '], ['minutes ago', 'Minuten'], ], }, @@ -91,12 +91,12 @@ export async function setupI18nConfig(useLocalize = true) { // Add e2e specs for each lang. for (const { lang, translation } of langTranslations) { - await writeFile(`./src/app.${lang}.e2e-spec.ts`, ` + await writeFile(`./e2e/src/app.${lang}.e2e-spec.ts`, ` import { browser, logging, element, by } from 'protractor'; describe('workspace-project App', () => { const getParagraph = (name: string) => element(by.css('app-root p#' + name)).getText(); - beforeEach(() => browser.get(browser.baseUrl);); + beforeEach(() => browser.get(browser.baseUrl)); afterEach(async () => { // Assert that there are no errors emitted from the browser const logs = await browser.manage().logs().get(logging.Type.BROWSER); @@ -112,7 +112,7 @@ export async function setupI18nConfig(useLocalize = true) { expect(getParagraph('locale')).toEqual('${lang}')); it('should display localized date', () => - expect(getParagraph('date')).toEqual('${translation.plural}')); + expect(getParagraph('date')).toEqual('${translation.date}')); it('should display pluralized message', () => expect(getParagraph('plural')).toEqual('${translation.plural}')); @@ -190,13 +190,13 @@ export async function setupI18nConfig(useLocalize = true) { if (lang != sourceLocale) { await copyFile('src/locale/messages.xlf', `src/locale/messages.${lang}.xlf`); for (const replacements of translationReplacements) { - await replaceInFile(`src/locale/messages.${lang}.xlf`, replacements[0], replacements[1]); + await replaceInFile(`src/locale/messages.${lang}.xlf`, replacements[0], replacements[1] as string); } } } - if (useLocalize) { - // Install the localize package. + // Install the localize package if using ivy + if (!getGlobalVariable('argv')['ve']) { let localizeVersion = '@angular/localize@' + readNgVersion(); if (getGlobalVariable('argv')['ng-snapshots']) { localizeVersion = require('../../ng-snapshot/package.json').dependencies['@angular/localize']; @@ -209,23 +209,28 @@ export default async function () { // Setup i18n tests and config. await setupI18nConfig(false); + // Legacy option usage with the en-US locale needs $localize when using ivy + // Legacy usage did not need to process en-US and typically no i18nLocale options were present + // This will currently be the overwhelmingly common scenario for users updating existing projects + if (!getGlobalVariable('argv')['ve']) { + await appendToFile('src/polyfills.ts', `import '@angular/localize/init';`); + } + // Build each locale and verify the output. for (const { lang, translation, outputPath } of langTranslations) { await ng('build', `--configuration=${lang}`); await expectFileToMatch(`${outputPath}/main-es5.js`, translation.helloPartial); await expectFileToMatch(`${outputPath}/main-es2015.js`, translation.helloPartial); - // E2E to verify the output runs and is correct. - if (getGlobalVariable('argv')['ve']) { - await ng('e2e', `--configuration=${lang}`); - } else { - const server = externalServer(outputPath); - try { - // Execute without a devserver. - await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); - } finally { - server.close(); - } + // Execute Application E2E tests with dev server + await ng('e2e', `--configuration=${lang}`, '--port=0'); + + // Execute Application E2E tests for a production build without dev server + const server = externalServer(outputPath); + try { + await ng('e2e', `--configuration=${lang}`, '--devServerTarget='); + } finally { + server.close(); } } diff --git a/tests/legacy-cli/e2e_runner.ts b/tests/legacy-cli/e2e_runner.ts index 57c183da4726..19ac155152f1 100644 --- a/tests/legacy-cli/e2e_runner.ts +++ b/tests/legacy-cli/e2e_runner.ts @@ -97,14 +97,6 @@ if (argv.ve) { // Remove Ivy specific tests allTests = allTests .filter(name => !name.includes('tests/i18n/ivy-localize-')); -} else { - // These tests are disabled on the Ivy CI jobs because: - // - Ivy doesn't support the functionality yet - // - The test itself is not applicable to Ivy - // As we transition into using Ivy as the default this list should be reassessed. - allTests = allTests - // Ivy doesn't support i18n externally at the moment. - .filter(name => !name.endsWith('tests/build/aot/aot-i18n.ts')); } const shardId = 'shard' in argv ? argv['shard'] : null; diff --git a/yarn.lock b/yarn.lock index ab9ee04c5225..162a425bb254 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2067,6 +2067,16 @@ babel-generator@^6.18.0: source-map "^0.5.7" trim-right "^1.0.1" +babel-loader@8.0.6: + version "8.0.6" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.6.tgz#e33bdb6f362b03f4bb141a0c21ab87c501b70dfb" + integrity sha512-4BmWKtBOBm13uoUwd08UwjZlaw3O9GWf456R9j+5YykFZ6LUIjIKLc0zEZf+hauxPOJs96C8k6FvYD09vWzhYw== + dependencies: + find-cache-dir "^2.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + pify "^4.0.1" + babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" @@ -4474,7 +4484,7 @@ find-cache-dir@3.0.0, find-cache-dir@^3.0.0: make-dir "^3.0.0" pkg-dir "^4.1.0" -find-cache-dir@^2.1.0: +find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== From 2785222344503228f379dcd2352d3e9300309b79 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2019 11:47:06 -0800 Subject: [PATCH 0476/1070] build: update @angular/animations to version 9.0.0-rc.1 (#15992) --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 24 ++--- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 24 ++--- yarn.lock | 96 +++++++++---------- 6 files changed, 78 insertions(+), 78 deletions(-) diff --git a/package.json b/package.json index b03a4f61d05e..72d108efe1ae 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,8 @@ "typescript": "3.6.4" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.15", - "@angular/compiler-cli": "9.0.0-next.15", + "@angular/compiler": "9.0.0-rc.1", + "@angular/compiler-cli": "9.0.0-rc.1", "@bazel/bazel": "1.0.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "0.39.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 8b9bcf82f9b6..c2ab75172b4b 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -70,20 +70,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-next.15", + "@angular/animations": "9.0.0-rc.1", "@angular/cdk": "8.2.3", - "@angular/common": "9.0.0-next.15", - "@angular/compiler": "9.0.0-next.15", - "@angular/compiler-cli": "9.0.0-next.15", - "@angular/core": "9.0.0-next.15", - "@angular/forms": "9.0.0-next.15", - "@angular/localize": "9.0.0-next.15", + "@angular/common": "9.0.0-rc.1", + "@angular/compiler": "9.0.0-rc.1", + "@angular/compiler-cli": "9.0.0-rc.1", + "@angular/core": "9.0.0-rc.1", + "@angular/forms": "9.0.0-rc.1", + "@angular/localize": "9.0.0-rc.1", "@angular/material": "8.2.3", - "@angular/platform-browser": "9.0.0-next.15", - "@angular/platform-browser-dynamic": "9.0.0-next.15", - "@angular/platform-server": "9.0.0-next.15", - "@angular/router": "9.0.0-next.15", - "@angular/service-worker": "9.0.0-next.15", + "@angular/platform-browser": "9.0.0-rc.1", + "@angular/platform-browser-dynamic": "9.0.0-rc.1", + "@angular/platform-server": "9.0.0-rc.1", + "@angular/router": "9.0.0-rc.1", + "@angular/service-worker": "9.0.0-rc.1", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 6b38ada76a35..7b71f4bc762c 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -14,8 +14,8 @@ "ng-packagr": "^9.0.0-rc.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.15", - "@angular/compiler-cli": "9.0.0-next.15", + "@angular/compiler": "9.0.0-rc.1", + "@angular/compiler-cli": "9.0.0-rc.1", "@angular-devkit/core": "0.0.0", "ng-packagr": "~9.0.0-rc.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index 3f7d3ca05391..1829182098eb 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -32,8 +32,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-next.15", - "@angular/compiler-cli": "9.0.0-next.15", + "@angular/compiler": "9.0.0-rc.1", + "@angular/compiler-cli": "9.0.0-rc.1", "typescript": "3.6.4", "webpack": "4.41.2" } diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index a3828cc2cd52..5271aeca61ea 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,17 +2,17 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#ac30ba554580c061d3c0af1b947c2dadc41f28bd", - "@angular/common": "github:angular/common-builds#81519bb882f4f4a635bb288837513e85ac27b16f", - "@angular/compiler": "github:angular/compiler-builds#5089a1bed7cfb0a43062b3d749e7d7504c5e77bb", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#2f61281a3fa5077f838ccd7b67fe4255927e607a", - "@angular/core": "github:angular/core-builds#457bb4e6f6cfdc37b8db46e8c1cd9ea06b0997aa", - "@angular/forms": "github:angular/forms-builds#d5fb1a58893c8ca0a37f15f6e027ca0ef14597a4", - "@angular/language-service": "github:angular/language-service-builds#99233eb6c7bd0784357ba2ff901949fd0c0e5e20", - "@angular/localize": "github:angular/localize-builds#3b63415900cdd82d2663ead33e66904e0641686f", - "@angular/platform-browser": "github:angular/platform-browser-builds#4a2559f20bd8ded16128b35c86fbc8ed1eda598e", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#002af234104ac5fda0aa9801cf99075bec3dd284", - "@angular/platform-server": "github:angular/platform-server-builds#e5444e31215fc389367faa7ec18ed3c3c930fca5", - "@angular/router": "github:angular/router-builds#7a38790e59395d466bb2f51eb43289d438284f51" + "@angular/animations": "github:angular/animations-builds#75b86d08ed910ebe34506747b638a29e48831153", + "@angular/common": "github:angular/common-builds#8014bdb6a61c5554a6e65646c21a551c313fdb85", + "@angular/compiler": "github:angular/compiler-builds#39ecf497f29038a1b491cdf882f78f36956afd84", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#eeb853ea306b13d819efb00e884f67d691e194af", + "@angular/core": "github:angular/core-builds#9a9e2ae4851b807c9218ac6cc69e020e323adcf8", + "@angular/forms": "github:angular/forms-builds#8fb98446d9f0a8c5dcd4a54623ce2f298b60d7ce", + "@angular/language-service": "github:angular/language-service-builds#8bf9dd7542c8cfa9731f30d87ea73bd53c4623aa", + "@angular/localize": "github:angular/localize-builds#7cfe9634116778aa8d526b570952e863eb1e8878", + "@angular/platform-browser": "github:angular/platform-browser-builds#5e5996860a147ae75b81e09a65b826fee453630d", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#98778d0947b61d13f442920c78eb4084091f8367", + "@angular/platform-server": "github:angular/platform-server-builds#efa3a282cced88e596c1fcc6f7643634491e4bde", + "@angular/router": "github:angular/router-builds#04dd4edbb7989c4cc7ef837a21f26e5f9079916e" } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 162a425bb254..26a1d94d3b4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-next.15.tgz#00535803601019ee49c45f2f601cd53f60a34973" - integrity sha512-s4hIpoKbx/tGK+7eeUHt2OVtQw5GpFPor5SGrrMSuc8mw67kifKk5SR0lFTunc2FKP9NN3FAqx9nFsEc8Tfhcw== +"@angular/animations@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-rc.1.tgz#9f0645da9bf4b482eb8e33a0d50ee6d7e37bf1e4" + integrity sha512-MBYF9mkPYeNMkOeHB3csWTbr0SLtb0MbaM4jTbVguv4026XV07bFmj/xqKWc7385uYslqp1HlVWJjUtCGZibgQ== "@angular/cdk@8.2.3": version "8.2.3" @@ -16,15 +16,15 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-next.15.tgz#969467f74a5d48d5ac2124b8b432713ba4e35b2e" - integrity sha512-OU19ANOPhee+T7GX4itD8dE+3LCG9rNiw8vVlbN+Uy3soHPKPoiouugnWtK0I5RP5brZC0MEDrhkSKkWg8u9Dg== +"@angular/common@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-rc.1.tgz#fe8a71137396c60f4972f5838c5aee9b5a5b9d30" + integrity sha512-WwscTDPgAA4tp0luylMXyvN7dJWWwTt/chW56EshlnVJ49VL2Fp3wGHw6Ht2Mfa753CI2giZM61HI6HVhby/yA== -"@angular/compiler-cli@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-next.15.tgz#8ec3bfa96de9d959490a8fd23a48ba0799047bdf" - integrity sha512-6XuiGdWd/+bAd8BO8PcNE7bQpHSsfXqP3nBmuDtC4kRVxEnfPyPwzHsLig6tn3tEswLhcHs42owiengXe31kUQ== +"@angular/compiler-cli@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-rc.1.tgz#bed7ac98698ef50fda330f7a4b5e9d0fe36705b4" + integrity sha512-ZjbGNS8vtvAXOKcC6n3XNjyqIlED60Yfk/ODDv7D8IjlUtGkLccy9gB8+/olEHoLe6H7HxKZrRlJ72GJki8wNw== dependencies: canonical-path "1.0.0" chokidar "^2.1.1" @@ -37,25 +37,25 @@ source-map "^0.6.1" yargs "13.1.0" -"@angular/compiler@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-next.15.tgz#cc6157d7d9c63e5dfbbb37f03d9a06ee738eefbc" - integrity sha512-F88fuv6SO2nCDAbvP8cAynxg8KWO1ouUyWVVYH0FUHKw/kWWgSUqax4CB7XtO6NVbpol4IOssUXx/hG/D5XCZA== +"@angular/compiler@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-rc.1.tgz#4685c2fad9f2c0dc8e6e26f9f351eab3b6448cab" + integrity sha512-L2y3o+eGRKU/BrY+V00sKNo3TBbL5kGmG96H57570N+WURDg9+xnzqsctJutUdVZkA2iM8Pa4f1ndoQoWlyZHg== -"@angular/core@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-next.15.tgz#66fb9ced44f6e72a3ccc5e46d33f32a2f6ccf830" - integrity sha512-ZvhxaHl1dHwseMbMbYfs134yyUZIq13bqejAfSp/ZalRsTV2nbWlBMbYhjemsHSS1UWNb3DXfUXJTKQzqk8QZQ== +"@angular/core@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-rc.1.tgz#9e2434089ecbedfb1f4c65267f293d067729277e" + integrity sha512-W770tj/lVfXFljOo98zfAJelf1iiAdhrU2hC5Aic1Qa1C9yQK9+DAhsSA9ta/fxIRxrkYPjESx2UxQBS95e/wA== -"@angular/forms@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-next.15.tgz#8baefe67e63c64a1104efa10ca8eb86268aa0d3d" - integrity sha512-OudfUyJp2k8x+dgb3NB5i7RSjXT1ImKLUZ2xmsNxtbhijpAVgE2wZ224D/wLiwXqUMRcMnPdz6rnT+Fzuui1jw== +"@angular/forms@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-rc.1.tgz#89bb607013d9738676d112cf31183aadb99d216b" + integrity sha512-/X+GUyiHV7VwTACouHhE519qP4qJdNXJ7435sO8W5hfqBg6pADMiQjxNzBvJA5ejfqb89FNviBEcVDDvfG9Pyw== -"@angular/localize@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-next.15.tgz#f3a385b76221137da9fcc72e0c1e9767468959d1" - integrity sha512-0h9NzKiEAqsTSNFSf7IVCrZJse+uvx0Ncb6FomW93AJFBVvdWiNfllRJjIzPkyPwC/dnoYhUaF/I9+4q7qxipA== +"@angular/localize@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-rc.1.tgz#3cb945217f030636a99bb082015874e79547d115" + integrity sha512-4d6tWjoFtlHLroW8zYryoT7zveY5249l0sHYucovtcaHZUMervtVN3Bm3d240gw1T7eNFEjwHVbXKTymjTK1zQ== dependencies: "@babel/core" "^7.5.5" glob "7.1.2" @@ -68,33 +68,33 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-next.15.tgz#385c459c267ff2f9443a4f698a155cbdf7fde7ea" - integrity sha512-oiXozg87f+ijco61Ao9NLy7/O0pBntzXL0FDE+dVZYWxJgb4dHsq0w/ojL0rlLrqLxaxANtEszfsSlEUoC5drg== +"@angular/platform-browser-dynamic@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-rc.1.tgz#4dad074d0f077d2d6e59ad7184d50857b109cbb2" + integrity sha512-fE+vv8eq93uulSGtx7AAipTrdqMqC8Q4iU8gcogT7Mb08tIJfnkGMhYb1zt1b0LB/5RvEXf4TUHJnKCuOpbYjA== -"@angular/platform-browser@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-next.15.tgz#9c698ac1b2c2f2dfba5205f6875ebd5f0504c3c9" - integrity sha512-rT4fMhO75cyLBICxSIX7rEBnaQvn0t/aHBA5L4FLXz/J/fgk+3OBI9pE1zRcyo+Z1vwrWZ+9eiNdmNMFFSXNAg== +"@angular/platform-browser@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-rc.1.tgz#3c6ab23e94d59e01b5b699c2b5499ec0e713a2ef" + integrity sha512-xWeq5rIP/+eRAGPYgilz8zVCirA9QqM6p+QwX2xlmXuUym1vjdHRgzCDyEt3aIrNGnnXnEm9boe9nhcuP5L+lg== -"@angular/platform-server@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-next.15.tgz#1c13eaf94e65ec1a7a24ee2a00e78ba60f5f24c1" - integrity sha512-9FmJfwZHrVj7YHvACflAnI0tJ8wpAccymq3Pvr9kHaLnPwD1xeoGGfHINqWTjUoHldpltfHiiwcHXQ3GxbmZrw== +"@angular/platform-server@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-rc.1.tgz#a759a230c95836105d351f552bee53897c423aa0" + integrity sha512-rJ9kOE4+79Q34779yVyFGQZuSxH3PTeWVf2Z5mLvqoGHTdLtkM2PDSfXlgXHJ/v9XzmRJPxjR7LQHMcwjfxpDA== dependencies: domino "^2.1.2" xhr2 "^0.1.4" -"@angular/router@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-next.15.tgz#a0e5b07e5f40c0c7d8afd849eb69f9788da21fce" - integrity sha512-klzVn6yWv0NQcE2qYdrD5EVt4ETBJSmtmfF562ibqBBOXuFyU9PY2GzkZ6Ot+rS6Ed4Q/GEg1iigEd8uqB+2lg== +"@angular/router@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-rc.1.tgz#0fed7454135074722ffb7c427c6b8d871959eadd" + integrity sha512-iACjciFfRhZvhpXoO1PryEITe5Lhwt8rCC4HKn4zy/xYOtyGhrHoALkdoC7/DmwtIIXKWkxVDjq1GdK1l8W3Ow== -"@angular/service-worker@9.0.0-next.15": - version "9.0.0-next.15" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-next.15.tgz#4fec3aca0e338cc8bd1b2efa60413f928546c4b3" - integrity sha512-DuUAbbLM9IMxzbNj+X0FUOyREWHd0MX0BTu5e2WJpfPRQyphGRvtNpDOWUWukkfo1RtlF7cE2rcxfzDSQMKt+w== +"@angular/service-worker@9.0.0-rc.1": + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-rc.1.tgz#e3913596b29b51f0aff0cc49ee5f6957a8211867" + integrity sha512-QMd40tsJi+R6XAc7ei9euXKeWu9Zp7s5ks8uFeSjJlDya+vUWyaIUBs7L9MH9jFJ1flb6eYZKMqPKVQOfEkfgw== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" From f871228d69858cf6e48cb5179cc1a403c1943ef4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2019 11:50:10 -0800 Subject: [PATCH 0477/1070] build: update find-cache-dir to version 3.1.0 (#16128) --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index c2ab75172b4b..06fc07a51468 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -26,7 +26,7 @@ "copy-webpack-plugin": "5.0.4", "core-js": "3.3.6", "file-loader": "4.2.0", - "find-cache-dir": "3.0.0", + "find-cache-dir": "3.1.0", "glob": "7.1.5", "istanbul-instrumenter-loader": "3.0.1", "jest-worker": "24.9.0", diff --git a/yarn.lock b/yarn.lock index 26a1d94d3b4e..58ea742a7355 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4475,10 +4475,10 @@ finalhandler@1.1.2, finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@3.0.0, find-cache-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.0.0.tgz#cd4b7dd97b7185b7e17dbfe2d6e4115ee3eeb8fc" - integrity sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw== +find-cache-dir@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.1.0.tgz#9935894999debef4cf9f677fdf646d002c4cdecb" + integrity sha512-zw+EFiNBNPgI2NTrKkDd1xd7q0cs6wr/iWnr/oUkI0yF9K9GqQ+riIt4aiyFaaqpaWbxPrJXHI+QvmNUQbX+0Q== dependencies: commondir "^1.0.1" make-dir "^3.0.0" @@ -4493,6 +4493,15 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" +find-cache-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.0.0.tgz#cd4b7dd97b7185b7e17dbfe2d6e4115ee3eeb8fc" + integrity sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.0" + pkg-dir "^4.1.0" + find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" From ab3703c573dd0f115bc918d175e030ec50a0eb4a Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 7 Nov 2019 21:28:05 -0500 Subject: [PATCH 0478/1070] fix(@angular-devkit/build-angular): silence internal webpack dev server logging --- .../angular_devkit/build_angular/src/dev-server/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 875e883ca1f4..46579d86b9d4 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -356,6 +356,10 @@ export function serveWebpackBrowser( } } + if (buildEvent.success) { + context.logger.info(': Compiled successfully.'); + } + return { ...buildEvent, baseUrl: serverAddress } as DevServerBuilderOutput; }), ); @@ -405,7 +409,7 @@ export function buildServerConfig( const servePath = buildServePath(serverOptions, browserOptions, logger); const { styles, scripts } = normalizeOptimization(browserOptions.optimization); - const config: WebpackDevServer.Configuration = { + const config: WebpackDevServer.Configuration & { logLevel: string} = { host: serverOptions.host, port: serverOptions.port, headers: { 'Access-Control-Allow-Origin': '*' }, @@ -438,6 +442,7 @@ export function buildServerConfig( publicPath: servePath, hot: serverOptions.hmr, contentBase: false, + logLevel: 'silent', }; if (serverOptions.ssl) { From c8a2c9ac2c469db16fb069aa4823651ca65ddbfb Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 8 Nov 2019 20:28:03 +0000 Subject: [PATCH 0479/1070] build: update core-js to version 3.4.0 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 06fc07a51468..af52f69dfa11 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -24,7 +24,7 @@ "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.4", - "core-js": "3.3.6", + "core-js": "3.4.0", "file-loader": "4.2.0", "find-cache-dir": "3.1.0", "glob": "7.1.5", diff --git a/yarn.lock b/yarn.lock index 58ea742a7355..a5873e170baf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3314,10 +3314,10 @@ core-js-compat@^3.1.1: browserslist "^4.7.1" semver "^6.3.0" -core-js@3.3.6: - version "3.3.6" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.3.6.tgz#6ad1650323c441f45379e176ed175c0d021eac92" - integrity sha512-u4oM8SHwmDuh5mWZdDg9UwNVq5s1uqq6ZDLLIs07VY+VJU91i3h4f3K/pgFvtUQPGdeStrZ+odKyfyt4EnKHfA== +core-js@3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.4.0.tgz#29ea478601789c72f2978e9bb98f43546f89d3aa" + integrity sha512-lQxb4HScV71YugF/X28LtePZj9AB7WqOpcB+YztYxusvhrgZiQXPmCYfPC5LHsw/+ScEtDbXU3xbqH3CjBRmYA== core-js@^2.2.0, core-js@^2.4.0: version "2.6.10" From 2a1597a7ad347e4b462f43be8822fb5f0fbff04e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 8 Nov 2019 20:59:25 +0000 Subject: [PATCH 0480/1070] build: update parse5-html-rewriting-stream to version 5.1.1 --- packages/angular/pwa/package.json | 2 +- yarn.lock | 29 +++++++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/packages/angular/pwa/package.json b/packages/angular/pwa/package.json index 7ccefc72d2be..b38c5711d706 100644 --- a/packages/angular/pwa/package.json +++ b/packages/angular/pwa/package.json @@ -16,6 +16,6 @@ "@angular-devkit/core": "0.0.0", "@angular-devkit/schematics": "0.0.0", "@schematics/angular": "0.0.0", - "parse5-html-rewriting-stream": "5.1.0" + "parse5-html-rewriting-stream": "5.1.1" } } diff --git a/yarn.lock b/yarn.lock index a5873e170baf..05f90e81351b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8005,31 +8005,36 @@ parse-json@^5.0.0: json-parse-better-errors "^1.0.1" lines-and-columns "^1.1.6" -parse5-html-rewriting-stream@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-5.1.0.tgz#63f92c958764aea8cbe3aa68f2e5895c32068ab8" - integrity sha512-hZlaOTHJs4dpC5yFHnOSEMh26ErsqTsLzxKqkuRcUqtiu0kMsBQ9pkgANkECDyoBUhJ3+hvb2DPLsyqbtcS61Q== +parse5-html-rewriting-stream@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-5.1.1.tgz#fc18570ba0d09b5091250956d1c3f716ef0a07b7" + integrity sha512-rbXBeMlJ3pk3tKxLKAUaqvQTZM5KTohXmZvYEv2gU9sQC70w65BxPsh3PVVnwiVNCnNYDtNZRqCKmiMlfdG07Q== dependencies: - parse5 "^5.1.0" - parse5-sax-parser "^5.1.0" + parse5 "^5.1.1" + parse5-sax-parser "^5.1.1" -parse5-sax-parser@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse5-sax-parser/-/parse5-sax-parser-5.1.0.tgz#ec234d23223a8054a74ff173aa3dc2da74c5bbd9" - integrity sha512-VEhdEDhBkoSILPmsZ96SoIIUow3hZbtgQsqXw7r8DxxnqsCIO0fwkT9mWgBcf9SPjVUh92liuEprHrrYzXBPWQ== +parse5-sax-parser@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5-sax-parser/-/parse5-sax-parser-5.1.1.tgz#02834a9d08b23ea2d99584841c38be09d5247a15" + integrity sha512-9HIh6zd7bF1NJe95LPCUC311CekdOi55R+HWXNCsGY6053DWaMijVKOv1oPvdvPTvFicifZyimBVJ6/qvG039Q== dependencies: - parse5 "^5.1.0" + parse5 "^5.1.1" parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== -parse5@5.1.0, parse5@^5.0.0, parse5@^5.1.0: +parse5@5.1.0, parse5@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== +parse5@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== + parseqs@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" From 524bff6f43f4cf94c9c6e8c26efd514e52ec7455 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 8 Nov 2019 14:03:54 +0100 Subject: [PATCH 0481/1070] fix(@angular/cli): add link to update guide post running Angular migrations --- packages/angular/cli/commands/update-impl.ts | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 610e6182777b..f15e8f0fc430 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -37,6 +37,11 @@ const pickManifest = require('npm-pick-manifest') as ( const oldConfigFileNames = ['.angular-cli.json', 'angular-cli.json']; +const NG_VERSION_9_POST_MSG = colors.cyan( + '\nYour project has been updated to Angular version 9!\n' + + 'For more info, please see: https://v9.angular.io/guide/updating-to-version-9', +); + export class UpdateCommand extends Command { public readonly allowMissingWorkspace = true; @@ -428,7 +433,18 @@ export class UpdateCommand extends Command { options.createCommits, ); - return success ? 0 : 1; + if (success) { + if ( + packageName === '@angular/core' + && (options.to || packageNode.package.version).split('.')[0] === '9' + ) { + this.logger.info(NG_VERSION_9_POST_MSG); + } + + return 0; + } + + return 1; } const requests: { @@ -565,6 +581,10 @@ export class UpdateCommand extends Command { return 0; } } + + if (migrations.some(m => m.package === '@angular/core' && m.to.split('.')[0] === '9')) { + this.logger.info(NG_VERSION_9_POST_MSG); + } } return success ? 0 : 1; From f6c3d47bd0af8973b8c4618892642a7ffc26d0ff Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 9 Nov 2019 19:56:38 +0000 Subject: [PATCH 0482/1070] build: update copy-webpack-plugin to version 5.0.5 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 38 +++++-------------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index af52f69dfa11..b2aa5d3efea7 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -23,7 +23,7 @@ "caniuse-lite": "1.0.30001008", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", - "copy-webpack-plugin": "5.0.4", + "copy-webpack-plugin": "5.0.5", "core-js": "3.4.0", "file-loader": "4.2.0", "find-cache-dir": "3.1.0", diff --git a/yarn.lock b/yarn.lock index 05f90e81351b..8dccbb7eae45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2537,27 +2537,7 @@ cacache@13.0.1, cacache@^13.0.1: ssri "^7.0.0" unique-filename "^1.1.1" -cacache@^11.3.3: - version "11.3.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.3.tgz#8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc" - integrity sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - -cacache@^12.0.2: +cacache@^12.0.2, cacache@^12.0.3: version "12.0.3" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== @@ -3288,12 +3268,12 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-webpack-plugin@5.0.4: - version "5.0.4" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-5.0.4.tgz#c78126f604e24f194c6ec2f43a64e232b5d43655" - integrity sha512-YBuYGpSzoCHSSDGyHy6VJ7SHojKp6WHT4D7ItcQFNAYx2hrwkMe56e97xfVR0/ovDuMTrMffXUiltvQljtAGeg== +copy-webpack-plugin@5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-5.0.5.tgz#731df6a837a2ef0f8f8e2345bdfe9b7c62a2da68" + integrity sha512-7N68eIoQTyudAuxkfPT7HzGoQ+TsmArN/I3HFwG+lVE3FNzqvZKIiaxtYh4o3BIznioxUvx9j26+Rtsc9htQUQ== dependencies: - cacache "^11.3.3" + cacache "^12.0.3" find-cache-dir "^2.1.0" glob-parent "^3.1.0" globby "^7.1.1" @@ -3301,9 +3281,9 @@ copy-webpack-plugin@5.0.4: loader-utils "^1.2.3" minimatch "^3.0.4" normalize-path "^3.0.0" - p-limit "^2.2.0" + p-limit "^2.2.1" schema-utils "^1.0.0" - serialize-javascript "^1.7.0" + serialize-javascript "^2.1.0" webpack-log "^2.0.0" core-js-compat@^3.1.1: @@ -7852,7 +7832,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== From 6602d90b42cd2430323f62308ffe322a578956ee Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 8 Nov 2019 19:56:56 -0500 Subject: [PATCH 0483/1070] fix(@angular-devkit/build-angular): prevent double sourcemap processing --- .../src/angular-cli-files/models/webpack-configs/browser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts index 36dd096b7193..c7197b89ed41 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts @@ -55,7 +55,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions): webpack.Configurati extraPlugins.push(getSourceMapDevTool( !!scriptsSourceMap, !!stylesSourceMap, - hiddenSourceMap, + wco.differentialLoadingMode ? true : hiddenSourceMap, )); } From 1db57d44ddc715fca3372a42b0ac09de0a28112c Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 9 Nov 2019 16:51:57 +0100 Subject: [PATCH 0484/1070] fix(@schematics/angular): return undefined instead of throw when file is not found Follow up on https://github.com/angular/angular-cli/pull/16063 --- packages/schematics/angular/migrations/update-9/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/update-9/utils.ts b/packages/schematics/angular/migrations/update-9/utils.ts index 4e51c32cf579..f80a0dd290d1 100644 --- a/packages/schematics/angular/migrations/update-9/utils.ts +++ b/packages/schematics/angular/migrations/update-9/utils.ts @@ -96,7 +96,7 @@ export function getWorkspace(host: Tree): JsonAstObject { export function readJsonFileAsAstObject(host: Tree, path: string): JsonAstObject | undefined { const configBuffer = host.read(path); if (!configBuffer) { - throw new SchematicsException(`Could not find (${path})`); + return undefined; } const content = configBuffer.toString(); From 2d0930fed449046ffd8386376a68f6fa33dfe0c7 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 11 Nov 2019 05:38:36 +0000 Subject: [PATCH 0485/1070] build: update rollup to version 1.26.5 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index b2aa5d3efea7..b4c5779558bb 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -46,7 +46,7 @@ "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", "rimraf": "3.0.0", - "rollup": "1.26.3", + "rollup": "1.26.5", "rxjs": "6.5.3", "sass": "1.23.3", "sass-loader": "8.0.0", diff --git a/yarn.lock b/yarn.lock index 8dccbb7eae45..b367e908161a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9163,10 +9163,10 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.26.3: - version "1.26.3" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.26.3.tgz#3e71b8120a4ccc745a856e926cab0efbe0eead90" - integrity sha512-8MhY/M8gnv3Q/pQQSWYWzbeJ5J1C5anCNY5BK1kV8Yzw9RFS0FF4lbLt+uyPO3wLKWXSXrhAL5pWL85TZAh+Sw== +rollup@1.26.5: + version "1.26.5" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.26.5.tgz#c492c8bb88b661e7952a864e40bdec209aa1aa03" + integrity sha512-c6Pv0yWzjYNpy2DIhLFUnyP6e1UTGownr4IfpJcPY/k186RJjpaGGPRwKQ62KCauctG6dgtHt88pw1EGrPRkuA== dependencies: "@types/estree" "*" "@types/node" "*" From febc35c2119b71898a3c6f93b437d06dfb002518 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 11 Nov 2019 03:57:37 +0000 Subject: [PATCH 0486/1070] build: update npm-package-arg to version 7.0.0 --- packages/angular/cli/package.json | 2 +- yarn.lock | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 37eadfb80239..7ed6559600ab 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -35,7 +35,7 @@ "debug": "^4.1.1", "ini": "1.3.5", "inquirer": "7.0.0", - "npm-package-arg": "6.1.1", + "npm-package-arg": "7.0.0", "npm-pick-manifest": "3.0.2", "open": "7.0.0", "pacote": "10.1.1", diff --git a/yarn.lock b/yarn.lock index b367e908161a..d086b2f8f1f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5092,6 +5092,13 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== +hosted-git-info@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.2.tgz#8b7e3bd114b59b51786f8bade0f39ddc80275a97" + integrity sha512-ezZMWtHXm7Eb7Rq4Mwnx2vs79WUx2QmRg3+ZqeGroKzfDO+EprOcgRPYghsOP9JuYBfK18VojmRTGCg8Ma+ktw== + dependencies: + lru-cache "^5.1.1" + hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -7503,7 +7510,17 @@ npm-bundled@^1.0.1: resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== -npm-package-arg@6.1.1, "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: +npm-package-arg@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-7.0.0.tgz#52cdf08b491c0c59df687c4c925a89102ef794a5" + integrity sha512-xXxr8y5U0kl8dVkz2oK7yZjPBvqM2fwaO5l3Yg13p03v8+E3qQcD0JNhHzjL1vyGgxcKkD0cco+NLR72iuPk3g== + dependencies: + hosted-git-info "^3.0.2" + osenv "^0.1.5" + semver "^5.6.0" + validate-npm-package-name "^3.0.0" + +"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== From 5f8e8083b218f0a6131571cebd8b84aefcc8ef3c Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 11 Nov 2019 12:07:35 +0000 Subject: [PATCH 0487/1070] fix(@schematics/angular): remove ngcc postinstall hook Partially addresses #16017 --- .../schematics/angular/workspace/files/package.json.template | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/schematics/angular/workspace/files/package.json.template b/packages/schematics/angular/workspace/files/package.json.template index dbcf8cd83d81..188e7572a7a1 100644 --- a/packages/schematics/angular/workspace/files/package.json.template +++ b/packages/schematics/angular/workspace/files/package.json.template @@ -7,8 +7,7 @@ "build": "ng build", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e", - "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points" + "e2e": "ng e2e" }, "private": true, "dependencies": { From 0f79926332bd7361f69608bb13da16b2ab3217ca Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 7 Nov 2019 10:03:14 +0100 Subject: [PATCH 0488/1070] docs: remove backticks from bug report in command section With this change the author will be able to check the command in question after the issue creation. --- .github/ISSUE_TEMPLATE/1-bug-report.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index b8249e87c28b..3e69b63b677c 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -17,7 +17,7 @@ Existing issues often contain information about workarounds, resolution, or prog ### Command (mark with an `x`) -``` + - [ ] new - [ ] build - [ ] serve @@ -33,7 +33,7 @@ Existing issues often contain information about workarounds, resolution, or prog - [ ] help - [ ] version - [ ] doc -``` + ### Is this a regression? From 17a86882179fcb08cb6336c35ce647defd1c8c6a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 11 Nov 2019 17:19:09 +0000 Subject: [PATCH 0489/1070] build: update to version --- yarn.lock | 1030 ++++++++++++++++++++++++++--------------------------- 1 file changed, 496 insertions(+), 534 deletions(-) diff --git a/yarn.lock b/yarn.lock index d086b2f8f1f9..1afa94f750e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -103,7 +103,7 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.6.4", "@babel/core@^7.5.5": +"@babel/core@7.6.4": version "7.6.4" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.4.tgz#6ebd9fe00925f6c3e177bb726a188b5f578088ff" integrity sha512-Rm0HGw101GY8FTzpWSyRbki/jzq+/PkNQJ+nSulrdY6gFGOsNseCqD6KHRYe2E+EdzuBdr2pxCp6s4Uk6eJ+XQ== @@ -123,7 +123,27 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@7.6.4", "@babel/generator@^7.4.0", "@babel/generator@^7.6.3", "@babel/generator@^7.6.4": +"@babel/core@^7.5.5": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.2.tgz#ea5b99693bcfc058116f42fa1dd54da412b29d91" + integrity sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.7.2" + "@babel/helpers" "^7.7.0" + "@babel/parser" "^7.7.2" + "@babel/template" "^7.7.0" + "@babel/traverse" "^7.7.2" + "@babel/types" "^7.7.2" + convert-source-map "^1.7.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@7.6.4": version "7.6.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" integrity sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w== @@ -133,102 +153,120 @@ lodash "^4.17.13" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" - integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== +"@babel/generator@^7.4.0", "@babel/generator@^7.6.4", "@babel/generator@^7.7.2": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.2.tgz#2f4852d04131a5e17ea4f6645488b5da66ebf3af" + integrity sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.7.2" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.0.tgz#efc54032d43891fe267679e63f6860aa7dbf4a5e" + integrity sha512-k50CQxMlYTYo+GGyUGFwpxKVtxVJi9yh61sXZji3zYHccK9RYliZGSTOgci85T+r+0VFN2nWbGM04PIqwfrpMg== + dependencies: + "@babel/types" "^7.7.0" "@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" - integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.7.0.tgz#32dd9551d6ed3a5fc2edc50d6912852aa18274d9" + integrity sha512-Cd8r8zs4RKDwMG/92lpZcnn5WPQ3LAMQbCw42oqUh4s7vsSN5ANUZjMel0OOnxDLq57hoDDbai+ryygYfCTOsw== dependencies: - "@babel/helper-explode-assignable-expression" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/helper-explode-assignable-expression" "^7.7.0" + "@babel/types" "^7.7.0" "@babel/helper-call-delegate@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43" - integrity sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.7.0.tgz#df8942452c2c1a217335ca7e393b9afc67f668dc" + integrity sha512-Su0Mdq7uSSWGZayGMMQ+z6lnL00mMCnGAbO/R0ZO9odIdB/WNU/VfQKqMQU0fdIsxQYbRjDM4BixIa93SQIpvw== dependencies: - "@babel/helper-hoist-variables" "^7.4.4" - "@babel/traverse" "^7.4.4" - "@babel/types" "^7.4.4" + "@babel/helper-hoist-variables" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" -"@babel/helper-define-map@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz#3dec32c2046f37e09b28c93eb0b103fd2a25d369" - integrity sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg== +"@babel/helper-create-regexp-features-plugin@^7.7.0": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.2.tgz#6f20443778c8fce2af2ff4206284afc0ced65db6" + integrity sha512-pAil/ZixjTlrzNpjx+l/C/wJk002Wo7XbbZ8oujH/AoJ3Juv0iN/UTcPUHXKMFLqsfS0Hy6Aow8M31brUYBlQQ== + dependencies: + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.6.0" + +"@babel/helper-define-map@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.7.0.tgz#60b0e9fd60def9de5054c38afde8c8ee409c7529" + integrity sha512-kPKWPb0dMpZi+ov1hJiwse9dWweZsz3V9rP4KdytnX1E7z3cTNmFGglwklzFPuqIcHLIY3bgKSs4vkwXXdflQA== dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.5.5" + "@babel/helper-function-name" "^7.7.0" + "@babel/types" "^7.7.0" lodash "^4.17.13" -"@babel/helper-explode-assignable-expression@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" - integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== +"@babel/helper-explode-assignable-expression@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.7.0.tgz#db2a6705555ae1f9f33b4b8212a546bc7f9dc3ef" + integrity sha512-CDs26w2shdD1urNUAji2RJXyBFCaR+iBEGnFz3l7maizMkQe3saVw9WtjG1tz8CwbjvlFnaSLVhgnu1SWaherg== dependencies: - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" -"@babel/helper-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" - integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== +"@babel/helper-function-name@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz#44a5ad151cfff8ed2599c91682dda2ec2c8430a3" + integrity sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q== dependencies: - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/helper-get-function-arity" "^7.7.0" + "@babel/template" "^7.7.0" + "@babel/types" "^7.7.0" -"@babel/helper-get-function-arity@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" - integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== +"@babel/helper-get-function-arity@^7.0.0", "@babel/helper-get-function-arity@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz#c604886bc97287a1d1398092bc666bc3d7d7aa2d" + integrity sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.7.0" -"@babel/helper-hoist-variables@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" - integrity sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w== +"@babel/helper-hoist-variables@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.0.tgz#b4552e4cfe5577d7de7b183e193e84e4ec538c81" + integrity sha512-LUe/92NqsDAkJjjCEWkNe+/PcpnisvnqdlRe19FahVapa4jndeuJ+FBiTX1rcAKWKcJGE+C3Q3tuEuxkSmCEiQ== dependencies: - "@babel/types" "^7.4.4" + "@babel/types" "^7.7.0" -"@babel/helper-member-expression-to-functions@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz#1fb5b8ec4453a93c439ee9fe3aeea4a84b76b590" - integrity sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA== +"@babel/helper-member-expression-to-functions@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.0.tgz#472b93003a57071f95a541ea6c2b098398bcad8a" + integrity sha512-QaCZLO2RtBcmvO/ekOLp8p7R5X2JriKRizeDpm5ChATAFWrrYDcDxPuCIBXKyBjY+i1vYSdcUTMIb8psfxHDPA== dependencies: - "@babel/types" "^7.5.5" + "@babel/types" "^7.7.0" -"@babel/helper-module-imports@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" - integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz#99c095889466e5f7b6d66d98dffc58baaf42654d" + integrity sha512-Dv3hLKIC1jyfTkClvyEkYP2OlkzNvWs5+Q8WgPbxM5LMeorons7iPP91JM+DU7tRbhqA1ZeooPaMFvQrn23RHw== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.7.0" -"@babel/helper-module-transforms@^7.1.0", "@babel/helper-module-transforms@^7.4.4": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz#f84ff8a09038dcbca1fd4355661a500937165b4a" - integrity sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw== +"@babel/helper-module-transforms@^7.1.0", "@babel/helper-module-transforms@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.7.0.tgz#154a69f0c5b8fd4d39e49750ff7ac4faa3f36786" + integrity sha512-rXEefBuheUYQyX4WjV19tuknrJFwyKw0HgzRwbkyTbB+Dshlq7eqkWbyjzToLrMZk/5wKVKdWFluiAsVkHXvuQ== dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/template" "^7.4.4" - "@babel/types" "^7.5.5" + "@babel/helper-module-imports" "^7.7.0" + "@babel/helper-simple-access" "^7.7.0" + "@babel/helper-split-export-declaration" "^7.7.0" + "@babel/template" "^7.7.0" + "@babel/types" "^7.7.0" lodash "^4.17.13" -"@babel/helper-optimise-call-expression@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" - integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== +"@babel/helper-optimise-call-expression@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.0.tgz#4f66a216116a66164135dc618c5d8b7a959f9365" + integrity sha512-48TeqmbazjNU/65niiiJIJRc5JozB8acui1OS7bSd6PgxfuovWsvjfWSzlgx+gPFdVveNzUdpdIg5l56Pl5jqg== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.7.0" "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" @@ -242,60 +280,60 @@ dependencies: lodash "^4.17.13" -"@babel/helper-remap-async-to-generator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" - integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-wrap-function" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-replace-supers@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz#f84ce43df031222d2bad068d2626cb5799c34bc2" - integrity sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.5.5" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.5.5" - "@babel/types" "^7.5.5" - -"@babel/helper-simple-access@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" - integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== - dependencies: - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-split-export-declaration@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" - integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== - dependencies: - "@babel/types" "^7.4.4" - -"@babel/helper-wrap-function@^7.1.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" - integrity sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.2.0" - -"@babel/helpers@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.2.tgz#681ffe489ea4dcc55f23ce469e58e59c1c045153" - integrity sha512-3/bAUL8zZxYs1cdX2ilEE0WobqbCmKWr/889lf2SS0PpDcpEIY8pb1CCyz0pEcX3pEb+MCbks1jIokz2xLtGTA== - dependencies: - "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.2" - "@babel/types" "^7.6.0" +"@babel/helper-remap-async-to-generator@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.0.tgz#4d69ec653e8bff5bce62f5d33fc1508f223c75a7" + integrity sha512-pHx7RN8X0UNHPB/fnuDnRXVZ316ZigkO8y8D835JlZ2SSdFKb6yH9MIYRU4fy/KPe5sPHDFOPvf8QLdbAGGiyw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.7.0" + "@babel/helper-wrap-function" "^7.7.0" + "@babel/template" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" + +"@babel/helper-replace-supers@^7.5.5", "@babel/helper-replace-supers@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.7.0.tgz#d5365c8667fe7cbd13b8ddddceb9bd7f2b387512" + integrity sha512-5ALYEul5V8xNdxEeWvRsBzLMxQksT7MaStpxjJf9KsnLxpAKBtfw5NeMKZJSYDa0lKdOcy0g+JT/f5mPSulUgg== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.7.0" + "@babel/helper-optimise-call-expression" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" + +"@babel/helper-simple-access@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.7.0.tgz#97a8b6c52105d76031b86237dc1852b44837243d" + integrity sha512-AJ7IZD7Eem3zZRuj5JtzFAptBw7pMlS3y8Qv09vaBWoFsle0d1kAn5Wq6Q9MyBXITPOKnxwkZKoAm4bopmv26g== + dependencies: + "@babel/template" "^7.7.0" + "@babel/types" "^7.7.0" + +"@babel/helper-split-export-declaration@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz#1365e74ea6c614deeb56ebffabd71006a0eb2300" + integrity sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA== + dependencies: + "@babel/types" "^7.7.0" + +"@babel/helper-wrap-function@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.7.0.tgz#15af3d3e98f8417a60554acbb6c14e75e0b33b74" + integrity sha512-sd4QjeMgQqzshSjecZjOp8uKfUtnpmCyQhKQrVJBBgeHAB/0FPi33h3AbVlVp07qQtMD4QgYSzaMI7VwncNK/w== + dependencies: + "@babel/helper-function-name" "^7.7.0" + "@babel/template" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" + +"@babel/helpers@^7.6.2", "@babel/helpers@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.0.tgz#359bb5ac3b4726f7c1fde0ec75f64b3f4275d60b" + integrity sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g== + dependencies: + "@babel/template" "^7.7.0" + "@babel/traverse" "^7.7.0" + "@babel/types" "^7.7.0" "@babel/highlight@^7.0.0": version "7.5.0" @@ -306,24 +344,24 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.3", "@babel/parser@^7.6.4": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" - integrity sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A== +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.6.4", "@babel/parser@^7.7.0", "@babel/parser@^7.7.2": + version "7.7.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.3.tgz#5fad457c2529de476a248f75b0f090b3060af043" + integrity sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A== "@babel/plugin-proposal-async-generator-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" - integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.0.tgz#83ef2d6044496b4c15d8b4904e2219e6dccc6971" + integrity sha512-ot/EZVvf3mXtZq0Pd0+tSOfGWMizqmOohXmNZg6LNFjHOV+wOPv7BvVYh8oPR8LhpIP3ye8nNooKL50YRWxpYA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/helper-remap-async-to-generator" "^7.7.0" "@babel/plugin-syntax-async-generators" "^7.2.0" "@babel/plugin-proposal-dynamic-import@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz#e532202db4838723691b10a67b8ce509e397c506" - integrity sha512-x/iMjggsKTFHYC6g11PL7Qy58IK8H5zqfm9e6hu4z1iH2IRyAp9u9dL80zA6R76yFovETFLKz2VJIC2iIPBuFw== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.0.tgz#dc02a8bad8d653fb59daf085516fa416edd2aa7f" + integrity sha512-7poL3Xi+QFPC7sGAzEIbXUyYzGJwbc2+gSD0AkiC5k52kH2cqHdqxm5hNFfLW3cRSTcx9bN0Fl7/6zWcLLnKAQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-dynamic-import" "^7.2.0" @@ -353,13 +391,12 @@ "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" "@babel/plugin-proposal-unicode-property-regex@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.6.2.tgz#05413762894f41bfe42b9a5e80919bd575dcc802" - integrity sha512-NxHETdmpeSCtiatMRYWVJo7266rrvAC3DTeG5exQBIH/fMIUK7ejDNznBbn3HQl/o9peymRRg7Yqkx6PdUXmMw== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.0.tgz#549fe1717a1bd0a2a7e63163841cb37e78179d5d" + integrity sha512-mk34H+hp7kRBWJOOAR0ZMGCydgKMD4iN9TpDRp3IIcbunltxEY89XSimc6WbtSLCDrwcdy/EEw7h5CFCzxTchw== dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.4.4" - regexpu-core "^4.6.0" "@babel/plugin-syntax-async-generators@^7.2.0": version "7.2.0" @@ -404,13 +441,13 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-async-to-generator@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.5.0.tgz#89a3848a0166623b5bc481164b5936ab947e887e" - integrity sha512-mqvkzwIGkq0bEF1zLRRiTdjfomZJDV33AH3oQzHVGkI2VzEmXLpKKOBvEVaFZBJdN0XTyH38s9j/Kiqr68dggg== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.0.tgz#e2b84f11952cf5913fe3438b7d2585042772f492" + integrity sha512-vLI2EFLVvRBL3d8roAMqtVY0Bm9C1QzLkdS57hiKrjUBSqsQYrBsMCeOg/0KK7B0eK9V71J5mWcha9yyoI2tZw== dependencies: - "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-module-imports" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/helper-remap-async-to-generator" "^7.7.0" "@babel/plugin-transform-block-scoped-functions@^7.2.0": version "7.2.0" @@ -428,17 +465,17 @@ lodash "^4.17.13" "@babel/plugin-transform-classes@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz#d094299d9bd680a14a2a0edae38305ad60fb4de9" - integrity sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.5.5" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-optimise-call-expression" "^7.0.0" + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.0.tgz#b411ecc1b8822d24b81e5d184f24149136eddd4a" + integrity sha512-/b3cKIZwGeUesZheU9jNYcwrEA7f/Bo4IdPmvp7oHgvks2majB5BoT5byAql44fiNQYOPzhk2w8DbgfuafkMoA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.7.0" + "@babel/helper-define-map" "^7.7.0" + "@babel/helper-function-name" "^7.7.0" + "@babel/helper-optimise-call-expression" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.5.5" - "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/helper-replace-supers" "^7.7.0" + "@babel/helper-split-export-declaration" "^7.7.0" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.2.0": @@ -456,13 +493,12 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-dotall-regex@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.6.2.tgz#44abb948b88f0199a627024e1508acaf8dc9b2f9" - integrity sha512-KGKT9aqKV+9YMZSkowzYoYEiHqgaDhGmPNZlZxX6UeHC4z30nC1J9IrZuGqbYFB1jaIGdv91ujpze0exiVK8bA== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.0.tgz#c5c9ecacab3a5e0c11db6981610f0c32fd698b3b" + integrity sha512-3QQlF7hSBnSuM1hQ0pS3pmAbWLax/uGNCbPBND9y+oJ4Y776jsyujG2k0Sn2Aj2a0QwVOiOFL5QVPA7spjvzSA== dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.4.4" - regexpu-core "^4.6.0" "@babel/plugin-transform-duplicate-keys@^7.5.0": version "7.5.0" @@ -487,11 +523,11 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz#e1436116abb0610c2259094848754ac5230922ad" - integrity sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.0.tgz#0fa786f1eef52e3b7d4fc02e54b2129de8a04c2a" + integrity sha512-P5HKu0d9+CzZxP5jcrWdpe7ZlFDe24bmqP6a6X8BHEBl/eizAsY8K6LX8LASZL0Jxdjm5eEfzp+FIrxCm/p8bA== dependencies: - "@babel/helper-function-name" "^7.1.0" + "@babel/helper-function-name" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-literals@^7.2.0": @@ -518,38 +554,38 @@ babel-plugin-dynamic-import-node "^2.3.0" "@babel/plugin-transform-modules-commonjs@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.6.0.tgz#39dfe957de4420445f1fcf88b68a2e4aa4515486" - integrity sha512-Ma93Ix95PNSEngqomy5LSBMAQvYKVe3dy+JlVJSHEXZR5ASL9lQBedMiCyVtmTLraIDVRE3ZjTZvmXXD2Ozw3g== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.0.tgz#3e5ffb4fd8c947feede69cbe24c9554ab4113fe3" + integrity sha512-KEMyWNNWnjOom8vR/1+d+Ocz/mILZG/eyHHO06OuBQ2aNhxT62fr4y6fGOplRx+CxCSp3IFwesL8WdINfY/3kg== dependencies: - "@babel/helper-module-transforms" "^7.4.4" + "@babel/helper-module-transforms" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-simple-access" "^7.7.0" babel-plugin-dynamic-import-node "^2.3.0" "@babel/plugin-transform-modules-systemjs@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.5.0.tgz#e75266a13ef94202db2a0620977756f51d52d249" - integrity sha512-Q2m56tyoQWmuNGxEtUyeEkm6qJYFqs4c+XyXH5RAuYxObRNz9Zgj/1g2GMnjYp2EUyEy7YTrxliGCXzecl/vJg== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.0.tgz#9baf471213af9761c1617bb12fd278e629041417" + integrity sha512-ZAuFgYjJzDNv77AjXRqzQGlQl4HdUM6j296ee4fwKVZfhDR9LAGxfvXjBkb06gNETPnN0sLqRm9Gxg4wZH6dXg== dependencies: - "@babel/helper-hoist-variables" "^7.4.4" + "@babel/helper-hoist-variables" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" babel-plugin-dynamic-import-node "^2.3.0" "@babel/plugin-transform-modules-umd@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" - integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.0.tgz#d62c7da16670908e1d8c68ca0b5d4c0097b69966" + integrity sha512-u7eBA03zmUswQ9LQ7Qw0/ieC1pcAkbp5OQatbWUzY1PaBccvuJXUkYzoN1g7cqp7dbTu6Dp9bXyalBvD04AANA== dependencies: - "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-module-transforms" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-named-capturing-groups-regex@^7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.3.tgz#aaa6e409dd4fb2e50b6e2a91f7e3a3149dbce0cf" - integrity sha512-jTkk7/uE6H2s5w6VlMHeWuH+Pcy2lmdwFoeWCVnvIrDUnB5gQqTVI8WfmEAhF2CDEarGrknZcmSFg1+bkfCoSw== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.0.tgz#358e6fd869b9a4d8f5cbc79e4ed4fc340e60dcaf" + integrity sha512-+SicSJoKouPctL+j1pqktRVCgy+xAch1hWWTMy13j0IflnyNjaoskj+DwRQFimHbLqO3sq2oN2CXMvXq3Bgapg== dependencies: - regexpu-core "^4.6.0" + "@babel/helper-create-regexp-features-plugin" "^7.7.0" "@babel/plugin-transform-new-target@^7.4.4": version "7.4.4" @@ -583,9 +619,9 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-regenerator@^7.4.5": - version "7.4.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz#629dc82512c55cee01341fb27bdfcb210354680f" - integrity sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.0.tgz#f1b20b535e7716b622c99e989259d7dd942dd9cc" + integrity sha512-AXmvnC+0wuj/cFkkS/HFHIojxH3ffSXE+ttulrqWjZZRaUOonfJc60e1wSNT4rV8tIunvu/R3wCp71/tLAa9xg== dependencies: regenerator-transform "^0.14.0" @@ -634,13 +670,12 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-unicode-regex@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz#b692aad888a7e8d8b1b214be6b9dc03d5031f698" - integrity sha512-orZI6cWlR3nk2YmYdb0gImrgCUwb5cBUwjf6Ks6dvNVvXERkwtJWOQaEOjPiu0Gu1Tq6Yq/hruCZZOOi9F34Dw== + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.0.tgz#743d9bcc44080e3cc7d49259a066efa30f9187a3" + integrity sha512-RrThb0gdrNwFAqEAAx9OWgtx6ICK69x7i9tCnMdVrxQwSDp/Abu9DXFU5Hh16VP33Rmxh04+NGW28NsIkFvFKA== dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.4.4" - regexpu-core "^4.6.0" "@babel/preset-env@7.6.3": version "7.6.3" @@ -699,40 +734,40 @@ semver "^5.5.0" "@babel/runtime@^7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.3.tgz#935122c74c73d2240cafd32ddb5fc2a6cd35cf1f" - integrity sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA== + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.2.tgz#111a78002a5c25fc8e3361bedc9529c696b85a6a" + integrity sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw== dependencies: regenerator-runtime "^0.13.2" -"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" - integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== +"@babel/template@^7.4.0", "@babel/template@^7.6.0", "@babel/template@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0" + integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.6.0" - "@babel/types" "^7.6.0" + "@babel/parser" "^7.7.0" + "@babel/types" "^7.7.0" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.2", "@babel/traverse@^7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.3.tgz#66d7dba146b086703c0fb10dd588b7364cec47f9" - integrity sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw== +"@babel/traverse@^7.4.3", "@babel/traverse@^7.6.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.2": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.2.tgz#ef0a65e07a2f3c550967366b3d9b62a2dcbeae09" + integrity sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.3" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.6.3" - "@babel/types" "^7.6.3" + "@babel/generator" "^7.7.2" + "@babel/helper-function-name" "^7.7.0" + "@babel/helper-split-export-declaration" "^7.7.0" + "@babel/parser" "^7.7.2" + "@babel/types" "^7.7.2" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0", "@babel/types@^7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.3.tgz#3f07d96f854f98e2fbd45c64b0cb942d11e8ba09" - integrity sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.6.3", "@babel/types@^7.7.0", "@babel/types@^7.7.2": + version "7.7.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.2.tgz#550b82e5571dcd174af576e23f0adba7ffc683f7" + integrity sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA== dependencies: esutils "^2.0.2" lodash "^4.17.13" @@ -789,9 +824,9 @@ "@bazel/buildifier-win32_x64" "0.29.0" "@bazel/hide-bazel-files@latest": - version "0.38.3" - resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.38.3.tgz#e98231d3d360d51860d9c1a7c3345b40dab4cf81" - integrity sha512-o+dNkfDm3qxWQ8h/04cWuTcjR7qnjZi3pQGv4aklVb16oPWx2jF8BzbkwvWuIkdbOl9VnqYP0vaHzwQVJRRcIA== + version "0.39.1" + resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-0.39.1.tgz#90b14d5031a903e78e1abfe740662c92292cc1c8" + integrity sha512-nmILMfF8wD3hR3+r0MUCqPahgBYszLKFBcrbnmYthG6Oujgy1NpYMjeWj7Hjt3pJMkT1MgQP/VipLu2gQyMc0Q== "@bazel/jasmine@0.39.0": version "0.39.0" @@ -1020,17 +1055,17 @@ integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== "@types/express-serve-static-core@*": - version "4.16.10" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.10.tgz#3c1313c6e6b75594561b473a286f016a9abf2132" - integrity sha512-gM6evDj0OvTILTRKilh9T5dTaGpv1oYiFcJAfgSejuMJgGJUsD9hKEU2lB4aiTNy4WwChxRnjfYFuBQsULzsJw== + version "4.16.11" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.11.tgz#46e8cb091de19d51731a05c2581e515855979dad" + integrity sha512-K8d2M5t3tBQimkyaYTXxtHYyoJPUEhy2/omVRnTAKw5FEdT+Ft6lTaTOpoJdHeG+mIwQXXtqiTcYZ6IR8LTzjQ== dependencies: "@types/node" "*" "@types/range-parser" "*" "@types/express@*", "@types/express@^4.16.0": - version "4.17.1" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.1.tgz#4cf7849ae3b47125a567dfee18bfca4254b88c5c" - integrity sha512-VfH/XCP0QbQk5B5puLqTLEeFgR8lfCJHZJKkInZ9mkYd+u8byX0kztXEQxEk4wZXJs8HI+7km2ALXjn4YKcX9w== + version "4.17.2" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.2.tgz#a0fb7a23d8855bac31bc01d5a58cadd9b2173e6c" + integrity sha512-5mHFNyavtLoJmnusB8OKJ5bshSzw+qkMIBAobLrIM48HJvunFva9mOa6aBwh64lBFyNwBbs0xiEFuj4eU/NjCA== dependencies: "@types/body-parser" "*" "@types/express-serve-static-core" "*" @@ -1065,9 +1100,9 @@ "@types/node" "*" "@types/http-proxy@*": - version "1.17.0" - resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.0.tgz#baf82ff6aa2723fd29f90e3ba1384e665006863e" - integrity sha512-l+s0IoxSHqhLFJPDHRfO235kgrCkvFD8JmdV/T9C4BKBYPIjrQopGFH4r7h2e3jQqgJRCthRCAZIxDoFnj1zwQ== + version "1.17.1" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.1.tgz#a10be6cb7d61ff0eb4cf39fcd83bca3697fd6354" + integrity sha512-dm/rPkk/B35nP/653X2K+ecA3TSa39c7n/wpQ2BZRkmKndPe3HDFjsKWoiiZ4i49hC1BF8AFWz3OnjxBzsy5zw== dependencies: "@types/node" "*" @@ -1080,9 +1115,9 @@ "@types/through" "*" "@types/jasmine@~3.4.0": - version "3.4.4" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.4.tgz#be3fbd73e72725edb44e6f7f509cd52912d1550c" - integrity sha512-+/sHcTPyDS1JQacDRRRWb+vNrjBwnD+cKvTaWlxlJ/uOOFvzCkjOwNaqVjYMLfsjzNi0WtDH9RyReDXPG1Cdug== + version "3.4.6" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.6.tgz#afcb210af0fa751b85a96b2034eedada65390be1" + integrity sha512-hpQHs+lmZ0uuCrGyqypdI1Ho7jRFolOBT6OkNdZPFziLSSEKvWu+VxWU6bGdNEA/hoV4jV8pdDeNx8EWlmfNAw== "@types/karma@^3.0.2": version "3.0.3" @@ -1122,16 +1157,16 @@ integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= "@types/node-fetch@^2.1.6": - version "2.5.2" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.2.tgz#76906dea5b3d6901e50e63e15249c9bcd6e9676e" - integrity sha512-djYYKmdNRSBtL1x4CiE9UJb9yZhwtI1VC+UxZD0psNznrUj80ywsxKlEGAE+QL1qvLjPbfb24VosjkYM6W4RSQ== + version "2.5.3" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.3.tgz#b84127facd93642b1fb6439bc630ba0612e3ec50" + integrity sha512-X3TNlzZ7SuSwZsMkb5fV7GrPbVKvHc2iwHmslb8bIxRKWg2iqkfm3F/Wd79RhDpOXR7wCtKAwc5Y2JE6n/ibyw== dependencies: "@types/node" "*" "@types/node@*": - version "12.11.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.5.tgz#6c3c8dc84988aff11fd2a63d7b5fbf39eaaab7b1" - integrity sha512-LC8ALj/24PhByn39nr5jnTvpE7MujK8y7LQmV74kHYF5iQ0odCPkMH4IZNZw+cobKfSXqaC8GgegcbIsQpffdA== + version "12.12.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11" + integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w== "@types/node@10.12.30": version "10.12.30" @@ -1139,9 +1174,9 @@ integrity sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q== "@types/node@^10.1.0": - version "10.14.22" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.22.tgz#34bcdf6b6cb5fc0db33d24816ad9d3ece22feea4" - integrity sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw== + version "10.17.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.5.tgz#c1920150f7b90708a7d0f3add12a06bc9123c055" + integrity sha512-RElZIr/7JreF1eY6oD5RF3kpmdcreuQPjg5ri4oQ5g9sq7YWU8HkfB3eH8GwAwxf5OaCh0VPi7r4N/yoTGelrA== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1183,9 +1218,9 @@ "@types/node" "*" "@types/rimraf@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" - integrity sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.3.tgz#0199a46af106729ba14213fda7b981278d8c84f2" + integrity sha512-dZfyfL/u9l/oi984hEXdmAjX3JHry7TLWw43u1HQ8HhPv6KtfxnrZ3T/bleJ0GEvnk9t5sM7eePkgMqz3yBcGg== dependencies: "@types/glob" "*" "@types/node" "*" @@ -1297,9 +1332,9 @@ integrity sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA== "@types/semver@^6.0.0": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.0.2.tgz#5e8b09f0e4af53034b1d0fb9977a277847836205" - integrity sha512-G1Ggy7/9Nsa1Jt2yiBR2riEuyK2DFNnqow6R7cromXPMNynackRY1vqFTLz/gwnef1LHokbXThcPhqMRjUbkpQ== + version "6.2.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.2.0.tgz#d688d574400d96c5b0114968705366f431831e1a" + integrity sha512-1OzrNb4RuAzIT7wHSsgZRlMBlNsJl+do6UblR7JMW4oB7bbR+uBEYtUh7gEc/jM84GGilh68lSOokyM/zNUlBA== "@types/serve-static@*": version "1.13.3" @@ -1349,9 +1384,9 @@ integrity sha512-uHUvuLfy4YkRHL4UH8J8oRsINhdEHd9ymag7KJZVT94CjAmY1njoUzhazJsZjwfy+IpWKQKGVyXCwzhZvg73Fg== "@types/uuid@^3.4.4": - version "3.4.5" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.5.tgz#d4dc10785b497a1474eae0ba7f0cb09c0ddfd6eb" - integrity sha512-MNL15wC3EKyw1VLF+RoVO4hJJdk9t/Hlv3rt1OL65Qvuadm4BYo6g9ZJQqoq7X8NBFSsQXgAujWciovh2lpVjA== + version "3.4.6" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.6.tgz#d2c4c48eb85a757bf2927f75f939942d521e3016" + integrity sha512-cCdlC/1kGEZdEglzOieLDYBxHsvEOIg7kp/2FYyVR9Pxakq+Qf/inL3RKQ+PA8gOlI/NnL+fXmQH12nwcGzsHw== dependencies: "@types/node" "*" @@ -1376,9 +1411,9 @@ source-map "^0.6.1" "@types/webpack@*", "@types/webpack@^4.32.1": - version "4.39.5" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.5.tgz#3671b65928d9e0c6fcd4adff3f8167d48b174681" - integrity sha512-9twG6D97ao13MBLvigwfBJe6rxtb04UY3TcYHBYkW5sXZjUrNhqIRxLYg74VzK/YAE8xlVhOyd+3Whr7E5RrBA== + version "4.39.8" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.39.8.tgz#8083a4eb850ea02961ef6161465434c9b478851f" + integrity sha512-lkJvwNJQUPW2SbVwAZW9s9whJp02nzLf2yTNwMULa4LloED9MYS1aNnGeoBCifpAI1pEBkTpLhuyRmBnLEOZAA== dependencies: "@types/anymatch" "*" "@types/node" "*" @@ -1387,13 +1422,21 @@ "@types/webpack-sources" "*" source-map "^0.6.0" -"@verdaccio/commons-api@8.2.0", "@verdaccio/commons-api@^8.2.0": +"@verdaccio/commons-api@8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-8.2.0.tgz#0ed20a7feba6af02bc525f36c46834971b9fd0a7" integrity sha512-dypbrd/3gmuAfLW3cUdkQ0NwQdtrGfEjv4qJ+Qw6/jnNf7goGmI/94XwqgIAZdmPN+JH99r7kwa9qHtfUyYWvA== dependencies: http-errors "1.7.3" +"@verdaccio/commons-api@^8.2.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@verdaccio/commons-api/-/commons-api-8.3.0.tgz#3a4b07b63561b21bfc8242330da528e12788635e" + integrity sha512-MfXwbPa41mjkjCOFr6QOgThBzmtL1cuQuViurPQXpLsNeTC1EuZ1BkNjbrnOfEQuFKWsWmtLd8tEUP0hNcLMcg== + dependencies: + http-errors "1.7.3" + http-status-codes "1.3.2" + "@verdaccio/file-locking@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@verdaccio/file-locking/-/file-locking-1.0.0.tgz#2f148612d9ce5c3c0dfd826151561b2aa887777d" @@ -1402,9 +1445,9 @@ lockfile "1.0.4" "@verdaccio/file-locking@^8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@verdaccio/file-locking/-/file-locking-8.2.0.tgz#d6c76315fdf4022ae453f92ac12f1cf4d5a64f1c" - integrity sha512-s3gzuRWN2IgaEUPtwsnB24gRRVFaD26fbh+32RN7hcxlqCtZh8s7spKu5cFYCxtyoYkFVFxn3PsJcWkGaKda7Q== + version "8.3.0" + resolved "https://registry.yarnpkg.com/@verdaccio/file-locking/-/file-locking-8.3.0.tgz#e0b9bc2b96cc6c4b3b8ca3b82ebf29ee4de23738" + integrity sha512-9kPaQ6HNeAhmkvW0sTj6qhLm2XjmIimUHSJR4w/uChL8f7niyx0wnXV6nMG10EsGjLYte9BG9rfDon4LynGuFQ== dependencies: lockfile "1.0.4" @@ -1430,11 +1473,16 @@ jsdom "15.2.0" marked "0.7.0" -"@verdaccio/streams@8.2.0", "@verdaccio/streams@^8.2.0": +"@verdaccio/streams@8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-8.2.0.tgz#3135945bd8445b2af27ea888eb9989071df9afa9" integrity sha512-gwMHKVoJMWuI6dMxrekiv1gcNEpll/K6uj4juOjTwhp6IULUDbza7T6FHj3I5p5zxREEkiNGnCWmZki0437qEQ== +"@verdaccio/streams@^8.2.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@verdaccio/streams/-/streams-8.3.0.tgz#d779d9d3e74d0248c463ac9bd7f43a6f42ef42eb" + integrity sha512-OxCUeUPi32WS6TwWB9sbhguKCG5rZ4AXzop5PgEYsKghzAVKXbYHn8y2QRa7QU7JE7xEFD+kXonBKjGp6bc1KQ== + "@verdaccio/ui-theme@0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@verdaccio/ui-theme/-/ui-theme-0.3.2.tgz#6f4a27abb3781a9741473e55bff7af650dce118c" @@ -1785,6 +1833,11 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -2001,7 +2054,7 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.7.1: +autoprefixer@9.7.1, autoprefixer@^9.6.5: version "9.7.1" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.1.tgz#9ffc44c55f5ca89253d9bb7186cefb01ef57747f" integrity sha512-w3b5y1PXWlhYulevrTJ0lizkQ5CyqfeU6BIRDbuhsMupstHQOeb1Ur80tcB1zxSu7AwyY/qCQ7Vvqklh31ZBFw== @@ -2014,19 +2067,6 @@ autoprefixer@9.7.1: postcss "^7.0.21" postcss-value-parser "^4.0.2" -autoprefixer@^9.6.5: - version "9.6.5" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.5.tgz#98f4afe7e93cccf323287515d426019619775e5e" - integrity sha512-rGd50YV8LgwFQ2WQp4XzOTG69u1qQsXn0amww7tjqV5jJuNazgFKYEVItEBngyyvVITKOg20zr2V+9VsrXJQ2g== - dependencies: - browserslist "^4.7.0" - caniuse-lite "^1.0.30000999" - chalk "^2.4.2" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.18" - postcss-value-parser "^4.0.2" - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2396,7 +2436,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.7.2, browserslist@^4.7.2: +browserslist@4.7.2, browserslist@^4.6.0, browserslist@^4.7.0, browserslist@^4.7.2: version "4.7.2" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.2.tgz#1bb984531a476b5d389cedecb195b2cd69fb1348" integrity sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw== @@ -2405,15 +2445,6 @@ browserslist@4.7.2, browserslist@^4.7.2: electron-to-chromium "^1.3.295" node-releases "^1.1.38" -browserslist@^4.6.0, browserslist@^4.7.0, browserslist@^4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.1.tgz#bd400d1aea56538580e8c4d5f1c54ac11b5ab468" - integrity sha512-QtULFqKIAtiyNx7NhZ/p4rB8m3xDozVo/pi5VgTlADLF2tNigz/QH+v0m5qhn7XfHT7u+607NcCNOnC0HZAlMg== - dependencies: - caniuse-lite "^1.0.30000999" - electron-to-chromium "^1.3.284" - node-releases "^1.1.36" - browserstack@^1.5.1: version "1.5.3" resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.3.tgz#93ab48799a12ef99dbd074dd595410ddb196a7ac" @@ -2465,9 +2496,9 @@ buffer-xor@^1.0.3: integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" @@ -2642,26 +2673,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001008: +caniuse-lite@1.0.30001008, caniuse-lite@^1.0.30001004, caniuse-lite@^1.0.30001006: version "1.0.30001008" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001008.tgz#b8841b1df78a9f5ed9702537ef592f1f8772c0d9" integrity sha512-b8DJyb+VVXZGRgJUa30cbk8gKHZ3LOZTBLaUEEVr2P4xpmFigOCc62CO4uzquW641Ouq1Rm9N+rWLWdSYDaDIw== -caniuse-lite@^1.0.30000999: - version "1.0.30001002" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001002.tgz#ba999a737b1abd5bf0fd47efe43a09b9cadbe9b0" - integrity sha512-pRuxPE8wdrWmVPKcDmJJiGBxr6lFJq4ivdSeo9FTmGj5Rb8NX3Mby2pARG57MXF15hYAhZ0nHV5XxT2ig4bz3g== - -caniuse-lite@^1.0.30001004: - version "1.0.30001004" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d879b73981b255488316da946c39327d8c00a586" - integrity sha512-3nfOR4O8Wa2RWoYfJkMtwRVOsK96TQ+eq57wd0iKaEWl8dwG4hKZ/g0MVBfCvysFvMLi9fQGR/DvozMdkEPl3g== - -caniuse-lite@^1.0.30001006: - version "1.0.30001006" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001006.tgz#5b6e8288792cfa275f007b2819a00ccad7112655" - integrity sha512-MXnUVX27aGs/QINz+QG1sWSLDr3P1A3Hq5EUWoIt0T7K24DuvMxZEnh3Y5aHlJW6Bz2aApJdSewdYLd8zQnUuw== - canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" @@ -2698,9 +2714,9 @@ chardet@^0.7.0: integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== "chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.2.2.tgz#a433973350021e09f2b853a2287781022c0dc935" - integrity sha512-bw3pm7kZ2Wa6+jQWYP/c7bAZy3i4GwiIiMO2EeRjrE48l8vBqC/WvFhSF0xyM8fQiPEGvwMY/5bqDG7sSEOuhg== + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -3037,11 +3053,9 @@ connect@^3.6.0: utils-merge "1.0.1" console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= - dependencies: - date-now "^0.1.4" + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" @@ -3209,22 +3223,22 @@ conventional-commits-parser@^2.1.7: trim-off-newlines "^1.0.0" conventional-commits-parser@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.5.tgz#df471d6cb3f6fecfd1356ac72e0b577dbdae0a9c" - integrity sha512-qVz9+5JwdJzsbt7JbJ6P7NOXBGt8CyLFJYSjKAuPSgO+5UGfcsbk9EMR+lI8Unlvx6qwIc2YDJlrGIfay2ehNA== + version "3.0.7" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.7.tgz#55b6cde6a2d0b4a7ab399392777d527134a8d05c" + integrity sha512-4mx/FRC92z0yIiXGyRVYQFhn0jWDwvxnj2UuLaUi3hJSG4Thall6GXA8YOPHQK2qvotciJandJIVmuSvLgDLbQ== dependencies: JSONStream "^1.0.4" - is-text-path "^2.0.0" - lodash "^4.2.1" + is-text-path "^1.0.1" + lodash "^4.17.15" meow "^4.0.0" split2 "^2.0.0" through2 "^3.0.0" trim-off-newlines "^1.0.0" -convert-source-map@^1.1.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== +convert-source-map@^1.1.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" @@ -3287,11 +3301,11 @@ copy-webpack-plugin@5.0.5: webpack-log "^2.0.0" core-js-compat@^3.1.1: - version "3.3.3" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.3.3.tgz#82642808cf484a35292b2f8e83ef9376884e760f" - integrity sha512-GNZkENsx5pMnS7Inwv7ZO/s3B68a9WU5kIjxqrD/tkNR8mtfXJRk8fAKRlbvWZSGPc59/TkiOBDYl5Cb65pTVA== + version "3.4.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.4.0.tgz#2a47c51d3dc026d290018cacd987495f68a47c75" + integrity sha512-pgQUcgT2+v9/yxHgMynYjNj7nmxLRXv3UC39rjCjDwpe63ev2rioQTju1PKLYUBbPCQQvZNWvQC8tBJd65q11g== dependencies: - browserslist "^4.7.1" + browserslist "^4.7.2" semver "^6.3.0" core-js@3.4.0: @@ -3447,9 +3461,9 @@ cssesc@^0.1.0: integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q= cssom@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.1.tgz#b24111d236b6dbd00cdfacb5ab67a20473381fe3" - integrity sha512-6Aajq0XmukE7HdXUU6IoSWuH1H6gH9z6qmagsstTiN7cW2FNTsb+J2Chs+ufPgZCsV/yo8oaEudQLrb9dGxSVQ== + version "0.4.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.2.tgz#e2abd06e1267a7f2e5eccd7770c9ebe1bd88648b" + integrity sha512-fVXFVBr7JPDcgqa92UNr6HIpeMypyG/XVloB+512KH43Z2aum8ZNVzRapWR4mZ/f2UlRMymIoDO3aFJmQ6Y3RA== cssom@~0.3.6: version "0.3.8" @@ -3523,11 +3537,6 @@ date-format@^2.0.0: resolved "https://registry.yarnpkg.com/date-format/-/date-format-2.1.0.tgz#31d5b5ea211cf5fd764cd38baf9d033df7e125cf" integrity sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA== -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= - dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -3641,9 +3650,9 @@ defaults@^1.0.3: clone "^1.0.2" defer-to-connect@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" - integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw== + version "1.1.0" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.0.tgz#b41bd7efa8508cef13f8456975f7a278c72833fd" + integrity sha512-WE2sZoctWm/v4smfCAdjYbrfS55JiMRdlY9ZubFhsYbteCK9+BvAx4YV7nPjYM6ZnX5BcoVKwfmyx9sIFTgQMQ== deferred-leveldown@~5.3.0: version "5.3.0" @@ -3912,15 +3921,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.284: - version "1.3.293" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.293.tgz#e52a30026b89276e211be36083a4d7136fd480ea" - integrity sha512-DQSBRuU2Z1vG+CEWUIfCEVMHtuaGlhVojzg39mX5dx7PLSFDJ7DSrGUWzaPFFgWR1jo26hj1nXXRQZvFwk7F8w== - electron-to-chromium@^1.3.295: - version "1.3.295" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.295.tgz#4727eabfa2642f9b21c43ec17d794c004724657b" - integrity sha512-KxlGE9GcZTv7xGwYJGMEABHJq2JuTMNF7jD8NwHk6sBY226mW+Dyp9kZmA2Od9tKHMCS7ltPnqFg+zq3jTWN7Q== + version "1.3.306" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.306.tgz#e8265301d053d5f74e36cb876486830261fbe946" + integrity sha512-frDqXvrIROoYvikSKTIKbHbzO6M3/qC6kCIt/1FOa9kALe++c4VAJnwjSFvf1tYLEUsP2n9XZ4XSCyqc3l7A/A== elliptic@^6.0.0: version "6.5.1" @@ -4074,9 +4078,9 @@ es-abstract@^1.5.1: string.prototype.trimright "^2.1.0" es-to-primitive@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== dependencies: is-callable "^1.1.4" is-date-object "^1.0.1" @@ -4366,7 +4370,7 @@ fast-json-stable-stringify@2.0.0, fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-levenshtein@~2.0.4: +fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -4455,7 +4459,7 @@ finalhandler@1.1.2, finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@3.1.0: +find-cache-dir@3.1.0, find-cache-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.1.0.tgz#9935894999debef4cf9f677fdf646d002c4cdecb" integrity sha512-zw+EFiNBNPgI2NTrKkDd1xd7q0cs6wr/iWnr/oUkI0yF9K9GqQ+riIt4aiyFaaqpaWbxPrJXHI+QvmNUQbX+0Q== @@ -4473,15 +4477,6 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.0.0.tgz#cd4b7dd97b7185b7e17dbfe2d6e4115ee3eeb8fc" - integrity sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.0" - pkg-dir "^4.1.0" - find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" @@ -4671,9 +4666,9 @@ fsevents@^1.2.7: node-pre-gyp "^0.12.0" fsevents@~2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.1.tgz#74c64e21df71721845d0c44fe54b7f56b82995a9" - integrity sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw== + version "2.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" + integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== function-bind@^1.1.1: version "1.1.1" @@ -4835,7 +4830,7 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.5, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: +glob@7.1.5: version "7.1.5" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" integrity sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ== @@ -4858,6 +4853,18 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -4928,9 +4935,9 @@ got@^9.5.0, got@^9.6.0: url-parse-lax "^3.0.0" graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" - integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== handle-thing@^2.0.0: version "2.0.0" @@ -4949,9 +4956,9 @@ handlebars@4.3.1: uglify-js "^3.1.4" handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.1.2: - version "4.4.5" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.5.tgz#1b1f94f9bfe7379adda86a8b73fb570265a0dddd" - integrity sha512-0Ce31oWVB7YidkaTq33ZxEbN+UDxMMgThvCe8ptgQViymL5DPis9uLdTA13MiRPhgvqyxIegugrP97iK3JeBHg== + version "4.5.1" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.1.tgz#8a01c382c180272260d07f2d1aa3ae745715c7ba" + integrity sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -5209,23 +5216,28 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +http-status-codes@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/http-status-codes/-/http-status-codes-1.3.2.tgz#181dfa4455ef454e5e4d827718fca3936680d10d" + integrity sha512-nDUtj0ltIt08tGi2VWSpSzNNFye0v3YSe9lX3lIqLTuVvvRiYCvs4QQBSHo0eomFYw1wlUuofurUAlTm+vHnXg== + https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.3.tgz#fb6cd98ed5b9c35056b5a73cd01a8a721d7193d1" - integrity sha512-Ytgnz23gm2DVftnzqRRz2dOXZbGd2uiajSw/95bPp6v53zPRspQjLm/AfBgqbJ2qfeRXWIOMVLpp86+/5yX39Q== + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== dependencies: agent-base "^4.3.0" debug "^3.1.0" https-proxy-agent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.0.tgz#0106efa5d63d6d6f3ab87c999fa4877a3fd1ff97" - integrity sha512-y4jAxNEihqvBI5F3SaO2rtsjIOnnNA8sEbuiP+UhJZJHeM2NRm6c09ax2tgqme+SgUUvjao2fJXF4h3D6Cb2HQ== + version "3.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.1.tgz#b8c286433e87602311b01c8ea34413d856a4af81" + integrity sha512-+ML2Rbh6DAuee7d07tYGEKOEi2voWPUGan+ExdPbPW6Z3svq+JCqr0v8WmKPOkz1vOVykPCBSuobe7G8GJUtVg== dependencies: agent-base "^4.3.0" debug "^3.1.0" @@ -5446,7 +5458,7 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ip@^1.1.0, ip@^1.1.5: +ip@1.1.5, ip@^1.1.0, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -5744,20 +5756,13 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.0" -is-text-path@^1.0.0: +is-text-path@^1.0.0, is-text-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= dependencies: text-extensions "^1.0.0" -is-text-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-2.0.0.tgz#b2484e2b720a633feb2e85b67dc193ff72c75636" - integrity sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw== - dependencies: - text-extensions "^2.0.0" - is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -6402,14 +6407,6 @@ less-loader@5.0.0: loader-utils "^1.1.0" pify "^4.0.1" -less-plugin-npm-import@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/less-plugin-npm-import/-/less-plugin-npm-import-2.1.0.tgz#823e6986c93318a98171ca858848b6bead55bf3e" - integrity sha1-gj5phskzGKmBccqFiEi2vq1Vvz4= - dependencies: - promise "~7.0.1" - resolve "~1.1.6" - less@3.10.3, less@^3.10.3: version "3.10.3" resolved "https://registry.yarnpkg.com/less/-/less-3.10.3.tgz#417a0975d5eeecc52cff4bcfa3c09d35781e6792" @@ -6489,9 +6486,9 @@ level@5.0.1: opencollective-postinstall "^2.0.0" leveldown@^5.0.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.4.0.tgz#fd6731af2c7fd717c878eb05c87c12036e986e93" - integrity sha512-uKwfJT+jgXL3mdb3UR/bOaO13VX85R7yGaunK+WJNuGWSoxskp3JgYwFCKfPruulx/bVn2xI7XmyNHVQkVC/Ig== + version "5.4.1" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.4.1.tgz#83a8fdd9bb52b1ed69be2ef59822b6cdfcdb51ec" + integrity sha512-3lMPc7eU3yj5g+qF1qlALInzIYnkySIosR1AsUKFjL9D8fYbTLuENBAeDRZXIG4qeWOAyqRItOoLu2v2avWiMA== dependencies: abstract-leveldown "~6.2.1" napi-macros "~2.0.0" @@ -6612,9 +6609,9 @@ locate-path@^5.0.0: p-locate "^4.1.0" lockfile-lint-api@^2.0.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/lockfile-lint-api/-/lockfile-lint-api-2.1.4.tgz#42e5378c2ffdb40412555b30315694bd9080a3ff" - integrity sha512-pWTr8u8b1XPpx03GZt2wpd4ZFAnC4qcWqa7gmfKgnal1m/V94RF0KGhLlw2GAMyWblhFGiycJfoli+XrzWvDqg== + version "2.3.0" + resolved "https://registry.yarnpkg.com/lockfile-lint-api/-/lockfile-lint-api-2.3.0.tgz#c200de37f07bee35eca2a52a8e560f013c87910c" + integrity sha512-4jp8ULItLgsaPgPjxm/nuupIiBbxWf/nA05gRGMtvJQxGoSOOYA1LxSunY5p1b4kw7u6ZW5TZNgcIs4cFvp9lw== dependencies: "@yarnpkg/lockfile" "^1.1.0" debug "^4.1.0" @@ -6735,9 +6732,9 @@ log4js@^4.0.0: streamroller "^1.0.6" loglevel@^1.6.4: - version "1.6.4" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.4.tgz#f408f4f006db8354d0577dcf6d33485b3cb90d56" - integrity sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g== + version "1.6.6" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.6.tgz#0ee6300cc058db6b3551fa1c4bf73b83bb771312" + integrity sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ== long@^4.0.0: version "4.0.0" @@ -7163,14 +7160,7 @@ minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minipass@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.0.1.tgz#b4fec73bd61e8a40f0b374ddd04260ade2c8ec20" - integrity sha512-2y5okJ4uBsjoD2vAbLKL9EUQPPkC0YMIp+2mZOXG3nBba++pdfJWRxx2Ewirc0pwAJYu4XtWg2EkVo1nRXuO/w== - dependencies: - yallist "^4.0.0" - -minipass@^3.0.1, minipass@^3.1.0, minipass@^3.1.1: +minipass@^3.0.0, minipass@^3.0.1, minipass@^3.1.0, minipass@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" integrity sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w== @@ -7344,9 +7334,9 @@ neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== ng-packagr@~9.0.0-rc.0: - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-9.0.0-rc.0.tgz#7007ebd442f4ea5a435259f9b8b2d8b5455f7edd" - integrity sha512-Oau3uhOVUB05mpCPlcXwzYkR+4SqXEqzu3IS7CKBs0Alk333kBQljacVKHeFjssD7eQKCFT07IljPKwJS2a7YQ== + version "9.0.0-rc.1" + resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-9.0.0-rc.1.tgz#fc9bd8b4d6c7be11083b34325c29cddc6d324224" + integrity sha512-tP7WyuU99aDEWIXFCwqeqJzedMdtu79PR9RD9zzZJ2Wyu7/Yv81V740T0vAa+Tt1w1K5Ax1CwIQhIqSV+xZ5Yg== dependencies: ajv "^6.10.2" autoprefixer "^9.6.5" @@ -7359,13 +7349,12 @@ ng-packagr@~9.0.0-rc.0: glob "^7.1.2" injection-js "^2.2.1" less "^3.10.3" - less-plugin-npm-import "^2.1.0" node-sass-tilde-importer "^1.0.0" postcss "^7.0.18" postcss-url "^8.0.0" read-pkg-up "^5.0.0" rimraf "^3.0.0" - rollup "^1.24.0" + rollup "1.25.2" rollup-plugin-commonjs "^10.1.0" rollup-plugin-json "^4.0.0" rollup-plugin-node-resolve "^5.2.0" @@ -7441,10 +7430,10 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.36, node-releases@^1.1.38: - version "1.1.38" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.38.tgz#d81b365df2936654ba37f509ba2fbe91eff2578b" - integrity sha512-/5NZAaOyTj134Oy5Cp/J8mso8OD/D9CSuL+6TOXXsTKO8yjc5e4up75SRPCganCjwFKMj2jbp5tR0dViVdox7g== +node-releases@^1.1.38: + version "1.1.39" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.39.tgz#c1011f30343aff5b633153b10ff691d278d08e8d" + integrity sha512-8MRC/ErwNCHOlAFycy9OPca46fQYUjbJRDcZTHVWIGXIjYLM73k70vv3WkYutVnM4cCo4hE0MqBVVZjP6vjISA== dependencies: semver "^6.3.0" @@ -7510,7 +7499,7 @@ npm-bundled@^1.0.1: resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== -npm-package-arg@7.0.0: +npm-package-arg@7.0.0, npm-package-arg@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-7.0.0.tgz#52cdf08b491c0c59df687c4c925a89102ef794a5" integrity sha512-xXxr8y5U0kl8dVkz2oK7yZjPBvqM2fwaO5l3Yg13p03v8+E3qQcD0JNhHzjL1vyGgxcKkD0cco+NLR72iuPk3g== @@ -7520,7 +7509,7 @@ npm-package-arg@7.0.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" -"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: +"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0: version "6.1.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== @@ -7567,9 +7556,9 @@ npm-registry-client@8.6.0: npmlog "2 || ^3.1.0 || ^4.0.0" npm-registry-fetch@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-5.0.0.tgz#43aaadbb4c5e838272203c07ae8ad4a8933bcbdc" - integrity sha512-V28E+QOueq6yhytshlSa+1fJn5ofZcMI8o9WyA5Zdg3QR+QD/dZbBUAepBOOOBDYvmsP/QpB8cjFOFO44aDXFw== + version "5.0.1" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-5.0.1.tgz#98f59f2ac83440baf7a4fbe800972cfe37c9334d" + integrity sha512-GK7SUx188KSkPvbceOGO59L3FGHLBYoP0YEhUAKYjAypL15v5xmoempZ9rIJS2R/1eOS0KS1Y9AQe79YfgNxaw== dependencies: bluebird "^3.5.1" figgy-pudding "^3.4.1" @@ -7579,7 +7568,7 @@ npm-registry-fetch@^5.0.0: minipass-fetch "^1.1.2" minipass-json-stream "^1.0.1" minizlib "^2.0.0" - npm-package-arg "^6.1.0" + npm-package-arg "^7.0.0" safe-buffer "^5.2.0" npm-run-path@^2.0.0: @@ -7615,9 +7604,9 @@ number-is-nan@^1.0.0: integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= nwsapi@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.1.4.tgz#e006a878db23636f8e8a67d33ca0e4edf61a842f" - integrity sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw== + version "2.2.0" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" + integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== oauth-sign@~0.8.2: version "0.8.2" @@ -7649,9 +7638,9 @@ object-copy@^0.1.0: kind-of "^3.0.3" object-inspect@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" - integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== object-inspect@~1.4.0: version "1.4.1" @@ -7759,16 +7748,16 @@ optimist@^0.6.1, optimist@~0.6.0: wordwrap "~0.0.2" optionator@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: deep-is "~0.1.3" - fast-levenshtein "~2.0.4" + fast-levenshtein "~2.0.6" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" - wordwrap "~1.0.0" + word-wrap "~1.2.3" ora@4.0.2, ora@^4.0.2: version "4.0.2" @@ -8022,12 +8011,12 @@ parse5@4.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== -parse5@5.1.0, parse5@^5.0.0: +parse5@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== -parse5@^5.1.1: +parse5@^5.0.0, parse5@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== @@ -8146,9 +8135,9 @@ performance-now@^2.1.0: integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= picomatch@^2.0.4: - version "2.0.7" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6" - integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA== + version "2.1.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.1.1.tgz#ecdfbea7704adb5fe6fb47f9866c4c0e15e905c5" + integrity sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA== pidtree@0.3.0, pidtree@^0.3.0: version "0.3.0" @@ -8293,7 +8282,7 @@ postcss-value-parser@^4.0.2: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== -postcss@7.0.21, postcss@^7.0.21: +postcss@7.0.21, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21: version "7.0.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" integrity sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ== @@ -8302,15 +8291,6 @@ postcss@7.0.21, postcss@^7.0.21: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.18, postcss@^7.0.2: - version "7.0.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" - integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -8327,9 +8307,9 @@ prepend-http@^2.0.0: integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= prettier@^1.16.4: - version "1.18.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" - integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== private@^0.1.6: version "0.1.8" @@ -8371,13 +8351,6 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -promise@~7.0.1: - version "7.0.4" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.0.4.tgz#363e84a4c36c8356b890fed62c91ce85d02ed539" - integrity sha1-Nj6EpMNsg1a4kP7WLJHOhdAu1Tk= - dependencies: - asap "~2.0.3" - protobufjs@6.8.8: version "6.8.8" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c" @@ -8566,9 +8539,9 @@ quick-lru@^1.0.0: integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= quicktype-core@^6.0.15: - version "6.0.51" - resolved "https://registry.yarnpkg.com/quicktype-core/-/quicktype-core-6.0.51.tgz#733c4b253a27398fef70faaf9c2c916f26aea01e" - integrity sha512-qyXZ++kyQZBpA72GSEG5gN0eHCMXXCL/K3ZxO5J3iJI5RmbCuuhMsfTO+uis1UFXfBoP71I6+Zq2+K7H14/W1Q== + version "6.0.52" + resolved "https://registry.yarnpkg.com/quicktype-core/-/quicktype-core-6.0.52.tgz#d646473fd4116ca627c08ace71ed2501437230f4" + integrity sha512-SGYbekWPukIumxpIRAaSq0t12VH3uCl0OHnzFSXFu+cfW5ibo2Z9FktX5lhX291eYs/LXRe2vneZ49i2Z2Qm5Q== dependencies: "@mark.probst/unicode-properties" "~1.1.0" "@types/urijs" "^1.19.1" @@ -8943,19 +8916,19 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request-promise-core@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.2.tgz#339f6aababcafdb31c799ff158700336301d3346" - integrity sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag== +request-promise-core@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9" + integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ== dependencies: - lodash "^4.17.11" + lodash "^4.17.15" request-promise-native@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.7.tgz#a49868a624bdea5069f1251d0a836e0d89aa2c59" - integrity sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w== + version "1.0.8" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36" + integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ== dependencies: - request-promise-core "1.1.2" + request-promise-core "1.1.3" stealthy-require "^1.1.1" tough-cookie "^2.3.3" @@ -9060,11 +9033,6 @@ resolve@^1.1.5, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11. dependencies: path-parse "^1.0.6" -resolve@~1.1.6: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -9180,19 +9148,19 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@1.26.5: - version "1.26.5" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.26.5.tgz#c492c8bb88b661e7952a864e40bdec209aa1aa03" - integrity sha512-c6Pv0yWzjYNpy2DIhLFUnyP6e1UTGownr4IfpJcPY/k186RJjpaGGPRwKQ62KCauctG6dgtHt88pw1EGrPRkuA== +rollup@1.25.2: + version "1.25.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d" + integrity sha512-+7z6Wab/L45QCPcfpuTZKwKiB0tynj05s/+s2U3F2Bi7rOLPr9UcjUwO7/xpjlPNXA/hwnth6jBExFRGyf3tMg== dependencies: "@types/estree" "*" "@types/node" "*" acorn "^7.1.0" -rollup@^1.24.0: - version "1.25.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d" - integrity sha512-+7z6Wab/L45QCPcfpuTZKwKiB0tynj05s/+s2U3F2Bi7rOLPr9UcjUwO7/xpjlPNXA/hwnth6jBExFRGyf3tMg== +rollup@1.26.5: + version "1.26.5" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.26.5.tgz#c492c8bb88b661e7952a864e40bdec209aa1aa03" + integrity sha512-c6Pv0yWzjYNpy2DIhLFUnyP6e1UTGownr4IfpJcPY/k186RJjpaGGPRwKQ62KCauctG6dgtHt88pw1EGrPRkuA== dependencies: "@types/estree" "*" "@types/node" "*" @@ -9262,20 +9230,13 @@ sass-loader@8.0.0: schema-utils "^2.1.0" semver "^6.3.0" -sass@1.23.3: +sass@1.23.3, sass@^1.23.0: version "1.23.3" resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.3.tgz#f07503b9e8d2bcf06ef69e8beea5d085589b1620" integrity sha512-1DKRZxJMOh4Bme16AbWTyYeJAjTlrvw2+fWshHHaepeJfGq2soFZTnt0YhWit+bohtDu4LdyPoEj6VFD4APHog== dependencies: chokidar ">=2.0.0 <4.0.0" -sass@^1.23.0: - version "1.23.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.23.1.tgz#0e5b72ba2bd9f0229a637d33f8dd5bf2d810beb3" - integrity sha512-zQzJ3UETUWOMd/pJJGH/zvRsBVO97m11RcpfUhcQUHEXf0yHUBgOIE/Nw8aK0m1XyVJPeq228iIK7gVxsJ/Puw== - dependencies: - chokidar ">=2.0.0 <4.0.0" - sauce-connect-launcher@^1.2.4: version "1.3.1" resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.3.1.tgz#31137f57b0f7176e1c0525b7fb09c6da746647cf" @@ -9289,6 +9250,7 @@ sauce-connect-launcher@^1.2.4: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" + uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: @@ -9551,10 +9513,10 @@ slide@^1.1.3, slide@~1.1.3: resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= -smart-buffer@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" - integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== +smart-buffer@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" + integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== snapdragon-node@^2.0.1: version "2.1.1" @@ -9661,12 +9623,12 @@ socks-proxy-agent@^4.0.0: socks "~2.3.2" socks@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.2.tgz#ade388e9e6d87fdb11649c15746c578922a5883e" - integrity sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ== + version "2.3.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" + integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== dependencies: - ip "^1.1.5" - smart-buffer "4.0.2" + ip "1.1.5" + smart-buffer "^4.1.0" sort-keys@^1.0.0: version "1.1.2" @@ -9699,7 +9661,7 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@0.5.16: +source-map-support@0.5.16, source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.5, source-map-support@~0.5.12: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== @@ -9715,14 +9677,6 @@ source-map-support@0.5.9: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@^0.5.0, source-map-support@^0.5.3, source-map-support@^0.5.5, source-map-support@~0.5.12: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-support@~0.4.0: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" @@ -9924,15 +9878,7 @@ ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" -ssri@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.0.1.tgz#b0cab7bbb11ac9ea07f003453e2011f8cbed9f34" - integrity sha512-FfndBvkXL9AHyGLNzU3r9AvYIBBZ7gm+m+kd0p8cT3/v4OliMAyipZAhLVEv1Zi/k4QFq9CstRGVd9pW/zcHFQ== - dependencies: - figgy-pudding "^3.5.1" - minipass "^3.0.0" - -ssri@^7.0.1, ssri@^7.1.0: +ssri@^7.0.0, ssri@^7.0.1, ssri@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.1.0.tgz#92c241bf6de82365b5c7fb4bd76e975522e1294d" integrity sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g== @@ -10070,13 +10016,13 @@ string-width@^3.0.0, string-width@^3.1.0: strip-ansi "^5.1.0" string-width@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.1.0.tgz#ba846d1daa97c3c596155308063e075ed1c99aff" - integrity sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ== + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^5.2.0" + strip-ansi "^6.0.0" string.prototype.trimleft@^2.1.0: version "2.1.0" @@ -10129,6 +10075,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -10261,9 +10214,9 @@ tar@^5.0.5: yallist "^4.0.0" temp@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.0.tgz#61391795a11bd9738d4c4d7f55f012cb8f55edaa" - integrity sha512-YfUhPQCJoNQE5N+FJQcdPz63O3x3sdT4Xju69Gj4iZe0lBKOtnAMi0SLj9xKhGkcGhsxThvTJ/usxtFPo438zQ== + version "0.9.1" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.9.1.tgz#2d666114fafa26966cd4065996d7ceedd4dd4697" + integrity sha512-WMuOgiua1xb5R56lE0eH6ivpVmg/lq2OHm4+LtT/xtEtPQ+sz6N3bBM6WZ5FvO1lO4IKIOb43qnhoc4qxP5OeA== dependencies: rimraf "~2.6.2" @@ -10303,7 +10256,7 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.9, terser@^4.1.2, terser@^4.3.8, terser@^4.3.9: +terser@4.3.9: version "4.3.9" resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.9.tgz#e4be37f80553d02645668727777687dad26bbca8" integrity sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA== @@ -10312,6 +10265,15 @@ terser@4.3.9, terser@^4.1.2, terser@^4.3.8, terser@^4.3.9: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^4.1.2, terser@^4.3.8, terser@^4.3.9: + version "4.4.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.4.0.tgz#22c46b4817cf4c9565434bfe6ad47336af259ac3" + integrity sha512-oDG16n2WKm27JO8h4y/w3iqBGAOSCtq7k8dRmrn4Wf9NouL0b2WpMHGChFGZq4nFAQy1FsNJrVQHfurXOSTmOA== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + test-exclude@^5.2.2: version "5.2.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" @@ -10327,11 +10289,6 @@ text-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== -text-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-2.0.0.tgz#43eabd1b495482fae4a2bf65e5f56c29f69220f6" - integrity sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ== - through2@^2.0.0, through2@^2.0.2, through2@^2.0.3, through2@~2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -10555,9 +10512,9 @@ tslint-sonarts@1.9.0: immutable "^3.8.2" tslint@^5.15.0: - version "5.20.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.0.tgz#fac93bfa79568a5a24e7be9cdde5e02b02d00ec1" - integrity sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g== + version "5.20.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d" + integrity sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg== dependencies: "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" @@ -10652,9 +10609,9 @@ typescript@3.6.4: integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg== uglify-js@^3.1.4: - version "3.6.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.4.tgz#88cc880c6ed5cf9868fdfa0760654e7bed463f1d" - integrity sha512-9Yc2i881pF4BPGhjteCXQNaXx1DCwm3dtOyBaG2hitHjLWOczw/ki8vD1bqyT3u6K0Ms/FpCShkmfg+FtlOfYA== + version "3.6.8" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.8.tgz#5edcbcf9d49cbb0403dc49f856fe81530d65145e" + integrity sha512-XhHJ3S3ZyMwP8kY1Gkugqx3CJh2C3O0y8NPiSxtm1tyD/pktLAkFZsFGpuNfTZddKDQ/bbDBLAd2YyA1pbi8HQ== dependencies: commander "~2.20.3" source-map "~0.6.1" @@ -11001,9 +10958,9 @@ vlq@^0.2.2: integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== vm-browserify@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019" - integrity sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw== + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== void-elements@^2.0.0: version "2.0.1" @@ -11261,7 +11218,12 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" -wordwrap@^1.0.0, wordwrap@~1.0.0: +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= From 4bf175ca3a7cc201baf74c654ddd2a6cf484b25e Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Mon, 4 Nov 2019 08:40:54 +0100 Subject: [PATCH 0490/1070] feat(@angular-devkit/build-angular): support TSLint 6.0+ TSLint [6.0.0-beta0](https://github.com/palantir/tslint/releases/tag/6.0.0-beta0) was released, and `ng lint` throws with: TSLint must be version 5.5 or higher. if we try to use it in a CLI project. It looks like the current version check allows v5.5+ by checking that both the major and minor versions are > 5. So this fails with 6.0 (but would succeed with 6.5). This fixes the check to allow using v6.0. --- packages/angular_devkit/build_angular/src/tslint/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/tslint/index.ts b/packages/angular_devkit/build_angular/src/tslint/index.ts index 434af39f5e6a..0801bb0c514a 100644 --- a/packages/angular_devkit/build_angular/src/tslint/index.ts +++ b/packages/angular_devkit/build_angular/src/tslint/index.ts @@ -31,7 +31,11 @@ async function _loadTslint() { } const version = tslint.Linter.VERSION && tslint.Linter.VERSION.split('.'); - if (!version || version.length < 2 || Number(version[0]) < 5 || Number(version[1]) < 5) { + if ( + !version || version.length < 2 + || (Number(version[0]) === 5 && Number(version[1]) < 5) // 5.5+ + || Number(version[0]) < 5 // 6.0+ + ) { throw new Error('TSLint must be version 5.5 or higher.'); } From 208a7008b058661ce95db86a88be19dc0f07c1cb Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Thu, 7 Nov 2019 14:08:34 -0800 Subject: [PATCH 0491/1070] fix(@angular/cli): Prints out when a commit is made in `ng update`. Fixes #16060. Any time a `git commit` is made, the CLI now prints out the hash and short message. For migrations, the message is simply the first line of the commit. For schematics, the commit message isn't all that helpful, so I used the list of packages instead. --- packages/angular/cli/commands/update-impl.ts | 131 ++++++++++++++---- .../legacy-cli/e2e/tests/update/update-1.0.ts | 3 +- .../e2e/tests/update/update-1.7-longhand.ts | 3 +- .../legacy-cli/e2e/tests/update/update-1.7.ts | 3 +- 4 files changed, 109 insertions(+), 31 deletions(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index f15e8f0fc430..7f78982ab85b 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -139,6 +139,9 @@ export class UpdateCommand extends Command { } } + /** + * @return Whether or not the migrations were performed successfully. + */ private async executeMigrations( packageName: string, collectionPath: string, @@ -183,17 +186,22 @@ export class UpdateCommand extends Command { return false; } + this.logger.info(colors.green(`${colors.symbols.check} Migration succeeded.`)); + // Commit migration if (commit) { - let message = `${packageName} migration - ${migration.name}`; - if (migration.description) { - message += '\n' + migration.description; + const commitPrefix = `${packageName} migration - ${migration.name}`; + const commitMessage = migration.description + ? `${commitPrefix}\n${migration.description}` + : commitPrefix; + const committed = this.commit(commitMessage); + if (!committed) { + // Failed to commit, something went wrong. Abort the update. + return false; } - // TODO: Use result.files once package install tasks are accounted - this.createCommit(message, []); } - this.logger.info(colors.green(`${colors.symbols.check} Migration succeeded.\n`)); + this.logger.info(''); // Extra trailing newline. } return true; @@ -556,7 +564,11 @@ export class UpdateCommand extends Command { }); if (success && options.createCommits) { - this.createCommit('Angular CLI update\n' + packagesToUpdate.join('\n'), []); + const committed = this.commit( + `Angular CLI update for packages - ${packagesToUpdate.join(', ')}`); + if (!committed) { + return 1; + } } // This is a temporary workaround to allow data to be passed back from the update schematic @@ -590,6 +602,52 @@ export class UpdateCommand extends Command { return success ? 0 : 1; } + /** + * @return Whether or not the commit was successful. + */ + private commit(message: string): boolean { + // Check if a commit is needed. + let commitNeeded: boolean; + try { + commitNeeded = hasChangesToCommit(); + } catch (err) { + this.logger.error(` Failed to read Git tree:\n${err.stderr}`); + + return false; + } + + if (!commitNeeded) { + this.logger.info(' No changes to commit after migration.'); + + return true; + } + + // Commit changes and abort on error. + try { + createCommit(message); + } catch (err) { + this.logger.error( + `Failed to commit update (${message}):\n${err.stderr}`); + + return false; + } + + // Notify user of the commit. + const hash = findCurrentGitSha(); + const shortMessage = message.split('\n')[0]; + if (hash) { + this.logger.info(` Committed migration step (${getShortHash(hash)}): ${ + shortMessage}.`); + } else { + // Commit was successful, but reading the hash was not. Something weird happened, + // but nothing that would stop the update. Just log the weirdness and continue. + this.logger.info(` Committed migration step: ${shortMessage}.`); + this.logger.warn(' Failed to look up hash of most recent commit, continuing anyways.'); + } + + return true; + } + private checkCleanGit(): boolean { try { const topLevel = execSync('git rev-parse --show-toplevel', { encoding: 'utf8', stdio: 'pipe' }); @@ -614,24 +672,6 @@ export class UpdateCommand extends Command { return true; } - private createCommit(message: string, files: string[]) { - try { - execSync('git add -A ' + files.join(' '), { encoding: 'utf8', stdio: 'pipe' }); - - execSync(`git commit --no-verify -m "${message}"`, { encoding: 'utf8', stdio: 'pipe' }); - } catch (error) {} - } - - private findCurrentGitSha(): string | null { - try { - const result = execSync('git rev-parse HEAD', { encoding: 'utf8', stdio: 'pipe' }); - - return result.trim(); - } catch { - return null; - } - } - /** * Checks if the current installed CLI version is older than the latest version. * @returns `true` when the installed version is older. @@ -652,6 +692,47 @@ export class UpdateCommand extends Command { } } +/** + * @return Whether or not the working directory has Git changes to commit. + */ +function hasChangesToCommit(): boolean { + // List all modified files not covered by .gitignore. + const files = execSync('git ls-files -m -d -o --exclude-standard').toString(); + + // If any files are returned, then there must be something to commit. + return files !== ''; +} + +/** + * Precondition: Must have pending changes to commit, they do not need to be staged. + * Postcondition: The Git working tree is committed and the repo is clean. + * @param message The commit message to use. + */ +function createCommit(message: string) { + // Stage entire working tree for commit. + execSync('git add -A', { encoding: 'utf8', stdio: 'pipe' }); + + // Commit with the message passed via stdin to avoid bash escaping issues. + execSync('git commit --no-verify -F -', { encoding: 'utf8', stdio: 'pipe', input: message }); +} + +/** + * @return The Git SHA hash of the HEAD commit. Returns null if unable to retrieve the hash. + */ +function findCurrentGitSha(): string | null { + try { + const hash = execSync('git rev-parse HEAD', {encoding: 'utf8', stdio: 'pipe'}); + + return hash.trim(); + } catch { + return null; + } +} + +function getShortHash(commitHash: string): string { + return commitHash.slice(0, 9); +} + function coerceVersionNumber(version: string | undefined): string | null { if (!version) { return null; diff --git a/tests/legacy-cli/e2e/tests/update/update-1.0.ts b/tests/legacy-cli/e2e/tests/update/update-1.0.ts index 4ce2ea66134a..6d24c8ffeb4d 100644 --- a/tests/legacy-cli/e2e/tests/update/update-1.0.ts +++ b/tests/legacy-cli/e2e/tests/update/update-1.0.ts @@ -10,8 +10,7 @@ export default async function() { await useCIChrome('.'); await expectToFail(() => ng('build')); - // Turn off git commits ('-C') per migration to avoid breaking E2E cleanup process - await ng('update', '@angular/cli', '-C'); + await ng('update', '@angular/cli'); await useBuiltPackages(); await silentNpm('install'); await ng('update', '@angular/core', ...extraUpdateArgs); diff --git a/tests/legacy-cli/e2e/tests/update/update-1.7-longhand.ts b/tests/legacy-cli/e2e/tests/update/update-1.7-longhand.ts index 378fdf0cbbc6..adec63d719ac 100644 --- a/tests/legacy-cli/e2e/tests/update/update-1.7-longhand.ts +++ b/tests/legacy-cli/e2e/tests/update/update-1.7-longhand.ts @@ -9,8 +9,7 @@ export default async function() { await createProjectFromAsset('1.7-project'); await expectToFail(() => ng('build')); - // Turn off git commits ('-C') per migration to avoid breaking E2E cleanup process - await ng('update', '@angular/cli', '--migrate-only', '--from=1.7.1', '-C'); + await ng('update', '@angular/cli', '--migrate-only', '--from=1.7.1'); await useBuiltPackages(); await silentNpm('install'); await ng('update', '@angular/core', ...extraUpdateArgs); diff --git a/tests/legacy-cli/e2e/tests/update/update-1.7.ts b/tests/legacy-cli/e2e/tests/update/update-1.7.ts index da7724197239..335368638446 100644 --- a/tests/legacy-cli/e2e/tests/update/update-1.7.ts +++ b/tests/legacy-cli/e2e/tests/update/update-1.7.ts @@ -12,8 +12,7 @@ export default async function() { await useCIChrome('.'); await expectToFail(() => ng('build')); - // Turn off git commits ('-C') per migration to avoid breaking E2E cleanup process - await ng('update', '@angular/cli', '-C'); + await ng('update', '@angular/cli'); await useBuiltPackages(); await silentNpm('install'); await ng('update', '@angular/core', ...extraUpdateArgs); From 150d0f6d6ed2ee3cabbcce58fd835bddca697ad9 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 11 Nov 2019 17:15:45 +0000 Subject: [PATCH 0492/1070] build: update npm-pick-manifest to version 4.0.0 --- packages/angular/cli/package.json | 2 +- yarn.lock | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 7ed6559600ab..7feb3898bf97 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -36,7 +36,7 @@ "ini": "1.3.5", "inquirer": "7.0.0", "npm-package-arg": "7.0.0", - "npm-pick-manifest": "3.0.2", + "npm-pick-manifest": "4.0.0", "open": "7.0.0", "pacote": "10.1.1", "read-package-tree": "5.3.1", diff --git a/yarn.lock b/yarn.lock index 1afa94f750e9..949313ea16cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7527,7 +7527,16 @@ npm-packlist@^1.1.6, npm-packlist@^1.4.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-pick-manifest@3.0.2, npm-pick-manifest@^3.0.2: +npm-pick-manifest@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-4.0.0.tgz#5e1b392a2a6310378b9bab32332597030ca073ce" + integrity sha512-SsYReLe/16UgSL6GKX6GO4o3RVBthVy1uuHq6kZ9mkPeQXpOHbrLZoV13i8fr3LQtET+pLPSfD13e4RIYfkX5Q== + dependencies: + figgy-pudding "^3.5.1" + npm-package-arg "^7.0.0" + semver "^5.4.1" + +npm-pick-manifest@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== From 08c3959ee44efda589b7d63674a290a06ab81a8a Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 11 Nov 2019 09:53:17 +0100 Subject: [PATCH 0493/1070] fix(@angular/cli): remove no-bin-links during npm/yarn install Previously we passed `--no-bin-links` because we used to install packages globally in some cases. But now this is no longer needed as we should now have permissions to generate "local" bin links even during a temp installations as these will no longer generate bin links in the global context. Fixes #16133 --- packages/angular/cli/tasks/install-package.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index f4b9121b8756..e3a65c64a1c9 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -21,7 +21,6 @@ interface PackageManagerOptions { saveDev: string; install: string; prefix: string; - noBinLinks: string; noLockfile: string; } @@ -39,7 +38,6 @@ export function installPackage( packageManagerArgs.install, packageName, packageManagerArgs.silent, - packageManagerArgs.noBinLinks, ]; logger.info(colors.green(`Installing packages for tooling via ${packageManager}.`)); @@ -153,7 +151,6 @@ function getPackageManagerArguments(packageManager: PackageManager): PackageMana saveDev: '--dev', install: 'add', prefix: '--modules-folder', - noBinLinks: '--no-bin-links', noLockfile: '--no-lockfile', } : { @@ -161,7 +158,6 @@ function getPackageManagerArguments(packageManager: PackageManager): PackageMana saveDev: '--save-dev', install: 'install', prefix: '--prefix', - noBinLinks: '--no-bin-links', noLockfile: '--no-package-lock', }; } From ee7def035e4335bb092b0bb8ae4eed1fdc63127b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 12 Nov 2019 07:18:37 +0000 Subject: [PATCH 0494/1070] build: update pacote to version 10.1.2 --- package.json | 2 +- packages/angular/cli/package.json | 2 +- packages/schematics/update/package.json | 2 +- yarn.lock | 28 +++++++++---------------- 4 files changed, 13 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 72d108efe1ae..5230a16d04d3 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "minimist": "^1.2.0", "npm-registry-client": "8.6.0", "ora": "^4.0.2", - "pacote": "10.1.1", + "pacote": "10.1.2", "pidtree": "^0.3.0", "pidusage": "^2.0.17", "rxjs": "6.5.3", diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 7feb3898bf97..7298c2dd8d30 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -38,7 +38,7 @@ "npm-package-arg": "7.0.0", "npm-pick-manifest": "4.0.0", "open": "7.0.0", - "pacote": "10.1.1", + "pacote": "10.1.2", "read-package-tree": "5.3.1", "rimraf": "3.0.0", "semver": "6.3.0", diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index b3beedfec4de..c838611e8275 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -15,7 +15,7 @@ "@angular-devkit/schematics": "0.0.0", "@yarnpkg/lockfile": "1.1.0", "ini": "1.3.5", - "pacote": "10.1.1", + "pacote": "10.1.2", "semver": "6.3.0", "semver-intersect": "1.4.0", "rxjs": "6.5.3" diff --git a/yarn.lock b/yarn.lock index 949313ea16cc..1e057ff025ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7509,7 +7509,7 @@ npm-package-arg@7.0.0, npm-package-arg@^7.0.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" -"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0: +"npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0": version "6.1.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== @@ -7527,7 +7527,7 @@ npm-packlist@^1.1.6, npm-packlist@^1.4.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-pick-manifest@4.0.0: +npm-pick-manifest@4.0.0, npm-pick-manifest@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-4.0.0.tgz#5e1b392a2a6310378b9bab32332597030ca073ce" integrity sha512-SsYReLe/16UgSL6GKX6GO4o3RVBthVy1uuHq6kZ9mkPeQXpOHbrLZoV13i8fr3LQtET+pLPSfD13e4RIYfkX5Q== @@ -7536,15 +7536,6 @@ npm-pick-manifest@4.0.0: npm-package-arg "^7.0.0" semver "^5.4.1" -npm-pick-manifest@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" - integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== - dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" - npm-registry-client@8.6.0: version "8.6.0" resolved "https://registry.yarnpkg.com/npm-registry-client/-/npm-registry-client-8.6.0.tgz#7f1529f91450732e89f8518e0f21459deea3e4c4" @@ -7564,7 +7555,7 @@ npm-registry-client@8.6.0: optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -npm-registry-fetch@^5.0.0: +npm-registry-fetch@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-5.0.1.tgz#98f59f2ac83440baf7a4fbe800972cfe37c9334d" integrity sha512-GK7SUx188KSkPvbceOGO59L3FGHLBYoP0YEhUAKYjAypL15v5xmoempZ9rIJS2R/1eOS0KS1Y9AQe79YfgNxaw== @@ -7914,10 +7905,10 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pacote@10.1.1: - version "10.1.1" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-10.1.1.tgz#a0ae11c1b76e0691411df8e469c37281e46e13f0" - integrity sha512-+uv3x0doW6Ax12exSBmtxPaZfS0OOjCwCN2N/OgE5MsOYODtpvkrOtI5/F+rRb+oelKnWu86DuIdeH6Cok4g8w== +pacote@10.1.2: + version "10.1.2" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-10.1.2.tgz#c190e2598b7166fe9a10666fa6a77157ca909e04" + integrity sha512-GZBuHd3fu3lpze7xOPW9823v6gA4PdbYO3DjprexRkckRbpWe/KXRUvOQvMpLOSWa6mJP17Li4Nha5TtVbGYFA== dependencies: cacache "^13.0.1" chownr "^1.1.3" @@ -7927,9 +7918,10 @@ pacote@10.1.1: minipass "^3.0.1" minipass-fetch "^1.2.1" mutate-fs "^2.1.1" + npm-package-arg "^7.0.0" npm-packlist "^1.4.6" - npm-pick-manifest "^3.0.2" - npm-registry-fetch "^5.0.0" + npm-pick-manifest "^4.0.0" + npm-registry-fetch "^5.0.1" osenv "^0.1.5" promise-inflight "^1.0.1" promise-retry "^1.1.1" From d41522302bf8951327f04f97ba053dab7ce1df93 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 11 Nov 2019 18:04:24 -0500 Subject: [PATCH 0495/1070] fix(@angular-devkit/build-angular): ignore node modules when polling The node modules directory contains a massive set of directories and files. When watching via polling, that set needs to be queried repeatedly to determine if any files have changed. Changes within node modules are quite rare while using `ng serve` or `ng build --watch`. As a result, polling the node modules directory is rarely useful. This change causes CPU usage to drop from a potential high of ~80% to a more manageable ~5-10%. --- .../src/angular-cli-files/models/webpack-configs/common.ts | 1 + .../angular_devkit/build_angular/src/dev-server/index.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts index 1a497d706efa..81bf729cd789 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts @@ -479,6 +479,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { watch: buildOptions.watch, watchOptions: { poll: buildOptions.poll, + ignored: buildOptions.poll === undefined ? undefined : /[\\\/]node_modules[\\\/]/, }, performance: { hints: false, diff --git a/packages/angular_devkit/build_angular/src/dev-server/index.ts b/packages/angular_devkit/build_angular/src/dev-server/index.ts index 46579d86b9d4..d69c235932d2 100644 --- a/packages/angular_devkit/build_angular/src/dev-server/index.ts +++ b/packages/angular_devkit/build_angular/src/dev-server/index.ts @@ -427,7 +427,11 @@ export function buildServerConfig( stats: false, compress: styles || scripts, watchOptions: { - poll: browserOptions.poll, + // Using just `--poll` will result in a value of 0 which is very likely not the intention + // A value of 0 is falsy and will disable polling rather then enable + // 500 ms is a sensible default in this case + poll: serverOptions.poll === 0 ? 500 : serverOptions.poll, + ignored: serverOptions.poll === undefined ? undefined : /[\\\/]node_modules[\\\/]/, }, https: serverOptions.ssl, overlay: { From 1903dd511959a947a7bf2829c7b7bd3ab93c9019 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 11 Nov 2019 19:24:28 +0100 Subject: [PATCH 0496/1070] fix(@angular/cli): add pnpm options to install package task Fixes #16149 --- packages/angular/cli/tasks/install-package.ts | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/angular/cli/tasks/install-package.ts b/packages/angular/cli/tasks/install-package.ts index e3a65c64a1c9..1ae5ddd64f04 100644 --- a/packages/angular/cli/tasks/install-package.ts +++ b/packages/angular/cli/tasks/install-package.ts @@ -75,7 +75,7 @@ export function installTempPackage( process.on('exit', () => { try { rimraf.sync(tempPath); - } catch {} + } catch { } }); // setup prefix/global modules path @@ -145,19 +145,30 @@ export function runTempPackageBin( } function getPackageManagerArguments(packageManager: PackageManager): PackageManagerOptions { - return packageManager === PackageManager.Yarn - ? { + switch (packageManager) { + case PackageManager.Yarn: + return { silent: '--silent', saveDev: '--dev', install: 'add', prefix: '--modules-folder', noLockfile: '--no-lockfile', - } - : { + }; + case PackageManager.Pnpm: + return { + silent: '--silent', + saveDev: '--save-dev', + install: 'add', + prefix: '--prefix', + noLockfile: '--no-lockfile', + }; + default: + return { silent: '--quiet', saveDev: '--save-dev', install: 'install', prefix: '--prefix', noLockfile: '--no-package-lock', }; + } } From 3143971fb4908fbb76d4101c734be0c1a9030d86 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 11 Nov 2019 19:25:08 +0100 Subject: [PATCH 0497/1070] fix(@schematics/update): add pnpm and cnpm as a valid packageManagers --- packages/schematics/update/update/schema.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schematics/update/update/schema.json b/packages/schematics/update/update/schema.json index 4b849b8a5316..97515d27746d 100644 --- a/packages/schematics/update/update/schema.json +++ b/packages/schematics/update/update/schema.json @@ -64,7 +64,9 @@ "default": "npm", "enum": [ "npm", - "yarn" + "yarn", + "cnpm", + "pnpm" ] }, "migrateExternal": { From a6f3d14c0809e673a2b0f6f32aa53f31c3abb84b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 11 Nov 2019 20:08:33 +0100 Subject: [PATCH 0498/1070] fix(@angular/cli): clarify ng update outdated message --- packages/angular/cli/commands/update-impl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 7f78982ab85b..f01bc9ce1518 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -212,7 +212,7 @@ export class UpdateCommand extends Command { // Check if the current installed CLI version is older than the latest version. if (await this.checkCLILatestVersion(options.verbose, options.next)) { this.logger.warn( - 'The installed Angular CLI version is older than the latest published version.\n' + + `The installed Angular CLI version is older than the latest ${options.next ? 'pre-release' : 'stable'} version.\n` + 'Installing a temporary version to perform the update.', ); From 2e24108c2f06e6fa31455721f0fe3816eac4cc06 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 12 Nov 2019 07:18:20 +0000 Subject: [PATCH 0499/1070] build: update core-js to version 3.4.1 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index b4c5779558bb..84fe7f6caa87 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -24,7 +24,7 @@ "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.5", - "core-js": "3.4.0", + "core-js": "3.4.1", "file-loader": "4.2.0", "find-cache-dir": "3.1.0", "glob": "7.1.5", diff --git a/yarn.lock b/yarn.lock index 1e057ff025ce..f3684b47b12c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3308,10 +3308,10 @@ core-js-compat@^3.1.1: browserslist "^4.7.2" semver "^6.3.0" -core-js@3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.4.0.tgz#29ea478601789c72f2978e9bb98f43546f89d3aa" - integrity sha512-lQxb4HScV71YugF/X28LtePZj9AB7WqOpcB+YztYxusvhrgZiQXPmCYfPC5LHsw/+ScEtDbXU3xbqH3CjBRmYA== +core-js@3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.4.1.tgz#76dd6828412900ab27c8ce0b22e6114d7ce21b18" + integrity sha512-KX/dnuY/J8FtEwbnrzmAjUYgLqtk+cxM86hfG60LGiW3MmltIc2yAmDgBgEkfm0blZhUrdr1Zd84J2Y14mLxzg== core-js@^2.2.0, core-js@^2.4.0: version "2.6.10" From 9b91163c52248651b03ae2f1a145b1907c509b56 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 11 Nov 2019 13:03:08 +0000 Subject: [PATCH 0500/1070] fix(@ngtools/webpack): don't warn on unused ngsummary Fix https://github.com/angular/angular-cli/issues/15626#issuecomment-551632356 --- .../unused-files-warning_spec_large.ts | 34 +++++++++++++++++++ .../webpack/src/angular_compiler_plugin.ts | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts index addd3ab85344..43d50afa12a7 100644 --- a/packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts @@ -66,6 +66,40 @@ describe('Browser Builder unused files warnings', () => { await run.stop(); }); + it('should not show warning when excluded files are unused', async () => { + if (veEnabled) { + // TODO: https://github.com/angular/angular-cli/issues/15056 + pending('Only supported in Ivy.'); + + return; + } + + const ignoredFiles = { + 'src/file.d.ts': 'export type MyType = number;', + 'src/file.ngsummary.ts': 'export const hello = 42;', + 'src/file.ngfactory.ts': 'export const hello = 42;', + 'src/file.ngstyle.ts': 'export const hello = 42;', + 'src/file.ng_typecheck__.ts': 'export const hello = 42;', + }; + + host.writeMultipleFiles(ignoredFiles); + + host.replaceInFile( + 'src/tsconfig.app.json', + '"main.ts"', + `"main.ts", ${Object.keys(ignoredFiles).map(f => `"${f.replace('src/', '')}"`).join(',')}`, + ); + + const logger = new TestLogger('unused-files-warnings'); + const run = await architect.scheduleTarget(targetSpec, undefined, { logger }); + const output = await run.result as BrowserBuilderOutput; + expect(output.success).toBe(true); + expect(logger.includes(warningMessageSuffix)).toBe(false); + logger.clear(); + + await run.stop(); + }); + it('should not show warning when type files are used', async () => { if (veEnabled) { // TODO: https://github.com/angular/angular-cli/issues/15056 diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 376bb1631af5..0d4b06ea46cc 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -611,7 +611,7 @@ export class AngularCompilerPlugin { // JS file example `@angular/core/core.ngfactory.ts`. // - .d.ts files might not have a correspondent JS file due to bundling. // - __ng_typecheck__.ts will never be requested. - const fileExcludeRegExp = /(\.(d|ngfactory|ngstyle)\.ts|ng_typecheck__\.ts)$/; + const fileExcludeRegExp = /(\.(d|ngfactory|ngstyle|ngsummary)\.ts|ng_typecheck__\.ts)$/; const usedFiles = new Set(); for (const compilationModule of compilation.modules) { From 8a0f92bd833d2c571bc7817d1fa6887637c7dd47 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 11 Nov 2019 14:01:49 +0000 Subject: [PATCH 0501/1070] fix(@ngtools/webpack): recursive look up unused files Fix #15626 --- .../unused-files-warning_spec_large.ts | 30 +++++++++++ .../webpack/src/angular_compiler_plugin.ts | 52 +++++++++---------- 2 files changed, 56 insertions(+), 26 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts index 43d50afa12a7..a8079e9b4f30 100644 --- a/packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts @@ -128,6 +128,36 @@ describe('Browser Builder unused files warnings', () => { await run.stop(); }); + it('should not show warning when type files are used transitively', async () => { + if (veEnabled) { + // TODO: https://github.com/angular/angular-cli/issues/15056 + pending('Only supported in Ivy.'); + + return; + } + + host.writeMultipleFiles({ + 'src/app/type.ts': + `import {Myinterface} from './interface'; export type MyType = Myinterface;`, + 'src/app/interface.ts': 'export interface Myinterface {nbr: number;}', + }); + + host.replaceInFile( + 'src/app/app.component.ts', + `'@angular/core';`, + `'@angular/core';\nimport { MyType } from './type';\n`, + ); + + const logger = new TestLogger('unused-files-warnings'); + const run = await architect.scheduleTarget(targetSpec, undefined, { logger }); + const output = await run.result as BrowserBuilderOutput; + expect(output.success).toBe(true); + expect(logger.includes(warningMessageSuffix)).toBe(false); + logger.clear(); + + await run.stop(); + }); + it('works for rebuilds', async () => { if (veEnabled) { // TODO: https://github.com/angular/angular-cli/issues/15056 diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 0d4b06ea46cc..46cbc70418d4 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -613,31 +613,26 @@ export class AngularCompilerPlugin { // - __ng_typecheck__.ts will never be requested. const fileExcludeRegExp = /(\.(d|ngfactory|ngstyle|ngsummary)\.ts|ng_typecheck__\.ts)$/; - const usedFiles = new Set(); - for (const compilationModule of compilation.modules) { - if (!compilationModule.resource) { - continue; + // Start with a set of all the source file names we care about. + const unusedSourceFileNames = new Set( + program.getSourceFiles() + .map(x => this._compilerHost.denormalizePath(x.fileName)) + .filter(f => !(fileExcludeRegExp.test(f) || this._unusedFiles.has(f))), + ); + // This function removes a source file name and all its dependencies from the set. + const removeSourceFile = (fileName: string) => { + if (unusedSourceFileNames.has(fileName)) { + unusedSourceFileNames.delete(fileName); + this.getDependencies(fileName, false).forEach(f => removeSourceFile(f)); } + }; - usedFiles.add(forwardSlashPath(compilationModule.resource)); - - // We need the below for dependencies which - // are not emitted such as type only TS files - for (const dependency of compilationModule.buildInfo.fileDependencies) { - usedFiles.add(forwardSlashPath(dependency)); - } - } - - const sourceFiles = program.getSourceFiles(); - for (const { fileName } of sourceFiles) { - if ( - fileExcludeRegExp.test(fileName) - || usedFiles.has(fileName) - || this._unusedFiles.has(fileName) - ) { - continue; - } + // Go over all the modules in the webpack compilation and remove them from the set. + compilation.modules.forEach(m => m.resource ? removeSourceFile(m.resource) : null); + // Anything that remains is unused, because it wasn't referenced directly or transitively + // on the files in the compilation. + for (const fileName of unusedSourceFileNames) { compilation.warnings.push( `${fileName} is part of the TypeScript compilation but it's unused.\n` + `Add only entry points to the 'files' or 'include' properties in your tsconfig.`, @@ -1210,7 +1205,7 @@ export class AngularCompilerPlugin { return { outputText, sourceMap, errorDependencies }; } - getDependencies(fileName: string): string[] { + getDependencies(fileName: string, includeResources = true): string[] { const resolvedFileName = this._compilerHost.resolve(fileName); const sourceFile = this._compilerHost.getSourceFile(resolvedFileName, ts.ScriptTarget.Latest); if (!sourceFile) { @@ -1244,14 +1239,19 @@ export class AngularCompilerPlugin { }) .filter(x => x) as string[]; - const resourceImports = findResources(sourceFile) - .map(resourcePath => resolve(dirname(resolvedFileName), normalize(resourcePath))); + let resourceImports: string[] = [], resourceDependencies: string[] = []; + if (includeResources) { + resourceImports = findResources(sourceFile) + .map(resourcePath => resolve(dirname(resolvedFileName), normalize(resourcePath))); + resourceDependencies = + this.getResourceDependencies(this._compilerHost.denormalizePath(resolvedFileName)); + } // These paths are meant to be used by the loader so we must denormalize them. const uniqueDependencies = new Set([ ...esImports, ...resourceImports, - ...this.getResourceDependencies(this._compilerHost.denormalizePath(resolvedFileName)), + ...resourceDependencies, ].map((p) => p && this._compilerHost.denormalizePath(p))); return [...uniqueDependencies]; From 1bf6ea47434f50699139b2c38ed9536f689ef2c7 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 12 Nov 2019 00:51:01 +0000 Subject: [PATCH 0502/1070] build: update terser to version 4.4.0 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 84fe7f6caa87..9f81aae7ce41 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -59,7 +59,7 @@ "stylus": "0.54.7", "stylus-loader": "3.0.2", "tree-kill": "1.2.1", - "terser": "4.3.9", + "terser": "4.4.0", "terser-webpack-plugin": "2.2.1", "webpack": "4.41.2", "webpack-dev-middleware": "3.7.2", diff --git a/yarn.lock b/yarn.lock index f3684b47b12c..c88326586221 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10257,16 +10257,7 @@ terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.9: - version "4.3.9" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.9.tgz#e4be37f80553d02645668727777687dad26bbca8" - integrity sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - -terser@^4.1.2, terser@^4.3.8, terser@^4.3.9: +terser@4.4.0, terser@^4.1.2, terser@^4.3.8, terser@^4.3.9: version "4.4.0" resolved "https://registry.yarnpkg.com/terser/-/terser-4.4.0.tgz#22c46b4817cf4c9565434bfe6ad47336af259ac3" integrity sha512-oDG16n2WKm27JO8h4y/w3iqBGAOSCtq7k8dRmrn4Wf9NouL0b2WpMHGChFGZq4nFAQy1FsNJrVQHfurXOSTmOA== From 0152c13caf368437e8a0370ae30288c50c67753c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 12 Nov 2019 00:50:49 +0000 Subject: [PATCH 0503/1070] build: update glob to version 7.1.6 --- .../angular_devkit/build_angular/package.json | 2 +- yarn.lock | 20 ++++--------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 9f81aae7ce41..54ae5d96c5f6 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -27,7 +27,7 @@ "core-js": "3.4.1", "file-loader": "4.2.0", "find-cache-dir": "3.1.0", - "glob": "7.1.5", + "glob": "7.1.6", "istanbul-instrumenter-loader": "3.0.1", "jest-worker": "24.9.0", "karma-source-map-support": "1.4.0", diff --git a/yarn.lock b/yarn.lock index c88326586221..eb33799b7706 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4830,10 +4830,10 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.5: - version "7.1.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" - integrity sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ== +glob@7.1.6, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -4853,18 +4853,6 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" From 8e81c6aa959945716d2c58e7f870f1f2afa6d2a8 Mon Sep 17 00:00:00 2001 From: Murad Date: Fri, 1 Nov 2019 23:40:55 +0000 Subject: [PATCH 0504/1070] feat(@angular/cli): Support XDG Base Directory Specfication Explained here: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Current change affects reading of global config from `.angular-config.json`. By default it will be created in user's home directory. If user moves it manually to `$HOME/.config/angular/.angular-config.json`, it will be subsequently read from new location. --- packages/angular/cli/utilities/config.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/angular/cli/utilities/config.ts b/packages/angular/cli/utilities/config.ts index 403f588c7795..261a97ec6653 100644 --- a/packages/angular/cli/utilities/config.ts +++ b/packages/angular/cli/utilities/config.ts @@ -31,6 +31,13 @@ export const workspaceSchemaPath = getSchemaLocation(); const configNames = [ 'angular.json', '.angular.json' ]; const globalFileName = '.angular-config.json'; +function xdgConfigHome(home: string, configFile?: string): string { + // https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html + const p = process.env['XDG_CONFIG_HOME'] || path.join(home, '.config', 'angular'); + + return configFile ? path.join(p, configFile) : p; +} + function projectFilePath(projectPath?: string): string | null { // Find the configuration, either where specified, in the Angular CLI project // (if it's in node_modules) or from the current process. @@ -45,6 +52,15 @@ function globalFilePath(): string | null { return null; } + // follow XDG Base Directory spec + // note that createGlobalSettings() will continue creating + // global file in home directory, with this user will have + // choice to move change its location to meet XDG convention + const xdgConfig = xdgConfigHome(home, globalFileName); + if (existsSync(xdgConfig)) { + return xdgConfig; + } + const p = path.join(home, globalFileName); if (existsSync(p)) { return p; From cdfa89e7b65f5203889e60aa179c4e0036e18ea1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 12 Nov 2019 00:50:37 +0000 Subject: [PATCH 0505/1070] build: update @babel/core to version 7.7.2 --- .../angular_devkit/build_angular/package.json | 6 +- yarn.lock | 120 +++++++----------- 2 files changed, 52 insertions(+), 74 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 54ae5d96c5f6..8489a3691291 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -11,9 +11,9 @@ "@angular-devkit/build-optimizer": "0.0.0", "@angular-devkit/build-webpack": "0.0.0", "@angular-devkit/core": "0.0.0", - "@babel/core": "7.6.4", - "@babel/generator": "7.6.4", - "@babel/preset-env": "7.6.3", + "@babel/core": "7.7.2", + "@babel/generator": "7.7.2", + "@babel/preset-env": "7.7.1", "@ngtools/webpack": "0.0.0", "ajv": "6.10.2", "autoprefixer": "9.7.1", diff --git a/yarn.lock b/yarn.lock index eb33799b7706..43595ae039a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -103,27 +103,7 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.6.4": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.4.tgz#6ebd9fe00925f6c3e177bb726a188b5f578088ff" - integrity sha512-Rm0HGw101GY8FTzpWSyRbki/jzq+/PkNQJ+nSulrdY6gFGOsNseCqD6KHRYe2E+EdzuBdr2pxCp6s4Uk6eJ+XQ== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.4" - "@babel/helpers" "^7.6.2" - "@babel/parser" "^7.6.4" - "@babel/template" "^7.6.0" - "@babel/traverse" "^7.6.3" - "@babel/types" "^7.6.3" - convert-source-map "^1.1.0" - debug "^4.1.0" - json5 "^2.1.0" - lodash "^4.17.13" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/core@^7.5.5": +"@babel/core@7.7.2", "@babel/core@^7.5.5": version "7.7.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.2.tgz#ea5b99693bcfc058116f42fa1dd54da412b29d91" integrity sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ== @@ -143,17 +123,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@7.6.4": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" - integrity sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w== - dependencies: - "@babel/types" "^7.6.3" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - -"@babel/generator@^7.4.0", "@babel/generator@^7.6.4", "@babel/generator@^7.7.2": +"@babel/generator@7.7.2", "@babel/generator@^7.4.0", "@babel/generator@^7.7.2": version "7.7.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.2.tgz#2f4852d04131a5e17ea4f6645488b5da66ebf3af" integrity sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ== @@ -242,7 +212,7 @@ dependencies: "@babel/types" "^7.7.0" -"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.7.0": +"@babel/helper-module-imports@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz#99c095889466e5f7b6d66d98dffc58baaf42654d" integrity sha512-Dv3hLKIC1jyfTkClvyEkYP2OlkzNvWs5+Q8WgPbxM5LMeorons7iPP91JM+DU7tRbhqA1ZeooPaMFvQrn23RHw== @@ -326,7 +296,7 @@ "@babel/traverse" "^7.7.0" "@babel/types" "^7.7.0" -"@babel/helpers@^7.6.2", "@babel/helpers@^7.7.0": +"@babel/helpers@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.0.tgz#359bb5ac3b4726f7c1fde0ec75f64b3f4275d60b" integrity sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g== @@ -344,12 +314,12 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.6.4", "@babel/parser@^7.7.0", "@babel/parser@^7.7.2": +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.7.2": version "7.7.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.3.tgz#5fad457c2529de476a248f75b0f090b3060af043" integrity sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A== -"@babel/plugin-proposal-async-generator-functions@^7.2.0": +"@babel/plugin-proposal-async-generator-functions@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.0.tgz#83ef2d6044496b4c15d8b4904e2219e6dccc6971" integrity sha512-ot/EZVvf3mXtZq0Pd0+tSOfGWMizqmOohXmNZg6LNFjHOV+wOPv7BvVYh8oPR8LhpIP3ye8nNooKL50YRWxpYA== @@ -358,7 +328,7 @@ "@babel/helper-remap-async-to-generator" "^7.7.0" "@babel/plugin-syntax-async-generators" "^7.2.0" -"@babel/plugin-proposal-dynamic-import@^7.5.0": +"@babel/plugin-proposal-dynamic-import@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.0.tgz#dc02a8bad8d653fb59daf085516fa416edd2aa7f" integrity sha512-7poL3Xi+QFPC7sGAzEIbXUyYzGJwbc2+gSD0AkiC5k52kH2cqHdqxm5hNFfLW3cRSTcx9bN0Fl7/6zWcLLnKAQ== @@ -390,7 +360,7 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" -"@babel/plugin-proposal-unicode-property-regex@^7.6.2": +"@babel/plugin-proposal-unicode-property-regex@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.0.tgz#549fe1717a1bd0a2a7e63163841cb37e78179d5d" integrity sha512-mk34H+hp7kRBWJOOAR0ZMGCydgKMD4iN9TpDRp3IIcbunltxEY89XSimc6WbtSLCDrwcdy/EEw7h5CFCzxTchw== @@ -433,6 +403,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-top-level-await@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.7.0.tgz#f5699549f50bbe8d12b1843a4e82f0a37bb65f4d" + integrity sha512-hi8FUNiFIY1fnUI2n1ViB1DR0R4QeK4iHcTlW6aJkrPoTdb8Rf1EMQ6GT3f67DDkYyWgew9DFoOZ6gOoEsdzTA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-arrow-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" @@ -440,7 +417,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@^7.5.0": +"@babel/plugin-transform-async-to-generator@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.0.tgz#e2b84f11952cf5913fe3438b7d2585042772f492" integrity sha512-vLI2EFLVvRBL3d8roAMqtVY0Bm9C1QzLkdS57hiKrjUBSqsQYrBsMCeOg/0KK7B0eK9V71J5mWcha9yyoI2tZw== @@ -464,7 +441,7 @@ "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.5.5": +"@babel/plugin-transform-classes@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.0.tgz#b411ecc1b8822d24b81e5d184f24149136eddd4a" integrity sha512-/b3cKIZwGeUesZheU9jNYcwrEA7f/Bo4IdPmvp7oHgvks2majB5BoT5byAql44fiNQYOPzhk2w8DbgfuafkMoA== @@ -492,7 +469,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.6.2": +"@babel/plugin-transform-dotall-regex@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.0.tgz#c5c9ecacab3a5e0c11db6981610f0c32fd698b3b" integrity sha512-3QQlF7hSBnSuM1hQ0pS3pmAbWLax/uGNCbPBND9y+oJ4Y776jsyujG2k0Sn2Aj2a0QwVOiOFL5QVPA7spjvzSA== @@ -522,7 +499,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@^7.4.4": +"@babel/plugin-transform-function-name@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.0.tgz#0fa786f1eef52e3b7d4fc02e54b2129de8a04c2a" integrity sha512-P5HKu0d9+CzZxP5jcrWdpe7ZlFDe24bmqP6a6X8BHEBl/eizAsY8K6LX8LASZL0Jxdjm5eEfzp+FIrxCm/p8bA== @@ -553,7 +530,7 @@ "@babel/helper-plugin-utils" "^7.0.0" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-commonjs@^7.6.0": +"@babel/plugin-transform-modules-commonjs@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.0.tgz#3e5ffb4fd8c947feede69cbe24c9554ab4113fe3" integrity sha512-KEMyWNNWnjOom8vR/1+d+Ocz/mILZG/eyHHO06OuBQ2aNhxT62fr4y6fGOplRx+CxCSp3IFwesL8WdINfY/3kg== @@ -563,7 +540,7 @@ "@babel/helper-simple-access" "^7.7.0" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-systemjs@^7.5.0": +"@babel/plugin-transform-modules-systemjs@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.0.tgz#9baf471213af9761c1617bb12fd278e629041417" integrity sha512-ZAuFgYjJzDNv77AjXRqzQGlQl4HdUM6j296ee4fwKVZfhDR9LAGxfvXjBkb06gNETPnN0sLqRm9Gxg4wZH6dXg== @@ -572,7 +549,7 @@ "@babel/helper-plugin-utils" "^7.0.0" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-umd@^7.2.0": +"@babel/plugin-transform-modules-umd@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.0.tgz#d62c7da16670908e1d8c68ca0b5d4c0097b69966" integrity sha512-u7eBA03zmUswQ9LQ7Qw0/ieC1pcAkbp5OQatbWUzY1PaBccvuJXUkYzoN1g7cqp7dbTu6Dp9bXyalBvD04AANA== @@ -580,7 +557,7 @@ "@babel/helper-module-transforms" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-named-capturing-groups-regex@^7.6.3": +"@babel/plugin-transform-named-capturing-groups-regex@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.0.tgz#358e6fd869b9a4d8f5cbc79e4ed4fc340e60dcaf" integrity sha512-+SicSJoKouPctL+j1pqktRVCgy+xAch1hWWTMy13j0IflnyNjaoskj+DwRQFimHbLqO3sq2oN2CXMvXq3Bgapg== @@ -618,7 +595,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-regenerator@^7.4.5": +"@babel/plugin-transform-regenerator@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.0.tgz#f1b20b535e7716b622c99e989259d7dd942dd9cc" integrity sha512-AXmvnC+0wuj/cFkkS/HFHIojxH3ffSXE+ttulrqWjZZRaUOonfJc60e1wSNT4rV8tIunvu/R3wCp71/tLAa9xg== @@ -669,7 +646,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@^7.6.2": +"@babel/plugin-transform-unicode-regex@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.0.tgz#743d9bcc44080e3cc7d49259a066efa30f9187a3" integrity sha512-RrThb0gdrNwFAqEAAx9OWgtx6ICK69x7i9tCnMdVrxQwSDp/Abu9DXFU5Hh16VP33Rmxh04+NGW28NsIkFvFKA== @@ -677,56 +654,57 @@ "@babel/helper-create-regexp-features-plugin" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/preset-env@7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.6.3.tgz#9e1bf05a2e2d687036d24c40e4639dc46cef2271" - integrity sha512-CWQkn7EVnwzlOdR5NOm2+pfgSNEZmvGjOhlCHBDq0J8/EStr+G+FvPEiz9B56dR6MoiUFjXhfE4hjLoAKKJtIQ== +"@babel/preset-env@7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.7.1.tgz#04a2ff53552c5885cf1083e291c8dd5490f744bb" + integrity sha512-/93SWhi3PxcVTDpSqC+Dp4YxUu3qZ4m7I76k0w73wYfn7bGVuRIO4QUz95aJksbS+AD1/mT1Ie7rbkT0wSplaA== dependencies: - "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-module-imports" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.2.0" - "@babel/plugin-proposal-dynamic-import" "^7.5.0" + "@babel/plugin-proposal-async-generator-functions" "^7.7.0" + "@babel/plugin-proposal-dynamic-import" "^7.7.0" "@babel/plugin-proposal-json-strings" "^7.2.0" "@babel/plugin-proposal-object-rest-spread" "^7.6.2" "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.6.2" + "@babel/plugin-proposal-unicode-property-regex" "^7.7.0" "@babel/plugin-syntax-async-generators" "^7.2.0" "@babel/plugin-syntax-dynamic-import" "^7.2.0" "@babel/plugin-syntax-json-strings" "^7.2.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-syntax-top-level-await" "^7.7.0" "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.5.0" + "@babel/plugin-transform-async-to-generator" "^7.7.0" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" "@babel/plugin-transform-block-scoping" "^7.6.3" - "@babel/plugin-transform-classes" "^7.5.5" + "@babel/plugin-transform-classes" "^7.7.0" "@babel/plugin-transform-computed-properties" "^7.2.0" "@babel/plugin-transform-destructuring" "^7.6.0" - "@babel/plugin-transform-dotall-regex" "^7.6.2" + "@babel/plugin-transform-dotall-regex" "^7.7.0" "@babel/plugin-transform-duplicate-keys" "^7.5.0" "@babel/plugin-transform-exponentiation-operator" "^7.2.0" "@babel/plugin-transform-for-of" "^7.4.4" - "@babel/plugin-transform-function-name" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.7.0" "@babel/plugin-transform-literals" "^7.2.0" "@babel/plugin-transform-member-expression-literals" "^7.2.0" "@babel/plugin-transform-modules-amd" "^7.5.0" - "@babel/plugin-transform-modules-commonjs" "^7.6.0" - "@babel/plugin-transform-modules-systemjs" "^7.5.0" - "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.6.3" + "@babel/plugin-transform-modules-commonjs" "^7.7.0" + "@babel/plugin-transform-modules-systemjs" "^7.7.0" + "@babel/plugin-transform-modules-umd" "^7.7.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.7.0" "@babel/plugin-transform-new-target" "^7.4.4" "@babel/plugin-transform-object-super" "^7.5.5" "@babel/plugin-transform-parameters" "^7.4.4" "@babel/plugin-transform-property-literals" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.4.5" + "@babel/plugin-transform-regenerator" "^7.7.0" "@babel/plugin-transform-reserved-words" "^7.2.0" "@babel/plugin-transform-shorthand-properties" "^7.2.0" "@babel/plugin-transform-spread" "^7.6.2" "@babel/plugin-transform-sticky-regex" "^7.2.0" "@babel/plugin-transform-template-literals" "^7.4.4" "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.6.2" - "@babel/types" "^7.6.3" + "@babel/plugin-transform-unicode-regex" "^7.7.0" + "@babel/types" "^7.7.1" browserslist "^4.6.0" core-js-compat "^3.1.1" invariant "^2.2.2" @@ -740,7 +718,7 @@ dependencies: regenerator-runtime "^0.13.2" -"@babel/template@^7.4.0", "@babel/template@^7.6.0", "@babel/template@^7.7.0": +"@babel/template@^7.4.0", "@babel/template@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0" integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ== @@ -749,7 +727,7 @@ "@babel/parser" "^7.7.0" "@babel/types" "^7.7.0" -"@babel/traverse@^7.4.3", "@babel/traverse@^7.6.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.2": +"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.2": version "7.7.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.2.tgz#ef0a65e07a2f3c550967366b3d9b62a2dcbeae09" integrity sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw== @@ -764,7 +742,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.6.3", "@babel/types@^7.7.0", "@babel/types@^7.7.2": +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.7.0", "@babel/types@^7.7.1", "@babel/types@^7.7.2": version "7.7.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.2.tgz#550b82e5571dcd174af576e23f0adba7ffc683f7" integrity sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA== @@ -3235,7 +3213,7 @@ conventional-commits-parser@^3.0.0: through2 "^3.0.0" trim-off-newlines "^1.0.0" -convert-source-map@^1.1.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: +convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== From cd8029ae4d752f9624936c0693c57f042209e0bb Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 7 Nov 2019 19:44:55 -0500 Subject: [PATCH 0506/1070] fix(@angular-devkit/build-angular): support XMB/XTB translation file parser Closes #16100 --- .../build_angular/src/utils/i18n-options.ts | 10 ++++ .../src/utils/load-translations.ts | 50 ++++++++++--------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts index 0b13243a1891..0ce79020f0ed 100644 --- a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts +++ b/packages/angular_devkit/build_angular/src/utils/i18n-options.ts @@ -145,6 +145,16 @@ export async function configureI18nBuild 1 && tsConfig.options.enableI18nLegacyMessageIdFormat !== false) { // This limitation is only for legacy message id support (defaults to true as of 9.0) diff --git a/packages/angular_devkit/build_angular/src/utils/load-translations.ts b/packages/angular_devkit/build_angular/src/utils/load-translations.ts index 08c71e0b7869..bef7af993e7a 100644 --- a/packages/angular_devkit/build_angular/src/utils/load-translations.ts +++ b/packages/angular_devkit/build_angular/src/utils/load-translations.ts @@ -7,17 +7,26 @@ */ import * as fs from 'fs'; -export type TranslationLoader = (path: string) => { translation: unknown; format: string }; +export type TranslationLoader = ( + path: string, +) => { + translation: unknown; + format: string; + // tslint:disable-next-line: no-implicit-dependencies + diagnostics: import('@angular/localize/src/tools/src/diagnostics').Diagnostics; +}; export async function createTranslationLoader(): Promise { - const parsers = await importParsers(); + const { parsers, diagnostics } = await importParsers(); return (path: string) => { const content = fs.readFileSync(path, 'utf8'); for (const [format, parser] of Object.entries(parsers)) { if (parser.canParse(path, content)) { - return { format, translation: parser.parse(path, content).translations }; + const result = parser.parse(path, content); + + return { format, translation: result.translations, diagnostics }; } } @@ -27,8 +36,11 @@ export async function createTranslationLoader(): Promise { async function importParsers() { try { - // In @angular/localize version 9.0.0-next.15 the parsers were located in the below locations. - return { + // tslint:disable-next-line: no-implicit-dependencies + const localizeDiag = await import('@angular/localize/src/tools/src/diagnostics'); + const diagnostics = new localizeDiag.Diagnostics(); + + const parsers = { json: new (await import( // tslint:disable-next-line:trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser' @@ -41,25 +53,17 @@ async function importParsers() { // tslint:disable-next-line:trailing-comma no-implicit-dependencies '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser' )).Xliff2TranslationParser(), - }; - } catch { - // Prior to @angular/localize version 9.0.0-next.15 the parsers were located in the below locations. - return { - json: new (await import( - // @ts-ignore - // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json/simple_json_translation_parser' - )).SimpleJsonTranslationParser(), - xlf: new (await import( - // @ts-ignore - // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1/xliff1_translation_parser' - )).Xliff1TranslationParser(), - xlf2: new (await import( - // @ts-ignore + // The name ('xmb') needs to match the AOT compiler option + xmb: new (await import( // tslint:disable-next-line:trailing-comma no-implicit-dependencies - '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2/xliff2_translation_parser' - )).Xliff2TranslationParser(), + '@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xtb_translation_parser' + )).XtbTranslationParser(diagnostics), }; + + return { parsers, diagnostics }; + } catch { + throw new Error( + `Unable to load translation file parsers. Please ensure '@angular/localize' is installed.`, + ); } } From 7e7248d9aa964ff69d20449ef2a8a5e52227298f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 7 Nov 2019 21:13:03 -0500 Subject: [PATCH 0507/1070] fix(@angular-devkit/core): allow multiselect list defaults Fixes #16104 --- packages/angular_devkit/core/src/json/schema/registry.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/core/src/json/schema/registry.ts b/packages/angular_devkit/core/src/json/schema/registry.ts index 82e20bdbbe3f..c16fb5f1b9d5 100644 --- a/packages/angular_devkit/core/src/json/schema/registry.ts +++ b/packages/angular_devkit/core/src/json/schema/registry.ts @@ -589,7 +589,12 @@ export class CoreSchemaRegistry implements SchemaRegistry { raw: schema, items, multiselect, - default: typeof parentSchema.default == 'object' ? undefined : parentSchema.default, + default: + typeof parentSchema.default == 'object' && + parentSchema.default !== null && + !Array.isArray(parentSchema.default) + ? undefined + : parentSchema.default as string[], async validator(data: JsonValue) { try { return await it.self.validate(parentSchema, data); From 823c6589ae6cb5b9f4d231d24e7a1a1deb09ce6e Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Tue, 12 Nov 2019 13:43:26 -0800 Subject: [PATCH 0508/1070] fix(@angular/cli): Renames final message to "Migration completed". (#16016) We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction. I also removed the check mark and green coloring which implied success. --- packages/angular/cli/commands/update-impl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index f01bc9ce1518..a6a615c9028f 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -186,7 +186,7 @@ export class UpdateCommand extends Command { return false; } - this.logger.info(colors.green(`${colors.symbols.check} Migration succeeded.`)); + this.logger.info(' Migration completed.'); // Commit migration if (commit) { From 7aff73bb0061a40a249c407d7dff0262a1c7b629 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 12 Nov 2019 15:58:00 +0000 Subject: [PATCH 0509/1070] build: update puppeteer to version 2.0.0 --- package.json | 5 +- .../e2e/assets/7.0-project/package-lock.json | 10683 ---------------- tests/legacy-cli/e2e/utils/project.ts | 12 +- yarn.lock | 10 +- 4 files changed, 16 insertions(+), 10694 deletions(-) delete mode 100644 tests/legacy-cli/e2e/assets/7.0-project/package-lock.json diff --git a/package.json b/package.json index 5230a16d04d3..6077b6db0056 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "validate": "node ./bin/devkit-admin validate", "validate-commits": "./bin/devkit-admin validate-commits", "preinstall": "node ./tools/yarn/check-yarn.js", - "webdriver-update": "webdriver-manager update --standalone false --gecko false --versions.chrome 2.45" + "//webdriver-update-README": "ChromeDriver version must match Puppeteer Chromium version, see https://github.com/GoogleChrome/puppeteer/releases http://chromedriver.chromium.org/downloads", + "webdriver-update": "webdriver-manager update --standalone false --gecko false --versions.chrome 79.0.3945.16" }, "repository": { "type": "git", @@ -75,7 +76,7 @@ "glob": "^7.0.3", "node-fetch": "^2.2.0", "prettier": "^1.16.4", - "puppeteer": "1.12.2", + "puppeteer": "2.0.0", "quicktype-core": "^6.0.15", "temp": "^0.9.0", "tslint": "^5.15.0", diff --git a/tests/legacy-cli/e2e/assets/7.0-project/package-lock.json b/tests/legacy-cli/e2e/assets/7.0-project/package-lock.json deleted file mode 100644 index 80862ed2ea87..000000000000 --- a/tests/legacy-cli/e2e/assets/7.0-project/package-lock.json +++ /dev/null @@ -1,10683 +0,0 @@ -{ - "name": "seven-oh-project", - "version": "0.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@angular-devkit/architect": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.10.7.tgz", - "integrity": "sha512-S49LSslNRxIflHzrIrEgK7mGQ7HzETr/FU0fyTbB0vubcmfzMoYTsgYdK7SUz583lovc+UvASoUAhPJI3e35ng==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.0.7", - "rxjs": "6.3.3" - } - }, - "@angular-devkit/build-angular": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.10.7.tgz", - "integrity": "sha512-wjhlMWWkGSSkdwd9elKfeeEgyig/eZGyF2wY5kZmWPBdeK/GfdBLyO15qh4ppRYI2SjyRvzl0tWDOA2Y0hKL0w==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.10.7", - "@angular-devkit/build-optimizer": "0.10.7", - "@angular-devkit/build-webpack": "0.10.7", - "@angular-devkit/core": "7.0.7", - "@ngtools/webpack": "7.0.7", - "ajv": "6.5.3", - "autoprefixer": "9.1.5", - "circular-dependency-plugin": "5.0.2", - "clean-css": "4.2.1", - "copy-webpack-plugin": "4.5.4", - "file-loader": "2.0.0", - "glob": "7.1.3", - "istanbul": "0.4.5", - "istanbul-instrumenter-loader": "3.0.1", - "karma-source-map-support": "1.3.0", - "less": "3.8.1", - "less-loader": "4.1.0", - "license-webpack-plugin": "2.0.2", - "loader-utils": "1.1.0", - "mini-css-extract-plugin": "0.4.3", - "minimatch": "3.0.4", - "node-sass": "4.9.3", - "opn": "5.3.0", - "parse5": "4.0.0", - "portfinder": "1.0.17", - "postcss": "7.0.5", - "postcss-import": "12.0.0", - "postcss-loader": "3.0.0", - "raw-loader": "0.5.1", - "rxjs": "6.3.3", - "sass-loader": "7.1.0", - "semver": "5.5.1", - "source-map-loader": "0.2.4", - "source-map-support": "0.5.9", - "speed-measure-webpack-plugin": "^1.2.3", - "stats-webpack-plugin": "0.7.0", - "style-loader": "0.23.0", - "stylus": "0.54.5", - "stylus-loader": "3.0.2", - "terser-webpack-plugin": "1.1.0", - "tree-kill": "1.2.0", - "webpack": "4.19.1", - "webpack-dev-middleware": "3.3.0", - "webpack-dev-server": "3.1.8", - "webpack-merge": "4.1.4", - "webpack-sources": "1.2.0", - "webpack-subresource-integrity": "1.1.0-rc.6" - } - }, - "@angular-devkit/build-optimizer": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.10.7.tgz", - "integrity": "sha512-Ztj2U21B8zRO2csQS8mLv/+WKPPLePzaqJDk53Ou2r2HV+kh9GzYvgu1UFeGf/RyEeJi+9KnJGG2wPaeNqDNxg==", - "dev": true, - "requires": { - "loader-utils": "1.1.0", - "source-map": "0.5.6", - "typescript": "3.1.6", - "webpack-sources": "1.2.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", - "dev": true - } - } - }, - "@angular-devkit/build-webpack": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.10.7.tgz", - "integrity": "sha512-sUzgIhm5yWHvRo3GF6mc1J58PCuY5nJDF2vlE8Jhlwkq+/VbJ/NVfTDYRQCeqI1jLcdMaVrVQXnXAWc4KpFNig==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.10.7", - "@angular-devkit/core": "7.0.7", - "rxjs": "6.3.3" - } - }, - "@angular-devkit/core": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-7.0.7.tgz", - "integrity": "sha512-M8tTT9r3nUtWI3YyiyynHIQn+lQQgeKkxVZ+rdxvyvgE3U9+wn0yep5HkFLQETTuJetu9ARRRD94sD2XL3F/3A==", - "dev": true, - "requires": { - "ajv": "6.5.3", - "chokidar": "2.0.4", - "fast-json-stable-stringify": "2.0.0", - "rxjs": "6.3.3", - "source-map": "0.7.3" - } - }, - "@angular-devkit/schematics": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-7.0.7.tgz", - "integrity": "sha512-E6GHu4257PvymRjFDtpGc0ykdcIcpFIfXr73lq8qxo1SBkqH7Y1/C670elDg9nrCte8PhnhJVNiwNgNS/ZTAzQ==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.0.7", - "rxjs": "6.3.3" - } - }, - "@angular/animations": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-7.0.4.tgz", - "integrity": "sha512-QfFikT0FzYNMjdVg0LWTBijdu9JDJyzejnhCFlXxv+KR4zolpRK98/rU7CFW1Fg2jjL3/yL9PT1sf5I0fTJZYA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/cli": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.0.7.tgz", - "integrity": "sha512-SV3CcHa2oxDKwhOvHqZtysVRRT9pkO04Kv0Z1HEhlgIwqHyIU201R9/mo1gYmBHTNGxowKdvsGLsHQNpsHmQJw==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.10.7", - "@angular-devkit/core": "7.0.7", - "@angular-devkit/schematics": "7.0.7", - "@schematics/angular": "7.0.7", - "@schematics/update": "0.10.7", - "inquirer": "6.2.0", - "opn": "5.3.0", - "rxjs": "6.3.3", - "semver": "5.5.1", - "symbol-observable": "1.2.0" - } - }, - "@angular/common": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-7.0.4.tgz", - "integrity": "sha512-akQojdqY/RBlItkDWAPI3k0Llk1wnbAp+f47yySi3cgQz9SaZ1/RLNWZV84I/cKrksb4ehorT/lTqRBojsAD1A==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/compiler": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-7.0.4.tgz", - "integrity": "sha512-ExDhH1cJkuJkUsgNRZyZBse0a7wWkQyG5O8HONi3Rzig9dalFEuve9jD04zfA1Jx1GTXhovqtGnF72x4kw0V8Q==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/compiler-cli": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-7.0.4.tgz", - "integrity": "sha512-kvhWt6OTb1Uduns9Vm+Dwd/UUBNSEU6Jgu+QOPeHr7lg+4NTyr9uQLU0DtfBP0ljOlds8esmfii5IIFTeUQw1Q==", - "dev": true, - "requires": { - "canonical-path": "1.0.0", - "chokidar": "^1.4.2", - "convert-source-map": "^1.5.1", - "dependency-graph": "^0.7.2", - "magic-string": "^0.25.0", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2", - "shelljs": "^0.8.1", - "source-map": "^0.6.1", - "tslib": "^1.9.0", - "yargs": "9.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "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.1.5", - "normalize-path": "^2.0.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "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", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "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" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", - "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" - } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "@angular/core": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-7.0.4.tgz", - "integrity": "sha512-17SSmCz1wQoZKnVHF/T8UkWYPpDm5kPyoc1okkTTv8ZA2EAMMuZFFnRSAxEL5i7mNB9z5CvRqF2tRx/DbgbIRA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/forms": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-7.0.4.tgz", - "integrity": "sha512-W3nN9n1VY9On9+9f7PDRbzJUg+mMq1bjkhWsk/b7DfaYdmlzpG+Wd6OfArob2edsqGqH1dvTM8q8aGbWiFZ7dA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/http": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-7.0.4.tgz", - "integrity": "sha512-oUGT7xS7FZYajuHq0DP6MgahacB5sJTRgxiUU4uhQ/mqV7aREODVJJgw7oHDhM7Cnyzzo0B9D0zpEljKmeCLWQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/language-service": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-7.0.4.tgz", - "integrity": "sha512-CuJ2Ii97sNoN1HOZOLxG1lEHsQFi8K/RSB/k2suWPKzdM53ldSkKoYRac38zW/uqNABYItgvxb7w0Vi7HhxLsg==", - "dev": true - }, - "@angular/platform-browser": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-7.0.4.tgz", - "integrity": "sha512-4brYZZgsCJk1/a6JoSwaiVWO9+/T4iyE27dAgstao1nOf/jrBNKW2HnZtkWZmCCBK0WIk15wlB0Xr87OZbjNVA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/platform-browser-dynamic": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.0.4.tgz", - "integrity": "sha512-k1I53zIg8YWhtQizLfq/tWrUUdY5vHV8pGHyt0/UTGDqat5TORd6LDFfzCSux0r3qZujCOGNi9f4/AbyV8B9lw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/router": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-7.0.4.tgz", - "integrity": "sha512-nt1jJsxN+JmYZ6URamMdULUpH4aHdnNVKjWtjDI0OpdZvPx7PMFD8cfc92q0tavy2KqqexcceIb4BIC965gtpA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", - "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - } - } - }, - "@babel/parser": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", - "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", - "dev": true - }, - "@babel/template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", - "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0" - } - }, - "@babel/traverse": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", - "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/types": "^7.4.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.11" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - } - } - }, - "@ngtools/webpack": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.0.7.tgz", - "integrity": "sha512-ukZv/8vhiVWLsEEWF1uena8GHRVUpwbPJ+8AupW25d2nNpwfsDtTIXKzTzRYeIQFFCnHJxr04lK18CVsn1lFaQ==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.0.7", - "enhanced-resolve": "4.1.0", - "rxjs": "6.3.3", - "tree-kill": "1.2.0", - "webpack-sources": "1.2.0" - } - }, - "@schematics/angular": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-7.0.7.tgz", - "integrity": "sha512-xDSMAtOdKNa5uqsEfbwBVHVCjpNSmIIcadi0Rki+5Nmobf5nnQWPly1/xj5aHzT6SKuV4BIMvsBG9UgI9Ss/Iw==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.0.7", - "@angular-devkit/schematics": "7.0.7", - "typescript": "3.1.6" - } - }, - "@schematics/update": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.10.7.tgz", - "integrity": "sha512-E4txrdnIcNn1K0xFPmY4ywAnVj+hN2QB1wBijoAMezYTEjcKxW0g6thPfUv6qhIPcphxrCOqwl6cIELZjq2dtA==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.0.7", - "@angular-devkit/schematics": "7.0.7", - "npm-registry-client": "8.6.0", - "rxjs": "6.3.3", - "semver": "5.5.1", - "semver-intersect": "1.4.0" - } - }, - "@types/jasmine": { - "version": "2.8.16", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.16.tgz", - "integrity": "sha512-056oRlBBp7MDzr+HoU5su099s/s7wjZ3KcHxLfv+Byqb9MwdLUvsfLgw1VS97hsh3ddxSPyQu+olHMnoVTUY6g==", - "dev": true - }, - "@types/jasminewd2": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.6.tgz", - "integrity": "sha512-2ZOKrxb8bKRmP/po5ObYnRDgFE4i+lQiEB27bAMmtMWLgJSqlIDqlLx6S0IRorpOmOPRQ6O80NujTmQAtBkeNw==", - "dev": true, - "requires": { - "@types/jasmine": "*" - } - }, - "@types/node": { - "version": "8.9.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", - "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==", - "dev": true - }, - "@types/q": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", - "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", - "dev": true - }, - "@types/selenium-webdriver": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz", - "integrity": "sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.6.tgz", - "integrity": "sha512-8nkZS48EVsMUU0v6F1LCIOw4RYWLm2plMtbhFTjNgeXmsTNLuU3xTRtnljt9BFQB+iPbLRobkNrCWftWnNC7wQ==", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/wast-parser": "1.7.6", - "mamacro": "^0.0.3" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.6.tgz", - "integrity": "sha512-VBOZvaOyBSkPZdIt5VBMg3vPWxouuM13dPXGWI1cBh3oFLNcFJ8s9YA7S9l4mPI7+Q950QqOmqj06oa83hNWBA==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.6.tgz", - "integrity": "sha512-SCzhcQWHXfrfMSKcj8zHg1/kL9kb3aa5TN4plc/EREOs5Xop0ci5bdVBApbk2yfVi8aL+Ly4Qpp3/TRAUInjrg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.6.tgz", - "integrity": "sha512-1/gW5NaGsEOZ02fjnFiU8/OEEXU1uVbv2um0pQ9YVL3IHSkyk6xOwokzyqqO1qDZQUAllb+V8irtClPWntbVqw==", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.6.tgz", - "integrity": "sha512-+suMJOkSn9+vEvDvgyWyrJo5vJsWSDXZmJAjtoUq4zS4eqHyXImpktvHOZwXp1XQjO5H+YQwsBgqTQEc0J/5zg==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.7.6" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.6.tgz", - "integrity": "sha512-HCS6KN3wgxUihGBW7WFzEC/o8Eyvk0d56uazusnxXthDPnkWiMv+kGi9xXswL2cvfYfeK5yiM17z2K5BVlwypw==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.6.tgz", - "integrity": "sha512-e8/6GbY7OjLM+6OsN7f2krC2qYVNaSr0B0oe4lWdmq5sL++8dYDD1TFbD1TdAdWMRTYNr/Qq7ovXWzia2EbSjw==", - "dev": true, - "requires": { - "mamacro": "^0.0.3" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.6.tgz", - "integrity": "sha512-PzYFCb7RjjSdAOljyvLWVqd6adAOabJW+8yRT+NWhXuf1nNZWH+igFZCUK9k7Cx7CsBbzIfXjJc7u56zZgFj9Q==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.6.tgz", - "integrity": "sha512-3GS628ppDPSuwcYlQ7cDCGr4W2n9c4hLzvnRKeuz+lGsJSmc/ADVoYpm1ts2vlB1tGHkjtQMni+yu8mHoMlKlA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-buffer": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/wasm-gen": "1.7.6" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.6.tgz", - "integrity": "sha512-V4cIp0ruyw+hawUHwQLn6o2mFEw4t50tk530oKsYXQhEzKR+xNGDxs/SFFuyTO7X3NzEu4usA3w5jzhl2RYyzQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.6.tgz", - "integrity": "sha512-ojdlG8WpM394lBow4ncTGJoIVZ4aAtNOWHhfAM7m7zprmkVcKK+2kK5YJ9Bmj6/ketTtOn7wGSHCtMt+LzqgYQ==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/utf8": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.6.tgz", - "integrity": "sha512-oId+tLxQ+AeDC34ELRYNSqJRaScB0TClUU6KQfpB8rNT6oelYlz8axsPhf6yPTg7PBJ/Z5WcXmUYiHEWgbbHJw==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.6.tgz", - "integrity": "sha512-pTNjLO3o41v/Vz9VFLl+I3YLImpCSpodFW77pNoH4agn5I6GgSxXHXtvWDTvYJFty0jSeXZWLEmbaSIRUDlekg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-buffer": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/helper-wasm-section": "1.7.6", - "@webassemblyjs/wasm-gen": "1.7.6", - "@webassemblyjs/wasm-opt": "1.7.6", - "@webassemblyjs/wasm-parser": "1.7.6", - "@webassemblyjs/wast-printer": "1.7.6" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.6.tgz", - "integrity": "sha512-mQvFJVumtmRKEUXMohwn8nSrtjJJl6oXwF3FotC5t6e2hlKMh8sIaW03Sck2MDzw9xPogZD7tdP5kjPlbH9EcQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/ieee754": "1.7.6", - "@webassemblyjs/leb128": "1.7.6", - "@webassemblyjs/utf8": "1.7.6" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.6.tgz", - "integrity": "sha512-go44K90fSIsDwRgtHhX14VtbdDPdK2sZQtZqUcMRvTojdozj5tLI0VVJAzLCfz51NOkFXezPeVTAYFqrZ6rI8Q==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-buffer": "1.7.6", - "@webassemblyjs/wasm-gen": "1.7.6", - "@webassemblyjs/wasm-parser": "1.7.6" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.6.tgz", - "integrity": "sha512-t1T6TfwNY85pDA/HWPA8kB9xA4sp9ajlRg5W7EKikqrynTyFo+/qDzIpvdkOkOGjlS6d4n4SX59SPuIayR22Yg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-api-error": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/ieee754": "1.7.6", - "@webassemblyjs/leb128": "1.7.6", - "@webassemblyjs/utf8": "1.7.6" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.6.tgz", - "integrity": "sha512-1MaWTErN0ziOsNUlLdvwS+NS1QWuI/kgJaAGAMHX8+fMJFgOJDmN/xsG4h/A1Gtf/tz5VyXQciaqHZqp2q0vfg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/floating-point-hex-parser": "1.7.6", - "@webassemblyjs/helper-api-error": "1.7.6", - "@webassemblyjs/helper-code-frame": "1.7.6", - "@webassemblyjs/helper-fsm": "1.7.6", - "@xtuc/long": "4.2.1", - "mamacro": "^0.0.3" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.6.tgz", - "integrity": "sha512-vHdHSK1tOetvDcl1IV1OdDeGNe/NDDQ+KzuZHMtqTVP1xO/tZ/IKNpj5BaGk1OYFdsDWQqb31PIwdEyPntOWRQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/wast-parser": "1.7.6", - "@xtuc/long": "4.2.1" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", - "dev": true - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } - }, - "adm-zip": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz", - "integrity": "sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==", - "dev": true - }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true - }, - "ajv-keywords": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", - "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "app-root-path": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.2.1.tgz", - "integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA==", - "dev": true - }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", - "dev": true - }, - "array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "optional": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true, - "optional": true - }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autoprefixer": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.1.5.tgz", - "integrity": "sha512-kk4Zb6RUc58ld7gdosERHMF3DzIYJc2fp5sX46qEsGXQQy5bXsu8qyLjoxuY1NuQ/cJuCYnx99BfjwnRggrYIw==", - "dev": true, - "requires": { - "browserslist": "^4.1.0", - "caniuse-lite": "^1.0.30000884", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.2", - "postcss-value-parser": "^3.2.3" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "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": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "blob": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, - "optional": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "blocking-proxy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", - "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "bluebird": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", - "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.5.tgz", - "integrity": "sha512-0QFO1r/2c792Ohkit5XI8Cm8pDtZxgNl2H6HU4mHrpYz7314pEYcsAVVatM0l/YmxPnEzh9VygXouj4gkFUTKA==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000960", - "electron-to-chromium": "^1.3.124", - "node-releases": "^1.1.14" - } - }, - "browserstack": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.5.2.tgz", - "integrity": "sha512-+6AFt9HzhKykcPF79W6yjEUJcdvZOV0lIXdkORXMJftGrDl0OKWqRF4GHqpDNkxiceDT/uB7Fb/aDwktvXX7dg==", - "dev": true, - "requires": { - "https-proxy-agent": "^2.2.1" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "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 - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true, - "optional": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caniuse-lite": { - "version": "1.0.30000962", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000962.tgz", - "integrity": "sha512-WXYsW38HK+6eaj5IZR16Rn91TGhU3OhbwjKZvJ4HN/XBIABLKfbij9Mnd3pM0VEwZSlltWjoWg3I8FQ0DGgNOA==", - "dev": true - }, - "canonical-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/canonical-path/-/canonical-path-1.0.0.tgz", - "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular-dependency-plugin": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", - "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==", - "dev": true - }, - "circular-json": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz", - "integrity": "sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "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.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.0", - "shallow-clone": "^1.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "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 - }, - "codelyzer": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.5.0.tgz", - "integrity": "sha512-oO6vCkjqsVrEsmh58oNlnJkRXuA30hF8cdNAQV9DytEalDwyOFRvHMnlKFzmOStNerOmPGZU9GAHnBo4tGvtiQ==", - "dev": true, - "requires": { - "app-root-path": "^2.1.0", - "css-selector-tokenizer": "^0.7.0", - "cssauron": "^1.4.0", - "semver-dsl": "^1.0.1", - "source-map": "^0.5.7", - "sprintf-js": "^1.1.1" - }, - "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 - }, - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - } - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "combine-lists": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz", - "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y=", - "dev": true, - "requires": { - "lodash": "^4.5.0" - } - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "compare-versions": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.4.0.tgz", - "integrity": "sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg==", - "dev": true - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true - }, - "compressible": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.16.tgz", - "integrity": "sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA==", - "dev": true, - "requires": { - "mime-db": ">= 1.38.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", - "utils-merge": "1.0.1" - }, - "dependencies": { - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" - } - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - } - } - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.4.tgz", - "integrity": "sha512-0lstlEyj74OAtYMrDxlNZsU7cwFijAI3Ofz2fD6Mpo9r4xCv4yegfa3uHIKvZY1NSuOtE9nvG6TAhJ+uz9gDaQ==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" - } - }, - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz", - "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==", - "dev": true, - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0", - "require-from-string": "^2.0.1" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "optional": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", - "dev": true - }, - "css-selector-tokenizer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz", - "integrity": "sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==", - "dev": true, - "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" - } - }, - "cssauron": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", - "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", - "dev": true, - "requires": { - "through": "X.X.X" - } - }, - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", - "dev": true - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "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" - } - }, - "date-format": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", - "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "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 - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "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-gateway": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz", - "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==", - "dev": true, - "requires": { - "execa": "^0.10.0", - "ip-regex": "^2.1.0" - } - }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - } - } - }, - "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 - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "dependency-graph": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz", - "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "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.0" - } - }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", - "dev": true - }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", - "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", - "dev": true, - "requires": { - "path-type": "^3.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", - "dev": true, - "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.125", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.125.tgz", - "integrity": "sha512-XxowpqQxJ4nDwUXHtVtmEhRqBpm2OnjBomZmZtHD0d2Eo0244+Ojezhk3sD/MBSSe2nxCdGQFRXHIsf/LUTL9A==", - "dev": true - }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "engine.io": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", - "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~3.3.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-client": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", - "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-parser": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.5", - "has-binary2": "~1.0.2" - } - }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "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 - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "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": ">=0.0.4" - } - } - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - } - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - }, - "dependencies": { - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - } - } - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", - "dev": true - }, - "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", - "dev": true - }, - "eventsource": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", - "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", - "dev": true, - "requires": { - "original": ">=0.0.5" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "expand-braces": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", - "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", - "dev": true, - "requires": { - "array-slice": "^0.2.3", - "array-unique": "^0.2.1", - "braces": "^0.1.2" - }, - "dependencies": { - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz", - "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=", - "dev": true, - "requires": { - "expand-range": "^0.1.0" - } - }, - "expand-range": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz", - "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=", - "dev": true, - "requires": { - "is-number": "^0.1.1", - "repeat-string": "^0.2.2" - } - }, - "is-number": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz", - "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY=", - "dev": true - }, - "repeat-string": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz", - "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4=", - "dev": true - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "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" - } - } - } - }, - "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", - "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-loader": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-2.0.0.tgz", - "integrity": "sha512-YCsBfd1ZGCyonOKLxPiKPdu+8ld9HAaMEvJewzz+b2eTF7uL5Zm/HdBF6FjCrpCMRq25Mi0U1gl4pwn2TlH7hQ==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "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.0.3", - "minimatch": "^3.0.3" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "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" - } - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "follow-redirects": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", - "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", - "dev": true, - "requires": { - "debug": "^3.2.6" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "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.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, - "requires": { - "null-check": "^1.0.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.8.tgz", - "integrity": "sha512-tPvHgPGB7m40CZ68xqFGkKuzN+RnpGmSV+hgeKxhRpbxdqKXUFJGC3yonBOLzQBcJyGpdZFDfCsdOC2KFsXzeA==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true - } - } - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "optional": true, - "requires": { - "globule": "^1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "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" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", - "dev": true, - "optional": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "handle-thing": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", - "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", - "dev": true - }, - "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", - "dev": true, - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - } - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "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" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "http-parser-js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz", - "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", - "dev": true, - "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "dev": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - } - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true, - "optional": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "optional": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inquirer": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", - "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.17.10", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "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", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "internal-ip": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz", - "integrity": "sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q==", - "dev": true, - "requires": { - "default-gateway": "^2.6.0", - "ipaddr.js": "^1.5.2" - } - }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "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 - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "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" - } - } - } - }, - "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-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "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" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "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.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.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "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" - } - } - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "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-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isbinaryfile": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", - "dev": true, - "requires": { - "buffer-alloc": "^1.2.0" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "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 - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "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-api": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.5.tgz", - "integrity": "sha512-meYk1BwDp59Pfse1TvPrkKYgVqAufbdBLEVoqvu/hLLKSaQ054ZTksbNepyc223tMnWdm6AdK2URIJJRqdP87g==", - "dev": true, - "requires": { - "async": "^2.6.1", - "compare-versions": "^3.2.1", - "fileset": "^2.0.3", - "istanbul-lib-coverage": "^2.0.4", - "istanbul-lib-hook": "^2.0.6", - "istanbul-lib-instrument": "^3.2.0", - "istanbul-lib-report": "^2.0.7", - "istanbul-lib-source-maps": "^3.0.5", - "istanbul-reports": "^2.2.3", - "js-yaml": "^3.13.0", - "make-dir": "^2.1.0", - "minimatch": "^3.0.4", - "once": "^1.4.0" - }, - "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.2.0.tgz", - "integrity": "sha512-06IM3xShbNW4NgZv5AP4QH0oHqf1/ivFo8eFys0ZjPXHGldHJQWb3riYOKXqmOqfxXBfxu4B+g/iuhOPZH0RJg==", - "dev": true, - "requires": { - "@babel/generator": "^7.0.0", - "@babel/parser": "^7.0.0", - "@babel/template": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "istanbul-lib-coverage": "^2.0.4", - "semver": "^6.0.0" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - } - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "semver": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", - "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", - "dev": true - } - } - }, - "istanbul-instrumenter-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", - "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", - "dev": true, - "requires": { - "convert-source-map": "^1.5.0", - "istanbul-lib-instrument": "^1.7.3", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "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 - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - } - } - }, - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.6.tgz", - "integrity": "sha512-829DKONApZ7UCiPXcOYWSgkFXa4+vNYoNOt3F+4uDJLKL1OotAoVwvThoEj1i8jmOj7odbYcR3rnaHu+QroaXg==", - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", - "dev": true, - "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.1", - "semver": "^5.3.0" - } - }, - "istanbul-lib-report": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.7.tgz", - "integrity": "sha512-wLH6beJBFbRBLiTlMOBxmb85cnVM1Vyl36N48e4e/aTKSM3WbOx7zbVIH1SQ537fhhsPbX0/C5JB4qsmyRXXyA==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.4", - "make-dir": "^2.1.0", - "supports-color": "^6.0.0" - }, - "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", - "dev": true - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.5.tgz", - "integrity": "sha512-eDhZ7r6r1d1zQPVZehLc3D0K14vRba/eBYkz3rw16DLOrrTzve9RmnkcwrrkWVgO1FL3EK5knujVe5S8QHE9xw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.4", - "make-dir": "^2.1.0", - "rimraf": "^2.6.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", - "dev": true - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.3.tgz", - "integrity": "sha512-T6EbPuc8Cb620LWAYyZ4D8SSn06dY9i1+IgUX2lTH8gbwflMc9Obd33zHTyNX653ybjpamAHS9toKS3E6cGhTw==", - "dev": true, - "requires": { - "handlebars": "^4.1.0" - } - }, - "jasmine": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", - "integrity": "sha1-awicChFXax8W3xG4AUbZHU6Lij4=", - "dev": true, - "requires": { - "exit": "^0.1.2", - "glob": "^7.0.6", - "jasmine-core": "~2.8.0" - }, - "dependencies": { - "jasmine-core": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", - "integrity": "sha1-vMl5rh+f0FcB5F5S5l06XWPxok4=", - "dev": true - } - } - }, - "jasmine-core": { - "version": "2.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", - "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", - "dev": true - }, - "jasmine-spec-reporter": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", - "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", - "dev": true, - "requires": { - "colors": "1.1.2" - } - }, - "jasminewd2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", - "integrity": "sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=", - "dev": true - }, - "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", - "dev": true, - "optional": true - }, - "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.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "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.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "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 - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "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" - } - }, - "jszip": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.1.tgz", - "integrity": "sha512-iCMBbo4eE5rb1VCpm5qXOAaUiRKRUKiItn8ah2YQQx9qymmSAY98eyQfioChEYcVQLh0zxJ3wS4A0mh90AVPvw==", - "dev": true, - "requires": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "set-immediate-shim": "~1.0.1" - } - }, - "karma": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/karma/-/karma-3.0.0.tgz", - "integrity": "sha512-ZTjyuDXVXhXsvJ1E4CnZzbCjSxD6sEdzEsFYogLuZM0yqvg/mgz+O+R1jb0J7uAQeuzdY8kJgx6hSNXLwFuHIQ==", - "dev": true, - "requires": { - "bluebird": "^3.3.0", - "body-parser": "^1.16.1", - "chokidar": "^2.0.3", - "colors": "^1.1.0", - "combine-lists": "^1.0.0", - "connect": "^3.6.0", - "core-js": "^2.2.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.0", - "expand-braces": "^0.1.1", - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "http-proxy": "^1.13.0", - "isbinaryfile": "^3.0.0", - "lodash": "^4.17.4", - "log4js": "^3.0.0", - "mime": "^2.3.1", - "minimatch": "^3.0.2", - "optimist": "^0.6.1", - "qjobs": "^1.1.4", - "range-parser": "^1.2.0", - "rimraf": "^2.6.0", - "safe-buffer": "^5.0.1", - "socket.io": "2.1.1", - "source-map": "^0.6.1", - "tmp": "0.0.33", - "useragent": "2.2.1" - }, - "dependencies": { - "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "karma-chrome-launcher": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", - "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", - "dev": true, - "requires": { - "fs-access": "^1.0.0", - "which": "^1.2.1" - } - }, - "karma-coverage-istanbul-reporter": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.5.tgz", - "integrity": "sha512-yPvAlKtY3y+rKKWbOo0CzBMVTvJEeMOgbMXuVv3yWvS8YtYKC98AU9vFF0mVBZ2RP1E9SgS90+PT6Kf14P3S4w==", - "dev": true, - "requires": { - "istanbul-api": "^2.1.1", - "minimatch": "^3.0.4" - } - }, - "karma-jasmine": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.2.tgz", - "integrity": "sha1-OU8rJf+0pkS5rabyLUQ+L9CIhsM=", - "dev": true - }, - "karma-jasmine-html-reporter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", - "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", - "dev": true, - "requires": { - "karma-jasmine": "^1.0.2" - } - }, - "karma-source-map-support": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.3.0.tgz", - "integrity": "sha512-HcPqdAusNez/ywa+biN4EphGz62MmQyPggUsDfsHqa7tSe4jdsxgvTKuDfIazjL+IOxpVWyT7Pr4dhAV+sxX5Q==", - "dev": true, - "requires": { - "source-map-support": "^0.5.5" - } - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": 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" - } - }, - "less": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/less/-/less-3.8.1.tgz", - "integrity": "sha512-8HFGuWmL3FhQR0aH89escFNBQH/nEiYPP2ltDFdQw2chE28Yx2E3lhAIq9Y2saYwLSwa699s4dBVEfCY8Drf7Q==", - "dev": true, - "requires": { - "clone": "^2.1.2", - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.4.1", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "^2.83.0", - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", - "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "loader-utils": "^1.1.0", - "pify": "^3.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "license-webpack-plugin": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.0.2.tgz", - "integrity": "sha512-GsomZw5VoT20ST8qH2tOjBgbyhn6Pgs9M94g0mbvfBIV1VXufm1iKY+4dbgfTObj1Mp6nSRE3Zf74deOZr0KwA==", - "dev": true, - "requires": { - "webpack-sources": "^1.2.0" - } - }, - "lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dev": true, - "requires": { - "immediate": "~3.0.5" - } - }, - "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.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", - "dev": true - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0" - } - }, - "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.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true, - "optional": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true, - "optional": true - }, - "lodash.tail": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", - "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", - "dev": true - }, - "log4js": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-3.0.6.tgz", - "integrity": "sha512-ezXZk6oPJCWL483zj64pNkMuY/NcRX5MPiB0zE6tjZM137aeusrOnW1ecxgF9cmwMWkBMhjteQxBPoZBh9FDxQ==", - "dev": true, - "requires": { - "circular-json": "^0.5.5", - "date-format": "^1.2.0", - "debug": "^3.1.0", - "rfdc": "^1.1.2", - "streamroller": "0.7.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "magic-string": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", - "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.4" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", - "dev": true - }, - "mamacro": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", - "dev": true - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "math-random": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", - "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", - "dev": true - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "optional": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true, - "optional": true - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "optional": true - }, - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", - "dev": true - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "dev": true, - "requires": { - "mime-db": "1.40.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "mini-css-extract-plugin": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.3.tgz", - "integrity": "sha512-Mxs0nxzF1kxPv4TRi2NimewgXlJqh0rGE30vviCU2WHrpbta6wklnUV9dr9FUtoAHmB3p3LeXEC+ZjgHvB0Dzg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "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.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mixin-object": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", - "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", - "dev": true, - "requires": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" - }, - "dependencies": { - "for-in": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", - "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", - "dev": true - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "neo-async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", - "dev": true - }, - "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", - "dev": true, - "optional": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true, - "optional": true - } - } - }, - "node-libs-browser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", - "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "node-releases": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.15.tgz", - "integrity": "sha512-cKV097BQaZr8LTSRUa2+oc/aX5L8UkZtPQrMSTgiJEeaW7ymTDCoRaGCoaTqk0lqnalcoSHu4wjSl0Cmj2+bMw==", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "node-sass": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.3.tgz", - "integrity": "sha512-XzXyGjO+84wxyH7fV6IwBOTrEBe2f0a6SBze9QWWYR/cL74AcQUks2AsqcCZenl/Fp/JVbuEaLpgrLtocwBUww==", - "dev": true, - "optional": true, - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.10.0", - "node-gyp": "^3.8.0", - "npmlog": "^4.0.0", - "request": "2.87.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "optional": true, - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - } - }, - "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, - "optional": 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, - "optional": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true, - "optional": true - }, - "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.7.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.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "optional": true - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "optional": true, - "requires": { - "punycode": "^1.4.1" - } - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "npm-package-arg": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", - "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.6.0", - "osenv": "^0.1.5", - "semver": "^5.5.0", - "validate-npm-package-name": "^3.0.0" - } - }, - "npm-registry-client": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.6.0.tgz", - "integrity": "sha512-Qs6P6nnopig+Y8gbzpeN/dkt+n7IyVd8f45NTMotGk6Qo7GfBmzwYx6jRLoOOgKiMnaQfYxsuyQlD8Mc3guBhg==", - "dev": true, - "requires": { - "concat-stream": "^1.5.2", - "graceful-fs": "^4.1.6", - "normalize-package-data": "~1.0.1 || ^2.0.0", - "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", - "npmlog": "2 || ^3.1.0 || ^4.0.0", - "once": "^1.3.3", - "request": "^2.74.0", - "retry": "^0.10.0", - "safe-buffer": "^5.1.1", - "semver": "2 >=2.2.1 || 3.x || 4 || 5", - "slide": "^1.1.3", - "ssri": "^5.2.4" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", - "dev": true - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "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 - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "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 - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "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" - } - } - } - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - }, - "dependencies": { - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - } - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "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" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - } - } - }, - "opn": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", - "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", - "dev": true, - "requires": { - "is-wsl": "^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.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "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", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "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, - "optional": 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 - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "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.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "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.2.0" - } - }, - "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", - "dev": true - }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "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", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "portfinder": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.17.tgz", - "integrity": "sha512-syFcRIRzVI1BoEFOCaAiizwDolh1S1YXSodsVhncbhjzjZQulhczNRbqnUl9N31Q4dKGOXsNDqxC2BWBgSMqeQ==", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", - "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-import": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-12.0.0.tgz", - "integrity": "sha512-3KqKRZcaZAvxbY8DVLdd81tG5uKzbUQuiWIvy0o0fzEC42bKacqPYFWbfCQyw6L4LWUaqPz/idvIdbhpgQ32eQ==", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "postcss-value-parser": "^3.2.3", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - } - }, - "postcss-load-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.0.0.tgz", - "integrity": "sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ==", - "dev": true, - "requires": { - "cosmiconfig": "^4.0.0", - "import-cwd": "^2.0.0" - } - }, - "postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-3.0.0.tgz", - "integrity": "sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "optional": true, - "requires": { - "asap": "~2.0.3" - } - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "protractor": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.2.tgz", - "integrity": "sha512-zlIj64Cr6IOWP7RwxVeD8O4UskLYPoyIcg0HboWJL9T79F1F0VWtKkGTr/9GN6BKL+/Q/GmM7C9kFVCfDbP5sA==", - "dev": true, - "requires": { - "@types/q": "^0.0.32", - "@types/selenium-webdriver": "^3.0.0", - "blocking-proxy": "^1.0.0", - "browserstack": "^1.5.1", - "chalk": "^1.1.3", - "glob": "^7.0.3", - "jasmine": "2.8.0", - "jasminewd2": "^2.1.0", - "optimist": "~0.6.0", - "q": "1.4.1", - "saucelabs": "^1.5.0", - "selenium-webdriver": "3.6.0", - "source-map-support": "~0.4.0", - "webdriver-js-extender": "2.1.0", - "webdriver-manager": "^12.0.6" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "dev": true, - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - } - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "webdriver-manager": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.1.tgz", - "integrity": "sha512-L9TEQmZs6JbMMRQI1w60mfps265/NCr0toYJl7p/R2OAk6oXAfwI6jqYP7EWae+d7Ad2S2Aj4+rzxoSjqk3ZuA==", - "dev": true, - "requires": { - "adm-zip": "^0.4.9", - "chalk": "^1.1.1", - "del": "^2.2.0", - "glob": "^7.0.3", - "ini": "^1.3.4", - "minimist": "^1.2.0", - "q": "^1.4.1", - "request": "^2.87.0", - "rimraf": "^2.5.2", - "semver": "^5.3.0", - "xml2js": "^0.4.17" - } - } - } - }, - "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", - "dev": true - }, - "qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", - "dev": true - }, - "randomatic": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - } - }, - "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", - "dev": true - }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", - "dev": true, - "requires": { - "pify": "^2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "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.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "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.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "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.0.0", - "read-pkg": "^1.0.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.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "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": { - "pinkie-promise": "^2.0.0" - } - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "optional": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", - "dev": true - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "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.0" - } - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "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-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "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 - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", - "dev": true - }, - "rfdc": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.2.tgz", - "integrity": "sha512-92ktAgvZhBzYTIK0Mja9uen5q5J3NRVMoDkJL2VMwq6SXjVCgqvQeVP2XAaUY6HT+XpQYeLSjb3UoitBryKmdA==", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - } - }, - "sass-loader": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.1.0.tgz", - "integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==", - "dev": true, - "requires": { - "clone-deep": "^2.0.1", - "loader-utils": "^1.0.1", - "lodash.tail": "^4.1.1", - "neo-async": "^2.5.0", - "pify": "^3.0.0", - "semver": "^5.5.0" - } - }, - "saucelabs": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", - "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", - "dev": true, - "requires": { - "https-proxy-agent": "^2.2.1" - } - }, - "sax": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "optional": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selenium-webdriver": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", - "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", - "dev": true, - "requires": { - "jszip": "^3.1.3", - "rimraf": "^2.5.4", - "tmp": "0.0.30", - "xml2js": "^0.4.17" - }, - "dependencies": { - "tmp": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", - "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.1" - } - } - } - }, - "selfsigned": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz", - "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", - "dev": true, - "requires": { - "node-forge": "0.7.5" - } - }, - "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", - "dev": true - }, - "semver-dsl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "semver-intersect": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz", - "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", - "dev": true, - "requires": { - "semver": "^5.0.0" - } - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", - "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", - "dev": true - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "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 - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", - "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", - "dev": true, - "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^5.0.0", - "mixin-object": "^2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "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 - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "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" - } - } - } - }, - "socket.io": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", - "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", - "dev": true, - "requires": { - "debug": "~3.1.0", - "engine.io": "~3.2.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.1.1", - "socket.io-parser": "~3.2.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "socket.io-adapter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", - "dev": true - }, - "socket.io-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", - "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.2.0", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.2.0", - "to-array": "0.1.4" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "socket.io-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", - "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, - "sockjs-client": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz", - "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", - "dev": true, - "requires": { - "debug": "^2.6.6", - "eventsource": "0.1.6", - "faye-websocket": "~0.11.0", - "inherits": "^2.0.1", - "json3": "^3.3.2", - "url-parse": "^1.1.8" - }, - "dependencies": { - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - } - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - }, - "source-map-loader": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz", - "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==", - "dev": true, - "requires": { - "async": "^2.5.0", - "loader-utils": "^1.1.0" - }, - "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - } - } - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sourcemap-codec": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", - "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", - "dev": true - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", - "dev": true - }, - "spdy": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", - "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", - "dev": true, - "requires": { - "debug": "^2.6.8", - "handle-thing": "^1.2.5", - "http-deceiver": "^1.2.7", - "safe-buffer": "^5.0.1", - "select-hose": "^2.0.0", - "spdy-transport": "^2.0.18" - } - }, - "spdy-transport": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.1.tgz", - "integrity": "sha512-q7D8c148escoB3Z7ySCASadkegMmUZW8Wb/Q1u0/XBgDKMO880rLQDj8Twiew/tYi7ghemKUi/whSYOwE17f5Q==", - "dev": true, - "requires": { - "debug": "^2.6.8", - "detect-node": "^2.0.3", - "hpack.js": "^2.1.6", - "obuf": "^1.1.1", - "readable-stream": "^2.2.9", - "safe-buffer": "^5.0.1", - "wbuf": "^1.7.2" - } - }, - "speed-measure-webpack-plugin": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.1.tgz", - "integrity": "sha512-qVIkJvbtS9j/UeZumbdfz0vg+QfG/zxonAjzefZrqzkr7xOncLVXkeGbTpzd1gjCBM4PmVNkWlkeTVhgskAGSQ==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "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.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stats-webpack-plugin": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.7.0.tgz", - "integrity": "sha512-NT0YGhwuQ0EOX+uPhhUcI6/+1Sq/pMzNuSCBVT4GbFl/ac6I/JZefBcjlECNfAb1t3GOx5dEj1Z7x0cAxeeVLQ==", - "dev": true, - "requires": { - "lodash": "^4.17.4" - } - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "streamroller": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz", - "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==", - "dev": true, - "requires": { - "date-format": "^1.2.0", - "debug": "^3.1.0", - "mkdirp": "^0.5.1", - "readable-stream": "^2.3.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "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.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "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.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "optional": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "style-loader": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.0.tgz", - "integrity": "sha512-uCcN7XWHkqwGVt7skpInW6IGO1tG6ReyFQ1Cseh0VcN6VdcFQi62aG/2F3Y9ueA8x4IVlfaSUxpmQXQD9QrEuQ==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^0.4.5" - }, - "dependencies": { - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", - "dev": true, - "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" - }, - "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "stylus-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", - "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "lodash.clonedeep": "^4.5.0", - "when": "~3.6.x" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "dev": true - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "dev": true, - "optional": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - }, - "terser": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", - "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", - "dev": true, - "requires": { - "commander": "^2.19.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.10" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - } - } - }, - "terser-webpack-plugin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.1.0.tgz", - "integrity": "sha512-61lV0DSxMAZ8AyZG7/A4a3UPlrbOBo8NIQ4tJzLPAdGOQ+yoNC7l5ijEow27lBAL2humer01KLS6bGIMYQxKoA==", - "dev": true, - "requires": { - "cacache": "^11.0.2", - "find-cache-dir": "^2.0.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "terser": "^3.8.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - } - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "thunky": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", - "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", - "dev": true - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "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" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", - "dev": true - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true, - "optional": true - }, - "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 - }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.2" - } - }, - "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" - }, - "tslint": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", - "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" - }, - "dependencies": { - "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "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.0.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 - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz", - "integrity": "sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==", - "dev": true - }, - "uglify-js": { - "version": "3.5.6", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.6.tgz", - "integrity": "sha512-YDKRX8F0Y+Jr7LhoVk0n4G7ltR3Y7qFAj+DtVBthlOgCcIj1hyMigCfousVfn9HKmvJ+qiFlLDwaHx44/e5ZKw==", - "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "uglifyjs-webpack-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", - "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } - } - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-join": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", - "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=", - "dev": true - }, - "url-parse": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.6.tgz", - "integrity": "sha512-/B8AD9iQ01seoXmXf9z/MjLZQIdOoYl/+gvsQF6+mpnxaTfG9P7srYaiqaDMyKkR36XMXfhqSHss5MyFAO8lew==", - "dev": true, - "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "useragent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", - "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", - "dev": true, - "requires": { - "lru-cache": "2.2.x", - "tmp": "0.0.x" - }, - "dependencies": { - "lru-cache": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", - "dev": true - } - } - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", - "dev": true, - "requires": { - "builtins": "^1.0.3" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "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.2.0" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "dev": true - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webdriver-js-extender": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", - "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", - "dev": true, - "requires": { - "@types/selenium-webdriver": "^3.0.0", - "selenium-webdriver": "^3.0.1" - } - }, - "webpack": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.19.1.tgz", - "integrity": "sha512-j7Q/5QqZRqIFXJvC0E59ipLV5Hf6lAnS3ezC3I4HMUybwEDikQBVad5d+IpPtmaQPQArvgUZLXIN6lWijHBn4g==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-module-context": "1.7.6", - "@webassemblyjs/wasm-edit": "1.7.6", - "@webassemblyjs/wasm-parser": "1.7.6", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.1.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "watchpack": "^1.5.0", - "webpack-sources": "^1.2.0" - }, - "dependencies": { - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, - "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "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": ">=0.0.4" - } - } - } - }, - "webpack-dev-middleware": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.3.0.tgz", - "integrity": "sha512-5C5gXtOo1I6+0AEg4UPglYEtu3Rai6l5IiO6aUu65scHXz29dc3oIWMiRwvcNLXgL0HwRkRxa9N02ZjFt4hY8w==", - "dev": true, - "requires": { - "loud-rejection": "^1.6.0", - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "url-join": "^4.0.0", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==", - "dev": true - } - } - }, - "webpack-dev-server": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.8.tgz", - "integrity": "sha512-c+tcJtDqnPdxCAzEEZKdIPmg3i5i7cAHe+B+0xFNK0BlCc2HF/unYccbU7xTgfGc5xxhCztCQzFmsqim+KhI+A==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", - "import-local": "^2.0.0", - "internal-ip": "^3.0.1", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "schema-utils": "^1.0.0", - "selfsigned": "^1.9.1", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.1.5", - "spdy": "^3.4.1", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "webpack-dev-middleware": "3.2.0", - "webpack-log": "^2.0.0", - "yargs": "12.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", - "dev": true, - "requires": { - "xregexp": "4.0.0" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "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", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "webpack-dev-middleware": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.2.0.tgz", - "integrity": "sha512-YJLMF/96TpKXaEQwaLEo+Z4NDK8aV133ROF6xp9pe3gQoS7sxfpXh4Rv9eC+8vCvWfmDjRQaMSlRPbO+9G6jgA==", - "dev": true, - "requires": { - "loud-rejection": "^1.6.0", - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "path-is-absolute": "^1.0.0", - "range-parser": "^1.0.3", - "url-join": "^4.0.0", - "webpack-log": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^2.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", - "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", - "dev": true, - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "webpack-merge": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.4.tgz", - "integrity": "sha512-TmSe1HZKeOPey3oy1Ov2iS3guIZjWvMT2BBJDzzT5jScHTjVC3mpjJofgueEzaEd6ibhxRDD6MIblDr8tzh8iQ==", - "dev": true, - "requires": { - "lodash": "^4.17.5" - } - }, - "webpack-sources": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.2.0.tgz", - "integrity": "sha512-9BZwxR85dNsjWz3blyxdOhTgtnQvv3OEs5xofI0wPYTwu5kaWxS08UuD1oI7WLBLpRO+ylf0ofnXLXWmGb2WMw==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "webpack-subresource-integrity": { - "version": "1.1.0-rc.6", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.6.tgz", - "integrity": "sha512-Az7y8xTniNhaA0620AV1KPwWOqawurVVDzQSpPAeR5RwNbL91GoBSJAAo9cfd+GiFHwsS5bbHepBw1e6Hzxy4w==", - "dev": true, - "requires": { - "webpack-core": "^0.6.8" - } - }, - "websocket-driver": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", - "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, - "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true - }, - "when": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", - "integrity": "sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "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, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "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.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "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.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - }, - "dependencies": { - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - } - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true - }, - "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", - "dev": true - }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", - "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": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "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, - "optional": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "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, - "optional": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true, - "optional": true - } - } - }, - "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, - "optional": 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, - "optional": true - } - } - }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true - }, - "zone.js": { - "version": "0.8.29", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.29.tgz", - "integrity": "sha512-mla2acNCMkWXBD+c+yeUrBUrzOxYMNFdQ6FGfigGGtEVBPJx07BQeJekjt9DmH1FtZek4E9rE1eRR9qQpxACOQ==" - } - } -} diff --git a/tests/legacy-cli/e2e/utils/project.ts b/tests/legacy-cli/e2e/utils/project.ts index bc2d7348f8fc..276b6adea7d0 100644 --- a/tests/legacy-cli/e2e/utils/project.ts +++ b/tests/legacy-cli/e2e/utils/project.ts @@ -243,9 +243,11 @@ export function useCIDefaults(projectName = 'test-project') { } }) .then(() => updateJsonFile('package.json', json => { - // Use matching versions of Chrome and Webdriver. + // Use matching versions of Chromium and ChromeDriver. + // https://github.com/GoogleChrome/puppeteer/releases + // http://chromedriver.chromium.org/downloads json['scripts']['webdriver-update'] = 'webdriver-manager update' + - ` --standalone false --gecko false --versions.chrome 2.45`; // Supports Chrome v70-72 + ` --standalone false --gecko false --versions.chrome 79.0.3945.16`; // Supports Chrome 79 })) .then(() => npm('run', 'webdriver-update')); @@ -258,8 +260,10 @@ export function useCIChrome(projectDir: string) { return Promise.resolve() .then(() => updateJsonFile('package.json', json => { - // Use matching versions of Chrome and Webdriver. - json['devDependencies']['puppeteer'] = '1.11.0'; // Chromium 72.0.3618.0 (r609904) + // Use matching versions of Chromium (via puppeteer) and ChromeDriver. + // https://github.com/GoogleChrome/puppeteer/releases + // http://chromedriver.chromium.org/downloads + json['devDependencies']['puppeteer'] = '2.0.0'; // Chromium 79.0.3942.0 (r706915) json['devDependencies']['karma-chrome-launcher'] = '~2.2.0'; // Minimum for ChromeHeadless. })) // Use Pupeteer in protractor if a config is found on the project. diff --git a/yarn.lock b/yarn.lock index 43595ae039a2..904bd560f4a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8438,14 +8438,14 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer@1.12.2: - version "1.12.2" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.12.2.tgz#dbc36afc3ba2d7182b1a37523c0081a0e8507c9a" - integrity sha512-xWSyCeD6EazGlfnQweMpM+Hs6X6PhUYhNTHKFj/axNZDq4OmrVERf70isBf7HsnFgB3zOC1+23/8+wCAZYg+Pg== +puppeteer@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-2.0.0.tgz#0612992e29ec418e0a62c8bebe61af1a64d7ec01" + integrity sha512-t3MmTWzQxPRP71teU6l0jX47PHXlc4Z52sQv4LJQSZLq1ttkKS2yGM3gaI57uQwZkNaoGd0+HPPMELZkcyhlqA== dependencies: debug "^4.1.0" extract-zip "^1.6.6" - https-proxy-agent "^2.2.1" + https-proxy-agent "^3.0.0" mime "^2.0.3" progress "^2.0.1" proxy-from-env "^1.0.0" From 1dbd1f5234ce61ee95fb17f840f332ed27963cd3 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 13 Nov 2019 07:14:28 +0000 Subject: [PATCH 0510/1070] build: update rollup to version 1.27.0 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 8489a3691291..e8859f460ca3 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -46,7 +46,7 @@ "raw-loader": "3.1.0", "regenerator-runtime": "0.13.3", "rimraf": "3.0.0", - "rollup": "1.26.5", + "rollup": "1.27.0", "rxjs": "6.5.3", "sass": "1.23.3", "sass-loader": "8.0.0", diff --git a/yarn.lock b/yarn.lock index 904bd560f4a3..7c2fc5a864df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9124,10 +9124,10 @@ rollup@1.25.2: "@types/node" "*" acorn "^7.1.0" -rollup@1.26.5: - version "1.26.5" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.26.5.tgz#c492c8bb88b661e7952a864e40bdec209aa1aa03" - integrity sha512-c6Pv0yWzjYNpy2DIhLFUnyP6e1UTGownr4IfpJcPY/k186RJjpaGGPRwKQ62KCauctG6dgtHt88pw1EGrPRkuA== +rollup@1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.27.0.tgz#7afe0da89c967cec5ccea7e919da6c89a1a68666" + integrity sha512-yaMna4MJ8LLEHhHl1ilgHakylf0LKeQctDxhngZLQ+W57GnXa5vtH7XKaK8zlAhNEhlWiH5YFVFt+QCDPUmNkw== dependencies: "@types/estree" "*" "@types/node" "*" From 913ffca58d3960d7580a8ae0eff9e9db1ad072ea Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 13 Nov 2019 06:21:40 +0000 Subject: [PATCH 0511/1070] build: update pacote to version 10.1.3 --- package.json | 2 +- packages/angular/cli/package.json | 2 +- packages/schematics/update/package.json | 2 +- yarn.lock | 14 ++++---------- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 6077b6db0056..ab58784d794f 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "minimist": "^1.2.0", "npm-registry-client": "8.6.0", "ora": "^4.0.2", - "pacote": "10.1.2", + "pacote": "10.1.3", "pidtree": "^0.3.0", "pidusage": "^2.0.17", "rxjs": "6.5.3", diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 7298c2dd8d30..a5247a78797b 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -38,7 +38,7 @@ "npm-package-arg": "7.0.0", "npm-pick-manifest": "4.0.0", "open": "7.0.0", - "pacote": "10.1.2", + "pacote": "10.1.3", "read-package-tree": "5.3.1", "rimraf": "3.0.0", "semver": "6.3.0", diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index c838611e8275..bf0498e7b05c 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -15,7 +15,7 @@ "@angular-devkit/schematics": "0.0.0", "@yarnpkg/lockfile": "1.1.0", "ini": "1.3.5", - "pacote": "10.1.2", + "pacote": "10.1.3", "semver": "6.3.0", "semver-intersect": "1.4.0", "rxjs": "6.5.3" diff --git a/yarn.lock b/yarn.lock index 7c2fc5a864df..4b8383df633b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7229,11 +7229,6 @@ multicast-dns@^6.0.1: dns-packet "^1.3.1" thunky "^1.0.2" -mutate-fs@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/mutate-fs/-/mutate-fs-2.1.1.tgz#164facf0cd500ed7884143ce96b35273c3c1b4cc" - integrity sha512-WI5pPPUNiWqaK2XdK94AVpxIc8GmZEXYlLfFbWuc4gUtBGHTK92jdPqFdx/lilxgb5Ep7tQ15NqCcJEOeq6wdA== - mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -7871,10 +7866,10 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pacote@10.1.2: - version "10.1.2" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-10.1.2.tgz#c190e2598b7166fe9a10666fa6a77157ca909e04" - integrity sha512-GZBuHd3fu3lpze7xOPW9823v6gA4PdbYO3DjprexRkckRbpWe/KXRUvOQvMpLOSWa6mJP17Li4Nha5TtVbGYFA== +pacote@10.1.3: + version "10.1.3" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-10.1.3.tgz#fdcd37eadd5540ba1d0ec138367627d62a12db0a" + integrity sha512-U71/gHmr7ICs3jAa8573fu+KmMF9voxHA/L2hh6IiYgH0uWh2npuGNRfr+WhZ+ztzp4Qq8niHRsMeRNZqI+2mg== dependencies: cacache "^13.0.1" chownr "^1.1.3" @@ -7883,7 +7878,6 @@ pacote@10.1.2: lru-cache "^5.1.1" minipass "^3.0.1" minipass-fetch "^1.2.1" - mutate-fs "^2.1.1" npm-package-arg "^7.0.0" npm-packlist "^1.4.6" npm-pick-manifest "^4.0.0" From 1d105eb5691e7a0cf08383f56334ed2dfced3ad3 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 13 Nov 2019 06:21:27 +0000 Subject: [PATCH 0512/1070] build: update caniuse-lite to version 1.0.30001009 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index e8859f460ca3..4ec98f6915ef 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -20,7 +20,7 @@ "babel-loader": "8.0.6", "browserslist": "4.7.2", "cacache": "13.0.1", - "caniuse-lite": "1.0.30001008", + "caniuse-lite": "1.0.30001009", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.5", diff --git a/yarn.lock b/yarn.lock index 4b8383df633b..3e0dfed6781b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2651,7 +2651,12 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001008, caniuse-lite@^1.0.30001004, caniuse-lite@^1.0.30001006: +caniuse-lite@1.0.30001009: + version "1.0.30001009" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001009.tgz#69b77997b882a7aee6af24c8d7d2fa27ee41f348" + integrity sha512-M3rEqHN6SaVjgo4bIik7HsGcWXsi+lI9WA0p51RPMFx5gXfduyOXWJrc0R4xBkSK1pgNf4CNgy5M+6H+WiEP8g== + +caniuse-lite@^1.0.30001004, caniuse-lite@^1.0.30001006: version "1.0.30001008" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001008.tgz#b8841b1df78a9f5ed9702537ef592f1f8772c0d9" integrity sha512-b8DJyb+VVXZGRgJUa30cbk8gKHZ3LOZTBLaUEEVr2P4xpmFigOCc62CO4uzquW641Ouq1Rm9N+rWLWdSYDaDIw== From 2aa73efa61032d3c663cd14c06b03133df022ef8 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 14 Nov 2019 18:46:40 +0100 Subject: [PATCH 0513/1070] fix(@angular-devkit/schematics): only commit to disk when contents of file changes Fixes: #16191 --- packages/angular_devkit/schematics/src/tree/host-tree.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/schematics/src/tree/host-tree.ts b/packages/angular_devkit/schematics/src/tree/host-tree.ts index fbd626c6a8d2..eab9c9d3809c 100644 --- a/packages/angular_devkit/schematics/src/tree/host-tree.ts +++ b/packages/angular_devkit/schematics/src/tree/host-tree.ts @@ -341,7 +341,9 @@ export class HostTree implements Tree { throw new ContentHasMutatedException(path); } else { const newContent = record.apply(entry.content); - this.overwrite(path, newContent); + if (!newContent.equals(entry.content)) { + this.overwrite(path, newContent); + } } } else { throw new InvalidUpdateRecordException(); From e9551f9624929bc235cbebeeaedf49b1c088ec58 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 14 Nov 2019 18:47:32 +0100 Subject: [PATCH 0514/1070] fix(@schematics/angular): only remove `tslib` from package.json when it's not a dependency Fixes: #16191 --- .../angular/migrations/update-9/add-tslib.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/add-tslib.ts b/packages/schematics/angular/migrations/update-9/add-tslib.ts index ad562fcb41c0..ca4eca9fa776 100644 --- a/packages/schematics/angular/migrations/update-9/add-tslib.ts +++ b/packages/schematics/angular/migrations/update-9/add-tslib.ts @@ -6,16 +6,22 @@ * found in the LICENSE file at https://angular.io/license */ import { Rule } from '@angular-devkit/schematics'; -import { NodeDependencyType, addPackageJsonDependency, removePackageJsonDependency } from '../../utility/dependencies'; +import { NodeDependencyType, addPackageJsonDependency, getPackageJsonDependency, removePackageJsonDependency } from '../../utility/dependencies'; import { latestVersions } from '../../utility/latest-versions'; export function addTsLib(): Rule { return host => { - removePackageJsonDependency(host, 'tslib'); + const tslibDep = getPackageJsonDependency(host, 'tslib'); + + if (tslibDep && tslibDep.type !== NodeDependencyType.Default) { + removePackageJsonDependency(host, 'tslib'); + } + addPackageJsonDependency(host, { - name: 'tslib', - version: latestVersions.TsLib, - type: NodeDependencyType.Default, + name: 'tslib', + version: latestVersions.TsLib, + type: NodeDependencyType.Default, + overwrite: true, }); }; } From d9420cbe40389ed008922f0024ce334c121e96e5 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 14 Nov 2019 13:18:15 +0100 Subject: [PATCH 0515/1070] fix(@angular-devkit/build-angular): fix numberOfComponents in JIT mode Current we are always sending `0` as the number of components in JIT mode because ` Component({` doesn't match the component source --- .../angular_devkit/build_angular/plugins/webpack/analytics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts index 7bf7f0a8ba2c..fe89ed24f6cf 100644 --- a/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts +++ b/packages/angular_devkit/build_angular/plugins/webpack/analytics.ts @@ -158,7 +158,7 @@ export class NgBuildAnalyticsPlugin { // Count the number of `Component({` strings (case sensitive), which happens in __decorate(). // This does not include View Engine AOT compilation, we use the ngfactory for it. - this._stats.numberOfComponents += countOccurrences(module._source.source(), ' Component({'); + this._stats.numberOfComponents += countOccurrences(module._source.source(), 'Component({'); // For Ivy we just count ɵcmp. this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵcmp', true); } From 6e03adb9e2f161a9ba9f8826537bd13047981e79 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 14 Nov 2019 07:37:13 +0000 Subject: [PATCH 0516/1070] build: update caniuse-lite to version 1.0.30001010 --- packages/angular_devkit/build_angular/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 4ec98f6915ef..6041c8389d76 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -20,7 +20,7 @@ "babel-loader": "8.0.6", "browserslist": "4.7.2", "cacache": "13.0.1", - "caniuse-lite": "1.0.30001009", + "caniuse-lite": "1.0.30001010", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.0.5", diff --git a/yarn.lock b/yarn.lock index 3e0dfed6781b..81bce2449b1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2651,10 +2651,10 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@1.0.30001009: - version "1.0.30001009" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001009.tgz#69b77997b882a7aee6af24c8d7d2fa27ee41f348" - integrity sha512-M3rEqHN6SaVjgo4bIik7HsGcWXsi+lI9WA0p51RPMFx5gXfduyOXWJrc0R4xBkSK1pgNf4CNgy5M+6H+WiEP8g== +caniuse-lite@1.0.30001010: + version "1.0.30001010" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001010.tgz#397a14034d384260453cc81994f494626d34b938" + integrity sha512-RA5GH9YjFNea4ZQszdWgh2SC+dpLiRAg4VDQS2b5JRI45OxmbGrYocYHTa9x0bKMQUE7uvHkNPNffUr+pCxSGw== caniuse-lite@^1.0.30001004, caniuse-lite@^1.0.30001006: version "1.0.30001008" From b618c188530ef2b5dad4df6fce5cccc7626e4d1d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 13 Nov 2019 13:53:36 +0000 Subject: [PATCH 0517/1070] fix(@angular-devkit/build-ng-packagr): add tsickle as optional peer dep This way it'll be automatically updated if present. --- packages/angular_devkit/build_ng_packagr/package.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 7b71f4bc762c..bf7a83724ff9 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -11,7 +11,8 @@ "rxjs": "6.5.3" }, "peerDependencies": { - "ng-packagr": "^9.0.0-rc.0" + "ng-packagr": "^9.0.0-rc.0", + "tsickle": "~0.37.1" }, "devDependencies": { "@angular/compiler": "9.0.0-rc.1", @@ -19,5 +20,10 @@ "@angular-devkit/core": "0.0.0", "ng-packagr": "~9.0.0-rc.0", "tslib": "^1.10.0" + }, + "peerDependenciesMeta": { + "tsickle": { + "optional": true + } } -} +} \ No newline at end of file From 29a0ae3b1d164ac91f478c7f4da3fe972edcc1c3 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 13 Nov 2019 10:26:07 +0000 Subject: [PATCH 0518/1070] build: update ora to version 4.0.3 --- .../angular_devkit/schematics/package.json | 2 +- yarn.lock | 61 ++++++++++++++++++- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics/package.json b/packages/angular_devkit/schematics/package.json index 8519e7f11cc4..9c28bad17ab6 100644 --- a/packages/angular_devkit/schematics/package.json +++ b/packages/angular_devkit/schematics/package.json @@ -14,7 +14,7 @@ ], "dependencies": { "@angular-devkit/core": "0.0.0", - "ora": "4.0.2", + "ora": "4.0.3", "rxjs": "6.5.3" } } diff --git a/yarn.lock b/yarn.lock index 81bce2449b1e..ac1964efe81d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -993,6 +993,11 @@ dependencies: "@types/node" "*" +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + "@types/connect-history-api-fallback@*": version "1.3.3" resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.3.tgz#4772b79b8b53185f0f4c9deab09236baf76ee3b4" @@ -1828,6 +1833,14 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.0.tgz#5681f0dcf7ae5880a7841d8831c4724ed9cc0172" + integrity sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -2691,6 +2704,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4 escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -2898,11 +2919,23 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + colors@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -4987,6 +5020,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" @@ -7725,7 +7763,21 @@ optionator@^0.8.1: type-check "~0.3.2" word-wrap "~1.2.3" -ora@4.0.2, ora@^4.0.2: +ora@4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.0.3.tgz#752a1b7b4be4825546a7a3d59256fa523b6b6d05" + integrity sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg== + dependencies: + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + mute-stream "0.0.8" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +ora@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/ora/-/ora-4.0.2.tgz#0e1e68fd45b135d28648b27cf08081fa6e8a297d" integrity sha512-YUOZbamht5mfLxPmk4M35CD/5DuOkAacxlEUbStVXpBAt4fyhBf+vZHI/HRkI++QUp3sNoeA2Gw4C+hi4eGSig== @@ -10139,6 +10191,13 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + symbol-observable@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" From 76b13e2dea49559eb9204bc6366bed5061803611 Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Tue, 12 Nov 2019 11:17:18 -0800 Subject: [PATCH 0519/1070] refactor(@angular/cli): Updates .gitignore to keep out VSCode and Intellij configurations. This also changes the local build script to allow negated .gitignore expressions to support these changes. --- .gitignore | 20 +++++++++++++++++++- scripts/build.ts | 16 ++++++++++++---- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 88895c7481f5..1be6585d718b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,27 @@ dist/ dist-schema/ # IDEs -.idea/ jsconfig.json + +# Intellij IDEA/WebStorm +# https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Also ignore code styles because .editorconfig is used instead. +.idea/codeStyles/ + +# VSCode +# https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore .vscode/ +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +**/*.code-workspace # Typings file. typings/ diff --git a/scripts/build.ts b/scripts/build.ts index 50264bd99958..04a94ed02f14 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -17,15 +17,23 @@ import buildSchema from './build-schema'; const minimatch = require('minimatch'); const tar = require('tar'); -const gitIgnore = fs.readFileSync(path.join(__dirname, '../.gitignore'), 'utf-8') - .split('\n') +const gitIgnoreFiles = fs.readFileSync(path.join(__dirname, '../.gitignore'), 'utf-8') + .split('\n'); +const gitIgnore = gitIgnoreFiles .map(line => line.replace(/#.*/, '')) + .filter((line) => !line.startsWith('!')) .filter(line => !line.match(/^\s*$/)); +const gitIgnoreExcept = gitIgnoreFiles + .filter((line) => line.startsWith('!')) + .map((line) => line.substr(1)); - -function _gitIgnoreMatch(p: string) { +function _gitIgnoreMatch(p: string): boolean { p = path.relative(path.dirname(__dirname), p); + if (gitIgnoreExcept.some((line) => minimatch(p, line))) { + return false; + } + return gitIgnore.some(line => minimatch(p, line)); } From c5671e08699d165941c82ccb8a8837329259fc68 Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Tue, 12 Nov 2019 11:31:49 -0800 Subject: [PATCH 0520/1070] refactor(@angular/cli): Adds Intellij configuration files. This should enable using Intellij IDEA/WebStorm to create the project, run it, and start a debugger. I did my best to make sure my personal configuration didn't leak in, someone else will have to confirm that this works reasonably for them too. --- .idea/angular-cli.iml | 23 +++++++++++++++++++ .idea/misc.xml | 6 +++++ .idea/modules.xml | 8 +++++++ .idea/runConfigurations/Large_Tests.xml | 13 +++++++++++ .../runConfigurations/Large_Tests__Debug_.xml | 13 +++++++++++ .idea/runConfigurations/Tests.xml | 13 +++++++++++ .idea/runConfigurations/Tests__Debug_.xml | 13 +++++++++++ .idea/vcs.xml | 6 +++++ 8 files changed, 95 insertions(+) create mode 100644 .idea/angular-cli.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/runConfigurations/Large_Tests.xml create mode 100644 .idea/runConfigurations/Large_Tests__Debug_.xml create mode 100644 .idea/runConfigurations/Tests.xml create mode 100644 .idea/runConfigurations/Tests__Debug_.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/angular-cli.iml b/.idea/angular-cli.iml new file mode 100644 index 000000000000..06c7515c99ff --- /dev/null +++ b/.idea/angular-cli.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000000..28a804d8932a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000000..6d8c965387b0 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.idea/runConfigurations/Large_Tests.xml b/.idea/runConfigurations/Large_Tests.xml new file mode 100644 index 000000000000..3d4f25fb3a76 --- /dev/null +++ b/.idea/runConfigurations/Large_Tests.xml @@ -0,0 +1,13 @@ + + + + + + - - - - - `); - - await writeFile('browserslist', ` - IE 9 - Safari 10.1 - `); - await ng('build'); - await expectFileToExist('dist/test-project/polyfills-nomodule-es5.js'); - - if (process.env['NG_BUILD_DIFFERENTIAL_FULL']) { - await expectFileToMatch('dist/test-project/index.html', oneLineTrim` - - - - - - - - - - - - `); - } else { - await expectFileToMatch('dist/test-project/index.html', oneLineTrim` - - - - - - - - - - - - `); - } -} From 815a025e93f7647c2b8367896b7ed86effa1b70e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 6 Feb 2020 13:48:13 +0000 Subject: [PATCH 0891/1070] build: update to 9.0.0 final --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 30 ++--- .../build_ng_packagr/package.json | 8 +- packages/ngtools/webpack/package.json | 6 +- .../angular/utility/latest-versions.ts | 7 +- .../webpack/test-app-weird/package.json | 16 +-- .../e2e/assets/webpack/test-app/package.json | 16 +-- .../webpack/test-server-app/package.json | 18 +-- yarn.lock | 118 +++++++++--------- 9 files changed, 111 insertions(+), 112 deletions(-) diff --git a/package.json b/package.json index 5a5aca9c5f14..8a1dab76b72f 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,8 @@ ] }, "devDependencies": { - "@angular/compiler": "9.0.0-rc.14", - "@angular/compiler-cli": "9.0.0-rc.14", + "@angular/compiler": "9.0.0", + "@angular/compiler-cli": "9.0.0", "@bazel/bazel": "2.0.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "1.3.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index c3cd3e35788b..d68de12f1d21 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -70,20 +70,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0-rc.14", - "@angular/cdk": "9.0.0-rc.10", - "@angular/common": "9.0.0-rc.14", - "@angular/compiler": "9.0.0-rc.14", - "@angular/compiler-cli": "9.0.0-rc.14", - "@angular/core": "9.0.0-rc.14", - "@angular/forms": "9.0.0-rc.14", - "@angular/localize": "9.0.0-rc.14", - "@angular/material": "9.0.0-rc.10", - "@angular/platform-browser": "9.0.0-rc.14", - "@angular/platform-browser-dynamic": "9.0.0-rc.14", - "@angular/platform-server": "9.0.0-rc.14", - "@angular/router": "9.0.0-rc.14", - "@angular/service-worker": "9.0.0-rc.14", + "@angular/animations": "9.0.0", + "@angular/cdk": "9.0.0", + "@angular/common": "9.0.0", + "@angular/compiler": "9.0.0", + "@angular/compiler-cli": "9.0.0", + "@angular/core": "9.0.0", + "@angular/forms": "9.0.0", + "@angular/localize": "9.0.0", + "@angular/material": "9.0.0", + "@angular/platform-browser": "9.0.0", + "@angular/platform-browser-dynamic": "9.0.0", + "@angular/platform-server": "9.0.0", + "@angular/router": "9.0.0", + "@angular/service-worker": "9.0.0", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", @@ -101,7 +101,7 @@ "zone.js": "^0.10.0" }, "peerDependencies": { - "@angular/compiler-cli": ">=9.0.0-beta < 10", + "@angular/compiler-cli": ">=9.0.0 < 10", "typescript": ">=3.6 < 3.8" }, "peerDependenciesMeta": { diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 31ddeeec4fc0..43a77465d63b 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -11,14 +11,14 @@ "rxjs": "6.5.4" }, "peerDependencies": { - "ng-packagr": "^9.0.0-rc.7", + "ng-packagr": "^9.0.0", "tsickle": "~0.37.1 || ~0.38.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-rc.14", - "@angular/compiler-cli": "9.0.0-rc.14", + "@angular/compiler": "9.0.0", + "@angular/compiler-cli": "9.0.0", "@angular-devkit/core": "0.0.0", - "ng-packagr": "~9.0.0-rc.7", + "ng-packagr": "~9.0.0", "tslib": "^1.10.0" }, "peerDependenciesMeta": { diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index f818a3f1945d..c9de2fbf4f4a 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -27,13 +27,13 @@ "webpack-sources": "1.4.3" }, "peerDependencies": { - "@angular/compiler-cli": ">=9.0.0-beta < 10", + "@angular/compiler-cli": ">=9.0.0 < 10", "typescript": ">=3.6 < 3.8", "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0-rc.14", - "@angular/compiler-cli": "9.0.0-rc.14", + "@angular/compiler": "9.0.0", + "@angular/compiler-cli": "9.0.0", "typescript": "3.7.5", "webpack": "4.41.6" } diff --git a/packages/schematics/angular/utility/latest-versions.ts b/packages/schematics/angular/utility/latest-versions.ts index d5d9f5ff4153..cd85f912f33b 100644 --- a/packages/schematics/angular/utility/latest-versions.ts +++ b/packages/schematics/angular/utility/latest-versions.ts @@ -8,7 +8,7 @@ export const latestVersions = { // These versions should be kept up to date with latest Angular peer dependencies. - Angular: '~9.0.0-rc.14', + Angular: '~9.0.0', RxJs: '~6.5.4', ZoneJs: '~0.10.2', TypeScript: '~3.7.5', @@ -16,10 +16,11 @@ export const latestVersions = { // The versions below must be manually updated when making a new devkit release. // For our e2e tests, these versions must match the latest tag present on the branch. - // During RC periods they will not match the latest RC though, and should not be updated. + // During RC periods they will not match the latest RC until there's a new git tag, and + // should not be updated. DevkitBuildAngular: '~0.900.0-next.19', DevkitBuildNgPackagr: '~0.900.0-next.19', DevkitBuildWebpack: '~0.900.0-next.19', - ngPackagr: '^9.0.0-rc.8', + ngPackagr: '^9.0.0', }; diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json index 89f2612aecff..4ee98497234f 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app-weird/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "9.0.0-next.11", - "@angular/compiler": "9.0.0-next.11", - "@angular/compiler-cli": "9.0.0-next.11", - "@angular/core": "9.0.0-next.11", - "@angular/platform-browser": "9.0.0-next.11", - "@angular/platform-browser-dynamic": "9.0.0-next.11", - "@angular/platform-server": "9.0.0-next.11", - "@angular/router": "9.0.0-next.11", + "@angular/common": "9.0.0", + "@angular/compiler": "9.0.0", + "@angular/compiler-cli": "9.0.0", + "@angular/core": "9.0.0", + "@angular/platform-browser": "9.0.0", + "@angular/platform-browser-dynamic": "9.0.0", + "@angular/platform-server": "9.0.0", + "@angular/router": "9.0.0", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.2", diff --git a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json index b068a17fd97e..f51413216fd4 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-app/package.json @@ -2,14 +2,14 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/common": "9.0.0-next.11", - "@angular/compiler": "9.0.0-next.11", - "@angular/compiler-cli": "9.0.0-next.11", - "@angular/core": "9.0.0-next.11", - "@angular/platform-browser": "9.0.0-next.11", - "@angular/platform-browser-dynamic": "9.0.0-next.11", - "@angular/platform-server": "9.0.0-next.11", - "@angular/router": "9.0.0-next.11", + "@angular/common": "9.0.0", + "@angular/compiler": "9.0.0", + "@angular/compiler-cli": "9.0.0", + "@angular/core": "9.0.0", + "@angular/platform-browser": "9.0.0", + "@angular/platform-browser-dynamic": "9.0.0", + "@angular/platform-server": "9.0.0", + "@angular/router": "9.0.0", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.0", diff --git a/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json b/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json index 31096c2551f6..85e57a5da5b5 100644 --- a/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json +++ b/tests/legacy-cli/e2e/assets/webpack/test-server-app/package.json @@ -2,15 +2,15 @@ "name": "test", "license": "MIT", "dependencies": { - "@angular/animations": "9.0.0-next.11", - "@angular/common": "9.0.0-next.11", - "@angular/compiler": "9.0.0-next.11", - "@angular/compiler-cli": "9.0.0-next.11", - "@angular/core": "9.0.0-next.11", - "@angular/platform-browser": "9.0.0-next.11", - "@angular/platform-browser-dynamic": "9.0.0-next.11", - "@angular/platform-server": "9.0.0-next.11", - "@angular/router": "9.0.0-next.11", + "@angular/animations": "9.0.0", + "@angular/common": "9.0.0", + "@angular/compiler": "9.0.0", + "@angular/compiler-cli": "9.0.0", + "@angular/core": "9.0.0", + "@angular/platform-browser": "9.0.0", + "@angular/platform-browser-dynamic": "9.0.0", + "@angular/platform-server": "9.0.0", + "@angular/router": "9.0.0", "@ngtools/webpack": "0.0.0", "core-js": "^3.0.0", "rxjs": "^6.4.2", diff --git a/yarn.lock b/yarn.lock index 46a651e6a246..b0dfc76b128b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,27 +2,27 @@ # yarn lockfile v1 -"@angular/animations@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0-rc.14.tgz#61e6057c2ec1482d0dd5b80db5503ba243f70c3f" - integrity sha512-7a5kFxqwWXJDh4dWvmA58TErovEPNsh1Oq+/k9HLqYLVT07QFo3zPm1Tu8v2yfzste1Mjzff0+TNbVR1QaCOBQ== - -"@angular/cdk@9.0.0-rc.10": - version "9.0.0-rc.10" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-9.0.0-rc.10.tgz#4ead5c1cf8b4c201771dbbf36cfa116e2ff155d8" - integrity sha512-ZRS39Ht2xsgimLzXw0stzrqgUi15MA8khnIw7Dda9GRQqcBEBXlGP72JRbN9AB5kvG+jaFoSffFS5QTWLmOhZQ== +"@angular/animations@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0.tgz#8d2b852c5273bcc161d13f82faaf3566ab562951" + integrity sha512-jB8+SC3vMztW5zt5UYVmtVwqIWE33UyEjbP5JPba3I3bLRK5E059LcJmN1rSdJHItgIAdG9Y1I0WJ6aiSFyp4Q== + +"@angular/cdk@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-9.0.0.tgz#5734817ae97044f90d304fa0f25c9c1a7fa0bf96" + integrity sha512-2kYpyYbewIB6fubSIDMvSprJLNplRZoL/AtXW3od4dLyRxtzX+7iWTAtzUG/dhq8CKev0lpd1HENh5lLR/Lhjw== optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0-rc.14.tgz#9857a831d457698a2eb5d8aad4559bc4d095f74f" - integrity sha512-q+5f4SvJ2VQQ+CvfO4vTA/hePCfsk2HGRUQ6plRcOArQn50ZWUertFam7WH6GIcNFkNpa5G9s7en9NJegOmzbg== +"@angular/common@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0.tgz#0e3b2452d42f87d1825a448a31ad72c593ee0785" + integrity sha512-ZMmEClGtUNJwV5CBlqcSHPIsNyz6WU/GvKWFzJ5VZc68oeg1e7lqfNMNIC47TjyolNJ7VSpNlyrKjzfdBlmqVw== -"@angular/compiler-cli@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0-rc.14.tgz#ebd1bcc92bb3c09fa6dc354625c15b10827bcdb7" - integrity sha512-m7SdePYPzK5L7FpH3cJuHSvaf239ddzgctot0uDljdbRSoW+3GZpqdObWtCsb6XXErTEV69nUJehwfnQU4hSPQ== +"@angular/compiler-cli@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0.tgz#ecce680820725885fed298af69946bdaa12d73d3" + integrity sha512-6L3swd3Z2ceAapmioml6z7yu3bYC2aVm3/rgK7eCoZtPcevuvTpGnXcFSVvNgByV51GntgInThPbMx0xY23Rvw== dependencies: canonical-path "1.0.0" chokidar "^3.0.0" @@ -36,62 +36,62 @@ source-map "^0.6.1" yargs "13.1.0" -"@angular/compiler@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0-rc.14.tgz#193daadd1e6cb8b14876731b76783d661c53d90f" - integrity sha512-9ddYwE1fi99kFxq8s/vfhd7RJ17+HX53PVwztXTn/2pOzk860I0NOm6GjeC0uGl5b/SwilX3XZh999Dv73xrFQ== +"@angular/compiler@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0.tgz#87e0bef4c369b6cadae07e3a4295778fc93799d5" + integrity sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ== -"@angular/core@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0-rc.14.tgz#36efd9cae711512c52cf0805b70b9132d7b5c829" - integrity sha512-WK2Uf7Z4w8GGT0KzctshPF8U7FXNIqx6oBmZV48yaupD4/FymcA7lnT8zPSZMEE121pYmbaW588BRscoBFr65A== +"@angular/core@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0.tgz#227dc53e1ac81824f998c6e76000b7efc522641e" + integrity sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w== -"@angular/forms@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0-rc.14.tgz#534abf14635f63af3528571b94cb2e2bfb537624" - integrity sha512-HL7JklXAytx0/rW7hwgxu+mgSlZs3MpqI14W0eEpi0MP42kViSSHkbEB1qV8IGa/59PFwxSGIK6WZRqavxQsTQ== +"@angular/forms@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0.tgz#2017e4ddee101fa57dc5dc9ba1139b1f02499422" + integrity sha512-SIYJc0Rgaihow1t+iiwSFGEvvRgssgUuxwIYbMfCp1Sx513K+JX9nVFXqU+dcGj/eF1u5wwYwbvlVyuMQLzmXg== -"@angular/localize@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0-rc.14.tgz#2693cc50ea75d009188bc3896a951083a4a6a4bb" - integrity sha512-vLW6aHHpOOv7jnv1CthtC2bD5Z7TugwX0mvqP4BPU86PS/7mZWkUNRSneF1OiTYzJvk/OEBdzEL2sUs7EMqyLw== +"@angular/localize@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0.tgz#d7b428e2784a2c35430ff47c823b70c514fa0016" + integrity sha512-T1dtjqT6BDjWLvtF81RsCBdo+hiORLiNKpSD1wXmHF1L/GMKP+EDODvBDMgnyt4NlSn+HzBeSxE+XPWsHub6cg== dependencies: "@babel/core" "7.8.3" glob "7.1.2" yargs "13.1.0" -"@angular/material@9.0.0-rc.10": - version "9.0.0-rc.10" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-9.0.0-rc.10.tgz#9adf147a7ffc75fc5308718dd6be0602cd71ca39" - integrity sha512-r1PJK0k/3lv2+Sj+KsWwFmhA28vwTUj9HzDzWHpUbrAGqoB9HP0c73q+K4+vrocdlg4Xm9YMBgjfH0cBblI0qA== +"@angular/material@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-9.0.0.tgz#655bfd4d4047337e84480b9f92be8e81af375b92" + integrity sha512-QxN2rmR5mvg2YE1NoIGWLpbnmcJq0iFidzy6odzvN17+XkoCJBZ65IdYsHrJgfwGpoIy6bywuixrDHHcSh9I5w== -"@angular/platform-browser-dynamic@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0-rc.14.tgz#c8d1945e100d12283b80c6d5f32d5b2ad95be5f1" - integrity sha512-YZlu0a327b6l/VCbQUzTiuxcM6etHGDMr2kEKRLec+fs4ZGxuItIb5MgSHrUpFAc7K+MyNYk6Kzp3d0TIADNOw== +"@angular/platform-browser-dynamic@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0.tgz#1b87355c20d0b2a046c1914085701a3d5ced52da" + integrity sha512-F1kbEpmDottTemRPEOAz2Te5ABVJ7wypfzBllxqXbdxPHvYLfL8db2dXyiGqABQ3ZFHPLNilrkUTy0sbuuU4OA== -"@angular/platform-browser@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0-rc.14.tgz#79773c5c23586c80cb78b8fbdcdedf3443c2b802" - integrity sha512-NfdqEtWs3YDXEtVVfguS5FiSMKtYOpVB7Qwuq5lBcRdmTdAw5dHK3k4MRHXW/rhMC7BHqw24BS6MpULkJY6Jdw== +"@angular/platform-browser@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0.tgz#b9454f29d8edaf024668baa9e07083eef73deac2" + integrity sha512-2PR/o57HjZvKEnAF8ODeqxmeC90oth9dLTMrJNoI5MET0IeErKeI/9Sl5cLQuXC+lSVN5rOMCvDb74VWSno5yw== -"@angular/platform-server@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0-rc.14.tgz#a909b252e2428e703ead19d301f35828a75b180f" - integrity sha512-KG+2209Mz8Xr4qiOLjDqbO2GXDHjB4Q/bxzMv0UzmUoD8MPo+Y0FazITDI3OtOIapoq239M5D8b/CNR8UwHC5Q== +"@angular/platform-server@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0.tgz#1b187e995a4cc641e6c1d3904932b4eb78a88b5d" + integrity sha512-wIHZdv7WCtuZ6pgj1n/H2V7KbUxUBfrb1PJzVnCWzpMQDIf+jrMxLlB2irpYb/HHh4tOem6dHX5JV45A2sJ5/w== dependencies: domino "^2.1.2" xhr2 "^0.1.4" -"@angular/router@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0-rc.14.tgz#5367f10b893e16c33810e3f317efad100cde4201" - integrity sha512-+AUP+yY3HTWUfgd5NBLW2zpWuJSLfQ5z+eCyRnLirh1jFfQ8KJDAbX0yxaUc+Ab0b0q50zMwgwJ2ThEZ2D7Ipg== +"@angular/router@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0.tgz#11784fc8ce9cb3314c7ec1083ff9be7c611181c2" + integrity sha512-yyOcStpgN5t8wGRNO85mo0jplXkntP+v2tmSxNx45pahqmofSFm+QCEFa2zHQuMr7NoiGERhd0Tae7NDCCjtjA== -"@angular/service-worker@9.0.0-rc.14": - version "9.0.0-rc.14" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0-rc.14.tgz#d90f2d206c8b80a8bdf5a8642fdb2903814db280" - integrity sha512-PhpOSPWPXKQWggzzqLBywVYAPOL+0A2ei183G7Xzk2HdN0+UjyOyP0DgjBl6pEq+VakkuT4at5l3Gz0PZs0xCQ== +"@angular/service-worker@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0.tgz#579014140019bc1e996091b98a0d64790d082350" + integrity sha512-QZjA9Syhz3sCcugUknXorScgSjVS6jhaCZilTmfPPaKazw0tASNw1SfjrZ60aOPCmoJGRkWyP/Hzzi/KKVSQjQ== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": version "7.8.3" @@ -4995,7 +4995,6 @@ fsevents@^1.2.7: dependencies: bindings "^1.5.0" nan "^2.12.1" - node-pre-gyp "*" fsevents@~2.1.2: version "2.1.2" @@ -7708,7 +7707,7 @@ neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -ng-packagr@~9.0.0-rc.7: +ng-packagr@~9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-9.0.0.tgz#a91d2092f95e51e6746f78a2c9b4fc9badb80d45" integrity sha512-uK9sdOmjAQJgKh/3UN0/3XmV5IRTmdQt3vRElwbmd+rAl8Z/g/h2CMLIXqhLOfWcLnYzepkhoXlQPbiwpxAw0w== @@ -9888,7 +9887,6 @@ sass@1.25.0, sass@^1.23.0: "sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz": version "0.0.0" - uid dc5efcd2be24ddb099a85b923d6e754754651fa8 resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8" saucelabs@^1.5.0: From 6076bae68f097e8b6345e798192a53c79e38de42 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 12 Feb 2020 06:14:59 +0000 Subject: [PATCH 0892/1070] build: update semver to version 7.1.3 --- package.json | 2 +- yarn.lock | 120 +++++---------------------------------------------- 2 files changed, 12 insertions(+), 110 deletions(-) diff --git a/package.json b/package.json index 8a1dab76b72f..9a86fbabab29 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "quicktype-core": "^6.0.15", "rxjs": "6.5.4", "sauce-connect-proxy": "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz", - "semver": "7.1.2", + "semver": "7.1.3", "source-map": "^0.7.3", "source-map-support": "^0.5.0", "spdx-satisfies": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index b0dfc76b128b..a7119bc47a56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4048,11 +4048,6 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - detect-node@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" @@ -4959,13 +4954,6 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - fs-minipass@^2.0.0, fs-minipass@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -5599,7 +5587,7 @@ husky@^4.0.10: slash "^3.0.0" which-pm-runs "^1.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -5616,7 +5604,7 @@ iferr@^0.1.5: resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= -ignore-walk@^3.0.1, ignore-walk@^3.0.3: +ignore-walk@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== @@ -7526,14 +7514,6 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - minipass@^3.0.0, minipass@^3.0.1, minipass@^3.1.0, minipass@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" @@ -7541,13 +7521,6 @@ minipass@^3.0.0, minipass@^3.0.1, minipass@^3.1.0, minipass@^3.1.1: dependencies: yallist "^4.0.0" -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - minizlib@^2.0.0, minizlib@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.0.tgz#fd52c645301ef09a63a2c209697c294c6ce02cf3" @@ -7688,15 +7661,6 @@ ncp@~2.0.0: resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= -needle@^2.2.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.2.tgz#3342dea100b7160960a450dc8c22160ac712a528" - integrity sha512-DUzITvPVDUy6vczKKYTnWc/pBZ0EnjMJnQ3y+Jo5zfKFimJs7S3HFCxCRZYB9FUZcrzUQr3WsmvZgddMEIZv6w== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -7788,22 +7752,6 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - node-releases@^1.1.47: version "1.1.48" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.48.tgz#7f647f0c453a0495bcd64cbd4778c26035c2f03a" @@ -7905,15 +7853,6 @@ npm-package-arg@8.0.0, npm-package-arg@^8.0.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.6: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - npm-packlist@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-2.0.3.tgz#0044b36971039fc3b46a090ed663feb547147257" @@ -7976,7 +7915,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -"npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@^4.0.2: +"npmlog@2 || ^3.1.0 || ^4.0.0": version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -9294,7 +9233,7 @@ raw-loader@4.0.0: loader-utils "^1.2.3" schema-utils "^2.5.0" -rc@^1.2.7, rc@^1.2.8: +rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -9896,7 +9835,7 @@ saucelabs@^1.5.0: dependencies: https-proxy-agent "^2.2.1" -sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4: +sax@>=0.6.0, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -10008,6 +9947,11 @@ semver@7.1.2, semver@^7.0.0, semver@^7.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.2.tgz#847bae5bce68c5d08889824f02667199b70e3d87" integrity sha512-BJs9T/H8sEVHbeigqzIEo57Iu/3DG6c4QoqTfbQB3BPA4zgzAomh/Fk9E7QtjWQ8mx2dgA9YCfSF4y9k9bHNpQ== +semver@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" + integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== + semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -10850,19 +10794,6 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar@^4.4.2: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - tar@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.1.tgz#7b3bd6c313cb6e0153770108f8d70ac298607efa" @@ -11797,35 +11728,6 @@ webpack-subresource-integrity@1.4.0: dependencies: webpack-sources "^1.3.0" -webpack@4.41.5: - version "4.41.5" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.5.tgz#3210f1886bce5310e62bb97204d18c263341b77c" - integrity sha512-wp0Co4vpyumnp3KlkmpM5LWuzvZYayDwM2n17EHFr4qxBBbRokC7DJawPJC7TfSFZ9HZ6GsdH40EBj4UV0nmpw== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-module-context" "1.8.5" - "@webassemblyjs/wasm-edit" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - acorn "^6.2.1" - ajv "^6.10.2" - ajv-keywords "^3.4.1" - chrome-trace-event "^1.0.2" - enhanced-resolve "^4.1.0" - eslint-scope "^4.0.3" - json-parse-better-errors "^1.0.2" - loader-runner "^2.4.0" - loader-utils "^1.2.3" - memory-fs "^0.4.1" - micromatch "^3.1.10" - mkdirp "^0.5.1" - neo-async "^2.6.1" - node-libs-browser "^2.2.1" - schema-utils "^1.0.0" - tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" - watchpack "^1.6.0" - webpack-sources "^1.4.1" - webpack@4.41.6: version "4.41.6" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.6.tgz#12f2f804bf6542ef166755050d4afbc8f66ba7e1" @@ -12080,7 +11982,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== From ac371751ba98eb60413aef00d63790a039be342b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 12 Feb 2020 06:14:47 +0000 Subject: [PATCH 0893/1070] build: update semver to version 7.1.3 --- packages/angular/cli/package.json | 2 +- packages/angular_devkit/build_angular/package.json | 2 +- packages/schematics/update/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index 27335b9e2fa2..0554d8efb3cc 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -41,7 +41,7 @@ "pacote": "10.3.2", "read-package-tree": "5.3.1", "rimraf": "3.0.2", - "semver": "7.1.2", + "semver": "7.1.3", "symbol-observable": "1.2.0", "universal-analytics": "0.4.20", "uuid": "3.4.0" diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index d68de12f1d21..01788924fdcb 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -50,7 +50,7 @@ "rxjs": "6.5.4", "sass": "1.25.0", "sass-loader": "8.0.2", - "semver": "7.1.2", + "semver": "7.1.3", "source-map": "0.7.3", "source-map-support": "0.5.16", "source-map-loader": "0.2.4", diff --git a/packages/schematics/update/package.json b/packages/schematics/update/package.json index 5c7bae19b503..d108b58fd108 100644 --- a/packages/schematics/update/package.json +++ b/packages/schematics/update/package.json @@ -18,7 +18,7 @@ "npm-package-arg": "^8.0.0", "pacote": "10.3.2", "rxjs": "6.5.4", - "semver": "7.1.2", + "semver": "7.1.3", "semver-intersect": "1.4.0" } } From 8deb4cbd1b33475dae2d181a29340223490b4635 Mon Sep 17 00:00:00 2001 From: Ivan Date: Wed, 12 Feb 2020 14:04:27 +0300 Subject: [PATCH 0894/1070] fix(@angular/cli): add skipTests to @schematics/angular:component in config schema --- packages/angular/cli/lib/config/schema.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index 66a59c26b58d..c5e958175ad7 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -157,6 +157,11 @@ "enum": ["Emulated", "Native", "None", "ShadowDom"], "type": "string", "alias": "v" + }, + "skipTests": { + "type": "boolean", + "description": "When true, does not create test files.", + "default": false } } }, From 2335c1f3bf6aa72f642c7e8419d5d0a8eda7090e Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 11 Feb 2020 20:50:59 +0100 Subject: [PATCH 0895/1070] fix(@schematics/angular) remove file extension from zone flags comment --- .../angular/application/files/src/polyfills.ts.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/src/polyfills.ts.template b/packages/schematics/angular/application/files/src/polyfills.ts.template index aa665d6b8740..03711e5d92cb 100644 --- a/packages/schematics/angular/application/files/src/polyfills.ts.template +++ b/packages/schematics/angular/application/files/src/polyfills.ts.template @@ -35,7 +35,7 @@ * will put import in the top of bundle, so user need to create a separate file * in this directory (for example: zone-flags.ts), and put the following flags * into that file, and then add the following code before importing zone.js. - * import './zone-flags.ts'; + * import './zone-flags'; * * The flags allowed in zone-flags.ts are listed here. * From bf04333ed454db89b0bc683ca513e465ed7032ef Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 11 Feb 2020 19:33:41 +0100 Subject: [PATCH 0896/1070] fix(@schematics/angular): add include to type definitions in tsconfig Fixes #16923 --- .../update-9/update-app-tsconfigs.ts | 34 ++++++++++++++----- .../update-9/update-app-tsconfigs_spec.ts | 3 +- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts index 05d454f612ee..df9fecc1ff7c 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs.ts @@ -5,7 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ -import { JsonAstObject, logging } from '@angular-devkit/core'; +import { JsonAstObject, join, logging, normalize } from '@angular-devkit/core'; import { Rule, Tree, UpdateRecorder } from '@angular-devkit/schematics'; import { dirname, relative } from 'path'; import { @@ -36,23 +36,29 @@ export function updateApplicationTsConfigs(): Rule { // Add `module` option in the workspace tsconfig updateModuleCompilerOption(tree, '/tsconfig.json'); - for (const { target } of getTargets(workspace, 'build', Builders.Browser)) { - updateTsConfig(tree, target, Builders.Browser, logger); + for (const { target, project } of getTargets(workspace, 'build', Builders.Browser)) { + updateTsConfig(tree, target, project, Builders.Browser, logger); } - for (const { target } of getTargets(workspace, 'server', Builders.Server)) { - updateTsConfig(tree, target, Builders.Server, logger); + for (const { target, project } of getTargets(workspace, 'server', Builders.Server)) { + updateTsConfig(tree, target, project, Builders.Server, logger); } - for (const { target } of getTargets(workspace, 'test', Builders.Karma)) { - updateTsConfig(tree, target, Builders.Karma, logger); + for (const { target, project } of getTargets(workspace, 'test', Builders.Karma)) { + updateTsConfig(tree, target, project, Builders.Karma, logger); } return tree; }; } -function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: Builders, logger: logging.LoggerApi) { +function updateTsConfig( + tree: Tree, + builderConfig: JsonAstObject, + project: JsonAstObject, + builderName: Builders, + logger: logging.LoggerApi, +) { const options = getAllOptions(builderConfig); for (const option of options) { let recorder: UpdateRecorder; @@ -108,6 +114,18 @@ function updateTsConfig(tree: Tree, builderConfig: JsonAstObject, builderName: B recorder.insertLeft(start.offset, tsInclude.text.replace('.ts', '.d.ts')); tree.commitUpdate(recorder); } + } else { + // Includes are not present, add includes to dts files + // By default when 'include' nor 'files' fields are used TypeScript + // will include all ts files. + const srcRootAst = findPropertyInAstObject(project, 'sourceRoot'); + const include = srcRootAst?.kind === 'string' + ? join(normalize(srcRootAst.value), '**/*.d.ts') + : '**/*.d.ts'; + + recorder = tree.beginUpdate(tsConfigPath); + insertPropertyInAstObjectInOrder(recorder, tsConfigAst, 'include', [include], 2); + tree.commitUpdate(recorder); } const files = findPropertyInAstObject(tsConfigAst, 'files'); diff --git a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts index 840b7c3492ca..cd27a12af0af 100644 --- a/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts +++ b/packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts @@ -60,9 +60,10 @@ describe('Migration to version 9', () => { it('should update apps tsConfig with stricter files inclusions', async () => { overrideJsonFile(tree, 'tsconfig.app.json', defaultTsConfigOptions); const tree2 = await schematicRunner.runSchematicAsync('workspace-version-9', {}, tree.branch()).toPromise(); - const { exclude, files } = JSON.parse(tree2.readContent('tsconfig.app.json')); + const { exclude, files, include } = JSON.parse(tree2.readContent('tsconfig.app.json')); expect(exclude).toBeUndefined(); expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']); + expect(include).toEqual(['src/**/*.d.ts']); }); it('should resolve paths correctly even if they are using windows separators', async () => { From c5156977f23f3414e5bb4b2dc3d1fcf153d7174c Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 11 Feb 2020 11:56:26 -0500 Subject: [PATCH 0897/1070] fix(@angular-devkit/build-angular): provide explicit return type for extract-i18n builder Fixes: #16934 --- .../angular_devkit/build_angular/src/extract-i18n/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts index c3bb25a4bd52..402043528381 100644 --- a/packages/angular_devkit/build_angular/src/extract-i18n/index.ts +++ b/packages/angular_devkit/build_angular/src/extract-i18n/index.ts @@ -10,7 +10,7 @@ import { createBuilder, targetFromTargetString, } from '@angular-devkit/architect'; -import { WebpackLoggingCallback, runWebpack } from '@angular-devkit/build-webpack'; +import { BuildResult, WebpackLoggingCallback, runWebpack } from '@angular-devkit/build-webpack'; import { JsonObject } from '@angular-devkit/core'; import * as path from 'path'; import * as webpack from 'webpack'; @@ -51,7 +51,10 @@ class InMemoryOutputPlugin { } } -export async function execute(options: ExtractI18nBuilderOptions, context: BuilderContext) { +export async function execute( + options: ExtractI18nBuilderOptions, + context: BuilderContext, +): Promise { // Check Angular version. assertCompatibleAngularVersion(context.workspaceRoot, context.logger); From 60918794287542b4f5aabfdf195089ea8d357f37 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 11 Feb 2020 11:05:35 -0500 Subject: [PATCH 0898/1070] fix(@angular-devkit/build-angular): generate correct filenames when targeting ESNext Fixes: #16906 --- .../models/webpack-configs/utils.ts | 12 ++++-- .../build_angular/src/browser/index.ts | 4 +- .../build_angular/src/utils/action-cache.ts | 4 +- .../build_angular/src/utils/process-bundle.ts | 6 +-- .../differential_loading_spec_large.ts | 42 +++++++++++++++++++ 5 files changed, 58 insertions(+), 10 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts index 15ce3467e19d..dc78f2fd8f13 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/utils.ts @@ -110,9 +110,15 @@ export function getEsVersionForFileName( scriptTargetOverride: ScriptTarget | undefined, esVersionInFileName = false, ): string { - return scriptTargetOverride && esVersionInFileName - ? '-' + ScriptTarget[scriptTargetOverride].toLowerCase() - : ''; + if (!esVersionInFileName || scriptTargetOverride === undefined) { + return ''; + } + + if (scriptTargetOverride === ScriptTarget.ESNext) { + return '-esnext'; + } + + return '-' + ScriptTarget[scriptTargetOverride].toLowerCase(); } export function isPolyfillsEntry(name: string) { diff --git a/packages/angular_devkit/build_angular/src/browser/index.ts b/packages/angular_devkit/build_angular/src/browser/index.ts index 86e7ce3cb09e..a54c68a0bdd9 100644 --- a/packages/angular_devkit/build_angular/src/browser/index.ts +++ b/packages/angular_devkit/build_angular/src/browser/index.ts @@ -352,7 +352,7 @@ export function buildWebpackBrowser( } workerReplacements.push([ file.file, - file.file.replace(/\-es20\d{2}/, '-es5'), + file.file.replace(/\-(es20\d{2}|esnext)/, '-es5'), ]); } else { continue; @@ -433,7 +433,7 @@ export function buildWebpackBrowser( // Add the newly created ES5 bundles to the index as nomodule scripts const newFilename = es5Polyfills ? file.file.replace(/\-es20\d{2}/, '') - : file.file.replace(/\-es20\d{2}/, '-es5'); + : file.file.replace(/\-(es20\d{2}|esnext)/, '-es5'); noModuleFiles.push({ ...file, file: newFilename }); } diff --git a/packages/angular_devkit/build_angular/src/utils/action-cache.ts b/packages/angular_devkit/build_angular/src/utils/action-cache.ts index 6ba2bae136ce..eb99cd4579a4 100644 --- a/packages/angular_devkit/build_angular/src/utils/action-cache.ts +++ b/packages/angular_devkit/build_angular/src/utils/action-cache.ts @@ -154,7 +154,7 @@ export class BundleActionCache { cacheEntry = entries[CacheKey.DownlevelCode]; if (cacheEntry) { result.downlevel = { - filename: action.filename.replace(/\-es20\d{2}/, '-es5'), + filename: action.filename.replace(/\-(es20\d{2}|esnext)/, '-es5'), size: cacheEntry.size, integrity: cacheEntry.integrity, }; @@ -164,7 +164,7 @@ export class BundleActionCache { cacheEntry = entries[CacheKey.DownlevelMap]; if (cacheEntry) { result.downlevel.map = { - filename: action.filename.replace(/\-es20\d{2}/, '-es5') + '.map', + filename: action.filename.replace(/\-(es20\d{2}|esnext)/, '-es5') + '.map', size: cacheEntry.size, }; diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index c1f9d9149818..e6b34f90d6bb 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -110,7 +110,7 @@ export async function process(options: ProcessBundleOptions): Promise { expect(Object.keys(files)).toEqual(jasmine.arrayWithExactContents(expectedOutputs)); }); + it('emits all the neccessary files for target of ESNext', async () => { + host.replaceInFile( + 'tsconfig.json', + '"target": "es2015",', + `"target": "esnext",`, + ); + + const { files } = await browserBuild(architect, host, target); + + const expectedOutputs = [ + 'favicon.ico', + 'index.html', + + 'main-esnext.js', + 'main-esnext.js.map', + 'main-es5.js', + 'main-es5.js.map', + + 'polyfills-esnext.js', + 'polyfills-esnext.js.map', + 'polyfills-es5.js', + 'polyfills-es5.js.map', + + 'runtime-esnext.js', + 'runtime-esnext.js.map', + 'runtime-es5.js', + 'runtime-es5.js.map', + + 'styles-esnext.js', + 'styles-esnext.js.map', + 'styles-es5.js', + 'styles-es5.js.map', + + 'vendor-esnext.js', + 'vendor-esnext.js.map', + 'vendor-es5.js', + 'vendor-es5.js.map', + ] as PathFragment[]; + + expect(Object.keys(files)).toEqual(jasmine.arrayWithExactContents(expectedOutputs)); + }); + it('deactivates differential loading for watch mode', async () => { const { files } = await browserBuild(architect, host, target, { watch: true }); From 3030b839c4733d9cae591a2fa98acefbe7b9d89c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2020 15:49:03 -0800 Subject: [PATCH 0899/1070] Merge pull request #16863 from angular/renovate/angular build: update angular packages --- package.json | 4 +- .../angular_devkit/build_angular/package.json | 24 ++-- .../build_ng_packagr/package.json | 4 +- packages/ngtools/webpack/package.json | 4 +- tests/legacy-cli/e2e/ng-snapshot/package.json | 28 ++--- yarn.lock | 106 +++++++++--------- 6 files changed, 85 insertions(+), 85 deletions(-) diff --git a/package.json b/package.json index 9a86fbabab29..a8e2ac385c27 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,8 @@ ] }, "devDependencies": { - "@angular/compiler": "9.0.0", - "@angular/compiler-cli": "9.0.0", + "@angular/compiler": "9.0.1", + "@angular/compiler-cli": "9.0.1", "@bazel/bazel": "2.0.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "1.3.0", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 01788924fdcb..14de8c8b5c2e 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -70,20 +70,20 @@ "worker-plugin": "3.2.0" }, "devDependencies": { - "@angular/animations": "9.0.0", + "@angular/animations": "9.0.1", "@angular/cdk": "9.0.0", - "@angular/common": "9.0.0", - "@angular/compiler": "9.0.0", - "@angular/compiler-cli": "9.0.0", - "@angular/core": "9.0.0", - "@angular/forms": "9.0.0", - "@angular/localize": "9.0.0", + "@angular/common": "9.0.1", + "@angular/compiler": "9.0.1", + "@angular/compiler-cli": "9.0.1", + "@angular/core": "9.0.1", + "@angular/forms": "9.0.1", + "@angular/localize": "9.0.1", "@angular/material": "9.0.0", - "@angular/platform-browser": "9.0.0", - "@angular/platform-browser-dynamic": "9.0.0", - "@angular/platform-server": "9.0.0", - "@angular/router": "9.0.0", - "@angular/service-worker": "9.0.0", + "@angular/platform-browser": "9.0.1", + "@angular/platform-browser-dynamic": "9.0.1", + "@angular/platform-server": "9.0.1", + "@angular/router": "9.0.1", + "@angular/service-worker": "9.0.1", "codelyzer": "^5.0.0", "bootstrap": "^4.0.0", "font-awesome": "^4.7.0", diff --git a/packages/angular_devkit/build_ng_packagr/package.json b/packages/angular_devkit/build_ng_packagr/package.json index 43a77465d63b..6aea256588fe 100644 --- a/packages/angular_devkit/build_ng_packagr/package.json +++ b/packages/angular_devkit/build_ng_packagr/package.json @@ -15,8 +15,8 @@ "tsickle": "~0.37.1 || ~0.38.0" }, "devDependencies": { - "@angular/compiler": "9.0.0", - "@angular/compiler-cli": "9.0.0", + "@angular/compiler": "9.0.1", + "@angular/compiler-cli": "9.0.1", "@angular-devkit/core": "0.0.0", "ng-packagr": "~9.0.0", "tslib": "^1.10.0" diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json index c9de2fbf4f4a..bde194947b15 100644 --- a/packages/ngtools/webpack/package.json +++ b/packages/ngtools/webpack/package.json @@ -32,8 +32,8 @@ "webpack": "^4.0.0" }, "devDependencies": { - "@angular/compiler": "9.0.0", - "@angular/compiler-cli": "9.0.0", + "@angular/compiler": "9.0.1", + "@angular/compiler-cli": "9.0.1", "typescript": "3.7.5", "webpack": "4.41.6" } diff --git a/tests/legacy-cli/e2e/ng-snapshot/package.json b/tests/legacy-cli/e2e/ng-snapshot/package.json index f81036d19c3a..c536328cf6d0 100644 --- a/tests/legacy-cli/e2e/ng-snapshot/package.json +++ b/tests/legacy-cli/e2e/ng-snapshot/package.json @@ -2,19 +2,19 @@ "description": "snapshot versions of Angular for e2e testing", "private": true, "dependencies": { - "@angular/animations": "github:angular/animations-builds#2b18049eae9c8578ef1b7ee55d9f1449364bd801", - "@angular/cdk": "github:angular/cdk-builds#4841a91de9533ef174f0bd7d9c7646d65ebaef31", - "@angular/common": "github:angular/common-builds#e092f73bbd84f4d8e7ea28115710910cc38d27a4", - "@angular/compiler": "github:angular/compiler-builds#49b66b2404e78e41581d19d8a26a47299efedc39", - "@angular/compiler-cli": "github:angular/compiler-cli-builds#3dd6dc09b3f98903ee15eaf000be16cbc9e288dd", - "@angular/core": "github:angular/core-builds#9ebe1d1de444ebab4deb0b9ea5051f988f8ab4ba", - "@angular/forms": "github:angular/forms-builds#c19c4578be7fc54eadfb15dc4d43a7a4bfe542fc", - "@angular/language-service": "github:angular/language-service-builds#08fbac6bbf683f8fc25db2c1bc680030e6a19f79", - "@angular/localize": "github:angular/localize-builds#ba4a2cda9ca4d75ac318829f22963c875e8fe6d7", - "@angular/material": "github:angular/material2-builds#b1ebfbfc2049e83178fa63437f50f4407ecc6204", - "@angular/platform-browser": "github:angular/platform-browser-builds#ac06d8fca4d394f78c7381ac89d1f4a4ec163963", - "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#c6236447cfff247b6e029c2b4c81b9b7e7aab671", - "@angular/platform-server": "github:angular/platform-server-builds#fdbe387269993b3090c0fb5a054a57d0ddb91952", - "@angular/router": "github:angular/router-builds#8464145fff6f9f1d382416100fc2b8e4205de1bd" + "@angular/animations": "github:angular/animations-builds#1908d1a5bc25579f41d0dd7a23293a88986948d8", + "@angular/cdk": "github:angular/cdk-builds#d7e08948a9a26953cdd5c387d5c0153b2c4982d8", + "@angular/common": "github:angular/common-builds#3107a5d7be5c45df44f0f095e7ceb0640dd97467", + "@angular/compiler": "github:angular/compiler-builds#d866c45134caea1596f211a47d33e33ccf418e0a", + "@angular/compiler-cli": "github:angular/compiler-cli-builds#6ae16cea767517e5ac2cf79c8315659b98614e1d", + "@angular/core": "github:angular/core-builds#0e75b39d2cf8f7b4c6fd50e56daea5ef2904a8c3", + "@angular/forms": "github:angular/forms-builds#a030e65e5728503beccdbd57c841aa39e2d3da50", + "@angular/language-service": "github:angular/language-service-builds#2e17cd7d648ea68535982efa34683224f93ed984", + "@angular/localize": "github:angular/localize-builds#51708e92f9ec9ab75aed42a516276b470b3fdcd7", + "@angular/material": "github:angular/material2-builds#e56987431ca07be9b5ffad165bd7ded35c741c2a", + "@angular/platform-browser": "github:angular/platform-browser-builds#e8a6fddcd09ee1a1bb6c275607ba010de901b6aa", + "@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#8daedfad35dd3ae94c5c1acb972b9d35d1ac8011", + "@angular/platform-server": "github:angular/platform-server-builds#2007cd1b92f30f00a5372e53a584f28429c60372", + "@angular/router": "github:angular/router-builds#c42940603733831c9bf0f3585970b959cc6ebe7e" } } diff --git a/yarn.lock b/yarn.lock index a7119bc47a56..9da7342cc385 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/animations@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.0.tgz#8d2b852c5273bcc161d13f82faaf3566ab562951" - integrity sha512-jB8+SC3vMztW5zt5UYVmtVwqIWE33UyEjbP5JPba3I3bLRK5E059LcJmN1rSdJHItgIAdG9Y1I0WJ6aiSFyp4Q== +"@angular/animations@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.0.1.tgz#7daaaab1ab518fe90689672f4845281a2c002492" + integrity sha512-R0FLhAfylFIiRArhtLOUokOAVtWCH20ocRXo6E8HHOc3fbaUS9ci3rIbFZQkaAv9RgZfKewrcV6Wa3TY905w5g== "@angular/cdk@9.0.0": version "9.0.0" @@ -14,15 +14,15 @@ optionalDependencies: parse5 "^5.0.0" -"@angular/common@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.0.tgz#0e3b2452d42f87d1825a448a31ad72c593ee0785" - integrity sha512-ZMmEClGtUNJwV5CBlqcSHPIsNyz6WU/GvKWFzJ5VZc68oeg1e7lqfNMNIC47TjyolNJ7VSpNlyrKjzfdBlmqVw== +"@angular/common@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.0.1.tgz#78457633a447c49bcc0e0bd8049cc2adbb016484" + integrity sha512-40jbKdCb4xi6NTzLt1kE0V/X7JxCLLo8eUEr3Z34Z9Ljnd4LC+/CkuThPdQJ3HW1Z8r5SWXj+rES+sn75YNVmA== -"@angular/compiler-cli@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.0.tgz#ecce680820725885fed298af69946bdaa12d73d3" - integrity sha512-6L3swd3Z2ceAapmioml6z7yu3bYC2aVm3/rgK7eCoZtPcevuvTpGnXcFSVvNgByV51GntgInThPbMx0xY23Rvw== +"@angular/compiler-cli@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.0.1.tgz#e96ab3a117ada255a9388343992dc7de6061a355" + integrity sha512-HxJAXr1TWoqVzR7pRe89UjWnu3ESJzo+gjWWtv1NtDMwUKQ2JHWmC3yp/U0URprA03Ii8lXlrZWBjps04ZIlAg== dependencies: canonical-path "1.0.0" chokidar "^3.0.0" @@ -36,25 +36,25 @@ source-map "^0.6.1" yargs "13.1.0" -"@angular/compiler@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0.tgz#87e0bef4c369b6cadae07e3a4295778fc93799d5" - integrity sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ== +"@angular/compiler@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.1.tgz#19b6f83026a2b2771b7ef1b9be20bbe8828d8be9" + integrity sha512-ldamsPzIx+FLT/IYBqwsFL6qbP3BDgvPQa4Y3F/gFXDsoe+VTY5qwJfhr2iLbtF+fYomwOgY2kSL42BVQL873Q== -"@angular/core@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.0.tgz#227dc53e1ac81824f998c6e76000b7efc522641e" - integrity sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w== +"@angular/core@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.0.1.tgz#8908112ce6bb22aa1ae537230240ef9a324409ad" + integrity sha512-q/3VLGM98euB/ZluSuMqvWyQb563iabRcVkC/DrHqCQMadV1ZpvuOgf8Gm092d8GY/iC4CGlTsN0wiVapMxplQ== -"@angular/forms@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.0.tgz#2017e4ddee101fa57dc5dc9ba1139b1f02499422" - integrity sha512-SIYJc0Rgaihow1t+iiwSFGEvvRgssgUuxwIYbMfCp1Sx513K+JX9nVFXqU+dcGj/eF1u5wwYwbvlVyuMQLzmXg== +"@angular/forms@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.0.1.tgz#e95daa336ea93c6236fdc8863d01eaabc4070004" + integrity sha512-yzzlCslWp7IiFSYjSGNqexPmnKn9xhpT8FKzxNT0qEpQ+SieQ7apsjvMfR3TCip0Nnfus2qTh3kz1ZCaawAcjQ== -"@angular/localize@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.0.tgz#d7b428e2784a2c35430ff47c823b70c514fa0016" - integrity sha512-T1dtjqT6BDjWLvtF81RsCBdo+hiORLiNKpSD1wXmHF1L/GMKP+EDODvBDMgnyt4NlSn+HzBeSxE+XPWsHub6cg== +"@angular/localize@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-9.0.1.tgz#37b2d0b6a12883c681f49a1fe3bb01bfaebf6381" + integrity sha512-hRUxGSrSscy/t/akxHLDjrrdTbLZjUDD1JoEgfcWzZMm21V0MhzA5jhOdD/bXjmX/Oqdx00C6cR088QcNb/8mg== dependencies: "@babel/core" "7.8.3" glob "7.1.2" @@ -65,33 +65,33 @@ resolved "https://registry.yarnpkg.com/@angular/material/-/material-9.0.0.tgz#655bfd4d4047337e84480b9f92be8e81af375b92" integrity sha512-QxN2rmR5mvg2YE1NoIGWLpbnmcJq0iFidzy6odzvN17+XkoCJBZ65IdYsHrJgfwGpoIy6bywuixrDHHcSh9I5w== -"@angular/platform-browser-dynamic@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.0.tgz#1b87355c20d0b2a046c1914085701a3d5ced52da" - integrity sha512-F1kbEpmDottTemRPEOAz2Te5ABVJ7wypfzBllxqXbdxPHvYLfL8db2dXyiGqABQ3ZFHPLNilrkUTy0sbuuU4OA== +"@angular/platform-browser-dynamic@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.0.1.tgz#43d6679863775d4f463a67b96a83c3a619854336" + integrity sha512-DslT339T+TBt4jUlXMblPR4IghXtykB+jQctm02G4AJUlvMa4b798N1oM6sD5F8NmBMa6beZ2dcRJ07f75LVBA== -"@angular/platform-browser@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.0.tgz#b9454f29d8edaf024668baa9e07083eef73deac2" - integrity sha512-2PR/o57HjZvKEnAF8ODeqxmeC90oth9dLTMrJNoI5MET0IeErKeI/9Sl5cLQuXC+lSVN5rOMCvDb74VWSno5yw== +"@angular/platform-browser@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.0.1.tgz#292306095c0e4b89927ba1b94eb1714cdbdfcb65" + integrity sha512-0o2aRxbQ3xZ/ZeLXajDqhrRK6vcICzdJ7GKvPgZxdohnnJ7JN1qp8U7J4aEotPqfSAde/aD2JvoDDtKZ0XIDWg== -"@angular/platform-server@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.0.tgz#1b187e995a4cc641e6c1d3904932b4eb78a88b5d" - integrity sha512-wIHZdv7WCtuZ6pgj1n/H2V7KbUxUBfrb1PJzVnCWzpMQDIf+jrMxLlB2irpYb/HHh4tOem6dHX5JV45A2sJ5/w== +"@angular/platform-server@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-9.0.1.tgz#5356bcf8c0906d7aa38d1ca281d839e43dd1230e" + integrity sha512-vQtQZLmwtkART22LIvE1z7rqoDDAbn3mjVEETYcOBGLtbTO+AkvxZcCcVQ3b2UycMBf0mMqWT3M/uMnUUW1MPg== dependencies: domino "^2.1.2" xhr2 "^0.1.4" -"@angular/router@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.0.tgz#11784fc8ce9cb3314c7ec1083ff9be7c611181c2" - integrity sha512-yyOcStpgN5t8wGRNO85mo0jplXkntP+v2tmSxNx45pahqmofSFm+QCEFa2zHQuMr7NoiGERhd0Tae7NDCCjtjA== +"@angular/router@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.0.1.tgz#bc6acddf094361a7ef14aab0c94d7248d10f2949" + integrity sha512-pHLDooNvXEUtjYANWtJ7fMxG9l2mDJgPphOi/S6c27U5yNf0NVk+Qh3kuuNi2hQQ5RaR4jdRyCQePD2H4g2+/g== -"@angular/service-worker@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.0.tgz#579014140019bc1e996091b98a0d64790d082350" - integrity sha512-QZjA9Syhz3sCcugUknXorScgSjVS6jhaCZilTmfPPaKazw0tASNw1SfjrZ60aOPCmoJGRkWyP/Hzzi/KKVSQjQ== +"@angular/service-worker@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-9.0.1.tgz#af8a0bdb9297b5b4ededf6f028aaff51b877b373" + integrity sha512-TH8XS8xrKIw1CslytwPC8PRWbLTmgqbfex5ZqW7a27/iCVqa4xzqayVtDZmqKKSM3dz3bLkW66m01eaon9/a7A== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": version "7.8.3" @@ -9942,11 +9942,6 @@ semver@7.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.1.tgz#29104598a197d6cbe4733eeecbe968f7b43a9667" integrity sha512-WfuG+fl6eh3eZ2qAf6goB7nhiCd7NPXhmyFxigB/TOkQyeLP8w8GsVehvtGNtnNmyboz4TgeK40B1Kbql/8c5A== -semver@7.1.2, semver@^7.0.0, semver@^7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.2.tgz#847bae5bce68c5d08889824f02667199b70e3d87" - integrity sha512-BJs9T/H8sEVHbeigqzIEo57Iu/3DG6c4QoqTfbQB3BPA4zgzAomh/Fk9E7QtjWQ8mx2dgA9YCfSF4y9k9bHNpQ== - semver@7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" @@ -9957,6 +9952,11 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.0.0, semver@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.2.tgz#847bae5bce68c5d08889824f02667199b70e3d87" + integrity sha512-BJs9T/H8sEVHbeigqzIEo57Iu/3DG6c4QoqTfbQB3BPA4zgzAomh/Fk9E7QtjWQ8mx2dgA9YCfSF4y9k9bHNpQ== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" From 5a53b84f96cd7b5ca28f900d51666062ae87be8b Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 12 Feb 2020 13:52:52 -0500 Subject: [PATCH 0900/1070] fix(@angular-devkit/build-angular): insert sourcemap source content when using fast path --- .../build_angular/src/utils/process-bundle.ts | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index e6b34f90d6bb..8e5621b1701a 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -27,8 +27,8 @@ import { I18nOptions } from './i18n-options'; const cacache = require('cacache'); const deserialize = ((v8 as unknown) as { deserialize(buffer: Buffer): unknown }).deserialize; -// If code size is larger than 500KB, consider lower fidelity but faster sourcemap merge -const FAST_SOURCEMAP_THRESHOLD = 500 * 1024; +// If code size is larger than 1MB, consider lower fidelity but faster sourcemap merge +const FAST_SOURCEMAP_THRESHOLD = 1024 * 1024; export interface ProcessBundleOptions { filename: string; @@ -255,6 +255,25 @@ async function mergeSourceMapsFast(first: RawSourceMap, second: RawSourceMap) { map.file = second.file; map.sourceRoot = sourceRoot; + // Add source content if present + if (first.sourcesContent) { + // Source content array is based on index of sources + const sourceContentMap = new Map(); + for (let i = 0; i < first.sources.length; i++) { + // make paths "absolute" so they can be compared (`./a.js` and `a.js` are equivalent) + sourceContentMap.set(path.resolve('/', first.sources[i]), i); + } + map.sourcesContent = []; + for (let i = 0; i < map.sources.length; i++) { + const contentIndex = sourceContentMap.get(path.resolve('/', map.sources[i])); + if (contentIndex === undefined) { + map.sourcesContent.push(''); + } else { + map.sourcesContent.push(first.sourcesContent[contentIndex]); + } + } + } + // Put the sourceRoot back if (sourceRoot) { first.sourceRoot = sourceRoot; From 2f1a9db87235907b86a6cb21977427ba415903bf Mon Sep 17 00:00:00 2001 From: EmaGht Date: Wed, 22 Jan 2020 17:43:48 +0100 Subject: [PATCH 0901/1070] fix(@angular-devkit/build-angular): Correctly prints the size of the chunk during the build statistic print. Fixes: #16627 --- .../build_angular/src/angular-cli-files/utilities/stats.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts index e3c174a7e06f..ef2d3b4122dc 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/stats.ts @@ -64,8 +64,9 @@ export function statsToString(json: any, statsConfig: any) { const changedChunksStats = json.chunks .filter((chunk: any) => chunk.rendered) .map((chunk: any) => { - const asset = json.assets.filter((x: any) => x.name == chunk.files[0])[0]; - return generateBundleStats({ ...chunk, size: asset && asset.size }, colors); + const assets = json.assets.filter((asset: any) => chunk.files.indexOf(asset.name) != -1); + const summedSize = assets.filter((asset: any) => !asset.name.endsWith(".map")).reduce((total: number, asset: any) => { return total + asset.size }, 0); + return generateBundleStats({ ...chunk, size: summedSize }, colors); }); const unchangedChunkNumber = json.chunks.length - changedChunksStats.length; From 0b63ae68a53fae9f3c6199552552a1dc428a21ad Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 14 Feb 2020 06:16:12 +0000 Subject: [PATCH 0902/1070] build: update @bazel/bazel to version 2.1.0 --- package.json | 2 +- yarn.lock | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index a8e2ac385c27..7640fe9c278e 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "devDependencies": { "@angular/compiler": "9.0.1", "@angular/compiler-cli": "9.0.1", - "@bazel/bazel": "2.0.0", + "@bazel/bazel": "2.1.0", "@bazel/buildifier": "0.29.0", "@bazel/jasmine": "1.3.0", "@bazel/karma": "1.3.0", diff --git a/yarn.lock b/yarn.lock index 9da7342cc385..aa87e0244ff2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -827,31 +827,31 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@bazel/bazel-darwin_x64@2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-2.0.0.tgz#bd678069216dd470c6816a22c405f21e7f048038" - integrity sha512-I/pP+B+2xfY0g+OEpEcVnk8rizuC761pAzBOQjP3b+gz3AzeRgm05CpcSY7tfPIppMSYoy3uTZJ1XlwgUg7IQQ== +"@bazel/bazel-darwin_x64@2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-2.1.0.tgz#c36c37080841618f142996884f07ac0e3d6a9598" + integrity sha512-9waB/6UT6JmQh8qxlRK9IfSY4Ef+4iGwy5eYK2hoc1zXYDnnZoZoC4eXiq68cWTpyCcT7SNGEb9B3wL5Y5rA9A== -"@bazel/bazel-linux_x64@2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-2.0.0.tgz#2c76e3301e9178a90ec3ad00649e89b953eda0b7" - integrity sha512-iOr45G+511IbP7e+ISriG97WpfCAVXekTrTgL5mGg3NDBFCVNs350VquHAvmlXAoP5+IEug2pCOlkdEl4bLl8g== +"@bazel/bazel-linux_x64@2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-2.1.0.tgz#3185cc3d2533641d6a539bf613247d628425ebf0" + integrity sha512-ag6ZwYMJblf1YuPhNRAMyCYf164mY8jhdIwPSVFI1CMiBRnSDJBkSg7rVIczPh+8Gp7TDqAno9MMTnfUXzxogA== -"@bazel/bazel-win32_x64@2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-2.0.0.tgz#f12ac0738d2eac0fd255f099776194807cedfe50" - integrity sha512-5qs2qoa/paG/YYEM0yvrwuJIShoPVK2FX+Oz9jEWAQJsmU4drHA9Aq+gbBOirEFLmvYhleZ9XORCwu/5uAo8vA== +"@bazel/bazel-win32_x64@2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-2.1.0.tgz#013960fe506ddb8dc08f5d54b52420c818eb4264" + integrity sha512-Y6cs3frmCqoAsrDmEp0msyS8VYE13JvjVoyvdIXTOh5Cc4fOeWzSPb02VS08asaV1jCnOQbv15Ud286hcxAvxg== -"@bazel/bazel@2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-2.0.0.tgz#feb8cf5a40ea6437ef69cac2a92072118b11c230" - integrity sha512-KQbv5dHNSfutbhXCc3KVMuBXPpUh6Af/hT9IRIaMTuiB6Nq2gEW9Z3aNqncopdZqV848V/qYxnqPnQ+S37fMyQ== +"@bazel/bazel@2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@bazel/bazel/-/bazel-2.1.0.tgz#25a4d3b4171bfb637374133d29878bbcb36b4c92" + integrity sha512-3Dhs0uJ69ImqC+VIRcifnptPXytxCNWHqyTMFYf0F5AJCVHHW7uRE0tt3Vhm5BseFpdOsjqcghgxGzR/yo10qw== dependencies: "@bazel/hide-bazel-files" latest optionalDependencies: - "@bazel/bazel-darwin_x64" "2.0.0" - "@bazel/bazel-linux_x64" "2.0.0" - "@bazel/bazel-win32_x64" "2.0.0" + "@bazel/bazel-darwin_x64" "2.1.0" + "@bazel/bazel-linux_x64" "2.1.0" + "@bazel/bazel-win32_x64" "2.1.0" "@bazel/buildifier-darwin_x64@0.29.0": version "0.29.0" From e2f67ccdf421f6ec4d767f24135e1fd6778e092b Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 13 Feb 2020 14:23:38 -0800 Subject: [PATCH 0903/1070] build: vendor yarn using the .yarnrc yarn-path value Rather than enforcing yarn versioning using `package.json`'s engines value. We can utilize yarn's `yarn-path` value to ensure that the version of yarn used at execution time is consistent for everyone who uses our repo. --- .yarn/README.md | 13 + .yarn/releases/yarn-1.22.0.js | 147370 +++++++++++++++++++++++++++++++ .yarnrc | 6 + package.json | 2 +- 4 files changed, 147390 insertions(+), 1 deletion(-) create mode 100644 .yarn/README.md create mode 100755 .yarn/releases/yarn-1.22.0.js create mode 100644 .yarnrc diff --git a/.yarn/README.md b/.yarn/README.md new file mode 100644 index 000000000000..cbbb1165c7b9 --- /dev/null +++ b/.yarn/README.md @@ -0,0 +1,13 @@ +# Yarn Vendoring +We utilize Yarn's `yarn-path` configuration in a shared `.yarnrc` file to enforce +everyone using the same version of Yarn. Yarn checks the `.yarnrc` file to +determine if yarn should delegate the command to a vendored version at the +provided path. + +## How to update +To update to the latest version of Yarn as our vendored version: +- Run this command +```sh +yarn policies set-version latest +``` +- Remove the previous version \ No newline at end of file diff --git a/.yarn/releases/yarn-1.22.0.js b/.yarn/releases/yarn-1.22.0.js new file mode 100755 index 000000000000..5ac1205b69f5 --- /dev/null +++ b/.yarn/releases/yarn-1.22.0.js @@ -0,0 +1,147370 @@ +#!/usr/bin/env node +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 549); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = require("path"); + +/***/ }), +/* 1 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = __extends; +/* unused harmony export __assign */ +/* unused harmony export __rest */ +/* unused harmony export __decorate */ +/* unused harmony export __param */ +/* unused harmony export __metadata */ +/* unused harmony export __awaiter */ +/* unused harmony export __generator */ +/* unused harmony export __exportStar */ +/* unused harmony export __values */ +/* unused harmony export __read */ +/* unused harmony export __spread */ +/* unused harmony export __await */ +/* unused harmony export __asyncGenerator */ +/* unused harmony export __asyncDelegator */ +/* unused harmony export __asyncValues */ +/* unused harmony export __makeTemplateObject */ +/* unused harmony export __importStar */ +/* unused harmony export __importDefault */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +function __exportStar(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _promise = __webpack_require__(227); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +module.exports = require("util"); + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getFirstSuitableFolder = exports.readFirstAvailableStream = exports.makeTempDir = exports.hardlinksWork = exports.writeFilePreservingEol = exports.getFileSizeOnDisk = exports.walk = exports.symlink = exports.find = exports.readJsonAndFile = exports.readJson = exports.readFileAny = exports.hardlinkBulk = exports.copyBulk = exports.unlink = exports.glob = exports.link = exports.chmod = exports.lstat = exports.exists = exports.mkdirp = exports.stat = exports.access = exports.rename = exports.readdir = exports.realpath = exports.readlink = exports.writeFile = exports.open = exports.readFileBuffer = exports.lockQueue = exports.constants = undefined; + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} + +let buildActionsForCopy = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { + + // + let build = (() => { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + const src = data.src, + dest = data.dest, + type = data.type; + + const onFresh = data.onFresh || noop; + const onDone = data.onDone || noop; + + // TODO https://github.com/yarnpkg/yarn/issues/3751 + // related to bundled dependencies handling + if (files.has(dest.toLowerCase())) { + reporter.verbose(`The case-insensitive file ${dest} shouldn't be copied twice in one bulk copy`); + } else { + files.add(dest.toLowerCase()); + } + + if (type === 'symlink') { + yield mkdirp((_path || _load_path()).default.dirname(dest)); + onFresh(); + actions.symlink.push({ + dest, + linkname: src + }); + onDone(); + return; + } + + if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { + // ignored file + return; + } + + const srcStat = yield lstat(src); + let srcFiles; + + if (srcStat.isDirectory()) { + srcFiles = yield readdir(src); + } + + let destStat; + try { + // try accessing the destination + destStat = yield lstat(dest); + } catch (e) { + // proceed if destination doesn't exist, otherwise error + if (e.code !== 'ENOENT') { + throw e; + } + } + + // if destination exists + if (destStat) { + const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); + const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); + const bothFiles = srcStat.isFile() && destStat.isFile(); + + // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving + // us modes that aren't valid. investigate this, it's generally safe to proceed. + + /* if (srcStat.mode !== destStat.mode) { + try { + await access(dest, srcStat.mode); + } catch (err) {} + } */ + + if (bothFiles && artifactFiles.has(dest)) { + // this file gets changed during build, likely by a custom install script. Don't bother checking it. + onDone(); + reporter.verbose(reporter.lang('verboseFileSkipArtifact', src)); + return; + } + + if (bothFiles && srcStat.size === destStat.size && (0, (_fsNormalized || _load_fsNormalized()).fileDatesEqual)(srcStat.mtime, destStat.mtime)) { + // we can safely assume this is the same file + onDone(); + reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.size, +srcStat.mtime)); + return; + } + + if (bothSymlinks) { + const srcReallink = yield readlink(src); + if (srcReallink === (yield readlink(dest))) { + // if both symlinks are the same then we can continue on + onDone(); + reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink)); + return; + } + } + + if (bothFolders) { + // mark files that aren't in this folder as possibly extraneous + const destFiles = yield readdir(dest); + invariant(srcFiles, 'src files not initialised'); + + for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref6; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref6 = _i4.value; + } + + const file = _ref6; + + if (srcFiles.indexOf(file) < 0) { + const loc = (_path || _load_path()).default.join(dest, file); + possibleExtraneous.add(loc); + + if ((yield lstat(loc)).isDirectory()) { + for (var _iterator5 = yield readdir(loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref7; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref7 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref7 = _i5.value; + } + + const file = _ref7; + + possibleExtraneous.add((_path || _load_path()).default.join(loc, file)); + } + } + } + } + } + } + + if (destStat && destStat.isSymbolicLink()) { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); + destStat = null; + } + + if (srcStat.isSymbolicLink()) { + onFresh(); + const linkname = yield readlink(src); + actions.symlink.push({ + dest, + linkname + }); + onDone(); + } else if (srcStat.isDirectory()) { + if (!destStat) { + reporter.verbose(reporter.lang('verboseFileFolder', dest)); + yield mkdirp(dest); + } + + const destParts = dest.split((_path || _load_path()).default.sep); + while (destParts.length) { + files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + destParts.pop(); + } + + // push all files to queue + invariant(srcFiles, 'src files not initialised'); + let remaining = srcFiles.length; + if (!remaining) { + onDone(); + } + for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref8; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref8 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref8 = _i6.value; + } + + const file = _ref8; + + queue.push({ + dest: (_path || _load_path()).default.join(dest, file), + onFresh, + onDone: function (_onDone) { + function onDone() { + return _onDone.apply(this, arguments); + } + + onDone.toString = function () { + return _onDone.toString(); + }; + + return onDone; + }(function () { + if (--remaining === 0) { + onDone(); + } + }), + src: (_path || _load_path()).default.join(src, file) + }); + } + } else if (srcStat.isFile()) { + onFresh(); + actions.file.push({ + src, + dest, + atime: srcStat.atime, + mtime: srcStat.mtime, + mode: srcStat.mode + }); + onDone(); + } else { + throw new Error(`unsure how to copy this: ${src}`); + } + }); + + return function build(_x5) { + return _ref5.apply(this, arguments); + }; + })(); + + const artifactFiles = new Set(events.artifactFiles || []); + const files = new Set(); + + // initialise events + for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + const item = _ref2; + + const onDone = item.onDone; + item.onDone = function () { + events.onProgress(item.dest); + if (onDone) { + onDone(); + } + }; + } + events.onStart(queue.length); + + // start building actions + const actions = { + file: [], + symlink: [], + link: [] + }; + + // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items + // at a time due to the requirement to push items onto the queue + while (queue.length) { + const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); + yield Promise.all(items.map(build)); + } + + // simulate the existence of some files to prevent considering them extraneous + for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + const file = _ref3; + + if (possibleExtraneous.has(file)) { + reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file)); + possibleExtraneous.delete(file); + } + } + + for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + const loc = _ref4; + + if (files.has(loc.toLowerCase())) { + possibleExtraneous.delete(loc); + } + } + + return actions; + }); + + return function buildActionsForCopy(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +})(); + +let buildActionsForHardlink = (() => { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { + + // + let build = (() => { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + const src = data.src, + dest = data.dest; + + const onFresh = data.onFresh || noop; + const onDone = data.onDone || noop; + if (files.has(dest.toLowerCase())) { + // Fixes issue https://github.com/yarnpkg/yarn/issues/2734 + // When bulk hardlinking we have A -> B structure that we want to hardlink to A1 -> B1, + // package-linker passes that modules A1 and B1 need to be hardlinked, + // the recursive linking algorithm of A1 ends up scheduling files in B1 to be linked twice which will case + // an exception. + onDone(); + return; + } + files.add(dest.toLowerCase()); + + if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { + // ignored file + return; + } + + const srcStat = yield lstat(src); + let srcFiles; + + if (srcStat.isDirectory()) { + srcFiles = yield readdir(src); + } + + const destExists = yield exists(dest); + if (destExists) { + const destStat = yield lstat(dest); + + const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); + const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); + const bothFiles = srcStat.isFile() && destStat.isFile(); + + if (srcStat.mode !== destStat.mode) { + try { + yield access(dest, srcStat.mode); + } catch (err) { + // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving + // us modes that aren't valid. investigate this, it's generally safe to proceed. + reporter.verbose(err); + } + } + + if (bothFiles && artifactFiles.has(dest)) { + // this file gets changed during build, likely by a custom install script. Don't bother checking it. + onDone(); + reporter.verbose(reporter.lang('verboseFileSkipArtifact', src)); + return; + } + + // correct hardlink + if (bothFiles && srcStat.ino !== null && srcStat.ino === destStat.ino) { + onDone(); + reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.ino)); + return; + } + + if (bothSymlinks) { + const srcReallink = yield readlink(src); + if (srcReallink === (yield readlink(dest))) { + // if both symlinks are the same then we can continue on + onDone(); + reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink)); + return; + } + } + + if (bothFolders) { + // mark files that aren't in this folder as possibly extraneous + const destFiles = yield readdir(dest); + invariant(srcFiles, 'src files not initialised'); + + for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref14; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref14 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref14 = _i10.value; + } + + const file = _ref14; + + if (srcFiles.indexOf(file) < 0) { + const loc = (_path || _load_path()).default.join(dest, file); + possibleExtraneous.add(loc); + + if ((yield lstat(loc)).isDirectory()) { + for (var _iterator11 = yield readdir(loc), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { + var _ref15; + + if (_isArray11) { + if (_i11 >= _iterator11.length) break; + _ref15 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) break; + _ref15 = _i11.value; + } + + const file = _ref15; + + possibleExtraneous.add((_path || _load_path()).default.join(loc, file)); + } + } + } + } + } + } + + if (srcStat.isSymbolicLink()) { + onFresh(); + const linkname = yield readlink(src); + actions.symlink.push({ + dest, + linkname + }); + onDone(); + } else if (srcStat.isDirectory()) { + reporter.verbose(reporter.lang('verboseFileFolder', dest)); + yield mkdirp(dest); + + const destParts = dest.split((_path || _load_path()).default.sep); + while (destParts.length) { + files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + destParts.pop(); + } + + // push all files to queue + invariant(srcFiles, 'src files not initialised'); + let remaining = srcFiles.length; + if (!remaining) { + onDone(); + } + for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { + var _ref16; + + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref16 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref16 = _i12.value; + } + + const file = _ref16; + + queue.push({ + onFresh, + src: (_path || _load_path()).default.join(src, file), + dest: (_path || _load_path()).default.join(dest, file), + onDone: function (_onDone2) { + function onDone() { + return _onDone2.apply(this, arguments); + } + + onDone.toString = function () { + return _onDone2.toString(); + }; + + return onDone; + }(function () { + if (--remaining === 0) { + onDone(); + } + }) + }); + } + } else if (srcStat.isFile()) { + onFresh(); + actions.link.push({ + src, + dest, + removeDest: destExists + }); + onDone(); + } else { + throw new Error(`unsure how to copy this: ${src}`); + } + }); + + return function build(_x10) { + return _ref13.apply(this, arguments); + }; + })(); + + const artifactFiles = new Set(events.artifactFiles || []); + const files = new Set(); + + // initialise events + for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref10; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref10 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref10 = _i7.value; + } + + const item = _ref10; + + const onDone = item.onDone || noop; + item.onDone = function () { + events.onProgress(item.dest); + onDone(); + }; + } + events.onStart(queue.length); + + // start building actions + const actions = { + file: [], + symlink: [], + link: [] + }; + + // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items + // at a time due to the requirement to push items onto the queue + while (queue.length) { + const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); + yield Promise.all(items.map(build)); + } + + // simulate the existence of some files to prevent considering them extraneous + for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref11; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref11 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref11 = _i8.value; + } + + const file = _ref11; + + if (possibleExtraneous.has(file)) { + reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file)); + possibleExtraneous.delete(file); + } + } + + for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref12; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref12 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref12 = _i9.value; + } + + const loc = _ref12; + + if (files.has(loc.toLowerCase())) { + possibleExtraneous.delete(loc); + } + } + + return actions; + }); + + return function buildActionsForHardlink(_x6, _x7, _x8, _x9) { + return _ref9.apply(this, arguments); + }; +})(); + +let copyBulk = exports.copyBulk = (() => { + var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { + const events = { + onStart: _events && _events.onStart || noop, + onProgress: _events && _events.onProgress || noop, + possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), + ignoreBasenames: _events && _events.ignoreBasenames || [], + artifactFiles: _events && _events.artifactFiles || [] + }; + + const actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter); + events.onStart(actions.file.length + actions.symlink.length + actions.link.length); + + const fileActions = actions.file; + + const currentlyWriting = new Map(); + + yield (_promise || _load_promise()).queue(fileActions, (() => { + var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + let writePromise; + while (writePromise = currentlyWriting.get(data.dest)) { + yield writePromise; + } + + reporter.verbose(reporter.lang('verboseFileCopy', data.src, data.dest)); + const copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function () { + return currentlyWriting.delete(data.dest); + }); + currentlyWriting.set(data.dest, copier); + events.onProgress(data.dest); + return copier; + }); + + return function (_x14) { + return _ref18.apply(this, arguments); + }; + })(), CONCURRENT_QUEUE_ITEMS); + + // we need to copy symlinks last as they could reference files we were copying + const symlinkActions = actions.symlink; + yield (_promise || _load_promise()).queue(symlinkActions, function (data) { + const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); + reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); + return symlink(linkname, data.dest); + }); + }); + + return function copyBulk(_x11, _x12, _x13) { + return _ref17.apply(this, arguments); + }; +})(); + +let hardlinkBulk = exports.hardlinkBulk = (() => { + var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { + const events = { + onStart: _events && _events.onStart || noop, + onProgress: _events && _events.onProgress || noop, + possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), + artifactFiles: _events && _events.artifactFiles || [], + ignoreBasenames: [] + }; + + const actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter); + events.onStart(actions.file.length + actions.symlink.length + actions.link.length); + + const fileActions = actions.link; + + yield (_promise || _load_promise()).queue(fileActions, (() => { + var _ref20 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + reporter.verbose(reporter.lang('verboseFileLink', data.src, data.dest)); + if (data.removeDest) { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(data.dest); + } + yield link(data.src, data.dest); + }); + + return function (_x18) { + return _ref20.apply(this, arguments); + }; + })(), CONCURRENT_QUEUE_ITEMS); + + // we need to copy symlinks last as they could reference files we were copying + const symlinkActions = actions.symlink; + yield (_promise || _load_promise()).queue(symlinkActions, function (data) { + const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); + reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); + return symlink(linkname, data.dest); + }); + }); + + return function hardlinkBulk(_x15, _x16, _x17) { + return _ref19.apply(this, arguments); + }; +})(); + +let readFileAny = exports.readFileAny = (() => { + var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (files) { + for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { + var _ref22; + + if (_isArray13) { + if (_i13 >= _iterator13.length) break; + _ref22 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) break; + _ref22 = _i13.value; + } + + const file = _ref22; + + if (yield exists(file)) { + return readFile(file); + } + } + return null; + }); + + return function readFileAny(_x19) { + return _ref21.apply(this, arguments); + }; +})(); + +let readJson = exports.readJson = (() => { + var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + return (yield readJsonAndFile(loc)).object; + }); + + return function readJson(_x20) { + return _ref23.apply(this, arguments); + }; +})(); + +let readJsonAndFile = exports.readJsonAndFile = (() => { + var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + const file = yield readFile(loc); + try { + return { + object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM(file))), + content: file + }; + } catch (err) { + err.message = `${loc}: ${err.message}`; + throw err; + } + }); + + return function readJsonAndFile(_x21) { + return _ref24.apply(this, arguments); + }; +})(); + +let find = exports.find = (() => { + var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) { + const parts = dir.split((_path || _load_path()).default.sep); + + while (parts.length) { + const loc = parts.concat(filename).join((_path || _load_path()).default.sep); + + if (yield exists(loc)) { + return loc; + } else { + parts.pop(); + } + } + + return false; + }); + + return function find(_x22, _x23) { + return _ref25.apply(this, arguments); + }; +})(); + +let symlink = exports.symlink = (() => { + var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) { + if (process.platform !== 'win32') { + // use relative paths otherwise which will be retained if the directory is moved + src = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src); + // When path.relative returns an empty string for the current directory, we should instead use + // '.', which is a valid fs.symlink target. + src = src || '.'; + } + + try { + const stats = yield lstat(dest); + if (stats.isSymbolicLink()) { + const resolved = dest; + if (resolved === src) { + return; + } + } + } catch (err) { + if (err.code !== 'ENOENT') { + throw err; + } + } + + // We use rimraf for unlink which never throws an ENOENT on missing target + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); + + if (process.platform === 'win32') { + // use directory junctions if possible on win32, this requires absolute paths + yield fsSymlink(src, dest, 'junction'); + } else { + yield fsSymlink(src, dest); + } + }); + + return function symlink(_x24, _x25) { + return _ref26.apply(this, arguments); + }; +})(); + +let walk = exports.walk = (() => { + var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) { + let files = []; + + let filenames = yield readdir(dir); + if (ignoreBasenames.size) { + filenames = filenames.filter(function (name) { + return !ignoreBasenames.has(name); + }); + } + + for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { + var _ref28; + + if (_isArray14) { + if (_i14 >= _iterator14.length) break; + _ref28 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) break; + _ref28 = _i14.value; + } + + const name = _ref28; + + const relative = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name; + const loc = (_path || _load_path()).default.join(dir, name); + const stat = yield lstat(loc); + + files.push({ + relative, + basename: name, + absolute: loc, + mtime: +stat.mtime + }); + + if (stat.isDirectory()) { + files = files.concat((yield walk(loc, relative, ignoreBasenames))); + } + } + + return files; + }); + + return function walk(_x26, _x27) { + return _ref27.apply(this, arguments); + }; +})(); + +let getFileSizeOnDisk = exports.getFileSizeOnDisk = (() => { + var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + const stat = yield lstat(loc); + const size = stat.size, + blockSize = stat.blksize; + + + return Math.ceil(size / blockSize) * blockSize; + }); + + return function getFileSizeOnDisk(_x28) { + return _ref29.apply(this, arguments); + }; +})(); + +let getEolFromFile = (() => { + var _ref30 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path) { + if (!(yield exists(path))) { + return undefined; + } + + const buffer = yield readFileBuffer(path); + + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] === cr) { + return '\r\n'; + } + if (buffer[i] === lf) { + return '\n'; + } + } + return undefined; + }); + + return function getEolFromFile(_x29) { + return _ref30.apply(this, arguments); + }; +})(); + +let writeFilePreservingEol = exports.writeFilePreservingEol = (() => { + var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path, data) { + const eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL; + if (eol !== '\n') { + data = data.replace(/\n/g, eol); + } + yield writeFile(path, data); + }); + + return function writeFilePreservingEol(_x30, _x31) { + return _ref31.apply(this, arguments); + }; +})(); + +let hardlinksWork = exports.hardlinksWork = (() => { + var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) { + const filename = 'test-file' + Math.random(); + const file = (_path || _load_path()).default.join(dir, filename); + const fileLink = (_path || _load_path()).default.join(dir, filename + '-link'); + try { + yield writeFile(file, 'test'); + yield link(file, fileLink); + } catch (err) { + return false; + } finally { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(file); + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(fileLink); + } + return true; + }); + + return function hardlinksWork(_x32) { + return _ref32.apply(this, arguments); + }; +})(); + +// not a strict polyfill for Node's fs.mkdtemp + + +let makeTempDir = exports.makeTempDir = (() => { + var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) { + const dir = (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`); + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir); + yield mkdirp(dir); + return dir; + }); + + return function makeTempDir(_x33) { + return _ref33.apply(this, arguments); + }; +})(); + +let readFirstAvailableStream = exports.readFirstAvailableStream = (() => { + var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) { + for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { + var _ref35; + + if (_isArray15) { + if (_i15 >= _iterator15.length) break; + _ref35 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) break; + _ref35 = _i15.value; + } + + const path = _ref35; + + try { + const fd = yield open(path, 'r'); + return (_fs || _load_fs()).default.createReadStream(path, { fd }); + } catch (err) { + // Try the next one + } + } + return null; + }); + + return function readFirstAvailableStream(_x34) { + return _ref34.apply(this, arguments); + }; +})(); + +let getFirstSuitableFolder = exports.getFirstSuitableFolder = (() => { + var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths, mode = constants.W_OK | constants.X_OK) { + const result = { + skipped: [], + folder: null + }; + + for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) { + var _ref37; + + if (_isArray16) { + if (_i16 >= _iterator16.length) break; + _ref37 = _iterator16[_i16++]; + } else { + _i16 = _iterator16.next(); + if (_i16.done) break; + _ref37 = _i16.value; + } + + const folder = _ref37; + + try { + yield mkdirp(folder); + yield access(folder, mode); + + result.folder = folder; + + return result; + } catch (error) { + result.skipped.push({ + error, + folder + }); + } + } + return result; + }); + + return function getFirstSuitableFolder(_x35) { + return _ref36.apply(this, arguments); + }; +})(); + +exports.copy = copy; +exports.readFile = readFile; +exports.readFileRaw = readFileRaw; +exports.normalizeOS = normalizeOS; + +var _fs; + +function _load_fs() { + return _fs = _interopRequireDefault(__webpack_require__(5)); +} + +var _glob; + +function _load_glob() { + return _glob = _interopRequireDefault(__webpack_require__(99)); +} + +var _os; + +function _load_os() { + return _os = _interopRequireDefault(__webpack_require__(46)); +} + +var _path; + +function _load_path() { + return _path = _interopRequireDefault(__webpack_require__(0)); +} + +var _blockingQueue; + +function _load_blockingQueue() { + return _blockingQueue = _interopRequireDefault(__webpack_require__(110)); +} + +var _promise; + +function _load_promise() { + return _promise = _interopRequireWildcard(__webpack_require__(50)); +} + +var _promise2; + +function _load_promise2() { + return _promise2 = __webpack_require__(50); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(29)); +} + +var _fsNormalized; + +function _load_fsNormalized() { + return _fsNormalized = __webpack_require__(218); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const constants = exports.constants = typeof (_fs || _load_fs()).default.constants !== 'undefined' ? (_fs || _load_fs()).default.constants : { + R_OK: (_fs || _load_fs()).default.R_OK, + W_OK: (_fs || _load_fs()).default.W_OK, + X_OK: (_fs || _load_fs()).default.X_OK +}; + +const lockQueue = exports.lockQueue = new (_blockingQueue || _load_blockingQueue()).default('fs lock'); + +const readFileBuffer = exports.readFileBuffer = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readFile); +const open = exports.open = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.open); +const writeFile = exports.writeFile = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.writeFile); +const readlink = exports.readlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readlink); +const realpath = exports.realpath = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.realpath); +const readdir = exports.readdir = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readdir); +const rename = exports.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename); +const access = exports.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access); +const stat = exports.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat); +const mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(145)); +const exists = exports.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true); +const lstat = exports.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat); +const chmod = exports.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod); +const link = exports.link = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.link); +const glob = exports.glob = (0, (_promise2 || _load_promise2()).promisify)((_glob || _load_glob()).default); +exports.unlink = (_fsNormalized || _load_fsNormalized()).unlink; + +// fs.copyFile uses the native file copying instructions on the system, performing much better +// than any JS-based solution and consumes fewer resources. Repeated testing to fine tune the +// concurrency level revealed 128 as the sweet spot on a quad-core, 16 CPU Intel system with SSD. + +const CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; + +const fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink); +const invariant = __webpack_require__(9); +const stripBOM = __webpack_require__(160); + +const noop = () => {}; + +function copy(src, dest, reporter) { + return copyBulk([{ src, dest }], reporter); +} + +function _readFile(loc, encoding) { + return new Promise((resolve, reject) => { + (_fs || _load_fs()).default.readFile(loc, encoding, function (err, content) { + if (err) { + reject(err); + } else { + resolve(content); + } + }); + }); +} + +function readFile(loc) { + return _readFile(loc, 'utf8').then(normalizeOS); +} + +function readFileRaw(loc) { + return _readFile(loc, 'binary'); +} + +function normalizeOS(body) { + return body.replace(/\r\n/g, '\n'); +} + +const cr = '\r'.charCodeAt(0); +const lf = '\n'.charCodeAt(0); + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +module.exports = require("fs"); + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +class MessageError extends Error { + constructor(msg, code) { + super(msg); + this.code = code; + } + +} + +exports.MessageError = MessageError; +class ProcessSpawnError extends MessageError { + constructor(msg, code, process) { + super(msg, code); + this.process = process; + } + +} + +exports.ProcessSpawnError = ProcessSpawnError; +class SecurityError extends MessageError {} + +exports.SecurityError = SecurityError; +class ProcessTermError extends MessageError {} + +exports.ProcessTermError = ProcessTermError; +class ResponseError extends Error { + constructor(msg, responseCode) { + super(msg); + this.responseCode = responseCode; + } + +} + +exports.ResponseError = ResponseError; +class OneTimePasswordError extends Error {} +exports.OneTimePasswordError = OneTimePasswordError; + +/***/ }), +/* 7 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; }); +/* unused harmony export SafeSubscriber */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(420); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(323); +/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */ + + + + + + + +var Subscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subscriber, _super); + function Subscriber(destinationOrNext, error, complete) { + var _this = _super.call(this) || this; + _this.syncErrorValue = null; + _this.syncErrorThrown = false; + _this.syncErrorThrowable = false; + _this.isStopped = false; + _this._parentSubscription = null; + switch (arguments.length) { + case 0: + _this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]; + break; + case 1: + if (!destinationOrNext) { + _this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]; + break; + } + if (typeof destinationOrNext === 'object') { + if (destinationOrNext instanceof Subscriber) { + _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; + _this.destination = destinationOrNext; + destinationOrNext.add(_this); + } + else { + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext); + } + break; + } + default: + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete); + break; + } + return _this; + } + Subscriber.prototype[__WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { return this; }; + Subscriber.create = function (next, error, complete) { + var subscriber = new Subscriber(next, error, complete); + subscriber.syncErrorThrowable = false; + return subscriber; + }; + Subscriber.prototype.next = function (value) { + if (!this.isStopped) { + this._next(value); + } + }; + Subscriber.prototype.error = function (err) { + if (!this.isStopped) { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (!this.isStopped) { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (this.closed) { + return; + } + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + this.destination.error(err); + this.unsubscribe(); + }; + Subscriber.prototype._complete = function () { + this.destination.complete(); + this.unsubscribe(); + }; + Subscriber.prototype._unsubscribeAndRecycle = function () { + var _a = this, _parent = _a._parent, _parents = _a._parents; + this._parent = null; + this._parents = null; + this.unsubscribe(); + this.closed = false; + this.isStopped = false; + this._parent = _parent; + this._parents = _parents; + this._parentSubscription = null; + return this; + }; + return Subscriber; +}(__WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */])); + +var SafeSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SafeSubscriber, _super); + function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) { + var _this = _super.call(this) || this; + _this._parentSubscriber = _parentSubscriber; + var next; + var context = _this; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isFunction__["a" /* isFunction */])(observerOrNext)) { + next = observerOrNext; + } + else if (observerOrNext) { + next = observerOrNext.next; + error = observerOrNext.error; + complete = observerOrNext.complete; + if (observerOrNext !== __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]) { + context = Object.create(observerOrNext); + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isFunction__["a" /* isFunction */])(context.unsubscribe)) { + _this.add(context.unsubscribe.bind(context)); + } + context.unsubscribe = _this.unsubscribe.bind(_this); + } + } + _this._context = context; + _this._next = next; + _this._error = error; + _this._complete = complete; + return _this; + } + SafeSubscriber.prototype.next = function (value) { + if (!this.isStopped && this._next) { + var _parentSubscriber = this._parentSubscriber; + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._next, value); + } + else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.error = function (err) { + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + var useDeprecatedSynchronousErrorHandling = __WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling; + if (this._error) { + if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._error, err); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, this._error, err); + this.unsubscribe(); + } + } + else if (!_parentSubscriber.syncErrorThrowable) { + this.unsubscribe(); + if (useDeprecatedSynchronousErrorHandling) { + throw err; + } + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + else { + if (useDeprecatedSynchronousErrorHandling) { + _parentSubscriber.syncErrorValue = err; + _parentSubscriber.syncErrorThrown = true; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.complete = function () { + var _this = this; + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + if (this._complete) { + var wrappedComplete = function () { return _this._complete.call(_this._context); }; + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(wrappedComplete); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, wrappedComplete); + this.unsubscribe(); + } + } + else { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) { + try { + fn.call(this._context, value); + } + catch (err) { + this.unsubscribe(); + if (__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + throw err; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + } + }; + SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) { + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + throw new Error('bad call'); + } + try { + fn.call(this._context, value); + } + catch (err) { + if (__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + parent.syncErrorValue = err; + parent.syncErrorThrown = true; + return true; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + return true; + } + } + return false; + }; + SafeSubscriber.prototype._unsubscribe = function () { + var _parentSubscriber = this._parentSubscriber; + this._context = null; + this._parentSubscriber = null; + _parentSubscriber.unsubscribe(); + }; + return SafeSubscriber; +}(Subscriber)); + +//# sourceMappingURL=Subscriber.js.map + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getPathKey = getPathKey; +const os = __webpack_require__(46); +const path = __webpack_require__(0); +const userHome = __webpack_require__(67).default; + +var _require = __webpack_require__(225); + +const getCacheDir = _require.getCacheDir, + getConfigDir = _require.getConfigDir, + getDataDir = _require.getDataDir; + +const isWebpackBundle = __webpack_require__(278); + +const DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies']; +const OWNED_DEPENDENCY_TYPES = exports.OWNED_DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies']; + +const RESOLUTIONS = exports.RESOLUTIONS = 'resolutions'; +const MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS, ...DEPENDENCY_TYPES]; + +const SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0'; + +const YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com'; +const NPM_REGISTRY_RE = exports.NPM_REGISTRY_RE = /https?:\/\/registry\.npmjs\.org/g; + +const YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/'; +const YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh'; +const YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi'; + +const SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; + +// cache version, bump whenever we make backwards incompatible changes +const CACHE_VERSION = exports.CACHE_VERSION = 6; + +// lockfile version, bump whenever we make backwards incompatible changes +const LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1; + +// max amount of network requests to perform concurrently +const NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8; + +// HTTP timeout used when downloading packages +const NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds + +// max amount of child processes to execute concurrently +const CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5; + +const REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid']; + +function getPreferredCacheDirectories() { + const preferredCacheDirectories = [getCacheDir()]; + + if (process.getuid) { + // $FlowFixMe: process.getuid exists, dammit + preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`)); + } + + preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`)); + + return preferredCacheDirectories; +} + +const PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); +const CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir(); +const DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir(); +const LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link'); +const GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global'); + +const NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath; +const YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath(); + +// Webpack needs to be configured with node.__dirname/__filename = false +function getYarnBinPath() { + if (isWebpackBundle) { + return __filename; + } else { + return path.join(__dirname, '..', 'bin', 'yarn.js'); + } +} + +const NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules'; +const NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json'; + +const PNP_FILENAME = exports.PNP_FILENAME = '.pnp.js'; + +const POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`; +const FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn'); + +const META_FOLDER = exports.META_FOLDER = '.yarn-meta'; +const INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity'; +const LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock'; +const METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json'; +const TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz'; +const CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean'; + +const NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json'; +const NPM_SHRINKWRAP_FILENAME = exports.NPM_SHRINKWRAP_FILENAME = 'npm-shrinkwrap.json'; + +const DEFAULT_INDENT = exports.DEFAULT_INDENT = ' '; +const SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997; +const SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance'; + +const ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env); + +function getPathKey(platform, env) { + let pathKey = 'PATH'; + + // windows calls its path "Path" usually, but this is not guaranteed. + if (platform === 'win32') { + pathKey = 'Path'; + + for (const key in env) { + if (key.toLowerCase() === 'path') { + pathKey = key; + } + } + } + + return pathKey; +} + +const VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = { + major: 'red', + premajor: 'red', + minor: 'yellow', + preminor: 'yellow', + patch: 'green', + prepatch: 'green', + prerelease: 'red', + unchanged: 'white', + unknown: 'red' +}; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var NODE_ENV = process.env.NODE_ENV; + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var YAMLException = __webpack_require__(54); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +module.exports = require("crypto"); + +/***/ }), +/* 12 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(322); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__(932); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(324); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(185); +/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */ + + + + + +var Observable = /*@__PURE__*/ (function () { + function Observable(subscribe) { + this._isScalar = false; + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable.prototype.lift = function (operator) { + var observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable.prototype.subscribe = function (observerOrNext, error, complete) { + var operator = this.operator; + var sink = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__["a" /* toSubscriber */])(observerOrNext, error, complete); + if (operator) { + operator.call(sink, this.source); + } + else { + sink.add(this.source || (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ? + this._subscribe(sink) : + this._trySubscribe(sink)); + } + if (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + if (sink.syncErrorThrowable) { + sink.syncErrorThrowable = false; + if (sink.syncErrorThrown) { + throw sink.syncErrorValue; + } + } + } + return sink; + }; + Observable.prototype._trySubscribe = function (sink) { + try { + return this._subscribe(sink); + } + catch (err) { + if (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + sink.syncErrorThrown = true; + sink.syncErrorValue = err; + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_canReportError__["a" /* canReportError */])(sink)) { + sink.error(err); + } + else { + console.warn(err); + } + } + }; + Observable.prototype.forEach = function (next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var subscription; + subscription = _this.subscribe(function (value) { + try { + next(value); + } + catch (err) { + reject(err); + if (subscription) { + subscription.unsubscribe(); + } + } + }, reject, resolve); + }); + }; + Observable.prototype._subscribe = function (subscriber) { + var source = this.source; + return source && source.subscribe(subscriber); + }; + Observable.prototype[__WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__["a" /* observable */]] = function () { + return this; + }; + Observable.prototype.pipe = function () { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + if (operations.length === 0) { + return this; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["b" /* pipeFromArray */])(operations)(this); + }; + Observable.prototype.toPromise = function (promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var value; + _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); }); + }); + }; + Observable.create = function (subscribe) { + return new Observable(subscribe); + }; + return Observable; +}()); + +function getPromiseCtor(promiseCtor) { + if (!promiseCtor) { + promiseCtor = __WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].Promise || Promise; + } + if (!promiseCtor) { + throw new Error('no Promise impl found'); + } + return promiseCtor; +} +//# sourceMappingURL=Observable.js.map + + +/***/ }), +/* 13 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OuterSubscriber; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +var OuterSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](OuterSubscriber, _super); + function OuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.destination.next(innerValue); + }; + OuterSubscriber.prototype.notifyError = function (error, innerSub) { + this.destination.error(error); + }; + OuterSubscriber.prototype.notifyComplete = function (innerSub) { + this.destination.complete(); + }; + return OuterSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); + +//# sourceMappingURL=OuterSubscriber.js.map + + +/***/ }), +/* 14 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = subscribeToResult; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__InnerSubscriber__ = __webpack_require__(84); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__subscribeTo__ = __webpack_require__(446); +/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */ + + +function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) { + if (destination === void 0) { + destination = new __WEBPACK_IMPORTED_MODULE_0__InnerSubscriber__["a" /* InnerSubscriber */](outerSubscriber, outerValue, outerIndex); + } + if (destination.closed) { + return; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__subscribeTo__["a" /* subscribeTo */])(result)(destination); +} +//# sourceMappingURL=subscribeToResult.js.map + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* eslint-disable node/no-deprecated-api */ + + + +var buffer = __webpack_require__(64) +var Buffer = buffer.Buffer + +var safer = {} + +var key + +for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue + if (key === 'SlowBuffer' || key === 'Buffer') continue + safer[key] = buffer[key] +} + +var Safer = safer.Buffer = {} +for (key in Buffer) { + if (!Buffer.hasOwnProperty(key)) continue + if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue + Safer[key] = Buffer[key] +} + +safer.Buffer.prototype = Buffer.prototype + +if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) + } + if (value && typeof value.length === 'undefined') { + throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) + } + return Buffer(value, encodingOrOffset, length) + } +} + +if (!Safer.alloc) { + Safer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } + var buf = Buffer(size) + if (!fill || fill.length === 0) { + buf.fill(0) + } else if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + return buf + } +} + +if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding('buffer').kStringMaxLength + } catch (e) { + // we can't determine kStringMaxLength in environments where process.binding + // is unsupported, so let's not set it + } +} + +if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + } + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength + } +} + +module.exports = safer + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright (c) 2012, Mark Cavage. All rights reserved. +// Copyright 2015 Joyent, Inc. + +var assert = __webpack_require__(28); +var Stream = __webpack_require__(23).Stream; +var util = __webpack_require__(3); + + +///--- Globals + +/* JSSTYLED */ +var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; + + +///--- Internal + +function _capitalize(str) { + return (str.charAt(0).toUpperCase() + str.slice(1)); +} + +function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util.format('%s (%s) is required', name, expected), + actual: (actual === undefined) ? typeof (arg) : actual(arg), + expected: expected, + operator: oper || '===', + stackStartFunction: _toss.caller + }); +} + +function _getClass(arg) { + return (Object.prototype.toString.call(arg).slice(8, -1)); +} + +function noop() { + // Why even bother with asserts? +} + + +///--- Exports + +var types = { + bool: { + check: function (arg) { return typeof (arg) === 'boolean'; } + }, + func: { + check: function (arg) { return typeof (arg) === 'function'; } + }, + string: { + check: function (arg) { return typeof (arg) === 'string'; } + }, + object: { + check: function (arg) { + return typeof (arg) === 'object' && arg !== null; + } + }, + number: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg); + } + }, + finite: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function (arg) { return Buffer.isBuffer(arg); }, + operator: 'Buffer.isBuffer' + }, + array: { + check: function (arg) { return Array.isArray(arg); }, + operator: 'Array.isArray' + }, + stream: { + check: function (arg) { return arg instanceof Stream; }, + operator: 'instanceof', + actual: _getClass + }, + date: { + check: function (arg) { return arg instanceof Date; }, + operator: 'instanceof', + actual: _getClass + }, + regexp: { + check: function (arg) { return arg instanceof RegExp; }, + operator: 'instanceof', + actual: _getClass + }, + uuid: { + check: function (arg) { + return typeof (arg) === 'string' && UUID_REGEXP.test(arg); + }, + operator: 'isUUID' + } +}; + +function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + + /* re-export standard assert */ + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function (arg, msg) { + if (!arg) { + _toss(msg, 'true', arg); + } + }; + } + + /* standard checks */ + keys.forEach(function (k) { + if (ndebug) { + out[k] = noop; + return; + } + var type = types[k]; + out[k] = function (arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* optional checks */ + keys.forEach(function (k) { + var name = 'optional' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* arrayOf checks */ + keys.forEach(function (k) { + var name = 'arrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* optionalArrayOf checks */ + keys.forEach(function (k) { + var name = 'optionalArrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* re-export built-in assertions */ + Object.keys(assert).forEach(function (k) { + if (k === 'AssertionError') { + out[k] = assert[k]; + return; + } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); + + /* export ourselves (for unit tests _only_) */ + out._setExports = _setExports; + + return out; +} + +module.exports = _setExports(process.env.NODE_NDEBUG); + + +/***/ }), +/* 17 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.sortAlpha = sortAlpha; +exports.sortOptionsByFlags = sortOptionsByFlags; +exports.entries = entries; +exports.removePrefix = removePrefix; +exports.removeSuffix = removeSuffix; +exports.addSuffix = addSuffix; +exports.hyphenate = hyphenate; +exports.camelCase = camelCase; +exports.compareSortedArrays = compareSortedArrays; +exports.sleep = sleep; +const _camelCase = __webpack_require__(230); + +function sortAlpha(a, b) { + // sort alphabetically in a deterministic way + const shortLen = Math.min(a.length, b.length); + for (let i = 0; i < shortLen; i++) { + const aChar = a.charCodeAt(i); + const bChar = b.charCodeAt(i); + if (aChar !== bChar) { + return aChar - bChar; + } + } + return a.length - b.length; +} + +function sortOptionsByFlags(a, b) { + const aOpt = a.flags.replace(/-/g, ''); + const bOpt = b.flags.replace(/-/g, ''); + return sortAlpha(aOpt, bOpt); +} + +function entries(obj) { + const entries = []; + if (obj) { + for (const key in obj) { + entries.push([key, obj[key]]); + } + } + return entries; +} + +function removePrefix(pattern, prefix) { + if (pattern.startsWith(prefix)) { + pattern = pattern.slice(prefix.length); + } + + return pattern; +} + +function removeSuffix(pattern, suffix) { + if (pattern.endsWith(suffix)) { + return pattern.slice(0, -suffix.length); + } + + return pattern; +} + +function addSuffix(pattern, suffix) { + if (!pattern.endsWith(suffix)) { + return pattern + suffix; + } + + return pattern; +} + +function hyphenate(str) { + return str.replace(/[A-Z]/g, match => { + return '-' + match.charAt(0).toLowerCase(); + }); +} + +function camelCase(str) { + if (/[A-Z]/.test(str)) { + return null; + } else { + return _camelCase(str); + } +} + +function compareSortedArrays(array1, array2) { + if (array1.length !== array2.length) { + return false; + } + for (let i = 0, len = array1.length; i < len; i++) { + if (array1[i] !== array2[i]) { + return false; + } + } + return true; +} + +function sleep(ms) { + return new Promise(resolve => { + setTimeout(resolve, ms); + }); +} + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.stringify = exports.parse = undefined; + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} + +var _parse; + +function _load_parse() { + return _parse = __webpack_require__(105); +} + +Object.defineProperty(exports, 'parse', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_parse || _load_parse()).default; + } +}); + +var _stringify; + +function _load_stringify() { + return _stringify = __webpack_require__(199); +} + +Object.defineProperty(exports, 'stringify', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_stringify || _load_stringify()).default; + } +}); +exports.implodeEntry = implodeEntry; +exports.explodeEntry = explodeEntry; + +var _misc; + +function _load_misc() { + return _misc = __webpack_require__(18); +} + +var _normalizePattern; + +function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(37); +} + +var _parse2; + +function _load_parse2() { + return _parse2 = _interopRequireDefault(__webpack_require__(105)); +} + +var _constants; + +function _load_constants() { + return _constants = __webpack_require__(8); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(4)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const invariant = __webpack_require__(9); + +const path = __webpack_require__(0); +const ssri = __webpack_require__(65); + +function getName(pattern) { + return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; +} + +function blankObjectUndefined(obj) { + return obj && Object.keys(obj).length ? obj : undefined; +} + +function keyForRemote(remote) { + return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); +} + +function serializeIntegrity(integrity) { + // We need this because `Integrity.toString()` does not use sorting to ensure a stable string output + // See https://git.io/vx2Hy + return integrity.toString().split(' ').sort().join(' '); +} + +function implodeEntry(pattern, obj) { + const inferredName = getName(pattern); + const integrity = obj.integrity ? serializeIntegrity(obj.integrity) : ''; + const imploded = { + name: inferredName === obj.name ? undefined : obj.name, + version: obj.version, + uid: obj.uid === obj.version ? undefined : obj.uid, + resolved: obj.resolved, + registry: obj.registry === 'npm' ? undefined : obj.registry, + dependencies: blankObjectUndefined(obj.dependencies), + optionalDependencies: blankObjectUndefined(obj.optionalDependencies), + permissions: blankObjectUndefined(obj.permissions), + prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) + }; + if (integrity) { + imploded.integrity = integrity; + } + return imploded; +} + +function explodeEntry(pattern, obj) { + obj.optionalDependencies = obj.optionalDependencies || {}; + obj.dependencies = obj.dependencies || {}; + obj.uid = obj.uid || obj.version; + obj.permissions = obj.permissions || {}; + obj.registry = obj.registry || 'npm'; + obj.name = obj.name || getName(pattern); + const integrity = obj.integrity; + if (integrity && integrity.isIntegrity) { + obj.integrity = ssri.parse(integrity); + } + return obj; +} + +class Lockfile { + constructor({ cache, source, parseResultType } = {}) { + this.source = source || ''; + this.cache = cache; + this.parseResultType = parseResultType; + } + + // source string if the `cache` was parsed + + + // if true, we're parsing an old yarn file and need to update integrity fields + hasEntriesExistWithoutIntegrity() { + if (!this.cache) { + return false; + } + + for (const key in this.cache) { + // $FlowFixMe - `this.cache` is clearly defined at this point + if (!/^.*@(file:|http)/.test(key) && this.cache[key] && !this.cache[key].integrity) { + return true; + } + } + + return false; + } + + static fromDirectory(dir, reporter) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // read the manifest in this directory + const lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); + + let lockfile; + let rawLockfile = ''; + let parseResult; + + if (yield (_fs || _load_fs()).exists(lockfileLoc)) { + rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); + parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); + + if (reporter) { + if (parseResult.type === 'merge') { + reporter.info(reporter.lang('lockfileMerged')); + } else if (parseResult.type === 'conflict') { + reporter.warn(reporter.lang('lockfileConflict')); + } + } + + lockfile = parseResult.object; + } else if (reporter) { + reporter.info(reporter.lang('noLockfileFound')); + } + + if (lockfile && lockfile.__metadata) { + const lockfilev2 = lockfile; + lockfile = {}; + } + + return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); + })(); + } + + getLocked(pattern) { + const cache = this.cache; + if (!cache) { + return undefined; + } + + const shrunk = pattern in cache && cache[pattern]; + + if (typeof shrunk === 'string') { + return this.getLocked(shrunk); + } else if (shrunk) { + explodeEntry(pattern, shrunk); + return shrunk; + } + + return undefined; + } + + removePattern(pattern) { + const cache = this.cache; + if (!cache) { + return; + } + delete cache[pattern]; + } + + getLockfile(patterns) { + const lockfile = {}; + const seen = new Map(); + + // order by name so that lockfile manifest is assigned to the first dependency with this manifest + // the others that have the same remoteKey will just refer to the first + // ordering allows for consistency in lockfile when it is serialized + const sortedPatternsKeys = Object.keys(patterns).sort((_misc || _load_misc()).sortAlpha); + + for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + const pattern = _ref; + + const pkg = patterns[pattern]; + const remote = pkg._remote, + ref = pkg._reference; + + invariant(ref, 'Package is missing a reference'); + invariant(remote, 'Package is missing a remote'); + + const remoteKey = keyForRemote(remote); + const seenPattern = remoteKey && seen.get(remoteKey); + if (seenPattern) { + // no point in duplicating it + lockfile[pattern] = seenPattern; + + // if we're relying on our name being inferred and two of the patterns have + // different inferred names then we need to set it + if (!seenPattern.name && getName(pattern) !== pkg.name) { + seenPattern.name = pkg.name; + } + continue; + } + const obj = implodeEntry(pattern, { + name: pkg.name, + version: pkg.version, + uid: pkg._uid, + resolved: remote.resolved, + integrity: remote.integrity, + registry: remote.registry, + dependencies: pkg.dependencies, + peerDependencies: pkg.peerDependencies, + optionalDependencies: pkg.optionalDependencies, + permissions: ref.permissions, + prebuiltVariants: pkg.prebuiltVariants + }); + + lockfile[pattern] = obj; + + if (remoteKey) { + seen.set(remoteKey, obj); + } + } + + return lockfile; + } +} +exports.default = Lockfile; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(133)('wks'); +var uid = __webpack_require__(137); +var Symbol = __webpack_require__(17).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _assign = __webpack_require__(591); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++; +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, loose) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + if (version.length > MAX_LENGTH) + return null; + + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, loose); + + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) + return num; + } + return id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + this.raw = this.version; + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); + + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + debug('comp', this); +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.loose); + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + return cmp(version, this.operator, this.semver, this.loose); +}; + +Comparator.prototype.intersects = function(comp, loose) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, loose); + return satisfies(this.value, rangeTmp, loose); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, loose); + return satisfies(comp.semver, rangeTmp, loose); + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, loose) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')); + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, loose) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')); + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; +}; + + +exports.Range = Range; +function Range(range, loose) { + if (range instanceof Range) { + if (range.loose === loose) { + return range; + } else { + return new Range(range.raw, loose); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, loose); + } + + if (!(this instanceof Range)) + return new Range(range, loose); + + this.loose = loose; + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); + + return set; +}; + +Range.prototype.intersects = function(range, loose) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function(thisComparators) { + return thisComparators.every(function(thisComparator) { + return range.set.some(function(rangeComparators) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, loose); + }); + }); + }); + }); +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) + M = +M + 1; + else + m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) + max = v; + maxSV = new SemVer(max, loose); + } + } + }) + return max; +} + +exports.minSatisfying = minSatisfying; +function minSatisfying(versions, range, loose) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!min || minSV.compare(v) === 1) { // compare(min, v, true) + min = v; + minSV = new SemVer(min, loose); + } + } + }) + return min; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +exports.prerelease = prerelease; +function prerelease(version, loose) { + var parsed = parse(version, loose); + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +} + +exports.intersects = intersects; +function intersects(r1, r2, loose) { + r1 = new Range(r1, loose) + r2 = new Range(r2, loose) + return r1.intersects(r2) +} + +exports.coerce = coerce; +function coerce(version) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + var match = version.match(re[COERCE]); + + if (match == null) + return null; + + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); +} + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +module.exports = require("stream"); + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +module.exports = require("url"); + +/***/ }), +/* 25 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(41); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(444); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(441); +/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */ + + + + + + +var Subscription = /*@__PURE__*/ (function () { + function Subscription(unsubscribe) { + this.closed = false; + this._parent = null; + this._parents = null; + this._subscriptions = null; + if (unsubscribe) { + this._unsubscribe = unsubscribe; + } + } + Subscription.prototype.unsubscribe = function () { + var hasErrors = false; + var errors; + if (this.closed) { + return; + } + var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; + this.closed = true; + this._parent = null; + this._parents = null; + this._subscriptions = null; + var index = -1; + var len = _parents ? _parents.length : 0; + while (_parent) { + _parent.remove(this); + _parent = ++index < len && _parents[index] || null; + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isFunction__["a" /* isFunction */])(_unsubscribe)) { + var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(_unsubscribe).call(this); + if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { + hasErrors = true; + errors = errors || (__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */] ? + flattenUnsubscriptionErrors(__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e.errors) : [__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e]); + } + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_isArray__["a" /* isArray */])(_subscriptions)) { + index = -1; + len = _subscriptions.length; + while (++index < len) { + var sub = _subscriptions[index]; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isObject__["a" /* isObject */])(sub)) { + var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(sub.unsubscribe).call(sub); + if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { + hasErrors = true; + errors = errors || []; + var err = __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e; + if (err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) { + errors = errors.concat(flattenUnsubscriptionErrors(err.errors)); + } + else { + errors.push(err); + } + } + } + } + } + if (hasErrors) { + throw new __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */](errors); + } + }; + Subscription.prototype.add = function (teardown) { + if (!teardown || (teardown === Subscription.EMPTY)) { + return Subscription.EMPTY; + } + if (teardown === this) { + return this; + } + var subscription = teardown; + switch (typeof teardown) { + case 'function': + subscription = new Subscription(teardown); + case 'object': + if (subscription.closed || typeof subscription.unsubscribe !== 'function') { + return subscription; + } + else if (this.closed) { + subscription.unsubscribe(); + return subscription; + } + else if (typeof subscription._addParent !== 'function') { + var tmp = subscription; + subscription = new Subscription(); + subscription._subscriptions = [tmp]; + } + break; + default: + throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); + } + var subscriptions = this._subscriptions || (this._subscriptions = []); + subscriptions.push(subscription); + subscription._addParent(this); + return subscription; + }; + Subscription.prototype.remove = function (subscription) { + var subscriptions = this._subscriptions; + if (subscriptions) { + var subscriptionIndex = subscriptions.indexOf(subscription); + if (subscriptionIndex !== -1) { + subscriptions.splice(subscriptionIndex, 1); + } + } + }; + Subscription.prototype._addParent = function (parent) { + var _a = this, _parent = _a._parent, _parents = _a._parents; + if (!_parent || _parent === parent) { + this._parent = parent; + } + else if (!_parents) { + this._parents = [parent]; + } + else if (_parents.indexOf(parent) === -1) { + _parents.push(parent); + } + }; + Subscription.EMPTY = (function (empty) { + empty.closed = true; + return empty; + }(new Subscription())); + return Subscription; +}()); + +function flattenUnsubscriptionErrors(errors) { + return errors.reduce(function (errs, err) { return errs.concat((err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) ? err.errors : err); }, []); +} +//# sourceMappingURL=Subscription.js.map + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + bufferSplit: bufferSplit, + addRSAMissing: addRSAMissing, + calculateDSAPublic: calculateDSAPublic, + calculateED25519Public: calculateED25519Public, + calculateX25519Public: calculateX25519Public, + mpNormalize: mpNormalize, + mpDenormalize: mpDenormalize, + ecNormalize: ecNormalize, + countZeros: countZeros, + assertCompatible: assertCompatible, + isCompatible: isCompatible, + opensslKeyDeriv: opensslKeyDeriv, + opensshCipherInfo: opensshCipherInfo, + publicFromPrivateECDSA: publicFromPrivateECDSA, + zeroPadToLength: zeroPadToLength, + writeBitString: writeBitString, + readBitString: readBitString +}; + +var assert = __webpack_require__(16); +var Buffer = __webpack_require__(15).Buffer; +var PrivateKey = __webpack_require__(33); +var Key = __webpack_require__(27); +var crypto = __webpack_require__(11); +var algs = __webpack_require__(32); +var asn1 = __webpack_require__(66); + +var ec, jsbn; +var nacl; + +var MAX_CLASS_DEPTH = 3; + +function isCompatible(obj, klass, needVer) { + if (obj === null || typeof (obj) !== 'object') + return (false); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return (true); + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + if (!proto || ++depth > MAX_CLASS_DEPTH) + return (false); + } + if (proto.constructor.name !== klass.name) + return (false); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + if (ver[0] != needVer[0] || ver[1] < needVer[1]) + return (false); + return (true); +} + +function assertCompatible(obj, klass, needVer, name) { + if (name === undefined) + name = 'object'; + assert.ok(obj, name + ' must not be null'); + assert.object(obj, name + ' must be an object'); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return; + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, + name + ' must be a ' + klass.name + ' instance'); + } + assert.strictEqual(proto.constructor.name, klass.name, + name + ' must be a ' + klass.name + ' instance'); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], + name + ' must be compatible with ' + klass.name + ' klass ' + + 'version ' + needVer[0] + '.' + needVer[1]); +} + +var CIPHER_LEN = { + 'des-ede3-cbc': { key: 7, iv: 8 }, + 'aes-128-cbc': { key: 16, iv: 16 } +}; +var PKCS5_SALT_LEN = 8; + +function opensslKeyDeriv(cipher, salt, passphrase, count) { + assert.buffer(salt, 'salt'); + assert.buffer(passphrase, 'passphrase'); + assert.number(count, 'iteration count'); + + var clen = CIPHER_LEN[cipher]; + assert.object(clen, 'supported cipher'); + + salt = salt.slice(0, PKCS5_SALT_LEN); + + var D, D_prev, bufs; + var material = Buffer.alloc(0); + while (material.length < clen.key + clen.iv) { + bufs = []; + if (D_prev) + bufs.push(D_prev); + bufs.push(passphrase); + bufs.push(salt); + D = Buffer.concat(bufs); + for (var j = 0; j < count; ++j) + D = crypto.createHash('md5').update(D).digest(); + material = Buffer.concat([material, D]); + D_prev = D; + } + + return ({ + key: material.slice(0, clen.key), + iv: material.slice(clen.key, clen.key + clen.iv) + }); +} + +/* Count leading zero bits on a buffer */ +function countZeros(buf) { + var o = 0, obit = 8; + while (o < buf.length) { + var mask = (1 << obit); + if ((buf[o] & mask) === mask) + break; + obit--; + if (obit < 0) { + o++; + obit = 8; + } + } + return (o*8 + (8 - obit) - 1); +} + +function bufferSplit(buf, chr) { + assert.buffer(buf); + assert.string(chr); + + var parts = []; + var lastPart = 0; + var matches = 0; + for (var i = 0; i < buf.length; ++i) { + if (buf[i] === chr.charCodeAt(matches)) + ++matches; + else if (buf[i] === chr.charCodeAt(0)) + matches = 1; + else + matches = 0; + + if (matches >= chr.length) { + var newPart = i + 1; + parts.push(buf.slice(lastPart, newPart - matches)); + lastPart = newPart; + matches = 0; + } + } + if (lastPart <= buf.length) + parts.push(buf.slice(lastPart, buf.length)); + + return (parts); +} + +function ecNormalize(buf, addZero) { + assert.buffer(buf); + if (buf[0] === 0x00 && buf[1] === 0x04) { + if (addZero) + return (buf); + return (buf.slice(1)); + } else if (buf[0] === 0x04) { + if (!addZero) + return (buf); + } else { + while (buf[0] === 0x00) + buf = buf.slice(1); + if (buf[0] === 0x02 || buf[0] === 0x03) + throw (new Error('Compressed elliptic curve points ' + + 'are not supported')); + if (buf[0] !== 0x04) + throw (new Error('Not a valid elliptic curve point')); + if (!addZero) + return (buf); + } + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x0; + buf.copy(b, 1); + return (b); +} + +function readBitString(der, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var buf = der.readString(tag, true); + assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' + + 'not supported (0x' + buf[0].toString(16) + ')'); + return (buf.slice(1)); +} + +function writeBitString(der, buf, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + der.writeBuffer(b, tag); +} + +function mpNormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) + buf = buf.slice(1); + if ((buf[0] & 0x80) === 0x80) { + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function mpDenormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00) + buf = buf.slice(1); + return (buf); +} + +function zeroPadToLength(buf, len) { + assert.buffer(buf); + assert.number(len); + while (buf.length > len) { + assert.equal(buf[0], 0x00); + buf = buf.slice(1); + } + while (buf.length < len) { + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function bigintToMpBuf(bigint) { + var buf = Buffer.from(bigint.toByteArray()); + buf = mpNormalize(buf); + return (buf); +} + +function calculateDSAPublic(g, p, x) { + assert.buffer(g); + assert.buffer(p); + assert.buffer(x); + try { + var bigInt = __webpack_require__(81).BigInteger; + } catch (e) { + throw (new Error('To load a PKCS#8 format DSA private key, ' + + 'the node jsbn library is required.')); + } + g = new bigInt(g); + p = new bigInt(p); + x = new bigInt(x); + var y = g.modPow(x, p); + var ybuf = bigintToMpBuf(y); + return (ybuf); +} + +function calculateED25519Public(k) { + assert.buffer(k); + + if (nacl === undefined) + nacl = __webpack_require__(76); + + var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function calculateX25519Public(k) { + assert.buffer(k); + + if (nacl === undefined) + nacl = __webpack_require__(76); + + var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function addRSAMissing(key) { + assert.object(key); + assertCompatible(key, PrivateKey, [1, 1]); + try { + var bigInt = __webpack_require__(81).BigInteger; + } catch (e) { + throw (new Error('To write a PEM private key from ' + + 'this source, the node jsbn lib is required.')); + } + + var d = new bigInt(key.part.d.data); + var buf; + + if (!key.part.dmodp) { + var p = new bigInt(key.part.p.data); + var dmodp = d.mod(p.subtract(1)); + + buf = bigintToMpBuf(dmodp); + key.part.dmodp = {name: 'dmodp', data: buf}; + key.parts.push(key.part.dmodp); + } + if (!key.part.dmodq) { + var q = new bigInt(key.part.q.data); + var dmodq = d.mod(q.subtract(1)); + + buf = bigintToMpBuf(dmodq); + key.part.dmodq = {name: 'dmodq', data: buf}; + key.parts.push(key.part.dmodq); + } +} + +function publicFromPrivateECDSA(curveName, priv) { + assert.string(curveName, 'curveName'); + assert.buffer(priv); + if (ec === undefined) + ec = __webpack_require__(139); + if (jsbn === undefined) + jsbn = __webpack_require__(81).BigInteger; + var params = algs.curves[curveName]; + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + var d = new jsbn(mpNormalize(priv)); + var pub = G.multiply(d); + pub = Buffer.from(curve.encodePointHex(pub), 'hex'); + + var parts = []; + parts.push({name: 'curve', data: Buffer.from(curveName)}); + parts.push({name: 'Q', data: pub}); + + var key = new Key({type: 'ecdsa', curve: curve, parts: parts}); + return (key); +} + +function opensshCipherInfo(cipher) { + var inf = {}; + switch (cipher) { + case '3des-cbc': + inf.keySize = 24; + inf.blockSize = 8; + inf.opensslName = 'des-ede3-cbc'; + break; + case 'blowfish-cbc': + inf.keySize = 16; + inf.blockSize = 8; + inf.opensslName = 'bf-cbc'; + break; + case 'aes128-cbc': + case 'aes128-ctr': + case 'aes128-gcm@openssh.com': + inf.keySize = 16; + inf.blockSize = 16; + inf.opensslName = 'aes-128-' + cipher.slice(7, 10); + break; + case 'aes192-cbc': + case 'aes192-ctr': + case 'aes192-gcm@openssh.com': + inf.keySize = 24; + inf.blockSize = 16; + inf.opensslName = 'aes-192-' + cipher.slice(7, 10); + break; + case 'aes256-cbc': + case 'aes256-ctr': + case 'aes256-gcm@openssh.com': + inf.keySize = 32; + inf.blockSize = 16; + inf.opensslName = 'aes-256-' + cipher.slice(7, 10); + break; + default: + throw (new Error( + 'Unsupported openssl cipher "' + cipher + '"')); + } + return (inf); +} + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2017 Joyent, Inc. + +module.exports = Key; + +var assert = __webpack_require__(16); +var algs = __webpack_require__(32); +var crypto = __webpack_require__(11); +var Fingerprint = __webpack_require__(156); +var Signature = __webpack_require__(75); +var DiffieHellman = __webpack_require__(325).DiffieHellman; +var errs = __webpack_require__(74); +var utils = __webpack_require__(26); +var PrivateKey = __webpack_require__(33); +var edCompat; + +try { + edCompat = __webpack_require__(454); +} catch (e) { + /* Just continue through, and bail out if we try to use it. */ +} + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; + +var formats = {}; +formats['auto'] = __webpack_require__(455); +formats['pem'] = __webpack_require__(86); +formats['pkcs1'] = __webpack_require__(327); +formats['pkcs8'] = __webpack_require__(157); +formats['rfc4253'] = __webpack_require__(103); +formats['ssh'] = __webpack_require__(456); +formats['ssh-private'] = __webpack_require__(192); +formats['openssh'] = formats['ssh-private']; +formats['dnssec'] = __webpack_require__(326); + +function Key(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.parts, 'options.parts'); + assert.string(opts.type, 'options.type'); + assert.optionalString(opts.comment, 'options.comment'); + + var algInfo = algs.info[opts.type]; + if (typeof (algInfo) !== 'object') + throw (new InvalidAlgorithmError(opts.type)); + + var partLookup = {}; + for (var i = 0; i < opts.parts.length; ++i) { + var part = opts.parts[i]; + partLookup[part.name] = part; + } + + this.type = opts.type; + this.parts = opts.parts; + this.part = partLookup; + this.comment = undefined; + this.source = opts.source; + + /* for speeding up hashing/fingerprint operations */ + this._rfc4253Cache = opts._rfc4253Cache; + this._hashCache = {}; + + var sz; + this.curve = undefined; + if (this.type === 'ecdsa') { + var curve = this.part.curve.data.toString(); + this.curve = curve; + sz = algs.curves[curve].size; + } else if (this.type === 'ed25519' || this.type === 'curve25519') { + sz = 256; + this.curve = 'curve25519'; + } else { + var szPart = this.part[algInfo.sizePart]; + sz = szPart.data.length; + sz = sz * 8 - utils.countZeros(szPart.data); + } + this.size = sz; +} + +Key.formats = formats; + +Key.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'ssh'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + if (format === 'rfc4253') { + if (this._rfc4253Cache === undefined) + this._rfc4253Cache = formats['rfc4253'].write(this); + return (this._rfc4253Cache); + } + + return (formats[format].write(this, options)); +}; + +Key.prototype.toString = function (format, options) { + return (this.toBuffer(format, options).toString()); +}; + +Key.prototype.hash = function (algo) { + assert.string(algo, 'algorithm'); + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === undefined) + throw (new InvalidAlgorithmError(algo)); + + if (this._hashCache[algo]) + return (this._hashCache[algo]); + var hash = crypto.createHash(algo). + update(this.toBuffer('rfc4253')).digest(); + this._hashCache[algo] = hash; + return (hash); +}; + +Key.prototype.fingerprint = function (algo) { + if (algo === undefined) + algo = 'sha256'; + assert.string(algo, 'algorithm'); + var opts = { + type: 'key', + hash: this.hash(algo), + algorithm: algo + }; + return (new Fingerprint(opts)); +}; + +Key.prototype.defaultHashAlgorithm = function () { + var hashAlgo = 'sha1'; + if (this.type === 'rsa') + hashAlgo = 'sha256'; + if (this.type === 'dsa' && this.size > 1024) + hashAlgo = 'sha256'; + if (this.type === 'ed25519') + hashAlgo = 'sha512'; + if (this.type === 'ecdsa') { + if (this.size <= 256) + hashAlgo = 'sha256'; + else if (this.size <= 384) + hashAlgo = 'sha384'; + else + hashAlgo = 'sha512'; + } + return (hashAlgo); +}; + +Key.prototype.createVerify = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Verifier(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldVerify = v.verify.bind(v); + var key = this.toBuffer('pkcs8'); + var curve = this.curve; + var self = this; + v.verify = function (signature, fmt) { + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== self.type) + return (false); + if (signature.hashAlgorithm && + signature.hashAlgorithm !== hashAlgo) + return (false); + if (signature.curve && self.type === 'ecdsa' && + signature.curve !== curve) + return (false); + return (oldVerify(key, signature.toBuffer('asn1'))); + + } else if (typeof (signature) === 'string' || + Buffer.isBuffer(signature)) { + return (oldVerify(key, signature, fmt)); + + /* + * Avoid doing this on valid arguments, walking the prototype + * chain can be quite slow. + */ + } else if (Signature.isSignature(signature, [1, 0])) { + throw (new Error('signature was created by too old ' + + 'a version of sshpk and cannot be verified')); + + } else { + throw (new TypeError('signature must be a string, ' + + 'Buffer, or Signature object')); + } + }; + return (v); +}; + +Key.prototype.createDiffieHellman = function () { + if (this.type === 'rsa') + throw (new Error('RSA keys do not support Diffie-Hellman')); + + return (new DiffieHellman(this)); +}; +Key.prototype.createDH = Key.prototype.createDiffieHellman; + +Key.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + if (k instanceof PrivateKey) + k = k.toPublic(); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +Key.isKey = function (obj, ver) { + return (utils.isCompatible(obj, Key, ver)); +}; + +/* + * API versions for Key: + * [1,0] -- initial ver, may take Signature for createVerify or may not + * [1,1] -- added pkcs1, pkcs8 formats + * [1,2] -- added auto, ssh-private, openssh formats + * [1,3] -- added defaultHashAlgorithm + * [1,4] -- added ed support, createDH + * [1,5] -- first explicitly tagged version + * [1,6] -- changed ed25519 part names + */ +Key.prototype._sshpkApiVersion = [1, 6]; + +Key._oldVersionDetect = function (obj) { + assert.func(obj.toBuffer); + assert.func(obj.fingerprint); + if (obj.createDH) + return ([1, 4]); + if (obj.defaultHashAlgorithm) + return ([1, 3]); + if (obj.formats['auto']) + return ([1, 2]); + if (obj.formats['pkcs1']) + return ([1, 1]); + return ([1, 0]); +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +module.exports = require("assert"); + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = nullify; +function nullify(obj = {}) { + if (Array.isArray(obj)) { + for (var _iterator = obj, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + const item = _ref; + + nullify(item); + } + } else if (obj !== null && typeof obj === 'object' || typeof obj === 'function') { + Object.setPrototypeOf(obj, null); + + // for..in can only be applied to 'object', not 'function' + if (typeof obj === 'object') { + for (const key in obj) { + nullify(obj[key]); + } + } + } + + return obj; +} + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const escapeStringRegexp = __webpack_require__(388); +const ansiStyles = __webpack_require__(506); +const stdoutColor = __webpack_require__(598).stdout; + +const template = __webpack_require__(599); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +var Buffer = __webpack_require__(15).Buffer; + +var algInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y'], + sizePart: 'p' + }, + 'rsa': { + parts: ['e', 'n'], + sizePart: 'n' + }, + 'ecdsa': { + parts: ['curve', 'Q'], + sizePart: 'Q' + }, + 'ed25519': { + parts: ['A'], + sizePart: 'A' + } +}; +algInfo['curve25519'] = algInfo['ed25519']; + +var algPrivInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y', 'x'] + }, + 'rsa': { + parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] + }, + 'ecdsa': { + parts: ['curve', 'Q', 'd'] + }, + 'ed25519': { + parts: ['A', 'k'] + } +}; +algPrivInfo['curve25519'] = algPrivInfo['ed25519']; + +var hashAlgs = { + 'md5': true, + 'sha1': true, + 'sha256': true, + 'sha384': true, + 'sha512': true +}; + +/* + * Taken from + * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf + */ +var curves = { + 'nistp256': { + size: 256, + pkcs8oid: '1.2.840.10045.3.1.7', + p: Buffer.from(('00' + + 'ffffffff 00000001 00000000 00000000' + + '00000000 ffffffff ffffffff ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF 00000001 00000000 00000000' + + '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + + '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'c49d3608 86e70493 6a6678e1 139d26b7' + + '819f7e90'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff 00000000 ffffffff ffffffff' + + 'bce6faad a7179e84 f3b9cac2 fc632551'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + + '77037d81 2deb33a0 f4a13945 d898c296' + + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + + '2bce3357 6b315ece cbb64068 37bf51f5'). + replace(/ /g, ''), 'hex') + }, + 'nistp384': { + size: 384, + pkcs8oid: '1.3.132.0.34', + p: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffe' + + 'ffffffff 00000000 00000000 ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + + 'FFFFFFFF 00000000 00000000 FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + 'b3312fa7 e23ee7e4 988e056b e3f82d19' + + '181d9c6e fe814112 0314088f 5013875a' + + 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'a335926a a319a27a 1d00896a 6773a482' + + '7acdac73'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff c7634d81 f4372ddf' + + '581a0db2 48b0a77a ecec196a ccc52973'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + 'aa87ca22 be8b0537 8eb1c71e f320ad74' + + '6e1d3b62 8ba79b98 59f741e0 82542a38' + + '5502f25d bf55296c 3a545e38 72760ab7' + + '3617de4a 96262c6f 5d9e98bf 9292dc29' + + 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). + replace(/ /g, ''), 'hex') + }, + 'nistp521': { + size: 521, + pkcs8oid: '1.3.132.0.35', + p: Buffer.from(( + '01ffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffff').replace(/ /g, ''), 'hex'), + a: Buffer.from(('01FF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(('51' + + '953eb961 8e1c9a1f 929a21a0 b68540ee' + + 'a2da725b 99b315f3 b8b48991 8ef109e1' + + '56193951 ec7e937b 1652c0bd 3bb1bf07' + + '3573df88 3d2c34f1 ef451fd4 6b503f00'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'd09e8800 291cb853 96cc6717 393284aa' + + 'a0da64ba').replace(/ /g, ''), 'hex'), + n: Buffer.from(('01ff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffa' + + '51868783 bf2f966b 7fcc0148 f709a5d0' + + '3bb5c9b8 899c47ae bb6fb71e 91386409'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + + '9c648139 053fb521 f828af60 6b4d3dba' + + 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + + '3348b3c1 856a429b f97e7e31 c2e5bd66' + + '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + + '98f54449 579b4468 17afbd17 273e662c' + + '97ee7299 5ef42640 c550b901 3fad0761' + + '353c7086 a272c240 88be9476 9fd16650'). + replace(/ /g, ''), 'hex') + } +}; + +module.exports = { + info: algInfo, + privInfo: algPrivInfo, + hashAlgs: hashAlgs, + curves: curves +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2017 Joyent, Inc. + +module.exports = PrivateKey; + +var assert = __webpack_require__(16); +var Buffer = __webpack_require__(15).Buffer; +var algs = __webpack_require__(32); +var crypto = __webpack_require__(11); +var Fingerprint = __webpack_require__(156); +var Signature = __webpack_require__(75); +var errs = __webpack_require__(74); +var util = __webpack_require__(3); +var utils = __webpack_require__(26); +var dhe = __webpack_require__(325); +var generateECDSA = dhe.generateECDSA; +var generateED25519 = dhe.generateED25519; +var edCompat; +var nacl; + +try { + edCompat = __webpack_require__(454); +} catch (e) { + /* Just continue through, and bail out if we try to use it. */ +} + +var Key = __webpack_require__(27); + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; +var KeyEncryptedError = errs.KeyEncryptedError; + +var formats = {}; +formats['auto'] = __webpack_require__(455); +formats['pem'] = __webpack_require__(86); +formats['pkcs1'] = __webpack_require__(327); +formats['pkcs8'] = __webpack_require__(157); +formats['rfc4253'] = __webpack_require__(103); +formats['ssh-private'] = __webpack_require__(192); +formats['openssh'] = formats['ssh-private']; +formats['ssh'] = formats['ssh-private']; +formats['dnssec'] = __webpack_require__(326); + +function PrivateKey(opts) { + assert.object(opts, 'options'); + Key.call(this, opts); + + this._pubCache = undefined; +} +util.inherits(PrivateKey, Key); + +PrivateKey.formats = formats; + +PrivateKey.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'pkcs1'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + return (formats[format].write(this, options)); +}; + +PrivateKey.prototype.hash = function (algo) { + return (this.toPublic().hash(algo)); +}; + +PrivateKey.prototype.toPublic = function () { + if (this._pubCache) + return (this._pubCache); + + var algInfo = algs.info[this.type]; + var pubParts = []; + for (var i = 0; i < algInfo.parts.length; ++i) { + var p = algInfo.parts[i]; + pubParts.push(this.part[p]); + } + + this._pubCache = new Key({ + type: this.type, + source: this, + parts: pubParts + }); + if (this.comment) + this._pubCache.comment = this.comment; + return (this._pubCache); +}; + +PrivateKey.prototype.derive = function (newType) { + assert.string(newType, 'type'); + var priv, pub, pair; + + if (this.type === 'ed25519' && newType === 'curve25519') { + if (nacl === undefined) + nacl = __webpack_require__(76); + + priv = this.part.k.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + + pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); + + return (new PrivateKey({ + type: 'curve25519', + parts: [ + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } + ] + })); + } else if (this.type === 'curve25519' && newType === 'ed25519') { + if (nacl === undefined) + nacl = __webpack_require__(76); + + priv = this.part.k.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + + pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); + + return (new PrivateKey({ + type: 'ed25519', + parts: [ + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } + ] + })); + } + throw (new Error('Key derivation not supported from ' + this.type + + ' to ' + newType)); +}; + +PrivateKey.prototype.createVerify = function (hashAlgo) { + return (this.toPublic().createVerify(hashAlgo)); +}; + +PrivateKey.prototype.createSign = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Signer(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldSign = v.sign.bind(v); + var key = this.toBuffer('pkcs1'); + var type = this.type; + var curve = this.curve; + v.sign = function () { + var sig = oldSign(key); + if (typeof (sig) === 'string') + sig = Buffer.from(sig, 'binary'); + sig = Signature.parse(sig, type, 'asn1'); + sig.hashAlgorithm = hashAlgo; + sig.curve = curve; + return (sig); + }; + return (v); +}; + +PrivateKey.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + assert.ok(k instanceof PrivateKey, 'key is not a private key'); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +PrivateKey.isPrivateKey = function (obj, ver) { + return (utils.isCompatible(obj, PrivateKey, ver)); +}; + +PrivateKey.generate = function (type, options) { + if (options === undefined) + options = {}; + assert.object(options, 'options'); + + switch (type) { + case 'ecdsa': + if (options.curve === undefined) + options.curve = 'nistp256'; + assert.string(options.curve, 'options.curve'); + return (generateECDSA(options.curve)); + case 'ed25519': + return (generateED25519()); + default: + throw (new Error('Key generation not supported with key ' + + 'type "' + type + '"')); + } +}; + +/* + * API versions for PrivateKey: + * [1,0] -- initial ver + * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats + * [1,2] -- added defaultHashAlgorithm + * [1,3] -- added derive, ed, createDH + * [1,4] -- first tagged version + * [1,5] -- changed ed25519 part names and format + */ +PrivateKey.prototype._sshpkApiVersion = [1, 5]; + +PrivateKey._oldVersionDetect = function (obj) { + assert.func(obj.toPublic); + assert.func(obj.createSign); + if (obj.derive) + return ([1, 3]); + if (obj.defaultHashAlgorithm) + return ([1, 2]); + if (obj.formats['auto']) + return ([1, 1]); + return ([1, 0]); +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.wrapLifecycle = exports.run = exports.install = exports.Install = undefined; + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(21)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} + +let install = exports.install = (() => { + var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, lockfile) { + yield wrapLifecycle(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const install = new Install(flags, config, reporter, lockfile); + yield install.init(); + })); + }); + + return function install(_x7, _x8, _x9, _x10) { + return _ref29.apply(this, arguments); + }; +})(); + +let run = exports.run = (() => { + var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + let lockfile; + let error = 'installCommandRenamed'; + if (flags.lockfile === false) { + lockfile = new (_lockfile || _load_lockfile()).default(); + } else { + lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + } + + if (args.length) { + const exampleArgs = args.slice(); + + if (flags.saveDev) { + exampleArgs.push('--dev'); + } + if (flags.savePeer) { + exampleArgs.push('--peer'); + } + if (flags.saveOptional) { + exampleArgs.push('--optional'); + } + if (flags.saveExact) { + exampleArgs.push('--exact'); + } + if (flags.saveTilde) { + exampleArgs.push('--tilde'); + } + let command = 'add'; + if (flags.global) { + error = 'globalFlagRemoved'; + command = 'global add'; + } + throw new (_errors || _load_errors()).MessageError(reporter.lang(error, `yarn ${command} ${exampleArgs.join(' ')}`)); + } + + yield install(config, reporter, flags, lockfile); + }); + + return function run(_x11, _x12, _x13, _x14) { + return _ref31.apply(this, arguments); + }; +})(); + +let wrapLifecycle = exports.wrapLifecycle = (() => { + var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags, factory) { + yield config.executeLifecycleScript('preinstall'); + + yield factory(); + + // npm behaviour, seems kinda funky but yay compatibility + yield config.executeLifecycleScript('install'); + yield config.executeLifecycleScript('postinstall'); + + if (!config.production) { + if (!config.disablePrepublish) { + yield config.executeLifecycleScript('prepublish'); + } + yield config.executeLifecycleScript('prepare'); + } + }); + + return function wrapLifecycle(_x15, _x16, _x17) { + return _ref32.apply(this, arguments); + }; +})(); + +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _objectPath; + +function _load_objectPath() { + return _objectPath = _interopRequireDefault(__webpack_require__(304)); +} + +var _hooks; + +function _load_hooks() { + return _hooks = __webpack_require__(374); +} + +var _index; + +function _load_index() { + return _index = _interopRequireDefault(__webpack_require__(220)); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(6); +} + +var _integrityChecker; + +function _load_integrityChecker() { + return _integrityChecker = _interopRequireDefault(__webpack_require__(208)); +} + +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(19)); +} + +var _lockfile2; + +function _load_lockfile2() { + return _lockfile2 = __webpack_require__(19); +} + +var _packageFetcher; + +function _load_packageFetcher() { + return _packageFetcher = _interopRequireWildcard(__webpack_require__(210)); +} + +var _packageInstallScripts; + +function _load_packageInstallScripts() { + return _packageInstallScripts = _interopRequireDefault(__webpack_require__(557)); +} + +var _packageCompatibility; + +function _load_packageCompatibility() { + return _packageCompatibility = _interopRequireWildcard(__webpack_require__(209)); +} + +var _packageResolver; + +function _load_packageResolver() { + return _packageResolver = _interopRequireDefault(__webpack_require__(366)); +} + +var _packageLinker; + +function _load_packageLinker() { + return _packageLinker = _interopRequireDefault(__webpack_require__(211)); +} + +var _index2; + +function _load_index2() { + return _index2 = __webpack_require__(57); +} + +var _index3; + +function _load_index3() { + return _index3 = __webpack_require__(78); +} + +var _autoclean; + +function _load_autoclean() { + return _autoclean = __webpack_require__(354); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(8)); +} + +var _normalizePattern; + +function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(37); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(4)); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(29)); +} + +var _yarnVersion; + +function _load_yarnVersion() { + return _yarnVersion = __webpack_require__(120); +} + +var _generatePnpMap; + +function _load_generatePnpMap() { + return _generatePnpMap = __webpack_require__(579); +} + +var _workspaceLayout; + +function _load_workspaceLayout() { + return _workspaceLayout = _interopRequireDefault(__webpack_require__(90)); +} + +var _resolutionMap; + +function _load_resolutionMap() { + return _resolutionMap = _interopRequireDefault(__webpack_require__(214)); +} + +var _guessName; + +function _load_guessName() { + return _guessName = _interopRequireDefault(__webpack_require__(169)); +} + +var _audit; + +function _load_audit() { + return _audit = _interopRequireDefault(__webpack_require__(353)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const deepEqual = __webpack_require__(631); + +const emoji = __webpack_require__(302); +const invariant = __webpack_require__(9); +const path = __webpack_require__(0); +const semver = __webpack_require__(22); +const uuid = __webpack_require__(119); +const ssri = __webpack_require__(65); + +const ONE_DAY = 1000 * 60 * 60 * 24; + +/** + * Try and detect the installation method for Yarn and provide a command to update it with. + */ + +function getUpdateCommand(installationMethod) { + if (installationMethod === 'tar') { + return `curl --compressed -o- -L ${(_constants || _load_constants()).YARN_INSTALLER_SH} | bash`; + } + + if (installationMethod === 'homebrew') { + return 'brew upgrade yarn'; + } + + if (installationMethod === 'deb') { + return 'sudo apt-get update && sudo apt-get install yarn'; + } + + if (installationMethod === 'rpm') { + return 'sudo yum install yarn'; + } + + if (installationMethod === 'npm') { + return 'npm install --global yarn'; + } + + if (installationMethod === 'chocolatey') { + return 'choco upgrade yarn'; + } + + if (installationMethod === 'apk') { + return 'apk update && apk add -u yarn'; + } + + if (installationMethod === 'portage') { + return 'sudo emerge --sync && sudo emerge -au sys-apps/yarn'; + } + + return null; +} + +function getUpdateInstaller(installationMethod) { + // Windows + if (installationMethod === 'msi') { + return (_constants || _load_constants()).YARN_INSTALLER_MSI; + } + + return null; +} + +function normalizeFlags(config, rawFlags) { + const flags = { + // install + har: !!rawFlags.har, + ignorePlatform: !!rawFlags.ignorePlatform, + ignoreEngines: !!rawFlags.ignoreEngines, + ignoreScripts: !!rawFlags.ignoreScripts, + ignoreOptional: !!rawFlags.ignoreOptional, + force: !!rawFlags.force, + flat: !!rawFlags.flat, + lockfile: rawFlags.lockfile !== false, + pureLockfile: !!rawFlags.pureLockfile, + updateChecksums: !!rawFlags.updateChecksums, + skipIntegrityCheck: !!rawFlags.skipIntegrityCheck, + frozenLockfile: !!rawFlags.frozenLockfile, + linkDuplicates: !!rawFlags.linkDuplicates, + checkFiles: !!rawFlags.checkFiles, + audit: !!rawFlags.audit, + + // add + peer: !!rawFlags.peer, + dev: !!rawFlags.dev, + optional: !!rawFlags.optional, + exact: !!rawFlags.exact, + tilde: !!rawFlags.tilde, + ignoreWorkspaceRootCheck: !!rawFlags.ignoreWorkspaceRootCheck, + + // outdated, update-interactive + includeWorkspaceDeps: !!rawFlags.includeWorkspaceDeps, + + // add, remove, update + workspaceRootIsCwd: rawFlags.workspaceRootIsCwd !== false + }; + + if (config.getOption('ignore-scripts')) { + flags.ignoreScripts = true; + } + + if (config.getOption('ignore-platform')) { + flags.ignorePlatform = true; + } + + if (config.getOption('ignore-engines')) { + flags.ignoreEngines = true; + } + + if (config.getOption('ignore-optional')) { + flags.ignoreOptional = true; + } + + if (config.getOption('force')) { + flags.force = true; + } + + return flags; +} + +class Install { + constructor(flags, config, reporter, lockfile) { + this.rootManifestRegistries = []; + this.rootPatternsToOrigin = (0, (_map || _load_map()).default)(); + this.lockfile = lockfile; + this.reporter = reporter; + this.config = config; + this.flags = normalizeFlags(config, flags); + this.resolutions = (0, (_map || _load_map()).default)(); // Legacy resolutions field used for flat install mode + this.resolutionMap = new (_resolutionMap || _load_resolutionMap()).default(config); // Selective resolutions for nested dependencies + this.resolver = new (_packageResolver || _load_packageResolver()).default(config, lockfile, this.resolutionMap); + this.integrityChecker = new (_integrityChecker || _load_integrityChecker()).default(config); + this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver); + this.scripts = new (_packageInstallScripts || _load_packageInstallScripts()).default(config, this.resolver, this.flags.force); + } + + /** + * Create a list of dependency requests from the current directories manifests. + */ + + fetchRequestFromCwd(excludePatterns = [], ignoreUnusedPatterns = false) { + var _this = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const patterns = []; + const deps = []; + let resolutionDeps = []; + const manifest = {}; + + const ignorePatterns = []; + const usedPatterns = []; + let workspaceLayout; + + // some commands should always run in the context of the entire workspace + const cwd = _this.flags.includeWorkspaceDeps || _this.flags.workspaceRootIsCwd ? _this.config.lockfileFolder : _this.config.cwd; + + // non-workspaces are always root, otherwise check for workspace root + const cwdIsRoot = !_this.config.workspaceRootFolder || _this.config.lockfileFolder === cwd; + + // exclude package names that are in install args + const excludeNames = []; + for (var _iterator = excludePatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + const pattern = _ref; + + if ((0, (_index3 || _load_index3()).getExoticResolver)(pattern)) { + excludeNames.push((0, (_guessName || _load_guessName()).default)(pattern)); + } else { + // extract the name + const parts = (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern); + excludeNames.push(parts.name); + } + } + + const stripExcluded = function stripExcluded(manifest) { + for (var _iterator2 = excludeNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + const exclude = _ref2; + + if (manifest.dependencies && manifest.dependencies[exclude]) { + delete manifest.dependencies[exclude]; + } + if (manifest.devDependencies && manifest.devDependencies[exclude]) { + delete manifest.devDependencies[exclude]; + } + if (manifest.optionalDependencies && manifest.optionalDependencies[exclude]) { + delete manifest.optionalDependencies[exclude]; + } + } + }; + + for (var _iterator3 = Object.keys((_index2 || _load_index2()).registries), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + const registry = _ref3; + + const filename = (_index2 || _load_index2()).registries[registry].filename; + + const loc = path.join(cwd, filename); + if (!(yield (_fs || _load_fs()).exists(loc))) { + continue; + } + + _this.rootManifestRegistries.push(registry); + + const projectManifestJson = yield _this.config.readJson(loc); + yield (0, (_index || _load_index()).default)(projectManifestJson, cwd, _this.config, cwdIsRoot); + + Object.assign(_this.resolutions, projectManifestJson.resolutions); + Object.assign(manifest, projectManifestJson); + + _this.resolutionMap.init(_this.resolutions); + for (var _iterator4 = Object.keys(_this.resolutionMap.resolutionsByPackage), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + const packageName = _ref4; + + const optional = (_objectPath || _load_objectPath()).default.has(manifest.optionalDependencies, packageName) && _this.flags.ignoreOptional; + for (var _iterator8 = _this.resolutionMap.resolutionsByPackage[packageName], _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref9; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref9 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref9 = _i8.value; + } + + const _ref8 = _ref9; + const pattern = _ref8.pattern; + + resolutionDeps = [...resolutionDeps, { registry, pattern, optional, hint: 'resolution' }]; + } + } + + const pushDeps = function pushDeps(depType, manifest, { hint, optional }, isUsed) { + if (ignoreUnusedPatterns && !isUsed) { + return; + } + // We only take unused dependencies into consideration to get deterministic hoisting. + // Since flat mode doesn't care about hoisting and everything is top level and specified then we can safely + // leave these out. + if (_this.flags.flat && !isUsed) { + return; + } + const depMap = manifest[depType]; + for (const name in depMap) { + if (excludeNames.indexOf(name) >= 0) { + continue; + } + + let pattern = name; + if (!_this.lockfile.getLocked(pattern)) { + // when we use --save we save the dependency to the lockfile with just the name rather than the + // version combo + pattern += '@' + depMap[name]; + } + + // normalization made sure packages are mentioned only once + if (isUsed) { + usedPatterns.push(pattern); + } else { + ignorePatterns.push(pattern); + } + + _this.rootPatternsToOrigin[pattern] = depType; + patterns.push(pattern); + deps.push({ pattern, registry, hint, optional, workspaceName: manifest.name, workspaceLoc: manifest._loc }); + } + }; + + if (cwdIsRoot) { + pushDeps('dependencies', projectManifestJson, { hint: null, optional: false }, true); + pushDeps('devDependencies', projectManifestJson, { hint: 'dev', optional: false }, !_this.config.production); + pushDeps('optionalDependencies', projectManifestJson, { hint: 'optional', optional: true }, true); + } + + if (_this.config.workspaceRootFolder) { + const workspaceLoc = cwdIsRoot ? loc : path.join(_this.config.lockfileFolder, filename); + const workspacesRoot = path.dirname(workspaceLoc); + + let workspaceManifestJson = projectManifestJson; + if (!cwdIsRoot) { + // the manifest we read before was a child workspace, so get the root + workspaceManifestJson = yield _this.config.readJson(workspaceLoc); + yield (0, (_index || _load_index()).default)(workspaceManifestJson, workspacesRoot, _this.config, true); + } + + const workspaces = yield _this.config.resolveWorkspaces(workspacesRoot, workspaceManifestJson); + workspaceLayout = new (_workspaceLayout || _load_workspaceLayout()).default(workspaces, _this.config); + + // add virtual manifest that depends on all workspaces, this way package hoisters and resolvers will work fine + const workspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.dependencies); + for (var _iterator5 = Object.keys(workspaces), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + const workspaceName = _ref5; + + const workspaceManifest = workspaces[workspaceName].manifest; + workspaceDependencies[workspaceName] = workspaceManifest.version; + + // include dependencies from all workspaces + if (_this.flags.includeWorkspaceDeps) { + pushDeps('dependencies', workspaceManifest, { hint: null, optional: false }, true); + pushDeps('devDependencies', workspaceManifest, { hint: 'dev', optional: false }, !_this.config.production); + pushDeps('optionalDependencies', workspaceManifest, { hint: 'optional', optional: true }, true); + } + } + const virtualDependencyManifest = { + _uid: '', + name: `workspace-aggregator-${uuid.v4()}`, + version: '1.0.0', + _registry: 'npm', + _loc: workspacesRoot, + dependencies: workspaceDependencies, + devDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.devDependencies), + optionalDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.optionalDependencies), + private: workspaceManifestJson.private, + workspaces: workspaceManifestJson.workspaces + }; + workspaceLayout.virtualManifestName = virtualDependencyManifest.name; + const virtualDep = {}; + virtualDep[virtualDependencyManifest.name] = virtualDependencyManifest.version; + workspaces[virtualDependencyManifest.name] = { loc: workspacesRoot, manifest: virtualDependencyManifest }; + + // ensure dependencies that should be excluded are stripped from the correct manifest + stripExcluded(cwdIsRoot ? virtualDependencyManifest : workspaces[projectManifestJson.name].manifest); + + pushDeps('workspaces', { workspaces: virtualDep }, { hint: 'workspaces', optional: false }, true); + + const implicitWorkspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceDependencies); + + for (var _iterator6 = (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + const type = _ref6; + + for (var _iterator7 = Object.keys(projectManifestJson[type] || {}), _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + const dependencyName = _ref7; + + delete implicitWorkspaceDependencies[dependencyName]; + } + } + + pushDeps('dependencies', { dependencies: implicitWorkspaceDependencies }, { hint: 'workspaces', optional: false }, true); + } + + break; + } + + // inherit root flat flag + if (manifest.flat) { + _this.flags.flat = true; + } + + return { + requests: [...resolutionDeps, ...deps], + patterns, + manifest, + usedPatterns, + ignorePatterns, + workspaceLayout + }; + })(); + } + + /** + * TODO description + */ + + prepareRequests(requests) { + return requests; + } + + preparePatterns(patterns) { + return patterns; + } + preparePatternsForLinking(patterns, cwdManifest, cwdIsRoot) { + return patterns; + } + + prepareManifests() { + var _this2 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const manifests = yield _this2.config.getRootManifests(); + return manifests; + })(); + } + + bailout(patterns, workspaceLayout) { + var _this3 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // We don't want to skip the audit - it could yield important errors + if (_this3.flags.audit) { + return false; + } + // PNP is so fast that the integrity check isn't pertinent + if (_this3.config.plugnplayEnabled) { + return false; + } + if (_this3.flags.skipIntegrityCheck || _this3.flags.force) { + return false; + } + const lockfileCache = _this3.lockfile.cache; + if (!lockfileCache) { + return false; + } + const lockfileClean = _this3.lockfile.parseResultType === 'success'; + const match = yield _this3.integrityChecker.check(patterns, lockfileCache, _this3.flags, workspaceLayout); + if (_this3.flags.frozenLockfile && (!lockfileClean || match.missingPatterns.length > 0)) { + throw new (_errors || _load_errors()).MessageError(_this3.reporter.lang('frozenLockfileError')); + } + + const haveLockfile = yield (_fs || _load_fs()).exists(path.join(_this3.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME)); + + const lockfileIntegrityPresent = !_this3.lockfile.hasEntriesExistWithoutIntegrity(); + const integrityBailout = lockfileIntegrityPresent || !_this3.config.autoAddIntegrity; + + if (match.integrityMatches && haveLockfile && lockfileClean && integrityBailout) { + _this3.reporter.success(_this3.reporter.lang('upToDate')); + return true; + } + + if (match.integrityFileMissing && haveLockfile) { + // Integrity file missing, force script installations + _this3.scripts.setForce(true); + return false; + } + + if (match.hardRefreshRequired) { + // e.g. node version doesn't match, force script installations + _this3.scripts.setForce(true); + return false; + } + + if (!patterns.length && !match.integrityFileMissing) { + _this3.reporter.success(_this3.reporter.lang('nothingToInstall')); + yield _this3.createEmptyManifestFolders(); + yield _this3.saveLockfileAndIntegrity(patterns, workspaceLayout); + return true; + } + + return false; + })(); + } + + /** + * Produce empty folders for all used root manifests. + */ + + createEmptyManifestFolders() { + var _this4 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (_this4.config.modulesFolder) { + // already created + return; + } + + for (var _iterator9 = _this4.rootManifestRegistries, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref10; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref10 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref10 = _i9.value; + } + + const registryName = _ref10; + const folder = _this4.config.registries[registryName].folder; + + yield (_fs || _load_fs()).mkdirp(path.join(_this4.config.lockfileFolder, folder)); + } + })(); + } + + /** + * TODO description + */ + + markIgnored(patterns) { + for (var _iterator10 = patterns, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref11; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref11 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref11 = _i10.value; + } + + const pattern = _ref11; + + const manifest = this.resolver.getStrictResolvedPattern(pattern); + const ref = manifest._reference; + invariant(ref, 'expected package reference'); + + // just mark the package as ignored. if the package is used by a required package, the hoister + // will take care of that. + ref.ignore = true; + } + } + + /** + * helper method that gets only recent manifests + * used by global.ls command + */ + getFlattenedDeps() { + var _this5 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref12 = yield _this5.fetchRequestFromCwd(); + + const depRequests = _ref12.requests, + rawPatterns = _ref12.patterns; + + + yield _this5.resolver.init(depRequests, {}); + + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this5.resolver.getManifests(), _this5.config); + _this5.resolver.updateManifests(manifests); + + return _this5.flatten(rawPatterns); + })(); + } + + /** + * TODO description + */ + + init() { + var _this6 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.checkUpdate(); + + // warn if we have a shrinkwrap + if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_SHRINKWRAP_FILENAME))) { + _this6.reporter.warn(_this6.reporter.lang('shrinkwrapWarning')); + } + + // warn if we have an npm lockfile + if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_LOCK_FILENAME))) { + _this6.reporter.warn(_this6.reporter.lang('npmLockfileWarning')); + } + + if (_this6.config.plugnplayEnabled) { + _this6.reporter.info(_this6.reporter.lang('plugnplaySuggestV2L1')); + _this6.reporter.info(_this6.reporter.lang('plugnplaySuggestV2L2')); + } + + let flattenedTopLevelPatterns = []; + const steps = []; + + var _ref13 = yield _this6.fetchRequestFromCwd(); + + const depRequests = _ref13.requests, + rawPatterns = _ref13.patterns, + ignorePatterns = _ref13.ignorePatterns, + workspaceLayout = _ref13.workspaceLayout, + manifest = _ref13.manifest; + + let topLevelPatterns = []; + + const artifacts = yield _this6.integrityChecker.getArtifacts(); + if (artifacts) { + _this6.linker.setArtifacts(artifacts); + _this6.scripts.setArtifacts(artifacts); + } + + if ((_packageCompatibility || _load_packageCompatibility()).shouldCheck(manifest, _this6.flags)) { + steps.push((() => { + var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + _this6.reporter.step(curr, total, _this6.reporter.lang('checkingManifest'), emoji.get('mag')); + yield _this6.checkCompatibility(); + }); + + return function (_x, _x2) { + return _ref14.apply(this, arguments); + }; + })()); + } + + const audit = new (_audit || _load_audit()).default(_this6.config, _this6.reporter, { groups: (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES }); + let auditFoundProblems = false; + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('resolveStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.reporter.lang('resolvingPackages'), emoji.get('mag')); + yield _this6.resolver.init(_this6.prepareRequests(depRequests), { + isFlat: _this6.flags.flat, + isFrozen: _this6.flags.frozenLockfile, + workspaceLayout + }); + topLevelPatterns = _this6.preparePatterns(rawPatterns); + flattenedTopLevelPatterns = yield _this6.flatten(topLevelPatterns); + return { bailout: !_this6.flags.audit && (yield _this6.bailout(topLevelPatterns, workspaceLayout)) }; + })); + }); + + if (_this6.flags.audit) { + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('auditStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.reporter.lang('auditRunning'), emoji.get('mag')); + if (_this6.flags.offline) { + _this6.reporter.warn(_this6.reporter.lang('auditOffline')); + return { bailout: false }; + } + const preparedManifests = yield _this6.prepareManifests(); + // $FlowFixMe - Flow considers `m` in the map operation to be "mixed", so does not recognize `m.object` + const mergedManifest = Object.assign({}, ...Object.values(preparedManifests).map(function (m) { + return m.object; + })); + const auditVulnerabilityCounts = yield audit.performAudit(mergedManifest, _this6.lockfile, _this6.resolver, _this6.linker, topLevelPatterns); + auditFoundProblems = auditVulnerabilityCounts.info || auditVulnerabilityCounts.low || auditVulnerabilityCounts.moderate || auditVulnerabilityCounts.high || auditVulnerabilityCounts.critical; + return { bailout: yield _this6.bailout(topLevelPatterns, workspaceLayout) }; + })); + }); + } + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('fetchStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.markIgnored(ignorePatterns); + _this6.reporter.step(curr, total, _this6.reporter.lang('fetchingPackages'), emoji.get('truck')); + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this6.resolver.getManifests(), _this6.config); + _this6.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(_this6.resolver.getManifests(), _this6.config, _this6.flags.ignoreEngines); + })); + }); + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('linkStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // remove integrity hash to make this operation atomic + yield _this6.integrityChecker.removeIntegrityFile(); + _this6.reporter.step(curr, total, _this6.reporter.lang('linkingDependencies'), emoji.get('link')); + flattenedTopLevelPatterns = _this6.preparePatternsForLinking(flattenedTopLevelPatterns, manifest, _this6.config.lockfileFolder === _this6.config.cwd); + yield _this6.linker.init(flattenedTopLevelPatterns, workspaceLayout, { + linkDuplicates: _this6.flags.linkDuplicates, + ignoreOptional: _this6.flags.ignoreOptional + }); + })); + }); + + if (_this6.config.plugnplayEnabled) { + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('pnpStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const pnpPath = `${_this6.config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`; + + const code = yield (0, (_generatePnpMap || _load_generatePnpMap()).generatePnpMap)(_this6.config, flattenedTopLevelPatterns, { + resolver: _this6.resolver, + reporter: _this6.reporter, + targetPath: pnpPath, + workspaceLayout + }); + + try { + const file = yield (_fs || _load_fs()).readFile(pnpPath); + if (file === code) { + return; + } + } catch (error) {} + + yield (_fs || _load_fs()).writeFile(pnpPath, code); + yield (_fs || _load_fs()).chmod(pnpPath, 0o755); + })); + }); + } + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('buildStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.flags.force ? _this6.reporter.lang('rebuildingPackages') : _this6.reporter.lang('buildingFreshPackages'), emoji.get('hammer')); + + if (_this6.config.ignoreScripts) { + _this6.reporter.warn(_this6.reporter.lang('ignoredScripts')); + } else { + yield _this6.scripts.init(flattenedTopLevelPatterns); + } + })); + }); + + if (_this6.flags.har) { + steps.push((() => { + var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + const formattedDate = new Date().toISOString().replace(/:/g, '-'); + const filename = `yarn-install_${formattedDate}.har`; + _this6.reporter.step(curr, total, _this6.reporter.lang('savingHar', filename), emoji.get('black_circle_for_record')); + yield _this6.config.requestManager.saveHar(filename); + }); + + return function (_x3, _x4) { + return _ref21.apply(this, arguments); + }; + })()); + } + + if (yield _this6.shouldClean()) { + steps.push((() => { + var _ref22 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + _this6.reporter.step(curr, total, _this6.reporter.lang('cleaningModules'), emoji.get('recycle')); + yield (0, (_autoclean || _load_autoclean()).clean)(_this6.config, _this6.reporter); + }); + + return function (_x5, _x6) { + return _ref22.apply(this, arguments); + }; + })()); + } + + let currentStep = 0; + for (var _iterator11 = steps, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { + var _ref23; + + if (_isArray11) { + if (_i11 >= _iterator11.length) break; + _ref23 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) break; + _ref23 = _i11.value; + } + + const step = _ref23; + + const stepResult = yield step(++currentStep, steps.length); + if (stepResult && stepResult.bailout) { + if (_this6.flags.audit) { + audit.summary(); + } + if (auditFoundProblems) { + _this6.reporter.warn(_this6.reporter.lang('auditRunAuditForDetails')); + } + _this6.maybeOutputUpdate(); + return flattenedTopLevelPatterns; + } + } + + // fin! + if (_this6.flags.audit) { + audit.summary(); + } + if (auditFoundProblems) { + _this6.reporter.warn(_this6.reporter.lang('auditRunAuditForDetails')); + } + yield _this6.saveLockfileAndIntegrity(topLevelPatterns, workspaceLayout); + yield _this6.persistChanges(); + _this6.maybeOutputUpdate(); + _this6.config.requestManager.clearCache(); + return flattenedTopLevelPatterns; + })(); + } + + checkCompatibility() { + var _this7 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref24 = yield _this7.fetchRequestFromCwd(); + + const manifest = _ref24.manifest; + + yield (_packageCompatibility || _load_packageCompatibility()).checkOne(manifest, _this7.config, _this7.flags.ignoreEngines); + })(); + } + + persistChanges() { + var _this8 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // get all the different registry manifests in this folder + const manifests = yield _this8.config.getRootManifests(); + + if (yield _this8.applyChanges(manifests)) { + yield _this8.config.saveRootManifests(manifests); + } + })(); + } + + applyChanges(manifests) { + let hasChanged = false; + + if (this.config.plugnplayPersist) { + const object = manifests.npm.object; + + + if (typeof object.installConfig !== 'object') { + object.installConfig = {}; + } + + if (this.config.plugnplayEnabled && object.installConfig.pnp !== true) { + object.installConfig.pnp = true; + hasChanged = true; + } else if (!this.config.plugnplayEnabled && typeof object.installConfig.pnp !== 'undefined') { + delete object.installConfig.pnp; + hasChanged = true; + } + + if (Object.keys(object.installConfig).length === 0) { + delete object.installConfig; + } + } + + return Promise.resolve(hasChanged); + } + + /** + * Check if we should run the cleaning step. + */ + + shouldClean() { + return (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).CLEAN_FILENAME)); + } + + /** + * TODO + */ + + flatten(patterns) { + var _this9 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (!_this9.flags.flat) { + return patterns; + } + + const flattenedPatterns = []; + + for (var _iterator12 = _this9.resolver.getAllDependencyNamesByLevelOrder(patterns), _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { + var _ref25; + + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref25 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref25 = _i12.value; + } + + const name = _ref25; + + const infos = _this9.resolver.getAllInfoForPackageName(name).filter(function (manifest) { + const ref = manifest._reference; + invariant(ref, 'expected package reference'); + return !ref.ignore; + }); + + if (infos.length === 0) { + continue; + } + + if (infos.length === 1) { + // single version of this package + // take out a single pattern as multiple patterns may have resolved to this package + flattenedPatterns.push(_this9.resolver.patternsByPackage[name][0]); + continue; + } + + const options = infos.map(function (info) { + const ref = info._reference; + invariant(ref, 'expected reference'); + return { + // TODO `and is required by {PARENT}`, + name: _this9.reporter.lang('manualVersionResolutionOption', ref.patterns.join(', '), info.version), + + value: info.version + }; + }); + const versions = infos.map(function (info) { + return info.version; + }); + let version; + + const resolutionVersion = _this9.resolutions[name]; + if (resolutionVersion && versions.indexOf(resolutionVersion) >= 0) { + // use json `resolution` version + version = resolutionVersion; + } else { + version = yield _this9.reporter.select(_this9.reporter.lang('manualVersionResolution', name), _this9.reporter.lang('answer'), options); + _this9.resolutions[name] = version; + } + + flattenedPatterns.push(_this9.resolver.collapseAllVersionsOfPackage(name, version)); + } + + // save resolutions to their appropriate root manifest + if (Object.keys(_this9.resolutions).length) { + const manifests = yield _this9.config.getRootManifests(); + + for (const name in _this9.resolutions) { + const version = _this9.resolutions[name]; + + const patterns = _this9.resolver.patternsByPackage[name]; + if (!patterns) { + continue; + } + + let manifest; + for (var _iterator13 = patterns, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { + var _ref26; + + if (_isArray13) { + if (_i13 >= _iterator13.length) break; + _ref26 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) break; + _ref26 = _i13.value; + } + + const pattern = _ref26; + + manifest = _this9.resolver.getResolvedPattern(pattern); + if (manifest) { + break; + } + } + invariant(manifest, 'expected manifest'); + + const ref = manifest._reference; + invariant(ref, 'expected reference'); + + const object = manifests[ref.registry].object; + object.resolutions = object.resolutions || {}; + object.resolutions[name] = version; + } + + yield _this9.config.saveRootManifests(manifests); + } + + return flattenedPatterns; + })(); + } + + /** + * Remove offline tarballs that are no longer required + */ + + pruneOfflineMirror(lockfile) { + var _this10 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const mirror = _this10.config.getOfflineMirrorPath(); + if (!mirror) { + return; + } + + const requiredTarballs = new Set(); + for (const dependency in lockfile) { + const resolved = lockfile[dependency].resolved; + if (resolved) { + const basename = path.basename(resolved.split('#')[0]); + if (dependency[0] === '@' && basename[0] !== '@') { + requiredTarballs.add(`${dependency.split('/')[0]}-${basename}`); + } + requiredTarballs.add(basename); + } + } + + const mirrorFiles = yield (_fs || _load_fs()).walk(mirror); + for (var _iterator14 = mirrorFiles, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { + var _ref27; + + if (_isArray14) { + if (_i14 >= _iterator14.length) break; + _ref27 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) break; + _ref27 = _i14.value; + } + + const file = _ref27; + + const isTarball = path.extname(file.basename) === '.tgz'; + // if using experimental-pack-script-packages-in-mirror flag, don't unlink prebuilt packages + const hasPrebuiltPackage = file.relative.startsWith('prebuilt/'); + if (isTarball && !hasPrebuiltPackage && !requiredTarballs.has(file.basename)) { + yield (_fs || _load_fs()).unlink(file.absolute); + } + } + })(); + } + + /** + * Save updated integrity and lockfiles. + */ + + saveLockfileAndIntegrity(patterns, workspaceLayout) { + var _this11 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const resolvedPatterns = {}; + Object.keys(_this11.resolver.patterns).forEach(function (pattern) { + if (!workspaceLayout || !workspaceLayout.getManifestByPattern(pattern)) { + resolvedPatterns[pattern] = _this11.resolver.patterns[pattern]; + } + }); + + // TODO this code is duplicated in a few places, need a common way to filter out workspace patterns from lockfile + patterns = patterns.filter(function (p) { + return !workspaceLayout || !workspaceLayout.getManifestByPattern(p); + }); + + const lockfileBasedOnResolver = _this11.lockfile.getLockfile(resolvedPatterns); + + if (_this11.config.pruneOfflineMirror) { + yield _this11.pruneOfflineMirror(lockfileBasedOnResolver); + } + + // write integrity hash + if (!_this11.config.plugnplayEnabled) { + yield _this11.integrityChecker.save(patterns, lockfileBasedOnResolver, _this11.flags, workspaceLayout, _this11.scripts.getArtifacts()); + } + + // --no-lockfile or --pure-lockfile or --frozen-lockfile + if (_this11.flags.lockfile === false || _this11.flags.pureLockfile || _this11.flags.frozenLockfile) { + return; + } + + const lockFileHasAllPatterns = patterns.every(function (p) { + return _this11.lockfile.getLocked(p); + }); + const lockfilePatternsMatch = Object.keys(_this11.lockfile.cache || {}).every(function (p) { + return lockfileBasedOnResolver[p]; + }); + const resolverPatternsAreSameAsInLockfile = Object.keys(lockfileBasedOnResolver).every(function (pattern) { + const manifest = _this11.lockfile.getLocked(pattern); + return manifest && manifest.resolved === lockfileBasedOnResolver[pattern].resolved && deepEqual(manifest.prebuiltVariants, lockfileBasedOnResolver[pattern].prebuiltVariants); + }); + const integrityPatternsAreSameAsInLockfile = Object.keys(lockfileBasedOnResolver).every(function (pattern) { + const existingIntegrityInfo = lockfileBasedOnResolver[pattern].integrity; + if (!existingIntegrityInfo) { + // if this entry does not have an integrity, no need to re-write the lockfile because of it + return true; + } + const manifest = _this11.lockfile.getLocked(pattern); + if (manifest && manifest.integrity) { + const manifestIntegrity = ssri.stringify(manifest.integrity); + return manifestIntegrity === existingIntegrityInfo; + } + return false; + }); + + // remove command is followed by install with force, lockfile will be rewritten in any case then + if (!_this11.flags.force && _this11.lockfile.parseResultType === 'success' && lockFileHasAllPatterns && lockfilePatternsMatch && resolverPatternsAreSameAsInLockfile && integrityPatternsAreSameAsInLockfile && patterns.length) { + return; + } + + // build lockfile location + const loc = path.join(_this11.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME); + + // write lockfile + const lockSource = (0, (_lockfile2 || _load_lockfile2()).stringify)(lockfileBasedOnResolver, false, _this11.config.enableLockfileVersions); + yield (_fs || _load_fs()).writeFilePreservingEol(loc, lockSource); + + _this11._logSuccessSaveLockfile(); + })(); + } + + _logSuccessSaveLockfile() { + this.reporter.success(this.reporter.lang('savedLockfile')); + } + + /** + * Load the dependency graph of the current install. Only does package resolving and wont write to the cwd. + */ + hydrate(ignoreUnusedPatterns) { + var _this12 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const request = yield _this12.fetchRequestFromCwd([], ignoreUnusedPatterns); + const depRequests = request.requests, + rawPatterns = request.patterns, + ignorePatterns = request.ignorePatterns, + workspaceLayout = request.workspaceLayout; + + + yield _this12.resolver.init(depRequests, { + isFlat: _this12.flags.flat, + isFrozen: _this12.flags.frozenLockfile, + workspaceLayout + }); + yield _this12.flatten(rawPatterns); + _this12.markIgnored(ignorePatterns); + + // fetch packages, should hit cache most of the time + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this12.resolver.getManifests(), _this12.config); + _this12.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(_this12.resolver.getManifests(), _this12.config, _this12.flags.ignoreEngines); + + // expand minimal manifests + for (var _iterator15 = _this12.resolver.getManifests(), _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { + var _ref28; + + if (_isArray15) { + if (_i15 >= _iterator15.length) break; + _ref28 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) break; + _ref28 = _i15.value; + } + + const manifest = _ref28; + + const ref = manifest._reference; + invariant(ref, 'expected reference'); + const type = ref.remote.type; + // link specifier won't ever hit cache + + let loc = ''; + if (type === 'link') { + continue; + } else if (type === 'workspace') { + if (!ref.remote.reference) { + continue; + } + loc = ref.remote.reference; + } else { + loc = _this12.config.generateModuleCachePath(ref); + } + const newPkg = yield _this12.config.readManifest(loc); + yield _this12.resolver.updateManifest(ref, newPkg); + } + + return request; + })(); + } + + /** + * Check for updates every day and output a nag message if there's a newer version. + */ + + checkUpdate() { + if (this.config.nonInteractive) { + // don't show upgrade dialog on CI or non-TTY terminals + return; + } + + // don't check if disabled + if (this.config.getOption('disable-self-update-check')) { + return; + } + + // only check for updates once a day + const lastUpdateCheck = Number(this.config.getOption('lastUpdateCheck')) || 0; + if (lastUpdateCheck && Date.now() - lastUpdateCheck < ONE_DAY) { + return; + } + + // don't bug for updates on tagged releases + if ((_yarnVersion || _load_yarnVersion()).version.indexOf('-') >= 0) { + return; + } + + this._checkUpdate().catch(() => { + // swallow errors + }); + } + + _checkUpdate() { + var _this13 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + let latestVersion = yield _this13.config.requestManager.request({ + url: (_constants || _load_constants()).SELF_UPDATE_VERSION_URL + }); + invariant(typeof latestVersion === 'string', 'expected string'); + latestVersion = latestVersion.trim(); + if (!semver.valid(latestVersion)) { + return; + } + + // ensure we only check for updates periodically + _this13.config.registries.yarn.saveHomeConfig({ + lastUpdateCheck: Date.now() + }); + + if (semver.gt(latestVersion, (_yarnVersion || _load_yarnVersion()).version)) { + const installationMethod = yield (0, (_yarnVersion || _load_yarnVersion()).getInstallationMethod)(); + _this13.maybeOutputUpdate = function () { + _this13.reporter.warn(_this13.reporter.lang('yarnOutdated', latestVersion, (_yarnVersion || _load_yarnVersion()).version)); + + const command = getUpdateCommand(installationMethod); + if (command) { + _this13.reporter.info(_this13.reporter.lang('yarnOutdatedCommand')); + _this13.reporter.command(command); + } else { + const installer = getUpdateInstaller(installationMethod); + if (installer) { + _this13.reporter.info(_this13.reporter.lang('yarnOutdatedInstaller', installer)); + } + } + }; + } + })(); + } + + /** + * Method to override with a possible upgrade message. + */ + + maybeOutputUpdate() {} +} + +exports.Install = Install; +function hasWrapper(commander, args) { + return true; +} + +function setFlags(commander) { + commander.description('Yarn install is used to install all dependencies for a project.'); + commander.usage('install [flags]'); + commander.option('-A, --audit', 'Run vulnerability audit on installed packages'); + commander.option('-g, --global', 'DEPRECATED'); + commander.option('-S, --save', 'DEPRECATED - save package to your `dependencies`'); + commander.option('-D, --save-dev', 'DEPRECATED - save package to your `devDependencies`'); + commander.option('-P, --save-peer', 'DEPRECATED - save package to your `peerDependencies`'); + commander.option('-O, --save-optional', 'DEPRECATED - save package to your `optionalDependencies`'); + commander.option('-E, --save-exact', 'DEPRECATED'); + commander.option('-T, --save-tilde', 'DEPRECATED'); +} + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(52); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SubjectSubscriber; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; }); +/* unused harmony export AnonymousSubject */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(12); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(422); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(321); +/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */ + + + + + + + +var SubjectSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SubjectSubscriber, _super); + function SubjectSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.destination = destination; + return _this; + } + return SubjectSubscriber; +}(__WEBPACK_IMPORTED_MODULE_2__Subscriber__["a" /* Subscriber */])); + +var Subject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.observers = []; + _this.closed = false; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { + return new SubjectSubscriber(this); + }; + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype.next = function (value) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + if (!this.isStopped) { + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].next(value); + } + } + }; + Subject.prototype.error = function (err) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + this.hasError = true; + this.thrownError = err; + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].error(err); + } + this.observers.length = 0; + }; + Subject.prototype.complete = function () { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].complete(); + } + this.observers.length = 0; + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = true; + this.closed = true; + this.observers = null; + }; + Subject.prototype._trySubscribe = function (subscriber) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else { + return _super.prototype._trySubscribe.call(this, subscriber); + } + }; + Subject.prototype._subscribe = function (subscriber) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else if (this.hasError) { + subscriber.error(this.thrownError); + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else if (this.isStopped) { + subscriber.complete(); + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else { + this.observers.push(subscriber); + return new __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__["a" /* SubjectSubscription */](this, subscriber); + } + }; + Subject.prototype.asObservable = function () { + var observable = new __WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */](); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); + +var AnonymousSubject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject.prototype.next = function (value) { + var destination = this.destination; + if (destination && destination.next) { + destination.next(value); + } + }; + AnonymousSubject.prototype.error = function (err) { + var destination = this.destination; + if (destination && destination.error) { + this.destination.error(err); + } + }; + AnonymousSubject.prototype.complete = function () { + var destination = this.destination; + if (destination && destination.complete) { + this.destination.complete(); + } + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var source = this.source; + if (source) { + return this.source.subscribe(subscriber); + } + else { + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + }; + return AnonymousSubject; +}(Subject)); + +//# sourceMappingURL=Subject.js.map + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.normalizePattern = normalizePattern; + +/** + * Explode and normalize a pattern into its name and range. + */ + +function normalizePattern(pattern) { + let hasVersion = false; + let range = 'latest'; + let name = pattern; + + // if we're a scope then remove the @ and add it back later + let isScoped = false; + if (name[0] === '@') { + isScoped = true; + name = name.slice(1); + } + + // take first part as the name + const parts = name.split('@'); + if (parts.length > 1) { + name = parts.shift(); + range = parts.join('@'); + + if (range) { + hasVersion = true; + } else { + range = '*'; + } + } + + // add back @ scope suffix + if (isScoped) { + name = `@${name}`; + } + + return { name, range, hasVersion }; +} + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.10'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + return key == '__proto__' + ? undefined + : object[key]; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + + return result; + } + + if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + + return result; + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': '