From 7f4a102a55e61934c11bc982df7ffcb623bb9d7b Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:18:16 +0200 Subject: [PATCH 01/21] build: update to latest version of Angular and update bazel setup Updates to the latest version of Angular v13, and updates the Bazel setup in preparation for wiring up the APF v13 changes --- .ng-dev/pull-request.ts | 1 - WORKSPACE | 11 +- package.json | 55 +- yarn.lock | 1804 ++++++++++----------------------------- 4 files changed, 481 insertions(+), 1390 deletions(-) diff --git a/.ng-dev/pull-request.ts b/.ng-dev/pull-request.ts index c36f8b6bae93..bb29a175b98d 100644 --- a/.ng-dev/pull-request.ts +++ b/.ng-dev/pull-request.ts @@ -15,7 +15,6 @@ export const pullRequest: PullRequestConfig = { {pattern: 'preserve commits', method: 'rebase'} ] }, - claSignedLabel: 'cla: yes', mergeReadyLabel: 'merge ready', commitMessageFixupLabel: 'commit message fixup', caretakerNoteLabel: 'caretaker note', diff --git a/WORKSPACE b/WORKSPACE index cd3cdc4aa1be..cfd8c76481dd 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Add NodeJS rules http_archive( name = "build_bazel_rules_nodejs", - sha256 = "4e1a5633267a0ca1d550cced2919dd4148575c0bafd47608b88aea79c41b5ca3", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.2.0/rules_nodejs-4.2.0.tar.gz"], + sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"], ) # Add sass rules @@ -27,11 +27,10 @@ http_archive( # for declaring Bazel build setting flags. http_archive( name = "bazel_skylib", - sha256 = "ebdf850bfef28d923a2cc67ddca86355a449b5e4f38b0a70e584dc24e5984aa6", - strip_prefix = "bazel-skylib-f80bc733d4b9f83d427ce3442be2e07427b2cc8d", + sha256 = "191ea53b19b7e49b5b63d0ef81d1a6278227f9ac2c09fed1c2b3a75d573f1eeb", + strip_prefix = "bazel-skylib-b2ed61686ebca2a44d44857fef5b3e1d31cc2483", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/archive/f80bc733d4b9f83d427ce3442be2e07427b2cc8d.tar.gz", - "https://github.com/bazelbuild/bazel-skylib/archive/f80bc733d4b9f83d427ce3442be2e07427b2cc8d.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/archive/b2ed61686ebca2a44d44857fef5b3e1d31cc2483.tar.gz", ], ) diff --git a/package.json b/package.json index 1b4f13c0cb3d..10bebe0a1e23 100644 --- a/package.json +++ b/package.json @@ -52,12 +52,12 @@ }, "version": "13.0.0-next.7", "dependencies": { - "@angular/animations": "13.0.0-next.8", - "@angular/common": "13.0.0-next.8", - "@angular/compiler": "13.0.0-next.8", - "@angular/core": "13.0.0-next.8", - "@angular/forms": "13.0.0-next.8", - "@angular/platform-browser": "13.0.0-next.8", + "@angular/animations": "13.0.0-next.12", + "@angular/common": "13.0.0-next.12", + "@angular/compiler": "13.0.0-next.12", + "@angular/core": "13.0.0-next.12", + "@angular/forms": "13.0.0-next.12", + "@angular/platform-browser": "13.0.0-next.12", "@types/google.maps": "^3.45.6", "@types/youtube": "^0.0.42", "core-js-bundle": "^3.8.2", @@ -69,30 +69,30 @@ "zone.js": "~0.11.3" }, "devDependencies": { - "@angular-devkit/build-optimizer": "0.1300.0-next.6", - "@angular-devkit/core": "13.0.0-next.6", - "@angular-devkit/schematics": "13.0.0-next.6", - "@angular/bazel": "13.0.0-next.8", - "@angular/compiler-cli": "13.0.0-next.8", - "@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#5744e8e7ca5b3dfa76ad73b7b0eff271a108a737", - "@angular/localize": "13.0.0-next.8", - "@angular/platform-browser-dynamic": "13.0.0-next.8", - "@angular/platform-server": "13.0.0-next.8", - "@angular/router": "13.0.0-next.8", + "@angular-devkit/build-optimizer": "0.1300.0-next.7", + "@angular-devkit/core": "13.0.0-next.7", + "@angular-devkit/schematics": "13.0.0-next.7", + "@angular/bazel": "13.0.0-next.12", + "@angular/compiler-cli": "13.0.0-next.12", + "@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#e674228281ff6ac4d21779070b090e8a8bde9e69", + "@angular/localize": "13.0.0-next.12", + "@angular/platform-browser-dynamic": "13.0.0-next.12", + "@angular/platform-server": "13.0.0-next.12", + "@angular/router": "13.0.0-next.12", "@axe-core/webdriverjs": "^4.1.0", "@babel/core": "^7.13.10", "@babel/traverse": "^7.13.0", "@bazel/bazelisk": "1.10.1", "@bazel/buildifier": "4.2.1", - "@bazel/concatjs": "4.2.0", - "@bazel/esbuild": "4.2.0", + "@bazel/concatjs": "4.3.0", + "@bazel/esbuild": "4.3.0", "@bazel/ibazel": "0.15.10", "@bazel/jasmine": "4.2.0", - "@bazel/protractor": "4.2.0", - "@bazel/rollup": "4.2.0", - "@bazel/runfiles": "4.2.0", - "@bazel/terser": "4.2.0", - "@bazel/typescript": "4.2.0", + "@bazel/protractor": "4.3.0", + "@bazel/rollup": "4.3.0", + "@bazel/runfiles": "4.3.0", + "@bazel/terser": "4.3.0", + "@bazel/typescript": "4.3.0", "@firebase/app-types": "^0.6.1", "@material/animation": "13.0.0-canary.860ad06a1.0", "@material/auto-init": "13.0.0-canary.860ad06a1.0", @@ -143,9 +143,9 @@ "@material/typography": "13.0.0-canary.860ad06a1.0", "@octokit/rest": "18.3.5", "@rollup/plugin-babel": "^5.3.0", - "@rollup/plugin-commonjs": "^18.0.0", + "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.5", - "@schematics/angular": "13.0.0-next.6", + "@schematics/angular": "13.0.0-next.7", "@types/browser-sync": "^2.26.1", "@types/fs-extra": "^9.0.5", "@types/glob": "^7.1.3", @@ -210,10 +210,7 @@ "protractor": "^7.0.0", "reflect-metadata": "^0.1.3", "requirejs": "^2.3.6", - "rollup": "~2.42.2", - "rollup-plugin-alias": "^2.2.0", - "rollup-plugin-commonjs": "^10.1.0", - "rollup-plugin-node-resolve": "^5.2.0", + "rollup": "^2.58.0", "rollup-plugin-sourcemaps": "^0.6.3", "sass": "^1.41.0", "selenium-webdriver": "^3.6.0", diff --git a/yarn.lock b/yarn.lock index 037af6d6bd8d..e7baf4e6fa41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24,14 +24,14 @@ dependencies: tunnel "0.0.6" -"@angular-devkit/build-optimizer@0.1300.0-next.6": - version "0.1300.0-next.6" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1300.0-next.6.tgz#7156c64505bb28291d826c39bc497921ddfb7128" - integrity sha512-1qiCzgqxyZZfBtuvKEtXzpQAWQmcYPU7VqtyIdJsfwW8tRkQ+OZrOGG9UdLOjcLw7dpGpDZdBsTe14PaRNTD5w== +"@angular-devkit/build-optimizer@0.1300.0-next.7": + version "0.1300.0-next.7" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1300.0-next.7.tgz#f4ad41fbdb89fc6f29cb49cc7cf97ea2a05962ef" + integrity sha512-S1p9AxITIV0Op59TAe1DY/Y66bYaJXTdP9YippOfEbPA6CFw2KfabOGeDHWZf/X8jhb+6Uj2PGTiUd8C4StBrw== dependencies: source-map "0.7.3" tslib "2.3.1" - typescript "4.3.5" + typescript "4.4.3" "@angular-devkit/build-optimizer@^0.1202.0": version "0.1202.1" @@ -42,10 +42,10 @@ tslib "2.3.0" typescript "4.3.5" -"@angular-devkit/core@13.0.0-next.6": - version "13.0.0-next.6" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-13.0.0-next.6.tgz#c688dd1923a220ccca283904e9ff4815a535d09e" - integrity sha512-hFx3uV5QO4vlDhPy3wl0oVhuU7P7CCBo2V7b7G5jlAlj3dml+O9cMaiqM1Rl19Ypf8sW2dt/gtpfL5fFAED9oA== +"@angular-devkit/core@13.0.0-next.7": + version "13.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-13.0.0-next.7.tgz#0a76419dd62827db2fe0af955348fe3f8fba8270" + integrity sha512-UQhdiE4whWiYQTSIHvRvLTAZEG1VOAPNAX4wU9vh3l1VsF9a8ilRExeo9h8pEHaSj6fXpDinM3axhE7M9FA8DQ== dependencies: ajv "8.6.3" ajv-formats "2.1.1" @@ -54,30 +54,30 @@ rxjs "6.6.7" source-map "0.7.3" -"@angular-devkit/schematics@13.0.0-next.6": - version "13.0.0-next.6" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-13.0.0-next.6.tgz#cbffd5d20f3fc94571e6cdd626a14839c92b455a" - integrity sha512-Zi8Q2On5q4HkbVj780YgTlHhfHTn31/UnLEn0fZIL+OsgMCp1fuP/9gmG4mbx6/viq7gqIdQyUCAuBHsLqU7Yw== +"@angular-devkit/schematics@13.0.0-next.7": + version "13.0.0-next.7" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-13.0.0-next.7.tgz#c53dd063946add9c2bcd66e886b7865fb9a11677" + integrity sha512-OGQdXJPnmISJFP91KV/y8I5PMtpuXu+26ZLYcVsjhMHY682wqRWUqWUVZRQbeY2K3ky96w3jqQmQKAW2iuRTTA== dependencies: - "@angular-devkit/core" "13.0.0-next.6" + "@angular-devkit/core" "13.0.0-next.7" jsonc-parser "3.0.0" magic-string "0.25.7" ora "5.4.1" rxjs "6.6.7" -"@angular/animations@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-13.0.0-next.8.tgz#30ce1fb2952756597bc00bb9516cd89bae94f093" - integrity sha512-uawyRcRFkccn6CPXteqKU0N9xXnUFZE3/ta3AP48My6M4K/zq1jdP7LGl1KylOW+qKfj6uRL3pm1wt+6Y6aFkw== +"@angular/animations@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-13.0.0-next.12.tgz#ca1e40fa4f8e6b7514673931303b0257b2e8ccbd" + integrity sha512-cWa7bE/0HAXmMZQEYUi9GGD1qH7q3gTkdiWMuKiB1c8po/GPR/2ibNfusqijTv9k0VjRgEYCWaW61KCQFSvKfw== dependencies: tslib "^2.3.0" -"@angular/bazel@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-13.0.0-next.8.tgz#343531d4593618fcfd4e3926e17d0181c43b7e4f" - integrity sha512-K2bQKdOwgsa6m3svkmIWg/OJ7zp3tMLTum+IvaOa+LVwcdwBji8RJLKiN2MCXXHHJPQZT9NSygT/y2n+Ax6OpA== +"@angular/bazel@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-13.0.0-next.12.tgz#efe7ddae7ab423b7774837d2f5ae8255bf33ebc7" + integrity sha512-kDJs8q+S8j2AFsI8GIaufcjRZF+Qs3T5Xq075v/5iGtvhha9UbyrYXtcioINUIcdhLs6seIl6dG1NBpK+QM2UQ== dependencies: - "@microsoft/api-extractor" "7.18.7" + "@microsoft/api-extractor" "7.18.11" shelljs "0.8.4" tsickle "^0.38.0" tslib "^2.3.0" @@ -90,37 +90,34 @@ "@angular/core" "^10.0.0-0 || ^11.0.0" reflect-metadata "^0.1.13" -"@angular/common@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-13.0.0-next.8.tgz#0e72f3085728ffba09567410abab332df3f48887" - integrity sha512-wpFxj9LDU9Zetm6C9lecPmnGssvjxGsjbOnbtUOPQsf0MDuBgkxEIZ1owDq3IQVhYgk3xHpoTPg6IceKbety9Q== +"@angular/common@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-13.0.0-next.12.tgz#8d01448aca2a961524f0599d1adecda2e0188289" + integrity sha512-wzFY5a3VVUTw0t14UST695tIALOGv1E6I2pUuHoP1WBLl5XBt3SafYuWmnpUj8yF0/40zaePUEv25bGl5W3QUg== dependencies: tslib "^2.3.0" -"@angular/compiler-cli@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-13.0.0-next.8.tgz#db2b391d9d0e0484cc16d8b7f63fc9f351fb53f9" - integrity sha512-zjiLhzIjb/KTUjEwKJNoo8WHI7PxthOugPgEKek786nroHKdyTk96LY6ErpkyDCjqJK9pSvrLhk9La9rUOFC5Q== +"@angular/compiler-cli@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-13.0.0-next.12.tgz#4a7eaeea3d83afdf6083876516ec14bb447e26bb" + integrity sha512-kkUEsoykKWqaexFzGiZyqb55I8o69h74hBYw5a4iTtqy4wx2xQWoStR9bCqXsCteUSsfV5QVq72mtP3I5ublbg== dependencies: "@babel/core" "^7.8.6" - "@babel/types" "^7.8.6" canonical-path "1.0.0" chokidar "^3.0.0" convert-source-map "^1.5.1" dependency-graph "^0.11.0" magic-string "^0.25.0" - minimist "^1.2.0" reflect-metadata "^0.1.2" semver "^7.0.0" - source-map "^0.6.1" sourcemap-codec "^1.4.8" tslib "^2.3.0" - yargs "^17.0.0" + yargs "^17.2.1" -"@angular/compiler@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-13.0.0-next.8.tgz#f3e8895cacbb818b55b29d9c9e709cc8299bf370" - integrity sha512-nNHErEeU6hcng/NIR3T+KJjPZPI0CfWR4UClZAd4I6+Ihp7NlBjeV81XnwVgjfHorgIuXWLPTk6JNzqglv5bYA== +"@angular/compiler@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-13.0.0-next.12.tgz#49dafd3e97936d99246d80be5f482322c5b75663" + integrity sha512-mOMkhICjonQAOoX2BEqwTdTFPPtLNsH7+92MJwB2KkBJfSuxfGKwfkMVOsXjq63zRplDTWxzxdj0wp2fD2iQIg== dependencies: tslib "^2.3.0" @@ -129,10 +126,10 @@ resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0.tgz#87e0bef4c369b6cadae07e3a4295778fc93799d5" integrity sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ== -"@angular/core@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-13.0.0-next.8.tgz#2f209bd4c8ac58bd526eeb8678b34bc95fd07b6e" - integrity sha512-PLlBVlAI5EHYIfx2itmllrjlDFvjug+/4LBURQwBAI+1/a9rM8HxZLGEDKUY9TGbUKqMlggJIRB8+W6Ab5/dtw== +"@angular/core@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-13.0.0-next.12.tgz#5efe275d3558f4816b6b53a6a4f27dc6a80c00aa" + integrity sha512-0x/N4qHOG+P2WdRXgS17sUMOyG/e5wKfT3DV5BF3Tc9BNh2ETIcE7n/VKAIwWGW6npd1xktyMGnblSUrte0/VA== dependencies: tslib "^2.3.0" @@ -148,9 +145,9 @@ dependencies: tslib "^2.0.0" -"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#5744e8e7ca5b3dfa76ad73b7b0eff271a108a737": +"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#e674228281ff6ac4d21779070b090e8a8bde9e69": version "0.0.0" - resolved "https://github.com/angular/dev-infra-private-builds.git#5744e8e7ca5b3dfa76ad73b7b0eff271a108a737" + resolved "https://github.com/angular/dev-infra-private-builds.git#e674228281ff6ac4d21779070b090e8a8bde9e69" dependencies: "@actions/core" "^1.4.0" "@actions/github" "^5.0.0" @@ -163,7 +160,7 @@ "@bazel/protractor" "4.2.0" "@bazel/runfiles" "4.2.0" "@bazel/typescript" "4.2.0" - "@microsoft/api-extractor" "7.18.10" + "@microsoft/api-extractor" "7.18.11" "@octokit/auth-app" "^3.6.0" "@octokit/core" "^3.5.1" "@octokit/graphql" "^4.8.0" @@ -203,49 +200,49 @@ yaml "^1.10.0" yargs "^17.0.0" -"@angular/forms@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-13.0.0-next.8.tgz#bbed61910eed1278c53d71f16f0910fdda894265" - integrity sha512-i1ssqJqYtrX0T9En88j+it2WJ/p+yzozXIFIaG1S+mIIvwq/IS+DAja3xhZhJ9cd/atMv6oT+6XWABbfRSqIgg== +"@angular/forms@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-13.0.0-next.12.tgz#031a5952c46010ea6eb02b8670add2b5f96de24d" + integrity sha512-fJpjHJI/IDXrCY/gGbDJ1VaTJ3hwtx9qB7og4yeIldAMTJRvWTK7gJbIWHyyIs1awBZtjUaOIVcqRF+tVhi3Vw== dependencies: tslib "^2.3.0" -"@angular/localize@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-13.0.0-next.8.tgz#17328cb2467bf18a07b6d3c7336bc5656549b14b" - integrity sha512-JHyz0G8a53HrTMZLgDkhIliYXNAcWQel/HO2hufkYLdBUbXn9TIa6YkojoAfz1BEagNaLm0TPwo1/PfVbxojkQ== +"@angular/localize@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-13.0.0-next.12.tgz#7ceba63d4d1ae6801e5aa3ec412bc0359418ad55" + integrity sha512-Gi0H/0LAT6n6WrXS/OEyhNGZZOxyQGwU/Pk1bufgd/j8FmjoSGhoM/3HRe9s84RMWh58qr/cCSoGO2s6QkCzZQ== dependencies: - "@babel/core" "7.8.3" - glob "7.1.7" - yargs "^17.0.0" + "@babel/core" "7.8.6" + glob "7.2.0" + yargs "^17.2.1" -"@angular/platform-browser-dynamic@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-13.0.0-next.8.tgz#104411d794cb9c56e4ec6f79ef98c70e0ea391e0" - integrity sha512-i3iO2j06aXG28T2+Jk7neryI2Yd96+76QepTvkbGkDmaEngl3BvbKvw8uVLXZrFDy7FGYRHQmJ2FwqD+hDcrvw== +"@angular/platform-browser-dynamic@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-13.0.0-next.12.tgz#965841f9d8a3ddc79775842f6ece9bde3c485657" + integrity sha512-x0ZSn3irHOA3JSJjNPl2VguU+Dwuvd4Yb3q0QqNbS1BHJwzVODUaP3W6FbWqD6p0SPWBvvwcBONvbHa1XH6PxA== dependencies: tslib "^2.3.0" -"@angular/platform-browser@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-13.0.0-next.8.tgz#dfe68b4bf37f13bd94fcece57d10c89fcf02aba3" - integrity sha512-XQUHF+rNyxPN8mBiy+zIuV6eMXnqQEyP32k3WVZIwNwaCqpM3k2hM3drclcwf9Rwb06+EsSMlepfbld4/QHAbQ== +"@angular/platform-browser@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-13.0.0-next.12.tgz#0b9fa7ac7351b6ae17110ed2be1603775b7819d0" + integrity sha512-rNZVaQNdJ56gWi8U56JkPqRRip0NDqfLcvFJYs8H7bo52z0BC54V6oQkMt3/7lBVXAm7sgwsHxqmpaxI98FHCA== dependencies: tslib "^2.3.0" -"@angular/platform-server@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-13.0.0-next.8.tgz#c99acd4b96cfd2effead67052a2441392ad1dcd6" - integrity sha512-6bD24pSGVuTscdtFAdlCOaJ0O2NjIDdh49jq4ASlenLSLvFz5/7XKOLi0cuGel1AoiweotZSzyZAHhe2v0+NEA== +"@angular/platform-server@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-13.0.0-next.12.tgz#2517a75c6148e495a8a21a66efefd00c8f2d4335" + integrity sha512-SzrmW72sE/Dbm0P4VqLCGkaGzvNz8sZjBCd+ECzY4lbZ9naQsxUWf9qunU3387bOsQ3oCiQTKA732pGQT+OOyA== dependencies: domino "^2.1.2" tslib "^2.3.0" xhr2 "^0.2.0" -"@angular/router@13.0.0-next.8": - version "13.0.0-next.8" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-13.0.0-next.8.tgz#c2588d301465afd534e3b1faae14355bc8ac60db" - integrity sha512-s+1alS4epmIeA5MpcCj6E62ab9bbyAD0R+9CUN4/aheqP1UkdDLHEwENMEamY5gleX/vLl9tmbg8kUXxbPyqbg== +"@angular/router@13.0.0-next.12": + version "13.0.0-next.12" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-13.0.0-next.12.tgz#c8189da8207e54c2b1bdaadb9d8e4a535122ecdb" + integrity sha512-UkOXJvzTHaddX2883C7QMuUzfsHFdXeiohB376PsHM5N/9EPdWddQfqjded0es1YLhK1jSx8VOFYP3wYaCVk5A== dependencies: tslib "^2.3.0" @@ -278,18 +275,18 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw== -"@babel/core@7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941" - integrity sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA== +"@babel/core@7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.6.tgz#27d7df9258a45c2e686b6f18b6c659e563aa4636" + integrity sha512-Sheg7yEJD51YHAvLEV/7Uvw95AeWqYPL3Vk3zGujJKIhJ+8oLw2ALaf3hbucILhKsgSoADOvtKRJuNVdcJkOrg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.3" - "@babel/helpers" "^7.8.3" - "@babel/parser" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/generator" "^7.8.6" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.6" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -320,7 +317,7 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.10.5", "@babel/generator@^7.14.8", "@babel/generator@^7.8.3": +"@babel/generator@^7.10.5", "@babel/generator@^7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.8.tgz#bf86fd6af96cf3b74395a8ca409515f89423e070" integrity sha512-cYDUpvIzhBVnMzRoY1fkSEhK/HmwEVwlyULYgn/tMQYd6Obag3ylCjONle3gdErfXBW61SVTlR9QR7uWlgeIkg== @@ -329,6 +326,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.15.4", "@babel/generator@^7.8.6": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.4.tgz#85acb159a267ca6324f9793986991ee2022a05b0" + integrity sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw== + dependencies: + "@babel/types" "^7.15.4" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-compilation-targets@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz#7a99c5d0967911e972fe2c3411f7d5b498498ecf" @@ -348,6 +354,15 @@ "@babel/template" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-function-name@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz#845744dafc4381a4a5fb6afa6c3d36f98a787ebc" + integrity sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw== + dependencies: + "@babel/helper-get-function-arity" "^7.15.4" + "@babel/template" "^7.15.4" + "@babel/types" "^7.15.4" + "@babel/helper-get-function-arity@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz#25fbfa579b0937eee1f3b805ece4ce398c431815" @@ -355,6 +370,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-get-function-arity@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz#098818934a137fce78b536a3e015864be1e2879b" + integrity sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA== + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-hoist-variables@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz#e0dd27c33a78e577d7c8884916a3e7ef1f7c7f8d" @@ -362,6 +384,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-hoist-variables@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz#09993a3259c0e918f99d104261dfdfc033f178df" + integrity sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA== + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-member-expression-to-functions@^7.14.5": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.7.tgz#97e56244beb94211fe277bd818e3a329c66f7970" @@ -421,17 +450,29 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-split-export-declaration@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz#aecab92dcdbef6a10aa3b62ab204b085f776e257" + integrity sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw== + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz#32be33a756f29e278a0d644fa08a2c9e0f88a34c" integrity sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow== +"@babel/helper-validator-identifier@^7.14.9": + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== + "@babel/helper-validator-option@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== -"@babel/helpers@^7.14.8", "@babel/helpers@^7.8.3": +"@babel/helpers@^7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.8.tgz#839f88f463025886cff7f85a35297007e2da1b77" integrity sha512-ZRDmI56pnV+p1dH6d+UN6GINGz7Krps3+270qqI9UJ4wxYThfAIcI5i7j5vXC4FJ3Wap+S9qcebxeYiqn87DZw== @@ -440,6 +481,15 @@ "@babel/traverse" "^7.14.8" "@babel/types" "^7.14.8" +"@babel/helpers@^7.8.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.15.4.tgz#5f40f02050a3027121a3cf48d497c05c555eaf43" + integrity sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ== + dependencies: + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" @@ -449,17 +499,22 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.10.5", "@babel/parser@^7.14.5", "@babel/parser@^7.14.8", "@babel/parser@^7.8.3": +"@babel/parser@^7.0.0", "@babel/parser@^7.10.5", "@babel/parser@^7.14.5", "@babel/parser@^7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.8.tgz#66fd41666b2d7b840bd5ace7f7416d5ac60208d4" integrity sha512-syoCQFOoo/fzkWDeM0dLEZi5xqurb5vuyzwIMNZRNun+N/9A4cUZeQaE7dTrB8jGaKuJRBtEOajtnmw0I5hvvA== +"@babel/parser@^7.1.0", "@babel/parser@^7.15.4", "@babel/parser@^7.8.6": + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.7.tgz#0c3ed4a2eb07b165dfa85b3cc45c727334c4edae" + integrity sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g== + "@babel/parser@~7.10.3": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.5.tgz#e7c6bf5a7deff957cec9f04b551e2762909d826b" integrity sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ== -"@babel/template@^7.14.5", "@babel/template@^7.8.3": +"@babel/template@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" integrity sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g== @@ -468,7 +523,16 @@ "@babel/parser" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.14.8", "@babel/traverse@^7.8.3": +"@babel/template@^7.15.4", "@babel/template@^7.8.6": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.15.4.tgz#51898d35dcf3faa670c4ee6afcfd517ee139f194" + integrity sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.14.8": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.8.tgz#c0253f02677c5de1a8ff9df6b0aacbec7da1a8ce" integrity sha512-kexHhzCljJcFNn1KYAQ6A5wxMRzq9ebYpEDV4+WdNyr3i7O44tanbDOR/xjiG2F3sllan+LgwK+7OMk0EmydHg== @@ -483,6 +547,21 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.15.4", "@babel/traverse@^7.8.6": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.4.tgz#ff8510367a144bfbff552d9e18e28f3e2889c22d" + integrity sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.4" + "@babel/helper-function-name" "^7.15.4" + "@babel/helper-hoist-variables" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + debug "^4.1.0" + globals "^11.1.0" + "@babel/traverse@~7.10.3": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.10.5.tgz#77ce464f5b258be265af618d8fddf0536f20b564" @@ -498,7 +577,15 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.10.5", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.8.3", "@babel/types@^7.8.6": +"@babel/types@^7.0.0", "@babel/types@^7.15.4", "@babel/types@^7.3.0": + version "7.15.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" + integrity sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig== + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + +"@babel/types@^7.10.5", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.8.6": version "7.14.8" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.8.tgz#38109de8fcadc06415fbd9b74df0065d4d41c728" integrity sha512-iob4soQa7dZw8nodR/KlOQkPh9S4I8RwCxwRIFuiMRYjOzH/KJzdUfDgz6cGi5dDaclXF4P2PAhCdrBJNIg68Q== @@ -530,10 +617,10 @@ resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-4.0.1.tgz#52cfbad5cbb86e9183a29dde2370cd465730ea0d" integrity sha512-BTmtvJbeeEVrqRApI1gr5hvPgYcHLpdGJ5EXNXEWO692ztMPSj5fB/dH0xUlaW45jn6LimYx8ymqTMhj3538og== -"@bazel/concatjs@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-4.2.0.tgz#594ed5a5d0bc8f4d72e1a0393cfbefa340c46fc0" - integrity sha512-ZAXnpVBR0z5kMKnekfGQ0Dtjx+mnZD1KMyAhqwqja5clU/Lc+32iNiqFTw9U7LgWKhLnyQoKu4ZyID6/UgPVog== +"@bazel/concatjs@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-4.3.0.tgz#cf5be6aec1c6902e10051bba860cd9179048fe71" + integrity sha512-rhPMEMebdY/AVlbohaV2jJvVE3S3hNlJFZ4Be2rIgaBY7+l2u2FR24aYbFwwtzhpBS2wgqc9SfQPPXSDd0NWag== dependencies: protobufjs "6.8.8" source-map-support "0.5.9" @@ -544,6 +631,11 @@ resolved "https://registry.yarnpkg.com/@bazel/esbuild/-/esbuild-4.2.0.tgz#2bc69a1075a24f6fd7ebe1bc839e15c9ae568075" integrity sha512-kT2WUtjHEDFAIcMqpA48x3tWnp7w4IkYitMGXvODjbAo3VGl1oNm4FCuSjD8bfvKDzh4unsDGr/h5Hi2RNTKoA== +"@bazel/esbuild@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@bazel/esbuild/-/esbuild-4.3.0.tgz#a511d2090c4fccf865b7f6eafc95673f0486450b" + integrity sha512-AUyyCYO17Uk/vaG9VSyDgLbQuW0ZY2ciDDp9frgHWPv55SdZolzAK0lA36QVJuz6/7I4EQBvox6KEpMPBR2f/A== + "@bazel/ibazel@0.15.10": version "0.15.10" resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.15.10.tgz#cf0cff1aec6d8e7bb23e1fc618d09fbd39b7a13f" @@ -562,22 +654,32 @@ resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-4.2.0.tgz#9f5bf46054c6f1f8eacc69acf28a483772f3f9cb" integrity sha512-+56gSJzE6dIJl1cZegG9i9LwCCMOTrew7wxWfBWj7zFVoiwB6Wj45HWPQ5KhNq9CABq3GTxwWJcs/TNW4lxt4A== -"@bazel/rollup@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-4.2.0.tgz#c291ab0ae8e1624e45cf6d3c5572e79b62791f0d" - integrity sha512-o977GjW1yYc2DDa/znpSHbGv7mbE+hOplFC2h4LGaLpbjjr/ziAHxr1MFQzs+LRbht56rUJ1E2Z4am5hiEJVMA== +"@bazel/protractor@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-4.3.0.tgz#8dd36e1e4ed3b6512951f48fa3dad89867853cc3" + integrity sha512-Ncd9Se9NYn2UUHSPQv6uUZnzWBQjXaLGWj0MFxqXC3fVGyyvPNSxlOzloiIWFhy/NYz9r49haeHaM5pd1tamtQ== + +"@bazel/rollup@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-4.3.0.tgz#fbf52eba47d2c7458415d378e59329aa99983723" + integrity sha512-eY9b5NQSk/qSELrA30Ye9ICl2uxuppqLssypF/m0GqRrBhu0CEJHyaAuU4pek0wPT8BAVK70oEAhL22KYl7puA== dependencies: - "@bazel/worker" "4.2.0" + "@bazel/worker" "4.3.0" "@bazel/runfiles@4.2.0": version "4.2.0" resolved "https://registry.yarnpkg.com/@bazel/runfiles/-/runfiles-4.2.0.tgz#2e248b2dfbf25c17e408ff9137cb5e5c4ab07896" integrity sha512-dHTUFv9C0NAvMBFid2LVVxxi/J8SpJlepsdOhxGkvkXH3M6vTWML6f8rvAxFYZIn44oJ7SdVOlPOCgXba6YRAg== -"@bazel/terser@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-4.2.0.tgz#ab02281475a924e9a032138728f58ce323fd64cb" - integrity sha512-su7La+F6VVQCJ3ImdgWNK/azpf/8LMY08S3akWcL+z9U08ERUVs2o6LRCiY6IuaCD5AhXmfR1AWTpMJ7mfrbFA== +"@bazel/runfiles@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@bazel/runfiles/-/runfiles-4.3.0.tgz#068c4f2816cedff131801c6865c9e216c882931b" + integrity sha512-T1BURxP6OPF4Q1LZElhpOJR0VM1J9Tfk4L8se0bhZfBH72MtYDfI7MmhS/wh74/XSVK7SK7YerEkolcyZajRKw== + +"@bazel/terser@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-4.3.0.tgz#3824546f37e21e3681b78000aa1b54cc9b6abd2a" + integrity sha512-62XbM8dLY2/NYpwIy+Y8m7mI0+KT+7byaZclu47MBYCZN0UNnegCxGLMxUctjeOtxXVntOsQXEw0HrFYNOtw4A== "@bazel/typescript@4.2.0": version "4.2.0" @@ -590,6 +692,17 @@ source-map-support "0.5.9" tsutils "3.21.0" +"@bazel/typescript@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-4.3.0.tgz#c4131ba7980f8e72885f5ec19c265ad9431e1a71" + integrity sha512-ddPw0Xetl+a5UeZVHzpWsyMrUcAyhpGXknmfymx8vrWL+Y3yyquC7ZcYoYbkoCwIMBz7xhadm8NKIUYCrsEgaA== + dependencies: + "@bazel/worker" "4.3.0" + protobufjs "6.8.8" + semver "5.6.0" + source-map-support "0.5.9" + tsutils "3.21.0" + "@bazel/worker@4.2.0": version "4.2.0" resolved "https://registry.yarnpkg.com/@bazel/worker/-/worker-4.2.0.tgz#96d4f4f7807c8e3a583e3e9e78d81385882c8013" @@ -597,6 +710,13 @@ dependencies: google-protobuf "^3.6.1" +"@bazel/worker@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@bazel/worker/-/worker-4.3.0.tgz#5ba7da1efa772f5dade5dfd4b662dcaa60ed7c1c" + integrity sha512-K34/g/4aUAX8TOQ1MgBaZ+YeZkiIlwETwA50gheCAsasz0SWjvgcpIbwNkaL9fmXOVhDj2o55J20khsl5ItBIw== + dependencies: + google-protobuf "^3.6.1" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1367,33 +1487,24 @@ "@material/theme" "13.0.0-canary.860ad06a1.0" tslib "^2.1.0" -"@microsoft/api-extractor-model@7.13.5": - version "7.13.5" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.5.tgz#7836a81ba47b9a654062ed0361e4eee69afae51e" - integrity sha512-il6AebNltYo5hEtqXZw4DMvrwBPn6+F58TxwqmsLY+U+sSJNxaYn2jYksArrjErXVPR3gUgRMqD6zsdIkg+WEQ== - dependencies: - "@microsoft/tsdoc" "0.13.2" - "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.40.0" - -"@microsoft/api-extractor-model@7.13.8": - version "7.13.8" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.8.tgz#a76a0be5cd019cab14e0be2b05a97115739d3938" - integrity sha512-tC/Mbc7vOEkinVmhXyGS4RvPD3cesE0UvE0RmgazDfLHOpefLwoakdoocZqUp+mL5hMUep/ymIW7IbfZlwWxnQ== +"@microsoft/api-extractor-model@7.13.9": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.9.tgz#018fb37ac0147595832e13db17509f6adafbad9c" + integrity sha512-t/XKTr8MlHRWgDr1fkyCzTQRR5XICf/WzIFs8yw1JLU8Olw99M3by4/dtpOZNskfqoW+J8NwOxovduU2csi4Ww== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.40.3" + "@rushstack/node-core-library" "3.41.0" -"@microsoft/api-extractor@7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.10.tgz#2b6fc8ada9988c5d0d1f108773a4afd95163182f" - integrity sha512-FrXFniXYVG8YS55uwJ+lxHsHuy7SFmne0yClF0k8up2+CXw1zqOGuWJE66QzH4JITirTfny7E8x3i/3WlK53xg== +"@microsoft/api-extractor@7.18.11": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.11.tgz#24910c2432362b09900b493a0713919b662cdb0f" + integrity sha512-WfN5MZry4TrF60OOcGadFDsGECF9JNKNT+8P/8crYAumAYQRitI2cUiQRlCWrgmFgCWNezsNZeI/2BggdnUqcg== dependencies: - "@microsoft/api-extractor-model" "7.13.8" + "@microsoft/api-extractor-model" "7.13.9" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.40.3" + "@rushstack/node-core-library" "3.41.0" "@rushstack/rig-package" "0.3.1" "@rushstack/ts-command-line" "4.9.1" colors "~1.2.1" @@ -1403,24 +1514,6 @@ source-map "~0.6.1" typescript "~4.4.2" -"@microsoft/api-extractor@7.18.7": - version "7.18.7" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.7.tgz#851d2413a3c5d696f7cc914eb59de7a7882b2e8b" - integrity sha512-JhtV8LoyLuIecbgCPyZQg08G1kngIRWpai2UzwNil9mGVGYiDZVeeKx8c2phmlPcogmMDm4oQROxyuiYt5sJiw== - dependencies: - "@microsoft/api-extractor-model" "7.13.5" - "@microsoft/tsdoc" "0.13.2" - "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.40.0" - "@rushstack/rig-package" "0.3.0" - "@rushstack/ts-command-line" "4.9.0" - colors "~1.2.1" - lodash "~4.17.15" - resolve "~1.17.0" - semver "~7.3.0" - source-map "~0.6.1" - typescript "~4.3.5" - "@microsoft/tsdoc-config@~0.15.2": version "0.15.2" resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz#eb353c93f3b62ab74bdc9ab6f4a82bcf80140f14" @@ -1729,19 +1822,6 @@ "@babel/helper-module-imports" "^7.10.4" "@rollup/pluginutils" "^3.1.0" -"@rollup/plugin-commonjs@^18.0.0": - version "18.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-18.1.0.tgz#5a760d757af168a50727c0ae080251fbfcc5eb02" - integrity sha512-h3e6T9rUxVMAQswpDIobfUHn/doMzM9sgkMrsMWCFLmB84PSoC8mV8tOloAJjSRwdqhXBqstlX2BwBpHJvbhxg== - dependencies: - "@rollup/pluginutils" "^3.1.0" - commondir "^1.0.1" - estree-walker "^2.0.1" - glob "^7.1.6" - is-reference "^1.2.1" - magic-string "^0.25.7" - resolve "^1.17.0" - "@rollup/plugin-commonjs@^20.0.0": version "20.0.0" resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-20.0.0.tgz#3246872dcbcb18a54aaa6277a8c7d7f1b155b745" @@ -1776,25 +1856,10 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rushstack/node-core-library@3.40.0": - version "3.40.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.40.0.tgz#2551915ea34e34ec2abb7172b9d7f4546144d9d4" - integrity sha512-P6uMPI7cqTdawLSPAG5BQrBu1MHlGRPqecp7ruIRgyukIEzkmh0QAnje4jAL/l1r3hw0qe4e+Dz5ZSnukT/Egg== - dependencies: - "@types/node" "10.17.13" - colors "~1.2.1" - fs-extra "~7.0.1" - import-lazy "~4.0.0" - jju "~1.4.0" - resolve "~1.17.0" - semver "~7.3.0" - timsort "~0.3.0" - z-schema "~3.18.3" - -"@rushstack/node-core-library@3.40.3": - version "3.40.3" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.40.3.tgz#7dbeb6c5153e491b7c2002d53dec117a18161900" - integrity sha512-yWM84xgLVy1p3pQJw8EQYui5IgAFzB0MUpdGXCVKl3/qt25ucsqKA/I50DSPhvLf/Gpsvc8bGv+kx5PKgAseZg== +"@rushstack/node-core-library@3.41.0": + version "3.41.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.41.0.tgz#36f79ecf1a3c9b417690d95bbfcdf40390bf5f51" + integrity sha512-JxdmqR+SHU04jTDaZhltMZL3/XTz2ZZM47DTN+FSPUGUVp6WmxLlvJnT5FoHrOZWUjL/FoIlZUdUPTSXjTjIcg== dependencies: "@types/node" "12.20.24" colors "~1.2.1" @@ -1806,14 +1871,6 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.0.tgz#334ad2846797861361b3445d4cc9ae9164b1885c" - integrity sha512-Lj6noF7Q4BBm1hKiBDw94e6uZvq1xlBwM/d2cBFaPqXeGdV+G6r3qaCWfRiSXK0pcHpGGpV5Tb2MdfhVcO6G/g== - dependencies: - resolve "~1.17.0" - strip-json-comments "~3.1.1" - "@rushstack/rig-package@0.3.1": version "0.3.1" resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.1.tgz#b70ab9ffe3b6347eb799f5c6c5b6f5882039a60f" @@ -1822,16 +1879,6 @@ resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.9.0": - version "4.9.0" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.9.0.tgz#781ba42cff73cae097b6d5241b6441e7cc2fe6e0" - integrity sha512-kmT8t+JfnvphISF1C5WwY56RefjwgajhSjs9J4ckvAFXZDXR6F5cvF5/RTh7fGCzIomg8esy2PHO/b52zFoZvA== - dependencies: - "@types/argparse" "1.0.38" - argparse "~1.0.9" - colors "~1.2.1" - string-argv "~0.3.1" - "@rushstack/ts-command-line@4.9.1": version "4.9.1" resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.9.1.tgz#9fe594a408c7ef1b67f57b41ba931ecd3f420e92" @@ -1842,13 +1889,13 @@ colors "~1.2.1" string-argv "~0.3.1" -"@schematics/angular@13.0.0-next.6": - version "13.0.0-next.6" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-13.0.0-next.6.tgz#b40221ccc7cbfaf019c4c0a2a064a21af2ca4c2f" - integrity sha512-VuDwwGecUjhof4leAX0eoyenxOD/CI5ua6ZIyRs5BxbPmGhWveI5gBVWsfey4eu8OkuGprgaZAGGgJeVDjAzow== +"@schematics/angular@13.0.0-next.7": + version "13.0.0-next.7" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-13.0.0-next.7.tgz#b8d3ee053d23d49f75db5ea375cdf82df0800695" + integrity sha512-CvpWN4h7Vo4ynu3WfxLr2Ev3ziVl/xKLmyKrUNlXKUK4yl9J2jIyYCs5oA+tXV7BT/sVIJe4+MSRKVUc+XV/+Q== dependencies: - "@angular-devkit/core" "13.0.0-next.6" - "@angular-devkit/schematics" "13.0.0-next.6" + "@angular-devkit/core" "13.0.0-next.7" + "@angular-devkit/schematics" "13.0.0-next.7" jsonc-parser "3.0.0" "@sindresorhus/is@^0.14.0": @@ -1932,6 +1979,39 @@ resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9" integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== +"@types/babel__core@^7.1.16": + version "7.1.16" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.16.tgz#bc12c74b7d65e82d29876b5d0baf5c625ac58702" + integrity sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ== + 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.3" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.3.tgz#f456b4b2ce79137f768aa130d2423d2f0ccfaba5" + integrity sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" + integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*": + version "7.14.2" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.14.2.tgz#ffcd470bbb3f8bf30481678fb5502278ca833a43" + integrity sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA== + dependencies: + "@babel/types" "^7.3.0" + "@types/browser-sync@^2.26.1": version "2.26.2" resolved "https://registry.yarnpkg.com/@types/browser-sync/-/browser-sync-2.26.2.tgz#0a58bf50d26c009aaff8826f2a6d16d5d97581ba" @@ -1974,11 +2054,6 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== -"@types/expect@^1.20.4": - version "1.20.4" - resolved "https://registry.yarnpkg.com/@types/expect/-/expect-1.20.4.tgz#8288e51737bf7e3ab5d7c77bfa695883745264e5" - integrity sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg== - "@types/fs-extra@^9.0.5": version "9.0.12" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.12.tgz#9b8f27973df8a7a3920e8461517ebf8a7d4fdfaf" @@ -1986,14 +2061,6 @@ dependencies: "@types/node" "*" -"@types/glob-stream@*": - version "6.1.1" - resolved "https://registry.yarnpkg.com/@types/glob-stream/-/glob-stream-6.1.1.tgz#c792d8d1514278ff03cad5689aba4c4ab4fbc805" - integrity sha512-AGOUTsTdbPkRS0qDeyeS+6KypmfVpbT5j23SN8UPG63qjKXNKjXn6V9wZUr8Fin0m9l8oGYaPK8b2WUMF8xI1A== - dependencies: - "@types/glob" "*" - "@types/node" "*" - "@types/glob@*", "@types/glob@^7.1.3": version "7.1.4" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" @@ -2007,15 +2074,6 @@ resolved "https://registry.yarnpkg.com/@types/google.maps/-/google.maps-3.45.6.tgz#441a7bc76424243b307596fc8d282a435a979ebd" integrity sha512-BzGzxs8UXFxeP8uN/0nRgGbsbpYQxSCKsv/7S8OitU7wwhfFcqQSm5aAcL1nbwueMiJ/VVmIZKPq69s0kX5W+Q== -"@types/gulp@4.0.8": - version "4.0.8" - resolved "https://registry.yarnpkg.com/@types/gulp/-/gulp-4.0.8.tgz#a5e43764d400b9818dc79b5ffa86e22a94521037" - integrity sha512-RIhiptRwikdFMICikX+Kn8duKR4R7yO2CKMhkcIfvUwZ3UJSjHlvhHDJ2DsurJWETePqdjteO9MLRtObuCt7Sw== - dependencies: - "@types/undertaker" "*" - "@types/vinyl-fs" "*" - chokidar "^3.3.1" - "@types/http-cache-semantics@*": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" @@ -2132,11 +2190,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.8.tgz#ef4974f47524448428542365db2fe7b638f928e5" integrity sha512-VL7RZyCpfYEmbyd3/Eq5RNYhZt7yoL1JThZQ3KzimzhLya2Qa86U1ZZmioNWAAjiz99z1ED1xF9NUV2srvfVrA== -"@types/node@10.17.13": - version "10.17.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" - integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== - "@types/node@12.20.24": version "12.20.24" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c" @@ -2191,13 +2244,6 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" integrity sha1-vShOV8hPEyXacCur/IKlMoGQwMU= -"@types/resolve@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== - dependencies: - "@types/node" "*" - "@types/resolve@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" @@ -2268,20 +2314,6 @@ dependencies: "@types/node" "*" -"@types/undertaker-registry@*": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/undertaker-registry/-/undertaker-registry-1.0.1.tgz#4306d4a03d7acedb974b66530832b90729e1d1da" - integrity sha512-Z4TYuEKn9+RbNVk1Ll2SS4x1JeLHecolIbM/a8gveaHsW0Hr+RQMraZACwTO2VD7JvepgA6UO1A1VrbktQrIbQ== - -"@types/undertaker@*": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@types/undertaker/-/undertaker-1.2.7.tgz#89c37fd3be556141a4092b38f8bc503076803d21" - integrity sha512-xuY7nBwo1zSRoY2aitp/HArHfTulFAKql2Fr4b4mWbBBP+F50n7Jm6nwISTTMaDk2xvl92O10TTejVF0Q9mInw== - dependencies: - "@types/node" "*" - "@types/undertaker-registry" "*" - async-done "~1.3.2" - "@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" @@ -2303,23 +2335,6 @@ "@types/unist" "*" "@types/vfile-message" "*" -"@types/vinyl-fs@*": - version "2.4.12" - resolved "https://registry.yarnpkg.com/@types/vinyl-fs/-/vinyl-fs-2.4.12.tgz#7b4673d9b4d5a874c8652d10f0f0265479014c8e" - integrity sha512-LgBpYIWuuGsihnlF+OOWWz4ovwCYlT03gd3DuLwex50cYZLmX3yrW+sFF9ndtmh7zcZpS6Ri47PrIu+fV+sbXw== - dependencies: - "@types/glob-stream" "*" - "@types/node" "*" - "@types/vinyl" "*" - -"@types/vinyl@*": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.5.tgz#52d3b850a4ed494aaad51e96708834c500c8d5cd" - integrity sha512-1m6uReH8R/RuLVQGvTT/4LlWq67jZEUxp+FBHt0hYv2BT7TUwFbKI0wa7JZVEU/XtlcnX1QcTuZ36es4rGj7jg== - dependencies: - "@types/expect" "^1.20.4" - "@types/node" "*" - "@types/which@^1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.2.tgz#9c246fc0c93ded311c8512df2891fb41f6227fdf" @@ -2556,13 +2571,6 @@ ansi-align@^3.0.0: dependencies: string-width "^3.0.0" -ansi-colors@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" - integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== - dependencies: - ansi-wrap "^0.1.0" - ansi-escapes@^3.1.0, ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" @@ -2575,13 +2583,6 @@ ansi-escapes@^4.2.1: dependencies: type-fest "^0.21.3" -ansi-gray@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" - integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= - dependencies: - ansi-wrap "0.1.0" - ansi-regex@^2.0.0, ansi-regex@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -2621,11 +2622,6 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" -ansi-wrap@0.1.0, ansi-wrap@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" - integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= - ansicolors@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" @@ -2657,13 +2653,6 @@ app-root-path@^3.0.0: resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz#210b6f43873227e18a4b810a032283311555d5ad" integrity sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw== -append-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" - integrity sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE= - dependencies: - buffer-equal "^1.0.0" - aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -2710,11 +2699,6 @@ archiver@^5.0.0: tar-stream "^2.2.0" zip-stream "^4.1.0" -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= - are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" @@ -2753,25 +2737,11 @@ arr-diff@^4.0.0: resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= -arr-filter@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/arr-filter/-/arr-filter-1.1.2.tgz#43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee" - integrity sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4= - dependencies: - make-iterator "^1.0.0" - -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== -arr-map@^2.0.0, arr-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/arr-map/-/arr-map-2.0.2.tgz#3a77345ffc1cf35e2a91825601f9e58f2e24cac4" - integrity sha1-Onc0X/wc814qkYJWAfnljy4kysQ= - dependencies: - make-iterator "^1.0.0" - arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" @@ -2782,11 +2752,6 @@ array-differ@^3.0.0: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== -array-each@^1.0.0, array-each@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" - integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= - array-flatten@1.1.1, array-flatten@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -2802,35 +2767,6 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= -array-initial@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" - integrity sha1-L6dLJnOTccOUe9enrcc74zSz15U= - dependencies: - array-slice "^1.0.0" - is-number "^4.0.0" - -array-last@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/array-last/-/array-last-1.3.0.tgz#7aa77073fec565ddab2493f5f88185f404a9d336" - integrity sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg== - dependencies: - is-number "^4.0.0" - -array-slice@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" - integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== - -array-sort@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" - integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== - dependencies: - default-compare "^1.0.0" - get-value "^2.0.6" - kind-of "^5.0.2" - array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -2926,16 +2862,6 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -async-done@^1.2.0, async-done@^1.2.2, async-done@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/async-done/-/async-done-1.3.2.tgz#5e15aa729962a4b07414f528a88cdf18e0b290a2" - integrity sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.2" - process-nextick-args "^2.0.0" - stream-exhaust "^1.0.1" - async-each-series@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-0.1.1.tgz#7617c1917401fd8ca4a28aadce3dbae98afeb432" @@ -2951,13 +2877,6 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async-settle@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b" - integrity sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs= - dependencies: - async-done "^1.2.2" - async@0.9.x: version "0.9.2" resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" @@ -3054,21 +2973,6 @@ axobject-query@2.0.2: dependencies: ast-types-flow "0.0.7" -bach@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880" - integrity sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA= - dependencies: - arr-filter "^1.1.1" - arr-flatten "^1.0.1" - arr-map "^2.0.0" - array-each "^1.0.0" - array-initial "^1.0.0" - array-last "^1.1.1" - async-done "^1.2.2" - async-settle "^1.0.0" - now-and-later "^2.0.0" - backo2@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" @@ -3494,11 +3398,6 @@ buffer-equal-constant-time@1.0.1: resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= -buffer-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" - integrity sha1-WWFrSYME1Var1GaWayLu2j7KX74= - buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" @@ -3701,11 +3600,6 @@ camelcase-keys@^6.2.2: map-obj "^4.0.0" quick-lru "^4.0.1" -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= - camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -3885,7 +3779,7 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -"chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.0.2, chokidar@^3.3.1, chokidar@^3.4.1: +"chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.0.2, chokidar@^3.4.1: version "3.5.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== @@ -3900,7 +3794,7 @@ chardet@^0.7.0: optionalDependencies: fsevents "~2.3.2" -chokidar@^2.0.0, chokidar@^2.1.2: +chokidar@^2.1.2: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== @@ -4038,15 +3932,6 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -4065,11 +3950,6 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -clone-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" - integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= - clone-regexp@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clone-regexp/-/clone-regexp-2.2.0.tgz#7d65e00885cd8796405c35a737e7a86b7429e36f" @@ -4084,30 +3964,11 @@ clone-response@1.0.2, clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -clone-stats@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" - integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= - 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: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= - -cloneable-readable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" - integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== - dependencies: - inherits "^2.0.1" - process-nextick-args "^2.0.0" - readable-stream "^2.3.5" - clonedeep@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/clonedeep/-/clonedeep-2.0.0.tgz#8ceca0777f477bbf31fe8c871aaf63a390bbc272" @@ -4138,15 +3999,6 @@ codelyzer@^6.0.2: tslib "^1.10.0" zone.js "~0.10.3" -collection-map@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-map/-/collection-map-1.0.0.tgz#aea0f06f8d26c780c2b75494385544b2255af18c" - integrity sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw= - dependencies: - arr-map "^2.0.2" - for-own "^1.0.0" - make-iterator "^1.0.0" - collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -4187,11 +4039,6 @@ color-string@^1.5.2: color-name "^1.0.0" simple-swizzle "^0.2.2" -color-support@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - color@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/color/-/color-3.0.0.tgz#d920b4328d534a3ac8295d68f7bd4ba6c427be9a" @@ -4335,16 +4182,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - config-chain@^1.1.11: version "1.1.13" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" @@ -4569,7 +4406,7 @@ conventional-commits-parser@^3.2.0, conventional-commits-parser@^3.2.1: through2 "^4.0.0" trim-off-newlines "^1.0.0" -convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== @@ -4596,14 +4433,6 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-props@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.5.tgz#03cf9ae328d4ebb36f8f1d804448a6af9ee3f2d2" - integrity sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw== - dependencies: - each-props "^1.3.2" - is-plain-object "^5.0.0" - core-js-bundle@^3.8.2: version "3.16.0" resolved "https://registry.yarnpkg.com/core-js-bundle/-/core-js-bundle-3.16.0.tgz#d017dd1411e06cb534e5bcf048999bbd681364e9" @@ -4835,7 +4664,7 @@ decamelize-keys@^1.1.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.2.0: +decamelize@^1.1.0, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -4944,18 +4773,6 @@ deepmerge@^4.0.0, deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -default-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" - integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== - dependencies: - kind-of "^5.0.2" - -default-resolution@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" - integrity sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= - defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -5075,11 +4892,6 @@ destroy@^1.0.4, destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -detect-file@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" - integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= - detect-node@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" @@ -5376,16 +5188,6 @@ duplexer@~0.1.1: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -duplexify@^3.6.0: - 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" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - duplexify@^4.0.0: version "4.1.2" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" @@ -5396,14 +5198,6 @@ duplexify@^4.0.0: readable-stream "^3.1.1" stream-shift "^1.0.0" -each-props@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" - integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA== - dependencies: - is-plain-object "^2.0.1" - object.defaults "^1.1.0" - easy-extender@^2.3.4: version "2.3.4" resolved "https://registry.yarnpkg.com/easy-extender/-/easy-extender-2.3.4.tgz#298789b64f9aaba62169c77a2b3b64b4c9589b8f" @@ -5593,7 +5387,7 @@ err-code@^2.0.2: resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== -error-ex@^1.2.0, error-ex@^1.3.1: +error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== @@ -5614,7 +5408,7 @@ es6-error@^4.1.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: +es6-iterator@^2.0.3, es6-iterator@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= @@ -5631,7 +5425,7 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" -es6-weak-map@^2.0.1, es6-weak-map@^2.0.3: +es6-weak-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== @@ -5641,6 +5435,108 @@ es6-weak-map@^2.0.1, es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" +esbuild-android-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.3.tgz#ef734c76eeff42e8c53acdffe901da090164a890" + integrity sha512-jc9E8vGTHkzb0Vwl74H8liANV9BWsqtzLHaKvcsRgf1M+aVCBSF0gUheduAKfDsbDMT0judeMLhwBP34EUesTA== + +esbuild-darwin-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.3.tgz#35f29376b7451add79f0640980683ef923365385" + integrity sha512-8bG3Zq+ZNuLlIJebOO2+weI7P2LVf33sOzaUfHj8MuJ+1Ixe4KtQxfYp7qhFnP6xP2ToJaYHxGUfLeiUCEz9hw== + +esbuild-darwin-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.3.tgz#530a1326e7d18d62c9a54b6dce70f2b77ed50eec" + integrity sha512-5E81eImYtTgh8pY7Gq4WQHhWkR/LvYadUXmuYeZBiP+3ADZJZcG60UFceZrjqNPaFOWKr/xmh4aNocwagEubcA== + +esbuild-freebsd-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.3.tgz#ce2896ac362e06eb82ca5dec06b2568901eb5afc" + integrity sha512-ou+f91KkTGexi8HvF/BdtsITL6plbciQfZGys7QX6/QEwyE96PmL5KnU6ZQwoU7E99Ts6Sc9bUDq8HXJubKtBA== + +esbuild-freebsd-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.3.tgz#a20454f99e060bea4e465d131556a9f0533f403f" + integrity sha512-F1zV7nySjHswJuvIgjkiG5liZ63MeazDGXGKViTCeegjZ71sAhOChcaGhKcu6vq9+vqZxlfEi1fmXlx6Pc3coQ== + +esbuild-linux-32@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.3.tgz#ad56f18208ecf007cd9ab16cd39626ca0312b8ee" + integrity sha512-mHHc2v6uLrHH4zaaq5RB/5IWzgimEJ1HGldzf1qtGI513KZWfH0HRRQ8p1di4notJgBn7tDzWQ1f34ZHy69viQ== + +esbuild-linux-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.3.tgz#be1eabadf68d153897ed887678f7496d3949810f" + integrity sha512-FJ1De2O89mrOuqtaEXu41qIYJU6R41F+OA6vheNwcAQcX8fu0aiA13FJeLABq29BYJuTVgRj3cyC8q+tz19/dQ== + +esbuild-linux-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.3.tgz#329348bb4a19cfb5e9046cc5d97ba5017d8f74ad" + integrity sha512-Cauhr45KSo+wRUojs+1qfycQqQCAXTOvsWvkZ6xmEMAXLAm+f8RQGDQeP8CAf8Yeelnegcn6UNdvzdzLHhWDFg== + +esbuild-linux-arm@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.3.tgz#b3b3167c9d5d3038894fbc75b194a4fbe93eaf09" + integrity sha512-9BJNRtLwBh3OP22cln9g3AJdbAQUcjRHqA4BScx9k4RZpGqPokFr548zpeplxWhcwrIjT8qPebwH9CrRVy8Bsw== + +esbuild-linux-mips64le@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.3.tgz#ea1687f28ea2c85399ecc2fe23a48ab343b7b35d" + integrity sha512-YVzJUGCncuuLm2boYyVeuMFsak4ZAhdiBwi0xNDZCC8sy+tS6Boe2mzcrD2uubv5JKAUOrpN186S1DtU4WgBgw== + +esbuild-linux-ppc64le@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.3.tgz#a462cf42eae3d7fc29a9f277679f5adee70afa67" + integrity sha512-GU6CqqKtJEoyxC2QWHiJtmuOz9wc/jMv8ZloK2WwiGY5yMvAmM3PI103Dj7xcjebNTHBqITTUw/aigY1wx5A3w== + +esbuild-openbsd-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.3.tgz#0cb15bd86d20eb19cb548b530f1a533197532cf9" + integrity sha512-HVpkgpn4BQt4BPDAjTOpeMub6mzNWw6Y3gaLQJrpbO24pws6ZwYkY24OI3/Uo3LDCbH6856MM81JxECt92OWjA== + +esbuild-sunos-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.3.tgz#53a941241f881010969cc8f1acb1ada49c4cd3c2" + integrity sha512-XncBVOtnEfUbPV4CaiFBxh38ychnBfwCxuTm9iAqcHzIwkmeNRN5qMzDyfE1jyfJje+Bbt6AvIfz6SdYt8/UEQ== + +esbuild-windows-32@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.3.tgz#265dc0d0cdb5374685a851c584857055e12865a4" + integrity sha512-ZlgDz7d1nk8wQACi+z8IDzNZVUlN9iprAme+1YSTsfFDlkyI8jeaGWPk9EQFNY7rJzsLVYm6eZ2mhPioc7uT5A== + +esbuild-windows-64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.3.tgz#ae710c0629ec8c39c5ef1f69e86ed5592bb4128f" + integrity sha512-YX7KvRez3TR+GudlQm9tND/ssj2FsF9vb8ZWzAoZOLxpPzE3y+3SFJNrfDzzQKPzJ0Pnh9KBP4gsaMwJjKHDhw== + +esbuild-windows-arm64@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.3.tgz#a236199a26b1205573dcb571f966189326a4c953" + integrity sha512-nP7H0Y2a6OJd3Qi1Q8sehhyP4x4JoXK4S5y6FzH2vgaJgiyEurzFxjUufGdMaw+RxtxiwD/uRndUgwaZ2JD8lg== + +esbuild@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.3.tgz#cc9fc347fc81ff6440cdd1fdb9fe65c02eddcc97" + integrity sha512-98xovMLKnyhv3gcReUuAEi5Ig1rK6SIgvsJuBIcfwzqGSEHsV8UJjMlmkhHoHMf9XZybMpE9Zax8AA8f7i2hlQ== + optionalDependencies: + esbuild-android-arm64 "0.13.3" + esbuild-darwin-64 "0.13.3" + esbuild-darwin-arm64 "0.13.3" + esbuild-freebsd-64 "0.13.3" + esbuild-freebsd-arm64 "0.13.3" + esbuild-linux-32 "0.13.3" + esbuild-linux-64 "0.13.3" + esbuild-linux-arm "0.13.3" + esbuild-linux-arm64 "0.13.3" + esbuild-linux-mips64le "0.13.3" + esbuild-linux-ppc64le "0.13.3" + esbuild-openbsd-64 "0.13.3" + esbuild-sunos-64 "0.13.3" + esbuild-windows-32 "0.13.3" + esbuild-windows-64 "0.13.3" + esbuild-windows-arm64 "0.13.3" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -5744,11 +5640,6 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - estree-walker@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" @@ -5902,13 +5793,6 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= - dependencies: - homedir-polyfill "^1.0.1" - express@^4.16.4: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -6036,16 +5920,6 @@ eyes@0.1.x: resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= -fancy-log@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" - integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== - dependencies: - ansi-gray "^0.1.1" - color-support "^1.1.3" - parse-node-version "^1.0.0" - time-stamp "^1.0.0" - fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" @@ -6072,11 +5946,6 @@ fast-json-stable-stringify@2.1.0, fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz#e6a754cc8f15e58987aa9cbd27af66fd6f4e5af9" - integrity sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk= - fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -6272,14 +6141,6 @@ finalhandler@1.1.2, finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - find-up@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -6310,37 +6171,6 @@ find-versions@^3.0.0: dependencies: semver-regex "^2.0.0" -findup-sync@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" - integrity sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= - dependencies: - detect-file "^1.0.0" - is-glob "^3.1.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" - -findup-sync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" - integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== - dependencies: - detect-file "^1.0.0" - is-glob "^4.0.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" - -fined@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" - integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== - dependencies: - expand-tilde "^2.0.2" - is-plain-object "^2.0.3" - object.defaults "^1.1.0" - object.pick "^1.2.0" - parse-filepath "^1.0.1" - firebase-tools@^9.2.1: version "9.16.0" resolved "https://registry.yarnpkg.com/firebase-tools/-/firebase-tools-9.16.0.tgz#e6a1f5bf5efeb8fd940612815bb3b28810fe63bc" @@ -6405,11 +6235,6 @@ firebase-tools@^9.2.1: winston-transport "^4.4.0" ws "^7.2.3" -flagged-respawn@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" - integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== - flat-arguments@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/flat-arguments/-/flat-arguments-1.0.2.tgz#9baa780adf0501f282d726c9c6a038dba44ea76f" @@ -6443,14 +6268,6 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== -flush-write-stream@^1.0.2: - 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.3" - readable-stream "^2.3.6" - fn.name@1.x.x: version "1.1.0" resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" @@ -6461,18 +6278,11 @@ follow-redirects@^1.0.0, follow-redirects@^1.10.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== -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@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" - integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= - dependencies: - for-in "^1.0.1" - foreground-child@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53" @@ -6604,14 +6414,6 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" -fs-mkdirp-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" - integrity sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes= - dependencies: - graceful-fs "^4.1.11" - through2 "^2.0.3" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -6625,7 +6427,7 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" -fsevents@~2.3.1, fsevents@~2.3.2: +fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -6707,11 +6509,6 @@ get-amd-module-type@^3.0.0: ast-module-types "^2.3.2" node-source-walk "^4.0.0" -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" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -6872,47 +6669,6 @@ glob-slasher@^1.0.1: lodash.isobject "^2.4.1" toxic "^1.0.0" -glob-stream@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" - integrity sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ= - dependencies: - extend "^3.0.0" - glob "^7.1.1" - glob-parent "^3.1.0" - is-negated-glob "^1.0.0" - ordered-read-streams "^1.0.0" - pumpify "^1.3.5" - readable-stream "^2.1.5" - remove-trailing-separator "^1.0.1" - to-absolute-glob "^2.0.0" - unique-stream "^2.0.2" - -glob-watcher@^5.0.3: - version "5.0.5" - resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.5.tgz#aa6bce648332924d9a8489be41e3e5c52d4186dc" - integrity sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw== - dependencies: - anymatch "^2.0.0" - async-done "^1.2.0" - chokidar "^2.0.0" - is-negated-glob "^1.0.0" - just-debounce "^1.0.0" - normalize-path "^3.0.0" - object.defaults "^1.1.0" - -glob@7.1.7, glob@^7.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, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - 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.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" @@ -6936,6 +6692,18 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.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, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + 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-agent@^2.1.12: version "2.2.0" resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.2.0.tgz#566331b0646e6bf79429a16877685c4a1fbf76dc" @@ -6963,15 +6731,6 @@ global-dirs@^3.0.0: dependencies: ini "2.0.0" -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - global-modules@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" @@ -6979,17 +6738,6 @@ global-modules@^2.0.0: dependencies: global-prefix "^3.0.0" -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - global-prefix@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" @@ -7040,13 +6788,6 @@ globjoin@^0.1.4: resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" integrity sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM= -glogg@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.2.tgz#2d7dd702beda22eb3bffadf880696da6d846313f" - integrity sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA== - dependencies: - sparkles "^1.0.0" - gonzales-pe@^4.2.3, gonzales-pe@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/gonzales-pe/-/gonzales-pe-4.3.0.tgz#fe9dec5f3c557eead09ff868c65826be54d067b3" @@ -7171,7 +6912,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6: +graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== @@ -7197,61 +6938,6 @@ gtoken@^5.0.4: google-p12-pem "^3.0.3" jws "^4.0.0" -gulp-cli@^2.2.0, gulp-cli@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.3.0.tgz#ec0d380e29e52aa45e47977f0d32e18fd161122f" - integrity sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A== - dependencies: - ansi-colors "^1.0.1" - archy "^1.0.0" - array-sort "^1.0.0" - color-support "^1.1.3" - concat-stream "^1.6.0" - copy-props "^2.0.1" - fancy-log "^1.3.2" - gulplog "^1.0.0" - interpret "^1.4.0" - isobject "^3.0.1" - liftoff "^3.1.0" - matchdep "^2.0.0" - mute-stdout "^1.0.0" - pretty-hrtime "^1.0.0" - replace-homedir "^1.0.0" - semver-greatest-satisfied-range "^1.1.0" - v8flags "^3.2.0" - yargs "^7.1.0" - -gulp-dart-sass@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/gulp-dart-sass/-/gulp-dart-sass-1.0.2.tgz#20e33c236b48d557c91e8dfe67a2aef2b8a2e328" - integrity sha512-8fLttA824mbuc0jRVlGs00zWYZXBckat6INawx5kp66Eqsz5srNWTA51t0mbfB4C8a/a/GZ9muYLwXGklgAHlw== - dependencies: - chalk "^2.3.0" - lodash.clonedeep "^4.3.2" - plugin-error "^1.0.1" - replace-ext "^1.0.0" - sass "^1.26.3" - strip-ansi "^4.0.0" - through2 "^2.0.0" - vinyl-sourcemaps-apply "^0.2.0" - -gulp@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" - integrity sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA== - dependencies: - glob-watcher "^5.0.3" - gulp-cli "^2.2.0" - undertaker "^1.2.1" - vinyl-fs "^3.0.0" - -gulplog@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" - integrity sha1-4oxNRdBey77YGDY86PnFkmIp/+U= - dependencies: - glogg "^1.0.0" - handlebars@^4.0.1, handlebars@^4.7.6: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -7472,13 +7158,6 @@ home-dir@^1.0.0: resolved "https://registry.yarnpkg.com/home-dir/-/home-dir-1.0.0.tgz#2917eb44bdc9072ceda942579543847e3017fe4e" integrity sha1-KRfrRL3JByztqUJXlUOEfjAX/k4= -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -7779,7 +7458,7 @@ install-artifact-from-github@^1.2.0: resolved "https://registry.yarnpkg.com/install-artifact-from-github/-/install-artifact-from-github-1.2.0.tgz#adcbd123c16a4337ec44ea76d0ebf253cc16b074" integrity sha512-3OxCPcY55XlVM3kkfIpeCgmoSKnMsz2A3Dbhsq0RXpIknKQmrX1YiznCeW9cD2ItFmDxziA3w6Eg8d80AoL3oA== -interpret@^1.0.0, interpret@^1.4.0: +interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== @@ -7792,11 +7471,6 @@ into-stream@^3.1.0: from2 "^2.1.1" p-is-promise "^1.1.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= - ip-regex@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" @@ -7812,14 +7486,6 @@ ipaddr.js@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@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" - integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== - dependencies: - is-relative "^1.0.0" - is-windows "^1.0.1" - is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -8033,11 +7699,6 @@ is-natural-number@^4.0.1: resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= -is-negated-glob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" - integrity sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= - is-npm@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d" @@ -8062,11 +7723,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" @@ -8121,7 +7777,7 @@ is-plain-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== -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== @@ -8138,7 +7794,7 @@ is-promise@^2.2.2: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== -is-reference@^1.1.2, is-reference@^1.2.1: +is-reference@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== @@ -8160,13 +7816,6 @@ is-relative-path@^1.0.2: resolved "https://registry.yarnpkg.com/is-relative-path/-/is-relative-path-1.0.2.tgz#091b46a0d67c1ed0fe85f1f8cfdde006bb251d46" integrity sha1-CRtGoNZ8HtD+hfH4z93gBrslHUY= -is-relative@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" - integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== - dependencies: - is-unc-path "^1.0.0" - is-retry-allowed@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" @@ -8204,13 +7853,6 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-unc-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" - integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== - dependencies: - unc-path-regex "^0.1.2" - is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" @@ -8228,17 +7870,7 @@ is-url@^1.2.2, is-url@^1.2.4: resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== -is-utf8@^0.2.0, is-utf8@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-valid-glob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" - integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= - -is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -8513,11 +8145,6 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -8599,11 +8226,6 @@ jszip@^3.1.3: readable-stream "~2.3.6" set-immediate-shim "~1.0.1" -just-debounce@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.1.0.tgz#2f81a3ad4121a76bc7cb45dbf704c0d76a8e5ddf" - integrity sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ== - jwa@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" @@ -8770,7 +8392,7 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0, kind-of@^5.0.2: +kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== @@ -8795,14 +8417,6 @@ kuler@^2.0.0: resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== -last-run@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/last-run/-/last-run-1.1.1.tgz#45b96942c17b1c79c772198259ba943bebf8ca5b" - integrity sha1-RblpQsF7HHnHchmCWbqUO+v4yls= - dependencies: - default-resolution "^2.0.0" - es6-weak-map "^2.0.1" - latest-version@^5.0.0, latest-version@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" @@ -8817,20 +8431,6 @@ lazystream@^1.0.0: dependencies: readable-stream "^2.0.5" -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" - -lead@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" - integrity sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI= - dependencies: - flush-write-stream "^1.0.2" - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -8851,20 +8451,6 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" -liftoff@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3" - integrity sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog== - dependencies: - extend "^3.0.0" - findup-sync "^3.0.0" - fined "^1.0.1" - flagged-respawn "^1.0.0" - is-plain-object "^2.0.4" - object.map "^1.0.0" - rechoir "^0.6.2" - resolve "^1.1.7" - lighthouse-logger@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.3.0.tgz#ba6303e739307c4eee18f08249524e7dafd510db" @@ -8888,17 +8474,6 @@ listenercount@~1.0.1: resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" integrity sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc= -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" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -8963,7 +8538,7 @@ lodash.camelcase@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= -lodash.clonedeep@^4.3.2, lodash.clonedeep@^4.5.0: +lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= @@ -9269,7 +8844,7 @@ madge@^4.0.0: typescript "^3.9.5" walkdir "^0.4.1" -magic-string@0.25.7, magic-string@^0.25.0, magic-string@^0.25.2, magic-string@^0.25.7: +magic-string@0.25.7, magic-string@^0.25.0, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== @@ -9316,14 +8891,7 @@ make-fetch-happen@^8.0.14: socks-proxy-agent "^5.0.0" ssri "^8.0.0" -make-iterator@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" - integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== - dependencies: - kind-of "^6.0.2" - -map-cache@^0.2.0, map-cache@^0.2.2: +map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= @@ -9377,16 +8945,6 @@ marky@^1.2.2: resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.2.tgz#4456765b4de307a13d263a69b0c79bf226e68323" integrity sha512-k1dB2HNeaNyORco8ulVEhctyEGkKHb2YWAhDsxeFlW2nROIirsctBYzKwwS3Vza+sKTS1zO4Z+n9/+9WbGLIxQ== -matchdep@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-2.0.0.tgz#c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e" - integrity sha1-xvNINKDY28OzfCfui7yyfHd1WC4= - dependencies: - findup-sync "^2.0.0" - micromatch "^3.0.4" - resolve "^1.4.0" - stack-trace "0.0.10" - matcher@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" @@ -9575,7 +9133,7 @@ micromark@~2.11.0: debug "^4.0.0" parse-entities "^2.0.0" -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: +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== @@ -9855,11 +9413,6 @@ multimatch@^5.0.0: arrify "^2.0.1" minimatch "^3.0.4" -mute-stdout@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.1.tgz#acb0300eb4de23a7ddeec014e3e96044b3472331" - integrity sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg== - mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -10082,13 +9635,6 @@ normalize-url@^6.0.1: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== -now-and-later@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" - integrity sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ== - dependencies: - once "^1.3.2" - npm-conf@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" @@ -10167,7 +9713,7 @@ object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== -object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.0.12: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -10179,49 +9725,13 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.0.4, object.assign@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.defaults@^1.0.0, object.defaults@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" - integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= - dependencies: - array-each "^1.0.1" - array-slice "^1.0.0" - for-own "^1.0.0" - isobject "^3.0.0" - -object.map@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" - integrity sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= - dependencies: - for-own "^1.0.0" - make-iterator "^1.0.0" - -object.pick@^1.2.0, object.pick@^1.3.0: +object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" -object.reduce@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad" - integrity sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60= - dependencies: - for-own "^1.0.0" - make-iterator "^1.0.0" - objectdiff@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/objectdiff/-/objectdiff-1.1.0.tgz#8d7a15be6cb8670df8a490cc6be12a4f05ea82f4" @@ -10239,7 +9749,7 @@ on-headers@^1.0.0, on-headers@~1.0.2: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -10340,13 +9850,6 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" -ordered-read-streams@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" - integrity sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4= - dependencies: - readable-stream "^2.0.1" - os-filter-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-2.0.0.tgz#1c0b62d5f3a2442749a2d139e6dddee6e81d8d16" @@ -10354,13 +9857,6 @@ os-filter-obj@^2.0.0: dependencies: arch "^2.1.0" -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -10542,22 +10038,6 @@ parse-entities@^2.0.0: is-decimal "^1.0.0" is-hexadecimal "^1.0.0" -parse-filepath@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" - integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= - dependencies: - is-absolute "^1.0.0" - map-cache "^0.2.0" - path-root "^0.1.1" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -10581,16 +10061,6 @@ parse-ms@^2.1.0: resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-2.1.0.tgz#348565a753d4391fa524029956b172cb7753097d" integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA== -parse-node-version@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" - integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= - parse5@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" @@ -10671,13 +10141,6 @@ path-dirname@^1.0.0: resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -10713,18 +10176,6 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-root-regex@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" - integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= - -path-root@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" - integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= - dependencies: - path-root-regex "^0.1.0" - path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -10737,15 +10188,6 @@ path-to-regexp@^1.8.0: dependencies: isarray "0.0.1" -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -10814,16 +10256,6 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -plugin-error@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c" - integrity sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA== - dependencies: - ansi-colors "^1.0.1" - arr-diff "^4.0.0" - arr-union "^3.1.0" - extend-shallow "^3.0.2" - pluralize@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" @@ -10995,11 +10427,6 @@ prettier@^2.3.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== -pretty-hrtime@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" - integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= - pretty-ms@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-7.0.1.tgz#7d903eaab281f7d8e03c66f867e239dc32fb73e8" @@ -11012,16 +10439,16 @@ printj@~1.1.0: resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== -process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: - 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-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.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== + progress@^2.0.1, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -11173,14 +10600,6 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -11189,15 +10608,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.5: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - punycode@^1.3.2: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" @@ -11338,14 +10748,6 @@ re2@^1.15.8: nan "^2.14.2" node-gyp "^8.0.0" -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" @@ -11363,15 +10765,6 @@ read-pkg-up@^7.0.1: read-pkg "^5.2.0" type-fest "^0.8.1" -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -11410,7 +10803,7 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.1.1, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, 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.5, readable-stream@^2.3.6, readable-stream@^2.3.7, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@^2.3.7, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -11556,24 +10949,7 @@ remark@^13.0.0: remark-stringify "^9.0.0" unified "^9.1.0" -remove-bom-buffer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" - integrity sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ== - dependencies: - is-buffer "^1.1.5" - is-utf8 "^0.2.1" - -remove-bom-stream@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523" - integrity sha1-BfGlk/FuQuH7kOv1nejlaVJflSM= - dependencies: - remove-bom-buffer "^3.0.0" - safe-buffer "^5.1.0" - through2 "^2.0.3" - -remove-trailing-separator@^1.0.1, remove-trailing-separator@^1.1.0: +remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= @@ -11593,20 +10969,6 @@ replace-ext@1.0.0: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= -replace-ext@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" - integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== - -replace-homedir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-homedir/-/replace-homedir-1.0.0.tgz#e87f6d513b928dde808260c12be7fec6ff6e798c" - integrity sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw= - dependencies: - homedir-polyfill "^1.0.1" - is-absolute "^1.0.0" - remove-trailing-separator "^1.1.0" - request@^2.87.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -11643,11 +11005,6 @@ require-from-string@^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" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -11681,14 +11038,6 @@ resolve-dependency-path@^2.0.0: resolved "https://registry.yarnpkg.com/resolve-dependency-path/-/resolve-dependency-path-2.0.0.tgz#11700e340717b865d216c66cabeb4a2a3c696736" integrity sha512-DIgu+0Dv+6v2XwRaNWnumKu7GPufBBOr5I1gRPJHkvghrfCGOooJODFvgFimX/KRxk9j0whD2MnKHzM1jYvk9w== -resolve-dir@^1.0.0, resolve-dir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -11699,13 +11048,6 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve-options@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" - integrity sha1-MrueOcBtZzONyTeMDW1gdFZq0TE= - dependencies: - value-or-function "^3.0.0" - resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -11716,7 +11058,7 @@ resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2, resolve@^1.4.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2, resolve@^1.4.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -11850,35 +11192,6 @@ roarr@^2.15.3: semver-compare "^1.0.0" sprintf-js "^1.1.2" -rollup-plugin-alias@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-alias/-/rollup-plugin-alias-2.2.0.tgz#5004a2bc542a2eebb45b5a0fff8c6f540439decc" - integrity sha512-9ZK410qeFed4gGrHoojBpxLsHF74vPgsheGg9JRW5RbALAxqdvJbd357mSqWBqUrBfRVnZnNUXTZdYLxxQEA5A== - dependencies: - slash "^3.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== - dependencies: - estree-walker "^0.6.1" - is-reference "^1.1.2" - magic-string "^0.25.2" - resolve "^1.11.0" - rollup-pluginutils "^2.8.1" - -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== - dependencies: - "@types/resolve" "0.0.8" - builtin-modules "^3.1.0" - is-module "^1.0.0" - resolve "^1.11.1" - rollup-pluginutils "^2.8.1" - rollup-plugin-sourcemaps@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed" @@ -11887,13 +11200,6 @@ rollup-plugin-sourcemaps@^0.6.3: "@rollup/pluginutils" "^3.0.9" source-map-resolve "^0.6.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@2.57.0: version "2.57.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.57.0.tgz#c1694475eb22e1022477c0f4635fd0ac80713173" @@ -11901,12 +11207,12 @@ rollup@2.57.0: optionalDependencies: fsevents "~2.3.2" -rollup@~2.42.2: - version "2.42.4" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.42.4.tgz#97c910a48bd0db6aaa4271dd48745870cbbbf970" - integrity sha512-Zqv3EvNfcllBHyyEUM754npqsZw82VIjK34cDQMwrQ1d6aqxzeYu5yFb7smGkPU4C1Bj7HupIMeT6WU7uIdnMw== +rollup@^2.58.0: + version "2.58.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.58.0.tgz#a643983365e7bf7f5b7c62a8331b983b7c4c67fb" + integrity sha512-NOXpusKnaRpbS7ZVSzcEXqxcLDOagN6iFS8p45RkoiMqPHDLwJm758UF05KlMoCRbLBTZsPOIa887gZJ1AiXvw== optionalDependencies: - fsevents "~2.3.1" + fsevents "~2.3.2" router@^1.3.1: version "1.3.5" @@ -11996,7 +11302,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -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.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -12020,7 +11326,7 @@ sass-lookup@^3.0.0: dependencies: commander "^2.16.0" -sass@^1.26.3, sass@^1.41.0: +sass@^1.41.0: version "1.41.1" resolved "https://registry.yarnpkg.com/sass/-/sass-1.41.1.tgz#bca5bed2154192779c29f48fca9c644c60c38d98" integrity sha512-vIjX7izRxw3Wsiez7SX7D+j76v7tenfO18P59nonjr/nzCkZuoHuF7I/Fo0ZRZPKr88v29ivIdE9BqGDgQD/Nw== @@ -12098,13 +11404,6 @@ semver-dsl@^1.0.1: dependencies: semver "^5.3.0" -semver-greatest-satisfied-range@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" - integrity sha1-E+jCZYq5aRywzXEJMkAoDTb3els= - dependencies: - sver-compat "^1.5.0" - semver-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" @@ -12576,7 +11875,7 @@ source-map@0.7.3, source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -12603,11 +11902,6 @@ space-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899" integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA== -sparkles@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c" - integrity sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw== - spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -12704,7 +11998,7 @@ ssri@^8.0.0, ssri@^8.0.1: dependencies: minipass "^3.1.1" -stack-trace@0.0.10, stack-trace@0.0.x: +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= @@ -12739,11 +12033,6 @@ stream-combiner@~0.0.4: dependencies: duplexer "~0.1.1" -stream-exhaust@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" - integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw== - stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" @@ -12785,7 +12074,7 @@ string-length@^1.0.0: dependencies: strip-ansi "^3.0.0" -string-width@^1.0.1, string-width@^1.0.2: +string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= @@ -12892,13 +12181,6 @@ strip-ansi@^6.0.0: 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" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -13087,14 +12369,6 @@ supports-hyperlinks@^1.0.1: has-flag "^2.0.0" supports-color "^5.0.0" -sver-compat@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" - integrity sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= - dependencies: - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - svg-tags@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" @@ -13113,13 +12387,6 @@ symbol-observable@1.0.1: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= -systemjs@0.19.43: - version "0.19.43" - resolved "https://registry.yarnpkg.com/systemjs/-/systemjs-0.19.43.tgz#9902ce5bdaaba03413575902c6bb18bad2ddab8e" - integrity sha1-mQLOW9qroDQTV1kCxrsYutLdq44= - dependencies: - when "^3.7.5" - table@^6.6.0: version "6.7.1" resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" @@ -13257,14 +12524,6 @@ tfunk@^4.0.0: chalk "^1.1.3" dlv "^1.1.3" -through2-filter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" - integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== - dependencies: - through2 "~2.0.0" - xtend "~4.0.0" - through2@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.1.tgz#384e75314d49f32de12eebb8136b8eb6b5d59da9" @@ -13273,7 +12532,7 @@ through2@2.0.1: readable-stream "~2.0.0" xtend "~4.0.0" -through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: +through2@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -13293,11 +12552,6 @@ through@2, "through@>=2.2.7 <3", through@X.X.X, through@^2.3.6, through@^2.3.8, resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -time-stamp@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" - integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= - timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" @@ -13338,14 +12592,6 @@ tmp@0.0.33, tmp@0.0.x, tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -to-absolute-glob@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" - integrity sha1-GGX0PZ50sIItufFFt4z/fQ98hJs= - dependencies: - is-absolute "^1.0.0" - is-negated-glob "^1.0.0" - to-array@0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" @@ -13398,13 +12644,6 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -to-through@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6" - integrity sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY= - dependencies: - through2 "^2.0.3" - toidentifier@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" @@ -13655,12 +12894,7 @@ typedarray-to-buffer@^3.1.5: 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" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -typescript@4.3.5, typescript@~4.3.5: +typescript@4.3.5: version "4.3.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== @@ -13670,16 +12904,16 @@ typescript@4.4.2, typescript@^3.2.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== +typescript@4.4.3, typescript@~4.4.0, typescript@~4.4.2: + version "4.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324" + integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA== + typescript@^3.9.5, typescript@^3.9.7: version "3.9.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -typescript@~4.4.0, typescript@~4.4.2: - version "4.4.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324" - integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA== - ua-parser-js@^0.7.18, ua-parser-js@^0.7.21: version "0.7.28" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.28.tgz#8ba04e653f35ce210239c64661685bf9121dec31" @@ -13703,32 +12937,6 @@ unbzip2-stream@^1.0.9, unbzip2-stream@^1.3.3: buffer "^5.2.1" through "^2.3.8" -unc-path-regex@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" - integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= - -undertaker-registry@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" - integrity sha1-XkvaMI5KiirlhPm5pDWaSZglzFA= - -undertaker@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/undertaker/-/undertaker-1.3.0.tgz#363a6e541f27954d5791d6fa3c1d321666f86d18" - integrity sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg== - dependencies: - arr-flatten "^1.0.1" - arr-map "^2.0.0" - bach "^1.0.0" - collection-map "^1.0.0" - es6-weak-map "^2.0.1" - fast-levenshtein "^1.0.0" - last-run "^1.1.0" - object.defaults "^1.0.0" - object.reduce "^1.0.0" - undertaker-registry "^1.0.0" - unified@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/unified/-/unified-7.1.0.tgz#5032f1c1ee3364bd09da12e27fdd4a7553c7be13" @@ -13784,14 +12992,6 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" -unique-stream@^2.0.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac" - integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== - dependencies: - json-stable-stringify-without-jsonify "^1.0.1" - through2-filter "^3.0.0" - unique-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" @@ -14049,13 +13249,6 @@ v8-to-istanbul@^7.1.0: convert-source-map "^1.6.0" source-map "^0.7.3" -v8flags@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656" - integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg== - dependencies: - homedir-polyfill "^1.0.1" - valid-url@^1: version "1.0.9" resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" @@ -14079,11 +13272,6 @@ validator@^8.0.0: resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9" integrity sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA== -value-or-function@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" - integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= - vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -14141,61 +13329,6 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" -vinyl-fs@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" - integrity sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng== - dependencies: - fs-mkdirp-stream "^1.0.0" - glob-stream "^6.1.0" - graceful-fs "^4.0.0" - is-valid-glob "^1.0.0" - lazystream "^1.0.0" - lead "^1.0.0" - object.assign "^4.0.4" - pumpify "^1.3.5" - readable-stream "^2.3.3" - remove-bom-buffer "^3.0.0" - remove-bom-stream "^1.2.0" - resolve-options "^1.1.0" - through2 "^2.0.0" - to-through "^2.0.0" - value-or-function "^3.0.0" - vinyl "^2.0.0" - vinyl-sourcemap "^1.1.0" - -vinyl-sourcemap@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" - integrity sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY= - dependencies: - append-buffer "^1.0.2" - convert-source-map "^1.5.0" - graceful-fs "^4.1.6" - normalize-path "^2.1.1" - now-and-later "^2.0.0" - remove-bom-buffer "^3.0.0" - vinyl "^2.0.0" - -vinyl-sourcemaps-apply@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" - integrity sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU= - dependencies: - source-map "^0.5.1" - -vinyl@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz#23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974" - integrity sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw== - dependencies: - clone "^2.1.1" - clone-buffer "^1.0.0" - clone-stats "^1.0.0" - cloneable-readable "^1.0.0" - remove-trailing-separator "^1.0.1" - replace-ext "^1.0.0" - void-elements@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" @@ -14289,22 +13422,12 @@ webdriverio@^6.7.0: serialize-error "^8.0.0" webdriver "6.12.1" -when@^3.7.5: - version "3.7.8" - resolved "https://registry.yarnpkg.com/when/-/when-3.7.8.tgz#c7130b6a7ea04693e842cdc9e7a1f2aa39a39f82" - integrity sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I= - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@^1.1.1, which@^1.2.1, which@^1.2.14, which@^1.2.9, which@^1.3.1: +which@^1.1.1, which@^1.2.1, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -14382,14 +13505,6 @@ wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -14495,11 +13610,6 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" - integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== - y18n@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" @@ -14543,14 +13653,6 @@ yargs-parser@^20.0.0, yargs-parser@^20.2.2, yargs-parser@^20.2.3: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.1.tgz#7ede329c1d8cdbbe209bd25cdb990e9b1ebbb394" - integrity sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA== - dependencies: - camelcase "^3.0.0" - object.assign "^4.1.0" - yargs@16.2.0, yargs@^16.0.0, yargs@^16.0.3, yargs@^16.1.1, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" @@ -14594,24 +13696,18 @@ yargs@^17.0.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^7.1.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.2.tgz#63a0a5d42143879fdbb30370741374e0641d55db" - integrity sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA== - dependencies: - 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" +yargs@^17.2.1: + version "17.2.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea" + integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" 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.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" yauzl@^2.10.0, yauzl@^2.4.2: version "2.10.0" From 652f5fbf51f6f5460416083a86911816031b9557 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:18:58 +0200 Subject: [PATCH 02/21] refactor: privately expose types needed for mixins to avoid broken type definitions Since we updated the TypeScript module and target to ES2020/ESNext for both devmode and prodmode output, tbe type definition files will no longer get the AMD naming patches from `@bazel/typescript`. These previously ensured that with `module: "umd"`, TypeScript never can generate relatie imports, but rather uses AMD module names. The removal of this logic now breaks the type definition output because there is code in `@angular/material-experimental` which imports from Angular Material core in a way where TypeScript would try to write an inferred type into the `d.ts` out. This results in a deep import right now because some of the symbols used for the inferred type are not publicly exposed. This commit exposes them privately so that TS can avoid deep imports. The goldens have been updated accordingly. The deep imports can be observed there as well. --- scripts/check-mdc-exports.ts | 15 +++++-------- .../mdc-core/public-api.ts | 8 ++++++- src/material/core/common-behaviors/index.ts | 10 +++++++++ .../public_api_guard/material/autocomplete.md | 4 ++-- tools/public_api_guard/material/badge.md | 4 ++-- .../material/button-toggle.md | 4 ++-- tools/public_api_guard/material/button.md | 4 ++-- tools/public_api_guard/material/checkbox.md | 4 ++-- tools/public_api_guard/material/chips.md | 4 ++-- tools/public_api_guard/material/core.md | 22 ++++++++++++------- tools/public_api_guard/material/datepicker.md | 4 ++-- .../material/dialog-testing.md | 10 ++++++--- tools/public_api_guard/material/expansion.md | 4 ++-- tools/public_api_guard/material/form-field.md | 4 ++-- tools/public_api_guard/material/icon.md | 4 ++-- tools/public_api_guard/material/input.md | 4 ++-- tools/public_api_guard/material/list.md | 4 ++-- tools/public_api_guard/material/menu.md | 4 ++-- tools/public_api_guard/material/paginator.md | 4 ++-- .../public_api_guard/material/progress-bar.md | 4 ++-- .../material/progress-spinner.md | 4 ++-- tools/public_api_guard/material/radio.md | 4 ++-- tools/public_api_guard/material/select.md | 4 ++-- .../public_api_guard/material/slide-toggle.md | 4 ++-- tools/public_api_guard/material/slider.md | 4 ++-- tools/public_api_guard/material/sort.md | 4 ++-- tools/public_api_guard/material/stepper.md | 4 ++-- tools/public_api_guard/material/tabs.md | 4 ++-- tools/public_api_guard/material/toolbar.md | 4 ++-- tools/public_api_guard/material/tree.md | 4 ++-- 30 files changed, 93 insertions(+), 72 deletions(-) diff --git a/scripts/check-mdc-exports.ts b/scripts/check-mdc-exports.ts index e386c8f75d59..46bef5ef0e9b 100644 --- a/scripts/check-mdc-exports.ts +++ b/scripts/check-mdc-exports.ts @@ -86,16 +86,11 @@ function getExports(name: string): string[] { const typeChecker = program.getTypeChecker(); const mainSymbol = typeChecker.getSymbolAtLocation(sourceFile); - return (mainSymbol ? (typeChecker.getExportsOfModule(mainSymbol) || []) : []).map(symbol => { - // tslint:disable-next-line:no-bitwise - if (symbol.flags & ts.SymbolFlags.Alias) { - const resolvedSymbol = typeChecker.getAliasedSymbol(symbol); - return (!resolvedSymbol.valueDeclaration && !resolvedSymbol.declarations) ? - symbol : resolvedSymbol; - } else { - return symbol; - } - }).map(symbol => symbol.name); + if (mainSymbol === undefined) { + return []; + } + + return typeChecker.getExportsOfModule(mainSymbol).map(symbol => symbol.name); } /** Checks whether a particular Material package has an MDC-based equivalent. */ diff --git a/src/material-experimental/mdc-core/public-api.ts b/src/material-experimental/mdc-core/public-api.ts index 535eac440f71..00cbeab3a498 100644 --- a/src/material-experimental/mdc-core/public-api.ts +++ b/src/material-experimental/mdc-core/public-api.ts @@ -56,5 +56,11 @@ export { setLines, ShowOnDirtyErrorStateMatcher, ThemePalette, - VERSION + VERSION, + // Note: These need to be exposed privately for cross-package type inference. e.g. if the + // experimental package uses a mixin, TS will try to write an explicit type reference that + // is equivalent to e.g. `CanColorCtor`. For this it needs these two helpers as otherwise it + // would generate a deep cross-package import that breaks in the NPM package output. + _AbstractConstructor, + _Constructor, } from '@angular/material/core'; diff --git a/src/material/core/common-behaviors/index.ts b/src/material/core/common-behaviors/index.ts index 7f708f4a7ea9..9c34837231a6 100644 --- a/src/material/core/common-behaviors/index.ts +++ b/src/material/core/common-behaviors/index.ts @@ -12,6 +12,16 @@ export { SanityChecks, GranularSanityChecks, } from './common-module'; + +// Note: These need to be exposed privately for cross-package type inference. e.g. if the +// experimental package uses a mixin, TS will try to write an explicit type reference that +// is equivalent to e.g. `CanColorCtor`. For this it needs these two helpers as otherwise it +// would generate a deep cross-package import that breaks in the NPM package output. +export { + Constructor as _Constructor, + AbstractConstructor as _AbstractConstructor +} from './constructor'; + export {CanDisable, mixinDisabled} from './disabled'; export {CanColor, mixinColor, ThemePalette} from './color'; export {CanDisableRipple, mixinDisableRipple} from './disable-ripple'; diff --git a/tools/public_api_guard/material/autocomplete.md b/tools/public_api_guard/material/autocomplete.md index 8c2ac67f7583..58247525df07 100644 --- a/tools/public_api_guard/material/autocomplete.md +++ b/tools/public_api_guard/material/autocomplete.md @@ -4,14 +4,14 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { ActiveDescendantKeyManager } from '@angular/cdk/a11y'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanDisableRipple } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; diff --git a/tools/public_api_guard/material/badge.md b/tools/public_api_guard/material/badge.md index 237b86dcc659..bad1bf772b06 100644 --- a/tools/public_api_guard/material/badge.md +++ b/tools/public_api_guard/material/badge.md @@ -4,11 +4,11 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AriaDescriber } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanDisable } from '@angular/material/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; import * as i2 from '@angular/cdk/a11y'; diff --git a/tools/public_api_guard/material/button-toggle.md b/tools/public_api_guard/material/button-toggle.md index ef0f51e59746..b2eef59e072c 100644 --- a/tools/public_api_guard/material/button-toggle.md +++ b/tools/public_api_guard/material/button-toggle.md @@ -4,13 +4,13 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanDisableRipple } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; diff --git a/tools/public_api_guard/material/button.md b/tools/public_api_guard/material/button.md index 696bc0271994..dc1c58c50c36 100644 --- a/tools/public_api_guard/material/button.md +++ b/tools/public_api_guard/material/button.md @@ -4,13 +4,13 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterViewInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanColor } from '@angular/material/core'; import { CanDisable } from '@angular/material/core'; import { CanDisableRipple } from '@angular/material/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ElementRef } from '@angular/core'; import { FocusableOption } from '@angular/cdk/a11y'; import { FocusMonitor } from '@angular/cdk/a11y'; diff --git a/tools/public_api_guard/material/checkbox.md b/tools/public_api_guard/material/checkbox.md index 63891a537908..aec9306393a2 100644 --- a/tools/public_api_guard/material/checkbox.md +++ b/tools/public_api_guard/material/checkbox.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterViewChecked } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; @@ -13,7 +13,7 @@ import { CanDisable } from '@angular/material/core'; import { CanDisableRipple } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; import { CheckboxRequiredValidator } from '@angular/forms'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; diff --git a/tools/public_api_guard/material/chips.md b/tools/public_api_guard/material/chips.md index d630f0e0fba3..73fa7666a701 100644 --- a/tools/public_api_guard/material/chips.md +++ b/tools/public_api_guard/material/chips.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanColor } from '@angular/material/core'; @@ -12,7 +12,7 @@ import { CanDisable } from '@angular/material/core'; import { CanDisableRipple } from '@angular/material/core'; import { CanUpdateErrorState } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { Directionality } from '@angular/cdk/bidi'; import { DoCheck } from '@angular/core'; diff --git a/tools/public_api_guard/material/core.md b/tools/public_api_guard/material/core.md index c14027952212..a61ffd5ebf99 100644 --- a/tools/public_api_guard/material/core.md +++ b/tools/public_api_guard/material/core.md @@ -4,11 +4,11 @@ ```ts -import { AbstractConstructor as AbstractConstructor_2 } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor as _AbstractConstructor_2 } from '@angular/material/core'; import { AfterViewChecked } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor as Constructor_2 } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor as _Constructor_2 } from '@angular/material/core'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; import { FocusableOption } from '@angular/cdk/a11y'; @@ -33,6 +33,9 @@ import { QueryList } from '@angular/core'; import { Subject } from 'rxjs'; import { Version } from '@angular/core'; +// @public +export type _AbstractConstructor = abstract new (...args: any[]) => T; + // @public export class AnimationCurves { // (undocumented) @@ -79,6 +82,9 @@ export interface CanUpdateErrorState { updateErrorState(): void; } +// @public +export type _Constructor = new (...args: any[]) => T; + // @public export function _countGroupLabelsBeforeOption(optionIndex: number, options: QueryList, optionGroups: QueryList): number; @@ -404,22 +410,22 @@ export class MatRippleModule { } // @public -export function mixinColor>(base: T, defaultColor?: ThemePalette): CanColorCtor & T; +export function mixinColor>(base: T, defaultColor?: ThemePalette): CanColorCtor & T; // @public -export function mixinDisabled>(base: T): CanDisableCtor & T; +export function mixinDisabled>(base: T): CanDisableCtor & T; // @public -export function mixinDisableRipple>(base: T): CanDisableRippleCtor & T; +export function mixinDisableRipple>(base: T): CanDisableRippleCtor & T; // @public -export function mixinErrorState>(base: T): CanUpdateErrorStateCtor & T; +export function mixinErrorState>(base: T): CanUpdateErrorStateCtor & T; // @public -export function mixinInitialized>(base: T): HasInitializedCtor & T; +export function mixinInitialized>(base: T): HasInitializedCtor & T; // @public -export function mixinTabIndex>(base: T, defaultTabIndex?: number): HasTabIndexCtor & T; +export function mixinTabIndex>(base: T, defaultTabIndex?: number): HasTabIndexCtor & T; // @public export class NativeDateAdapter extends DateAdapter { diff --git a/tools/public_api_guard/material/datepicker.md b/tools/public_api_guard/material/datepicker.md index da6a7b6ef509..510ea0ec7719 100644 --- a/tools/public_api_guard/material/datepicker.md +++ b/tools/public_api_guard/material/datepicker.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AbstractControl } from '@angular/forms'; import { AfterContentInit } from '@angular/core'; import { AfterViewChecked } from '@angular/core'; @@ -15,7 +15,7 @@ import { CanColor } from '@angular/material/core'; import { CanUpdateErrorState } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; import { ComponentType } from '@angular/cdk/portal'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlContainer } from '@angular/forms'; import { ControlValueAccessor } from '@angular/forms'; import { DateAdapter } from '@angular/material/core'; diff --git a/tools/public_api_guard/material/dialog-testing.md b/tools/public_api_guard/material/dialog-testing.md index 445a0a2cf600..f89983e0dc28 100644 --- a/tools/public_api_guard/material/dialog-testing.md +++ b/tools/public_api_guard/material/dialog-testing.md @@ -16,7 +16,13 @@ export interface DialogHarnessFilters extends BaseHarnessFilters { } // @public -export class MatDialogHarness extends ContentContainerComponentHarness { +export class MatDialogHarness extends _MatDialogHarnessBase { + static hostSelector: string; + static with(options?: DialogHarnessFilters): HarnessPredicate; +} + +// @public +export class _MatDialogHarnessBase extends ContentContainerComponentHarness { // (undocumented) protected _actions: AsyncFactoryFn; close(): Promise; @@ -31,10 +37,8 @@ export class MatDialogHarness extends ContentContainerComponentHarness; getText(): Promise; getTitleText(): Promise; - static hostSelector: string; // (undocumented) protected _title: AsyncFactoryFn; - static with(options?: DialogHarnessFilters): HarnessPredicate; } // @public diff --git a/tools/public_api_guard/material/expansion.md b/tools/public_api_guard/material/expansion.md index b0ee666fae7c..b6bfc69a8c95 100644 --- a/tools/public_api_guard/material/expansion.md +++ b/tools/public_api_guard/material/expansion.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import { AnimationEvent as AnimationEvent_2 } from '@angular/animations'; @@ -13,7 +13,7 @@ import { BooleanInput } from '@angular/cdk/coercion'; import { CdkAccordion } from '@angular/cdk/accordion'; import { CdkAccordionItem } from '@angular/cdk/accordion'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; import { FocusableOption } from '@angular/cdk/a11y'; diff --git a/tools/public_api_guard/material/form-field.md b/tools/public_api_guard/material/form-field.md index b7e9b03e87b3..23c7f37adcc1 100644 --- a/tools/public_api_guard/material/form-field.md +++ b/tools/public_api_guard/material/form-field.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentChecked } from '@angular/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; @@ -12,7 +12,7 @@ import { AnimationTriggerMetadata } from '@angular/animations'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanColor } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; diff --git a/tools/public_api_guard/material/icon.md b/tools/public_api_guard/material/icon.md index c9a1b60da8a0..4d3b8960d9d5 100644 --- a/tools/public_api_guard/material/icon.md +++ b/tools/public_api_guard/material/icon.md @@ -4,11 +4,11 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterViewChecked } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanColor } from '@angular/material/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { DomSanitizer } from '@angular/platform-browser'; import { ElementRef } from '@angular/core'; import { ErrorHandler } from '@angular/core'; diff --git a/tools/public_api_guard/material/input.md b/tools/public_api_guard/material/input.md index c6268b78b75d..38dd2bf0c2bd 100644 --- a/tools/public_api_guard/material/input.md +++ b/tools/public_api_guard/material/input.md @@ -4,12 +4,12 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterViewInit } from '@angular/core'; import { AutofillMonitor } from '@angular/cdk/text-field'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanUpdateErrorState } from '@angular/material/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { DoCheck } from '@angular/core'; import { ElementRef } from '@angular/core'; import { ErrorStateMatcher } from '@angular/material/core'; diff --git a/tools/public_api_guard/material/list.md b/tools/public_api_guard/material/list.md index c5a22401f69f..0cdc0a53b757 100644 --- a/tools/public_api_guard/material/list.md +++ b/tools/public_api_guard/material/list.md @@ -4,13 +4,13 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanDisable } from '@angular/material/core'; import { CanDisableRipple } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; diff --git a/tools/public_api_guard/material/menu.md b/tools/public_api_guard/material/menu.md index 0667b186b12a..2a53f47f5303 100644 --- a/tools/public_api_guard/material/menu.md +++ b/tools/public_api_guard/material/menu.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import { AnimationEvent as AnimationEvent_2 } from '@angular/animations'; @@ -15,7 +15,7 @@ import { CanDisable } from '@angular/material/core'; import { CanDisableRipple } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; import { ComponentFactoryResolver } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { Direction } from '@angular/cdk/bidi'; import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; diff --git a/tools/public_api_guard/material/paginator.md b/tools/public_api_guard/material/paginator.md index a1e5c27746e3..dc4c11c3c4e0 100644 --- a/tools/public_api_guard/material/paginator.md +++ b/tools/public_api_guard/material/paginator.md @@ -4,11 +4,11 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanDisable } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { EventEmitter } from '@angular/core'; import { HasInitialized } from '@angular/material/core'; import * as i0 from '@angular/core'; diff --git a/tools/public_api_guard/material/progress-bar.md b/tools/public_api_guard/material/progress-bar.md index e24b692b70b1..20b5cd3e2071 100644 --- a/tools/public_api_guard/material/progress-bar.md +++ b/tools/public_api_guard/material/progress-bar.md @@ -4,10 +4,10 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterViewInit } from '@angular/core'; import { CanColor } from '@angular/material/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; import * as i0 from '@angular/core'; diff --git a/tools/public_api_guard/material/progress-spinner.md b/tools/public_api_guard/material/progress-spinner.md index 8d6b27bc30a5..327e269e9e9f 100644 --- a/tools/public_api_guard/material/progress-spinner.md +++ b/tools/public_api_guard/material/progress-spinner.md @@ -4,9 +4,9 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { CanColor } from '@angular/material/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; import * as i2 from '@angular/material/core'; diff --git a/tools/public_api_guard/material/radio.md b/tools/public_api_guard/material/radio.md index 4800224ae4ce..1dff11e3e984 100644 --- a/tools/public_api_guard/material/radio.md +++ b/tools/public_api_guard/material/radio.md @@ -4,13 +4,13 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanDisableRipple } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; diff --git a/tools/public_api_guard/material/select.md b/tools/public_api_guard/material/select.md index 0f82f1c55c4f..16493d054582 100644 --- a/tools/public_api_guard/material/select.md +++ b/tools/public_api_guard/material/select.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { ActiveDescendantKeyManager } from '@angular/cdk/a11y'; import { AfterContentInit } from '@angular/core'; import { AnimationTriggerMetadata } from '@angular/animations'; @@ -15,7 +15,7 @@ import { CanUpdateErrorState } from '@angular/material/core'; import { CdkConnectedOverlay } from '@angular/cdk/overlay'; import { ChangeDetectorRef } from '@angular/core'; import { ConnectedPosition } from '@angular/cdk/overlay'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { Directionality } from '@angular/cdk/bidi'; import { DoCheck } from '@angular/core'; diff --git a/tools/public_api_guard/material/slide-toggle.md b/tools/public_api_guard/material/slide-toggle.md index 06718daeebc0..84c00f99d096 100644 --- a/tools/public_api_guard/material/slide-toggle.md +++ b/tools/public_api_guard/material/slide-toggle.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanColor } from '@angular/material/core'; @@ -12,7 +12,7 @@ import { CanDisable } from '@angular/material/core'; import { CanDisableRipple } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; import { CheckboxRequiredValidator } from '@angular/forms'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; diff --git a/tools/public_api_guard/material/slider.md b/tools/public_api_guard/material/slider.md index cc1ff42ea2fb..308d39aebb61 100644 --- a/tools/public_api_guard/material/slider.md +++ b/tools/public_api_guard/material/slider.md @@ -4,13 +4,13 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterViewInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanColor } from '@angular/material/core'; import { CanDisable } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ControlValueAccessor } from '@angular/forms'; import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; diff --git a/tools/public_api_guard/material/sort.md b/tools/public_api_guard/material/sort.md index 7b293e52886e..8cf6c460e0de 100644 --- a/tools/public_api_guard/material/sort.md +++ b/tools/public_api_guard/material/sort.md @@ -4,13 +4,13 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterViewInit } from '@angular/core'; import { AnimationTriggerMetadata } from '@angular/animations'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanDisable } from '@angular/material/core'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ElementRef } from '@angular/core'; import { EventEmitter } from '@angular/core'; import { FocusMonitor } from '@angular/cdk/a11y'; diff --git a/tools/public_api_guard/material/stepper.md b/tools/public_api_guard/material/stepper.md index c9284f1e7a3a..2b3e2ead66fb 100644 --- a/tools/public_api_guard/material/stepper.md +++ b/tools/public_api_guard/material/stepper.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; import { AnimationEvent as AnimationEvent_2 } from '@angular/animations'; @@ -16,7 +16,7 @@ import { CdkStepper } from '@angular/cdk/stepper'; import { CdkStepperNext } from '@angular/cdk/stepper'; import { CdkStepperPrevious } from '@angular/cdk/stepper'; import { ChangeDetectorRef } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; import { ErrorStateMatcher } from '@angular/material/core'; diff --git a/tools/public_api_guard/material/tabs.md b/tools/public_api_guard/material/tabs.md index c7e52a211b57..43f7a3b4d148 100644 --- a/tools/public_api_guard/material/tabs.md +++ b/tools/public_api_guard/material/tabs.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentChecked } from '@angular/core'; import { AfterContentInit } from '@angular/core'; import { AfterViewInit } from '@angular/core'; @@ -18,7 +18,7 @@ import { CdkPortal } from '@angular/cdk/portal'; import { CdkPortalOutlet } from '@angular/cdk/portal'; import { ChangeDetectorRef } from '@angular/core'; import { ComponentFactoryResolver } from '@angular/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { Direction } from '@angular/cdk/bidi'; import { Directionality } from '@angular/cdk/bidi'; import { ElementRef } from '@angular/core'; diff --git a/tools/public_api_guard/material/toolbar.md b/tools/public_api_guard/material/toolbar.md index 0b68a5ffe15c..c2cd5a27dc9b 100644 --- a/tools/public_api_guard/material/toolbar.md +++ b/tools/public_api_guard/material/toolbar.md @@ -4,10 +4,10 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterViewInit } from '@angular/core'; import { CanColor } from '@angular/material/core'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { ElementRef } from '@angular/core'; import * as i0 from '@angular/core'; import * as i2 from '@angular/material/core'; diff --git a/tools/public_api_guard/material/tree.md b/tools/public_api_guard/material/tree.md index 27fcc780331f..1f4149934c5e 100644 --- a/tools/public_api_guard/material/tree.md +++ b/tools/public_api_guard/material/tree.md @@ -4,7 +4,7 @@ ```ts -import { AbstractConstructor } from '@angular/material/core/common-behaviors/constructor'; +import { _AbstractConstructor } from '@angular/material/core'; import { AfterContentInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { CanDisable } from '@angular/material/core'; @@ -16,7 +16,7 @@ import { CdkTreeNodeOutlet } from '@angular/cdk/tree'; import { CdkTreeNodePadding } from '@angular/cdk/tree'; import { CdkTreeNodeToggle } from '@angular/cdk/tree'; import { CollectionViewer } from '@angular/cdk/collections'; -import { Constructor } from '@angular/material/core/common-behaviors/constructor'; +import { _Constructor } from '@angular/material/core'; import { DataSource } from '@angular/cdk/collections'; import { DoCheck } from '@angular/core'; import { ElementRef } from '@angular/core'; From 670a4318dbe030a3cb86e0932a89e9ca8b4c2575 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:26:12 +0200 Subject: [PATCH 03/21] build: no longer keep track of UMD globals for package output As of APF v13, we no longer ship UMD files. This means that we can remove all the logic for keeping track of the UMD global names. Instead we just keep track of external packages which should not be bundled into the package output (this includes cross-entry point imports; e.g. slider should not bundle the core entry-point; so we still need to keep track of all the entry-points as externals) --- .circleci/config.yml | 6 +- BUILD.bazel | 11 +- package.json | 2 +- packages.bzl | 145 +++++++----------- pkg-externals.bzl | 85 ++++++++++ rollup-globals.bzl | 103 ------------- ...-globals.ts => check-package-externals.ts} | 20 +-- tools/defaults.bzl | 11 +- 8 files changed, 164 insertions(+), 219 deletions(-) create mode 100644 pkg-externals.bzl delete mode 100644 rollup-globals.bzl rename scripts/{check-rollup-globals.ts => check-package-externals.ts} (75%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 998330c12720..c71982e57f22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -338,10 +338,10 @@ jobs: - *setup_bazel_binary - run: - name: Checking rollup globals + name: Checking package externals command: | - bazel build //:rollup_globals - yarn check-rollup-globals $(bazel info bazel-bin)/rollup_globals.json + bazel build //:package_externals + yarn check-package-externals $(bazel info bazel-bin)/package_externals.json - run: name: Checking entry-points configuration diff --git a/BUILD.bazel b/BUILD.bazel index 691948b9da0f..399afc9eff28 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,4 +1,4 @@ -load("//:rollup-globals.bzl", "ROLLUP_GLOBALS") +load("//:pkg-externals.bzl", "PKG_EXTERNALS") load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS") load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_ENTRYPOINTS") load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS") @@ -11,10 +11,13 @@ exports_files([ "package.json", ]) +# Target which writes the list of package externals into a JSON file so that the +# Starlark-configured externals (for the NPM package bundling) can be passed to +# the `check-package-externals` Yarn script, which validates our module imports. genrule( - name = "rollup_globals", - outs = ["rollup_globals.json"], - cmd = "echo '%s' > $@" % ROLLUP_GLOBALS, + name = "package_externals", + outs = ["package_externals.json"], + cmd = "echo '%s' > $@" % PKG_EXTERNALS, ) entryPoints = ["cdk/%s" % e for e in CDK_ENTRYPOINTS] + \ diff --git a/package.json b/package.json index 10bebe0a1e23..29a56a76f681 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "breaking-changes": "ts-node --project scripts/tsconfig.json scripts/breaking-changes.ts", "gulp": "gulp", "check-entry-point-setup": "node ./scripts/check-entry-point-setup.js", - "check-rollup-globals": "ts-node --project scripts/tsconfig.json scripts/check-rollup-globals.ts", + "check-package-externals": "ts-node --project scripts/tsconfig.json scripts/check-package-externals.ts", "format": "yarn ng-dev format changed", "cherry-pick-patch": "ts-node --project tools/cherry-pick-patch/tsconfig.json tools/cherry-pick-patch/cherry-pick-patch.ts", "ownerslint": "ts-node --project scripts/tsconfig.json scripts/ownerslint.ts", diff --git a/packages.bzl b/packages.bzl index 05803d2d5e4c..009504ac9bc6 100644 --- a/packages.bzl +++ b/packages.bzl @@ -22,98 +22,61 @@ VERSION_PLACEHOLDER_REPLACEMENTS = { "0.0.0-RXJS": RXJS_PACKAGE_VERSION, } -# Map of MDC packages and their UMD bundles. These are used for unit tests and the dev-app. -MDC_PACKAGE_UMD_BUNDLES = { - "@material/animation": "@npm//:node_modules/@material/animation/dist/mdc.animation.js", - "@material/auto-init": "@npm//:node_modules/@material/auto-init/dist/mdc.autoInit.js", - "@material/base": "@npm//:node_modules/@material/base/dist/mdc.base.js", - "@material/checkbox": "@npm//:node_modules/@material/checkbox/dist/mdc.checkbox.js", - "@material/chips": "@npm//:node_modules/@material/chips/dist/mdc.chips.js", - "@material/circular-progress": "@npm//:node_modules/@material/circular-progress/dist/mdc.circularProgress.js", - "@material/data-table": "@npm//:node_modules/@material/data-table/dist/mdc.dataTable.js", - "@material/dialog": "@npm//:node_modules/@material/dialog/dist/mdc.dialog.js", - "@material/dom": "@npm//:node_modules/@material/dom/dist/mdc.dom.js", - "@material/drawer": "@npm//:node_modules/@material/drawer/dist/mdc.drawer.js", - "@material/floating-label": "@npm//:node_modules/@material/floating-label/dist/mdc.floatingLabel.js", - "@material/form-field": "@npm//:node_modules/@material/form-field/dist/mdc.formField.js", - "@material/icon-button": "@npm//:node_modules/@material/icon-button/dist/mdc.iconButton.js", - "@material/line-ripple": "@npm//:node_modules/@material/line-ripple/dist/mdc.lineRipple.js", - "@material/linear-progress": "@npm//:node_modules/@material/linear-progress/dist/mdc.linearProgress.js", - "@material/list": "@npm//:node_modules/@material/list/dist/mdc.list.js", - "@material/menu-surface": "@npm//:node_modules/@material/menu-surface/dist/mdc.menuSurface.js", - "@material/menu": "@npm//:node_modules/@material/menu/dist/mdc.menu.js", - "@material/notched-outline": "@npm//:node_modules/@material/notched-outline/dist/mdc.notchedOutline.js", - "@material/radio": "@npm//:node_modules/@material/radio/dist/mdc.radio.js", - "@material/ripple": "@npm//:node_modules/@material/ripple/dist/mdc.ripple.js", - "@material/select": "@npm//:node_modules/@material/select/dist/mdc.select.js", - "@material/slider": "@npm//:node_modules/@material/slider/dist/mdc.slider.js", - "@material/snackbar": "@npm//:node_modules/@material/snackbar/dist/mdc.snackbar.js", - "@material/switch": "@npm//:node_modules/@material/switch/dist/mdc.switch.js", - "@material/tab-bar": "@npm//:node_modules/@material/tab-bar/dist/mdc.tabBar.js", - "@material/tab-indicator": "@npm//:node_modules/@material/tab-indicator/dist/mdc.tabIndicator.js", - "@material/tab-scroller": "@npm//:node_modules/@material/tab-scroller/dist/mdc.tabScroller.js", - "@material/tab": "@npm//:node_modules/@material/tab/dist/mdc.tab.js", - "@material/textfield": "@npm//:node_modules/@material/textfield/dist/mdc.textfield.js", - "@material/tooltip": "@npm//:node_modules/@material/tooltip/dist/mdc.tooltip.js", - "@material/top-app-bar": "@npm//:node_modules/@material/top-app-bar/dist/mdc.topAppBar.js", -} - -# List of default Angular library UMD bundles which are not processed by ngcc. -ANGULAR_NO_NGCC_BUNDLES = [ - ("@angular/compiler", ["compiler.umd.js"]), - ("@angular/localize", ["localize.umd.js", "localize-init.umd.js"]), +# List of MDC packages. +MDC_PACKAGES = [ + "@material/animation", + "@material/auto-init", + "@material/base", + "@material/checkbox", + "@material/chips", + "@material/circular-progress", + "@material/data-table", + "@material/dialog", + "@material/dom", + "@material/drawer", + "@material/floating-label", + "@material/form-field", + "@material/icon-button", + "@material/line-ripple", + "@material/linear-progress", + "@material/list", + "@material/menu-surface", + "@material/menu", + "@material/notched-outline", + "@material/radio", + "@material/ripple", + "@material/select", + "@material/slider", + "@material/snackbar", + "@material/switch", + "@material/tab-bar", + "@material/tab-indicator", + "@material/tab-scroller", + "@material/tab", + "@material/textfield", + "@material/tooltip", + "@material/top-app-bar", ] -# List of Angular library UMD bundles which will are processed by ngcc. -ANGULAR_NGCC_BUNDLES = [ - ("@angular/animations", ["animations-browser.umd.js", "animations.umd.js"]), - ("@angular/common", ["common-http-testing.umd.js", "common-http.umd.js", "common-testing.umd.js", "common.umd.js"]), - ("@angular/compiler", ["compiler-testing.umd.js"]), - ("@angular/core", ["core-testing.umd.js", "core.umd.js"]), - ("@angular/forms", ["forms.umd.js"]), - ("@angular/platform-browser-dynamic", ["platform-browser-dynamic-testing.umd.js", "platform-browser-dynamic.umd.js"]), - ("@angular/platform-browser", ["platform-browser.umd.js", "platform-browser-testing.umd.js", "platform-browser-animations.umd.js"]), - ("@angular/router", ["router.umd.js"]), +ANGULAR_PACKAGES_CONFIG = [ + ("@angular/animations", struct(entry_points = ["browser"])), + ("@angular/common", struct(entry_points = ["http/testing", "http", "testing"])), + ("@angular/compiler", struct(entry_points = ["testing"])), + ("@angular/core", struct(entry_points = ["testing"])), + ("@angular/forms", struct(entry_points = [])), + ("@angular/platform-browser", struct(entry_points = ["testing", "animations"])), + ("@angular/platform-server", struct(entry_points = [], platform = "node")), + ("@angular/platform-browser-dynamic", struct(entry_points = ["testing"])), + ("@angular/router", struct(entry_points = [])), + ("@angular/localize", struct(entry_points = ["init"])), ] -""" - Gets a dictionary of all packages and their bundle names. -""" - -def getFrameworkPackageBundles(): - res = {} - for pkgName, bundleNames in ANGULAR_NGCC_BUNDLES + ANGULAR_NO_NGCC_BUNDLES: - res[pkgName] = res.get(pkgName, []) + bundleNames - return res - -""" - Gets a list of labels which resolve to the UMD bundles of the given packages. -""" - -def getUmdFilePaths(packages, ngcc_artifacts): - tmpl = "@npm//:node_modules/%s" + ("/__ivy_ngcc__" if ngcc_artifacts else "") + "/bundles/%s" - return [ - tmpl % (pkgName, bundleName) - for pkgName, bundleNames in packages - for bundleName in bundleNames - ] - -ANGULAR_PACKAGE_BUNDLES = getFrameworkPackageBundles() - -ANGULAR_LIBRARY_VIEW_ENGINE_UMDS = getUmdFilePaths(ANGULAR_NO_NGCC_BUNDLES, False) + \ - getUmdFilePaths(ANGULAR_NGCC_BUNDLES, False) - -ANGULAR_LIBRARY_IVY_UMDS = getUmdFilePaths(ANGULAR_NO_NGCC_BUNDLES, False) + \ - getUmdFilePaths(ANGULAR_NGCC_BUNDLES, True) - -""" - Gets the list of targets for the Angular library UMD bundles. Conditionally - switches between View Engine or Ivy UMD bundles based on the - "--config={ivy,view-engine}" flag. -""" - -def getAngularUmdTargets(): - return select({ - "//tools:view_engine_mode": ANGULAR_LIBRARY_VIEW_ENGINE_UMDS, - "//conditions:default": ANGULAR_LIBRARY_IVY_UMDS, - }) +ANGULAR_PACKAGES = [ + struct( + name = name[len("@angular/"):], + entry_points = config.entry_points, + platform = config.platform if hasattr(config, "platform") else "browser", + module_name = name, + ) + for name, config in ANGULAR_PACKAGES_CONFIG +] diff --git a/pkg-externals.bzl b/pkg-externals.bzl new file mode 100644 index 000000000000..23d8c7d3270d --- /dev/null +++ b/pkg-externals.bzl @@ -0,0 +1,85 @@ +load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS") +load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_ENTRYPOINTS") +load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS") +load( + "//src/material-experimental:config.bzl", + "MATERIAL_EXPERIMENTAL_ENTRYPOINTS", + "MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS", +) +load("//:packages.bzl", "MDC_PACKAGES") + +# Base list of externals which should not be bundled into the APF package output. +# Note that we want to disable sorting of the externals as we manually group entries. +# buildifier: disable=unsorted-list-items +PKG_EXTERNALS = [ + # Framework packages. + "@angular/animations", + "@angular/common", + "@angular/common/http", + "@angular/common/http/testing", + "@angular/common/testing", + "@angular/core", + "@angular/core/testing", + "@angular/forms", + "@angular/platform-browser", + "@angular/platform-browser-dynamic", + "@angular/platform-browser-dynamic/testing", + "@angular/platform-browser/animations", + "@angular/platform-server", + "@angular/router", + + # Primary entry-points in the project. + "@angular/cdk", + "@angular/cdk-experimental", + "@angular/google-maps", + "@angular/material", + "@angular/material-experimental", + "@angular/material-moment-adapter", + "@angular/material-luxon-adapter", + "@angular/material-date-fns-adapter", + "@angular/youtube-player", + + # Third-party libraries. + "kagekiri", + "moment", + "moment/locale/fr", + "moment/locale/ja", + "luxon", + "date-fns", + "protractor", + "rxjs", + "rxjs/operators", + "selenium-webdriver", +] + +# Configures the externals for all MDC packages. +def setup_mdc_externals(): + for pkg_name in MDC_PACKAGES: + PKG_EXTERNALS.append(pkg_name) + +# Creates externals for a given package and its entry-points. +def setup_entry_point_externals(packageName, entryPoints): + PKG_EXTERNALS.extend(["@angular/%s/%s" % (packageName, ep) for ep in entryPoints]) + +setup_mdc_externals() + +setup_entry_point_externals("cdk", CDK_ENTRYPOINTS) +setup_entry_point_externals("cdk-experimental", CDK_EXPERIMENTAL_ENTRYPOINTS) +setup_entry_point_externals("material", MATERIAL_ENTRYPOINTS + MATERIAL_TESTING_ENTRYPOINTS) +setup_entry_point_externals( + "material-experimental", + MATERIAL_EXPERIMENTAL_ENTRYPOINTS + MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS, +) + +# External module names in the examples package. Individual examples are grouped +# by package and component, so we add configure such entry-points as external. +setup_entry_point_externals("components-examples/cdk", CDK_ENTRYPOINTS) +setup_entry_point_externals("components-examples/cdk-experimental", CDK_EXPERIMENTAL_ENTRYPOINTS) +setup_entry_point_externals( + "components-examples/material", + MATERIAL_ENTRYPOINTS + MATERIAL_TESTING_ENTRYPOINTS, +) +setup_entry_point_externals( + "components-examples/material-experimental", + MATERIAL_EXPERIMENTAL_ENTRYPOINTS + MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS, +) diff --git a/rollup-globals.bzl b/rollup-globals.bzl deleted file mode 100644 index db35430281c2..000000000000 --- a/rollup-globals.bzl +++ /dev/null @@ -1,103 +0,0 @@ -load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS") -load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_ENTRYPOINTS") -load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS") -load( - "//src/material-experimental:config.bzl", - "MATERIAL_EXPERIMENTAL_ENTRYPOINTS", - "MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS", -) -load("//:packages.bzl", "MDC_PACKAGE_UMD_BUNDLES") - -# Base rollup globals for everything in the repo. Note that we want to disable -# sorting of the globals as we manually group dict entries. -# buildifier: disable=unsorted-dict-items -ROLLUP_GLOBALS = { - # Framework packages. - "@angular/animations": "ng.animations", - "@angular/common": "ng.common", - "@angular/common/http": "ng.common.http", - "@angular/common/http/testing": "ng.common.http.testing", - "@angular/common/testing": "ng.common.testing", - "@angular/core": "ng.core", - "@angular/core/testing": "ng.core.testing", - "@angular/forms": "ng.forms", - "@angular/platform-browser": "ng.platformBrowser", - "@angular/platform-browser-dynamic": "ng.platformBrowserDynamic", - "@angular/platform-browser-dynamic/testing": "ng.platformBrowserDynamic.testing", - "@angular/platform-browser/animations": "ng.platformBrowser.animations", - "@angular/platform-server": "ng.platformServer", - "@angular/router": "ng.router", - - # Primary entry-points in the project. - "@angular/cdk": "ng.cdk", - "@angular/cdk-experimental": "ng.cdkExperimental", - "@angular/google-maps": "ng.googleMaps", - "@angular/material": "ng.material", - "@angular/material-experimental": "ng.materialExperimental", - "@angular/material-moment-adapter": "ng.materialMomentAdapter", - "@angular/material-luxon-adapter": "ng.materialLuxonAdapter", - "@angular/material-date-fns-adapter": "ng.materialDateFnsAdapter", - "@angular/youtube-player": "ng.youtubePlayer", - - # Third-party libraries. - "kagekiri": "kagekiri", - "moment": "moment", - "moment/locale/fr": "moment.locale.fr", - "moment/locale/ja": "moment.locale.ja", - "luxon": "luxon", - "date-fns": "dateFns", - "protractor": "protractor", - "rxjs": "rxjs", - "rxjs/operators": "rxjs.operators", - "selenium-webdriver": "selenium-webdriver", -} - -# Converts a string from dash-case to lower camel case. -def to_lower_camel_case(input): - segments = input.split("-") - return segments[0] + "".join([x.title() for x in segments[1:]]) - -# Configures the rollup globals for all MDC packages. -def setup_mdc_globals(): - for pkg_name in MDC_PACKAGE_UMD_BUNDLES: - entry_point_name = pkg_name[len("@material/"):] - pkg_umd_name = "mdc.%s" % to_lower_camel_case(entry_point_name) - - ROLLUP_GLOBALS.update({pkg_name: pkg_umd_name}) - -# Converts an entry-point name to a UMD module name. -# e.g. "snack-bar/testing" will become "snackBar.testing". -def to_umd_name(name): - segments = name.split("/") - return ".".join([to_lower_camel_case(x) for x in segments]) - -# Creates globals for a given package and its entry-points. -def create_globals(packageName, entryPoints): - ROLLUP_GLOBALS.update({ - "@angular/%s/%s" % (packageName, ep): "ng.%s.%s" % (to_umd_name(packageName), to_umd_name(ep)) - for ep in entryPoints - }) - -setup_mdc_globals() - -create_globals("cdk", CDK_ENTRYPOINTS) -create_globals("cdk-experimental", CDK_EXPERIMENTAL_ENTRYPOINTS) -create_globals("material", MATERIAL_ENTRYPOINTS + MATERIAL_TESTING_ENTRYPOINTS) -create_globals( - "material-experimental", - MATERIAL_EXPERIMENTAL_ENTRYPOINTS + MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS, -) - -# Rollup globals the examples package. Since individual examples are -# grouped by package and component, the primary entry-point imports -# from entry-points which should be treated as external imports. -create_globals("components-examples/cdk", CDK_ENTRYPOINTS) -create_globals("components-examples/cdk-experimental", CDK_EXPERIMENTAL_ENTRYPOINTS) -create_globals( - "components-examples/material", - MATERIAL_ENTRYPOINTS + MATERIAL_TESTING_ENTRYPOINTS, -) -create_globals( - "components-examples/material-experimental", - MATERIAL_EXPERIMENTAL_ENTRYPOINTS + MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS, -) diff --git a/scripts/check-rollup-globals.ts b/scripts/check-package-externals.ts similarity index 75% rename from scripts/check-rollup-globals.ts rename to scripts/check-package-externals.ts index 7a3564f35b4a..9c4c3a485e71 100644 --- a/scripts/check-rollup-globals.ts +++ b/scripts/check-package-externals.ts @@ -1,11 +1,11 @@ /** * Script that goes through each source file that will be included in the * release output and checks if any module imports are not part of the - * specified rollup globals file. + * specified package externals Starlark file. * * This script is used to validate Bazel rollup globals. We use a genrule to - * convert the Starlark rollup globals dict into a JSON file which then can - * be passed to this script to ensure that the rollup globals are up-to-date. + * convert the Starlark external list into a JSON file which then can + * be passed to this script to ensure that the list is up-to-date. */ import * as chalk from 'chalk'; @@ -18,11 +18,11 @@ const projectRoot = join(__dirname, '../'); const args = process.argv.slice(2); if (args.length !== 1) { - console.error(chalk.red('No rollup globals file has been specified.')); + console.error(chalk.red('No externals file has been specified.')); process.exit(1); } -const rollupGlobals = JSON.parse(readFileSync(args[0], 'utf8')); +const packageExternals = JSON.parse(readFileSync(args[0], 'utf8')) as string[]; const configFile = ts.readJsonConfigFile(join(projectRoot, 'tsconfig.json'), ts.sys.readFile); const parsedConfig = ts.parseJsonSourceFileConfigFileContent(configFile, ts.sys, projectRoot); const filesToCheckGlob = [ @@ -51,7 +51,7 @@ parsedConfig.fileNames.forEach(fileName => { const isExternal = !module.startsWith('.') && !module.startsWith('/'); // Check whether the module is external and whether it's in our rollup globals. - if (isExternal && !rollupGlobals[module]) { + if (isExternal && !packageExternals.includes(module)) { failures.set(fileName, (failures.get(fileName) || []).concat(module)); } } @@ -63,13 +63,13 @@ parsedConfig.fileNames.forEach(fileName => { }); if (failures.size) { - console.error(chalk.red(' ✘ Rollup globals are not up-to-date.')); + console.error(chalk.red(' ✘ Package externals are not up-to-date.')); console.error(); - failures.forEach((missingGlobals, fileName) => { + failures.forEach((missingExternals, fileName) => { console.error(chalk.yellow(` ⮑ ${fileName}:`)); - missingGlobals.forEach(g => console.error(` - ${g}`)); + missingExternals.forEach(g => console.error(` - ${g}`)); }); process.exit(1); } else { - console.info(chalk.green(' ✓ Rollup globals are up-to-date.')); + console.info(chalk.green(' ✓ Package externals are up-to-date.')); } diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 3e28e7fa63b8..1cc2a88429c0 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -7,8 +7,8 @@ load("@npm//@bazel/jasmine:index.bzl", _jasmine_node_test = "jasmine_node_test") load("@npm//@bazel/concatjs:index.bzl", _karma_web_test = "karma_web_test", _karma_web_test_suite = "karma_web_test_suite") load("@npm//@bazel/protractor:index.bzl", _protractor_web_test_suite = "protractor_web_test_suite") load("@npm//@bazel/typescript:index.bzl", _ts_library = "ts_library") -load("//:packages.bzl", "MDC_PACKAGE_UMD_BUNDLES", "VERSION_PLACEHOLDER_REPLACEMENTS", "getAngularUmdTargets") -load("//:rollup-globals.bzl", "ROLLUP_GLOBALS") +load("//:packages.bzl", "VERSION_PLACEHOLDER_REPLACEMENTS") +load("//:pkg-externals.bzl", "PKG_EXTERNALS") load("//tools/markdown-to-html:index.bzl", _markdown_to_html = "markdown_to_html") load("//tools/linker-process:index.bzl", "linker_process") @@ -159,12 +159,9 @@ def ng_package(name, data = [], deps = [], globals = ROLLUP_GLOBALS, readme_md = _ng_package( name = name, - globals = globals, + externals = externals, data = data + [":license_copied"], - # Tslib needs to be explicitly specified as dependency here, so that the `ng_package` - # rollup bundling action can include tslib. Tslib is usually a transitive dependency of - # entry-points passed to `ng_package`, but the rule does not collect transitive deps. - deps = deps + ["@npm//tslib"], + deps = deps, # We never set a `package_name` for NPM packages, neither do we enable validation. # This is necessary because the source targets of the NPM packages all have # package names set and setting a similar `package_name` on the NPM package would From d129ee677d4cd85489552b0ea324b28d8e0fb540 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:28:47 +0200 Subject: [PATCH 04/21] build: generate linked ESM bundles of framework packages As of APF v13, Angular packages come with partial compilation output. This means that for tests, or running the dev-app we want to run the linker to avoid JIT compilation of the FW code. This commit introduces a macro for generating linked ESM bundles of framework packages and their entry-points. These bundles can then be passed later to tests or the dev-app, so that it would not need to run the linker at all. This helps speeding up the development turnaround as the linker would not need to re-run *always*.. --- package.json | 1 + tools/angular/BUILD.bazel | 24 ++++++ .../angular/create_linker_esbuild_plugin.mjs | 81 +++++++++++++++++++ tools/angular/esbuild.config.mjs | 19 +++++ tools/angular/index.bzl | 78 ++++++++++++++++++ tools/esbuild/devmode-output.bzl | 43 ++++++++++ tools/esbuild/esbuild-amd-config.mjs | 19 +++++ tools/esbuild/index.bzl | 44 ++++++---- 8 files changed, 292 insertions(+), 17 deletions(-) create mode 100644 tools/angular/BUILD.bazel create mode 100644 tools/angular/create_linker_esbuild_plugin.mjs create mode 100644 tools/angular/esbuild.config.mjs create mode 100644 tools/angular/index.bzl create mode 100644 tools/esbuild/devmode-output.bzl diff --git a/package.json b/package.json index 29a56a76f681..3274a99980f8 100644 --- a/package.json +++ b/package.json @@ -146,6 +146,7 @@ "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.5", "@schematics/angular": "13.0.0-next.7", + "@types/babel__core": "^7.1.16", "@types/browser-sync": "^2.26.1", "@types/fs-extra": "^9.0.5", "@types/glob": "^7.1.3", diff --git a/tools/angular/BUILD.bazel b/tools/angular/BUILD.bazel new file mode 100644 index 000000000000..911c0599a176 --- /dev/null +++ b/tools/angular/BUILD.bazel @@ -0,0 +1,24 @@ +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//tools/esbuild:index.bzl", "esbuild_config") +load(":index.bzl", "create_angular_bundle_targets") + +package(default_visibility = ["//visibility:public"]) + +js_library( + name = "create_linker_esbuild_plugin", + srcs = ["create_linker_esbuild_plugin.mjs"], + deps = [ + "@npm//@angular/compiler-cli", + "@npm//@babel/core", + ], +) + +esbuild_config( + name = "esbuild_config", + config_file = "esbuild.config.mjs", + deps = [ + ":create_linker_esbuild_plugin", + ], +) + +create_angular_bundle_targets() diff --git a/tools/angular/create_linker_esbuild_plugin.mjs b/tools/angular/create_linker_esbuild_plugin.mjs new file mode 100644 index 000000000000..c328a7b1ed5b --- /dev/null +++ b/tools/angular/create_linker_esbuild_plugin.mjs @@ -0,0 +1,81 @@ +/** + * @license + * Copyright Google LLC 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 fs from 'fs'; + +/** Naively checks whether this node path resolves to an Angular declare invocation. */ +function isNgDeclareCallExpression(nodePath) { + if (!nodePath.node.name.startsWith('ɵɵngDeclare')) { + return false; + } + + // Expect the `ngDeclare` identifier to be used as part of a property access that + // is invoked within a call expression. e.g. `i0.ɵɵngDeclare<>`. + return nodePath.parentPath?.type === 'MemberExpression' && + nodePath.parentPath.parentPath?.type === 'CallExpression'; +} + +/** Asserts that the given AST does not contain any Angular partial declaration. */ +async function assertNoPartialDeclaration(filePath, ast, traverseFn) { + // Naively check if there are any Angular declarations left that haven't been linked. + traverseFn(ast, { + Identifier: (astPath) => { + if (isNgDeclareCallExpression(astPath)) { + throw astPath.buildCodeFrameError( + `Found Angular declaration that has not been linked. ${filePath}`, Error); + } + } + }); +} + +/** + * Creates an ESBuild plugin for running the Angular linker resolved sources. + * + * @param filter Mandatory file path filter for the ESBuild plugin to apply to. Read + * more here: https://esbuild.github.io/plugins/#filters. + * @param ensureNoPartialDeclaration Whether an additional check ensuring there are + * no partial declarations should run. + */ +export async function createLinkerEsbuildPlugin(filter, ensureNoPartialDeclaration) { + // Note: We load all dependencies asynchronously so that these large dependencies + // do not slow-down bundling when the linker plugin is not actually created. + const {NodeJSFileSystem, ConsoleLogger, LogLevel} = await import('@angular/compiler-cli'); + const {createEs2015LinkerPlugin} = await import('@angular/compiler-cli/linker/babel'); + const {default: babel} = await import('@babel/core'); + + const linkerBabelPlugin = createEs2015LinkerPlugin({ + fileSystem: new NodeJSFileSystem(), + logger: new ConsoleLogger(LogLevel.warn), + // We enable JIT mode as unit tests also will rely on the linked ESM files. + linkerJitMode: true, + }); + + return { + name: 'ng-linker-esbuild', + setup: (build) => { + build.onLoad({filter}, async (args) => { + const filePath = args.path; + const content = await fs.promises.readFile(filePath, 'utf8'); + const {ast, code} = await babel.transformAsync(content, { + filename: filePath, + filenameRelative: filePath, + plugins: [linkerBabelPlugin], + sourceMaps: 'inline', + ast: true, + compact: false, + }); + + if (ensureNoPartialDeclaration) { + await assertNoPartialDeclaration(filePath, ast, babel.traverse); + } + + return {contents: code}; + }); + }, + }; +} diff --git a/tools/angular/esbuild.config.mjs b/tools/angular/esbuild.config.mjs new file mode 100644 index 000000000000..694075b696e3 --- /dev/null +++ b/tools/angular/esbuild.config.mjs @@ -0,0 +1,19 @@ +/** + * @license + * Copyright Google LLC 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 {createLinkerEsbuildPlugin} from './create_linker_esbuild_plugin.mjs'; + +export default { + resolveExtensions: ['.mjs', '.js'], + format: 'esm', + plugins: [ + // Only run the linker on `fesm2020/` bundles. This should not have an effect on + // the bundle output, but helps speeding up ESBuild when it visits other modules. + await createLinkerEsbuildPlugin(/fesm2020/) + ] +}; diff --git a/tools/angular/index.bzl b/tools/angular/index.bzl new file mode 100644 index 000000000000..edf0fd66fda7 --- /dev/null +++ b/tools/angular/index.bzl @@ -0,0 +1,78 @@ +load("//:packages.bzl", "ANGULAR_PACKAGES") +load("//tools/esbuild:index.bzl", "esbuild") +load("@build_bazel_rules_nodejs//internal/linker:link_node_modules.bzl", "LinkerPackageMappingInfo") +load("@build_bazel_rules_nodejs//:providers.bzl", "ExternalNpmPackageInfo", "JSModuleInfo") + +""" + Starlark file exposing a definition for generating Angular linker-processed ESM bundles + for all entry-points the Angular framework packages expose. + + These linker-processed ESM bundles are useful as they can be integrated into the + spec bundling, or dev-app to avoid unnecessary re-linking of framework entry-points + every time the bundler executes. This helps with the overall development turnaround and + is more idiomatic as it allows caching of the Angular framework packages. +""" + +def _linker_mapping_impl(ctx): + return [ + # Pass through the `ExternalNpmPackageInfo` which is needed for the linker + # resolving dependencies which might be external. e.g. `rxjs` for `@angular/core`. + ctx.attr.package[ExternalNpmPackageInfo], + JSModuleInfo( + direct_sources = depset(ctx.files.srcs), + sources = depset(ctx.files.srcs), + ), + LinkerPackageMappingInfo( + mappings = { + ctx.attr.module_name: "%s/%s" % (ctx.label.package, ctx.attr.subpath), + }, + ), + ] + +_linker_mapping = rule( + implementation = _linker_mapping_impl, + attrs = { + "package": attr.label(), + "srcs": attr.label_list(allow_files = False), + "subpath": attr.string(), + "module_name": attr.string(), + }, +) + +def _get_target_name_base(pkg, entry_point): + return "%s%s" % (pkg.name, "_%s" % entry_point if entry_point else "") + +def _create_bundle_targets(pkg, entry_point, module_name): + target_name_base = _get_target_name_base(pkg, entry_point) + fesm_bundle_path = "fesm2020/%s.mjs" % (entry_point if entry_point else pkg.name) + + esbuild( + name = "%s_linked_bundle" % target_name_base, + output = "%s/index.mjs" % target_name_base, + platform = pkg.platform, + entry_point = "@npm//:node_modules/@angular/%s/%s" % (pkg.name, fesm_bundle_path), + config = "//tools/angular:esbuild_config", + # List of dependencies which should never be bundled into these linker-processed bundles. + external = ["rxjs", "@angular", "domino", "xhr2"], + ) + + _linker_mapping( + name = "%s_linked" % target_name_base, + srcs = [":%s_linked_bundle" % target_name_base], + package = "@npm//@angular/%s" % pkg.name, + module_name = module_name, + subpath = target_name_base, + ) + +def create_angular_bundle_targets(): + for pkg in ANGULAR_PACKAGES: + _create_bundle_targets(pkg, None, pkg.module_name) + + for entry_point in pkg.entry_points: + _create_bundle_targets(pkg, entry_point, "%s/%s" % (pkg.module_name, entry_point)) + +LINKER_PROCESSED_FW_PACKAGES = [ + "//tools/angular:%s_linked" % _get_target_name_base(pkg, entry_point) + for pkg in ANGULAR_PACKAGES + for entry_point in [None] + pkg.entry_points +] diff --git a/tools/esbuild/devmode-output.bzl b/tools/esbuild/devmode-output.bzl new file mode 100644 index 000000000000..17b5deaf51cc --- /dev/null +++ b/tools/esbuild/devmode-output.bzl @@ -0,0 +1,43 @@ +load("@build_bazel_rules_nodejs//internal/linker:link_node_modules.bzl", "LinkerPackageMappingInfo", "module_mappings_aspect") +load("@build_bazel_rules_nodejs//:providers.bzl", "ExternalNpmPackageInfo", "JSModuleInfo", "node_modules_aspect") + +def _extract_devmode_sources_impl(ctx): + """Private rule that extracts devmode sources for all direct dependencies and re-exposes + them as part of a single target. External node modules are passed-through as well.""" + + mappings = {} + js_sources = [] + + for dep in ctx.attr.deps: + if JSModuleInfo in dep: + js_sources.append(dep[JSModuleInfo].sources) + if ExternalNpmPackageInfo in dep: + js_sources.append(dep[ExternalNpmPackageInfo].sources) + if LinkerPackageMappingInfo in dep: + mappings.update(dep[LinkerPackageMappingInfo].mappings) + + return [ + LinkerPackageMappingInfo(mappings = mappings), + JSModuleInfo( + direct_sources = depset(transitive = js_sources), + sources = depset(transitive = js_sources), + ), + ] + +extract_devmode_sources = rule( + implementation = _extract_devmode_sources_impl, + attrs = { + "deps": attr.label_list(mandatory = True, aspects = [module_mappings_aspect, node_modules_aspect]), + }, +) + +def extract_devmode_output_with_mappings(name, deps, testonly): + """Macro that extracts devmode ESM2020 sources from the given dependencies.""" + + extract_devmode_sources( + name = "%s_sources" % name, + testonly = testonly, + deps = deps, + ) + + return ["%s_sources" % name] diff --git a/tools/esbuild/esbuild-amd-config.mjs b/tools/esbuild/esbuild-amd-config.mjs index f1c17b2d7b41..03905a0b3ded 100644 --- a/tools/esbuild/esbuild-amd-config.mjs +++ b/tools/esbuild/esbuild-amd-config.mjs @@ -1,5 +1,24 @@ +import url from 'url'; +import path from 'path'; + +/** Path to the ESBuild configuration maintained by the user. */ +const userConfigExecPath = "TMPL_CONFIG_PATH" + +/** User ESBuild config. Empty if none is loaded. */ +let userConfig = {}; + +if (userConfigExecPath !== '') { + const userConfigPath = path.join(process.cwd(), userConfigExecPath); + const userConfigUrl = url.pathToFileURL(userConfigPath); + + // Load the user config, assuming it is set as `default` export. + userConfig = (await import(userConfigUrl)).default; +} + export default { + ...userConfig, globalName: "__exports", + format: 'iife', banner: {js: 'define("TMPL_MODULE_NAME", [], function() {'}, footer: {js: 'return __exports;})'}, }; diff --git a/tools/esbuild/index.bzl b/tools/esbuild/index.bzl index e30800951e3a..2f96bd02cbb0 100644 --- a/tools/esbuild/index.bzl +++ b/tools/esbuild/index.bzl @@ -1,12 +1,26 @@ -load("@npm//@bazel/esbuild:index.bzl", "esbuild_config", _esbuild = "esbuild") +load("@npm//@bazel/esbuild:index.bzl", _esbuild = "esbuild", _esbuild_config = "esbuild_config") load("@npm//@angular/dev-infra-private/bazel:expand_template.bzl", "expand_template") +load("//tools/esbuild:devmode-output.bzl", "extract_devmode_output_with_mappings") -def esbuild(**kwargs): - _esbuild(**kwargs) +# Re-export of the actual esbuild definitions. +esbuild_config = _esbuild_config + +def esbuild(name, deps = [], mapping_targets = [], testonly = False, **kwargs): + # Extract all JS module sources before passing to ESBuild. The ESBuild rule requests + # both the devmode and prodmode unfortunately and this would slow-down the development + # turnaround significantly. We only request the devmode sources which are ESM as well. + devmode_targets = extract_devmode_output_with_mappings(name, deps, testonly) + + _esbuild( + name = name, + deps = devmode_targets, + testonly = testonly, + **kwargs + ) """Generates an AMD bundle for the specified entry-point with the given AMD module name.""" -def esbuild_amd(name, entry_point, module_name, testonly, deps): +def esbuild_amd(name, entry_point, module_name, testonly = False, config = None, deps = [], **kwargs): expand_template( name = "%s_config" % name, testonly = testonly, @@ -14,29 +28,25 @@ def esbuild_amd(name, entry_point, module_name, testonly, deps): output_name = "%s_config.mjs" % name, substitutions = { "TMPL_MODULE_NAME": module_name, + "TMPL_CONFIG_PATH": "$(execpath %s)" % config if config else "", }, + data = [config] if config else None, ) - esbuild_config( + _esbuild_config( name = "%s_config_lib" % name, testonly = testonly, config_file = "%s_config" % name, + # Adds the user configuration and its deps as dependency of the AMD ESBuild config. + # https://github.com/bazelbuild/rules_nodejs/blob/a892caf5a040bae5eeec174a3cf6250f02caf364/packages/esbuild/esbuild_config.bzl#L23. + deps = [config, "%s_deps" % config] if config else None, ) - _esbuild( - name = "%s_bundle" % name, + esbuild( + name = name, testonly = testonly, deps = deps, - minify = True, - sourcemap = "inline", - platform = "browser", - target = "es2015", entry_point = entry_point, config = "%s_config_lib" % name, - ) - - native.filegroup( - name = name, - testonly = testonly, - srcs = ["%s_bundle" % name], + **kwargs ) From 823079d1c8acef55a5c516e505f47a56cca142c3 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:32:44 +0200 Subject: [PATCH 05/21] build: remove view engine workarounds for old APF output Removes all View Engine workarounds that we previously needed to generate the APF package output with View Engine. --- WORKSPACE | 5 +- angular-tsconfig.json | 44 --------- package.json | 2 +- tools/postinstall/apply-patches.js | 62 +----------- .../flat_module_factory_resolution.patch | 36 ------- .../manifest_externs_hermeticity.patch | 97 ------------------- tools/postinstall/update-ngcc-main-fields.js | 38 -------- 7 files changed, 6 insertions(+), 278 deletions(-) delete mode 100644 angular-tsconfig.json delete mode 100644 tools/postinstall/flat_module_factory_resolution.patch delete mode 100644 tools/postinstall/manifest_externs_hermeticity.patch delete mode 100644 tools/postinstall/update-ngcc-main-fields.js diff --git a/WORKSPACE b/WORKSPACE index cfd8c76481dd..7f08aee0d647 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -49,11 +49,10 @@ node_repositories( yarn_install( name = "npm", - # We add the postinstall patches file, and ngcc main fields update script here so - # that Yarn will rerun whenever one of these files has been modified. + # We add the postinstall patches file here so that Yarn will rerun whenever + # the file is modified. data = [ "//:tools/postinstall/apply-patches.js", - "//:tools/postinstall/update-ngcc-main-fields.js", ], package_json = "//:package.json", quiet = False, diff --git a/angular-tsconfig.json b/angular-tsconfig.json deleted file mode 100644 index 747f669f7eb7..000000000000 --- a/angular-tsconfig.json +++ /dev/null @@ -1,44 +0,0 @@ -// Workaround for https://github.com/angular/angular/issues/18810 -// This file is required because when using the Angular NPM packages and building -// with AOT compilation, NGC needs the "ngsummary.json" files. -{ - "angularCompilerOptions": { - // In snapshot builds the compiler-cli will now use ngtsc by default. In - // order to be able to build the summary files, we need to use ngc. - "enableIvy": false - }, - "compilerOptions": { - "module": "umd", - "moduleResolution": "node", - "lib": [ - "dom", - "es2015" - ], - "experimentalDecorators": true, - "types": [] - }, - "include": [ - "node_modules/@angular/**/*" - ], - "exclude": [ - "node_modules/@angular/**/schematics/**", - "node_modules/@angular/**/testing/**", - "node_modules/@angular/bazel/**", - "node_modules/@angular/common/upgrade*", - "node_modules/@angular/compiler-cli/**", - "node_modules/@angular/dev-infra-private/**", - "node_modules/@angular/router/upgrade*", - // We also list the packages built as part of this repository. The Bazel NodeJS rules can link - // these packages into the `node_modules/` folder and this would break the summary file generation. - "node_modules/@angular/cdk/**", - "node_modules/@angular/cdk-experimental/**", - "node_modules/@angular/components-examples/**", - "node_modules/@angular/google-maps/**", - "node_modules/@angular/material/**", - "node_modules/@angular/material-experimental/**", - "node_modules/@angular/material-moment-adapter/**", - "node_modules/@angular/material-luxon-adapter/**", - "node_modules/@angular/material-date-fns-adapter/**", - "node_modules/@angular/youtube-player/**" - ] -} diff --git a/package.json b/package.json index 3274a99980f8..79a97f9bb76e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "npm": "Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/" }, "scripts": { - "postinstall": "node tools/postinstall/apply-patches.js && ngcc --properties module main --create-ivy-entry-points && node tools/postinstall/update-ngcc-main-fields.js", + "postinstall": "node tools/postinstall/apply-patches.js", "build": "ts-node --project scripts/tsconfig.json ./scripts/build-packages-dist.ts", "build-and-check-release-output": "ts-node --project scripts/tsconfig.json scripts/build-and-check-release-output.ts", "build-docs-content": "node ./scripts/build-docs-content.js", diff --git a/tools/postinstall/apply-patches.js b/tools/postinstall/apply-patches.js index 69ef0a19098c..626773adf4e9 100644 --- a/tools/postinstall/apply-patches.js +++ b/tools/postinstall/apply-patches.js @@ -52,69 +52,13 @@ async function main() { } function applyPatches() { - // Workaround for https://github.com/angular/angular/issues/18810. - shelljs.exec('ngc -p angular-tsconfig.json'); - - // Workaround for: https://github.com/angular/angular/issues/32651. We just do not - // generate re-exports for secondary entry-points. Similar to what "ng-packagr" does. - searchAndReplace( - /(?!function\s+)createMetadataReexportFile\([^)]+\);/, '', - 'node_modules/@angular/bazel/src/ng_package/packager.js'); - searchAndReplace( - /(?!function\s+)createTypingsReexportFile\([^)]+\);/, '', - 'node_modules/@angular/bazel/src/ng_package/packager.js'); - // Workaround for: https://github.com/angular/angular/pull/32650 searchAndReplace( - 'var indexFile;', ` - var indexFile = files.find(f => f.endsWith('/public-api.ts')); + 'let resolvedEntryPoint = null;', ` + let resolvedEntryPoint = tsFiles.find(f => f.endsWith('/public-api.ts')) || null; `, - 'node_modules/@angular/compiler-cli/src/metadata/bundle_index_host.js'); - searchAndReplace( - 'var resolvedEntryPoint = null;', ` - var resolvedEntryPoint = tsFiles.find(f => f.endsWith('/public-api.ts')) || null; - `, - 'node_modules/@angular/compiler-cli/src/ngtsc/entry_point/src/logic.js'); - - // Workaround for: https://hackmd.io/MlqFp-yrSx-0mw4rD7dnQQ?both. We only want to discard - // the metadata of files in the bazel managed node modules. That way we keep the default - // behavior of ngc-wrapped except for dependencies between sources of the library. This makes - // the "generateCodeForLibraries" flag more accurate in the Bazel environment where previous - // compilations should not be treated as external libraries. Read more about this in the document. - searchAndReplace( - /if \((this\.options\.generateCodeForLibraries === false)/, ` - const fs = require('fs'); - const hasFlatModuleBundle = fs.existsSync(filePath.replace('.d.ts', '.metadata.json')); - if ((filePath.includes('node_modules/') || !hasFlatModuleBundle) && $1`, - 'node_modules/@angular/compiler-cli/src/transformers/compiler_host.js'); - applyPatch(path.join(__dirname, './flat_module_factory_resolution.patch')); - // The three replacements below ensure that metadata files can be read by NGC and - // that metadata files are collected as Bazel action inputs. - searchAndReplace( - /(const NGC_ASSETS = \/[^(]+\()([^)]*)(\).*\/;)/, '$1$2|metadata.json$3', - 'node_modules/@angular/bazel/src/ngc-wrapped/index.js'); - searchAndReplace( - /^((\s*)results = depset\(dep.angular.summaries, transitive = \[results]\))$/m, - `$1#\n$2results = depset(dep.angular.metadata, transitive = [results])`, - 'node_modules/@angular/bazel/src/ng_module.bzl'); - searchAndReplace( - /^((\s*)results = depset\(target.angular\.summaries if _has_target_angular_summaries\(target\) else \[]\))$/m, - `$1#\n$2results = depset(target.angular.metadata if _has_target_angular_summaries(target) else [], transitive = [results])`, - 'node_modules/@angular/bazel/src/ng_module.bzl'); - // Ensure that "metadata" of transitive dependencies can be collected. - searchAndReplace( - /providers\["angular"]\["metadata"] = outs\.metadata/, - `$& + [m for dep in ctx.attr.deps if (hasattr(dep, "angular") and hasattr(dep.angular, "metadata")) for m in dep.angular.metadata]`, - 'node_modules/@angular/bazel/src/ng_module.bzl'); - - // Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1208. - applyPatch(path.join(__dirname, './manifest_externs_hermeticity.patch')); + 'node_modules/@angular/compiler-cli/bundles/index.js'); - // Workaround for https://github.com/angular/angular/issues/33452: - searchAndReplace( - /angular_compiler_options = {/, `$& - "strictTemplates": True,`, - 'node_modules/@angular/bazel/src/ng_module.bzl'); // More info in https://github.com/angular/angular/pull/33786 shelljs.rm('-rf', [ diff --git a/tools/postinstall/flat_module_factory_resolution.patch b/tools/postinstall/flat_module_factory_resolution.patch deleted file mode 100644 index 3d48a133e53a..000000000000 --- a/tools/postinstall/flat_module_factory_resolution.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git node_modules/@angular/compiler/bundles/compiler.umd.js node_modules/@angular/compiler/bundles/compiler.umd.js -index 640c42f..832f8db 100644 ---- node_modules/@angular/compiler/bundles/compiler.umd.js -+++ node_modules/@angular/compiler/bundles/compiler.umd.js -@@ -21006,7 +21006,10 @@ - }; - CompileMetadataResolver.prototype.getGeneratedClass = function (dirType, name) { - if (dirType instanceof StaticSymbol) { -- return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), name); -+ // resolve symbol to the original file path. i.e. symbols resolved through -+ // flat module bundle will be resolved back through the "origins" field. -+ var originalPath = this._reflector.symbolResolver.getResourcePath(dirType); -+ return this._staticSymbolCache.get(ngfactoryFilePath(originalPath), name); - } - else { - return this._createProxyClass(dirType, name); -@@ -21027,7 +21030,8 @@ - }; - CompileMetadataResolver.prototype.getRendererType = function (dirType) { - if (dirType instanceof StaticSymbol) { -- return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), rendererTypeName(dirType)); -+ var originalPath = this._reflector.symbolResolver.getResourcePath(dirType); -+ return this._staticSymbolCache.get(ngfactoryFilePath(originalPath), rendererTypeName(dirType)); - } - else { - // returning an object as proxy, -@@ -21037,7 +21041,8 @@ - }; - CompileMetadataResolver.prototype.getComponentFactory = function (selector, dirType, inputs, outputs) { - if (dirType instanceof StaticSymbol) { -- return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), componentFactoryName(dirType)); -+ var originalPath = this._reflector.symbolResolver.getResourcePath(dirType); -+ return this._staticSymbolCache.get(ngfactoryFilePath(originalPath), componentFactoryName(dirType)); - } - else { - var hostView = this.getHostComponentViewClass(dirType); diff --git a/tools/postinstall/manifest_externs_hermeticity.patch b/tools/postinstall/manifest_externs_hermeticity.patch deleted file mode 100644 index 7a3c350c757b..000000000000 --- a/tools/postinstall/manifest_externs_hermeticity.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff --git node_modules/@bazel/typescript/internal/build_defs.bzl node_modules/@bazel/typescript/internal/build_defs.bzl -index 03cb68fdf..2f604234c 100755 ---- node_modules/@bazel/typescript/internal/build_defs.bzl -+++ node_modules/@bazel/typescript/internal/build_defs.bzl -@@ -102,17 +102,17 @@ def _filter_ts_inputs(all_inputs): - if f.extension in ["js", "jsx", "ts", "tsx", "json"] - ] - -+def _filter_compile_outputs(all_outputs): -+ return [ -+ f -+ for f in all_outputs -+ if not f.basename.endswith(".externs.js") and not f.basename.endswith(".es5.MF") -+ ] -+ - def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description = "prodmode"): - externs_files = [] - action_inputs = inputs -- action_outputs = [] -- for output in outputs: -- if output.basename.endswith(".externs.js"): -- externs_files.append(output) -- elif output.basename.endswith(".es5.MF"): -- ctx.actions.write(output, content = "") -- else: -- action_outputs.append(output) -+ compile_outputs = _filter_compile_outputs(outputs) - - # TODO(plf): For now we mock creation of files other than {name}.js. - for externs_file in externs_files: -@@ -120,7 +120,9 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description - - # A ts_library that has only .d.ts inputs will have no outputs, - # therefore there are no actions to execute -- if not action_outputs: -+ if not compile_outputs: -+ for file in [f for f in outputs if not f in compile_outputs]: -+ ctx.actions.write(output = file, content = "") - return None - - action_inputs.extend(_filter_ts_inputs(ctx.files.node_modules)) -@@ -156,7 +158,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description - progress_message = "Compiling TypeScript (%s) %s" % (description, ctx.label), - mnemonic = "TypeScriptCompile", - inputs = action_inputs, -- outputs = action_outputs, -+ outputs = outputs, - # Use the built-in shell environment - # Allow for users who set a custom shell that can locate standard binaries like tr and uname - # See https://github.com/NixOS/nixpkgs/issues/43955#issuecomment-407546331 -@@ -179,7 +181,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description - progress_message = "Compiling TypeScript (%s) %s" % (description, ctx.label), - mnemonic = "tsc", - inputs = action_inputs, -- outputs = action_outputs, -+ outputs = compile_outputs, - # Use the built-in shell environment - # Allow for users who set a custom shell that can locate standard binaries like tr and uname - # See https://github.com/NixOS/nixpkgs/issues/43955#issuecomment-407546331 -@@ -194,7 +196,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description - label = ctx.label, - tsconfig = tsconfig_file, - inputs = action_inputs, -- outputs = action_outputs, -+ outputs = compile_outputs, - compiler = ctx.executable.compiler, - ) - - -diff --git node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js -index ec813f654..738342a8f 100755 ---- node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js -+++ node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js -@@ -381,6 +381,23 @@ function createProgramAndEmit(fileLoader, options, bazelOpts, files, disabledTse - } - else { - diagnostics = emitWithTypescript(program, compilationTargets, transformers); -+ if (bazelOpts.manifest) { -+ fs.writeFileSync(bazelOpts.manifest, ""); -+ } -+ if (bazelOpts.tsickleExternsPath) { -+ fs.writeFileSync(bazelOpts.tsickleExternsPath, ""); -+ if (bazelOpts.tsickleGenerateExterns && compilerHost.provideExternalModuleDtsNamespace) { -+ for (const extern of compilationTargets) { -+ if (!extern.isDeclarationFile) -+ continue; -+ const outputBaseDir = options.outDir; -+ const relativeOutputPath = compilerHost.relativeOutputPath(extern.fileName); -+ mkdirp(outputBaseDir, path.dirname(relativeOutputPath)); -+ const outputPath = path.join(outputBaseDir, relativeOutputPath); -+ fs.writeFileSync(outputPath, ""); -+ } -+ } -+ } - } - if (diagnostics.length > 0) { - worker_1.debug('compilation failed at', new Error().stack); diff --git a/tools/postinstall/update-ngcc-main-fields.js b/tools/postinstall/update-ngcc-main-fields.js deleted file mode 100644 index f31de48769e7..000000000000 --- a/tools/postinstall/update-ngcc-main-fields.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Script that runs after node modules have been installed, and Ngcc processed all packages. - * This script updates the `package.json` files of Angular framework packages to point to the - * Ngcc processed UMD bundles. This is needed because we run Angular in a `nodejs_binary`, but - * want to make sure that Ivy is being used. By default, the NodeJS module resolution will load - * the unprocessed UMD bundle because the `main` field of the `package.json` files point to the - * View Engine UMD bundles. This script updates the `main` field in `package.json` files to point - * to the previously generated Ivy UMD bundles. - * - * Ngcc does not by edit the `main` field because we ran it with the `--create-ivy-entry-points` - * flag. It instructs Ngcc to not modify existing package bundles, but rather create separate - * copies with the needed Ivy modifications. This is necessary because the original bundles - * are needed for View Engine, and we want to preserve them in order to be able to switch - * between Ivy and View Engine (for testing). Since the goal of this flag is to not modify - * any original package files/bundles, Ngcc will not edit the `main` field to point to - * the processed Ivy bundles. - */ - -const shelljs = require('shelljs'); -const fs = require('fs'); - -const MAIN_FIELD_NAME = 'main'; -const NGCC_MAIN_FIELD_NAME = 'main_ivy_ngcc'; - -shelljs.find('node_modules/@angular/**/package.json').forEach(filePath => { - // Do not update `package.json` files for deeply nested node modules (e.g. dependencies of - // the `@angular/compiler-cli` package). - if (filePath.lastIndexOf('node_modules/') !== 0) { - return; - } - const parsedJson = JSON.parse(fs.readFileSync(filePath, 'utf8')); - if (parsedJson[NGCC_MAIN_FIELD_NAME] && - parsedJson[MAIN_FIELD_NAME] !== parsedJson[NGCC_MAIN_FIELD_NAME]) { - // Update the main field to point to the ngcc main script. - parsedJson[MAIN_FIELD_NAME] = parsedJson[NGCC_MAIN_FIELD_NAME]; - fs.writeFileSync(filePath, JSON.stringify(parsedJson, null, 2)); - } -}); From 10058eb35f864dd7f39b23d4197403c1dc9cbd45 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:35:38 +0200 Subject: [PATCH 06/21] build: switch devmode output to ES2020 and ESM Switches the devmode output to ES2020 and ESM. This is in preparation for allowing fast rebuilds with the Angular FW v13 packages. Since these packages are now strict ESM, and rely on the linker, we need to have some bundling in between for tests, or the dev-app (this is actually even faster than relying on ConcatJS/RequireJS/SystemJS). This bundling should not need to consume the prodmode output, but rather use the devmode output because otherwise the usual development workflow would result in both devmode + prodmode being requested.. resulting in a significant slow-down due to 2x TS compilations. Devmode output is always requested for dependencies on `ts_library` or `ng_module` to accomplish the TS fine-grained TS compilations. Since this is the case, we just naturally use the devmode output for bundling of tests/dev-app.. so inherently we need to switch devmode to ESM for enabling bundling. --- integration/size-test/BUILD.bazel | 2 ++ package.json | 2 +- scripts/tsconfig.json | 4 ++-- src/bazel-tsconfig-build.json | 9 ++++---- src/bazel-tsconfig-test.json | 4 +--- src/cdk/schematics/BUILD.bazel | 8 +++++-- src/cdk/schematics/testing/BUILD.bazel | 4 ++-- src/cdk/schematics/update-tool/BUILD.bazel | 4 ++-- src/cdk/testing/tests/BUILD.bazel | 2 ++ .../material/datepicker/BUILD.bazel | 8 ------- src/components-examples/tsconfig.json | 2 -- src/dev-app/tsconfig.json | 1 - src/material-moment-adapter/BUILD.bazel | 4 ---- src/material-moment-adapter/tsconfig.json | 2 -- src/material/core/theming/tests/BUILD.bazel | 2 ++ src/material/schematics/BUILD.bazel | 5 ++++- .../v9/misc/hammer-migration-v9.spec.ts | 22 ++++++++++++++++++- tools/defaults.bzl | 10 ++++++++- tools/dev-server/BUILD.bazel | 2 ++ tools/dev-server/dev-server.ts | 8 +++---- tools/dev-server/main.ts | 2 +- tools/dgeni/BUILD.bazel | 2 ++ tools/dgeni/tsconfig.json | 5 +++-- tools/example-module/BUILD.bazel | 2 ++ tools/example-module/tsconfig.json | 5 +++-- tools/highlight-files/BUILD.bazel | 2 ++ tools/highlight-files/tsconfig.json | 5 +++-- tools/linker-process/BUILD.bazel | 2 ++ tools/markdown-to-html/BUILD.bazel | 2 ++ tools/markdown-to-html/transform-markdown.ts | 2 +- tools/markdown-to-html/tsconfig.json | 5 +++-- tools/package-docs-content/BUILD.bazel | 2 ++ tools/package-docs-content/tsconfig.json | 5 +++-- tools/postcss/BUILD.bazel | 2 ++ tools/postinstall/apply-patches.js | 4 +++- tools/postinstall/devmode-es2020-bazel.patch | 14 ++++++++++++ tools/region-parser/BUILD.bazel | 2 ++ tools/region-parser/tsconfig.json | 5 +++-- tools/server-test/BUILD.bazel | 2 ++ tools/stylelint/no-prefixes/index.ts | 2 +- tools/{tsconfig-ci.json => tsconfig.json} | 5 +++-- tools/tslint-rules/lightweightTokensRule.ts | 2 +- .../noCrossEntryPointRelativeImportsRule.ts | 2 +- .../tslint-rules/noLifecycleInvocationRule.ts | 2 +- .../tslint-rules/requireLicenseBannerRule.ts | 2 +- tools/tslint-rules/validateDecoratorsRule.ts | 2 +- tsconfig.json | 7 +++--- 47 files changed, 131 insertions(+), 68 deletions(-) create mode 100644 tools/postinstall/devmode-es2020-bazel.patch rename tools/{tsconfig-ci.json => tsconfig.json} (89%) diff --git a/integration/size-test/BUILD.bazel b/integration/size-test/BUILD.bazel index adebe28505a0..ecd3817d7448 100644 --- a/integration/size-test/BUILD.bazel +++ b/integration/size-test/BUILD.bazel @@ -11,6 +11,8 @@ exports_files([ ts_library( name = "check-size", srcs = ["check-size.ts"], + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", deps = [ "@npm//@bazel/runfiles", "@npm//@types/node", diff --git a/package.json b/package.json index 79a97f9bb76e..f3b6adb12db6 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "integration-tests:size-test": "bazel test //integration/size-test/...", "check-mdc-tests": "ts-node --project scripts/tsconfig.json scripts/check-mdc-tests.ts", "check-mdc-exports": "ts-node --project scripts/tsconfig.json scripts/check-mdc-exports.ts", - "check-tooling-setup": "yarn tsc --project tools/tsconfig-ci.json && yarn tsc --project .ng-dev/tsconfig.json", + "check-tooling-setup": "yarn tsc --project tools/tsconfig.json && yarn tsc --project .ng-dev/tsconfig.json", "tsc": "node ./node_modules/typescript/bin/tsc", "prepare": "husky install" }, diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index c86b4688e376..471fe3315a43 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "outDir": "../dist/dev-infra-scripts", - "target": "es2015", - "lib": ["es2016"], + "target": "es2020", + "lib": ["es2020"], "moduleResolution": "node", "types": ["node"], "strict": true, diff --git a/src/bazel-tsconfig-build.json b/src/bazel-tsconfig-build.json index a0507592a756..d67e14706e12 100644 --- a/src/bazel-tsconfig-build.json +++ b/src/bazel-tsconfig-build.json @@ -20,6 +20,7 @@ "noImplicitThis": true, "importHelpers": true, "strictBindCallApply": true, + "esModuleInterop": true, "newLine": "lf", // Bazel either uses "umd" or "esnext". We replicate this here for IDE support. // https://github.com/bazelbuild/rules_typescript/blob/master/internal/common/tsconfig.bzl#L199 @@ -27,16 +28,14 @@ "moduleResolution": "node", "sourceMap": true, "inlineSources": true, - "target": "es2015", - "lib": ["es2015", "dom"], + "target": "es2020", + "lib": ["es2020", "dom"], "skipLibCheck": true, "types": ["tslib"] }, "bazelOptions": { // Note: We can remove this once we fully switched away from Gulp. Currently we still set // some options here just in favor of the standard tsconfig's which extending this one. - "suppressTsconfigOverrideWarnings": true, - // See https://github.com/angular/angular/issues/29107 - "devmodeTargetOverride": "es5" + "suppressTsconfigOverrideWarnings": true } } diff --git a/src/bazel-tsconfig-test.json b/src/bazel-tsconfig-test.json index f2595e439c07..123be220a9b5 100644 --- a/src/bazel-tsconfig-test.json +++ b/src/bazel-tsconfig-test.json @@ -8,8 +8,6 @@ "types": ["jasmine"] }, "bazelOptions": { - "suppressTsconfigOverrideWarnings": true, - // See https://github.com/angular/angular/issues/29107 - "devmodeTargetOverride": "es5" + "suppressTsconfigOverrideWarnings": true } } diff --git a/src/cdk/schematics/BUILD.bazel b/src/cdk/schematics/BUILD.bazel index 991571b1d295..2a040a797c83 100644 --- a/src/cdk/schematics/BUILD.bazel +++ b/src/cdk/schematics/BUILD.bazel @@ -22,8 +22,8 @@ ts_library( "testing/**/*.ts", ], ), - # Schematics do not need to run in browsers and can use `commonjs` - # as format instead the default `umd` format. + # Schematics can not yet run in ESM module. For now we continue to use CommonJS. + # TODO(ESM): remove this once the Angular CLI supports ESM schematics. devmode_module = "commonjs", prodmode_module = "commonjs", tsconfig = ":tsconfig.json", @@ -73,6 +73,10 @@ ts_library( "**/files/**/*.spec.ts", ], ), + # Schematics can not yet run in ESM module. For now we continue to use CommonJS. + # TODO(ESM): remove this once the Angular CLI supports ESM schematics. + devmode_module = "commonjs", + prodmode_module = "commonjs", tsconfig = ":tsconfig.json", deps = [ ":schematics", diff --git a/src/cdk/schematics/testing/BUILD.bazel b/src/cdk/schematics/testing/BUILD.bazel index 2c0b39000e5b..d2daadf07a94 100644 --- a/src/cdk/schematics/testing/BUILD.bazel +++ b/src/cdk/schematics/testing/BUILD.bazel @@ -6,8 +6,8 @@ ts_library( name = "testing", testonly = True, srcs = glob(["**/*.ts"]), - # Schematics do not need to run in browsers and can use `commonjs` - # as format instead the default `umd` format. + # Schematics can not yet run in ESM module. For now we continue to use CommonJS. + # TODO(ESM): remove this once the Angular CLI supports ESM schematics. devmode_module = "commonjs", prodmode_module = "commonjs", tsconfig = "tsconfig.json", diff --git a/src/cdk/schematics/update-tool/BUILD.bazel b/src/cdk/schematics/update-tool/BUILD.bazel index b21b742c7e4d..997c4e84676f 100644 --- a/src/cdk/schematics/update-tool/BUILD.bazel +++ b/src/cdk/schematics/update-tool/BUILD.bazel @@ -5,8 +5,8 @@ package(default_visibility = ["//visibility:public"]) ts_library( name = "update-tool", srcs = glob(["**/*.ts"]), - # Schematics do not need to run in browsers and can use `commonjs` - # as format instead the default `umd` format. + # Schematics can not yet run in ESM module. For now we continue to use CommonJS. + # TODO(ESM): remove this once the Angular CLI supports ESM schematics. devmode_module = "commonjs", prodmode_module = "commonjs", tsconfig = ":tsconfig.json", diff --git a/src/cdk/testing/tests/BUILD.bazel b/src/cdk/testing/tests/BUILD.bazel index 5237f7babb97..39f630381694 100644 --- a/src/cdk/testing/tests/BUILD.bazel +++ b/src/cdk/testing/tests/BUILD.bazel @@ -82,6 +82,8 @@ ts_library( name = "webdriver_test_sources", testonly = True, srcs = ["webdriver.e2e.spec.ts"], + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", deps = [ ":cross_environment_specs", ":test_harnesses", diff --git a/src/components-examples/material/datepicker/BUILD.bazel b/src/components-examples/material/datepicker/BUILD.bazel index 3a6f5d594831..024498433387 100644 --- a/src/components-examples/material/datepicker/BUILD.bazel +++ b/src/components-examples/material/datepicker/BUILD.bazel @@ -1,4 +1,3 @@ -load("@npm//@bazel/typescript:index.bzl", "ts_config") load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite") package(default_visibility = ["//visibility:public"]) @@ -13,7 +12,6 @@ ng_module( "**/*.html", "**/*.css", ]), - tsconfig = ":tsconfig", deps = [ "//src/cdk/testing", "//src/cdk/testing/testbed", @@ -33,12 +31,6 @@ ng_module( ], ) -ts_config( - name = "tsconfig", - src = "tsconfig-build.json", - deps = ["//src:bazel-tsconfig-build.json"], -) - filegroup( name = "source-files", srcs = glob([ diff --git a/src/components-examples/tsconfig.json b/src/components-examples/tsconfig.json index f648d03d233d..ca771107b710 100644 --- a/src/components-examples/tsconfig.json +++ b/src/components-examples/tsconfig.json @@ -2,8 +2,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - // Needed for Moment.js since it doesn't have a default export. - "allowSyntheticDefaultImports": true, "rootDir": "..", "baseUrl": ".", "paths": { diff --git a/src/dev-app/tsconfig.json b/src/dev-app/tsconfig.json index 3af9d2cb05c7..7e17e7c5ce54 100644 --- a/src/dev-app/tsconfig.json +++ b/src/dev-app/tsconfig.json @@ -3,7 +3,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { // Needed for Moment.js since it doesn't have a default export. - "allowSyntheticDefaultImports": true, "rootDir": "..", "baseUrl": ".", "paths": { diff --git a/src/material-moment-adapter/BUILD.bazel b/src/material-moment-adapter/BUILD.bazel index 49ca16b422f2..d38f21e3d167 100644 --- a/src/material-moment-adapter/BUILD.bazel +++ b/src/material-moment-adapter/BUILD.bazel @@ -1,4 +1,3 @@ -load("@npm//@bazel/typescript:index.bzl", "ts_config") load("//tools:defaults.bzl", "ng_module", "ng_package", "ng_test_library", "ng_web_test_suite") package(default_visibility = ["//visibility:public"]) @@ -9,9 +8,6 @@ ng_module( ["**/*.ts"], exclude = ["**/*.spec.ts"], ), - # We need a custom tsconfig that allows synthetic default imports. This is - # because "moment" does not have a typed default import. - tsconfig = ":tsconfig", deps = [ "//src:dev_mode_types", "//src/material/core", diff --git a/src/material-moment-adapter/tsconfig.json b/src/material-moment-adapter/tsconfig.json index 7c93f175485f..a8acc041c9ca 100644 --- a/src/material-moment-adapter/tsconfig.json +++ b/src/material-moment-adapter/tsconfig.json @@ -2,8 +2,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - // Needed for Moment.js since it doesn't have a default export. - "allowSyntheticDefaultImports": true, "rootDir": "..", "baseUrl": ".", "paths": { diff --git a/src/material/core/theming/tests/BUILD.bazel b/src/material/core/theming/tests/BUILD.bazel index 4c2725df97f2..acc20079a9dc 100644 --- a/src/material/core/theming/tests/BUILD.bazel +++ b/src/material/core/theming/tests/BUILD.bazel @@ -44,6 +44,8 @@ ts_library( srcs = [ "theming-api.spec.ts", ], + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", deps = [ "//tools/postcss", "@npm//@types/jasmine", diff --git a/src/material/schematics/BUILD.bazel b/src/material/schematics/BUILD.bazel index 950f525a914d..4c75347dd4cd 100644 --- a/src/material/schematics/BUILD.bazel +++ b/src/material/schematics/BUILD.bazel @@ -71,12 +71,15 @@ ts_library( "ng-generate/*/files/**/*.spec.ts", ], ), + # Schematics can not yet run in ESM module. For now we continue to use CommonJS. + # TODO(ESM): remove this once the Angular CLI supports ESM schematics. + devmode_module = "commonjs", + prodmode_module = "commonjs", tsconfig = ":tsconfig.json", deps = [ ":schematics", "//src/cdk/schematics", "//src/cdk/schematics/testing", - "//src/cdk/testing/private", "@npm//@angular-devkit/core", "@npm//@angular-devkit/schematics", "@npm//@schematics/angular", diff --git a/src/material/schematics/ng-update/test-cases/v9/misc/hammer-migration-v9.spec.ts b/src/material/schematics/ng-update/test-cases/v9/misc/hammer-migration-v9.spec.ts index a2b40eaf515b..fa417f39b052 100644 --- a/src/material/schematics/ng-update/test-cases/v9/misc/hammer-migration-v9.spec.ts +++ b/src/material/schematics/ng-update/test-cases/v9/misc/hammer-migration-v9.spec.ts @@ -1,10 +1,30 @@ import {SchematicTestRunner, UnitTestTree} from '@angular-devkit/schematics/testing'; -import {dedent} from '../../../../../../cdk/testing/private'; import {addPackageToPackageJson} from '@angular/cdk/schematics/ng-add/package-config'; import {createTestCaseSetup, resolveBazelPath} from '@angular/cdk/schematics/testing'; import {readFileSync} from 'fs'; import {MIGRATION_PATH} from '../../../../paths'; +// Copied from `cdk/testing/private` which is ESM-only at this point. We temporarily copy +// this helper as the ESM/CJS interop for schematic code with `cdk/testing/private` is +// significantly more difficult and prone to mistakes with file resolution in devkit rules. +// TODO(ESM): use the helper from `cdk/testing` when devmode is equal to prodmode. +export function dedent(strings: TemplateStringsArray, ...values: any[]) { + let joinedString = ''; + for (let i = 0; i < values.length; i++) { + joinedString += `${strings[i]}${values[i]}`; + } + joinedString += strings[strings.length - 1]; + + const matches = joinedString.match(/^[ \t]*(?=\S)/gm); + if (matches === null) { + return joinedString; + } + + const minLineIndent = Math.min(...matches.map(el => el.length)); + const omitMinIndentRegex = new RegExp(`^[ \\t]{${minLineIndent}}`, 'gm'); + return minLineIndent > 0 ? joinedString.replace(omitMinIndentRegex, '') : joinedString; +} + interface PackageJson { dependencies: Record; diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 1cc2a88429c0..5d272bdf925b 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -57,7 +57,7 @@ def sass_library(**kwargs): def npm_sass_library(**kwargs): _npm_sass_library(**kwargs) -def ts_library(tsconfig = None, deps = [], testonly = False, **kwargs): +def ts_library(tsconfig = None, deps = [], testonly = False, devmode_module = None, **kwargs): # Add tslib because we use import helpers for all public packages. local_deps = ["@npm//tslib"] + deps @@ -74,6 +74,14 @@ def ts_library(tsconfig = None, deps = [], testonly = False, **kwargs): # NodeJS executions, by activating the Bazel NodeJS linker. # See: https://github.com/bazelbuild/rules_nodejs/pull/2799. package_name = module_name, + # For prodmode, the target is set to `ES2020`. `@bazel/typecript` sets `ES2015` by default. Note + # that this should be in sync with the `ng_module` tsconfig generation to emit proper APF v13. + # https://github.com/bazelbuild/rules_nodejs/blob/901df3868e3ceda177d3ed181205e8456a5592ea/third_party/github.com/bazelbuild/rules_typescript/internal/common/tsconfig.bzl#L195 + prodmode_target = "es2020", + # We also set devmode output to the same settings as prodmode as a first step in combining + # devmode and prodmode output. We will not rely on AMD output anyway due to the linker processing. + devmode_target = "es2020", + devmode_module = devmode_module if devmode_module != None else "esnext", tsconfig = tsconfig, testonly = testonly, deps = local_deps, diff --git a/tools/dev-server/BUILD.bazel b/tools/dev-server/BUILD.bazel index d8d8fcd27603..7554504f028b 100644 --- a/tools/dev-server/BUILD.bazel +++ b/tools/dev-server/BUILD.bazel @@ -12,6 +12,8 @@ ts_library( "ibazel.ts", "main.ts", ], + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", deps = [ "@npm//@types/browser-sync", "@npm//@types/minimist", diff --git a/tools/dev-server/dev-server.ts b/tools/dev-server/dev-server.ts index ccb5e94648e7..d19f1cb099f9 100644 --- a/tools/dev-server/dev-server.ts +++ b/tools/dev-server/dev-server.ts @@ -7,10 +7,10 @@ */ import {readFileSync, existsSync} from 'fs'; -import * as browserSync from 'browser-sync'; -import * as http from 'http'; -import * as path from 'path'; -import * as send from 'send'; +import browserSync from 'browser-sync'; +import http from 'http'; +import path from 'path'; +import send from 'send'; /** * Dev Server implementation that uses browser-sync internally. This dev server diff --git a/tools/dev-server/main.ts b/tools/dev-server/main.ts index b1af366d84af..b6a341fc72bd 100644 --- a/tools/dev-server/main.ts +++ b/tools/dev-server/main.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import * as minimist from 'minimist'; +import minimist from 'minimist'; import {DevServer} from './dev-server'; import {setupBazelWatcherSupport} from './ibazel'; diff --git a/tools/dgeni/BUILD.bazel b/tools/dgeni/BUILD.bazel index 466845caa4e3..e7722cc021c8 100644 --- a/tools/dgeni/BUILD.bazel +++ b/tools/dgeni/BUILD.bazel @@ -19,6 +19,8 @@ nodejs_binary( ts_library( name = "sources", srcs = glob(["**/*.ts"]), + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", tsconfig = ":tsconfig.json", deps = [ "//tools/highlight-files:sources", diff --git a/tools/dgeni/tsconfig.json b/tools/dgeni/tsconfig.json index 240200a95b73..440732d118c5 100644 --- a/tools/dgeni/tsconfig.json +++ b/tools/dgeni/tsconfig.json @@ -2,8 +2,9 @@ "compilerOptions": { "noUnusedParameters": false, "noUnusedLocals": false, - "lib": ["es2015", "dom", "es2016.array.include"], + "lib": ["es2020", "dom"], "moduleResolution": "node", + "esModuleInterop": true, "strictNullChecks": true, "noImplicitReturns": true, "strictFunctionTypes": true, @@ -11,7 +12,7 @@ "noImplicitAny": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, - "target": "es2015", + "target": "es2020", "types": [ "node" ] diff --git a/tools/example-module/BUILD.bazel b/tools/example-module/BUILD.bazel index dce810cf3344..3feffafadc40 100644 --- a/tools/example-module/BUILD.bazel +++ b/tools/example-module/BUILD.bazel @@ -6,6 +6,8 @@ package(default_visibility = ["//visibility:public"]) ts_library( name = "example-module-lib", srcs = glob(["**/*.ts"]), + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", tsconfig = ":tsconfig.json", deps = [ "@npm//@types/node", diff --git a/tools/example-module/tsconfig.json b/tools/example-module/tsconfig.json index 13dba047bbcf..cb5599973db5 100644 --- a/tools/example-module/tsconfig.json +++ b/tools/example-module/tsconfig.json @@ -1,8 +1,9 @@ { "compilerOptions": { - "lib": ["es2015"], + "lib": ["es2020"], "module": "commonjs", - "target": "es5", + "esModuleInterop": true, + "target": "es2020", "sourceMap": true, "types": ["node"] }, diff --git a/tools/highlight-files/BUILD.bazel b/tools/highlight-files/BUILD.bazel index bb8ef8094849..8200dbbcf5d9 100644 --- a/tools/highlight-files/BUILD.bazel +++ b/tools/highlight-files/BUILD.bazel @@ -6,6 +6,8 @@ package(default_visibility = ["//visibility:public"]) ts_library( name = "sources", srcs = glob(["**/*.ts"]), + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", tsconfig = ":tsconfig.json", deps = [ "//tools/region-parser", diff --git a/tools/highlight-files/tsconfig.json b/tools/highlight-files/tsconfig.json index 13dba047bbcf..cb5599973db5 100644 --- a/tools/highlight-files/tsconfig.json +++ b/tools/highlight-files/tsconfig.json @@ -1,8 +1,9 @@ { "compilerOptions": { - "lib": ["es2015"], + "lib": ["es2020"], "module": "commonjs", - "target": "es5", + "esModuleInterop": true, + "target": "es2020", "sourceMap": true, "types": ["node"] }, diff --git a/tools/linker-process/BUILD.bazel b/tools/linker-process/BUILD.bazel index ee77beb5cfe1..a299a27fe58c 100644 --- a/tools/linker-process/BUILD.bazel +++ b/tools/linker-process/BUILD.bazel @@ -6,6 +6,8 @@ package(default_visibility = ["//visibility:public"]) ts_library( name = "sources", srcs = glob(["**/*.ts"]), + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", deps = [ "@npm//@angular/compiler-cli", "@npm//@babel/core", diff --git a/tools/markdown-to-html/BUILD.bazel b/tools/markdown-to-html/BUILD.bazel index dccf642078ba..177002d0e6e2 100644 --- a/tools/markdown-to-html/BUILD.bazel +++ b/tools/markdown-to-html/BUILD.bazel @@ -11,6 +11,8 @@ ts_library( "*.spec.ts", ], ), + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", tsconfig = ":tsconfig.json", deps = [ "//tools/highlight-files:sources", diff --git a/tools/markdown-to-html/transform-markdown.ts b/tools/markdown-to-html/transform-markdown.ts index fcadcec8388e..19d15b27183d 100644 --- a/tools/markdown-to-html/transform-markdown.ts +++ b/tools/markdown-to-html/transform-markdown.ts @@ -4,7 +4,7 @@ */ import {readFileSync, writeFileSync} from 'fs'; -import * as marked from 'marked'; +import marked from 'marked'; import {join} from 'path'; import {highlightCodeBlock} from '../highlight-files/highlight-code-block'; import {DocsMarkdownRenderer} from './docs-marked-renderer'; diff --git a/tools/markdown-to-html/tsconfig.json b/tools/markdown-to-html/tsconfig.json index 69768c4fcf79..4c6a8a27c956 100644 --- a/tools/markdown-to-html/tsconfig.json +++ b/tools/markdown-to-html/tsconfig.json @@ -1,8 +1,9 @@ { "compilerOptions": { - "lib": ["es2015"], + "lib": ["es2020"], "module": "commonjs", - "target": "es5", + "target": "es2020", + "esModuleInterop": true, "sourceMap": true, "types": [ "jasmine", diff --git a/tools/package-docs-content/BUILD.bazel b/tools/package-docs-content/BUILD.bazel index 22b2b548c738..334ef9d6697e 100644 --- a/tools/package-docs-content/BUILD.bazel +++ b/tools/package-docs-content/BUILD.bazel @@ -18,6 +18,8 @@ nodejs_binary( ts_library( name = "sources", srcs = glob(["**/*.ts"]), + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", tsconfig = ":tsconfig.json", deps = [ "@npm//@types/fs-extra", diff --git a/tools/package-docs-content/tsconfig.json b/tools/package-docs-content/tsconfig.json index 13dba047bbcf..8149f331fae2 100644 --- a/tools/package-docs-content/tsconfig.json +++ b/tools/package-docs-content/tsconfig.json @@ -1,8 +1,9 @@ { "compilerOptions": { - "lib": ["es2015"], + "lib": ["es2020"], "module": "commonjs", - "target": "es5", + "target": "es2020", + "esModuleInterop": true, "sourceMap": true, "types": ["node"] }, diff --git a/tools/postcss/BUILD.bazel b/tools/postcss/BUILD.bazel index f38653947e38..70bf51398e9f 100644 --- a/tools/postcss/BUILD.bazel +++ b/tools/postcss/BUILD.bazel @@ -7,6 +7,8 @@ ts_library( srcs = [ "compare-nodes.ts", ], + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", deps = [ "@npm//postcss", ], diff --git a/tools/postinstall/apply-patches.js b/tools/postinstall/apply-patches.js index 626773adf4e9..b9f97fd04b00 100644 --- a/tools/postinstall/apply-patches.js +++ b/tools/postinstall/apply-patches.js @@ -14,7 +14,7 @@ const chalk = require('chalk'); * Version of the post install patch. Needs to be incremented when * existing patches or edits have been modified. */ -const PATCH_VERSION = 9; +const PATCH_VERSION = 11; /** Path to the project directory. */ const projectDir = path.join(__dirname, '../..'); @@ -59,6 +59,8 @@ function applyPatches() { `, 'node_modules/@angular/compiler-cli/bundles/index.js'); + // Switches the devmode output for Angular Bazel to ES2020 target and module. + applyPatch(path.join(__dirname, './devmode-es2020-bazel.patch')); // More info in https://github.com/angular/angular/pull/33786 shelljs.rm('-rf', [ diff --git a/tools/postinstall/devmode-es2020-bazel.patch b/tools/postinstall/devmode-es2020-bazel.patch new file mode 100644 index 000000000000..18e1a1facf23 --- /dev/null +++ b/tools/postinstall/devmode-es2020-bazel.patch @@ -0,0 +1,14 @@ +diff --git node_modules/@angular/bazel/src/ng_module/ng_module.bzl node_modules/@angular/bazel//src/ng_module/ng_module.bzl +index 3520997..adf46e8 100644 +--- node_modules/@angular/bazel//src/ng_module/ng_module.bzl ++++ node_modules/@angular/bazel//src/ng_module/ng_module.bzl +@@ -401,6 +401,9 @@ def _ngc_tsconfig(ctx, files, srcs, **kwargs): + if not is_devmode: + # Note: Keep in sync with the `prodmode_target` for `ts_library` in `tools/defaults.bzl` + tsconfig["compilerOptions"]["target"] = "es2020" ++ else: ++ tsconfig["compilerOptions"]["target"] = "es2020" ++ tsconfig["compilerOptions"]["module"] = "esnext" + + return tsconfig + diff --git a/tools/region-parser/BUILD.bazel b/tools/region-parser/BUILD.bazel index 65f46519ca05..8228e29ae3c0 100644 --- a/tools/region-parser/BUILD.bazel +++ b/tools/region-parser/BUILD.bazel @@ -5,6 +5,8 @@ package(default_visibility = ["//visibility:public"]) ts_library( name = "region-parser", srcs = glob(["**/*.ts"]), + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", tsconfig = ":tsconfig.json", deps = [ "@npm//@types/node", diff --git a/tools/region-parser/tsconfig.json b/tools/region-parser/tsconfig.json index 13dba047bbcf..f72495569730 100644 --- a/tools/region-parser/tsconfig.json +++ b/tools/region-parser/tsconfig.json @@ -1,8 +1,9 @@ { "compilerOptions": { - "lib": ["es2015"], + "lib": ["es2020"], + "esModuleInterop": true, "module": "commonjs", - "target": "es5", + "target": "es2020", "sourceMap": true, "types": ["node"] }, diff --git a/tools/server-test/BUILD.bazel b/tools/server-test/BUILD.bazel index 443ef96d74b3..57a1a4f5c3d8 100644 --- a/tools/server-test/BUILD.bazel +++ b/tools/server-test/BUILD.bazel @@ -5,6 +5,8 @@ package(default_visibility = ["//visibility:public"]) ts_library( name = "test_runner_lib", srcs = ["test-runner.ts"], + # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. + devmode_module = "commonjs", deps = [ "@npm//@bazel/runfiles", "@npm//@types/node", diff --git a/tools/stylelint/no-prefixes/index.ts b/tools/stylelint/no-prefixes/index.ts index ef109d22d413..7284f050c8c9 100644 --- a/tools/stylelint/no-prefixes/index.ts +++ b/tools/stylelint/no-prefixes/index.ts @@ -1,5 +1,5 @@ import {createPlugin, utils} from 'stylelint'; -import * as minimatch from 'minimatch'; +import minimatch from 'minimatch'; import {NeedsPrefix} from './needs-prefix'; const parseSelector = require('stylelint/lib/utils/parseSelector'); diff --git a/tools/tsconfig-ci.json b/tools/tsconfig.json similarity index 89% rename from tools/tsconfig-ci.json rename to tools/tsconfig.json index 40bc35dc8a28..cfeb588e9778 100644 --- a/tools/tsconfig-ci.json +++ b/tools/tsconfig.json @@ -6,10 +6,11 @@ "include": ["./**/*.ts"], "compilerOptions": { "outDir": "../dist/tools", - "target": "es2016", + "target": "es2020", "module": "commonjs", "moduleResolution": "node", - "lib": ["es2016"], + "esModuleInterop": true, + "lib": ["es2020"], "skipLibCheck": true, // Don't emit to the file system, because we only want to check for compilation errors. "noEmit": true, diff --git a/tools/tslint-rules/lightweightTokensRule.ts b/tools/tslint-rules/lightweightTokensRule.ts index 27cf513a4069..be38b56acd65 100644 --- a/tools/tslint-rules/lightweightTokensRule.ts +++ b/tools/tslint-rules/lightweightTokensRule.ts @@ -1,4 +1,4 @@ -import * as minimatch from 'minimatch'; +import minimatch from 'minimatch'; import * as path from 'path'; import * as Lint from 'tslint'; import * as ts from 'typescript'; diff --git a/tools/tslint-rules/noCrossEntryPointRelativeImportsRule.ts b/tools/tslint-rules/noCrossEntryPointRelativeImportsRule.ts index 957d62bd2c90..31fa030e17cf 100644 --- a/tools/tslint-rules/noCrossEntryPointRelativeImportsRule.ts +++ b/tools/tslint-rules/noCrossEntryPointRelativeImportsRule.ts @@ -1,5 +1,5 @@ import {existsSync} from 'fs'; -import * as minimatch from 'minimatch'; +import minimatch from 'minimatch'; import {dirname, join, normalize, relative, resolve} from 'path'; import * as Lint from 'tslint'; import * as ts from 'typescript'; diff --git a/tools/tslint-rules/noLifecycleInvocationRule.ts b/tools/tslint-rules/noLifecycleInvocationRule.ts index 18a43b889c74..1bedda20fd77 100644 --- a/tools/tslint-rules/noLifecycleInvocationRule.ts +++ b/tools/tslint-rules/noLifecycleInvocationRule.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as Lint from 'tslint'; import * as ts from 'typescript'; -import * as minimatch from 'minimatch'; +import minimatch from 'minimatch'; const hooks = new Set([ 'ngOnChanges', diff --git a/tools/tslint-rules/requireLicenseBannerRule.ts b/tools/tslint-rules/requireLicenseBannerRule.ts index 418ee25a6547..63d469b1a934 100644 --- a/tools/tslint-rules/requireLicenseBannerRule.ts +++ b/tools/tslint-rules/requireLicenseBannerRule.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as ts from 'typescript'; import * as Lint from 'tslint'; -import * as minimatch from 'minimatch'; +import minimatch from 'minimatch'; const buildConfig = require('../../build-config'); diff --git a/tools/tslint-rules/validateDecoratorsRule.ts b/tools/tslint-rules/validateDecoratorsRule.ts index e2fa11fa0efe..fad4cf5aee34 100644 --- a/tools/tslint-rules/validateDecoratorsRule.ts +++ b/tools/tslint-rules/validateDecoratorsRule.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as ts from 'typescript'; import * as Lint from 'tslint'; -import * as minimatch from 'minimatch'; +import minimatch from 'minimatch'; /** * Rule that enforces certain decorator properties to be defined and to match a pattern. diff --git a/tsconfig.json b/tsconfig.json index efe543ab58c9..eb16993b1d3c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,10 +4,9 @@ "compilerOptions": { "outDir": "./dist/packages/all", "experimentalDecorators": true, - // Bazel either uses "umd" or "esnext". We replicate this here for IDE support. - // https://github.com/bazelbuild/rules_typescript/blob/master/internal/common/tsconfig.bzl#L199 "module": "esnext", "moduleResolution": "node", + "esModuleInterop": true, "noUnusedParameters": false, "noFallthroughCasesInSwitch": true, "noUnusedLocals": false, @@ -19,8 +18,8 @@ "noImplicitThis": true, "skipLibCheck": true, "strictBindCallApply": true, - "target": "es2015", - "lib": ["es5", "es2015", "dom"], + "target": "es2020", + "lib": ["es2020", "dom"], "types": ["jasmine"], "baseUrl": ".", "paths": { From 3ad78add9a861fe1a1c207808d141d2dcd59d3cc Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:42:03 +0200 Subject: [PATCH 07/21] build: remove all usages of the `entry_point` attribute on `ng_package` For APF v13, we have removed the `entry_point` attribute from the `ng_package` rule. This attribute did not do what it described. i.e. it was not responsible for determining the primary package entry-point. This commit removes all of these usages as they are no longer valid, nor needed. --- src/cdk-experimental/BUILD.bazel | 1 - src/cdk/BUILD.bazel | 1 - src/components-examples/BUILD.bazel | 1 - src/google-maps/BUILD.bazel | 2 -- src/material-date-fns-adapter/BUILD.bazel | 1 - src/material-experimental/BUILD.bazel | 1 - src/material-luxon-adapter/BUILD.bazel | 1 - src/material-moment-adapter/BUILD.bazel | 1 - src/material/BUILD.bazel | 2 -- src/youtube-player/BUILD.bazel | 2 -- 10 files changed, 13 deletions(-) diff --git a/src/cdk-experimental/BUILD.bazel b/src/cdk-experimental/BUILD.bazel index 67c4c877790b..f9804d89bcb9 100644 --- a/src/cdk-experimental/BUILD.bazel +++ b/src/cdk-experimental/BUILD.bazel @@ -15,7 +15,6 @@ ts_library( ng_package( name = "npm_package", srcs = ["package.json"], - entry_point = ":public-api.ts", tags = ["release-package"], deps = CDK_EXPERIMENTAL_TARGETS, ) diff --git a/src/cdk/BUILD.bazel b/src/cdk/BUILD.bazel index c750140fdbba..5d254c5a4a94 100644 --- a/src/cdk/BUILD.bazel +++ b/src/cdk/BUILD.bazel @@ -51,7 +51,6 @@ ng_package( name = "npm_package", srcs = ["package.json"], data = [":sass_index"] + prebuiltStyleTargets + CDK_SCSS_LIBS, - entry_point = ":public-api.ts", nested_packages = [ "//src/cdk/schematics:npm_package", ], diff --git a/src/components-examples/BUILD.bazel b/src/components-examples/BUILD.bazel index 396aea0bfe70..e2e395246ad1 100644 --- a/src/components-examples/BUILD.bazel +++ b/src/components-examples/BUILD.bazel @@ -111,7 +111,6 @@ package_docs_content( ng_package( name = "npm_package", srcs = ["package.json"], - entry_point = ":public-api.ts", # this is a workaround to store a tree artifact in the ng_package. # ng_package does not properly handle tree artifacts currently so we escalate to nested_packages nested_packages = [":docs-content"], diff --git a/src/google-maps/BUILD.bazel b/src/google-maps/BUILD.bazel index d8fd820bb1e6..fee2c1fa8488 100644 --- a/src/google-maps/BUILD.bazel +++ b/src/google-maps/BUILD.bazel @@ -23,8 +23,6 @@ ng_module( ng_package( name = "npm_package", srcs = ["package.json"], - entry_point = ":public-api.ts", - entry_point_name = "google-maps", tags = ["release-package"], deps = [":google-maps"], ) diff --git a/src/material-date-fns-adapter/BUILD.bazel b/src/material-date-fns-adapter/BUILD.bazel index a779a3c52c8f..bbd0b8b2c0f5 100644 --- a/src/material-date-fns-adapter/BUILD.bazel +++ b/src/material-date-fns-adapter/BUILD.bazel @@ -58,7 +58,6 @@ esbuild_amd( ng_package( name = "npm_package", srcs = ["package.json"], - entry_point = ":public-api.ts", tags = ["release-package"], deps = [":material-date-fns-adapter"], ) diff --git a/src/material-experimental/BUILD.bazel b/src/material-experimental/BUILD.bazel index 0fe9535ee414..fabb2dc7df0a 100644 --- a/src/material-experimental/BUILD.bazel +++ b/src/material-experimental/BUILD.bazel @@ -41,7 +41,6 @@ ng_package( ":theming_bundle", ":theming_scss_lib", ], - entry_point = ":public-api.ts", tags = ["release-package"], deps = MATERIAL_EXPERIMENTAL_TARGETS + MATERIAL_EXPERIMENTAL_TESTING_TARGETS, ) diff --git a/src/material-luxon-adapter/BUILD.bazel b/src/material-luxon-adapter/BUILD.bazel index 5117ec0be8c8..bbe1653db91b 100644 --- a/src/material-luxon-adapter/BUILD.bazel +++ b/src/material-luxon-adapter/BUILD.bazel @@ -47,7 +47,6 @@ ng_web_test_suite( ng_package( name = "npm_package", srcs = ["package.json"], - entry_point = ":public-api.ts", tags = ["release-package"], deps = [":material-luxon-adapter"], ) diff --git a/src/material-moment-adapter/BUILD.bazel b/src/material-moment-adapter/BUILD.bazel index d38f21e3d167..c350fb286bfb 100644 --- a/src/material-moment-adapter/BUILD.bazel +++ b/src/material-moment-adapter/BUILD.bazel @@ -52,7 +52,6 @@ ng_web_test_suite( ng_package( name = "npm_package", srcs = ["package.json"], - entry_point = ":public-api.ts", tags = ["release-package"], deps = [":material-moment-adapter"], ) diff --git a/src/material/BUILD.bazel b/src/material/BUILD.bazel index 113b6ee0c953..6da71f21b5d7 100644 --- a/src/material/BUILD.bazel +++ b/src/material/BUILD.bazel @@ -43,8 +43,6 @@ ng_package( "//src/material/prebuilt-themes:pink-bluegrey", "//src/material/prebuilt-themes:purple-green", ] + MATERIAL_SCSS_LIBS, - entry_point = ":index.ts", - entry_point_name = "material", nested_packages = ["//src/material/schematics:npm_package"], tags = ["release-package"], deps = MATERIAL_TARGETS + MATERIAL_TESTING_TARGETS, diff --git a/src/youtube-player/BUILD.bazel b/src/youtube-player/BUILD.bazel index eaa79c409abb..0eb596ab52c6 100644 --- a/src/youtube-player/BUILD.bazel +++ b/src/youtube-player/BUILD.bazel @@ -29,8 +29,6 @@ ng_module( ng_package( name = "npm_package", srcs = ["package.json"], - entry_point = ":public-api.ts", - entry_point_name = "youtube-player", tags = ["release-package"], deps = [":youtube-player"], ) From fc744236d5c7371cdae6b6a6f0e1fb6eee43785a Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:43:31 +0200 Subject: [PATCH 08/21] build: make custom devserver work with e2e tests For APF v13, we will switch to the custom devserver we have used for the dev-app as well. We do this because the ConcatJS devserver is no longer needed due to us bundling the e2e-app. Note again: This is needed because FW packages do no longer ship UMD files, and we also need to consolidate our pre-built linker ESM bundles of the Angular framework packages. A bundler like ESBuild will do that job for us. It's fast enough that it's subjectively significantly faster than ConcatJS/RequireJS resolving deps at runtime in the browser.. --- src/e2e-app/start-devserver.js | 2 +- tools/dev-server/ibazel.ts | 5 +++++ tools/dev-server/index.bzl | 9 +++------ tools/dev-server/launcher_template.sh | 6 +----- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/e2e-app/start-devserver.js b/src/e2e-app/start-devserver.js index d44167fc00f7..3ea285578d12 100644 --- a/src/e2e-app/start-devserver.js +++ b/src/e2e-app/start-devserver.js @@ -10,7 +10,7 @@ const utils = require('@bazel/protractor/protractor-utils.js'); * starting up the devserver and updating the Protractor base URL to the proper port. */ module.exports = async function(config) { - const {port} = await utils.runServer(config.workspace, config.server, '-port', []); + const {port} = await utils.runServer(config.workspace, config.server, '--port', []); const baseUrl = `http://localhost:${port}`; const processedConfig = await protractor.browser.getProcessedConfig(); diff --git a/tools/dev-server/ibazel.ts b/tools/dev-server/ibazel.ts index 121a2c1955b6..ea3f5775f2d7 100644 --- a/tools/dev-server/ibazel.ts +++ b/tools/dev-server/ibazel.ts @@ -18,6 +18,11 @@ const ibazelNotifySuccessMessage = 'IBAZEL_BUILD_COMPLETED SUCCESS'; * over "stdin", the devserver can be reloaded. */ export function setupBazelWatcherSupport(server: DevServer) { + // If iBazel is not configured for this process, we do not setup the watcher. + if (process.env['IBAZEL_NOTIFY_CHANGES'] !== 'y') { + return; + } + // ibazel communicates via the stdin interface. const rl = createInterface({input: process.stdin, terminal: false}); diff --git a/tools/dev-server/index.bzl b/tools/dev-server/index.bzl index a8aec6f466fa..4dce8e08b653 100644 --- a/tools/dev-server/index.bzl +++ b/tools/dev-server/index.bzl @@ -41,7 +41,6 @@ def _dev_server_rule_impl(ctx): # into a string representing the command line arguments. It looks like bazel has some # internal logic to compute the string representation of "ctx.actions.args()". args = '--root_paths="%s" ' % ",".join(root_paths) - args += "--port=%s " % ctx.attr.port if ctx.attr.historyApiFallback: args += "--historyApiFallback " @@ -87,10 +86,6 @@ dev_server_rule = rule( This is helpful for single page applications using the HTML history API. """, ), - "port": attr.int( - default = 4200, - doc = """The port that the devserver will listen on.""", - ), "srcs": attr.label_list(allow_files = True, doc = """ Sources that should be available to the dev-server. This attribute can be used for explicit files. This attribute only uses the files exposed by the @@ -110,11 +105,12 @@ dev_server_rule = rule( request files through their manifest path: "my_workspace/src/dev-app/my-genfile". """ -def dev_server(name, testonly = False, tags = [], **kwargs): +def dev_server(name, testonly = False, port = 4200, tags = [], **kwargs): dev_server_rule( name = "%s_launcher" % name, visibility = ["//visibility:private"], tags = tags, + testonly = testonly, **kwargs ) @@ -125,5 +121,6 @@ def dev_server(name, testonly = False, tags = [], **kwargs): tags = tags + ["ibazel_notify_changes"], srcs = ["%s_launcher.sh" % name], data = [":%s_launcher" % name], + args = ["--port=%s" % port], testonly = testonly, ) diff --git a/tools/dev-server/launcher_template.sh b/tools/dev-server/launcher_template.sh index 07863b50eb10..c64c61a5adb0 100644 --- a/tools/dev-server/launcher_template.sh +++ b/tools/dev-server/launcher_template.sh @@ -14,10 +14,6 @@ source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e # --- end runfiles.bash initialization v2 --- -if [[ ! -z "RUNFILES_DIR" ]]; then - export RUNFILES_MANIFEST_ONLY="1" -fi - # Resolve the path of the dev-server binary. Note: usually we either need to # resolve the "nodejs_binary" executable with different file extensions on # windows, but since we already run this launcher as part of a "sh_binary", we @@ -26,4 +22,4 @@ devserverBin=$(rlocation "angular_material/tools/dev-server/dev-server_bin.sh") # Start the devserver with the given arguments. The arguments will be # substituted based on the rule attributes. -${devserverBin} TEMPLATED_args +${devserverBin} TEMPLATED_args "$@" From 873ca9f222da21a2e9573f735725b9843ba40f05 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:48:23 +0200 Subject: [PATCH 09/21] build: replace gulp setup with bundling script for legacy remote browser tests Replaces the legacy gulp setup with a simple script that runs the Angular compiler and ESBuild with the linker. This is simpler than switching the Gulp legacy output to properly deal with the FW packages using partial compilation output together with SystemJS. It has been a long goal removing SystemJS and the gulp tooling anyway, so this is a good chance for simplifying this code.. removing the need for all these additional tsconfig files; and additional configuration of the legacy gulp tooling when wiring up new packages. --- gulpfile.js | 24 -- package.json | 7 +- scripts/circleci/run-browserstack-tests.sh | 7 +- scripts/circleci/run-saucelabs-tests.sh | 7 +- scripts/create-legacy-tests-bundle.mjs | 217 ++++++++++++++++++ src/cdk-experimental/tsconfig-tests.json | 33 --- src/cdk/tsconfig-tests.json | 33 --- .../material/datepicker/tsconfig-build.json | 7 - src/google-maps/tsconfig-tests.json | 25 -- .../tsconfig-tests.json | 29 --- src/material-experimental/tsconfig-tests.json | 37 --- .../tsconfig-tests.json | 29 --- .../tsconfig-build.json | 7 - .../tsconfig-tests.json | 34 --- src/material/tsconfig-tests.json | 38 --- src/tsconfig-legacy.json | 32 +++ src/youtube-player/tsconfig-tests.json | 26 --- test/BUILD.bazel | 12 - test/karma-test-shim.js | 57 ----- test/karma.conf.js | 29 +-- tools/bazel-tools-tsconfig.json | 6 - tools/create-system-config.bzl | 43 ---- tools/gulp/gulpfile.ts | 27 --- tools/gulp/packages.ts | 13 -- tools/gulp/tasks/ci.ts | 8 - tools/gulp/tasks/clean.ts | 10 - tools/gulp/tasks/unit-test.ts | 76 ------ tools/gulp/tsconfig.json | 27 --- tools/package-tools/build-config.ts | 29 --- tools/package-tools/build-package.ts | 26 --- tools/package-tools/compile-entry-point.ts | 26 --- tools/package-tools/find-build-config.ts | 22 -- .../package-tools/gulp/build-scss-pipeline.ts | 17 -- tools/package-tools/gulp/build-tasks-gulp.ts | 60 ----- tools/package-tools/index.ts | 8 - tools/package-tools/inline-resources.ts | 56 ----- tools/package-tools/ts-compile.ts | 25 -- tools/rxjs/BUILD.bazel | 9 - tools/rxjs/rxjs_shims.js | 41 ---- tools/stylelint/loader-rule.js | 2 +- tools/system-config-tmpl.js | 177 -------------- tools/system-rxjs-operators.js | 23 -- tools/tslint-rules/tsLoaderRule.js | 2 +- 43 files changed, 266 insertions(+), 1157 deletions(-) delete mode 100644 gulpfile.js create mode 100644 scripts/create-legacy-tests-bundle.mjs delete mode 100644 src/cdk-experimental/tsconfig-tests.json delete mode 100644 src/cdk/tsconfig-tests.json delete mode 100644 src/components-examples/material/datepicker/tsconfig-build.json delete mode 100644 src/google-maps/tsconfig-tests.json delete mode 100644 src/material-date-fns-adapter/tsconfig-tests.json delete mode 100644 src/material-experimental/tsconfig-tests.json delete mode 100644 src/material-luxon-adapter/tsconfig-tests.json delete mode 100644 src/material-moment-adapter/tsconfig-build.json delete mode 100644 src/material-moment-adapter/tsconfig-tests.json delete mode 100644 src/material/tsconfig-tests.json create mode 100644 src/tsconfig-legacy.json delete mode 100644 src/youtube-player/tsconfig-tests.json delete mode 100644 test/karma-test-shim.js delete mode 100644 tools/bazel-tools-tsconfig.json delete mode 100644 tools/create-system-config.bzl delete mode 100644 tools/gulp/gulpfile.ts delete mode 100644 tools/gulp/packages.ts delete mode 100644 tools/gulp/tasks/ci.ts delete mode 100644 tools/gulp/tasks/clean.ts delete mode 100644 tools/gulp/tasks/unit-test.ts delete mode 100644 tools/gulp/tsconfig.json delete mode 100644 tools/package-tools/build-config.ts delete mode 100644 tools/package-tools/build-package.ts delete mode 100644 tools/package-tools/compile-entry-point.ts delete mode 100644 tools/package-tools/find-build-config.ts delete mode 100644 tools/package-tools/gulp/build-scss-pipeline.ts delete mode 100644 tools/package-tools/gulp/build-tasks-gulp.ts delete mode 100644 tools/package-tools/index.ts delete mode 100644 tools/package-tools/inline-resources.ts delete mode 100644 tools/package-tools/ts-compile.ts delete mode 100644 tools/rxjs/BUILD.bazel delete mode 100644 tools/rxjs/rxjs_shims.js delete mode 100644 tools/system-config-tmpl.js delete mode 100644 tools/system-rxjs-operators.js diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index d001b15e1cf2..000000000000 --- a/gulpfile.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -/** - * Load the TypeScript compiler, then load the TypeScript gulpfile which simply loads all - * the tasks. The tasks are really inside tools/gulp/tasks. - */ - -const path = require('path'); - -const projectDir = __dirname; -const tsconfigPath = path.join(projectDir, 'tools/gulp/tsconfig.json'); -const tsconfig = require(tsconfigPath); - -if (projectDir.includes(' ')) { - console.error('Error: Cannot run the Angular Material build tasks if the project is ' + - 'located in a directory with spaces in between. Please rename your project directory.'); - process.exit(1); -} - -// Register TS compilation. -require('ts-node').register({ - project: tsconfigPath -}); - -require('./tools/gulp/gulpfile'); diff --git a/package.json b/package.json index f3b6adb12db6..ec1981a38787 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "e2e": "bazel test //src/... --build_tag_filters=e2e --test_tag_filters=e2e --build_tests_only", "deploy-dev-app": "node ./scripts/deploy-dev-app.js", "breaking-changes": "ts-node --project scripts/tsconfig.json scripts/breaking-changes.ts", - "gulp": "gulp", "check-entry-point-setup": "node ./scripts/check-entry-point-setup.js", "check-package-externals": "ts-node --project scripts/tsconfig.json scripts/check-package-externals.ts", "format": "yarn ng-dev format changed", @@ -64,7 +63,6 @@ "material-components-web": "13.0.0-canary.860ad06a1.0", "rxjs": "^6.5.3", "rxjs-tslint-rules": "^4.33.1", - "systemjs": "0.19.43", "tslib": "^2.3.0", "zone.js": "~0.11.3" }, @@ -150,7 +148,6 @@ "@types/browser-sync": "^2.26.1", "@types/fs-extra": "^9.0.5", "@types/glob": "^7.1.3", - "@types/gulp": "4.0.8", "@types/inquirer": "^7.3.1", "@types/jasmine": "^3.6.0", "@types/luxon": "^1.27.0", @@ -176,12 +173,10 @@ "dgeni": "^0.4.11", "dgeni-packages": "^0.28.4", "diff": "^5.0.0", + "esbuild": "^0.13.3", "firebase-tools": "^9.2.1", "fs-extra": "^9.0.1", "glob": "^7.1.2", - "gulp": "^4.0.2", - "gulp-cli": "^2.3.0", - "gulp-dart-sass": "^1.0.2", "highlight.js": "^10.7.0", "husky": "^7.0.1", "inquirer": "^8.0.0", diff --git a/scripts/circleci/run-browserstack-tests.sh b/scripts/circleci/run-browserstack-tests.sh index 098969ecd46a..497371cdc1af 100755 --- a/scripts/circleci/run-browserstack-tests.sh +++ b/scripts/circleci/run-browserstack-tests.sh @@ -17,8 +17,11 @@ export BROWSER_STACK_ACCESS_KEY=`echo ${BROWSER_STACK_ACCESS_KEY} | rev` # by the Karma configuration script. export TEST_PLATFORM="browserstack" -# Run the unit tests on Browserstack with Karma. -yarn gulp ci:test +# Build the legacy tests +node ./scripts/create-legacy-tests-bundle.mjs + +# Run Karma +yarn karma start ./test/karma.conf.js --single-run # Wait for all sub processes to terminate properly. wait diff --git a/scripts/circleci/run-saucelabs-tests.sh b/scripts/circleci/run-saucelabs-tests.sh index 62ca05923245..93236b54c2c6 100755 --- a/scripts/circleci/run-saucelabs-tests.sh +++ b/scripts/circleci/run-saucelabs-tests.sh @@ -18,8 +18,11 @@ export SAUCE_ACCESS_KEY=`echo ${SAUCE_ACCESS_KEY} | rev` # by the Karma configuration script. export TEST_PLATFORM="saucelabs" -# Run the unit tests on Saucelabs with Karma. -yarn gulp ci:test +# Build the legacy tests +node ./scripts/create-legacy-tests-bundle.mjs + +# Run Karma +yarn karma start ./test/karma.conf.js --single-run # Kill the Saucelabs tunnel. This is necessary in order to avoid rate-limit # errors that cause the unit tests to be flaky. diff --git a/scripts/create-legacy-tests-bundle.mjs b/scripts/create-legacy-tests-bundle.mjs new file mode 100644 index 000000000000..eaea311483f9 --- /dev/null +++ b/scripts/create-legacy-tests-bundle.mjs @@ -0,0 +1,217 @@ +#!/usr/bin/env node + +import {ConsoleLogger, LogLevel, NodeJSFileSystem} from '@angular/compiler-cli'; +import {createEs2015LinkerPlugin} from '@angular/compiler-cli/linker/babel'; +import {transformAsync} from '@babel/core'; +import child_process from 'child_process'; +import esbuild from 'esbuild'; +import fs from 'fs'; +import glob from 'glob'; +import {dirname, join, relative} from 'path'; +import sass from 'sass'; +import url from 'url'; + +const containingDir = dirname(url.fileURLToPath(import.meta.url)); +const projectDir = join(containingDir, '../'); +const legacyTsconfigPath = join(projectDir, 'src/tsconfig-legacy.json'); + +const distDir = join(projectDir, 'dist/'); +const nodeModulesDir = join(projectDir, 'node_modules/'); +const outFile = join(distDir, 'legacy-test-bundle.spec.js'); +const ngcBinFile = join(nodeModulesDir, '@angular/compiler-cli/bundles/src/bin/ngc.js'); +const legacyOutputDir = join(distDir, 'legacy-test-out'); + + +/** + * This script builds the whole library in `angular/components` together with its + * spec files into a single IIFE bundle. + * + * The bundle can then be used in the legacy Saucelabs or Browserstack tests. Bundling + * helps with running the Angular linker on framework packages, and also avoids unnecessary + * complexity with maintaining module resolution at runtime through e.g. SystemJS. + */ +async function main() { + // Wait for all Sass compilations to finish. + await compileSassFiles(); + + // Build the project with Ngtsc so that external resources are inlined. + await compileProjectWithNgtsc(); + + const specEntryPointFile = await createEntryPointSpecFile(); + const esbuildLinkerPlugin = await createLinkerEsbuildPlugin(); + const esbuildResolvePlugin = await createResolveEsbuildPlugin(); + + const result = await esbuild.build({ + bundle: true, + sourceRoot: projectDir, + platform: 'browser', + format: 'iife', + outfile: outFile, + plugins: [esbuildResolvePlugin, esbuildLinkerPlugin], + stdin: {contents: specEntryPointFile, resolveDir: projectDir}, + }); + + if (result.errors.length) { + throw Error('Could not build legacy test bundle. See errors above.'); + } +} + +/** + * Compiles all non-partial Sass files in the project and writes them next + * to their source files. The files are written into the source root as + * this simplifies the resolution within the standalone Angular compiler. + * + * Given that the legacy tests should only run on CI, it is acceptable to + * write to the checked-in source tree. The files remain untracked unless + * explicitly added. + */ +async function compileSassFiles() { + const sassFiles = glob.sync('src/**/!(_*|theme).scss', {cwd: projectDir, absolute: true}); + const sassTasks = []; + + for (const file of sassFiles) { + const outRelativePath = relative(projectDir, file).replace(/\.scss$/, '.css'); + const outPath = join(projectDir, outRelativePath); + const task = renderSassFileAsync(file).then(async (content) => { + console.info('Compiled, now writing:', outRelativePath); + await fs.promises.mkdir(dirname(outPath), {recursive: true}); + await fs.promises.writeFile(outPath, content) + }); + + sassTasks.push(task); + } + + // Wait for all Sass compilations to finish. + await Promise.all(sassTasks); +} + +/** + * Compiles the project using the Angular compiler in order to produce JS output of + * the packages and tests. This step is important in order to full-compile all + * exported components of the library (inlining external stylesheets or templates). + */ +async function compileProjectWithNgtsc() { + // Build the project with Ngtsc so that external resources are inlined. + const ngcProcess = child_process.spawnSync( + 'node', [ngcBinFile, '--project', legacyTsconfigPath], {shell: true, stdio: 'inherit'}); + + if (ngcProcess.error || ngcProcess.status !== 0) { + throw Error('Unable to compile tests and library. See error above.'); + } +} + +/** + * Queries for all spec files in the built output and creates a single + * ESM entry-point file which imports all the spec files. + * + * This spec file can then be used as entry-point for ESBuild in order + * to bundle all specs in an IIFE file. + */ +async function createEntryPointSpecFile() { + const testFiles = glob.sync('**/*.spec.js', {absolute: true, cwd: legacyOutputDir}); + + let specEntryPointFile = `import './test/angular-test-init-spec.ts';`; + let i = 0; + const testNamespaces = []; + + for (const file of testFiles) { + const relativePath = relative(projectDir, file); + const specifier = `./${relativePath.replace(/\\/g, '/')}`; + const testNamespace = `__${i++}`; + + testNamespaces.push(testNamespace); + specEntryPointFile += `import * as ${testNamespace} from '${specifier}';\n`; + } + + for (const namespaceId of testNamespaces) { + // We generate a side-effect invocation that references the test import. This + // is necessary to trick `ESBuild` in preserving the imports. Unfortunately the + // test files would be dead-code eliminated otherwise because the specs are part + // of folders with `package.json` files setting the `"sideEffects: false"` field. + specEntryPointFile += `new Function('x', 'return x')(${namespaceId});\n`; + } + + return specEntryPointFile; +} + +/** Helper function to render a Sass file asynchronously using promises. */ +async function renderSassFileAsync(inputFile) { + return new Promise((resolve, reject) => { + sass.render( + {file: inputFile, includePaths: [nodeModulesDir]}, + (err, result) => err ? reject(err) : resolve(result.css)); + }); +} + +/** + * Creates an ESBuild plugin which maps `@angular/<..>` module names to their + * locally-built output (for the packages which are built as part of this repo). + */ +async function createResolveEsbuildPlugin() { + return { + name: 'ng-resolve-esbuild', setup: (build) => { + build.onResolve({filter: /@angular\//}, async (args) => { + const pkgName = args.path.substr('@angular/'.length); + let resolvedPath = join(legacyOutputDir, pkgName) + let stats = await statGraceful(resolvedPath); + + // If the resolved path points to a directory, resolve the contained `index.js` file + if (stats && stats.isDirectory()) { + resolvedPath = join(resolvedPath, 'index.js'); + stats = await statGraceful(resolvedPath); + } + // If the resolved path does not exist, check with an explicit JS extension. + else if (stats === null) { + resolvedPath += '.js'; + stats = await statGraceful(resolvedPath); + } + + return stats !== null ? {path: resolvedPath} : undefined; + }); + } + } +} + +/** Creates an ESBuild plugin that runs the Angular linker on framework packages. */ +async function createLinkerEsbuildPlugin() { + const linkerBabelPlugin = createEs2015LinkerPlugin({ + fileSystem: new NodeJSFileSystem(), + logger: new ConsoleLogger(LogLevel.warn), + // We enable JIT mode as unit tests also will rely on the linked ESM files. + linkerJitMode: true, + }); + + return { + name: 'ng-linker-esbuild', + setup: (build) => { + build.onLoad({filter: /fesm2020/}, async (args) => { + const filePath = args.path; + const content = await fs.promises.readFile(filePath, 'utf8'); + const {code} = await transformAsync(content, { + filename: filePath, + filenameRelative: filePath, + plugins: [linkerBabelPlugin], + sourceMaps: 'inline', + }); + return {contents: code}; + }); + }, + }; +} + +/** + * Retrieves the `fs.Stats` results for the given path gracefully. + * If the file does not exist, returns `null`. + */ +async function statGraceful(path) { + try { + return await fs.promises.stat(path); + } catch { + return null; + } +} + +main().catch(e => { + console.error(e); + process.exitCode = 1; +}); diff --git a/src/cdk-experimental/tsconfig-tests.json b/src/cdk-experimental/tsconfig-tests.json deleted file mode 100644 index aed42d1719a1..000000000000 --- a/src/cdk-experimental/tsconfig-tests.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "references": [ - {"path": "../cdk/tsconfig-tests.json"} - ], - "compilerOptions": { - "composite": true, - "baseUrl": ".", - "outDir": "../../dist/packages/cdk-experimental", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/cdk-experimental" - ], - "importHelpers": false, - "module": "umd", - "target": "es5", - "types": ["jasmine"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "paths": { - "@angular/cdk/*": ["../../dist/packages/cdk/*"], - "@angular/cdk-experimental/*": ["./*"] - } - }, - "include": [ - "**/*.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "**/*.e2e.spec.ts" - ] -} diff --git a/src/cdk/tsconfig-tests.json b/src/cdk/tsconfig-tests.json deleted file mode 100644 index 6867ec501da5..000000000000 --- a/src/cdk/tsconfig-tests.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "compilerOptions": { - "composite": true, - "baseUrl": ".", - "outDir": "../../dist/packages/cdk", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/cdk" - ], - "importHelpers": false, - "module": "umd", - "target": "es5", - "types": ["jasmine", "node"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "paths": { - "@angular/cdk/*": ["./*"] - } - }, - "include": [ - "**/*.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "testing/protractor/**.ts", - "testing/private/e2e/**.ts", - "testing/selenium-webdriver/**.ts", - "**/schematics/**/*.ts", - "**/*.e2e.spec.ts" - ] -} diff --git a/src/components-examples/material/datepicker/tsconfig-build.json b/src/components-examples/material/datepicker/tsconfig-build.json deleted file mode 100644 index c20b38fa5ebb..000000000000 --- a/src/components-examples/material/datepicker/tsconfig-build.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../../bazel-tsconfig-build", - "compilerOptions": { - // Needed for Moment.js since it doesn't have a default export. - "allowSyntheticDefaultImports": true - } -} diff --git a/src/google-maps/tsconfig-tests.json b/src/google-maps/tsconfig-tests.json deleted file mode 100644 index 0b483e5010b7..000000000000 --- a/src/google-maps/tsconfig-tests.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "compilerOptions": { - "baseUrl": ".", - "outDir": "../../dist/packages/google-maps", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/google-maps" - ], - "importHelpers": false, - "module": "umd", - "target": "es5", - "types": ["jasmine"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true - }, - "include": [ - "**/*.spec.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "**/*.e2e.spec.ts" - ] -} diff --git a/src/material-date-fns-adapter/tsconfig-tests.json b/src/material-date-fns-adapter/tsconfig-tests.json deleted file mode 100644 index 80e4ffa3e0d7..000000000000 --- a/src/material-date-fns-adapter/tsconfig-tests.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "compilerOptions": { - "baseUrl": ".", - "outDir": "../../dist/packages/material-date-fns-adapter", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/material-date-fns-adapter" - ], - "importHelpers": false, - "module": "umd", - "target": "es5", - "types": ["jasmine"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "paths": { - "@angular/material/*": ["../../dist/packages/material/*"] - } - }, - "include": [ - "**/*.ts", - "**/*.spec.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "**/*.e2e.spec.ts" - ] -} diff --git a/src/material-experimental/tsconfig-tests.json b/src/material-experimental/tsconfig-tests.json deleted file mode 100644 index aeb086519b9a..000000000000 --- a/src/material-experimental/tsconfig-tests.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "references": [ - {"path": "../cdk/tsconfig-tests.json"}, - {"path": "../cdk-experimental/tsconfig-tests.json"}, - {"path": "../material/tsconfig-tests.json"}, - ], - - "compilerOptions": { - "baseUrl": ".", - "outDir": "../../dist/packages/material-experimental", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/material-experimental" - ], - "importHelpers": false, - "module": "umd", - "target": "es5", - "types": ["jasmine"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "paths": { - "@angular/cdk/*": ["../../dist/packages/cdk/*"], - "@angular/cdk-experimental/*": ["../../dist/packages/cdk-experimental/*"], - "@angular/material/*": ["../../dist/packages/material/*"], - "@angular/material-experimental/*": ["./*"] - } - }, - "include": [ - "**/*.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "**/*.e2e.spec.ts" - ] -} diff --git a/src/material-luxon-adapter/tsconfig-tests.json b/src/material-luxon-adapter/tsconfig-tests.json deleted file mode 100644 index 6793503244d5..000000000000 --- a/src/material-luxon-adapter/tsconfig-tests.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "compilerOptions": { - "baseUrl": ".", - "outDir": "../../dist/packages/material-luxon-adapter", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/material-luxon-adapter" - ], - "importHelpers": false, - "module": "umd", - "target": "es5", - "types": ["jasmine"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "paths": { - "@angular/material/*": ["../../dist/packages/material/*"] - } - }, - "include": [ - "**/*.ts", - "**/*.spec.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "**/*.e2e.spec.ts" - ] -} diff --git a/src/material-moment-adapter/tsconfig-build.json b/src/material-moment-adapter/tsconfig-build.json deleted file mode 100644 index aeea3565acf1..000000000000 --- a/src/material-moment-adapter/tsconfig-build.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "compilerOptions": { - // Needed for Moment.js since it doesn't have a default export. - "allowSyntheticDefaultImports": true - } -} diff --git a/src/material-moment-adapter/tsconfig-tests.json b/src/material-moment-adapter/tsconfig-tests.json deleted file mode 100644 index be6189a7ee2c..000000000000 --- a/src/material-moment-adapter/tsconfig-tests.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": "./tsconfig-build.json", - "references": [ - {"path": "../material/tsconfig-tests.json"} - ], - "compilerOptions": { - // Needed for Moment.js since it doesn't have a default export. - "allowSyntheticDefaultImports": true, - "baseUrl": ".", - "outDir": "../../dist/packages/material-moment-adapter", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/material-moment-adapter" - ], - "importHelpers": false, - "module": "umd", - "target": "es5", - "types": ["jasmine"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "paths": { - "@angular/material/*": ["../../dist/packages/material/*"] - } - }, - "include": [ - "**/*.ts", - "**/*.spec.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "**/*.e2e.spec.ts" - ] -} diff --git a/src/material/tsconfig-tests.json b/src/material/tsconfig-tests.json deleted file mode 100644 index 3a27dd35b0e1..000000000000 --- a/src/material/tsconfig-tests.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "references": [ - { - "path": "../cdk/tsconfig-tests.json" - } - ], - "compilerOptions": { - "composite": true, - "baseUrl": ".", - "outDir": "../../dist/packages/material", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/material" - ], - "importHelpers": false, - "module": "umd", - "target": "es5", - "types": ["jasmine"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "paths": { - "@angular/cdk": ["../../dist/packages/cdk"], - "@angular/cdk/*": ["../../dist/packages/cdk/*"], - "@angular/material/*": ["./*"] - } - }, - "include": [ - "**/*.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "core/theming/tests/**/*.ts", - "**/schematics/**/*.ts", - "**/*.e2e.spec.ts" - ] -} diff --git a/src/tsconfig-legacy.json b/src/tsconfig-legacy.json new file mode 100644 index 000000000000..f43a6876e9b1 --- /dev/null +++ b/src/tsconfig-legacy.json @@ -0,0 +1,32 @@ +{ + "extends": "./bazel-tsconfig-test.json", + "compilerOptions": { + "outDir": "../dist/legacy-test-out", + "declaration": false, + // For the legacy tests, we use ES2016 so that ZoneJS can work with async/await. + "target": "es2016", + "paths": { + "@angular/*": ["./*"] + }, + "types": ["jasmine", "node"], + "emitDecoratorMetadata": true, + "experimentalDecorators": true + }, + "include": [ + "**/*.spec.ts", + "dev-mode-types.d.ts", + "../node_modules/zone.js/zone.d.ts" + ], + "exclude": [ + "**/*.e2e.spec.ts", + "./cdk/schematics/**/*", + "./material/schematics/**/*", + "./components-examples/**/*", + "./material/core/theming/tests/**/*" + ], + "angularCompilerOptions": { + // This is needed so that test components are not AOT compiled. Ngtsc will + // not find an associated module for test components and error out. + "compileNonExportedClasses": false + } +} diff --git a/src/youtube-player/tsconfig-tests.json b/src/youtube-player/tsconfig-tests.json deleted file mode 100644 index 42801e3fe93a..000000000000 --- a/src/youtube-player/tsconfig-tests.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": "../bazel-tsconfig-build.json", - "compilerOptions": { - "baseUrl": ".", - "outDir": "../../dist/packages/youtube-player", - "rootDir": ".", - "rootDirs": [ - ".", - "../../dist/packages/youtube-player" - ], - "importHelpers": false, - "module": "commonjs", - "target": "es5", - "types": ["jasmine"], - "experimentalDecorators": true, - "emitDecoratorMetadata": true - }, - "include": [ - "**/*.ts", - "**/*.spec.ts", - "../dev-mode-types.d.ts" - ], - "exclude": [ - "**/*.e2e.spec.ts" - ] -} diff --git a/test/BUILD.bazel b/test/BUILD.bazel index b35759be7510..ebce3a500805 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -1,4 +1,3 @@ -load("//tools:create-system-config.bzl", "create_system_config") load("//tools:defaults.bzl", "ts_library") package(default_visibility = ["//visibility:public"]) @@ -17,14 +16,3 @@ ts_library( "@npm//@types/jasmine", ], ) - -# Creates a SystemJS configuration file that can be used for the Karma legacy -# unit tests. This allows us to only have one canonical SystemJS configuration -# file, and we don't need to repeat package/entry-point configurations. -create_system_config( - name = "system-config", - base_url = "base/", - node_modules_base_path = "node_modules/", - output_name = "system-config.js", - packages_dir = "dist/packages", -) diff --git a/test/karma-test-shim.js b/test/karma-test-shim.js deleted file mode 100644 index e59e3fa24239..000000000000 --- a/test/karma-test-shim.js +++ /dev/null @@ -1,57 +0,0 @@ -/*global jasmine, __karma__, window*/ -Error.stackTraceLimit = Infinity; - -// The default time that jasmine waits for an asynchronous test to finish is five seconds. -// If this timeout is too short the CI may fail randomly because our asynchronous tests can -// take longer in some situations (e.g Saucelabs and Browserstack tunnels) -jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; - -__karma__.loaded = function () {}; - -var specFiles = Object.keys(window.__karma__.files).filter(isMaterialSpecFile); - -// Configure the Angular test bed and run all specs once configured. -configureTestBed() - .then(runMaterialSpecs) - .then(__karma__.start, function(error) { - // Passing in the error object directly to Karma won't log out the stack trace and - // passing the `originalErr` doesn't work correctly either. We have to log out the - // stack trace so we can actually debug errors before the tests have started. - console.error(error.originalErr.stack); - __karma__.error(error); - }); - - -/** Runs the Angular Material specs in Karma. */ -function runMaterialSpecs() { - // By importing all spec files, Karma will run the tests directly. - return Promise.all(specFiles.map(function(fileName) { - return System.import(fileName); - })); -} - -/** Whether the specified file is part of Angular Material. */ -function isMaterialSpecFile(path) { - return path.slice(-8) === '.spec.js' && path.indexOf('node_modules') === -1; -} - -/** Configures Angular's TestBed. */ -function configureTestBed() { - return Promise.all([ - System.import('@angular/core'), - System.import('@angular/core/testing'), - System.import('@angular/platform-browser-dynamic/testing') - ]).then(function (providers) { - var core = providers[0]; - var testing = providers[1]; - var testingBrowser = providers[2]; - - console.log('Running tests using Angular version: ' + core.VERSION.full); - - testing.TestBed.initTestEnvironment( - testingBrowser.BrowserDynamicTestingModule, - testingBrowser.platformBrowserDynamicTesting(), - {teardown: {destroyAfterEach: true}} - ); - }); -} diff --git a/test/karma.conf.js b/test/karma.conf.js index 878bf51a941b..643d6ded180e 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -31,9 +31,6 @@ module.exports = config => { files: [ {pattern: 'node_modules/core-js-bundle/minified.js', included: true, watched: false}, {pattern: 'node_modules/core-js-bundle/minified.js.map', included: false, watched: false}, - {pattern: 'node_modules/tslib/tslib.js', included: false, watched: false}, - {pattern: 'node_modules/systemjs/dist/system.js', included: true, watched: false}, - {pattern: 'node_modules/systemjs/dist/system.js.map', included: false, watched: false}, {pattern: 'node_modules/zone.js/dist/zone.min.js', included: true, watched: false}, {pattern: 'node_modules/zone.js/dist/proxy.min.js', included: true, watched: false}, {pattern: 'node_modules/zone.js/dist/sync-test.js', included: true, watched: false}, @@ -49,44 +46,26 @@ module.exports = config => { {pattern: 'node_modules/@material/*/dist/*', included: false, watched: false}, {pattern: 'node_modules/kagekiri/**', included: false, watched: false}, - // Include all Angular dependencies - {pattern: 'node_modules/@angular/**/*', included: false, watched: false}, - {pattern: 'node_modules/rxjs/**/*', included: false, watched: false}, - - // The Karma system configuration is built by Bazel. The built System config // is copied into the "dist/" folder so that the Karma config can use it. - {pattern: 'dist/karma-system-config.js', included: true, watched: false}, - {pattern: 'test/karma-test-shim.js', included: true, watched: false}, - - // We transpile the date-fns bundles to AMD manually since they only ship esm bundles. - {pattern: 'dist/amd_date_fns.js', included: false, watched: false}, - {pattern: 'dist/amd_date_fns_locales.js', included: false, watched: false}, - - // Needed for exposing the RxJS operators through the RxJS UMD bundle. This - // is done for performance reasons since fetching individual files is slow. - {pattern: 'tools/system-rxjs-operators.js', included: false, watched: false}, + {pattern: 'dist/legacy-test-bundle.spec.js', included: true, watched: false}, // Include a Material theme in the test suite. Also include the MDC theme as // karma runs tests for the MDC prototype components as well. { - pattern: 'dist/packages/material/core/theming/prebuilt/indigo-pink.css', + pattern: 'src/material/core/theming/prebuilt/indigo-pink.css', included: true, watched: true }, { - pattern: 'dist/packages/material-experimental/mdc-theming/prebuilt/indigo-pink.css', + pattern: 'src/material-experimental/mdc-theming/prebuilt/indigo-pink.css', included: true, watched: true }, - - // Includes all package tests and source files into karma. Those files will be watched. - // This pattern also matches all sourcemap files and TypeScript files for debugging. - {pattern: 'dist/packages/**/*', included: false, watched: true}, ], customLaunchers: customLaunchers, - preprocessors: {'dist/packages/**/*.js': ['sourcemap']}, + preprocessors: {'dist/*.js': ['sourcemap']}, reporters: ['dots'], autoWatch: false, diff --git a/tools/bazel-tools-tsconfig.json b/tools/bazel-tools-tsconfig.json deleted file mode 100644 index 711798730388..000000000000 --- a/tools/bazel-tools-tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "lib": ["es2015"], - "types": ["node"] - } -} diff --git a/tools/create-system-config.bzl b/tools/create-system-config.bzl deleted file mode 100644 index 76c2410a6065..000000000000 --- a/tools/create-system-config.bzl +++ /dev/null @@ -1,43 +0,0 @@ -load("@npm//@angular/dev-infra-private/bazel:expand_template.bzl", "expand_template") -load("//:packages.bzl", "ANGULAR_PACKAGE_BUNDLES", "MDC_PACKAGE_UMD_BUNDLES") -load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS") -load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_ENTRYPOINTS") -load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS") -load("//src/material-experimental:config.bzl", "MATERIAL_EXPERIMENTAL_ENTRYPOINTS", "MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS") - -""" - Macro that builds a SystemJS configuration for all packages and entry-points - configured in "config.bzl" files of the workspace. The SystemJS configuration - can be used in the dev-app and for building the legacy unit tests SystemJS config. -""" - -def create_system_config( - name, - output_name, - # In Bazel the package output follows the same folder structure as the source - # code. This attribute makes the packages directory configurable since in the - # legacy output, the package output is located in "dist/packages". - packages_dir = "src", - # In Bazel, the node modules can be resolved without having to specify the - # path to the "node_modules" folder. In the legacy tests, this is not the case. - node_modules_base_path = "", - # In Bazel, files can be resolved without having to use Karma's default "base/" - # directory. For the legacy tests this needs to be configurable for now. - base_url = ""): - expand_template( - name = name, - output_name = output_name, - configuration_env_vars = ["angular_ivy_enabled"], - substitutions = { - "$ANGULAR_PACKAGE_BUNDLES": str(ANGULAR_PACKAGE_BUNDLES), - "$MDC_PACKAGE_UMD_BUNDLES": str(MDC_PACKAGE_UMD_BUNDLES), - "$BASE_URL": base_url, - "$CDK_ENTRYPOINTS_TMPL": str(CDK_ENTRYPOINTS), - "$CDK_EXPERIMENTAL_ENTRYPOINTS_TMPL": str(CDK_EXPERIMENTAL_ENTRYPOINTS), - "$MATERIAL_ENTRYPOINTS_TMPL": str(MATERIAL_ENTRYPOINTS + MATERIAL_TESTING_ENTRYPOINTS), - "$MATERIAL_EXPERIMENTAL_ENTRYPOINTS_TMPL": str(MATERIAL_EXPERIMENTAL_ENTRYPOINTS + MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS), - "$NODE_MODULES_BASE_PATH": node_modules_base_path, - "$PACKAGES_DIR": packages_dir, - }, - template = "//tools:system-config-tmpl.js", - ) diff --git a/tools/gulp/gulpfile.ts b/tools/gulp/gulpfile.ts deleted file mode 100644 index f30020961771..000000000000 --- a/tools/gulp/gulpfile.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {createPackageBuildTasks} from '../package-tools'; -import { - cdkExperimentalPackage, - cdkPackage, - googleMapsPackage, - materialExperimentalPackage, - materialPackage, - momentAdapterPackage, - luxonAdapterPackage, - dateFnsAdapterPackage, - youTubePlayerPackage -} from './packages'; - -// Build tasks have to be imported first, because the other tasks depend on them. -createPackageBuildTasks(cdkPackage); -createPackageBuildTasks(cdkExperimentalPackage); -createPackageBuildTasks(materialPackage); -createPackageBuildTasks(materialExperimentalPackage); -createPackageBuildTasks(momentAdapterPackage); -createPackageBuildTasks(luxonAdapterPackage); -createPackageBuildTasks(dateFnsAdapterPackage); -createPackageBuildTasks(youTubePlayerPackage); -createPackageBuildTasks(googleMapsPackage); - -import './tasks/clean'; -import './tasks/unit-test'; -import './tasks/ci'; diff --git a/tools/gulp/packages.ts b/tools/gulp/packages.ts deleted file mode 100644 index e9b438823f20..000000000000 --- a/tools/gulp/packages.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {BuildPackage} from '../package-tools'; - -export const cdkPackage = new BuildPackage('cdk'); -export const materialPackage = new BuildPackage('material', [cdkPackage]); -export const youTubePlayerPackage = new BuildPackage('youtube-player'); -export const googleMapsPackage = new BuildPackage('google-maps'); -export const cdkExperimentalPackage = new BuildPackage('cdk-experimental', [cdkPackage]); -export const materialExperimentalPackage = new BuildPackage('material-experimental', - [cdkPackage, cdkExperimentalPackage, materialPackage]); -export const momentAdapterPackage = new BuildPackage('material-moment-adapter', [materialPackage]); -export const luxonAdapterPackage = new BuildPackage('material-luxon-adapter', [materialPackage]); -export const dateFnsAdapterPackage = - new BuildPackage('material-date-fns-adapter', [materialPackage]); diff --git a/tools/gulp/tasks/ci.ts b/tools/gulp/tasks/ci.ts deleted file mode 100644 index 13c2f4846771..000000000000 --- a/tools/gulp/tasks/ci.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {task, series} from 'gulp'; - -// Gulp sometimes does not exit properly on CI. This is to prevent that. -// TODO(devversion): look if there is some blocking child process. -task('ci:test', series('test:single-run', done => { - done(); - process.exit(0); -})); diff --git a/tools/gulp/tasks/clean.ts b/tools/gulp/tasks/clean.ts deleted file mode 100644 index 84a75f789059..000000000000 --- a/tools/gulp/tasks/clean.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {task} from 'gulp'; -import {buildConfig} from '../../package-tools'; - -const shelljs = require('shelljs'); - -/** Deletes the output directory. */ -task('clean', done => { - shelljs.rm('-rf', [buildConfig.outputDir]); - done(); -}); diff --git a/tools/gulp/tasks/unit-test.ts b/tools/gulp/tasks/unit-test.ts deleted file mode 100644 index 372e9dcfccc0..000000000000 --- a/tools/gulp/tasks/unit-test.ts +++ /dev/null @@ -1,76 +0,0 @@ -import {join} from 'path'; -import {task, series} from 'gulp'; -import {buildConfig} from '../../package-tools'; - -// There are no type definitions available for these imports. -const shelljs = require('shelljs'); - -/** - * Tasks that builds the SystemJS configuration which is needed for the Karma - * legacy unit tests. - */ -task(':test:build-system-config', done => { - const configOutputPath = join(buildConfig.outputDir, 'karma-system-config.js'); - shelljs.cd(buildConfig.projectDir); - const bazelGenfilesDir = shelljs.exec('yarn -s bazel info bazel-genfiles').stdout.trim(); - shelljs.exec('yarn -s bazel build //test:system-config.js'); - shelljs.cp(join(bazelGenfilesDir, 'test/system-config.js'), configOutputPath); - shelljs.chmod('u+w', configOutputPath); - done(); -}); - -/** Compiles the esm bundles from date-fns to AMD so that we can load them in Karma. */ -task(':test:build-date-fns', done => { - shelljs.cd(buildConfig.projectDir); - const bazelGenfilesDir = shelljs.exec('yarn -s bazel info bazel-genfiles').stdout.trim(); - - ['amd_date_fns', 'amd_date_fns_locales'].forEach(target => { - const outputPath = join(buildConfig.outputDir, `${target}.js`); - const bundlePath = join(bazelGenfilesDir, `src/material-date-fns-adapter/${target}_bundle.js`); - shelljs.exec(`yarn -s bazel build //src/material-date-fns-adapter:${target}`); - shelljs.cp(bundlePath, outputPath); - shelljs.chmod('u+w', outputPath); - }); - - done(); -}); - -/** Builds everything that is necessary for karma. */ -task(':test:build', series( - 'clean', - 'cdk:build-no-bundles', - 'material:build-no-bundles', - 'cdk-experimental:build-no-bundles', - 'material-experimental:build-no-bundles', - 'youtube-player:build-no-bundles', - 'material-moment-adapter:build-no-bundles', - 'material-luxon-adapter:build-no-bundles', - 'material-date-fns-adapter:build-no-bundles', - 'google-maps:build-no-bundles', - ':test:build-date-fns', - ':test:build-system-config' -)); - -/** - * Runs the unit tests. Does not watch for changes. - * This task should be used when running tests on the CI server. - */ -task('test:single-run', series(':test:build', done => { - // Load karma not outside. Karma pollutes Promise with a different implementation. - const karma = require('karma'); - - new karma.Server({ - configFile: join(buildConfig.projectDir, 'test/karma.conf.js'), - autoWatch: false, - singleRun: true - }, (exitCode: number) => { - if (exitCode === 0) { - done(); - } else { - // Immediately exit the process if Karma reported errors, because due to - // potential still running tunnel-browsers gulp won't exit properly. - done(new Error(`Karma exited with code ${exitCode}.`)); - process.exit(exitCode); - } - }).start(); -})); diff --git a/tools/gulp/tsconfig.json b/tools/gulp/tsconfig.json deleted file mode 100644 index a38649f84836..000000000000 --- a/tools/gulp/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "noUnusedParameters": false, - "noUnusedLocals": false, - "lib": ["es2015", "dom", "es2016.array.include"], - "module": "commonjs", - "moduleResolution": "node", - "outDir": "../../dist/tools/gulp", - "strictNullChecks": true, - "noImplicitOverride": true, - "noImplicitReturns": true, - "strictFunctionTypes": true, - "noImplicitThis": true, - "noEmitOnError": true, - "noImplicitAny": true, - "noFallthroughCasesInSwitch": true, - "target": "es5", - "types": [ - "node" - ], - "baseUrl": "." - }, - "files": [ - "gulpfile.ts" - ] -} diff --git a/tools/package-tools/build-config.ts b/tools/package-tools/build-config.ts deleted file mode 100644 index dbc07a4409eb..000000000000 --- a/tools/package-tools/build-config.ts +++ /dev/null @@ -1,29 +0,0 @@ -import {findBuildConfig} from './find-build-config'; - -export interface BuildConfig { - /** Current version of the project. */ - projectVersion: string; - /** Required Angular version for the project. */ - angularVersion: string; - /** Required MDC Web version for the project. */ - mdcVersion: string; - /** Path to the root of the project. */ - projectDir: string; - /** Path to the directory where all packages are living. */ - packagesDir: string; - /** Path to the directory where the output will be stored. */ - outputDir: string; - /** License banner that will be placed inside of every bundle. */ - licenseBanner: string; -} - -// Search for a build config by walking up the current working directory of the Node process. -const buildConfigPath = findBuildConfig(); - -if (!buildConfigPath) { - throw 'Material2 Build tools were not able to find a build config. ' + - 'Please create a "build-config.js" file in your project.'; -} - -// Load the config file using a basic CommonJS import. -export const buildConfig = require(buildConfigPath) as BuildConfig; diff --git a/tools/package-tools/build-package.ts b/tools/package-tools/build-package.ts deleted file mode 100644 index a23a2e62a745..000000000000 --- a/tools/package-tools/build-package.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {join} from 'path'; -import {buildConfig} from './build-config'; -import {compileEntryPoint} from './compile-entry-point'; - -const {packagesDir, outputDir} = buildConfig; - -/** Name of the tsconfig file that is responsible for building the tests. */ -const testsTsconfigName = 'tsconfig-tests.json'; - -export class BuildPackage { - /** Path to the package sources. */ - sourceDir: string; - - /** Path to the package output. */ - outputDir: string; - - constructor(readonly name: string, readonly dependencies: BuildPackage[] = []) { - this.sourceDir = join(packagesDir, name); - this.outputDir = join(outputDir, 'packages', name); - } - - /** Compiles the TypeScript test source files for the package. */ - async compileTests() { - return compileEntryPoint(this, testsTsconfigName); - } -} diff --git a/tools/package-tools/compile-entry-point.ts b/tools/package-tools/compile-entry-point.ts deleted file mode 100644 index 0fd0028f57ac..000000000000 --- a/tools/package-tools/compile-entry-point.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as chalk from 'chalk'; -import {join} from 'path'; -import {BuildPackage} from './build-package'; -import {tsCompile} from './ts-compile'; - -/** Compiles the TypeScript sources of a primary or secondary entry point. */ -export async function compileEntryPoint(buildPackage: BuildPackage, tsconfigName: string, - secondaryEntryPoint = '', es5OutputPath?: string) { - const entryPointPath = join(buildPackage.sourceDir, secondaryEntryPoint); - const entryPointTsconfigPath = join(entryPointPath, tsconfigName); - const ngcFlags = ['-p', entryPointTsconfigPath]; - - if (es5OutputPath) { - ngcFlags.push('--outDir', es5OutputPath, '--target', 'ES5'); - } - - // TODO: ideally we'd use ngc here to build the library code in AOT. This - // would speed up tests since only test component would be compiled in JIT. - // Blocked on: https://github.com/angular/angular/issues/33724 - return tsCompile('tsc', ngcFlags).catch(() => { - const error = chalk.red( - `Failed to compile ${secondaryEntryPoint} using ${entryPointTsconfigPath}`); - console.error(error); - return Promise.reject(error); - }); -} diff --git a/tools/package-tools/find-build-config.ts b/tools/package-tools/find-build-config.ts deleted file mode 100644 index efea9145e75e..000000000000 --- a/tools/package-tools/find-build-config.ts +++ /dev/null @@ -1,22 +0,0 @@ -import {resolve, dirname, join} from 'path'; -import {existsSync} from 'fs'; - -/** Name of the build config file. */ -const BUILD_CONFIG_FILENAME = 'build-config.js'; - -/** Method that searches for a build config file that will be used for packaging. */ -export function findBuildConfig(): string | null { - let currentDir = process.cwd(); - - while (!existsSync(resolve(currentDir, BUILD_CONFIG_FILENAME))) { - let parentDir = dirname(currentDir); - - if (parentDir === currentDir) { - return null; - } - - currentDir = parentDir; - } - - return join(currentDir, BUILD_CONFIG_FILENAME); -} diff --git a/tools/package-tools/gulp/build-scss-pipeline.ts b/tools/package-tools/gulp/build-scss-pipeline.ts deleted file mode 100644 index 58746b8abe11..000000000000 --- a/tools/package-tools/gulp/build-scss-pipeline.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {src} from 'gulp'; -import {join} from 'path'; -import {buildConfig} from '../build-config'; - -// These imports lack of type definitions. -const gulpSass = require('gulp-dart-sass'); -const sass = require('sass'); -const sassIncludePaths = [join(buildConfig.projectDir, 'node_modules/')]; - -// Set the compiler to our version of `sass`, rather than the one that `gulp-dart-sass` depends on. -gulpSass.compiler = sass; - -/** Create a gulp task that builds SCSS files. */ -export function buildScssPipeline(sourceDir: string) { - return src(join(sourceDir, '**/!(test-*).scss')) - .pipe(gulpSass({includePaths: sassIncludePaths}).on('error', gulpSass.logError)); -} diff --git a/tools/package-tools/gulp/build-tasks-gulp.ts b/tools/package-tools/gulp/build-tasks-gulp.ts deleted file mode 100644 index 102db3360439..000000000000 --- a/tools/package-tools/gulp/build-tasks-gulp.ts +++ /dev/null @@ -1,60 +0,0 @@ -import {dest, src, task, series} from 'gulp'; -import {join} from 'path'; -import {BuildPackage} from '../build-package'; -import {inlineResourcesForDirectory} from '../inline-resources'; -import {buildScssPipeline} from './build-scss-pipeline'; - -/** - * Creates a set of gulp tasks that can build the specified package. - * @param buildPackage Build package for which the gulp tasks will be generated - * @param preBuildTasks List of gulp tasks that should run before building the package. - */ -export function createPackageBuildTasks(buildPackage: BuildPackage) { - // Name of the package build tasks for Gulp. - const taskName = buildPackage.name; - - // Glob that matches all style files that need to be copied to the package output. Besides CSS - // files that will be copied (e.g. in the examples package), we copy the source SCSS files that - // start with an underscore. These files can be packaged into the release output if the - // build package `copySecondaryEntryPointStylesToRoot` option is enabled (e.g. _overlay.scss). - const styleGlobs = [ - join(buildPackage.sourceDir, '**/*.css'), - join(buildPackage.sourceDir, '**/_*.scss'), - ]; - - // Glob that matches every HTML file in the current package. - const htmlGlob = join(buildPackage.sourceDir, '**/*.html'); - - task(`${taskName}:assets:scss`, () => - buildScssPipeline(buildPackage.sourceDir).pipe(dest(buildPackage.outputDir))); - task(`${taskName}:assets:copy-styles`, () => src(styleGlobs).pipe(dest(buildPackage.outputDir))); - task(`${taskName}:assets:html`, () => src(htmlGlob).pipe(dest(buildPackage.outputDir))); - task(`${taskName}:assets:inline`, done => { - inlineResourcesForDirectory(buildPackage.outputDir); - done(); - }); - - /** - * Asset tasks. Building Sass files and inlining CSS, HTML files into the ESM output. - */ - task(`${taskName}:assets`, series( - `${taskName}:assets:scss`, - `${taskName}:assets:copy-styles`, - `${taskName}:assets:html` - )); - - /** - * TypeScript compilation tasks. Tasks are creating ESM, FESM, UMD bundles for releases. - */ - task(`${taskName}:build:esm:tests`, () => buildPackage.compileTests()); - - task(`${taskName}:build-no-bundles`, series( - // Build assets before building the ESM output. Since we compile with NGC, the compiler - // tries to resolve all required assets. - `${taskName}:assets`, - // Build the ESM output that includes all test files. Also build assets for the package. - `${taskName}:build:esm:tests`, - // Inline assets into ESM output. - `${taskName}:assets:inline` - )); -} diff --git a/tools/package-tools/index.ts b/tools/package-tools/index.ts deleted file mode 100644 index 3bf242a7e81b..000000000000 --- a/tools/package-tools/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Expose general package utilities. -export * from './build-config'; -export * from './build-package'; -export * from './inline-resources'; - -// Expose gulp utilities. -export * from './gulp/build-tasks-gulp'; -export * from './gulp/build-scss-pipeline'; diff --git a/tools/package-tools/inline-resources.ts b/tools/package-tools/inline-resources.ts deleted file mode 100644 index 3eb5f19fb3de..000000000000 --- a/tools/package-tools/inline-resources.ts +++ /dev/null @@ -1,56 +0,0 @@ -import {dirname, join} from 'path'; -import {readFileSync, writeFileSync} from 'fs'; -import {sync as glob} from 'glob'; - -/** Finds all JavaScript files in a directory and inlines all resources of Angular components. */ -export function inlineResourcesForDirectory(folderPath: string) { - glob(join(folderPath, '**/*.js')).forEach(filePath => inlineResources(filePath)); -} - -/** Inlines the external resources of Angular components of a file. */ -export function inlineResources(filePath: string) { - let fileContent = readFileSync(filePath, 'utf-8'); - - fileContent = inlineTemplate(fileContent, filePath); - fileContent = inlineStyles(fileContent, filePath); - fileContent = removeModuleId(fileContent); - - writeFileSync(filePath, fileContent, 'utf-8'); -} - -/** Inlines the templates of Angular components for a specified source file. */ -function inlineTemplate(fileContent: string, filePath: string) { - return fileContent.replace(/templateUrl:\s*'([^']+?\.html)'/g, (_match, templateUrl) => { - const templatePath = join(dirname(filePath), templateUrl); - const templateContent = loadResourceFile(templatePath); - return `template: "${templateContent}"`; - }); -} - -/** Inlines the external styles of Angular components for a specified source file. */ -function inlineStyles(fileContent: string, filePath: string) { - return fileContent.replace(/styleUrls:\s*(\[[\s\S]*?])/gm, (_match, styleUrlsValue) => { - // The RegExp matches the array of external style files. This is a string right now and - // can to be parsed using the `eval` method. The value looks like "['AAA.css', 'BBB.css']" - // tslint:disable-next-line:no-eval - const styleUrls = eval(styleUrlsValue) as string[]; - - const styleContents = styleUrls - .map(url => join(dirname(filePath), url)) - .map(path => loadResourceFile(path)); - - return `styles: ["${styleContents.join(' ')}"]`; - }); -} - -/** Remove every mention of `moduleId: module.id` */ -function removeModuleId(fileContent: string) { - return fileContent.replace(/\s*moduleId:\s*module\.id\s*,?\s*/gm, ''); -} - -/** Loads the specified resource file and drops line-breaks of the content. */ -function loadResourceFile(filePath: string): string { - return readFileSync(filePath, 'utf-8') - .replace(/([\n\r]\s*)+/gm, ' ') - .replace(/"/g, '\\"'); -} diff --git a/tools/package-tools/ts-compile.ts b/tools/package-tools/ts-compile.ts deleted file mode 100644 index 72dc21d46a43..000000000000 --- a/tools/package-tools/ts-compile.ts +++ /dev/null @@ -1,25 +0,0 @@ -import {resolve as resolvePath} from 'path'; -import {spawn} from 'child_process'; -import * as chalk from 'chalk'; - -/** - * Spawns a child process that compiles TypeScript using the specified compiler binary. - * @param binary Binary name that will be used for TS compilation. - * @param flags Command-line flags to be passed to binary. - * @returns Promise that resolves/rejects when the child process exits. - */ -export function tsCompile(binary: 'tsc' | 'ngc', flags: string[]) { - return new Promise((resolve, reject) => { - const binaryPath = resolvePath(`./node_modules/typescript/bin/${binary}`); - // Use `node` for spawning the TypeScript compiler. On Windows, the shell is - // not necessarily able to detect that the `tsc` files relies on Node. - const childProcess = spawn('node', [binaryPath, ...flags], {shell: true}); - - // Pipe stdout and stderr from the child process. - childProcess.stdout.on('data', (data: string|Buffer) => console.log(`${data}`)); - childProcess.stderr.on('data', (data: string|Buffer) => console.error(chalk.red(`${data}`))); - childProcess.on('exit', (exitCode: number) => { - exitCode === 0 ? resolve() : reject(`${binary} compilation failure`); - }); - }); -} diff --git a/tools/rxjs/BUILD.bazel b/tools/rxjs/BUILD.bazel deleted file mode 100644 index 71c23c736147..000000000000 --- a/tools/rxjs/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "rxjs_umd_modules", - srcs = [ - ":rxjs_shims.js", - "@npm//:node_modules/rxjs/bundles/rxjs.umd.js", - ], -) diff --git a/tools/rxjs/rxjs_shims.js b/tools/rxjs/rxjs_shims.js deleted file mode 100644 index 5c12b95085b0..000000000000 --- a/tools/rxjs/rxjs_shims.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @license - * Copyright Google LLC 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 - */ - -// rxjs/operators -(function(factory) { - if (typeof module === 'object' && typeof module.exports === 'object') { - var v = factory(require, exports); - if (v !== undefined) - module.exports = v; - } else if (typeof define === 'function' && define.amd) { - define('rxjs/operators', ['exports', 'rxjs'], factory); - } -})(function(exports, rxjs) { - 'use strict'; - Object.keys(rxjs.operators).forEach(function(key) { - exports[key] = rxjs.operators[key]; - }); - Object.defineProperty(exports, '__esModule', {value: true}); -}); - -// rxjs/testing -(function(factory) { - if (typeof module === 'object' && typeof module.exports === 'object') { - var v = factory(require, exports); - if (v !== undefined) - module.exports = v; - } else if (typeof define === 'function' && define.amd) { - define('rxjs/testing', ['exports', 'rxjs'], factory); - } -})(function(exports, rxjs) { - 'use strict'; - Object.keys(rxjs.testing).forEach(function(key) { - exports[key] = rxjs.testing[key]; - }); - Object.defineProperty(exports, '__esModule', {value: true}); -}); diff --git a/tools/stylelint/loader-rule.js b/tools/stylelint/loader-rule.js index bcc95f954c49..fe6b14fa247c 100644 --- a/tools/stylelint/loader-rule.js +++ b/tools/stylelint/loader-rule.js @@ -4,7 +4,7 @@ const stylelint = require('stylelint'); // Custom rule that registers all of the custom rules, written in TypeScript, with ts-node. This is // necessary, because `stylelint` and IDEs won't execute any rules that aren't in a .js file. require('ts-node').register({ - project: path.join(__dirname, '../gulp/tsconfig.json') + project: path.join(__dirname, '../tsconfig.json') }); // Dummy rule so Stylelint doesn't complain that there aren't rules in the file. diff --git a/tools/system-config-tmpl.js b/tools/system-config-tmpl.js deleted file mode 100644 index 782270351e12..000000000000 --- a/tools/system-config-tmpl.js +++ /dev/null @@ -1,177 +0,0 @@ -/** - * @license - * Copyright Google LLC 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 - */ - -// Note that this file isn't being transpiled so we need to keep it in ES5. Also -// identifiers of the format "$NAME_TMPL" will be replaced by the Bazel rule that -// converts this template file into the actual SystemJS configuration file. - -var CDK_PACKAGES = $CDK_ENTRYPOINTS_TMPL; -var CDK_EXPERIMENTAL_PACKAGES = $CDK_EXPERIMENTAL_ENTRYPOINTS_TMPL; -var MATERIAL_PACKAGES = $MATERIAL_ENTRYPOINTS_TMPL; -var MATERIAL_EXPERIMENTAL_PACKAGES = $MATERIAL_EXPERIMENTAL_ENTRYPOINTS_TMPL; - -/** Map of Angular framework packages and their bundle names. */ -var frameworkPackages = $ANGULAR_PACKAGE_BUNDLES; - -/** Map of MDC packages and their corresponding UMD bundles. */ -var mdcPackageUmdBundles = $MDC_PACKAGE_UMD_BUNDLES; - -/** Whether Ivy is enabled. */ -var isRunningWithIvy = 'TMPL_angular_ivy_enabled'.toString() === 'True'; - -/** Path that relatively resolves to the directory that contains all packages. */ -var packagesPath = '$PACKAGES_DIR'; - -/** Path that relatively resolves to the node_modules directory. */ -var nodeModulesPath = '$NODE_MODULES_BASE_PATH'; - -/** Path mappings that will be registered in SystemJS. */ -var pathMapping = { - 'tslib': 'node:tslib/tslib.js', - 'luxon': 'node:luxon/build/amd/luxon.js', - 'moment': 'node:moment/min/moment-with-locales.min.js', - 'moment/locale': 'node:moment/locale', - 'kagekiri': 'node:kagekiri/dist/kagekiri.umd.min.js', - - 'rxjs': 'node:rxjs/bundles/rxjs.umd.min.js', - 'rxjs/operators': 'tools/system-rxjs-operators.js', - - // These path mappings are only for the legacy Karma setup. - 'date-fns': 'dist/amd_date_fns.js', - 'date-fns/locale': 'dist/amd_date_fns_locales.js', -}; - -/** Package configurations that will be used in SystemJS. */ -var packagesConfig = { - // Set the default extension for the root package. Needed for imports to source files - // without explicit extension. This is common in CommonJS. - '.': {defaultExtension: 'js'}, -}; - -// Manual directories that need to be configured too. These directories are not -// public entry-points, but they are imported in source files as if they were. In order -// to ensure that the directory imports properly resolve to the "index.js" files within -// SystemJS, we configure them similar to actual package entry-points. -CDK_PACKAGES.push('testing/private', 'testing/testbed/fake-events'); -MATERIAL_PACKAGES.push('testing'); - -// Configure framework packages. -setupFrameworkPackages(); - -// Configure the MDC packages. -setupMdcPackages(); - -// Configure Angular components packages/entry-points. -setupLocalReleasePackages(); - -// Configure the base path and map the different node packages. -System.config({ - baseURL: '$BASE_URL', - map: pathMapping, - packages: packagesConfig, - paths: { - 'node:*': nodeModulesPath + '*', - } -}); - -/** - * Walks through all interpolated Angular Framework packages and configures - * them in SystemJS. Framework packages should always resolve to the UMD bundles. - */ -function setupFrameworkPackages() { - Object.keys(frameworkPackages).forEach(function(moduleName) { - var primaryEntryPointSegments = moduleName.split('-'); - // Ensures that imports to the framework package are resolved - // to the configured node modules directory. - pathMapping[moduleName] = 'node:' + moduleName; - // Configure each bundle for the current package. - frameworkPackages[moduleName].forEach(function(bundleName) { - // Entry-point segments determined from the UMD bundle name. We split the - // bundle into segments based on dashes. We omit the leading segments that - // belong to the primary entry-point module name since we are only interested - // in the segments that build up the secondary or tertiary entry-point name. - var segments = bundleName.substring(0, bundleName.length - '.umd.js'.length) - .split('-') - .slice(primaryEntryPointSegments.length); - // The entry-point name. For secondary entry-points we determine the name from - // the UMD bundle names. e.g. "animations-browser" results in "@angular/animations/browser". - var entryPointName = segments.length ? moduleName + '/' + segments.join('/') : moduleName; - var bundlePath = 'bundles/' + bundleName; - // When running with Ivy, we need to load the ngcc processed UMD bundles. - // These are stored in the `__ivy_ngcc_` folder that has been generated - // since we run ngcc with `--create-ivy-entry-points`. Filter out the compiler - // and localize package because it won't be processed by ngcc. - if (isRunningWithIvy && entryPointName !== '@angular/compiler' && - !entryPointName.startsWith('@angular/localize')) { - bundlePath = '__ivy_ngcc__/' + bundlePath; - } - packagesConfig[entryPointName] = { - main: segments - .map(function() { - return '../' - }) - .join('') + - bundlePath - }; - }); - }); -} - -/** Configures the local release packages in SystemJS */ -function setupLocalReleasePackages() { - // Configure all primary entry-points. - configureEntryPoint('cdk'); - configureEntryPoint('cdk-experimental'); - configureEntryPoint('components-examples'); - configureEntryPoint('material'); - configureEntryPoint('material-experimental'); - configureEntryPoint('material-moment-adapter'); - configureEntryPoint('material-luxon-adapter'); - configureEntryPoint('material-date-fns-adapter'); - configureEntryPoint('google-maps'); - configureEntryPoint('youtube-player'); - - // Configure all secondary entry-points. - CDK_PACKAGES.forEach(function(pkgName) { - configureEntryPoint('cdk', pkgName); - }); - CDK_EXPERIMENTAL_PACKAGES.forEach(function(pkgName) { - configureEntryPoint('cdk-experimental', pkgName); - }); - MATERIAL_EXPERIMENTAL_PACKAGES.forEach(function(pkgName) { - configureEntryPoint('material-experimental', pkgName); - }); - MATERIAL_PACKAGES.forEach(function(pkgName) { - configureEntryPoint('material', pkgName); - }); - - // Private secondary entry-points. - configureEntryPoint('components-examples', 'private'); -} - -/** Sets up the MDC packages by linking to their UMD bundles. */ -function setupMdcPackages() { - Object.keys(mdcPackageUmdBundles).forEach(pkgName => { - // Replace the `@npm//:node_modules/` Bazel target prefix with the `node:*` SystemJS alias. - pathMapping[pkgName] = mdcPackageUmdBundles[pkgName].replace('@npm//:node_modules/', 'node:') - }); -} - -/** Configures the specified package, its entry-point and its examples. */ -function configureEntryPoint(pkgName, entryPoint) { - var name = entryPoint ? pkgName + '/' + entryPoint : pkgName; - var examplesName = 'components-examples/' + name; - - pathMapping['@angular/' + name] = packagesPath + '/' + name; - pathMapping['@angular/' + examplesName] = packagesPath + '/' + examplesName; - - // Ensure that imports which resolve to the entry-point directory are - // redirected to the "index.js" file of the directory. - packagesConfig[packagesPath + '/' + name] = - packagesConfig[packagesPath + '/' + examplesName] = {main: 'index.js'}; -} diff --git a/tools/system-rxjs-operators.js b/tools/system-rxjs-operators.js deleted file mode 100644 index cdfa24c27f78..000000000000 --- a/tools/system-rxjs-operators.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright Google LLC 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 - */ - - -// Workaround for an issue where RxJS cannot be used with UMD bundles only. This is because -// rxjs only ships one UMD bundle and expects everyone to only use the named "rxjs" AMD module. -// Since our code internally loads operators from "rxjs/operators/index", we need to make sure -// that we re-export all operators from the UMD module. This is a small trade-off for not loading -// all rxjs files individually. - -if (typeof define === 'function' && define.amd) { - // Note that this needs to be in ES5, because we load it - // directly into the browser without transpiling. - define(['exports', 'rxjs'], function(exports, rxjs) { - // Re-export all operators in this AMD module. - Object.assign(exports, rxjs.operators); - }); -} diff --git a/tools/tslint-rules/tsLoaderRule.js b/tools/tslint-rules/tsLoaderRule.js index cfb060a8c322..688eee66f5e1 100644 --- a/tools/tslint-rules/tsLoaderRule.js +++ b/tools/tslint-rules/tsLoaderRule.js @@ -3,7 +3,7 @@ const Lint = require('tslint'); // Custom rule that registers all of the custom rules, written in TypeScript, with ts-node. // This is necessary, because `tslint` and IDEs won't execute any rules that aren't in a .js file. -require('ts-node').register({project: path.join(__dirname, '../gulp/tsconfig.json')}); +require('ts-node').register({project: path.join(__dirname, '../tsconfig.json')}); // Add a noop rule so tslint doesn't complain. exports.Rule = class Rule extends Lint.Rules.AbstractRule { From dc15da97bd66b6ce6bb1bbef880d5354e0503bad Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:52:20 +0200 Subject: [PATCH 10/21] build: update linker integration test to work with Angular v13 Updates the linker integration test to no logner use deep imports into the stict ESM package of `@angular/compiler-cli`. The linker integration test tooling is now using ESM as well; in order to be able to import into the compiler-cli. --- integration/BUILD.bazel | 2 +- integration/linker/BUILD.bazel | 3 ++- ...ackages-test.js => link-packages-test.mjs} | 25 +++++++++---------- ...iles.js => npm-packages-from-runfiles.mjs} | 18 ++++++------- 4 files changed, 24 insertions(+), 24 deletions(-) rename integration/linker/{link-packages-test.js => link-packages-test.mjs} (80%) rename integration/{npm-packages-from-runfiles.js => npm-packages-from-runfiles.mjs} (66%) diff --git a/integration/BUILD.bazel b/integration/BUILD.bazel index 5cf558ce36de..92b7d1bc1357 100644 --- a/integration/BUILD.bazel +++ b/integration/BUILD.bazel @@ -6,5 +6,5 @@ package(default_visibility = ["//visibility:public"]) # available in the runfiles of an action. js_library( name = "npm-packages-from-runfiles", - srcs = ["npm-packages-from-runfiles.js"], + srcs = ["npm-packages-from-runfiles.mjs"], ) diff --git a/integration/linker/BUILD.bazel b/integration/linker/BUILD.bazel index 10482ef15d67..4747b77cfc4c 100644 --- a/integration/linker/BUILD.bazel +++ b/integration/linker/BUILD.bazel @@ -5,6 +5,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_test") nodejs_test( name = "linker", data = [ + "link-packages-test.mjs", "//integration:npm-packages-from-runfiles", "//src/cdk:npm_package", "//src/cdk-experimental:npm_package", @@ -18,6 +19,6 @@ nodejs_test( "@npm//chalk", "@npm//glob", ], - entry_point = "link-packages-test.js", + entry_point = "link-packages-test.mjs", tags = ["partial-compilation-integration"], ) diff --git a/integration/linker/link-packages-test.js b/integration/linker/link-packages-test.mjs similarity index 80% rename from integration/linker/link-packages-test.js rename to integration/linker/link-packages-test.mjs index 57316c4b4b73..12bf58a8d299 100644 --- a/integration/linker/link-packages-test.js +++ b/integration/linker/link-packages-test.mjs @@ -3,16 +3,15 @@ * declarations to the corresponding definitions. */ -const {NodeJSFileSystem} = require('@angular/compiler-cli/src/ngtsc/file_system'); -const {ConsoleLogger, LogLevel} = require('@angular/compiler-cli/src/ngtsc/logging'); -const {createEs2015LinkerPlugin} = require('@angular/compiler-cli/linker/babel'); -const {getNpmPackagesFromRunfiles} = require('../npm-packages-from-runfiles'); -const {readFileSync} = require('fs'); -const {join} = require('path'); -const babel = require('@babel/core'); -const {default: traverse} = require('@babel/traverse'); -const glob = require('glob'); -const chalk = require('chalk'); +import {createEs2015LinkerPlugin} from '@angular/compiler-cli/linker/babel'; +import {NodeJSFileSystem, ConsoleLogger, LogLevel} from '@angular/compiler-cli'; +import {getNpmPackagesFromRunfiles} from '../npm-packages-from-runfiles.mjs'; +import fs from 'fs'; +import path from 'path'; +import babel from '@babel/core'; +import traverse from '@babel/traverse'; +import glob from 'glob'; +import chalk from 'chalk'; /** File system used by the Angular linker plugin. */ const fileSystem = new NodeJSFileSystem(); @@ -65,9 +64,9 @@ function testPackage(pkg) { // Iterate through each entry point and confirm that all partial declarations can be linked // to their corresponding Angular definitions without errors. for (const fesmFileName of entryPointFesmFiles) { - const diskFilePath = join(pkg.pkgPath, fesmFileName); - const debugFileName = join(pkg.name, fesmFileName); - const fileContent = readFileSync(diskFilePath, 'utf8'); + const diskFilePath = path.join(pkg.pkgPath, fesmFileName); + const debugFileName = path.join(pkg.name, fesmFileName); + const fileContent = fs.readFileSync(diskFilePath, 'utf8'); const linkerPlugin = createEs2015LinkerPlugin({fileSystem, logger}); // Babel throws errors if the transformation fails. We catch these so that we diff --git a/integration/npm-packages-from-runfiles.js b/integration/npm-packages-from-runfiles.mjs similarity index 66% rename from integration/npm-packages-from-runfiles.js rename to integration/npm-packages-from-runfiles.mjs index ab4e53243ce5..a649b63c1f05 100644 --- a/integration/npm-packages-from-runfiles.js +++ b/integration/npm-packages-from-runfiles.mjs @@ -3,8 +3,8 @@ * integration tests. */ -const {relative, sep, join} = require('path'); -const {readdirSync, readFileSync, existsSync} = require('fs'); +import path from 'path'; +import fs from 'fs'; /** * Gets all built Angular NPM package artifacts by querying the Bazel runfiles. @@ -13,24 +13,24 @@ const {readdirSync, readFileSync, existsSync} = require('fs'); * within the real filesystem. * TODO: Simplify if Bazel on Windows uses runfile symlinking. */ -exports.getNpmPackagesFromRunfiles = function() { +export function getNpmPackagesFromRunfiles() { // Path to the Bazel runfiles manifest if present. This file is present if runfiles are // not symlinked into the runfiles directory. const runfilesManifestPath = process.env.RUNFILES_MANIFEST_FILE; const workspacePath = 'angular_material/src'; if (!runfilesManifestPath) { - const packageRunfilesDir = join(process.env.RUNFILES, workspacePath); - return readdirSync(packageRunfilesDir) - .map(name => ({name, pkgPath: join(packageRunfilesDir, name, 'npm_package/')})) - .filter(({pkgPath}) => existsSync(pkgPath)); + const packageRunfilesDir = path.join(process.env.RUNFILES, workspacePath); + return fs.readdirSync(packageRunfilesDir) + .map(name => ({name, pkgPath: path.join(packageRunfilesDir, name, 'npm_package/')})) + .filter(({pkgPath}) => fs.existsSync(pkgPath)); } const workspaceManifestPathRegex = new RegExp(`^${workspacePath}/[\\w-]+/npm_package$`); - return readFileSync(runfilesManifestPath, 'utf8') + return fs.readFileSync(runfilesManifestPath, 'utf8') .split('\n') .map(mapping => mapping.split(' ')) .filter(([runfilePath]) => runfilePath.match(workspaceManifestPathRegex)) .map(([runfilePath, realPath]) => ({ - name: relative(workspacePath, runfilePath).split(sep)[0], + name: path.relative(workspacePath, runfilePath).split(path.sep)[0], pkgPath: realPath, })); } From d9ae06ebab616dee8c7c7ed57343fc6079e58308 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:55:19 +0200 Subject: [PATCH 11/21] build: update tooling to no longer support view engine mode Updates the build setup to no longer support the View Engine mode through a Bazel define flag. --- .bazelrc | 11 ++- .circleci/config.yml | 71 ------------------- integration/size-test/index.bzl | 1 - integration/size-test/rollup.config.js | 7 +- integration/ts-compat/BUILD.bazel | 5 -- scripts/build-packages-dist.ts | 11 ++- scripts/run-component-tests.js | 11 ++- tools/BUILD.bazel | 14 ---- .../npm-package-output/output-validations.ts | 2 +- 9 files changed, 15 insertions(+), 118 deletions(-) diff --git a/.bazelrc b/.bazelrc index b639c5300167..ef4e499d5ce5 100644 --- a/.bazelrc +++ b/.bazelrc @@ -51,14 +51,11 @@ build:release --stamp build:snapshot-build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot" build:snapshot-build --stamp -################################ -# View Engine / Ivy toggle # -################################ -build:view-engine --define=angular_ivy_enabled=False -build:ivy --define=angular_ivy_enabled=True -# Set Ivy as the default -build --config=ivy +################################## +# Always enable Ivy compilation # +################################## +build --define=angular_ivy_enabled=True ################################ # Remote Execution Setup # diff --git a/.circleci/config.yml b/.circleci/config.yml index c71982e57f22..9ba66f096d84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -197,28 +197,6 @@ jobs: - run: bazel build --build_tag_filters=-docs-package,-release-package -- src/... - *slack_notify_on_failure - # ----------------------------------- - # Job which ensures that all non-test Bazel targets build properly - # in View Engine configuration. - # ----------------------------------- - view_engine_build: - <<: *job_defaults - resource_class: xlarge - environment: - GCP_DECRYPT_TOKEN: *gcp_decrypt_token - steps: - - checkout_and_rebase - - *restore_cache - - *setup_bazel_ci_config - - *setup_bazel_remote_execution - - *yarn_install - - *setup_bazel_binary - - # Exclude release and docs packages here as those will be built within - # the "build_release_packages" and "publish_snapshots" jobs. - - run: bazel build --build_tag_filters=-docs-package,-release-package --config=view-engine -- src/... - - *slack_notify_on_failure - # -------------------------------------------------------------------------------------------- # Job that runs API golden tests in "tools/public_api_guard". # This job fails whenever an API has been updated but not explicitly approved through goldens. @@ -525,48 +503,6 @@ jobs: - run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/... - *slack_notify_on_failure - # ---------------------------------------------------------------------------- - # Job that runs all Bazel tests against View Engine with the current Angular version - # specified in the project dev dependencies. - # ---------------------------------------------------------------------------- - view_engine_test: - <<: *job_defaults - resource_class: xlarge - environment: - GCP_DECRYPT_TOKEN: *gcp_decrypt_token - steps: - - checkout_and_rebase - - *restore_cache - - *setup_bazel_ci_config - - *setup_bazel_remote_execution - - *yarn_install - - *setup_bazel_binary - - # Run project tests with NGC and View Engine. - - run: bazel test --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only -- src/... - - *slack_notify_on_failure - - # ---------------------------------------------------------------------------- - # Job that runs all Bazel tests against View Engine from angular/angular#master. - # ---------------------------------------------------------------------------- - view_engine_snapshot_test_cronjob: - <<: *job_defaults - resource_class: xlarge - environment: - GCP_DECRYPT_TOKEN: *gcp_decrypt_token - steps: - - checkout_and_rebase - - *restore_cache - - *setup_bazel_ci_config - - *setup_bazel_remote_execution - - *setup_snapshot_builds - - *yarn_install_loose_lockfile - - *setup_bazel_binary - - # Run project tests with NGC and View Engine. - - run: bazel test --build_tag_filters=-docs-package,-e2e --test_tag_filters=-e2e --config=view-engine --build_tests_only -- src/... - - *slack_notify_on_failure - # ---------------------------------------------------------------------------- # Job that runs all Bazel integration tests. # ---------------------------------------------------------------------------- @@ -584,7 +520,6 @@ jobs: - *setup_bazel_binary - run: yarn integration-tests:partial-ivy - - run: yarn integration-tests:view-engine # TODO: Re-enable when there are integration tests that should run with Ivy. # Currently this command fails as there are no tests. # - run: yarn integration-tests @@ -654,10 +589,6 @@ workflows: jobs: - bazel_build: filters: *ignore_presubmit_branch_filter - - view_engine_build: - filters: *ignore_presubmit_branch_filter - - view_engine_test: - filters: *ignore_presubmit_branch_filter - api_golden_checks: filters: *ignore_presubmit_branch_filter - integration_tests: @@ -702,8 +633,6 @@ workflows: # workflow. See: https://circleci.com/ideas/?idea=CCI-I-295 - snapshot_tests_local_browsers: filters: *only_main_branch_filter - - view_engine_snapshot_test_cronjob: - filters: *only_main_branch_filter - mdc_snapshot_test_cronjob: filters: *only_main_branch_filter - integration_tests_snapshot: diff --git a/integration/size-test/index.bzl b/integration/size-test/index.bzl index c5e88b20a222..25cf546f44c4 100644 --- a/integration/size-test/index.bzl +++ b/integration/size-test/index.bzl @@ -48,7 +48,6 @@ def size_test(name, file, deps): }, deps = [ ":%s_lib" % name, - "//tools:angular_ivy_enabled", "@npm//rollup-plugin-node-resolve", "@npm//@angular-devkit/build-optimizer", ], diff --git a/integration/size-test/rollup.config.js b/integration/size-test/rollup.config.js index 1c9ad12a1b6f..1d934e60ee36 100644 --- a/integration/size-test/rollup.config.js +++ b/integration/size-test/rollup.config.js @@ -1,8 +1,5 @@ const {buildOptimizer} = require('@angular-devkit/build-optimizer/src/build-optimizer/build-optimizer'); const node = require('rollup-plugin-node-resolve'); -const {ivyEnabled} = require('angular_material/tools/angular_ivy_enabled'); - -console.info(`Processing rollup bundle in ${ivyEnabled ? 'Ivy' : 'View Engine'} mode.`); const buildOptimizerPlugin = { name: 'build-optimizer', @@ -30,9 +27,7 @@ module.exports = { plugins: [ buildOptimizerPlugin, node({ - mainFields: ivyEnabled ? - ['es2015_ivy_ngcc', 'module_ivy_ngcc','es2015', 'module'] : - ['es2015', 'module'], + mainFields: ['es2020', 'module'], }), ], }; diff --git a/integration/ts-compat/BUILD.bazel b/integration/ts-compat/BUILD.bazel index 51789653fe09..1de33b0dad5a 100644 --- a/integration/ts-compat/BUILD.bazel +++ b/integration/ts-compat/BUILD.bazel @@ -38,11 +38,6 @@ typescript_version_packages = [ "@npm//@types/node", ], entry_point = "test.js", - tags = [ - # These tests run in view engine only as the release packages are - # built with View Engine and we want to reproduce this here. - "view-engine-only", - ], ) for ts_pkg_name in typescript_version_packages ] diff --git a/scripts/build-packages-dist.ts b/scripts/build-packages-dist.ts index 82d2c4b9ffd1..ed48dda6a42b 100755 --- a/scripts/build-packages-dist.ts +++ b/scripts/build-packages-dist.ts @@ -45,7 +45,7 @@ if (module === require.main) { /** Builds the release packages for NPM. */ export function performNpmReleaseBuild(): BuiltPackage[] { - return buildReleasePackages(false, defaultDistPath, /* isSnapshotBuild */ false); + return buildReleasePackages(defaultDistPath, /* isSnapshotBuild */ false); } /** @@ -53,19 +53,17 @@ export function performNpmReleaseBuild(): BuiltPackage[] { * Git HEAD SHA is included in the version (for easier debugging and back tracing). */ export function performDefaultSnapshotBuild(): BuiltPackage[] { - return buildReleasePackages(false, defaultDistPath, /* isSnapshotBuild */ true); + return buildReleasePackages(defaultDistPath, /* isSnapshotBuild */ true); } /** * Builds the release packages with the given compile mode and copies * the package output into the given directory. */ -function buildReleasePackages(useIvy: boolean, distPath: string, - isSnapshotBuild: boolean): BuiltPackage[] { +function buildReleasePackages(distPath: string, isSnapshotBuild: boolean): BuiltPackage[] { console.log('######################################'); console.log(' Building release packages...'); - console.log(` Compiling with Ivy: ${useIvy}`); console.log('######################################'); // List of targets to build. e.g. "src/cdk:npm_package", or "src/material:npm_package". @@ -78,7 +76,6 @@ function buildReleasePackages(useIvy: boolean, distPath: string, // runs the workspace stamping script. The stamping script ensures that the // version placeholder is populated in the release output. const stampConfigArg = `--config=${isSnapshotBuild ? 'snapshot-build' : 'release'}`; - const ivySwitchConfigArg = `--config=${useIvy ? 'ivy' : 'view-engine'}`; // Walk through each release package and clear previous "npm_package" outputs. This is // a workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1219. We need to @@ -91,7 +88,7 @@ function buildReleasePackages(useIvy: boolean, distPath: string, } }); - exec(`${bazelCmd} build ${stampConfigArg} ${ivySwitchConfigArg} ${targets.join(' ')}`); + exec(`${bazelCmd} build ${stampConfigArg} ${targets.join(' ')}`); // Delete the distribution directory so that the output is guaranteed to be clean. Re-create // the empty directory so that we can copy the release packages into it later. diff --git a/scripts/run-component-tests.js b/scripts/run-component-tests.js index eba0722f4789..b6b620eaa6d9 100644 --- a/scripts/run-component-tests.js +++ b/scripts/run-component-tests.js @@ -35,9 +35,9 @@ shelljs.set('-e'); shelljs.cd(projectDir); // Extracts the supported command line options. -const {_: components, local, firefox, watch, 'view-engine': viewEngine} = minimist(args, { - boolean: ['local', 'firefox', 'watch', 'view-engine'], - default: {watch: true, 'view-engine': false}, +const {_: components, local, firefox, watch} = minimist(args, { + boolean: ['local', 'firefox', 'watch'], + default: {watch: true}, }); // Whether tests for all components should be run. @@ -54,7 +54,6 @@ if (local && (components.length > 1 || all)) { const browserName = firefox ? 'firefox' : 'chromium'; const bazelBinary = `yarn -s ${watch ? 'ibazel' : 'bazel'}`; -const configFlag = viewEngine ? '--config=view-engine' : ''; // If `all` has been specified as component, we run tests for all components // in the repository. The `--firefox` flag can be still specified. @@ -68,7 +67,7 @@ if (all) { } shelljs.exec( `yarn -s bazel test --test_tag_filters=-e2e,browser:${browserName} ` + - `--build_tag_filters=browser:${browserName} --build_tests_only ${configFlag} //src/...`); + `--build_tag_filters=browser:${browserName} --build_tests_only //src/...`); return; } @@ -89,7 +88,7 @@ const testLabels = components .map(t => `${getBazelPackageOfComponentName(t)}:${getTargetName(t)}`); // Runs Bazel for the determined test labels. -shelljs.exec(`${bazelBinary} ${bazelAction} ${testLabels.join(' ')} ${configFlag}`); +shelljs.exec(`${bazelBinary} ${bazelAction} ${testLabels.join(' ')}`); /** * Gets the Bazel package label for the specified component name. Throws if diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index 74688be6f294..fae967ea2f17 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -7,20 +7,6 @@ exports_files([ "system-rxjs-operators.js", ]) -config_setting( - name = "view_engine_mode", - values = { - "define": "angular_ivy_enabled=False", - }, -) - -# Bazel build setting for enabling partial compilation. The partial compilation -# build setting can be set using `--//tools:partial_compilation=True`. -bool_flag( - name = "partial_compilation", - build_setting_default = False, -) - # Bazel config setting that matches if the partial compilation flag is set to `True`. config_setting( name = "partial_compilation_enabled", diff --git a/tools/release-checks/npm-package-output/output-validations.ts b/tools/release-checks/npm-package-output/output-validations.ts index b8f0ee66cc13..b9e03d114c9f 100644 --- a/tools/release-checks/npm-package-output/output-validations.ts +++ b/tools/release-checks/npm-package-output/output-validations.ts @@ -17,7 +17,7 @@ const bazelManifestPath = /(angular_material|external)\//; * List of fields which are mandatory in entry-point "package.json" files and refer * to files in the release output. */ -const packageJsonPathFields = ['main', 'module', 'typings', 'es2015', 'fesm2015', 'esm2015']; +const packageJsonPathFields = ['module', 'typings', 'fesm2015', 'fesm2020', 'esm2020']; /** * Checks the specified JavaScript file and ensures that it does not From 24e158b0ef517d828a65e7211e0812220dba5c5a Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 21:57:32 +0200 Subject: [PATCH 12/21] build: update e2e-app and dev-app to use esbuild Previously, the dev-app relied on SystemJS for resolving all files. This required a lot of configuration and was very cumbersome to maintain. This commit switches both serve-targets to use ESBuild instead. ESbuild will resolve all the dependencies for us at build time; removing the manual configuration work, and it will also allow us to incorporate the linked framework ESM bundles, so that the apps would not need the Angular compiler at runtime (for JIT). Generally it seems that ESBuild is extremely fast so that it makes up for the runtime resolution through SystemJS; and manual configuration work. It also makes our tooling more modern and easier to adopt to new changes (e.g. if we'd add a dependency like `date-fns` there is no special tooling needed). --- src/components-examples/BUILD.bazel | 63 +-- src/components-examples/config.bzl | 61 +++ .../private/load-example.ts | 38 +- src/dev-app/BUILD.bazel | 59 ++- src/dev-app/dev-app/routes.ts | 176 --------- src/dev-app/esbuild.config.mjs | 12 + src/dev-app/example/example.ts | 19 +- src/dev-app/index.html | 16 +- src/dev-app/main-module.ts | 2 +- src/dev-app/main.ts | 4 +- src/dev-app/routes.ts | 374 ++++++++++++++++++ src/e2e-app/BUILD.bazel | 48 ++- src/e2e-app/devserver-configure.js | 10 - src/e2e-app/e2e-app/routes.ts | 78 ---- src/e2e-app/esbuild.config.mjs | 12 + src/e2e-app/example-viewer/example-viewer.ts | 5 +- src/e2e-app/index.html | 8 +- src/e2e-app/main-module.ts | 2 +- src/e2e-app/main.ts | 4 +- src/e2e-app/routes.ts | 78 ++++ 20 files changed, 643 insertions(+), 426 deletions(-) create mode 100644 src/components-examples/config.bzl delete mode 100644 src/dev-app/dev-app/routes.ts create mode 100644 src/dev-app/esbuild.config.mjs create mode 100644 src/dev-app/routes.ts delete mode 100644 src/e2e-app/devserver-configure.js delete mode 100644 src/e2e-app/e2e-app/routes.ts create mode 100644 src/e2e-app/esbuild.config.mjs create mode 100644 src/e2e-app/routes.ts diff --git a/src/components-examples/BUILD.bazel b/src/components-examples/BUILD.bazel index e2e395246ad1..9b2dc84ad147 100644 --- a/src/components-examples/BUILD.bazel +++ b/src/components-examples/BUILD.bazel @@ -1,71 +1,10 @@ load("//tools:defaults.bzl", "ng_module", "ng_package") load("//tools/highlight-files:index.bzl", "highlight_files") load("//tools/package-docs-content:index.bzl", "package_docs_content") +load(":config.bzl", "ALL_EXAMPLES") package(default_visibility = ["//visibility:public"]) -ALL_EXAMPLES = [ - # TODO(devversion): try to have for each entry-point a bazel package so that - # we can automate this using the "package.bzl" variables. Currently generated - # with "bazel query 'kind("ng_module", //src/components-examples/...:*)' --output="label" - "//src/components-examples/material/tree", - "//src/components-examples/material/tooltip", - "//src/components-examples/material/toolbar", - "//src/components-examples/material/tabs", - "//src/components-examples/material/table", - "//src/components-examples/material/stepper", - "//src/components-examples/material/sort", - "//src/components-examples/material/snack-bar", - "//src/components-examples/material/slider", - "//src/components-examples/material/slide-toggle", - "//src/components-examples/material/sidenav", - "//src/components-examples/material/select", - "//src/components-examples/material/radio", - "//src/components-examples/material/progress-spinner", - "//src/components-examples/material/progress-bar", - "//src/components-examples/material/paginator", - "//src/components-examples/material/menu", - "//src/components-examples/material/list", - "//src/components-examples/material/input", - "//src/components-examples/material/icon", - "//src/components-examples/material/grid-list", - "//src/components-examples/material/form-field", - "//src/components-examples/material/expansion", - "//src/components-examples/material/divider", - "//src/components-examples/material/dialog", - "//src/components-examples/material/datepicker", - "//src/components-examples/material/core", - "//src/components-examples/material/chips", - "//src/components-examples/material/checkbox", - "//src/components-examples/material/card", - "//src/components-examples/material/button-toggle", - "//src/components-examples/material/button", - "//src/components-examples/material/bottom-sheet", - "//src/components-examples/material/badge", - "//src/components-examples/material/autocomplete", - "//src/components-examples/material-experimental/column-resize", - "//src/components-examples/material-experimental/popover-edit", - "//src/components-examples/material-experimental/mdc-card", - "//src/components-examples/material-experimental/mdc-form-field", - "//src/components-examples/material-experimental/selection", - "//src/components-examples/cdk/tree", - "//src/components-examples/cdk/text-field", - "//src/components-examples/cdk/table", - "//src/components-examples/cdk/stepper", - "//src/components-examples/cdk/scrolling", - "//src/components-examples/cdk/portal", - "//src/components-examples/cdk/accordion", - "//src/components-examples/cdk/platform", - "//src/components-examples/cdk/drag-drop", - "//src/components-examples/cdk/clipboard", - "//src/components-examples/cdk/a11y", - "//src/components-examples/cdk/layout", - "//src/components-examples/cdk/overlay", - "//src/components-examples/cdk-experimental/menu", - "//src/components-examples/cdk-experimental/popover-edit", - "//src/components-examples/cdk-experimental/selection", -] - ng_module( name = "components-examples", srcs = glob(["*.ts"]) + [":example-module.ts"], diff --git a/src/components-examples/config.bzl b/src/components-examples/config.bzl new file mode 100644 index 000000000000..909d3aecf7a3 --- /dev/null +++ b/src/components-examples/config.bzl @@ -0,0 +1,61 @@ +ALL_EXAMPLES = [ + # TODO(devversion): try to have for each entry-point a bazel package so that + # we can automate this using the "package.bzl" variables. Currently generated + # with "bazel query 'kind("ng_module", //src/components-examples/...:*)' --output="label" + "//src/components-examples/material/tree", + "//src/components-examples/material/tooltip", + "//src/components-examples/material/toolbar", + "//src/components-examples/material/tabs", + "//src/components-examples/material/table", + "//src/components-examples/material/stepper", + "//src/components-examples/material/sort", + "//src/components-examples/material/snack-bar", + "//src/components-examples/material/slider", + "//src/components-examples/material/slide-toggle", + "//src/components-examples/material/sidenav", + "//src/components-examples/material/select", + "//src/components-examples/material/radio", + "//src/components-examples/material/progress-spinner", + "//src/components-examples/material/progress-bar", + "//src/components-examples/material/paginator", + "//src/components-examples/material/menu", + "//src/components-examples/material/list", + "//src/components-examples/material/input", + "//src/components-examples/material/icon", + "//src/components-examples/material/grid-list", + "//src/components-examples/material/form-field", + "//src/components-examples/material/expansion", + "//src/components-examples/material/divider", + "//src/components-examples/material/dialog", + "//src/components-examples/material/datepicker", + "//src/components-examples/material/core", + "//src/components-examples/material/chips", + "//src/components-examples/material/checkbox", + "//src/components-examples/material/card", + "//src/components-examples/material/button-toggle", + "//src/components-examples/material/button", + "//src/components-examples/material/bottom-sheet", + "//src/components-examples/material/badge", + "//src/components-examples/material/autocomplete", + "//src/components-examples/material-experimental/column-resize", + "//src/components-examples/material-experimental/popover-edit", + "//src/components-examples/material-experimental/mdc-card", + "//src/components-examples/material-experimental/mdc-form-field", + "//src/components-examples/material-experimental/selection", + "//src/components-examples/cdk/tree", + "//src/components-examples/cdk/text-field", + "//src/components-examples/cdk/table", + "//src/components-examples/cdk/stepper", + "//src/components-examples/cdk/scrolling", + "//src/components-examples/cdk/portal", + "//src/components-examples/cdk/accordion", + "//src/components-examples/cdk/platform", + "//src/components-examples/cdk/drag-drop", + "//src/components-examples/cdk/clipboard", + "//src/components-examples/cdk/a11y", + "//src/components-examples/cdk/layout", + "//src/components-examples/cdk/overlay", + "//src/components-examples/cdk-experimental/menu", + "//src/components-examples/cdk-experimental/popover-edit", + "//src/components-examples/cdk-experimental/selection", +] diff --git a/src/components-examples/private/load-example.ts b/src/components-examples/private/load-example.ts index 22f6a1e302fe..89947c1a0a7b 100644 --- a/src/components-examples/private/load-example.ts +++ b/src/components-examples/private/load-example.ts @@ -1,26 +1,24 @@ -import {ComponentFactory, Injector, NgModuleFactory, Type} from '@angular/core'; +import {Injector, Type, createNgModuleRef} from '@angular/core'; import {EXAMPLE_COMPONENTS} from '../example-module'; -/** Asynchronously loads the specified example and returns its component factory. */ -export async function loadExampleFactory(name: string, injector: Injector) - : Promise> { +/** + * Asynchronously loads the specified example and returns its component and + * an injector instantiated from the containing example module. + * + * This is used in the `dev-app` and `e2e-app` and assumes ESBuild having created + * entry-points for the example modules under the `/bundles/` URL. + */ +export async function loadExample(name: string, injector: Injector) + : Promise<{component: Type, injector: Injector}> { const {componentName, module} = EXAMPLE_COMPONENTS[name]; - // TODO(devversion): remove the NgFactory import when the `--config=view-engine` switch is gone. - // Note: This line will be replaced by the e2e-app when a rollup bundle is composed. Rollup needs - // to run for the partial compilation in order to process sources with the Angular linker. - const {moduleExports, moduleFactoryExports} = await loadModuleWithFactory( - `@angular/components-examples/${module.importSpecifier}`); - const moduleFactory: NgModuleFactory = moduleFactoryExports[`${module.name}NgFactory`]; + const moduleExports = await import( + `/bundles/components-examples/${module.importSpecifier}/index.js`); + const moduleType: Type = moduleExports[module.name]; const componentType: Type = moduleExports[componentName]; - return moduleFactory.create(injector) - .componentFactoryResolver.resolveComponentFactory(componentType); -} + const moduleRef = createNgModuleRef(moduleType, injector); -/** Loads the module and factory file for the given module. */ -async function loadModuleWithFactory(moduleName: string) { - const [moduleFactoryExports, moduleExports] = await Promise.all([ - import(moduleName + '/index.ngfactory'), - import(moduleName) - ]); - return {moduleFactoryExports, moduleExports}; + return { + component: componentType, + injector: moduleRef.injector, + }; } diff --git a/src/dev-app/BUILD.bazel b/src/dev-app/BUILD.bazel index 3b0b135b2968..66b1e0533a4b 100644 --- a/src/dev-app/BUILD.bazel +++ b/src/dev-app/BUILD.bazel @@ -1,9 +1,9 @@ -load("@npm//@angular/dev-infra-private/bazel:extract_js_module_output.bzl", "extract_js_module_output") load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web") -load("//:packages.bzl", "MDC_PACKAGE_UMD_BUNDLES") -load("//tools:create-system-config.bzl", "create_system_config") load("//tools:defaults.bzl", "ng_module", "sass_binary") load("//tools/dev-server:index.bzl", "dev_server") +load("//tools/esbuild:index.bzl", "esbuild", "esbuild_config") +load("//src/components-examples:config.bzl", "ALL_EXAMPLES") +load("//tools/angular:index.bzl", "LINKER_PROCESSED_FW_PACKAGES") package(default_visibility = ["//visibility:public"]) @@ -13,6 +13,7 @@ ng_module( "dev-app.ts", "main.ts", "main-module.ts", + "routes.ts", ], deps = [ "//src/cdk/bidi", @@ -99,11 +100,33 @@ ng_module( "//src/dev-app/virtual-scroll", "//src/dev-app/youtube-player", "//src/material/core", + "@npm//@angular/compiler", "@npm//@angular/localize", "@npm//@angular/router", ], ) +esbuild_config( + name = "esbuild_config", + config_file = "esbuild.config.mjs", +) + +esbuild( + name = "bundles", + config = ":esbuild_config", + entry_points = [":main.ts"] + ["%s:index.ts" % e for e in ALL_EXAMPLES], + platform = "browser", + splitting = True, + # We cannot use `ES2017` or higher as that would result in `async/await` not being downleveled. + # ZoneJS needs to be able to intercept these as otherwise change detection would not work properly. + target = "es2016", + # Note: We add all linker-processed FW packages as dependencies here so that ESBuild will + # map all framework packages to their linker-processed bundles from `tools/angular`. + deps = LINKER_PROCESSED_FW_PACKAGES + [ + ":dev-app", + ], +) + sass_binary( name = "theme", src = "theme.scss", @@ -117,11 +140,6 @@ sass_binary( ], ) -create_system_config( - name = "system-config", - output_name = "system-config.js", -) - # Variables that are going to be inlined into the dev app index.html. filegroup( name = "variables", @@ -138,18 +156,14 @@ filegroup( srcs = [ "favicon.ico", "index.html", - ":system-config", ":theme", ":variables", "//src/dev-app/icon:icon_demo_assets", - "//tools:system-rxjs-operators.js", "@npm//:node_modules/core-js-bundle/index.js", "@npm//:node_modules/moment/min/moment-with-locales.min.js", "@npm//:node_modules/rxjs/bundles/rxjs.umd.min.js", - "@npm//:node_modules/systemjs/dist/system.js", - "@npm//:node_modules/tslib/tslib.js", "@npm//:node_modules/zone.js/dist/zone.js", - ] + MDC_PACKAGE_UMD_BUNDLES.values(), + ], ) dev_server( @@ -163,31 +177,16 @@ dev_server( ], tags = ["manual"], deps = [ - ":dev-app", + ":bundles", ], ) -# Collects all ES5 JavaScript files which are required to serve the dev-app. By default, -# ts_library and ng_module targets only expose the type definition files as outputs. -extract_js_module_output( - name = "dev_app_js_sources", - include_declarations = False, - include_default_files = True, - # `JSModuleInfo` resolves to the ES5 sources from TypeScript targets. See: - # https://github.com/bazelbuild/rules_nodejs/blob/stable/packages/typescript/internal/build_defs.bzl#L334-L337 - # Note: We cannot use the named JS module provider because not all dependencies are - # necessarily captured as named module. See: https://github.com/angular/components/commit/94289397cac94ca86a292b2cd64945df52bbb7fb. - provider = "JSModuleInfo", - tags = ["manual"], - deps = [":dev-app"], -) - # Target that builds a static web package of the dev-app. The web package can be # deployed on static hosting services (such as firebase). pkg_web( name = "web_package", srcs = [ - ":dev_app_js_sources", + ":bundles", ":dev_app_static_files", ], additional_root_paths = [ diff --git a/src/dev-app/dev-app/routes.ts b/src/dev-app/dev-app/routes.ts deleted file mode 100644 index 79a8581d9609..000000000000 --- a/src/dev-app/dev-app/routes.ts +++ /dev/null @@ -1,176 +0,0 @@ -/** - * @license - * Copyright Google LLC 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 {Routes} from '@angular/router'; -import {DevApp404} from './dev-app-404'; -import {DevAppHome} from './dev-app-home'; - -export const DEV_APP_ROUTES: Routes = [ - {path: '', component: DevAppHome}, - { - path: 'autocomplete', - loadChildren: 'autocomplete/autocomplete-demo-module#AutocompleteDemoModule' - }, - {path: 'badge', loadChildren: 'badge/badge-demo-module#BadgeDemoModule'}, - { - path: 'bottom-sheet', - loadChildren: 'bottom-sheet/bottom-sheet-demo-module#BottomSheetDemoModule' - }, - {path: 'baseline', loadChildren: 'baseline/baseline-demo-module#BaselineDemoModule'}, - {path: 'button', loadChildren: 'button/button-demo-module#ButtonDemoModule'}, - { - path: 'button-toggle', - loadChildren: 'button-toggle/button-toggle-demo-module#ButtonToggleDemoModule' - }, - {path: 'card', loadChildren: 'card/card-demo-module#CardDemoModule'}, - { - path: 'cdk-experimental-combobox', - loadChildren: 'cdk-experimental-combobox/cdk-combobox-demo-module#CdkComboboxDemoModule' - }, - { - path: 'cdk-experimental-listbox', - loadChildren: 'cdk-experimental-listbox/cdk-listbox-demo-module#CdkListboxDemoModule' - }, - { - path: 'cdk-experimental-menu', - loadChildren: 'cdk-experimental-menu/cdk-menu-demo-module#CdkMenuDemoModule' - }, - {path: 'checkbox', loadChildren: 'checkbox/checkbox-demo-module#CheckboxDemoModule'}, - {path: 'chips', loadChildren: 'chips/chips-demo-module#ChipsDemoModule'}, - {path: 'clipboard', loadChildren: 'clipboard/clipboard-demo-module#ClipboardDemoModule'}, - { - path: 'column-resize', - loadChildren: 'column-resize/column-resize-demo-module#ColumnResizeDemoModule' - }, - {path: 'datepicker', loadChildren: 'datepicker/datepicker-demo-module#DatepickerDemoModule'}, - {path: 'dialog', loadChildren: 'dialog/dialog-demo-module#DialogDemoModule'}, - {path: 'drawer', loadChildren: 'drawer/drawer-demo-module#DrawerDemoModule'}, - {path: 'drag-drop', loadChildren: 'drag-drop/drag-drop-demo-module#DragDropDemoModule'}, - {path: 'expansion', loadChildren: 'expansion/expansion-demo-module#ExpansionDemoModule'}, - { - path: 'focus-origin', - loadChildren: 'focus-origin/focus-origin-demo-module#FocusOriginDemoModule' - }, - {path: 'focus-trap', loadChildren: 'focus-trap/focus-trap-demo-module#FocusTrapDemoModule'}, - {path: 'google-map', loadChildren: 'google-map/google-map-demo-module#GoogleMapDemoModule'}, - {path: 'grid-list', loadChildren: 'grid-list/grid-list-demo-module#GridListDemoModule'}, - {path: 'icon', loadChildren: 'icon/icon-demo-module#IconDemoModule'}, - {path: 'input', loadChildren: 'input/input-demo-module#InputDemoModule'}, - {path: 'layout', loadChildren: 'layout/layout-demo-module#LayoutDemoModule'}, - { - path: 'input-modality', - loadChildren: - 'input-modality/input-modality-detector-demo-module#InputModalityDetectorDemoModule', - }, - {path: 'list', loadChildren: 'list/list-demo-module#ListDemoModule'}, - { - path: 'live-announcer', - loadChildren: 'live-announcer/live-announcer-demo-module#LiveAnnouncerDemoModule' - }, - { - path: 'menubar', - loadChildren: 'menubar/mat-menubar-demo-module#MatMenuBarDemoModule' - }, - { - path: 'mdc-autocomplete', - loadChildren: 'mdc-autocomplete/mdc-autocomplete-demo-module#MdcAutocompleteDemoModule' - }, - {path: 'mdc-button', loadChildren: 'mdc-button/mdc-button-demo-module#MdcButtonDemoModule'}, - {path: 'mdc-card', loadChildren: 'mdc-card/mdc-card-demo-module#MdcCardDemoModule'}, - { - path: 'mdc-checkbox', - loadChildren: 'mdc-checkbox/mdc-checkbox-demo-module#MdcCheckboxDemoModule' - }, - { - path: 'mdc-progress-bar', - loadChildren: 'mdc-progress-bar/mdc-progress-bar-demo-module#MdcProgressBarDemoModule' - }, - {path: 'mdc-chips', loadChildren: 'mdc-chips/mdc-chips-demo-module#MdcChipsDemoModule'}, - {path: 'mdc-dialog', loadChildren: 'mdc-dialog/mdc-dialog-demo-module#MdcDialogDemoModule'}, - {path: 'mdc-input', loadChildren: 'mdc-input/mdc-input-demo-module#MdcInputDemoModule'}, - {path: 'mdc-list', loadChildren: 'mdc-list/mdc-list-demo-module#MdcListDemoModule'}, - {path: 'mdc-menu', loadChildren: 'mdc-menu/mdc-menu-demo-module#MdcMenuDemoModule'}, - { - path: 'mdc-paginator', - loadChildren: 'mdc-paginator/mdc-paginator-demo-module#MdcPaginatorDemoModule' - }, - { - path: 'mdc-progress-spinner', - loadChildren: - 'mdc-progress-spinner/mdc-progress-spinner-demo-module#MdcProgressSpinnerDemoModule' - }, - {path: 'mdc-radio', loadChildren: 'mdc-radio/mdc-radio-demo-module#MdcRadioDemoModule'}, - {path: 'mdc-select', loadChildren: 'mdc-select/mdc-select-demo-module#MdcSelectDemoModule'}, - {path: 'mdc-sidenav', loadChildren: 'mdc-sidenav/mdc-sidenav-demo-module#MdcSidenavDemoModule'}, - { - path: 'mdc-snack-bar', - loadChildren: 'mdc-snack-bar/mdc-snack-bar-demo-module#MdcSnackBarDemoModule' - }, - { - path: 'mdc-slide-toggle', - loadChildren: 'mdc-slide-toggle/mdc-slide-toggle-demo-module#MdcSlideToggleDemoModule' - }, - {path: 'mdc-slider', loadChildren: 'mdc-slider/mdc-slider-demo-module#MdcSliderDemoModule'}, - {path: 'mdc-table', loadChildren: 'mdc-table/mdc-table-demo-module#MdcTableDemoModule'}, - {path: 'mdc-tabs', loadChildren: 'mdc-tabs/mdc-tabs-demo-module#MdcTabsDemoModule'}, - {path: 'mdc-tooltip', loadChildren: 'mdc-tooltip/mdc-tooltip-demo-module#MdcTooltipDemoModule'}, - {path: 'menu', loadChildren: 'menu/menu-demo-module#MenuDemoModule'}, - {path: 'paginator', loadChildren: 'paginator/paginator-demo-module#PaginatorDemoModule'}, - {path: 'platform', loadChildren: 'platform/platform-demo-module#PlatformDemoModule'}, - { - path: 'popover-edit', - loadChildren: 'popover-edit/popover-edit-demo-module#PopoverEditDemoModule' - }, - {path: 'portal', loadChildren: 'portal/portal-demo-module#PortalDemoModule'}, - { - path: 'progress-bar', - loadChildren: 'progress-bar/progress-bar-demo-module#ProgressBarDemoModule' - }, - { - path: 'progress-spinner', - loadChildren: 'progress-spinner/progress-spinner-demo-module#ProgressSpinnerDemoModule' - }, - {path: 'radio', loadChildren: 'radio/radio-demo-module#RadioDemoModule'}, - {path: 'ripple', loadChildren: 'ripple/ripple-demo-module#RippleDemoModule'}, - {path: 'select', loadChildren: 'select/select-demo-module#SelectDemoModule'}, - {path: 'sidenav', loadChildren: 'sidenav/sidenav-demo-module#SidenavDemoModule'}, - { - path: 'slide-toggle', - loadChildren: 'slide-toggle/slide-toggle-demo-module#SlideToggleDemoModule' - }, - {path: 'slider', loadChildren: 'slider/slider-demo-module#SliderDemoModule'}, - {path: 'snack-bar', loadChildren: 'snack-bar/snack-bar-demo-module#SnackBarDemoModule'}, - {path: 'stepper', loadChildren: 'stepper/stepper-demo-module#StepperDemoModule'}, - {path: 'table', loadChildren: 'table/table-demo-module#TableDemoModule'}, - { - path: 'table-scroll-container', - loadChildren: - 'table-scroll-container/table-scroll-container-demo-module#TableScrollContainerDemoModule', - }, - {path: 'tabs', loadChildren: 'tabs/tabs-demo-module#TabsDemoModule'}, - {path: 'toolbar', loadChildren: 'toolbar/toolbar-demo-module#ToolbarDemoModule'}, - {path: 'tooltip', loadChildren: 'tooltip/tooltip-demo-module#TooltipDemoModule'}, - {path: 'tree', loadChildren: 'tree/tree-demo-module#TreeDemoModule'}, - {path: 'typography', loadChildren: 'typography/typography-demo-module#TypographyDemoModule'}, - {path: 'screen-type', loadChildren: 'screen-type/screen-type-demo-module#ScreenTypeDemoModule'}, - { - path: 'connected-overlay', - loadChildren: 'connected-overlay/connected-overlay-demo-module#ConnectedOverlayDemoModule' - }, - { - path: 'virtual-scroll', - loadChildren: 'virtual-scroll/virtual-scroll-demo-module#VirtualScrollDemoModule' - }, - { - path: 'youtube-player', - loadChildren: 'youtube-player/youtube-player-demo-module#YouTubePlayerDemoModule', - }, - {path: 'selection', loadChildren: 'selection/selection-demo-module#SelectionDemoModule'}, - {path: 'examples', loadChildren: 'examples-page/examples-page-module#ExamplesPageModule'}, - {path: '**', component: DevApp404}, -]; diff --git a/src/dev-app/esbuild.config.mjs b/src/dev-app/esbuild.config.mjs new file mode 100644 index 000000000000..475c2bf12bbd --- /dev/null +++ b/src/dev-app/esbuild.config.mjs @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google LLC 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 + */ + +export default { + resolveExtensions: ['.js'], + format: 'esm', +}; diff --git a/src/dev-app/example/example.ts b/src/dev-app/example/example.ts index 4581dd129a48..ba7f66d0fcd6 100644 --- a/src/dev-app/example/example.ts +++ b/src/dev-app/example/example.ts @@ -8,8 +8,15 @@ import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {EXAMPLE_COMPONENTS} from '@angular/components-examples'; -import {loadExampleFactory} from '@angular/components-examples/private'; -import {Component, Injector, Input, OnInit, ViewContainerRef} from '@angular/core'; +import {loadExample} from '@angular/components-examples/private'; +import { + ChangeDetectorRef, + Component, + Injector, + Input, + OnInit, + ViewContainerRef +} from '@angular/core'; @Component({ selector: 'material-example', @@ -56,11 +63,15 @@ export class Example implements OnInit { title: string; constructor(private _injector: Injector, - private _viewContainerRef: ViewContainerRef) {} + private _viewContainerRef: ViewContainerRef, + private _changeDetectorRef: ChangeDetectorRef) {} async ngOnInit() { this.title = EXAMPLE_COMPONENTS[this.id].title; - this._viewContainerRef.createComponent(await loadExampleFactory(this.id, this._injector)); + + const example = await loadExample(this.id, this._injector); + this._viewContainerRef.createComponent(example.component, {injector: example.injector}); + this._changeDetectorRef.detectChanges(); } static ngAcceptInputType_showLabel: BooleanInput; diff --git a/src/dev-app/index.html b/src/dev-app/index.html index 48082a15d592..7c4b4f43a484 100644 --- a/src/dev-app/index.html +++ b/src/dev-app/index.html @@ -20,8 +20,6 @@ - - - + diff --git a/src/dev-app/main-module.ts b/src/dev-app/main-module.ts index f3bd57877c3c..43b229578d92 100644 --- a/src/dev-app/main-module.ts +++ b/src/dev-app/main-module.ts @@ -17,7 +17,7 @@ import {RouterModule} from '@angular/router'; import {DevAppComponent} from './dev-app'; import {DevAppDirectionality} from './dev-app/dev-app-directionality'; import {DevAppModule} from './dev-app/dev-app-module'; -import {DEV_APP_ROUTES} from './dev-app/routes'; +import {DEV_APP_ROUTES} from './routes'; import {DevAppRippleOptions} from './dev-app/ripple-options'; import {ANIMATIONS_STORAGE_KEY} from './dev-app/dev-app-layout'; diff --git a/src/dev-app/main.ts b/src/dev-app/main.ts index b331b9596447..79d96916f253 100644 --- a/src/dev-app/main.ts +++ b/src/dev-app/main.ts @@ -10,6 +10,6 @@ import '@angular/localize/init'; import {platformBrowser} from '@angular/platform-browser'; -import {MainModuleNgFactory} from './main-module.ngfactory'; +import {MainModule} from './main-module'; -platformBrowser().bootstrapModuleFactory(MainModuleNgFactory); +platformBrowser().bootstrapModule(MainModule); diff --git a/src/dev-app/routes.ts b/src/dev-app/routes.ts new file mode 100644 index 000000000000..502e331c1ea1 --- /dev/null +++ b/src/dev-app/routes.ts @@ -0,0 +1,374 @@ +/** + * @license + * Copyright Google LLC 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 {Routes} from '@angular/router'; +import {DevApp404} from './dev-app/dev-app-404'; +import {DevAppHome} from './dev-app/dev-app-home'; + +export const DEV_APP_ROUTES: Routes = [ + {path: '', component: DevAppHome}, + { + path: 'autocomplete', + loadChildren: () => + import('./autocomplete/autocomplete-demo-module').then(m => m.AutocompleteDemoModule) + }, + { + path: 'badge', + loadChildren: () => import('./badge/badge-demo-module').then(m => m.BadgeDemoModule) + }, + { + path: 'bottom-sheet', + loadChildren: () => + import('./bottom-sheet/bottom-sheet-demo-module').then(m => m.BottomSheetDemoModule) + }, + { + path: 'baseline', + loadChildren: () => import('./baseline/baseline-demo-module').then(m => m.BaselineDemoModule) + }, + { + path: 'button', + loadChildren: () => import('./button/button-demo-module').then(m => m.ButtonDemoModule) + }, + { + path: 'button-toggle', + loadChildren: () => + import('./button-toggle/button-toggle-demo-module').then(m => m.ButtonToggleDemoModule) + }, + { + path: 'card', + loadChildren: () => import('./card/card-demo-module').then(m => m.CardDemoModule) + }, + { + path: 'cdk-experimental-combobox', + loadChildren: () => import('./cdk-experimental-combobox/cdk-combobox-demo-module') + .then(m => m.CdkComboboxDemoModule) + }, + { + path: 'cdk-experimental-listbox', + loadChildren: () => import('./cdk-experimental-listbox/cdk-listbox-demo-module') + .then(m => m.CdkListboxDemoModule) + }, + { + path: 'cdk-experimental-menu', + loadChildren: () => + import('./cdk-experimental-menu/cdk-menu-demo-module').then(m => m.CdkMenuDemoModule) + }, + { + path: 'checkbox', + loadChildren: () => import('./checkbox/checkbox-demo-module').then(m => m.CheckboxDemoModule) + }, + { + path: 'chips', + loadChildren: () => import('./chips/chips-demo-module').then(m => m.ChipsDemoModule) + }, + { + path: 'clipboard', + loadChildren: () => + import('./clipboard/clipboard-demo-module').then(m => m.ClipboardDemoModule) + }, + { + path: 'column-resize', + loadChildren: () => + import('./column-resize/column-resize-demo-module').then(m => m.ColumnResizeDemoModule) + }, + { + path: 'datepicker', + loadChildren: () => + import('./datepicker/datepicker-demo-module').then(m => m.DatepickerDemoModule) + }, + { + path: 'dialog', + loadChildren: () => import('./dialog/dialog-demo-module').then(m => m.DialogDemoModule) + }, + { + path: 'drawer', + loadChildren: () => import('./drawer/drawer-demo-module').then(m => m.DrawerDemoModule) + }, + { + path: 'drag-drop', + loadChildren: () => import('./drag-drop/drag-drop-demo-module').then(m => m.DragDropDemoModule) + }, + { + path: 'expansion', + loadChildren: () => + import('./expansion/expansion-demo-module').then(m => m.ExpansionDemoModule) + }, + { + path: 'focus-origin', + loadChildren: () => + import('./focus-origin/focus-origin-demo-module').then(m => m.FocusOriginDemoModule) + }, + { + path: 'focus-trap', + loadChildren: () => + import('./focus-trap/focus-trap-demo-module').then(m => m.FocusTrapDemoModule) + }, + { + path: 'google-map', + loadChildren: () => + import('./google-map/google-map-demo-module').then(m => m.GoogleMapDemoModule) + }, + { + path: 'grid-list', + loadChildren: () => import('./grid-list/grid-list-demo-module').then(m => m.GridListDemoModule) + }, + { + path: 'icon', + loadChildren: () => import('./icon/icon-demo-module').then(m => m.IconDemoModule) + }, + { + path: 'input', + loadChildren: () => import('./input/input-demo-module').then(m => m.InputDemoModule) + }, + { + path: 'layout', + loadChildren: () => import('./layout/layout-demo-module').then(m => m.LayoutDemoModule) + }, + { + path: 'input-modality', + loadChildren: () => import('./input-modality/input-modality-detector-demo-module') + .then(m => m.InputModalityDetectorDemoModule), + }, + { + path: 'list', + loadChildren: () => import('./list/list-demo-module').then(m => m.ListDemoModule) + }, + { + path: 'live-announcer', + loadChildren: () => + import('./live-announcer/live-announcer-demo-module').then(m => m.LiveAnnouncerDemoModule) + }, + { + path: 'menubar', + loadChildren: () => + import('./menubar/mat-menubar-demo-module').then(m => m.MatMenuBarDemoModule) + }, + { + path: 'mdc-autocomplete', + loadChildren: () => import('./mdc-autocomplete/mdc-autocomplete-demo-module') + .then(m => m.MdcAutocompleteDemoModule) + }, + { + path: 'mdc-button', + loadChildren: () => + import('./mdc-button/mdc-button-demo-module').then(m => m.MdcButtonDemoModule) + }, + { + path: 'mdc-card', + loadChildren: () => import('./mdc-card/mdc-card-demo-module').then(m => m.MdcCardDemoModule) + }, + { + path: 'mdc-checkbox', + loadChildren: () => + import('./mdc-checkbox/mdc-checkbox-demo-module').then(m => m.MdcCheckboxDemoModule) + }, + { + path: 'mdc-progress-bar', + loadChildren: () => import('./mdc-progress-bar/mdc-progress-bar-demo-module') + .then(m => m.MdcProgressBarDemoModule) + }, + { + path: 'mdc-chips', + loadChildren: () => import('./mdc-chips/mdc-chips-demo-module').then(m => m.MdcChipsDemoModule) + }, + { + path: 'mdc-dialog', + loadChildren: () => + import('./mdc-dialog/mdc-dialog-demo-module').then(m => m.MdcDialogDemoModule) + }, + { + path: 'mdc-input', + loadChildren: () => import('./mdc-input/mdc-input-demo-module').then(m => m.MdcInputDemoModule) + }, + { + path: 'mdc-list', + loadChildren: () => import('./mdc-list/mdc-list-demo-module').then(m => m.MdcListDemoModule) + }, + { + path: 'mdc-menu', + loadChildren: () => import('./mdc-menu/mdc-menu-demo-module').then(m => m.MdcMenuDemoModule) + }, + { + path: 'mdc-paginator', + loadChildren: () => + import('./mdc-paginator/mdc-paginator-demo-module').then(m => m.MdcPaginatorDemoModule) + }, + { + path: 'mdc-progress-spinner', + loadChildren: () => import('./mdc-progress-spinner/mdc-progress-spinner-demo-module') + .then(m => m.MdcProgressSpinnerDemoModule) + }, + { + path: 'mdc-radio', + loadChildren: () => import('./mdc-radio/mdc-radio-demo-module').then(m => m.MdcRadioDemoModule) + }, + { + path: 'mdc-select', + loadChildren: () => + import('./mdc-select/mdc-select-demo-module').then(m => m.MdcSelectDemoModule) + }, + { + path: 'mdc-sidenav', + loadChildren: () => + import('./mdc-sidenav/mdc-sidenav-demo-module').then(m => m.MdcSidenavDemoModule) + }, + { + path: 'mdc-snack-bar', + loadChildren: () => + import('./mdc-snack-bar/mdc-snack-bar-demo-module').then(m => m.MdcSnackBarDemoModule) + }, + { + path: 'mdc-slide-toggle', + loadChildren: () => import('./mdc-slide-toggle/mdc-slide-toggle-demo-module') + .then(m => m.MdcSlideToggleDemoModule) + }, + { + path: 'mdc-slider', + loadChildren: () => + import('./mdc-slider/mdc-slider-demo-module').then(m => m.MdcSliderDemoModule) + }, + { + path: 'mdc-table', + loadChildren: () => import('./mdc-table/mdc-table-demo-module').then(m => m.MdcTableDemoModule) + }, + { + path: 'mdc-tabs', + loadChildren: () => import('./mdc-tabs/mdc-tabs-demo-module').then(m => m.MdcTabsDemoModule) + }, + { + path: 'mdc-tooltip', + loadChildren: () => + import('./mdc-tooltip/mdc-tooltip-demo-module').then(m => m.MdcTooltipDemoModule) + }, + { + path: 'menu', + loadChildren: () => import('./menu/menu-demo-module').then(m => m.MenuDemoModule) + }, + { + path: 'paginator', + loadChildren: () => + import('./paginator/paginator-demo-module').then(m => m.PaginatorDemoModule) + }, + { + path: 'platform', + loadChildren: () => import('./platform/platform-demo-module').then(m => m.PlatformDemoModule) + }, + { + path: 'popover-edit', + loadChildren: () => + import('./popover-edit/popover-edit-demo-module').then(m => m.PopoverEditDemoModule) + }, + { + path: 'portal', + loadChildren: () => import('./portal/portal-demo-module').then(m => m.PortalDemoModule) + }, + { + path: 'progress-bar', + loadChildren: () => + import('./progress-bar/progress-bar-demo-module').then(m => m.ProgressBarDemoModule) + }, + { + path: 'progress-spinner', + loadChildren: () => import('./progress-spinner/progress-spinner-demo-module') + .then(m => m.ProgressSpinnerDemoModule) + }, + { + path: 'radio', + loadChildren: () => import('./radio/radio-demo-module').then(m => m.RadioDemoModule) + }, + { + path: 'ripple', + loadChildren: () => import('./ripple/ripple-demo-module').then(m => m.RippleDemoModule) + }, + { + path: 'select', + loadChildren: () => import('./select/select-demo-module').then(m => m.SelectDemoModule) + }, + { + path: 'sidenav', + loadChildren: () => import('./sidenav/sidenav-demo-module').then(m => m.SidenavDemoModule) + }, + { + path: 'slide-toggle', + loadChildren: () => + import('./slide-toggle/slide-toggle-demo-module').then(m => m.SlideToggleDemoModule) + }, + { + path: 'slider', + loadChildren: () => import('./slider/slider-demo-module').then(m => m.SliderDemoModule) + }, + { + path: 'snack-bar', + loadChildren: () => import('./snack-bar/snack-bar-demo-module').then(m => m.SnackBarDemoModule) + }, + { + path: 'stepper', + loadChildren: () => import('./stepper/stepper-demo-module').then(m => m.StepperDemoModule) + }, + { + path: 'table', + loadChildren: () => import('./table/table-demo-module').then(m => m.TableDemoModule) + }, + { + path: 'table-scroll-container', + loadChildren: () => import('./table-scroll-container/table-scroll-container-demo-module') + .then(m => m.TableScrollContainerDemoModule), + }, + { + path: 'tabs', + loadChildren: () => import('./tabs/tabs-demo-module').then(m => m.TabsDemoModule) + }, + { + path: 'toolbar', + loadChildren: () => import('./toolbar/toolbar-demo-module').then(m => m.ToolbarDemoModule) + }, + { + path: 'tooltip', + loadChildren: () => import('./tooltip/tooltip-demo-module').then(m => m.TooltipDemoModule) + }, + { + path: 'tree', + loadChildren: () => import('./tree/tree-demo-module').then(m => m.TreeDemoModule) + }, + { + path: 'typography', + loadChildren: () => + import('./typography/typography-demo-module').then(m => m.TypographyDemoModule) + }, + { + path: 'screen-type', + loadChildren: () => + import('./screen-type/screen-type-demo-module').then(m => m.ScreenTypeDemoModule) + }, + { + path: 'connected-overlay', + loadChildren: () => import('./connected-overlay/connected-overlay-demo-module') + .then(m => m.ConnectedOverlayDemoModule) + }, + { + path: 'virtual-scroll', + loadChildren: () => + import('./virtual-scroll/virtual-scroll-demo-module').then(m => m.VirtualScrollDemoModule) + }, + { + path: 'youtube-player', + loadChildren: () => + import('./youtube-player/youtube-player-demo-module').then(m => m.YouTubePlayerDemoModule), + }, + { + path: 'selection', + loadChildren: () => + import('./selection/selection-demo-module').then(m => m.SelectionDemoModule) + }, + { + path: 'examples', + loadChildren: () => + import('./examples-page/examples-page-module').then(m => m.ExamplesPageModule) + }, + {path: '**', component: DevApp404}, +]; diff --git a/src/e2e-app/BUILD.bazel b/src/e2e-app/BUILD.bazel index 305dffa3cfea..8a3b9b8ce19e 100644 --- a/src/e2e-app/BUILD.bazel +++ b/src/e2e-app/BUILD.bazel @@ -1,6 +1,8 @@ -load("@npm//@bazel/concatjs:index.bzl", "concatjs_devserver") -load("//:packages.bzl", "MDC_PACKAGE_UMD_BUNDLES", "getAngularUmdTargets") +load("//tools/dev-server:index.bzl", "dev_server") load("//tools:defaults.bzl", "ng_module", "sass_binary") +load("//tools/esbuild:index.bzl", "esbuild", "esbuild_config") +load("//src/components-examples:config.bzl", "ALL_EXAMPLES") +load("//tools/angular:index.bzl", "LINKER_PROCESSED_FW_PACKAGES") package(default_visibility = ["//visibility:public"]) @@ -10,7 +12,6 @@ devserverIndexHtmlDependencies = [ "@npm//core-js-bundle", "@npm//kagekiri", "@npm//material-components-web", - "@npm//moment", "//src/material/prebuilt-themes:indigo-pink", ":index.html", ":theme", @@ -96,23 +97,38 @@ sass_binary( ], ) -concatjs_devserver( +esbuild_config( + name = "esbuild_config", + testonly = True, + config_file = "esbuild.config.mjs", +) + +esbuild( + name = "bundles", + testonly = True, + config = ":esbuild_config", + entry_points = [":main.ts"] + ["%s:index.ts" % e for e in ALL_EXAMPLES], + platform = "browser", + splitting = True, + # We cannot use `ES2017` or higher as that would result in `async/await` not being downleveled. + # ZoneJS needs to be able to intercept these as otherwise change detection would not work properly. + target = "es2016", + # Note: We add all linker-processed FW packages as dependencies here so that ESBuild will + # map all framework packages to their linker-processed bundles from `tools/angular`. + deps = LINKER_PROCESSED_FW_PACKAGES + [ + ":e2e-app", + ], +) + +dev_server( name = "devserver", testonly = True, + srcs = devserverIndexHtmlDependencies, additional_root_paths = [ "npm/node_modules", ], - entry_module = "angular_material/src/e2e-app/main", - port = 4200, - # Scripts which will be included in the serving_path bundle after RequireJS has been loaded. - scripts = [ - ":devserver-configure.js", - "//tools/rxjs:rxjs_umd_modules", - "@npm//:node_modules/tslib/tslib.js", - ] + getAngularUmdTargets() + MDC_PACKAGE_UMD_BUNDLES.values(), - # Name of the generated `concatjs` bundle that is built based on the labels in `deps` and `scripts`. - serving_path = "/bundle.js", - static_files = devserverIndexHtmlDependencies, tags = ["manual"], - deps = [":e2e-app"], + deps = [ + ":bundles", + ], ) diff --git a/src/e2e-app/devserver-configure.js b/src/e2e-app/devserver-configure.js deleted file mode 100644 index 67df066597b8..000000000000 --- a/src/e2e-app/devserver-configure.js +++ /dev/null @@ -1,10 +0,0 @@ -// We need to configure AMD modules which are not named because otherwise "require.js" is not -// able to resolve AMD imports to such modules. -require.config({ - paths: { - 'moment': 'moment/min/moment.min', - - // Support for lazy-loading of component examples. - '@angular/components-examples': 'angular_material/src/components-examples', - } -}); diff --git a/src/e2e-app/e2e-app/routes.ts b/src/e2e-app/e2e-app/routes.ts deleted file mode 100644 index f30ced334f19..000000000000 --- a/src/e2e-app/e2e-app/routes.ts +++ /dev/null @@ -1,78 +0,0 @@ -import {Routes} from '@angular/router'; -import {BlockScrollStrategyE2E} from '../block-scroll-strategy/block-scroll-strategy-e2e'; -import {ButtonToggleE2e} from '../button-toggle/button-toggle-e2e'; -import {ButtonE2E} from '../button/button-e2e'; -import {CardE2e} from '../card/card-e2e'; -import {SimpleCheckboxes} from '../checkbox/checkbox-e2e'; -import {ComponentHarnessE2e} from '../component-harness/component-harness-e2e'; -import {DialogE2E} from '../dialog/dialog-e2e'; -import {ExpansionE2e} from '../expansion/expansion-e2e'; -import {GridListE2E} from '../grid-list/grid-list-e2e'; -import {IconE2E} from '../icon/icon-e2e'; -import {InputE2E} from '../input/input-e2e'; -import {ListE2e} from '../list/list-e2e'; -import {MdcButtonE2e} from '../mdc-button/mdc-button-e2e'; -import {MdcCardE2e} from '../mdc-card/mdc-card-e2e'; -import {MdcCheckboxE2e} from '../mdc-checkbox/mdc-checkbox-e2e'; -import {MdcChipsE2e} from '../mdc-chips/mdc-chips-e2e'; -import {MdcDialogE2E} from '../mdc-dialog/mdc-dialog-e2e'; -import {MdcInputE2E} from '../mdc-input/mdc-input-e2e'; -import {MdcMenuE2e} from '../mdc-menu/mdc-menu-e2e'; -import {MdcRadioE2e} from '../mdc-radio/mdc-radio-e2e'; -import {MdcSlideToggleE2e} from '../mdc-slide-toggle/mdc-slide-toggle-e2e'; -import {MdcSliderE2e} from '../mdc-slider/mdc-slider-e2e'; -import {MdcTableE2e} from '../mdc-table/mdc-table-e2e'; -import {MdcTabsE2e} from '../mdc-tabs/mdc-tabs-e2e'; -import {MdcProgressBarE2E} from '../mdc-progress-bar/mdc-progress-bar-e2e'; -import {MdcProgressSpinnerE2e} from '../mdc-progress-spinner/mdc-progress-spinner-e2e'; -import {MenuE2E} from '../menu/menu-e2e'; -import {ProgressBarE2E} from '../progress-bar/progress-bar-e2e'; -import {ProgressSpinnerE2E} from '../progress-spinner/progress-spinner-e2e'; -import {SimpleRadioButtons} from '../radio/radio-e2e'; -import {SidenavE2E} from '../sidenav/sidenav-e2e'; -import {SlideToggleE2E} from '../slide-toggle/slide-toggle-e2e'; -import {StepperE2e} from '../stepper/stepper-e2e'; -import {BasicTabs} from '../tabs/tabs-e2e'; -import {ToolbarE2e} from '../toolbar/toolbar-e2e'; -import {VirtualScrollE2E} from '../virtual-scroll/virtual-scroll-e2e'; -import {Home} from './e2e-app-layout'; - -export const E2E_APP_ROUTES: Routes = [ - {path: '', component: Home}, - {path: 'block-scroll-strategy', component: BlockScrollStrategyE2E}, - {path: 'button', component: ButtonE2E}, - {path: 'button-toggle', component: ButtonToggleE2e}, - {path: 'cards', component: CardE2e}, - {path: 'checkbox', component: SimpleCheckboxes}, - {path: 'component-harness', component: ComponentHarnessE2e}, - {path: 'dialog', component: DialogE2E}, - {path: 'expansion', component: ExpansionE2e}, - {path: 'grid-list', component: GridListE2E}, - {path: 'icon', component: IconE2E}, - {path: 'input', component: InputE2E}, - {path: 'list', component: ListE2e}, - {path: 'mdc-button', component: MdcButtonE2e}, - {path: 'mdc-card', component: MdcCardE2e}, - {path: 'mdc-checkbox', component: MdcCheckboxE2e}, - {path: 'mdc-chips', component: MdcChipsE2e}, - {path: 'mdc-dialog', component: MdcDialogE2E}, - {path: 'mdc-input', component: MdcInputE2E}, - {path: 'mdc-menu', component: MdcMenuE2e}, - {path: 'mdc-radio', component: MdcRadioE2e}, - {path: 'mdc-slider', component: MdcSliderE2e}, - {path: 'mdc-slide-toggle', component: MdcSlideToggleE2e}, - {path: 'mdc-tabs', component: MdcTabsE2e}, - {path: 'mdc-table', component: MdcTableE2e}, - {path: 'mdc-progress-bar', component: MdcProgressBarE2E}, - {path: 'mdc-progress-spinner', component: MdcProgressSpinnerE2e}, - {path: 'menu', component: MenuE2E}, - {path: 'progress-bar', component: ProgressBarE2E}, - {path: 'progress-spinner', component: ProgressSpinnerE2E}, - {path: 'radio', component: SimpleRadioButtons}, - {path: 'sidenav', component: SidenavE2E}, - {path: 'slide-toggle', component: SlideToggleE2E}, - {path: 'stepper', component: StepperE2e}, - {path: 'tabs', component: BasicTabs}, - {path: 'toolbar', component: ToolbarE2e}, - {path: 'virtual-scroll', component: VirtualScrollE2E}, -]; diff --git a/src/e2e-app/esbuild.config.mjs b/src/e2e-app/esbuild.config.mjs new file mode 100644 index 000000000000..475c2bf12bbd --- /dev/null +++ b/src/e2e-app/esbuild.config.mjs @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google LLC 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 + */ + +export default { + resolveExtensions: ['.js'], + format: 'esm', +}; diff --git a/src/e2e-app/example-viewer/example-viewer.ts b/src/e2e-app/example-viewer/example-viewer.ts index aaa407baa547..49b16622a457 100644 --- a/src/e2e-app/example-viewer/example-viewer.ts +++ b/src/e2e-app/example-viewer/example-viewer.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {loadExampleFactory} from '@angular/components-examples/private'; +import {loadExample} from '@angular/components-examples/private'; import {Component, Injector, Input, OnInit, ViewContainerRef} from '@angular/core'; /** Loads an example component from `@angular/components-examples` */ @@ -26,6 +26,7 @@ export class ExampleViewer implements OnInit { private _viewContainerRef: ViewContainerRef) {} async ngOnInit() { - this._viewContainerRef.createComponent(await loadExampleFactory(this.id, this._injector)); + const {component, injector} = await loadExample(this.id, this._injector); + this._viewContainerRef.createComponent(component, {injector}); } } diff --git a/src/e2e-app/index.html b/src/e2e-app/index.html index 9d806a018362..81722b6f5e02 100644 --- a/src/e2e-app/index.html +++ b/src/e2e-app/index.html @@ -19,15 +19,9 @@ Loading... I am a sibling! - - - - + diff --git a/src/e2e-app/main-module.ts b/src/e2e-app/main-module.ts index d44c9c753294..a3f35341a4b6 100644 --- a/src/e2e-app/main-module.ts +++ b/src/e2e-app/main-module.ts @@ -13,7 +13,7 @@ import {ComponentHarnessE2eModule} from './component-harness/component-harness-e import {DialogE2eModule} from './dialog/dialog-e2e-module'; import {E2eApp} from './e2e-app'; import {E2eAppModule} from './e2e-app/e2e-app-module'; -import {E2E_APP_ROUTES} from './e2e-app/routes'; +import {E2E_APP_ROUTES} from './routes'; import {ExpansionE2eModule} from './expansion/expansion-e2e-module'; import {GridListE2eModule} from './grid-list/grid-list-e2e-module'; import {IconE2eModule} from './icon/icon-e2e-module'; diff --git a/src/e2e-app/main.ts b/src/e2e-app/main.ts index 3204e4f5d812..44c9253d5715 100644 --- a/src/e2e-app/main.ts +++ b/src/e2e-app/main.ts @@ -1,8 +1,8 @@ import {enableProdMode} from '@angular/core'; import {platformBrowser} from '@angular/platform-browser'; -import {MainModuleNgFactory} from './main-module.ngfactory'; +import {MainModule} from './main-module'; enableProdMode(); -platformBrowser().bootstrapModuleFactory(MainModuleNgFactory); +platformBrowser().bootstrapModule(MainModule); diff --git a/src/e2e-app/routes.ts b/src/e2e-app/routes.ts new file mode 100644 index 000000000000..17198e3ddd1d --- /dev/null +++ b/src/e2e-app/routes.ts @@ -0,0 +1,78 @@ +import {Routes} from '@angular/router'; +import {BlockScrollStrategyE2E} from './block-scroll-strategy/block-scroll-strategy-e2e'; +import {ButtonToggleE2e} from './button-toggle/button-toggle-e2e'; +import {ButtonE2E} from './button/button-e2e'; +import {CardE2e} from './card/card-e2e'; +import {SimpleCheckboxes} from './checkbox/checkbox-e2e'; +import {ComponentHarnessE2e} from './component-harness/component-harness-e2e'; +import {DialogE2E} from './dialog/dialog-e2e'; +import {ExpansionE2e} from './expansion/expansion-e2e'; +import {GridListE2E} from './grid-list/grid-list-e2e'; +import {IconE2E} from './icon/icon-e2e'; +import {InputE2E} from './input/input-e2e'; +import {ListE2e} from './list/list-e2e'; +import {MdcButtonE2e} from './mdc-button/mdc-button-e2e'; +import {MdcCardE2e} from './mdc-card/mdc-card-e2e'; +import {MdcCheckboxE2e} from './mdc-checkbox/mdc-checkbox-e2e'; +import {MdcChipsE2e} from './mdc-chips/mdc-chips-e2e'; +import {MdcDialogE2E} from './mdc-dialog/mdc-dialog-e2e'; +import {MdcInputE2E} from './mdc-input/mdc-input-e2e'; +import {MdcMenuE2e} from './mdc-menu/mdc-menu-e2e'; +import {MdcRadioE2e} from './mdc-radio/mdc-radio-e2e'; +import {MdcSlideToggleE2e} from './mdc-slide-toggle/mdc-slide-toggle-e2e'; +import {MdcSliderE2e} from './mdc-slider/mdc-slider-e2e'; +import {MdcTableE2e} from './mdc-table/mdc-table-e2e'; +import {MdcTabsE2e} from './mdc-tabs/mdc-tabs-e2e'; +import {MdcProgressBarE2E} from './mdc-progress-bar/mdc-progress-bar-e2e'; +import {MdcProgressSpinnerE2e} from './mdc-progress-spinner/mdc-progress-spinner-e2e'; +import {MenuE2E} from './menu/menu-e2e'; +import {ProgressBarE2E} from './progress-bar/progress-bar-e2e'; +import {ProgressSpinnerE2E} from './progress-spinner/progress-spinner-e2e'; +import {SimpleRadioButtons} from './radio/radio-e2e'; +import {SidenavE2E} from './sidenav/sidenav-e2e'; +import {SlideToggleE2E} from './slide-toggle/slide-toggle-e2e'; +import {StepperE2e} from './stepper/stepper-e2e'; +import {BasicTabs} from './tabs/tabs-e2e'; +import {ToolbarE2e} from './toolbar/toolbar-e2e'; +import {VirtualScrollE2E} from './virtual-scroll/virtual-scroll-e2e'; +import {Home} from './e2e-app/e2e-app-layout'; + +export const E2E_APP_ROUTES: Routes = [ + {path: '', component: Home}, + {path: 'block-scroll-strategy', component: BlockScrollStrategyE2E}, + {path: 'button', component: ButtonE2E}, + {path: 'button-toggle', component: ButtonToggleE2e}, + {path: 'cards', component: CardE2e}, + {path: 'checkbox', component: SimpleCheckboxes}, + {path: 'component-harness', component: ComponentHarnessE2e}, + {path: 'dialog', component: DialogE2E}, + {path: 'expansion', component: ExpansionE2e}, + {path: 'grid-list', component: GridListE2E}, + {path: 'icon', component: IconE2E}, + {path: 'input', component: InputE2E}, + {path: 'list', component: ListE2e}, + {path: 'mdc-button', component: MdcButtonE2e}, + {path: 'mdc-card', component: MdcCardE2e}, + {path: 'mdc-checkbox', component: MdcCheckboxE2e}, + {path: 'mdc-chips', component: MdcChipsE2e}, + {path: 'mdc-dialog', component: MdcDialogE2E}, + {path: 'mdc-input', component: MdcInputE2E}, + {path: 'mdc-menu', component: MdcMenuE2e}, + {path: 'mdc-radio', component: MdcRadioE2e}, + {path: 'mdc-slider', component: MdcSliderE2e}, + {path: 'mdc-slide-toggle', component: MdcSlideToggleE2e}, + {path: 'mdc-tabs', component: MdcTabsE2e}, + {path: 'mdc-table', component: MdcTableE2e}, + {path: 'mdc-progress-bar', component: MdcProgressBarE2E}, + {path: 'mdc-progress-spinner', component: MdcProgressSpinnerE2e}, + {path: 'menu', component: MenuE2E}, + {path: 'progress-bar', component: ProgressBarE2E}, + {path: 'progress-spinner', component: ProgressSpinnerE2E}, + {path: 'radio', component: SimpleRadioButtons}, + {path: 'sidenav', component: SidenavE2E}, + {path: 'slide-toggle', component: SlideToggleE2E}, + {path: 'stepper', component: StepperE2e}, + {path: 'tabs', component: BasicTabs}, + {path: 'toolbar', component: ToolbarE2e}, + {path: 'virtual-scroll', component: VirtualScrollE2E}, +]; From ee89e021c7e36c541a278e088c954e4f641ab820 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 22:04:38 +0200 Subject: [PATCH 13/21] build: run esbuild as build step before running browser or e2e tests Similar to the reason why we switched the dev-app and e2e-app to use ESBuild, we will use ESBuild as a step in between for running browser Karma tests, or running e2e protractor/selenium-webdriver tests. This allows us to incorporate the framework linked ESM bundles and helps working around the change that no UMD bundles are available for APF v13 packages. Running ESBuild as a build step in between seems non-significant as on the other hand the module resolution in the browser for Karma seemed noticeable slower (due to it loading hundreds of files individually); and also the Karma browser setup required more manual maintenance (through RequireJS configurations). --- .bazelrc | 4 + package.json | 5 +- src/cdk/a11y/focus-trap/focus-trap.spec.ts | 1 - src/cdk/testing/BUILD.bazel | 6 - src/cdk/testing/require-config.js | 7 - src/cdk/testing/tests/webdriver-test.bzl | 11 +- src/material-date-fns-adapter/BUILD.bazel | 19 --- src/material-luxon-adapter/BUILD.bazel | 6 - src/material-moment-adapter/BUILD.bazel | 12 -- .../adapter/moment-date-adapter.spec.ts | 5 +- src/material-moment-adapter/require-config.js | 7 - tools/BUILD.bazel | 8 +- tools/defaults.bzl | 74 ++++----- tools/spec-bundling/BUILD.bazel | 3 + tools/spec-bundling/esbuild.config-tmpl.mjs | 29 ++++ tools/spec-bundling/index.bzl | 149 ++++++++++++++++++ 16 files changed, 241 insertions(+), 105 deletions(-) delete mode 100644 src/cdk/testing/require-config.js delete mode 100644 src/material-moment-adapter/require-config.js create mode 100644 tools/spec-bundling/BUILD.bazel create mode 100644 tools/spec-bundling/esbuild.config-tmpl.mjs create mode 100644 tools/spec-bundling/index.bzl diff --git a/.bazelrc b/.bazelrc index ef4e499d5ce5..b9b88fa5ab9b 100644 --- a/.bazelrc +++ b/.bazelrc @@ -51,6 +51,10 @@ build:release --stamp build:snapshot-build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot" build:snapshot-build --stamp +#################################### +# Bazel custom flags # +#################################### +build --flag_alias=partial_compilation=@npm//@angular/bazel/src:partial_compilation ################################## # Always enable Ivy compilation # diff --git a/package.json b/package.json index ec1981a38787..ac0bbf1fa418 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,8 @@ "merge": "ng-dev pr merge", "approve-api": "node ./scripts/approve-api-golden.js", "approve-size-tests": "node ./scripts/approve-size-golden.js", - "integration-tests": "bazel test --test_tag_filters=-view-engine-only,-linker-integration-test --build_tests_only -- //integration/... -//integration/size-test/...", - "integration-tests:view-engine": "bazel test --test_tag_filters=view-engine-only --build_tests_only -- //integration/... -//integration/size-test/...", - "integration-tests:partial-ivy": "bazel test --//tools:partial_compilation=True --test_tag_filters=partial-compilation-integration,-firefox --build_tests_only -- //integration/... //src/...", + "integration-tests": "bazel test --test_tag_filters=-linker-integration-test --build_tests_only -- //integration/... -//integration/size-test/...", + "integration-tests:partial-ivy": "bazel test --partial_compilation --test_tag_filters=partial-compilation-integration,-firefox --build_tests_only -- //integration/... //src/...", "integration-tests:size-test": "bazel test //integration/size-test/...", "check-mdc-tests": "ts-node --project scripts/tsconfig.json scripts/check-mdc-tests.ts", "check-mdc-exports": "ts-node --project scripts/tsconfig.json scripts/check-mdc-exports.ts", diff --git a/src/cdk/a11y/focus-trap/focus-trap.spec.ts b/src/cdk/a11y/focus-trap/focus-trap.spec.ts index f6beedc5100a..92ebcc6ec40b 100644 --- a/src/cdk/a11y/focus-trap/focus-trap.spec.ts +++ b/src/cdk/a11y/focus-trap/focus-trap.spec.ts @@ -11,7 +11,6 @@ import {PortalModule, CdkPortalOutlet, TemplatePortal} from '@angular/cdk/portal import {A11yModule, FocusTrap, CdkTrapFocus} from '../index'; import {By} from '@angular/platform-browser'; - describe('FocusTrap', () => { beforeEach(waitForAsync(() => { diff --git a/src/cdk/testing/BUILD.bazel b/src/cdk/testing/BUILD.bazel index e13320f59617..5399dd4d2bcd 100644 --- a/src/cdk/testing/BUILD.bazel +++ b/src/cdk/testing/BUILD.bazel @@ -29,13 +29,7 @@ filegroup( ng_web_test_suite( name = "unit_tests", - # We need to load Kagekiri statically since it is not a named AMD module and needs to - # be manually configured through "require.js" which is used by "karma_web_test_suite". - static_files = [ - "@npm//kagekiri", - ], deps = [ - ":require-config.js", "//src/cdk/testing/tests:unit_test_sources", ], ) diff --git a/src/cdk/testing/require-config.js b/src/cdk/testing/require-config.js deleted file mode 100644 index af84b376e6eb..000000000000 --- a/src/cdk/testing/require-config.js +++ /dev/null @@ -1,7 +0,0 @@ -// Require.js is being used by the karma bazel rules and needs to be configured to properly -// load AMD modules which are not explicitly named in their output bundle. -require.config({ - paths: { - 'kagekiri': '/base/npm/node_modules/kagekiri/dist/kagekiri.umd.min', - } -}); diff --git a/src/cdk/testing/tests/webdriver-test.bzl b/src/cdk/testing/tests/webdriver-test.bzl index af89ad4d5ac7..ca6db44d11dc 100644 --- a/src/cdk/testing/tests/webdriver-test.bzl +++ b/src/cdk/testing/tests/webdriver-test.bzl @@ -1,11 +1,20 @@ load("//tools:defaults.bzl", "jasmine_node_test") load("@io_bazel_rules_webtesting//web:web.bzl", "web_test") load("//tools/server-test:index.bzl", "server_test") +load("//tools/spec-bundling:index.bzl", "spec_bundle") + +def webdriver_test(name, deps, tags = [], **kwargs): + spec_bundle( + name = "%s_bundle" % name, + deps = deps, + platform = "node", + external = ["selenium-webdriver"], + ) -def webdriver_test(name, tags = [], **kwargs): jasmine_node_test( name = "%s_jasmine_test" % name, tags = tags + ["manual"], + deps = ["%s_bundle" % name, "@npm//selenium-webdriver"], **kwargs ) diff --git a/src/material-date-fns-adapter/BUILD.bazel b/src/material-date-fns-adapter/BUILD.bazel index bbd0b8b2c0f5..e4d51b13d47b 100644 --- a/src/material-date-fns-adapter/BUILD.bazel +++ b/src/material-date-fns-adapter/BUILD.bazel @@ -1,5 +1,4 @@ load("//tools:defaults.bzl", "ng_module", "ng_package", "ng_test_library", "ng_web_test_suite") -load("//tools/esbuild:index.bzl", "esbuild_amd") package(default_visibility = ["//visibility:public"]) @@ -33,28 +32,10 @@ ng_test_library( ng_web_test_suite( name = "unit_tests", deps = [ - ":amd_date_fns", - ":amd_date_fns_locales", ":unit_test_sources", ], ) -esbuild_amd( - name = "amd_date_fns", - testonly = True, - entry_point = "@npm//:node_modules/date-fns/esm/index.js", - module_name = "date-fns", - deps = ["@npm//date-fns"], -) - -esbuild_amd( - name = "amd_date_fns_locales", - testonly = True, - entry_point = "@npm//:node_modules/date-fns/esm/locale/index.js", - module_name = "date-fns/locale", - deps = ["@npm//date-fns"], -) - ng_package( name = "npm_package", srcs = ["package.json"], diff --git a/src/material-luxon-adapter/BUILD.bazel b/src/material-luxon-adapter/BUILD.bazel index bbe1653db91b..a96f68fd8f5e 100644 --- a/src/material-luxon-adapter/BUILD.bazel +++ b/src/material-luxon-adapter/BUILD.bazel @@ -33,13 +33,7 @@ ng_test_library( ng_web_test_suite( name = "unit_tests", - # We need to load Luxon statically since it is not a named AMD module and needs to - # be manually configured through "require.js" which is used by "karma_web_test_suite". - static_files = [ - "@npm//luxon", - ], deps = [ - ":require-config.js", ":unit_test_sources", ], ) diff --git a/src/material-moment-adapter/BUILD.bazel b/src/material-moment-adapter/BUILD.bazel index c350fb286bfb..23e88e9c2134 100644 --- a/src/material-moment-adapter/BUILD.bazel +++ b/src/material-moment-adapter/BUILD.bazel @@ -16,12 +16,6 @@ ng_module( ], ) -ts_config( - name = "tsconfig", - src = "tsconfig-build.json", - deps = ["//src:bazel-tsconfig-build.json"], -) - ng_test_library( name = "unit_test_sources", srcs = glob( @@ -38,13 +32,7 @@ ng_test_library( ng_web_test_suite( name = "unit_tests", - # We need to load Moment statically since it is not a named AMD module and needs to - # be manually configured through "require.js" which is used by "karma_web_test_suite". - static_files = [ - "@npm//moment", - ], deps = [ - ":require-config.js", ":unit_test_sources", ], ) diff --git a/src/material-moment-adapter/adapter/moment-date-adapter.spec.ts b/src/material-moment-adapter/adapter/moment-date-adapter.spec.ts index 9ed0f757e883..4702bef346cf 100644 --- a/src/material-moment-adapter/adapter/moment-date-adapter.spec.ts +++ b/src/material-moment-adapter/adapter/moment-date-adapter.spec.ts @@ -13,7 +13,10 @@ import {DEC, FEB, JAN, MAR} from '../../material/testing'; import {MomentDateModule} from './index'; import {MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter} from './moment-date-adapter'; -import * as moment from 'moment'; +import moment from 'moment'; + +// Import all locales for specs relying on non-US locales. +import 'moment/min/locales'; describe('MomentDateAdapter', () => { let adapter: MomentDateAdapter; diff --git a/src/material-moment-adapter/require-config.js b/src/material-moment-adapter/require-config.js deleted file mode 100644 index f343957659e3..000000000000 --- a/src/material-moment-adapter/require-config.js +++ /dev/null @@ -1,7 +0,0 @@ -// Require.js is being used by the karma bazel rules and needs to be configured to properly -// load AMD modules which are not explicitly named in their output bundle. -require.config({ - paths: { - 'moment': '/base/npm/node_modules/moment/min/moment-with-locales.min' - } -}); diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index fae967ea2f17..811de214bd74 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -1,17 +1,15 @@ -load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") - package(default_visibility = ["//visibility:public"]) exports_files([ "system-config-tmpl.js", - "system-rxjs-operators.js", ]) -# Bazel config setting that matches if the partial compilation flag is set to `True`. +# Bazel config setting that matches if the partial compilation flag +# for `@angular/bazel` is set to `True`. config_setting( name = "partial_compilation_enabled", flag_values = { - ":partial_compilation": "True", + "@npm//@angular/bazel/src:partial_compilation": "True", }, ) diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 5d272bdf925b..041a0d7b7c70 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -11,6 +11,7 @@ load("//:packages.bzl", "VERSION_PLACEHOLDER_REPLACEMENTS") load("//:pkg-externals.bzl", "PKG_EXTERNALS") load("//tools/markdown-to-html:index.bzl", _markdown_to_html = "markdown_to_html") load("//tools/linker-process:index.bzl", "linker_process") +load("//tools/spec-bundling:index.bzl", "spec_bundle") _DEFAULT_TSCONFIG_BUILD = "//src:bazel-tsconfig-build.json" _DEFAULT_TSCONFIG_TEST = "//src:tsconfig-test" @@ -244,27 +245,15 @@ def ng_e2e_test_library(deps = [], tsconfig = None, **kwargs): def karma_web_test_suite(name, **kwargs): web_test_args = {} - test_deps = ["//tools/rxjs:rxjs_umd_modules"] + kwargs.get("deps", []) - - # Note: Ideally we would not add all Angular and MDC UMD files to a test because - # some might be unused. This would require some custom tooling to resolve the - # correct named AMD files from transitive dependencies and is not worth the effort - # given the UMD files being small and most of the packages being used anyway. - # TODO(devversion): reconsider this if `rules_nodejs` can recognize named AMD files. - kwargs["srcs"] = ["@npm//:node_modules/tslib/tslib.js"] + getAngularUmdTargets() + \ - MDC_PACKAGE_UMD_BUNDLES.values() + kwargs.get("srcs", []) + test_deps = kwargs.get("deps", []) + kwargs["tags"] = ["partial-compilation-integration"] + kwargs.get("tags", []) - kwargs["deps"] = select({ - # Based on whether partial compilation is enabled, use the linker processed dependencies. - "//tools:partial_compilation_enabled": ["%s_linker_processed_deps" % name], - "//conditions:default": test_deps, - }) - - linker_process( - name = "%s_linker_processed_deps" % name, - srcs = test_deps, - testonly = True, - tags = ["manual"], + kwargs["deps"] = ["%s_bundle" % name] + + spec_bundle( + name = "%s_bundle" % name, + deps = test_deps, + platform = "browser", ) # Set up default browsers if no explicit `browsers` have been specified. @@ -306,13 +295,36 @@ def karma_web_test_suite(name, **kwargs): **kwargs ) -def protractor_web_test_suite(**kwargs): +def protractor_web_test_suite(name, deps, **kwargs): + spec_bundle( + name = "%s_bundle" % name, + deps = deps, + platform = "node", + external = ["protractor", "selenium-webdriver"], + ) + _protractor_web_test_suite( + name = name, browsers = ["@npm//@angular/dev-infra-private/bazel/browsers/chromium:chromium"], + deps = ["%s_bundle" % name], **kwargs ) -def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], exclude_init_script = False, **kwargs): +def ng_web_test_suite(deps = [], static_css = [], exclude_init_script = False, **kwargs): + bootstrap = [ + # This matches the ZoneJS bundles used in default CLI projects. See: + # https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/application/files/src/polyfills.ts.template#L58 + # https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/application/files/src/test.ts.template#L3 + # Note `zone.js/dist/zone.js` is aliased in the CLI to point to the evergreen + # output that does not include legacy patches. See: https://github.com/angular/angular/issues/35157. + # TODO: Consider adding the legacy patches when testing Saucelabs/Browserstack with Bazel. + # CLI loads the legacy patches conditionally for ES5 legacy browsers. See: + # https://github.com/angular/angular-cli/blob/277bad3895cbce6de80aa10a05c349b10d9e09df/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts#L141 + "@npm//:node_modules/zone.js/dist/zone-evergreen.js", + "@npm//:node_modules/zone.js/dist/zone-testing.js", + "@npm//:node_modules/reflect-metadata/Reflect.js", + ] + kwargs.pop("bootstrap", []) + # Always include a prebuilt theme in the test suite because otherwise tests, which depend on CSS # that is needed for measuring, will unexpectedly fail. Also always adding a prebuilt theme # reduces the amount of setup that is needed to create a test suite Bazel target. Note that the @@ -330,12 +342,12 @@ def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], exclude_init_s # loads the given CSS file. for css_label in static_css: css_id = "static-css-file-%s" % (css_label.replace("/", "_").replace(":", "-")) - deps += [":%s" % css_id] + bootstrap += [":%s" % css_id] native.genrule( name = css_id, srcs = [css_label], - outs = ["%s.js" % css_id], + outs = ["%s.css.js" % css_id], output_to_bindir = True, cmd = """ files=($(execpaths %s)) @@ -354,18 +366,6 @@ def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], exclude_init_s karma_web_test_suite( # Depend on our custom test initialization script. This needs to be the first dependency. deps = deps if exclude_init_script else ["//test:angular_test_init"] + deps, - bootstrap = [ - # This matches the ZoneJS bundles used in default CLI projects. See: - # https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/application/files/src/polyfills.ts.template#L58 - # https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/application/files/src/test.ts.template#L3 - # Note `zone.js/dist/zone.js` is aliased in the CLI to point to the evergreen - # output that does not include legacy patches. See: https://github.com/angular/angular/issues/35157. - # TODO: Consider adding the legacy patches when testing Saucelabs/Browserstack with Bazel. - # CLI loads the legacy patches conditionally for ES5 legacy browsers. See: - # https://github.com/angular/angular-cli/blob/277bad3895cbce6de80aa10a05c349b10d9e09df/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts#L141 - "@npm//:node_modules/zone.js/dist/zone-evergreen.js", - "@npm//:node_modules/zone.js/dist/zone-testing.js", - "@npm//:node_modules/reflect-metadata/Reflect.js", - ] + bootstrap, + bootstrap = bootstrap, **kwargs ) diff --git a/tools/spec-bundling/BUILD.bazel b/tools/spec-bundling/BUILD.bazel new file mode 100644 index 000000000000..3db5a9f20ed0 --- /dev/null +++ b/tools/spec-bundling/BUILD.bazel @@ -0,0 +1,3 @@ +package(default_visibility = ["//visibility:public"]) + +exports_files(["esbuild.config-tmpl.mjs"]) diff --git a/tools/spec-bundling/esbuild.config-tmpl.mjs b/tools/spec-bundling/esbuild.config-tmpl.mjs new file mode 100644 index 000000000000..40b694be9547 --- /dev/null +++ b/tools/spec-bundling/esbuild.config-tmpl.mjs @@ -0,0 +1,29 @@ +/** + * @license + * Copyright Google LLC 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 + */ + +// Note: This needs to be a workspace manifest path as this ESBuild config +// is generated and can end up in arbitrary Bazel packages. +import { + createLinkerEsbuildPlugin +} from 'angular_material/tools/angular/create_linker_esbuild_plugin.mjs'; + +// Conditionally, based on whether partial compilation is enabled, we run the +// linker on all files part of the test. +const plugins = TMPL_PARTIAL_COMPILATION_ENABLED ? + [await createLinkerEsbuildPlugin(/.*/, /* ensureNoPartialDeclaration */ true)] : [] + +export default { + // `tslib` sets the `module` condition to resolve to ESM. + conditions: ['es2020', 'es2015', 'module'], + // This ensures that we prioritize ES2020. RxJS would otherwise use the ESM5 output. + mainFields: ['es2020', 'es2015', 'module', 'main'], + // Use the `iife` format for the test entry-point as tests should run immediately. + // For browser tests which are wrapped in an AMD header and footer, this works as well. + format: 'iife', + plugins, +}; diff --git a/tools/spec-bundling/index.bzl b/tools/spec-bundling/index.bzl new file mode 100644 index 000000000000..3a4bba15f761 --- /dev/null +++ b/tools/spec-bundling/index.bzl @@ -0,0 +1,149 @@ +load("@npm//@angular/dev-infra-private/bazel:expand_template.bzl", "expand_template") +load("//tools/esbuild:index.bzl", "esbuild", "esbuild_amd", "esbuild_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("@build_bazel_rules_nodejs//:providers.bzl", "JSModuleInfo") +load("//tools/angular:index.bzl", "LINKER_PROCESSED_FW_PACKAGES") + +""" + Starlark file exposing a macro for bundling Bazel targets with spec files into + a single spec ESM/AMD file. Bundling is helpful as it avoids unnecessary complexity + with module resolution at runtime with loaders such as SystemJS or RequireJS. + + Additionally, given that Angular framework packages do no longer ship UMD bundles, + bundling simplifies the integration of those FW packages significantly. It also helps + with incorporating the Angular linker-processed output of FW ESM bundles. +""" + +def _is_spec_file(file): + """Gets whether the given file is a spec file.""" + basename = file.basename + + # External files (from other workspaces) should never run as specs. + if (file.short_path.startswith("../")): + return False + + # `spec.js` or `spec.mjs` files will be imported in the entry-point. + return basename.endswith("spec.js") or basename.endswith("spec.mjs") + +def _filter_spec_files(files): + """Filters the given list of files to only contain spec files.""" + result = [] + for file in files: + if _is_spec_file(file): + result.append(file) + return result + +def _create_entrypoint_file(base_package, spec_files): + """Creates the contents of the spec entry-point ESM file which imports + all individual spec files so that these are bundled and loaded by Node/Karma.""" + output = "" + for file in spec_files: + base_dir_segments = "/".join([".."] * len(base_package.split("/"))) + output += """import "%s/%s";\n""" % (base_dir_segments, file.short_path) + return output + +def _spec_entrypoint_impl(ctx): + output = ctx.actions.declare_file("%s.mjs" % ctx.attr.name) + spec_depsets = [] + + for dep in ctx.attr.deps: + if JSModuleInfo in dep: + spec_depsets.append(dep[JSModuleInfo].sources) + else: + spec_depsets.append(dep[DefaultInfo].files) + + spec_files = [] + + for spec_depset in spec_depsets: + # Note: `to_list()` is an expensive operation but we need to do this for every + # dependency here in order to be able to filter out spec files from depsets. + spec_files.extend(_filter_spec_files(spec_depset.to_list())) + + ctx.actions.write( + output = output, + content = _create_entrypoint_file(ctx.label.package, spec_files), + ) + + out_depset = depset([output]) + + return [ + DefaultInfo(files = out_depset), + JSModuleInfo( + direct_sources = out_depset, + sources = depset(transitive = [out_depset] + spec_depsets), + ), + ] + +_spec_entrypoint = rule( + implementation = _spec_entrypoint_impl, + attrs = { + "deps": attr.label_list(allow_files = False, mandatory = True), + }, +) + +def spec_bundle(name, platform, deps, **kwargs): + """ + Macro that will bundle all test files, with their respective transitive dependencies, + into a single bundle file that can be loaded within Karma or NodeJS directly. Test files + are bundled as Angular framework packages do not ship UMD files and to avoid overall + complexity with maintaining a runtime loader such as RequireJS or SystemJS. + """ + + is_browser_test = platform == "browser" + package_name = native.package_name() + workspace = "angular_material" + + _spec_entrypoint( + name = "%s_spec_entrypoint" % name, + deps = deps, + testonly = True, + ) + + expand_template( + name = "%s_config_file" % name, + testonly = True, + template = "//tools/spec-bundling:esbuild.config-tmpl.mjs", + output_name = "%s_config.mjs" % name, + substitutions = select({ + # Pass through whether partial compilation is enabled or not. This is helpful + # for our integration tests which run all tests in partial compilation mode. + "//tools:partial_compilation_enabled": {"TMPL_PARTIAL_COMPILATION_ENABLED": "true"}, + "//conditions:default": {"TMPL_PARTIAL_COMPILATION_ENABLED": "false"}, + }), + ) + + esbuild_config( + name = "%s_config" % name, + config_file = ":%s_config_file" % name, + testonly = True, + deps = ["//tools/angular:create_linker_esbuild_plugin"], + ) + + # Browser tests (Karma) need named AMD modules to load. + # TODO(devversion): consider updating `@bazel/concatjs` to support loading JS files directly. + esbuild_rule = esbuild_amd if is_browser_test else esbuild + amd_name = "%s/%s/%s" % (workspace, package_name, name + "_spec") if is_browser_test else None + + esbuild_rule( + name = "%s_bundle" % name, + testonly = True, + config = ":%s_config" % name, + entry_point = ":%s_spec_entrypoint" % name, + module_name = amd_name, + output = "%s_spec.js" % name, + # We cannot use `ES2017` or higher as that would result in `async/await` not being downleveled. + # ZoneJS needs to be able to intercept these as otherwise change detection would not work properly. + target = "es2016", + platform = platform, + # Note: We add all linker-processed FW packages as dependencies here so that ESBuild will + # map all framework packages to their linker-processed bundles from `tools/angular`. + deps = deps + LINKER_PROCESSED_FW_PACKAGES + [":%s_spec_entrypoint" % name], + link_workspace_root = True, + **kwargs + ) + + js_library( + name = name, + testonly = True, + named_module_srcs = [":%s_bundle" % name], + ) From d0a1cafa47b39b2b97b1f2746f8d690836c57af0 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 22:08:54 +0200 Subject: [PATCH 14/21] build: update prerender test to work with ESM APF v13 packages This commit updates the pre-render test to work with APF v13 package output which is strict ESM. Since the test runs inside Node, we would need to update our test to run in ESM as well. This is not possible with the Bazel NodeJS rules yet, and also there are a couple of more issues with running ESM devmode directly in NodeJS: * ESM requires an explicit extension for releative imports. TypeScript will not add an explict extension so this breaks for our local package output. A bundler is needed and this is what the CLI will do for SSR as well. * We want the Angular linked ESM bundles for framework packages as these are only partially compiled. This is not possible to do without modifiyng the node modules / or using a bundler that in-memory modifies the resolved framework packages (like the CLI does with its webpack plugins). --- src/universal-app/BUILD.bazel | 21 +++++++++++++++++++-- src/universal-app/prerender.ts | 11 ++++++----- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/universal-app/BUILD.bazel b/src/universal-app/BUILD.bazel index 3cd7fb6710a9..11f79e0cfbc1 100644 --- a/src/universal-app/BUILD.bazel +++ b/src/universal-app/BUILD.bazel @@ -4,6 +4,8 @@ load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_TARGETS") load("//src/material:config.bzl", "MATERIAL_TARGETS") load("//src/material-experimental:config.bzl", "MATERIAL_EXPERIMENTAL_TARGETS") load("//tools:defaults.bzl", "ng_module", "sass_binary", "ts_library") +load("//tools/esbuild:index.bzl", "esbuild") +load("//tools/angular:index.bzl", "LINKER_PROCESSED_FW_PACKAGES") package(default_visibility = ["//visibility:public"]) @@ -33,6 +35,7 @@ ts_library( deps = [ ":kitchen-sink", "@npm//@angular/platform-server", + "@npm//@bazel/runfiles", "@npm//@types/node", "@npm//reflect-metadata", "@npm//zone.js", @@ -53,14 +56,28 @@ sass_binary( ], ) +esbuild( + name = "server_bundle", + entry_point = ":prerender.ts", + platform = "node", + # We cannot use `ES2017` or higher as that would result in `async/await` not being downleveled. + # ZoneJS needs to be able to intercept these as otherwise change detection would not work properly. + target = "es2016", + # Note: We add all linker-processed FW packages as dependencies here so that ESBuild will + # map all framework packages to their linker-processed bundles from `tools/angular`. + deps = LINKER_PROCESSED_FW_PACKAGES + [ + ":server", + ], +) + nodejs_test( name = "server_test", data = [ "index.html", - ":server", + ":server_bundle", ":theme_scss", ], - entry_point = ":prerender.ts", + entry_point = ":server_bundle.js", templated_args = [ # TODO(josephperrott): update dependency usages to no longer need bazel patch module resolver # See: https://github.com/bazelbuild/rules_nodejs/wiki#--bazel_patch_module_resolver-now-defaults-to-false-2324 diff --git a/src/universal-app/prerender.ts b/src/universal-app/prerender.ts index 9441bb421246..b790def76946 100644 --- a/src/universal-app/prerender.ts +++ b/src/universal-app/prerender.ts @@ -1,20 +1,21 @@ import 'reflect-metadata'; import 'zone.js'; -import {renderModuleFactory} from '@angular/platform-server'; +import {renderModule} from '@angular/platform-server'; import {readFileSync, writeFileSync} from 'fs'; import {join} from 'path'; +import {runfiles} from '@bazel/runfiles'; -import {KitchenSinkRootServerModuleNgFactory} from './kitchen-sink-root.ngfactory'; +import {KitchenSinkRootServerModule} from './kitchen-sink-root'; // Do not enable production mode, because otherwise the `MatCommonModule` won't execute // the browser related checks that could cause NodeJS issues. // Resolve the path to the "index.html" through Bazel runfile resolution. -const indexHtmlPath = require.resolve('./index.html'); +const indexHtmlPath = runfiles.resolvePackageRelative('./index.html'); -const result = renderModuleFactory( - KitchenSinkRootServerModuleNgFactory, {document: readFileSync(indexHtmlPath, 'utf-8')}); +const result = renderModule( + KitchenSinkRootServerModule, {document: readFileSync(indexHtmlPath, 'utf-8')}); const outDir = process.env.TEST_UNDECLARED_OUTPUTS_DIR as string; result From e476e033284954e4c5df98c7a32d3065cb5fe341 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 22:15:53 +0200 Subject: [PATCH 15/21] refactor: update ESM incompatible code to work with ESM compilation There were a couple of code places which started breaking with us switching the devmode/prodmode target and mode to ES2020: * Since devmode is now ES2020, arrow functions are no longer downleveled for tests to actual `function` declarations. This breaks spies in google-maps or the youtube-player package as the tests try to instantiate a spy using `new`. An arrow function cannot be instantiated through `new`.. so we manually update these spies to not use arrow functions. * The MDC-based dialog harness extended from the non-MDC dialog harness and the `with` static member conflicted. It's unclear why this in particular happened but it was straightforward enough to just introduce a base class for the dialog harness (like it is done in other places as well). --- .../map-marker-clusterer.spec.ts | 4 +- .../testing/fake-google-map-utils.ts | 74 +++++++++++-------- .../mdc-dialog/testing/dialog-harness.spec.ts | 2 +- .../mdc-dialog/testing/dialog-harness.ts | 8 +- src/material/dialog/testing/dialog-harness.ts | 40 +++++----- src/youtube-player/fake-youtube-player.ts | 3 +- 6 files changed, 75 insertions(+), 56 deletions(-) diff --git a/src/google-maps/map-marker-clusterer/map-marker-clusterer.spec.ts b/src/google-maps/map-marker-clusterer/map-marker-clusterer.spec.ts index 551e092aa416..e049af23d76d 100644 --- a/src/google-maps/map-marker-clusterer/map-marker-clusterer.spec.ts +++ b/src/google-maps/map-marker-clusterer/map-marker-clusterer.spec.ts @@ -35,7 +35,9 @@ describe('MapMarkerClusterer', () => { createMapConstructorSpy(mapSpy).and.callThrough(); const markerSpy = createMarkerSpy({}); - createMarkerConstructorSpy(markerSpy).and.callFake(() => { + // The spy target function cannot be an arrow-function as this breaks when created + // through `new`. + createMarkerConstructorSpy(markerSpy).and.callFake(function() { return createMarkerSpy({}); }); diff --git a/src/google-maps/testing/fake-google-map-utils.ts b/src/google-maps/testing/fake-google-map-utils.ts index fa35ae712558..9e416d688149 100644 --- a/src/google-maps/testing/fake-google-map-utils.ts +++ b/src/google-maps/testing/fake-google-map-utils.ts @@ -54,8 +54,9 @@ export function createMapSpy(options: google.maps.MapOptions): jasmine.SpyObj, apiLoaded = true): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const mapConstructorSpy = - jasmine.createSpy('Map constructor', (_el: Element, _options: google.maps.MapOptions) => { + jasmine.createSpy('Map constructor', function() { return mapSpy; }); const testingWindow: TestingWindow = window; @@ -84,8 +85,9 @@ export function createMarkerSpy(options: google.maps.MarkerOptions): /** Creates a jasmine.Spy to watch for the constructor of a google.maps.Marker */ export function createMarkerConstructorSpy(markerSpy: jasmine.SpyObj): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const markerConstructorSpy = - jasmine.createSpy('Marker constructor', (_options: google.maps.MarkerOptions) => { + jasmine.createSpy('Marker constructor', function() { return markerSpy; }); const testingWindow: TestingWindow = window; @@ -118,8 +120,9 @@ export function createInfoWindowSpy(options: google.maps.InfoWindowOptions): /** Creates a jasmine.Spy to watch for the constructor of a google.maps.InfoWindow */ export function createInfoWindowConstructorSpy( infoWindowSpy: jasmine.SpyObj): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const infoWindowConstructorSpy = - jasmine.createSpy('InfoWindow constructor', (_options: google.maps.InfoWindowOptions) => { + jasmine.createSpy('InfoWindow constructor', function() { return infoWindowSpy; }); const testingWindow: TestingWindow = window; @@ -149,8 +152,9 @@ export function createPolylineSpy(options: google.maps.PolylineOptions): /** Creates a jasmine.Spy to watch for the constructor of a google.maps.Polyline */ export function createPolylineConstructorSpy(polylineSpy: jasmine.SpyObj): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const polylineConstructorSpy = - jasmine.createSpy('Polyline constructor', (_options: google.maps.PolylineOptions) => { + jasmine.createSpy('Polyline constructor', function() { return polylineSpy; }); const testingWindow: TestingWindow = window; @@ -180,8 +184,9 @@ export function createPolygonSpy(options: google.maps.PolygonOptions): /** Creates a jasmine.Spy to watch for the constructor of a google.maps.Polygon */ export function createPolygonConstructorSpy(polygonSpy: jasmine.SpyObj): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const polygonConstructorSpy = - jasmine.createSpy('Polygon constructor', (_options: google.maps.PolygonOptions) => { + jasmine.createSpy('Polygon constructor', function() { return polygonSpy; }); const testingWindow: TestingWindow = window; @@ -211,8 +216,9 @@ export function createRectangleSpy(options: google.maps.RectangleOptions): /** Creates a jasmine.Spy to watch for the constructor of a google.maps.Rectangle */ export function createRectangleConstructorSpy(rectangleSpy: jasmine.SpyObj): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const rectangleConstructorSpy = - jasmine.createSpy('Rectangle constructor', (_options: google.maps.RectangleOptions) => { + jasmine.createSpy('Rectangle constructor', function() { return rectangleSpy; }); const testingWindow: TestingWindow = window; @@ -242,10 +248,10 @@ export function createCircleSpy(options: google.maps.CircleOptions): /** Creates a jasmine.Spy to watch for the constructor of a google.maps.Circle */ export function createCircleConstructorSpy(circleSpy: jasmine.SpyObj): jasmine.Spy { - const circleConstructorSpy = - jasmine.createSpy('Circle constructor', (_options: google.maps.CircleOptions) => { - return circleSpy; - }); + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + const circleConstructorSpy = jasmine.createSpy('Circle constructor', function() { + return circleSpy; + }); const testingWindow: TestingWindow = window; if (testingWindow.google && testingWindow.google.maps) { testingWindow.google.maps['Circle'] = circleConstructorSpy; @@ -281,12 +287,10 @@ export function createGroundOverlaySpy( /** Creates a jasmine.Spy to watch for the constructor of a google.maps.GroundOverlay */ export function createGroundOverlayConstructorSpy( groundOverlaySpy: jasmine.SpyObj): jasmine.Spy { - const groundOverlayConstructorSpy = jasmine.createSpy( - 'GroundOverlay constructor', - (_url: string, _bounds: google.maps.LatLngBoundsLiteral, - _options: google.maps.GroundOverlayOptions) => { - return groundOverlaySpy; - }); + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + const groundOverlayConstructorSpy = jasmine.createSpy('GroundOverlay constructor', function() { + return groundOverlaySpy; + }); const testingWindow: TestingWindow = window; if (testingWindow.google && testingWindow.google.maps) { testingWindow.google.maps['GroundOverlay'] = groundOverlayConstructorSpy; @@ -321,8 +325,9 @@ export function createKmlLayerSpy(options?: google.maps.KmlLayerOptions): /** Creates a jasmine.Spy to watch for the constructor of a google.maps.KmlLayer */ export function createKmlLayerConstructorSpy(kmlLayerSpy: jasmine.SpyObj): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const kmlLayerConstructorSpy = - jasmine.createSpy('KmlLayer constructor', (_options: google.maps.KmlLayerOptions) => { + jasmine.createSpy('KmlLayer constructor', function() { return kmlLayerSpy; }); const testingWindow: TestingWindow = window; @@ -351,8 +356,9 @@ export function createTrafficLayerSpy(options?: google.maps.TrafficLayerOptions) /** Creates a jasmine.Spy to watch for the constructor of a google.maps.TrafficLayer */ export function createTrafficLayerConstructorSpy( trafficLayerSpy: jasmine.SpyObj): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const trafficLayerConstructorSpy = - jasmine.createSpy('TrafficLayer constructor', (_options: google.maps.TrafficLayerOptions) => { + jasmine.createSpy('TrafficLayer constructor', function() { return trafficLayerSpy; }); const testingWindow: TestingWindow = window; @@ -379,7 +385,8 @@ export function createTransitLayerSpy(): jasmine.SpyObj): jasmine.Spy { - const transitLayerConstructorSpy = jasmine.createSpy('TransitLayer constructor', () => { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + const transitLayerConstructorSpy = jasmine.createSpy('TransitLayer constructor', function() { return transitLayerSpy; }); const testingWindow: TestingWindow = window; @@ -406,7 +413,8 @@ export function createBicyclingLayerSpy(): jasmine.SpyObj): jasmine.Spy { - const bicylingLayerConstructorSpy = jasmine.createSpy('BicyclingLayer constructor', () => { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + const bicylingLayerConstructorSpy = jasmine.createSpy('BicyclingLayer constructor', function() { return bicylingLayerSpy; }); const testingWindow: TestingWindow = window; @@ -443,10 +451,9 @@ export function createMarkerClustererSpy(): jasmine.SpyObj { /** Creates a jasmine.Spy to watch for the constructor of a MarkerClusterer */ export function createMarkerClustererConstructorSpy( markerClustererSpy: jasmine.SpyObj, apiLoaded = true): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const markerClustererConstructorSpy = jasmine.createSpy('MarkerClusterer constructor', - () => { - return markerClustererSpy; - }); + function() { return markerClustererSpy; }); if (apiLoaded) { const testingWindow: TestingWindow = window; testingWindow['MarkerClusterer'] = markerClustererConstructorSpy; @@ -467,10 +474,9 @@ export function createDirectionsRendererSpy(options: google.maps.DirectionsRende /** Creates a jasmine.Spy to watch for the constructor of a DirectionsRenderer */ export function createDirectionsRendererConstructorSpy( directionsRendererSpy: jasmine.SpyObj): jasmine.Spy { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. const directionsRendererConstructorSpy = jasmine.createSpy('DirectionsRenderer constructor', - (_options: google.maps.DirectionsRendererOptions) => { - return directionsRendererSpy; - }); + function () { return directionsRendererSpy; }); const testingWindow: TestingWindow = window; if (testingWindow.google && testingWindow.google.maps) { testingWindow.google.maps['DirectionsRenderer'] = directionsRendererConstructorSpy; @@ -493,8 +499,9 @@ export function createDirectionsServiceSpy(): jasmine.SpyObj): jasmine.Spy { - const directionsServiceConstructorSpy = - jasmine.createSpy('DirectionsService constructor', () => directionsServiceSpy); + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + const directionsServiceConstructorSpy = jasmine.createSpy('DirectionsService constructor', + function() { return directionsServiceSpy; }); const testingWindow: TestingWindow = window; if (testingWindow.google && testingWindow.google.maps) { testingWindow.google.maps['DirectionsService'] = directionsServiceConstructorSpy; @@ -522,7 +529,8 @@ export function createHeatmapLayerSpy(): jasmine.SpyObj): jasmine.Spy { - const heatmapLayerConstructorSpy = jasmine.createSpy('HeatmapLayer constructor', () => { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + const heatmapLayerConstructorSpy = jasmine.createSpy('HeatmapLayer constructor', function() { return heatmapLayerSpy; }); const testingWindow: TestingWindow = window; @@ -552,7 +560,9 @@ export function createLatLngSpy(): jasmine.SpyObj { /** Creates a jasmine.Spy to watch for the constructor of a google.maps.LatLng */ export function createLatLngConstructorSpy( latLngSpy: jasmine.SpyObj): jasmine.Spy { - const latLngConstructorSpy = jasmine.createSpy('LatLng constructor', () => latLngSpy); + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + const latLngConstructorSpy = jasmine.createSpy('LatLng constructor', + function() { return latLngSpy; }); const testingWindow: TestingWindow = window; if (testingWindow.google && testingWindow.google.maps) { testingWindow.google.maps['LatLng'] = latLngConstructorSpy; @@ -574,7 +584,9 @@ export function createGeocoderSpy(): jasmine.SpyObj { /** Creates a jasmine.Spy to watch for the constructor of the Geocoder. */ export function createGeocoderConstructorSpy( geocoderSpy: jasmine.SpyObj): jasmine.Spy { - const geocoderConstructorSpy = jasmine.createSpy('Geocoder constructor', () => geocoderSpy); + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + const geocoderConstructorSpy = jasmine.createSpy('Geocoder constructor', + function () { return geocoderSpy; }); const testingWindow: TestingWindow = window; if (testingWindow.google && testingWindow.google.maps) { testingWindow.google.maps['Geocoder'] = geocoderConstructorSpy; diff --git a/src/material-experimental/mdc-dialog/testing/dialog-harness.spec.ts b/src/material-experimental/mdc-dialog/testing/dialog-harness.spec.ts index d7d6dd60c996..dce20ab11658 100644 --- a/src/material-experimental/mdc-dialog/testing/dialog-harness.spec.ts +++ b/src/material-experimental/mdc-dialog/testing/dialog-harness.spec.ts @@ -3,5 +3,5 @@ import {runHarnessTests} from '@angular/material/dialog/testing/shared.spec'; import {MatDialogHarness} from './dialog-harness'; describe('MDC-based MatDialog', () => { - runHarnessTests(MatDialogModule, MatDialogHarness, MatDialog as any); + runHarnessTests(MatDialogModule, MatDialogHarness as any, MatDialog as any); }); diff --git a/src/material-experimental/mdc-dialog/testing/dialog-harness.ts b/src/material-experimental/mdc-dialog/testing/dialog-harness.ts index f9aed9da0114..93ef00968510 100644 --- a/src/material-experimental/mdc-dialog/testing/dialog-harness.ts +++ b/src/material-experimental/mdc-dialog/testing/dialog-harness.ts @@ -9,7 +9,7 @@ import {HarnessPredicate} from '@angular/cdk/testing'; import { DialogHarnessFilters, - MatDialogHarness as NonMdcDialogHarness + _MatDialogHarnessBase, } from '@angular/material/dialog/testing'; /** Selectors for different sections of the mat-dialog that can contain user content. */ @@ -20,9 +20,9 @@ export const enum MatDialogSection { } /** Harness for interacting with a standard `MatDialog` in tests. */ -export class MatDialogHarness extends NonMdcDialogHarness { +export class MatDialogHarness extends _MatDialogHarnessBase { /** The selector for the host element of a `MatDialog` instance. */ - static override hostSelector = '.mat-mdc-dialog-container'; + static hostSelector = '.mat-mdc-dialog-container'; /** * Gets a `HarnessPredicate` that can be used to search for a `MatDialogHarness` that meets @@ -30,7 +30,7 @@ export class MatDialogHarness extends NonMdcDialogHarness { * @param options Options for filtering which dialog instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ - static override with(options: DialogHarnessFilters = {}): HarnessPredicate { + static with(options: DialogHarnessFilters = {}): HarnessPredicate { return new HarnessPredicate(MatDialogHarness, options); } diff --git a/src/material/dialog/testing/dialog-harness.ts b/src/material/dialog/testing/dialog-harness.ts index a1e23809148d..af1e2f7e7860 100644 --- a/src/material/dialog/testing/dialog-harness.ts +++ b/src/material/dialog/testing/dialog-harness.ts @@ -17,29 +17,15 @@ export const enum MatDialogSection { ACTIONS = '.mat-dialog-actions' } -// @breaking-change 14.0.0 change generic type to MatDialogSection. -/** Harness for interacting with a standard `MatDialog` in tests. */ -export class MatDialogHarness extends ContentContainerComponentHarness { - // Developers can provide a custom component or template for the - // dialog. The canonical dialog parent is the "MatDialogContainer". - /** The selector for the host element of a `MatDialog` instance. */ - static hostSelector = '.mat-dialog-container'; +/** Base class for the `MatDialogHarness` implementation. */ +export class _MatDialogHarnessBase extends + // @breaking-change 14.0.0 change generic type to MatDialogSection. + ContentContainerComponentHarness { protected _title = this.locatorForOptional(MatDialogSection.TITLE); protected _content = this.locatorForOptional(MatDialogSection.CONTENT); protected _actions = this.locatorForOptional(MatDialogSection.ACTIONS); - - /** - * Gets a `HarnessPredicate` that can be used to search for a `MatDialogHarness` that meets - * certain criteria. - * @param options Options for filtering which dialog instances are considered a match. - * @return a `HarnessPredicate` configured with the given options. - */ - static with(options: DialogHarnessFilters = {}): HarnessPredicate { - return new HarnessPredicate(MatDialogHarness, options); - } - /** Gets the id of the dialog. */ async getId(): Promise { const id = await (await this.host()).getAttribute('id'); @@ -97,3 +83,21 @@ export class MatDialogHarness extends ContentContainerComponentHarness { + return new HarnessPredicate(MatDialogHarness, options); + } +} diff --git a/src/youtube-player/fake-youtube-player.ts b/src/youtube-player/fake-youtube-player.ts index 25cb4a9f2f9c..7f94c9794b38 100644 --- a/src/youtube-player/fake-youtube-player.ts +++ b/src/youtube-player/fake-youtube-player.ts @@ -44,7 +44,8 @@ export function createFakeYtNamespace(): FakeYtNamespace { const boundListeners = new Map void>>(); const playerCtorSpy = jasmine.createSpy('Player Constructor'); - playerCtorSpy.and.callFake((_el: Element, config: YT.PlayerOptions) => { + // The spy target function cannot be an arrow-function as this breaks when created through `new`. + playerCtorSpy.and.callFake(function (_el: Element, config: YT.PlayerOptions) { playerConfig = config; return playerSpy; }); From 7e5a4b027d3044af4e6d8cb750beda457c665442 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 22:23:34 +0200 Subject: [PATCH 16/21] build: remove ngcc compatibility CI test jobs Removes all the ngcc compatibility CI jobs as the APF v13 output no longer comes with View Engine output and makes ngcc a noop for the Angular Component package output. --- .circleci/config.yml | 56 -------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9ba66f096d84..f3b85de08cd1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -434,54 +434,6 @@ jobs: - run: ./scripts/circleci/publish-snapshots.sh - *slack_notify_on_failure - # ----------------------------------------------------------------- - # Job that ensures that the release output is compatible with ngcc. - # ----------------------------------------------------------------- - ngcc_compatibility: - <<: *job_defaults - resource_class: xlarge - steps: - - checkout_and_rebase - - *restore_cache - - *attach_release_output - - *yarn_install - - # Copy the release packages into the node modules so that ngcc can process them. - - run: cp -R dist/releases/* node_modules/@angular/ - # Delete existing ngcc manifests that would prevent the copied packages - # from being discovered. - - run: rm -f node_modules/__ngcc_entry_points__.json - # Ensure that the job fails if an entry-point cannot be compiled. Also disable - # tsconfig parsing as that causes the release packages to be incorrectly resolved - # to the sources due to path mapping. - - run: yarn ngcc --error-on-failed-entry-point --no-tsconfig - - *slack_notify_on_failure - - # ----------------------------------------------------------------- - # Job that ensures that the release output is compatible with the - # latest snapshot ngcc changes. - # ----------------------------------------------------------------- - ngcc_compatibility_snapshot: - <<: *job_defaults - resource_class: xlarge - steps: - - checkout_and_rebase - - *restore_cache - - *attach_release_output - - *setup_snapshot_builds - - *yarn_install_loose_lockfile - - # Copy the release packages into the node modules so that ngcc can process them. - - run: cp -R dist/releases/* node_modules/@angular/ - # Delete existing ngcc manifests that would prevent the copied packages - # from being discovered. - - run: rm -f node_modules/__ngcc_entry_points__.json - # Ensure that the job fails if an entry-point cannot be compiled. Also disable - # tsconfig parsing as that causes the release packages to be incorrectly resolved - # to the sources due to path mapping. - - run: yarn ngcc --error-on-failed-entry-point --no-tsconfig - - *slack_notify_on_failure - # ---------------------------------------------------------------------------- # Job that runs the local browser tests against the Angular Github snapshots # ---------------------------------------------------------------------------- @@ -611,14 +563,6 @@ workflows: - build_release_packages - lint: filters: *ignore_presubmit_branch_filter - - ngcc_compatibility: - filters: *ignore_presubmit_branch_filter - requires: - - build_release_packages - - ngcc_compatibility_snapshot: - filters: *only_main_branch_filter - requires: - - build_release_packages - publish_snapshots: filters: *publish_branches_filter requires: From 91e5b0ec351e7ce5a9e0db8b1b1caf6a994eb4e7 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 18:41:12 +0200 Subject: [PATCH 17/21] build: remove unused linker-process bazel rule Removes the unused `linker-process` Bazel rule. We no longer need this AMD-based Bazel transformation/middleman rule as we can directly run the linker when bundling unit tests. --- tools/defaults.bzl | 8 +- tools/linker-process/BUILD.bazel | 32 ------ tools/linker-process/index.bzl | 100 ----------------- tools/linker-process/linker-process.ts | 147 ------------------------- 4 files changed, 2 insertions(+), 285 deletions(-) delete mode 100644 tools/linker-process/BUILD.bazel delete mode 100644 tools/linker-process/index.bzl delete mode 100644 tools/linker-process/linker-process.ts diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 041a0d7b7c70..216301404673 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -10,7 +10,6 @@ load("@npm//@bazel/typescript:index.bzl", _ts_library = "ts_library") load("//:packages.bzl", "VERSION_PLACEHOLDER_REPLACEMENTS") load("//:pkg-externals.bzl", "PKG_EXTERNALS") load("//tools/markdown-to-html:index.bzl", _markdown_to_html = "markdown_to_html") -load("//tools/linker-process:index.bzl", "linker_process") load("//tools/spec-bundling:index.bzl", "spec_bundle") _DEFAULT_TSCONFIG_BUILD = "//src:bazel-tsconfig-build.json" @@ -141,17 +140,14 @@ def ng_module( # See: https://github.com/bazelbuild/rules_nodejs/pull/2799. package_name = module_name, flat_module_out_file = flat_module_out_file, - compilation_mode = select({ - "//tools:partial_compilation_enabled": "partial", - "//conditions:default": "", - }), + strict_templates = True, deps = local_deps, tsconfig = tsconfig, testonly = testonly, **kwargs ) -def ng_package(name, data = [], deps = [], globals = ROLLUP_GLOBALS, readme_md = None, **kwargs): +def ng_package(name, data = [], deps = [], externals = PKG_EXTERNALS, readme_md = None, **kwargs): # If no readme file has been specified explicitly, use the default readme for # release packages from "src/README.md". if not readme_md: diff --git a/tools/linker-process/BUILD.bazel b/tools/linker-process/BUILD.bazel deleted file mode 100644 index a299a27fe58c..000000000000 --- a/tools/linker-process/BUILD.bazel +++ /dev/null @@ -1,32 +0,0 @@ -load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary") -load("//tools:defaults.bzl", "ts_library") - -package(default_visibility = ["//visibility:public"]) - -ts_library( - name = "sources", - srcs = glob(["**/*.ts"]), - # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. - devmode_module = "commonjs", - deps = [ - "@npm//@angular/compiler-cli", - "@npm//@babel/core", - "@npm//@babel/traverse", - "@npm//@types/node", - ], -) - -# Exposes the `linker-process` tool as executable so that it can be used as -# build tool (for `ctx.actions.run`) within the `linker_process` custom Bazel rule. -nodejs_binary( - name = "linker-process", - data = [ - ":sources", - ], - entry_point = ":linker-process.ts", - templated_args = [ - # TODO(josephperrott): update dependency usages to no longer need bazel patch module resolver - # See: https://github.com/bazelbuild/rules_nodejs/wiki#--bazel_patch_module_resolver-now-defaults-to-false-2324 - "--bazel_patch_module_resolver", - ], -) diff --git a/tools/linker-process/index.bzl b/tools/linker-process/index.bzl deleted file mode 100644 index 25133cd8e4b4..000000000000 --- a/tools/linker-process/index.bzl +++ /dev/null @@ -1,100 +0,0 @@ -""" - Exposes a custom Bazel rule for processing sources, which are extracted from Bazel - targets, with the Angular linker plugin. -""" - -load("@build_bazel_rules_nodejs//:providers.bzl", "JSModuleInfo", "JSNamedModuleInfo") - -""" -Gets the Bazel manifest path for a given file. Manifest paths are used within Bazel runfile -manifests and are formatted as followed: `/` -""" - -def _to_manifest_path(ctx, file): - # If a file resides outside of the current workspace, we omit the leading `../` - # segment as the rest will contain the workspace name. e.g. `../npm/node_modules/<..>`. - if file.short_path.startswith("../"): - return file.short_path[3:] - else: - return ctx.workspace_name + "/" + file.short_path - -"""Extracts all source files from the specified list of dependencies.""" - -def _extract_source_files(deps): - depsets = [] - for dep in deps: - if JSNamedModuleInfo in dep: - depsets.append(dep[JSNamedModuleInfo].sources) - elif JSModuleInfo in dep: - depsets.append(dep[JSModuleInfo].sources) - elif hasattr(dep, "files"): - depsets.append(dep.files) - return depset(transitive = depsets) - -def _linker_process(ctx): - args = ctx.actions.args() - sources = _extract_source_files(ctx.attr.srcs) - tmp_dir_name = ctx.label.name - - # The output directory manifest path. e.g `angular_material/src/cdk/a11y/linker_processed`. - output_dir_manifest_path = "%s/%s/%s" % (ctx.workspace_name, ctx.label.package, tmp_dir_name) - - # The output directory exec path. e.g `bazel_out/<..>/src/cdk/a11y/linker_processed`. - output_dir_exec_path = "%s/%s/%s" % (ctx.bin_dir.path, ctx.label.package, tmp_dir_name) - - # Given the sources being transformed and written to a new location, the AMD module names - # need to be rewritten. This file maps AMD modules as per the new location to the AMD modules - # as they appear in the sources. i.e. we generate AMD module aliases. - amd_module_mapping_file = ctx.actions.declare_file("%s/_module_mappings.js" % tmp_dir_name) - - args.add(output_dir_exec_path) - args.add(output_dir_manifest_path) - args.add(amd_module_mapping_file.path) - - outputs = [amd_module_mapping_file] - - # Iterate through the determined sources and pass them to the tool as argument. - for input_file in sources.to_list(): - output_pkg_path = _to_manifest_path(ctx, input_file) - args.add("%s:%s" % (input_file.path, output_pkg_path)) - outputs.append(ctx.actions.declare_file("%s/%s" % (tmp_dir_name, output_pkg_path))) - - # Support passing arguments through a parameter file. This is necessary because on Windows - # there is an argument limit and we need to handle a large amount of input files. Bazel - # switches between parameter file and normal argument passing based on the operating system. - # Read more here: https://docs.bazel.build/versions/master/skylark/lib/Args.html#use_param_file - args.use_param_file(param_file_arg = "--param-file=%s", use_always = True) - - ctx.actions.run( - inputs = sources, - outputs = outputs, - executable = ctx.executable._linker_process_tool, - arguments = [args], - progress_message = "NgLinkerProcess", - ) - - outputs_depset = depset(outputs) - - return [ - DefaultInfo(files = outputs_depset), - ] - -""" - Rule definition for the "linker_process" rule that can process a list of targets - with the Angular linker. The processed files can be retrieved through the default - files provider. -""" -linker_process = rule( - implementation = _linker_process, - attrs = { - "srcs": attr.label_list( - allow_files = True, - doc = """List of sources that should be processed with the Angular linker.""", - ), - "_linker_process_tool": attr.label( - default = Label("//tools/linker-process"), - executable = True, - cfg = "host", - ), - }, -) diff --git a/tools/linker-process/linker-process.ts b/tools/linker-process/linker-process.ts deleted file mode 100644 index 61d1db328857..000000000000 --- a/tools/linker-process/linker-process.ts +++ /dev/null @@ -1,147 +0,0 @@ -import {readFileSync, writeFileSync} from 'fs'; -import {join, extname} from 'path'; - -// These imports to `@angular/compiler-cli` need to explicitly specify the `.js` extension as -// otherwise the Bazel NodeJS module resolution would end up resolving the ESM2015 `.mjs` files. -const {NodeJSFileSystem} = require('@angular/compiler-cli/src/ngtsc/file_system/index.js'); -const {ConsoleLogger, LogLevel} = require('@angular/compiler-cli/src/ngtsc/logging/index.js'); -const {createEs2015LinkerPlugin} = require('@angular/compiler-cli/linker/babel/index.js'); - -// There are no types installed for these packages. -const babel = require('@babel/core'); -const {default: traverse} = require('@babel/traverse'); - -/** File system used by the Angular linker plugin. */ -const fileSystem = new NodeJSFileSystem(); -/** Logger used by the Angular linker plugin. */ -const logger = new ConsoleLogger(LogLevel.info); - -/** Basic interface describing a Babel AST node path. */ -interface NodePath { - type: string; - parentPath: NodePath|undefined; - node: any; - buildCodeFrameError(message: string, ctor: T): T; -} - -/** - * Determines the command line arguments for the current Bazel action. Since this action can - * have a large set of input files, Bazel may write the arguments into a parameter file. - * This function is responsible for handling normal argument passing or Bazel parameter files. - * Read more here: https://docs.bazel.build/versions/master/skylark/lib/Args.html#use_param_file - */ -function getBazelActionArguments() { - const args = process.argv.slice(2); - - // If Bazel uses a parameter file, we've specified that it passes the file in the following - // format: "arg0 arg1 --param-file={path_to_param_file}" - if (args[0].startsWith('--param-file=')) { - return readFileSync(args[0].split('=')[1], 'utf8').trim().split('\n'); - } - - return args; -} - -/** Naively checks whether this node path resolves to an Angular declare invocation. */ -function isNgDeclareCallExpression(nodePath: NodePath): boolean { - if (!nodePath.node.name.startsWith('ɵɵngDeclare')) { - return false; - } - - // Expect the `ngDeclare` identifier to be used as part of a property access that - // is invoked within a call expression. e.g. `i0.ɵɵngDeclare<>`. - return nodePath.parentPath?.type === 'MemberExpression' && - nodePath.parentPath.parentPath?.type === 'CallExpression'; -} - -/** Gets the AMD module name for a given Bazel manifest path */ -function manifestPathToAmdName(manifestPath: string): string { - return manifestPath.substring(0, manifestPath.lastIndexOf('.')); -} - -/** Generates a JavaScript file that maps certain AMD modules to their associate. */ -function generateAmdModuleMappingFile(mappings: Map): string { - let amdMappingFileContent = ` - function registerAlias(oldModuleName, newModuleName) { - define(newModuleName, ['require', 'exports', oldModuleName], (require, exports) => { - var source = require(oldModuleName); - Object.keys(source).forEach(function(key) { - exports[key] = source[key]; - }); - }); - } - `; - - for (const [oldModuleName, newModuleName] of mappings.entries()) { - amdMappingFileContent += `registerAlias("${oldModuleName}", "${newModuleName}");\n`; - } - - return amdMappingFileContent; -} - -/** Processes the given file with the Angular linker plugin. */ -function processFileWithLinker(diskFilePath: string, fileContent: string): string { - const fileExtension = extname(diskFilePath); - - // If the input file is not a JavaScript file, do not process it with the linker - // Babel plugin and return the original file content. - if (fileExtension !== '.js' && fileExtension !== '.mjs') { - return fileContent; - } - - // We run the linker with JIT mode so that the processed Angular declarations could be - // run within unit tests that rely on JIT information to be available. - const linkerPlugin = createEs2015LinkerPlugin({fileSystem, logger, linkerJitMode: true}); - const {code, ast} = babel.transformSync(fileContent, { - ast: true, - filename: diskFilePath, - filenameRelative: diskFilePath, - plugins: [linkerPlugin], - compact: false, - }); - - // Naively check if there are any Angular declarations left that haven't been linked. - traverse(ast, { - Identifier: (astPath: NodePath) => { - if (isNgDeclareCallExpression(astPath)) { - throw astPath.buildCodeFrameError( - 'Found Angular declaration that has not been linked.', Error); - } - } - }); - - return code; -} - -if (require.main === module) { - const [outputDirExecPath, outputDirManifestPath, amdMappingFileExecPath, ...inputFiles] = - getBazelActionArguments(); - const amdModuleMappings = new Map(); - - for (const inputFileArg of inputFiles) { - const [inputFileExecPath, manifestPath] = inputFileArg.split(':'); - const outputExecPath = join(outputDirExecPath, manifestPath); - const manifestOutputPath = `${outputDirManifestPath}/${manifestPath}`; - const fileContent = readFileSync(inputFileExecPath, 'utf8'); - const oldAmdModuleName = manifestPathToAmdName(manifestPath); - const newAmdModuleName = manifestPathToAmdName(manifestOutputPath); - const processedContent = processFileWithLinker(inputFileExecPath, fileContent); - - // Keep track of the old AMD module name, and the expected new one. The AMD module - // names are based on the file location within the repository. This matches the - // AMD module names being generated by the NodeJS Bazel rules. - amdModuleMappings.set(oldAmdModuleName, newAmdModuleName); - - writeFileSync(outputExecPath, processedContent); - } - - // Generate a mapping file for AMD module names. Given we move sources to a new location, their - // existing AMD module names like `angular_material/src/cdk/a11y/a11y.spec` are no longer valid. - // Since we do not want to modify the AMD module code directly (and rewrite potential imports), - // we keep the original AMD module names, but also generate a new file that maps the "new" AMD - // module names (based on their new location) to the old AMD modules. This is necessary so that - // imports continue to work, and that tests can be run within the `karma_web_test` rule. - // https://github.com/bazelbuild/rules_nodejs/blob/a611b600b5d2f1242ee615ac4b1c8cd03d0c3b03/packages/concatjs/web_test/karma.conf.js#L310-L319 - const mappingContent = generateAmdModuleMappingFile(amdModuleMappings); - writeFileSync(amdMappingFileExecPath, mappingContent); -} From d68000bb0d19458c07cc1e7e21eb2030578c117e Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Oct 2021 23:58:24 +0200 Subject: [PATCH 18/21] build: ensure schematic code runs as commonjs in NPM output The CLI does not yet support running schematics as ESM. For this we actually still emit CommonJS output for schematics. We need to add a sub-directory `package.json` for the schematic folders though as otherwise NodeJS would incorrectly treat the `.js` schematic files as ESM due to the top-level package.json file setting `type: module`. --- src/cdk/schematics/BUILD.bazel | 1 + src/cdk/schematics/package.json | 3 +++ src/material/schematics/BUILD.bazel | 1 + src/material/schematics/package.json | 3 +++ tools/release-checks/npm-package-output/check-package.ts | 8 +++++++- 5 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/cdk/schematics/package.json create mode 100644 src/material/schematics/package.json diff --git a/src/cdk/schematics/BUILD.bazel b/src/cdk/schematics/BUILD.bazel index 2a040a797c83..c3028ea4d19d 100644 --- a/src/cdk/schematics/BUILD.bazel +++ b/src/cdk/schematics/BUILD.bazel @@ -46,6 +46,7 @@ ts_library( # This package is intended to be combined into the main @angular/cdk package as a dep. pkg_npm( name = "npm_package", + srcs = ["package.json"], deps = [ ":schematics", ":schematics_assets", diff --git a/src/cdk/schematics/package.json b/src/cdk/schematics/package.json new file mode 100644 index 000000000000..5bbefffbabee --- /dev/null +++ b/src/cdk/schematics/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/src/material/schematics/BUILD.bazel b/src/material/schematics/BUILD.bazel index 4c75347dd4cd..0d69e0a44404 100644 --- a/src/material/schematics/BUILD.bazel +++ b/src/material/schematics/BUILD.bazel @@ -44,6 +44,7 @@ ts_library( # This package is intended to be combined into the main @angular/material package as a dep. pkg_npm( name = "npm_package", + srcs = ["package.json"], deps = [ ":schematics", ":schematics_assets", diff --git a/src/material/schematics/package.json b/src/material/schematics/package.json new file mode 100644 index 000000000000..5bbefffbabee --- /dev/null +++ b/src/material/schematics/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/tools/release-checks/npm-package-output/check-package.ts b/tools/release-checks/npm-package-output/check-package.ts index 4334c25f76cd..563b6c3ca3d5 100644 --- a/tools/release-checks/npm-package-output/check-package.ts +++ b/tools/release-checks/npm-package-output/check-package.ts @@ -2,7 +2,7 @@ import {error} from '@angular/dev-infra-private/ng-dev/utils/console'; import * as chalk from 'chalk'; import {existsSync} from 'fs'; import {sync as glob} from 'glob'; -import {join} from 'path'; +import {basename, dirname, join} from 'path'; import { checkCdkPackage, @@ -63,6 +63,12 @@ export function checkReleasePackage( // Check each "package.json" file in the release output. We want to ensure // that there are no invalid file references in the entry-point definitions. packageJsonFiles.forEach(filePath => { + // A `package.json` file part of the schematics folder is not considered an + // entry-point `package.json` file and does not need to be checked. + if (basename(dirname(filePath)) === 'schematics') { + return; + } + checkEntryPointPackageJsonFile(filePath).forEach(message => addFailure(message, filePath)); }); From a8897b043a250fa3e1a98da89915cde743b73226 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 7 Oct 2021 00:03:21 +0200 Subject: [PATCH 19/21] build: add subpath export for `fesm2020` bundles of components-examples Adds a subpath export for the `fesm2020` folder of the internal `@angular/components-examples` package. This subpath is needed so that Webpack can generate lazy-loadable chunks for all examples in the documentation app. --- src/components-examples/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components-examples/package.json b/src/components-examples/package.json index 49244d316c64..785de023ff1b 100644 --- a/src/components-examples/package.json +++ b/src/components-examples/package.json @@ -13,6 +13,9 @@ "material design", "components" ], + "exports": { + "./fesm2020": {"default": "./fesm2020"} + }, "license": "MIT", "bugs": { "url": "https://github.com/angular/components/issues" From 7ace699d4982d0032cb330a1cdc392dea9c5bcef Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 7 Oct 2021 18:43:29 +0200 Subject: [PATCH 20/21] build: add `exports` entries for Sass module resolution Adds the `exports` field for module resolution of `@angular/cdk` and `@angular/material` when Sass is requested. Since these packages use the `exports` field already, to prevent deep imports, we also need to expose the Sass entry-points and prebuilt files. The webpack loader requires the `sass` conditional to be set when the CDK or Material modules are loaded without the `includePaths` option. It is worth noting that the Sass webpack loader does not seem to respect the exports field when `@import` is used. Still for consistency and other potential bundlers/loaders, we will expose the `.css` extension subpaths. Also as a side-note: the `.css` extension imports do not work with `@use`, so the non-extension variants are helpful there for backwards compatibility & convenient access. --- package.json | 24 +++--- src/cdk/config.bzl | 2 + src/cdk/package.json | 11 +++ src/material-experimental/package.json | 11 +++ src/material/package.json | 26 +++++++ src/material/prebuilt-themes/BUILD.bazel | 3 + tools/postinstall/apply-patches.js | 2 +- yarn.lock | 96 ++++++++++++------------ 8 files changed, 114 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index ac0bbf1fa418..bda4012c4435 100644 --- a/package.json +++ b/package.json @@ -50,12 +50,12 @@ }, "version": "13.0.0-next.7", "dependencies": { - "@angular/animations": "13.0.0-next.12", - "@angular/common": "13.0.0-next.12", - "@angular/compiler": "13.0.0-next.12", - "@angular/core": "13.0.0-next.12", - "@angular/forms": "13.0.0-next.12", - "@angular/platform-browser": "13.0.0-next.12", + "@angular/animations": "13.0.0-next.15", + "@angular/common": "13.0.0-next.15", + "@angular/compiler": "13.0.0-next.15", + "@angular/core": "13.0.0-next.15", + "@angular/forms": "13.0.0-next.15", + "@angular/platform-browser": "13.0.0-next.15", "@types/google.maps": "^3.45.6", "@types/youtube": "^0.0.42", "core-js-bundle": "^3.8.2", @@ -69,13 +69,13 @@ "@angular-devkit/build-optimizer": "0.1300.0-next.7", "@angular-devkit/core": "13.0.0-next.7", "@angular-devkit/schematics": "13.0.0-next.7", - "@angular/bazel": "13.0.0-next.12", - "@angular/compiler-cli": "13.0.0-next.12", + "@angular/bazel": "13.0.0-next.15", + "@angular/compiler-cli": "13.0.0-next.15", "@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#e674228281ff6ac4d21779070b090e8a8bde9e69", - "@angular/localize": "13.0.0-next.12", - "@angular/platform-browser-dynamic": "13.0.0-next.12", - "@angular/platform-server": "13.0.0-next.12", - "@angular/router": "13.0.0-next.12", + "@angular/localize": "13.0.0-next.15", + "@angular/platform-browser-dynamic": "13.0.0-next.15", + "@angular/platform-server": "13.0.0-next.15", + "@angular/router": "13.0.0-next.15", "@axe-core/webdriverjs": "^4.1.0", "@babel/core": "^7.13.10", "@babel/traverse": "^7.13.0", diff --git a/src/cdk/config.bzl b/src/cdk/config.bzl index 474743563254..583a9e317e07 100644 --- a/src/cdk/config.bzl +++ b/src/cdk/config.bzl @@ -30,6 +30,8 @@ CDK_TARGETS = ["//src/cdk"] + ["//src/cdk/%s" % ep for ep in CDK_ENTRYPOINTS] # Within the CDK, only a few targets have sass libraries which need to be # part of the release package. This list declares all CDK targets with sass # libraries that need to be included and re-exported at the package root. +# **Note**: When updating the list of CDK entry-points with styles, also update +# the `exports` field in the `cdk/package.json` file. CDK_ENTRYPOINTS_WITH_STYLES = [ "a11y", "overlay", diff --git a/src/cdk/package.json b/src/cdk/package.json index b5782713b800..38f22cb1100d 100644 --- a/src/cdk/package.json +++ b/src/cdk/package.json @@ -18,6 +18,17 @@ "url": "https://github.com/angular/components/issues" }, "homepage": "https://github.com/angular/components#readme", + "exports": { + ".": { + "sass": "./_index.scss" + }, + "./a11y-prebuilt.css": {"style": "./a11y-prebuilt.css"}, + "./a11y-prebuilt": {"style": "./a11y-prebuilt.css"}, + "./overlay-prebuilt.css": {"style": "./overlay-prebuilt.css"}, + "./overlay-prebuilt": {"style": "./overlay-prebuilt.css"}, + "./text-field-prebuilt.css": {"style": "./text-field-prebuilt.css"}, + "./text-field-prebuilt": {"style": "./text-field-prebuilt.css"} + }, "peerDependencies": { "@angular/core": "0.0.0-NG", "@angular/common": "0.0.0-NG", diff --git a/src/material-experimental/package.json b/src/material-experimental/package.json index d1d7e065f74a..14ee78052353 100644 --- a/src/material-experimental/package.json +++ b/src/material-experimental/package.json @@ -11,6 +11,17 @@ "url": "https://github.com/angular/components/issues" }, "homepage": "https://github.com/angular/components#readme", + "exports": { + ".": { + "sass": "./_index.scss" + }, + "./mdc-theming/prebuilt/indigo-pink.css": { + "style": "./mdc-theming/prebuilt/indigo-pink.css" + }, + "./mdc-theming/prebuilt/*": { + "style": "./mdc-theming/prebuilt/*.css" + } + }, "peerDependencies": { "@angular/core": "0.0.0-NG", "@angular/material": "0.0.0-PLACEHOLDER", diff --git a/src/material/package.json b/src/material/package.json index c2bc4af301dc..49e931621e16 100644 --- a/src/material/package.json +++ b/src/material/package.json @@ -17,6 +17,32 @@ "url": "https://github.com/angular/components/issues" }, "homepage": "https://github.com/angular/components#readme", + "exports": { + ".": { + "sass": "./_index.scss" + }, + "./theming": { + "sass": "./_theming.scss" + }, + "./_theming": { + "sass": "./_theming.scss" + }, + "./prebuilt-themes/indigo-pink.css": { + "style": "./prebuilt-themes/indigo-pink.css" + }, + "./prebuilt-themes/deeppurple-amber.css": { + "style": "./prebuilt-themes/deeppurple-amber.css" + }, + "./prebuilt-themes/pink-bluegrey.css": { + "style": "./prebuilt-themes/pink-bluegrey.css" + }, + "./prebuilt-themes/purple-green.css": { + "style": "./prebuilt-themes/purple-green.css" + }, + "./prebuilt-themes/*": { + "style": "./prebuilt-themes/*.css" + } + }, "peerDependencies": { "@angular/animations": "0.0.0-NG", "@angular/cdk": "0.0.0-PLACEHOLDER", diff --git a/src/material/prebuilt-themes/BUILD.bazel b/src/material/prebuilt-themes/BUILD.bazel index 501d69e7af9a..d6dda6de86c3 100644 --- a/src/material/prebuilt-themes/BUILD.bazel +++ b/src/material/prebuilt-themes/BUILD.bazel @@ -4,6 +4,9 @@ package(default_visibility = ["//visibility:public"]) # package in the right spot. The *right* thing to do would be to move them, but # we would need to update references for Google apps. +## **NOTE**: When adding/removing prebuilt themes from here, make sure to update +# the `material/package.json` exports field. + genrule( name = "indigo-pink", srcs = ["//src/material/core:theming/prebuilt/indigo-pink.css"], diff --git a/tools/postinstall/apply-patches.js b/tools/postinstall/apply-patches.js index b9f97fd04b00..0b26d909f196 100644 --- a/tools/postinstall/apply-patches.js +++ b/tools/postinstall/apply-patches.js @@ -14,7 +14,7 @@ const chalk = require('chalk'); * Version of the post install patch. Needs to be incremented when * existing patches or edits have been modified. */ -const PATCH_VERSION = 11; +const PATCH_VERSION = 13; /** Path to the project directory. */ const projectDir = path.join(__dirname, '../..'); diff --git a/yarn.lock b/yarn.lock index e7baf4e6fa41..3c1b44321ac4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -65,17 +65,17 @@ ora "5.4.1" rxjs "6.6.7" -"@angular/animations@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-13.0.0-next.12.tgz#ca1e40fa4f8e6b7514673931303b0257b2e8ccbd" - integrity sha512-cWa7bE/0HAXmMZQEYUi9GGD1qH7q3gTkdiWMuKiB1c8po/GPR/2ibNfusqijTv9k0VjRgEYCWaW61KCQFSvKfw== +"@angular/animations@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-13.0.0-next.15.tgz#28a716223439e136b03f1944d0c407fcf1847b4a" + integrity sha512-MZUlSyMSdW5eqpvDy5nGWg3hUQnoQwbYIqiDigFLyjaWcaQ0mkXA1M4Kidmo6D/aT0YInRBugSnGUS4RJ4la+w== dependencies: tslib "^2.3.0" -"@angular/bazel@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-13.0.0-next.12.tgz#efe7ddae7ab423b7774837d2f5ae8255bf33ebc7" - integrity sha512-kDJs8q+S8j2AFsI8GIaufcjRZF+Qs3T5Xq075v/5iGtvhha9UbyrYXtcioINUIcdhLs6seIl6dG1NBpK+QM2UQ== +"@angular/bazel@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-13.0.0-next.15.tgz#fe35f7728c71687f52e51f2d6d258bc1c8db133b" + integrity sha512-hR1X42UmM2L3FSaj0cIlLSDopkqgMvw7nAREeDSaoMr2qk3BqfvpUx4P71KXMSKSJ1h+moKyPas07mRoLBGGyw== dependencies: "@microsoft/api-extractor" "7.18.11" shelljs "0.8.4" @@ -90,17 +90,17 @@ "@angular/core" "^10.0.0-0 || ^11.0.0" reflect-metadata "^0.1.13" -"@angular/common@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-13.0.0-next.12.tgz#8d01448aca2a961524f0599d1adecda2e0188289" - integrity sha512-wzFY5a3VVUTw0t14UST695tIALOGv1E6I2pUuHoP1WBLl5XBt3SafYuWmnpUj8yF0/40zaePUEv25bGl5W3QUg== +"@angular/common@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-13.0.0-next.15.tgz#9d55f51fbda235bea9510ca30a2f6389b22a19c2" + integrity sha512-T0LPfZ4kKbcoT0QVluyT1Jo7J5ZK3vVSKSYMEHxqE21pFqlI5MMGdqn9X+SDlIEvEikARXG4w10Q3uJuAaaS5Q== dependencies: tslib "^2.3.0" -"@angular/compiler-cli@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-13.0.0-next.12.tgz#4a7eaeea3d83afdf6083876516ec14bb447e26bb" - integrity sha512-kkUEsoykKWqaexFzGiZyqb55I8o69h74hBYw5a4iTtqy4wx2xQWoStR9bCqXsCteUSsfV5QVq72mtP3I5ublbg== +"@angular/compiler-cli@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-13.0.0-next.15.tgz#4f25b6d3feb1dbb0a6dd0f7d5445f24d20b49709" + integrity sha512-15w0fFrqFfHNbQ7nrzTB4rrObsIpmsbGAlrKoFPdWN2LbAYUEauUhRIPi1Et+4A1eh9beIUHpofwb+VRrUhuLw== dependencies: "@babel/core" "^7.8.6" canonical-path "1.0.0" @@ -114,10 +114,10 @@ tslib "^2.3.0" yargs "^17.2.1" -"@angular/compiler@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-13.0.0-next.12.tgz#49dafd3e97936d99246d80be5f482322c5b75663" - integrity sha512-mOMkhICjonQAOoX2BEqwTdTFPPtLNsH7+92MJwB2KkBJfSuxfGKwfkMVOsXjq63zRplDTWxzxdj0wp2fD2iQIg== +"@angular/compiler@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-13.0.0-next.15.tgz#bd9eaf5edc017112cf0c43de584f4167c6a3008f" + integrity sha512-R2rKkSvONDuSW7D7WsN4nBH1fmZ9YagSiAb4F7cch5408DOMT6OlEgJDWAp69eWXiVDagd8R3e6K8j8StoZ6PQ== dependencies: tslib "^2.3.0" @@ -126,10 +126,10 @@ resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.0.0.tgz#87e0bef4c369b6cadae07e3a4295778fc93799d5" integrity sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ== -"@angular/core@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-13.0.0-next.12.tgz#5efe275d3558f4816b6b53a6a4f27dc6a80c00aa" - integrity sha512-0x/N4qHOG+P2WdRXgS17sUMOyG/e5wKfT3DV5BF3Tc9BNh2ETIcE7n/VKAIwWGW6npd1xktyMGnblSUrte0/VA== +"@angular/core@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-13.0.0-next.15.tgz#0d6083c7154bedf9a825e6270f41b83bacb325b3" + integrity sha512-lBjH+dUWCj+Ki4najMRF4yoXq0p6MF+4hEQEwimlvUo3BFRMRTl9CMv82oSBeSYJkZlov1w5zhaA1PQO6zjyKQ== dependencies: tslib "^2.3.0" @@ -200,49 +200,49 @@ yaml "^1.10.0" yargs "^17.0.0" -"@angular/forms@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-13.0.0-next.12.tgz#031a5952c46010ea6eb02b8670add2b5f96de24d" - integrity sha512-fJpjHJI/IDXrCY/gGbDJ1VaTJ3hwtx9qB7og4yeIldAMTJRvWTK7gJbIWHyyIs1awBZtjUaOIVcqRF+tVhi3Vw== +"@angular/forms@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-13.0.0-next.15.tgz#2959885bfe32b146b9065ae155fd1b52c73e51bf" + integrity sha512-SvO818CJnxxiNSEGtWyJ+kpEtQoWtyIWXWHNkXUmjob6glGQatSDUlrkjx8oHNkqHnYyy7FMQXwRpzk/PWjBKw== dependencies: tslib "^2.3.0" -"@angular/localize@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-13.0.0-next.12.tgz#7ceba63d4d1ae6801e5aa3ec412bc0359418ad55" - integrity sha512-Gi0H/0LAT6n6WrXS/OEyhNGZZOxyQGwU/Pk1bufgd/j8FmjoSGhoM/3HRe9s84RMWh58qr/cCSoGO2s6QkCzZQ== +"@angular/localize@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-13.0.0-next.15.tgz#28cadbddaf09986441d8bda091e23486d6fa6633" + integrity sha512-FABnmk1QQ3oEdIeTF/pXaNQ6sWMo99imTBigIV8o6xrHymAy/qKMFSlbDDYFbYJTcqUFlVwt2CShHNfjXJkv5Q== dependencies: "@babel/core" "7.8.6" glob "7.2.0" yargs "^17.2.1" -"@angular/platform-browser-dynamic@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-13.0.0-next.12.tgz#965841f9d8a3ddc79775842f6ece9bde3c485657" - integrity sha512-x0ZSn3irHOA3JSJjNPl2VguU+Dwuvd4Yb3q0QqNbS1BHJwzVODUaP3W6FbWqD6p0SPWBvvwcBONvbHa1XH6PxA== +"@angular/platform-browser-dynamic@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-13.0.0-next.15.tgz#f65308bb815a777134b5dcc89c2bb3ad09b3e563" + integrity sha512-RanfSIIQBDy4QIK4hlCdlQUPch4BGW5J7uf1sgCUdOIQFkrkteEQ6wak1Bz6DL3ZXS5rz6XDepzI7aPuKkycMQ== dependencies: tslib "^2.3.0" -"@angular/platform-browser@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-13.0.0-next.12.tgz#0b9fa7ac7351b6ae17110ed2be1603775b7819d0" - integrity sha512-rNZVaQNdJ56gWi8U56JkPqRRip0NDqfLcvFJYs8H7bo52z0BC54V6oQkMt3/7lBVXAm7sgwsHxqmpaxI98FHCA== +"@angular/platform-browser@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-13.0.0-next.15.tgz#188c4c10f89f327fa4c759c4761246849dc5c1ea" + integrity sha512-eVReO/qM7VpOW6mT3OB7LvVK0Fyd4yRmab2IOKYbrxXSkw4gzMmCrBbZqmE5nmR0mWEFP+swejrBGcp6A9duVg== dependencies: tslib "^2.3.0" -"@angular/platform-server@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-13.0.0-next.12.tgz#2517a75c6148e495a8a21a66efefd00c8f2d4335" - integrity sha512-SzrmW72sE/Dbm0P4VqLCGkaGzvNz8sZjBCd+ECzY4lbZ9naQsxUWf9qunU3387bOsQ3oCiQTKA732pGQT+OOyA== +"@angular/platform-server@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-13.0.0-next.15.tgz#a734183f48856cb19c6170bf4519912d3c2c1085" + integrity sha512-5hObrIfGGVLKBENTcrhMzb7cAXsljViElvTrD6PVMeWJV15yMOUtYUVBNUF3s+T8An/hxEWFTNay2P+E+mFRAA== dependencies: domino "^2.1.2" tslib "^2.3.0" xhr2 "^0.2.0" -"@angular/router@13.0.0-next.12": - version "13.0.0-next.12" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-13.0.0-next.12.tgz#c8189da8207e54c2b1bdaadb9d8e4a535122ecdb" - integrity sha512-UkOXJvzTHaddX2883C7QMuUzfsHFdXeiohB376PsHM5N/9EPdWddQfqjded0es1YLhK1jSx8VOFYP3wYaCVk5A== +"@angular/router@13.0.0-next.15": + version "13.0.0-next.15" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-13.0.0-next.15.tgz#056f4adbed9ca6ccb98d19660421eadb5f6c22a4" + integrity sha512-sYcSKnVv+/Sh9IivyUYmbPCACFVsoBLv/ZxhaRWR5dcjCunTsO65fhxtP3W75AOTkteyzVAmze3wXh3wM4TbrA== dependencies: tslib "^2.3.0" From 32e4c53afa81f7f5feb6e762bf8a7080720f3479 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 7 Oct 2021 22:19:51 +0200 Subject: [PATCH 21/21] build: update node version used in bazel Updates the Node version used in Bazel so that it does not fail with the minimium node version from Angular FW packages. --- .circleci/config.yml | 4 ++-- .nvmrc | 2 +- WORKSPACE | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f3b85de08cd1..1ee907446c8c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,8 +7,8 @@ # To validate changes, use an online parser, eg. # http://yaml-online-parser.appspot.com/ -var_1: &docker_image circleci/node:16.6.0 -var_2: &docker-firefox-image circleci/node:16.6.0-browsers +var_1: &docker_image circleci/node:16.10.0 +var_2: &docker-firefox-image circleci/node:16.10.0-browsers # **Note**: When updating the beginning of the cache key, also update the cache key to match # the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching. diff --git a/.nvmrc b/.nvmrc index bd015b903604..3027af39c1b9 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16.6.0 +16.10.0 diff --git a/WORKSPACE b/WORKSPACE index 7f08aee0d647..6162fbefa1fb 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -43,7 +43,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version", "node_repos check_bazel_version("4.0.0") node_repositories( - node_version = "16.6.0", + node_version = "16.10.0", package_json = ["//:package.json"], )