diff --git a/.bazelrc b/.bazelrc index 8e2871830605..d0f63e8c11a5 100644 --- a/.bazelrc +++ b/.bazelrc @@ -114,11 +114,11 @@ build:remote --cpu=k8 build:remote --host_cpu=k8 # Toolchain and platform related flags -build:remote --crosstool_top=//dev-infra/bazel/remote-execution/cpp:cc_toolchain_suite -build:remote --extra_toolchains=//dev-infra/bazel/remote-execution/cpp:cc_toolchain -build:remote --extra_execution_platforms=//dev-infra/bazel/remote-execution:platform -build:remote --host_platform=//dev-infra/bazel/remote-execution:platform -build:remote --platforms=//dev-infra/bazel/remote-execution:platform +build:remote --crosstool_top=@npm//@angular/dev-infra-private/bazel/remote-execution/cpp:cc_toolchain_suite +build:remote --extra_toolchains=@npm//@angular/dev-infra-private/bazel/remote-execution/cpp:cc_toolchain +build:remote --extra_execution_platforms=@npm//@angular/dev-infra-private/bazel/remote-execution:platform +build:remote --host_platform=@npm//@angular/dev-infra-private/bazel/remote-execution:platform +build:remote --platforms=@npm//@angular/dev-infra-private/bazel/remote-execution:platform # Remote instance and caching build:remote --remote_instance_name=projects/internal-200822/instances/primary_instance diff --git a/.bazelversion b/.bazelversion index 21e00cfe036a..fcdb2e109f68 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1,3 +1 @@ 4.0.0 -# [NB: this comment has to be after the first line, see https://github.com/bazelbuild/bazelisk/issues/117] -# When updating the Bazel version you also need to update the RBE toolchains version in package.bzl diff --git a/.circleci/config.yml b/.circleci/config.yml index 2997e4006ea7..795dccc415d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,19 +24,19 @@ version: 2.1 # **NOTE 2 **: If you change the cache key prefix, also sync the cache_key_fallback to match. # **NOTE 3 **: Keep the static part of the cache key as prefix to enable correct fallbacks. # See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI. -var_3: &cache_key v4-angular-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }} +var_3: &cache_key v1-angular-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "aio/yarn.lock" }} # We invalidate the cache if the Bazel version changes because otherwise the `bazelisk` cache # folder will contain all previously used versions and ultimately cause the cache restoring to # be slower due to its growing size. -var_4: &cache_key_fallback v4-angular-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }} +var_4: &cache_key_fallback v1-angular-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }} # Windows needs its own cache key because binaries in node_modules are different. -var_3_win: &cache_key_win v4-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }} -var_4_win: &cache_key_win_fallback v4-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }} +var_3_win: &cache_key_win v1-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "aio/yarn.lock" }} +var_4_win: &cache_key_win_fallback v1-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }} # Cache key for the `components-repo-unit-tests` job. **Note** when updating the SHA in the # cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable. -var_5: &components_repo_unit_tests_cache_key v1-angular-components-{{ checksum "month.txt" }}-7cc42f5d835b7971e9ff73e220b801cf7834d515 +var_5: &components_repo_unit_tests_cache_key v1-angular-components-{{ checksum "month.txt" }}-d090617912da8e70aa336aa5b4d804b1b535402e var_6: &components_repo_unit_tests_cache_key_fallback v1-angular-components-{{ checksum "month.txt" }} # Workspace initially persisted by the `setup` job, and then enhanced by `build-npm-packages` and @@ -213,6 +213,10 @@ commands: keys: - *cache_key_win - *cache_key_win_fallback + # Install @bazel/bazelisk globally and use that for the first run. + # Workaround for https://github.com/bazelbuild/rules_nodejs/issues/894 + # NB: the issue was for @bazel/bazel but the same problem applies to @bazel/bazelisk + - run: yarn global add @bazel/bazelisk@$env:BAZELISK_VERSION # On Windows `~/` is not resolved when using as a CLI value. `../` results in the same path. - run: yarn install --frozen-lockfile --non-interactive --cache-folder ../.cache/yarn @@ -291,6 +295,7 @@ jobs: - run: yarn -s ng-dev pullapprove verify - run: yarn -s ng-dev ngbot verify - run: yarn -s ng-dev commit-message validate-range $CI_GIT_BASE_REVISION $CI_GIT_REVISION + - run: yarn -s check-tooling-setup test: executor: @@ -676,11 +681,6 @@ jobs: name: Starting Saucelabs tunnel service command: ./tools/saucelabs/sauce-service.sh run background: true - # add module umd tsc compile option so the test can work - # properly in the legacy browsers - - run: yarn tsc -p packages --module UMD - - run: yarn tsc -p modules --module UMD - - run: yarn bazel build //packages/zone.js:npm_package # Build test fixtures for a test that rely on Bazel-generated fixtures. Note that disabling # specific tests which are reliant on such generated fixtures is not an option as SystemJS # in the Saucelabs legacy job always fetches referenced files, even if the imports would be @@ -689,10 +689,26 @@ jobs: - run: name: Preparing Bazel-generated fixtures required in legacy tests command: | - yarn bazel build //packages/core/test:downleveled_es5_fixture + yarn bazel build \ + //packages/core/test:downleveled_es5_fixture \ + //packages/common/locales + # Needed for the ES5 downlevel reflector test in `packages/core/test/reflection`. + mkdir -p dist/all/@angular/core/test/reflection/ cp dist/bin/packages/core/test/reflection/es5_downleveled_inheritance_fixture.js \ dist/all/@angular/core/test/reflection/es5_downleveled_inheritance_fixture.js + # Locale files are needed for i18n tests running within Saucelabs. These are added + # directly as sources so that the TypeScript compilation of `/packages/tsconfig.json` + # can succeed. Note that the base locale and currencies files are checked-in, so + # we do not need to re-generate those through Bazel. + mkdir -p packages/common/locales/extra + cp dist/bin/packages/common/locales/*.ts packages/common/locales + cp dist/bin/packages/common/locales/extra/*.ts packages/common/locales/extra + # add module umd tsc compile option so the test can work + # properly in the legacy browsers + - run: yarn tsc -p packages/tsconfig-legacy-saucelabs.json --module UMD + - run: yarn tsc -p modules --module UMD + - run: yarn bazel build //packages/zone.js:npm_package - run: # Waiting on ready ensures that we don't run tests too early without Saucelabs not being ready. name: Waiting for Saucelabs tunnel to connect @@ -741,10 +757,6 @@ jobs: # variable. It needs to be hardcoded here, because env variables interpolation is # not supported. - '/tmp/angular-components-repo' - - run: - # TODO(devversion): remove once https://github.com/angular/components/pull/23056 is available. - name: Replace RBE container instance name - command: sed -i "s#default_instance#primary_instance#g" ${COMPONENTS_REPO_TMP_DIR}/.bazelrc - run: # Updates the `angular/components` `package.json` file to refer to the release output # inside the `packages-dist` directory. @@ -791,11 +803,11 @@ jobs: - setup_win - run: name: Build all windows CI targets - command: yarn bazel build --build_tag_filters=-ivy-only //packages/compiler-cli/... //tools/ts-api-guardian/... + command: bazel build --build_tag_filters=-ivy-only //packages/compiler-cli/... no_output_timeout: 15m - run: name: Test all windows CI targets - command: yarn bazel test --test_tag_filters="-ivy-only,-browser:chromium-local" //packages/compiler-cli/... //tools/ts-api-guardian/... + command: bazel test --test_tag_filters="-ivy-only,-browser:chromium-local" //packages/compiler-cli/... no_output_timeout: 15m test_ivy_aot_win: @@ -804,11 +816,11 @@ jobs: - setup_win - run: name: Build all windows CI targets - command: yarn bazel build --config=ivy --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot //packages/compiler-cli/... //tools/ts-api-guardian/... + command: bazel build --config=ivy --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot //packages/compiler-cli/... no_output_timeout: 15m - run: name: Test all windows CI targets - command: yarn bazel test --config=ivy --test_tag_filters="-no-ivy-aot,-fixme-ivy-aot,-browser:chromium-local" //packages/compiler-cli/... //tools/ts-api-guardian/... //packages/localize/... + command: bazel test --config=ivy --test_tag_filters="-no-ivy-aot,-fixme-ivy-aot,-browser:chromium-local" //packages/compiler-cli/... //packages/localize/... no_output_timeout: 15m # Save dependencies to use on subsequent runs. - save_cache: diff --git a/.circleci/env.sh b/.circleci/env.sh index 6b5cb208e110..3ddc7ea8099c 100755 --- a/.circleci/env.sh +++ b/.circleci/env.sh @@ -74,7 +74,7 @@ setPublicVar COMPONENTS_REPO_TMP_DIR "/tmp/angular-components-repo" setPublicVar COMPONENTS_REPO_URL "https://github.com/angular/components.git" setPublicVar COMPONENTS_REPO_BRANCH "master" # **NOTE**: When updating the commit SHA, also update the cache key in the CircleCI `config.yml`. -setPublicVar COMPONENTS_REPO_COMMIT "7cc42f5d835b7971e9ff73e220b801cf7834d515" +setPublicVar COMPONENTS_REPO_COMMIT "d090617912da8e70aa336aa5b4d804b1b535402e" #################################################################################################### diff --git a/.gitattributes b/.gitattributes index b45635737ca2..0acf0cd70da0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,8 +5,5 @@ *.js eol=lf *.ts eol=lf -# API guardian patch must always use LF for tests to work -*.patch eol=lf - # Must keep Windows line ending to be parsed correctly scripts/windows/packages.txt eol=crlf diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md deleted file mode 100644 index f918378db6ce..000000000000 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -name: "Bug Report" -about: Report a bug in the Angular Framework ---- - - - -# Bug Report - -### Affected Package - - The issue is caused by package @angular/.... - - -### Is this a regression? - - - Yes, the previous version in which this bug was not present was: .... - - -### Description - A clear and concise description of the problem... - - -## Minimal Reproduction - - https://stackblitz.com/... - - - -## Exception or Error -

-
-
-
- - -## Your Environment - -**Angular Version:** -

-
-
-
- -**Anything else relevant?** - - - diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yaml b/.github/ISSUE_TEMPLATE/1-bug-report.yaml new file mode 100644 index 000000000000..a20d7ed0c6db --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug-report.yaml @@ -0,0 +1,85 @@ +name: Bug Report +description: Report a bug in the Angular Framework + +body: + - type: dropdown + id: affected-packages + attributes: + label: Which @angular/* package(s) are the source of the bug? + options: + - animations + - bazel + - common + - compiler-cli + - compiler + - core + - elements + - forms + - language-service + - localize + - platform-browser-dynamic + - platform-browser + - platform-server + - router + - service-worker + - upgrade + - Don't known / other + multiple: true + validations: + required: true + + - type: dropdown + id: is-regression + attributes: + label: Is this a regression? + options: + - 'Yes' + - 'No' + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + + - type: input + id: reproduction + attributes: + label: Please provide a link to a minimal reproduction of the bug + + - type: textarea + id: exception-or-error + attributes: + label: Please provide the exception or error you saw + render: true + + - type: textarea + id: environment + attributes: + label: Please provide the environment you discovered this bug in + render: true + placeholder: | + Angular CLI: 12.0.5 + Node: 14.17.0 + Package Manager: yarn 1.22.10 + OS: linux x64 + + Angular: 12.0.5 + ... animations, cli, common, compiler, compiler-cli, core, forms + ... platform-browser, platform-browser-dynamic, router + + Package Version + --------------------------------------------------------- + @angular-devkit/architect 0.1200.5 + @angular-devkit/build-angular 12.0.5 + @angular-devkit/core 12.0.5 + rxjs 6.6.7 + typescript 4.2.4 + + - type: textarea + id: other + attributes: + label: Anything else? diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md deleted file mode 100644 index c88cc8186b3c..000000000000 --- a/.github/ISSUE_TEMPLATE/2-feature-request.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: "Feature Request" -about: Suggest a feature for Angular Framework ---- - - - -# Feature Request - -### Relevant Package - - This feature request is for @angular/.... - - -### Description - A clear and concise description of the problem or missing capability... - - -### Describe the solution you'd like - If you have a solution in mind, please describe it. - - -### Describe alternatives you've considered - Have you considered any alternative solutions or workarounds? diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.yaml b/.github/ISSUE_TEMPLATE/2-feature-request.yaml new file mode 100644 index 000000000000..28b02ade3193 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature-request.yaml @@ -0,0 +1,47 @@ +name: 'Feature Request' +description: Suggest a feature for Angular Framework + +body: + - type: dropdown + id: affected-packages + attributes: + label: Which @angular/* package(s) are relevant/releated to the feature request? + options: + - animations + - bazel + - common + - compiler-cli + - compiler + - core + - elements + - forms + - language-service + - localize + - platform-browser-dynamic + - platform-browser + - platform-server + - router + - service-worker + - upgrade + multiple: true + + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + + - type: textarea + id: proposed-solution + attributes: + label: Proposed solution + validations: + required: true + + - type: textarea + id: alternatives-considered + attributes: + label: Alternatives considered + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md deleted file mode 100644 index caa23d5fbc5f..000000000000 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -name: "Docs or angular.io Bug Report" -about: Report an issue in Angular's documentation or angular.io application ---- - - -# Docs or angular.io Bug Report - -### Description - - A clear and concise description of the problem... - - -## Minimal Reproduction - -### What's the affected URL?** - https://angular.io/... - -### Reproduction Steps** - - -### Expected vs Actual Behavior** - - -## Screenshot - - - -## Exception or Error -

-
-
-
- -## Your Environment - -### Browser info - - -### Anything else relevant? - diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.yaml b/.github/ISSUE_TEMPLATE/3-docs-bug.yaml new file mode 100644 index 000000000000..ec3f8337e81c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.yaml @@ -0,0 +1,42 @@ +name: 'Docs or angular.io Bug Report' +description: Report an issue in Angular's documentation or angular.io application + +body: + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + + - type: input + id: affected-url + attributes: + label: What is the affected URL? + + - type: textarea + id: reproduction-steps + attributes: + label: Please provide the steps to reproduce the issue + + - type: textarea + id: expected-vs-actual-behavior + attributes: + label: Please provide the expected behavior vs the actual behavior you encountered + + - type: textarea + id: screenshot + attributes: + label: Please provide a screenshot if possible + + - type: textarea + id: exception-or-error + attributes: + label: Please provide the exception or error you saw + render: true + + - type: textarea + id: browser-info + attributes: + label: Is this a browser-specific issue? If so, please specify the device, browser, and version. + render: true diff --git a/.github/angular-robot.yml b/.github/angular-robot.yml index 04c72688c1b8..39c903cbe325 100644 --- a/.github/angular-robot.yml +++ b/.github/angular-robot.yml @@ -38,7 +38,6 @@ merge: - 'modules/benchmarks/**' - 'modules/system.d.ts' - 'packages/**' - - 'dev-infra/benchmark/driver-utilities/**' # list of patterns to ignore for the files changed by the PR exclude: - 'packages/*' diff --git a/.github/workflows/dev-infra.yml b/.github/workflows/dev-infra.yml new file mode 100644 index 000000000000..51fe79480f75 --- /dev/null +++ b/.github/workflows/dev-infra.yml @@ -0,0 +1,14 @@ +name: DevInfra + +on: + pull_request_target: + types: [opened, synchronize, reopened] + +jobs: + breaking-changes-label: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: angular/dev-infra/github-actions/breaking-changes-label@861dc90572784e714aeaa9dfb20ceebeb57cdb07 + with: + angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/feature-requests.yml b/.github/workflows/feature-requests.yml index 14be22ab2ff3..c3d59c784664 100644 --- a/.github/workflows/feature-requests.yml +++ b/.github/workflows/feature-requests.yml @@ -10,6 +10,6 @@ jobs: if: github.repository == 'angular/angular' runs-on: ubuntu-latest steps: - - uses: angular/dev-infra/github-actions/feature-request@8467fd69f068914f8f25e10b1a80c183ee886de4 + - uses: angular/dev-infra/github-actions/feature-request@f83903fe1ac848407ef81465f66588e5accb6537 with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.gitignore b/.gitignore index 7a597d9a6c87..140aed39fc01 100644 --- a/.gitignore +++ b/.gitignore @@ -50,8 +50,5 @@ baseline.json # Ignore .history for the xyz.local-history VSCode extension .history -# CLDR data -tools/gulp-tasks/cldr/cldr-data/ - # Husky .husky/_ diff --git a/.gitmessage b/.gitmessage index 536045e1d90f..c607c42e74a9 100644 --- a/.gitmessage +++ b/.gitmessage @@ -106,8 +106,7 @@ Fixes # # │ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core| # │ elements|forms|http|language-service|localize|platform-browser| # │ platform-browser-dynamic|platform-server|router|service-worker| -# │ upgrade|zone.js|packaging|changelog|dev-infra|docs-infra|migrations| -# │ ngcc|ve +# │ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve # │ https://github.com/angular/angular/blob/master/CONTRIBUTING.md#scope # │ # └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|style|test diff --git a/.husky/.gitignore b/.husky/.gitignore deleted file mode 100644 index 31354ec13899..000000000000 --- a/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/.ng-dev/caretaker.ts b/.ng-dev/caretaker.ts index 6d6aaa9684e2..1b2a720e7a38 100644 --- a/.ng-dev/caretaker.ts +++ b/.ng-dev/caretaker.ts @@ -1,4 +1,4 @@ -import {CaretakerConfig} from '../dev-infra/caretaker/config'; +import {CaretakerConfig} from '@angular/dev-infra-private/ng-dev/caretaker/config'; /** The configuration for `ng-dev caretaker` commands. */ export const caretaker: CaretakerConfig = { @@ -15,5 +15,6 @@ export const caretaker: CaretakerConfig = { name: 'Initial Triage Queue', query: `is:open no:milestone`, } - ] + ], + caretakerGroup: 'angular-caretaker', }; diff --git a/.ng-dev/commit-message.ts b/.ng-dev/commit-message.ts index 4a74d244d783..13da4dc5ae20 100644 --- a/.ng-dev/commit-message.ts +++ b/.ng-dev/commit-message.ts @@ -1,4 +1,4 @@ -import {CommitMessageConfig} from '../dev-infra/commit-message/config'; +import {CommitMessageConfig} from '@angular/dev-infra-private/ng-dev/commit-message/config'; /** * The configuration for `ng-dev commit-message` commands. diff --git a/.ng-dev/format.ts b/.ng-dev/format.ts index c56366c57f8f..a729d4201f64 100644 --- a/.ng-dev/format.ts +++ b/.ng-dev/format.ts @@ -1,4 +1,4 @@ -import {FormatConfig} from '../dev-infra/format/config'; +import {FormatConfig} from '@angular/dev-infra-private/ng-dev/format/config'; /** * Configuration for the `ng-dev format` command. @@ -26,6 +26,11 @@ export const format: FormatConfig = { '!dev-infra/build-worker.js', // Do not format compliance test-cases since they must match generated code '!packages/compiler-cli/test/compliance/test_cases/**/*.js', + // Do not format the locale files which are checked-in for Google3, but generated using + // the `generate-locales-tool` from `packages/common/locales`. + '!packages/core/src/i18n/locale_en.ts', + '!packages/common/locales/closure-locale.ts', + '!packages/common/src/i18n/currencies.ts', ] }, 'buildifier': true diff --git a/.ng-dev/github.ts b/.ng-dev/github.ts index c9b009bea572..6af18a58938b 100644 --- a/.ng-dev/github.ts +++ b/.ng-dev/github.ts @@ -1,11 +1,11 @@ -import {GithubConfig} from '../dev-infra/utils/config'; +import {GithubConfig} from '@angular/dev-infra-private/ng-dev/utils/config'; /** * Github configuration for the `ng-dev` command. This repository is used as * remote for the merge script and other utilities like `ng-dev pr rebase`. */ - export const github: GithubConfig = { owner: 'angular', - name: 'angular' + name: 'angular', + mainBranchName: 'master', }; diff --git a/.ng-dev/merge.ts b/.ng-dev/merge.ts index 9dcd09968450..5d62f3ad82c6 100644 --- a/.ng-dev/merge.ts +++ b/.ng-dev/merge.ts @@ -1,30 +1,24 @@ -import {DevInfraMergeConfig} from '../dev-infra/pr/merge/config'; -import {getDefaultTargetLabelConfiguration} from '../dev-infra/pr/merge/defaults'; -import {github} from './github'; -import {release} from './release'; +import {MergeConfig} from '@angular/dev-infra-private/ng-dev/pr/merge/config'; /** * Configuration for the merge tool in `ng-dev`. This sets up the labels which * are respected by the merge script (e.g. the target labels). */ -export const merge: DevInfraMergeConfig['merge'] = async api => { - return { - githubApiMerge: false, - claSignedLabel: 'cla: yes', - mergeReadyLabel: /^action: merge(-assistance)?/, - caretakerNoteLabel: /^(action: merge-assistance)|(PullApprove: disable)/, - commitMessageFixupLabel: 'commit message fixup', - breakingChangeLabel: 'flag: breaking change', - // We can pick any of the NPM packages as we are in a monorepo where all packages are - // published together with the same version and branching. - labels: await getDefaultTargetLabelConfiguration(api, github, release), - requiredBaseCommits: { - // PRs that target either `master` or the patch branch, need to be rebased - // on top of the latest commit message validation fix. - // These SHAs are the commits that update the required license text in the header. - 'master': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a', - '10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24', - }, - targetLabelExemptScopes: ['dev-infra', 'docs-infra'] - }; +export const merge: MergeConfig = { + githubApiMerge: false, + claSignedLabel: 'cla: yes', + mergeReadyLabel: /^action: merge(-assistance)?/, + caretakerNoteLabel: /^(action: merge-assistance)|(PullApprove: disable)/, + commitMessageFixupLabel: 'commit message fixup', + requiredBaseCommits: { + // PRs that target either `master` or the patch branch, need to be rebased + // on top of the latest commit message validation fix. + // These SHAs are the commits that update the required license text in the header. + 'master': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a', + '10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24', + }, + // `dev-infra` and `docs-infra` are not affecting the public NPM packages. Similarly, + // the `bazel` package is not considered part of the public API so that features + // can land in patch branches. + targetLabelExemptScopes: ['dev-infra', 'docs-infra', 'bazel'] }; diff --git a/.ng-dev/release.ts b/.ng-dev/release.ts index dbb836175b65..e6442a92403e 100644 --- a/.ng-dev/release.ts +++ b/.ng-dev/release.ts @@ -1,5 +1,5 @@ +import {ReleaseConfig} from '@angular/dev-infra-private/ng-dev/release/config'; import {join} from 'path'; -import {ReleaseConfig} from '../dev-infra/release/config'; /** Configuration for the `ng-dev release` command. */ export const release: ReleaseConfig = { @@ -22,7 +22,7 @@ export const release: ReleaseConfig = { '@angular/service-worker', '@angular/upgrade', ], - buildPackages: async (stampForRelease: boolean) => { + buildPackages: async (stampForRelease: boolean|undefined) => { // The buildTargetPackages function is loaded at runtime as the loading the script causes an // invocation of bazel. const {buildTargetPackages} = require(join(__dirname, '../scripts/build/package-builder')); diff --git a/.ng-dev/tsconfig.json b/.ng-dev/tsconfig.json new file mode 100644 index 000000000000..9e9c1b746523 --- /dev/null +++ b/.ng-dev/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "strict": true, + "target": "es2015", + "module": "commonjs", + "noEmit": true, + "skipLibCheck": true, + "types": [] + }, +} diff --git a/.pullapprove.yml b/.pullapprove.yml index 66e19b8ddc5e..25cfd6b1db04 100644 --- a/.pullapprove.yml +++ b/.pullapprove.yml @@ -79,7 +79,6 @@ meta: # one are those that appear above it. no-groups-above-this-pending: &no-groups-above-this-pending len(groups.active.pending.exclude("required-minimum-review").exclude("global-approvers").exclude("global-docs-approvers")) == 0 no-groups-above-this-rejected: &no-groups-above-this-rejected len(groups.active.rejected.exclude("required-minimum-review").exclude("global-approvers").exclude("global-docs-approvers")) == 0 - no-groups-above-this-active: &no-groups-above-this-active len(groups.active.exclude("required-minimum-review").exclude("global-approvers").exclude("global-docs-approvers")) == 0 can-be-global-approved: &can-be-global-approved '"global-approvers" not in groups.approved' can-be-global-docs-approved: &can-be-global-docs-approved '"global-docs-approvers" not in groups.approved' @@ -97,22 +96,23 @@ meta: # https://developer.github.com/v3/previews/#draft-pull-requests github_api_version: 'shadow-cat-preview' -pullapprove_conditions: +# https://docs.pullapprove.com/config/overrides/ +# Note that overrides are processed in order. +overrides: # For PRs which are still being worked on, either still in draft mode or indicated through WIP in # title or label, PullApprove stays in a pending state until its ready for review. - - condition: "'WIP' not in title" - unmet_status: pending + - if: "draft or 'WIP' in title or 'PR state: WIP' in labels" + status: pending explanation: 'Waiting to send reviews as PR is WIP' - - condition: "'PR state: WIP' not in labels" - unmet_status: pending - explanation: 'Waiting to send reviews as PR is WIP' - - condition: 'not draft' - unmet_status: pending - explanation: 'Waiting to send reviews as PR is in draft' # Disable PullApprove on specific PRs by adding the `PullApprove: disable` label - - condition: "'PullApprove: disable' not in labels" - unmet_status: success + - if: "'PullApprove: disable' in labels" + status: success explanation: "PullApprove skipped because of 'PullApprove: disable' label" + # If no file matching based groups are active, report this pull request as failing. Most likely, + # the PR author would need to update the PullApprove config, or create new group. + - if: len(groups.active.exclude("required-minimum-review").exclude("global-*")) == 0 and len(groups.approved.include("global-*")) == 0 + status: failure + explanation: 'At least one group must match this PR. Please update an existing review group, or create a new group.' groups: # ========================================================= @@ -190,7 +190,6 @@ groups: - JiaLiPassion # Jia Li - JoostK # Joost Koehoorn - josephperrott # Joey Perrott - - kyliau # Keen Yee Liau - manughub # Manu Murthy - mgechev # Minko Gechev - mmalerba # Miles Malerba @@ -246,8 +245,9 @@ groups: ]) reviewers: users: - - alxhub - AndrewKushnir + - alxhub + - atscott - JoostK # ========================================================= @@ -569,7 +569,6 @@ groups: users: - alan-agius4 - alxhub - - kyliau # ========================================================= # Framework: Router @@ -762,7 +761,6 @@ groups: users: - IgorMinar - josephperrott - - kyliau # ========================================================= # Language Service @@ -780,7 +778,6 @@ groups: ]) reviewers: users: - - kyliau - atscott - zarend @@ -1020,7 +1017,7 @@ groups: users: - alan-agius4 - clydin - - kyliau + - dgp1130 - IgorMinar reviews: request: -1 # request reviews from everyone @@ -1154,7 +1151,6 @@ groups: '.ng-dev/**', '.vscode/**', '.yarn/**', - 'dev-infra/**', 'docs/*.md', 'docs/images/**', 'goldens/*', @@ -1177,7 +1173,6 @@ groups: 'tools/source-map-test/**', 'tools/symbol-extractor/**', 'tools/testing/**', - 'tools/ts-api-guardian/**', 'tools/tslint/**', 'tools/utils/**', 'tools/yarn/**', @@ -1305,49 +1300,3 @@ groups: - atscott - jelbourn - josephperrott - - # ==================================================== - # Catch all for if no groups match the code change - # ==================================================== - fallback: - <<: *defaults - # A group is considered to be `active` for a PR if at least one of group's - # conditions matches the PR. - # - # The PullApprove CI check should fail if a PR has no `active` groups, as - # this indicates the PR is modifying a file that has no owner. - # - # This is enforced through the pullapprove verification check done - # as part of the CircleCI lint job. Failures in this lint job should be - # fixed as part of the PR. This can be done by updating the - # `.pullapprove.yml` file cover the unmatched path. - # The pullapprove verification script is part of the ng-dev tool and can be - # run locally with the command: `yarn -s ng-dev pullapprove verify` - # - # For cases in which the verification check fails to ensure coverage, this - # group will be active. The expectation is that this should be remedied - # before merging the PR as described above. In an emergency situation - # `global-approvers` can still approve PRs that match this `fallback` rule, - # but that should be an exception and not an expectation. - conditions: - - *no-groups-above-this-active - # When any of the `global-*` groups is approved, they cause other groups to deactivate. - # In those cases, the condition above would evaluate to `true` while in reality, only a global - # approval has been provided. To ensure we don't activate the fallback group in such cases, - # ensure that no explicit global approval has been provided. - - *can-be-global-approved - - *can-be-global-docs-approved - # PullApprove uses a combination of users defined in the pullapprove configuration and the - # number of users who have performed reviews on Github in the recent past if the configuration - # does not specify it. Because, as an open source project, anyone on Github can perform a - # review we need to ensure that all groups, including the fallback group, have at least one user - # or group defined as reviewers. - reviewers: - users: - - josephperrott - reviews: - request: 0 - required: 1 - # Reviewed-for is required on fallback as it should not ever actually be reviewed, requiring - # Reviewed-for helps insure an accidental approval doesn't occur on the fallback group. - reviewed_for: required diff --git a/BUILD.bazel b/BUILD.bazel index a02b4906e298..596b2934d61e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -24,7 +24,7 @@ filegroup( "//packages/zone.js/bundles:zone-testing.umd.js", "//packages/zone.js/bundles:task-tracking.umd.js", "//:test-events.js", - "//:third_party/shims_for_IE.js", + "//:third_party/shims_for_internal_tests.js", # Including systemjs because it defines `__eval`, which produces correct stack traces. "@npm//:node_modules/systemjs/dist/system.src.js", "@npm//:node_modules/reflect-metadata/Reflect.js", @@ -36,18 +36,18 @@ filegroup( srcs = [ # We also declare the unminified AngularJS files since these can be used for # local debugging (e.g. see: packages/upgrade/test/common/test_helpers.ts) - "@npm//:node_modules/angular/angular.js", - "@npm//:node_modules/angular/angular.min.js", "@npm//:node_modules/angular-1.5/angular.js", "@npm//:node_modules/angular-1.5/angular.min.js", "@npm//:node_modules/angular-1.6/angular.js", "@npm//:node_modules/angular-1.6/angular.min.js", "@npm//:node_modules/angular-1.7/angular.js", "@npm//:node_modules/angular-1.7/angular.min.js", - "@npm//:node_modules/angular-mocks/angular-mocks.js", "@npm//:node_modules/angular-mocks-1.5/angular-mocks.js", "@npm//:node_modules/angular-mocks-1.6/angular-mocks.js", "@npm//:node_modules/angular-mocks-1.7/angular-mocks.js", + "@npm//:node_modules/angular-mocks-1.8/angular-mocks.js", + "@npm//:node_modules/angular-1.8/angular.js", + "@npm//:node_modules/angular-1.8/angular.min.js", ], ) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdd16aa40879..7ded528a7184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,370 @@ + +# 13.0.0-next.4 (2021-09-01) +### compiler-cli +| Commit | Description | +| -- | -- | +| [4341a5f4cb](https://github.com/angular/angular/commit/4341a5f4cb7969b5c06d46a6afbd95cbccab8d95) | fix: Emit type annotations for synthesized decorator fields ([#43021](https://github.com/angular/angular/pull/43021)) | +### router +| Commit | Description | +| -- | -- | +| [faf9f5a3bc](https://github.com/angular/angular/commit/faf9f5a3bc444bb6cbf75916c8022f60e0742bca) | feat: new output that would notify when link is activated ([#43280](https://github.com/angular/angular/pull/43280)) | +## Special Thanks: +Alan Agius, Andrew Scott, Daniel Trevino, George Kalpakas, Jessica Janiuk, Joey Perrott, JoostK, Kristiyan Kostadinov, anandtiwary, nickreid and segunb + + + +# 12.2.4 (2021-09-01) +### compiler-cli +| Commit | Description | +| -- | -- | +| [8233906be2](https://github.com/angular/angular/commit/8233906be25e19da6d8115094616d3e4b5e36fea) | fix: Emit type annotations for synthesized decorator fields ([#43021](https://github.com/angular/angular/pull/43021)) | +## Special Thanks: +Andrew Scott, Daniel Trevino, George Kalpakas, Joey Perrott, Kristiyan Kostadinov, nickreid and segunb + + + +# 13.0.0-next.3 (2021-08-25) +## Breaking Changes +### router +- Previously `null` and `undefined` inputs for `routerLink` were +equivalent to empty string and there was no way to disable the link's +navigation. +In addition, the `href` is changed from a property `HostBinding()` to an +attribute binding (`HostBinding('attr.href')`). The effect of this +change is that `DebugElement.properties['href']` will now return the +`href` value returned by the native element which will be the full URL +rather than the internal value of the `RouterLink` `href` property. +### compiler-cli +| Commit | Description | +| -- | -- | +| [bed121c34f](https://github.com/angular/angular/commit/bed121c34f9c4ec4741a4690693423bb7ed66982) | feat: inline resources when generating class metadata calls ([#43178](https://github.com/angular/angular/pull/43178)) | +### core +| Commit | Description | +| -- | -- | +| [e57691c9c5](https://github.com/angular/angular/commit/e57691c9c5f8456f7dc75180aa1e80330da560fe) | feat: Add migration to update empty routerLinks in templates ([#43176](https://github.com/angular/angular/pull/43176)) | +### language-service +| Commit | Description | +| -- | -- | +| [b10d90bef6](https://github.com/angular/angular/commit/b10d90bef6a3d1b721d087268aa7377985dd4c4f) | feat: Add method for retrieving the component template at the cursor location ([#43208](https://github.com/angular/angular/pull/43208)) | +### router +| Commit | Description | +| -- | -- | +| [ccb09b4558](https://github.com/angular/angular/commit/ccb09b4558a3864fb5b2fe2214d08f1c1fe2758f) | fix: null/undefined routerLink should disable navigation ([#43087](https://github.com/angular/angular/pull/43087)) | +### service-worker +| Commit | Description | +| -- | -- | +| [6e924313c3](https://github.com/angular/angular/commit/6e924313c3bd93236227e92a5054fc8cc9b37644) | fix: NPE if onActionClick is undefined ([#43210](https://github.com/angular/angular/pull/43210)) | +## Special Thanks: +Alex Rickabaugh, Andrew Scott, Daniel Trevino, George Kalpakas, Paul Gschwendtner, dario-piotrowicz and shlasouski + + + +# 12.2.3 (2021-08-25) +### service-worker +| Commit | Description | +| -- | -- | +| [fc7f92159d](https://github.com/angular/angular/commit/fc7f92159df16e894d9909cfc8969ed4b7d9924a) | fix: NPE if onActionClick is undefined ([#43210](https://github.com/angular/angular/pull/43210)) | +## Special Thanks: +Daniel Trevino, Erik Slack, George Kalpakas, dario-piotrowicz and shlasouski + + + +# 13.0.0-next.2 (2021-08-18) +### animations +| Commit | Description | +| -- | -- | +| [3cb1f18f97](https://github.com/angular/angular/commit/3cb1f18f976190189440e281581e712aaf0250e4) | fix: add pure annotations to static property initializers ([#43064](https://github.com/angular/angular/pull/43064)) | +### core +| Commit | Description | +| -- | -- | +| [27a89a9298](https://github.com/angular/angular/commit/27a89a929818dc2d249c2833c4a75582a7dc1349) | fix: add pure annotations to static property initializers ([#43064](https://github.com/angular/angular/pull/43064)) | +### language-service +| Commit | Description | +| -- | -- | +| [d5f9890c92](https://github.com/angular/angular/commit/d5f9890c9205b4a121275ace84b26776aedd0478) | feat: auto-apply optional chaining on nullable symbol ([#42995](https://github.com/angular/angular/pull/42995)) | +### platform-browser +| Commit | Description | +| -- | -- | +| [7e71370fe6](https://github.com/angular/angular/commit/7e71370fe6a9e802f68f7d3dbbfd0194ecde2d4f) | perf: avoid intermediate arrays in server transition ([#43145](https://github.com/angular/angular/pull/43145)) | +### router +| Commit | Description | +| -- | -- | +| [286b2807de](https://github.com/angular/angular/commit/286b2807de61dcd6e24ced5c142fbc6eda9dfbec) | fix: eagerly update internal state on browser-triggered navigations ([#43102](https://github.com/angular/angular/pull/43102)) | +## Special Thanks: +Alan Agius, Andrew Scott, Aristeidis Bampakos, Charles Lyding, Dylan Hunn, Edoardo Dusi, Erik Slack, George Kalpakas, Joe Martin (Crowdstaffing), Joey Perrott, Kirk Larkin, Kristiyan Kostadinov, Paul Gschwendtner, Pete Bacon Darwin, TIffany Davis, Theoklitos Bampouris, ali, dario-piotrowicz, ivanwonder and pichuser + + + +# 12.2.2 (2021-08-18) +### animations +| Commit | Description | +| -- | -- | +| [bb6555979d](https://github.com/angular/angular/commit/bb6555979dd02e706f7e98022b9c37a4f54db1ba) | fix: add pure annotations to static property initializers ([#43064](https://github.com/angular/angular/pull/43064)) | +### core +| Commit | Description | +| -- | -- | +| [738b23347e](https://github.com/angular/angular/commit/738b23347e5eeadfa0321d1429537837dba5e4c1) | fix: add pure annotations to static property initializers ([#43064](https://github.com/angular/angular/pull/43064)) | +### platform-browser +| Commit | Description | +| -- | -- | +| [535837e617](https://github.com/angular/angular/commit/535837e617a0434f8e7bd9071cc4d8c27fd9f373) | perf: avoid intermediate arrays in server transition ([#43145](https://github.com/angular/angular/pull/43145)) | +### router +| Commit | Description | +| -- | -- | +| [6449590ec8](https://github.com/angular/angular/commit/6449590ec81eff0873af911fb65679b5a77db27b) | fix: eagerly update internal state on browser-triggered navigations ([#43102](https://github.com/angular/angular/pull/43102)) | +## Special Thanks: +Andrew Scott, Aristeidis Bampakos, Charles Lyding, Edoardo Dusi, George Kalpakas, Joe Martin (Crowdstaffing), Joey Perrott, Kirk Larkin, Kristiyan Kostadinov, Pete Bacon Darwin, TIffany Davis, Theoklitos Bampouris, ali, dario-piotrowicz and pichuser + + + +# 13.0.0-next.1 (2021-08-11) +### forms +| Commit | Description | +| -- | -- | +| [e49fc96ed3](https://github.com/angular/angular/commit/e49fc96ed33c26434a14b80487dd912d8c76cace) | feat(forms): Make Form Statuses use stricter types. ([#42952](https://github.com/angular/angular/pull/42952)) | +### router +| Commit | Description | +| -- | -- | +| [bbad42310b](https://github.com/angular/angular/commit/bbad42310b6ba4df803917fa9b32e1e702eca531) | fix(router): ensure check for match options is compatible with property renaming ([#43086](https://github.com/angular/angular/pull/43086)) | +| [784671597e](https://github.com/angular/angular/commit/784671597e0b28d9696bdc325b426a6c7be0cd8e) | fix(router): Allow question marks in query param values ([#31187](https://github.com/angular/angular/pull/31187)) | +## Breaking Changes +### forms +A new type called `FormControlStatus` has been introduced, which is a union of all possible status strings for form controls. `AbstractControl.status` has been narrowed from `string` to `FormControlStatus`, and `statusChanges` has been narrowed from `Observable` to `Observable`. Most applications should consume the new types seamlessly. Any breakage caused by this change is likely due to one of the following two problems: (1) the app is comparing `AbstractControl.status` against a string which is not a valid status; or, (2) the app is using `statusChanges` events as if they were something other than strings. +### router +The default url serializer would previously drop +everything after and including a question mark in query parameters. That +is, for a navigation to `/path?q=hello?&other=123`, the query +params would be parsed to just `{q: 'hello'}`. This is +incorrect because the URI spec allows for question mark characers in +query data. This change will now correctly parse the params for the +above example to be `{v: 'hello?', other: '123'}`. +## Special Thanks: +Amadou Sall, Andrew Kushnir, Andrew Scott, Daniel Trevino, Dylan Hunn, Erik Slack, Fabien BERNARD, George Kalpakas, Jeroen van Warmerdam, Joey Perrott, Jon Rimmer, Tim Gates and Vugar_Abdullayev + + + +# 12.2.1 (2021-08-11) +### router +| Commit | Description | +| -- | -- | +| [dd3abdb9d9](https://github.com/angular/angular/commit/dd3abdb9d9b2c4363fb1f468a05bf449b55f55a5) | fix(router): ensure check for match options is compatible with property renaming ([#43086](https://github.com/angular/angular/pull/43086)) | +## Special Thanks: +Amadou Sall, Andrew Kushnir, Andrew Scott, Daniel Trevino, Erik Slack, Fabien BERNARD, George Kalpakas, Jeroen van Warmerdam, Joey Perrott, Tim Gates and Vugar_Abdullayev + + + +# 13.0.0-next.0 (2021-08-04) +### compiler-cli +| Commit | Description | +| -- | -- | +| [ed9cfb674f](https://github.com/angular/angular/commit/ed9cfb674f8e52b416ccdaf9aa9c46955b8448f5) | fix(compiler-cli): use correct module resolution context for absolute imports in .d.ts files ([#42879](https://github.com/angular/angular/pull/42879)) | +| [5fb23eccea](https://github.com/angular/angular/commit/5fb23ecceaccf0629308dd50210b65f67d51f024) | perf(compiler-cli): skip analysis in incremental builds for files without Angular behavior ([#42562](https://github.com/angular/angular/pull/42562)) | +### core +| Commit | Description | +| -- | -- | +| [8628826535](https://github.com/angular/angular/commit/8628826535233ba5bc6b973cef860355b4c41931) | fix(core): incorrect error reported when trying to re-create view which had an error during creation ([#43005](https://github.com/angular/angular/pull/43005)) | +| [eefe1682e8](https://github.com/angular/angular/commit/eefe1682e8099b73b6e50bb227b5a7f63105c63d) | fix(core): correctly handle `null` or `undefined` in `ErrorHandler#handleError()` ([#42881](https://github.com/angular/angular/pull/42881)) | +### forms +| Commit | Description | +| -- | -- | +| [1d9d02696e](https://github.com/angular/angular/commit/1d9d02696eadbee2c2f719e432efca22f1e494e9) | feat(forms): add hasValidators, addValidators, and removeValidators methods (for both sync and async) ([#42838](https://github.com/angular/angular/pull/42838)) | +| [a502279592](https://github.com/angular/angular/commit/a50227959222f39884aac284544d1626aee5ca64) | feat(forms): allow minLength/maxLength validator to be bound to `null` ([#42565](https://github.com/angular/angular/pull/42565)) | +### language-service +| Commit | Description | +| -- | -- | +| [f0c5ba08f6](https://github.com/angular/angular/commit/f0c5ba08f63c60f7542dfd3592c4cfd42bd579bc) | fix(language-service): global autocomplete doesn't work when the user tries to modify the symbol ([#42923](https://github.com/angular/angular/pull/42923)) | +| [7c35ca0e00](https://github.com/angular/angular/commit/7c35ca0e0030f2ded12ddca9092e31f510cebeb1) | feat(language-service): support autocomplete string literal union types in templates ([#42729](https://github.com/angular/angular/pull/42729)) | +### router +| Commit | Description | +| -- | -- | +| [0d81b007e4](https://github.com/angular/angular/commit/0d81b007e48a0ac801d2614601fb8180a3517865) | fix(router): add missing outlet events to RouterOutletContract ([#42431](https://github.com/angular/angular/pull/42431)) | +| [dbae00195e](https://github.com/angular/angular/commit/dbae00195e114ac8b967201283962a7e2c0581b4) | feat(router): ability to provide custom route reuse strategy via DI for `RouterTestingModule` ([#42434](https://github.com/angular/angular/pull/42434)) | +## Special Thanks: +Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Daniel Trevino, Dmitrij Kuba, Dylan Hunn, George Kalpakas, Joe Martin, Joey Perrott, JoostK, Kristiyan Kostadinov, Nichola Alkhouri, Paul Gschwendtner, Pete Bacon Darwin, Steven Masala, Teri Glover, Vladyslav, Yuvaraj, atscott, codebriefcase, dario-piotrowicz, iRealNirmal and ivanwonder + + + +# 12.2.0 (2021-08-04) +### core +| Commit | Description | +| -- | -- | +| [bd7f0d8b70](https://github.com/angular/angular/commit/bd7f0d8b70150a7e4e7550f4380a2e731cf2b942) | fix(core): incorrect error reported when trying to re-create view which had an error during creation ([#43005](https://github.com/angular/angular/pull/43005)) | +### language-service +| Commit | Description | +| -- | -- | +| [aace1e71d8](https://github.com/angular/angular/commit/aace1e71d8fb5e1e52fcd86e2a26892d1016c43e) | fix(language-service): global autocomplete doesn't work when the user tries to modify the symbol ([#42923](https://github.com/angular/angular/pull/42923)) | +## Special Thanks: +Alex Rickabaugh, Joe Martin, Joey Perrott, Kristiyan Kostadinov, Nichola Alkhouri, Paul Gschwendtner, Pete Bacon Darwin, atscott, dario-piotrowicz and ivanwonder + + + +# 12.1.5 (2021-08-04) +This release contains various API docs improvements. + + + +# 12.2.0-rc.0 (2021-07-28) +### compiler-cli +| Commit | Description | +| -- | -- | +| [ed9cfb674f](https://github.com/angular/angular/commit/ed9cfb674f8e52b416ccdaf9aa9c46955b8448f5) | fix(compiler-cli): use correct module resolution context for absolute imports in .d.ts files ([#42879](https://github.com/angular/angular/pull/42879)) | +| [5fb23eccea](https://github.com/angular/angular/commit/5fb23ecceaccf0629308dd50210b65f67d51f024) | perf(compiler-cli): skip analysis in incremental builds for files without Angular behavior ([#42562](https://github.com/angular/angular/pull/42562)) | +### core +| Commit | Description | +| -- | -- | +| [eefe1682e8](https://github.com/angular/angular/commit/eefe1682e8099b73b6e50bb227b5a7f63105c63d) | fix(core): correctly handle `null` or `undefined` in `ErrorHandler#handleError()` ([#42881](https://github.com/angular/angular/pull/42881)) | +### forms +| Commit | Description | +| -- | -- | +| [1d9d02696e](https://github.com/angular/angular/commit/1d9d02696eadbee2c2f719e432efca22f1e494e9) | feat(forms): add hasValidators, addValidators, and removeValidators methods (for both sync and async) ([#42838](https://github.com/angular/angular/pull/42838)) | +| [a502279592](https://github.com/angular/angular/commit/a50227959222f39884aac284544d1626aee5ca64) | feat(forms): allow minLength/maxLength validator to be bound to `null` ([#42565](https://github.com/angular/angular/pull/42565)) | +### language-service +| Commit | Description | +| -- | -- | +| [7c35ca0e00](https://github.com/angular/angular/commit/7c35ca0e0030f2ded12ddca9092e31f510cebeb1) | feat(language-service): support autocomplete string literal union types in templates ([#42729](https://github.com/angular/angular/pull/42729)) | +### router +| Commit | Description | +| -- | -- | +| [0d81b007e4](https://github.com/angular/angular/commit/0d81b007e48a0ac801d2614601fb8180a3517865) | fix(router): add missing outlet events to RouterOutletContract ([#42431](https://github.com/angular/angular/pull/42431)) | +| [dbae00195e](https://github.com/angular/angular/commit/dbae00195e114ac8b967201283962a7e2c0581b4) | feat(router): ability to provide custom route reuse strategy via DI for `RouterTestingModule` ([#42434](https://github.com/angular/angular/pull/42434)) | +## Special Thanks: +Andrew Scott, Daniel Trevino, Dmitrij Kuba, Dylan Hunn, George Kalpakas, Joey Perrott, JoostK, Paul Gschwendtner, Pete Bacon Darwin, Steven Masala, Teri Glover, Vladyslav, Yuvaraj, codebriefcase, iRealNirmal and ivanwonder + + + +# 12.1.4 (2021-07-28) +### compiler-cli +| Commit | Description | +| -- | -- | +| [77ae4459d3](https://github.com/angular/angular/commit/77ae4459d34515493ddf62c7ecdf237260176809) | fix(compiler-cli): use correct module resolution context for absolute imports in .d.ts files ([#42879](https://github.com/angular/angular/pull/42879)) | +| [f589b01672](https://github.com/angular/angular/commit/f589b01672d13c1a174b880437d00a910899f29d) | perf(compiler-cli): skip analysis in incremental builds for files without Angular behavior ([#42562](https://github.com/angular/angular/pull/42562)) | +### core +| Commit | Description | +| -- | -- | +| [a779a1029b](https://github.com/angular/angular/commit/a779a1029b90039ea39d579ecbc98812c301080a) | fix(core): correctly handle `null` or `undefined` in `ErrorHandler#handleError()` ([#42881](https://github.com/angular/angular/pull/42881)) | +## Special Thanks: +Andrew Scott, Daniel Trevino, Dylan Hunn, George Kalpakas, Joey Perrott, JoostK, Paul Gschwendtner, Pete Bacon Darwin, Teri Glover, Vladyslav, Yuvaraj and codebriefcase + + +# 12.2.0-next.3 (2021-07-21) +### animations +| Commit | Description | +| -- | -- | +| [f12c53342c](https://github.com/angular/angular/commit/f12c53342c433eb8ef5650c78f0115f82f5b1567) | fix(animations): normalize final styles in buildStyles ([#42763](https://github.com/angular/angular/pull/42763)) | +### compiler-cli +| Commit | Description | +| -- | -- | +| [70c3461be3](https://github.com/angular/angular/commit/70c3461be38765efedac1e4c5dd1156023a29690) | fix(compiler-cli): use correct module import for types behind a `forwardRef` ([#42887](https://github.com/angular/angular/pull/42887)) | +| [07d7e6034f](https://github.com/angular/angular/commit/07d7e6034f2a9adae643b3a8e64e2cc794596c8c) | perf(compiler-cli): optimize cycle detection using a persistent cache ([#41271](https://github.com/angular/angular/pull/41271)) | +### core +| Commit | Description | +| -- | -- | +| [307dac67bc](https://github.com/angular/angular/commit/307dac67bc933ab3b017333b3085af8fba8193dc) | fix(core): use correct injector when resolving DI tokens from within a directive provider factory ([#42886](https://github.com/angular/angular/pull/42886)) | +## Special Thanks: +Alan Agius, Alex Rickabaugh, David Shevitz, George Kalpakas, Joey Perrott, JoostK, Krzysztof Kotowicz, Minko Gechev, Paul Gschwendtner and dario-piotrowicz + + +# 12.1.3 (2021-07-21) +### animations +| Commit | Description | +| -- | -- | +| [3cddc3d6bc](https://github.com/angular/angular/commit/3cddc3d6bc1045b76980ba3e866350d58deb0718) | fix(animations): normalize final styles in buildStyles ([#42763](https://github.com/angular/angular/pull/42763)) | +### compiler-cli +| Commit | Description | +| -- | -- | +| [d207ea06d1](https://github.com/angular/angular/commit/d207ea06d1bb554e822bab2eadcf12ef50117bd4) | fix(compiler-cli): use correct module import for types behind a `forwardRef` ([#42887](https://github.com/angular/angular/pull/42887)) | +| [e6d520f3d9](https://github.com/angular/angular/commit/e6d520f3d9104c63129b94fbf5fe54b392715fc5) | perf(compiler-cli): optimize cycle detection using a persistent cache ([#41271](https://github.com/angular/angular/pull/41271)) | +### core +| Commit | Description | +| -- | -- | +| [a6db152c78](https://github.com/angular/angular/commit/a6db152c78bc82ef39e529ab5ea55f810b17fa2e) | fix(core): use correct injector when resolving DI tokens from within a directive provider factory ([#42886](https://github.com/angular/angular/pull/42886)) | +## Special Thanks: +Alan Agius, David Shevitz, George Kalpakas, Joey Perrott, JoostK, Krzysztof Kotowicz, Minko Gechev, Paul Gschwendtner and dario-piotrowicz + + + +# 12.2.0-next.2 (2021-07-14) +### bazel +| Commit | Description | +| -- | -- | +| [7e04116d15](https://github.com/angular/angular/commit/7e04116d1572b5b2b7862ba037f90ab6142a927f) | fix(bazel): enable dts bundling for Ivy packages ([#42728](https://github.com/angular/angular/pull/42728)) | +### common +| Commit | Description | +| -- | -- | +| [e42aa6c13b](https://github.com/angular/angular/commit/e42aa6c13b9f1f8f5b2e8c27e97380bf574db873) | fix(common): re-sort output of `KeyValuePipe` when `compareFn` changes ([#42821](https://github.com/angular/angular/pull/42821)) | +### compiler +| Commit | Description | +| -- | -- | +| [b33665ab2c](https://github.com/angular/angular/commit/b33665ab2c7c8c5536b5dc4f488a457100524dc3) | fix(compiler): add mappings for all HTML entities ([#42818](https://github.com/angular/angular/pull/42818)) | +| [404c8d0d88](https://github.com/angular/angular/commit/404c8d0d88b88ae3ab5a80609d508fb2ecdf0d27) | fix(compiler): incorrect context object being referenced from listener instructions inside embedded views ([#42755](https://github.com/angular/angular/pull/42755)) | +### compiler-cli +| Commit | Description | +| -- | -- | +| [81dce5c664](https://github.com/angular/angular/commit/81dce5c6649ddc56903a37ef6a26dcd3ee37df96) | fix(compiler-cli): check split two way binding ([#42601](https://github.com/angular/angular/pull/42601)) | +| [4c482bf3f1](https://github.com/angular/angular/commit/4c482bf3f1768a18b35e0648c91029504a8d8649) | fix(compiler-cli): properly emit literal types when recreating type parameters in a different file ([#42761](https://github.com/angular/angular/pull/42761)) | +| [30c82cd177](https://github.com/angular/angular/commit/30c82cd17757f41d56afe71f69a90ac812a3201f) | fix(compiler-cli): inline type checking instructions no longer prevent incremental reuse ([#42759](https://github.com/angular/angular/pull/42759)) | +| [4c78984ad2](https://github.com/angular/angular/commit/4c78984ad26825851d78d6f0339d8e4cb7bf1e54) | fix(compiler-cli): support reflecting namespace declarations ([#42728](https://github.com/angular/angular/pull/42728)) | +| [74350a5cf1](https://github.com/angular/angular/commit/74350a5cf1035f0d33640dce845a1f78aa33f009) | fix(compiler-cli): return directives for an element on a microsyntax template ([#42640](https://github.com/angular/angular/pull/42640)) | +### core +| Commit | Description | +| -- | -- | +| [cd2d82a91a](https://github.com/angular/angular/commit/cd2d82a91a5f547ae4c3d369f7f777245324c9e5) | fix(core): associate the NgModule scope for an overridden component ([#42817](https://github.com/angular/angular/pull/42817)) | +| [51156f3f07](https://github.com/angular/angular/commit/51156f3f0798fe5bc6f69cf38ba2f2947aab89aa) | fix(core): allow proper type inference when `ngFor` is used with a `trackBy` function ([#42692](https://github.com/angular/angular/pull/42692)) | +| [0f23f7343e](https://github.com/angular/angular/commit/0f23f7343ec9bdcd2d40f6f474d2a4f5e38e2627) | fix(core): error in TestBed if module is reset mid-compilation in ViewEngine ([#42669](https://github.com/angular/angular/pull/42669)) | +### language-service +| Commit | Description | +| -- | -- | +| [ffeea63f43](https://github.com/angular/angular/commit/ffeea63f43e6a7fd46be4a8cd5a5d254c98dea08) | fix(language-service): Do not override TS LS methods not supported by VE NgLS ([#42727](https://github.com/angular/angular/pull/42727)) | +### service-worker +| Commit | Description | +| -- | -- | +| [cb2ca9a66e](https://github.com/angular/angular/commit/cb2ca9a66ef54d9f1b3df5ac14962dc3810b4cc1) | fix(service-worker): correctly handle unrecoverable state when a client no longer exists ([#42736](https://github.com/angular/angular/pull/42736)) | +| [f592a12005](https://github.com/angular/angular/commit/f592a120057c3787ad6b7385b6f8e10928627e9e) | fix(service-worker): avoid storing redundant metadata for hashed assets ([#42606](https://github.com/angular/angular/pull/42606)) | +## Special Thanks: +Alan Agius, Andrew Kushnir, Andrew Scott, Arthur Ming, Bastian, Borislav Ivanov, Daniel Trevino, David Gilson, David Shevitz, Gabriele Franchitto, George Kalpakas, Joey Perrott, JoostK, Kristiyan Kostadinov, Mark Goho, Meir Blumenfeld, Paul Gschwendtner, Pete Bacon Darwin, Ryan Andersen, Theoklitos Bampouris, behrooz bozorg chami, dario-piotrowicz, ivanwonder and mgechev + + + +# 12.1.2 (2021-07-14) +### bazel +| Commit | Description | +| -- | -- | +| [4a8ab4f149](https://github.com/angular/angular/commit/4a8ab4f1499a560bb4373b088785e43f26384e1c) | fix(bazel): enable dts bundling for Ivy packages ([#42728](https://github.com/angular/angular/pull/42728)) | +### common +| Commit | Description | +| -- | -- | +| [d654c7933a](https://github.com/angular/angular/commit/d654c7933a732c23dc1e68b17766457d2d11a4d8) | fix(common): re-sort output of `KeyValuePipe` when `compareFn` changes ([#42821](https://github.com/angular/angular/pull/42821)) | +### compiler +| Commit | Description | +| -- | -- | +| [2566cbb48c](https://github.com/angular/angular/commit/2566cbb48cddd23c4b29d01ad557bc71ac716700) | fix(compiler): add mappings for all HTML entities ([#42818](https://github.com/angular/angular/pull/42818)) | +| [65330f03a9](https://github.com/angular/angular/commit/65330f03a92f2743719d0e0d4cedcaadbb8c5b21) | fix(compiler): incorrect context object being referenced from listener instructions inside embedded views ([#42755](https://github.com/angular/angular/pull/42755)) | +### compiler-cli +| Commit | Description | +| -- | -- | +| [17d3de25da](https://github.com/angular/angular/commit/17d3de25daf339612c267001f0c2237533d7c789) | fix(compiler-cli): properly emit literal types when recreating type parameters in a different file ([#42761](https://github.com/angular/angular/pull/42761)) | +| [0a17e98ae2](https://github.com/angular/angular/commit/0a17e98ae2813338f03e3e01bb7cfa6024f4632b) | fix(compiler-cli): inline type checking instructions no longer prevent incremental reuse ([#42759](https://github.com/angular/angular/pull/42759)) | +| [45116097c1](https://github.com/angular/angular/commit/45116097c1dafd902014e0f680e0d50023467883) | fix(compiler-cli): support reflecting namespace declarations ([#42728](https://github.com/angular/angular/pull/42728)) | +| [df5cc1fbbf](https://github.com/angular/angular/commit/df5cc1fbbf1b1f02f1f45603552a2530bb59688d) | fix(compiler-cli): return directives for an element on a microsyntax template ([#42640](https://github.com/angular/angular/pull/42640)) | +### core +| Commit | Description | +| -- | -- | +| [63013546e1](https://github.com/angular/angular/commit/63013546e130d823db26ad96e1d4cb346e633a03) | fix(core): associate the NgModule scope for an overridden component ([#42817](https://github.com/angular/angular/pull/42817)) | +| [9ebd41e39c](https://github.com/angular/angular/commit/9ebd41e39c597ef6df2de2fb63d6458337e2757d) | fix(core): allow proper type inference when `ngFor` is used with a `trackBy` function ([#42692](https://github.com/angular/angular/pull/42692)) | +| [41c6877c01](https://github.com/angular/angular/commit/41c6877c013ba84ba5e46309b2310c097ad9e354) | fix(core): error in TestBed if module is reset mid-compilation in ViewEngine ([#42669](https://github.com/angular/angular/pull/42669)) | +### language-service +| Commit | Description | +| -- | -- | +| [97c18f4527](https://github.com/angular/angular/commit/97c18f4527187206db8b0f5730b80d2220027f9f) | fix(language-service): Do not override TS LS methods not supported by VE NgLS ([#42727](https://github.com/angular/angular/pull/42727)) | +### service-worker +| Commit | Description | +| -- | -- | +| [d87917542a](https://github.com/angular/angular/commit/d87917542a00ed6f58c7b95e3eba6aeddc5eee01) | fix(service-worker): correctly handle unrecoverable state when a client no longer exists ([#42736](https://github.com/angular/angular/pull/42736)) | +| [f2523a8fef](https://github.com/angular/angular/commit/f2523a8fef549fab6ec480ecfc966c9d938a5423) | fix(service-worker): avoid storing redundant metadata for hashed assets ([#42606](https://github.com/angular/angular/pull/42606)) | +## Special Thanks: +Alan Agius, Andrew Kushnir, Andrew Scott, Arthur Ming, Bastian, Borislav Ivanov, David Gilson, David Shevitz, Gabriele Franchitto, George Kalpakas, Joey Perrott, JoostK, Kristiyan Kostadinov, Mark Goho, Meir Blumenfeld, Paul Gschwendtner, Pete Bacon Darwin, Ryan Andersen, Theoklitos Bampouris, behrooz bozorg chami, dario-piotrowicz, ivanwonder and mgechev + + # 12.2.0-next.1 (2021-06-30) ### compiler diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a8ba801c235..bf9c0ad45de4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -248,8 +248,7 @@ Any line of the commit message cannot be longer than 100 characters. │ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core| │ elements|forms|http|language-service|localize|platform-browser| │ platform-browser-dynamic|platform-server|router|service-worker| - │ upgrade|zone.js|packaging|changelog|dev-infra|docs-infra|migrations| - │ ngcc|ve + │ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve │ └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test ``` @@ -302,7 +301,7 @@ There are currently a few exceptions to the "use package name" rule: * `changelog`: used for updating the release notes in CHANGELOG.md -* `dev-infra`: used for dev-infra related changes within the directories /scripts, /tools and /dev-infra +* `dev-infra`: used for dev-infra related changes within the directories /scripts and /tools * `docs-infra`: used for docs-app (angular.io) related changes within the /aio directory of the repo diff --git a/WORKSPACE b/WORKSPACE index 6af362e52683..84c53edc5b0f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Fetch rules_nodejs so we can install our npm dependencies http_archive( name = "build_bazel_rules_nodejs", - sha256 = "0fa2d443571c9e02fcb7363a74ae591bdcce2dd76af8677a95965edf329d778a", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.6.0/rules_nodejs-3.6.0.tar.gz"], + sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"], ) # Check the rules_nodejs version and download npm dependencies @@ -34,11 +34,6 @@ yarn_install( yarn_lock = "//:yarn.lock", ) -# Load angular dependencies -load("//packages/bazel:package.bzl", "rules_angular_dev_dependencies") - -rules_angular_dev_dependencies() - # Load protractor dependencies load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies") @@ -49,16 +44,21 @@ load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories" web_test_repositories() -load("//dev-infra/bazel/browsers:browser_repositories.bzl", "browser_repositories") +load("@npm//@angular/dev-infra-private/bazel/browsers:browser_repositories.bzl", "browser_repositories") browser_repositories() -# Setup the rules_sass toolchain -load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories") - -sass_repositories() - -# Setup the skydoc toolchain -load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories") - -skydoc_repositories() +load("//packages/common/locales/generate-locales-tool:cldr-data.bzl", "cldr_data_repository") + +cldr_data_repository( + name = "cldr_data", + # Since we use the Github archives for CLDR 37, we need to specify a path + # to the available locales. This wouldn't be needed with CLDR 39 as that + # comes with an official JSON archive not containing a version suffix. + available_locales_path = "cldr-core-37.0.0/availableLocales.json", + urls = { + "https://github.com/unicode-cldr/cldr-core/archive/37.0.0.zip": "32b5c49c3874aa342b90412c207b42e7aefb2435295891fb714c34ce58b3c706", + "https://github.com/unicode-cldr/cldr-dates-full/archive/37.0.0.zip": "e1c410dd8ad7d75df4a5393efaf5d28f0d56c0fa126c5d66e171a3f21a988a1e", + "https://github.com/unicode-cldr/cldr-numbers-full/archive/37.0.0.zip": "a921b90cf7f436e63fbdd55880f96e39a203acd9e174b0ceafa20a02c242a12e", + }, +) diff --git a/aio/.eslintrc.json b/aio/.eslintrc.json new file mode 100644 index 000000000000..2f94590cd8a6 --- /dev/null +++ b/aio/.eslintrc.json @@ -0,0 +1,91 @@ +{ + "root": true, + "overrides": [ + { + "files": [ + "*.ts" + ], + "parserOptions": { + "project": [ + "tsconfig.json", + "tests/e2e/tsconfig.json" + ], + "createDefaultProgram": true + }, + "extends": [ + "plugin:@angular-eslint/ng-cli-compat", + "plugin:@angular-eslint/ng-cli-compat--formatting-add-on", + "plugin:@angular-eslint/template/process-inline-templates" + ], + "rules": { + "@typescript-eslint/ban-types": "error", + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": "aio", + "style": "kebab-case" + } + ], + "@angular-eslint/directive-selector": [ + "error", + { + "type": "attribute", + "prefix": "aio", + "style": "camelCase" + } + ], + "dot-notation": "error", + "indent": "off", + "@typescript-eslint/member-delimiter-style": ["error", { + "singleline": { + "delimiter": "comma", + "requireLast": false + } + }], + "@typescript-eslint/member-ordering": "off", + "@typescript-eslint/naming-convention": "off", + "no-console": ["error", {"allow": ["log", "warn", "error"]}], + "no-empty-function": "off", + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression[callee.name=/^(fdescribe|fit)$/]", + "message": "Don't keep jasmine focus methods." + } + ], + "no-shadow": "off", + "@typescript-eslint/no-shadow": ["error"], + "no-tabs": "error", + "no-underscore-dangle": "off", + "no-unused-expressions": "error", + "no-use-before-define": "off", + "prefer-arrow/prefer-arrow-functions": "off", + "quotes": "off", + "@typescript-eslint/quotes": ["error", "single", {"avoidEscape": true}], + "semi": "error" + } + }, + { + "files": [ + "*.html" + ], + "extends": [ + "plugin:@angular-eslint/template/recommended" + ], + "rules": { + "@angular-eslint/template/accessibility-alt-text": "error", + "@angular-eslint/template/accessibility-elements-content": "error", + "@angular-eslint/template/accessibility-label-has-associated-control": "error", + "@angular-eslint/template/accessibility-table-scope": "error", + "@angular-eslint/template/accessibility-valid-aria": "error", + "@angular-eslint/template/click-events-have-key-events": "error", + "@angular-eslint/template/eqeqeq": "off", + "@angular-eslint/template/mouse-events-have-key-events": "error", + "@angular-eslint/template/no-autofocus": "error", + "@angular-eslint/template/no-distracting-elements": "error", + "@angular-eslint/template/no-positive-tabindex": "error" + } + } + ] +} diff --git a/aio/angular.json b/aio/angular.json index 513d7eef7f42..c91e73d6255e 100644 --- a/aio/angular.json +++ b/aio/angular.json @@ -138,6 +138,11 @@ }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "headers": { + "Content-Security-Policy": "require-trusted-types-for 'script'; trusted-types angular angular#bundler angular#unsafe-bypass aio#analytics google#safe" + } + }, "configurations": { "next": { "browserTarget": "site:build:next" @@ -196,16 +201,12 @@ } }, "lint": { - "builder": "@angular-devkit/build-angular:tslint", + "builder": "@angular-eslint/builder:lint", "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "tsconfig.worker.json", - "tests/e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" + "lintFilePatterns": [ + "src/!(generated)/**/*.ts", + "src/!(generated)/**/*.html", + "tests/**/*.ts" ] } }, diff --git a/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts b/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts index ac89f882d0a6..1902bcde0a45 100644 --- a/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts +++ b/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts @@ -2,7 +2,7 @@ * This example project is special in that it is not a cli app. To run tests appropriate for this * project, the test command is overwritten in `aio/content/examples/observables/example-config.json`. * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs + * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs * tests for this project. * * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. diff --git a/aio/content/examples/component-interaction/src/app/countdown-parent.component.ts b/aio/content/examples/component-interaction/src/app/countdown-parent.component.ts index 3f0d07787abb..67e3fd2d2a76 100644 --- a/aio/content/examples/component-interaction/src/app/countdown-parent.component.ts +++ b/aio/content/examples/component-interaction/src/app/countdown-parent.component.ts @@ -13,11 +13,11 @@ import { CountdownTimerComponent } from './countdown-timer.component'; @Component({ selector: 'app-countdown-parent-lv', template: ` -

Countdown to Liftoff (via local variable)

- - -
{{timer.seconds}}
- +

Countdown to Liftoff (via local variable)

+ + +
{{timer.seconds}}
+ `, styleUrls: ['../assets/demo.css'] }) @@ -29,11 +29,11 @@ export class CountdownLocalVarParentComponent { } @Component({ selector: 'app-countdown-parent-vc', template: ` -

Countdown to Liftoff (via ViewChild)

- - -
{{ seconds() }}
- +

Countdown to Liftoff (via ViewChild)

+ + +
{{ seconds() }}
+ `, styleUrls: ['../assets/demo.css'] }) diff --git a/aio/content/examples/component-interaction/src/app/hero-parent.component.ts b/aio/content/examples/component-interaction/src/app/hero-parent.component.ts index 949c649c82fc..e65b01714247 100644 --- a/aio/content/examples/component-interaction/src/app/hero-parent.component.ts +++ b/aio/content/examples/component-interaction/src/app/hero-parent.component.ts @@ -7,7 +7,9 @@ import { HEROES } from './hero'; selector: 'app-hero-parent', template: `

{{master}} controls {{heroes.length}} heroes

- diff --git a/aio/content/examples/component-interaction/src/app/missioncontrol.component.ts b/aio/content/examples/component-interaction/src/app/missioncontrol.component.ts index 191a619e8702..1d35eb23c964 100644 --- a/aio/content/examples/component-interaction/src/app/missioncontrol.component.ts +++ b/aio/content/examples/component-interaction/src/app/missioncontrol.component.ts @@ -8,9 +8,12 @@ import { MissionService } from './mission.service'; template: `

Mission Control

- +

History

  • {{event}}
  • diff --git a/aio/content/examples/component-interaction/src/app/name-parent.component.ts b/aio/content/examples/component-interaction/src/app/name-parent.component.ts index 747fbea166a1..488b8bf12c9d 100644 --- a/aio/content/examples/component-interaction/src/app/name-parent.component.ts +++ b/aio/content/examples/component-interaction/src/app/name-parent.component.ts @@ -4,8 +4,9 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-name-parent', template: ` -

    Master controls {{names.length}} names

    - +

    Master controls {{names.length}} names

    + + ` }) export class NameParentComponent { diff --git a/aio/content/examples/component-interaction/src/app/votetaker.component.ts b/aio/content/examples/component-interaction/src/app/votetaker.component.ts index 9f1f85e2820a..28046a971ffa 100644 --- a/aio/content/examples/component-interaction/src/app/votetaker.component.ts +++ b/aio/content/examples/component-interaction/src/app/votetaker.component.ts @@ -6,7 +6,9 @@ import { Component } from '@angular/core'; template: `

    Should mankind colonize the Universe?

    Agree: {{agreed}}, Disagree: {{disagreed}}

    - diff --git a/aio/content/examples/component-overview/src/app/app.component.spec.ts b/aio/content/examples/component-overview/src/app/app.component.spec.ts index d27174ee5b59..abfb4c6914b7 100644 --- a/aio/content/examples/component-overview/src/app/app.component.spec.ts +++ b/aio/content/examples/component-overview/src/app/app.component.spec.ts @@ -25,7 +25,7 @@ describe('AppComponent', () => { it('should render title', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); - const compiled = fixture.nativeElement; - expect(compiled.querySelector('.content span').textContent).toContain('component-overview app is running!'); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('.content span')?.textContent).toContain('component-overview app is running!'); }); }); diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.2.ts b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.2.ts index 50153f8fbe5f..7dd81ad5f785 100644 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.2.ts +++ b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.2.ts @@ -4,12 +4,12 @@ import { Component } from '@angular/core'; // #docregion templatebacktick @Component({ selector: 'app-component-overview', - template: `

    Hello World!

    -

    This template definition spans - multiple lines.

    ` + template: ` +

    Hello World!

    +

    This template definition spans multiple lines.

    + ` }) // #enddocregion templatebacktick - export class ComponentOverviewComponent { } diff --git a/aio/content/examples/content-projection/src/app/example-zippy.template.html b/aio/content/examples/content-projection/src/app/example-zippy.template.html index 886f54f7ad6f..b3addf3eb996 100644 --- a/aio/content/examples/content-projection/src/app/example-zippy.template.html +++ b/aio/content/examples/content-projection/src/app/example-zippy.template.html @@ -2,7 +2,7 @@
    - +
    - \ No newline at end of file + diff --git a/aio/content/examples/content-projection/src/app/zippy-basic/zippy-basic.component.ts b/aio/content/examples/content-projection/src/app/zippy-basic/zippy-basic.component.ts index 7f585298ffd7..e113405fcace 100644 --- a/aio/content/examples/content-projection/src/app/zippy-basic/zippy-basic.component.ts +++ b/aio/content/examples/content-projection/src/app/zippy-basic/zippy-basic.component.ts @@ -3,8 +3,8 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-zippy-basic', template: ` -

    Single-slot content projection

    - -` +

    Single-slot content projection

    + + ` }) export class ZippyBasicComponent {} diff --git a/aio/content/examples/content-projection/src/app/zippy-multislot/zippy-multislot.component.ts b/aio/content/examples/content-projection/src/app/zippy-multislot/zippy-multislot.component.ts index 471be4ffad70..473dd60ada68 100644 --- a/aio/content/examples/content-projection/src/app/zippy-multislot/zippy-multislot.component.ts +++ b/aio/content/examples/content-projection/src/app/zippy-multislot/zippy-multislot.component.ts @@ -3,11 +3,13 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-zippy-multislot', template: ` -

    Multi-slot content projection

    - Default: - - Question: - -` +

    Multi-slot content projection

    + + Default: + + + Question: + + ` }) export class ZippyMultislotComponent {} diff --git a/aio/content/examples/content-projection/src/app/zippy-ngprojectas/zippy-ngprojectas.component.ts b/aio/content/examples/content-projection/src/app/zippy-ngprojectas/zippy-ngprojectas.component.ts index 6a4aaf87b973..edd765bd9ff2 100644 --- a/aio/content/examples/content-projection/src/app/zippy-ngprojectas/zippy-ngprojectas.component.ts +++ b/aio/content/examples/content-projection/src/app/zippy-ngprojectas/zippy-ngprojectas.component.ts @@ -3,11 +3,13 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-zippy-ngprojectas', template: ` -

    Content projection with ngProjectAs

    - Default: - - Question: - -` +

    Content projection with ngProjectAs

    + + Default: + + + Question: + + ` }) export class ZippyNgprojectasComponent {} diff --git a/aio/content/examples/dynamic-component-loader/src/app/ad-banner.component.ts b/aio/content/examples/dynamic-component-loader/src/app/ad-banner.component.ts index 5afa512d7b1c..9ba2d105f77d 100644 --- a/aio/content/examples/dynamic-component-loader/src/app/ad-banner.component.ts +++ b/aio/content/examples/dynamic-component-loader/src/app/ad-banner.component.ts @@ -9,19 +9,22 @@ import { AdComponent } from './ad.component'; selector: 'app-ad-banner', // #docregion ad-host template: ` -
    -

    Advertisements

    - -
    - ` +
    +

    Advertisements

    + +
    + ` // #enddocregion ad-host }) // #docregion class export class AdBannerComponent implements OnInit, OnDestroy { + @Input() ads: AdItem[] = []; + currentAdIndex = -1; + @ViewChild(AdDirective, {static: true}) adHost!: AdDirective; - interval: any; + interval: number | undefined; constructor(private componentFactoryResolver: ComponentFactoryResolver) { } diff --git a/aio/content/examples/dynamic-component-loader/src/app/ad.service.ts b/aio/content/examples/dynamic-component-loader/src/app/ad.service.ts index 8a63dab0bb4b..796f4ad9cb9c 100644 --- a/aio/content/examples/dynamic-component-loader/src/app/ad.service.ts +++ b/aio/content/examples/dynamic-component-loader/src/app/ad.service.ts @@ -9,15 +9,22 @@ import { AdItem } from './ad-item'; export class AdService { getAds() { return [ - new AdItem(HeroProfileComponent, {name: 'Bombasto', bio: 'Brave as they come'}), - - new AdItem(HeroProfileComponent, {name: 'Dr IQ', bio: 'Smart as they come'}), - - new AdItem(HeroJobAdComponent, {headline: 'Hiring for several positions', - body: 'Submit your resume today!'}), - - new AdItem(HeroJobAdComponent, {headline: 'Openings in all departments', - body: 'Apply today'}), + new AdItem( + HeroProfileComponent, + { name: 'Bombasto', bio: 'Brave as they come' } + ), + new AdItem( + HeroProfileComponent, + { name: 'Dr IQ', bio: 'Smart as they come' } + ), + new AdItem( + HeroJobAdComponent, + { headline: 'Hiring for several positions', body: 'Submit your resume today!' } + ), + new AdItem( + HeroJobAdComponent, + { headline: 'Openings in all departments', body: 'Apply today' } + ) ]; } } diff --git a/aio/content/examples/dynamic-component-loader/src/app/app.module.ts b/aio/content/examples/dynamic-component-loader/src/app/app.module.ts index 34743f20e429..e2f21568557b 100644 --- a/aio/content/examples/dynamic-component-loader/src/app/app.module.ts +++ b/aio/content/examples/dynamic-component-loader/src/app/app.module.ts @@ -9,16 +9,19 @@ import { AdService } from './ad.service'; @NgModule({ imports: [ BrowserModule ], - providers: [AdService], - declarations: [ AppComponent, - AdBannerComponent, - HeroJobAdComponent, - HeroProfileComponent, - AdDirective ], - entryComponents: [ HeroJobAdComponent, HeroProfileComponent ], + providers: [ AdService ], + declarations: [ + AppComponent, + AdBannerComponent, + HeroJobAdComponent, + HeroProfileComponent, + AdDirective + ], + entryComponents: [ + HeroJobAdComponent, + HeroProfileComponent + ], bootstrap: [ AppComponent ] }) -export class AppModule { - constructor() {} -} +export class AppModule { } diff --git a/aio/content/examples/dynamic-component-loader/src/app/hero-job-ad.component.ts b/aio/content/examples/dynamic-component-loader/src/app/hero-job-ad.component.ts index ca1270a27630..c7f976516a40 100644 --- a/aio/content/examples/dynamic-component-loader/src/app/hero-job-ad.component.ts +++ b/aio/content/examples/dynamic-component-loader/src/app/hero-job-ad.component.ts @@ -7,13 +7,11 @@ import { AdComponent } from './ad.component'; template: `

    {{data.headline}}

    - {{data.body}}
    ` }) export class HeroJobAdComponent implements AdComponent { @Input() data: any; - } diff --git a/aio/content/examples/forms-overview/example-config.json b/aio/content/examples/forms-overview/example-config.json index 5f2a94dfa8cc..67ae16809f48 100644 --- a/aio/content/examples/forms-overview/example-config.json +++ b/aio/content/examples/forms-overview/example-config.json @@ -1,6 +1,6 @@ { "tests": [ {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadless", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--prod", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} + {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} ] } diff --git a/aio/content/examples/forms-overview/src/app/app.component.spec.ts b/aio/content/examples/forms-overview/src/app/app.component.spec.ts index 81488e7bc678..10398318eb4d 100644 --- a/aio/content/examples/forms-overview/src/app/app.component.spec.ts +++ b/aio/content/examples/forms-overview/src/app/app.component.spec.ts @@ -25,7 +25,7 @@ describe('AppComponent', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Forms Overview'); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('h1')?.textContent).toContain('Forms Overview'); })); }); diff --git a/aio/content/examples/getting-started/src/app/app.component.ts b/aio/content/examples/getting-started/src/app/app.component.ts index 68478a86238a..400d937a2f4f 100644 --- a/aio/content/examples/getting-started/src/app/app.component.ts +++ b/aio/content/examples/getting-started/src/app/app.component.ts @@ -5,5 +5,4 @@ import { Component } from '@angular/core'; templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) -export class AppComponent { -} +export class AppComponent { } diff --git a/aio/content/examples/getting-started/src/app/app.module.ts b/aio/content/examples/getting-started/src/app/app.module.ts index 36a43eefc20d..9b12ad5b42f3 100644 --- a/aio/content/examples/getting-started/src/app/app.module.ts +++ b/aio/content/examples/getting-started/src/app/app.module.ts @@ -10,14 +10,17 @@ import { ReactiveFormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; import { TopBarComponent } from './top-bar/top-bar.component'; import { ProductListComponent } from './product-list/product-list.component'; +// #docregion declare-product-alerts import { ProductAlertsComponent } from './product-alerts/product-alerts.component'; +// #enddocregion declare-product-alerts import { ProductDetailsComponent } from './product-details/product-details.component'; import { CartComponent } from './cart/cart.component'; import { ShippingComponent } from './shipping/shipping.component'; -// #docregion product-details-route, http-client-module, shipping-route, cart-route +// #docregion product-details-route, http-client-module, shipping-route, cart-route, declare-product-alerts @NgModule({ + // #enddocregion declare-product-alerts imports: [ BrowserModule, // #enddocregion product-details-route, cart-route @@ -36,17 +39,20 @@ import { ShippingComponent } from './shipping/shipping.component'; ]) ], // #enddocregion product-details-route, cart-route + // #docregion declare-product-alerts declarations: [ AppComponent, TopBarComponent, ProductListComponent, ProductAlertsComponent, + // #enddocregion declare-product-alerts ProductDetailsComponent, CartComponent, // #enddocregion http-client-module ShippingComponent -// #docregion http-client-module + // #docregion declare-product-alerts, http-client-module ], + // #enddocregion declare-product-alerts bootstrap: [ AppComponent ] diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.2.ts b/aio/content/examples/getting-started/src/app/cart/cart.component.2.ts index 0d346af4664f..77d9b9114661 100644 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.2.ts +++ b/aio/content/examples/getting-started/src/app/cart/cart.component.2.ts @@ -11,6 +11,7 @@ import { CartService } from '../cart.service'; }) // #docregion inject-cart, items export class CartComponent { + // #enddocregion inject-cart items = this.cartService.getItems(); // #docregion inject-cart diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.3.ts b/aio/content/examples/getting-started/src/app/cart/cart.component.3.ts index 2236cf39e859..9b7774e7b014 100644 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.3.ts +++ b/aio/content/examples/getting-started/src/app/cart/cart.component.3.ts @@ -7,6 +7,7 @@ import { CartService } from '../cart.service'; styleUrls: ['./cart.component.css'] }) export class CartComponent implements OnInit { + items; constructor( @@ -16,4 +17,5 @@ export class CartComponent implements OnInit { ngOnInit(): void { this.items = this.cartService.getItems(); } + } diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.ts b/aio/content/examples/getting-started/src/app/cart/cart.component.ts index a2ebf9c762ea..340d122ee54e 100644 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.ts +++ b/aio/content/examples/getting-started/src/app/cart/cart.component.ts @@ -13,17 +13,20 @@ import { CartService } from '../cart.service'; }) // #docregion inject-form-builder, checkout-form-group export class CartComponent { + // #enddocregion inject-form-builder items = this.cartService.getItems(); + checkoutForm = this.formBuilder.group({ name: '', address: '' }); + // #docregion inject-form-builder constructor( private cartService: CartService, private formBuilder: FormBuilder, - ) {} + ) {} // #enddocregion inject-form-builder, checkout-form-group onSubmit(): void { diff --git a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts index 7233c7e247ad..9353f0a8555c 100644 --- a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts +++ b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts @@ -14,6 +14,7 @@ import { Product } from '../products'; }) // #docregion input-decorator export class ProductAlertsComponent implements OnInit { + // #enddocregion as-generated @Input() product!: Product; // #docregion as-generated diff --git a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.ts b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.ts index ad64df66aeca..edc6c6397207 100644 --- a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.ts +++ b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.ts @@ -13,6 +13,6 @@ import { Product } from '../products'; }) // #docregion input-output export class ProductAlertsComponent { - @Input() product: Product|undefined; + @Input() product: Product | undefined; @Output() notify = new EventEmitter(); } diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts b/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts index a7aa0aa0cbf0..8ce3b685b1a3 100644 --- a/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts +++ b/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts @@ -13,12 +13,11 @@ import { Product, products } from '../products'; }) // #docregion props-methods, product-prop export class ProductDetailsComponent implements OnInit { - product: Product|undefined; + + product: Product | undefined; // #enddocregion product-prop - constructor( - private route: ActivatedRoute, - ) { } + constructor(private route: ActivatedRoute) { } // #enddocregion props-methods // #docregion get-product diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.html b/aio/content/examples/getting-started/src/app/product-details/product-details.component.html index 5b4a5452d23e..d1d75c61e2fb 100644 --- a/aio/content/examples/getting-started/src/app/product-details/product-details.component.html +++ b/aio/content/examples/getting-started/src/app/product-details/product-details.component.html @@ -6,8 +6,7 @@

    Product Details

    {{ product.name }}

    {{ product.price | currency }}

    {{ product.description }}

    - - + diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts b/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts index d80e370b8856..c690732fa12f 100644 --- a/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts +++ b/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts @@ -14,8 +14,9 @@ import { CartService } from '../cart.service'; }) // #docregion inject-cart-service, add-to-cart export class ProductDetailsComponent implements OnInit { + // #enddocregion add-to-cart, inject-cart-service - product: Product|undefined; + product: Product | undefined; // #docregion inject-cart-service constructor( diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.ts b/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.ts index f70d700ab1d7..c0d743c0fddc 100644 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.ts +++ b/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.ts @@ -7,6 +7,7 @@ import { products } from '../products'; styleUrls: ['./product-list.component.css'] }) export class ProductListComponent { + products = products; share() { diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.html index 2342c4bc9c0f..8839f13e4b46 100644 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.html +++ b/aio/content/examples/getting-started/src/app/product-list/product-list.component.html @@ -4,7 +4,9 @@

    Products

    - + {{ product.name }}

    diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.ts b/aio/content/examples/getting-started/src/app/product-list/product-list.component.ts index 4a6c61673830..a8fcbbb528c0 100644 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.ts +++ b/aio/content/examples/getting-started/src/app/product-list/product-list.component.ts @@ -9,6 +9,7 @@ import { products } from '../products'; }) // #docregion on-notify export class ProductListComponent { + products = products; share() { diff --git a/aio/content/examples/getting-started/src/app/shipping/shipping.component.ts b/aio/content/examples/getting-started/src/app/shipping/shipping.component.ts index da2c02a9d80b..e5b911688a52 100644 --- a/aio/content/examples/getting-started/src/app/shipping/shipping.component.ts +++ b/aio/content/examples/getting-started/src/app/shipping/shipping.component.ts @@ -12,14 +12,12 @@ import { CartService } from '../cart.service'; }) // #docregion props export class ShippingComponent { + shippingCosts = this.cartService.getShippingPrices(); // #enddocregion props - - // #docregion inject-cart-service - constructor(private cartService: CartService) { - } + constructor(private cartService: CartService) { } // #enddocregion inject-cart-service diff --git a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html index 489158071299..57f33238b31c 100644 --- a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html +++ b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html @@ -1,4 +1,4 @@ - +

    My Store

    diff --git a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.ts b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.ts index 12fe8c94888a..9d24f963e300 100644 --- a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.ts +++ b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.ts @@ -5,6 +5,4 @@ import { Component } from '@angular/core'; templateUrl: './top-bar.component.html', styleUrls: ['./top-bar.component.css'] }) -export class TopBarComponent { - -} +export class TopBarComponent { } diff --git a/aio/content/examples/http/example-config.json b/aio/content/examples/http/example-config.json index f000fdf0b14a..d02863f3e475 100644 --- a/aio/content/examples/http/example-config.json +++ b/aio/content/examples/http/example-config.json @@ -2,6 +2,6 @@ "projectType": "testing", "tests": [ {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadless", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--prod", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} + {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} ] } diff --git a/aio/content/examples/http/src/app/config/config.service.ts b/aio/content/examples/http/src/app/config/config.service.ts index 4905fd4d58b3..bc9bf101f367 100644 --- a/aio/content/examples/http/src/app/config/config.service.ts +++ b/aio/content/examples/http/src/app/config/config.service.ts @@ -79,8 +79,7 @@ export class ConfigService { // The backend returned an unsuccessful response code. // The response body may contain clues as to what went wrong. console.error( - `Backend returned code ${error.status}, ` + - `body was: ${error.error}`); + `Backend returned code ${error.status}, body was: `, error.error); } // Return an observable with a user-facing error message. return throwError( diff --git a/aio/content/examples/inputs-outputs/src/app/aliasing/aliasing.component.html b/aio/content/examples/inputs-outputs/src/app/aliasing/aliasing.component.html index ae7da190a371..e53ab3065a99 100644 --- a/aio/content/examples/inputs-outputs/src/app/aliasing/aliasing.component.html +++ b/aio/content/examples/inputs-outputs/src/app/aliasing/aliasing.component.html @@ -1,7 +1,6 @@

    Save for later item: {{input1}}

    - -

    Item for wishlist: {{input2}}

    - +

    Item for wishlist: {{input2}}

    + diff --git a/aio/content/examples/inputs-outputs/src/app/aliasing/aliasing.component.ts b/aio/content/examples/inputs-outputs/src/app/aliasing/aliasing.component.ts index 5be9b00ec2ce..74873b47da6f 100644 --- a/aio/content/examples/inputs-outputs/src/app/aliasing/aliasing.component.ts +++ b/aio/content/examples/inputs-outputs/src/app/aliasing/aliasing.component.ts @@ -21,12 +21,12 @@ export class AliasingComponent { saveIt() { - console.warn('Child says: emiting outputEvent1 with', this.input1); + console.warn('Child says: emitting outputEvent1 with', this.input1); this.outputEvent1.emit(this.input1); } wishForIt() { - console.warn('Child says: emiting outputEvent2', this.input2); + console.warn('Child says: emitting outputEvent2', this.input2); this.outputEvent2.emit(this.input2); } diff --git a/aio/content/examples/inputs-outputs/src/app/app.component.html b/aio/content/examples/inputs-outputs/src/app/app.component.html index d4a67c3170ca..8a078c87d993 100644 --- a/aio/content/examples/inputs-outputs/src/app/app.component.html +++ b/aio/content/examples/inputs-outputs/src/app/app.component.html @@ -20,7 +20,10 @@

    Input and Output together

    Open the console to see the EventEmitter at work when you click Delete.

    - + +
    @@ -28,7 +31,10 @@

    Input and Output together

    Input and Output in the component class metadata

    Open the console to see the EventEmitter at work when you click Buy.

    - + +
    @@ -36,7 +42,12 @@

    Input and Output in the component class metadata

    Aliasing Inputs and Outputs

    See aliasing.component.ts for aliases and the console for the EventEmitter console logs.

    - + +

    Wishlist:

      diff --git a/aio/content/examples/inputs-outputs/src/app/in-the-metadata/in-the-metadata.component.ts b/aio/content/examples/inputs-outputs/src/app/in-the-metadata/in-the-metadata.component.ts index 1e1e7cb634d7..a037b55e62f9 100644 --- a/aio/content/examples/inputs-outputs/src/app/in-the-metadata/in-the-metadata.component.ts +++ b/aio/content/examples/inputs-outputs/src/app/in-the-metadata/in-the-metadata.component.ts @@ -20,7 +20,7 @@ export class InTheMetadataComponent { clearanceItem = ''; buyIt() { - console.warn('Child says: emiting buyEvent with', this.clearanceItem); + console.warn('Child says: emitting buyEvent with', this.clearanceItem); this.buyEvent.emit(this.clearanceItem); } diff --git a/aio/content/examples/inputs-outputs/src/app/input-output/input-output.component.ts b/aio/content/examples/inputs-outputs/src/app/input-output/input-output.component.ts index 3b8241f7417f..228c004748de 100644 --- a/aio/content/examples/inputs-outputs/src/app/input-output/input-output.component.ts +++ b/aio/content/examples/inputs-outputs/src/app/input-output/input-output.component.ts @@ -6,13 +6,14 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; styleUrls: ['./input-output.component.css'] }) export class InputOutputComponent { + @Input() item = ''; @Output() deleteRequest = new EventEmitter(); lineThrough = ''; delete() { - console.warn('Child says: emiting item deleteRequest with', this.item); + console.warn('Child says: emitting item deleteRequest with', this.item); this.deleteRequest.emit(this.item); this.lineThrough = this.lineThrough ? '' : 'line-through'; } diff --git a/aio/content/examples/inputs-outputs/src/app/item-output/item-output.component.ts b/aio/content/examples/inputs-outputs/src/app/item-output/item-output.component.ts index 1fa6c551418f..e70b6b7a56b6 100644 --- a/aio/content/examples/inputs-outputs/src/app/item-output/item-output.component.ts +++ b/aio/content/examples/inputs-outputs/src/app/item-output/item-output.component.ts @@ -5,7 +5,6 @@ import { Component, Output, EventEmitter } from '@angular/core'; templateUrl: './item-output.component.html', styleUrls: ['./item-output.component.css'] }) - // #docregion item-output-class export class ItemOutputComponent { // #docregion item-output diff --git a/aio/content/examples/lifecycle-hooks/src/app/after-content.component.ts b/aio/content/examples/lifecycle-hooks/src/app/after-content.component.ts index 957ce0102658..93c1b7b3adca 100644 --- a/aio/content/examples/lifecycle-hooks/src/app/after-content.component.ts +++ b/aio/content/examples/lifecycle-hooks/src/app/after-content.component.ts @@ -11,7 +11,8 @@ import { LoggerService } from './logger.service'; template: `
      projected content begins
      -
      projected content ends
      ` +
      projected content ends
      + ` // #enddocregion template + `

      diff --git a/aio/content/examples/lifecycle-hooks/src/app/after-view.component.ts b/aio/content/examples/lifecycle-hooks/src/app/after-view.component.ts index 3fa831ccf6b6..06b0a34fbe6f 100644 --- a/aio/content/examples/lifecycle-hooks/src/app/after-view.component.ts +++ b/aio/content/examples/lifecycle-hooks/src/app/after-view.component.ts @@ -11,7 +11,8 @@ import { LoggerService } from './logger.service'; template: `

      child view begins
      -
      child view ends
      ` +
      child view ends
      + ` // #enddocregion template + `

      diff --git a/aio/content/examples/lifecycle-hooks/src/app/child-view.component.ts b/aio/content/examples/lifecycle-hooks/src/app/child-view.component.ts index 5dbc1bf6c9eb..dd835a7a8ee9 100644 --- a/aio/content/examples/lifecycle-hooks/src/app/child-view.component.ts +++ b/aio/content/examples/lifecycle-hooks/src/app/child-view.component.ts @@ -3,8 +3,10 @@ import { Component } from '@angular/core'; // #docregion child-view @Component({ selector: 'app-child-view', - template: ` - ` + template: ` + + + ` }) export class ChildViewComponent { hero = 'Magneta'; diff --git a/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts b/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts index 83740c712394..2a0938c99b98 100644 --- a/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts +++ b/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts @@ -2,7 +2,7 @@ * This example project is special in that it is not a cli app. To run tests appropriate for this * project, the test command is overwritten in `aio/content/examples/observables-in-angular/example-config.json`. * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs + * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs * tests for this project. * * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. diff --git a/aio/content/examples/observables/e2e/src/app.e2e-spec.ts b/aio/content/examples/observables/e2e/src/app.e2e-spec.ts index ac89f882d0a6..1902bcde0a45 100644 --- a/aio/content/examples/observables/e2e/src/app.e2e-spec.ts +++ b/aio/content/examples/observables/e2e/src/app.e2e-spec.ts @@ -2,7 +2,7 @@ * This example project is special in that it is not a cli app. To run tests appropriate for this * project, the test command is overwritten in `aio/content/examples/observables/example-config.json`. * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs + * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs * tests for this project. * * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. diff --git a/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts b/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts index af109790405d..83714788dbdc 100644 --- a/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts +++ b/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts @@ -2,7 +2,7 @@ * This example project is special in that it is not a cli app. To run tests appropriate for this * project, the test command is overwritten in `aio/content/examples/practical-observable-usage/example-config.json`. * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs + * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs * tests for this project. * * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. diff --git a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts index 2e2c3c0fd66a..b0896899df98 100644 --- a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts +++ b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts @@ -8,7 +8,7 @@ import { HeroService } from '../hero.service'; import { Hero } from '../hero'; @Component({ - selector: 'app-hero-detaill', + selector: 'app-hero-detail', templateUrl: './hero-detail.component.html', styleUrls: ['./hero-detail.component.css'] }) diff --git a/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts b/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts index 015034d09e34..aad3cbca2f28 100644 --- a/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts +++ b/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts @@ -2,7 +2,7 @@ * This example project is special in that it is not a cli app. To run tests appropriate for this * project, the test command is overwritten in `aio/content/examples/rx-libary/example-config.json`. * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs + * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs * tests for this project. * * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. diff --git a/aio/content/examples/service-worker-getting-started/example-config.json b/aio/content/examples/service-worker-getting-started/example-config.json index ad715b071153..3177a7a4977e 100644 --- a/aio/content/examples/service-worker-getting-started/example-config.json +++ b/aio/content/examples/service-worker-getting-started/example-config.json @@ -2,7 +2,7 @@ "projectType": "service-worker", "tests": [ {"cmd": "yarn", "args": ["e2e", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]}, - {"cmd": "yarn", "args": ["build", "--prod"]}, + {"cmd": "yarn", "args": ["build"]}, {"cmd": "node", "args": ["--eval", "assert(fs.existsSync('./dist/ngsw.json'), 'ngsw.json is missing')"]}, {"cmd": "node", "args": ["--eval", "assert(fs.existsSync('./dist/ngsw-worker.js'), 'ngsw-worker.js is missing')"]}, {"cmd": "node", "args": ["--eval", "assert(require('./package.json').dependencies['@angular/service-worker'], '@angular/service-worker is missing')"]} diff --git a/aio/content/examples/setup/example-config.json b/aio/content/examples/setup/example-config.json index 5f2a94dfa8cc..67ae16809f48 100644 --- a/aio/content/examples/setup/example-config.json +++ b/aio/content/examples/setup/example-config.json @@ -1,6 +1,6 @@ { "tests": [ {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadless", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--prod", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} + {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} ] } diff --git a/aio/content/examples/testing/example-config.json b/aio/content/examples/testing/example-config.json index f000fdf0b14a..d02863f3e475 100644 --- a/aio/content/examples/testing/example-config.json +++ b/aio/content/examples/testing/example-config.json @@ -2,6 +2,6 @@ "projectType": "testing", "tests": [ {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadless", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--prod", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} + {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} ] } diff --git a/aio/content/examples/testing/src/app/app-initial.component.spec.ts b/aio/content/examples/testing/src/app/app-initial.component.spec.ts index 66e1858c94aa..ab0629ec8683 100644 --- a/aio/content/examples/testing/src/app/app-initial.component.spec.ts +++ b/aio/content/examples/testing/src/app/app-initial.component.spec.ts @@ -32,8 +32,8 @@ describe('AppComponent (initial CLI version)', () => { it('should render title', waitForAsync(() => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); - const compiled = fixture.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); + const compiled = fixture.nativeElement as HTMLElement; + expect(compiled.querySelector('h1')?.textContent).toContain('Welcome to app!'); })); }); // #enddocregion diff --git a/aio/content/examples/toh-pt6/example-config.json b/aio/content/examples/toh-pt6/example-config.json index 5f2a94dfa8cc..67ae16809f48 100644 --- a/aio/content/examples/toh-pt6/example-config.json +++ b/aio/content/examples/toh-pt6/example-config.json @@ -1,6 +1,6 @@ { "tests": [ {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadless", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--prod", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} + {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]} ] } diff --git a/aio/content/examples/universal/example-config.json b/aio/content/examples/universal/example-config.json index 5a915d9184da..b2e697b25cd5 100644 --- a/aio/content/examples/universal/example-config.json +++ b/aio/content/examples/universal/example-config.json @@ -1,7 +1,7 @@ { "projectType": "universal", "e2e": [ - {"cmd": "yarn", "args": ["e2e", "--prod", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]}, + {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-puppeteer.conf.js", "--no-webdriver-update", "--port={PORT}"]}, {"cmd": "yarn", "args": ["run", "build:ssr"]} ] } diff --git a/aio/content/examples/what-is-angular/e2e/src/app.e2e-spec.ts b/aio/content/examples/what-is-angular/e2e/src/app.e2e-spec.ts index fdbe1cc6f57c..ba6658c94a49 100644 --- a/aio/content/examples/what-is-angular/e2e/src/app.e2e-spec.ts +++ b/aio/content/examples/what-is-angular/e2e/src/app.e2e-spec.ts @@ -6,11 +6,11 @@ describe('What is Angular', () => { const paragraphs = element.all(by.css('p')); const buttons = element.all(by.css('button')); const templateButton = buttons.get(1); - const templateText = paragraphs.get(3); + const templateText = paragraphs.get(4); const messageButton = buttons.get(0); const messageText = paragraphs.get(2); const ngIfButton = buttons.get(2); - const ngIfText = paragraphs.get(4); + const ngIfText = paragraphs.get(5); const diButton = buttons.get(3); beforeEach(() => browser.get('')); diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.html b/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.html index 568f5d1a6265..58a658417be2 100644 --- a/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.html +++ b/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.html @@ -1,6 +1,15 @@ - + -

      You can set my color in the component!

      +

      + You can set my color in the component! +

      +

      My color is {{ fontColor }}

      diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.ts index 7dd835680ace..941882099edb 100644 --- a/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.ts +++ b/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.ts @@ -5,13 +5,15 @@ import { Component } from '@angular/core'; templateUrl: './hello-world-bindings.component.html' }) export class HelloWorldBindingsComponent { - fontColor = 'blue'; - sayHelloId = 1; - canClick = false; - message = 'Hello, World'; + fontColor = 'blue'; + sayHelloId = 1; + canClick = false; + message = 'Hello, World'; + // #docregion method - sayMessage() { - alert(this.message); - } + sayMessage() { + alert(this.message); + } // #enddocregion + } diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.html b/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.html index 998a6d12525e..531f697ff420 100644 --- a/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.html +++ b/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.html @@ -1,3 +1,5 @@

      Hello World: Dependency Injection

      + -

      Be sure to open the console to view the output!

      \ No newline at end of file + +

      Be sure to open the console to view the output!

      diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.ts index c0bf58a7c650..aa0dfd9b7c18 100644 --- a/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.ts +++ b/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.ts @@ -8,8 +8,7 @@ import { Logger } from '../logger.service'; export class HelloWorldDependencyInjectionComponent { count = 0; - constructor(private logger: Logger) { - } + constructor(private logger: Logger) { } onLogMe() { this.logger.writeCount(this.count); diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.html b/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.html index 4c3fc12e983d..11af693df9e8 100644 --- a/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.html +++ b/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.html @@ -1,9 +1,13 @@

      Hello World: ngIf!

      + +

      You can edit the following paragraph.

      +

      The following paragraph is read only. Try clicking the button!

      +

      {{ message }}

      diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.ts index 184852f1d66d..25b98922d8c0 100644 --- a/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.ts +++ b/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.ts @@ -2,9 +2,9 @@ import { Component } from '@angular/core'; @Component({ - selector: 'hello-world-ngif', - templateUrl: './hello-world-ngif.component.html' - }) + selector: 'hello-world-ngif', + templateUrl: './hello-world-ngif.component.html' +}) export class HelloWorldNgIfComponent { message = 'I\'m read only!'; canEdit = false; diff --git a/aio/content/examples/what-is-angular/src/app/hello-world/hello-world.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world/hello-world.component.ts index 6c267b48ecae..959dd350058c 100644 --- a/aio/content/examples/what-is-angular/src/app/hello-world/hello-world.component.ts +++ b/aio/content/examples/what-is-angular/src/app/hello-world/hello-world.component.ts @@ -7,7 +7,7 @@ import { Component } from '@angular/core'; template: `

      Hello World

      This is my first component!

      - `, + ` }) export class HelloWorldComponent { // The code in this class drives the component's behavior. diff --git a/aio/content/file-not-found.md b/aio/content/file-not-found.md index b8a0ff887fec..02b880dd99af 100644 --- a/aio/content/file-not-found.md +++ b/aio/content/file-not-found.md @@ -1,6 +1,6 @@
      - + not found

      Page Not Found

      We're sorry. The page you are looking for cannot be found.

      diff --git a/aio/content/guide/angular-compiler-options.md b/aio/content/guide/angular-compiler-options.md index 0dad034e5915..d79b2e841fd9 100644 --- a/aio/content/guide/angular-compiler-options.md +++ b/aio/content/guide/angular-compiler-options.md @@ -21,7 +21,7 @@ The template options object, `angularCompilerOptions`, is a sibling to the `comp {@a tsconfig-extends} ## Configuration inheritance with extends -Like the TypeScript compiler, The Angular AOT compiler also supports `extends` in the `angularCompilerOptions` section of the TypeScript configuration file. +Like the TypeScript compiler, the Angular AOT compiler also supports `extends` in the `angularCompilerOptions` section of the TypeScript configuration file. The `extends` property is at the top level, parallel to `compilerOptions` and `angularCompilerOptions`. A TypeScript configuration can inherit settings from another file using the `extends` property. diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md index 408575107633..487be796dcce 100644 --- a/aio/content/guide/aot-compiler.md +++ b/aio/content/guide/aot-compiler.md @@ -558,7 +558,6 @@ In [Angular Ivy](guide/ivy), the template type checker has been completely rewri As a result, templates that previously compiled under View Engine can fail type checking under Ivy. This can happen because Ivy's stricter checking catches genuine errors, or because application code is not typed correctly, or because the application uses libraries in which typings are inaccurate or not specific enough. This stricter type checking is not enabled by default in version 9, but can be enabled by setting the `strictTemplates` configuration option. -We do expect to make strict type checking the default in the future. For more information about type-checking options, and about improvements to template type checking in version 9 and above, see [Template type checking](guide/template-typecheck). diff --git a/aio/content/guide/attribute-binding.md b/aio/content/guide/attribute-binding.md index b56c104ce284..42e7c416e82a 100644 --- a/aio/content/guide/attribute-binding.md +++ b/aio/content/guide/attribute-binding.md @@ -13,7 +13,7 @@ See the for a working example containing the code It is recommended that you set an element property with a [property binding](guide/property-binding) whenever possible. However, sometimes you don't have an element property to bind. -In those situations, you can use attribute binding. +In those situations, use attribute binding. For example, [ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) and [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG) are purely attributes. @@ -58,7 +58,7 @@ To use attribute binding with the `` attribute `colspan`: 1. Specify the `colspan` attribute by using the following syntax: `[attr.colspan]`. 1. Set `[attr.colspan]` equal to an expression. -In the following example, we bind the `colspan` attribute to the expression `1 + 1`. +In the following example, you bind the `colspan` attribute to the expression `1 + 1`. @@ -78,7 +78,7 @@ For more information on how to bind to the `colSpan` property, see the [`colspan {@a class-binding} ## Binding to the `class` attribute -You can use class binding to add and remove CSS class names from an element's `class` attribute. +Use class binding to add and remove CSS class names from an element's `class` attribute. ### Binding to a single CSS `class` @@ -161,7 +161,7 @@ The following table summarizes class binding syntax. {@a style-binding} ## Binding to the style attribute -You can use style binding to set styles dynamically. +Use style binding to set styles dynamically. ### Binding to a single style @@ -263,7 +263,7 @@ The following table summarizes style binding syntax.
      The [NgStyle](guide/built-in-directives/#ngstyle) directive can be used as an alternative to direct `[style]` bindings. -However, using the above style binding syntax without `NgStyle` is preferred because due to improvements in style binding in Angular, `NgStyle` no longer provides significant value, and might eventually be removed in the future. +However, using the preceding style binding syntax without `NgStyle` is preferred because due to improvements in style binding in Angular, `NgStyle` no longer provides significant value, and might eventually be removed in the future.
      @@ -294,7 +294,7 @@ When there are multiple bindings to the same class name or style property, Angul The more specific a class or style binding is, the higher its precedence. -A binding to a specific class (for example, `[class.foo]`) will take precedence over a generic `[class]` binding, and a binding to a specific style (for example, `[style.bar]`) will take precedence over a generic `[style]` binding. +A binding to a specific class (for example, `[class.foo]`) takes precedence over a generic `[class]` binding, and a binding to a specific style (for example, `[style.bar]`) takes precedence over a generic `[style]` binding. @@ -311,7 +311,7 @@ Directives often augment component behavior, so host bindings from components ha In addition, bindings take precedence over static attributes. -In the following case, `class` and `[class]` have similar specificity, but the `[class]` binding will take precedence because it is dynamic. +In the following case, `class` and `[class]` have similar specificity, but the `[class]` binding takes precedence because it is dynamic. @@ -319,14 +319,14 @@ In the following case, `class` and `[class]` have similar specificity, but the ` ### Delegating to styles with lower precedence It is possible for higher precedence styles to "delegate" to lower precedence styles using `undefined` values. -Whereas setting a style property to `null` ensures the style is removed, setting it to `undefined` will cause Angular to fall back to the next-highest precedence binding to that style. +Whereas setting a style property to `null` ensures the style is removed, setting it to `undefined` causes Angular to fall back to the next-highest precedence binding to that style. For example, consider the following template: Imagine that the `dirWithHostBinding` directive and the `comp-with-host-binding` component both have a `[style.width]` host binding. -In that case, if `dirWithHostBinding` sets its binding to `undefined`, the `width` property will fall back to the value of the `comp-with-host-binding` host binding. +In that case, if `dirWithHostBinding` sets its binding to `undefined`, the `width` property falls back to the value of the `comp-with-host-binding` host binding. However, if `dirWithHostBinding` sets its binding to `null`, the `width` property will be removed entirely. diff --git a/aio/content/guide/component-interaction.md b/aio/content/guide/component-interaction.md index 8d079cab3138..f5be188b2dbe 100644 --- a/aio/content/guide/component-interaction.md +++ b/aio/content/guide/component-interaction.md @@ -258,7 +258,7 @@ The `CountdownLocalVarParentComponent` that hosts the timer component is as foll The parent component cannot data bind to the child's `start` and `stop` methods nor to its `seconds` property. -You can place a local variable, `#timer`, on the tag `` representing the child component. +You can place a local variable, `#timer`, on the tag `` representing the child component. That gives you a reference to the child component and the ability to access *any of its properties or methods* from within the parent template. diff --git a/aio/content/guide/component-styles.md b/aio/content/guide/component-styles.md index 8c2c6aa67490..9a1a200a7ad9 100644 --- a/aio/content/guide/component-styles.md +++ b/aio/content/guide/component-styles.md @@ -249,7 +249,7 @@ See the [Styles configuration guide](guide/workspace-config#styles-and-scripts-c ### Non-CSS style files If you're building with the CLI, -you can write style files in [sass](https://sass-lang.com/), [less](http://lesscss.org/), or [stylus](https://stylus-lang.com/) and specify those files in the `@Component.styleUrls` metadata with the appropriate extensions (`.scss`, `.less`, `.styl`) as in the following example: +you can write style files in [sass](https://sass-lang.com/), or [less](http://lesscss.org/), and specify those files in the `@Component.styleUrls` metadata with the appropriate extensions (`.scss`, `.less`) as in the following example: @Component({ diff --git a/aio/content/guide/content-projection.md b/aio/content/guide/content-projection.md index a98cdc312a5a..8c2e243bc40c 100644 --- a/aio/content/guide/content-projection.md +++ b/aio/content/guide/content-projection.md @@ -23,43 +23,43 @@ The most basic form of content projection is *single-slot content projection*. S To create a component that uses single-slot content projection: -1. [Create](guide/component-overview) a component. +1. [Create a component](guide/component-overview#creating-a-component). -1. In the template for your component, add an `ng-content` element where you want the projected content to appear. +1. In the template for your component, add an `` element where you want the projected content to appear. -For example, the following component uses an `ng-content` element to display a message. +For example, the following component uses an `` element to display a message. -With the `ng-content` element in place, users of this component can now project their own message into the component. For example: +With the `` element in place, users of this component can now project their own message into the component. For example:
      -The `ng-content` element is a placeholder that does not create a real DOM element. Custom attributes applied to `ng-content` are ignored. +The `` element is a placeholder that does not create a real DOM element. Custom attributes applied to `` are ignored.
      {@a multi-slot} ## Multi-slot content projection -A component can have multiple slots. Each slot can specify a CSS selector that determines which content goes into that slot. This pattern is referred to as *multi-slot content projection*. With this pattern, you must specify where you want the projected content to appear. You accomplish this task by using the `select` attribute of `ng-content`. +A component can have multiple slots. Each slot can specify a CSS selector that determines which content goes into that slot. This pattern is referred to as *multi-slot content projection*. With this pattern, you must specify where you want the projected content to appear. You accomplish this task by using the `select` attribute of ``. To create a component that uses multi-slot content projection: -1. [Create](guide/component-overview) a component. +1. [Create a component](guide/component-overview#creating-a-component). -1. In the template for your component, add an `ng-content` element where you want the projected content to appear. +1. In the template for your component, add an `` element where you want the projected content to appear. -1. Add a `select` attribute to the `ng-content` elements. Angular supports [selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) for any combination of tag name, attribute, CSS class, and the `:not` pseudo-class. +1. Add a `select` attribute to the `` elements. Angular supports [selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) for any combination of tag name, attribute, CSS class, and the `:not` pseudo-class. - For example, the following component uses two `ng-content` elements. + For example, the following component uses two `` elements. -Content that uses the `question` attribute is projected into the `ng-content` element with the `select=[question]` attribute. +Content that uses the `question` attribute is projected into the `` element with the `select=[question]` attribute. @@ -68,9 +68,9 @@ region="multi-slot">
      ng-content without a select attribute
      -If your component includes an `ng-content` element without a `select` attribute, that instance receives all projected components that do not match any of the other `ng-content` elements. +If your component includes an `` element without a `select` attribute, that instance receives all projected components that do not match any of the other `` elements. -In the preceding example, only the second `ng-content` element defines a `select` attribute. As a result, the first `ng-content` element receives any other content projected into the component. +In the preceding example, only the second `` element defines a `select` attribute. As a result, the first `` element receives any other content projected into the component.
      @@ -78,41 +78,41 @@ In the preceding example, only the second `ng-content` element defines a `select ## Conditional content projection -If your component needs to _conditionally_ render content, or render content multiple times, you should configure that component to accept an `ng-template` element that contains the content you want to conditionally render. +If your component needs to _conditionally_ render content, or render content multiple times, you should configure that component to accept an `` element that contains the content you want to conditionally render. -Using an `ng-content` element in these cases is not recommended, because when the consumer of a component supplies the content, that content is _always_ initialized, even if the component does not define an `ng-content` element or if that `ng-content` element is inside of an `ngIf` statement. +Using an `` element in these cases is not recommended, because when the consumer of a component supplies the content, that content is _always_ initialized, even if the component does not define an `` element or if that `` element is inside of an `ngIf` statement. -With an `ng-template` element, you can have your component explicitly render content based on any condition you want, as many times as you want. Angular will not initialize the content of an `ng-template` element until that element is explicitly rendered. +With an `` element, you can have your component explicitly render content based on any condition you want, as many times as you want. Angular will not initialize the content of an `` element until that element is explicitly rendered. -The following steps demonstrate a typical implementation of conditional content projection using `ng-template`. +The following steps demonstrate a typical implementation of conditional content projection using ``. -1. [Create](guide/component-overview) a component. +1. [Create a component](guide/component-overview#creating-a-component). -1. In the component that accepts an `ng-template` element, use an `ng-container` element to render that template, such as: +1. In the component that accepts an `` element, use an `` element to render that template, such as: - This example uses the `ngTemplateOutlet` directive to render a given `ng-template` element, which you will define in a later step. You can apply an `ngTemplateOutlet` directive to any type of element. This example assigns the directive to an `ng-container` element because the component does not need to render a real DOM element. + This example uses the `ngTemplateOutlet` directive to render a given `` element, which you will define in a later step. You can apply an `ngTemplateOutlet` directive to any type of element. This example assigns the directive to an `` element because the component does not need to render a real DOM element. -1. Wrap the `ng-container` element in another element, such as a `div` element, and apply your conditional logic. +1. Wrap the `` element in another element, such as a `div` element, and apply your conditional logic. -1. In the template where you want to project content, wrap the projected content in an `ng-template` element, such as: +1. In the template where you want to project content, wrap the projected content in an `` element, such as: - The `ng-template` element defines a block of content that a component can render based on its own logic. A component can get a reference to this template content, or [`TemplateRef`](/api/core/TemplateRef), by using either the [`@ContentChild`](/api/core/ContentChild) or [`@ContentChildren`](/api/core/ContentChildren) decorators. The preceding example creates a custom directive, `appExampleZippyContent`, as an API to mark the `ng-template` for the component's content. With the `TemplateRef`, the component can render the referenced content by using either the [`ngTemplateOutlet`](/api/common/NgTemplateOutlet) directive, or with [`ViewContainerRef.createEmbeddedView`](/api/core/ViewContainerRef#createembeddedview). + The `` element defines a block of content that a component can render based on its own logic. A component can get a reference to this template content, or `TemplateRef`, by using either the `@ContentChild` or `@ContentChildren` decorators. The preceding example creates a custom directive, `appExampleZippyContent`, as an API to mark the `` for the component's content. With the `TemplateRef`, the component can render the referenced content by using either the `ngTemplateOutlet` directive, or with the `ViewContainerRef` method `createEmbeddedView()`. -1. Create a directive with a selector that matches the custom attribute for your template. In this directive, inject a TemplateRef instance. +1. [Create an attribute directive](guide/attribute-directives#building-an-attribute-directive) with a selector that matches the custom attribute for your template. In this directive, inject a TemplateRef instance. - In the previous step, you added an `ng-template` element with a custom attribute, `appExampleZippyDirective`. This code provides the logic that Angular will use when it encounters that custom attribute. In this case, that logic instructs Angular to instantiate a template reference. + In the previous step, you added an `` element with a custom attribute, `appExampleZippyDirective`. This code provides the logic that Angular will use when it encounters that custom attribute. In this case, that logic instructs Angular to instantiate a template reference. 1. In the component you want to project content into, use `@ContentChild` to get the template of the projected content. @@ -144,14 +144,14 @@ For instance, consider the following HTML snippet: -This example uses an `ng-container` attribute to simulate projecting a component into a more complex structure. +This example uses an `` attribute to simulate projecting a component into a more complex structure.
      Reminder!
      -The `ng-container` element is a logical construct that you can use to group other DOM elements; however, the `ng-container` itself is not rendered in the DOM tree. +The `` element is a logical construct that you can use to group other DOM elements; however, the `` itself is not rendered in the DOM tree.
      -In this example, the content we want to project resides inside another element. To project this content as intended, the template uses the `ngProjectAs` attribute. With `ngProjectAs`, the entire `ng-container` element is projected into a component using the `[question]` selector. +In this example, the content we want to project resides inside another element. To project this content as intended, the template uses the `ngProjectAs` attribute. With `ngProjectAs`, the entire `` element is projected into a component using the `[question]` selector. diff --git a/aio/content/guide/event-binding.md b/aio/content/guide/event-binding.md index b292d904bfbe..fafe1080a516 100644 --- a/aio/content/guide/event-binding.md +++ b/aio/content/guide/event-binding.md @@ -1,6 +1,6 @@ # Event binding -Event binding allows you to listen for and respond to user actions such as keystrokes, mouse movements, clicks, and touches. +Event binding lets you listen for and respond to user actions such as keystrokes, mouse movements, clicks, and touches.
      @@ -26,7 +26,7 @@ The event binding listens for the button's click events and calls the component' ## Binding to passive events -Angular also supports passive event listeners. For example, you can use the following steps to make a scroll event passive. +Angular also supports passive event listeners. For example, use the following steps to make a scroll event passive. 1. Create a file `zone-flags.ts` under `src` directory. 2. Add the following line into this file. diff --git a/aio/content/guide/file-structure.md b/aio/content/guide/file-structure.md index 1585b02ac200..3fb4833aca49 100644 --- a/aio/content/guide/file-structure.md +++ b/aio/content/guide/file-structure.md @@ -111,20 +111,6 @@ Project-specific [TypeScript](https://www.typescriptlang.org/) configuration fil | `tsconfig.spec.json` | [TypeScript](https://www.typescriptlang.org/) configuration for the application tests. See [TypeScript Configuration](guide/typescript-configuration). | | `tslint.json` | Application-specific [TSLint](https://palantir.github.io/tslint/) configuration. | -### End-to-end test files - -An `e2e/` folder at the top level contains source files for a set of end-to-end tests that correspond to the root-level application, along with test-specific configuration files. - -For a multi-project workspace, application-specific end-to-end tests are in the project root, under `projects/project-name/e2e/`. - - - e2e/ - src/ (end-to-end tests for my-app) - app.e2e-spec.ts - app.po.ts - protractor.conf.js (test-tool config) - tsconfig.json (TypeScript config inherits from workspace) - {@a multiple-projects} @@ -160,9 +146,6 @@ my-workspace/ projects/ (generated applications and libraries) my-first-app/ --(an explicitly generated application) ... --(application-specific config) - e2e/ ----(corresponding e2e tests) - src/ ----(e2e tests source) - ... ----(e2e-specific config) src/ --(source and support files for application) my-lib/ --(a generated library) ... --(library-specific config) @@ -173,7 +156,7 @@ my-workspace/ When you generate a library using the CLI (with a command such as `ng generate library my-lib`), the generated files go into the `projects/` folder of the workspace. For more information about creating your own libraries, see [Creating Libraries](guide/creating-libraries). -Libraries (unlike applications and their associated e2e projects) have their own `package.json` configuration file. +Libraries unlike applications have their own `package.json` configuration file. Under the `projects/` folder, the `my-lib` folder contains your library code. diff --git a/aio/content/guide/glossary.md b/aio/content/guide/glossary.md index b767eb7057a3..46721a60020a 100644 --- a/aio/content/guide/glossary.md +++ b/aio/content/guide/glossary.md @@ -1092,7 +1092,7 @@ See [custom element](#custom-element). ## workspace -A collection of Angular [projects](#project) (that is, applications and libraries) powered by the [Angular CLI] (#cli) that are typically co-located in a single source-control repository (such as [git](https://git-scm.com/)). +A collection of Angular [projects](#project) (that is, applications and libraries) powered by the [Angular CLI](#cli) that are typically co-located in a single source-control repository (such as [git](https://git-scm.com/)). The [CLI](#cli) [`ng new` command](cli/new) creates a file system directory (the "workspace root"). In the workspace root, it also creates the workspace [configuration file](#configuration) (`angular.json`) and, by default, an initial application project with the same name. diff --git a/aio/content/guide/hierarchical-dependency-injection.md b/aio/content/guide/hierarchical-dependency-injection.md index 3d33a5a35efe..b152df9a5b33 100644 --- a/aio/content/guide/hierarchical-dependency-injection.md +++ b/aio/content/guide/hierarchical-dependency-injection.md @@ -380,7 +380,7 @@ The following is an example of how the `` and `` view trees ...content goes here... - <#VIEW> + ``` @@ -1021,8 +1021,8 @@ The logical tree representation shows why this is: @Inject(AnimalService, @Optional)=>"🦔"> - <#VIEW @Provide(AnimalService="🦔") - @Inject(AnimalService, @SkipSelf, @Host, @Optional)=>"🐶"> + <#VIEW @Provide(AnimalService="🐶") + @Inject(AnimalService, @SkipSelf, @Host, @Optional)=>"🦔"> diff --git a/aio/content/guide/i18n.md b/aio/content/guide/i18n.md index b70d0542925f..572ce6f545c0 100644 --- a/aio/content/guide/i18n.md +++ b/aio/content/guide/i18n.md @@ -3,88 +3,94 @@ {@searchKeywords i18n} {@a angular-i18n} -*Internationalization* (i18n) is the process of designing and preparing your app to be usable in different locales around the world. -*Localization* is the process of building versions of your app for different locales, including extracting text for translation into different languages, and formatting data for particular locales. +*Internationalization* (i18n) is the process of designing and preparing your application to be usable in different locales around the world. +*Localization* is the process of building versions of your application for different locales, including extracting text for translation into different languages, and formatting data for particular locales. -A *locale* identifies a region (such as a country) in which people speak a particular language or language variant. The locale determines the formatting and parsing of dates, times, numbers, and currencies as well as measurement units and the translated names for time zones, languages, and countries. +A *locale* identifies a region (such as a country) in which people speak a particular language or language variant. +The locale determines the formatting and parsing of dates, times, numbers, and currencies as well as measurement units and the translated names for time zones, languages, and countries.
      -Create an adaptable user interface for all of your target locales that takes into consideration the differences in spacing for different languages. For details, see [How to approach internationalization](https://marketfinder.thinkwithgoogle.com/intl/en_us/guide/how-to-approach-i18n/#overview "How to approach internationalization"). +Create an adaptable user interface for all of your target locales that takes into consideration the differences in spacing for different languages. +For details, see [How to approach internationalization][ThinkwithgoogleMarketfinderIntlEnUsGuideHowToApproachI18nOverview].
      Use Angular to internationalize your app: -* Use built-in pipes to display dates, numbers, percentages, and currencies in a local format. -* Mark text in component templates for translation. -* Mark plural forms of expressions for translation. -* Mark alternate text for translation. +* Use built-in pipes to display dates, numbers, percentages, and currencies in a local format. +* Mark text in component templates for translation. +* Mark plural forms of expressions for translation. +* Mark alternate text for translation. -After preparing your app for an international audience, use the [Angular CLI](cli) to localize your app by performing the following tasks: +After you prepare your application for an international audience, use the [Angular CLI][AioCliMain] to localize your application. +Complete the following tasks to localize your application. -* Use the CLI to extract marked text to a _source language_ file. -* Make a copy of this file for each language, and send these _translation files_ to a translator or service. -* Use the CLI to merge the finished translation files when building your app for one or more locales. +* Use the CLI to extract marked text to a *source language* file. +* Make a copy of this file for each language, and send these *translation files* to a translator or service. +* Use the CLI to merge the finished translation files when building your application for one or more locales.
      - To explore the sample app with French translations used in this guide, see the . +To explore the sample application with French translations used in this guide, see .
      ## Prerequisites -To prepare your app for translations, you should have a basic understanding of the following: +To prepare your application for translations, you should have a basic understanding of the following subjects. -* [Templates](guide/glossary#template "Definition of a template") -* [Components](guide/glossary#component "Definition of a component") -* [Angular CLI](guide/glossary#command-line-interface-cli "Definition of CLI") command-line tool for managing the Angular development cycle -* [Extensible Markup Language (XML)](https://www.w3.org/XML/ "W3C: Extensible Markup Language (XML)") used for translation files +* [Templates][AioGuideGlossaryTemplate] +* [Components][AioGuideGlossaryComponent] +* [Angular CLI][AioGuideGlossaryCommandLineInterfaceCli] command-line tool for managing the Angular development cycle +* [Extensible Markup Language (XML)][W3Xml] used for translation files ## Steps to localize your app -To localize your app, follow these general steps: +To localize your application, complete the following general actions. -1. [Add the localize package](#setting-up-cli). -2. [Refer to locales by ID](#setting-up-locale). -3. [Format data based on locale](#i18n-pipes). -4. [Prepare templates for translations](#Template-translations). -5. [Work with translation files](#ng-xi18n). -6. [Merge translations into the app](#merge). -7. [Deploy multiple locales](#deploy-locales). +1. [Add the localize package][AioGuideI18nSettingUpCli]. +2. [Refer to locales by ID][AioGuideI18nSettingUpLocale]. +3. [Format data based on locale][AioGuideI18nPipes]. +4. [Prepare templates for translations][AioGuideI18nTemplatetranslations]. +5. [Work with translation files][AioGuideI18nNgXi18n]. +6. [Merge translations into the app][AioGuideI18nMerge]. +7. [Deploy multiple locales][AioGuideI18nDeployLocales]. -While following these steps, you can [explore the translated example app](#app-pre-translation). +While you follow the actions, [explore the translated example app][AioGuideI18nAppPreTranslation]. -The following are optional practices that may be required in special cases: +In special cases, the following actions are required. -* [Set the source locale manually](#set-source-manually) if you need to set the [LOCALE_ID](api/core/LOCALE_ID "API reference for LOCALE_ID") token. -* [Import global variants of the locale data](#import-locale) for extra locale data. -* [Manage marked text with custom IDs](#custom-id) if you require more control over matching translations. +* [Set the source locale manually][AioGuideI18nSetSourceManually], if you need to set the [LOCALE_ID][AioApiCoreLocaleId] token. +* [Import global variants of the locale data][AioGuideI18nImportLocale] for extra locale data. +* [Manage marked text with custom IDs][AioGuideI18nCustomId], if you require more control over matching translations. + + {@a setting-up-cli} {@a add-localize} ## Add the localize package -To take advantage of Angular's localization features, use the Angular CLI to add the `@angular/localize` package to your project: +To take advantage of the localization features of Angular, use the Angular CLI to add the `@angular/localize` package to your project. - ng add @angular/localize +ng add @angular/localize -This command updates your project's `package.json` and `polyfills.ts` files to import the `@angular/localize` package. +This command updates the `package.json` and `polyfills.ts` files of your project to import the `@angular/localize` package.
      -For more information about `package.json` and polyfill packages, see [Workspace npm dependencies](guide/npm-packages). +For more information about `package.json` and polyfill packages, see [Workspace npm dependencies][AioGuideNpmPackages].
      -If `@angular/localize` is not installed, the Angular CLI may generate an error when you try to build a localized version of your app. +If `@angular/localize` is not installed, the Angular CLI may generate an error when you try to build a localized version of your application. -{@a setting-up-locale} + +{@a setting-up-locale} {@a setting-up-the-locale-of-your-app} ## Refer to locales by ID @@ -94,10 +100,10 @@ Refer to a locale using the Unicode *locale identifier* (ID), which specifies th
      Unicode locale identifiers
      -* For a list of language codes, see [ISO 639-2](https://www.loc.gov/standards/iso639-2/ "ISO 639-2 Registration Authority"). -* IDs conform to the Unicode Common Locale Data Repository (CLDR). -For more information about Unicode locale identifiers, see the [CLDR core specification](http://cldr.unicode.org/core-spec#Unicode_Language_and_Locale_Identifiers "CLDR - Unicode Common Locale Data Repository"). -* CLDR and Angular base their identifiers on [BCP47 tags](https://tools.ietf.org/html/bcp47 "BCP47 Tags for Identifying Languages"). +* For a list of language codes, see [ISO 639-2][LocStandardsIso6392]. +* IDs conform to the Unicode Common Locale Data Repository (CLDR). + For more information about Unicode locale identifiers, see [CLDR core specification][UnicodeCldrCoreSpecUnicodeLanguageAndLocaleIdentifiers]. +* CLDR and Angular base their identifiers on [BCP47 tags][RfcEditorInfoBcp47].
      @@ -108,44 +114,50 @@ Angular uses this ID to find the correct corresponding locale data.
      Many countries, such as France and Canada, use the same language (French, identified as `fr`) but differ in grammar, punctuation, and formats for currency, decimal numbers, and dates. -Use a more specific locale ID, such as French for Canada (`fr-CA`), when localizing your app. +Use a more specific locale ID, such as French for Canada (`fr-CA`), when localizing your application.
      -Angular by default uses `en-US` (English in the United States) as your app's source locale. +Angular by default uses `en-US` (English in the United States) as the source locale of your application. + +The [Angular repository][GithubAngularAngularTreeMasterPackagesCommonLocales] includes common locales. +To change the source locale of your application for the build, set the source locale in the `sourceLocale` field in the [workspace configuration][AioGuideWorkspaceConfig] file (`angular.json`) of your application. +The build process (described in [Merge translations into the app][AioGuideI18nMerge] in this guide) uses the `angular.json` file of your application to automatically set the [`LOCALE_ID`][AioApiCoreLocaleId] token and load the locale data. -The [Angular repository](https://github.com/angular/angular/tree/master/packages/common/locales "Common locales in the Angular repository") includes common locales. -You can change your app's source locale for the build by setting the source locale in the `sourceLocale` field of your app's [workspace configuration](guide/workspace-config "Angular workspace configuration") file (`angular.json`). -The build process (described in [Merge translations into the app](#merge) in this guide) uses your app's `angular.json` file to automatically set the [`LOCALE_ID`](api/core/LOCALE_ID "API reference for LOCALE_ID") token and load the locale data. + {@a i18n-pipes} ## Format data based on locale -Angular provides the following built-in data transformation [pipes](guide/glossary#pipe "Definition of a pipe") that use the [`LOCALE_ID`](api/core/LOCALE_ID "API reference for LOCALE_ID") token to format data according to the locale's rules: +Angular provides the following built-in data transformation [pipes][AioGuideGlossaryPipe]. The data transformation pipes use the [`LOCALE_ID`][AioApiCoreLocaleId] token to format data based on rules of each locale. -* [`DatePipe`](api/common/DatePipe): Formats a date value. -* [`CurrencyPipe`](api/common/CurrencyPipe): Transforms a number to a currency string. -* [`DecimalPipe`](/api/common/DecimalPipe): Transforms a number into a decimal number string. -* [`PercentPipe`](api/common/PercentPipe): Transforms a number to a percentage string. +* [`DatePipe`][AioApiCommonDatepipe]: Formats a date value. +* [`CurrencyPipe`][AioApiCommonCurrencypipe]: Transforms a number to a currency string. +* [`DecimalPipe`][AioApiCommonDecimalpipe]: Transforms a number into a decimal number string. +* [`PercentPipe`][AioApiCommonPercentpipe]: Transforms a number to a percentage string. For example, `{{today | date}}` uses `DatePipe` to display the current date in the format for the locale in `LOCALE_ID`. To override the value of `LOCALE_ID`, add the `locale` parameter. For example, to force the currency to use `en-US` no matter which language-locale you set for `LOCALE_ID`, use this form: `{{amount | currency : 'en-US'}}`. -{@a Template-translations} + + +{@a template-translations} ## Prepare templates for translations -To translate your app's templates, you need to prepare the text for a translator or translation service by marking text, attributes, and other elements with the Angular `i18n` attribute. -Follow these general steps: +To translate the templates of your application, prepare the text for a translator or translation service by marking text, attributes, and other elements with the Angular `i18n` attribute. +Complete the following actions to mark text, attributes, and other elements with the Angular `i18n` attribute. + +1. [Mark text for translations][AioGuideI18nI18nAttribute]. +2. [Add helpful descriptions and meanings][AioGuideI18nHelpTranslator] to help the translator with additional information or context. +3. [Translate text not for display][AioGuideI18nNoElement]. +4. [Mark element attributes for translations][AioGuideI18nTranslateAttributes], such as the `title` attribute of an image. +5. [Mark plurals and alternates for translation][AioGuideI18nPluralsAlternates] in order to comply with the pluralization rules and grammatical constructions of different languages. -1. [Mark text for translations](#i18n-attribute). -2. [Add helpful descriptions and meanings](#help-translator) to help the translator with additional information or context. -3. [Translate text not for display](#no-element). -4. [Mark element attributes for translations](#translate-attributes), such as an image's `title` attribute. -5. [Mark plurals and alternates for translation](#plurals-alternates) in order to comply with the pluralization rules and grammatical constructions of different languages. + {@a i18n-attribute} @@ -154,7 +166,7 @@ Follow these general steps: Mark the static text messages in your component templates for translation using the `i18n` attribute. Place it on every element tag with fixed text to be translated. -For example, the following `

      ` tag displays a simple English language greeting, "Hello i18n!" +For example, the following `

      ` tag displays a simple English language greeting, "Hello i18n!". @@ -165,131 +177,152 @@ To mark the greeting for translation, add the `i18n` attribute to the `

      ` tag
      `i18n` is a custom attribute, recognized by Angular tools and compilers. -After translation, the compiler removes it. It is not an Angular directive. +After translation, the compiler removes it. +It is not an Angular directive.
      + + {@a help-translator} ### Add helpful descriptions and meanings To translate a text message accurately, the translator may need additional information or context. -Add a _description_ of the text message as the value of the `i18n` attribute, as shown in the following example: +Add a *description* of the text message as the value of the `i18n` attribute. +The following example displays the value of the `i18n` attribute. -The translator may also need to know the meaning or intent of the text message within this particular app context, in order to translate it the same way as other text with the same meaning. -Start the `i18n` attribute value with the _meaning_ and -separate it from the _description_ with the `|` character: `|`. +The translator may also need to know the meaning or intent of the text message within this particular application context, in order to translate it the same way as other text with the same meaning. +Start the `i18n` attribute value with the *meaning* and separate it from the *description* with the `|` character: `|`. -For example, you can add the meaning that this `

      ` tag is a site header that needs to be translated the same way not only when used as a header, but also when referred to from another section of text: +For example, you may want to indicate that the `

      ` tag is a site header that needs to be translated the same way whether it used as a header or referenced in another section of text. +The following example displays how to indicate that the `

      ` tag needs to be translated as a header or referenced elsewhere. -As a result, any text marked with `site header` as the _meaning_ is translated exactly the same way. +The result is any text marked with `site header` as the *meaning* is translated exactly the same way. + + {@a transaction-unit-ids}
      How meanings control text extraction and merging
      -The Angular extraction tool (described in [Work with translation files](#ng-xi18n) in this guide) generates a translation unit entry for each `i18n` -attribute in a template. -It assigns each translation unit a unique ID based on the _meaning_ and _description_. +The Angular extraction tool generates a translation unit entry for each `i18n` attribute in a template. +The Angular extraction tool assigns each translation unit a unique ID based on the *meaning* and *description*. +For more information about the Angular extraction tool, see [Work with translation files][AioGuideI18nNgXi18n] in this guide. -The same text elements with different _meanings_ are extracted with separate IDs. -For example, if the word "right" appears with the meaning `correct` (as in "You are right") in one place, and with the meaning `direction` (as in "Turn right") in another place, the word is translated differently and merged back into the app as different translation entries. +The same text elements with different *meanings* are extracted with different IDs. +For example, if the word "right" uses the following two definitions in two different locations, the word is translated differently and merged back into the application as different translation entries. -If the same text elements have different _descriptions_ but the same _meaning_, they are extracted only once, with only one ID. That one translation entry is merged back into the app wherever the same text elements appear. +* `correct` as in you are "right" +* `direction` as in turn "right" + +If the same text elements meet the following conditions, the text elements are extracted only once and use the same ID. + +* Same meaning or definition +* Different descriptions + +That one translation entry is merged back into the application wherever the same text elements appear.
      + + {@a no-element} ### Translate text not for display -While you can translate non-displayed text using a `` tag, you are creating a new DOM element. To avoid doing so, wrap the text in an `` element, which is transformed into a non-displayed HTML comment as shown in this example: +If you translate non-displayed text using the `` tag, you create a new DOM element. +To avoid doing a new DOM element, wrap the text in an `` element. +The following example displays the `` element transformed into a non-displayed HTML comment. + + {@a translate-attributes} ### Mark element attributes for translations HTML attributes such as `title` include text that should be translated along with the rest of the displayed text in the template. -The following example shows an image with a `title` attribute: +The following example displays an image with a `title` attribute. To mark an attribute for translation, add `i18n-`*attribute* in which *attribute* is the attribute to translate. -The following example shows how to mark the -`title` attribute on the `img` tag by adding `i18n-title`: +The following example displays how to mark the `title` attribute on the `img` tag by adding `i18n-title`. -You can use `i18n-`*attribute* with any attribute of any element. -You also can assign a meaning, description, and custom ID with the `i18n-`*attribute*`="|@@"` syntax. +Use `i18n-`*attribute* with any attribute of any element. +Also, to assign a meaning, description, and custom ID, use the `i18n-`*attribute*`="|@@"` syntax. + + {@a plurals-alternates} ### Mark plurals and alternates for translation -Different languages have different pluralization rules and grammatical constructions that can make translation difficult. +Different languages have different pluralization rules and grammatical constructions that increase the difficulty of translation. To simplify translation, use International Components for Unicode (ICU) clauses with regular expressions, such as `plural` to mark the uses of plural numbers, and `select` to mark alternate text choices.
      -The ICU clauses adhere to the [ICU Message Format](http://userguide.icu-project.org/formatparse/messages "ICU Message Format") specified in the [CLDR pluralization rules](http://cldr.unicode.org/index/cldr-spec/plural-rules "Pluralization Rules"). +The ICU clauses adhere to the [ICU Message Format][GithubUnicodeOrgIcuUserguideFormatParseMessages] specified in the [CLDR pluralization rules][UnicodeCldrIndexCldrSpecPluralRules].
      + + {@a plural-ICU} #### Mark plurals Use the `plural` clause to mark expressions that may not be meaningful if translated word-for-word. -For example, if you want to display "updated x minutes ago" in English, you may want to display "just now", "one minute ago", or "_x_ minutes ago" (with _x_ as the actual number). +For example, if you want to display "updated x minutes ago" in English, you may want to display "just now", "one minute ago", or "*x* minutes ago" (with *x* as the actual number). Other languages might express this cardinality differently. -The following example shows how to use a `plural` clause to express these three options: +The following example displays how to use a `plural` clause to express each of the three situations. -In the above example: +Review the following details in the above example. -* The first parameter, `minutes`, is bound to the component property (`minutes`), which determines the number of minutes. - -* The second parameter identifies this as a `plural` translation type. - -* The third parameter defines a pattern of pluralization categories and their matching values: - * For zero minutes, use `=0 {just now}`. - * For one minute, use `=1 {one minute}`. - * For any unmatched cardinality, use `other {{{minutes}} minutes ago}`. - You can use HTML markup and [interpolations](guide/glossary#interpolation "Definition of interpolation") such as `{{{minutes}}` with the `plural` clause in expressions. - * After the pluralization category, put the default text (English) within braces (`{}`). +* The first parameter, `minutes`, is bound to the component property (`minutes`), which determines the number of minutes. +* The second parameter identifies this as a `plural` translation type. +* The third parameter defines a pattern of pluralization categories and the matching values: + * For zero minutes, use `=0 {just now}`. + * For one minute, use `=1 {one minute}`. + * For any unmatched cardinality, use `other {{{minutes}} minutes ago}`. + Use HTML markup and [interpolations][AioGuideGlossaryInterpolation], such as `{{{minutes}}` with the `plural` clause in expressions. + * After the pluralization category, put the default text (English) within braces (`{}`). Pluralization categories include (depending on the language): -* `=0` (or any other number) -* `zero` -* `one` -* `two` -* `few` -* `many` -* `other` +* `=0` (or any other number) +* `zero` +* `one` +* `two` +* `few` +* `many` +* `other`
      Locales may not support some pluralization categories
      Many locales don't support some of the pluralization categories. For example, the default locale (`en-US`) and other locales (such as `es`) have very simple `plural()` functions that don't support the `few` category. -The following shows the [en-US](https://github.com/angular/angular/blob/ecffc3557fe1bff9718c01277498e877ca44588d/packages/core/src/i18n/locale_en.ts#L15-L18) `plural()` function: +The following code example displays the [en-US][GithubAngularAngularBlobEcffc3557fe1bff9718c01277498e877ca44588dPackagesCoreSrcI18nLocaleEnTsL15L18] `plural()` function. -``` +```typescript function plural(n: number): number { - let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length; - if (i === 1 && v === 0) return 1; - return 5; + let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length; + if (i === 1 && v === 0) return 1; + return 5; } ``` @@ -298,10 +331,12 @@ The `few` category will never match. If none of the pluralization categories match, Angular will try to match `other`. Use `other` as the standard fallback for a missing category. -For more information about pluralization categories, see [Choosing plural category names](http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Choosing-Plural-Category-Names) in the CLDR - Unicode Common Locale Data Repository. +For more information about pluralization categories, see [Choosing plural category names][UnicodeCldrIndexCldrSpecPluralRulesTocChoosingPluralCategoryNames] in the CLDR - Unicode Common Locale Data Repository.
      + + {@a select-ICU} {@a nesting-ICUS} @@ -311,15 +346,17 @@ If you need to display alternate text depending on the value of a variable, you need to translate all of the alternates. The `select` clause, similar to the `plural` clause, marks choices for alternate text based on your defined string values. -For example, the following clause in the component template binds to the component's `gender` property, which outputs one of the following string values: "male", "female" or "other". -The clause maps those values to the appropriate translations: +For example, the following clause in the component template binds to the `gender` property of the component, which outputs one of the following string values: `"male"`, `"female"`, or `"other"`. +The clause maps the values to the appropriate translations. -You can also nest different clauses together, such as the `plural` and `select` clauses in the following example: +Also, nest different clauses together, such as the `plural` and `select` clauses. +The following example displays nested clauses. - - + + + {@a ng-xi18n} {@a ng-xi18n-options} @@ -327,71 +364,82 @@ You can also nest different clauses together, such as the `plural` and `select` ## Work with translation files -After preparing a template for translation, use the Angular CLI [`extract-i18n`](cli/extract-i18n) command to extract the marked text in the template into a _source language_ file. +After preparing a template for translation, use the [`extract-i18n`][AioCliExtractI18n] Angular CLI command to extract the marked text in the template into a *source language* file. + The marked text includes text marked with `i18n` and attributes marked with `i18n-`*attribute* as described in the previous section. Follow these steps: -1. [Extract the source language file](#create-source). -You can optionally change the location, format, and name. -2. [Create a translation file for each language](#localization-folder) by copying the source language file. -3. [Translate each translation file](#translate-text-nodes). -4. [Translate plurals and alternate expressions](#translate-plural-select) separately. +1. [Extract the source language file][AioGuideI18nCreateSource]. + Optionally, change the location, format, and name. +2. [Create a translation file for each language][AioGuideI18nLocalizationFolder] by copying the source language file. +3. [Translate each translation file][AioGuideI18nTranslateTextNodes]. +4. [Translate plurals and alternate expressions][AioGuideI18nTranslatePluralSelect] separately. + + {@a create-source} ### Extract the source language file -To extract the source language file, open a terminal window, change to the root directory of your app project, and run the following CLI command: +To extract the source language file, open a terminal window, change to the root directory of your application project, and run the following CLI command: - ng extract-i18n +ng extract-i18n -The `extract-i18n` command creates a source language file named `messages.xlf` in your project's root directory using the [XML Localization Interchange File Format (XLIFF, version 1.2)](https://en.wikipedia.org/wiki/XLIFF "Wikipedia page about XLIFF"). +The `extract-i18n` command creates a source language file named `messages.xlf` in the root directory of your project using the [XML Localization Interchange File Format (XLIFF, version 1.2)][WikipediaWikiXliff]. -Use the following [`extract-i18n` command options](cli/extract-i18n) to change the source language file location, format, and file name: +Use the following [`extract-i18n` command options][AioCliExtractI18n] to change the source language file location, format, and file name: -* `--output-path`: Change the location. -* `--format`: Change the format. -* `--outFile`: Change the file name. +* `--output-path`: Change the location. +* `--format`: Change the format. +* `--outFile`: Change the file name. -Note: The `--i18n-locale` option is deprecated. -Angular 9 uses the source locale configured in your app's [workspace configuration](guide/workspace-config "Angular workspace configuration") file (`angular.json`). +
      + +**Note**: The `--i18n-locale` option is deprecated. +Angular 9 uses the source locale configured in the [workspace configuration][AioGuideWorkspaceConfig] file (`angular.json`) of your application. + +
      #### Change the source language file location -To create a file in the `src/locale` directory, specify the output path as an option, as shown in the following example: +To create a file in the `src/locale` directory, specify the output path as an option. +The following example specifies the output path as an option. - ng extract-i18n --output-path src/locale +ng extract-i18n --output-path src/locale + + {@a other-formats} #### Change the source language file format -The `extract-i18n` command can read and write files in three translation formats: +The `extract-i18n` command writes files in the following translation formats. -* XLIFF 1.2 (default) -* XLIFF 2 -* [XML Message Bundle (XMB)](http://cldr.unicode.org/development/development-process/design-proposals/xmb) -* JSON -* [ARB](https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification) +* XLIFF 1.2 (default) +* XLIFF 2 +* [XML Message Bundle (XMB)][UnicodeCldrDevelopmentDevelopmentProcessDesignProposalsXmb] +* JSON +* [ARB][GithubGoogleAppResourceBundleWikiApplicationresourcebundlespecification] -Specify the translation format explicitly with the `--format` command option, as shown in the following examples: +Specify the translation format explicitly with the `--format` command option. +The following example demonstrates several translation formats. -ng extract-i18n --format=xlf -ng extract-i18n --format=xlf2 -ng extract-i18n --format=xmb -ng extract-i18n --format=json -ng extract-i18n --format=arb +ng extract-i18n --format=xlf +ng extract-i18n --format=xlf2 +ng extract-i18n --format=xmb +ng extract-i18n --format=json +ng extract-i18n --format=arb
      - XLIFF files use the extension `.xlf`. - The XMB format generates `.xmb` source language files but uses`.xtb` (XML Translation Bundle: XTB) translation files. +XLIFF files use the extension `.xlf`. +The XMB format generates `.xmb` source language files but uses`.xtb` (XML Translation Bundle: XTB) translation files.
      @@ -401,9 +449,11 @@ To change the name of the source language file generated by the extraction tool, the `--outFile` command option: - ng extract-i18n --out-file source.xlf +ng extract-i18n --out-file source.xlf + + {@a localization-folder} ### Create a translation file for each language @@ -415,12 +465,14 @@ Use a filename extension that matches the associated locale, such as `messages.f For example, to create a French translation file, follow these steps: -1. Make a copy of the `messages.xlf` source language file. -2. Put the copy in the `src/locale` folder. -3. Rename the copy to `messages.fr.xlf` for the French language (`fr`) translation. -Send this translation file to the translator. +1. Make a copy of the `messages.xlf` source language file. +2. Put the copy in the `src/locale` folder. +3. Rename the copy to `messages.fr.xlf` for the French language (`fr`) translation. + Send this translation file to the translator. + +Repeat the above steps for each language you want to add to your application. -Repeat the above steps for each language you want to add to your app. + {@a translate-text-nodes} @@ -428,123 +480,140 @@ Repeat the above steps for each language you want to add to your app. Unless you are fluent in the language and have the time to edit translations, you would likely send each translation file to a translator, who would then use an XLIFF file editor to create and edit the translation. -To demonstrate this process, see the `messages.fr.xlf` file in the , which includes a French translation you can edit without a special XLIFF editor or knowledge of French. -Follow these steps: - -1. Open `messages.fr.xlf` and find the first `` element. This is a *translation unit*, also known as a *text node*, representing the translation of the `

      ` greeting tag that was previously marked with the `i18n` attribute: - -> - -> The `id="introductionHeader"` is a [custom ID](#custom-id "Manage marked text with custom IDs"), but without the `@@` prefix required in the source HTML. - -2. Duplicate the `...` element in the text node, rename it to `target`, and then replace its content with the French text: - -> - -> In a more complex translation, the information and context in the [description and meaning elements](#help-translator "Add helpful descriptions and meanings") described previously would help you choose the right words for translation. - -3. Translate the other text nodes the same way as shown in the following example: - -> - -
      - - Don't change the IDs for translation units. - Each `id` is generated by Angular and depends on the content of the template text and its assigned meaning. - If you change either the text or the meaning, then the `id` changes. - For more about managing text updates and IDs, see the section on [custom IDs](#custom-id "Manage marked text with custom IDs"). - -
      +To demonstrate this process, review the `messages.fr.xlf` file in the . The live example includes a French translation for you to edit without a special XLIFF editor or knowledge of French. +Complete the following actions. + +1. Open `messages.fr.xlf` and find the first `` element. + This is a *translation unit*, also known as a *text node*, representing the translation of the `

      ` greeting tag that was previously marked with the `i18n` attribute: + + > + + > The `id="introductionHeader"` is a [custom ID][AioGuideI18nCustomId], but without the `@@` prefix required in the source HTML. + +2. Duplicate the `...` element in the text node, rename it to `target`, and then replace its content with the French text: + + > + + > In a more complex translation, the information and context in the [description and meaning elements][AioGuideI18nHelpTranslator] described previously would help you choose the right words for translation. + +3. Translate the other text nodes. + The following example displays the way to translate. + + > + +
      + + Don't change the IDs for translation units. + Each `id` is generated by Angular and depends on the content of the template text and its assigned meaning. + If you change either the text or the meaning, then the `id` changes. + For more about managing text updates and IDs, see [custom IDs][AioGuideI18nCustomId]. + +
      + + {@a translate-plural-select} ### Translate plurals and alternate expressions -The [`plural` and `select` ICU expressions](#plurals-alternates "Mark plurals and alternates for translation") are extracted as additional messages, so you must translate them separately. +The [`plural` and `select` ICU expressions][AioGuideI18nPluralsAlternates] are extracted as additional messages, so you must translate them separately. + + {@a translate-plural} #### Translate plurals -To translate a `plural`, translate its ICU format match values as shown in the following example: +To translate a `plural`, translate the ICU format match values. + +* `just now` +* `one minute ago` +* ` minutes ago` -* `just now` -* `one minute ago` -* ` minutes ago` + +The following example displays the way to translate. -You can add or remove plural cases as needed for each language. +Add or remove plural cases as needed for each language.
      -For language plural rules, see -[CLDR plural rules](http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html "CLDR Charts to view the Common Locale Data Repository data"). +For language plural rules, see [CLDR plural rules][GithubUnicodeOrgCldrStagingChartsLatestSupplementalLanguagePluralRulesHtml].
      + + {@a translate-select} #### Translate alternate expressions Angular also extracts alternate `select` ICU expressions as separate translation units. -The following shows a `select` ICU expression in the component template: +The following example displays a `select` ICU expression in the component template. -In this example, Angular extracts the expression into two translation units. The first contains the text outside of the `select` clause, and uses a placeholder for `select` (``): +In this example, Angular extracts the expression into two translation units. +The first contains the text outside of the `select` clause, and uses a placeholder for `select` (``):
      -When translating the text, you can move the placeholder if necessary, but don't remove it. -If you remove the placeholder, the ICU expression will not appear in your translated app. +When you translate the text, move the placeholder if necessary, but don't remove it. +If you remove the placeholder, the ICU expression is removed from your translated application.
      -The second translation unit contains the `select` clause: +The following example displays the second translation unit that contains the `select` clause. -The following example shows both translation units after translating: +The following example displays both translation units after translation is complete. + + {@a translate-nested} #### Translate nested expressions -Angular treats a nested expression in the same manner as an alternate expression, extracting it into two translation units. The first contains the text outside of the nested expression: +Angular treats a nested expression in the same manner as an alternate expression. Angular extracts the expression into two translation units. +The following example displays the first translation unit that contains the text outside of the nested expression. -The second translation unit contains the complete nested expression: +The following example displays the second translation unit that contains the complete nested expression. -The following example shows both translation units after translating: +The following example displays both translation units after translating. + + {@a merge} {@a merge-aot} ## Merge translations into the app -To merge the completed translations into the app, use the [Angular CLI](guide/glossary#command-line-interface-cli "Definition of CLI") to build a copy of the app's distributable files for each locale. -The build process replaces the original text with translated text, and sets the `LOCALE_ID` token for each distributable copy of the app. +To merge the completed translations into your application, use the [Angular CLI][AioGuideGlossaryCommandLineInterfaceCli] to build a copy of the distributable files of your application for each locale. + +The build process replaces the original text with translated text, and sets the `LOCALE_ID` token for each distributable copy of your application. It also loads and registers the locale data. -After merging, you can serve each distributable copy of the app using server-side language detection or different subdirectories, as described in the next section about [deploying multiple locales](#deploy-locales). +After you merge the translations, serve each distributable copy of the application using server-side language detection or different subdirectories. +For more information about how to serve each distributable copy of the application, see [deploying multiple locales][AioGuideI18nDeployLocales]. -The build process uses [ahead-of-time (AOT) compilation](guide/glossary#ahead-of-time-aot-compilation) to produce a small, fast, -ready-to-run app. With Ivy in Angular version 9, AOT is used by default for both -development and production builds, and AOT is required to localize component templates. +The build process uses [ahead-of-time (AOT) compilation][AioGuideGlossaryAheadOfTimeAotCompilation] to produce a small, fast, ready-to-run application. +With Ivy in Angular version 9, AOT is used by default for both development and production builds, and AOT is required to localize component templates.
      -For a detailed explanation of the build process, see [Building and serving Angular apps](guide/build "Building and serving Angular apps"). +For a detailed explanation of the build process, see [Building and serving Angular apps][AioGuideBuild]. This build process works for translation files in the `.xlf` format or in another format that Angular understands, such as `.xtb`.
      @@ -552,146 +621,168 @@ This build process works for translation files in the `.xlf` format or in anothe
      Ivy does not support merging i18n translations when using JIT mode. -If you [disable Ivy](guide/ivy#opting-out-of-ivy-in-version-9) and are using JIT mode, see [merging with the JIT compiler](https://v8.angular.io/guide/i18n#merge-with-the-jit-compiler "Merge with the JIT compiler"). +If you [disable Ivy][AioGuideIvyOptingOutOfIvyInVersion9] and are using JIT mode, navigate [merging with the JIT compiler][AngularV8GuideI18nMergeWithTheJitCompiler].
      -To build a separate distributable copy of the app for each locale, [define the locales in the build configuration](#localize-config) in your project's workspace configuration file [`angular.json`](guide/workspace-config "Angular workspace configuration"). -This method shortens the build process by removing the requirement to perform a full app build for each locale. +To build a separate distributable copy of the application for each locale, [define the locales in the build configuration][AioGuideI18nLocalizeConfig] in the workspace configuration file [`angular.json`][AioGuideWorkspaceConfig] of your project. + +This method shortens the build process by removing the requirement to perform a full application build for each locale. -You can then [generate app versions for each locale](#localize-generate) using the `"localize"` option in `angular.json`. You can also [build from the command line](#localize-build-command) using the Angular CLI [`build`](/cli/build "CLI reference for ng build") command with the `--localize` option. +Then, to [generate application versions for each locale][AioGuideI18nLocalizeGenerate], use the `"localize"` option in `angular.json`. +Also, to [build from the command line][AioGuideI18nLocalizeBuildCommand], use the [`build`][AioCliBuild] Angular CLI command with the `--localize` option.
      -You can optionally [apply specific build options for just one locale](#localize-build-one-locale) for a custom locale configuration. +Optionally, [apply specific build options for just one locale][AioGuideI18nLocalizeBuildOneLocale] for a custom locale configuration.
      + + {@a localize-config} ### Define locales in the build configuration -Use the `i18n` project option in your app's build configuration file ([`angular.json`](guide/workspace-config "Angular workspace configuration")) to define locales for a project. +Use the `i18n` project option in the build configuration file ([`angular.json`][AioGuideWorkspaceConfig]) of your application to define locales for a project. + The following sub-options identify the source language and tell the compiler where to find supported translations for the project: -* `sourceLocale`: The locale you use within the app source code (`en-US` by default) -* `locales`: A map of locale identifiers to translation files +* `sourceLocale`: The locale you use within the application source code (`en-US` by default) +* `locales`: A map of locale identifiers to translation files For example, the following excerpt of an `angular.json` file sets the source locale to `en-US` and provides the path to the `fr` (French) locale translation file: ... "projects": { - "angular.io-example": { - ... - "i18n": { - "sourceLocale": "en-US", - "locales": { - "fr": "src/locale/messages.fr.xlf" - } - }, - "architect": { - ... + "my-project": { + ... + "i18n": { + "sourceLocale": "en-US", + "locales": { + "fr": "src/locale/messages.fr.xlf" + } + }, + "architect": { + ... + }, + ... } } + + {@a localize-generate} -### Generate app versions for each locale +### Generate application versions for each locale To use your locale definition in the build configuration, use the `"localize"` option in `angular.json` to tell the CLI which locales to generate for the build configuration: -* Set `"localize"` to `true` for *all* the locales previously defined in the build configuration. -* Set `"localize"` to an array of a subset of the previously-defined locale identifiers to build only those locale versions. -* Set `"localize"` to `false` to disable localization and not generate any locale-specific versions. +* Set `"localize"` to `true` for *all* the locales previously defined in the build configuration. +* Set `"localize"` to an array of a subset of the previously defined locale identifiers to build only those locale versions. +* Set `"localize"` to `false` to disable localization and not generate any locale-specific versions.
      -Note: [Ahead-of-time (AOT) compilation](guide/glossary#ahead-of-time-aot-compilation) is required to localize component templates. +**NOTE**: [Ahead-of-time (AOT) compilation][AioGuideGlossaryAheadOfTimeAotCompilation] is required to localize component templates. + If you changed this setting, set `"aot"` to `true` in order to use AOT.
      -The following example shows the `"localize"` option set to `true` in `angular.json` so that all locales defined in the build configuration are built: +The following example displays the `"localize"` option set to `true` in `angular.json`, so that all locales defined in the build configuration are built. "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "localize": true, - "aot": true, + "builder": "@angular-devkit/build-angular:browser", + "options": { + "localize": true, + "aot": true, + ... + } ... +}
      Due to the deployment complexities of i18n and the need to minimize rebuild time, the development server only supports localizing a single locale at a time. -Setting the `"localize"` option to `true` will cause an error when using `ng serve` if more than one locale is defined. -Setting the option to a specific locale, such as `"localize": ["fr"]`, can work if you want to develop against a specific locale (such as `fr`). +If you set the `"localize"` option to `true`, define more than one locale, and use `ng serve`; then an error occurs. +If you want to develop against a specific locale, set the `"localize"` option to a specific locale. +For example, for French (`fr`), specify `"localize": ["fr"]`.
      The CLI loads and registers the locale data, places each generated version in a locale-specific directory to keep it separate from other locale versions, and puts the directories within the configured `outputPath` for the project. For each application variant the `lang` attribute of the `html` element is set to the locale. -The CLI also adjusts the HTML base HREF for each version of the app by adding the locale to the configured `baseHref`. +The CLI also adjusts the HTML base HREF for each version of the application by adding the locale to the configured `baseHref`. -You can set the `"localize"` property as a shared configuration that all the configurations effectively inherit (or can override). +Set the `"localize"` property as a shared configuration to effectively inherit for all the configurations. +Also, set the property to override other configurations. + + {@a localize-build-command} ### Build from the command line -You can also use the `--localize` option with the [`ng build`](/cli/build "CLI reference for ng build") command and your existing `production` configuration. -The CLI builds all locales defined in the build configuration, which is similar to setting the `"localize"` option to `true` as described in the previous section. +Also, use the `--localize` option with the [`ng build`][AioCliBuild] command and your existing `production` configuration. +The CLI builds all locales defined in the build configuration. +If you set the locales in build configuration, it is similar to when you set the `"localize"` option to `true`. +For more information about how to set the locales, see [Generate application versions for each locale][AioGuideI18nLocalizeGenerate]. - ng build --localize +ng build --localize + + {@a localize-build-one-locale} ### Apply specific build options for just one locale -To apply specific build options to only one locale, you can create a custom locale-specific configuration by specifying a single locale as shown in the following example: +To apply specific build options to only one locale, specify a single locale to create a custom locale-specific configuration. +The following example displays a custom locale-specific configuration using a single locale. "build": { - ... - "configurations": { ... - "fr": { - "localize": ["fr"], - "main": "src/main.fr.ts", - ... + "configurations": { + ... + "fr": { + "localize": ["fr"], + "main": "src/main.fr.ts", + ... + } } - } }, "serve": { - ... - "configurations": { ... - "fr": { - "browserTarget": "*project-name*:build:fr" + "configurations": { + ... + "fr": { + "browserTarget": "*project-name*:build:fr" + } } - } } -You can then pass this configuration to the `ng serve` or `ng build` commands. -The following shows how to serve the French language file created in the example for this guide: +Pass this configuration to the `ng serve` or `ng build` commands. +The following code example displays how to serve the French language file. - ng serve --configuration=fr +ng serve --configuration=fr
      -You can use the CLI development server (`ng serve`), but only with a single locale. +Use the CLI development server (`ng serve`) with only a single locale.
      -For production builds, you can use configuration composition to execute both configurations: +For production builds, use configuration composition to run both configurations. ng build --configuration=production,fr @@ -700,103 +791,115 @@ For production builds, you can use configuration composition to execute both con ... "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { ... }, - "configurations": { - "fr": { - "localize": ["fr"], - } - } - }, - ... - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "my-project:build" + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { ... }, + "configurations": { + "fr": { + "localize": ["fr"], + } + } }, - "configurations": { - "production": { - "browserTarget": "my-project:build:production" - }, - "fr": { - "browserTarget": "my-project:build:fr" - } + ... + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "my-project:build" + }, + "configurations": { + "production": { + "browserTarget": "my-project:build:production" + }, + "fr": { + "browserTarget": "my-project:build:fr" + } + } } - } } + + {@a missing-translation} ### Report missing translations -When a translation is missing, the build succeeds but generates a warning such as -`Missing translation for message "foo"`. You can configure the level of warning that is generated by the Angular compiler: +When a translation is missing, the build succeeds but generates a warning such as `Missing translation for message "foo"`. +To configure the level of warning that is generated by the Angular compiler, specify one of the following levels. -* `error`: Throw an error. If you are using AOT compilation, the build will fail. -If you are using JIT compilation, the app will fail to load. -* `warning` (default): Show a `Missing translation` warning in the console or shell. -* `ignore`: Do nothing. +* `error`: Throw an error. + If you are using AOT compilation, the build will fail. + If you are using JIT compilation, the application will fail to load. +* `warning` (default): Displays a `Missing translation` warning in the console or shell. +* `ignore`: Do nothing. -Specify the warning level in the `options` section for the `build` target of your Angular CLI configuration file (`angular.json`). The following example shows how to set the warning level to `error`: +Specify the warning level in the `options` section for the `build` target of your Angular CLI configuration file (`angular.json`). +The following example displays how to set the warning level to `error`. "options": { - ... - "i18nMissingTranslation": "error" + ... + "i18nMissingTranslation": "error" } + + {@a deploy-locales} ## Deploy multiple locales -If `myapp` is the directory containing your app's distributable files, you would typically make available different versions for different locales in locale directories such as `myapp/fr` for the French version and `myapp/es` for the Spanish version. +If `myapp` is the directory containing the distributable files of your application, you would typically make available different versions for different locales in locale directories such as `myapp/fr` for the French version and `myapp/es` for the Spanish version. -The HTML `base` tag with the `href` attribute specifies the base URI, or URL, for relative links. If you set the `"localize"` option in `angular.json` to `true` or to an array of locale IDs, the CLI adjusts the base `href` for each version of the app by adding the locale to the configured `"baseHref"`. You can specify the `"baseHref"` for each locale in your workspace configuration file (`angular.json`), as shown in the following example, which sets `"baseHref"` to an empty string: +The HTML `base` tag with the `href` attribute specifies the base URI, or URL, for relative links. +If you set the `"localize"` option in `angular.json` to `true` or to an array of locale IDs, the CLI adjusts the base `href` for each version of the application. +To adjust the base `href` for each version of the application, the CLI adds the locale to the configured `"baseHref"`. +Specify the `"baseHref"` for each locale in your workspace configuration file (`angular.json`). +The following example displays `"baseHref"` set to an empty string. ... "projects": { - "angular.io-example": { - ... - "i18n": { - "sourceLocale": "en-US", - "locales": { - "fr": { - "translation": "src/locale/messages.fr.xlf", - "baseHref": "" + "angular.io-example": { + ... + "i18n": { + "sourceLocale": "en-US", + "locales": { + "fr": { + "translation": "src/locale/messages.fr.xlf", + "baseHref": "" + } + } + }, + "architect": { + ... } - } - }, - "architect": { ... } } -You can also use the CLI `--baseHref` option with [`ng build`](cli/build "CLI reference for ng build") to declare the base `href` at compile time. +Also, to declare the base `href` at compile time, use the CLI `--baseHref` option with [`ng build`][AioCliBuild]. ### Configuring servers Typical deployment of multiple languages serve each language from a different subdirectory. -Users are redirected to the preferred language defined in the browser using the -`Accept-Language` HTTP header. If the user has not defined a preferred language, -or if the preferred language is not available, then the server falls back to the default language. -Users can change the language by navigating to other subdirectories, which often occurs using a -menu implemented in the application. +Users are redirected to the preferred language defined in the browser using the `Accept-Language` HTTP header. +If the user has not defined a preferred language, or if the preferred language is not available, then the server falls back to the default language. +To change the language, see another subdirectory. +The change of subdirectory often occurs using a menu implemented in the application. -For more information on how to deploy apps to a remote server, see [Deployment](guide/deployment "Deployment guide"). +For more information on how to deploy apps to a remote server, see [Deployment][AioGuideDeployment]. #### Nginx -The following is an example of an Nginx configuration. +The following example displays an Nginx configuration. -``` +```nginx http { - # Browser preferred language detection (does NOT require AcceptLanguageModule) + # Browser preferred language detection (does NOT require + # AcceptLanguageModule) map $http_accept_language $accept_language { ~*^de de; ~*^fr fr; @@ -815,10 +918,11 @@ server { set $accept_language "fr"; } - # Redirect "/" to Angular app in browser's preferred language + # Redirect "/" to Angular application in the preferred language of the browser rewrite ^/$ /$accept_language permanent; - # Everything under the Angular app is always redirected to Angular in the correct language + # Everything under the Angular application is always redirected to Angular in the + # correct language location ~ ^/(fr|de|en) { try_files $uri /$1/index.html?$args; } @@ -828,9 +932,9 @@ server { #### Apache -The following is an example of an Apache configuration. +The following example displays an Apache configuration. -``` +```apache ServerName localhost DocumentRoot /www/data @@ -856,69 +960,80 @@ The following is an example of an Apache configuration. ``` + + {@a app-pre-translation} ## Explore the translated example app -The following tabs show the example app and its translation files: +The following tabs display the example application and the associated translation files. - - - - - - - - - - + + + + + + + + + + ## Optional practices -The following are optional practices that may be required in special cases: +In special cases, the following practices are required. -* [Set the source locale manually](#set-source-manually) by setting the [LOCALE_ID](api/core/LOCALE_ID "API reference for LOCALE_ID") token. -* [Import global variants of the locale data](#import-locale) for extra locale data. -* [Manage marked text with custom IDs](#custom-id) if you require more control over matching translations. +* [Set the source locale manually][AioGuideI18nSetSourceManually] by setting the [`LOCALE_ID`][AioApiCoreLocaleId] token. +* [Import global variants of the locale data][AioGuideI18nImportLocale] for extra locale data. +* [Manage marked text with custom IDs][AioGuideI18nCustomId] if you require more control over matching translations. + + {@a set-source-manually} ### Set the source locale manually Angular already contains locale data for `en-US`. -The Angular CLI automatically includes the locale data and sets the `LOCALE_ID` value when you use the `--localize` option with [`ng build`](cli/build "ng build description"). +The Angular CLI automatically includes the locale data and sets the `LOCALE_ID` value when you use the `--localize` option with [`ng build`][AioCliBuild]. + +To manually set the source locale of an application to one other than the automatic value, complete the following actions. -To manually set an app's source locale to one other than the automatic value, follow these steps: +1. Search for the ID in the language-locale combination in [the Angular repository][GithubAngularAngularTreeMasterPackagesCommonLocales]. +2. Set the [`LOCALE_ID`][AioApiCoreLocaleId] token. -1. Look up the ID for the language-locale combination in [the Angular repository](https://github.com/angular/angular/tree/master/packages/common/locales "Common locales in the Angular repository"). -2. Set the [`LOCALE_ID`](api/core/LOCALE_ID "API reference for LOCALE_ID") token. -The following example sets the value of `LOCALE_ID` to `fr` (French): +The following example sets the value of `LOCALE_ID` to `fr` for French. + + {@a import-locale} ### Import global variants of the locale data -Angular will automatically include locale data if you configure the locale using the `--localize` option with [`ng build`](cli/build "ng build description") CLI command. +Angular will automatically include locale data if you configure the locale using the `--localize` option with [`ng build`][AioCliBuild] CLI command. -The [Angular repository](https://github.com/angular/angular/tree/master/packages/common/locales "Common locales in the Angular repository") files (`@angular/common/locales`) contain most of the locale data that you need, but some advanced formatting options require additional locale data. -Global variants of the locale data are available in [`@angular/common/locales/global`](https://github.com/angular/angular/tree/master/packages/common/locales/global "Global locale variants in the Angular repository"). -The following example imports the global variants for French (`fr`): +The [Angular repository][GithubAngularAngularTreeMasterPackagesCommonLocales] files (`@angular/common/locales`) contain most of the locale data that you need, but some advanced formatting options require additional locale data. + +Global variants of the locale data are available in [`@angular/common/locales/global`][GithubAngularAngularTreeMasterPackagesCommonLocalesGlobal]. + +The following example imports the global variants for French (`fr`) import '@angular/common/locales/global/fr'; + + {@a custom-id} ### Manage marked text with custom IDs -The Angular extractor generates a file with a translation unit entry for each `i18n` -attribute in a template. -As described previously (in [How meanings control text extraction and merging](#transaction-unit-ids)), Angular assigns each translation unit a unique ID such as the following: +The Angular extractor generates a file with a translation unit entry for each `i18n` attribute in a template. +As described in [How meanings control text extraction and merging][AioGuideI18nTransactionUnitIds], Angular assigns each translation unit a unique ID. +The following example displays translation units with unique IDs. @@ -927,15 +1042,15 @@ In most cases a text change would also require a change to the translation. Therefore, using a new ID keeps the text change in sync with translations. However, some translation systems require a specific form or syntax for the ID. -To address this requirement, you can mark text with _custom_ IDs. -While most developers don't need to use custom IDs, some may want to use IDs that have a unique syntax to convey additional metadata (such as the library, component, or area of the app in which the text appears). +To address this requirement, mark text with custom IDs. +While most developers don't need to use custom IDs, some may want to use IDs that have a unique syntax to convey additional metadata (such as the library, component, or area of the application in which the text appears). -Specify a custom ID in the `i18n` attribute by using the prefix `@@`. -The following example defines the custom ID `introductionHeader`: +Specify a custom ID in the `i18n` attribute by using the `@@` prefix. +The following example defines the `introductionHeader` custom ID. -When you specify a custom ID, the extractor generates a translation unit with the custom ID: +When you specify a custom ID, the extractor generates a translation unit with the custom ID. @@ -946,11 +1061,11 @@ The drawback of using custom IDs is that if you change the text, your translatio #### Use a custom ID with a description Use a custom ID in combination with a description and a meaning to further help the translator. -The following example includes a description, followed by the custom `id`: +The following example includes a description, followed by the custom ID. -The following example adds a meaning: +The following example adds a meaning. @@ -959,29 +1074,116 @@ The following example adds a meaning: Be sure to define custom IDs that are unique. If you use the same ID for two different text elements, the extraction tool extracts only the first one, and Angular uses its translation in place of both original text elements. -For example, in the following code the same custom ID `myId` is defined for two different text elements: +For example, in the following code snippet the same `myId` custom ID is defined for two different text elements. + +```html +

      Hello

      + +

      Good bye

      +``` + +The following displays the translation in French. + +```xml + + Hello + Bonjour + +``` + +Both elements now use the same translation (`Bonjour`), because both were defined with the same custom ID. + +```html +

      Bonjour

      + +

      Bonjour

      +``` + + + +[AioGuideI18nAppPreTranslation]: #app-pre-translation "Explore the translated example application - Localizing your application | Angular" +[AioGuideI18nCreateSource]: #create-source "Extract the source language file - Localizing your application | Angular" +[AioGuideI18nCustomId]: #custom-id "Manage marked text with custom IDs - Localizing your application | Angular" +[AioGuideI18nDeployLocales]: #deploy-locales "Deploy multiple locales - Localizing your application | Angular" +[AioGuideI18nHelpTranslator]: #help-translator "Add helpful descriptions and meanings - Localizing your application | Angular" +[AioGuideI18nI18nAttribute]: #i18n-attribute "Mark text for translations - Localizing your application | Angular" +[AioGuideI18nPipes]: #i18n-pipes "Format data based on locale - Localizing your application | Angular" +[AioGuideI18nImportLocale]: #import-locale "Import global variants of the locale data - Localizing your application | Angular" +[AioGuideI18nLocalizationFolder]: #localization-folder "Create a translation file for each language - Localizing your application | Angular" +[AioGuideI18nLocalizeBuildCommand]: #localize-build-command "Build from the command line - Localizing your application | Angular" +[AioGuideI18nLocalizeBuildOneLocale]: #localize-build-one-locale "Apply specific build options for just one locale - Localizing your application | Angular" +[AioGuideI18nLocalizeConfig]: #localize-config "Define locales in the build configuration - Localizing your application | Angular" +[AioGuideI18nLocalizeGenerate]: #localize-generate "Generate application versions for each locale - Localizing your application | Angular" +[AioGuideI18nMerge]: #merge "Merge translations into the application - Localizing your application | Angular" +[AioGuideI18nNgXi18n]: #ng-xi18n "Work with translation files - Localizing your application | Angular" +[AioGuideI18nNoElement]: #no-element "Translate text not for display - Localizing your application | Angular" +[AioGuideI18nPluralsAlternates]: #plurals-alternates "Mark plurals and alternates for translation - Localizing your application | Angular" +[AioGuideI18nSetSourceManually]: #set-source-manually "Set the source locale manually - Localizing your application | Angular" +[AioGuideI18nSettingUpCli]: #setting-up-cli "Add the localize package - Localizing your application | Angular" +[AioGuideI18nSettingUpLocale]: #setting-up-locale "Refer to locales by ID - Localizing your application | Angular" +[AioGuideI18nTemplatetranslations]: #template-translations "Prepare templates for translations - Localizing your application | Angular" +[AioGuideI18nTransactionUnitIds]: #transaction-unit-ids "How meanings control text extraction and merging - Localizing your application | Angular" +[AioGuideI18nTranslateAttributes]: #translate-attributes "Mark element attributes for translations - Localizing your application | Angular" +[AioGuideI18nTranslatePluralSelect]: #translate-plural-select "Translate plurals and alternate expressions - Localizing your application | Angular" +[AioGuideI18nTranslateTextNodes]: #translate-text-nodes "Translate each translation file - Localizing your application | Angular" + +[AioApiCommonCurrencypipe]: api/common/CurrencyPipe "CurrencyPipe | Common - API | Angular" +[AioApiCommonDatepipe]: api/common/DatePipe "DatePipe | Common - API | Angular" +[AioApiCommonDecimalpipe]: api/common/DecimalPipe "DecimalPipe | Common - API | Angular" +[AioApiCommonPercentpipe]: api/common/PercentPipe "PercentPipe | Common - API | Angular" +[AioApiCoreLocaleId]: api/core/LOCALE_ID "LOCALE_ID | Core - API | Angular" + +[AioCliMain]: cli "CLI Overview and Command Reference | Angular" +[AioCliBuild]: cli/build "ng build | CLI | Angular" +[AioCliExtractI18n]: cli/extract-i18n "ng extract-i18n | CLI | Angular" + +[AioGuideBuild]: guide/build "Building and serving Angular apps | Angular" + +[AioGuideDeployment]: guide/deployment "Deployment | Angular" + +[AioGuideGlossaryAheadOfTimeAotCompilation]: guide/glossary#ahead-of-time-aot-compilation "ahead-of-time (AOT) compilation - Glossary | Angular" +[AioGuideGlossaryCommandLineInterfaceCli]: guide/glossary#command-line-interface-cli "command-line interface (CLI) - Glossary | Angular" +[AioGuideGlossaryComponent]: guide/glossary#component "component - Glossary | Angular" +[AioGuideGlossaryInterpolation]: guide/glossary#interpolation "interpolation - Glossary | Angular" +[AioGuideGlossaryPipe]: guide/glossary#pipe "pipe - Glossary | Angular" +[AioGuideGlossaryTemplate]: guide/glossary#template "template - Glossary | Angular" + +[AioGuideIvyOptingOutOfIvyInVersion9]: guide/ivy#opting-out-of-ivy-in-version-9 "Opting out of Ivy in version 9 - Angular Ivy | Angular" + +[AioGuideNpmPackages]: guide/npm-packages "Workspace npm dependencies | Angular" + +[AioGuideWorkspaceConfig]: guide/workspace-config "Angular workspace configuration | Angular" + + + +[AngularV8GuideI18nMergeWithTheJitCompiler]: https://v8.angular.io/guide/i18n#merge-with-the-jit-compiler "Merge with the JIT compiler - Internationalization (i18n) | Angular v8" + +[GithubAngularAngularBlobEcffc3557fe1bff9718c01277498e877ca44588dPackagesCoreSrcI18nLocaleEnTsL15L18]: https://github.com/angular/angular/blob/ecffc3557fe1bff9718c01277498e877ca44588d/packages/core/src/i18n/locale_en.ts#L15-L18 "Line 15 to 18 - angular/packages/core/src/i18n/locale_en.ts | angular/angular | GitHub" +[GithubAngularAngularTreeMasterPackagesCommonLocales]: https://github.com/angular/angular/tree/master/packages/common/locales "angular/packages/common/locales | angular/angular | GitHub" +[GithubAngularAngularTreeMasterPackagesCommonLocalesGlobal]: https://github.com/angular/angular/tree/master/packages/common/locales/global "angular/packages/common/locales/global | angular/angular | GitHub" + +[GithubGoogleAppResourceBundleWikiApplicationresourcebundlespecification]: https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification "ApplicationResourceBundleSpecification | google/app-resource-bundle | GitHub" + +[GithubUnicodeOrgCldrStagingChartsLatestSupplementalLanguagePluralRulesHtml]: https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html "Language Plural Rules - CLDR Charts | Unicode | GitHub" +[GithubUnicodeOrgIcuUserguideFormatParseMessages]: https://unicode-org.github.io/icu/userguide/format_parse/messages "ICU Message Format - ICU Documentation | Unicode | GitHub" + +[LocStandardsIso6392]: https://www.loc.gov/standards/iso639-2 "ISO 639-2 Registration Authority | Library of Congress" + +[RfcEditorInfoBcp47]: https://www.rfc-editor.org/info/bcp47 "BCP 47 | RFC Editor" + +[ThinkwithgoogleMarketfinderIntlEnUsGuideHowToApproachI18nOverview]: https://marketfinder.thinkwithgoogle.com/intl/en_us/guide/how-to-approach-i18n#overview "Overview - How to approach internationalization | Market Finder | Think with Google" + +[UnicodeCldrCoreSpecUnicodeLanguageAndLocaleIdentifiers]: http://cldr.unicode.org/core-spec#Unicode_Language_and_Locale_Identifiers "Unicode Language and Locale Identifiers - Core Specification | CLDR - Unicode Common Locale Data Repository | Unicode" - ```html -

      Hello

      - -

      Good bye

      - ``` +[UnicodeCldrDevelopmentDevelopmentProcessDesignProposalsXmb]: http://cldr.unicode.org/development/development-process/design-proposals/xmb "XMB | CLDR - Unicode Common Locale Data Repository | Unicode" -The following shows the translation to French: +[UnicodeCldrIndexCldrSpecPluralRules]: http://cldr.unicode.org/index/cldr-spec/plural-rules "Plural Rules | CLDR - Unicode Common Locale Data Repository | Unicode" +[UnicodeCldrIndexCldrSpecPluralRulesTocChoosingPluralCategoryNames]: http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Choosing-Plural-Category-Names "Choosing Plural Category Names - Plural Rules | CLDR - Unicode Common Locale Data Repository | Unicode" - ```xml - - Hello - Bonjour - - ``` +[W3Xml]: https://www.w3.org/XML "Extensible Markup Language (XML) | W3C" -Both elements now use the same translation (`Bonjour`) because they were defined with the same custom ID: +[WikipediaWikiXliff]: https://en.wikipedia.org/wiki/XLIFF "XLIFF | Wikipedia" - ```html -

      Bonjour

      - -

      Bonjour

      - ``` + -@reviewed 2020-04-10 \ No newline at end of file +@reviewed 2021-08-17 diff --git a/aio/content/guide/inputs-outputs.md b/aio/content/guide/inputs-outputs.md index b10223e65052..e15cf0302dc1 100644 --- a/aio/content/guide/inputs-outputs.md +++ b/aio/content/guide/inputs-outputs.md @@ -1,7 +1,7 @@ # Sharing data between child and parent directives and components A common pattern in Angular is sharing data between a parent component and one or more child components. -You can implement this pattern by using the `@Input()` and `@Output()` directives. +To implement this pattern use the `@Input()` and `@Output()` decorators.
      @@ -21,8 +21,8 @@ Consider the following hierarchy: The `` serves as the context for the ``. `@Input()` and `@Output()` give a child component a way to communicate with its parent component. -`@Input()` allows a parent component to update data in the child component. -Conversely, `@Output()` allows the child to send data to a parent component. +`@Input()` lets a parent component update data in the child component. +Conversely, `@Output()` lets the child send data to a parent component. {@a input} @@ -80,14 +80,14 @@ The binding source, the part to the right of the equal sign, is the data that th ### Watching for `@Input()` changes -To watch for changes on an `@Input()` property, you can use `OnChanges`, one of Angular's [lifecycle hooks](guide/lifecycle-hooks). +To watch for changes on an `@Input()` property, use `OnChanges`, one of Angular's [lifecycle hooks](guide/lifecycle-hooks). See the [`OnChanges`](guide/lifecycle-hooks#onchanges) section of the [Lifecycle Hooks](guide/lifecycle-hooks) guide for more details and examples. {@a output} ## Sending data to a parent component -The `@Output()` decorator in a child component or directive allows data to flow from the child to the parent. +The `@Output()` decorator in a child component or directive lets data flow from the child to the parent.

      " … -i0.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" Hello {{ name }} +i0.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" "Hello {{ name }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js index defbe7048751..1e531cf4b5cd 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_basic_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts"

      +.ɵɵelementStart(0, "h3") // SOURCE: "/interpolation_basic.ts" "

      " … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵele // SOURCE: "/interpolation_basic.ts"

      ' +.ɵɵele // SOURCE: "/interpolation_basic.ts" "

      '" … -.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" Hello {{ name }} +.ɵɵtextInterpolate1("Hello ", ctx.name, "") // SOURCE: "/interpolation_basic.ts" "Hello {{ name }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js index 2d22cbbeae92..c05459cb3cc0 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex.js @@ -1,5 +1,5 @@ -i0.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts"

      +i0.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts" "

      " … -i0.ɵɵelementEnd() // SOURCE: "/interpolation_complex.ts"

      +i0.ɵɵelementEnd() // SOURCE: "/interpolation_complex.ts" "

      " … -i0.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" {{ greeting + " " + name }} +i0.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" "{{ greeting + \" \" + name }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js index 6b72f59dc308..22da8a5d9bb2 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_complex_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts"

      +.ɵɵelementStart(0, "h2") // SOURCE: "/interpolation_complex.ts" "

      " … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵele // SOURCE: "/interpolation_complex.ts"

      ' +.ɵɵele // SOURCE: "/interpolation_complex.ts" "

      '" … -.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" {{ greeting + " " + name }} +.ɵɵtextInterpolate(ctx.greeting + " " + ctx.name) // SOURCE: "/interpolation_complex.ts" "{{ greeting + \" \" + name }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js index 3625b88102eb..743192d83228 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_properties.js @@ -1,3 +1,3 @@ -i0.ɵɵelement(0, "div", 0) // SOURCE: "/interpolation_properties.ts"
      ' +.ɵɵpropertyInterpolat // SOURCE: "/interpolation_properties.ts" "id=\"{{name}}\">
      '" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js index 372d821648a4..666d6b841ea1 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe.js @@ -1,5 +1,5 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts"
      +i0.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts" "
      " … -i0.ɵɵelementEnd() // SOURCE: "/interpolation_with_pipe.ts"
      +i0.ɵɵelementEnd() // SOURCE: "/interpolation_with_pipe.ts" "
      " … -i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" {{200.3 | percent : 2 }} +i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" "{{200.3 | percent : 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js index dc485cfdf2b6..cc28696761a6 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/interpolation_with_pipe_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts"
      +.ɵɵelementStart(0, "div") // SOURCE: "/interpolation_with_pipe.ts" "
      " … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelem // SOURCE: "/interpolation_with_pipe.ts"
      ' +.ɵɵelem // SOURCE: "/interpolation_with_pipe.ts" "
      '" … -.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" {{200.3 | percent : 2 }} +.ɵɵpipeBind2(2, 1, 200.3, 2)) // SOURCE: "/interpolation_with_pipe.ts" "{{200.3 | percent : 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js index 761a528c34b9..b0ba311b3dbb 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple.js @@ -1,15 +1,15 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_for_simple.ts"
      +i0.ɵɵelementEnd() // SOURCE: "/ng_for_simple.ts" "
      " … -i0.ɵɵadvance(1) // SOURCE: "/ng_for_simple.ts" {{ item }} +i0.ɵɵadvance(1) // SOURCE: "/ng_for_simple.ts" "{{ item }}" … -i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_simple.ts" {{ item }} +i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_simple.ts" "{{ item }}" … -i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts"
      \ No newline at end of file +("ngForTrackBy", ctx.trackByFn) // SOURCE: "/ng_for_simple.ts" "index as i; trackBy: trackByFn\">" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js index 21ed2ffa86ea..b359a1d8fa58 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_simple_partial.js @@ -1,15 +1,15 @@ -.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_for_simple.ts"
      ' +.ɵɵelem // SOURCE: "/ng_for_simple.ts" "
      '" … -.ɵɵadvance(1);\n // SOURCE: "/ng_for_simple.ts" {{ item }} +.ɵɵadvance(1);\n // SOURCE: "/ng_for_simple.ts" "{{ item }}" … -.ɵɵtextInterpolate(item_r1);\n }\n}\n\n // SOURCE: "/ng_for_simple.ts" {{ item }} +.ɵɵtextInterpolate(item_r1);\n }\n}\n\n // SOURCE: "/ng_for_simple.ts" "{{ item }}" … -.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_for_simple.ts"
      \ No newline at end of file +.ɵɵproperty("ngForOf", ctx.items)("ngForTrackBy", ctx.trackByFn) // SOURCE: "/ng_for_simple.ts" "of items; index as i; trackBy: trackByFn\">" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js index 2076ca626089..51f41745f6ec 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated.js @@ -1,4 +1,4 @@ -i0.ɵɵtext(0) // SOURCE: "/ng_for_templated.ts" {{ item }} +i0.ɵɵtext(0) // SOURCE: "/ng_for_templated.ts" "{{ item }}" … // TODO - map the bindings better -i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_templated.ts" {{ item }} \ No newline at end of file +i0.ɵɵtextInterpolate(item_r1) // SOURCE: "/ng_for_templated.ts" "{{ item }}" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js index c48b7d422b2a..038c0f1b2bb3 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_for_templated_partial.js @@ -1,5 +1,5 @@ -.ɵɵtext(0);\n }\n\n if (rf & 2) {\n const item_r1 = ctx.$implicit;\n // SOURCE: "/ng_for_templated.ts" {{ item }}` +.ɵɵtext(0);\n }\n\n if (rf & 2) {\n const item_r1 = ctx.$implicit;\n // SOURCE: "/ng_for_templated.ts" "{{ item }}`" … // TODO - map the bindings better // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵtextInterpolate(item_r // SOURCE: "/ng_for_templated.ts" {{ item }}` \ No newline at end of file +.ɵɵtextInterpolate(item_r // SOURCE: "/ng_for_templated.ts" "{{ item }}`" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js index 98c6dd10d6d0..a30476fcc31e 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_simple.js @@ -1,11 +1,11 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_simple.ts"
      +i0.ɵɵelementEnd() // SOURCE: "/ng_if_simple.ts" "
      " … -i0.ɵɵtextInterpolate(ctx_r0.name) // SOURCE: "/ng_if_simple.ts" {{ name }} +i0.ɵɵtextInterpolate(ctx_r0.name) // SOURCE: "/ng_if_simple.ts" "{{ name }}" … -i0.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts"
      ' +.ɵɵelem // SOURCE: "/ng_if_simple.ts" "
      '" … -.ɵɵtextInterpolate(ctx_r0.name);\n }\n}\n\n // SOURCE: "/ng_if_simple.ts" {{ name }} +.ɵɵtextInterpolate(ctx_r0.name);\n }\n}\n\n // SOURCE: "/ng_if_simple.ts" "{{ name }}" … -.ɵɵtemplate(0, TestCmp_div_0_Template, 2, 1, "div", 0) // SOURCE: "/ng_if_simple.ts"
      +.ɵɵproperty("ngIf", ctx.showMessage()) // SOURCE: "/ng_if_simple.ts" "ngIf="showMessage()\">" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js index a10cd5ce182a..531189a2f122 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated.js @@ -1,7 +1,7 @@ -i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_templated.ts"
      +i0.ɵɵelementStart(0, "div") // SOURCE: "/ng_if_templated.ts" "
      " … // TODO - map the bindings better -i0.ɵɵelementEnd() // SOURCE: "/ng_if_templated.ts"
      +i0.ɵɵelementEnd() // SOURCE: "/ng_if_templated.ts" "
      " … // TODO: the `ctx_r...` appears to be dependent upon previous tests!!! // TODO: expectMapping(mappings, { source: '{{ name }}', generated: 'i0.ɵɵtextInterpolate(ctx_r0.name)', sourceUrl: '../ng_if_templated.ts'}); diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js index c00684bc8380..1a7c24f8b35a 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/ng_if_templated_partial.js @@ -1,8 +1,8 @@ -.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_templated.ts"
      +.ɵɵelementStart(0, "div");\n // SOURCE: "/ng_if_templated.ts" "
      " … // TODO - map the bindings better // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelementEnd();\n // SOURCE: "/ng_if_templated.ts"
      \n +.ɵɵelementEnd();\n // SOURCE: "/ng_if_templated.ts" "
      \n " … // TODO: the `ctx_r...` appears to be dependent upon previous tests!!! // TODO: expectMapping(mappings, { source: '{{ name }}', generated: 'i0.ɵɵtextInterpolate(ctx_r0.name)', sourceUrl: '../ng_if_templated.ts'}); diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js index eb7e90c3bd36..45cd0d4d8734 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex.js @@ -1,11 +1,11 @@ -i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts" " diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js index 850d425921dd..770917fa4a87 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_complex_partial.js @@ -1,13 +1,13 @@ -.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_complex.ts" ` +.ɵɵelement // SOURCE: "/output_binding_complex.ts" "`" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js index 5621aac266f1..f1d2bb62b421 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand.js @@ -1,8 +1,8 @@ … -i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts" " diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js index 101323ada5e4..eb41b51c55e1 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_longhand_partial.js @@ -1,9 +1,9 @@ … -.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_longhand.ts" ' +.ɵɵelement // SOURCE: "/output_binding_longhand.ts" "'" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js index 64bffc962d77..a8ca0da9f37c 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple.js @@ -1,9 +1,9 @@ -i0.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts" " \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js index d0500d31472c..7352929705e9 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/output_binding_simple_partial.js @@ -1,10 +1,10 @@ -.ɵɵelementStart(0, "button", 0) // SOURCE: "/output_binding_simple.ts" ' \ No newline at end of file +.ɵɵelement // SOURCE: "/output_binding_simple.ts" "'" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js index cd61a51d1e5a..4fc1c50e2145 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection.js @@ -1,11 +1,11 @@ -i0.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts"

      +i0.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts" "

      " … -i0.ɵɵprojection(1) // SOURCE: "/projection.ts" +i0.ɵɵprojection(1) // SOURCE: "/projection.ts" "" … -i0.ɵɵelementEnd() // SOURCE: "/projection.ts"

      +i0.ɵɵelementEnd() // SOURCE: "/projection.ts" "" … -i0.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts"
      +i0.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts" "
      " … -i0.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" +i0.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" "" … -i0.ɵɵelementEnd() // SOURCE: "/projection.ts"
      +i0.ɵɵelementEnd() // SOURCE: "/projection.ts" "
      " diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js index 0185dc6017b9..21adf5773461 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/projection_partial.js @@ -1,11 +1,11 @@ -.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts"

      +.ɵɵelementStart(0, "h3") // SOURCE: "/projection.ts" "

      " … -.ɵɵprojection(1) // SOURCE: "/projection.ts" +.ɵɵprojection(1) // SOURCE: "/projection.ts" "" … -.ɵɵelementEnd() // SOURCE: "/projection.ts"

      \n +.ɵɵelementEnd() // SOURCE: "/projection.ts" "\n " … -.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts"
      +.ɵɵelementStart(2, "div") // SOURCE: "/projection.ts" "
      " … -.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" +.ɵɵprojection(3, 1) // SOURCE: "/projection.ts" "" … -.ɵɵelem // SOURCE: "/projection.ts"
      ` +.ɵɵelem // SOURCE: "/projection.ts" "
      `" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js index 3e3d11b67337..1bb28e8308aa 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element.js @@ -1,5 +1,5 @@ -i0.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts"

      +i0.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts" "

      " … -i0.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" Heading 1 +i0.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" "Heading 1" … -i0.ɵɵelementEnd() // SOURCE: "/simple_element.ts"

      \ No newline at end of file +i0.ɵɵelementEnd() // SOURCE: "/simple_element.ts" "" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js index f17d38c8f191..9f43aafb6451 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/simple_element_partial.js @@ -1,6 +1,6 @@ -.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts"

      +.ɵɵelementStart(0, "h1") // SOURCE: "/simple_element.ts" "

      " … -.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" Heading 1 +.ɵɵtext(1, "Heading 1") // SOURCE: "/simple_element.ts" "Heading 1" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵele // SOURCE: "/simple_element.ts"

      ' \ No newline at end of file +.ɵɵele // SOURCE: "/simple_element.ts" "'" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js index bca96455fc2c..d5bea639d4ee 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/two_way_binding_longhand.js @@ -1,6 +1,6 @@ -i0.ɵɵelementStart(1, "input", 0) // SOURCE: "/two_way_binding_longhand.ts" ' +.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) {\n // SOURCE: "/two_way_binding_longhand.ts" "bindon-ngModel=\"name\">'" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelementEnd() // SOURCE: "/two_way_binding_longhand.ts" ' +.ɵɵlistener("ngModelChange", function TestCmp_Template_input_ngModelChange_1_listener($event) {\n // SOURCE: "/two_way_binding_simple.ts" "[(ngModel)]=\"name\">'" … -.ɵɵelementEnd() // SOURCE: "/two_way_binding_simple.ts" +i0.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts" "
      " … -i0.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" this is a test +i0.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" "this is a test" … -i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
      +i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "
      " … -i0.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts"
      +i0.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts" "
      " … -i0.ɵɵtext(3) // SOURCE: "/update_mode.ts" {{ 1 + 2 }} +i0.ɵɵtext(3) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}" … -i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
      +i0.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "
      " … // NOTE: Update mode -i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" {{ 1 + 2 }} +i0.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js index 27e57418f574..f8f70c1acdda 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/update_mode_partial.js @@ -1,16 +1,16 @@ // NOTE: Creation mode -.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts"
      +.ɵɵelementStart(0, "div") // SOURCE: "/update_mode.ts" "
      " … -.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" this is a test +.ɵɵtext(1, "this is a test") // SOURCE: "/update_mode.ts" "this is a test" … -.ɵɵelementEnd() // SOURCE: "/update_mode.ts"
      +.ɵɵelementEnd() // SOURCE: "/update_mode.ts" "
      " … -.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts"
      +.ɵɵelementStart(2, "div") // SOURCE: "/update_mode.ts" "
      " … -.ɵɵtext(3) // SOURCE: "/update_mode.ts" {{ 1 + 2 }} +.ɵɵtext(3) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}" … // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵelem // SOURCE: "/update_mode.ts"
      ' +.ɵɵelem // SOURCE: "/update_mode.ts" "
      '" … // NOTE: Update mode -.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" {{ 1 + 2 }} +.ɵɵtextInterpolate(1 + 2) // SOURCE: "/update_mode.ts" "{{ 1 + 2 }}" diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js index 92de0706846d..4cc86d92fd75 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element.js @@ -1 +1 @@ -i0.ɵɵelement(0, "hr") // SOURCE: "/void_element.ts"
      \ No newline at end of file +i0.ɵɵelement(0, "hr") // SOURCE: "/void_element.ts" "
      " \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js index 9b47666e3cfe..956c328070a4 100644 --- a/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js +++ b/packages/compiler-cli/test/compliance/test_cases/source_mapping/inline_templates/void_element_partial.js @@ -1,2 +1,2 @@ // TODO: Work out how to fix the broken segment for the last item in a template -.ɵɵel // SOURCE: "/void_element.ts"
      ' \ No newline at end of file +.ɵɵel // SOURCE: "/void_element.ts" "
      '" \ No newline at end of file diff --git a/packages/compiler-cli/test/compliance/test_helpers/sourcemap_helpers.ts b/packages/compiler-cli/test/compliance/test_helpers/sourcemap_helpers.ts index 3b3ec9141261..420068b329dd 100644 --- a/packages/compiler-cli/test/compliance/test_helpers/sourcemap_helpers.ts +++ b/packages/compiler-cli/test/compliance/test_helpers/sourcemap_helpers.ts @@ -17,7 +17,7 @@ import {SourceFileLoader} from '../../../src/ngtsc/sourcemaps'; * comment that has the following syntax: * * ``` - * // SOURCE: "" + * // SOURCE: "" "" * ``` * * The `path/to/original` path will be absolute within the mock file-system, where the root is the @@ -81,7 +81,7 @@ function extractMappings( const mappings: SegmentMapping[] = []; // capture and remove source mapping info expected = expected.replace( - /^(.*?) \/\/ SOURCE: "([^"]*?)" (.*?)$/gm, + /^(.*?) \/\/ SOURCE: "([^"]*?)" "(.*?)"$/gm, (_, rawGenerated: string, rawSourceUrl: string, rawSource: string) => { // Since segments need to appear on a single line in the expected file, any newlines in the // segment being checked must be escaped in the expected file and then unescaped here before @@ -97,8 +97,8 @@ function extractMappings( } function unescape(str: string): string { - const replacements: Record = {'\\n': '\n', '\\r': '\r', '\\\\': '\\'}; - return str.replace(/\\[rn\\]/g, match => replacements[match]); + const replacements: Record = {'\\n': '\n', '\\r': '\r', '\\\\': '\\', '\\"': '\"'}; + return str.replace(/\\[rn"\\]/g, match => replacements[match]); } /** diff --git a/packages/compiler-cli/test/metadata/typescript.mocks.ts b/packages/compiler-cli/test/metadata/typescript.mocks.ts index 7b9e1e143425..657ac8ec6079 100644 --- a/packages/compiler-cli/test/metadata/typescript.mocks.ts +++ b/packages/compiler-cli/test/metadata/typescript.mocks.ts @@ -149,9 +149,6 @@ export class MockNode implements ts.Node { export class MockIdentifier extends MockNode implements ts.Identifier { originalKeywordKind?: ts.SyntaxKind; isInJSDocNamespace?: boolean; - decorators?: ts.NodeArray; - modifiers?: ts.NodeArray; - parent!: ts.Node; public text: string; // TODO(issue/24571): remove '!'. public escapedText!: ts.__String; @@ -167,7 +164,8 @@ export class MockIdentifier extends MockNode implements ts.Identifier { // tslint:enable constructor( - public name: string, public kind: ts.SyntaxKind.Identifier = ts.SyntaxKind.Identifier, + public name: string, + public override kind: ts.SyntaxKind.Identifier = ts.SyntaxKind.Identifier, flags: ts.NodeFlags = 0, pos: number = 0, end: number = 0) { super(kind, flags, pos, end); this.text = name; @@ -175,18 +173,16 @@ export class MockIdentifier extends MockNode implements ts.Identifier { } export class MockVariableDeclaration extends MockNode implements ts.VariableDeclaration { - parent!: ts.VariableDeclarationList|ts.CatchClause; + override parent!: ts.VariableDeclarationList|ts.CatchClause; exclamationToken?: ts.Token; type?: ts.TypeNode; initializer?: ts.Expression; - decorators?: ts.NodeArray; - modifiers?: ts.NodeArray; // tslint:disable-next-line public _declarationBrand: any; constructor( public name: ts.Identifier, - public kind: ts.SyntaxKind.VariableDeclaration = ts.SyntaxKind.VariableDeclaration, + public override kind: ts.SyntaxKind.VariableDeclaration = ts.SyntaxKind.VariableDeclaration, flags: ts.NodeFlags = 0, pos: number = 0, end: number = 0) { super(kind, flags, pos, end); } diff --git a/packages/compiler-cli/test/ngc_spec.ts b/packages/compiler-cli/test/ngc_spec.ts index ed8b9a9f154d..d7c7a0e8873e 100644 --- a/packages/compiler-cli/test/ngc_spec.ts +++ b/packages/compiler-cli/test/ngc_spec.ts @@ -715,7 +715,7 @@ describe('ngc transformer command-line', () => { const mymoduleSource = fs.readFileSync(mymodulejs, 'utf8'); expect(mymoduleSource).toContain('@fileoverview added by tsickle'); expect(mymoduleSource).toContain('@param {?} p'); - expect(mymoduleSource).toMatch(/\/\*\* @nocollapse \*\/\s+MyComp\.ctorParameters = /); + expect(mymoduleSource).toContain('@nocollapse'); }); }); diff --git a/packages/compiler-cli/test/ngtsc/env.ts b/packages/compiler-cli/test/ngtsc/env.ts index 27db4c96a823..d1f4271642e6 100644 --- a/packages/compiler-cli/test/ngtsc/env.ts +++ b/packages/compiler-cli/test/ngtsc/env.ts @@ -329,7 +329,7 @@ class MultiCompileHostExt extends AugmentedCompilerHost implements Partial(); private writtenFiles = new Set(); - getSourceFile( + override getSourceFile( fileName: string, languageVersion: ts.ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): ts.SourceFile|undefined { if (this.cache.has(fileName)) { @@ -346,7 +346,7 @@ class MultiCompileHostExt extends AugmentedCompilerHost implements Partial void)|undefined, sourceFiles?: ReadonlyArray): void { diff --git a/packages/compiler-cli/test/ngtsc/extended_template_diagnostics_spec.ts b/packages/compiler-cli/test/ngtsc/extended_template_diagnostics_spec.ts new file mode 100644 index 000000000000..e00e6fb33714 --- /dev/null +++ b/packages/compiler-cli/test/ngtsc/extended_template_diagnostics_spec.ts @@ -0,0 +1,145 @@ +/** + * @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 * as ts from 'typescript'; +import {ErrorCode, ngErrorCode} from '../../src/ngtsc/diagnostics'; +import {runInEachFileSystem} from '../../src/ngtsc/file_system/testing'; +import {getSourceCodeForDiagnostic, loadStandardTestFiles} from '../../src/ngtsc/testing'; + +import {NgtscTestEnvironment} from './env'; + +const testFiles = loadStandardTestFiles({fakeCore: true, fakeCommon: true}); + +runInEachFileSystem(() => { + describe('ngtsc extended template checks', () => { + let env!: NgtscTestEnvironment; + + beforeEach(() => { + env = NgtscTestEnvironment.setup(testFiles); + env.tsconfig({_extendedTemplateDiagnostics: true, strictTemplates: true}); + }); + + it('should produce invalid banana in box warning', () => { + env.write('test.ts', ` + import {Component} from '@angular/core'; + @Component({ + selector: 'test', + template: '
      ', + }) + class TestCmp { + bar: string = "text"; + } + `); + + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(1); + expect(diags[0].category).toBe(ts.DiagnosticCategory.Warning); + expect(diags[0].code).toBe(ngErrorCode(ErrorCode.INVALID_BANANA_IN_BOX)); + expect(getSourceCodeForDiagnostic(diags[0])).toBe('([notARealThing])="bar"'); + }); + + it('should produce invalid banana in box warning with external html file', () => { + env.write('test.ts', ` + import {Component} from '@angular/core'; + @Component({ + selector: 'test', + templateUrl: './test.html', + }) + class TestCmp { + bar: string = "text"; + } + `); + + env.write('test.html', ` +
      + `); + + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(1); + expect(diags[0].category).toBe(ts.DiagnosticCategory.Warning); + expect(diags[0].code).toBe(ngErrorCode(ErrorCode.INVALID_BANANA_IN_BOX)); + expect(getSourceCodeForDiagnostic(diags[0])).toBe('([notARealThing])="bar"'); + }); + + it('should not produce extended diagnostics if flag is disabled', () => { + env.tsconfig({_extendedTemplateDiagnostics: false}); + env.write('test.ts', ` + import {Component} from '@angular/core'; + @Component({ + selector: 'test', + template: '
      ', + }) + class TestCmp { + bar: string = "text"; + } + `); + + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(0); + }); + + it('should throw error if _extendedTemplateDiagnostics option is enabled and strictTemplates disabled', + () => { + env.tsconfig({_extendedTemplateDiagnostics: true, strictTemplates: false}); + env.write('test.ts', ` + import {Component} from '@angular/core'; + @Component({ + selector: 'test', + template: '
      ', + }) + class TestCmp { + bar: string = "text"; + } + `); + + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(1); + expect(diags[0].messageText) + .toMatch( + /Error: The '_extendedTemplateDiagnostics' option requires 'strictTemplates' to also be enabled./); + }); + + it(`should produce nullish coalescing not nullable warning`, () => { + env.write('test.ts', ` + import {Component} from '@angular/core'; + @Component({ + selector: 'test', + template: '{{ bar ?? "foo" }}', + }) + export class TestCmp { + bar: string = "text"; + } + `); + + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(1); + expect(diags[0].category).toBe(ts.DiagnosticCategory.Warning); + expect(diags[0].code).toBe(ngErrorCode(ErrorCode.NULLISH_COALESCING_NOT_NULLABLE)); + expect(getSourceCodeForDiagnostic(diags[0])).toBe('bar ?? "foo"'); + }); + + it(`should not produce nullish coalescing not nullable warning with strictNullChecks disabled`, + () => { + env.tsconfig( + {_extendedTemplateDiagnostics: true, strictTemplates: true, strictNullChecks: false}); + env.write('test.ts', ` + import {Component} from '@angular/core'; + @Component({ + selector: 'test', + template: '{{ bar ?? "foo" }}', + }) + export class TestCmp { + bar: string = undefined; + } + `); + + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(0); + }); + }); +}); diff --git a/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts b/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts index 7b865e80aabf..64cd47c6a3a1 100644 --- a/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts +++ b/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts @@ -1558,6 +1558,60 @@ function allTests(os: string) { expect(jsContents).toContain('exports: function () { return [BarModule]; }'); }); + it('should use relative import for forward references that were resolved from a relative file', + () => { + env.write('dir.ts', ` + import {Directive, forwardRef} from '@angular/core'; + + export const useFoo = forwardRef(() => Foo); + + @Directive({selector: 'foo'}) + export class Foo {} + `); + env.write('test.ts', ` + import {NgModule} from '@angular/core'; + import {useFoo} from './dir'; + + @NgModule({ + declarations: [useFoo], + }) + export class FooModule {} + `); + + env.driveMain(); + + const jsContents = env.getContents('test.js'); + expect(jsContents).toContain('import * as i1 from "./dir";'); + expect(jsContents).toContain('declarations: [i1.Foo]'); + }); + + it('should use absolute import for forward references that were resolved from an absolute file', + () => { + env.write('dir.ts', ` + import {Directive, forwardRef} from '@angular/core'; + + export const useFoo = forwardRef(() => Foo); + + @Directive({selector: 'foo'}) + export class Foo {} + `); + env.write('test.ts', ` + import {forwardRef, NgModule} from '@angular/core'; + import {useFoo} from 'dir'; + + @NgModule({ + declarations: [useFoo], + }) + export class FooModule {} + `); + + env.driveMain(); + + const jsContents = env.getContents('test.js'); + expect(jsContents).toContain('import * as i1 from "dir";'); + expect(jsContents).toContain('declarations: [i1.Foo]'); + }); + it('should compile Pipes without errors', () => { env.write('test.ts', ` import {Pipe} from '@angular/core'; diff --git a/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts b/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts index 3d28fb584162..a6c5d449544d 100644 --- a/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts +++ b/packages/compiler-cli/test/ngtsc/template_typecheck_spec.ts @@ -11,7 +11,7 @@ import * as ts from 'typescript'; import {ErrorCode, ngErrorCode} from '../../src/ngtsc/diagnostics'; import {absoluteFrom as _, getFileSystem, getSourceFileOrError} from '../../src/ngtsc/file_system'; import {runInEachFileSystem} from '../../src/ngtsc/file_system/testing'; -import {expectCompleteReuse, loadStandardTestFiles} from '../../src/ngtsc/testing'; +import {expectCompleteReuse, getSourceCodeForDiagnostic, loadStandardTestFiles} from '../../src/ngtsc/testing'; import {NgtscTestEnvironment} from './env'; @@ -338,6 +338,85 @@ export declare class AnimationEvent { expect(diags.length).toBe(0); }); + it('should check split two way binding', () => { + env.tsconfig({strictTemplates: true}); + env.write('test.ts', ` + import {Component, Input, NgModule} from '@angular/core'; + + @Component({ + selector: 'test', + template: '', + }) + + export class TestCmp { + counterValue = 0; + } + + @Component({ + selector: 'child-cmp', + template: '', + }) + + export class ChildCmp { + @Input() value = 0; + } + + @NgModule({ + declarations: [TestCmp, ChildCmp], + }) + export class Module {} + `); + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(1); + expect(diags[0].code).toBe(ngErrorCode(ErrorCode.SPLIT_TWO_WAY_BINDING)); + expect(getSourceCodeForDiagnostic(diags[0])).toBe('value'); + expect(diags[0].relatedInformation!.length).toBe(2); + expect(getSourceCodeForDiagnostic(diags[0].relatedInformation![0])).toBe('ChildCmp'); + expect(getSourceCodeForDiagnostic(diags[0].relatedInformation![1])).toBe('child-cmp'); + }); + + it('when input and output go to different directives', () => { + env.tsconfig({strictTemplates: true}); + env.write('test.ts', ` + import {Component, Input, NgModule, Output, Directive} from '@angular/core'; + + @Component({ + selector: 'test', + template: '', + }) + export class TestCmp { + counterValue = 0; + } + + @Directive({ + selector: 'child-cmp' + }) + export class ChildCmpDir { + @Output() valueChange: any; + } + + @Component({ + selector: 'child-cmp', + template: '', + }) + export class ChildCmp { + @Input() value = 0; + } + + @NgModule({ + declarations: [TestCmp, ChildCmp, ChildCmpDir], + }) + export class Module {} + `); + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(1); + expect(diags[0].code).toBe(ngErrorCode(ErrorCode.SPLIT_TWO_WAY_BINDING)); + expect(getSourceCodeForDiagnostic(diags[0])).toBe('value'); + expect(diags[0].relatedInformation!.length).toBe(2); + expect(getSourceCodeForDiagnostic(diags[0].relatedInformation![0])).toBe('ChildCmp'); + expect(getSourceCodeForDiagnostic(diags[0].relatedInformation![1])).toBe('ChildCmpDir'); + }); + describe('strictInputTypes', () => { beforeEach(() => { env.write('test.ts', ` @@ -1007,6 +1086,78 @@ export declare class AnimationEvent { env.driveMain(); }); + // https://github.com/angular/angular/issues/42609 + it('should accept NgFor iteration when trackBy is used with an `any` array', () => { + env.tsconfig({strictTemplates: true}); + env.write('test.ts', ` + import {CommonModule} from '@angular/common'; + import {Component, NgModule} from '@angular/core'; + + interface ItemType { + id: string; + } + + @Component({ + selector: 'test', + template: '
      {{item.name}}
      ', + }) + class TestCmp { + anyList!: any[]; + + trackByBase(index: number, item: ItemType): string { + return item.id; + } + } + + @NgModule({ + declarations: [TestCmp], + imports: [CommonModule], + }) + class Module {} + `); + + env.driveMain(); + }); + + it('should reject NgFor iteration when trackBy is incompatible with item type', () => { + env.tsconfig({strictTemplates: true}); + env.write('test.ts', ` + import {CommonModule} from '@angular/common'; + import {Component, NgModule} from '@angular/core'; + + interface ItemType { + id: string; + } + + interface UnrelatedType { + name: string; + } + + @Component({ + selector: 'test', + template: '
      {{item.name}}
      ', + }) + class TestCmp { + unrelatedList!: UnrelatedType[]; + + trackByBase(index: number, item: ItemType): string { + return item.id; + } + } + + @NgModule({ + declarations: [TestCmp], + imports: [CommonModule], + }) + class Module {} + `); + + const diags = env.driveDiagnostics(); + expect(diags.length).toBe(1); + expect(diags[0].messageText) + .toContain(`is not assignable to type 'TrackByFunction'.`); + }); + it('should infer the context of NgFor', () => { env.tsconfig({strictTemplates: true}); env.write('test.ts', ` @@ -2355,8 +2506,3 @@ export declare class AnimationEvent { }); }); }); - -function getSourceCodeForDiagnostic(diag: ts.Diagnostic): string { - const text = diag.file!.text; - return text.substr(diag.start!, diag.length!); -} diff --git a/packages/compiler-cli/test/transformers/downlevel_decorators_transform_spec.ts b/packages/compiler-cli/test/transformers/downlevel_decorators_transform_spec.ts index 7aa942901c98..eaee4b84da1b 100644 --- a/packages/compiler-cli/test/transformers/downlevel_decorators_transform_spec.ts +++ b/packages/compiler-cli/test/transformers/downlevel_decorators_transform_spec.ts @@ -424,11 +424,18 @@ describe('downlevel decorator transform', () => { expect(diagnostics.length).toBe(0); expect(output).toContain(dedent` + /** @type {!Array<{type: !Function, args: (undefined|!Array)}>} */ MyDir.decorators = [ { type: core_1.Directive } ]; - /** @nocollapse */ - MyDir.ctorParameters = () => [ + /** + * @type {function(): !Array<(null|{ + * type: ?, + * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array)}>), + * })>} + * @nocollapse + */ + MyDir.ctorParameters = () => [ { type: ClassInject } ]; `); diff --git a/packages/compiler/design/architecture.md b/packages/compiler/design/architecture.md index 69efd44d9c6f..5dfc2a13b142 100644 --- a/packages/compiler/design/architecture.md +++ b/packages/compiler/design/architecture.md @@ -296,7 +296,7 @@ Type guards require determining which directives apply to an element to determin Correctly typing an expression that includes a pipe requires determining the result type of the `transform` method of the type. -Additionally, more advanced type-checking as described in [Type Checking Templates](https://goo.gl/Q3tSgP) also requires determining the types of the directives that apply to an element as well as how the attributes map to the properties of the directives. +Additionally, more advanced type-checking also requires determining the types of the directives that apply to an element as well as how the attributes map to the properties of the directives. The types of directives can be found using a selector scope as described for reference inversion. Once a selector scope is produced, the component and directives that apply to an element can be determined from the selector scope. The `.d.ts` changes described above also includes the attribute to property maps. The `TypeGuard`s are recorded as static fields that are included in the `.d.ts` file of the directive. diff --git a/packages/compiler/src/aot/compiler.ts b/packages/compiler/src/aot/compiler.ts index 47db67073a05..f70fd868e929 100644 --- a/packages/compiler/src/aot/compiler.ts +++ b/packages/compiler/src/aot/compiler.ts @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileInjectableMetadata, CompileNgModuleMetadata, CompilePipeMetadata, CompilePipeSummary, CompileProviderMetadata, CompileShallowModuleMetadata, CompileStylesheetMetadata, CompileTypeMetadata, CompileTypeSummary, componentFactoryName, flatten, identifierName, templateSourceUrl} from '../compile_metadata'; +import {CompileDirectiveMetadata, CompileInjectableMetadata, CompileNgModuleMetadata, CompilePipeMetadata, CompilePipeSummary, CompileProviderMetadata, CompileShallowModuleMetadata, CompileStylesheetMetadata, CompileTypeMetadata, CompileTypeSummary, componentFactoryName, flatten, templateSourceUrl} from '../compile_metadata'; import {CompilerConfig} from '../config'; -import {ConstantPool} from '../constant_pool'; +import {ConstantPool, OutputContext} from '../constant_pool'; import {ViewEncapsulation} from '../core'; import {MessageBundle} from '../i18n/message_bundle'; import {createTokenForExternalReference, Identifiers} from '../identifiers'; @@ -19,12 +19,12 @@ import {InterpolationConfig} from '../ml_parser/interpolation_config'; import {NgModuleCompiler} from '../ng_module_compiler'; import {OutputEmitter} from '../output/abstract_emitter'; import * as o from '../output/output_ast'; -import {ParseError} from '../parse_util'; +import {CompileIdentifierMetadata, identifierName, ParseError, syntaxError} from '../parse_util'; import {CompiledStylesheet, StyleCompiler} from '../style_compiler'; import {SummaryResolver} from '../summary_resolver'; import {TemplateAst} from '../template_parser/template_ast'; import {TemplateParser} from '../template_parser/template_parser'; -import {newArray, OutputContext, syntaxError, ValueVisitor, visitValue} from '../util'; +import {newArray, ValueVisitor, visitValue} from '../util'; import {TypeCheckCompiler} from '../view_compiler/type_check_compiler'; import {ViewCompiler, ViewCompileResult} from '../view_compiler/view_compiler'; diff --git a/packages/compiler/src/aot/compiler_factory.ts b/packages/compiler/src/aot/compiler_factory.ts index eeccffff6843..7743555b169f 100644 --- a/packages/compiler/src/aot/compiler_factory.ts +++ b/packages/compiler/src/aot/compiler_factory.ts @@ -19,12 +19,12 @@ import {HtmlParser} from '../ml_parser/html_parser'; import {NgModuleCompiler} from '../ng_module_compiler'; import {NgModuleResolver} from '../ng_module_resolver'; import {TypeScriptEmitter} from '../output/ts_emitter'; +import {syntaxError} from '../parse_util'; import {PipeResolver} from '../pipe_resolver'; import {DomElementSchemaRegistry} from '../schema/dom_element_schema_registry'; import {StyleCompiler} from '../style_compiler'; import {TemplateParser} from '../template_parser/template_parser'; import {UrlResolver} from '../url_resolver'; -import {syntaxError} from '../util'; import {TypeCheckCompiler} from '../view_compiler/type_check_compiler'; import {ViewCompiler} from '../view_compiler/view_compiler'; diff --git a/packages/compiler/src/aot/formatted_error.ts b/packages/compiler/src/aot/formatted_error.ts index 7a26975c5b24..7008329a08b4 100644 --- a/packages/compiler/src/aot/formatted_error.ts +++ b/packages/compiler/src/aot/formatted_error.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {syntaxError} from '../util'; +import {syntaxError} from '../parse_util'; export interface Position { fileName: string; diff --git a/packages/compiler/src/aot/static_reflector.ts b/packages/compiler/src/aot/static_reflector.ts index 563cf3b2243e..e2e7b1e4f185 100644 --- a/packages/compiler/src/aot/static_reflector.ts +++ b/packages/compiler/src/aot/static_reflector.ts @@ -10,8 +10,8 @@ import {CompileSummaryKind} from '../compile_metadata'; import {CompileReflector} from '../compile_reflector'; import {createAttribute, createComponent, createContentChild, createContentChildren, createDirective, createHost, createHostBinding, createHostListener, createInject, createInjectable, createInput, createNgModule, createOptional, createOutput, createPipe, createSelf, createSkipSelf, createViewChild, createViewChildren, MetadataFactory} from '../core'; import * as o from '../output/output_ast'; +import {syntaxError} from '../parse_util'; import {SummaryResolver} from '../summary_resolver'; -import {syntaxError} from '../util'; import {formattedError, FormattedMessageChain} from './formatted_error'; import {StaticSymbol} from './static_symbol'; @@ -1056,7 +1056,7 @@ class PopulatedScope extends BindingScope { super(); } - resolve(name: string): any { + override resolve(name: string): any { return this.bindings.has(name) ? this.bindings.get(name) : BindingScope.missing; } } diff --git a/packages/compiler/src/aot/static_symbol_resolver.ts b/packages/compiler/src/aot/static_symbol_resolver.ts index 9b06465c2c73..4389e6c293b5 100644 --- a/packages/compiler/src/aot/static_symbol_resolver.ts +++ b/packages/compiler/src/aot/static_symbol_resolver.ts @@ -396,7 +396,7 @@ export class StaticSymbolResolver { const self = this; class ReferenceTransformer extends ValueTransformer { - visitStringMap(map: {[key: string]: any}, functionParams: string[]): any { + override visitStringMap(map: {[key: string]: any}, functionParams: string[]): any { const symbolic = map['__symbolic']; if (symbolic === 'function') { const oldLen = functionParams.length; diff --git a/packages/compiler/src/aot/summary_serializer.ts b/packages/compiler/src/aot/summary_serializer.ts index 956910f31163..0587276e08dc 100644 --- a/packages/compiler/src/aot/summary_serializer.ts +++ b/packages/compiler/src/aot/summary_serializer.ts @@ -6,9 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ import {CompileDirectiveMetadata, CompileDirectiveSummary, CompileNgModuleMetadata, CompileNgModuleSummary, CompilePipeMetadata, CompileProviderMetadata, CompileSummaryKind, CompileTypeMetadata, CompileTypeSummary} from '../compile_metadata'; +import {OutputContext} from '../constant_pool'; import * as o from '../output/output_ast'; import {Summary, SummaryResolver} from '../summary_resolver'; -import {OutputContext, ValueTransformer, ValueVisitor, visitValue} from '../util'; +import {ValueTransformer, ValueVisitor, visitValue} from '../util'; import {StaticSymbol, StaticSymbolCache} from './static_symbol'; import {ResolvedStaticSymbol, StaticSymbolResolver, unwrapResolvedMetadata} from './static_symbol_resolver'; @@ -234,7 +235,7 @@ class ToJsonSerializer extends ValueTransformer { return visitValue(value, this, flags); } - visitOther(value: any, context: any): any { + override visitOther(value: any, context: any): any { if (value instanceof StaticSymbol) { let baseSymbol = this.symbolResolver.getStaticSymbol(value.filePath, value.name); const index = this.visitStaticSymbol(baseSymbol, context); @@ -249,7 +250,7 @@ class ToJsonSerializer extends ValueTransformer { * TODO: find out a way to have line and character numbers in errors without * excessive recompilation in bazel. */ - visitStringMap(map: {[key: string]: any}, context: any): any { + override visitStringMap(map: {[key: string]: any}, context: any): any { if (map['__symbolic'] === 'resolved') { return visitValue(map['symbol'], this, context); } @@ -481,7 +482,7 @@ class FromJsonDeserializer extends ValueTransformer { return {moduleName: data.moduleName, summaries, importAs: allImportAs}; } - visitStringMap(map: {[key: string]: any}, context: any): any { + override visitStringMap(map: {[key: string]: any}, context: any): any { if ('__symbol' in map) { const baseSymbol = this.symbols[map['__symbol']]; const members = map['members']; diff --git a/packages/compiler/src/chars.ts b/packages/compiler/src/chars.ts index 5ba122d803a5..4bb0a4ec4ae9 100644 --- a/packages/compiler/src/chars.ts +++ b/packages/compiler/src/chars.ts @@ -98,3 +98,7 @@ export function isNewLine(code: number): boolean { export function isOctalDigit(code: number): boolean { return $0 <= code && code <= $7; } + +export function isQuote(code: number): boolean { + return code === $SQ || code === $DQ || code === $BT; +} diff --git a/packages/compiler/src/compile_metadata.ts b/packages/compiler/src/compile_metadata.ts index b111371da61b..f24046ab4dc7 100644 --- a/packages/compiler/src/compile_metadata.ts +++ b/packages/compiler/src/compile_metadata.ts @@ -10,7 +10,8 @@ import {StaticSymbol} from './aot/static_symbol'; import {ChangeDetectionStrategy, SchemaMetadata, Type, ViewEncapsulation} from './core'; import {LifecycleHooks} from './lifecycle_reflector'; import {ParseTreeResult as HtmlParseTreeResult} from './ml_parser/parser'; -import {splitAtColon, stringify} from './util'; +import {CompileIdentifierMetadata, identifierName, sanitizeIdentifier} from './parse_util'; +import {splitAtColon} from './util'; // group 0: "[prop] or (event) or @trigger" // group 1: "prop" from "[prop]" @@ -18,49 +19,6 @@ import {splitAtColon, stringify} from './util'; // group 3: "@trigger" from "@trigger" const HOST_REG_EXP = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/; -export function sanitizeIdentifier(name: string): string { - return name.replace(/\W/g, '_'); -} - -let _anonymousTypeIndex = 0; - -export function identifierName(compileIdentifier: CompileIdentifierMetadata|null|undefined): string| - null { - if (!compileIdentifier || !compileIdentifier.reference) { - return null; - } - const ref = compileIdentifier.reference; - if (ref instanceof StaticSymbol) { - return ref.name; - } - if (ref['__anonymousType']) { - return ref['__anonymousType']; - } - if (ref['__forward_ref__']) { - // We do not want to try to stringify a `forwardRef()` function because that would cause the - // inner function to be evaluated too early, defeating the whole point of the `forwardRef`. - return '__forward_ref__'; - } - let identifier = stringify(ref); - if (identifier.indexOf('(') >= 0) { - // case: anonymous functions! - identifier = `anonymous_${_anonymousTypeIndex++}`; - ref['__anonymousType'] = identifier; - } else { - identifier = sanitizeIdentifier(identifier); - } - return identifier; -} - -export function identifierModuleUrl(compileIdentifier: CompileIdentifierMetadata): string { - const ref = compileIdentifier.reference; - if (ref instanceof StaticSymbol) { - return ref.filePath; - } - // Runtime type - return `./${stringify(ref)}`; -} - export function viewClassName(compType: any, embeddedTemplateIndex: number): string { return `View_${identifierName({reference: compType})}_${embeddedTemplateIndex}`; } @@ -81,10 +39,6 @@ export interface ProxyClass { setDelegate(delegate: any): void; } -export interface CompileIdentifierMetadata { - reference: any; -} - export enum CompileSummaryKind { Pipe, Directive, diff --git a/packages/compiler/src/compiler.ts b/packages/compiler/src/compiler.ts index af28935d55b1..7bc7b2e357a7 100644 --- a/packages/compiler/src/compiler.ts +++ b/packages/compiler/src/compiler.ts @@ -88,7 +88,7 @@ export * from './selector'; export * from './style_compiler'; export * from './template_parser/template_parser'; export {ViewCompiler} from './view_compiler/view_compiler'; -export {getParseErrors, isSyntaxError, syntaxError, Version} from './util'; +export {Version} from './util'; export {SourceMap} from './output/source_map'; export * from './injectable_compiler_2'; export * from './render3/partial/api'; diff --git a/packages/compiler/src/compiler_facade_interface.ts b/packages/compiler/src/compiler_facade_interface.ts index 3bfb7d2fc168..14ac1a341b0e 100644 --- a/packages/compiler/src/compiler_facade_interface.ts +++ b/packages/compiler/src/compiler_facade_interface.ts @@ -63,7 +63,9 @@ export interface CompilerFacade { createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan; FactoryTarget: typeof FactoryTarget; - ResourceLoader: {new(): ResourceLoader}; + // Note that we do not use `{new(): ResourceLoader}` here because + // the resource loader class is abstract and not constructable. + ResourceLoader: Function&{prototype: ResourceLoader}; } export interface CoreEnvironment { diff --git a/packages/compiler/src/compiler_util/expression_converter.ts b/packages/compiler/src/compiler_util/expression_converter.ts index cd0b50f4b447..157106880757 100644 --- a/packages/compiler/src/compiler_util/expression_converter.ts +++ b/packages/compiler/src/compiler_util/expression_converter.ts @@ -19,7 +19,7 @@ export interface LocalResolver { getLocal(name: string): o.Expression|null; notifyImplicitReceiverUse(): void; globals?: Set; - maybeRestoreView(retrievalLevel: number, localRefLookup: boolean): void; + maybeRestoreView(): void; } export class ConvertActionBindingResult { @@ -300,19 +300,19 @@ class _BuiltinAstConverter extends cdAst.AstTransformer { constructor(private _converterFactory: BuiltinConverterFactory) { super(); } - visitPipe(ast: cdAst.BindingPipe, context: any): any { + override visitPipe(ast: cdAst.BindingPipe, context: any): any { const args = [ast.exp, ...ast.args].map(ast => ast.visit(this, context)); return new BuiltinFunctionCall( ast.span, ast.sourceSpan, args, this._converterFactory.createPipeConverter(ast.name, args.length)); } - visitLiteralArray(ast: cdAst.LiteralArray, context: any): any { + override visitLiteralArray(ast: cdAst.LiteralArray, context: any): any { const args = ast.expressions.map(ast => ast.visit(this, context)); return new BuiltinFunctionCall( ast.span, ast.sourceSpan, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length)); } - visitLiteralMap(ast: cdAst.LiteralMap, context: any): any { + override visitLiteralMap(ast: cdAst.LiteralMap, context: any): any { const args = ast.values.map(ast => ast.visit(this, context)); return new BuiltinFunctionCall( @@ -490,7 +490,7 @@ class _AstToIrVisitor implements cdAst.AstVisitor { const value: o.Expression = this._visit(ast.value, _Mode.Expression); if (obj === this._implicitReceiver) { - this._localResolver.maybeRestoreView(0, false); + this._localResolver.maybeRestoreView(); } return convertToStatementIfNeeded(mode, obj.key(key).set(value)); @@ -1016,7 +1016,7 @@ function convertStmtIntoExpression(stmt: o.Statement): o.Expression|null { export class BuiltinFunctionCall extends cdAst.FunctionCall { constructor( - span: cdAst.ParseSpan, sourceSpan: cdAst.AbsoluteSourceSpan, public args: cdAst.AST[], + span: cdAst.ParseSpan, sourceSpan: cdAst.AbsoluteSourceSpan, args: cdAst.AST[], public converter: BuiltinConverter) { super(span, sourceSpan, null, args); } diff --git a/packages/compiler/src/constant_pool.ts b/packages/compiler/src/constant_pool.ts index 8b119f009484..03d3b2124d27 100644 --- a/packages/compiler/src/constant_pool.ts +++ b/packages/compiler/src/constant_pool.ts @@ -7,7 +7,6 @@ */ import * as o from './output/output_ast'; -import {error, OutputContext} from './util'; const CONSTANT_PREFIX = '_c'; @@ -62,7 +61,7 @@ class FixupExpression extends o.Expression { this.original = resolved; } - visitExpression(visitor: o.ExpressionVisitor, context: any): any { + override visitExpression(visitor: o.ExpressionVisitor, context: any): any { if (context === KEY_CONTEXT) { // When producing a key we want to traverse the constant not the // variable used to refer to it. @@ -72,11 +71,11 @@ class FixupExpression extends o.Expression { } } - isEquivalent(e: o.Expression): boolean { + override isEquivalent(e: o.Expression): boolean { return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved); } - isConstant() { + override isConstant() { return true; } @@ -276,6 +275,13 @@ export class ConstantPool { } } +export interface OutputContext { + genFilePath: string; + statements: o.Statement[]; + constantPool: ConstantPool; + importExpr(reference: any, typeParams?: o.Type[]|null, useSummaries?: boolean): o.Expression; +} + /** * Visitor used to determine if 2 expressions are equivalent and can be shared in the * `ConstantPool`. diff --git a/packages/compiler/src/directive_normalizer.ts b/packages/compiler/src/directive_normalizer.ts index 372db43b145c..3976338d8122 100644 --- a/packages/compiler/src/directive_normalizer.ts +++ b/packages/compiler/src/directive_normalizer.ts @@ -13,11 +13,12 @@ import * as html from './ml_parser/ast'; import {HtmlParser} from './ml_parser/html_parser'; import {InterpolationConfig} from './ml_parser/interpolation_config'; import {ParseTreeResult as HtmlParseTreeResult} from './ml_parser/parser'; +import {syntaxError} from './parse_util'; import {ResourceLoader} from './resource_loader'; import {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver'; import {PreparsedElementType, preparseElement} from './template_parser/template_preparser'; import {UrlResolver} from './url_resolver'; -import {isDefined, stringify, SyncAsync, syntaxError} from './util'; +import {isDefined, stringify, SyncAsync} from './util'; export interface PrenormalizedTemplateMetadata { ngModuleType: any; diff --git a/packages/compiler/src/expression_parser/ast.ts b/packages/compiler/src/expression_parser/ast.ts index 51b5ced0e7fd..3f064620249d 100644 --- a/packages/compiler/src/expression_parser/ast.ts +++ b/packages/compiler/src/expression_parser/ast.ts @@ -24,16 +24,16 @@ export class ParseSpan { } } -export class AST { +export abstract class AST { constructor( public span: ParseSpan, /** * Absolute location of the expression AST in a source code file. */ public sourceSpan: AbsoluteSourceSpan) {} - visit(visitor: AstVisitor, context: any = null): any { - return null; - } + + abstract visit(visitor: AstVisitor, context?: any): any; + toString(): string { return 'AST'; } @@ -65,22 +65,22 @@ export class Quote extends AST { public uninterpretedExpression: string, public location: any) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitQuote(this, context); } - toString(): string { + override toString(): string { return 'Quote'; } } export class EmptyExpr extends AST { - visit(visitor: AstVisitor, context: any = null) { + override visit(visitor: AstVisitor, context: any = null) { // do nothing } } export class ImplicitReceiver extends AST { - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitImplicitReceiver(this, context); } } @@ -94,7 +94,7 @@ export class ImplicitReceiver extends AST { * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future. */ export class ThisReceiver extends ImplicitReceiver { - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitThisReceiver?.(this, context); } } @@ -106,7 +106,7 @@ export class Chain extends AST { constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, public expressions: any[]) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitChain(this, context); } } @@ -117,7 +117,7 @@ export class Conditional extends AST { public falseExp: AST) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitConditional(this, context); } } @@ -128,7 +128,7 @@ export class PropertyRead extends ASTWithName { public receiver: AST, public name: string) { super(span, sourceSpan, nameSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitPropertyRead(this, context); } } @@ -139,7 +139,7 @@ export class PropertyWrite extends ASTWithName { public receiver: AST, public name: string, public value: AST) { super(span, sourceSpan, nameSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitPropertyWrite(this, context); } } @@ -150,7 +150,7 @@ export class SafePropertyRead extends ASTWithName { public receiver: AST, public name: string) { super(span, sourceSpan, nameSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitSafePropertyRead(this, context); } } @@ -160,7 +160,7 @@ export class KeyedRead extends AST { span: ParseSpan, sourceSpan: AbsoluteSourceSpan, public receiver: AST, public key: AST) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitKeyedRead(this, context); } } @@ -170,7 +170,7 @@ export class SafeKeyedRead extends AST { span: ParseSpan, sourceSpan: AbsoluteSourceSpan, public receiver: AST, public key: AST) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitSafeKeyedRead(this, context); } } @@ -181,7 +181,7 @@ export class KeyedWrite extends AST { public value: AST) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitKeyedWrite(this, context); } } @@ -192,7 +192,7 @@ export class BindingPipe extends ASTWithName { public args: any[], nameSpan: AbsoluteSourceSpan) { super(span, sourceSpan, nameSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitPipe(this, context); } } @@ -201,7 +201,7 @@ export class LiteralPrimitive extends AST { constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, public value: any) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitLiteralPrimitive(this, context); } } @@ -210,7 +210,7 @@ export class LiteralArray extends AST { constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, public expressions: any[]) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitLiteralArray(this, context); } } @@ -225,7 +225,7 @@ export class LiteralMap extends AST { public values: any[]) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitLiteralMap(this, context); } } @@ -236,7 +236,7 @@ export class Interpolation extends AST { public expressions: any[]) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitInterpolation(this, context); } } @@ -247,7 +247,7 @@ export class Binary extends AST { public right: AST) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitBinary(this, context); } } @@ -260,9 +260,9 @@ export class Binary extends AST { export class Unary extends Binary { // Redeclare the properties that are inherited from `Binary` as `never`, as consumers should not // depend on these fields when operating on `Unary`. - left: never; - right: never; - operation: never; + override left: never; + override right: never; + override operation: never; /** * Creates a unary minus expression "-x", represented as `Binary` using "0 - x". @@ -290,7 +290,7 @@ export class Unary extends Binary { super(span, sourceSpan, binaryOp, binaryLeft, binaryRight); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { if (visitor.visitUnary !== undefined) { return visitor.visitUnary(this, context); } @@ -302,7 +302,7 @@ export class PrefixNot extends AST { constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, public expression: AST) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitPrefixNot(this, context); } } @@ -311,7 +311,7 @@ export class NonNullAssert extends AST { constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, public expression: AST) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitNonNullAssert(this, context); } } @@ -323,7 +323,7 @@ export class MethodCall extends ASTWithName { public argumentSpan: AbsoluteSourceSpan) { super(span, sourceSpan, nameSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitMethodCall(this, context); } } @@ -335,7 +335,7 @@ export class SafeMethodCall extends ASTWithName { public argumentSpan: AbsoluteSourceSpan) { super(span, sourceSpan, nameSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitSafeMethodCall(this, context); } } @@ -346,7 +346,7 @@ export class FunctionCall extends AST { public args: any[]) { super(span, sourceSpan); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { return visitor.visitFunctionCall(this, context); } } @@ -368,13 +368,13 @@ export class ASTWithSource extends AST { new AbsoluteSourceSpan( absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length)); } - visit(visitor: AstVisitor, context: any = null): any { + override visit(visitor: AstVisitor, context: any = null): any { if (visitor.visitASTWithSource) { return visitor.visitASTWithSource(this, context); } return this.ast.visit(visitor, context); } - toString(): string { + override toString(): string { return `${this.source} in ${this.location}`; } } diff --git a/packages/compiler/src/expression_parser/lexer.ts b/packages/compiler/src/expression_parser/lexer.ts index 39372a4b073d..103e32f78c54 100644 --- a/packages/compiler/src/expression_parser/lexer.ts +++ b/packages/compiler/src/expression_parser/lexer.ts @@ -436,10 +436,6 @@ function isExponentSign(code: number): boolean { return code == chars.$MINUS || code == chars.$PLUS; } -export function isQuote(code: number): boolean { - return code === chars.$SQ || code === chars.$DQ || code === chars.$BT; -} - function unescape(code: number): number { switch (code) { case chars.$n: diff --git a/packages/compiler/src/expression_parser/parser.ts b/packages/compiler/src/expression_parser/parser.ts index 66e5bc2c0639..1c0f10579464 100644 --- a/packages/compiler/src/expression_parser/parser.ts +++ b/packages/compiler/src/expression_parser/parser.ts @@ -10,7 +10,7 @@ import * as chars from '../chars'; import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../ml_parser/interpolation_config'; import {AbsoluteSourceSpan, AST, AstVisitor, ASTWithSource, Binary, BindingPipe, Chain, Conditional, EmptyExpr, ExpressionBinding, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralMapKey, LiteralPrimitive, MethodCall, NonNullAssert, ParserError, ParseSpan, PrefixNot, PropertyRead, PropertyWrite, Quote, RecursiveAstVisitor, SafeKeyedRead, SafeMethodCall, SafePropertyRead, TemplateBinding, TemplateBindingIdentifier, ThisReceiver, Unary, VariableBinding} from './ast'; -import {EOF, isIdentifier, isQuote, Lexer, Token, TokenType} from './lexer'; +import {EOF, isIdentifier, Lexer, Token, TokenType} from './lexer'; export interface InterpolationPiece { text: string; @@ -291,7 +291,7 @@ export class Parser { if (outerQuote === char) { outerQuote = null; - } else if (outerQuote == null && isQuote(char)) { + } else if (outerQuote == null && chars.isQuote(char)) { outerQuote = char; } } @@ -355,7 +355,7 @@ export class Parser { const char = input[i]; // Skip the characters inside quotes. Note that we only care about the outer-most // quotes matching up and we need to account for escape characters. - if (isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === char) && + if (chars.isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === char) && escapeCount % 2 === 0) { currentQuote = currentQuote === null ? char : null; } else if (currentQuote === null) { @@ -367,7 +367,7 @@ export class Parser { } export class IvyParser extends Parser { - simpleExpressionChecker = IvySimpleExpressionChecker; + override simpleExpressionChecker = IvySimpleExpressionChecker; } /** Describes a stateful context an expression parser is in. */ @@ -1371,7 +1371,7 @@ class SimpleExpressionChecker implements AstVisitor { class IvySimpleExpressionChecker extends RecursiveAstVisitor implements SimpleExpressionChecker { errors: string[] = []; - visitPipe() { + override visitPipe() { this.errors.push('pipes'); } } diff --git a/packages/compiler/src/i18n/digest.ts b/packages/compiler/src/i18n/digest.ts index 64afb7adaaeb..5134fe749c4e 100644 --- a/packages/compiler/src/i18n/digest.ts +++ b/packages/compiler/src/i18n/digest.ts @@ -93,7 +93,7 @@ export function serializeNodes(nodes: i18n.Node[]): string[] { * @internal */ class _SerializerIgnoreIcuExpVisitor extends _SerializerVisitor { - visitIcu(icu: i18n.Icu, context: any): any { + override visitIcu(icu: i18n.Icu, context: any): any { let strCases = Object.keys(icu.cases).map((k: string) => `${k} {${icu.cases[k].visit(this)}}`); // Do not take the expression into account return `{${icu.type}, ${strCases.join(', ')}}`; diff --git a/packages/compiler/src/i18n/extractor.ts b/packages/compiler/src/i18n/extractor.ts index 26919b38ceb5..b574db85d0f4 100644 --- a/packages/compiler/src/i18n/extractor.ts +++ b/packages/compiler/src/i18n/extractor.ts @@ -28,7 +28,6 @@ import {NgModuleResolver} from '../ng_module_resolver'; import {ParseError} from '../parse_util'; import {PipeResolver} from '../pipe_resolver'; import {DomElementSchemaRegistry} from '../schema/dom_element_schema_registry'; -import {syntaxError} from '../util'; import {MessageBundle} from './message_bundle'; @@ -41,7 +40,7 @@ import {MessageBundle} from './message_bundle'; export interface ExtractorHost extends StaticSymbolResolverHost, AotSummaryResolverHost { /** * Converts a path that refers to a resource into an absolute filePath - * that can be lateron used for loading the resource via `loadResource. + * that can be later on used for loading the resource via `loadResource. */ resourceNameToFileName(path: string, containingFile: string): string|null; /** diff --git a/packages/compiler/src/i18n/message_bundle.ts b/packages/compiler/src/i18n/message_bundle.ts index b3fa5895384b..3bf6d90a9849 100644 --- a/packages/compiler/src/i18n/message_bundle.ts +++ b/packages/compiler/src/i18n/message_bundle.ts @@ -89,7 +89,8 @@ class MapPlaceholderNames extends i18n.CloneVisitor { return mapper ? nodes.map(n => n.visit(this, mapper)) : nodes; } - visitTagPlaceholder(ph: i18n.TagPlaceholder, mapper: PlaceholderMapper): i18n.TagPlaceholder { + override visitTagPlaceholder(ph: i18n.TagPlaceholder, mapper: PlaceholderMapper): + i18n.TagPlaceholder { const startName = mapper.toPublicName(ph.startName)!; const closeName = ph.closeName ? mapper.toPublicName(ph.closeName)! : ph.closeName; const children = ph.children.map(n => n.visit(this, mapper)); @@ -98,11 +99,12 @@ class MapPlaceholderNames extends i18n.CloneVisitor { ph.startSourceSpan, ph.endSourceSpan); } - visitPlaceholder(ph: i18n.Placeholder, mapper: PlaceholderMapper): i18n.Placeholder { + override visitPlaceholder(ph: i18n.Placeholder, mapper: PlaceholderMapper): i18n.Placeholder { return new i18n.Placeholder(ph.value, mapper.toPublicName(ph.name)!, ph.sourceSpan); } - visitIcuPlaceholder(ph: i18n.IcuPlaceholder, mapper: PlaceholderMapper): i18n.IcuPlaceholder { + override visitIcuPlaceholder(ph: i18n.IcuPlaceholder, mapper: PlaceholderMapper): + i18n.IcuPlaceholder { return new i18n.IcuPlaceholder(ph.value, mapper.toPublicName(ph.name)!, ph.sourceSpan); } } diff --git a/packages/compiler/src/i18n/serializers/serializer.ts b/packages/compiler/src/i18n/serializers/serializer.ts index d8c02f607a2c..effcfa6091f4 100644 --- a/packages/compiler/src/i18n/serializers/serializer.ts +++ b/packages/compiler/src/i18n/serializers/serializer.ts @@ -63,21 +63,21 @@ export class SimplePlaceholderMapper extends i18n.RecurseVisitor implements Plac null; } - visitText(text: i18n.Text, context?: any): any { + override visitText(text: i18n.Text, context?: any): any { return null; } - visitTagPlaceholder(ph: i18n.TagPlaceholder, context?: any): any { + override visitTagPlaceholder(ph: i18n.TagPlaceholder, context?: any): any { this.visitPlaceholderName(ph.startName); super.visitTagPlaceholder(ph, context); this.visitPlaceholderName(ph.closeName); } - visitPlaceholder(ph: i18n.Placeholder, context?: any): any { + override visitPlaceholder(ph: i18n.Placeholder, context?: any): any { this.visitPlaceholderName(ph.name); } - visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): any { + override visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): any { this.visitPlaceholderName(ph.name); } diff --git a/packages/compiler/src/i18n/serializers/xliff.ts b/packages/compiler/src/i18n/serializers/xliff.ts index 260221ba0818..608eff8f5939 100644 --- a/packages/compiler/src/i18n/serializers/xliff.ts +++ b/packages/compiler/src/i18n/serializers/xliff.ts @@ -34,7 +34,7 @@ const _CONTEXT_TAG = 'context'; // https://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html // https://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html export class Xliff extends Serializer { - write(messages: i18n.Message[], locale: string|null): string { + override write(messages: i18n.Message[], locale: string|null): string { const visitor = new _WriteVisitor(); const transUnits: xml.Node[] = []; @@ -92,7 +92,7 @@ export class Xliff extends Serializer { ]); } - load(content: string, url: string): + override load(content: string, url: string): {locale: string, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}} { // xliff to xml nodes const xliffParser = new XliffParser(); @@ -115,7 +115,7 @@ export class Xliff extends Serializer { return {locale: locale!, i18nNodesByMsgId}; } - digest(message: i18n.Message): string { + override digest(message: i18n.Message): string { return digest(message); } } diff --git a/packages/compiler/src/i18n/serializers/xliff2.ts b/packages/compiler/src/i18n/serializers/xliff2.ts index 624143dff2dc..f65ce94f4e4e 100644 --- a/packages/compiler/src/i18n/serializers/xliff2.ts +++ b/packages/compiler/src/i18n/serializers/xliff2.ts @@ -30,7 +30,7 @@ const _UNIT_TAG = 'unit'; // https://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html export class Xliff2 extends Serializer { - write(messages: i18n.Message[], locale: string|null): string { + override write(messages: i18n.Message[], locale: string|null): string { const visitor = new _WriteVisitor(); const units: xml.Node[] = []; @@ -85,7 +85,7 @@ export class Xliff2 extends Serializer { ]); } - load(content: string, url: string): + override load(content: string, url: string): {locale: string, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}} { // xliff to xml nodes const xliff2Parser = new Xliff2Parser(); @@ -108,7 +108,7 @@ export class Xliff2 extends Serializer { return {locale: locale!, i18nNodesByMsgId}; } - digest(message: i18n.Message): string { + override digest(message: i18n.Message): string { return decimalDigest(message); } } diff --git a/packages/compiler/src/i18n/serializers/xmb.ts b/packages/compiler/src/i18n/serializers/xmb.ts index 591bdbf8a6c3..3688454d308d 100644 --- a/packages/compiler/src/i18n/serializers/xmb.ts +++ b/packages/compiler/src/i18n/serializers/xmb.ts @@ -39,7 +39,7 @@ const _DOCTYPE = ` `; export class Xmb extends Serializer { - write(messages: i18n.Message[], locale: string|null): string { + override write(messages: i18n.Message[], locale: string|null): string { const exampleVisitor = new ExampleVisitor(); const visitor = new _Visitor(); let rootNode = new xml.Tag(_MESSAGES_TAG); @@ -80,17 +80,17 @@ export class Xmb extends Serializer { ]); } - load(content: string, url: string): + override load(content: string, url: string): {locale: string, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}} { throw new Error('Unsupported'); } - digest(message: i18n.Message): string { + override digest(message: i18n.Message): string { return digest(message); } - createNameMapper(message: i18n.Message): PlaceholderMapper { + override createNameMapper(message: i18n.Message): PlaceholderMapper { return new SimplePlaceholderMapper(message, toPublicName); } } diff --git a/packages/compiler/src/i18n/serializers/xtb.ts b/packages/compiler/src/i18n/serializers/xtb.ts index ed7eab95f1d7..eb19ad64bdcc 100644 --- a/packages/compiler/src/i18n/serializers/xtb.ts +++ b/packages/compiler/src/i18n/serializers/xtb.ts @@ -19,11 +19,11 @@ const _TRANSLATION_TAG = 'translation'; const _PLACEHOLDER_TAG = 'ph'; export class Xtb extends Serializer { - write(messages: i18n.Message[], locale: string|null): string { + override write(messages: i18n.Message[], locale: string|null): string { throw new Error('Unsupported'); } - load(content: string, url: string): + override load(content: string, url: string): {locale: string, i18nNodesByMsgId: {[msgId: string]: i18n.Node[]}} { // xtb to xml nodes const xtbParser = new XtbParser(); @@ -54,11 +54,11 @@ export class Xtb extends Serializer { return {locale: locale!, i18nNodesByMsgId}; } - digest(message: i18n.Message): string { + override digest(message: i18n.Message): string { return digest(message); } - createNameMapper(message: i18n.Message): PlaceholderMapper { + override createNameMapper(message: i18n.Message): PlaceholderMapper { return new SimplePlaceholderMapper(message, toPublicName); } } diff --git a/packages/compiler/src/injectable_compiler.ts b/packages/compiler/src/injectable_compiler.ts index 533577a6ddb0..8af182b7b33b 100644 --- a/packages/compiler/src/injectable_compiler.ts +++ b/packages/compiler/src/injectable_compiler.ts @@ -7,14 +7,15 @@ */ import {StaticSymbol} from './aot/static_symbol'; -import {CompileInjectableMetadata, identifierName} from './compile_metadata'; +import {CompileInjectableMetadata} from './compile_metadata'; import {CompileReflector} from './compile_reflector'; +import {OutputContext} from './constant_pool'; import {InjectFlags} from './core'; import {Identifiers} from './identifiers'; import * as o from './output/output_ast'; import {convertValueToOutputAst} from './output/value_util'; +import {identifierName} from './parse_util'; import {Identifiers as R3} from './render3/r3_identifiers'; -import {OutputContext} from './util'; type MapEntry = { key: string, diff --git a/packages/compiler/src/jit/compiler.ts b/packages/compiler/src/jit/compiler.ts index d7adba8d9065..ded36fc38faf 100644 --- a/packages/compiler/src/jit/compiler.ts +++ b/packages/compiler/src/jit/compiler.ts @@ -6,21 +6,22 @@ * found in the LICENSE file at https://angular.io/license */ -import {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileNgModuleMetadata, CompilePipeSummary, CompileProviderMetadata, CompileStylesheetMetadata, CompileTypeSummary, identifierName, ngModuleJitUrl, ProviderMeta, ProxyClass, sharedStylesheetJitUrl, templateJitUrl, templateSourceUrl} from '../compile_metadata'; +import {CompileDirectiveMetadata, CompileNgModuleMetadata, CompilePipeSummary, CompileProviderMetadata, CompileTypeSummary, ngModuleJitUrl, ProxyClass, sharedStylesheetJitUrl, templateJitUrl, templateSourceUrl} from '../compile_metadata'; import {CompileReflector} from '../compile_reflector'; import {CompilerConfig} from '../config'; -import {ConstantPool} from '../constant_pool'; +import {ConstantPool, OutputContext} from '../constant_pool'; import {Type} from '../core'; import {CompileMetadataResolver} from '../metadata_resolver'; import {NgModuleCompiler} from '../ng_module_compiler'; import * as ir from '../output/output_ast'; import {interpretStatements} from '../output/output_interpreter'; import {JitEvaluator} from '../output/output_jit'; +import {CompileIdentifierMetadata, identifierName} from '../parse_util'; import {CompiledStylesheet, StyleCompiler} from '../style_compiler'; import {SummaryResolver} from '../summary_resolver'; import {TemplateAst} from '../template_parser/template_ast'; import {TemplateParser} from '../template_parser/template_parser'; -import {Console, OutputContext, stringify, SyncAsync} from '../util'; +import {Console, stringify, SyncAsync} from '../util'; import {ViewCompiler} from '../view_compiler/view_compiler'; export interface ModuleWithComponentFactories { diff --git a/packages/compiler/src/metadata_resolver.ts b/packages/compiler/src/metadata_resolver.ts index 00315c77f520..5127191c4a7d 100644 --- a/packages/compiler/src/metadata_resolver.ts +++ b/packages/compiler/src/metadata_resolver.ts @@ -19,11 +19,12 @@ import {Identifiers} from './identifiers'; import {getAllLifecycleHooks} from './lifecycle_reflector'; import {HtmlParser} from './ml_parser/html_parser'; import {NgModuleResolver} from './ng_module_resolver'; +import {CompileIdentifierMetadata, identifierName, syntaxError} from './parse_util'; import {PipeResolver} from './pipe_resolver'; import {ElementSchemaRegistry} from './schema/element_schema_registry'; import {CssSelector} from './selector'; import {SummaryResolver} from './summary_resolver'; -import {Console, isPromise, noUndefined, resolveForwardRef, stringify, SyncAsync, syntaxError, ValueTransformer, visitValue} from './util'; +import {Console, isPromise, noUndefined, resolveForwardRef, stringify, SyncAsync, ValueTransformer, visitValue} from './util'; export type ErrorCollector = (error: any, type?: any) => void; @@ -130,7 +131,7 @@ export class CompileMetadataResolver { } getHostComponentType(dirType: any): StaticSymbol|cpl.ProxyClass { - const name = `${cpl.identifierName({reference: dirType})}_Host`; + const name = `${identifierName({reference: dirType})}_Host`; if (dirType instanceof StaticSymbol) { return this._staticSymbolCache.get(dirType.filePath, name); } @@ -533,14 +534,14 @@ export class CompileMetadataResolver { if (!meta) { return null; } - const declaredDirectives: cpl.CompileIdentifierMetadata[] = []; - const exportedNonModuleIdentifiers: cpl.CompileIdentifierMetadata[] = []; - const declaredPipes: cpl.CompileIdentifierMetadata[] = []; + const declaredDirectives: CompileIdentifierMetadata[] = []; + const exportedNonModuleIdentifiers: CompileIdentifierMetadata[] = []; + const declaredPipes: CompileIdentifierMetadata[] = []; const importedModules: cpl.CompileNgModuleSummary[] = []; const exportedModules: cpl.CompileNgModuleSummary[] = []; const providers: cpl.CompileProviderMetadata[] = []; const entryComponents: cpl.CompileEntryComponentMetadata[] = []; - const bootstrapComponents: cpl.CompileIdentifierMetadata[] = []; + const bootstrapComponents: CompileIdentifierMetadata[] = []; const schemas: SchemaMetadata[] = []; if (meta.imports) { @@ -672,8 +673,8 @@ export class CompileMetadataResolver { }); } - const exportedDirectives: cpl.CompileIdentifierMetadata[] = []; - const exportedPipes: cpl.CompileIdentifierMetadata[] = []; + const exportedDirectives: CompileIdentifierMetadata[] = []; + const exportedPipes: CompileIdentifierMetadata[] = []; exportedNonModuleIdentifiers.forEach((exportedId) => { if (transitiveModule.directivesSet.has(exportedId.reference)) { exportedDirectives.push(exportedId); @@ -836,7 +837,7 @@ export class CompileMetadataResolver { return result; } - private _getIdentifierMetadata(type: Type): cpl.CompileIdentifierMetadata { + private _getIdentifierMetadata(type: Type): CompileIdentifierMetadata { type = resolveForwardRef(type); return {reference: type}; } @@ -1093,7 +1094,7 @@ export class CompileMetadataResolver { private _getEntryComponentsFromProvider(provider: cpl.ProviderMeta, type?: any): cpl.CompileEntryComponentMetadata[] { const components: cpl.CompileEntryComponentMetadata[] = []; - const collectedIdentifiers: cpl.CompileIdentifierMetadata[] = []; + const collectedIdentifiers: CompileIdentifierMetadata[] = []; if (provider.useFactory || provider.useExisting || provider.useClass) { this._reportError( @@ -1263,12 +1264,12 @@ function isValidType(value: any): boolean { return (value instanceof StaticSymbol) || (value instanceof Type); } -function extractIdentifiers(value: any, targetIdentifiers: cpl.CompileIdentifierMetadata[]) { +function extractIdentifiers(value: any, targetIdentifiers: CompileIdentifierMetadata[]) { visitValue(value, new _CompileValueConverter(), targetIdentifiers); } class _CompileValueConverter extends ValueTransformer { - visitOther(value: any, targetIdentifiers: cpl.CompileIdentifierMetadata[]): any { + override visitOther(value: any, targetIdentifiers: CompileIdentifierMetadata[]): any { targetIdentifiers.push({reference: value}); } } diff --git a/packages/compiler/src/ml_parser/ast.ts b/packages/compiler/src/ml_parser/ast.ts index 274163561a43..7b71ffe9aff9 100644 --- a/packages/compiler/src/ml_parser/ast.ts +++ b/packages/compiler/src/ml_parser/ast.ts @@ -26,7 +26,7 @@ export class Text extends NodeWithI18n { constructor(public value: string, sourceSpan: ParseSourceSpan, i18n?: I18nMeta) { super(sourceSpan, i18n); } - visit(visitor: Visitor, context: any): any { + override visit(visitor: Visitor, context: any): any { return visitor.visitText(this, context); } } @@ -37,7 +37,7 @@ export class Expansion extends NodeWithI18n { sourceSpan: ParseSourceSpan, public switchValueSourceSpan: ParseSourceSpan, i18n?: I18nMeta) { super(sourceSpan, i18n); } - visit(visitor: Visitor, context: any): any { + override visit(visitor: Visitor, context: any): any { return visitor.visitExpansion(this, context); } } @@ -59,7 +59,7 @@ export class Attribute extends NodeWithI18n { i18n?: I18nMeta) { super(sourceSpan, i18n); } - visit(visitor: Visitor, context: any): any { + override visit(visitor: Visitor, context: any): any { return visitor.visitAttribute(this, context); } } @@ -71,7 +71,7 @@ export class Element extends NodeWithI18n { public endSourceSpan: ParseSourceSpan|null = null, i18n?: I18nMeta) { super(sourceSpan, i18n); } - visit(visitor: Visitor, context: any): any { + override visit(visitor: Visitor, context: any): any { return visitor.visitElement(this, context); } } diff --git a/packages/compiler/src/ml_parser/entities.ts b/packages/compiler/src/ml_parser/entities.ts new file mode 100644 index 000000000000..816c795d5e65 --- /dev/null +++ b/packages/compiler/src/ml_parser/entities.ts @@ -0,0 +1,2146 @@ +/** + * @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 + */ + +// Mapping between all HTML entity names and their unicode representation. +// Generated from https://html.spec.whatwg.org/multipage/entities.json by stripping +// the `&` and `;` from the keys and removing the duplicates. +// see https://www.w3.org/TR/html51/syntax.html#named-character-references +export const NAMED_ENTITIES: Record = { + 'AElig': '\u00C6', + 'AMP': '\u0026', + 'amp': '\u0026', + 'Aacute': '\u00C1', + 'Abreve': '\u0102', + 'Acirc': '\u00C2', + 'Acy': '\u0410', + 'Afr': '\uD835\uDD04', + 'Agrave': '\u00C0', + 'Alpha': '\u0391', + 'Amacr': '\u0100', + 'And': '\u2A53', + 'Aogon': '\u0104', + 'Aopf': '\uD835\uDD38', + 'ApplyFunction': '\u2061', + 'af': '\u2061', + 'Aring': '\u00C5', + 'angst': '\u00C5', + 'Ascr': '\uD835\uDC9C', + 'Assign': '\u2254', + 'colone': '\u2254', + 'coloneq': '\u2254', + 'Atilde': '\u00C3', + 'Auml': '\u00C4', + 'Backslash': '\u2216', + 'setminus': '\u2216', + 'setmn': '\u2216', + 'smallsetminus': '\u2216', + 'ssetmn': '\u2216', + 'Barv': '\u2AE7', + 'Barwed': '\u2306', + 'doublebarwedge': '\u2306', + 'Bcy': '\u0411', + 'Because': '\u2235', + 'becaus': '\u2235', + 'because': '\u2235', + 'Bernoullis': '\u212C', + 'Bscr': '\u212C', + 'bernou': '\u212C', + 'Beta': '\u0392', + 'Bfr': '\uD835\uDD05', + 'Bopf': '\uD835\uDD39', + 'Breve': '\u02D8', + 'breve': '\u02D8', + 'Bumpeq': '\u224E', + 'HumpDownHump': '\u224E', + 'bump': '\u224E', + 'CHcy': '\u0427', + 'COPY': '\u00A9', + 'copy': '\u00A9', + 'Cacute': '\u0106', + 'Cap': '\u22D2', + 'CapitalDifferentialD': '\u2145', + 'DD': '\u2145', + 'Cayleys': '\u212D', + 'Cfr': '\u212D', + 'Ccaron': '\u010C', + 'Ccedil': '\u00C7', + 'Ccirc': '\u0108', + 'Cconint': '\u2230', + 'Cdot': '\u010A', + 'Cedilla': '\u00B8', + 'cedil': '\u00B8', + 'CenterDot': '\u00B7', + 'centerdot': '\u00B7', + 'middot': '\u00B7', + 'Chi': '\u03A7', + 'CircleDot': '\u2299', + 'odot': '\u2299', + 'CircleMinus': '\u2296', + 'ominus': '\u2296', + 'CirclePlus': '\u2295', + 'oplus': '\u2295', + 'CircleTimes': '\u2297', + 'otimes': '\u2297', + 'ClockwiseContourIntegral': '\u2232', + 'cwconint': '\u2232', + 'CloseCurlyDoubleQuote': '\u201D', + 'rdquo': '\u201D', + 'rdquor': '\u201D', + 'CloseCurlyQuote': '\u2019', + 'rsquo': '\u2019', + 'rsquor': '\u2019', + 'Colon': '\u2237', + 'Proportion': '\u2237', + 'Colone': '\u2A74', + 'Congruent': '\u2261', + 'equiv': '\u2261', + 'Conint': '\u222F', + 'DoubleContourIntegral': '\u222F', + 'ContourIntegral': '\u222E', + 'conint': '\u222E', + 'oint': '\u222E', + 'Copf': '\u2102', + 'complexes': '\u2102', + 'Coproduct': '\u2210', + 'coprod': '\u2210', + 'CounterClockwiseContourIntegral': '\u2233', + 'awconint': '\u2233', + 'Cross': '\u2A2F', + 'Cscr': '\uD835\uDC9E', + 'Cup': '\u22D3', + 'CupCap': '\u224D', + 'asympeq': '\u224D', + 'DDotrahd': '\u2911', + 'DJcy': '\u0402', + 'DScy': '\u0405', + 'DZcy': '\u040F', + 'Dagger': '\u2021', + 'ddagger': '\u2021', + 'Darr': '\u21A1', + 'Dashv': '\u2AE4', + 'DoubleLeftTee': '\u2AE4', + 'Dcaron': '\u010E', + 'Dcy': '\u0414', + 'Del': '\u2207', + 'nabla': '\u2207', + 'Delta': '\u0394', + 'Dfr': '\uD835\uDD07', + 'DiacriticalAcute': '\u00B4', + 'acute': '\u00B4', + 'DiacriticalDot': '\u02D9', + 'dot': '\u02D9', + 'DiacriticalDoubleAcute': '\u02DD', + 'dblac': '\u02DD', + 'DiacriticalGrave': '\u0060', + 'grave': '\u0060', + 'DiacriticalTilde': '\u02DC', + 'tilde': '\u02DC', + 'Diamond': '\u22C4', + 'diam': '\u22C4', + 'diamond': '\u22C4', + 'DifferentialD': '\u2146', + 'dd': '\u2146', + 'Dopf': '\uD835\uDD3B', + 'Dot': '\u00A8', + 'DoubleDot': '\u00A8', + 'die': '\u00A8', + 'uml': '\u00A8', + 'DotDot': '\u20DC', + 'DotEqual': '\u2250', + 'doteq': '\u2250', + 'esdot': '\u2250', + 'DoubleDownArrow': '\u21D3', + 'Downarrow': '\u21D3', + 'dArr': '\u21D3', + 'DoubleLeftArrow': '\u21D0', + 'Leftarrow': '\u21D0', + 'lArr': '\u21D0', + 'DoubleLeftRightArrow': '\u21D4', + 'Leftrightarrow': '\u21D4', + 'hArr': '\u21D4', + 'iff': '\u21D4', + 'DoubleLongLeftArrow': '\u27F8', + 'Longleftarrow': '\u27F8', + 'xlArr': '\u27F8', + 'DoubleLongLeftRightArrow': '\u27FA', + 'Longleftrightarrow': '\u27FA', + 'xhArr': '\u27FA', + 'DoubleLongRightArrow': '\u27F9', + 'Longrightarrow': '\u27F9', + 'xrArr': '\u27F9', + 'DoubleRightArrow': '\u21D2', + 'Implies': '\u21D2', + 'Rightarrow': '\u21D2', + 'rArr': '\u21D2', + 'DoubleRightTee': '\u22A8', + 'vDash': '\u22A8', + 'DoubleUpArrow': '\u21D1', + 'Uparrow': '\u21D1', + 'uArr': '\u21D1', + 'DoubleUpDownArrow': '\u21D5', + 'Updownarrow': '\u21D5', + 'vArr': '\u21D5', + 'DoubleVerticalBar': '\u2225', + 'par': '\u2225', + 'parallel': '\u2225', + 'shortparallel': '\u2225', + 'spar': '\u2225', + 'DownArrow': '\u2193', + 'ShortDownArrow': '\u2193', + 'darr': '\u2193', + 'downarrow': '\u2193', + 'DownArrowBar': '\u2913', + 'DownArrowUpArrow': '\u21F5', + 'duarr': '\u21F5', + 'DownBreve': '\u0311', + 'DownLeftRightVector': '\u2950', + 'DownLeftTeeVector': '\u295E', + 'DownLeftVector': '\u21BD', + 'leftharpoondown': '\u21BD', + 'lhard': '\u21BD', + 'DownLeftVectorBar': '\u2956', + 'DownRightTeeVector': '\u295F', + 'DownRightVector': '\u21C1', + 'rhard': '\u21C1', + 'rightharpoondown': '\u21C1', + 'DownRightVectorBar': '\u2957', + 'DownTee': '\u22A4', + 'top': '\u22A4', + 'DownTeeArrow': '\u21A7', + 'mapstodown': '\u21A7', + 'Dscr': '\uD835\uDC9F', + 'Dstrok': '\u0110', + 'ENG': '\u014A', + 'ETH': '\u00D0', + 'Eacute': '\u00C9', + 'Ecaron': '\u011A', + 'Ecirc': '\u00CA', + 'Ecy': '\u042D', + 'Edot': '\u0116', + 'Efr': '\uD835\uDD08', + 'Egrave': '\u00C8', + 'Element': '\u2208', + 'in': '\u2208', + 'isin': '\u2208', + 'isinv': '\u2208', + 'Emacr': '\u0112', + 'EmptySmallSquare': '\u25FB', + 'EmptyVerySmallSquare': '\u25AB', + 'Eogon': '\u0118', + 'Eopf': '\uD835\uDD3C', + 'Epsilon': '\u0395', + 'Equal': '\u2A75', + 'EqualTilde': '\u2242', + 'eqsim': '\u2242', + 'esim': '\u2242', + 'Equilibrium': '\u21CC', + 'rightleftharpoons': '\u21CC', + 'rlhar': '\u21CC', + 'Escr': '\u2130', + 'expectation': '\u2130', + 'Esim': '\u2A73', + 'Eta': '\u0397', + 'Euml': '\u00CB', + 'Exists': '\u2203', + 'exist': '\u2203', + 'ExponentialE': '\u2147', + 'ee': '\u2147', + 'exponentiale': '\u2147', + 'Fcy': '\u0424', + 'Ffr': '\uD835\uDD09', + 'FilledSmallSquare': '\u25FC', + 'FilledVerySmallSquare': '\u25AA', + 'blacksquare': '\u25AA', + 'squarf': '\u25AA', + 'squf': '\u25AA', + 'Fopf': '\uD835\uDD3D', + 'ForAll': '\u2200', + 'forall': '\u2200', + 'Fouriertrf': '\u2131', + 'Fscr': '\u2131', + 'GJcy': '\u0403', + 'GT': '\u003E', + 'gt': '\u003E', + 'Gamma': '\u0393', + 'Gammad': '\u03DC', + 'Gbreve': '\u011E', + 'Gcedil': '\u0122', + 'Gcirc': '\u011C', + 'Gcy': '\u0413', + 'Gdot': '\u0120', + 'Gfr': '\uD835\uDD0A', + 'Gg': '\u22D9', + 'ggg': '\u22D9', + 'Gopf': '\uD835\uDD3E', + 'GreaterEqual': '\u2265', + 'ge': '\u2265', + 'geq': '\u2265', + 'GreaterEqualLess': '\u22DB', + 'gel': '\u22DB', + 'gtreqless': '\u22DB', + 'GreaterFullEqual': '\u2267', + 'gE': '\u2267', + 'geqq': '\u2267', + 'GreaterGreater': '\u2AA2', + 'GreaterLess': '\u2277', + 'gl': '\u2277', + 'gtrless': '\u2277', + 'GreaterSlantEqual': '\u2A7E', + 'geqslant': '\u2A7E', + 'ges': '\u2A7E', + 'GreaterTilde': '\u2273', + 'gsim': '\u2273', + 'gtrsim': '\u2273', + 'Gscr': '\uD835\uDCA2', + 'Gt': '\u226B', + 'NestedGreaterGreater': '\u226B', + 'gg': '\u226B', + 'HARDcy': '\u042A', + 'Hacek': '\u02C7', + 'caron': '\u02C7', + 'Hat': '\u005E', + 'Hcirc': '\u0124', + 'Hfr': '\u210C', + 'Poincareplane': '\u210C', + 'HilbertSpace': '\u210B', + 'Hscr': '\u210B', + 'hamilt': '\u210B', + 'Hopf': '\u210D', + 'quaternions': '\u210D', + 'HorizontalLine': '\u2500', + 'boxh': '\u2500', + 'Hstrok': '\u0126', + 'HumpEqual': '\u224F', + 'bumpe': '\u224F', + 'bumpeq': '\u224F', + 'IEcy': '\u0415', + 'IJlig': '\u0132', + 'IOcy': '\u0401', + 'Iacute': '\u00CD', + 'Icirc': '\u00CE', + 'Icy': '\u0418', + 'Idot': '\u0130', + 'Ifr': '\u2111', + 'Im': '\u2111', + 'image': '\u2111', + 'imagpart': '\u2111', + 'Igrave': '\u00CC', + 'Imacr': '\u012A', + 'ImaginaryI': '\u2148', + 'ii': '\u2148', + 'Int': '\u222C', + 'Integral': '\u222B', + 'int': '\u222B', + 'Intersection': '\u22C2', + 'bigcap': '\u22C2', + 'xcap': '\u22C2', + 'InvisibleComma': '\u2063', + 'ic': '\u2063', + 'InvisibleTimes': '\u2062', + 'it': '\u2062', + 'Iogon': '\u012E', + 'Iopf': '\uD835\uDD40', + 'Iota': '\u0399', + 'Iscr': '\u2110', + 'imagline': '\u2110', + 'Itilde': '\u0128', + 'Iukcy': '\u0406', + 'Iuml': '\u00CF', + 'Jcirc': '\u0134', + 'Jcy': '\u0419', + 'Jfr': '\uD835\uDD0D', + 'Jopf': '\uD835\uDD41', + 'Jscr': '\uD835\uDCA5', + 'Jsercy': '\u0408', + 'Jukcy': '\u0404', + 'KHcy': '\u0425', + 'KJcy': '\u040C', + 'Kappa': '\u039A', + 'Kcedil': '\u0136', + 'Kcy': '\u041A', + 'Kfr': '\uD835\uDD0E', + 'Kopf': '\uD835\uDD42', + 'Kscr': '\uD835\uDCA6', + 'LJcy': '\u0409', + 'LT': '\u003C', + 'lt': '\u003C', + 'Lacute': '\u0139', + 'Lambda': '\u039B', + 'Lang': '\u27EA', + 'Laplacetrf': '\u2112', + 'Lscr': '\u2112', + 'lagran': '\u2112', + 'Larr': '\u219E', + 'twoheadleftarrow': '\u219E', + 'Lcaron': '\u013D', + 'Lcedil': '\u013B', + 'Lcy': '\u041B', + 'LeftAngleBracket': '\u27E8', + 'lang': '\u27E8', + 'langle': '\u27E8', + 'LeftArrow': '\u2190', + 'ShortLeftArrow': '\u2190', + 'larr': '\u2190', + 'leftarrow': '\u2190', + 'slarr': '\u2190', + 'LeftArrowBar': '\u21E4', + 'larrb': '\u21E4', + 'LeftArrowRightArrow': '\u21C6', + 'leftrightarrows': '\u21C6', + 'lrarr': '\u21C6', + 'LeftCeiling': '\u2308', + 'lceil': '\u2308', + 'LeftDoubleBracket': '\u27E6', + 'lobrk': '\u27E6', + 'LeftDownTeeVector': '\u2961', + 'LeftDownVector': '\u21C3', + 'dharl': '\u21C3', + 'downharpoonleft': '\u21C3', + 'LeftDownVectorBar': '\u2959', + 'LeftFloor': '\u230A', + 'lfloor': '\u230A', + 'LeftRightArrow': '\u2194', + 'harr': '\u2194', + 'leftrightarrow': '\u2194', + 'LeftRightVector': '\u294E', + 'LeftTee': '\u22A3', + 'dashv': '\u22A3', + 'LeftTeeArrow': '\u21A4', + 'mapstoleft': '\u21A4', + 'LeftTeeVector': '\u295A', + 'LeftTriangle': '\u22B2', + 'vartriangleleft': '\u22B2', + 'vltri': '\u22B2', + 'LeftTriangleBar': '\u29CF', + 'LeftTriangleEqual': '\u22B4', + 'ltrie': '\u22B4', + 'trianglelefteq': '\u22B4', + 'LeftUpDownVector': '\u2951', + 'LeftUpTeeVector': '\u2960', + 'LeftUpVector': '\u21BF', + 'uharl': '\u21BF', + 'upharpoonleft': '\u21BF', + 'LeftUpVectorBar': '\u2958', + 'LeftVector': '\u21BC', + 'leftharpoonup': '\u21BC', + 'lharu': '\u21BC', + 'LeftVectorBar': '\u2952', + 'LessEqualGreater': '\u22DA', + 'leg': '\u22DA', + 'lesseqgtr': '\u22DA', + 'LessFullEqual': '\u2266', + 'lE': '\u2266', + 'leqq': '\u2266', + 'LessGreater': '\u2276', + 'lessgtr': '\u2276', + 'lg': '\u2276', + 'LessLess': '\u2AA1', + 'LessSlantEqual': '\u2A7D', + 'leqslant': '\u2A7D', + 'les': '\u2A7D', + 'LessTilde': '\u2272', + 'lesssim': '\u2272', + 'lsim': '\u2272', + 'Lfr': '\uD835\uDD0F', + 'Ll': '\u22D8', + 'Lleftarrow': '\u21DA', + 'lAarr': '\u21DA', + 'Lmidot': '\u013F', + 'LongLeftArrow': '\u27F5', + 'longleftarrow': '\u27F5', + 'xlarr': '\u27F5', + 'LongLeftRightArrow': '\u27F7', + 'longleftrightarrow': '\u27F7', + 'xharr': '\u27F7', + 'LongRightArrow': '\u27F6', + 'longrightarrow': '\u27F6', + 'xrarr': '\u27F6', + 'Lopf': '\uD835\uDD43', + 'LowerLeftArrow': '\u2199', + 'swarr': '\u2199', + 'swarrow': '\u2199', + 'LowerRightArrow': '\u2198', + 'searr': '\u2198', + 'searrow': '\u2198', + 'Lsh': '\u21B0', + 'lsh': '\u21B0', + 'Lstrok': '\u0141', + 'Lt': '\u226A', + 'NestedLessLess': '\u226A', + 'll': '\u226A', + 'Map': '\u2905', + 'Mcy': '\u041C', + 'MediumSpace': '\u205F', + 'Mellintrf': '\u2133', + 'Mscr': '\u2133', + 'phmmat': '\u2133', + 'Mfr': '\uD835\uDD10', + 'MinusPlus': '\u2213', + 'mnplus': '\u2213', + 'mp': '\u2213', + 'Mopf': '\uD835\uDD44', + 'Mu': '\u039C', + 'NJcy': '\u040A', + 'Nacute': '\u0143', + 'Ncaron': '\u0147', + 'Ncedil': '\u0145', + 'Ncy': '\u041D', + 'NegativeMediumSpace': '\u200B', + 'NegativeThickSpace': '\u200B', + 'NegativeThinSpace': '\u200B', + 'NegativeVeryThinSpace': '\u200B', + 'ZeroWidthSpace': '\u200B', + 'NewLine': '\u000A', + 'Nfr': '\uD835\uDD11', + 'NoBreak': '\u2060', + 'NonBreakingSpace': '\u00A0', + 'nbsp': '\u00A0', + 'Nopf': '\u2115', + 'naturals': '\u2115', + 'Not': '\u2AEC', + 'NotCongruent': '\u2262', + 'nequiv': '\u2262', + 'NotCupCap': '\u226D', + 'NotDoubleVerticalBar': '\u2226', + 'npar': '\u2226', + 'nparallel': '\u2226', + 'nshortparallel': '\u2226', + 'nspar': '\u2226', + 'NotElement': '\u2209', + 'notin': '\u2209', + 'notinva': '\u2209', + 'NotEqual': '\u2260', + 'ne': '\u2260', + 'NotEqualTilde': '\u2242\u0338', + 'nesim': '\u2242\u0338', + 'NotExists': '\u2204', + 'nexist': '\u2204', + 'nexists': '\u2204', + 'NotGreater': '\u226F', + 'ngt': '\u226F', + 'ngtr': '\u226F', + 'NotGreaterEqual': '\u2271', + 'nge': '\u2271', + 'ngeq': '\u2271', + 'NotGreaterFullEqual': '\u2267\u0338', + 'ngE': '\u2267\u0338', + 'ngeqq': '\u2267\u0338', + 'NotGreaterGreater': '\u226B\u0338', + 'nGtv': '\u226B\u0338', + 'NotGreaterLess': '\u2279', + 'ntgl': '\u2279', + 'NotGreaterSlantEqual': '\u2A7E\u0338', + 'ngeqslant': '\u2A7E\u0338', + 'nges': '\u2A7E\u0338', + 'NotGreaterTilde': '\u2275', + 'ngsim': '\u2275', + 'NotHumpDownHump': '\u224E\u0338', + 'nbump': '\u224E\u0338', + 'NotHumpEqual': '\u224F\u0338', + 'nbumpe': '\u224F\u0338', + 'NotLeftTriangle': '\u22EA', + 'nltri': '\u22EA', + 'ntriangleleft': '\u22EA', + 'NotLeftTriangleBar': '\u29CF\u0338', + 'NotLeftTriangleEqual': '\u22EC', + 'nltrie': '\u22EC', + 'ntrianglelefteq': '\u22EC', + 'NotLess': '\u226E', + 'nless': '\u226E', + 'nlt': '\u226E', + 'NotLessEqual': '\u2270', + 'nle': '\u2270', + 'nleq': '\u2270', + 'NotLessGreater': '\u2278', + 'ntlg': '\u2278', + 'NotLessLess': '\u226A\u0338', + 'nLtv': '\u226A\u0338', + 'NotLessSlantEqual': '\u2A7D\u0338', + 'nleqslant': '\u2A7D\u0338', + 'nles': '\u2A7D\u0338', + 'NotLessTilde': '\u2274', + 'nlsim': '\u2274', + 'NotNestedGreaterGreater': '\u2AA2\u0338', + 'NotNestedLessLess': '\u2AA1\u0338', + 'NotPrecedes': '\u2280', + 'npr': '\u2280', + 'nprec': '\u2280', + 'NotPrecedesEqual': '\u2AAF\u0338', + 'npre': '\u2AAF\u0338', + 'npreceq': '\u2AAF\u0338', + 'NotPrecedesSlantEqual': '\u22E0', + 'nprcue': '\u22E0', + 'NotReverseElement': '\u220C', + 'notni': '\u220C', + 'notniva': '\u220C', + 'NotRightTriangle': '\u22EB', + 'nrtri': '\u22EB', + 'ntriangleright': '\u22EB', + 'NotRightTriangleBar': '\u29D0\u0338', + 'NotRightTriangleEqual': '\u22ED', + 'nrtrie': '\u22ED', + 'ntrianglerighteq': '\u22ED', + 'NotSquareSubset': '\u228F\u0338', + 'NotSquareSubsetEqual': '\u22E2', + 'nsqsube': '\u22E2', + 'NotSquareSuperset': '\u2290\u0338', + 'NotSquareSupersetEqual': '\u22E3', + 'nsqsupe': '\u22E3', + 'NotSubset': '\u2282\u20D2', + 'nsubset': '\u2282\u20D2', + 'vnsub': '\u2282\u20D2', + 'NotSubsetEqual': '\u2288', + 'nsube': '\u2288', + 'nsubseteq': '\u2288', + 'NotSucceeds': '\u2281', + 'nsc': '\u2281', + 'nsucc': '\u2281', + 'NotSucceedsEqual': '\u2AB0\u0338', + 'nsce': '\u2AB0\u0338', + 'nsucceq': '\u2AB0\u0338', + 'NotSucceedsSlantEqual': '\u22E1', + 'nsccue': '\u22E1', + 'NotSucceedsTilde': '\u227F\u0338', + 'NotSuperset': '\u2283\u20D2', + 'nsupset': '\u2283\u20D2', + 'vnsup': '\u2283\u20D2', + 'NotSupersetEqual': '\u2289', + 'nsupe': '\u2289', + 'nsupseteq': '\u2289', + 'NotTilde': '\u2241', + 'nsim': '\u2241', + 'NotTildeEqual': '\u2244', + 'nsime': '\u2244', + 'nsimeq': '\u2244', + 'NotTildeFullEqual': '\u2247', + 'ncong': '\u2247', + 'NotTildeTilde': '\u2249', + 'nap': '\u2249', + 'napprox': '\u2249', + 'NotVerticalBar': '\u2224', + 'nmid': '\u2224', + 'nshortmid': '\u2224', + 'nsmid': '\u2224', + 'Nscr': '\uD835\uDCA9', + 'Ntilde': '\u00D1', + 'Nu': '\u039D', + 'OElig': '\u0152', + 'Oacute': '\u00D3', + 'Ocirc': '\u00D4', + 'Ocy': '\u041E', + 'Odblac': '\u0150', + 'Ofr': '\uD835\uDD12', + 'Ograve': '\u00D2', + 'Omacr': '\u014C', + 'Omega': '\u03A9', + 'ohm': '\u03A9', + 'Omicron': '\u039F', + 'Oopf': '\uD835\uDD46', + 'OpenCurlyDoubleQuote': '\u201C', + 'ldquo': '\u201C', + 'OpenCurlyQuote': '\u2018', + 'lsquo': '\u2018', + 'Or': '\u2A54', + 'Oscr': '\uD835\uDCAA', + 'Oslash': '\u00D8', + 'Otilde': '\u00D5', + 'Otimes': '\u2A37', + 'Ouml': '\u00D6', + 'OverBar': '\u203E', + 'oline': '\u203E', + 'OverBrace': '\u23DE', + 'OverBracket': '\u23B4', + 'tbrk': '\u23B4', + 'OverParenthesis': '\u23DC', + 'PartialD': '\u2202', + 'part': '\u2202', + 'Pcy': '\u041F', + 'Pfr': '\uD835\uDD13', + 'Phi': '\u03A6', + 'Pi': '\u03A0', + 'PlusMinus': '\u00B1', + 'plusmn': '\u00B1', + 'pm': '\u00B1', + 'Popf': '\u2119', + 'primes': '\u2119', + 'Pr': '\u2ABB', + 'Precedes': '\u227A', + 'pr': '\u227A', + 'prec': '\u227A', + 'PrecedesEqual': '\u2AAF', + 'pre': '\u2AAF', + 'preceq': '\u2AAF', + 'PrecedesSlantEqual': '\u227C', + 'prcue': '\u227C', + 'preccurlyeq': '\u227C', + 'PrecedesTilde': '\u227E', + 'precsim': '\u227E', + 'prsim': '\u227E', + 'Prime': '\u2033', + 'Product': '\u220F', + 'prod': '\u220F', + 'Proportional': '\u221D', + 'prop': '\u221D', + 'propto': '\u221D', + 'varpropto': '\u221D', + 'vprop': '\u221D', + 'Pscr': '\uD835\uDCAB', + 'Psi': '\u03A8', + 'QUOT': '\u0022', + 'quot': '\u0022', + 'Qfr': '\uD835\uDD14', + 'Qopf': '\u211A', + 'rationals': '\u211A', + 'Qscr': '\uD835\uDCAC', + 'RBarr': '\u2910', + 'drbkarow': '\u2910', + 'REG': '\u00AE', + 'circledR': '\u00AE', + 'reg': '\u00AE', + 'Racute': '\u0154', + 'Rang': '\u27EB', + 'Rarr': '\u21A0', + 'twoheadrightarrow': '\u21A0', + 'Rarrtl': '\u2916', + 'Rcaron': '\u0158', + 'Rcedil': '\u0156', + 'Rcy': '\u0420', + 'Re': '\u211C', + 'Rfr': '\u211C', + 'real': '\u211C', + 'realpart': '\u211C', + 'ReverseElement': '\u220B', + 'SuchThat': '\u220B', + 'ni': '\u220B', + 'niv': '\u220B', + 'ReverseEquilibrium': '\u21CB', + 'leftrightharpoons': '\u21CB', + 'lrhar': '\u21CB', + 'ReverseUpEquilibrium': '\u296F', + 'duhar': '\u296F', + 'Rho': '\u03A1', + 'RightAngleBracket': '\u27E9', + 'rang': '\u27E9', + 'rangle': '\u27E9', + 'RightArrow': '\u2192', + 'ShortRightArrow': '\u2192', + 'rarr': '\u2192', + 'rightarrow': '\u2192', + 'srarr': '\u2192', + 'RightArrowBar': '\u21E5', + 'rarrb': '\u21E5', + 'RightArrowLeftArrow': '\u21C4', + 'rightleftarrows': '\u21C4', + 'rlarr': '\u21C4', + 'RightCeiling': '\u2309', + 'rceil': '\u2309', + 'RightDoubleBracket': '\u27E7', + 'robrk': '\u27E7', + 'RightDownTeeVector': '\u295D', + 'RightDownVector': '\u21C2', + 'dharr': '\u21C2', + 'downharpoonright': '\u21C2', + 'RightDownVectorBar': '\u2955', + 'RightFloor': '\u230B', + 'rfloor': '\u230B', + 'RightTee': '\u22A2', + 'vdash': '\u22A2', + 'RightTeeArrow': '\u21A6', + 'map': '\u21A6', + 'mapsto': '\u21A6', + 'RightTeeVector': '\u295B', + 'RightTriangle': '\u22B3', + 'vartriangleright': '\u22B3', + 'vrtri': '\u22B3', + 'RightTriangleBar': '\u29D0', + 'RightTriangleEqual': '\u22B5', + 'rtrie': '\u22B5', + 'trianglerighteq': '\u22B5', + 'RightUpDownVector': '\u294F', + 'RightUpTeeVector': '\u295C', + 'RightUpVector': '\u21BE', + 'uharr': '\u21BE', + 'upharpoonright': '\u21BE', + 'RightUpVectorBar': '\u2954', + 'RightVector': '\u21C0', + 'rharu': '\u21C0', + 'rightharpoonup': '\u21C0', + 'RightVectorBar': '\u2953', + 'Ropf': '\u211D', + 'reals': '\u211D', + 'RoundImplies': '\u2970', + 'Rrightarrow': '\u21DB', + 'rAarr': '\u21DB', + 'Rscr': '\u211B', + 'realine': '\u211B', + 'Rsh': '\u21B1', + 'rsh': '\u21B1', + 'RuleDelayed': '\u29F4', + 'SHCHcy': '\u0429', + 'SHcy': '\u0428', + 'SOFTcy': '\u042C', + 'Sacute': '\u015A', + 'Sc': '\u2ABC', + 'Scaron': '\u0160', + 'Scedil': '\u015E', + 'Scirc': '\u015C', + 'Scy': '\u0421', + 'Sfr': '\uD835\uDD16', + 'ShortUpArrow': '\u2191', + 'UpArrow': '\u2191', + 'uarr': '\u2191', + 'uparrow': '\u2191', + 'Sigma': '\u03A3', + 'SmallCircle': '\u2218', + 'compfn': '\u2218', + 'Sopf': '\uD835\uDD4A', + 'Sqrt': '\u221A', + 'radic': '\u221A', + 'Square': '\u25A1', + 'squ': '\u25A1', + 'square': '\u25A1', + 'SquareIntersection': '\u2293', + 'sqcap': '\u2293', + 'SquareSubset': '\u228F', + 'sqsub': '\u228F', + 'sqsubset': '\u228F', + 'SquareSubsetEqual': '\u2291', + 'sqsube': '\u2291', + 'sqsubseteq': '\u2291', + 'SquareSuperset': '\u2290', + 'sqsup': '\u2290', + 'sqsupset': '\u2290', + 'SquareSupersetEqual': '\u2292', + 'sqsupe': '\u2292', + 'sqsupseteq': '\u2292', + 'SquareUnion': '\u2294', + 'sqcup': '\u2294', + 'Sscr': '\uD835\uDCAE', + 'Star': '\u22C6', + 'sstarf': '\u22C6', + 'Sub': '\u22D0', + 'Subset': '\u22D0', + 'SubsetEqual': '\u2286', + 'sube': '\u2286', + 'subseteq': '\u2286', + 'Succeeds': '\u227B', + 'sc': '\u227B', + 'succ': '\u227B', + 'SucceedsEqual': '\u2AB0', + 'sce': '\u2AB0', + 'succeq': '\u2AB0', + 'SucceedsSlantEqual': '\u227D', + 'sccue': '\u227D', + 'succcurlyeq': '\u227D', + 'SucceedsTilde': '\u227F', + 'scsim': '\u227F', + 'succsim': '\u227F', + 'Sum': '\u2211', + 'sum': '\u2211', + 'Sup': '\u22D1', + 'Supset': '\u22D1', + 'Superset': '\u2283', + 'sup': '\u2283', + 'supset': '\u2283', + 'SupersetEqual': '\u2287', + 'supe': '\u2287', + 'supseteq': '\u2287', + 'THORN': '\u00DE', + 'TRADE': '\u2122', + 'trade': '\u2122', + 'TSHcy': '\u040B', + 'TScy': '\u0426', + 'Tab': '\u0009', + 'Tau': '\u03A4', + 'Tcaron': '\u0164', + 'Tcedil': '\u0162', + 'Tcy': '\u0422', + 'Tfr': '\uD835\uDD17', + 'Therefore': '\u2234', + 'there4': '\u2234', + 'therefore': '\u2234', + 'Theta': '\u0398', + 'ThickSpace': '\u205F\u200A', + 'ThinSpace': '\u2009', + 'thinsp': '\u2009', + 'Tilde': '\u223C', + 'sim': '\u223C', + 'thicksim': '\u223C', + 'thksim': '\u223C', + 'TildeEqual': '\u2243', + 'sime': '\u2243', + 'simeq': '\u2243', + 'TildeFullEqual': '\u2245', + 'cong': '\u2245', + 'TildeTilde': '\u2248', + 'ap': '\u2248', + 'approx': '\u2248', + 'asymp': '\u2248', + 'thickapprox': '\u2248', + 'thkap': '\u2248', + 'Topf': '\uD835\uDD4B', + 'TripleDot': '\u20DB', + 'tdot': '\u20DB', + 'Tscr': '\uD835\uDCAF', + 'Tstrok': '\u0166', + 'Uacute': '\u00DA', + 'Uarr': '\u219F', + 'Uarrocir': '\u2949', + 'Ubrcy': '\u040E', + 'Ubreve': '\u016C', + 'Ucirc': '\u00DB', + 'Ucy': '\u0423', + 'Udblac': '\u0170', + 'Ufr': '\uD835\uDD18', + 'Ugrave': '\u00D9', + 'Umacr': '\u016A', + 'UnderBar': '\u005F', + 'lowbar': '\u005F', + 'UnderBrace': '\u23DF', + 'UnderBracket': '\u23B5', + 'bbrk': '\u23B5', + 'UnderParenthesis': '\u23DD', + 'Union': '\u22C3', + 'bigcup': '\u22C3', + 'xcup': '\u22C3', + 'UnionPlus': '\u228E', + 'uplus': '\u228E', + 'Uogon': '\u0172', + 'Uopf': '\uD835\uDD4C', + 'UpArrowBar': '\u2912', + 'UpArrowDownArrow': '\u21C5', + 'udarr': '\u21C5', + 'UpDownArrow': '\u2195', + 'updownarrow': '\u2195', + 'varr': '\u2195', + 'UpEquilibrium': '\u296E', + 'udhar': '\u296E', + 'UpTee': '\u22A5', + 'bot': '\u22A5', + 'bottom': '\u22A5', + 'perp': '\u22A5', + 'UpTeeArrow': '\u21A5', + 'mapstoup': '\u21A5', + 'UpperLeftArrow': '\u2196', + 'nwarr': '\u2196', + 'nwarrow': '\u2196', + 'UpperRightArrow': '\u2197', + 'nearr': '\u2197', + 'nearrow': '\u2197', + 'Upsi': '\u03D2', + 'upsih': '\u03D2', + 'Upsilon': '\u03A5', + 'Uring': '\u016E', + 'Uscr': '\uD835\uDCB0', + 'Utilde': '\u0168', + 'Uuml': '\u00DC', + 'VDash': '\u22AB', + 'Vbar': '\u2AEB', + 'Vcy': '\u0412', + 'Vdash': '\u22A9', + 'Vdashl': '\u2AE6', + 'Vee': '\u22C1', + 'bigvee': '\u22C1', + 'xvee': '\u22C1', + 'Verbar': '\u2016', + 'Vert': '\u2016', + 'VerticalBar': '\u2223', + 'mid': '\u2223', + 'shortmid': '\u2223', + 'smid': '\u2223', + 'VerticalLine': '\u007C', + 'verbar': '\u007C', + 'vert': '\u007C', + 'VerticalSeparator': '\u2758', + 'VerticalTilde': '\u2240', + 'wr': '\u2240', + 'wreath': '\u2240', + 'VeryThinSpace': '\u200A', + 'hairsp': '\u200A', + 'Vfr': '\uD835\uDD19', + 'Vopf': '\uD835\uDD4D', + 'Vscr': '\uD835\uDCB1', + 'Vvdash': '\u22AA', + 'Wcirc': '\u0174', + 'Wedge': '\u22C0', + 'bigwedge': '\u22C0', + 'xwedge': '\u22C0', + 'Wfr': '\uD835\uDD1A', + 'Wopf': '\uD835\uDD4E', + 'Wscr': '\uD835\uDCB2', + 'Xfr': '\uD835\uDD1B', + 'Xi': '\u039E', + 'Xopf': '\uD835\uDD4F', + 'Xscr': '\uD835\uDCB3', + 'YAcy': '\u042F', + 'YIcy': '\u0407', + 'YUcy': '\u042E', + 'Yacute': '\u00DD', + 'Ycirc': '\u0176', + 'Ycy': '\u042B', + 'Yfr': '\uD835\uDD1C', + 'Yopf': '\uD835\uDD50', + 'Yscr': '\uD835\uDCB4', + 'Yuml': '\u0178', + 'ZHcy': '\u0416', + 'Zacute': '\u0179', + 'Zcaron': '\u017D', + 'Zcy': '\u0417', + 'Zdot': '\u017B', + 'Zeta': '\u0396', + 'Zfr': '\u2128', + 'zeetrf': '\u2128', + 'Zopf': '\u2124', + 'integers': '\u2124', + 'Zscr': '\uD835\uDCB5', + 'aacute': '\u00E1', + 'abreve': '\u0103', + 'ac': '\u223E', + 'mstpos': '\u223E', + 'acE': '\u223E\u0333', + 'acd': '\u223F', + 'acirc': '\u00E2', + 'acy': '\u0430', + 'aelig': '\u00E6', + 'afr': '\uD835\uDD1E', + 'agrave': '\u00E0', + 'alefsym': '\u2135', + 'aleph': '\u2135', + 'alpha': '\u03B1', + 'amacr': '\u0101', + 'amalg': '\u2A3F', + 'and': '\u2227', + 'wedge': '\u2227', + 'andand': '\u2A55', + 'andd': '\u2A5C', + 'andslope': '\u2A58', + 'andv': '\u2A5A', + 'ang': '\u2220', + 'angle': '\u2220', + 'ange': '\u29A4', + 'angmsd': '\u2221', + 'measuredangle': '\u2221', + 'angmsdaa': '\u29A8', + 'angmsdab': '\u29A9', + 'angmsdac': '\u29AA', + 'angmsdad': '\u29AB', + 'angmsdae': '\u29AC', + 'angmsdaf': '\u29AD', + 'angmsdag': '\u29AE', + 'angmsdah': '\u29AF', + 'angrt': '\u221F', + 'angrtvb': '\u22BE', + 'angrtvbd': '\u299D', + 'angsph': '\u2222', + 'angzarr': '\u237C', + 'aogon': '\u0105', + 'aopf': '\uD835\uDD52', + 'apE': '\u2A70', + 'apacir': '\u2A6F', + 'ape': '\u224A', + 'approxeq': '\u224A', + 'apid': '\u224B', + 'apos': '\u0027', + 'aring': '\u00E5', + 'ascr': '\uD835\uDCB6', + 'ast': '\u002A', + 'midast': '\u002A', + 'atilde': '\u00E3', + 'auml': '\u00E4', + 'awint': '\u2A11', + 'bNot': '\u2AED', + 'backcong': '\u224C', + 'bcong': '\u224C', + 'backepsilon': '\u03F6', + 'bepsi': '\u03F6', + 'backprime': '\u2035', + 'bprime': '\u2035', + 'backsim': '\u223D', + 'bsim': '\u223D', + 'backsimeq': '\u22CD', + 'bsime': '\u22CD', + 'barvee': '\u22BD', + 'barwed': '\u2305', + 'barwedge': '\u2305', + 'bbrktbrk': '\u23B6', + 'bcy': '\u0431', + 'bdquo': '\u201E', + 'ldquor': '\u201E', + 'bemptyv': '\u29B0', + 'beta': '\u03B2', + 'beth': '\u2136', + 'between': '\u226C', + 'twixt': '\u226C', + 'bfr': '\uD835\uDD1F', + 'bigcirc': '\u25EF', + 'xcirc': '\u25EF', + 'bigodot': '\u2A00', + 'xodot': '\u2A00', + 'bigoplus': '\u2A01', + 'xoplus': '\u2A01', + 'bigotimes': '\u2A02', + 'xotime': '\u2A02', + 'bigsqcup': '\u2A06', + 'xsqcup': '\u2A06', + 'bigstar': '\u2605', + 'starf': '\u2605', + 'bigtriangledown': '\u25BD', + 'xdtri': '\u25BD', + 'bigtriangleup': '\u25B3', + 'xutri': '\u25B3', + 'biguplus': '\u2A04', + 'xuplus': '\u2A04', + 'bkarow': '\u290D', + 'rbarr': '\u290D', + 'blacklozenge': '\u29EB', + 'lozf': '\u29EB', + 'blacktriangle': '\u25B4', + 'utrif': '\u25B4', + 'blacktriangledown': '\u25BE', + 'dtrif': '\u25BE', + 'blacktriangleleft': '\u25C2', + 'ltrif': '\u25C2', + 'blacktriangleright': '\u25B8', + 'rtrif': '\u25B8', + 'blank': '\u2423', + 'blk12': '\u2592', + 'blk14': '\u2591', + 'blk34': '\u2593', + 'block': '\u2588', + 'bne': '\u003D\u20E5', + 'bnequiv': '\u2261\u20E5', + 'bnot': '\u2310', + 'bopf': '\uD835\uDD53', + 'bowtie': '\u22C8', + 'boxDL': '\u2557', + 'boxDR': '\u2554', + 'boxDl': '\u2556', + 'boxDr': '\u2553', + 'boxH': '\u2550', + 'boxHD': '\u2566', + 'boxHU': '\u2569', + 'boxHd': '\u2564', + 'boxHu': '\u2567', + 'boxUL': '\u255D', + 'boxUR': '\u255A', + 'boxUl': '\u255C', + 'boxUr': '\u2559', + 'boxV': '\u2551', + 'boxVH': '\u256C', + 'boxVL': '\u2563', + 'boxVR': '\u2560', + 'boxVh': '\u256B', + 'boxVl': '\u2562', + 'boxVr': '\u255F', + 'boxbox': '\u29C9', + 'boxdL': '\u2555', + 'boxdR': '\u2552', + 'boxdl': '\u2510', + 'boxdr': '\u250C', + 'boxhD': '\u2565', + 'boxhU': '\u2568', + 'boxhd': '\u252C', + 'boxhu': '\u2534', + 'boxminus': '\u229F', + 'minusb': '\u229F', + 'boxplus': '\u229E', + 'plusb': '\u229E', + 'boxtimes': '\u22A0', + 'timesb': '\u22A0', + 'boxuL': '\u255B', + 'boxuR': '\u2558', + 'boxul': '\u2518', + 'boxur': '\u2514', + 'boxv': '\u2502', + 'boxvH': '\u256A', + 'boxvL': '\u2561', + 'boxvR': '\u255E', + 'boxvh': '\u253C', + 'boxvl': '\u2524', + 'boxvr': '\u251C', + 'brvbar': '\u00A6', + 'bscr': '\uD835\uDCB7', + 'bsemi': '\u204F', + 'bsol': '\u005C', + 'bsolb': '\u29C5', + 'bsolhsub': '\u27C8', + 'bull': '\u2022', + 'bullet': '\u2022', + 'bumpE': '\u2AAE', + 'cacute': '\u0107', + 'cap': '\u2229', + 'capand': '\u2A44', + 'capbrcup': '\u2A49', + 'capcap': '\u2A4B', + 'capcup': '\u2A47', + 'capdot': '\u2A40', + 'caps': '\u2229\uFE00', + 'caret': '\u2041', + 'ccaps': '\u2A4D', + 'ccaron': '\u010D', + 'ccedil': '\u00E7', + 'ccirc': '\u0109', + 'ccups': '\u2A4C', + 'ccupssm': '\u2A50', + 'cdot': '\u010B', + 'cemptyv': '\u29B2', + 'cent': '\u00A2', + 'cfr': '\uD835\uDD20', + 'chcy': '\u0447', + 'check': '\u2713', + 'checkmark': '\u2713', + 'chi': '\u03C7', + 'cir': '\u25CB', + 'cirE': '\u29C3', + 'circ': '\u02C6', + 'circeq': '\u2257', + 'cire': '\u2257', + 'circlearrowleft': '\u21BA', + 'olarr': '\u21BA', + 'circlearrowright': '\u21BB', + 'orarr': '\u21BB', + 'circledS': '\u24C8', + 'oS': '\u24C8', + 'circledast': '\u229B', + 'oast': '\u229B', + 'circledcirc': '\u229A', + 'ocir': '\u229A', + 'circleddash': '\u229D', + 'odash': '\u229D', + 'cirfnint': '\u2A10', + 'cirmid': '\u2AEF', + 'cirscir': '\u29C2', + 'clubs': '\u2663', + 'clubsuit': '\u2663', + 'colon': '\u003A', + 'comma': '\u002C', + 'commat': '\u0040', + 'comp': '\u2201', + 'complement': '\u2201', + 'congdot': '\u2A6D', + 'copf': '\uD835\uDD54', + 'copysr': '\u2117', + 'crarr': '\u21B5', + 'cross': '\u2717', + 'cscr': '\uD835\uDCB8', + 'csub': '\u2ACF', + 'csube': '\u2AD1', + 'csup': '\u2AD0', + 'csupe': '\u2AD2', + 'ctdot': '\u22EF', + 'cudarrl': '\u2938', + 'cudarrr': '\u2935', + 'cuepr': '\u22DE', + 'curlyeqprec': '\u22DE', + 'cuesc': '\u22DF', + 'curlyeqsucc': '\u22DF', + 'cularr': '\u21B6', + 'curvearrowleft': '\u21B6', + 'cularrp': '\u293D', + 'cup': '\u222A', + 'cupbrcap': '\u2A48', + 'cupcap': '\u2A46', + 'cupcup': '\u2A4A', + 'cupdot': '\u228D', + 'cupor': '\u2A45', + 'cups': '\u222A\uFE00', + 'curarr': '\u21B7', + 'curvearrowright': '\u21B7', + 'curarrm': '\u293C', + 'curlyvee': '\u22CE', + 'cuvee': '\u22CE', + 'curlywedge': '\u22CF', + 'cuwed': '\u22CF', + 'curren': '\u00A4', + 'cwint': '\u2231', + 'cylcty': '\u232D', + 'dHar': '\u2965', + 'dagger': '\u2020', + 'daleth': '\u2138', + 'dash': '\u2010', + 'hyphen': '\u2010', + 'dbkarow': '\u290F', + 'rBarr': '\u290F', + 'dcaron': '\u010F', + 'dcy': '\u0434', + 'ddarr': '\u21CA', + 'downdownarrows': '\u21CA', + 'ddotseq': '\u2A77', + 'eDDot': '\u2A77', + 'deg': '\u00B0', + 'delta': '\u03B4', + 'demptyv': '\u29B1', + 'dfisht': '\u297F', + 'dfr': '\uD835\uDD21', + 'diamondsuit': '\u2666', + 'diams': '\u2666', + 'digamma': '\u03DD', + 'gammad': '\u03DD', + 'disin': '\u22F2', + 'div': '\u00F7', + 'divide': '\u00F7', + 'divideontimes': '\u22C7', + 'divonx': '\u22C7', + 'djcy': '\u0452', + 'dlcorn': '\u231E', + 'llcorner': '\u231E', + 'dlcrop': '\u230D', + 'dollar': '\u0024', + 'dopf': '\uD835\uDD55', + 'doteqdot': '\u2251', + 'eDot': '\u2251', + 'dotminus': '\u2238', + 'minusd': '\u2238', + 'dotplus': '\u2214', + 'plusdo': '\u2214', + 'dotsquare': '\u22A1', + 'sdotb': '\u22A1', + 'drcorn': '\u231F', + 'lrcorner': '\u231F', + 'drcrop': '\u230C', + 'dscr': '\uD835\uDCB9', + 'dscy': '\u0455', + 'dsol': '\u29F6', + 'dstrok': '\u0111', + 'dtdot': '\u22F1', + 'dtri': '\u25BF', + 'triangledown': '\u25BF', + 'dwangle': '\u29A6', + 'dzcy': '\u045F', + 'dzigrarr': '\u27FF', + 'eacute': '\u00E9', + 'easter': '\u2A6E', + 'ecaron': '\u011B', + 'ecir': '\u2256', + 'eqcirc': '\u2256', + 'ecirc': '\u00EA', + 'ecolon': '\u2255', + 'eqcolon': '\u2255', + 'ecy': '\u044D', + 'edot': '\u0117', + 'efDot': '\u2252', + 'fallingdotseq': '\u2252', + 'efr': '\uD835\uDD22', + 'eg': '\u2A9A', + 'egrave': '\u00E8', + 'egs': '\u2A96', + 'eqslantgtr': '\u2A96', + 'egsdot': '\u2A98', + 'el': '\u2A99', + 'elinters': '\u23E7', + 'ell': '\u2113', + 'els': '\u2A95', + 'eqslantless': '\u2A95', + 'elsdot': '\u2A97', + 'emacr': '\u0113', + 'empty': '\u2205', + 'emptyset': '\u2205', + 'emptyv': '\u2205', + 'varnothing': '\u2205', + 'emsp13': '\u2004', + 'emsp14': '\u2005', + 'emsp': '\u2003', + 'eng': '\u014B', + 'ensp': '\u2002', + 'eogon': '\u0119', + 'eopf': '\uD835\uDD56', + 'epar': '\u22D5', + 'eparsl': '\u29E3', + 'eplus': '\u2A71', + 'epsi': '\u03B5', + 'epsilon': '\u03B5', + 'epsiv': '\u03F5', + 'straightepsilon': '\u03F5', + 'varepsilon': '\u03F5', + 'equals': '\u003D', + 'equest': '\u225F', + 'questeq': '\u225F', + 'equivDD': '\u2A78', + 'eqvparsl': '\u29E5', + 'erDot': '\u2253', + 'risingdotseq': '\u2253', + 'erarr': '\u2971', + 'escr': '\u212F', + 'eta': '\u03B7', + 'eth': '\u00F0', + 'euml': '\u00EB', + 'euro': '\u20AC', + 'excl': '\u0021', + 'fcy': '\u0444', + 'female': '\u2640', + 'ffilig': '\uFB03', + 'fflig': '\uFB00', + 'ffllig': '\uFB04', + 'ffr': '\uD835\uDD23', + 'filig': '\uFB01', + 'fjlig': '\u0066\u006A', + 'flat': '\u266D', + 'fllig': '\uFB02', + 'fltns': '\u25B1', + 'fnof': '\u0192', + 'fopf': '\uD835\uDD57', + 'fork': '\u22D4', + 'pitchfork': '\u22D4', + 'forkv': '\u2AD9', + 'fpartint': '\u2A0D', + 'frac12': '\u00BD', + 'half': '\u00BD', + 'frac13': '\u2153', + 'frac14': '\u00BC', + 'frac15': '\u2155', + 'frac16': '\u2159', + 'frac18': '\u215B', + 'frac23': '\u2154', + 'frac25': '\u2156', + 'frac34': '\u00BE', + 'frac35': '\u2157', + 'frac38': '\u215C', + 'frac45': '\u2158', + 'frac56': '\u215A', + 'frac58': '\u215D', + 'frac78': '\u215E', + 'frasl': '\u2044', + 'frown': '\u2322', + 'sfrown': '\u2322', + 'fscr': '\uD835\uDCBB', + 'gEl': '\u2A8C', + 'gtreqqless': '\u2A8C', + 'gacute': '\u01F5', + 'gamma': '\u03B3', + 'gap': '\u2A86', + 'gtrapprox': '\u2A86', + 'gbreve': '\u011F', + 'gcirc': '\u011D', + 'gcy': '\u0433', + 'gdot': '\u0121', + 'gescc': '\u2AA9', + 'gesdot': '\u2A80', + 'gesdoto': '\u2A82', + 'gesdotol': '\u2A84', + 'gesl': '\u22DB\uFE00', + 'gesles': '\u2A94', + 'gfr': '\uD835\uDD24', + 'gimel': '\u2137', + 'gjcy': '\u0453', + 'glE': '\u2A92', + 'gla': '\u2AA5', + 'glj': '\u2AA4', + 'gnE': '\u2269', + 'gneqq': '\u2269', + 'gnap': '\u2A8A', + 'gnapprox': '\u2A8A', + 'gne': '\u2A88', + 'gneq': '\u2A88', + 'gnsim': '\u22E7', + 'gopf': '\uD835\uDD58', + 'gscr': '\u210A', + 'gsime': '\u2A8E', + 'gsiml': '\u2A90', + 'gtcc': '\u2AA7', + 'gtcir': '\u2A7A', + 'gtdot': '\u22D7', + 'gtrdot': '\u22D7', + 'gtlPar': '\u2995', + 'gtquest': '\u2A7C', + 'gtrarr': '\u2978', + 'gvertneqq': '\u2269\uFE00', + 'gvnE': '\u2269\uFE00', + 'hardcy': '\u044A', + 'harrcir': '\u2948', + 'harrw': '\u21AD', + 'leftrightsquigarrow': '\u21AD', + 'hbar': '\u210F', + 'hslash': '\u210F', + 'planck': '\u210F', + 'plankv': '\u210F', + 'hcirc': '\u0125', + 'hearts': '\u2665', + 'heartsuit': '\u2665', + 'hellip': '\u2026', + 'mldr': '\u2026', + 'hercon': '\u22B9', + 'hfr': '\uD835\uDD25', + 'hksearow': '\u2925', + 'searhk': '\u2925', + 'hkswarow': '\u2926', + 'swarhk': '\u2926', + 'hoarr': '\u21FF', + 'homtht': '\u223B', + 'hookleftarrow': '\u21A9', + 'larrhk': '\u21A9', + 'hookrightarrow': '\u21AA', + 'rarrhk': '\u21AA', + 'hopf': '\uD835\uDD59', + 'horbar': '\u2015', + 'hscr': '\uD835\uDCBD', + 'hstrok': '\u0127', + 'hybull': '\u2043', + 'iacute': '\u00ED', + 'icirc': '\u00EE', + 'icy': '\u0438', + 'iecy': '\u0435', + 'iexcl': '\u00A1', + 'ifr': '\uD835\uDD26', + 'igrave': '\u00EC', + 'iiiint': '\u2A0C', + 'qint': '\u2A0C', + 'iiint': '\u222D', + 'tint': '\u222D', + 'iinfin': '\u29DC', + 'iiota': '\u2129', + 'ijlig': '\u0133', + 'imacr': '\u012B', + 'imath': '\u0131', + 'inodot': '\u0131', + 'imof': '\u22B7', + 'imped': '\u01B5', + 'incare': '\u2105', + 'infin': '\u221E', + 'infintie': '\u29DD', + 'intcal': '\u22BA', + 'intercal': '\u22BA', + 'intlarhk': '\u2A17', + 'intprod': '\u2A3C', + 'iprod': '\u2A3C', + 'iocy': '\u0451', + 'iogon': '\u012F', + 'iopf': '\uD835\uDD5A', + 'iota': '\u03B9', + 'iquest': '\u00BF', + 'iscr': '\uD835\uDCBE', + 'isinE': '\u22F9', + 'isindot': '\u22F5', + 'isins': '\u22F4', + 'isinsv': '\u22F3', + 'itilde': '\u0129', + 'iukcy': '\u0456', + 'iuml': '\u00EF', + 'jcirc': '\u0135', + 'jcy': '\u0439', + 'jfr': '\uD835\uDD27', + 'jmath': '\u0237', + 'jopf': '\uD835\uDD5B', + 'jscr': '\uD835\uDCBF', + 'jsercy': '\u0458', + 'jukcy': '\u0454', + 'kappa': '\u03BA', + 'kappav': '\u03F0', + 'varkappa': '\u03F0', + 'kcedil': '\u0137', + 'kcy': '\u043A', + 'kfr': '\uD835\uDD28', + 'kgreen': '\u0138', + 'khcy': '\u0445', + 'kjcy': '\u045C', + 'kopf': '\uD835\uDD5C', + 'kscr': '\uD835\uDCC0', + 'lAtail': '\u291B', + 'lBarr': '\u290E', + 'lEg': '\u2A8B', + 'lesseqqgtr': '\u2A8B', + 'lHar': '\u2962', + 'lacute': '\u013A', + 'laemptyv': '\u29B4', + 'lambda': '\u03BB', + 'langd': '\u2991', + 'lap': '\u2A85', + 'lessapprox': '\u2A85', + 'laquo': '\u00AB', + 'larrbfs': '\u291F', + 'larrfs': '\u291D', + 'larrlp': '\u21AB', + 'looparrowleft': '\u21AB', + 'larrpl': '\u2939', + 'larrsim': '\u2973', + 'larrtl': '\u21A2', + 'leftarrowtail': '\u21A2', + 'lat': '\u2AAB', + 'latail': '\u2919', + 'late': '\u2AAD', + 'lates': '\u2AAD\uFE00', + 'lbarr': '\u290C', + 'lbbrk': '\u2772', + 'lbrace': '\u007B', + 'lcub': '\u007B', + 'lbrack': '\u005B', + 'lsqb': '\u005B', + 'lbrke': '\u298B', + 'lbrksld': '\u298F', + 'lbrkslu': '\u298D', + 'lcaron': '\u013E', + 'lcedil': '\u013C', + 'lcy': '\u043B', + 'ldca': '\u2936', + 'ldrdhar': '\u2967', + 'ldrushar': '\u294B', + 'ldsh': '\u21B2', + 'le': '\u2264', + 'leq': '\u2264', + 'leftleftarrows': '\u21C7', + 'llarr': '\u21C7', + 'leftthreetimes': '\u22CB', + 'lthree': '\u22CB', + 'lescc': '\u2AA8', + 'lesdot': '\u2A7F', + 'lesdoto': '\u2A81', + 'lesdotor': '\u2A83', + 'lesg': '\u22DA\uFE00', + 'lesges': '\u2A93', + 'lessdot': '\u22D6', + 'ltdot': '\u22D6', + 'lfisht': '\u297C', + 'lfr': '\uD835\uDD29', + 'lgE': '\u2A91', + 'lharul': '\u296A', + 'lhblk': '\u2584', + 'ljcy': '\u0459', + 'llhard': '\u296B', + 'lltri': '\u25FA', + 'lmidot': '\u0140', + 'lmoust': '\u23B0', + 'lmoustache': '\u23B0', + 'lnE': '\u2268', + 'lneqq': '\u2268', + 'lnap': '\u2A89', + 'lnapprox': '\u2A89', + 'lne': '\u2A87', + 'lneq': '\u2A87', + 'lnsim': '\u22E6', + 'loang': '\u27EC', + 'loarr': '\u21FD', + 'longmapsto': '\u27FC', + 'xmap': '\u27FC', + 'looparrowright': '\u21AC', + 'rarrlp': '\u21AC', + 'lopar': '\u2985', + 'lopf': '\uD835\uDD5D', + 'loplus': '\u2A2D', + 'lotimes': '\u2A34', + 'lowast': '\u2217', + 'loz': '\u25CA', + 'lozenge': '\u25CA', + 'lpar': '\u0028', + 'lparlt': '\u2993', + 'lrhard': '\u296D', + 'lrm': '\u200E', + 'lrtri': '\u22BF', + 'lsaquo': '\u2039', + 'lscr': '\uD835\uDCC1', + 'lsime': '\u2A8D', + 'lsimg': '\u2A8F', + 'lsquor': '\u201A', + 'sbquo': '\u201A', + 'lstrok': '\u0142', + 'ltcc': '\u2AA6', + 'ltcir': '\u2A79', + 'ltimes': '\u22C9', + 'ltlarr': '\u2976', + 'ltquest': '\u2A7B', + 'ltrPar': '\u2996', + 'ltri': '\u25C3', + 'triangleleft': '\u25C3', + 'lurdshar': '\u294A', + 'luruhar': '\u2966', + 'lvertneqq': '\u2268\uFE00', + 'lvnE': '\u2268\uFE00', + 'mDDot': '\u223A', + 'macr': '\u00AF', + 'strns': '\u00AF', + 'male': '\u2642', + 'malt': '\u2720', + 'maltese': '\u2720', + 'marker': '\u25AE', + 'mcomma': '\u2A29', + 'mcy': '\u043C', + 'mdash': '\u2014', + 'mfr': '\uD835\uDD2A', + 'mho': '\u2127', + 'micro': '\u00B5', + 'midcir': '\u2AF0', + 'minus': '\u2212', + 'minusdu': '\u2A2A', + 'mlcp': '\u2ADB', + 'models': '\u22A7', + 'mopf': '\uD835\uDD5E', + 'mscr': '\uD835\uDCC2', + 'mu': '\u03BC', + 'multimap': '\u22B8', + 'mumap': '\u22B8', + 'nGg': '\u22D9\u0338', + 'nGt': '\u226B\u20D2', + 'nLeftarrow': '\u21CD', + 'nlArr': '\u21CD', + 'nLeftrightarrow': '\u21CE', + 'nhArr': '\u21CE', + 'nLl': '\u22D8\u0338', + 'nLt': '\u226A\u20D2', + 'nRightarrow': '\u21CF', + 'nrArr': '\u21CF', + 'nVDash': '\u22AF', + 'nVdash': '\u22AE', + 'nacute': '\u0144', + 'nang': '\u2220\u20D2', + 'napE': '\u2A70\u0338', + 'napid': '\u224B\u0338', + 'napos': '\u0149', + 'natur': '\u266E', + 'natural': '\u266E', + 'ncap': '\u2A43', + 'ncaron': '\u0148', + 'ncedil': '\u0146', + 'ncongdot': '\u2A6D\u0338', + 'ncup': '\u2A42', + 'ncy': '\u043D', + 'ndash': '\u2013', + 'neArr': '\u21D7', + 'nearhk': '\u2924', + 'nedot': '\u2250\u0338', + 'nesear': '\u2928', + 'toea': '\u2928', + 'nfr': '\uD835\uDD2B', + 'nharr': '\u21AE', + 'nleftrightarrow': '\u21AE', + 'nhpar': '\u2AF2', + 'nis': '\u22FC', + 'nisd': '\u22FA', + 'njcy': '\u045A', + 'nlE': '\u2266\u0338', + 'nleqq': '\u2266\u0338', + 'nlarr': '\u219A', + 'nleftarrow': '\u219A', + 'nldr': '\u2025', + 'nopf': '\uD835\uDD5F', + 'not': '\u00AC', + 'notinE': '\u22F9\u0338', + 'notindot': '\u22F5\u0338', + 'notinvb': '\u22F7', + 'notinvc': '\u22F6', + 'notnivb': '\u22FE', + 'notnivc': '\u22FD', + 'nparsl': '\u2AFD\u20E5', + 'npart': '\u2202\u0338', + 'npolint': '\u2A14', + 'nrarr': '\u219B', + 'nrightarrow': '\u219B', + 'nrarrc': '\u2933\u0338', + 'nrarrw': '\u219D\u0338', + 'nscr': '\uD835\uDCC3', + 'nsub': '\u2284', + 'nsubE': '\u2AC5\u0338', + 'nsubseteqq': '\u2AC5\u0338', + 'nsup': '\u2285', + 'nsupE': '\u2AC6\u0338', + 'nsupseteqq': '\u2AC6\u0338', + 'ntilde': '\u00F1', + 'nu': '\u03BD', + 'num': '\u0023', + 'numero': '\u2116', + 'numsp': '\u2007', + 'nvDash': '\u22AD', + 'nvHarr': '\u2904', + 'nvap': '\u224D\u20D2', + 'nvdash': '\u22AC', + 'nvge': '\u2265\u20D2', + 'nvgt': '\u003E\u20D2', + 'nvinfin': '\u29DE', + 'nvlArr': '\u2902', + 'nvle': '\u2264\u20D2', + 'nvlt': '\u003C\u20D2', + 'nvltrie': '\u22B4\u20D2', + 'nvrArr': '\u2903', + 'nvrtrie': '\u22B5\u20D2', + 'nvsim': '\u223C\u20D2', + 'nwArr': '\u21D6', + 'nwarhk': '\u2923', + 'nwnear': '\u2927', + 'oacute': '\u00F3', + 'ocirc': '\u00F4', + 'ocy': '\u043E', + 'odblac': '\u0151', + 'odiv': '\u2A38', + 'odsold': '\u29BC', + 'oelig': '\u0153', + 'ofcir': '\u29BF', + 'ofr': '\uD835\uDD2C', + 'ogon': '\u02DB', + 'ograve': '\u00F2', + 'ogt': '\u29C1', + 'ohbar': '\u29B5', + 'olcir': '\u29BE', + 'olcross': '\u29BB', + 'olt': '\u29C0', + 'omacr': '\u014D', + 'omega': '\u03C9', + 'omicron': '\u03BF', + 'omid': '\u29B6', + 'oopf': '\uD835\uDD60', + 'opar': '\u29B7', + 'operp': '\u29B9', + 'or': '\u2228', + 'vee': '\u2228', + 'ord': '\u2A5D', + 'order': '\u2134', + 'orderof': '\u2134', + 'oscr': '\u2134', + 'ordf': '\u00AA', + 'ordm': '\u00BA', + 'origof': '\u22B6', + 'oror': '\u2A56', + 'orslope': '\u2A57', + 'orv': '\u2A5B', + 'oslash': '\u00F8', + 'osol': '\u2298', + 'otilde': '\u00F5', + 'otimesas': '\u2A36', + 'ouml': '\u00F6', + 'ovbar': '\u233D', + 'para': '\u00B6', + 'parsim': '\u2AF3', + 'parsl': '\u2AFD', + 'pcy': '\u043F', + 'percnt': '\u0025', + 'period': '\u002E', + 'permil': '\u2030', + 'pertenk': '\u2031', + 'pfr': '\uD835\uDD2D', + 'phi': '\u03C6', + 'phiv': '\u03D5', + 'straightphi': '\u03D5', + 'varphi': '\u03D5', + 'phone': '\u260E', + 'pi': '\u03C0', + 'piv': '\u03D6', + 'varpi': '\u03D6', + 'planckh': '\u210E', + 'plus': '\u002B', + 'plusacir': '\u2A23', + 'pluscir': '\u2A22', + 'plusdu': '\u2A25', + 'pluse': '\u2A72', + 'plussim': '\u2A26', + 'plustwo': '\u2A27', + 'pointint': '\u2A15', + 'popf': '\uD835\uDD61', + 'pound': '\u00A3', + 'prE': '\u2AB3', + 'prap': '\u2AB7', + 'precapprox': '\u2AB7', + 'precnapprox': '\u2AB9', + 'prnap': '\u2AB9', + 'precneqq': '\u2AB5', + 'prnE': '\u2AB5', + 'precnsim': '\u22E8', + 'prnsim': '\u22E8', + 'prime': '\u2032', + 'profalar': '\u232E', + 'profline': '\u2312', + 'profsurf': '\u2313', + 'prurel': '\u22B0', + 'pscr': '\uD835\uDCC5', + 'psi': '\u03C8', + 'puncsp': '\u2008', + 'qfr': '\uD835\uDD2E', + 'qopf': '\uD835\uDD62', + 'qprime': '\u2057', + 'qscr': '\uD835\uDCC6', + 'quatint': '\u2A16', + 'quest': '\u003F', + 'rAtail': '\u291C', + 'rHar': '\u2964', + 'race': '\u223D\u0331', + 'racute': '\u0155', + 'raemptyv': '\u29B3', + 'rangd': '\u2992', + 'range': '\u29A5', + 'raquo': '\u00BB', + 'rarrap': '\u2975', + 'rarrbfs': '\u2920', + 'rarrc': '\u2933', + 'rarrfs': '\u291E', + 'rarrpl': '\u2945', + 'rarrsim': '\u2974', + 'rarrtl': '\u21A3', + 'rightarrowtail': '\u21A3', + 'rarrw': '\u219D', + 'rightsquigarrow': '\u219D', + 'ratail': '\u291A', + 'ratio': '\u2236', + 'rbbrk': '\u2773', + 'rbrace': '\u007D', + 'rcub': '\u007D', + 'rbrack': '\u005D', + 'rsqb': '\u005D', + 'rbrke': '\u298C', + 'rbrksld': '\u298E', + 'rbrkslu': '\u2990', + 'rcaron': '\u0159', + 'rcedil': '\u0157', + 'rcy': '\u0440', + 'rdca': '\u2937', + 'rdldhar': '\u2969', + 'rdsh': '\u21B3', + 'rect': '\u25AD', + 'rfisht': '\u297D', + 'rfr': '\uD835\uDD2F', + 'rharul': '\u296C', + 'rho': '\u03C1', + 'rhov': '\u03F1', + 'varrho': '\u03F1', + 'rightrightarrows': '\u21C9', + 'rrarr': '\u21C9', + 'rightthreetimes': '\u22CC', + 'rthree': '\u22CC', + 'ring': '\u02DA', + 'rlm': '\u200F', + 'rmoust': '\u23B1', + 'rmoustache': '\u23B1', + 'rnmid': '\u2AEE', + 'roang': '\u27ED', + 'roarr': '\u21FE', + 'ropar': '\u2986', + 'ropf': '\uD835\uDD63', + 'roplus': '\u2A2E', + 'rotimes': '\u2A35', + 'rpar': '\u0029', + 'rpargt': '\u2994', + 'rppolint': '\u2A12', + 'rsaquo': '\u203A', + 'rscr': '\uD835\uDCC7', + 'rtimes': '\u22CA', + 'rtri': '\u25B9', + 'triangleright': '\u25B9', + 'rtriltri': '\u29CE', + 'ruluhar': '\u2968', + 'rx': '\u211E', + 'sacute': '\u015B', + 'scE': '\u2AB4', + 'scap': '\u2AB8', + 'succapprox': '\u2AB8', + 'scaron': '\u0161', + 'scedil': '\u015F', + 'scirc': '\u015D', + 'scnE': '\u2AB6', + 'succneqq': '\u2AB6', + 'scnap': '\u2ABA', + 'succnapprox': '\u2ABA', + 'scnsim': '\u22E9', + 'succnsim': '\u22E9', + 'scpolint': '\u2A13', + 'scy': '\u0441', + 'sdot': '\u22C5', + 'sdote': '\u2A66', + 'seArr': '\u21D8', + 'sect': '\u00A7', + 'semi': '\u003B', + 'seswar': '\u2929', + 'tosa': '\u2929', + 'sext': '\u2736', + 'sfr': '\uD835\uDD30', + 'sharp': '\u266F', + 'shchcy': '\u0449', + 'shcy': '\u0448', + 'shy': '\u00AD', + 'sigma': '\u03C3', + 'sigmaf': '\u03C2', + 'sigmav': '\u03C2', + 'varsigma': '\u03C2', + 'simdot': '\u2A6A', + 'simg': '\u2A9E', + 'simgE': '\u2AA0', + 'siml': '\u2A9D', + 'simlE': '\u2A9F', + 'simne': '\u2246', + 'simplus': '\u2A24', + 'simrarr': '\u2972', + 'smashp': '\u2A33', + 'smeparsl': '\u29E4', + 'smile': '\u2323', + 'ssmile': '\u2323', + 'smt': '\u2AAA', + 'smte': '\u2AAC', + 'smtes': '\u2AAC\uFE00', + 'softcy': '\u044C', + 'sol': '\u002F', + 'solb': '\u29C4', + 'solbar': '\u233F', + 'sopf': '\uD835\uDD64', + 'spades': '\u2660', + 'spadesuit': '\u2660', + 'sqcaps': '\u2293\uFE00', + 'sqcups': '\u2294\uFE00', + 'sscr': '\uD835\uDCC8', + 'star': '\u2606', + 'sub': '\u2282', + 'subset': '\u2282', + 'subE': '\u2AC5', + 'subseteqq': '\u2AC5', + 'subdot': '\u2ABD', + 'subedot': '\u2AC3', + 'submult': '\u2AC1', + 'subnE': '\u2ACB', + 'subsetneqq': '\u2ACB', + 'subne': '\u228A', + 'subsetneq': '\u228A', + 'subplus': '\u2ABF', + 'subrarr': '\u2979', + 'subsim': '\u2AC7', + 'subsub': '\u2AD5', + 'subsup': '\u2AD3', + 'sung': '\u266A', + 'sup1': '\u00B9', + 'sup2': '\u00B2', + 'sup3': '\u00B3', + 'supE': '\u2AC6', + 'supseteqq': '\u2AC6', + 'supdot': '\u2ABE', + 'supdsub': '\u2AD8', + 'supedot': '\u2AC4', + 'suphsol': '\u27C9', + 'suphsub': '\u2AD7', + 'suplarr': '\u297B', + 'supmult': '\u2AC2', + 'supnE': '\u2ACC', + 'supsetneqq': '\u2ACC', + 'supne': '\u228B', + 'supsetneq': '\u228B', + 'supplus': '\u2AC0', + 'supsim': '\u2AC8', + 'supsub': '\u2AD4', + 'supsup': '\u2AD6', + 'swArr': '\u21D9', + 'swnwar': '\u292A', + 'szlig': '\u00DF', + 'target': '\u2316', + 'tau': '\u03C4', + 'tcaron': '\u0165', + 'tcedil': '\u0163', + 'tcy': '\u0442', + 'telrec': '\u2315', + 'tfr': '\uD835\uDD31', + 'theta': '\u03B8', + 'thetasym': '\u03D1', + 'thetav': '\u03D1', + 'vartheta': '\u03D1', + 'thorn': '\u00FE', + 'times': '\u00D7', + 'timesbar': '\u2A31', + 'timesd': '\u2A30', + 'topbot': '\u2336', + 'topcir': '\u2AF1', + 'topf': '\uD835\uDD65', + 'topfork': '\u2ADA', + 'tprime': '\u2034', + 'triangle': '\u25B5', + 'utri': '\u25B5', + 'triangleq': '\u225C', + 'trie': '\u225C', + 'tridot': '\u25EC', + 'triminus': '\u2A3A', + 'triplus': '\u2A39', + 'trisb': '\u29CD', + 'tritime': '\u2A3B', + 'trpezium': '\u23E2', + 'tscr': '\uD835\uDCC9', + 'tscy': '\u0446', + 'tshcy': '\u045B', + 'tstrok': '\u0167', + 'uHar': '\u2963', + 'uacute': '\u00FA', + 'ubrcy': '\u045E', + 'ubreve': '\u016D', + 'ucirc': '\u00FB', + 'ucy': '\u0443', + 'udblac': '\u0171', + 'ufisht': '\u297E', + 'ufr': '\uD835\uDD32', + 'ugrave': '\u00F9', + 'uhblk': '\u2580', + 'ulcorn': '\u231C', + 'ulcorner': '\u231C', + 'ulcrop': '\u230F', + 'ultri': '\u25F8', + 'umacr': '\u016B', + 'uogon': '\u0173', + 'uopf': '\uD835\uDD66', + 'upsi': '\u03C5', + 'upsilon': '\u03C5', + 'upuparrows': '\u21C8', + 'uuarr': '\u21C8', + 'urcorn': '\u231D', + 'urcorner': '\u231D', + 'urcrop': '\u230E', + 'uring': '\u016F', + 'urtri': '\u25F9', + 'uscr': '\uD835\uDCCA', + 'utdot': '\u22F0', + 'utilde': '\u0169', + 'uuml': '\u00FC', + 'uwangle': '\u29A7', + 'vBar': '\u2AE8', + 'vBarv': '\u2AE9', + 'vangrt': '\u299C', + 'varsubsetneq': '\u228A\uFE00', + 'vsubne': '\u228A\uFE00', + 'varsubsetneqq': '\u2ACB\uFE00', + 'vsubnE': '\u2ACB\uFE00', + 'varsupsetneq': '\u228B\uFE00', + 'vsupne': '\u228B\uFE00', + 'varsupsetneqq': '\u2ACC\uFE00', + 'vsupnE': '\u2ACC\uFE00', + 'vcy': '\u0432', + 'veebar': '\u22BB', + 'veeeq': '\u225A', + 'vellip': '\u22EE', + 'vfr': '\uD835\uDD33', + 'vopf': '\uD835\uDD67', + 'vscr': '\uD835\uDCCB', + 'vzigzag': '\u299A', + 'wcirc': '\u0175', + 'wedbar': '\u2A5F', + 'wedgeq': '\u2259', + 'weierp': '\u2118', + 'wp': '\u2118', + 'wfr': '\uD835\uDD34', + 'wopf': '\uD835\uDD68', + 'wscr': '\uD835\uDCCC', + 'xfr': '\uD835\uDD35', + 'xi': '\u03BE', + 'xnis': '\u22FB', + 'xopf': '\uD835\uDD69', + 'xscr': '\uD835\uDCCD', + 'yacute': '\u00FD', + 'yacy': '\u044F', + 'ycirc': '\u0177', + 'ycy': '\u044B', + 'yen': '\u00A5', + 'yfr': '\uD835\uDD36', + 'yicy': '\u0457', + 'yopf': '\uD835\uDD6A', + 'yscr': '\uD835\uDCCE', + 'yucy': '\u044E', + 'yuml': '\u00FF', + 'zacute': '\u017A', + 'zcaron': '\u017E', + 'zcy': '\u0437', + 'zdot': '\u017C', + 'zeta': '\u03B6', + 'zfr': '\uD835\uDD37', + 'zhcy': '\u0436', + 'zigrarr': '\u21DD', + 'zopf': '\uD835\uDD6B', + 'zscr': '\uD835\uDCCF', + 'zwj': '\u200D', + 'zwnj': '\u200C' +}; + + +// The &ngsp; pseudo-entity is denoting a space. see: +// https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart +export const NGSP_UNICODE = '\uE500'; + +NAMED_ENTITIES['ngsp'] = NGSP_UNICODE; diff --git a/packages/compiler/src/ml_parser/html_parser.ts b/packages/compiler/src/ml_parser/html_parser.ts index 9a9d507545c4..5589d6d1c417 100644 --- a/packages/compiler/src/ml_parser/html_parser.ts +++ b/packages/compiler/src/ml_parser/html_parser.ts @@ -17,7 +17,7 @@ export class HtmlParser extends Parser { super(getHtmlTagDefinition); } - parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult { + override parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult { return super.parse(source, url, options); } } diff --git a/packages/compiler/src/ml_parser/html_tags.ts b/packages/compiler/src/ml_parser/html_tags.ts index ffde2b76792f..78c61b2cb198 100644 --- a/packages/compiler/src/ml_parser/html_tags.ts +++ b/packages/compiler/src/ml_parser/html_tags.ts @@ -54,7 +54,7 @@ export class HtmlTagDefinition implements TagDefinition { getContentType(prefix?: string): TagContentType { if (typeof this.contentType === 'object') { - const overrideType = prefix == null ? undefined : this.contentType[prefix]; + const overrideType = prefix === undefined ? undefined : this.contentType[prefix]; return overrideType ?? this.contentType.default; } return this.contentType; diff --git a/packages/compiler/src/ml_parser/html_whitespaces.ts b/packages/compiler/src/ml_parser/html_whitespaces.ts index 0bce9fa093cc..f41652347611 100644 --- a/packages/compiler/src/ml_parser/html_whitespaces.ts +++ b/packages/compiler/src/ml_parser/html_whitespaces.ts @@ -7,8 +7,8 @@ */ import * as html from './ast'; +import {NGSP_UNICODE} from './entities'; import {ParseTreeResult} from './parser'; -import {NGSP_UNICODE} from './tags'; export const PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces'; diff --git a/packages/compiler/src/ml_parser/icu_ast_expander.ts b/packages/compiler/src/ml_parser/icu_ast_expander.ts index 9e08c954ddea..ac9d315c0526 100644 --- a/packages/compiler/src/ml_parser/icu_ast_expander.ts +++ b/packages/compiler/src/ml_parser/icu_ast_expander.ts @@ -80,8 +80,8 @@ class _Expander implements html.Visitor { visitExpansion(icu: html.Expansion, context: any): any { this.isExpanded = true; - return icu.type == 'plural' ? _expandPluralForm(icu, this.errors) : - _expandDefaultForm(icu, this.errors); + return icu.type === 'plural' ? _expandPluralForm(icu, this.errors) : + _expandDefaultForm(icu, this.errors); } visitExpansionCase(icuCase: html.ExpansionCase, context: any): any { @@ -92,7 +92,7 @@ class _Expander implements html.Visitor { // Plural forms are expanded to `NgPlural` and `NgPluralCase`s function _expandPluralForm(ast: html.Expansion, errors: ParseError[]): html.Element { const children = ast.cases.map(c => { - if (PLURAL_CASES.indexOf(c.value) == -1 && !c.value.match(/^=\d+$/)) { + if (PLURAL_CASES.indexOf(c.value) === -1 && !c.value.match(/^=\d+$/)) { errors.push(new ExpansionError( c.valueSourceSpan, `Plural cases should be "=" or one of ${PLURAL_CASES.join(', ')}`)); diff --git a/packages/compiler/src/ml_parser/lexer.ts b/packages/compiler/src/ml_parser/lexer.ts index 8d832f4d2a21..6defcc010337 100644 --- a/packages/compiler/src/ml_parser/lexer.ts +++ b/packages/compiler/src/ml_parser/lexer.ts @@ -8,9 +8,10 @@ import * as chars from '../chars'; import {ParseError, ParseLocation, ParseSourceFile, ParseSourceSpan} from '../parse_util'; +import {NAMED_ENTITIES} from './entities'; import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './interpolation_config'; -import {NAMED_ENTITIES, TagContentType, TagDefinition} from './tags'; +import {TagContentType, TagDefinition} from './tags'; export enum TokenType { TAG_OPEN_START, @@ -807,11 +808,11 @@ function isPrefixEnd(code: number): boolean { } function isDigitEntityEnd(code: number): boolean { - return code == chars.$SEMICOLON || code == chars.$EOF || !chars.isAsciiHexDigit(code); + return code === chars.$SEMICOLON || code === chars.$EOF || !chars.isAsciiHexDigit(code); } function isNamedEntityEnd(code: number): boolean { - return code == chars.$SEMICOLON || code == chars.$EOF || !chars.isAsciiLetter(code); + return code === chars.$SEMICOLON || code === chars.$EOF || !chars.isAsciiLetter(code); } function isExpansionCaseStart(peek: number): boolean { @@ -819,7 +820,7 @@ function isExpansionCaseStart(peek: number): boolean { } function compareCharCodeCaseInsensitive(code1: number, code2: number): boolean { - return toUpperCaseCharCode(code1) == toUpperCaseCharCode(code2); + return toUpperCaseCharCode(code1) === toUpperCaseCharCode(code2); } function toUpperCaseCharCode(code: number): number { @@ -831,7 +832,7 @@ function mergeTextTokens(srcTokens: Token[]): Token[] { let lastDstToken: Token|undefined = undefined; for (let i = 0; i < srcTokens.length; i++) { const token = srcTokens[i]; - if (lastDstToken && lastDstToken.type == TokenType.TEXT && token.type == TokenType.TEXT) { + if (lastDstToken && lastDstToken.type === TokenType.TEXT && token.type === TokenType.TEXT) { lastDstToken.parts[0]! += token.parts[0]; lastDstToken.sourceSpan.end = token.sourceSpan.end; } else { @@ -1006,22 +1007,22 @@ class EscapedCharacterCursor extends PlainCharacterCursor { } } - advance(): void { + override advance(): void { this.state = this.internalState; super.advance(); this.processEscapeSequence(); } - init(): void { + override init(): void { super.init(); this.processEscapeSequence(); } - clone(): EscapedCharacterCursor { + override clone(): EscapedCharacterCursor { return new EscapedCharacterCursor(this); } - getChars(start: this): string { + override getChars(start: this): string { const cursor = start.clone(); let chars = ''; while (cursor.internalState.offset < this.internalState.offset) { diff --git a/packages/compiler/src/ml_parser/parser.ts b/packages/compiler/src/ml_parser/parser.ts index 24465f8e972b..fecba0084bcf 100644 --- a/packages/compiler/src/ml_parser/parser.ts +++ b/packages/compiler/src/ml_parser/parser.ts @@ -185,7 +185,7 @@ class _TreeBuilder { if (this._peek.type === lex.TokenType.EXPANSION_CASE_EXP_END) { if (lastOnStack(expansionFormStack, lex.TokenType.EXPANSION_CASE_EXP_START)) { expansionFormStack.pop(); - if (expansionFormStack.length == 0) return exp; + if (expansionFormStack.length === 0) return exp; } else { this.errors.push( @@ -216,9 +216,9 @@ class _TreeBuilder { private _consumeText(token: lex.Token) { let text = token.parts[0]; - if (text.length > 0 && text[0] == '\n') { + if (text.length > 0 && text[0] === '\n') { const parent = this._getParentElement(); - if (parent != null && parent.children.length == 0 && + if (parent != null && parent.children.length === 0 && this.getTagDefinition(parent.name).ignoreFirstLf) { text = text.substring(1); } @@ -316,7 +316,7 @@ class _TreeBuilder { let unexpectedCloseTagDetected = false; for (let stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) { const el = this._elementStack[stackIndex]; - if (el.name == fullName) { + if (el.name === fullName) { // Record the parse span with the element that is being closed. Any elements that are // removed from the element stack at this point are closed implicitly, so they won't get // an end source span (as there is no explicit closing element). diff --git a/packages/compiler/src/ml_parser/tags.ts b/packages/compiler/src/ml_parser/tags.ts index 8c2f4a65fcb7..af58e730920a 100644 --- a/packages/compiler/src/ml_parser/tags.ts +++ b/packages/compiler/src/ml_parser/tags.ts @@ -31,7 +31,7 @@ export function splitNsName(elementName: string): [string|null, string] { const colonIndex = elementName.indexOf(':', 1); - if (colonIndex == -1) { + if (colonIndex === -1) { throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`); } @@ -62,269 +62,3 @@ export function getNsPrefix(fullName: string|null): string|null { export function mergeNsAndName(prefix: string, localName: string): string { return prefix ? `:${prefix}:${localName}` : localName; } - -// see https://www.w3.org/TR/html51/syntax.html#named-character-references -// see https://html.spec.whatwg.org/multipage/entities.json -// This list is not exhaustive to keep the compiler footprint low. -// The `{` / `ƫ` syntax should be used when the named character reference does not -// exist. -export const NAMED_ENTITIES: {[k: string]: string} = { - 'Aacute': '\u00C1', - 'aacute': '\u00E1', - 'Acirc': '\u00C2', - 'acirc': '\u00E2', - 'acute': '\u00B4', - 'AElig': '\u00C6', - 'aelig': '\u00E6', - 'Agrave': '\u00C0', - 'agrave': '\u00E0', - 'alefsym': '\u2135', - 'Alpha': '\u0391', - 'alpha': '\u03B1', - 'amp': '&', - 'and': '\u2227', - 'ang': '\u2220', - 'apos': '\u0027', - 'Aring': '\u00C5', - 'aring': '\u00E5', - 'asymp': '\u2248', - 'Atilde': '\u00C3', - 'atilde': '\u00E3', - 'Auml': '\u00C4', - 'auml': '\u00E4', - 'bdquo': '\u201E', - 'Beta': '\u0392', - 'beta': '\u03B2', - 'brvbar': '\u00A6', - 'bull': '\u2022', - 'cap': '\u2229', - 'Ccedil': '\u00C7', - 'ccedil': '\u00E7', - 'cedil': '\u00B8', - 'cent': '\u00A2', - 'Chi': '\u03A7', - 'chi': '\u03C7', - 'circ': '\u02C6', - 'clubs': '\u2663', - 'cong': '\u2245', - 'copy': '\u00A9', - 'crarr': '\u21B5', - 'cup': '\u222A', - 'curren': '\u00A4', - 'dagger': '\u2020', - 'Dagger': '\u2021', - 'darr': '\u2193', - 'dArr': '\u21D3', - 'deg': '\u00B0', - 'Delta': '\u0394', - 'delta': '\u03B4', - 'diams': '\u2666', - 'divide': '\u00F7', - 'Eacute': '\u00C9', - 'eacute': '\u00E9', - 'Ecirc': '\u00CA', - 'ecirc': '\u00EA', - 'Egrave': '\u00C8', - 'egrave': '\u00E8', - 'empty': '\u2205', - 'emsp': '\u2003', - 'ensp': '\u2002', - 'Epsilon': '\u0395', - 'epsilon': '\u03B5', - 'equiv': '\u2261', - 'Eta': '\u0397', - 'eta': '\u03B7', - 'ETH': '\u00D0', - 'eth': '\u00F0', - 'Euml': '\u00CB', - 'euml': '\u00EB', - 'euro': '\u20AC', - 'exist': '\u2203', - 'fnof': '\u0192', - 'forall': '\u2200', - 'frac12': '\u00BD', - 'frac14': '\u00BC', - 'frac34': '\u00BE', - 'frasl': '\u2044', - 'Gamma': '\u0393', - 'gamma': '\u03B3', - 'ge': '\u2265', - 'gt': '>', - 'harr': '\u2194', - 'hArr': '\u21D4', - 'hearts': '\u2665', - 'hellip': '\u2026', - 'Iacute': '\u00CD', - 'iacute': '\u00ED', - 'Icirc': '\u00CE', - 'icirc': '\u00EE', - 'iexcl': '\u00A1', - 'Igrave': '\u00CC', - 'igrave': '\u00EC', - 'image': '\u2111', - 'infin': '\u221E', - 'int': '\u222B', - 'Iota': '\u0399', - 'iota': '\u03B9', - 'iquest': '\u00BF', - 'isin': '\u2208', - 'Iuml': '\u00CF', - 'iuml': '\u00EF', - 'Kappa': '\u039A', - 'kappa': '\u03BA', - 'Lambda': '\u039B', - 'lambda': '\u03BB', - 'lang': '\u27E8', - 'laquo': '\u00AB', - 'larr': '\u2190', - 'lArr': '\u21D0', - 'lceil': '\u2308', - 'ldquo': '\u201C', - 'le': '\u2264', - 'lfloor': '\u230A', - 'lowast': '\u2217', - 'loz': '\u25CA', - 'lrm': '\u200E', - 'lsaquo': '\u2039', - 'lsquo': '\u2018', - 'lt': '<', - 'macr': '\u00AF', - 'mdash': '\u2014', - 'micro': '\u00B5', - 'middot': '\u00B7', - 'minus': '\u2212', - 'Mu': '\u039C', - 'mu': '\u03BC', - 'nabla': '\u2207', - 'nbsp': '\u00A0', - 'ndash': '\u2013', - 'ne': '\u2260', - 'ni': '\u220B', - 'not': '\u00AC', - 'notin': '\u2209', - 'nsub': '\u2284', - 'Ntilde': '\u00D1', - 'ntilde': '\u00F1', - 'Nu': '\u039D', - 'nu': '\u03BD', - 'Oacute': '\u00D3', - 'oacute': '\u00F3', - 'Ocirc': '\u00D4', - 'ocirc': '\u00F4', - 'OElig': '\u0152', - 'oelig': '\u0153', - 'Ograve': '\u00D2', - 'ograve': '\u00F2', - 'oline': '\u203E', - 'Omega': '\u03A9', - 'omega': '\u03C9', - 'Omicron': '\u039F', - 'omicron': '\u03BF', - 'oplus': '\u2295', - 'or': '\u2228', - 'ordf': '\u00AA', - 'ordm': '\u00BA', - 'Oslash': '\u00D8', - 'oslash': '\u00F8', - 'Otilde': '\u00D5', - 'otilde': '\u00F5', - 'otimes': '\u2297', - 'Ouml': '\u00D6', - 'ouml': '\u00F6', - 'para': '\u00B6', - 'permil': '\u2030', - 'perp': '\u22A5', - 'Phi': '\u03A6', - 'phi': '\u03C6', - 'Pi': '\u03A0', - 'pi': '\u03C0', - 'piv': '\u03D6', - 'plusmn': '\u00B1', - 'pound': '\u00A3', - 'prime': '\u2032', - 'Prime': '\u2033', - 'prod': '\u220F', - 'prop': '\u221D', - 'Psi': '\u03A8', - 'psi': '\u03C8', - 'quot': '\u0022', - 'radic': '\u221A', - 'rang': '\u27E9', - 'raquo': '\u00BB', - 'rarr': '\u2192', - 'rArr': '\u21D2', - 'rceil': '\u2309', - 'rdquo': '\u201D', - 'real': '\u211C', - 'reg': '\u00AE', - 'rfloor': '\u230B', - 'Rho': '\u03A1', - 'rho': '\u03C1', - 'rlm': '\u200F', - 'rsaquo': '\u203A', - 'rsquo': '\u2019', - 'sbquo': '\u201A', - 'Scaron': '\u0160', - 'scaron': '\u0161', - 'sdot': '\u22C5', - 'sect': '\u00A7', - 'shy': '\u00AD', - 'Sigma': '\u03A3', - 'sigma': '\u03C3', - 'sigmaf': '\u03C2', - 'sim': '\u223C', - 'spades': '\u2660', - 'sub': '\u2282', - 'sube': '\u2286', - 'sum': '\u2211', - 'sup': '\u2283', - 'sup1': '\u00B9', - 'sup2': '\u00B2', - 'sup3': '\u00B3', - 'supe': '\u2287', - 'szlig': '\u00DF', - 'Tau': '\u03A4', - 'tau': '\u03C4', - 'there4': '\u2234', - 'Theta': '\u0398', - 'theta': '\u03B8', - 'thetasym': '\u03D1', - 'thinsp': '\u2009', - 'THORN': '\u00DE', - 'thorn': '\u00FE', - 'tilde': '\u02DC', - 'times': '\u00D7', - 'trade': '\u2122', - 'Uacute': '\u00DA', - 'uacute': '\u00FA', - 'uarr': '\u2191', - 'uArr': '\u21D1', - 'Ucirc': '\u00DB', - 'ucirc': '\u00FB', - 'Ugrave': '\u00D9', - 'ugrave': '\u00F9', - 'uml': '\u00A8', - 'upsih': '\u03D2', - 'Upsilon': '\u03A5', - 'upsilon': '\u03C5', - 'Uuml': '\u00DC', - 'uuml': '\u00FC', - 'weierp': '\u2118', - 'Xi': '\u039E', - 'xi': '\u03BE', - 'Yacute': '\u00DD', - 'yacute': '\u00FD', - 'yen': '\u00A5', - 'yuml': '\u00FF', - 'Yuml': '\u0178', - 'Zeta': '\u0396', - 'zeta': '\u03B6', - 'zwj': '\u200D', - 'zwnj': '\u200C', -}; - -// The &ngsp; pseudo-entity is denoting a space. see: -// https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart -export const NGSP_UNICODE = '\uE500'; - -NAMED_ENTITIES['ngsp'] = NGSP_UNICODE; diff --git a/packages/compiler/src/ml_parser/xml_parser.ts b/packages/compiler/src/ml_parser/xml_parser.ts index d87ac19ee273..78f40ab727f4 100644 --- a/packages/compiler/src/ml_parser/xml_parser.ts +++ b/packages/compiler/src/ml_parser/xml_parser.ts @@ -17,7 +17,7 @@ export class XmlParser extends Parser { super(getXmlTagDefinition); } - parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult { + override parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult { return super.parse(source, url, options); } } diff --git a/packages/compiler/src/ng_module_compiler.ts b/packages/compiler/src/ng_module_compiler.ts index 7fa3fd14a071..4359a7170ed2 100644 --- a/packages/compiler/src/ng_module_compiler.ts +++ b/packages/compiler/src/ng_module_compiler.ts @@ -6,14 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ -import {CompileNgModuleMetadata, CompileProviderMetadata, identifierName} from './compile_metadata'; +import {CompileNgModuleMetadata, CompileProviderMetadata} from './compile_metadata'; import {CompileReflector} from './compile_reflector'; +import {OutputContext} from './constant_pool'; import {NodeFlags} from './core'; import {Identifiers} from './identifiers'; import * as o from './output/output_ast'; -import {typeSourceSpan} from './parse_util'; +import {identifierName, typeSourceSpan} from './parse_util'; import {NgModuleProviderAnalyzer} from './provider_analyzer'; -import {OutputContext} from './util'; import {componentFactoryResolverProviderDef, depDef, providerDef} from './view_compiler/provider_compiler'; export class NgModuleCompileResult { diff --git a/packages/compiler/src/output/abstract_js_emitter.ts b/packages/compiler/src/output/abstract_js_emitter.ts index b0054f02db80..953ad1118654 100644 --- a/packages/compiler/src/output/abstract_js_emitter.ts +++ b/packages/compiler/src/output/abstract_js_emitter.ts @@ -29,7 +29,7 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { constructor() { super(false); } - visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any { + override visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any { ctx.pushClass(stmt); this._visitClassConstructor(stmt, ctx); @@ -87,11 +87,11 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { ctx.println(stmt, `};`); } - visitWrappedNodeExpr(ast: o.WrappedNodeExpr, ctx: EmitterVisitorContext): any { + override visitWrappedNodeExpr(ast: o.WrappedNodeExpr, ctx: EmitterVisitorContext): any { throw new Error('Cannot emit a WrappedNodeExpr in Javascript.'); } - visitReadVarExpr(ast: o.ReadVarExpr, ctx: EmitterVisitorContext): string|null { + override visitReadVarExpr(ast: o.ReadVarExpr, ctx: EmitterVisitorContext): string|null { if (ast.builtin === o.BuiltinVar.This) { ctx.print(ast, 'self'); } else if (ast.builtin === o.BuiltinVar.Super) { @@ -102,7 +102,7 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { } return null; } - visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any { + override visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any { ctx.print(stmt, `var ${stmt.name}`); if (stmt.value) { ctx.print(stmt, ' = '); @@ -111,11 +111,12 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { ctx.println(stmt, `;`); return null; } - visitCastExpr(ast: o.CastExpr, ctx: EmitterVisitorContext): any { + override visitCastExpr(ast: o.CastExpr, ctx: EmitterVisitorContext): any { ast.value.visitExpression(this, ctx); return null; } - visitInvokeFunctionExpr(expr: o.InvokeFunctionExpr, ctx: EmitterVisitorContext): string|null { + override visitInvokeFunctionExpr(expr: o.InvokeFunctionExpr, ctx: EmitterVisitorContext): string + |null { const fnExpr = expr.fn; if (fnExpr instanceof o.ReadVarExpr && fnExpr.builtin === o.BuiltinVar.Super) { ctx.currentClass!.parent!.visitExpression(this, ctx); @@ -130,7 +131,7 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { } return null; } - visitTaggedTemplateExpr(ast: o.TaggedTemplateExpr, ctx: EmitterVisitorContext): any { + override visitTaggedTemplateExpr(ast: o.TaggedTemplateExpr, ctx: EmitterVisitorContext): any { // The following convoluted piece of code is effectively the downlevelled equivalent of // ``` // tag`...` @@ -151,7 +152,7 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { ctx.print(ast, ')'); return null; } - visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any { + override visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any { ctx.print(ast, `function${ast.name ? ' ' + ast.name : ''}(`); this._visitParams(ast.params, ctx); ctx.println(ast, `) {`); @@ -161,7 +162,7 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { ctx.print(ast, `}`); return null; } - visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any { + override visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any { ctx.print(stmt, `function ${stmt.name}(`); this._visitParams(stmt.params, ctx); ctx.println(stmt, `) {`); @@ -171,7 +172,7 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { ctx.println(stmt, `}`); return null; } - visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: EmitterVisitorContext): any { + override visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: EmitterVisitorContext): any { ctx.println(stmt, `try {`); ctx.incIndent(); this.visitAllStatements(stmt.bodyStmts, ctx); @@ -188,7 +189,7 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { return null; } - visitLocalizedString(ast: o.LocalizedString, ctx: EmitterVisitorContext): any { + override visitLocalizedString(ast: o.LocalizedString, ctx: EmitterVisitorContext): any { // The following convoluted piece of code is effectively the downlevelled equivalent of // ``` // $localize `...` @@ -216,7 +217,7 @@ export abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { this.visitAllObjects(param => ctx.print(null, param.name), params, ctx, ','); } - getBuiltinMethodName(method: o.BuiltinMethod): string { + override getBuiltinMethodName(method: o.BuiltinMethod): string { let name: string; switch (method) { case o.BuiltinMethod.ConcatArray: diff --git a/packages/compiler/src/output/js_emitter.ts b/packages/compiler/src/output/js_emitter.ts index 130a22251f4b..b3fdc719c6ff 100644 --- a/packages/compiler/src/output/js_emitter.ts +++ b/packages/compiler/src/output/js_emitter.ts @@ -5,11 +5,6 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ - - -import {StaticSymbol} from '../aot/static_symbol'; -import {CompileIdentifierMetadata} from '../compile_metadata'; - import {EmitterVisitorContext, OutputEmitter} from './abstract_emitter'; import {AbstractJsEmitterVisitor} from './abstract_js_emitter'; import * as o from './output_ast'; @@ -41,7 +36,7 @@ export class JavaScriptEmitter implements OutputEmitter { class JsEmitterVisitor extends AbstractJsEmitterVisitor { importsWithPrefixes = new Map(); - visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any { + override visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any { const {name, moduleName} = ast.value; if (moduleName) { let prefix = this.importsWithPrefixes.get(moduleName); @@ -54,21 +49,21 @@ class JsEmitterVisitor extends AbstractJsEmitterVisitor { ctx.print(ast, name!); return null; } - visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any { + override visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any { super.visitDeclareVarStmt(stmt, ctx); if (stmt.hasModifier(o.StmtModifier.Exported)) { ctx.println(stmt, exportVar(stmt.name)); } return null; } - visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any { + override visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any { super.visitDeclareFunctionStmt(stmt, ctx); if (stmt.hasModifier(o.StmtModifier.Exported)) { ctx.println(stmt, exportVar(stmt.name)); } return null; } - visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any { + override visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any { super.visitDeclareClassStmt(stmt, ctx); if (stmt.hasModifier(o.StmtModifier.Exported)) { ctx.println(stmt, exportVar(stmt.name)); diff --git a/packages/compiler/src/output/output_ast.ts b/packages/compiler/src/output/output_ast.ts index 4faa216c8f02..4f8c51547e15 100644 --- a/packages/compiler/src/output/output_ast.ts +++ b/packages/compiler/src/output/output_ast.ts @@ -6,7 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ - import {ParseSourceSpan} from '../parse_util'; import {I18nMeta} from '../render3/view/i18n/meta'; @@ -39,7 +38,7 @@ export class BuiltinType extends Type { constructor(public name: BuiltinTypeName, modifiers?: TypeModifier[]) { super(modifiers); } - visitType(visitor: TypeVisitor, context: any): any { + override visitType(visitor: TypeVisitor, context: any): any { return visitor.visitBuiltinType(this, context); } } @@ -49,7 +48,7 @@ export class ExpressionType extends Type { public value: Expression, modifiers?: TypeModifier[], public typeParams: Type[]|null = null) { super(modifiers); } - visitType(visitor: TypeVisitor, context: any): any { + override visitType(visitor: TypeVisitor, context: any): any { return visitor.visitExpressionType(this, context); } } @@ -59,7 +58,7 @@ export class ArrayType extends Type { constructor(public of: Type, modifiers?: TypeModifier[]) { super(modifiers); } - visitType(visitor: TypeVisitor, context: any): any { + override visitType(visitor: TypeVisitor, context: any): any { return visitor.visitArrayType(this, context); } } @@ -71,7 +70,7 @@ export class MapType extends Type { super(modifiers); this.valueType = valueType || null; } - visitType(visitor: TypeVisitor, context: any): any { + override visitType(visitor: TypeVisitor, context: any): any { return visitor.visitMapType(this, context); } } @@ -286,15 +285,15 @@ export class ReadVarExpr extends Expression { } } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin; } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitReadVarExpr(this, context); } @@ -311,15 +310,15 @@ export class TypeofExpr extends Expression { super(type, sourceSpan); } - visitExpression(visitor: ExpressionVisitor, context: any) { + override visitExpression(visitor: ExpressionVisitor, context: any) { return visitor.visitTypeofExpr(this, context); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr); } - isConstant(): boolean { + override isConstant(): boolean { return this.expr.isConstant(); } } @@ -329,15 +328,15 @@ export class WrappedNodeExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof WrappedNodeExpr && this.node === e.node; } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitWrappedNodeExpr(this, context); } } @@ -350,15 +349,15 @@ export class WriteVarExpr extends Expression { this.value = value; } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitWriteVarExpr(this, context); } @@ -381,16 +380,16 @@ export class WriteKeyExpr extends Expression { this.value = value; } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitWriteKeyExpr(this, context); } } @@ -405,16 +404,16 @@ export class WritePropExpr extends Expression { this.value = value; } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.value.isEquivalent(e.value); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitWritePropExpr(this, context); } } @@ -441,16 +440,16 @@ export class InvokeMethodExpr extends Expression { } } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitInvokeMethodExpr(this, context); } } @@ -463,16 +462,16 @@ export class InvokeFunctionExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) && areAllEquivalent(this.args, e.args) && this.pure === e.pure; } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitInvokeFunctionExpr(this, context); } } @@ -485,18 +484,18 @@ export class TaggedTemplateExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof TaggedTemplateExpr && this.tag.isEquivalent(e.tag) && areAllEquivalentPredicate( this.template.elements, e.template.elements, (a, b) => a.text === b.text) && areAllEquivalent(this.template.expressions, e.template.expressions); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitTaggedTemplateExpr(this, context); } } @@ -509,16 +508,16 @@ export class InstantiateExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) && areAllEquivalent(this.args, e.args); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitInstantiateExpr(this, context); } } @@ -531,15 +530,15 @@ export class LiteralExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof LiteralExpr && this.value === e.value; } - isConstant() { + override isConstant() { return true; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitLiteralExpr(this, context); } } @@ -575,16 +574,16 @@ export class LocalizedString extends Expression { super(STRING_TYPE, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { // return e instanceof LocalizedString && this.message === e.message; return false; } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitLocalizedString(this, context); } @@ -696,16 +695,16 @@ export class ExternalExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof ExternalExpr && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime; } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitExternalExpr(this, context); } } @@ -726,16 +725,16 @@ export class ConditionalExpr extends Expression { this.trueCase = trueCase; } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitConditionalExpr(this, context); } } @@ -746,15 +745,15 @@ export class NotExpr extends Expression { super(BOOL_TYPE, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof NotExpr && this.condition.isEquivalent(e.condition); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitNotExpr(this, context); } } @@ -764,15 +763,15 @@ export class AssertNotNull extends Expression { super(condition.type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitAssertNotNullExpr(this, context); } } @@ -782,15 +781,15 @@ export class CastExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof CastExpr && this.value.isEquivalent(e.value); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitCastExpr(this, context); } } @@ -812,16 +811,16 @@ export class FunctionExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) && areAllEquivalent(this.statements, e.statements); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitFunctionExpr(this, context); } @@ -839,16 +838,16 @@ export class UnaryOperatorExpr extends Expression { super(type || NUMBER_TYPE, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof UnaryOperatorExpr && this.operator === e.operator && this.expr.isEquivalent(e.expr); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitUnaryOperatorExpr(this, context); } } @@ -863,16 +862,16 @@ export class BinaryOperatorExpr extends Expression { this.lhs = lhs; } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof BinaryOperatorExpr && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitBinaryOperatorExpr(this, context); } } @@ -885,16 +884,16 @@ export class ReadPropExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name; } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitReadPropExpr(this, context); } @@ -911,16 +910,16 @@ export class ReadKeyExpr extends Expression { super(type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitReadKeyExpr(this, context); } @@ -937,14 +936,14 @@ export class LiteralArrayExpr extends Expression { this.entries = entries; } - isConstant() { + override isConstant() { return this.entries.every(e => e.isConstant()); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries); } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitLiteralArrayExpr(this, context); } } @@ -966,15 +965,15 @@ export class LiteralMapExpr extends Expression { } } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries); } - isConstant() { + override isConstant() { return this.entries.every(e => e.value.isConstant()); } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitLiteralMapExpr(this, context); } } @@ -984,15 +983,15 @@ export class CommaExpr extends Expression { super(parts[parts.length - 1].type, sourceSpan); } - isEquivalent(e: Expression): boolean { + override isEquivalent(e: Expression): boolean { return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts); } - isConstant() { + override isConstant() { return false; } - visitExpression(visitor: ExpressionVisitor, context: any): any { + override visitExpression(visitor: ExpressionVisitor, context: any): any { return visitor.visitCommaExpr(this, context); } } @@ -1050,7 +1049,7 @@ export class JSDocComment extends LeadingComment { constructor(public tags: JSDocTag[]) { super('', /* multiline */ true, /* trailingNewline */ true); } - toString(): string { + override toString(): string { return serializeTags(this.tags); } } @@ -1086,11 +1085,11 @@ export class DeclareVarStmt extends Statement { super(modifiers, sourceSpan, leadingComments); this.type = type || (value && value.type) || null; } - isEquivalent(stmt: Statement): boolean { + override isEquivalent(stmt: Statement): boolean { return stmt instanceof DeclareVarStmt && this.name === stmt.name && (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value); } - visitStatement(visitor: StatementVisitor, context: any): any { + override visitStatement(visitor: StatementVisitor, context: any): any { return visitor.visitDeclareVarStmt(this, context); } } @@ -1104,11 +1103,11 @@ export class DeclareFunctionStmt extends Statement { super(modifiers, sourceSpan, leadingComments); this.type = type || null; } - isEquivalent(stmt: Statement): boolean { + override isEquivalent(stmt: Statement): boolean { return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) && areAllEquivalent(this.statements, stmt.statements); } - visitStatement(visitor: StatementVisitor, context: any): any { + override visitStatement(visitor: StatementVisitor, context: any): any { return visitor.visitDeclareFunctionStmt(this, context); } } @@ -1119,10 +1118,10 @@ export class ExpressionStatement extends Statement { leadingComments?: LeadingComment[]) { super([], sourceSpan, leadingComments); } - isEquivalent(stmt: Statement): boolean { + override isEquivalent(stmt: Statement): boolean { return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr); } - visitStatement(visitor: StatementVisitor, context: any): any { + override visitStatement(visitor: StatementVisitor, context: any): any { return visitor.visitExpressionStmt(this, context); } } @@ -1134,10 +1133,10 @@ export class ReturnStatement extends Statement { leadingComments?: LeadingComment[]) { super([], sourceSpan, leadingComments); } - isEquivalent(stmt: Statement): boolean { + override isEquivalent(stmt: Statement): boolean { return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value); } - visitStatement(visitor: StatementVisitor, context: any): any { + override visitStatement(visitor: StatementVisitor, context: any): any { return visitor.visitReturnStmt(this, context); } } @@ -1192,7 +1191,7 @@ export class ClassStmt extends Statement { leadingComments?: LeadingComment[]) { super(modifiers, sourceSpan, leadingComments); } - isEquivalent(stmt: Statement): boolean { + override isEquivalent(stmt: Statement): boolean { return stmt instanceof ClassStmt && this.name === stmt.name && nullSafeIsEquivalent(this.parent, stmt.parent) && areAllEquivalent(this.fields, stmt.fields) && @@ -1200,7 +1199,7 @@ export class ClassStmt extends Statement { this.constructorMethod.isEquivalent(stmt.constructorMethod) && areAllEquivalent(this.methods, stmt.methods); } - visitStatement(visitor: StatementVisitor, context: any): any { + override visitStatement(visitor: StatementVisitor, context: any): any { return visitor.visitDeclareClassStmt(this, context); } } @@ -1213,12 +1212,12 @@ export class IfStmt extends Statement { leadingComments?: LeadingComment[]) { super([], sourceSpan, leadingComments); } - isEquivalent(stmt: Statement): boolean { + override isEquivalent(stmt: Statement): boolean { return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) && areAllEquivalent(this.trueCase, stmt.trueCase) && areAllEquivalent(this.falseCase, stmt.falseCase); } - visitStatement(visitor: StatementVisitor, context: any): any { + override visitStatement(visitor: StatementVisitor, context: any): any { return visitor.visitIfStmt(this, context); } } @@ -1229,11 +1228,11 @@ export class TryCatchStmt extends Statement { sourceSpan: ParseSourceSpan|null = null, leadingComments?: LeadingComment[]) { super([], sourceSpan, leadingComments); } - isEquivalent(stmt: Statement): boolean { + override isEquivalent(stmt: Statement): boolean { return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) && areAllEquivalent(this.catchStmts, stmt.catchStmts); } - visitStatement(visitor: StatementVisitor, context: any): any { + override visitStatement(visitor: StatementVisitor, context: any): any { return visitor.visitTryCatchStmt(this, context); } } @@ -1245,10 +1244,10 @@ export class ThrowStmt extends Statement { leadingComments?: LeadingComment[]) { super([], sourceSpan, leadingComments); } - isEquivalent(stmt: ThrowStmt): boolean { + override isEquivalent(stmt: ThrowStmt): boolean { return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error); } - visitStatement(visitor: StatementVisitor, context: any): any { + override visitStatement(visitor: StatementVisitor, context: any): any { return visitor.visitThrowStmt(this, context); } } @@ -1726,15 +1725,15 @@ export function findReadVarNames(stmts: Statement[]): Set { class _ReadVarVisitor extends RecursiveAstVisitor { varNames = new Set(); - visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any { + override visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any { // Don't descend into nested functions return stmt; } - visitDeclareClassStmt(stmt: ClassStmt, context: any): any { + override visitDeclareClassStmt(stmt: ClassStmt, context: any): any { // Don't descend into nested classes return stmt; } - visitReadVarExpr(ast: ReadVarExpr, context: any): any { + override visitReadVarExpr(ast: ReadVarExpr, context: any): any { if (ast.name) { this.varNames.add(ast.name); } @@ -1750,7 +1749,7 @@ export function collectExternalReferences(stmts: Statement[]): ExternalReference class _FindExternalReferencesVisitor extends RecursiveAstVisitor { externalReferences: ExternalReference[] = []; - visitExternalExpr(e: ExternalExpr, context: any) { + override visitExternalExpr(e: ExternalExpr, context: any) { this.externalReferences.push(e.value); return super.visitExternalExpr(e, context); } @@ -1786,7 +1785,7 @@ class _ApplySourceSpanTransformer extends AstTransformer { return clone; } - transformExpr(expr: Expression, context: any): Expression { + override transformExpr(expr: Expression, context: any): Expression { if (!expr.sourceSpan) { expr = this._clone(expr); expr.sourceSpan = this.sourceSpan; @@ -1794,7 +1793,7 @@ class _ApplySourceSpanTransformer extends AstTransformer { return expr; } - transformStmt(stmt: Statement, context: any): Statement { + override transformStmt(stmt: Statement, context: any): Statement { if (!stmt.sourceSpan) { stmt = this._clone(stmt); stmt.sourceSpan = this.sourceSpan; diff --git a/packages/compiler/src/output/output_jit.ts b/packages/compiler/src/output/output_jit.ts index d672098bcaa8..5d5f3890aac7 100644 --- a/packages/compiler/src/output/output_jit.ts +++ b/packages/compiler/src/output/output_jit.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {identifierName} from '../compile_metadata'; import {CompileReflector} from '../compile_reflector'; +import {identifierName} from '../parse_util'; import {EmitterVisitorContext} from './abstract_emitter'; import {AbstractJsEmitterVisitor} from './abstract_js_emitter'; @@ -119,31 +119,31 @@ export class JitEmitterVisitor extends AbstractJsEmitterVisitor { return result; } - visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any { + override visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any { this._emitReferenceToExternal(ast, this.reflector.resolveExternalReference(ast.value), ctx); return null; } - visitWrappedNodeExpr(ast: o.WrappedNodeExpr, ctx: EmitterVisitorContext): any { + override visitWrappedNodeExpr(ast: o.WrappedNodeExpr, ctx: EmitterVisitorContext): any { this._emitReferenceToExternal(ast, ast.node, ctx); return null; } - visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any { + override visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any { if (stmt.hasModifier(o.StmtModifier.Exported)) { this._evalExportedVars.push(stmt.name); } return super.visitDeclareVarStmt(stmt, ctx); } - visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any { + override visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any { if (stmt.hasModifier(o.StmtModifier.Exported)) { this._evalExportedVars.push(stmt.name); } return super.visitDeclareFunctionStmt(stmt, ctx); } - visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any { + override visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any { if (stmt.hasModifier(o.StmtModifier.Exported)) { this._evalExportedVars.push(stmt.name); } diff --git a/packages/compiler/src/output/ts_emitter.ts b/packages/compiler/src/output/ts_emitter.ts index 968e0ea42f05..27ff79035ed4 100644 --- a/packages/compiler/src/output/ts_emitter.ts +++ b/packages/compiler/src/output/ts_emitter.ts @@ -93,7 +93,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor } } - visitLiteralExpr(ast: o.LiteralExpr, ctx: EmitterVisitorContext): any { + override visitLiteralExpr(ast: o.LiteralExpr, ctx: EmitterVisitorContext): any { const value = ast.value; if (value == null && ast.type != o.INFERRED_TYPE) { ctx.print(ast, `(${value} as any)`); @@ -107,7 +107,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor // In SNC mode, [] have the type never[], so we cast here to any[]. // TODO: narrow the cast to a more explicit type, or use a pattern that does not // start with [].concat. see https://github.com/angular/angular/pull/11846 - visitLiteralArrayExpr(ast: o.LiteralArrayExpr, ctx: EmitterVisitorContext): any { + override visitLiteralArrayExpr(ast: o.LiteralArrayExpr, ctx: EmitterVisitorContext): any { if (ast.entries.length === 0) { ctx.print(ast, '('); } @@ -118,18 +118,18 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor return result; } - visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any { + override visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any { this._visitIdentifier(ast.value, ast.typeParams, ctx); return null; } - visitAssertNotNullExpr(ast: o.AssertNotNull, ctx: EmitterVisitorContext): any { + override visitAssertNotNullExpr(ast: o.AssertNotNull, ctx: EmitterVisitorContext): any { const result = super.visitAssertNotNullExpr(ast, ctx); ctx.print(ast, '!'); return result; } - visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any { + override visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any { if (stmt.hasModifier(o.StmtModifier.Exported) && stmt.value instanceof o.ExternalExpr && !stmt.type) { // check for a reexport @@ -162,11 +162,11 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor return null; } - visitWrappedNodeExpr(ast: o.WrappedNodeExpr, ctx: EmitterVisitorContext): never { + override visitWrappedNodeExpr(ast: o.WrappedNodeExpr, ctx: EmitterVisitorContext): never { throw new Error('Cannot visit a WrappedNodeExpr when outputting Typescript.'); } - visitCastExpr(ast: o.CastExpr, ctx: EmitterVisitorContext): any { + override visitCastExpr(ast: o.CastExpr, ctx: EmitterVisitorContext): any { ctx.print(ast, `(<`); ast.type!.visitType(this, ctx); ctx.print(ast, `>`); @@ -175,7 +175,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor return null; } - visitInstantiateExpr(ast: o.InstantiateExpr, ctx: EmitterVisitorContext): any { + override visitInstantiateExpr(ast: o.InstantiateExpr, ctx: EmitterVisitorContext): any { ctx.print(ast, `new `); this.typeExpression++; ast.classExpr.visitExpression(this, ctx); @@ -186,7 +186,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor return null; } - visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any { + override visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any { ctx.pushClass(stmt); if (stmt.hasModifier(o.StmtModifier.Exported)) { ctx.print(stmt, `export `); @@ -267,7 +267,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor ctx.println(null, `}`); } - visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any { + override visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any { if (ast.name) { ctx.print(ast, 'function '); ctx.print(ast, ast.name); @@ -288,7 +288,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor return null; } - visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any { + override visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any { if (stmt.hasModifier(o.StmtModifier.Exported)) { ctx.print(stmt, `export `); } @@ -304,7 +304,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor return null; } - visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: EmitterVisitorContext): any { + override visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: EmitterVisitorContext): any { ctx.println(stmt, `try {`); ctx.incIndent(); this.visitAllStatements(stmt.bodyStmts, ctx); @@ -375,7 +375,7 @@ class _TsEmitterVisitor extends AbstractEmitterVisitor implements o.TypeVisitor return null; } - getBuiltinMethodName(method: o.BuiltinMethod): string { + override getBuiltinMethodName(method: o.BuiltinMethod): string { let name: string; switch (method) { case o.BuiltinMethod.ConcatArray: diff --git a/packages/compiler/src/output/value_util.ts b/packages/compiler/src/output/value_util.ts index a567004669db..904c50b2aae1 100644 --- a/packages/compiler/src/output/value_util.ts +++ b/packages/compiler/src/output/value_util.ts @@ -7,7 +7,8 @@ */ -import {OutputContext, ValueTransformer, visitValue} from '../util'; +import {OutputContext} from '../constant_pool'; +import {ValueTransformer, visitValue} from '../util'; import * as o from './output_ast'; diff --git a/packages/compiler/src/parse_util.ts b/packages/compiler/src/parse_util.ts index 190233f41328..823f507f454d 100644 --- a/packages/compiler/src/parse_util.ts +++ b/packages/compiler/src/parse_util.ts @@ -5,8 +5,9 @@ * 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 {StaticSymbol} from './aot/static_symbol'; import * as chars from './chars'; -import {CompileIdentifierMetadata, identifierModuleUrl, identifierName} from './compile_metadata'; +import {stringify} from './util'; export class ParseLocation { constructor( @@ -178,3 +179,68 @@ export function r3JitTypeSourceSpan( return new ParseSourceSpan( new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1)); } + +export function syntaxError(msg: string, parseErrors?: ParseError[]): Error { + const error = Error(msg); + (error as any)[ERROR_SYNTAX_ERROR] = true; + if (parseErrors) (error as any)[ERROR_PARSE_ERRORS] = parseErrors; + return error; +} + +const ERROR_SYNTAX_ERROR = 'ngSyntaxError'; +const ERROR_PARSE_ERRORS = 'ngParseErrors'; + +export function isSyntaxError(error: Error): boolean { + return (error as any)[ERROR_SYNTAX_ERROR]; +} + +export function getParseErrors(error: Error): ParseError[] { + return (error as any)[ERROR_PARSE_ERRORS] || []; +} + +let _anonymousTypeIndex = 0; + +export function identifierName(compileIdentifier: CompileIdentifierMetadata|null|undefined): string| + null { + if (!compileIdentifier || !compileIdentifier.reference) { + return null; + } + const ref = compileIdentifier.reference; + if (ref instanceof StaticSymbol) { + return ref.name; + } + if (ref['__anonymousType']) { + return ref['__anonymousType']; + } + if (ref['__forward_ref__']) { + // We do not want to try to stringify a `forwardRef()` function because that would cause the + // inner function to be evaluated too early, defeating the whole point of the `forwardRef`. + return '__forward_ref__'; + } + let identifier = stringify(ref); + if (identifier.indexOf('(') >= 0) { + // case: anonymous functions! + identifier = `anonymous_${_anonymousTypeIndex++}`; + ref['__anonymousType'] = identifier; + } else { + identifier = sanitizeIdentifier(identifier); + } + return identifier; +} + +export function identifierModuleUrl(compileIdentifier: CompileIdentifierMetadata): string { + const ref = compileIdentifier.reference; + if (ref instanceof StaticSymbol) { + return ref.filePath; + } + // Runtime type + return `./${stringify(ref)}`; +} + +export interface CompileIdentifierMetadata { + reference: any; +} + +export function sanitizeIdentifier(name: string): string { + return name.replace(/\W/g, '_'); +} diff --git a/packages/compiler/src/render3/r3_ast.ts b/packages/compiler/src/render3/r3_ast.ts index dc7e452a11ef..0eb111b3c74c 100644 --- a/packages/compiler/src/render3/r3_ast.ts +++ b/packages/compiler/src/render3/r3_ast.ts @@ -203,11 +203,15 @@ export class NullVisitor implements Visitor { export class RecursiveVisitor implements Visitor { visitElement(element: Element): void { visitAll(this, element.attributes); + visitAll(this, element.inputs); + visitAll(this, element.outputs); visitAll(this, element.children); visitAll(this, element.references); } visitTemplate(template: Template): void { visitAll(this, template.attributes); + visitAll(this, template.inputs); + visitAll(this, template.outputs); visitAll(this, template.children); visitAll(this, template.references); visitAll(this, template.variables); diff --git a/packages/compiler/src/render3/r3_factory.ts b/packages/compiler/src/render3/r3_factory.ts index 8cc4dbfc0605..e0c94c90b22b 100644 --- a/packages/compiler/src/render3/r3_factory.ts +++ b/packages/compiler/src/render3/r3_factory.ts @@ -5,17 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ - -import {StaticSymbol} from '../aot/static_symbol'; -import {CompileTypeMetadata, tokenReference} from '../compile_metadata'; import {InjectFlags} from '../core'; import * as o from '../output/output_ast'; import {Identifiers as R3} from '../render3/r3_identifiers'; -import {OutputContext} from '../util'; - import {R3CompiledExpression, R3Reference, typeWithParameters} from './util'; -import {unsupported} from './view/util'; - /** diff --git a/packages/compiler/src/render3/view/compiler.ts b/packages/compiler/src/render3/view/compiler.ts index 49825e0a2ca9..852f967bbc7c 100644 --- a/packages/compiler/src/render3/view/compiler.ts +++ b/packages/compiler/src/render3/view/compiler.ts @@ -6,13 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import {CompileDirectiveSummary, sanitizeIdentifier} from '../../compile_metadata'; +import {CompileDirectiveSummary} from '../../compile_metadata'; import {BindingForm, convertPropertyBinding} from '../../compiler_util/expression_converter'; import {ConstantPool} from '../../constant_pool'; import * as core from '../../core'; import {AST, ParsedEvent, ParsedEventType, ParsedProperty} from '../../expression_parser/ast'; import * as o from '../../output/output_ast'; -import {ParseError, ParseSourceSpan} from '../../parse_util'; +import {ParseError, ParseSourceSpan, sanitizeIdentifier} from '../../parse_util'; import {CssSelector, SelectorMatcher} from '../../selector'; import {ShadowCss} from '../../shadow_css'; import {CONTENT_ATTR, HOST_ATTR} from '../../style_compiler'; diff --git a/packages/compiler/src/render3/view/t2_binder.ts b/packages/compiler/src/render3/view/t2_binder.ts index 5226823a53d0..ca4fca326895 100644 --- a/packages/compiler/src/render3/view/t2_binder.ts +++ b/packages/compiler/src/render3/view/t2_binder.ts @@ -51,7 +51,7 @@ export class R3TargetBinder implements TargetB // Finally, run the TemplateBinder to bind references, variables, and other entities within the // template. This extracts all the metadata that doesn't depend on directive matching. const {expressions, symbols, nestingLevel, usedPipes} = - TemplateBinder.apply(target.template, scope); + TemplateBinder.applyWithScope(target.template, scope); return new R3BoundTarget( target, directives, bindings, references, expressions, symbols, nestingLevel, templateEntities, usedPipes); @@ -347,7 +347,7 @@ class TemplateBinder extends RecursiveAstVisitor implements Visitor { // This method is defined to reconcile the type of TemplateBinder since both // RecursiveAstVisitor and Visitor define the visit() method in their // interfaces. - visit(node: AST|Node, context?: any) { + override visit(node: AST|Node, context?: any) { if (node instanceof AST) { node.visit(this, context); } else { @@ -367,7 +367,7 @@ class TemplateBinder extends RecursiveAstVisitor implements Visitor { * nesting level (how many levels deep within the template structure the `Template` is), starting * at 1. */ - static apply(template: Node[], scope: Scope): { + static applyWithScope(template: Node[], scope: Scope): { expressions: Map, symbols: Map, nestingLevel: Map, @@ -461,7 +461,7 @@ class TemplateBinder extends RecursiveAstVisitor implements Visitor { visitBoundText(text: BoundText) { text.value.visit(this); } - visitPipe(ast: BindingPipe, context: any): any { + override visitPipe(ast: BindingPipe, context: any): any { this.usedPipes.add(ast.name); return super.visitPipe(ast, context); } @@ -469,27 +469,27 @@ class TemplateBinder extends RecursiveAstVisitor implements Visitor { // These five types of AST expressions can refer to expression roots, which could be variables // or references in the current scope. - visitPropertyRead(ast: PropertyRead, context: any): any { + override visitPropertyRead(ast: PropertyRead, context: any): any { this.maybeMap(context, ast, ast.name); return super.visitPropertyRead(ast, context); } - visitSafePropertyRead(ast: SafePropertyRead, context: any): any { + override visitSafePropertyRead(ast: SafePropertyRead, context: any): any { this.maybeMap(context, ast, ast.name); return super.visitSafePropertyRead(ast, context); } - visitPropertyWrite(ast: PropertyWrite, context: any): any { + override visitPropertyWrite(ast: PropertyWrite, context: any): any { this.maybeMap(context, ast, ast.name); return super.visitPropertyWrite(ast, context); } - visitMethodCall(ast: MethodCall, context: any): any { + override visitMethodCall(ast: MethodCall, context: any): any { this.maybeMap(context, ast, ast.name); return super.visitMethodCall(ast, context); } - visitSafeMethodCall(ast: SafeMethodCall, context: any): any { + override visitSafeMethodCall(ast: SafeMethodCall, context: any): any { this.maybeMap(context, ast, ast.name); return super.visitSafeMethodCall(ast, context); } diff --git a/packages/compiler/src/render3/view/template.ts b/packages/compiler/src/render3/view/template.ts index e4ed819a7f96..a37caa822b28 100644 --- a/packages/compiler/src/render3/view/template.ts +++ b/packages/compiler/src/render3/view/template.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {flatten, sanitizeIdentifier} from '../../compile_metadata'; +import {flatten} from '../../compile_metadata'; import {BindingForm, BuiltinFunctionCall, convertActionBinding, convertPropertyBinding, convertUpdateArguments, LocalResolver} from '../../compiler_util/expression_converter'; import {ConstantPool} from '../../constant_pool'; import * as core from '../../core'; @@ -22,7 +22,7 @@ import {LexerRange} from '../../ml_parser/lexer'; import {isNgContainer as checkIsNgContainer, splitNsName} from '../../ml_parser/tags'; import {mapLiteral} from '../../output/map_util'; import * as o from '../../output/output_ast'; -import {ParseError, ParseSourceFile, ParseSourceSpan} from '../../parse_util'; +import {ParseError, ParseSourceSpan, sanitizeIdentifier} from '../../parse_util'; import {DomElementSchemaRegistry} from '../../schema/dom_element_schema_registry'; import {isTrustedTypesSink} from '../../schema/trusted_types_sinks'; import {CssSelector, SelectorMatcher} from '../../selector'; @@ -340,8 +340,8 @@ export class TemplateDefinitionBuilder implements t.Visitor, LocalResolver } // LocalResolver - maybeRestoreView(retrievalLevel: number, localRefLookup: boolean): void { - this._bindingScope.maybeRestoreView(retrievalLevel, localRefLookup); + maybeRestoreView(): void { + this._bindingScope.maybeRestoreView(); } private i18nTranslate( @@ -1495,7 +1495,7 @@ export class ValueConverter extends AstMemoryEfficientTransformer { } // AstMemoryEfficientTransformer - visitPipe(pipe: BindingPipe, context: any): AST { + override visitPipe(pipe: BindingPipe, context: any): AST { // Allocate a slot to create the pipe const slot = this.allocateSlot(); const slotPseudoLocal = `PIPE:${slot}`; @@ -1528,7 +1528,7 @@ export class ValueConverter extends AstMemoryEfficientTransformer { }); } - visitLiteralArray(array: LiteralArray, context: any): AST { + override visitLiteralArray(array: LiteralArray, context: any): AST { return new BuiltinFunctionCall( array.span, array.sourceSpan, this.visitAll(array.expressions), values => { // If the literal has calculated (non-literal) elements transform it into @@ -1539,7 +1539,7 @@ export class ValueConverter extends AstMemoryEfficientTransformer { }); } - visitLiteralMap(map: LiteralMap, context: any): AST { + override visitLiteralMap(map: LiteralMap, context: any): AST { return new BuiltinFunctionCall(map.span, map.sourceSpan, this.visitAll(map.values), values => { // If the literal has calculated (non-literal) elements transform it into // calls to literal factories that compose the literal and will cache intermediate @@ -1656,7 +1656,6 @@ const SHARED_CONTEXT_KEY = '$$shared_ctx$$'; type BindingData = { retrievalLevel: number; lhs: o.Expression; declareLocalCallback?: DeclareLocalVarCallback; declare: boolean; priority: number; - localRef: boolean; }; /** @@ -1701,15 +1700,14 @@ export class BindingScope implements LocalResolver { lhs: value.lhs, declareLocalCallback: value.declareLocalCallback, declare: false, - priority: value.priority, - localRef: value.localRef + priority: value.priority }; // Cache the value locally. this.map.set(name, value); // Possibly generate a shared context var this.maybeGenerateSharedContextVar(value); - this.maybeRestoreView(value.retrievalLevel, value.localRef); + this.maybeRestoreView(); } if (value.declareLocalCallback && !value.declare) { @@ -1754,7 +1752,6 @@ export class BindingScope implements LocalResolver { declare: false, declareLocalCallback: declareLocalCallback, priority: priority, - localRef: localRef || false }); return this; } @@ -1823,24 +1820,22 @@ export class BindingScope implements LocalResolver { }, declare: false, priority: DeclarationPriority.SHARED_CONTEXT, - localRef: false }); } getComponentProperty(name: string): o.Expression { const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0)!; componentValue.declare = true; - this.maybeRestoreView(0, false); + this.maybeRestoreView(); return componentValue.lhs.prop(name); } - maybeRestoreView(retrievalLevel: number, localRefLookup: boolean) { - // We want to restore the current view in listener fns if: - // 1 - we are accessing a value in a parent view, which requires walking the view tree rather - // than using the ctx arg. In this case, the retrieval and binding level will be different. - // 2 - we are looking up a local ref, which requires restoring the view where the local - // ref is stored - if (this.isListenerScope() && (retrievalLevel < this.bindingLevel || localRefLookup)) { + maybeRestoreView() { + // View restoration is required for listener instructions inside embedded views, because + // they only run in creation mode and they can have references to the context object. + // If the context object changes in update mode, the reference will be incorrect, because + // it was established during creation. + if (this.isListenerScope()) { if (!this.parent!.restoreViewVariable) { // parent saves variable to generate a shared `const $s$ = getCurrentView();` instruction this.parent!.restoreViewVariable = o.variable(this.parent!.freshReferenceName()); diff --git a/packages/compiler/src/resource_loader.ts b/packages/compiler/src/resource_loader.ts index ec9d91af21d9..ea65396ef1d7 100644 --- a/packages/compiler/src/resource_loader.ts +++ b/packages/compiler/src/resource_loader.ts @@ -7,11 +7,12 @@ */ /** - * An interface for retrieving documents by URL that the compiler uses - * to load templates. + * An interface for retrieving documents by URL that the compiler uses to + * load templates. + * + * This is an abstract class, rather than an interface, so that it can be used + * as injection token. */ -export class ResourceLoader { - get(url: string): Promise|string { - return ''; - } +export abstract class ResourceLoader { + abstract get(url: string): Promise|string; } diff --git a/packages/compiler/src/schema/dom_element_schema_registry.ts b/packages/compiler/src/schema/dom_element_schema_registry.ts index 2b6924c0612b..8b9708829cbb 100644 --- a/packages/compiler/src/schema/dom_element_schema_registry.ts +++ b/packages/compiler/src/schema/dom_element_schema_registry.ts @@ -291,7 +291,7 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry { }); } - hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean { + override hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean { if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) { return true; } @@ -312,7 +312,7 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry { return !!elementProperties[propName]; } - hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean { + override hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean { if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) { return true; } @@ -341,7 +341,8 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry { * above are assumed to have the 'NONE' security context, i.e. that they are safe inert * string values. Only specific well known attack vectors are assigned their appropriate context. */ - securityContext(tagName: string, propName: string, isAttribute: boolean): SecurityContext { + override securityContext(tagName: string, propName: string, isAttribute: boolean): + SecurityContext { if (isAttribute) { // NB: For security purposes, use the mapped property name, not the attribute name. propName = this.getMappedPropName(propName); @@ -359,15 +360,15 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry { return ctx ? ctx : SecurityContext.NONE; } - getMappedPropName(propName: string): string { + override getMappedPropName(propName: string): string { return _ATTR_TO_PROP[propName] || propName; } - getDefaultComponentElementName(): string { + override getDefaultComponentElementName(): string { return 'ng-component'; } - validateProperty(name: string): {error: boolean, msg?: string} { + override validateProperty(name: string): {error: boolean, msg?: string} { if (name.toLowerCase().startsWith('on')) { const msg = `Binding to event property '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...` + @@ -379,7 +380,7 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry { } } - validateAttribute(name: string): {error: boolean, msg?: string} { + override validateAttribute(name: string): {error: boolean, msg?: string} { if (name.toLowerCase().startsWith('on')) { const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...`; @@ -389,7 +390,7 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry { } } - allKnownElementNames(): string[] { + override allKnownElementNames(): string[] { return Object.keys(this._schema); } @@ -399,12 +400,13 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry { return Object.keys(elementProperties).map(prop => _PROP_TO_ATTR[prop] ?? prop); } - normalizeAnimationStyleProperty(propName: string): string { + override normalizeAnimationStyleProperty(propName: string): string { return dashCaseToCamelCase(propName); } - normalizeAnimationStyleValue(camelCaseProp: string, userProvidedProp: string, val: string|number): - {error: string, value: string} { + override normalizeAnimationStyleValue( + camelCaseProp: string, userProvidedProp: string, + val: string|number): {error: string, value: string} { let unit: string = ''; const strVal = val.toString().trim(); let errorMsg: string = null!; diff --git a/packages/compiler/src/shadow_css.ts b/packages/compiler/src/shadow_css.ts index 0cbf8c8b14af..cbb289603475 100644 --- a/packages/compiler/src/shadow_css.ts +++ b/packages/compiler/src/shadow_css.ts @@ -624,7 +624,7 @@ const _shadowDOMSelectorsRe = [ // Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future. // see https://github.com/angular/angular/pull/17677 const _shadowDeepSelectors = /(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g; -const _selectorReSuffix = '([>\\s~+\[.,{:][\\s\\S]*)?$'; +const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$'; const _polyfillHostRe = /-shadowcsshost/gim; const _colonHostRe = /:host/gim; const _colonHostContextRe = /:host-context/gim; diff --git a/packages/compiler/src/style_compiler.ts b/packages/compiler/src/style_compiler.ts index abd2690c3d7b..f766f9d4505e 100644 --- a/packages/compiler/src/style_compiler.ts +++ b/packages/compiler/src/style_compiler.ts @@ -6,12 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -import {CompileDirectiveMetadata, CompileIdentifierMetadata, CompileStylesheetMetadata, identifierModuleUrl, identifierName} from './compile_metadata'; +import {CompileDirectiveMetadata, CompileStylesheetMetadata} from './compile_metadata'; +import {OutputContext} from './constant_pool'; import {ViewEncapsulation} from './core'; import * as o from './output/output_ast'; +import {identifierModuleUrl, identifierName} from './parse_util'; import {ShadowCss} from './shadow_css'; import {UrlResolver} from './url_resolver'; -import {OutputContext} from './util'; const COMPONENT_VARIABLE = '%COMP%'; export const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`; diff --git a/packages/compiler/src/template_parser/binding_parser.ts b/packages/compiler/src/template_parser/binding_parser.ts index daffb7015528..8757e39d79d1 100644 --- a/packages/compiler/src/template_parser/binding_parser.ts +++ b/packages/compiler/src/template_parser/binding_parser.ts @@ -568,7 +568,7 @@ export class BindingParser { export class PipeCollector extends RecursiveAstVisitor { pipes = new Map(); - visitPipe(ast: BindingPipe, context: any): any { + override visitPipe(ast: BindingPipe, context: any): any { this.pipes.set(ast.name, ast); ast.exp.visit(this); this.visitAll(ast.args, context); diff --git a/packages/compiler/src/template_parser/template_ast.ts b/packages/compiler/src/template_parser/template_ast.ts index 4774890e610f..323a70afa39f 100644 --- a/packages/compiler/src/template_parser/template_ast.ts +++ b/packages/compiler/src/template_parser/template_ast.ts @@ -328,7 +328,7 @@ export class RecursiveTemplateAstVisitor extends NullTemplateVisitor implements } // Nodes with children - visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): any { + override visitEmbeddedTemplate(ast: EmbeddedTemplateAst, context: any): any { return this.visitChildren(context, visit => { visit(ast.attrs); visit(ast.references); @@ -339,7 +339,7 @@ export class RecursiveTemplateAstVisitor extends NullTemplateVisitor implements }); } - visitElement(ast: ElementAst, context: any): any { + override visitElement(ast: ElementAst, context: any): any { return this.visitChildren(context, visit => { visit(ast.attrs); visit(ast.inputs); @@ -351,7 +351,7 @@ export class RecursiveTemplateAstVisitor extends NullTemplateVisitor implements }); } - visitDirective(ast: DirectiveAst, context: any): any { + override visitDirective(ast: DirectiveAst, context: any): any { return this.visitChildren(context, visit => { visit(ast.inputs); visit(ast.hostProperties); diff --git a/packages/compiler/src/template_parser/template_parser.ts b/packages/compiler/src/template_parser/template_parser.ts index 098e8f497911..65b2613865fd 100644 --- a/packages/compiler/src/template_parser/template_parser.ts +++ b/packages/compiler/src/template_parser/template_parser.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeSummary, CompileTokenMetadata, CompileTypeMetadata, identifierName} from '../compile_metadata'; +import {CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeSummary, CompileTokenMetadata, CompileTypeMetadata} from '../compile_metadata'; import {CompileReflector} from '../compile_reflector'; import {CompilerConfig} from '../config'; import {SchemaMetadata} from '../core'; @@ -19,12 +19,12 @@ import {removeWhitespaces, replaceNgsp} from '../ml_parser/html_whitespaces'; import {expandNodes} from '../ml_parser/icu_ast_expander'; import {InterpolationConfig} from '../ml_parser/interpolation_config'; import {isNgTemplate, splitNsName} from '../ml_parser/tags'; -import {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util'; +import {identifierName, ParseError, ParseErrorLevel, ParseSourceSpan, syntaxError} from '../parse_util'; import {ProviderElementContext, ProviderViewContext} from '../provider_analyzer'; import {ElementSchemaRegistry} from '../schema/element_schema_registry'; import {CssSelector, SelectorMatcher} from '../selector'; import {isStyleUrlResolvable} from '../style_url_resolver'; -import {Console, newArray, syntaxError} from '../util'; +import {Console, newArray} from '../util'; import {BindingParser} from './binding_parser'; import * as t from './template_ast'; diff --git a/packages/compiler/src/util.ts b/packages/compiler/src/util.ts index 8c62653f09b2..e30d002ca495 100644 --- a/packages/compiler/src/util.ts +++ b/packages/compiler/src/util.ts @@ -6,11 +6,6 @@ * found in the LICENSE file at https://angular.io/license */ -import {ConstantPool} from './constant_pool'; - -import * as o from './output/output_ast'; -import {ParseError} from './parse_util'; - const DASH_CASE_REGEXP = /-+([a-z0-9])/g; export function dashCaseToCamelCase(input: string): string { @@ -104,24 +99,6 @@ export function error(msg: string): never { throw new Error(`Internal Error: ${msg}`); } -export function syntaxError(msg: string, parseErrors?: ParseError[]): Error { - const error = Error(msg); - (error as any)[ERROR_SYNTAX_ERROR] = true; - if (parseErrors) (error as any)[ERROR_PARSE_ERRORS] = parseErrors; - return error; -} - -const ERROR_SYNTAX_ERROR = 'ngSyntaxError'; -const ERROR_PARSE_ERRORS = 'ngParseErrors'; - -export function isSyntaxError(error: Error): boolean { - return (error as any)[ERROR_SYNTAX_ERROR]; -} - -export function getParseErrors(error: Error): ParseError[] { - return (error as any)[ERROR_PARSE_ERRORS] || []; -} - // Escape characters that have a special meaning in Regular Expressions export function escapeRegExp(s: string): string { return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); @@ -166,13 +143,6 @@ export function utf8Encode(str: string): Byte[] { return encoded; } -export interface OutputContext { - genFilePath: string; - statements: o.Statement[]; - constantPool: ConstantPool; - importExpr(reference: any, typeParams?: o.Type[]|null, useSummaries?: boolean): o.Expression; -} - export function stringify(token: any): string { if (typeof token === 'string') { return token; diff --git a/packages/compiler/src/view_compiler/provider_compiler.ts b/packages/compiler/src/view_compiler/provider_compiler.ts index b893f3848a22..844a54329341 100644 --- a/packages/compiler/src/view_compiler/provider_compiler.ts +++ b/packages/compiler/src/view_compiler/provider_compiler.ts @@ -8,13 +8,13 @@ import {CompileDiDependencyMetadata, CompileEntryComponentMetadata, CompileProviderMetadata, CompileTokenMetadata} from '../compile_metadata'; import {CompileReflector} from '../compile_reflector'; +import {OutputContext} from '../constant_pool'; import {DepFlags, NodeFlags} from '../core'; import {createTokenForExternalReference, Identifiers} from '../identifiers'; import {LifecycleHooks} from '../lifecycle_reflector'; import * as o from '../output/output_ast'; import {convertValueToOutputAst} from '../output/value_util'; import {ProviderAst, ProviderAstType} from '../template_parser/template_ast'; -import {OutputContext} from '../util'; export function providerDef(ctx: OutputContext, providerAst: ProviderAst): { providerExpr: o.Expression, diff --git a/packages/compiler/src/view_compiler/type_check_compiler.ts b/packages/compiler/src/view_compiler/type_check_compiler.ts index 9518b0a77d92..42bd2b959aaf 100644 --- a/packages/compiler/src/view_compiler/type_check_compiler.ts +++ b/packages/compiler/src/view_compiler/type_check_compiler.ts @@ -11,11 +11,11 @@ import {StaticReflector} from '../aot/static_reflector'; import {StaticSymbol} from '../aot/static_symbol'; import {CompileDirectiveMetadata, CompilePipeSummary} from '../compile_metadata'; import {BindingForm, convertActionBinding, convertPropertyBinding, convertPropertyBindingBuiltins, EventHandlerVars, LocalResolver} from '../compiler_util/expression_converter'; +import {OutputContext} from '../constant_pool'; import {AST, ASTWithSource, Interpolation} from '../expression_parser/ast'; import * as o from '../output/output_ast'; import {ParseSourceSpan} from '../parse_util'; import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ReferenceAst, TemplateAst, TemplateAstVisitor, templateVisitAll, TextAst, VariableAst} from '../template_parser/template_ast'; -import {OutputContext} from '../util'; /** diff --git a/packages/compiler/src/view_compiler/view_compiler.ts b/packages/compiler/src/view_compiler/view_compiler.ts index e8c4ef6ba9e6..af14575b9e6c 100644 --- a/packages/compiler/src/view_compiler/view_compiler.ts +++ b/packages/compiler/src/view_compiler/view_compiler.ts @@ -9,6 +9,7 @@ import {CompileDirectiveMetadata, CompilePipeSummary, CompileQueryMetadata, rendererTypeName, tokenReference, viewClassName} from '../compile_metadata'; import {CompileReflector} from '../compile_reflector'; import {BindingForm, BuiltinConverter, convertActionBinding, convertPropertyBinding, convertPropertyBindingBuiltins, EventHandlerVars, LocalResolver} from '../compiler_util/expression_converter'; +import {OutputContext} from '../constant_pool'; import {ArgumentType, BindingFlags, ChangeDetectionStrategy, NodeFlags, QueryBindingType, QueryValueType, ViewFlags} from '../core'; import {AST, ASTWithSource, Interpolation} from '../expression_parser/ast'; import {Identifiers} from '../identifiers'; @@ -18,13 +19,12 @@ import * as o from '../output/output_ast'; import {convertValueToOutputAst} from '../output/value_util'; import {ParseSourceSpan} from '../parse_util'; import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ProviderAst, QueryMatch, ReferenceAst, TemplateAst, TemplateAstVisitor, templateVisitAll, TextAst, VariableAst} from '../template_parser/template_ast'; -import {OutputContext} from '../util'; import {componentFactoryResolverProviderDef, depDef, lifecycleHookToNodeFlag, providerDef} from './provider_compiler'; const CLASS_ATTR = 'class'; const STYLE_ATTR = 'style'; -const IMPLICIT_TEMPLATE_VAR = '\$implicit'; +const IMPLICIT_TEMPLATE_VAR = '$implicit'; export class ViewCompileResult { constructor(public viewClassVar: string, public rendererTypeVar: string) {} diff --git a/packages/compiler/test/aot/summary_resolver_spec.ts b/packages/compiler/test/aot/summary_resolver_spec.ts index 5384580f7f77..2870dc6ca0d5 100644 --- a/packages/compiler/test/aot/summary_resolver_spec.ts +++ b/packages/compiler/test/aot/summary_resolver_spec.ts @@ -6,11 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {AotSummaryResolver, AotSummaryResolverHost, CompileSummaryKind, CompileTypeSummary, ResolvedStaticSymbol, StaticSymbol, StaticSymbolCache, StaticSymbolResolver} from '@angular/compiler'; -import {deserializeSummaries, serializeSummaries} from '@angular/compiler/src/aot/summary_serializer'; -import {ConstantPool} from '@angular/compiler/src/constant_pool'; +import {AotSummaryResolver, AotSummaryResolverHost, ResolvedStaticSymbol, StaticSymbolCache, StaticSymbolResolver} from '@angular/compiler'; +import {serializeSummaries} from '@angular/compiler/src/aot/summary_serializer'; +import {ConstantPool, OutputContext} from '@angular/compiler/src/constant_pool'; import * as o from '@angular/compiler/src/output/output_ast'; -import {OutputContext} from '@angular/compiler/src/util'; import * as path from 'path'; import {MockStaticSymbolResolverHost, MockSummaryResolver} from './static_symbol_resolver_spec'; diff --git a/packages/compiler/test/directive_resolver_spec.ts b/packages/compiler/test/directive_resolver_spec.ts index a1d7d96f2f88..e2fcabb5578e 100644 --- a/packages/compiler/test/directive_resolver_spec.ts +++ b/packages/compiler/test/directive_resolver_spec.ts @@ -227,7 +227,7 @@ class SomeDirectiveWithoutMetadata {} } class Child extends Parent { - @Input('p22') p2: any; + @Input('p22') override p2: any; @Input() p3: any; } @@ -282,7 +282,7 @@ class SomeDirectiveWithoutMetadata {} } class Child extends Parent { - @Output('p22') p2: any; + @Output('p22') override p2: any; @Output() p3: any; } @@ -328,7 +328,7 @@ class SomeDirectiveWithoutMetadata {} } class Child extends Parent { - @HostBinding('p22') p2: any; + @HostBinding('p22') override p2: any; @HostBinding() p3: any; } @@ -350,7 +350,7 @@ class SomeDirectiveWithoutMetadata {} class Child extends Parent { @HostListener('p22') - p2() { + override p2() { } @HostListener('p3') p3() { @@ -375,10 +375,10 @@ class SomeDirectiveWithoutMetadata {} class Child extends Parent { @HostListener('c1') - p1() { + override p1() { } - @HostBinding('c2') p2: any; + @HostBinding('c2') override p2: any; } const directiveMetadata = resolver.resolve(Child); @@ -426,7 +426,7 @@ class SomeDirectiveWithoutMetadata {} } class Child extends Parent { - @ContentChild('p22') p2: any; + @ContentChild('p22') override p2: any; @ContentChild('p3') p3: any; } diff --git a/packages/compiler/test/expression_parser/ast_spec.ts b/packages/compiler/test/expression_parser/ast_spec.ts index c49ff622f413..989d199e572f 100644 --- a/packages/compiler/test/expression_parser/ast_spec.ts +++ b/packages/compiler/test/expression_parser/ast_spec.ts @@ -30,7 +30,7 @@ describe('RecursiveAstVisitor', () => { }); class Visitor extends RecursiveAstVisitor { - visit(node: AST, path: AST[]) { + override visit(node: AST, path: AST[]) { path.push(node); node.visit(this, path); } diff --git a/packages/compiler/test/expression_parser/utils/unparser.ts b/packages/compiler/test/expression_parser/utils/unparser.ts index ba541ed48339..a3658d769c52 100644 --- a/packages/compiler/test/expression_parser/utils/unparser.ts +++ b/packages/compiler/test/expression_parser/utils/unparser.ts @@ -231,7 +231,7 @@ export function unparseWithSpan( ]); } - visit(ast: AST, unparsedList: UnparsedWithSpan[]) { + override visit(ast: AST, unparsedList: UnparsedWithSpan[]) { this.recordUnparsed(ast, 'span', unparsedList); if (ast.hasOwnProperty('nameSpan')) { this.recordUnparsed(ast, 'nameSpan', unparsedList); diff --git a/packages/compiler/test/expression_parser/utils/validator.ts b/packages/compiler/test/expression_parser/utils/validator.ts index 81b330d68ce2..a24c8dbe55cf 100644 --- a/packages/compiler/test/expression_parser/utils/validator.ts +++ b/packages/compiler/test/expression_parser/utils/validator.ts @@ -13,7 +13,7 @@ import {unparse} from './unparser'; class ASTValidator extends RecursiveAstVisitor { private parentSpan: ParseSpan|undefined; - visit(ast: AST) { + override visit(ast: AST) { this.parentSpan = undefined; ast.visit(this); } @@ -34,87 +34,87 @@ class ASTValidator extends RecursiveAstVisitor { this.parentSpan = oldParent; } - visitUnary(ast: Unary, context: any): any { + override visitUnary(ast: Unary, context: any): any { this.validate(ast, () => super.visitUnary(ast, context)); } - visitBinary(ast: Binary, context: any): any { + override visitBinary(ast: Binary, context: any): any { this.validate(ast, () => super.visitBinary(ast, context)); } - visitChain(ast: Chain, context: any): any { + override visitChain(ast: Chain, context: any): any { this.validate(ast, () => super.visitChain(ast, context)); } - visitConditional(ast: Conditional, context: any): any { + override visitConditional(ast: Conditional, context: any): any { this.validate(ast, () => super.visitConditional(ast, context)); } - visitFunctionCall(ast: FunctionCall, context: any): any { + override visitFunctionCall(ast: FunctionCall, context: any): any { this.validate(ast, () => super.visitFunctionCall(ast, context)); } - visitImplicitReceiver(ast: ImplicitReceiver, context: any): any { + override visitImplicitReceiver(ast: ImplicitReceiver, context: any): any { this.validate(ast, () => super.visitImplicitReceiver(ast, context)); } - visitInterpolation(ast: Interpolation, context: any): any { + override visitInterpolation(ast: Interpolation, context: any): any { this.validate(ast, () => super.visitInterpolation(ast, context)); } - visitKeyedRead(ast: KeyedRead, context: any): any { + override visitKeyedRead(ast: KeyedRead, context: any): any { this.validate(ast, () => super.visitKeyedRead(ast, context)); } - visitKeyedWrite(ast: KeyedWrite, context: any): any { + override visitKeyedWrite(ast: KeyedWrite, context: any): any { this.validate(ast, () => super.visitKeyedWrite(ast, context)); } - visitLiteralArray(ast: LiteralArray, context: any): any { + override visitLiteralArray(ast: LiteralArray, context: any): any { this.validate(ast, () => super.visitLiteralArray(ast, context)); } - visitLiteralMap(ast: LiteralMap, context: any): any { + override visitLiteralMap(ast: LiteralMap, context: any): any { this.validate(ast, () => super.visitLiteralMap(ast, context)); } - visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any { + override visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any { this.validate(ast, () => super.visitLiteralPrimitive(ast, context)); } - visitMethodCall(ast: MethodCall, context: any): any { + override visitMethodCall(ast: MethodCall, context: any): any { this.validate(ast, () => super.visitMethodCall(ast, context)); } - visitPipe(ast: BindingPipe, context: any): any { + override visitPipe(ast: BindingPipe, context: any): any { this.validate(ast, () => super.visitPipe(ast, context)); } - visitPrefixNot(ast: PrefixNot, context: any): any { + override visitPrefixNot(ast: PrefixNot, context: any): any { this.validate(ast, () => super.visitPrefixNot(ast, context)); } - visitPropertyRead(ast: PropertyRead, context: any): any { + override visitPropertyRead(ast: PropertyRead, context: any): any { this.validate(ast, () => super.visitPropertyRead(ast, context)); } - visitPropertyWrite(ast: PropertyWrite, context: any): any { + override visitPropertyWrite(ast: PropertyWrite, context: any): any { this.validate(ast, () => super.visitPropertyWrite(ast, context)); } - visitQuote(ast: Quote, context: any): any { + override visitQuote(ast: Quote, context: any): any { this.validate(ast, () => super.visitQuote(ast, context)); } - visitSafeMethodCall(ast: SafeMethodCall, context: any): any { + override visitSafeMethodCall(ast: SafeMethodCall, context: any): any { this.validate(ast, () => super.visitSafeMethodCall(ast, context)); } - visitSafePropertyRead(ast: SafePropertyRead, context: any): any { + override visitSafePropertyRead(ast: SafePropertyRead, context: any): any { this.validate(ast, () => super.visitSafePropertyRead(ast, context)); } - visitSafeKeyedRead(ast: SafeKeyedRead, context: any): any { + override visitSafeKeyedRead(ast: SafeKeyedRead, context: any): any { this.validate(ast, () => super.visitSafeKeyedRead(ast, context)); } } diff --git a/packages/compiler/test/i18n/message_bundle_spec.ts b/packages/compiler/test/i18n/message_bundle_spec.ts index c1a2b23d0813..8d2f7edce97c 100644 --- a/packages/compiler/test/i18n/message_bundle_spec.ts +++ b/packages/compiler/test/i18n/message_bundle_spec.ts @@ -44,17 +44,17 @@ import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/ml_parser/interpolation_co } class _TestSerializer extends Serializer { - write(messages: i18n.Message[]): string { + override write(messages: i18n.Message[]): string { return messages.map(msg => `${serializeNodes(msg.nodes)} (${msg.meaning}|${msg.description})`) .join('//'); } - load(content: string, url: string): + override load(content: string, url: string): {locale: string|null, i18nNodesByMsgId: {[id: string]: i18n.Node[]}} { return {locale: null, i18nNodesByMsgId: {}}; } - digest(msg: i18n.Message): string { + override digest(msg: i18n.Message): string { return msg.id || `default`; } } diff --git a/packages/compiler/test/i18n/serializers/i18n_ast_spec.ts b/packages/compiler/test/i18n/serializers/i18n_ast_spec.ts index 7b2fe3b7b715..203076240345 100644 --- a/packages/compiler/test/i18n/serializers/i18n_ast_spec.ts +++ b/packages/compiler/test/i18n/serializers/i18n_ast_spec.ts @@ -58,15 +58,15 @@ class RecurseVisitor extends i18n.RecurseVisitor { phCount = 0; icuPhCount = 0; - visitText(text: i18n.Text, context?: any): any { + override visitText(text: i18n.Text, context?: any): any { this.textCount++; } - visitPlaceholder(ph: i18n.Placeholder, context?: any): any { + override visitPlaceholder(ph: i18n.Placeholder, context?: any): any { this.phCount++; } - visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): any { + override visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): any { this.icuPhCount++; } } diff --git a/packages/compiler/test/metadata_resolver_spec.ts b/packages/compiler/test/metadata_resolver_spec.ts index 040d075b4c25..78856d6dba74 100644 --- a/packages/compiler/test/metadata_resolver_spec.ts +++ b/packages/compiler/test/metadata_resolver_spec.ts @@ -10,8 +10,9 @@ import {LIFECYCLE_HOOKS_VALUES, LifecycleHooks} from '@angular/compiler/src/life import {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, ChangeDetectionStrategy, Component, Directive, DoCheck, Injectable, NgModule, OnChanges, OnDestroy, OnInit, Pipe, SimpleChanges, ViewEncapsulation, ɵstringify as stringify} from '@angular/core'; import {inject, TestBed, waitForAsync} from '@angular/core/testing'; -import {CompileDiDependencyMetadata, identifierName} from '../src/compile_metadata'; +import {CompileDiDependencyMetadata} from '../src/compile_metadata'; import {CompileMetadataResolver} from '../src/metadata_resolver'; +import {identifierName} from '../src/parse_util'; import {ResourceLoader} from '../src/resource_loader'; import {MockResourceLoader} from '../testing/src/resource_loader_mock'; diff --git a/packages/compiler/test/ml_parser/html_parser_spec.ts b/packages/compiler/test/ml_parser/html_parser_spec.ts index b971d9187a72..851516b4874a 100644 --- a/packages/compiler/test/ml_parser/html_parser_spec.ts +++ b/packages/compiler/test/ml_parser/html_parser_spec.ts @@ -239,6 +239,23 @@ import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn, humanizeNodes} ]); expect(parsed.errors).toEqual([]); }); + + it('should treat prematurely terminated interpolation as text', () => { + const {errors, rootNodes} = + parser.parse('
      x {{ expr }} y
      ', 'TestComp'); + expect(humanizeNodes(rootNodes, true)).toEqual([ + [ + html.Element, 'div', 0, '
      x {{ expr }} y
      ', + '
      ', '
      ' + ], + [html.Element, 'span', 1, 'x {{ expr }} y', '', ''], + [html.Text, 'x {{ expr }', 2, 'x {{ expr }'], + [html.Comment, '', 2, ' ${url})`); + } + + const client = (type === 'window') ? new MockWindowClient(clientId, url) : + new MockClient(clientId, url, type); + this.clients.set(clientId, client); + } + + remove(clientId: string): void { + this.clients.delete(clientId); + } + + async get(id: string): Promise { + return this.clients.get(id)!; + } + + getMock(id: string): MockClient|undefined { + return this.clients.get(id); + } + + async matchAll(options?: T): + Promise> { + const type = options?.type ?? 'window'; + const allClients = Array.from(this.clients.values()); + const matchedClients = + (type === 'all') ? allClients : allClients.filter(client => client.type === type); + + // Order clients according to the [spec](https://w3c.github.io/ServiceWorker/#clients-matchall): + // In most recently focused then most recently created order, with windows clients before other + // clients. + return matchedClients + // Sort in most recently created order. + .reverse() + // Sort in most recently focused order. + .sort((a, b) => b.lastFocusedAt - a.lastFocusedAt) + // Sort windows clients before other clients (otherwise leave existing order). + .sort((a, b) => { + const aScore = (a.type === 'window') ? 1 : 0; + const bScore = (b.type === 'window') ? 1 : 0; + return bScore - aScore; + }) as any; + } + + async openWindow(url: string): Promise { + return null; + } + + async claim(): Promise {} +} diff --git a/packages/service-worker/worker/testing/events.ts b/packages/service-worker/worker/testing/events.ts new file mode 100644 index 000000000000..bedd3a7ce178 --- /dev/null +++ b/packages/service-worker/worker/testing/events.ts @@ -0,0 +1,124 @@ +/** + * @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 class MockEvent implements Event { + readonly AT_TARGET = -1; + readonly BUBBLING_PHASE = -1; + readonly CAPTURING_PHASE = -1; + readonly NONE = -1; + + readonly bubbles = false; + cancelBubble = false; + readonly cancelable = false; + readonly composed = false; + readonly currentTarget = null; + readonly defaultPrevented = false; + readonly eventPhase = -1; + readonly isTrusted = false; + returnValue = false; + readonly srcElement = null; + readonly target = null; + readonly timeStamp = Date.now(); + + constructor(readonly type: string) {} + + composedPath(): EventTarget[] { + this.notImplemented(); + } + initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void { + this.notImplemented(); + } + preventDefault(): void { + this.notImplemented(); + } + stopImmediatePropagation(): void { + this.notImplemented(); + } + stopPropagation(): void { + this.notImplemented(); + } + + private notImplemented(): never { + throw new Error('Method not implemented in `MockEvent`.'); + } +} + +export class MockExtendableEvent extends MockEvent implements ExtendableEvent { + private queue: Promise[] = []; + + get ready(): Promise { + return (async () => { + while (this.queue.length > 0) { + await this.queue.shift(); + } + })(); + } + + waitUntil(promise: Promise): void { + this.queue.push(promise); + } +} + +export class MockActivateEvent extends MockExtendableEvent { + constructor() { + super('activate'); + } +} + +export class MockFetchEvent extends MockExtendableEvent implements FetchEvent { + readonly preloadResponse = Promise.resolve(); + response: Promise = Promise.resolve(undefined); + + constructor( + readonly request: Request, readonly clientId: string, readonly resultingClientId: string) { + super('fetch'); + } + + respondWith(r: Response|Promise): void { + this.response = Promise.resolve(r); + } +} + +export class MockInstallEvent extends MockExtendableEvent { + constructor() { + super('install'); + } +} + +export class MockExtendableMessageEvent extends MockExtendableEvent implements + ExtendableMessageEvent { + readonly lastEventId = ''; + readonly origin = ''; + readonly ports: ReadonlyArray = []; + + constructor(readonly data: any, readonly source: Client|MessagePort|ServiceWorker|null) { + super('message'); + } +} + +export class MockNotificationEvent extends MockExtendableEvent implements NotificationEvent { + readonly notification = { + ...this._notification, + close: () => undefined, + } as Notification; + + constructor(private _notification: Partial, readonly action = '') { + super('notification'); + } +} + +export class MockPushEvent extends MockExtendableEvent implements PushEvent { + readonly data = { + json: () => this._data, + text: () => JSON.stringify(this._data), + } as PushMessageData; + + constructor(private _data: object) { + super('push'); + } +} diff --git a/packages/service-worker/worker/testing/fetch.ts b/packages/service-worker/worker/testing/fetch.ts index 43ed7e33d8a5..06a2d8c1cfc4 100644 --- a/packages/service-worker/worker/testing/fetch.ts +++ b/packages/service-worker/worker/testing/fetch.ts @@ -99,7 +99,6 @@ export class MockHeaders implements Headers { export class MockRequest extends MockBody implements Request { readonly isHistoryNavigation: boolean = false; readonly isReloadNavigation: boolean = false; - readonly body!: ReadableStream; readonly cache: RequestCache = 'default'; readonly credentials: RequestCredentials = 'omit'; readonly destination: RequestDestination = 'document'; diff --git a/packages/service-worker/worker/testing/scope.ts b/packages/service-worker/worker/testing/scope.ts index fb92476c3d47..16328c53439c 100644 --- a/packages/service-worker/worker/testing/scope.ts +++ b/packages/service-worker/worker/testing/scope.ts @@ -6,50 +6,19 @@ * found in the LICENSE file at https://angular.io/license */ -import {Subject} from 'rxjs'; - -import {Adapter, Context} from '../src/adapter'; +import {Adapter} from '../src/adapter'; import {AssetGroupConfig, Manifest} from '../src/manifest'; import {sha1} from '../src/sha1'; import {MockCacheStorage} from './cache'; +import {MockClient, MockClients} from './clients'; +import {MockActivateEvent, MockExtendableMessageEvent, MockFetchEvent, MockInstallEvent, MockNotificationEvent, MockPushEvent} from './events'; import {MockHeaders, MockRequest, MockResponse} from './fetch'; import {MockServerState, MockServerStateBuilder} from './mock'; import {normalizeUrl, parseUrl} from './utils'; const EMPTY_SERVER_STATE = new MockServerStateBuilder().build(); -export class MockClient { - queue = new Subject(); - - constructor(readonly id: string) {} - - readonly messages: Object[] = []; - - postMessage(message: Object): void { - this.messages.push(message); - this.queue.next(message); - } -} -export class WindowClientImpl extends MockClient implements WindowClient { - readonly ancestorOrigins: ReadonlyArray = []; - readonly focused: boolean = false; - readonly visibilityState: VisibilityState = 'hidden'; - frameType: ClientFrameType = 'top-level'; - url = 'http://localhost/unique'; - - constructor(readonly id: string) { - super(id); - } - - async focus(): Promise { - return this; - } - async navigate(url: string): Promise { - return this; - } -} - export class SwTestHarnessBuilder { private origin = parseUrl(this.scopeUrl).origin; private server = EMPTY_SERVER_STATE; @@ -68,47 +37,16 @@ export class SwTestHarnessBuilder { } build(): SwTestHarness { - return new SwTestHarness(this.server, this.caches, this.scopeUrl); + return new SwTestHarnessImpl(this.server, this.caches, this.scopeUrl) as SwTestHarness; } } -export class MockClients implements Clients { - private clients = new Map(); - - add(clientId: string): void { - if (this.clients.has(clientId)) { - return; - } - this.clients.set(clientId, new MockClient(clientId)); - } - - remove(clientId: string): void { - this.clients.delete(clientId); - } +export type SwTestHarness = SwTestHarnessImpl&ServiceWorkerGlobalScope; - async get(id: string): Promise { - return this.clients.get(id)! as any as Client; - } - - getMock(id: string): MockClient|undefined { - return this.clients.get(id); - } - - async matchAll(options?: T): - Promise> { - return Array.from(this.clients.values()) as any[]; - } - async openWindow(url: string): Promise { - return null; - } - - async claim(): Promise {} -} - -export class SwTestHarness extends Adapter implements Context, - ServiceWorkerGlobalScope { +export class SwTestHarnessImpl extends Adapter implements + Partial { readonly clients = new MockClients(); - private eventHandlers = new Map(); + private eventHandlers = new Map(); private skippedWaiting = false; private selfMessageQueue: any[] = []; @@ -133,23 +71,7 @@ export class SwTestHarness extends Adapter implements Context, }, } as any; - static envIsSupported(): boolean { - if (typeof URL === 'function') { - return true; - } - - // If we're in a browser that doesn't support URL at this point, don't go any further - // since browser builds use requirejs which will fail on the `require` call below. - if (typeof window !== 'undefined' && window) { - return false; - } - - // In older Node.js versions, the `URL` global does not exist. We can use `url` instead. - const url = (typeof require === 'function') && require('url'); - return url && (typeof url.parse === 'function') && (typeof url.resolve === 'function'); - } - - get time() { + override get time() { return this.mockTime; } @@ -162,7 +84,7 @@ export class SwTestHarness extends Adapter implements Context, fired: boolean, }[] = []; - parseUrl = parseUrl; + override parseUrl = parseUrl; constructor(private server: MockServerState, caches: MockCacheStorage, scopeUrl: string) { super(scopeUrl, caches); @@ -212,23 +134,37 @@ export class SwTestHarness extends Adapter implements Context, } } - addEventListener(event: string, handler: Function): void { - this.eventHandlers.set(event, handler); + addEventListener( + type: string, listener: EventListenerOrEventListenerObject, + options?: boolean|AddEventListenerOptions): void { + if (options !== undefined) { + throw new Error('Mock `addEventListener()` does not support `options`.'); + } + + const handler: EventListener = + (typeof listener === 'function') ? listener : evt => listener.handleEvent(evt); + this.eventHandlers.set(type, handler); } - removeEventListener(event: string, handler?: Function): void { - this.eventHandlers.delete(event); + removeEventListener( + type: string, listener: EventListenerOrEventListenerObject, + options?: boolean|AddEventListenerOptions): void { + if (options !== undefined) { + throw new Error('Mock `removeEventListener()` does not support `options`.'); + } + + this.eventHandlers.delete(type); } - newRequest(url: string, init: Object = {}): Request { + override newRequest(url: string, init: Object = {}): Request { return new MockRequest(normalizeUrl(url, this.scopeUrl), init); } - newResponse(body: string, init: Object = {}): Response { + override newResponse(body: string, init: Object = {}): Response { return new MockResponse(body, init); } - newHeaders(headers: {[name: string]: string}): Headers { + override newHeaders(headers: {[name: string]: string}): Headers { return Object.keys(headers).reduce((mock, name) => { mock.set(name, headers[name]); return mock; @@ -239,22 +175,21 @@ export class SwTestHarness extends Adapter implements Context, this.skippedWaiting = true; } - waitUntil(promise: Promise): void {} - handleFetch(req: Request, clientId = ''): [Promise, Promise] { if (!this.eventHandlers.has('fetch')) { throw new Error('No fetch handler registered'); } const isNavigation = req.mode === 'navigate'; + + if (clientId && !this.clients.getMock(clientId)) { + this.clients.add(clientId, isNavigation ? req.url : this.scopeUrl); + } + const event = isNavigation ? new MockFetchEvent(req, '', clientId) : new MockFetchEvent(req, clientId, ''); this.eventHandlers.get('fetch')!.call(this, event); - if (clientId) { - this.clients.add(clientId); - } - return [event.response, event.ready]; } @@ -262,14 +197,15 @@ export class SwTestHarness extends Adapter implements Context, if (!this.eventHandlers.has('message')) { throw new Error('No message handler registered'); } - let event: MockMessageEvent; - if (clientId === null) { - event = new MockMessageEvent(data, null); - } else { - this.clients.add(clientId); - event = new MockMessageEvent(data, this.clients.getMock(clientId) || null); + + if (clientId && !this.clients.getMock(clientId)) { + this.clients.add(clientId, this.scopeUrl); } + + const event = + new MockExtendableMessageEvent(data, clientId && this.clients.getMock(clientId) || null); this.eventHandlers.get('message')!.call(this, event); + return event.ready; } @@ -291,7 +227,7 @@ export class SwTestHarness extends Adapter implements Context, return event.ready; } - timeout(ms: number): Promise { + override timeout(ms: number): Promise { const promise = new Promise(resolve => { this.timers.push({ at: this.mockTime + ms, @@ -318,7 +254,7 @@ export class SwTestHarness extends Adapter implements Context, }); } - isClient(obj: any): obj is Client { + override isClient(obj: any): obj is Client { return obj instanceof MockClient; } } @@ -375,61 +311,3 @@ export class ConfigBuilder { }; } } - -class OneTimeContext implements Context { - private queue: Promise[] = []; - - waitUntil(promise: Promise): void { - this.queue.push(promise); - } - - get ready(): Promise { - return (async () => { - while (this.queue.length > 0) { - await this.queue.shift(); - } - })(); - } -} - -class MockExtendableEvent extends OneTimeContext {} - -class MockFetchEvent extends MockExtendableEvent { - response: Promise = Promise.resolve(undefined); - - constructor( - readonly request: Request, readonly clientId: string, readonly resultingClientId: string) { - super(); - } - - respondWith(promise: Promise): Promise { - this.response = promise; - return promise; - } -} - -class MockMessageEvent extends MockExtendableEvent { - constructor(readonly data: Object, readonly source: MockClient|null) { - super(); - } -} - -class MockPushEvent extends MockExtendableEvent { - constructor(private _data: Object) { - super(); - } - data = { - json: () => this._data, - }; -} - -class MockNotificationEvent extends MockExtendableEvent { - constructor(private _notification: any, readonly action?: string) { - super(); - } - readonly notification = {...this._notification, close: () => undefined}; -} - -class MockInstallEvent extends MockExtendableEvent {} - -class MockActivateEvent extends MockExtendableEvent {} diff --git a/packages/service-worker/worker/testing/utils.ts b/packages/service-worker/worker/testing/utils.ts index 761907eecfbe..787ab712eca6 100644 --- a/packages/service-worker/worker/testing/utils.ts +++ b/packages/service-worker/worker/testing/utils.ts @@ -9,6 +9,27 @@ import {NormalizedUrl} from '../src/api'; +/** + * Determine whether the current environment provides all necessary APIs to run ServiceWorker tests. + * + * @return Whether ServiceWorker tests can be run in the current environment. + */ +export function envIsSupported(): boolean { + if (typeof URL === 'function') { + return true; + } + + // If we're in a browser that doesn't support URL at this point, don't go any further + // since browser builds use requirejs which will fail on the `require` call below. + if (typeof window !== 'undefined' && window) { + return false; + } + + // In older Node.js versions, the `URL` global does not exist. We can use `url` instead. + const url = (typeof require === 'function') && require('url'); + return url && (typeof url.parse === 'function') && (typeof url.resolve === 'function'); +} + /** * Get a normalized representation of a URL relative to a provided base URL. * diff --git a/packages/tsconfig-build.json b/packages/tsconfig-build.json index e9793106ccf2..7bfa7c17610f 100644 --- a/packages/tsconfig-build.json +++ b/packages/tsconfig-build.json @@ -8,6 +8,7 @@ "declaration": true, "stripInternal": true, "noImplicitAny": true, + "noImplicitOverride": true, "strictNullChecks": true, "strict": true, "strictPropertyInitialization": true, diff --git a/packages/tsconfig-legacy-saucelabs.json b/packages/tsconfig-legacy-saucelabs.json new file mode 100644 index 000000000000..55a8be352222 --- /dev/null +++ b/packages/tsconfig-legacy-saucelabs.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + // The project uses Bazel for TypeScript compilation. Unlike with Bazel, we build all + // sources as part of a single TypeScript compilation. This results in `@internal` + // declarations not being omitted between the logical as defined per the Bazel targets. + // This can cause issues where the `override` keyword is needed for the legacy TS + // compilation, but not within Bazel where the overridden member has `@internal`. + "noImplicitOverride": false, + } +} diff --git a/packages/tsconfig.json b/packages/tsconfig.json index ae0df22ad60c..681addcbb20b 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -14,6 +14,7 @@ "strictPropertyInitialization": true, "outDir": "../dist/all/@angular", "noImplicitAny": true, + "noImplicitOverride": true, "noFallthroughCasesInSwitch": true, "paths": { "selenium-webdriver": ["./node_modules/@types/selenium-webdriver/index.d.ts"], diff --git a/packages/upgrade/src/common/src/downgrade_component.ts b/packages/upgrade/src/common/src/downgrade_component.ts index b0949e3d8583..f48e7c0cc452 100644 --- a/packages/upgrade/src/common/src/downgrade_component.ts +++ b/packages/upgrade/src/common/src/downgrade_component.ts @@ -232,7 +232,7 @@ class ParentInjectorPromise extends SyncPromise { element.data!(this.injectorKey, this); } - resolve(injector: Injector): void { + override resolve(injector: Injector): void { // Store the real injector on the element. this.element.data!(this.injectorKey, injector); diff --git a/packages/upgrade/src/common/test/helpers/common_test_helpers.ts b/packages/upgrade/src/common/test/helpers/common_test_helpers.ts index 72a02dcd8826..f6e5f0ba5f4f 100644 --- a/packages/upgrade/src/common/test/helpers/common_test_helpers.ts +++ b/packages/upgrade/src/common/test/helpers/common_test_helpers.ts @@ -27,7 +27,7 @@ const ng1Versions = [ }, { label: '1.8', - files: [`angular/${ANGULARJS_FILENAME}`, 'angular-mocks/angular-mocks.js'], + files: [`angular-1.8/${ANGULARJS_FILENAME}`, 'angular-mocks-1.8/angular-mocks.js'], }, ]; diff --git a/packages/upgrade/static/src/upgrade_component.ts b/packages/upgrade/static/src/upgrade_component.ts index 921800dbe951..fa86ac0b9e11 100644 --- a/packages/upgrade/static/src/upgrade_component.ts +++ b/packages/upgrade/static/src/upgrade_component.ts @@ -65,6 +65,7 @@ class Bindings { * * the `ElementRef` and `Injector` for the component wrapper * * @publicApi + * @extensible */ @Directive() export class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy { diff --git a/packages/zone.js/karma-dist-sauce-jasmine3.conf.js b/packages/zone.js/karma-dist-sauce-jasmine3.conf.js index 15111c5b438e..377ef15935f7 100644 --- a/packages/zone.js/karma-dist-sauce-jasmine3.conf.js +++ b/packages/zone.js/karma-dist-sauce-jasmine3.conf.js @@ -10,6 +10,6 @@ module.exports = function(config) { require('./karma-dist-jasmine.conf.js')(config); require('./sauce.conf')(config, [ 'SL_IOS9', 'SL_CHROME', 'SL_FIREFOX_54', 'SL_SAFARI8', 'SL_SAFARI9', 'SL_SAFARI10', 'SL_IOS8', - 'SL_IOS9', 'SL_IOS10', 'SL_IE11', 'SL_MSEDGE15', 'SL_ANDROID4.4', 'SL_ANDROID5.1' + 'SL_IOS9', 'SL_IOS10', 'SL_MSEDGE15', 'SL_ANDROID4.4', 'SL_ANDROID5.1' ]) }; diff --git a/packages/zone.js/lib/zone.ts b/packages/zone.js/lib/zone.ts index 59f23745b808..01e13c8dce79 100644 --- a/packages/zone.js/lib/zone.ts +++ b/packages/zone.js/lib/zone.ts @@ -673,8 +673,6 @@ interface EventTask extends Task { /** @internal */ type AmbientZone = Zone; -/** @internal */ -type AmbientZoneDelegate = ZoneDelegate; const Zone: ZoneType = (function(global: any) { const performance: {mark(name: string): void; measure(name: string, label: string): void;} = @@ -774,14 +772,14 @@ const Zone: ZoneType = (function(global: any) { private _parent: Zone|null; private _name: string; private _properties: {[key: string]: any}; - private _zoneDelegate: ZoneDelegate; + private _zoneDelegate: _ZoneDelegate; constructor(parent: Zone|null, zoneSpec: ZoneSpec|null) { this._parent = parent; this._name = zoneSpec ? zoneSpec.name || 'unnamed' : ''; this._properties = zoneSpec && zoneSpec.properties || {}; this._zoneDelegate = - new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec); + new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec); } public get(key: string): any { @@ -909,7 +907,7 @@ const Zone: ZoneType = (function(global: any) { } } (task as any as ZoneTask)._transitionTo(scheduling, notScheduled); - const zoneDelegates: ZoneDelegate[] = []; + const zoneDelegates: _ZoneDelegate[] = []; (task as any as ZoneTask)._zoneDelegates = zoneDelegates; (task as any as ZoneTask)._zone = this; try { @@ -987,20 +985,18 @@ const Zone: ZoneType = (function(global: any) { const DELEGATE_ZS: ZoneSpec = { name: '', onHasTask: - (delegate: AmbientZoneDelegate, _: AmbientZone, target: AmbientZone, - hasTaskState: HasTaskState): void => delegate.hasTask(target, hasTaskState), - onScheduleTask: - (delegate: AmbientZoneDelegate, _: AmbientZone, target: AmbientZone, task: Task): Task => - delegate.scheduleTask(target, task), + (delegate: ZoneDelegate, _: AmbientZone, target: AmbientZone, hasTaskState: HasTaskState): + void => delegate.hasTask(target, hasTaskState), + onScheduleTask: (delegate: ZoneDelegate, _: AmbientZone, target: AmbientZone, task: Task): + Task => delegate.scheduleTask(target, task), onInvokeTask: - (delegate: AmbientZoneDelegate, _: AmbientZone, target: AmbientZone, task: Task, - applyThis: any, applyArgs: any): any => - delegate.invokeTask(target, task, applyThis, applyArgs), - onCancelTask: (delegate: AmbientZoneDelegate, _: AmbientZone, target: AmbientZone, task: Task): - any => delegate.cancelTask(target, task) + (delegate: ZoneDelegate, _: AmbientZone, target: AmbientZone, task: Task, applyThis: any, + applyArgs: any): any => delegate.invokeTask(target, task, applyThis, applyArgs), + onCancelTask: (delegate: ZoneDelegate, _: AmbientZone, target: AmbientZone, task: Task): any => + delegate.cancelTask(target, task) }; - class ZoneDelegate implements AmbientZoneDelegate { + class _ZoneDelegate implements ZoneDelegate { public zone: Zone; private _taskCounts: @@ -1008,42 +1004,42 @@ const Zone: ZoneType = (function(global: any) { macroTask: number, eventTask: number} = {'microTask': 0, 'macroTask': 0, 'eventTask': 0}; - private _parentDelegate: ZoneDelegate|null; + private _parentDelegate: _ZoneDelegate|null; - private _forkDlgt: ZoneDelegate|null; + private _forkDlgt: _ZoneDelegate|null; private _forkZS: ZoneSpec|null; private _forkCurrZone: Zone|null; - private _interceptDlgt: ZoneDelegate|null; + private _interceptDlgt: _ZoneDelegate|null; private _interceptZS: ZoneSpec|null; private _interceptCurrZone: Zone|null; - private _invokeDlgt: ZoneDelegate|null; + private _invokeDlgt: _ZoneDelegate|null; private _invokeZS: ZoneSpec|null; private _invokeCurrZone: Zone|null; - private _handleErrorDlgt: ZoneDelegate|null; + private _handleErrorDlgt: _ZoneDelegate|null; private _handleErrorZS: ZoneSpec|null; private _handleErrorCurrZone: Zone|null; - private _scheduleTaskDlgt: ZoneDelegate|null; + private _scheduleTaskDlgt: _ZoneDelegate|null; private _scheduleTaskZS: ZoneSpec|null; private _scheduleTaskCurrZone: Zone|null; - private _invokeTaskDlgt: ZoneDelegate|null; + private _invokeTaskDlgt: _ZoneDelegate|null; private _invokeTaskZS: ZoneSpec|null; private _invokeTaskCurrZone: Zone|null; - private _cancelTaskDlgt: ZoneDelegate|null; + private _cancelTaskDlgt: _ZoneDelegate|null; private _cancelTaskZS: ZoneSpec|null; private _cancelTaskCurrZone: Zone|null; - private _hasTaskDlgt: ZoneDelegate|null; - private _hasTaskDlgtOwner: ZoneDelegate|null; + private _hasTaskDlgt: _ZoneDelegate|null; + private _hasTaskDlgtOwner: _ZoneDelegate|null; private _hasTaskZS: ZoneSpec|null; private _hasTaskCurrZone: Zone|null; - constructor(zone: Zone, parentDelegate: ZoneDelegate|null, zoneSpec: ZoneSpec|null) { + constructor(zone: Zone, parentDelegate: _ZoneDelegate|null, zoneSpec: ZoneSpec|null) { this.zone = zone; this._parentDelegate = parentDelegate; @@ -1241,7 +1237,7 @@ const Zone: ZoneType = (function(global: any) { _zone: Zone|null = null; public runCount: number = 0; // tslint:disable-next-line:require-internal-with-underscore - _zoneDelegates: ZoneDelegate[]|null = null; + _zoneDelegates: _ZoneDelegate[]|null = null; // tslint:disable-next-line:require-internal-with-underscore _state: TaskState = 'notScheduled'; diff --git a/packages/zone.js/sauce.conf.js b/packages/zone.js/sauce.conf.js index f63b7597e682..ac4f5c00eb85 100644 --- a/packages/zone.js/sauce.conf.js +++ b/packages/zone.js/sauce.conf.js @@ -38,12 +38,6 @@ module.exports = function(config, ignoredLaunchers) { // 'SL_IOS9': {base: 'SauceLabs', browserName: 'iphone', platform: 'OS X 10.10', version: // '9.3'}, 'SL_IOS10': {base: 'SauceLabs', browserName: 'iphone', platform: 'OS X 10.10', version: '10.3'}, - 'SL_IE11': { - base: 'SauceLabs', - browserName: 'internet explorer', - platform: 'Windows 10', - version: '11' - }, 'SL_MSEDGE': { base: 'SauceLabs', browserName: 'MicrosoftEdge', diff --git a/packages/zone.js/test/browser/browser.spec.ts b/packages/zone.js/test/browser/browser.spec.ts index b73ddbf351b7..7c88afcb0e14 100644 --- a/packages/zone.js/test/browser/browser.spec.ts +++ b/packages/zone.js/test/browser/browser.spec.ts @@ -959,7 +959,7 @@ describe('Zone', function() { button.dispatchEvent(clickEvent); expect(logs.length).toBe(2); - expect(logs).toEqual(['click', 'once click']); + expect(logs).toEqual(['once click', 'click']); logs = []; button.dispatchEvent(clickEvent); diff --git a/packages/zone.js/test/common/Error.spec.ts b/packages/zone.js/test/common/Error.spec.ts index 19dca94f4801..ed377237e061 100644 --- a/packages/zone.js/test/common/Error.spec.ts +++ b/packages/zone.js/test/common/Error.spec.ts @@ -19,22 +19,22 @@ class BaseError extends Error { this._nativeError = nativeError; } - get message() { + override get message() { return this._nativeError.message; } - set message(message) { + override set message(message) { this._nativeError.message = message; } - get name() { + override get name() { return this._nativeError.name; } - get stack() { + override get stack() { return (this._nativeError as any).stack; } - set stack(value) { + override set stack(value) { (this._nativeError as any).stack = value; } - toString() { + override toString() { return this._nativeError.toString(); } } @@ -47,7 +47,7 @@ class WrappedError extends BaseError { this.originalError = error; } - get stack() { + override get stack() { return ((this.originalError instanceof Error ? this.originalError : this._nativeError) as any) .stack; } @@ -58,7 +58,7 @@ class TestError extends WrappedError { super(`${message} caused by: ${error instanceof Error ? error.message : error}`, error); } - get message() { + override get message() { return 'test ' + this.originalError.message; } } @@ -68,11 +68,11 @@ class TestMessageError extends WrappedError { super(`${message} caused by: ${error instanceof Error ? error.message : error}`, error); } - get message() { + override get message() { return 'test ' + this.originalError.message; } - set message(value) { + override set message(value) { this.originalError.message = value; } } diff --git a/packages/zone.js/test/common/Promise.spec.ts b/packages/zone.js/test/common/Promise.spec.ts index 323972d016c9..e2f9bbdc094f 100644 --- a/packages/zone.js/test/common/Promise.spec.ts +++ b/packages/zone.js/test/common/Promise.spec.ts @@ -122,7 +122,7 @@ describe( super(fn); } - static get[Symbol.species]() { + static override get[Symbol.species]() { return MyPromise; } } diff --git a/packages/zone.js/test/common/util.spec.ts b/packages/zone.js/test/common/util.spec.ts index c790f360efd8..727e5454cb25 100644 --- a/packages/zone.js/test/common/util.spec.ts +++ b/packages/zone.js/test/common/util.spec.ts @@ -91,7 +91,7 @@ describe('utils', function() { } } class ChildType extends Type { - method(..._args: any[]) { + override method(..._args: any[]) { childArgs = _args; childSelf = this; return 'ChildOK'; diff --git a/packages/zone.js/test/karma_test.bzl b/packages/zone.js/test/karma_test.bzl index c47a7ea79c62..a7073bfa7b1f 100644 --- a/packages/zone.js/test/karma_test.bzl +++ b/packages/zone.js/test/karma_test.bzl @@ -70,7 +70,7 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps, ":" + name + "_env_rollup.umd", ] + bootstrap + _karma_test_required_dist_files, - browsers = ["//dev-infra/bazel/browsers/chromium:chromium"], + browsers = ["@npm//@angular/dev-infra-private/bazel/browsers/chromium:chromium"], static_files = [ ":assets/sample.json", ":assets/worker.js", @@ -94,7 +94,7 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps, ":" + name + "_env_rollup.umd", "//packages/zone.js/bundles:zone-testing-bundle.umd.min.js", ] + _karma_test_required_dist_files, - browsers = ["//dev-infra/bazel/browsers/chromium:chromium"], + browsers = ["@npm//@angular/dev-infra-private/bazel/browsers/chromium:chromium"], config_file = "//:karma-js.conf.js", configuration_env_vars = ["KARMA_WEB_TEST_MODE"], data = [ diff --git a/packages/zone.js/test/webdriver/test.sauce.js b/packages/zone.js/test/webdriver/test.sauce.js index 84fe2b39034f..b485f56b6f38 100644 --- a/packages/zone.js/test/webdriver/test.sauce.js +++ b/packages/zone.js/test/webdriver/test.sauce.js @@ -19,7 +19,6 @@ const desiredCapabilities = { /*ios84: {browserName: 'iphone', platform: 'OS X 10.10', version: '8.4'},*/ ios10: {browserName: 'iphone', platform: 'OS X 10.10', version: '10.3'}, ios11: {browserName: 'iphone', platform: 'OS X 10.12', version: '11.2'}, - ie11: {browserName: 'internet explorer', platform: 'Windows 10', version: '11'}, // andriod44: {browserName: 'android', platform: 'Linux', version: '4.4'}, android51: {browserName: 'android', platform: 'Linux', version: '5.1'}, }; diff --git a/packages/zone.js/tsconfig.json b/packages/zone.js/tsconfig.json index 6ee93c8e1e77..abf52609e442 100644 --- a/packages/zone.js/tsconfig.json +++ b/packages/zone.js/tsconfig.json @@ -9,6 +9,7 @@ "noEmitOnError": false, "stripInternal": false, "strict": true, + "noImplicitOverride": true, "lib": [ "es5", "dom", diff --git a/packages/zone.js/yarn.lock b/packages/zone.js/yarn.lock index cb26eda77798..c10986e1f4ed 100644 --- a/packages/zone.js/yarn.lock +++ b/packages/zone.js/yarn.lock @@ -9,25 +9,25 @@ dependencies: "@babel/highlight" "^7.14.5" -"@babel/compat-data@^7.14.5": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" - integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw== +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== "@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab" - integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA== + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.0.tgz#749e57c68778b73ad8082775561f67f5196aafa8" + integrity sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw== dependencies: "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.14.5" - "@babel/helper-compilation-targets" "^7.14.5" - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helpers" "^7.14.6" - "@babel/parser" "^7.14.6" + "@babel/generator" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.0" + "@babel/helper-module-transforms" "^7.15.0" + "@babel/helpers" "^7.14.8" + "@babel/parser" "^7.15.0" "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -35,21 +35,21 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.5.tgz#848d7b9f031caca9d0cd0af01b063f226f52d785" - integrity sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA== +"@babel/generator@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15" + integrity sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.15.0" 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" - integrity sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw== +"@babel/helper-compilation-targets@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818" + integrity sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A== dependencies: - "@babel/compat-data" "^7.14.5" + "@babel/compat-data" "^7.15.0" "@babel/helper-validator-option" "^7.14.5" browserslist "^4.16.6" semver "^6.3.0" @@ -77,12 +77,12 @@ dependencies: "@babel/types" "^7.14.5" -"@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" - integrity sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA== +"@babel/helper-member-expression-to-functions@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b" + integrity sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.15.0" "@babel/helper-module-imports@^7.14.5": version "7.14.5" @@ -91,19 +91,19 @@ dependencies: "@babel/types" "^7.14.5" -"@babel/helper-module-transforms@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz#7de42f10d789b423eb902ebd24031ca77cb1e10e" - integrity sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA== +"@babel/helper-module-transforms@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08" + integrity sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg== dependencies: "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" - "@babel/helper-simple-access" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.0" + "@babel/helper-simple-access" "^7.14.8" "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/helper-validator-identifier" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.9" "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" "@babel/helper-optimise-call-expression@^7.14.5": version "7.14.5" @@ -117,22 +117,22 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== -"@babel/helper-replace-supers@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz#0ecc0b03c41cd567b4024ea016134c28414abb94" - integrity sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow== +"@babel/helper-replace-supers@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4" + integrity sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA== dependencies: - "@babel/helper-member-expression-to-functions" "^7.14.5" + "@babel/helper-member-expression-to-functions" "^7.15.0" "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" -"@babel/helper-simple-access@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4" - integrity sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw== +"@babel/helper-simple-access@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924" + integrity sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.14.8" "@babel/helper-split-export-declaration@^7.14.5": version "7.14.5" @@ -141,24 +141,24 @@ dependencies: "@babel/types" "^7.14.5" -"@babel/helper-validator-identifier@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" - integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== "@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.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.6.tgz#5b58306b95f1b47e2a0199434fa8658fa6c21635" - integrity sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA== +"@babel/helpers@^7.14.8": + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.15.3.tgz#c96838b752b95dcd525b4e741ed40bb1dc2a1357" + integrity sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g== dependencies: "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" "@babel/highlight@^7.14.5": version "7.14.5" @@ -169,10 +169,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.6", "@babel/parser@^7.14.7": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.7.tgz#6099720c8839ca865a2637e6c85852ead0bdb595" - integrity sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.15.0": + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.3.tgz#3416d9bea748052cfcb63dbcc27368105b1ed862" + integrity sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -267,27 +267,27 @@ "@babel/parser" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.14.5": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.7.tgz#64007c9774cfdc3abd23b0780bc18a3ce3631753" - integrity sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.0.tgz#4cca838fd1b2a03283c1f38e141f639d60b3fc98" + integrity sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw== dependencies: "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.14.5" + "@babel/generator" "^7.15.0" "@babel/helper-function-name" "^7.14.5" "@babel/helper-hoist-variables" "^7.14.5" "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/parser" "^7.14.7" - "@babel/types" "^7.14.5" + "@babel/parser" "^7.15.0" + "@babel/types" "^7.15.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.14.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff" - integrity sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg== +"@babel/types@^7.0.0", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.15.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" + integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== dependencies: - "@babel/helper-validator-identifier" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -515,9 +515,9 @@ integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": - version "7.1.14" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402" - integrity sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g== + version "7.1.15" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.15.tgz#2ccfb1ad55a02c83f8e0ad327cbc332f55eb1024" + integrity sha512-bxlMKPDbY8x5h6HBwVzEOk2C8fb6SLfYQ5Jw3uBYuYF1lfWk/kbLd81la82vrIkBb0l+JdmrZaDikPrNxpS/Ew== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -526,24 +526,24 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.2.tgz#f3d71178e187858f7c45e30380f8f1b7415a12d8" - integrity sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ== + 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.0" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.0.tgz#0c888dd70b3ee9eebb6e4f200e809da0076262be" - integrity sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A== + 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@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.11.1" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.1.tgz#654f6c4f67568e24c23b367e947098c6206fa639" - integrity sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw== + 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" @@ -574,9 +574,9 @@ "@types/istanbul-lib-report" "*" "@types/node@*": - version "15.12.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.4.tgz#e1cf817d70a1e118e81922c4ff6683ce9d422e26" - integrity sha512-zrNj1+yqYF4WskCMOHwN+w9iuD12+dGm0rQ35HLl9/Ouuq52cEtd0CH9qMgrdNmi5ejC1/V7vKEXYubB+65DkA== + version "16.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.6.1.tgz#aee62c7b966f55fc66c7b6dfa1d58db2a616da61" + integrity sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw== "@types/node@^10.9.4": version "10.17.60" @@ -584,29 +584,29 @@ integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/normalize-package-data@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" - integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== "@types/prettier@^2.0.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.0.tgz#2e8332cc7363f887d32ec5496b207d26ba8052bb" - integrity sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw== + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3" + integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== "@types/stack-utils@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" - integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" + integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== "@types/yargs-parser@*": - version "20.2.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" - integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== + version "20.2.1" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" + integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== "@types/yargs@^15.0.0": - version "15.0.13" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.13.tgz#34f7fec8b389d7f3c1fd08026a5763e072d3c6dc" - integrity sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ== + version "15.0.14" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.14.tgz#26d821ddb89e70492160b66d10a0eb6df8f6fb06" + integrity sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ== dependencies: "@types/yargs-parser" "*" @@ -639,9 +639,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.2.4: - version "8.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.0.tgz#af53266e698d7cffa416714b503066a82221be60" - integrity sha512-ULr0LDaEqQrMFGyQ3bhJkLsbtrQ8QibAseGZeaSUiT/6zb9IvIkomWHJIvgvwad+hinRAgsI51JcWk2yvwyL+w== + version "8.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== agent-base@6: version "6.0.2" @@ -694,7 +694,7 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@^3.0.3, anymatch@~3.1.1: +anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -749,7 +749,7 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -available-typed-arrays@^1.0.2: +available-typed-arrays@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== @@ -880,15 +880,15 @@ browser-stdout@1.3.1: integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserslist@^4.16.6: - version "4.16.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" - integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== + version "4.16.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.7.tgz#108b0d1ef33c4af1b587c54f390e7041178e4335" + integrity sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA== dependencies: - caniuse-lite "^1.0.30001219" + caniuse-lite "^1.0.30001248" colorette "^1.2.2" - electron-to-chromium "^1.3.723" + electron-to-chromium "^1.3.793" escalade "^3.1.1" - node-releases "^1.1.71" + node-releases "^1.1.73" bser@2.1.1: version "2.1.1" @@ -898,9 +898,9 @@ bser@2.1.1: node-int64 "^0.4.0" buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== cache-base@^1.0.1: version "1.0.1" @@ -940,10 +940,10 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001219: - version "1.0.30001239" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001239.tgz#66e8669985bb2cb84ccb10f68c25ce6dd3e4d2b8" - integrity sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ== +caniuse-lite@^1.0.30001248: + version "1.0.30001251" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz#6853a606ec50893115db660f82c094d18f096d85" + integrity sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A== capture-exit@^2.0.0: version "2.0.0" @@ -962,9 +962,9 @@ chalk@2.x, chalk@^2.0.0: supports-color "^5.3.0" chalk@^4.0.0, chalk@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -974,20 +974,20 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -chokidar@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== +chokidar@3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== dependencies: - anymatch "~3.1.1" + anymatch "~3.1.2" braces "~3.0.2" - glob-parent "~5.1.0" + glob-parent "~5.1.2" is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.5.0" + readdirp "~3.6.0" optionalDependencies: - fsevents "~2.3.1" + fsevents "~2.3.2" ci-info@^2.0.0: version "2.0.0" @@ -1094,9 +1094,9 @@ color-name@~1.1.4: integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== colorette@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" - integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + version "1.3.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af" + integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w== combined-stream@^1.0.8: version "1.0.8" @@ -1195,7 +1195,14 @@ debug@2.2.0: dependencies: ms "0.7.1" -debug@4, debug@4.3.1, debug@^4.1.0, debug@^4.1.1: +debug@4, debug@^4.1.0, debug@^4.1.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + dependencies: + ms "2.1.2" + +debug@4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -1220,9 +1227,9 @@ decamelize@^4.0.0: integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== decimal.js@^10.2.1: - version "10.3.0" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.0.tgz#96fd481189818e0d5810c18ac147824b9e4c0026" - integrity sha512-MrQRs2gyD//7NeHi9TtsfClkf+cFAewDz+PZHR8ILKglLmBMyVX3ymQ+oeznE3tjrS7beTN+6JXb2C3JDHm7ug== + version "10.3.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" + integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== decode-uri-component@^0.2.0: version "0.2.0" @@ -1305,10 +1312,10 @@ domino@2.1.6: resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.6.tgz#fe4ace4310526e5e7b9d12c7de01b7f485a57ffe" integrity sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ== -electron-to-chromium@^1.3.723: - version "1.3.755" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.755.tgz#4b6101f13de910cf3f0a1789ddc57328133b9332" - integrity sha512-BJ1s/kuUuOeo1bF/EM2E4yqW9te0Hpof3wgwBx40AWJE18zsD1Tqo0kr7ijnOc+lRsrlrqKPauJAHqaxOItoUA== +electron-to-chromium@^1.3.793: + version "1.3.806" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.806.tgz#21502100f11aead6c501d1cd7f2504f16c936642" + integrity sha512-AH/otJLAAecgyrYp0XK1DPiGVWcOgwPeJBOLeuFQ5l//vhQhwC9u6d+GijClqJAmsHG4XDue81ndSQPohUu0xA== emittery@^0.7.1: version "0.7.2" @@ -1334,10 +1341,10 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: - version "1.18.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" - integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== +es-abstract@^1.18.5: + version "1.18.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.5.tgz#9b10de7d4c206a3581fd5b2124233e04db49ae19" + integrity sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" @@ -1345,11 +1352,12 @@ es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: get-intrinsic "^1.1.1" has "^1.0.3" has-symbols "^1.0.2" + internal-slot "^1.0.3" is-callable "^1.2.3" is-negative-zero "^2.0.1" is-regex "^1.1.3" is-string "^1.0.6" - object-inspect "^1.10.3" + object-inspect "^1.11.0" object-keys "^1.1.1" object.assign "^4.1.2" string.prototype.trimend "^1.0.4" @@ -1602,7 +1610,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.1.2, fsevents@~2.3.1: +fsevents@^2.1.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== @@ -1627,7 +1635,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== @@ -1660,7 +1668,7 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= -glob-parent@~5.1.0: +glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -1728,9 +1736,9 @@ google-closure-compiler@^20210601.0.0: google-closure-compiler-windows "^20210601.0.0" graceful-fs@^4.2.4: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== growl@1.10.5: version "1.10.5" @@ -1767,6 +1775,13 @@ has-symbols@^1.0.1, has-symbols@^1.0.2: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -1882,6 +1897,15 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + 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" @@ -1897,11 +1921,12 @@ is-accessor-descriptor@^1.0.0: kind-of "^6.0.0" is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" @@ -1909,9 +1934,11 @@ is-arrayish@^0.2.1: integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-bigint@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" - integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" is-binary-path@~2.1.0: version "2.1.0" @@ -1921,11 +1948,12 @@ is-binary-path@~2.1.0: binary-extensions "^2.0.0" is-boolean-object@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" - integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== dependencies: call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-buffer@^1.1.5: version "1.1.6" @@ -1933,9 +1961,9 @@ is-buffer@^1.1.5: integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-callable@^1.1.4, is-callable@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" - integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== is-ci@^2.0.0: version "2.0.0" @@ -1945,9 +1973,9 @@ is-ci@^2.0.0: ci-info "^2.0.0" is-core-module@^2.2.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" - integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== + version "2.5.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491" + integrity sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg== dependencies: has "^1.0.3" @@ -1966,9 +1994,11 @@ is-data-descriptor@^1.0.0: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" - integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A== + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" is-descriptor@^0.1.0: version "0.1.6" @@ -2026,9 +2056,11 @@ is-generator-fn@^2.0.0: integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== is-generator-function@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c" - integrity sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A== + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" @@ -2043,9 +2075,11 @@ is-negative-zero@^2.0.1: integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== is-number-object@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" - integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" is-number@^3.0.0: version "3.0.0" @@ -2077,12 +2111,12 @@ is-potential-custom-element-name@^1.0.1: integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== is-regex@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" - integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== dependencies: call-bind "^1.0.2" - has-symbols "^1.0.2" + has-tostringtag "^1.0.0" is-stream@^1.1.0: version "1.1.0" @@ -2090,14 +2124,16 @@ is-stream@^1.1.0: integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== is-string@^1.0.5, is-string@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" - integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" @@ -2106,16 +2142,16 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.5.tgz#f32e6e096455e329eb7b423862456aa213f0eb4e" - integrity sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug== +is-typed-array@^1.1.3, is-typed-array@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.7.tgz#881ddc660b13cb8423b2090fa88c0fe37a83eb2f" + integrity sha512-VxlpTBGknhQ3o7YiVjIhdLU6+oD8dPz/79vvvH4F+S/c8608UCVa9fgDpa1kZgFoUST2DCgacc70UszKgzKuvA== dependencies: - available-typed-arrays "^1.0.2" + available-typed-arrays "^1.0.4" call-bind "^1.0.2" - es-abstract "^1.18.0-next.2" + es-abstract "^1.18.5" foreach "^2.0.5" - has-symbols "^1.0.1" + has-tostringtag "^1.0.0" is-typedarray@^1.0.0: version "1.0.0" @@ -2604,9 +2640,9 @@ js-yaml@^3.13.1: esprima "^4.0.0" jsdom@^16.4.0: - version "16.6.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.6.0.tgz#f79b3786682065492a3da6a60a4695da983805ac" - integrity sha512-Ty1vmF4NHJkolaEmdjtxTfSfkdb8Ywarwf63f+F8/mDD1uLSSWDxDuMiZxiPhwunLrn9LOSVItWj4bLYsLN3Dg== + version "16.7.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" + integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== dependencies: abab "^2.0.5" acorn "^8.2.4" @@ -2633,7 +2669,7 @@ jsdom@^16.4.0: whatwg-encoding "^1.0.5" whatwg-mimetype "^2.3.0" whatwg-url "^8.5.0" - ws "^7.4.5" + ws "^7.4.6" xml-name-validator "^3.0.0" jsesc@^2.5.1: @@ -2802,17 +2838,17 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.2.3" -mime-db@1.48.0: - version "1.48.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d" - integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ== +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== mime-types@^2.1.12: - version "2.1.31" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b" - integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg== + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== dependencies: - mime-db "1.48.0" + mime-db "1.49.0" mimic-fn@^2.1.0: version "2.1.0" @@ -2881,14 +2917,14 @@ mocha@^2.5.3: to-iso-string "0.0.2" mocha@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.0.1.tgz#01e66b7af0012330c0a38c4b6eaa6d92b8a81bf9" - integrity sha512-9zwsavlRO+5csZu6iRtl3GHImAbhERoDsZwdRkdJ/bE+eVplmoxNKE901ZJ9LdSchYBjSCPbjKc5XvcAri2ylw== + version "9.0.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.0.3.tgz#128cd6bbd3ee0adcdaef715f357f76ec1e6227c7" + integrity sha512-hnYFrSefHxYS2XFGtN01x8un0EwNu2bzKvhpRFhgoybIvMaOkkL60IVPmkb5h6XDmUl4IMSB+rT5cIO4/4bJgg== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.5.1" + chokidar "3.5.2" debug "4.3.1" diff "5.0.0" escape-string-regexp "4.0.0" @@ -2901,12 +2937,12 @@ mocha@^9.0.0: minimatch "3.0.4" ms "2.1.3" nanoid "3.1.23" - serialize-javascript "5.0.1" + serialize-javascript "6.0.0" strip-json-comments "3.1.1" supports-color "8.1.1" which "2.0.2" wide-align "1.1.3" - workerpool "6.1.4" + workerpool "6.1.5" yargs "16.2.0" yargs-parser "20.2.4" yargs-unparser "2.0.0" @@ -2993,10 +3029,10 @@ node-notifier@^8.0.0: uuid "^8.3.0" which "^2.0.2" -node-releases@^1.1.71: - version "1.1.73" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" - integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg== +node-releases@^1.1.73: + version "1.1.74" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.74.tgz#e5866488080ebaa70a93b91144ccde06f3c3463e" + integrity sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw== normalize-package-data@^2.5.0: version "2.5.0" @@ -3048,10 +3084,10 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" - integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== +object-inspect@^1.11.0, object-inspect@^1.9.0: + version "1.11.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: version "1.1.1" @@ -3319,10 +3355,10 @@ readable-stream@^2.3.5: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" @@ -3477,10 +3513,10 @@ semver@^7.3.2: dependencies: lru-cache "^6.0.0" -serialize-javascript@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" - integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== dependencies: randombytes "^2.1.0" @@ -3528,6 +3564,15 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + sigmund@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" @@ -3649,9 +3694,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz#8a595135def9592bda69709474f1cbeea7c2467f" - integrity sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ== + version "3.0.10" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -3887,9 +3932,9 @@ tr46@^2.1.0: punycode "^2.1.1" tslib@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" - integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== type-check@~0.3.2: version "0.3.2" @@ -3926,9 +3971,9 @@ typedarray-to-buffer@^3.1.5: is-typedarray "^1.0.0" typescript@~4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz#3f85b986945bcf31071decdd96cf8bfa65f9dcbc" - integrity sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew== + version "4.3.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" + integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== unbox-primitive@^1.0.1: version "1.0.1" @@ -4080,9 +4125,9 @@ whatwg-mimetype@^2.3.0: integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.6.0.tgz#27c0205a4902084b872aecb97cf0f2a7a3011f4c" - integrity sha512-os0KkeeqUOl7ccdDT1qqUcS4KH4tcBTSKK5Nl5WKb2lyxInIZ/CpjkqKa1Ss12mjfdcRX9mHmPPs7/SxG1Hbdw== + version "8.7.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== dependencies: lodash "^4.7.0" tr46 "^2.1.0" @@ -4105,17 +4150,16 @@ which-module@^2.0.0: integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= which-typed-array@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" - integrity sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA== + version "1.1.6" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.6.tgz#f3713d801da0720a7f26f50c596980a9f5c8b383" + integrity sha512-DdY984dGD5sQ7Tf+x1CkXzdg85b9uEel6nr4UkFg1LoE9OXv3uRuZhe5CoWdawhGACeFpEZXH8fFLQnDhbpm/Q== dependencies: - available-typed-arrays "^1.0.2" - call-bind "^1.0.0" - es-abstract "^1.18.0-next.1" + available-typed-arrays "^1.0.4" + call-bind "^1.0.2" + es-abstract "^1.18.5" foreach "^2.0.5" - function-bind "^1.1.1" - has-symbols "^1.0.1" - is-typed-array "^1.1.3" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.6" which@2.0.2, which@^2.0.1, which@^2.0.2: version "2.0.2" @@ -4143,10 +4187,10 @@ word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -workerpool@6.1.4: - version "6.1.4" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.4.tgz#6a972b6df82e38d50248ee2820aa98e2d0ad3090" - integrity sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g== +workerpool@6.1.5: + version "6.1.5" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.5.tgz#0f7cf076b6215fd7e1da903ff6f22ddd1886b581" + integrity sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw== wrap-ansi@^6.2.0: version "6.2.0" @@ -4181,10 +4225,10 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -ws@^7.4.5: - version "7.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.0.tgz#0033bafea031fb9df041b2026fc72a571ca44691" - integrity sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw== +ws@^7.4.6: + version "7.5.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" + integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== xml-name-validator@^3.0.0: version "3.0.0" diff --git a/renovate.json b/renovate.json index c0b0d7feec70..2b2c7edacc97 100644 --- a/renovate.json +++ b/renovate.json @@ -4,23 +4,13 @@ "semanticPrefix": "build", "separateMajorMinor": false, "prHourlyLimit": 2, - "labels": [ - "target: minor", - "comp: build & ci", - "action: review" - ], + "labels": ["target: minor", "comp: build & ci", "action: review"], "timezone": "America/Tijuana", "lockFileMaintenance": { "enabled": true }, - "schedule": [ - "after 10pm every weekday", - "before 4am every weekday", - "every weekend" - ], - "baseBranches": [ - "master" - ], + "schedule": ["after 10pm every weekday", "before 4am every weekday", "every weekend"], + "baseBranches": ["master"], "ignoreDeps": [ "@babel/core", "@babel/generator", @@ -35,14 +25,14 @@ "@types/babel__traverse", "@types/node", "@types/selenium-webdriver", - "angular", "angular-1.5", "angular-1.6", "angular-1.7", - "angular-mocks", + "angular-1.8", "angular-mocks-1.5", "angular-mocks-1.6", "angular-mocks-1.7", + "angular-mocks-1.8", "puppeteer", "rollup", "selenium-webdriver", @@ -53,60 +43,37 @@ "integration/bazel/WORKSPACE", "package.json", "packages/**/package.json", - "tools/ts-api-guardian/package.json", - "aio/package.json" + "aio/package.json", + ".github/workflows/**/*.yml" ], "packageRules": [ { - "packagePatterns": [ - "^@angular/.*", - "^@angular-devkit/.*", - "^@schematics/.*" - ], + "packagePatterns": ["^@angular/.*", "^@angular-devkit/.*", "^@schematics/.*", "angular/dev-infra"], "groupName": "angular", "pinVersions": false }, { - "packagePatterns": [ - "^@babel/.*" - ], + "packagePatterns": ["^@babel/.*"], "groupName": "babel", "pinVersions": false }, { - "packagePatterns": [ - "^@bazel/.*", - "^build_bazel.*" - ], + "packagePatterns": ["^@bazel/.*", "^build_bazel.*"], "groupName": "bazel", "pinVersions": false }, { - "packagePatterns": [ - "^remark-.*", - "remark" - ], + "packagePatterns": ["^remark-.*", "remark"], "groupName": "remark", "pinVersions": false }, { - "packageNames": [ - "typescript", - "rxjs", - "tslib" - ], + "packageNames": ["typescript", "rxjs", "tslib"], "separateMinorPatch": true }, { - "packageNames": [ - "typescript", - "rxjs", - "tslib" - ], - "updateTypes": [ - "minor", - "major" - ], + "packageNames": ["typescript", "rxjs", "tslib"], + "updateTypes": ["minor", "major"], "enabled": false }, { @@ -114,24 +81,13 @@ "enabled": false }, { - "excludePackagePatterns": [ - "^@angular/.*", - "^@angular-devkit/.*", - "^@schematics/.*" - ], - "matchPackagePatterns": [ - "*" - ], - "matchUpdateTypes": [ - "minor", - "patch" - ], + "excludePackagePatterns": ["^@angular/.*", "^@angular-devkit/.*", "^@schematics/.*", "angular/dev-infra"], + "matchPackagePatterns": ["*"], + "matchUpdateTypes": ["minor", "patch"], "matchCurrentVersion": ">=1", "groupName": "all non-major dependencies", "groupSlug": "all-minor-patch", - "schedule": [ - "after 1am on Thursday" - ] + "schedule": ["after 1am on Thursday"] } ] } diff --git a/scripts/build/build-packages-dist.js b/scripts/build/build-packages-dist.js index 428f61c7e18d..c0f7c641ccec 100644 --- a/scripts/build/build-packages-dist.js +++ b/scripts/build/build-packages-dist.js @@ -10,7 +10,6 @@ 'use strict'; const {buildAngularInMemoryWebApiPackage} = require('./angular-in-memory-web-api'); -const {buildDevInfraPackage} = require('./dev-infra-builder'); const {buildTargetPackages} = require('./package-builder'); const {buildZoneJsPackage} = require('./zone-js-builder'); @@ -18,9 +17,6 @@ const {buildZoneJsPackage} = require('./zone-js-builder'); // Build the legacy (view engine) npm packages into `dist/packages-dist/`. buildTargetPackages('dist/packages-dist', false, 'Production'); -// Build the `angular-dev-infra` npm package into `dist/packages-dist/`. -buildDevInfraPackage('dist/packages-dist'); - // Build the `angular-in-memory-web-api` npm package into `dist/angular-in-memory-web-api-dist/`, // because it might be needed by other scripts/targets. buildAngularInMemoryWebApiPackage('dist/angular-in-memory-web-api-dist'); diff --git a/scripts/build/dev-infra-builder.js b/scripts/build/dev-infra-builder.js deleted file mode 100644 index b83877dcf8af..000000000000 --- a/scripts/build/dev-infra-builder.js +++ /dev/null @@ -1,48 +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 - */ - -'use strict'; - -const {resolve} = require('path'); -const {chmod, cp, mkdir, rm, test} = require('shelljs'); -const {baseDir, bazelBin, bazelCmd, exec, scriptPath} = require('./package-builder'); - - -module.exports = { - buildDevInfraPackage, -}; - -/** - * Build the `@angular/dev-infra-private` npm package into `destDir`. - * - * @param {string} destDir Path to the output directory into which we copy the npm package. - * This path should either be absolute or relative to the project root. - */ -function buildDevInfraPackage(destDir) { - console.info('##############################'); - console.info(`${scriptPath}:`); - console.info(' Building @angular/dev-infra-private npm package'); - console.info('##############################'); - exec(`${bazelCmd} build //dev-infra:npm_package`); - - // Create the output directory. - const absDestDir = resolve(baseDir, destDir); - if (!test('-d', absDestDir)) { - mkdir('-p', absDestDir); - } - - const buildOutputDir = `${bazelBin}/dev-infra/npm_package`; - const distTargetDir = `${absDestDir}/dev-infra-private`; - - console.info(`# Copy artifacts to ${distTargetDir}`); - rm('-rf', distTargetDir); - cp('-R', buildOutputDir, distTargetDir); - chmod('-R', 'u+w', distTargetDir); - - console.info(''); -} diff --git a/third_party/shims_for_IE.js b/third_party/shims_for_internal_tests.js similarity index 95% rename from third_party/shims_for_IE.js rename to third_party/shims_for_internal_tests.js index 72891da672bb..974e98845cbc 100644 --- a/third_party/shims_for_IE.js +++ b/third_party/shims_for_internal_tests.js @@ -1,91 +1,6 @@ -// This file is used for internal testing with Karma only, it should not be used in real applications. +// IMPORTANT: this file is used for internal testing with Karma only, it **must not** be used in real applications. -// function.name (all IE) -/*! @source https://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie*/ -if (!Object.hasOwnProperty('name')) { - Object.defineProperty(Function.prototype, 'name', { - get: function() { - var matches = this.toString().match(/^\s*function\s*((?![0-9])[a-zA-Z0-9_$]*)\s*\(/); - return matches && matches.length > 1 ? matches[1] : ''; - } - }); -} - -// URL polyfill for SystemJS (all IE) -/*! @source https://github.com/ModuleLoader/es6-module-loader/blob/master/src/url-polyfill.js*/ -// from https://gist.github.com/Yaffle/1088850 -(function(global) { - function URLPolyfill(url, baseURL) { - if (typeof url != 'string') { - throw new TypeError('URL must be a string'); - } - var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); - if (!m) { - throw new RangeError(); - } - var protocol = m[1] || ""; - var username = m[2] || ""; - var password = m[3] || ""; - var host = m[4] || ""; - var hostname = m[5] || ""; - var port = m[6] || ""; - var pathname = m[7] || ""; - var search = m[8] || ""; - var hash = m[9] || ""; - if (baseURL !== undefined) { - var base = baseURL instanceof URLPolyfill ? baseURL : new URLPolyfill(baseURL); - var flag = protocol === "" && host === "" && username === ""; - if (flag && pathname === "" && search === "") { - search = base.search; - } - if (flag && pathname.charAt(0) !== "/") { - pathname = (pathname !== "" ? (((base.host !== "" || base.username !== "") && base.pathname === "" ? "/" : "") + base.pathname.slice(0, base.pathname.lastIndexOf("/") + 1) + pathname) : base.pathname); - } - // dot segments removal - var output = []; - pathname.replace(/^(\.\.?(\/|$))+/, "") - .replace(/\/(\.(\/|$))+/g, "/") - .replace(/\/\.\.$/, "/../") - .replace(/\/?[^\/]*/g, function (p) { - if (p === "/..") { - output.pop(); - } else { - output.push(p); - } - }); - pathname = output.join("").replace(/^\//, pathname.charAt(0) === "/" ? "/" : ""); - if (flag) { - port = base.port; - hostname = base.hostname; - host = base.host; - password = base.password; - username = base.username; - } - if (protocol === "") { - protocol = base.protocol; - } - } - - // convert windows file URLs to use / - if (protocol == 'file:') - pathname = pathname.replace(/\\/g, '/'); - - this.origin = protocol + (protocol !== "" || host !== "" ? "//" : "") + host; - this.href = protocol + (protocol !== "" || host !== "" ? "//" : "") + (username !== "" ? username + (password !== "" ? ":" + password : "") + "@" : "") + host + pathname + search + hash; - this.protocol = protocol; - this.username = username; - this.password = password; - this.host = host; - this.hostname = hostname; - this.port = port; - this.pathname = pathname; - this.search = search; - this.hash = hash; - } -global.URLPolyfill = URLPolyfill; -})(typeof self != 'undefined' ? self : global); - -// Intl (IE9, IE10, all Safari, all Android) +// Intl (all Safari, all Android) /*! @source https://github.com/andyearnshaw/Intl.js */ /*! @licence https://github.com/andyearnshaw/Intl.js/blob/master/LICENSE.txt */ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):e.IntlPolyfill=r()}(this,function(){"use strict";function e(e){if("function"==typeof Math.log10)return Math.floor(Math.log10(e));var r=Math.round(Math.log(e)*Math.LOG10E);return r-(Number("1e"+r)>e)}function r(e){for(var t in e)(e instanceof r||ee.call(e,t))&&re(this,t,{value:e[t],enumerable:!0,writable:!0,configurable:!0})}function t(){re(this,"length",{writable:!0,value:0}),arguments.length&&oe.apply(this,ae.call(arguments))}function n(){if(ue.disableRegExpRestore)return function(){};for(var e={lastMatch:RegExp.lastMatch||"",leftContext:RegExp.leftContext,multiline:RegExp.multiline,input:RegExp.input},r=!1,n=1;n<=9;n++)r=(e["$"+n]=RegExp["$"+n])||r;return function(){var n=/[.?*+^$[\]\\(){}|-]/g,a=e.lastMatch.replace(n,"\\$&"),i=new t;if(r)for(var o=1;o<=9;o++){var s=e["$"+o];s?(s=s.replace(n,"\\$&"),a=a.replace(s,"("+s+")")):a="()"+a,oe.call(i,a.slice(0,a.indexOf("(")+1)),a=a.slice(a.indexOf("(")+1)}var l=se.call(i,"")+a;l=l.replace(/(\\\(|\\\)|[^()])+/g,function(e){return"[\\s\\S]{"+e.replace("\\","").length+"}"});var c=new RegExp(l,e.multiline?"gm":"g");c.lastIndex=e.leftContext.length,c.exec(e.input)}}function a(e){if(null===e)throw new TypeError("Cannot convert null or undefined to object");return Object(e)}function i(e){return ee.call(e,"__getInternalProperties")?e.__getInternalProperties(ge):ne(null)}function o(e){Se=e}function s(e){for(var r=e.length;r--;){var t=e.charAt(r);t>="a"&&t<="z"&&(e=e.slice(0,r)+t.toUpperCase()+e.slice(r+1))}return e}function l(e){return!!ze.test(e)&&(!ke.test(e)&&!Fe.test(e))}function c(e){var r=void 0,t=void 0;e=e.toLowerCase(),t=e.split("-");for(var n=1,a=t.length;n1&&(r.sort(),e=e.replace(RegExp("(?:"+Oe.source+")+","i"),se.call(r,""))),ee.call(Ee.tags,e)&&(e=Ee.tags[e]),t=e.split("-");for(var i=1,o=t.length;i-1)return t;var n=t.lastIndexOf("-");if(n<0)return;n>=2&&"-"===t.charAt(n-2)&&(n-=2),t=t.substring(0,n)}}function v(e,t){for(var n=0,a=t.length,i=void 0,o=void 0,s=void 0;n2){var O=u[F+1],S=k.call(D,O);S!==-1&&(j=O,z="-"+w+"-"+j)}else{var E=k(D,"true");E!==-1&&(j="true")}}if(ee.call(n,"[["+w+"]]")){var L=n["[["+w+"]]"];k.call(D,L)!==-1&&L!==j&&(j=L,z="")}h["[["+w+"]]"]=j,p+=z,y++}if(p.length>2){var P=l.indexOf("-x-");if(P===-1)l+=p;else{var N=l.substring(0,P),T=l.substring(P);l=N+p+T}l=c(l)}return h["[[locale]]"]=l,h}function p(e,r){for(var n=r.length,a=new t,i=0;in)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(i)}return a}function D(){var e=arguments[0],r=arguments[1];return this&&this!==sr?j(a(this),e,r):new sr.NumberFormat(e,r)}function j(e,o,s){var l=i(e),c=n();if(l["[[initializedIntlObject]]"]===!0)throw new TypeError("`this` object has already been initialized as an Intl object");re(e,"__getInternalProperties",{value:function(){if(arguments[0]===ge)return l}}),l["[[initializedIntlObject]]"]=!0;var u=f(o);s=void 0===s?{}:a(s);var m=new r,v=w(s,"localeMatcher","string",new t("lookup","best fit"),"best fit");m["[[localeMatcher]]"]=v;var d=ue.NumberFormat["[[localeData]]"],p=h(ue.NumberFormat["[[availableLocales]]"],u,m,ue.NumberFormat["[[relevantExtensionKeys]]"],d);l["[[locale]]"]=p["[[locale]]"],l["[[numberingSystem]]"]=p["[[nu]]"],l["[[dataLocale]]"]=p["[[dataLocale]]"];var y=p["[[dataLocale]]"],b=w(s,"style","string",new t("decimal","percent","currency"),"decimal");l["[[style]]"]=b;var D=w(s,"currency","string");if(void 0!==D&&!g(D))throw new RangeError("'"+D+"' is not a valid currency code");if("currency"===b&&void 0===D)throw new TypeError("Currency code is required when style is currency");var j=void 0;"currency"===b&&(D=D.toUpperCase(),l["[[currency]]"]=D,j=z(D));var F=w(s,"currencyDisplay","string",new t("code","symbol","name"),"symbol");"currency"===b&&(l["[[currencyDisplay]]"]=F);var O=x(s,"minimumIntegerDigits",1,21,1);l["[[minimumIntegerDigits]]"]=O;var S="currency"===b?j:0,E=x(s,"minimumFractionDigits",0,20,S);l["[[minimumFractionDigits]]"]=E;var L="currency"===b?Math.max(E,j):"percent"===b?Math.max(E,0):Math.max(E,3),P=x(s,"maximumFractionDigits",E,20,L);l["[[maximumFractionDigits]]"]=P;var N=s.minimumSignificantDigits,T=s.maximumSignificantDigits;void 0===N&&void 0===T||(N=x(s,"minimumSignificantDigits",1,21,1),T=x(s,"maximumSignificantDigits",N,21,21),l["[[minimumSignificantDigits]]"]=N,l["[[maximumSignificantDigits]]"]=T);var _=w(s,"useGrouping","boolean",void 0,!0);l["[[useGrouping]]"]=_;var I=d[y],A=I.patterns,M=A[b];return l["[[positivePattern]]"]=M.positivePattern,l["[[negativePattern]]"]=M.negativePattern,l["[[boundFormat]]"]=void 0,l["[[initializedNumberFormat]]"]=!0,Q&&(e.format=k.call(e)),c(),e}function z(e){return void 0!==lr[e]?lr[e]:2}function k(){var e=null!==this&&"object"===ir.typeof(this)&&i(this);if(!e||!e["[[initializedNumberFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.NumberFormat object.");if(void 0===e["[[boundFormat]]"]){var r=function(e){return S(this,Number(e))},t=ce.call(r,this);e["[[boundFormat]]"]=t}return e["[[boundFormat]]"]}function F(e,r){for(var t=O(e,r),n=[],a=0,i=0;t.length>i;i++){var o=t[i],s={};s.type=o["[[type]]"],s.value=o["[[value]]"],n[a]=s,a+=1}return n}function O(e,r){var n=i(e),a=n["[[dataLocale]]"],o=n["[[numberingSystem]]"],s=ue.NumberFormat["[[localeData]]"][a],l=s.symbols[o]||s.symbols.latn,c=void 0;!isNaN(r)&&r<0?(r=-r,c=n["[[negativePattern]]"]):c=n["[[positivePattern]]"];for(var u=new t,g=c.indexOf("{",0),f=0,m=0,v=c.length;g>-1&&gm){var d=c.substring(m,g);oe.call(u,{"[[type]]":"literal","[[value]]":d})}var h=c.substring(g+1,f);if("number"===h)if(isNaN(r)){var p=l.nan;oe.call(u,{"[[type]]":"nan","[[value]]":p})}else if(isFinite(r)){"percent"===n["[[style]]"]&&isFinite(r)&&(r*=100);var y=void 0;y=ee.call(n,"[[minimumSignificantDigits]]")&&ee.call(n,"[[maximumSignificantDigits]]")?E(r,n["[[minimumSignificantDigits]]"],n["[[maximumSignificantDigits]]"]):L(r,n["[[minimumIntegerDigits]]"],n["[[minimumFractionDigits]]"],n["[[maximumFractionDigits]]"]),cr[o]?!function(){var e=cr[o];y=String(y).replace(/\d/g,function(r){return e[r]})}():y=String(y);var b=void 0,w=void 0,x=y.indexOf(".",0);if(x>0?(b=y.substring(0,x),w=y.substring(x+1,x.length)):(b=y,w=void 0),n["[[useGrouping]]"]===!0){var D=l.group,j=[],z=s.patterns.primaryGroupSize||3,k=s.patterns.secondaryGroupSize||z;if(b.length>z){var F=b.length-z,O=F%k,S=b.slice(0,O);for(S.length&&oe.call(j,S);Oa;a++){var i=t[a];n+=i["[[value]]"]}return n}function E(r,t,n){var a=n,i=void 0,o=void 0;if(0===r)i=se.call(Array(a+1),"0"),o=0;else{o=e(Math.abs(r));var s=Math.round(Math.exp(Math.abs(o-a+1)*Math.LN10));i=String(Math.round(o-a+1<0?r*s:r/s))}if(o>=a)return i+se.call(Array(o-a+1+1),"0");if(o===a-1)return i;if(o>=0?i=i.slice(0,o+1)+"."+i.slice(o+1):o<0&&(i="0."+se.call(Array(-(o+1)+1),"0")+i),i.indexOf(".")>=0&&n>t){for(var l=n-t;l>0&&"0"===i.charAt(i.length-1);)i=i.slice(0,-1),l--;"."===i.charAt(i.length-1)&&(i=i.slice(0,-1))}return i}function L(e,r,t,n){var a=n,i=Math.pow(10,a)*e,o=0===i?"0":i.toFixed(0),s=void 0,l=(s=o.indexOf("e"))>-1?o.slice(s+1):0;l&&(o=o.slice(0,s).replace(".",""),o+=se.call(Array(l-(o.length-1)+1),"0"));var c=void 0;if(0!==a){var u=o.length;if(u<=a){var g=se.call(Array(a+1-u+1),"0");o=g+o,u=a+1}var f=o.substring(0,u-a),m=o.substring(u-a,o.length);o=f+"."+m,c=f.length}else c=o.length;for(var v=n-t;v>0&&"0"===o.slice(-1);)o=o.slice(0,-1),v--;if("."===o.slice(-1)&&(o=o.slice(0,-1)),cl&&(l=m,c=f),u++}return c}function $(e,r){var t=[];for(var n in pr)ee.call(pr,n)&&void 0!==e["[["+n+"]]"]&&t.push(n);if(1===t.length){var a=R(t[0],e["[["+t[0]+"]]"]);if(a)return a}for(var i=120,o=20,s=8,l=6,c=6,u=3,g=2,f=1,m=-(1/0),v=void 0,d=0,h=r.length;d=2||k>=2&&z<=1?F>0?y-=l:F<0&&(y-=s):F>1?y-=u:F<-1&&(y-=c)}}p._.hour12!==e.hour12&&(y-=f),y>m&&(m=y,v=p),d++}return v}function K(){var e=null!==this&&"object"===ir.typeof(this)&&i(this);if(!e||!e["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if(void 0===e["[[boundFormat]]"]){var r=function(){var e=Number(0===arguments.length?Date.now():arguments[0]);return H(this,e)},t=ce.call(r,this);e["[[boundFormat]]"]=t}return e["[[boundFormat]]"]}function Y(e,r){if(!isFinite(r))throw new RangeError("Invalid valid date passed to format");var a=e.__getInternalProperties(ge);n();for(var i=a["[[locale]]"],o=new sr.NumberFormat([i],{useGrouping:!1}),s=new sr.NumberFormat([i],{minimumIntegerDigits:2,useGrouping:!1}),l=X(r,a["[[calendar]]"],a["[[timeZone]]"]),c=a["[[pattern]]"],u=new t,g=0,f=c.indexOf("{"),m=0,v=a["[[dataLocale]]"],d=ue.DateTimeFormat["[[localeData]]"][v].calendars,h=a["[[calendar]]"];f!==-1;){var p=void 0;if(m=c.indexOf("}",f),m===-1)throw new Error("Unclosed pattern");f>g&&oe.call(u,{type:"literal",value:c.substring(g,f)});var y=c.substring(f+1,m);if(pr.hasOwnProperty(y)){var b=a["[["+y+"]]"],w=l["[["+y+"]]"];if("year"===y&&w<=0?w=1-w:"month"===y?w++:"hour"===y&&a["[[hour12]]"]===!0&&(w%=12,0===w&&a["[[hourNo0]]"]===!0&&(w=12)),"numeric"===b)p=S(o,w);else if("2-digit"===b)p=S(s,w),p.length>2&&(p=p.slice(-2));else if(b in hr)switch(y){case"month":p=q(d,h,"months",b,l["[["+y+"]]"]);break;case"weekday":try{p=q(d,h,"days",b,l["[["+y+"]]"])}catch(e){throw new Error("Could not find weekday data for locale "+i)}break;case"timeZoneName":p="";break;case"era":try{p=q(d,h,"eras",b,l["[["+y+"]]"])}catch(e){throw new Error("Could not find era data for locale "+i)}break;default:p=l["[["+y+"]]"]}oe.call(u,{type:y,value:p})}else if("ampm"===y){var x=l["[[hour]]"];p=q(d,h,"dayPeriods",x>11?"pm":"am",null),oe.call(u,{type:"dayPeriod",value:p})}else oe.call(u,{type:"literal",value:c.substring(f,m+1)});g=m+1,f=c.indexOf("{",g)}return ma;a++){var i=t[a];n+=i.value}return n}function W(e,r){for(var t=Y(e,r),n=[],a=0;t.length>a;a++){var i=t[a];n.push({type:i.type,value:i.value})}return n}function X(e,t,n){var a=new Date(e),i="get"+(n||"");return new r({"[[weekday]]":a[i+"Day"](),"[[era]]":+(a[i+"FullYear"]()>=0),"[[year]]":a[i+"FullYear"](),"[[month]]":a[i+"Month"](),"[[day]]":a[i+"Date"](),"[[hour]]":a[i+"Hours"](),"[[minute]]":a[i+"Minutes"](),"[[second]]":a[i+"Seconds"](),"[[inDST]]":!1})}function V(e,r){if(!e.number)throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat");var t=void 0,n=[r],a=r.split("-");for(a.length>2&&4===a[1].length&&oe.call(n,a[0]+"-"+a[2]);t=le.call(n);)oe.call(ue.NumberFormat["[[availableLocales]]"],t),ue.NumberFormat["[[localeData]]"][t]=e.number,e.date&&(e.date.nu=e.number.nu,oe.call(ue.DateTimeFormat["[[availableLocales]]"],t),ue.DateTimeFormat["[[localeData]]"][t]=e.date);void 0===Se&&o(r)}var J=function(){var e={};try{return Object.defineProperty(e,"a",{get:function(){return 1}}),1===e.a}catch(e){return!1}}(),Q=!J&&!Object.prototype.__defineGetter__,ee=Object.prototype.hasOwnProperty,re=J?Object.defineProperty:function(e,r,t){"get"in t&&e.__defineGetter__?e.__defineGetter__(r,t.get):(!ee.call(e,r)||"value"in t)&&(e[r]=t.value)},te=Array.prototype.indexOf||function(e){var r=this;if(!r.length)return-1;for(var t=arguments[1]||0,n=r.length;t1){for(var l=Array(o),c=0;c=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},He=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r},We="undefined"==typeof global?self:global,Xe=function e(r,t,n,a){var i=Object.getOwnPropertyDescriptor(r,t);if(void 0===i){var o=Object.getPrototypeOf(r);null!==o&&e(o,t,n,a)}else if("value"in i&&i.writable)i.value=n;else{var s=i.set;void 0!==s&&s.call(a,n)}return n},Ve=function(){function e(e,r){var t=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(t.push(o.value),!r||t.length!==r);n=!0);}catch(e){a=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(a)throw i}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Je=function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var t,n=[],a=e[Symbol.iterator]();!(t=a.next()).done&&(n.push(t.value), diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 61b816e527ab..b0549c382a59 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -10,9 +10,10 @@ load("@npm//@bazel/typescript:index.bzl", _ts_config = "ts_config", _ts_library load("@npm//@bazel/protractor:index.bzl", _protractor_web_test_suite = "protractor_web_test_suite") load("@npm//typescript:index.bzl", "tsc") load("//packages/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_package") -load("//dev-infra/benchmark/ng_rollup_bundle:ng_rollup_bundle.bzl", _ng_rollup_bundle = "ng_rollup_bundle") +load("@npm//@angular/dev-infra-private/bazel/benchmark/ng_rollup_bundle:ng_rollup_bundle.bzl", _ng_rollup_bundle = "ng_rollup_bundle") load("//tools:ng_benchmark.bzl", _ng_benchmark = "ng_benchmark") -load("//dev-infra/bazel/api-golden:index.bzl", _api_golden_test = "api_golden_test", _api_golden_test_npm_package = "api_golden_test_npm_package") +load("@npm//@angular/dev-infra-private/bazel/api-golden:index.bzl", _api_golden_test = "api_golden_test", _api_golden_test_npm_package = "api_golden_test_npm_package") +load("@npm//@angular/dev-infra-private/bazel:extract_js_module_output.bzl", "extract_js_module_output") _DEFAULT_TSCONFIG_TEST = "//packages:tsconfig-test" _INTERNAL_NG_MODULE_API_EXTRACTOR = "//packages/bazel/src/api-extractor:api_extractor" @@ -94,7 +95,7 @@ def ts_devserver(**kwargs): ts_config = _ts_config -def ts_library(name, tsconfig = None, testonly = False, deps = [], module_name = None, **kwargs): +def ts_library(name, tsconfig = None, testonly = False, deps = [], module_name = None, package_name = None, **kwargs): """Default values for ts_library""" deps = deps + ["@npm//tslib"] if testonly: @@ -108,12 +109,22 @@ def ts_library(name, tsconfig = None, testonly = False, deps = [], module_name = if not module_name: module_name = _default_module_name(testonly) + # If no `package_name` is explicitly set, we use the default module name as package + # name, so that the target can be resolved within NodeJS executions, by activating + # the Bazel NodeJS linker. See: https://github.com/bazelbuild/rules_nodejs/pull/2799. + if not package_name: + package_name = _default_module_name(testonly) + _ts_library( name = name, tsconfig = tsconfig, testonly = testonly, deps = deps, + # `module_name` is used for AMD module names within emitted JavaScript files. module_name = module_name, + # `package_name` can be set to allow for the Bazel NodeJS linker to run. This + # allows for resolution of the given target within the `node_modules/`. + package_name = package_name, **kwargs ) @@ -128,7 +139,7 @@ def ts_library(name, tsconfig = None, testonly = False, deps = [], module_name = output_group = "es5_sources", ) -def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], module_name = None, bundle_dts = True, **kwargs): +def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], module_name = None, package_name = None, bundle_dts = True, **kwargs): """Default values for ng_module""" deps = deps + ["@npm//tslib"] if testonly: @@ -141,6 +152,13 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps if not module_name: module_name = _default_module_name(testonly) + + # If no `package_name` is explicitly set, we use the default module name as package + # name, so that the target can be resolved within NodeJS executions, by activating + # the Bazel NodeJS linker. See: https://github.com/bazelbuild/rules_nodejs/pull/2799. + if not package_name: + package_name = _default_module_name(testonly) + if not entry_point: entry_point = "public_api.ts" _ng_module( @@ -154,7 +172,11 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps compiler = _INTERNAL_NG_MODULE_COMPILER, api_extractor = _INTERNAL_NG_MODULE_API_EXTRACTOR, ng_xi18n = _INTERNAL_NG_MODULE_XI18N, + # `module_name` is used for AMD module names within emitted JavaScript files. module_name = module_name, + # `package_name` can be set to allow for the Bazel NodeJS linker to run. This + # allows for resolution of the given target within the `node_modules/`. + package_name = package_name, perf_flag = "//packages/compiler-cli:ng_perf", **kwargs ) @@ -181,6 +203,21 @@ def ng_package(name, readme_md = None, license_banner = None, deps = [], **kwarg _ng_package( name = name, 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 + # result in duplicate linker mappings that will conflict. e.g. consider the following + # scenario: We have a `ts_library` for `@angular/core`. We will configure a package + # name for the target so that it can be resolved in NodeJS executions from `node_modules`. + # If we'd also set a `package_name` for the associated `pkg_npm` target, there would be + # two mappings for `@angular/core` and the linker will complain. For a better development + # experience, we want the mapping to resolve to the direct outputs of the `ts_library` + # instead of requiring tests and other targets to assemble the NPM package first. + # TODO(devversion): consider removing this if `rules_nodejs` allows for duplicate + # linker mappings where transitive-determined mappings are skipped on conflicts. + # https://github.com/bazelbuild/rules_nodejs/issues/2810. + package_name = None, + validate = False, readme_md = readme_md, license_banner = license_banner, substitutions = select({ @@ -216,13 +253,44 @@ def pkg_npm(name, **kwargs): "0.0.0-PLACEHOLDER": "{BUILD_SCM_VERSION}", }) + deps = kwargs.pop("deps", []) + + # The `pkg_npm` rule brings in devmode (`JSModuleInfo`) and prodmode (`JSEcmaScriptModuleInfo`) + # output into the the NPM package. We do not plan to ship prodmode ECMAScript `.mjs` files yet, + # so we only extract the `JSModuleInfo` outputs (which correspond to ES5 output) from the deps. + # https://github.com/bazelbuild/rules_nodejs/commit/911529fd364eb3ee1b8ecdc568a9fcf38a8b55ca. + # https://github.com/bazelbuild/rules_nodejs/blob/stable/packages/typescript/internal/build_defs.bzl#L334-L337. + extract_js_module_output( + name = "%s_js_module_output" % name, + provider = "JSModuleInfo", + include_declarations = True, + include_default_files = True, + deps = deps, + ) + _pkg_npm( name = name, + # 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 + # result in duplicate linker mappings that will conflict. e.g. consider the following + # scenario: We have a `ts_library` for `@angular/core`. We will configure a package + # name for the target so that it can be resolved in NodeJS executions from `node_modules`. + # If we'd also set a `package_name` for the associated `pkg_npm` target, there would be + # two mappings for `@angular/core` and the linker will complain. For a better development + # experience, we want the mapping to resolve to the direct outputs of the `ts_library` + # instead of requiring tests and other targets to assemble the NPM package first. + # TODO(devversion): consider removing this if `rules_nodejs` allows for duplicate + # linker mappings where transitive-determined mappings are skipped on conflicts. + # https://github.com/bazelbuild/rules_nodejs/issues/2810. + package_name = None, + validate = False, substitutions = select({ "//:stamp": stamped_substitutions, "//conditions:default": substitutions, }), visibility = visibility, + deps = [":%s_js_module_output" % name], **kwargs ) @@ -267,8 +335,8 @@ def karma_web_test_suite(name, **kwargs): bootstrap = bootstrap, deps = deps, browsers = [ - "//dev-infra/bazel/browsers/chromium:chromium", - "//dev-infra/bazel/browsers/firefox:firefox", + "@npm//@angular/dev-infra-private/bazel/browsers/chromium:chromium", + "@npm//@angular/dev-infra-private/bazel/browsers/firefox:firefox", ], data = data, tags = tags, @@ -306,7 +374,7 @@ def protractor_web_test_suite(**kwargs): """Default values for protractor_web_test_suite""" _protractor_web_test_suite( - browsers = ["//dev-infra/bazel/browsers/chromium:chromium"], + browsers = ["@npm//@angular/dev-infra-private/bazel/browsers/chromium:chromium"], **kwargs ) diff --git a/tools/gulp-tasks/cldr.js b/tools/gulp-tasks/cldr.js deleted file mode 100644 index 5d1ce7802f56..000000000000 --- a/tools/gulp-tasks/cldr.js +++ /dev/null @@ -1,43 +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 - */ - -const path = require('path'); -const fs = require('fs'); - -module.exports = { - extract: gulp => done => { - if (!fs.existsSync(path.join(__dirname, 'cldr/cldr-data'))) { - throw new Error(`You must run "gulp cldr:download" before you can extract the data`); - } - const extract = require('./cldr/extract'); - return extract(gulp, done); - }, - - download: gulp => done => { - const cldrDownloader = require('cldr-data-downloader'); - const cldrDataFolder = path.join(__dirname, 'cldr/cldr-data'); - if (fs.existsSync(cldrDataFolder)) { - fs.rmdirSync(cldrDataFolder, {recursive: true}); - } else { - fs.mkdirSync(cldrDataFolder); - } - cldrDownloader(path.join(__dirname, 'cldr/cldr-urls.json'), cldrDataFolder, {}, done); - }, - - closure: gulp => done => { - const {RELATIVE_I18N_DATA_FOLDER} = require('./cldr/extract'); - // tslint:disable-next-line:no-console - console.log(RELATIVE_I18N_DATA_FOLDER, fs.existsSync(RELATIVE_I18N_DATA_FOLDER)); - if (!fs.existsSync(RELATIVE_I18N_DATA_FOLDER)) { - throw new Error( - `You must run "gulp cldr:extract" before you can create the closure-locale.ts file`); - } - const localeAll = require('./cldr/closure'); - return localeAll(gulp, done); - }, -}; diff --git a/tools/gulp-tasks/cldr/cldr-data.js b/tools/gulp-tasks/cldr/cldr-data.js deleted file mode 100644 index dc68ab210dd9..000000000000 --- a/tools/gulp-tasks/cldr/cldr-data.js +++ /dev/null @@ -1,86 +0,0 @@ -// tslint:disable:file-header - -/** - * Npm module for Unicode CLDR JSON data - * - * @license - * Copyright 2013 Rafael Xavier de Souza - * Released under the MIT license - * https://github.com/rxaviers/cldr-data-npm/blob/master/LICENSE-MIT - */ - -'use strict'; - -const JSON_EXTENSION = /^(.*)\.json$/; - -const assert = require('assert'); -const _fs = require('fs'); -const _path = require('path'); - -function argsToArray(arg) { - return [].slice.call(arg, 0); -} - -function jsonFiles(dirName) { - const fileList = _fs.readdirSync(_path.join(__dirname, 'cldr-data', dirName)); - - return fileList.reduce(function(sum, file) { - if (JSON_EXTENSION.test(file)) { - return sum.concat(file.match(JSON_EXTENSION)[1]); - } - }, []); -} - -function cldrData(path /*, ...*/) { - assert( - typeof path === 'string', - 'must include path (e.g., "main/en/numbers" or "supplemental/likelySubtags")'); - - if (arguments.length > 1) { - return argsToArray(arguments).reduce(function(sum, path) { - sum.push(cldrData(path)); - return sum; - }, []); - } - return require('./cldr-data/' + path); -} - -function mainPathsFor(locales) { - return locales.reduce(function(sum, locale) { - const mainFiles = jsonFiles(_path.join('main', locale)); - mainFiles.forEach(function(mainFile) { - sum.push(_path.join('main', locale, mainFile)); - }); - return sum; - }, []); -} - -function supplementalPaths() { - const supplementalFiles = jsonFiles('supplemental'); - - return supplementalFiles.map(function(supplementalFile) { - return _path.join('supplemental', supplementalFile); - }); -} - -Object.defineProperty(cldrData, 'availableLocales', { - get: function() { - return cldrData('availableLocales').availableLocales; - } -}); - -cldrData.all = function() { - const paths = supplementalPaths().concat(mainPathsFor(this.availableLocales)); - return cldrData.apply({}, paths); -}; - -cldrData.entireMainFor = function(locale /*, ...*/) { - assert(typeof locale === 'string', 'must include locale (e.g., "en")'); - return cldrData.apply({}, mainPathsFor(argsToArray(arguments))); -}; - -cldrData.entireSupplemental = function() { - return cldrData.apply({}, supplementalPaths()); -}; - -module.exports = cldrData; diff --git a/tools/gulp-tasks/cldr/cldr-urls.json b/tools/gulp-tasks/cldr/cldr-urls.json deleted file mode 100644 index bec583e83ba0..000000000000 --- a/tools/gulp-tasks/cldr/cldr-urls.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "core": [ - "https://github.com/unicode-cldr/cldr-core/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-segments-modern/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-dates-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-buddhist-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-chinese-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-coptic-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-dangi-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-ethiopic-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-hebrew-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-indian-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-islamic-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-japanese-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-persian-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-cal-roc-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-localenames-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-misc-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-numbers-full/archive/37.0.0.zip", - "https://github.com/unicode-cldr/cldr-units-full/archive/37.0.0.zip" - ] -} diff --git a/tools/gulp-tasks/cldr/closure.js b/tools/gulp-tasks/cldr/closure.js deleted file mode 100644 index 631d045a3da5..000000000000 --- a/tools/gulp-tasks/cldr/closure.js +++ /dev/null @@ -1,163 +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 - */ - -const fs = require('fs'); -const yargs = require('yargs').argv; -const shelljs = require('shelljs'); -const {I18N_DATA_FOLDER, RELATIVE_I18N_DATA_FOLDER, HEADER} = require('./extract'); -const OUTPUT_NAME = `closure-locale.ts`; - -// tslint:disable:no-console -module.exports = (gulp, done) => { - // the locales used by closure that will be used to generate the closure-locale file - // extracted from: - // https://github.com/google/closure-library/blob/master/closure/goog/i18n/datetimepatterns.js#L2136 - let GOOG_LOCALES = [ - 'af', 'am', 'ar', 'ar-DZ', 'az', 'be', 'bg', 'bn', 'br', 'bs', - 'ca', 'chr', 'cs', 'cy', 'da', 'de', 'de-AT', 'de-CH', 'el', 'en-AU', - 'en-CA', 'en-GB', 'en-IE', 'en-IN', 'en-SG', 'en-ZA', 'es', 'es-419', 'es-MX', 'es-US', - 'et', 'eu', 'fa', 'fi', 'fr', 'fr-CA', 'ga', 'gl', 'gsw', 'gu', - 'haw', 'hi', 'hr', 'hu', 'hy', 'in', 'is', 'it', 'iw', 'ja', - 'ka', 'kk', 'km', 'kn', 'ko', 'ky', 'ln', 'lo', 'lt', 'lv', - 'mk', 'ml', 'mn', 'mo', 'mr', 'ms', 'mt', 'my', 'ne', 'nl', - 'no', 'or', 'pa', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sh', 'si', - 'sk', 'sl', 'sq', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tl', - 'tr', 'uk', 'ur', 'uz', 'vi', 'zh', 'zh-CN', 'zh-HK', 'zh-TW', 'zu' - ]; - - // locale id aliases to support deprecated locale ids used by closure - // it maps deprecated ids --> new ids - // manually extracted from ./cldr-data/supplemental/aliases.json - const ALIASES = { - 'in': 'id', - 'iw': 'he', - 'mo': 'ro-MD', - 'no': 'nb', - 'nb': 'no-NO', - 'sh': 'sr-Latn', - 'tl': 'fil', - 'pt': 'pt-BR', - 'zh-CN': 'zh-Hans-CN', - 'zh-Hans-CN': 'zh-Hans', - 'zh-HK': 'zh-Hant-HK', - 'zh-TW': 'zh-Hant-TW', - 'zh-Hant-TW': 'zh-Hant', - }; - - if (yargs.locales) { - GOOG_LOCALES = yargs.locales.split(','); - } - - console.log(`Writing file ${I18N_DATA_FOLDER}/${OUTPUT_NAME}`); - fs.writeFileSync( - `${RELATIVE_I18N_DATA_FOLDER}/${OUTPUT_NAME}`, generateAllLocalesFile(GOOG_LOCALES, ALIASES)); - - console.log(`Formatting ${I18N_DATA_FOLDER}/${OUTPUT_NAME}..."`); - shelljs.exec(`yarn clang-format -i ${I18N_DATA_FOLDER}/${OUTPUT_NAME}`, {silent: true}); - done(); -}; - -/** - * Generate a file that contains all locale to import for closure. - * Tree shaking will only keep the data for the `goog.LOCALE` locale. - */ -function generateAllLocalesFile(LOCALES, ALIASES) { - const existingLocalesAliases = {}; - const existingLocalesData = {}; - - // for each locale, get the data and the list of equivalent locales - LOCALES.forEach(locale => { - const eqLocales = new Set(); - eqLocales.add(locale); - if (locale.match(/-/)) { - eqLocales.add(locale.replace(/-/g, '_')); - } - - // check for aliases - const alias = ALIASES[locale]; - if (alias) { - eqLocales.add(alias); - - if (alias.match(/-/)) { - eqLocales.add(alias.replace(/-/g, '_')); - } - - // to avoid duplicated "case" we regroup all locales in the same "case" - // the simplest way to do that is to have alias aliases - // e.g. 'no' --> 'nb', 'nb' --> 'no-NO' - // which means that we'll have 'no', 'nb' and 'no-NO' in the same "case" - const aliasKeys = Object.keys(ALIASES); - for (let i = 0; i < aliasKeys.length; i++) { - const aliasValue = ALIASES[alias]; - if (aliasKeys.indexOf(alias) !== -1 && !eqLocales.has(aliasValue)) { - eqLocales.add(aliasValue); - - if (aliasValue.match(/-/)) { - eqLocales.add(aliasValue.replace(/-/g, '_')); - } - } - } - } - - for (let l of eqLocales) { - // find the existing content file - const path = `${RELATIVE_I18N_DATA_FOLDER}/${l}.ts`; - if (fs.existsSync(`${RELATIVE_I18N_DATA_FOLDER}/${l}.ts`)) { - const localeName = formatLocale(locale); - existingLocalesData[locale] = - fs.readFileSync(path, 'utf8') - .replace(`${HEADER}\n`, '') - .replace('export default ', `export const locale_${localeName} = `) - .replace('function plural', `function plural_${localeName}`) - .replace(/,(\n | )plural/, `, plural_${localeName}`) - .replace('const u = undefined;\n\n', ''); - } - } - - existingLocalesAliases[locale] = eqLocales; - }); - - function generateCases(locale) { - let str = ''; - let locales = []; - const eqLocales = existingLocalesAliases[locale]; - for (let l of eqLocales) { - str += `case '${l}':\n`; - locales.push(`'${l}'`); - } - let localesStr = '[' + locales.join(',') + ']'; - - str += ` l = locale_${formatLocale(locale)}; - locales = ${localesStr}; - break;\n`; - return str; - } - - function formatLocale(locale) { - return locale.replace(/-/g, '_'); - } - // clang-format off - return `${HEADER} -import {registerLocaleData} from '../src/i18n/locale_data'; - -const u = undefined; - -${LOCALES.map(locale => `${existingLocalesData[locale]}`).join('\n')} - -let l: any; -let locales: string[] = []; - -switch (goog.LOCALE) { -${LOCALES.map(locale => generateCases(locale)).join('')}} - -if(l) { - locales.forEach(locale => registerLocaleData(l, locale)); -} -`; - // clang-format on -} diff --git a/tools/gulp-tasks/cldr/extract.js b/tools/gulp-tasks/cldr/extract.js deleted file mode 100644 index aef0ac0001db..000000000000 --- a/tools/gulp-tasks/cldr/extract.js +++ /dev/null @@ -1,632 +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 - */ - -const fs = require('fs'); -const path = require('path'); -const stringify = require('./util').stringify; -// used to extract plural rules -const cldr = require('cldr'); -// used to extract all other cldr data -const cldrJs = require('cldrjs'); -// used to call to clang-format -const shelljs = require('shelljs'); - -const COMMON_PACKAGE = 'packages/common'; -const CORE_PACKAGE = 'packages/core'; -const I18N_FOLDER = `${COMMON_PACKAGE}/src/i18n`; -const I18N_CORE_FOLDER = `${CORE_PACKAGE}/src/i18n`; -const I18N_DATA_FOLDER = `${COMMON_PACKAGE}/locales`; -const I18N_DATA_EXTRA_FOLDER = `${I18N_DATA_FOLDER}/extra`; -const I18N_GLOBAL_FOLDER = `${I18N_DATA_FOLDER}/global`; -const RELATIVE_I18N_FOLDER = path.resolve(__dirname, `../../../${I18N_FOLDER}`); -const RELATIVE_I18N_CORE_FOLDER = path.resolve(__dirname, `../../../${I18N_CORE_FOLDER}`); -const RELATIVE_I18N_DATA_FOLDER = path.resolve(__dirname, `../../../${I18N_DATA_FOLDER}`); -const RELATIVE_I18N_DATA_EXTRA_FOLDER = - path.resolve(__dirname, `../../../${I18N_DATA_EXTRA_FOLDER}`); -const RELATIVE_I18N_GLOBAL_FOLDER = path.resolve(__dirname, `../../../${I18N_GLOBAL_FOLDER}`); -const DEFAULT_RULE = 'function anonymous(n) {\nreturn"other"\n}'; -const EMPTY_RULE = 'function anonymous(n) {\n\n}'; -const WEEK_DAYS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']; -const HEADER = `/** - * @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 - */ - -// THIS CODE IS GENERATED - DO NOT MODIFY -// See angular/tools/gulp-tasks/cldr/extract.js -`; - -// tslint:disable:no-console -module.exports = (gulp, done) => { - const cldrData = require('./cldr-data'); - const LOCALES = cldrData.availableLocales; - - console.log(`Loading CLDR data...`); - cldrJs.load(cldrData.all().concat(cldrData('scriptMetadata'))); - - console.log(`Writing locale files`); - if (!fs.existsSync(RELATIVE_I18N_FOLDER)) { - fs.mkdirSync(RELATIVE_I18N_FOLDER); - } - if (!fs.existsSync(RELATIVE_I18N_DATA_FOLDER)) { - fs.mkdirSync(RELATIVE_I18N_DATA_FOLDER); - } - if (!fs.existsSync(RELATIVE_I18N_DATA_EXTRA_FOLDER)) { - fs.mkdirSync(RELATIVE_I18N_DATA_EXTRA_FOLDER); - } - if (!fs.existsSync(RELATIVE_I18N_GLOBAL_FOLDER)) { - fs.mkdirSync(RELATIVE_I18N_GLOBAL_FOLDER); - } - - console.log(`Writing file ${I18N_FOLDER}/currencies.ts`); - fs.writeFileSync(`${RELATIVE_I18N_FOLDER}/currencies.ts`, generateCurrenciesFile()); - - const baseCurrencies = generateBaseCurrencies(new cldrJs('en')); - // additional "en" file that will be included in common - console.log(`Writing file ${I18N_CORE_FOLDER}/locale_en.ts`); - const localeEnFile = generateLocale('en', new cldrJs('en'), baseCurrencies); - fs.writeFileSync(`${RELATIVE_I18N_CORE_FOLDER}/locale_en.ts`, localeEnFile); - - LOCALES.forEach((locale, index) => { - const localeData = new cldrJs(locale); - - console.log(`${index + 1}/${LOCALES.length}`); - console.log(`\t${I18N_DATA_FOLDER}/${locale}.ts`); - fs.writeFileSync( - `${RELATIVE_I18N_DATA_FOLDER}/${locale}.ts`, - locale === 'en' ? localeEnFile : generateLocale(locale, localeData, baseCurrencies)); - console.log(`\t${I18N_DATA_EXTRA_FOLDER}/${locale}.ts`); - fs.writeFileSync( - `${RELATIVE_I18N_DATA_EXTRA_FOLDER}/${locale}.ts`, generateLocaleExtra(locale, localeData)); - console.log(`\t${I18N_GLOBAL_FOLDER}/${locale}.js`); - fs.writeFileSync( - `${RELATIVE_I18N_GLOBAL_FOLDER}/${locale}.js`, - generateGlobalLocale( - locale, locale === 'en' ? new cldrJs('en') : localeData, baseCurrencies)); - }); - console.log(`${LOCALES.length} locale files generated.`); - - console.log(`All i18n cldr files have been generated, formatting files..."`); - shelljs.exec( - `yarn clang-format -i ${I18N_DATA_FOLDER}/**/*.ts ${I18N_DATA_FOLDER}/*.ts ${ - I18N_FOLDER}/currencies.ts ${I18N_CORE_FOLDER}/locale_en.ts ${I18N_GLOBAL_FOLDER}/*.js`, - {silent: true}); - done(); -}; - -/** - * Generate contents for the basic locale data file - */ -function generateLocale(locale, localeData, baseCurrencies) { - return `${HEADER} -const u = undefined; - -${getPluralFunction(locale)} - -export default ${generateBasicLocaleString(locale, localeData, baseCurrencies)}; -`; -} - -/** - * Generate the contents for the extra data file - */ -function generateLocaleExtra(locale, localeData) { - return `${HEADER} -const u = undefined; - -export default ${generateDayPeriodsSupplementalString(locale, localeData)}; -`; -} - -/** - * Generated the contents for the global locale file - */ -function generateGlobalLocale(locale, localeData, baseCurrencies) { - const basicLocaleData = generateBasicLocaleString(locale, localeData, baseCurrencies); - const extraLocaleData = generateDayPeriodsSupplementalString(locale, localeData); - const data = basicLocaleData.replace(/\]$/, `, ${extraLocaleData}]`); - return `${HEADER} -(function(global) { - global.ng = global.ng || {}; - global.ng.common = global.ng.common || {}; - global.ng.common.locales = global.ng.common.locales || {}; - const u = undefined; - ${getPluralFunction(locale, false)} - global.ng.common.locales['${normalizeLocale(locale)}'] = ${data}; -})(typeof globalThis !== 'undefined' && globalThis || typeof global !== 'undefined' && global || typeof window !== 'undefined' && window); - `; -} - -/** - * Collect up the basic locale data [ localeId, dateTime, number, currency, pluralCase ]. - */ -function generateBasicLocaleString(locale, localeData, baseCurrencies) { - let data = stringify( - [ - locale, - ...getDateTimeTranslations(localeData), - ...getDateTimeSettings(localeData), - ...getNumberSettings(localeData), - ...getCurrencySettings(locale, localeData), - generateLocaleCurrencies(localeData, baseCurrencies), - getDirectionality(localeData), - ], - true) - // We remove "undefined" added by spreading arrays when there is no value - .replace(/undefined/g, 'u'); - - // adding plural function after, because we don't want it as a string - data = data.replace(/\]$/, ', plural]'); - return data; -} - -/** - * Collect up the day period rules, and extended day period data. - */ -function generateDayPeriodsSupplementalString(locale, localeData) { - const dayPeriods = getDayPeriodsNoAmPm(localeData); - const dayPeriodRules = getDayPeriodRules(localeData); - - let dayPeriodsSupplemental = []; - if (Object.keys(dayPeriods.format.narrow).length) { - const keys = Object.keys(dayPeriods.format.narrow); - - if (keys.length !== Object.keys(dayPeriodRules).length) { - throw new Error(`Error: locale ${locale} has not the correct number of day period rules`); - } - - const dayPeriodsFormat = removeDuplicates([ - objectValues(dayPeriods.format.narrow), objectValues(dayPeriods.format.abbreviated), - objectValues(dayPeriods.format.wide) - ]); - - const dayPeriodsStandalone = removeDuplicates([ - objectValues(dayPeriods['stand-alone'].narrow), - objectValues(dayPeriods['stand-alone'].abbreviated), - objectValues(dayPeriods['stand-alone'].wide) - ]); - - const rules = keys.map(key => dayPeriodRules[key]); - dayPeriodsSupplemental = [...removeDuplicates([dayPeriodsFormat, dayPeriodsStandalone]), rules]; - } - return stringify(dayPeriodsSupplemental).replace(/undefined/g, 'u'); -} - -/** - * Generate a list of currencies to be used as a based for other currencies - * e.g.: {'ARS': [, '$'], 'AUD': ['A$', '$'], ...} - */ -function generateBaseCurrencies(localeData, addDigits) { - const currenciesData = localeData.main('numbers/currencies'); - const fractions = new cldrJs('en').get(`supplemental/currencyData/fractions`); - const currencies = {}; - Object.keys(currenciesData).forEach(key => { - let symbolsArray = []; - const symbol = currenciesData[key].symbol; - const symbolNarrow = currenciesData[key]['symbol-alt-narrow']; - if (symbol && symbol !== key) { - symbolsArray.push(symbol); - } - if (symbolNarrow && symbolNarrow !== symbol) { - if (symbolsArray.length > 0) { - symbolsArray.push(symbolNarrow); - } else { - symbolsArray = [undefined, symbolNarrow]; - } - } - if (addDigits && fractions[key] && fractions[key]['_digits']) { - const digits = parseInt(fractions[key]['_digits'], 10); - if (symbolsArray.length === 2) { - symbolsArray.push(digits); - } else if (symbolsArray.length === 1) { - symbolsArray = [...symbolsArray, undefined, digits]; - } else { - symbolsArray = [undefined, undefined, digits]; - } - } - if (symbolsArray.length > 0) { - currencies[key] = symbolsArray; - } - }); - return currencies; -} - -/** - * To minimize the file even more, we only output the differences compared to the base currency - */ -function generateLocaleCurrencies(localeData, baseCurrencies) { - const currenciesData = localeData.main('numbers/currencies'); - const currencies = {}; - Object.keys(currenciesData).forEach(code => { - let symbolsArray = []; - const symbol = currenciesData[code].symbol; - const symbolNarrow = currenciesData[code]['symbol-alt-narrow']; - if (symbol && symbol !== code) { - symbolsArray.push(symbol); - } - if (symbolNarrow && symbolNarrow !== symbol) { - if (symbolsArray.length > 0) { - symbolsArray.push(symbolNarrow); - } else { - symbolsArray = [undefined, symbolNarrow]; - } - } - - // if locale data are different, set the value - if ((baseCurrencies[code] || []).toString() !== symbolsArray.toString()) { - currencies[code] = symbolsArray; - } - }); - return currencies; -} - -/** - * Generate a file that contains the list of currencies and their symbols - */ -function generateCurrenciesFile() { - const baseCurrencies = generateBaseCurrencies(new cldrJs('en'), true); - - return `${HEADER} -export type CurrenciesSymbols = [string] | [string | undefined, string]; - -/** @internal */ -export const CURRENCIES_EN: {[code: string]: CurrenciesSymbols | [string | undefined, string | undefined, number]} = ${ - stringify(baseCurrencies, true)}; -`; -} - -/** - * Returns data for the chosen day periods - * @returns { - * format: {narrow / abbreviated / wide: [...]}, - * stand-alone: {narrow / abbreviated / wide: [...]} - * } - */ -function getDayPeriods(localeData, dayPeriodsList) { - const dayPeriods = localeData.main(`dates/calendars/gregorian/dayPeriods`); - const result = {}; - // cleaning up unused keys - Object.keys(dayPeriods).forEach(key1 => { // format / stand-alone - result[key1] = {}; - Object.keys(dayPeriods[key1]).forEach(key2 => { // narrow / abbreviated / wide - result[key1][key2] = {}; - Object.keys(dayPeriods[key1][key2]).forEach(key3 => { - if (dayPeriodsList.indexOf(key3) !== -1) { - result[key1][key2][key3] = dayPeriods[key1][key2][key3]; - } - }); - }); - }); - - return result; -} - -/** - * Returns the basic day periods (am/pm) - */ -function getDayPeriodsAmPm(localeData) { - return getDayPeriods(localeData, ['am', 'pm']); -} - -/** - * Returns the extra day periods (without am/pm) - */ -function getDayPeriodsNoAmPm(localeData) { - return getDayPeriods(localeData, [ - 'noon', 'midnight', 'morning1', 'morning2', 'afternoon1', 'afternoon2', 'evening1', 'evening2', - 'night1', 'night2' - ]); -} - -/** - * Returns date-related translations for a locale - * @returns [ dayPeriodsFormat, dayPeriodsStandalone, daysFormat, dayStandalone, monthsFormat, - * monthsStandalone, eras ] - * each value: [ narrow, abbreviated, wide, short? ] - */ -function getDateTimeTranslations(localeData) { - const dayNames = localeData.main(`dates/calendars/gregorian/days`); - const monthNames = localeData.main(`dates/calendars/gregorian/months`); - const erasNames = localeData.main(`dates/calendars/gregorian/eras`); - const dayPeriods = getDayPeriodsAmPm(localeData); - - const dayPeriodsFormat = removeDuplicates([ - objectValues(dayPeriods.format.narrow), objectValues(dayPeriods.format.abbreviated), - objectValues(dayPeriods.format.wide) - ]); - - const dayPeriodsStandalone = removeDuplicates([ - objectValues(dayPeriods['stand-alone'].narrow), - objectValues(dayPeriods['stand-alone'].abbreviated), - objectValues(dayPeriods['stand-alone'].wide) - ]); - - const daysFormat = removeDuplicates([ - objectValues(dayNames.format.narrow), objectValues(dayNames.format.abbreviated), - objectValues(dayNames.format.wide), objectValues(dayNames.format.short) - ]); - - const daysStandalone = removeDuplicates([ - objectValues(dayNames['stand-alone'].narrow), objectValues(dayNames['stand-alone'].abbreviated), - objectValues(dayNames['stand-alone'].wide), objectValues(dayNames['stand-alone'].short) - ]); - - const monthsFormat = removeDuplicates([ - objectValues(monthNames.format.narrow), objectValues(monthNames.format.abbreviated), - objectValues(monthNames.format.wide) - ]); - - const monthsStandalone = removeDuplicates([ - objectValues(monthNames['stand-alone'].narrow), - objectValues(monthNames['stand-alone'].abbreviated), - objectValues(monthNames['stand-alone'].wide) - ]); - - const eras = removeDuplicates([ - [erasNames.eraNarrow['0'], erasNames.eraNarrow['1']], - [erasNames.eraAbbr['0'], erasNames.eraAbbr['1']], - [erasNames.eraNames['0'], erasNames.eraNames['1']] - ]); - - const dateTimeTranslations = [ - ...removeDuplicates([dayPeriodsFormat, dayPeriodsStandalone]), - ...removeDuplicates([daysFormat, daysStandalone]), - ...removeDuplicates([monthsFormat, monthsStandalone]), eras - ]; - - return dateTimeTranslations; -} - -/** - * Returns date, time and dateTime formats for a locale - * @returns [dateFormats, timeFormats, dateTimeFormats] - * each format: [ short, medium, long, full ] - */ -function getDateTimeFormats(localeData) { - function getFormats(data) { - return removeDuplicates([ - data.short._value || data.short, data.medium._value || data.medium, - data.long._value || data.long, data.full._value || data.full - ]); - } - - const dateFormats = localeData.main('dates/calendars/gregorian/dateFormats'); - const timeFormats = localeData.main('dates/calendars/gregorian/timeFormats'); - const dateTimeFormats = localeData.main('dates/calendars/gregorian/dateTimeFormats'); - - return [getFormats(dateFormats), getFormats(timeFormats), getFormats(dateTimeFormats)]; -} - -/** - * Returns day period rules for a locale - * @returns string[] - */ -function getDayPeriodRules(localeData) { - const dayPeriodRules = - localeData.get(`supplemental/dayPeriodRuleSet/${localeData.attributes.language}`); - const rules = {}; - if (dayPeriodRules) { - Object.keys(dayPeriodRules).forEach(key => { - if (dayPeriodRules[key]._at) { - rules[key] = dayPeriodRules[key]._at; - } else { - rules[key] = [dayPeriodRules[key]._from, dayPeriodRules[key]._before]; - } - }); - } - - return rules; -} - -/** - * Returns the first day of the week, based on US week days - * @returns number - */ -function getFirstDayOfWeek(localeData) { - return WEEK_DAYS.indexOf(localeData.supplemental.weekData.firstDay()); -} - -/** - * Returns week-end range for a locale, based on US week days - * @returns [number, number] - */ -function getWeekendRange(localeData) { - const startDay = - localeData.get(`supplemental/weekData/weekendStart/${localeData.attributes.territory}`) || - localeData.get('supplemental/weekData/weekendStart/001'); - const endDay = - localeData.get(`supplemental/weekData/weekendEnd/${localeData.attributes.territory}`) || - localeData.get('supplemental/weekData/weekendEnd/001'); - return [WEEK_DAYS.indexOf(startDay), WEEK_DAYS.indexOf(endDay)]; -} - -/** - * Returns dateTime data for a locale - * @returns [ firstDayOfWeek, weekendRange, formats ] - */ -function getDateTimeSettings(localeData) { - return [ - getFirstDayOfWeek(localeData), getWeekendRange(localeData), ...getDateTimeFormats(localeData) - ]; -} - -/** - * Returns the number symbols and formats for a locale - * @returns [ symbols, formats ] - * symbols: [ decimal, group, list, percentSign, plusSign, minusSign, exponential, - * superscriptingExponent, perMille, infinity, nan, timeSeparator, currencyDecimal?, currencyGroup? - * ] - * formats: [ currency, decimal, percent, scientific ] - */ -function getNumberSettings(localeData) { - const decimalFormat = localeData.main('numbers/decimalFormats-numberSystem-latn/standard'); - const percentFormat = localeData.main('numbers/percentFormats-numberSystem-latn/standard'); - const scientificFormat = localeData.main('numbers/scientificFormats-numberSystem-latn/standard'); - const currencyFormat = localeData.main('numbers/currencyFormats-numberSystem-latn/standard'); - const symbols = localeData.main('numbers/symbols-numberSystem-latn'); - const symbolValues = [ - symbols.decimal, - symbols.group, - symbols.list, - symbols.percentSign, - symbols.plusSign, - symbols.minusSign, - symbols.exponential, - symbols.superscriptingExponent, - symbols.perMille, - symbols.infinity, - symbols.nan, - symbols.timeSeparator, - ]; - - if (symbols.currencyDecimal || symbols.currencyGroup) { - symbolValues.push(symbols.currencyDecimal); - } - - if (symbols.currencyGroup) { - symbolValues.push(symbols.currencyGroup); - } - - return [symbolValues, [decimalFormat, percentFormat, currencyFormat, scientificFormat]]; -} - -/** - * Returns the currency code, symbol and name for a locale - * @returns [ code, symbol, name ] - */ -function getCurrencySettings(locale, localeData) { - const currencyInfo = localeData.main(`numbers/currencies`); - let currentCurrency = ''; - - // find the currency currently used in this country - const currencies = - localeData.get(`supplemental/currencyData/region/${localeData.attributes.territory}`) || - localeData.get( - `supplemental/currencyData/region/${localeData.attributes.language.toUpperCase()}`); - - if (currencies) { - currencies.some(currency => { - const keys = Object.keys(currency); - return keys.some(key => { - if (currency[key]._from && !currency[key]._to) { - return currentCurrency = key; - } - }); - }); - - if (!currentCurrency) { - throw new Error(`Unable to find currency for locale "${locale}"`); - } - } - - let currencySettings = [undefined, undefined, undefined]; - - if (currentCurrency) { - currencySettings = [ - currentCurrency, currencyInfo[currentCurrency].symbol, - currencyInfo[currentCurrency].displayName - ]; - } - - return currencySettings; -} - -/** - * Returns the writing direction for a locale - * @returns 'rtl' | 'ltr' - */ -function getDirectionality(localeData) { - const rtl = localeData.get('scriptMetadata/{script}/rtl'); - return rtl === 'YES' ? 'rtl' : 'ltr'; -} - -/** - * Transforms a string into a regexp - */ -function toRegExp(s) { - return new RegExp(s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'), 'g'); -} - -/** - * Returns the plural function for a locale - * todo(ocombe): replace "cldr" extractPluralRuleFunction with our own extraction using "CldrJS" - * because the 2 libs can become out of sync if they use different versions of the cldr database - */ -function getPluralFunction(locale, withTypes = true) { - let fn = cldr.extractPluralRuleFunction(locale).toString(); - - if (fn === EMPTY_RULE) { - fn = DEFAULT_RULE; - } - - const numberType = withTypes ? ': number' : ''; - fn = fn.replace(/function anonymous\(n[^}]+{/g, `function plural(n${numberType})${numberType} {`) - .replace(toRegExp('var'), 'let') - .replace(toRegExp('if(typeof n==="string")n=parseInt(n,10);'), '') - .replace(toRegExp('\n}'), ';\n}'); - - // The replacement values must match the `Plural` enum from common. - // We do not use the enum directly to avoid depending on that package. - return fn.replace(toRegExp('"zero"'), ' 0') - .replace(toRegExp('"one"'), ' 1') - .replace(toRegExp('"two"'), ' 2') - .replace(toRegExp('"few"'), ' 3') - .replace(toRegExp('"many"'), ' 4') - .replace(toRegExp('"other"'), ' 5'); -} - -/** - * Return an array of values from an object - */ -function objectValues(obj) { - return Object.keys(obj).map(key => obj[key]); -} - -/** - * To create smaller locale files, we remove duplicated data. - * To be make this work we need to store similar data in arrays, if some value in an array - * is undefined, we can take the previous defined value instead, because it means that it has - * been deduplicated. - * e.g.: [x, y, undefined, z, undefined, undefined] - * The first undefined is equivalent to y, the second and third are equivalent to z - * Note that the first value in an array is always defined. - * - * Also since we need to know which data is assumed similar, it is important that we store those - * similar data in arrays to mark the delimitation between values that have different meanings - * (e.g. months and days). - * - * For further size improvements, "undefined" values will be replaced by a constant in the arrays - * as the last step of the file generation (in generateLocale and generateLocaleExtra). - * e.g.: [x, y, undefined, z, undefined, undefined] will be [x, y, u, z, u, u] - */ -function removeDuplicates(data) { - const dedup = [data[0]]; - for (let i = 1; i < data.length; i++) { - if (stringify(data[i]) !== stringify(data[i - 1])) { - dedup.push(data[i]); - } else { - dedup.push(undefined); - } - } - return dedup; -} - -/** - * In Angular the locale is referenced by a "normalized" form. - */ -function normalizeLocale(locale) { - return locale.toLowerCase().replace(/_/g, '-'); -} - -module.exports.I18N_FOLDER = I18N_FOLDER; -module.exports.I18N_DATA_FOLDER = I18N_DATA_FOLDER; -module.exports.RELATIVE_I18N_DATA_FOLDER = RELATIVE_I18N_DATA_FOLDER; -module.exports.HEADER = HEADER; diff --git a/tools/gulp-tasks/cldr/util.js b/tools/gulp-tasks/cldr/util.js deleted file mode 100644 index 4b6c005f73bc..000000000000 --- a/tools/gulp-tasks/cldr/util.js +++ /dev/null @@ -1,182 +0,0 @@ -// tslint:disable:file-header - -/** - * Like JSON.stringify, but without double quotes around keys, and without null instead of undefined - * values - * Based on https://github.com/json5/json5/blob/master/lib/json5.js - * Use option "quoteKeys" to preserve quotes for keys - */ -module.exports.stringify = function(obj, quoteKeys) { - var getReplacedValueOrUndefined = function(holder, key) { - var value = holder[key]; - - // Replace the value with its toJSON value first, if possible - if (value && value.toJSON && typeof value.toJSON === 'function') { - value = value.toJSON(); - } - - return value; - }; - - function isWordChar(c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || - c === '_' || c === '$'; - } - - function isWordStart(c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c === '_' || c === '$'; - } - - function isWord(key) { - if (typeof key !== 'string') { - return false; - } - if (!isWordStart(key[0])) { - return false; - } - var i = 1, length = key.length; - while (i < length) { - if (!isWordChar(key[i])) { - return false; - } - i++; - } - return true; - } - - // polyfills - function isArray(obj) { - if (Array.isArray) { - return Array.isArray(obj); - } else { - return Object.prototype.toString.call(obj) === '[object Array]'; - } - } - - function isDate(obj) { - return Object.prototype.toString.call(obj) === '[object Date]'; - } - - var objStack = []; - function checkForCircular(obj) { - for (var i = 0; i < objStack.length; i++) { - if (objStack[i] === obj) { - throw new TypeError('Converting circular structure to JSON'); - } - } - } - - // Copied from Crokford's implementation of JSON - // See - // https://github.com/douglascrockford/JSON-js/blob/e39db4b7e6249f04a195e7dd0840e610cc9e941e/json2.js#L195 - // Begin - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }; - function escapeString(str, keepQuotes) { - // If the string contains no control characters, no quote characters, and no - // backslash characters, then we can safely slap some quotes around it. - // Otherwise we must also replace the offending characters with safe escape - // sequences. - escapable.lastIndex = 0; - return escapable.test(str) && !keepQuotes ? '"' + str.replace(escapable, function(a) { - var c = meta[a]; - return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + str + '"'; - } - // End - - function internalStringify(holder, key) { - var buffer, res; - - // Replace the value, if necessary - var obj_part = getReplacedValueOrUndefined(holder, key); - - if (obj_part && !isDate(obj_part)) { - // unbox objects - // don't unbox dates, since will turn it into number - obj_part = obj_part.valueOf(); - } - switch (typeof obj_part) { - case 'boolean': - return obj_part.toString(); - - case 'number': - if (isNaN(obj_part) || !isFinite(obj_part)) { - return 'null'; - } - return obj_part.toString(); - - case 'string': - return escapeString(obj_part.toString()); - - case 'object': - if (obj_part === null) { - return 'null'; - } else if (isArray(obj_part)) { - checkForCircular(obj_part); - buffer = '['; - objStack.push(obj_part); - - for (var i = 0; i < obj_part.length; i++) { - res = internalStringify(obj_part, i); - if (res === null) { - buffer += 'null'; - } /* else if (typeof res === 'undefined') { // modified to support empty array values - buffer += ''; - }*/ - else { - buffer += res; - } - if (i < obj_part.length - 1) { - buffer += ','; - } - } - objStack.pop(); - buffer += ']'; - } else { - checkForCircular(obj_part); - buffer = '{'; - var nonEmpty = false; - objStack.push(obj_part); - for (var prop in obj_part) { - if (obj_part.hasOwnProperty(prop)) { - var value = internalStringify(obj_part, prop); - if (typeof value !== 'undefined' && value !== null) { - nonEmpty = true; - key = isWord(prop) && !quoteKeys ? prop : escapeString(prop, quoteKeys); - buffer += key + ':' + value + ','; - } - } - } - objStack.pop(); - if (nonEmpty) { - buffer = buffer.substring(0, buffer.length - 1) + '}'; - } else { - buffer = '{}'; - } - } - return buffer; - default: - // functions and undefined should be ignored - return undefined; - } - } - - // special case...when undefined is used inside of - // a compound object/array, return null. - // but when top-level, return undefined - var topLevelHolder = {'': obj}; - if (obj === undefined) { - return getReplacedValueOrUndefined(topLevelHolder, ''); - } - return internalStringify(topLevelHolder, ''); -}; diff --git a/tools/postinstall-patches.js b/tools/postinstall-patches.js index 45e9bdd03e12..d2a8f596b65d 100644 --- a/tools/postinstall-patches.js +++ b/tools/postinstall-patches.js @@ -61,7 +61,21 @@ ls('node_modules/@types').filter(f => f.startsWith('babel__')).forEach(pkg => { } }); -log('\n# patch: delete d.ts files refering to rxjs-compat'); +log('\n# patch: use local version of @angular/* and zone.js in component_benchmark from @angular/dev-infra.-private'); +[['@npm//@angular/platform-browser', '@angular//packages/platform-browser'], + ['@npm//@angular/core', '@angular//packages/core'], + [ + 'load\\("@npm//@angular/bazel:index.bzl", "ng_module"\\)', + 'load\("@angular//tools:defaults.bzl", "ng_module"\)' + ], + ['@npm//zone.js', '//packages/zone.js/bundles:zone.umd.js'], + +].forEach(([matcher, replacement]) => { + sed('-i', matcher, replacement, + 'node_modules/@angular/dev-infra-private/bazel/benchmark/component_benchmark/component_benchmark.bzl'); +}); + +log('\n# patch: delete d.ts files referring to rxjs-compat'); // more info in https://github.com/angular/angular/pull/33786 rm('-rf', [ 'node_modules/rxjs/add/', diff --git a/tools/ts-api-guardian/BUILD.bazel b/tools/ts-api-guardian/BUILD.bazel deleted file mode 100644 index 5518699aee4b..000000000000 --- a/tools/ts-api-guardian/BUILD.bazel +++ /dev/null @@ -1,114 +0,0 @@ -# BEGIN-INTERNAL -load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm") -load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("//tools:defaults.bzl", "jasmine_node_test") - -ts_library( - name = "lib", - srcs = glob(["lib/*.ts"]), - module_name = "ts-api-guardian", - tsconfig = "//tools:tsconfig.json", - visibility = ["//visibility:public"], - deps = [ - "@npm//@types/diff", - "@npm//@types/minimist", - "@npm//@types/node", - "@npm//chalk", - "@npm//diff", - "@npm//minimist", - "@npm//typescript", - ], -) - -# Copy Angular's license to govern ts-api-guardian as well. -# We use a genrule to put it in this package, so it will be in the right root directory. -genrule( - name = "license", - srcs = ["//:LICENSE"], - outs = ["LICENSE"], - cmd = "cp $< $@", -) - -pkg_npm( - name = "ts-api-guardian", - srcs = [ - "BUILD.bazel", - "README.md", - "bin/ts-api-guardian", - "index.bzl", - "package.json", - ], - substitutions = { - "@angular//tools/ts-api-guardian:bin": "//:node_modules/ts-api-guardian/bin", - "@angular//tools/ts-api-guardian:lib": "@npm//ts-api-guardian", - }, - deps = [ - ":lib", - ":license", - ], -) - -#######################################3 -# Tests for this package - -ts_library( - name = "test_lib", - testonly = True, - srcs = glob( - ["test/*.ts"], - exclude = ["test/bootstrap.ts"], - ), - tsconfig = "//tools:tsconfig-test", - deps = [ - ":lib", - "@npm//@bazel/runfiles", - "@npm//@types/jasmine", - "@npm//@types/node", - "@npm//jasmine", - "@npm//typescript", - ], -) - -ts_library( - name = "bootstrap", - testonly = True, - srcs = ["test/bootstrap.ts"], - tsconfig = "//tools:tsconfig-test", - deps = ["@npm//@types/node"], -) - -# Select the es5 .js output of the ts_library :boostrap target -# with `output_group = "es5_sources"` for use in the jasmine_node_test -# below. This exposes an internal detail of ts_library that is not ideal. -# TODO(gregmagolan): clean this up by using tsc() in this case rather than ts_library -filegroup( - name = "bootstrap_es5", - testonly = True, - srcs = [":bootstrap"], - output_group = "es5_sources", -) - -jasmine_node_test( - name = "tests", - srcs = [ - ":test_lib", - ], - bootstrap = [":bootstrap_es5"], - data = glob([ - "test/fixtures/*.ts", - "test/fixtures/*.patch", - ]) + [ - ":ts-api-guardian", - ], -) - -filegroup( - name = "bin", - srcs = glob(["lib/*.js"]) + ["bin/ts-api-guardian"], - visibility = ["//visibility:public"], -) - -# Exported to be referenced as entry_point of the nodejs_binary -exports_files(["bin/ts-api-guardian"]) - -# END-INTERNAL diff --git a/tools/ts-api-guardian/README.md b/tools/ts-api-guardian/README.md deleted file mode 100644 index 296d4e1e6f3a..000000000000 --- a/tools/ts-api-guardian/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Typescript API Guardian - -Keeps track of public API surface of a typescript library. - -Examples: - -```sh -# Generate one declaration file -ts-api-guardian --out api_guard.d.ts index.d.ts -# Generate multiple declaration files -# (output location like typescript) -ts-api-guardian --outDir api_guard [--rootDir .] core/index.d.ts core/testing.d.ts -# Print usage -ts-api-guardian --help -# Check against one declaration file -ts-api-guardian --verify api_guard.d.ts index.d.ts -# Check against multiple declaration files -ts-api-guardian --verifyDir api_guard [--rootDir .] core/index.d.ts core/testing.d.ts -``` - -# For developers - -Build and test this library: - -```sh -$ yarn bazel run //:install -$ yarn bazel test //tools/ts-api-guardian:all -``` - -Publish to NPM: - -```sh -$ yarn bazel run @nodejs//:npm whoami # should be logged in as angular -$ grep version tools/ts-api-guardian/package.json # advance as needed -$ yarn bazel run //tools/ts-api-guardian:ts-api-guardian.publish -``` diff --git a/tools/ts-api-guardian/bin/ts-api-guardian b/tools/ts-api-guardian/bin/ts-api-guardian deleted file mode 100755 index b0cfde463b7c..000000000000 --- a/tools/ts-api-guardian/bin/ts-api-guardian +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../lib/cli').startCli(); diff --git a/tools/ts-api-guardian/index.bzl b/tools/ts-api-guardian/index.bzl deleted file mode 100644 index f6ed5b311d3e..000000000000 --- a/tools/ts-api-guardian/index.bzl +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Runs ts_api_guardian -""" - -load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary", "nodejs_test") - -COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor", "Symbol"] - -def ts_api_guardian_test( - name, - golden, - actual, - data = [], - strip_export_pattern = [], - allow_module_identifiers = COMMON_MODULE_IDENTIFIERS, - use_angular_tag_rules = True, - **kwargs): - """Runs ts_api_guardian - """ - data += [ - # Locally we need to add the TS build target - # But it will replaced to @npm//ts-api-guardian when publishing - "@angular//tools/ts-api-guardian:lib", - # BEGIN-INTERNAL - "@angular//tools/ts-api-guardian:bin", - # END-INTERNAL - # The below are required during runtime - "@npm//chalk", - "@npm//diff", - "@npm//minimist", - "@npm//typescript", - ] - - args = [ - # Needed so that node doesn't walk back to the source directory. - # From there, the relative imports would point to .ts files. - "--node_options=--preserve-symlinks", - # 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", - ] - - for i in strip_export_pattern: - # Quote the regexp before passing it via the command line. - quoted_pattern = "\"%s\"" % i - args += ["--stripExportPattern", quoted_pattern] - - for i in allow_module_identifiers: - args += ["--allowModuleIdentifiers", i] - - if use_angular_tag_rules: - args += ["--useAngularTagRules"] - - nodejs_test( - name = name, - data = data, - entry_point = Label("@angular//tools/ts-api-guardian:bin/ts-api-guardian"), - tags = kwargs.pop("tags", []) + ["api_guard"], - templated_args = args + ["--verify", golden, actual], - **kwargs - ) - - nodejs_binary( - name = name + ".accept", - testonly = True, - data = data, - entry_point = Label("@angular//tools/ts-api-guardian:bin/ts-api-guardian"), - tags = kwargs.pop("tags", []) + ["api_guard"], - templated_args = args + ["--out", golden, actual], - **kwargs - ) - -def ts_api_guardian_test_npm_package( - name, - goldenDir, - actualDir, - data = [], - strip_export_pattern = ["^ɵ(?!ɵdefineInjectable|ɵinject|ɵInjectableDef)"], - allow_module_identifiers = COMMON_MODULE_IDENTIFIERS, - use_angular_tag_rules = True, - **kwargs): - """Runs ts_api_guardian - """ - data += [ - # Locally we need to add the TS build target - # But it will replaced to @npm//ts-api-guardian when publishing - "@angular//tools/ts-api-guardian:lib", - "@angular//tools/ts-api-guardian:bin", - # The below are required during runtime - "@npm//chalk", - "@npm//diff", - "@npm//minimist", - "@npm//typescript", - ] - - args = [ - # Needed so that node doesn't walk back to the source directory. - # From there, the relative imports would point to .ts files. - "--node_options=--preserve-symlinks", - # We automatically discover the enpoints for our NPM package. - "--autoDiscoverEntrypoints", - # 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", - ] - - for i in strip_export_pattern: - # Quote the regexp before passing it via the command line. - quoted_pattern = "\"%s\"" % i - args += ["--stripExportPattern", quoted_pattern] - - for i in allow_module_identifiers: - args += ["--allowModuleIdentifiers", i] - - if use_angular_tag_rules: - args += ["--useAngularTagRules"] - - nodejs_test( - name = name, - data = data, - entry_point = "@angular//tools/ts-api-guardian:bin/ts-api-guardian", - tags = kwargs.pop("tags", []) + ["api_guard"], - templated_args = args + ["--autoDiscoverEntrypoints", "--verifyDir", goldenDir, "--rootDir", "$(rlocation %s)" % actualDir], - **kwargs - ) - - nodejs_binary( - name = name + ".accept", - testonly = True, - data = data, - entry_point = "@angular//tools/ts-api-guardian:bin/ts-api-guardian", - tags = kwargs.pop("tags", []) + ["api_guard"], - templated_args = args + ["--autoDiscoverEntrypoints", "--outDir", goldenDir, "--rootDir", "$(rlocation %s)" % actualDir], - **kwargs - ) diff --git a/tools/ts-api-guardian/lib/cli.ts b/tools/ts-api-guardian/lib/cli.ts deleted file mode 100644 index 0ff5cebd5e1c..000000000000 --- a/tools/ts-api-guardian/lib/cli.ts +++ /dev/null @@ -1,279 +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 - */ - -// tslint:disable:no-console -import * as chalk from 'chalk'; -import * as minimist from 'minimist'; -import * as path from 'path'; - -import {discoverAllEntrypoints, generateGoldenFile, SerializationOptions, verifyAgainstGoldenFile} from './main'; - -/** Name of the CLI */ -const CMD = 'ts-api-guardian'; - -/** Name of the Bazel workspace that runs the CLI. */ -const bazelWorkspaceName = process.env.BAZEL_WORKSPACE; -/** - * Path to the Bazel workspace directory. Only set if the CLI is run with `bazel run`. - * https://docs.bazel.build/versions/master/user-manual.html#run. - */ -const bazelWorkspaceDirectory = process.env.BUILD_WORKSPACE_DIRECTORY; -/** - * Regular expression that matches Bazel manifest paths that start with the - * current Bazel workspace, followed by a path delimiter. - */ -const bazelWorkspaceManifestPathRegex = - bazelWorkspaceName ? new RegExp(`^${bazelWorkspaceName}[/\\\\]`) : null; - -export function startCli() { - const {argv, mode, errors} = parseArguments(process.argv.slice(2)); - - const options: SerializationOptions = { - stripExportPattern: [].concat(argv['stripExportPattern']), - allowModuleIdentifiers: [].concat(argv['allowModuleIdentifiers']), - }; - - // Since the API guardian can be also used by other projects, we should not set up the default - // Angular project tag rules unless specified explicitly through a given option. - if (argv['useAngularTagRules']) { - options.exportTags = { - requireAtLeastOne: ['publicApi', 'codeGenApi'], - banned: ['experimental'], - toCopy: ['deprecated', 'codeGenApi'] - }; - options.memberTags = { - requireAtLeastOne: [], - banned: ['experimental', 'publicApi', 'codeGenApi'], - toCopy: ['deprecated'] - }; - options.paramTags = { - requireAtLeastOne: [], - banned: ['experimental', 'publicApi', 'codeGenApi'], - toCopy: ['deprecated'] - }; - } - - // In autoDiscoverEntrypoints mode we set the inputed files as the discovered entrypoints - // for the rootDir - let entrypoints: string[]; - if (argv['autoDiscoverEntrypoints']) { - entrypoints = discoverAllEntrypoints(argv['rootDir']); - } else { - entrypoints = argv._.slice(); - } - - for (const error of errors) { - console.warn(error); - } - - if (mode === 'help') { - printUsageAndExit(!!errors.length); - } else { - const targets = resolveFileNamePairs(argv, mode, entrypoints); - - if (mode === 'out') { - for (const {entrypoint, goldenFile} of targets) { - generateGoldenFile(entrypoint, goldenFile, options); - } - } else { // mode === 'verify' - let hasDiff = false; - - for (const {entrypoint, goldenFile} of targets) { - const diff = verifyAgainstGoldenFile(entrypoint, goldenFile, options); - if (diff) { - hasDiff = true; - const lines = diff.split('\n'); - if (lines.length) { - lines.pop(); // Remove trailing newline - } - for (const line of lines) { - const chalkMap: - {[key: string]: any} = {'-': chalk.red, '+': chalk.green, '@': chalk.cyan}; - const chalkFunc = chalkMap[line[0]] || chalk.reset; - console.log(chalkFunc(line)); - } - } - } - - if (hasDiff) { - const bazelTarget = process.env['BAZEL_TARGET']; - // Under bazel, give instructions how to use bazel run to accept the golden file. - if (bazelTarget) { - console.error('\n\nIf you modify a public API, you must accept the new golden file.'); - console.error('\n\nTo do so, execute the following Bazel target:'); - console.error(` yarn bazel run ${bazelTarget.replace(/_bin$/, '')}.accept`); - if (process.env['TEST_WORKSPACE'] === 'angular') { - console.error('\n\nFor more information, see'); - console.error( - '\n https://github.com/angular/angular/blob/master/docs/PUBLIC_API.md#golden-files'); - } - } - - process.exit(1); - } - } - } -} - -export function parseArguments(input: string[]): - {argv: minimist.ParsedArgs, mode: string, errors: string[]} { - let help = false; - const errors: string[] = []; - - const argv = minimist(input, { - string: [ - 'out', 'outDir', 'verify', 'verifyDir', 'rootDir', 'stripExportPattern', - 'allowModuleIdentifiers' - ], - boolean: [ - 'help', 'useAngularTagRules', 'autoDiscoverEntrypoints', - // Options used by chalk automagically - 'color', 'no-color' - ], - alias: {'outFile': 'out', 'verifyFile': 'verify'}, - unknown: (option: string) => { - if (option[0] === '-') { - errors.push(`Unknown option: ${option}`); - help = true; - return false; // do not add to argv._ - } else { - return true; // add to argv._ - } - } - }); - - help = help || argv['help']; - - if (help) { - return {argv, mode: 'help', errors}; - } - - let modes: string[] = []; - - if (argv['out']) { - modes.push('out'); - } - if (argv['outDir']) { - modes.push('out'); - } - if (argv['verify']) { - modes.push('verify'); - } - if (argv['verifyDir']) { - modes.push('verify'); - } - - if (argv['autoDiscoverEntrypoints']) { - if (!argv['rootDir']) { - errors.push(`--rootDir must be provided with --autoDiscoverEntrypoints.`); - modes = ['help']; - } - if (!argv['outDir'] && !argv['verifyDir']) { - errors.push(`--outDir or --verifyDir must be used with --autoDiscoverEntrypoints.`); - modes = ['help']; - } - } else { - if (!argv._.length) { - errors.push('No input file specified.'); - modes = ['help']; - } else if (modes.length !== 1) { - errors.push('Specify either --out[Dir] or --verify[Dir]'); - modes = ['help']; - } else if (argv._.length > 1 && !argv['outDir'] && !argv['verifyDir']) { - errors.push(`More than one input specified. Use --${modes[0]}Dir instead.`); - modes = ['help']; - } - } - - return {argv, mode: modes[0], errors}; -} - -function printUsageAndExit(error = false) { - const print = error ? console.warn.bind(console) : console.log.bind(console); - print(`Usage: ${CMD} [options] - ${CMD} --out - ${CMD} --outDir [--rootDir .] - - ${CMD} --verify - ${CMD} --verifyDir [--rootDir .] - -Options: - --help Show this usage message - - --out Write golden output to file - --outDir Write golden file structure to directory - - --verify Read golden input from file - --verifyDir Read golden file structure from directory - - --rootDir Specify the root directory of input files - - --useAngularTagRules Whether the Angular specific tag rules should be used. - --stripExportPattern Do not output exports matching the pattern - --allowModuleIdentifiers - Allow identifier for "* as foo" imports - --autoDiscoverEntrypoints Automatically find all entrypoints .d.ts files in the rootDir`); - process.exit(error ? 1 : 0); -} - -/** - * Resolves a given path in the file system. If `ts-api-guardian` runs with Bazel, file paths - * are resolved through runfiles. Additionally in Bazel, this method handles the case where - * manifest file paths are not existing, but need to resolve to the Bazel workspace directory. - * This happens commonly when goldens are approved, but the golden file does not exist yet. - */ -function resolveFilePath(fileName: string): string { - // If an absolute path is specified, the path is already resolved. - if (path.isAbsolute(fileName)) { - return fileName; - } - // Outside of Bazel, file paths are resolved based on the current working directory. - if (!bazelWorkspaceName) { - return path.resolve(fileName); - } - // In Bazel, we first try to resolve the file through the runfiles. We do this by calling - // the `require.resolve` function that is patched by the Bazel NodeJS rules. Note that we - // need to catch errors because files inside tree artifacts cannot be resolved through - // runfile manifests. Hence, we need to have alternative resolution logic when resolving - // file paths. Additionally, it could happen that manifest paths which aren't part of the - // runfiles are specified (i.e. golden is approved but does not exist in the workspace yet). - try { - return require.resolve(fileName); - } catch { - } - // This handles cases where file paths cannot be resolved through runfiles. This happens - // commonly when goldens are approved while the golden does not exist in the workspace yet. - // In those cases, we want to build up a relative path based on the manifest path, and join - // it with the absolute bazel workspace directory (which is only set in `bazel run`). - // e.g. `angular/goldens/<..>/common` should become `{workspace_dir}/goldens/<...>/common`. - if (bazelWorkspaceManifestPathRegex !== null && bazelWorkspaceDirectory && - bazelWorkspaceManifestPathRegex.test(fileName)) { - return path.join(bazelWorkspaceDirectory, fileName.substr(bazelWorkspaceName.length + 1)); - } - throw Error(`Could not resolve file path in runfiles: ${fileName}`); -} - -function resolveFileNamePairs(argv: minimist.ParsedArgs, mode: string, entrypoints: string[]): - {entrypoint: string, goldenFile: string}[] { - if (argv[mode]) { - return [{ - entrypoint: resolveFilePath(entrypoints[0]), - goldenFile: resolveFilePath(argv[mode]), - }]; - } else { // argv[mode + 'Dir'] - let rootDir = argv['rootDir'] || '.'; - const goldenDir = argv[mode + 'Dir']; - - return entrypoints.map((fileName: string) => { - return { - entrypoint: resolveFilePath(fileName), - goldenFile: resolveFilePath(path.join(goldenDir, path.relative(rootDir, fileName))), - }; - }); - } -} diff --git a/tools/ts-api-guardian/lib/main.ts b/tools/ts-api-guardian/lib/main.ts deleted file mode 100644 index 777bce97c172..000000000000 --- a/tools/ts-api-guardian/lib/main.ts +++ /dev/null @@ -1,98 +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 {createPatch} from 'diff'; -import * as fs from 'fs'; -import * as path from 'path'; - -import {publicApi, SerializationOptions} from './serializer'; - -export {publicApi, SerializationOptions} from './serializer'; - -export function generateGoldenFile( - entrypoint: string, outFile: string, options: SerializationOptions = {}): void { - const output = publicApi(entrypoint, options); - - ensureDirectory(path.dirname(outFile)); - fs.writeFileSync(outFile, output); -} - -export function verifyAgainstGoldenFile( - entrypoint: string, goldenFile: string, options: SerializationOptions = {}): string { - const actual = publicApi(entrypoint, options); - const expected = fs.existsSync(goldenFile) ? fs.readFileSync(goldenFile).toString() : ''; - - if (actual === expected) { - return ''; - } else { - // The patch should not show absolute paths, as these are pretty long and obfuscated - // the printed golden diff. Additionally, path separators in the patch should be forward - // slashes for consistency and to enable easier integration testing. - const displayFileName = path.relative(process.cwd(), goldenFile).replace(/\\/g, '/'); - const patch = createPatch(displayFileName, expected, actual, 'Golden file', 'Generated API'); - - // Remove the header of the patch - const start = patch.indexOf('\n', patch.indexOf('\n') + 1) + 1; - - return patch.substring(start); - } -} - -function ensureDirectory(dir: string) { - if (!fs.existsSync(dir)) { - ensureDirectory(path.dirname(dir)); - fs.mkdirSync(dir); - } -} - -/** - * Determine if the provided path is a directory. - */ -function isDirectory(dirPath: string) { - try { - return fs.lstatSync(dirPath).isDirectory(); - } catch { - return false; - } -} - -/** - * Gets an array of paths to the typings files for each of the recursively discovered - * package.json - * files from the directory provided. - */ -export function discoverAllEntrypoints(dirPath: string) { - // Determine all of the package.json files - const packageJsons: string[] = []; - const entryPoints: string[] = []; - const findPackageJsonsInDir = (nextPath: string) => { - for (const file of fs.readdirSync(nextPath)) { - const fullPath = path.join(nextPath, file); - if (isDirectory(fullPath)) { - findPackageJsonsInDir(fullPath); - } else { - if (file === 'package.json') { - packageJsons.push(fullPath); - } - } - } - }; - findPackageJsonsInDir(dirPath); - - // Get all typings file locations from package.json files - for (const packageJson of packageJsons) { - const packageJsonObj = - JSON.parse(fs.readFileSync(packageJson, {encoding: 'utf8'})) as {typings: string}; - const typings = packageJsonObj.typings; - if (typings) { - entryPoints.push(path.join(path.dirname(packageJson), typings)); - } - } - - return entryPoints; -} diff --git a/tools/ts-api-guardian/lib/serializer.ts b/tools/ts-api-guardian/lib/serializer.ts deleted file mode 100644 index ca5ac5211650..000000000000 --- a/tools/ts-api-guardian/lib/serializer.ts +++ /dev/null @@ -1,448 +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 * as path from 'path'; -import * as ts from 'typescript'; - -const baseTsOptions: ts.CompilerOptions = { - // We don't want symbols from external modules to be resolved, so we use the - // classic algorithm. - moduleResolution: ts.ModuleResolutionKind.Classic -}; - -export interface JsDocTagOptions { - /** - * An array of names of jsdoc tags, one of which must exist. If no tags are provided, there are no - * required tags. - */ - requireAtLeastOne?: string[]; - - /** - * An array of names of jsdoc tags that must not exist. - */ - banned?: string[]; - - /** - * An array of names of jsdoc tags that will be copied to the serialized code. - */ - toCopy?: string[]; -} - -export interface SerializationOptions { - /** - * Removes all exports matching the regular expression. - */ - stripExportPattern?: RegExp|RegExp[]; - /** - * Allows these identifiers as modules in the output. For example, - * ``` - * import * as angular from './angularjs'; - * - * export class Foo extends angular.Bar {} - * ``` - * will produce `export class Foo extends angular.Bar {}` and requires explicitly allowing - * `angular` as a module identifier. - */ - allowModuleIdentifiers?: string[]; - - /** The jsdoc tag options for top level exports */ - exportTags?: JsDocTagOptions; - - /** The jsdoc tag options for properties/methods/etc of exports */ - memberTags?: JsDocTagOptions; - - /** The jsdoc tag options for parameters of members/functions */ - paramTags?: JsDocTagOptions; -} - -export type DiagnosticSeverity = 'warn'|'error'|'none'; - -export function publicApi(fileName: string, options: SerializationOptions = {}): string { - return publicApiInternal(ts.createCompilerHost(baseTsOptions), fileName, baseTsOptions, options); -} - -export function publicApiInternal( - host: ts.CompilerHost, fileName: string, tsOptions: ts.CompilerOptions, - options: SerializationOptions = {}): string { - // Since the entry point will be compared with the source files from the TypeScript program, - // the path needs to be normalized with forward slashes in order to work within Windows. - const entrypoint = path.normalize(fileName).replace(/\\/g, '/'); - - // Setup default tag options - options = { - ...options, - exportTags: applyDefaultTagOptions(options.exportTags), - memberTags: applyDefaultTagOptions(options.memberTags), - paramTags: applyDefaultTagOptions(options.paramTags) - }; - - if (!entrypoint.match(/\.d\.ts$/)) { - throw new Error(`Source file "${fileName}" is not a declaration file`); - } - - const program = ts.createProgram([entrypoint], tsOptions, host); - return new ResolvedDeclarationEmitter(program, entrypoint, options).emit(); -} - -interface Diagnostic { - type?: DiagnosticSeverity; - message: string; -} - -class ResolvedDeclarationEmitter { - private program: ts.Program; - private fileName: string; - private typeChecker: ts.TypeChecker; - private options: SerializationOptions; - private diagnostics: Diagnostic[]; - - constructor(program: ts.Program, fileName: string, options: SerializationOptions) { - this.program = program; - this.fileName = fileName; - this.options = options; - this.diagnostics = []; - - this.typeChecker = this.program.getTypeChecker(); - } - - emit(): string { - const sourceFile = this.program.getSourceFiles().find(sf => sf.fileName === this.fileName); - if (!sourceFile) { - throw new Error(`Source file "${this.fileName}" not found`); - } - - let output: string[] = []; - - const resolvedSymbols = this.getResolvedSymbols(sourceFile); - // Sort all symbols so that the output is more deterministic - resolvedSymbols.sort(symbolCompareFunction); - - for (const symbol of resolvedSymbols) { - if (this.isExportPatternStripped(symbol.name)) { - continue; - } - - const typeDecl = symbol.declarations && symbol.declarations[0]; - const valDecl = symbol.valueDeclaration; - if (!typeDecl && !valDecl) { - this.diagnostics.push({ - type: 'warn', - message: `${sourceFile.fileName}: error: No declaration found for symbol "${symbol.name}"` - }); - continue; - } - typeDecl && this.emitDeclaration(symbol, typeDecl, output); - if (valDecl && typeDecl.kind === ts.SyntaxKind.InterfaceDeclaration) { - // Only generate value declarations in case of interfaces. - valDecl && this.emitDeclaration(symbol, valDecl, output); - } - } - - if (this.diagnostics.length) { - const message = this.diagnostics.map(d => d.message).join('\n'); - console.warn(message); - if (this.diagnostics.some(d => d.type === 'error')) { - throw new Error(message); - } - } - - return output.join(''); - } - - emitDeclaration(symbol: ts.Symbol, decl: ts.Node, output: string[]) { - // The declaration node may not be a complete statement, e.g. for var/const - // symbols. We need to find the complete export statement by traversing - // upwards. - while (!hasModifier(decl, ts.SyntaxKind.ExportKeyword) && decl.parent) { - decl = decl.parent; - } - - if (hasModifier(decl, ts.SyntaxKind.ExportKeyword)) { - // Make an empty line between two exports - if (output.length) { - output.push('\n'); - } - - const jsdocComment = this.processJsDocTags(decl, this.options.exportTags); - if (jsdocComment) { - output.push(jsdocComment + '\n'); - } - - output.push(stripEmptyLines(this.emitNode(decl)) + '\n'); - } else { - // This may happen for symbols re-exported from external modules. - this.diagnostics.push({ - type: 'warn', - message: createErrorMessage(decl, `No export declaration found for symbol "${symbol.name}"`) - }); - } - } - - private isExportPatternStripped(symbolName: string): boolean { - return [].concat(this.options.stripExportPattern).some(p => !!(p && symbolName.match(p))); - } - - private getResolvedSymbols(sourceFile: ts.SourceFile): ts.Symbol[] { - const ms = (sourceFile).symbol; - const rawSymbols = ms ? (this.typeChecker.getExportsOfModule(ms) || []) : []; - return rawSymbols.map(s => { - if (s.flags & ts.SymbolFlags.Alias) { - const resolvedSymbol = this.typeChecker.getAliasedSymbol(s); - - // This will happen, e.g. for symbols re-exported from external modules. - if (!resolvedSymbol.valueDeclaration && !resolvedSymbol.declarations) { - return s; - } - if (resolvedSymbol.name !== s.name) { - if (this.isExportPatternStripped(s.name)) { - return s; - } - throw new Error( - `Symbol "${resolvedSymbol.name}" was aliased as "${s.name}". ` + - `Aliases are not supported.`); - } - - return resolvedSymbol; - } else { - return s; - } - }); - } - - emitNode(node: ts.Node) { - if (hasModifier(node, ts.SyntaxKind.PrivateKeyword)) { - return ''; - } - - const firstQualifier: ts.Identifier|null = getFirstQualifier(node); - - if (firstQualifier) { - let isAllowed = false; - - // Try to resolve the qualifier. - const resolvedSymbol = this.typeChecker.getSymbolAtLocation(firstQualifier); - if (resolvedSymbol && resolvedSymbol.declarations && resolvedSymbol.declarations.length > 0) { - // If the qualifier can be resolved, and it's not a namespaced import, then it should be - // allowed. - isAllowed = - resolvedSymbol.declarations.every(decl => decl.kind !== ts.SyntaxKind.NamespaceImport); - } - - // If it is not allowed otherwise, it's allowed if it's on the list of allowed identifiers. - isAllowed = isAllowed || - !(!this.options.allowModuleIdentifiers || - this.options.allowModuleIdentifiers.indexOf(firstQualifier.text) < 0); - if (!isAllowed) { - this.diagnostics.push({ - type: 'error', - message: createErrorMessage( - firstQualifier, - `Module identifier "${firstQualifier.text}" is not allowed. Remove it ` + - `from source or allow it via --allowModuleIdentifiers.`) - }); - } - } - - let children: ts.Node[] = []; - if (ts.isFunctionDeclaration(node)) { - // Used ts.isFunctionDeclaration instead of node.kind because this is a type guard - const symbol = this.typeChecker.getSymbolAtLocation(node.name); - symbol.declarations.forEach(x => children = children.concat(x.getChildren())); - } else { - children = node.getChildren(); - } - - const sourceText = node.getSourceFile().text; - if (children.length) { - // Sort declarations under a class or an interface - if (node.kind === ts.SyntaxKind.SyntaxList) { - switch (node.parent && node.parent.kind) { - case ts.SyntaxKind.ClassDeclaration: - case ts.SyntaxKind.InterfaceDeclaration: { - // There can be multiple SyntaxLists under a class or an interface, - // since SyntaxList is just an arbitrary data structure generated - // by Node#getChildren(). We need to check that we are sorting the - // right list. - if (children.every(node => node.kind in memberDeclarationOrder)) { - children = children.slice(); - children.sort((a: ts.NamedDeclaration, b: ts.NamedDeclaration) => { - // Static after normal - return compareFunction( - hasModifier(a, ts.SyntaxKind.StaticKeyword), - hasModifier(b, ts.SyntaxKind.StaticKeyword)) || - // Our predefined order - compareFunction( - memberDeclarationOrder[a.kind], memberDeclarationOrder[b.kind]) || - // Alphebetical order - // We need safe dereferencing due to edge cases, e.g. having two call signatures - compareFunction((a.name || a).getText(), (b.name || b).getText()); - }); - } - break; - } - } - } - - let output: string = children.filter(x => x.kind !== ts.SyntaxKind.JSDocComment) - .map(n => this.emitNode(n)) - .join(''); - - // Print stability annotation for fields and parmeters - if (ts.isParameter(node) || node.kind in memberDeclarationOrder) { - const tagOptions = ts.isParameter(node) ? this.options.paramTags : this.options.memberTags; - const jsdocComment = this.processJsDocTags(node, tagOptions); - if (jsdocComment) { - // Add the annotation after the leading whitespace - output = output.replace(/^(\r?\n\s*)/, `$1${jsdocComment} `); - } - } - - return output; - } else { - const ranges = ts.getLeadingCommentRanges(sourceText, node.pos); - let tail = node.pos; - for (const range of ranges || []) { - if (range.end > tail) { - tail = range.end; - } - } - return sourceText.substring(tail, node.end); - } - } - - private processJsDocTags(node: ts.Node, tagOptions: JsDocTagOptions) { - const jsDocTags = getJsDocTags(node); - const requireAtLeastOne = tagOptions.requireAtLeastOne; - const isMissingAnyRequiredTag = requireAtLeastOne != null && requireAtLeastOne.length > 0 && - jsDocTags.every(tag => requireAtLeastOne.indexOf(tag) === -1); - if (isMissingAnyRequiredTag) { - this.diagnostics.push({ - type: 'error', - message: createErrorMessage( - node, - 'Required jsdoc tags - One of the tags: ' + - requireAtLeastOne.map(tag => `"@${tag}"`).join(', ') + - ` - must exist on ${getName(node)}.`) - }); - } - const bannedTagsFound = - tagOptions.banned.filter(bannedTag => jsDocTags.some(tag => tag === bannedTag)); - if (bannedTagsFound.length) { - this.diagnostics.push({ - type: 'error', - message: createErrorMessage( - node, - 'Banned jsdoc tags - ' + bannedTagsFound.map(tag => `"@${tag}"`).join(', ') + - ` - were found on ${getName(node)}.`) - }); - } - const tagsToCopy = - jsDocTags.filter(tag => tagOptions.toCopy.some(tagToCopy => tag === tagToCopy)); - - if (tagsToCopy.length === 1) { - return `/** @${tagsToCopy[0]} */`; - } else if (tagsToCopy.length > 1) { - return '/**\n' + tagsToCopy.map(tag => ` * @${tag}`).join('\n') + ' */\n'; - } else { - return ''; - } - } -} - -const tagRegex = /@(\w+)/g; - -function getJsDocTags(node: ts.Node): string[] { - const sourceText = node.getSourceFile().text; - const trivia = sourceText.substr(node.pos, node.getLeadingTriviaWidth()); - // We use a hash so that we don't collect duplicate jsdoc tags - // (e.g. if a property has a getter and setter with the same tag). - const jsdocTags: {[key: string]: boolean} = {}; - let match: RegExpExecArray; - while (match = tagRegex.exec(trivia)) { - jsdocTags[match[1]] = true; - } - return Object.keys(jsdocTags); -} - -function symbolCompareFunction(a: ts.Symbol, b: ts.Symbol) { - return a.name.localeCompare(b.name); -} - -function compareFunction(a: T, b: T) { - return a === b ? 0 : a > b ? 1 : -1; -} - -const memberDeclarationOrder: {[key: number]: number} = { - [ts.SyntaxKind.PropertySignature]: 0, - [ts.SyntaxKind.PropertyDeclaration]: 0, - [ts.SyntaxKind.GetAccessor]: 0, - [ts.SyntaxKind.SetAccessor]: 0, - [ts.SyntaxKind.CallSignature]: 1, - [ts.SyntaxKind.Constructor]: 2, - [ts.SyntaxKind.ConstructSignature]: 2, - [ts.SyntaxKind.IndexSignature]: 3, - [ts.SyntaxKind.MethodSignature]: 4, - [ts.SyntaxKind.MethodDeclaration]: 4 -}; - -function stripEmptyLines(text: string): string { - return text.split(/\r?\n/).filter(x => !!x.length).join('\n'); -} - -/** - * Returns the first qualifier if the input node is a dotted expression. - */ -function getFirstQualifier(node: ts.Node): ts.Identifier|null { - switch (node.kind) { - case ts.SyntaxKind.PropertyAccessExpression: { - // For expression position - let lhs = node; - do { - lhs = (lhs).expression; - } while (lhs && lhs.kind !== ts.SyntaxKind.Identifier); - - return lhs; - } - case ts.SyntaxKind.TypeReference: { - // For type position - let lhs: ts.Node = (node).typeName; - do { - lhs = (lhs).left; - } while (lhs && lhs.kind !== ts.SyntaxKind.Identifier); - - return lhs; - } - default: - return null; - } -} - -function createErrorMessage(node: ts.Node, message: string): string { - const sourceFile = node.getSourceFile(); - let position; - if (sourceFile) { - const {line, character} = sourceFile.getLineAndCharacterOfPosition(node.getStart()); - position = `${sourceFile.fileName}(${line + 1},${character + 1})`; - } else { - position = ''; - } - - return `${position}: error: ${message}`; -} - -function hasModifier(node: ts.Node, modifierKind: ts.SyntaxKind): boolean { - return !!node.modifiers && node.modifiers.some(x => x.kind === modifierKind); -} - -function applyDefaultTagOptions(tagOptions: JsDocTagOptions|undefined): JsDocTagOptions { - return {requireAtLeastOne: [], banned: [], toCopy: [], ...tagOptions}; -} - -function getName(node: any) { - return '`' + (node.name && node.name.text ? node.name.text : node.getText()) + '`'; -} diff --git a/tools/ts-api-guardian/package.json b/tools/ts-api-guardian/package.json deleted file mode 100644 index 0a4d56e73d8d..000000000000 --- a/tools/ts-api-guardian/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "ts-api-guardian", - "version": "0.6.0", - "description": "Guards the API of TypeScript libraries!", - "main": "lib/main.js", - "typings": "lib/main.d.ts", - "bin": { - "ts-api-guardian": "./bin/ts-api-guardian" - }, - "directories": { - "test": "test" - }, - "peerDependencies": { - "typescript": "~3.9.2" - }, - "dependencies": { - "chalk": "^4.0.0", - "diff": "^5.0.0", - "minimist": "^1.2.0" - }, - "devDependencies": { - "@types/diff": "^5.0.0", - "@types/jasmine": "^3.0.0", - "@types/minimist": "^1.2.0", - "@types/node": "^10.9.4", - "jasmine": "^3.1.0", - "source-map-support": "^0.5.9", - "typescript": "4.3.4" - }, - "keywords": [ - "typescript" - ], - "contributors": [ - "Alan Agius (https://github.com/alan-agius4/)", - "Alex Eagle (https://angular.io/)", - "Martin Probst (https://angular.io/)", - "Victor Savkin (https://victorsavkin.com)", - "Igor Minar (https://angular.io/)" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/angular/angular/issues" - }, - "homepage": "https://github.com/angular/angular/tools/ts-api-guardian", - "repository": { - "type": "git", - "url": "https://github.com/angular/angular.git", - "directory": "tools/ts-api-guardian" - }, - "publishConfig": { - "registry": "https://wombat-dressing-room.appspot.com" - } -} diff --git a/tools/ts-api-guardian/test/bootstrap.ts b/tools/ts-api-guardian/test/bootstrap.ts deleted file mode 100644 index b67b2fb564a7..000000000000 --- a/tools/ts-api-guardian/test/bootstrap.ts +++ /dev/null @@ -1,20 +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 - */ - -const path = require('path'); -const {runfiles} = require('@bazel/runfiles'); - -// Change directories to the path of the ts-api-guardian source tree. We need to resolve an actual -// path of a tree because we want to determine the path to the directory that includes all -// test fixture runfiles. On Windows this is usually the original non-sandboxed disk location, -// otherwise this just refers to the runfile directory with all the proper symlinked files. -// NB: we resolve `test/fixtures/empty.ts` and then step up 3 folders so to ensure we resolve to the -// root of the source tree and not the output tree on Windows where there are no runfiles. -// TODO: remove the whole bootstrap file once the tests are Bazel and Windows compatible. -process.chdir(path.resolve( - runfiles.resolve('angular/tools/ts-api-guardian/test/fixtures/empty.ts'), '../../..')); diff --git a/tools/ts-api-guardian/test/cli_e2e_test.ts b/tools/ts-api-guardian/test/cli_e2e_test.ts deleted file mode 100644 index 3b5ad0b91b0e..000000000000 --- a/tools/ts-api-guardian/test/cli_e2e_test.ts +++ /dev/null @@ -1,148 +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 * as child_process from 'child_process'; -import * as fs from 'fs'; -import * as path from 'path'; -import {assertFileEqual} from './helpers'; - -const BINARY_PATH = require.resolve('../ts-api-guardian/bin/ts-api-guardian'); - -describe('cli: e2e test', () => { - const outDir = path.join(process.env['TEST_TMPDIR'], 'tmp'); - - beforeEach(() => { - if (!fs.existsSync(outDir)) { - fs.mkdirSync(outDir); - } - }); - - afterEach(() => { - fs.rmdirSync(outDir, {recursive: true}); - }); - - it('should print usage without any argument', () => { - const {stderr} = execute([]); - expect(stderr).toMatch(/Usage/); - }); - - it('should show help message with --help', () => { - const {stdout} = execute(['--help']); - expect(stdout).toMatch(/Usage/); - }); - - it('should generate golden file with --out', () => { - const simpleFile = path.join(outDir, 'simple.d.ts'); - const {status, stderr} = execute(['--out', simpleFile, 'test/fixtures/simple.d.ts']); - expect(status).toBe(0, stderr); - assertFileEqual(simpleFile, 'test/fixtures/simple_expected.d.ts'); - }); - - it('should verify golden file with --verify and exit cleanly on no difference', () => { - const {stdout, status} = - execute(['--verify', 'test/fixtures/simple_expected.d.ts', 'test/fixtures/simple.d.ts']); - expect(stdout).toBe(''); - expect(status).toBe(0); - }); - - it('should verify golden file with --verify and exit with error on difference', () => { - const {stdout, status} = execute( - ['--verify', 'test/fixtures/verify_expected.d.ts', 'test/fixtures/verify_entrypoint.d.ts']); - expect(stdout).toBe(fs.readFileSync('test/fixtures/verify.patch').toString()); - expect(status).toBe(1); - }); - - it('should generate multiple golden files with --outDir and --rootDir', () => { - const {status} = execute([ - '--outDir', outDir, '--rootDir', 'test/fixtures', 'test/fixtures/simple.d.ts', - 'test/fixtures/sorting.d.ts' - ]); - expect(status).toBe(0); - assertFileEqual(path.join(outDir, 'simple.d.ts'), 'test/fixtures/simple_expected.d.ts'); - assertFileEqual(path.join(outDir, 'sorting.d.ts'), 'test/fixtures/sorting_expected.d.ts'); - }); - - it('should verify multiple golden files with --verifyDir and --rootDir', () => { - copyFile('test/fixtures/simple_expected.d.ts', path.join(outDir, 'simple.d.ts')); - copyFile('test/fixtures/sorting_expected.d.ts', path.join(outDir, 'sorting.d.ts')); - const {stdout, status} = execute([ - '--verifyDir', outDir, '--rootDir', 'test/fixtures', 'test/fixtures/simple.d.ts', - 'test/fixtures/sorting.d.ts' - ]); - expect(stdout).toBe(''); - expect(status).toBe(0); - }); - - it('should generate respecting --stripExportPattern', () => { - const {status} = execute([ - '--out', path.join(outDir, 'underscored.d.ts'), '--stripExportPattern', '^__.*', - 'test/fixtures/underscored.d.ts' - ]); - - expect(status).toBe(0); - assertFileEqual( - path.join(outDir, 'underscored.d.ts'), 'test/fixtures/underscored_expected.d.ts'); - }); - - it('should not throw for aliased stripped exports', () => { - const {status} = execute([ - '--out', path.join(outDir, 'stripped_alias.d.ts'), '--stripExportPattern', '^__.*', - 'test/fixtures/stripped_alias.d.ts' - ]); - expect(status).toBe(0); - assertFileEqual( - path.join(outDir, 'stripped_alias.d.ts'), 'test/fixtures/stripped_alias_expected.d.ts'); - }); - - it('should verify respecting --stripExportPattern', () => { - const {stdout, status} = execute([ - '--verify', 'test/fixtures/underscored_expected.d.ts', 'test/fixtures/underscored.d.ts', - '--stripExportPattern', '^__.*' - ]); - expect(stdout).toBe(''); - expect(status).toBe(0); - }); - - it('should respect --allowModuleIdentifiers', () => { - const {stdout, status} = execute([ - '--verify', 'test/fixtures/module_identifier_expected.d.ts', '--allowModuleIdentifiers', - 'foo', 'test/fixtures/module_identifier.d.ts' - ]); - expect(stdout).toBe(''); - expect(status).toBe(0); - }); -}); - -function copyFile(sourceFile: string, targetFile: string) { - fs.writeFileSync(targetFile, fs.readFileSync(sourceFile)); -} - -function execute(args: string[]): {stdout: string, stderr: string, status: number} { - // We need to determine the directory that includes the `ts-api-guardian` npm_package that - // will be used to spawn the CLI binary. This is a workaround because technically we shouldn't - // spawn a child process that doesn't have the custom NodeJS module resolution for Bazel. - const nodePath = [ - path.join(require.resolve('npm/node_modules/chalk/package.json'), '../../'), - path.join(require.resolve('../lib/cli.js'), '../../'), - ].join(process.platform === 'win32' ? ';' : ':'); - - const output = child_process.spawnSync(process.execPath, [BINARY_PATH, ...args], { - env: { - 'NODE_PATH': nodePath, - } - }); - - expect(output.error).toBeFalsy(`Child process failed or timed out: ${output.error}`); - expect(output.signal).toBeFalsy(`Child process killed by signal ${output.signal}`); - - return { - stdout: output.stdout.toString(), - stderr: output.stderr.toString(), - status: output.status - }; -} diff --git a/tools/ts-api-guardian/test/cli_unit_test.ts b/tools/ts-api-guardian/test/cli_unit_test.ts deleted file mode 100644 index d1eff0f96cad..000000000000 --- a/tools/ts-api-guardian/test/cli_unit_test.ts +++ /dev/null @@ -1,81 +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 {parseArguments} from '../lib/cli'; - -describe('cli: parseArguments', () => { - it('should show usage with error when supplied with no arguments', () => { - const {mode, errors} = parseArguments([]); - expect(mode).toBe('help'); - expect(errors).toEqual(['No input file specified.']); - }); - - it('should show usage without error when supplied with --help', () => { - const {mode, errors} = parseArguments(['--help']); - expect(mode).toBe('help'); - expect(errors).toEqual([]); - }); - - it('should show usage with error when supplied with none of --out/verify[Dir]', () => { - const {mode, errors} = parseArguments(['input.d.ts']); - expect(mode).toBe('help'); - expect(errors).toEqual(['Specify either --out[Dir] or --verify[Dir]']); - }); - - it('should show usage with error when supplied with both of --out/verify[Dir]', () => { - const {mode, errors} = - parseArguments(['--out', 'out.d.ts', '--verifyDir', 'golden.d.ts', 'input.d.ts']); - expect(mode).toBe('help'); - expect(errors).toEqual(['Specify either --out[Dir] or --verify[Dir]']); - }); - - it('should show usage with error when supplied without input file', () => { - const {mode, errors} = parseArguments(['--out', 'output.d.ts']); - expect(mode).toBe('help'); - expect(errors).toEqual(['No input file specified.']); - }); - - it('should show usage with error when supplied without input file', () => { - const {mode, errors} = parseArguments(['--out', 'output.d.ts', 'first.d.ts', 'second.d.ts']); - expect(mode).toBe('help'); - expect(errors).toEqual(['More than one input specified. Use --outDir instead.']); - }); - - it('should use out mode when supplied with --out', () => { - const {argv, mode, errors} = parseArguments(['--out', 'out.d.ts', 'input.d.ts']); - expect(argv['out']).toBe('out.d.ts'); - expect(argv._).toEqual(['input.d.ts']); - expect(mode).toBe('out'); - expect(errors).toEqual([]); - }); - - it('should use verify mode when supplied with --verify', () => { - const {argv, mode, errors} = parseArguments(['--verify', 'out.d.ts', 'input.d.ts']); - expect(argv['verify']).toBe('out.d.ts'); - expect(argv._).toEqual(['input.d.ts']); - expect(mode).toBe('verify'); - expect(errors).toEqual([]); - }); - - it('should show usage with error when supplied with --autoDiscoverEntrypoints without --baseDir', - () => { - const {mode, errors} = - parseArguments(['--autoDiscoverEntrypoints', '--outDir', 'something']); - expect(mode).toBe('help'); - expect(errors).toEqual(['--rootDir must be provided with --autoDiscoverEntrypoints.']); - }); - - it('should show usage with error when supplied with --autoDiscoverEntrypoints without --outDir/verifyDir', - () => { - const {mode, errors} = - parseArguments(['--autoDiscoverEntrypoints', '--rootDir', 'something']); - expect(mode).toBe('help'); - expect(errors).toEqual( - ['--outDir or --verifyDir must be used with --autoDiscoverEntrypoints.']); - }); -}); diff --git a/tools/ts-api-guardian/test/fixtures/classes_and_interfaces.d.ts b/tools/ts-api-guardian/test/fixtures/classes_and_interfaces.d.ts deleted file mode 100644 index 485e4ef31a9b..000000000000 --- a/tools/ts-api-guardian/test/fixtures/classes_and_interfaces.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare class A { - field: string; - method(a: string): number; -} -export interface B { - field: A; -} -export declare class C { - private privateProp; - propWithDefault: number; - protected protectedProp: number; - someProp: string; - constructor(someProp: string, propWithDefault: number, privateProp: any, protectedProp: number); -} diff --git a/tools/ts-api-guardian/test/fixtures/classes_and_interfaces_expected.d.ts b/tools/ts-api-guardian/test/fixtures/classes_and_interfaces_expected.d.ts deleted file mode 100644 index 6c37af1a01d2..000000000000 --- a/tools/ts-api-guardian/test/fixtures/classes_and_interfaces_expected.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export declare class A { - field: string; - method(a: string): number; -} - -export interface B { - field: A; -} - -export declare class C { - propWithDefault: number; - protected protectedProp: number; - someProp: string; - constructor(someProp: string, propWithDefault: number, privateProp: any, protectedProp: number); -} diff --git a/tools/ts-api-guardian/test/fixtures/empty.d.ts b/tools/ts-api-guardian/test/fixtures/empty.d.ts deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tools/ts-api-guardian/test/fixtures/empty_expected.d.ts b/tools/ts-api-guardian/test/fixtures/empty_expected.d.ts deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tools/ts-api-guardian/test/fixtures/enum_as_type.d.ts b/tools/ts-api-guardian/test/fixtures/enum_as_type.d.ts deleted file mode 100644 index db4a3c65e777..000000000000 --- a/tools/ts-api-guardian/test/fixtures/enum_as_type.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare enum Foo { - Alpha = 0, - Beta = 1, -} - -export interface Bar { - field: Foo.Alpha, -} \ No newline at end of file diff --git a/tools/ts-api-guardian/test/fixtures/enum_as_type_expected.d.ts b/tools/ts-api-guardian/test/fixtures/enum_as_type_expected.d.ts deleted file mode 100644 index 63e8c6ba32ef..000000000000 --- a/tools/ts-api-guardian/test/fixtures/enum_as_type_expected.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface Bar { - field: Foo.Alpha, -} - -export declare enum Foo { - Alpha = 0, - Beta = 1, -} diff --git a/tools/ts-api-guardian/test/fixtures/exports_type_and_value.d.ts b/tools/ts-api-guardian/test/fixtures/exports_type_and_value.d.ts deleted file mode 100644 index 4e161fe44c59..000000000000 --- a/tools/ts-api-guardian/test/fixtures/exports_type_and_value.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface TypeOnly { field: string; } -export interface TypeAndValue { field: string; } - -export const TypeAndValue: Function; \ No newline at end of file diff --git a/tools/ts-api-guardian/test/fixtures/exports_type_and_value_expected.d.ts b/tools/ts-api-guardian/test/fixtures/exports_type_and_value_expected.d.ts deleted file mode 100644 index 63ff60881369..000000000000 --- a/tools/ts-api-guardian/test/fixtures/exports_type_and_value_expected.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface TypeAndValue { field: string; } - -export const TypeAndValue: Function; - -export interface TypeOnly { field: string; } diff --git a/tools/ts-api-guardian/test/fixtures/keyof.d.ts b/tools/ts-api-guardian/test/fixtures/keyof.d.ts deleted file mode 100644 index c2b6c1749cbf..000000000000 --- a/tools/ts-api-guardian/test/fixtures/keyof.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare type SimpleChanges = { - [P in keyof T]?: any; -}; \ No newline at end of file diff --git a/tools/ts-api-guardian/test/fixtures/keyof_expected.d.ts b/tools/ts-api-guardian/test/fixtures/keyof_expected.d.ts deleted file mode 100644 index b04470236813..000000000000 --- a/tools/ts-api-guardian/test/fixtures/keyof_expected.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare type SimpleChanges = { - [P in keyof T]?: any; -}; diff --git a/tools/ts-api-guardian/test/fixtures/module_identifier.d.ts b/tools/ts-api-guardian/test/fixtures/module_identifier.d.ts deleted file mode 100644 index f8af6eedf4fd..000000000000 --- a/tools/ts-api-guardian/test/fixtures/module_identifier.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as foo from './somewhere'; - -/** @publicApi */ -export declare class A extends foo.Bar { -} diff --git a/tools/ts-api-guardian/test/fixtures/module_identifier_expected.d.ts b/tools/ts-api-guardian/test/fixtures/module_identifier_expected.d.ts deleted file mode 100644 index 174b833508fe..000000000000 --- a/tools/ts-api-guardian/test/fixtures/module_identifier_expected.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare class A extends foo.Bar { -} diff --git a/tools/ts-api-guardian/test/fixtures/reexported.d.ts b/tools/ts-api-guardian/test/fixtures/reexported.d.ts deleted file mode 100644 index b583f44e4f09..000000000000 --- a/tools/ts-api-guardian/test/fixtures/reexported.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { A, B } from './simple'; diff --git a/tools/ts-api-guardian/test/fixtures/reexported_aliased.d.ts b/tools/ts-api-guardian/test/fixtures/reexported_aliased.d.ts deleted file mode 100644 index 058677bf1b21..000000000000 --- a/tools/ts-api-guardian/test/fixtures/reexported_aliased.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { A as Apple } from './classes_and_interfaces'; diff --git a/tools/ts-api-guardian/test/fixtures/reexported_classes.d.ts b/tools/ts-api-guardian/test/fixtures/reexported_classes.d.ts deleted file mode 100644 index 01a7a03a1051..000000000000 --- a/tools/ts-api-guardian/test/fixtures/reexported_classes.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { A } from './classes_and_interfaces'; diff --git a/tools/ts-api-guardian/test/fixtures/reexported_classes_expected.d.ts b/tools/ts-api-guardian/test/fixtures/reexported_classes_expected.d.ts deleted file mode 100644 index b8c57509245c..000000000000 --- a/tools/ts-api-guardian/test/fixtures/reexported_classes_expected.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class A { - field: string; - method(a: string): number; -} diff --git a/tools/ts-api-guardian/test/fixtures/reexported_expected.d.ts b/tools/ts-api-guardian/test/fixtures/reexported_expected.d.ts deleted file mode 100644 index 7020ff3c3f79..000000000000 --- a/tools/ts-api-guardian/test/fixtures/reexported_expected.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const A: string; - -export declare var B: string; diff --git a/tools/ts-api-guardian/test/fixtures/reexported_extern.d.ts b/tools/ts-api-guardian/test/fixtures/reexported_extern.d.ts deleted file mode 100644 index 0c0d859899ae..000000000000 --- a/tools/ts-api-guardian/test/fixtures/reexported_extern.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * We want to ensure that external modules are not resolved. Typescript happens - * to be conveniently available in our environment. - */ -export { CompilerHost } from 'typescript'; diff --git a/tools/ts-api-guardian/test/fixtures/reexported_extern_expected.d.ts b/tools/ts-api-guardian/test/fixtures/reexported_extern_expected.d.ts deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tools/ts-api-guardian/test/fixtures/reexported_star.d.ts b/tools/ts-api-guardian/test/fixtures/reexported_star.d.ts deleted file mode 100644 index 882a36dbe8c1..000000000000 --- a/tools/ts-api-guardian/test/fixtures/reexported_star.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './simple'; diff --git a/tools/ts-api-guardian/test/fixtures/reexported_star_expected.d.ts b/tools/ts-api-guardian/test/fixtures/reexported_star_expected.d.ts deleted file mode 100644 index 7020ff3c3f79..000000000000 --- a/tools/ts-api-guardian/test/fixtures/reexported_star_expected.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const A: string; - -export declare var B: string; diff --git a/tools/ts-api-guardian/test/fixtures/simple.d.ts b/tools/ts-api-guardian/test/fixtures/simple.d.ts deleted file mode 100644 index b3c07b7e77b0..000000000000 --- a/tools/ts-api-guardian/test/fixtures/simple.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** @publicApi */ -export declare const A: string; -/** @publicApi */ -export declare var B: string; diff --git a/tools/ts-api-guardian/test/fixtures/simple_expected.d.ts b/tools/ts-api-guardian/test/fixtures/simple_expected.d.ts deleted file mode 100644 index 7020ff3c3f79..000000000000 --- a/tools/ts-api-guardian/test/fixtures/simple_expected.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const A: string; - -export declare var B: string; diff --git a/tools/ts-api-guardian/test/fixtures/sorting.d.ts b/tools/ts-api-guardian/test/fixtures/sorting.d.ts deleted file mode 100644 index 59daef5b7b9d..000000000000 --- a/tools/ts-api-guardian/test/fixtures/sorting.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** @publicApi */ -export declare type E = string; -/** @publicApi */ -export interface D { - e: number; -} -/** @publicApi */ -export declare var e: C; -/** @publicApi */ -export declare class C { - e: number; - d: string; -} -/** @publicApi */ -export declare function b(): boolean; -/** @publicApi */ -export declare const a: string; diff --git a/tools/ts-api-guardian/test/fixtures/sorting_expected.d.ts b/tools/ts-api-guardian/test/fixtures/sorting_expected.d.ts deleted file mode 100644 index d3921f8d9110..000000000000 --- a/tools/ts-api-guardian/test/fixtures/sorting_expected.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare const a: string; - -export declare function b(): boolean; - -export declare class C { - d: string; - e: number; -} - -export interface D { - e: number; -} - -export declare var e: C; - -export declare type E = string; diff --git a/tools/ts-api-guardian/test/fixtures/stripped_alias.d.ts b/tools/ts-api-guardian/test/fixtures/stripped_alias.d.ts deleted file mode 100644 index b3ba8b7a40a5..000000000000 --- a/tools/ts-api-guardian/test/fixtures/stripped_alias.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export {original_symbol as __private_symbol} from './stripped_alias_original'; -/** @publicApi */ -export class B { -} \ No newline at end of file diff --git a/tools/ts-api-guardian/test/fixtures/stripped_alias_expected.d.ts b/tools/ts-api-guardian/test/fixtures/stripped_alias_expected.d.ts deleted file mode 100644 index 94fa3c9c47a3..000000000000 --- a/tools/ts-api-guardian/test/fixtures/stripped_alias_expected.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export class B { -} diff --git a/tools/ts-api-guardian/test/fixtures/stripped_alias_original.d.ts b/tools/ts-api-guardian/test/fixtures/stripped_alias_original.d.ts deleted file mode 100644 index 76536ae8353e..000000000000 --- a/tools/ts-api-guardian/test/fixtures/stripped_alias_original.d.ts +++ /dev/null @@ -1 +0,0 @@ -export let original_symbol: number; \ No newline at end of file diff --git a/tools/ts-api-guardian/test/fixtures/type_literals.d.ts b/tools/ts-api-guardian/test/fixtures/type_literals.d.ts deleted file mode 100644 index 1a2e41b591e1..000000000000 --- a/tools/ts-api-guardian/test/fixtures/type_literals.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class UsesTypeLiterals { - a: number | undefined; - b: number | null; - c: number | true; - d: number | null | undefined; - e: Array; -} \ No newline at end of file diff --git a/tools/ts-api-guardian/test/fixtures/type_literals_expected.d.ts b/tools/ts-api-guardian/test/fixtures/type_literals_expected.d.ts deleted file mode 100644 index ce70fa6fa395..000000000000 --- a/tools/ts-api-guardian/test/fixtures/type_literals_expected.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class UsesTypeLiterals { - a: number | undefined; - b: number | null; - c: number | true; - d: number | null | undefined; - e: Array; -} diff --git a/tools/ts-api-guardian/test/fixtures/underscored.d.ts b/tools/ts-api-guardian/test/fixtures/underscored.d.ts deleted file mode 100644 index 8ff7249036ce..000000000000 --- a/tools/ts-api-guardian/test/fixtures/underscored.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const __a__: string; -/** @publicApi */ -export class B { -} diff --git a/tools/ts-api-guardian/test/fixtures/underscored_expected.d.ts b/tools/ts-api-guardian/test/fixtures/underscored_expected.d.ts deleted file mode 100644 index 94fa3c9c47a3..000000000000 --- a/tools/ts-api-guardian/test/fixtures/underscored_expected.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export class B { -} diff --git a/tools/ts-api-guardian/test/fixtures/verify.patch b/tools/ts-api-guardian/test/fixtures/verify.patch deleted file mode 100644 index bb23ff2ee236..000000000000 --- a/tools/ts-api-guardian/test/fixtures/verify.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- test/fixtures/verify_expected.d.ts Golden file -+++ test/fixtures/verify_expected.d.ts Generated API -@@ -1,5 +1,6 @@ - export interface A { - c: number; -- a(arg: any[]): any; -- b: string; -+ a(arg: any[]): {[name: string]: number}; - } -+ -+export declare const b: boolean; diff --git a/tools/ts-api-guardian/test/fixtures/verify_entrypoint.d.ts b/tools/ts-api-guardian/test/fixtures/verify_entrypoint.d.ts deleted file mode 100644 index 6c5d1c5cffe1..000000000000 --- a/tools/ts-api-guardian/test/fixtures/verify_entrypoint.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** @publicApi */ -export interface A { - c: number; - a(arg: any[]): {[name: string]: number}; -} -export { b } from './verify_submodule'; diff --git a/tools/ts-api-guardian/test/fixtures/verify_expected.d.ts b/tools/ts-api-guardian/test/fixtures/verify_expected.d.ts deleted file mode 100644 index c7d5188ec4af..000000000000 --- a/tools/ts-api-guardian/test/fixtures/verify_expected.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface A { - c: number; - a(arg: any[]): any; - b: string; -} diff --git a/tools/ts-api-guardian/test/fixtures/verify_submodule.d.ts b/tools/ts-api-guardian/test/fixtures/verify_submodule.d.ts deleted file mode 100644 index ae7a488d4bdc..000000000000 --- a/tools/ts-api-guardian/test/fixtures/verify_submodule.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/** @publicApi */ -export declare const b: boolean; diff --git a/tools/ts-api-guardian/test/helpers.ts b/tools/ts-api-guardian/test/helpers.ts deleted file mode 100644 index 5079a45045da..000000000000 --- a/tools/ts-api-guardian/test/helpers.ts +++ /dev/null @@ -1,13 +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 {readFileSync} from 'fs'; - -export function assertFileEqual(actualFile: string, expectedFile: string) { - expect(readFileSync(actualFile).toString()).toBe(readFileSync(expectedFile).toString()); -} diff --git a/tools/ts-api-guardian/test/integration_test.ts b/tools/ts-api-guardian/test/integration_test.ts deleted file mode 100644 index e46881059b08..000000000000 --- a/tools/ts-api-guardian/test/integration_test.ts +++ /dev/null @@ -1,151 +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 * as fs from 'fs'; -import * as path from 'path'; - -import * as main from '../lib/main'; - -import {assertFileEqual} from './helpers'; - -describe('integration test: public api', () => { - let _warn: any = null; - let warnings: string[] = []; - beforeEach(() => { - _warn = console.warn; - console.warn = (...args: string[]) => warnings.push(args.join(' ')); - }); - - afterEach(() => { - console.warn = _warn; - warnings = []; - _warn = null; - }); - - it('should handle empty files', () => { - check('test/fixtures/empty.d.ts', 'test/fixtures/empty_expected.d.ts'); - }); - - it('should include symbols', () => { - check('test/fixtures/simple.d.ts', 'test/fixtures/simple_expected.d.ts'); - }); - - it('should include symbols reexported explicitly', () => { - check('test/fixtures/reexported.d.ts', 'test/fixtures/reexported_expected.d.ts'); - }); - - it('should include symbols reexported with *', () => { - check('test/fixtures/reexported_star.d.ts', 'test/fixtures/reexported_star_expected.d.ts'); - }); - - it('should include members of classes and interfaces', () => { - check( - 'test/fixtures/classes_and_interfaces.d.ts', - 'test/fixtures/classes_and_interfaces_expected.d.ts'); - }); - - it('should include value and type', () => { - check( - 'test/fixtures/exports_type_and_value.d.ts', - 'test/fixtures/exports_type_and_value_expected.d.ts'); - }); - - it('should include members reexported classes', () => { - check( - 'test/fixtures/reexported_classes.d.ts', 'test/fixtures/reexported_classes_expected.d.ts'); - }); - - it('should remove reexported external symbols', () => { - check('test/fixtures/reexported_extern.d.ts', 'test/fixtures/reexported_extern_expected.d.ts'); - expect(warnings).toEqual([ - 'test/fixtures/reexported_extern.d.ts(5,1): error: No export declaration found for symbol "CompilerHost"' - ]); - }); - - it('should support type literals', () => { - check('test/fixtures/type_literals.d.ts', 'test/fixtures/type_literals_expected.d.ts'); - }); - - it('should allow enums as types', () => { - check('test/fixtures/enum_as_type.d.ts', 'test/fixtures/enum_as_type_expected.d.ts'); - }); - - it('should throw on passing a .ts file as an input', () => { - expect(() => main.publicApi('test/fixtures/empty.ts')) - .toThrowError('Source file "test/fixtures/empty.ts" is not a declaration file'); - }); - - it('should respect serialization options', () => { - check( - 'test/fixtures/underscored.d.ts', 'test/fixtures/underscored_expected.d.ts', - {stripExportPattern: /^__.*/}); - }); -}); - -describe('integration test: generateGoldenFile', () => { - const outDir = path.join(process.env['TEST_TMPDIR'], 'tmp'); - const outFile = path.join(outDir, 'out.d.ts'); - const deepOutFile = path.join(outDir, 'a/b/c/out.d.ts'); - - beforeEach(() => { - if (!fs.existsSync(outDir)) { - fs.mkdirSync(outDir); - } - }); - - afterEach(() => { - fs.rmdirSync(outDir, {recursive: true}); - }); - - - it('should generate a golden file', () => { - main.generateGoldenFile('test/fixtures/reexported_classes.d.ts', outFile); - assertFileEqual(outFile, 'test/fixtures/reexported_classes_expected.d.ts'); - }); - - it('should generate a golden file with any ancestor directory created', () => { - main.generateGoldenFile('test/fixtures/reexported_classes.d.ts', deepOutFile); - assertFileEqual(deepOutFile, 'test/fixtures/reexported_classes_expected.d.ts'); - }); - - it('should respect serialization options', () => { - main.generateGoldenFile( - 'test/fixtures/underscored.d.ts', outFile, {stripExportPattern: /^__.*/}); - assertFileEqual(outFile, 'test/fixtures/underscored_expected.d.ts'); - }); - - it('should generate a golden file with keyof', () => { - main.generateGoldenFile('test/fixtures/keyof.d.ts', outFile); - assertFileEqual(outFile, 'test/fixtures/keyof_expected.d.ts'); - }); -}); - -describe('integration test: verifyAgainstGoldenFile', () => { - it('should check an entrypoint against a golden file on equal', () => { - const diff = main.verifyAgainstGoldenFile( - 'test/fixtures/reexported_classes.d.ts', 'test/fixtures/reexported_classes_expected.d.ts'); - expect(diff).toBe(''); - }); - - it('should check an entrypoint against a golden file with proper diff message', () => { - const diff = main.verifyAgainstGoldenFile( - 'test/fixtures/verify_entrypoint.d.ts', 'test/fixtures/verify_expected.d.ts'); - expect(diff).toBe(fs.readFileSync('test/fixtures/verify.patch').toString()); - }); - - it('should respect serialization options', () => { - const diff = main.verifyAgainstGoldenFile( - 'test/fixtures/underscored.d.ts', 'test/fixtures/underscored_expected.d.ts', - {stripExportPattern: /^__.*/}); - expect(diff).toBe(''); - }); -}); - -function check(sourceFile: string, expectedFile: string, options: main.SerializationOptions = {}) { - expect(main.publicApi(sourceFile, options)).toBe(fs.readFileSync(expectedFile).toString()); -} diff --git a/tools/ts-api-guardian/test/unit_test.ts b/tools/ts-api-guardian/test/unit_test.ts deleted file mode 100644 index c74205b7209f..000000000000 --- a/tools/ts-api-guardian/test/unit_test.ts +++ /dev/null @@ -1,655 +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 * as ts from 'typescript'; - -import {publicApiInternal, SerializationOptions} from '../lib/serializer'; - -const classesAndInterfaces = ` - export declare class A { - field: string; - method(a: string): number; - } - export interface B { - field: A; - } - export declare class C { - someProp: string; - propWithDefault: number; - private privateProp; - protected protectedProp: number; - constructor(someProp: string, propWithDefault: number, privateProp: any, protectedProp: number); - } -`; - -describe('unit test', () => { - let _warn: any = null; - let warnings: string[] = []; - beforeEach(() => { - _warn = console.warn; - console.warn = (...args: string[]) => warnings.push(args.join(' ')); - }); - - afterEach(() => { - console.warn = _warn; - warnings = []; - _warn = null; - }); - - it('should ignore private methods', () => { - const input = ` - export declare class A { - fa(): void; - protected fb(): void; - private fc(); - } - `; - const expected = ` - export declare class A { - fa(): void; - protected fb(): void; - } - `; - check({'file.d.ts': input}, expected); - }); - - it('should support overloads functions', () => { - const input = ` - export declare function group(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationGroupMetadata; - - export declare function registerLocaleData(data: any, extraData?: any): void; - export declare function registerLocaleData(data: any, localeId?: string, extraData?: any): void; - `; - - const expected = ` - export declare function group(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationGroupMetadata; - - export declare function registerLocaleData(data: any, extraData?: any): void; - export declare function registerLocaleData(data: any, localeId?: string, extraData?: any): void; - `; - - check({'file.d.ts': input}, expected); - }); - - it('should ignore private props', () => { - const input = ` - export declare class A { - fa: any; - protected fb: any; - private fc; - } - `; - const expected = ` - export declare class A { - fa: any; - protected fb: any; - } - `; - check({'file.d.ts': input}, expected); - }); - - it('should support imports without capturing imports', () => { - const input = ` - import {A} from './classes_and_interfaces'; - export declare class C { - field: A; - } - `; - const expected = ` - export declare class C { - field: A; - } - `; - check({'classes_and_interfaces.d.ts': classesAndInterfaces, 'file.d.ts': input}, expected); - }); - - it('should throw on aliased reexports', () => { - const input = ` - export { A as Apple } from './classes_and_interfaces'; - `; - checkThrows( - {'classes_and_interfaces.d.ts': classesAndInterfaces, 'file.d.ts': input}, - 'Symbol "A" was aliased as "Apple". Aliases are not supported.'); - }); - - it('should remove reexported external symbols', () => { - const input = ` - export { Foo } from 'some-external-module-that-cannot-be-resolved'; - `; - const expected = ` - `; - check({'classes_and_interfaces.d.ts': classesAndInterfaces, 'file.d.ts': input}, expected); - expect(warnings).toEqual( - ['file.d.ts(1,1): error: No export declaration found for symbol "Foo"']); - }); - - it('should sort exports', () => { - const input = ` - export declare type E = string; - export interface D { - e: number; - } - export declare var e: C; - export declare class C { - e: number; - d: string; - } - export declare function b(): boolean; - export declare const a: string; - `; - const expected = ` - export declare const a: string; - - export declare function b(): boolean; - - export declare class C { - d: string; - e: number; - } - - export interface D { - e: number; - } - - export declare var e: C; - - export declare type E = string; - `; - check({'file.d.ts': input}, expected); - }); - - it('should sort class members', () => { - const input = ` - export class A { - f: number; - static foo(): void; - c: string; - static a: boolean; - constructor(); - static bar(): void; - } - `; - const expected = ` - export class A { - c: string; - f: number; - constructor(); - static a: boolean; - static bar(): void; - static foo(): void; - } - `; - check({'file.d.ts': input}, expected); - }); - - it('should sort interface members', () => { - const input = ` - export interface A { - (): void; - [key: string]: any; - c(): void; - a: number; - new (): Object; - } - `; - const expected = ` - export interface A { - a: number; - (): void; - new (): Object; - [key: string]: any; - c(): void; - } - `; - check({'file.d.ts': input}, expected); - }); - - it('should sort class members including readonly', () => { - const input = ` - export declare class DebugNode { - private _debugContext; - nativeNode: any; - listeners: any[]; - parent: any | null; - constructor(nativeNode: any, parent: DebugNode | null, _debugContext: any); - readonly injector: any; - readonly componentInstance: any; - readonly context: any; - readonly references: { - [key: string]: any; - }; - readonly providerTokens: any[]; - } - `; - const expected = ` - export declare class DebugNode { - readonly componentInstance: any; - readonly context: any; - readonly injector: any; - listeners: any[]; - nativeNode: any; - parent: any | null; - readonly providerTokens: any[]; - readonly references: { - [key: string]: any; - }; - constructor(nativeNode: any, parent: DebugNode | null, _debugContext: any); - } - `; - check({'file.d.ts': input}, expected); - }); - - it('should sort two call signatures', () => { - const input = ` - export interface A { - (b: number): void; - (a: number): void; - } - `; - const expected = ` - export interface A { - (a: number): void; - (b: number): void; - } - `; - check({'file.d.ts': input}, expected); - }); - - it('should sort exports including re-exports', () => { - const submodule = ` - export declare var e: C; - export declare class C { - e: number; - d: string; - } - `; - const input = ` - export * from './submodule'; - export declare type E = string; - export interface D { - e: number; - } - export declare function b(): boolean; - export declare const a: string; - `; - const expected = ` - export declare const a: string; - - export declare function b(): boolean; - - export declare class C { - d: string; - e: number; - } - - export interface D { - e: number; - } - - export declare var e: C; - - export declare type E = string; - `; - check({'submodule.d.ts': submodule, 'file.d.ts': input}, expected); - }); - - it('should remove module comments', () => { - const input = ` - /** - * An amazing module. - * @module - */ - /** - * Foo function. - */ - export declare function foo(): boolean; - export declare const bar: number; - `; - const expected = ` - export declare const bar: number; - - export declare function foo(): boolean; - `; - check({'file.d.ts': input}, expected); - }); - - it('should remove class and field comments', () => { - const input = ` - /** - * Does something really cool. - */ - export declare class A { - /** - * A very interesting getter. - */ - b: string; - /** - * A very useful field. - */ - name: string; - } - `; - const expected = ` - export declare class A { - b: string; - name: string; - } - `; - check({'file.d.ts': input}, expected); - }); - - it('should skip symbols matching specified pattern', () => { - const input = ` - export const __a__: string; - export class B { - } - `; - const expected = ` - export class B { - } - `; - check({'file.d.ts': input}, expected, {stripExportPattern: /^__.*/}); - }); - - it('should throw on using module imports in expression position that were not explicitly allowed', - () => { - const input = ` - import * as foo from './foo'; - export declare class A extends foo.A { - } - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(2,32): error: Module identifier "foo" is not allowed. ' + - 'Remove it from source or allow it via --allowModuleIdentifiers.'); - }); - - it('should throw on using module imports in type position that were not explicitly allowed', - () => { - const input = ` - import * as foo from './foo'; - export type A = foo.A; - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(2,17): error: Module identifier "foo" is not allowed. ' + - 'Remove it from source or allow it via --allowModuleIdentifiers.'); - }); - - it('should not throw on using explicitly allowed module imports', () => { - const input = ` - import * as foo from './foo'; - export declare class A extends foo.A { - } - `; - const expected = ` - export declare class A extends foo.A { - } - `; - check({'file.d.ts': input}, expected, {allowModuleIdentifiers: ['foo']}); - }); - - it('should not throw if module imports, that were not explicitly allowed, are not used', () => { - const input = ` - import * as foo from './foo'; - export declare class A { - } - `; - const expected = ` - export declare class A { - } - `; - check({'file.d.ts': input}, expected); - }); - - it('should copy specified jsdoc tags of exports in docstrings', () => { - const input = ` - /** - * @deprecated This is useless now - */ - export declare class A { - } - /** - * @experimental - */ - export declare const b: string; - /** - * @stable - */ - export declare var c: number; - `; - const expected = ` - /** @deprecated */ - export declare class A { - } - - /** @experimental */ - export declare const b: string; - - export declare var c: number; - `; - check({'file.d.ts': input}, expected, {exportTags: {toCopy: ['deprecated', 'experimental']}}); - }); - - it('should copy specified jsdoc tags of fields in docstrings', () => { - const input = ` - /** @otherTag */ - export declare class A { - /** - * @stable - */ - value: number; - /** - * @experimental - * @otherTag - */ - constructor(); - /** - * @deprecated - */ - foo(): void; - } - `; - const expected = ` - export declare class A { - value: number; - /** @experimental */ constructor(); - /** @deprecated */ foo(): void; - } - `; - check({'file.d.ts': input}, expected, {memberTags: {toCopy: ['deprecated', 'experimental']}}); - }); - - it('should copy specified jsdoc tags of parameters in docstrings', () => { - const input = ` - export declare class A { - foo(str: string, /** @deprecated */ value: number): void; - } - `; - const expected = ` - export declare class A { - foo(str: string, /** @deprecated */ value: number): void; - } - `; - check({'file.d.ts': input}, expected, {paramTags: {toCopy: ['deprecated', 'experimental']}}); - }); - - it('should throw on using banned jsdoc tags on exports', () => { - const input = ` - /** - * @stable - */ - export declare class A { - value: number; - } - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(4,1): error: Banned jsdoc tags - "@stable" - were found on `A`.', - {exportTags: {banned: ['stable']}}); - }); - - it('should throw on using banned jsdoc tags on fields', () => { - const input = ` - export declare class A { - /** - * @stable - */ - value: number; - } - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(5,3): error: Banned jsdoc tags - "@stable" - were found on `value`.', - {memberTags: {banned: ['stable']}}); - }); - - it('should throw on using banned jsdoc tags on parameters', () => { - const input = ` - export declare class A { - foo(/** @stable */ param: number): void; - } - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(2,22): error: Banned jsdoc tags - "@stable" - were found on `param`.', - {paramTags: {banned: ['stable']}}); - }); - - it('should throw on missing required jsdoc tags on exports', () => { - const input = ` - /** @experimental */ - export declare class A { - value: number; - } - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(2,1): error: Required jsdoc tags - One of the tags: "@stable" - must exist on `A`.', - {exportTags: {requireAtLeastOne: ['stable']}}); - }); - - it('should throw on missing required jsdoc tags on fields', () => { - const input = ` - /** @experimental */ - export declare class A { - value: number; - } - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(3,3): error: Required jsdoc tags - One of the tags: "@stable" - must exist on `value`.', - {memberTags: {requireAtLeastOne: ['stable']}}); - }); - - it('should throw on missing required jsdoc tags on parameters', () => { - const input = ` - /** @experimental */ - export declare class A { - foo(param: number): void; - } - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(3,7): error: Required jsdoc tags - One of the tags: "@stable" - must exist on `param`.', - {paramTags: {requireAtLeastOne: ['stable']}}); - }); - - it('should require at least one of the requireAtLeastOne tags', () => { - const input = ` - /** @experimental */ - export declare class A { - foo(param: number): void; - } - `; - checkThrows( - {'file.d.ts': input}, - 'file.d.ts(3,7): error: Required jsdoc tags - One of the tags: "@stable", "@foo", "@bar" - must exist on `param`.', - {paramTags: {requireAtLeastOne: ['stable', 'foo', 'bar']}}); - }); - - it('should allow with one of the requireAtLeastOne tags found', () => { - const input = ` - /** - * @foo - * @bar - * @stable - */ - export declare class A { - } - /** - * @foo - */ - export declare const b: string; - /** - * @bar - */ - export declare var c: number; - /** - * @stable - */ - export declare function d(): void; - `; - const expected = ` - export declare class A { - } - - export declare const b: string; - - export declare var c: number; - - export declare function d(): void; - `; - check( - {'file.d.ts': input}, expected, - {exportTags: {requireAtLeastOne: ['stable', 'foo', 'bar']}}); - }); -}); - -function getMockHost(files: {[name: string]: string}): ts.CompilerHost { - return { - getSourceFile: (sourceName, languageVersion) => { - if (!files[sourceName]) return undefined; - return ts.createSourceFile( - sourceName, stripExtraIndentation(files[sourceName]), languageVersion, true); - }, - writeFile: (name, text, writeByteOrderMark) => {}, - fileExists: (filename) => !!files[filename], - readFile: (filename) => stripExtraIndentation(files[filename]), - getDefaultLibFileName: () => 'lib.ts', - useCaseSensitiveFileNames: () => true, - getCanonicalFileName: (filename) => filename, - getCurrentDirectory: () => './', - getNewLine: () => '\n', - getDirectories: () => [] - }; -} - -function check( - files: {[name: string]: string}, expected: string, options: SerializationOptions = {}) { - const actual = publicApiInternal(getMockHost(files), 'file.d.ts', {}, options); - expect(actual.trim()).toBe(stripExtraIndentation(expected).trim()); -} - -function checkThrows( - files: {[name: string]: string}, error: string, options: SerializationOptions = {}) { - expect(() => publicApiInternal(getMockHost(files), 'file.d.ts', {}, options)).toThrowError(error); -} - -function stripExtraIndentation(text: string) { - let lines = text.split('\n'); - // Ignore first and last new line - lines = lines.slice(1, lines.length - 1); - const commonIndent = lines.reduce((min, line) => { - const indent = /^( *)/.exec(line)![1].length; - // Ignore empty line - return line.length ? Math.min(min, indent) : min; - }, text.length); - - return lines.map(line => line.substr(commonIndent)).join('\n') + '\n'; -} diff --git a/tools/tsconfig.json b/tools/tsconfig.json index 086b31659960..3a0358f660ec 100644 --- a/tools/tsconfig.json +++ b/tools/tsconfig.json @@ -26,7 +26,6 @@ "exclude": [ "testing", "node_modules", - "ts-api-guardian", "typings-test", "public_api_guard", "docs" diff --git a/tools/tslint/requireInternalWithUnderscoreRule.ts b/tools/tslint/requireInternalWithUnderscoreRule.ts index 9f73e5f434bc..3ce981bf8cb4 100644 --- a/tools/tslint/requireInternalWithUnderscoreRule.ts +++ b/tools/tslint/requireInternalWithUnderscoreRule.ts @@ -12,7 +12,7 @@ import {AbstractRule} from 'tslint/lib/rules'; import * as ts from 'typescript'; export class Rule extends AbstractRule { - public apply(sourceFile: ts.SourceFile): RuleFailure[] { + override apply(sourceFile: ts.SourceFile): RuleFailure[] { const typedefWalker = new TypedefWalker(sourceFile, this.getOptions()); return this.applyWithWalker(typedefWalker); } @@ -47,6 +47,6 @@ class TypedefWalker extends RuleWalker { } this.addFailure(this.createFailure( node.getStart(), node.getWidth(), - `module-private member ${node.name.getText()} must be annotated @internal`)); + `module-private member ${node.name?.getText()} must be annotated @internal`)); } } diff --git a/tools/tslint/tsNodeLoaderRule.js b/tools/tslint/tsNodeLoaderRule.js new file mode 100644 index 000000000000..091cc3dda842 --- /dev/null +++ b/tools/tslint/tsNodeLoaderRule.js @@ -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 + */ + +const path = require('path'); +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(); + +// Add a noop rule so tslint doesn't complain. +exports.Rule = class Rule extends Lint.Rules.AbstractRule { + apply() {} +}; diff --git a/tsconfig-tslint.json b/tsconfig-tslint.json new file mode 100644 index 000000000000..7c9ad1ac928d --- /dev/null +++ b/tsconfig-tslint.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "allowJs": true + }, + "include": [ + "packages/**/*", + "modules/**/*", + "tools/**/*", + "scripts/**/*" + ] +} diff --git a/tslint.json b/tslint.json index 9c0ccf7fc31a..b89819d1c240 100644 --- a/tslint.json +++ b/tslint.json @@ -1,11 +1,19 @@ { "rulesDirectory": [ - "dist/tools/tslint", + "tools/tslint", + "node_modules/@angular/dev-infra-private/tslint-rules", "node_modules/vrsource-tslint-rules/rules", "node_modules/tslint-eslint-rules/dist/rules", "node_modules/tslint-no-toplevel-property-access/rules" ], "rules": { + // The first rule needs to be `ts-node-loader` which sets up `ts-node` within TSLint so + // that rules written in TypeScript can be loaded without needing to be transpiled. + "ts-node-loader": true, + // Custom rules written in TypeScript. + "require-internal-with-underscore": true, + "no-implicit-override-abstract": true, + "eofline": true, "file-header": [ true, @@ -26,7 +34,6 @@ true, "object" ], - "require-internal-with-underscore": true, "no-toplevel-property-access": [ true, "packages/animations/src/", @@ -57,6 +64,12 @@ ] }, "jsRules": { + // The first rule needs to be `ts-node-loader` which sets up `ts-node` within TSLint so + // that rules written in TypeScript can be loaded without needing to be transpiled. + "ts-node-loader": true, + // Custom rules written in TypeScript. + "require-internal-with-underscore": true, + "eofline": true, "file-header": [ true, @@ -71,7 +84,6 @@ ], "no-duplicate-imports": true, "no-duplicate-variable": true, - "require-internal-with-underscore": true, "semicolon": [ true ], @@ -104,14 +116,11 @@ // Ignore test files "./packages/compiler-cli/test/compliance/test_cases/**/*", "./packages/localize/**/test_files/**/*", - "./tools/ts-api-guardian/test/fixtures/**/*", "./tools/public_api_guard/**/*.d.ts", "./modules/benchmarks_external/**/*", // Ignore zone.js directory // TODO(JiaLiPassion): add zone.js back later - "./packages/zone.js/**/*", - "./dev-infra/ng-dev.js", - "./dev-infra/build-worker.js" + "./packages/zone.js/**/*" ] } } diff --git a/yarn.lock b/yarn.lock index 5d90d39351cc..31ec6f0bf63f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,28 @@ # yarn lockfile v1 +"@actions/core@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.4.0.tgz#cf2e6ee317e314b03886adfeb20e448d50d6e524" + integrity sha512-CGx2ilGq5i7zSLgiiGUtBCxhRRxibJYU6Fim0Q1Wg2aQL2LTnF27zbqZOrxfvFQ55eSBW0L8uVStgtKMpa0Qlg== + +"@actions/github@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@actions/github/-/github-5.0.0.tgz#1754127976c50bd88b2e905f10d204d76d1472f8" + integrity sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ== + dependencies: + "@actions/http-client" "^1.0.11" + "@octokit/core" "^3.4.0" + "@octokit/plugin-paginate-rest" "^2.13.3" + "@octokit/plugin-rest-endpoint-methods" "^5.1.1" + +"@actions/http-client@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.11.tgz#c58b12e9aa8b159ee39e7dd6cbd0e91d905633c0" + integrity sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg== + dependencies: + tunnel "0.0.6" + "@angular-devkit/architect@0.1200.4": version "0.1200.4" resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1200.4.tgz#03b41bf94e39928de0eb35654aa4d2e59ac34418" @@ -102,6 +124,15 @@ typescript "3.2.4" webpack-sources "1.3.0" +"@angular-devkit/build-optimizer@^0.1202.0": + version "0.1202.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1202.1.tgz#96ce0d33d438f724866c1f171ac3886a95422dde" + integrity sha512-eMyPdfudKek4buv5b2lBRKrv8r2P/soPOsLVcyt2pgrA6V1I8UaJKEDmBwxQ//RwwrvMdD/OWfRxxJm7YvD8kQ== + dependencies: + source-map "0.7.3" + tslib "2.3.0" + typescript "4.3.5" + "@angular-devkit/build-webpack@0.1200.4": version "0.1200.4" resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1200.4.tgz#a957d706c7f1c449682a16c16998ccf06e406526" @@ -131,6 +162,14 @@ ora "5.4.0" rxjs "6.6.7" +"@angular/benchpress@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@angular/benchpress/-/benchpress-0.2.1.tgz#f8b58d9acfda0d29959b87dcb8082b1c33735db5" + integrity sha512-ojHCP96ZunHBZpt08USSEdLJsuXnEEdJtfzl+9oTdMXbooKkzSVO7N6bVdjefbGRNAleAuSAo3gVrdPqumLznA== + dependencies: + "@angular/core" "^10.0.0-0 || ^11.0.0" + reflect-metadata "^0.1.13" + "@angular/cli@12.0.4": version "12.0.4" resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-12.0.4.tgz#766d471e7486a9e51297278b3a8afdbc96265ab4" @@ -157,6 +196,82 @@ symbol-observable "4.0.0" uuid "8.3.2" +"@angular/common-12@npm:@angular/common@12.2.2": + version "12.2.2" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-12.2.2.tgz#ae4736432387018ea29d81a3c73b09106e823276" + integrity sha512-cAfPHis8ynpR+qV9ViztCuNBjJ8YRDivvpUXtXecJYYBUPQt9uIiMLeqvBuWmFr+zKD+yAhWywbHEo/4m1JVtQ== + dependencies: + tslib "^2.2.0" + +"@angular/core-12@npm:@angular/core@12.2.2": + version "12.2.2" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-12.2.2.tgz#bf10931a059ee9e95ecbc3171303f2304958a601" + integrity sha512-zNgH1iFB1vCVNk9PZ+GCo0sZXD19Zt3BobgmHkWJ+PVXRPuKpuLBXWsq7d9IXdbFopQQWWfVHo0eDagIicrSFQ== + dependencies: + tslib "^2.2.0" + +"@angular/core@^10.0.0-0 || ^11.0.0": + version "11.2.14" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-11.2.14.tgz#3ebe298c79d5413dc670d56b7f503bd4d788d4a8" + integrity sha512-vpR4XqBGitk1Faph37CSpemwIYTmJ3pdIVNoHKP6jLonpWu+0azkchf0f7oD8/2ivj2F81opcIw0tcsy/D/5Vg== + dependencies: + tslib "^2.0.0" + +"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#e79b0088150f63354090f9c12c2b97f1dd712566": + version "0.0.0" + resolved "https://github.com/angular/dev-infra-private-builds.git#e79b0088150f63354090f9c12c2b97f1dd712566" + dependencies: + "@actions/core" "^1.4.0" + "@actions/github" "^5.0.0" + "@angular-devkit/build-optimizer" "^0.1202.0" + "@angular/benchpress" "0.2.1" + "@bazel/bazelisk" "^1.10.1" + "@bazel/buildifier" "^4.0.1" + "@bazel/esbuild" "4.0.0" + "@bazel/jasmine" "4.0.0" + "@bazel/protractor" "4.0.0" + "@bazel/runfiles" "4.0.0" + "@bazel/typescript" "4.0.0" + "@microsoft/api-extractor" "7.18.7" + "@octokit/auth-app" "^3.6.0" + "@octokit/core" "^3.5.1" + "@octokit/graphql" "^4.8.0" + "@octokit/plugin-paginate-rest" "^2.13.5" + "@octokit/plugin-rest-endpoint-methods" "^5.3.3" + "@octokit/request-error" "^2.1.0" + "@octokit/rest" "^18.7.0" + "@octokit/types" "^6.16.6" + chalk "^4.1.0" + clang-format "^1.4.0" + cli-progress "^3.7.0" + conventional-commits-parser "^3.2.1" + ejs "^3.1.6" + git-raw-commits "^2.0.10" + glob "7.1.7" + husky "^7.0.1" + inquirer "^8.0.0" + jasmine "^3.7.0" + minimatch "^3.0.4" + multimatch "^5.0.0" + nock "^13.0.3" + node-fetch "^2.6.1" + prettier "^2.3.2" + protractor "^7.0.0" + rollup "^2.53.3" + rollup-plugin-commonjs "^10.1.0" + rollup-plugin-node-resolve "^5.2.0" + rollup-plugin-sourcemaps "^0.6.3" + selenium-webdriver "3.5.0" + semver "^7.3.5" + ts-node "^10.0.0" + tslib "^2.3.0" + tslint "^6.1.3" + typed-graphqlify "^3.1.1" + typescript "~4.4.0" + uuid "^8.3.2" + yaml "^1.10.0" + yargs "^17.0.0" + "@apidevtools/json-schema-ref-parser@^9.0.3": version "9.0.9" resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#d720f9256e3609621280584f2b47ae165359268b" @@ -167,10 +282,10 @@ call-me-maybe "^1.0.1" js-yaml "^4.1.0" -"@babel/cli@7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.14.5.tgz#9551b194f02360729de6060785bbdcce52c69f0a" - integrity sha512-poegjhRvXHWO0EAsnYajwYZuqcz7gyfxwfaecUESxDujrqOivf3zrjFbub8IJkrqEaz3fvJWh001EzxBub54fg== +"@babel/cli@7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.14.8.tgz#fac73c0e2328a8af9fd3560c06b096bfa3730933" + integrity sha512-lcy6Lymft9Rpfqmrqdd4oTDdUx9ZwaAhAfywVrHG4771Pa6PPT0danJ1kDHBXYqh4HHSmIdA+nlmfxfxSDPtBg== dependencies: commander "^4.0.1" convert-source-map "^1.1.0" @@ -190,10 +305,10 @@ dependencies: "@babel/highlight" "^7.14.5" -"@babel/compat-data@^7.10.1", "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.5", "@babel/compat-data@^7.14.7": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" - integrity sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw== +"@babel/compat-data@^7.10.1", "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.7", "@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== "@babel/core@7.14.3", "@babel/core@7.8.6", "@babel/core@^7.7.5": version "7.8.6" @@ -242,25 +357,25 @@ "@babel/types" "^7.14.5" "@babel/helper-compilation-targets@^7.10.2", "@babel/helper-compilation-targets@^7.13.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" - integrity sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw== + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818" + integrity sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A== dependencies: - "@babel/compat-data" "^7.14.5" + "@babel/compat-data" "^7.15.0" "@babel/helper-validator-option" "^7.14.5" browserslist "^4.16.6" semver "^6.3.0" "@babel/helper-create-class-features-plugin@^7.14.5": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz#f114469b6c06f8b5c59c6c4e74621f5085362542" - integrity sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg== + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz#c9a137a4d137b2d0e2c649acf536d7ba1a76c0f7" + integrity sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q== dependencies: "@babel/helper-annotate-as-pure" "^7.14.5" "@babel/helper-function-name" "^7.14.5" - "@babel/helper-member-expression-to-functions" "^7.14.5" + "@babel/helper-member-expression-to-functions" "^7.15.0" "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.0" "@babel/helper-split-export-declaration" "^7.14.5" "@babel/helper-create-regexp-features-plugin@^7.14.5": @@ -315,12 +430,12 @@ dependencies: "@babel/types" "^7.14.5" -"@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" - integrity sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA== +"@babel/helper-member-expression-to-functions@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b" + integrity sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.15.0" "@babel/helper-module-imports@^7.10.1", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.13.12", "@babel/helper-module-imports@^7.14.5": version "7.14.5" @@ -329,19 +444,19 @@ dependencies: "@babel/types" "^7.14.5" -"@babel/helper-module-transforms@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz#7de42f10d789b423eb902ebd24031ca77cb1e10e" - integrity sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA== +"@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08" + integrity sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg== dependencies: "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" - "@babel/helper-simple-access" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.0" + "@babel/helper-simple-access" "^7.14.8" "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/helper-validator-identifier" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.9" "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" "@babel/helper-optimise-call-expression@^7.14.5": version "7.14.5" @@ -364,22 +479,22 @@ "@babel/helper-wrap-function" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/helper-replace-supers@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz#0ecc0b03c41cd567b4024ea016134c28414abb94" - integrity sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow== +"@babel/helper-replace-supers@^7.14.5", "@babel/helper-replace-supers@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4" + integrity sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA== dependencies: - "@babel/helper-member-expression-to-functions" "^7.14.5" + "@babel/helper-member-expression-to-functions" "^7.15.0" "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" -"@babel/helper-simple-access@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4" - integrity sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw== +"@babel/helper-simple-access@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924" + integrity sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.14.8" "@babel/helper-skip-transparent-expression-wrappers@^7.14.5": version "7.14.5" @@ -395,10 +510,10 @@ dependencies: "@babel/types" "^7.14.5" -"@babel/helper-validator-identifier@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" - integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== "@babel/helper-validator-option@^7.14.5": version "7.14.5" @@ -416,13 +531,13 @@ "@babel/types" "^7.14.5" "@babel/helpers@^7.8.4": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.6.tgz#5b58306b95f1b47e2a0199434fa8658fa6c21635" - integrity sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA== + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.15.3.tgz#c96838b752b95dcd525b4e741ed40bb1dc2a1357" + integrity sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g== dependencies: "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" "@babel/highlight@^7.14.5": version "7.14.5" @@ -439,9 +554,9 @@ integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== "@babel/plugin-proposal-async-generator-functions@^7.10.1": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.7.tgz#784a48c3d8ed073f65adcf30b57bcbf6c8119ace" - integrity sha512-RK8Wj7lXLY3bqei69/cc25gwS5puEc3dknoFPFbqfy3XxYQBQFvu4ioWpafMBAB+L9NyptQK4nMOa5Xz16og8Q== + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz#7028dc4fa21dc199bbacf98b39bab1267d0eaf9a" + integrity sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-remap-async-to-generator" "^7.14.5" @@ -634,16 +749,16 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-block-scoping@^7.10.1": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.5.tgz#8cc63e61e50f42e078e6f09be775a75f23ef9939" - integrity sha512-LBYm4ZocNgoCqyxMLoOnwpsmQ18HWTQvql64t3GvMUzLQrNoV1BDG0lNftC8QKYERkZgCCT/7J5xWGObGAyHDw== + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz#94c81a6e2fc230bcce6ef537ac96a1e4d2b3afaf" + integrity sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-classes@^7.10.1": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz#0e98e82097b38550b03b483f9b51a78de0acb2cf" - integrity sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA== + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz#2a391ffb1e5292710b00f2e2c210e1435e7d449f" + integrity sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A== dependencies: "@babel/helper-annotate-as-pure" "^7.14.5" "@babel/helper-function-name" "^7.14.5" @@ -729,13 +844,13 @@ babel-plugin-dynamic-import-node "^2.3.3" "@babel/plugin-transform-modules-commonjs@^7.10.1": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz#7aaee0ea98283de94da98b28f8c35701429dad97" - integrity sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A== + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz#3305896e5835f953b5cdb363acd9e8c2219a5281" + integrity sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig== dependencies: - "@babel/helper-module-transforms" "^7.14.5" + "@babel/helper-module-transforms" "^7.15.0" "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-simple-access" "^7.14.5" + "@babel/helper-simple-access" "^7.14.8" babel-plugin-dynamic-import-node "^2.3.3" "@babel/plugin-transform-modules-systemjs@^7.10.1": @@ -758,9 +873,9 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.7.tgz#60c06892acf9df231e256c24464bfecb0908fd4e" - integrity sha512-DTNOTaS7TkW97xsDMrp7nycUVh6sn/eq22VaxWfEdzuEbRsiaOU0pqU7DlyUGHVsbQbSghvjKRpEl+nUCKGQSg== + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz#c68f5c5d12d2ebaba3762e57c2c4f6347a46e7b2" + integrity sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.14.5" @@ -959,9 +1074,9 @@ regenerator-runtime "^0.13.4" "@babel/runtime@^7.8.4": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.6.tgz#535203bc0892efc7dec60bdc27b2ecf6e409062d" - integrity sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg== + version "7.15.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b" + integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA== dependencies: regenerator-runtime "^0.13.4" @@ -974,7 +1089,7 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@7.8.6", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.8.6": +"@babel/traverse@7.8.6", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.15.0", "@babel/traverse@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== @@ -989,7 +1104,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@7.8.6", "@babel/types@^7.0.0", "@babel/types@^7.10.2", "@babel/types@^7.14.5", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.8.6": +"@babel/types@7.8.6", "@babel/types@^7.0.0", "@babel/types@^7.10.2", "@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.15.0", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.6.tgz#629ecc33c2557fcde7126e58053127afdb3e6d01" integrity sha512-wqz7pgWMIrht3gquyEFPVXeXCti72Rm8ep9b5tQKz9Yg9LzJA3HxosF1SB3Kc81KD1A3XBkkVYtJvCKS2Z/QrA== @@ -998,62 +1113,67 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@bazel/bazelisk@^1.7.5": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.9.0.tgz#e55cc5394b838d85651bceb06abdc95a28c44e2f" - integrity sha512-IHCKlMBHd7VMt3Za7rpTJA8O1WI8TUes5nDjdYv1MM/4OZQQFbM85Zb8ugQaKvy3CzxLpXgxYZUiq7b2TdhQnw== +"@bazel/bazelisk@^1.10.1", "@bazel/bazelisk@^1.7.5": + version "1.10.1" + resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.10.1.tgz#46236a43ad58e310c55247f866da0dc6083c3d8b" + integrity sha512-IHszNzBO2UrUy6YtsSAsZtnU6I6qpzXGkWdEvGoMxLgJnDsEnsIYniDCUjvjU1KAP+A03eepmCHlyFcRHMSxRA== "@bazel/buildifier@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-4.0.1.tgz#52cfbad5cbb86e9183a29dde2370cd465730ea0d" integrity sha512-BTmtvJbeeEVrqRApI1gr5hvPgYcHLpdGJ5EXNXEWO692ztMPSj5fB/dH0xUlaW45jn6LimYx8ymqTMhj3538og== -"@bazel/concatjs@3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-3.6.0.tgz#1cd6f8dd3b2a812c86ca3a79f3ea00ca042c342e" - integrity sha512-DttRkpCXJnJtibZV0vhRSWZKJpwKCK7eL+uohCyPx7Xjxkzr0cSVQMGCisFv+A/PNA+/O0Wl4PZs9j1/Ml+DoQ== +"@bazel/concatjs@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-4.0.0.tgz#fae04e7adb560f7666a71d8552bb424bb53b7d45" + integrity sha512-Ua+8Myq1RJjffASRHUzqFu05Zs5qU5Auzc+aiyq8V9opP5WTT4HR5lymmJrT/S1brhhM/1GZfbMZbYaddgyeVw== dependencies: protobufjs "6.8.8" source-map-support "0.5.9" tsutils "2.27.2" +"@bazel/esbuild@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@bazel/esbuild/-/esbuild-4.0.0.tgz#daa8286d72a9e6522f6f2c514aed9716a331aa25" + integrity sha512-SrdJexg+PNjdsTDp0voPS0SlU/yovbwrH+ObtFShHQ2X52u9mqvU2Cm7If48pWobkGK4rl7vDbzIHYWVKdGXlw== + "@bazel/ibazel@^0.15.8": version "0.15.10" resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.15.10.tgz#cf0cff1aec6d8e7bb23e1fc618d09fbd39b7a13f" integrity sha512-0v+OwCQ6fsGFa50r6MXWbUkSGuWOoZ22K4pMSdtWiL5LKFIE4kfmMmtQS+M7/ICNwk2EIYob+NRreyi/DGUz5A== -"@bazel/jasmine@3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-3.6.0.tgz#900018a228ec0d5132e341fd170448f8d7a97654" - integrity sha512-YTtpwORXlhn5cAPyRfFfOkBZ8ctE1PFKnQQGix0AUNyMuqUSKIjrXsmEba+iBwPZ8xyB7uQbJV0G4K0nOLu0eg== +"@bazel/jasmine@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-4.0.0.tgz#2e95f1b3458e0d69f16e0c820fe4631a43942a90" + integrity sha512-vi1n+vbLwKki7aa8kXDG709nxRXAmLEvqbijSpm8d3rrW4f68Ad5xKyT2gezO84OeysUHU3cDZViXWwFcoHRng== dependencies: c8 "~7.5.0" jasmine-reporters "~2.4.0" -"@bazel/protractor@3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-3.6.0.tgz#d1b5d5614139bc5b959a728c8fb721655b1c65a9" - integrity sha512-IjnGBBprONEsoG1yw7EnRMn0zYuJ6bbwyMNREXVdJDSR5+o/rQCC6ian5QW0sen8ImnFGPCo/ZzDfV98q1oTqw== +"@bazel/protractor@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-4.0.0.tgz#f29ae81c22790596bfd8212952a8e370406d094f" + integrity sha512-YiSU2IYdiW7HoVC3gAZJs9M0CiH9qluAvA9YLfvM3pM7rI1OmXYCm3hojgOLIRslbThcpfAcmQKjeUfdQPX5bA== -"@bazel/rollup@3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-3.6.0.tgz#880fcfa7a7c6031ff6c5da814d35ae48e62df406" - integrity sha512-hl8ZjfSH5/KFR/557OGodNtJDUXz8ymXWxr6aKYZFL4o9pIMTzfGtYBTOF5Jebph9WohJ4f94RyJhVJm4AXTsg== +"@bazel/rollup@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-4.0.0.tgz#909cfa9bd0243fd78657711b3aa644b8432ba636" + integrity sha512-OcL7QtNk2nyN/v7fnih0VQ0pIDwSxdGkyZvt/m1SwODx/eJpBceam0yboLoer/sYEZPhv7YFyCTk9n2X64TZ5g== -"@bazel/runfiles@3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@bazel/runfiles/-/runfiles-3.6.0.tgz#154d1d663db3e129de1954d56c1fede5a2ca0e11" - integrity sha512-b0Wq4agrfVY8kmtTHCmUsSTd5/5YurvBjzfJA1AAxO9uL+VzNmDyYaE+K5PDvYkGn/ZskYA4tipmjvDd6E0WbA== +"@bazel/runfiles@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@bazel/runfiles/-/runfiles-4.0.0.tgz#3d649d93710364515402b873add73947aaa702e8" + integrity sha512-1V0E1ooSw7DARfOBkr24O5GOpqODDd7RuJ2Xb+JljjdpUdJTIaVeqELBpSHAiYzqVJYWAn61sD5JP1CPCllixA== -"@bazel/terser@3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-3.6.0.tgz#4420772b6ea8ea93d966460a9a18bbc788618939" - integrity sha512-VOLFtKp1UwtP+mdm9IFSB9sUg74gbea/N70qEQZgTbJXN4lCE08E/dSL4PKwx3nWteNe6Xis7gZHJbzBHniMRg== +"@bazel/terser@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-4.0.0.tgz#9ef0c4635ba0191965f0b6c26eb0cc348c8c1f5e" + integrity sha512-sktDTfEBFD6LIv+g7W0l9nt5pih7N7aQVA09lv09rbTWD/JGX1LSSjG2p16af297XMxCP6GoHyVaxOVXS3IPYA== -"@bazel/typescript@3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-3.6.0.tgz#4dda2e39505cde4a190f51118fbb82ea0e80fde6" - integrity sha512-cO58iHmSxM4mRHJLLbb3FfoJJxv0pMiVGFLORoiUy/EhLtyYGZ1e7ntf4GxEovwK/E4h/awjSUlQkzPThcukTg== +"@bazel/typescript@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-4.0.0.tgz#71a6f0f5e340c6b8516b21fbc0f0853e74055d0c" + integrity sha512-+Le9q+5IR9gEnSH8sXyxDB5dD6NJx2kbm6AL+cijYVat2MczpGV4sI1mu0mdLzYsEX5Tjt5iHkaNb7sFESjnYA== dependencies: protobufjs "6.8.8" semver "5.6.0" @@ -1065,6 +1185,18 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.6.1.tgz#118511f316e2e87ee4294761868e254d3da47960" + integrity sha512-DX3Z+T5dt1ockmPdobJS/FAsQPW4V4SrWEhD2iYQT2Cb2tQsiMnYxrcUH9By/Z3B+v0S5LMBkQtV/XOBbpLEOg== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + "@csstools/convert-colors@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" @@ -1108,37 +1240,37 @@ integrity sha512-d4VSA86eL/AFTe5xtyZX+ePUjE8dIFu2T8zmdeNBSa5/kNgXPCx/o/wbFNHAGLJdGnk1vddRuMESD9HbOC8irw== "@google-cloud/pubsub@^2.7.0": - version "2.14.0" - resolved "https://registry.yarnpkg.com/@google-cloud/pubsub/-/pubsub-2.14.0.tgz#3d731ed0753e809b5ca6ef76febc21791fc4803f" - integrity sha512-pP8pwQ9d+p5KNmccEuwM4W9MM8Z9NP+Zzu3P9ewo/z+obK8mEvh5suC2at60MUWaDQOneTcUICpL6DXLRx957A== + version "2.16.3" + resolved "https://registry.yarnpkg.com/@google-cloud/pubsub/-/pubsub-2.16.3.tgz#76020b39adbac48fdf7ad030f2d4a3d0e01b2c7e" + integrity sha512-KkH0IH1PUzgWBquUhWfSG//R/8K3agYRyrqqeNtLjbr2lnehrOVllPtdnroO4q2lxoul3WrK+esPvtVywkb4Ag== dependencies: "@google-cloud/paginator" "^3.0.0" "@google-cloud/precise-date" "^2.0.0" "@google-cloud/projectify" "^2.0.0" "@google-cloud/promisify" "^2.0.0" - "@opentelemetry/api" "^0.20.0" - "@opentelemetry/semantic-conventions" "^0.20.0" + "@opentelemetry/api" "^1.0.0" + "@opentelemetry/semantic-conventions" "^0.24.0" "@types/duplexify" "^3.6.0" "@types/long" "^4.0.0" arrify "^2.0.0" extend "^3.0.2" google-auth-library "^7.0.0" - google-gax "^2.12.0" + google-gax "^2.17.1" is-stream-ended "^0.1.4" lodash.snakecase "^4.1.1" p-defer "^3.0.0" "@grpc/grpc-js@~1.3.0": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.3.3.tgz#479764be3044f44c9fe38702643f59ea1a5374cb" - integrity sha512-KkKZrX3fVTBYCtUk8I+Y4xWaauEEOIR1mIGoPFUK8C+a9TTub5dmjowJpFGz0dqYj//wJcgVR9fqpoNhSYFfHQ== + version "1.3.7" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.3.7.tgz#58b687aff93b743aafde237fd2ee9a3259d7f2d8" + integrity sha512-CKQVuwuSPh40tgOkR7c0ZisxYRiN05PcKPW72mQL5y++qd7CwBRoaJZvU5xfXnCJDFBmS3qZGQ71Frx6Ofo2XA== dependencies: "@types/node" ">=12.12.47" "@grpc/proto-loader@^0.6.1": - version "0.6.2" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.6.2.tgz#412575f3ff5ef0a9b79d4ea12c08cba5601041cb" - integrity sha512-q2Qle60Ht2OQBCp9S5hv1JbI4uBBq6/mqSevFNK3ZEgRDBCAkWqZPUhD/K9gXOHrHKluliHiVq2L9sw1mVyAIg== + version "0.6.4" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.6.4.tgz#5438c0d771e92274e77e631babdc14456441cbdc" + integrity sha512-7xvDvW/vJEcmLUltCUGOgWRPM8Oofv0eCFSVMuKqaqWJaXSzmB+m9hiyqe34QofAl4WAzIKUZZlinIF9FOHyTQ== dependencies: "@types/long" "^4.0.1" lodash.camelcase "^4.3.0" @@ -1146,6 +1278,11 @@ protobufjs "^6.10.0" yargs "^16.1.1" +"@hutson/parse-repository-url@^3.0.0": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" + integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== + "@istanbuljs/schema@^0.1.2": version "0.1.3" resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" @@ -1167,32 +1304,50 @@ resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@microsoft/api-extractor-model@7.13.3": - version "7.13.3" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.3.tgz#ac01c064c5af520d3661c85d7e5ef95e1ca8ab92" - integrity sha512-uXilAhu2GcvyY/0NwVRk3AN7TFYjkPnjHLV2UywTTz9uglS+Af0YjNrCy+aaK8qXtfbFWdBzkH9N2XU8/YBeRQ== +"@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@7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.6.tgz#4a0a05df51f91ed18a9cea23c7cca4063dce65e9" + integrity sha512-632kwS+YEozh7Xl4dz/VxHmqD31ugGTEXUr2if1+8klWiUt8qw6RmsIux5oGAEuu2L+Dzl9Y+/P02ZG3GyzjTA== dependencies: + "@microsoft/api-extractor-model" "7.13.5" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.39.0" + "@rushstack/node-core-library" "3.40.0" + "@rushstack/rig-package" "0.2.13" + "@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/api-extractor@7.17.1": - version "7.17.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.17.1.tgz#df6b7aa7cadcb35e2483048ebe5dbaf7af932446" - integrity sha512-NqdN627QoDdDtvfqEoX+Z6WbF2yid5URUZVYefC9KuisgwrsfvbSj5QwzOZlMYcufoafTq9jfeVyFAXr4PqGig== +"@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.3" + "@microsoft/api-extractor-model" "7.13.5" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.39.0" - "@rushstack/rig-package" "0.2.12" - "@rushstack/ts-command-line" "4.8.0" + "@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.2" + typescript "~4.3.5" "@microsoft/tsdoc-config@~0.15.2": version "0.15.2" @@ -1247,9 +1402,9 @@ integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz#94c23db18ee4653e129abd26fb06f870ac9e1ee2" - integrity sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA== + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" @@ -1307,6 +1462,57 @@ node-gyp "^7.1.0" read-package-json-fast "^2.0.1" +"@octokit/auth-app@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-app/-/auth-app-3.6.0.tgz#79fc6f652d2362ce0bd3122f6f764a87cc813dea" + integrity sha512-A+tLuHEMXw+Xz9dmKO7Ho9i4EmMr4tThrwYTlmMNu8y93JxvvRjKFFElpCTS+Z0NlbfuyNdaTlJnAinFbVKm7g== + dependencies: + "@octokit/auth-oauth-app" "^4.3.0" + "@octokit/auth-oauth-user" "^1.2.3" + "@octokit/request" "^5.6.0" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.0.3" + "@types/lru-cache" "^5.1.0" + deprecation "^2.3.1" + lru-cache "^6.0.0" + universal-github-app-jwt "^1.0.1" + universal-user-agent "^6.0.0" + +"@octokit/auth-oauth-app@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-oauth-app/-/auth-oauth-app-4.3.0.tgz#de02f184360ffd7cfccef861053784fc4410e7ea" + integrity sha512-cETmhmOQRHCz6cLP7StThlJROff3A/ln67Q961GuIr9zvyFXZ4lIJy9RE6Uw5O7D8IXWPU3jhDnG47FTSGQr8Q== + dependencies: + "@octokit/auth-oauth-device" "^3.1.1" + "@octokit/auth-oauth-user" "^1.2.1" + "@octokit/request" "^5.3.0" + "@octokit/types" "^6.0.3" + "@types/btoa-lite" "^1.0.0" + btoa-lite "^1.0.0" + universal-user-agent "^6.0.0" + +"@octokit/auth-oauth-device@^3.1.1": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@octokit/auth-oauth-device/-/auth-oauth-device-3.1.2.tgz#d299f51f491669f37fe7af8738f5ac921e63973c" + integrity sha512-w7Po4Ck6N2aAn2VQyKLuojruiyKROTBv4qs6IwE5rbwF7HhBXXp4A/NKmkpoFIZkiXQtM+N8QtkSck4ApYWdGg== + dependencies: + "@octokit/oauth-methods" "^1.1.0" + "@octokit/request" "^5.4.14" + "@octokit/types" "^6.10.0" + universal-user-agent "^6.0.0" + +"@octokit/auth-oauth-user@^1.2.1", "@octokit/auth-oauth-user@^1.2.3": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-oauth-user/-/auth-oauth-user-1.3.0.tgz#da4e4529145181a6aa717ae858afb76ebd6e3360" + integrity sha512-3QC/TAdk7onnxfyZ24BnJRfZv8TRzQK7SEFUS9vLng4Vv6Hv6I64ujdk/CUkREec8lhrwU764SZ/d+yrjjqhaQ== + dependencies: + "@octokit/auth-oauth-device" "^3.1.1" + "@octokit/oauth-methods" "^1.1.0" + "@octokit/request" "^5.4.14" + "@octokit/types" "^6.12.2" + btoa-lite "^1.0.0" + universal-user-agent "^6.0.0" + "@octokit/auth-token@^2.4.4": version "2.4.5" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" @@ -1314,7 +1520,7 @@ dependencies: "@octokit/types" "^6.0.3" -"@octokit/core@^3.5.0", "@octokit/core@^3.5.1": +"@octokit/core@^3.4.0", "@octokit/core@^3.5.0", "@octokit/core@^3.5.1": version "3.5.1" resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b" integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw== @@ -1336,43 +1542,54 @@ is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/graphql@^4.5.8", "@octokit/graphql@^4.6.1": - version "4.6.4" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.6.4.tgz#0c3f5bed440822182e972317122acb65d311a5ed" - integrity sha512-SWTdXsVheRmlotWNjKzPOb6Js6tjSqA2a8z9+glDJng0Aqjzti8MEWOtuT8ZSu6wHnci7LZNuarE87+WJBG4vg== +"@octokit/graphql@^4.5.8", "@octokit/graphql@^4.6.1", "@octokit/graphql@^4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" + integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== dependencies: "@octokit/request" "^5.6.0" "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^7.3.2": - version "7.3.2" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-7.3.2.tgz#065ce49b338043ec7f741316ce06afd4d459d944" - integrity sha512-oJhK/yhl9Gt430OrZOzAl2wJqR0No9445vmZ9Ey8GjUZUpwuu/vmEFP0TDhDXdpGDoxD6/EIFHJEcY8nHXpDTA== +"@octokit/oauth-authorization-url@^4.3.1": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@octokit/oauth-authorization-url/-/oauth-authorization-url-4.3.3.tgz#6a6ef38f243086fec882b62744f39b517528dfb9" + integrity sha512-lhP/t0i8EwTmayHG4dqLXgU+uPVys4WD/qUNvC+HfB1S1dyqULm5Yx9uKc1x79aP66U1Cb4OZeW8QU/RA9A4XA== + +"@octokit/oauth-methods@^1.1.0": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@octokit/oauth-methods/-/oauth-methods-1.2.4.tgz#5f2706b29f09d309233aee61c99b66aedec0511a" + integrity sha512-85hen2Dkpnmy2PGfVFe7Ke9rUo//nlqUcHE4GiQBHJ7D95rAm19GcRO49LlH6NOXOMdEFj7i/Ay5GVDRrAk38w== + dependencies: + "@octokit/oauth-authorization-url" "^4.3.1" + "@octokit/request" "^5.4.14" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.12.2" + btoa-lite "^1.0.0" -"@octokit/openapi-types@^7.3.4": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-7.3.4.tgz#9f075e263d1d3c1ba7a789e0085a5ed75d6daad1" - integrity sha512-binmLrMQWBG0CvUE/jS3/XXrZbX3oN/6gF7ocSsb/ZJ0xfox2isJN4ZhGeL91SDJVzFK7XuUYBm2mlIDedkxsg== +"@octokit/openapi-types@^10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-10.0.0.tgz#db4335de99509021f501fc4e026e6ff495fe1e62" + integrity sha512-k1iO2zKuEjjRS1EJb4FwSLk+iF6EGp+ZV0OMRViQoWhQ1fZTk9hg1xccZII5uyYoiqcbC73MRBmT45y1vp2PPg== -"@octokit/plugin-paginate-rest@^2.13.5", "@octokit/plugin-paginate-rest@^2.6.2": - version "2.13.5" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.5.tgz#e459f9b5dccbe0a53f039a355d5b80c0a2b0dc57" - integrity sha512-3WSAKBLa1RaR/7GG+LQR/tAZ9fp9H9waE9aPXallidyci9oZsfgsLn5M836d3LuDC6Fcym+2idRTBpssHZePVg== +"@octokit/plugin-paginate-rest@^2.13.3", "@octokit/plugin-paginate-rest@^2.13.5", "@octokit/plugin-paginate-rest@^2.6.2": + version "2.15.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.15.1.tgz#264189dd3ce881c6c33758824aac05a4002e056a" + integrity sha512-47r52KkhQDkmvUKZqXzA1lKvcyJEfYh3TKAIe5+EzMeyDM3d+/s5v11i2gTk8/n6No6DPi3k5Ind6wtDbo/AEg== dependencies: - "@octokit/types" "^6.13.0" + "@octokit/types" "^6.24.0" "@octokit/plugin-request-log@^1.0.2": version "1.0.4" resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== -"@octokit/plugin-rest-endpoint-methods@5.3.3", "@octokit/plugin-rest-endpoint-methods@^5.3.3": - version "5.3.3" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.3.3.tgz#b447ed80126d36a9cf99daabb055bf0c157c8d89" - integrity sha512-xHlZK9gxVFP2YQYXOmR1ItCwl9k+0Z3cA40oGMQfpPbWIYY32FTM15Qj+V0V6oLJZr0E26Sz3VX6qYlM/ytfig== +"@octokit/plugin-rest-endpoint-methods@5.8.0", "@octokit/plugin-rest-endpoint-methods@^5.1.1", "@octokit/plugin-rest-endpoint-methods@^5.3.3": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.8.0.tgz#33b342fe41f2603fdf8b958e6652103bb3ea3f3b" + integrity sha512-qeLZZLotNkoq+it6F+xahydkkbnvSK0iDjlXFo3jNTB+Ss0qIbYQb9V/soKLMkgGw8Q2sHjY5YEXiA47IVPp4A== dependencies: - "@octokit/types" "^6.16.6" + "@octokit/types" "^6.25.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": @@ -1384,10 +1601,10 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.0.tgz#6084861b6e4fa21dc40c8e2a739ec5eff597e672" - integrity sha512-4cPp/N+NqmaGQwbh3vUsYqokQIzt7VjsgTYVXiwpUP2pxd5YiZB2XuTedbb0SPtv9XS7nzAKjAuQxmY8/aZkiA== +"@octokit/request@^5.3.0", "@octokit/request@^5.4.14", "@octokit/request@^5.6.0": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.1.tgz#f97aff075c37ab1d427c49082fefeef0dba2d8ce" + integrity sha512-Ls2cfs1OfXaOKzkcxnqw5MR6drMA/zWX/LIS/p8Yjdz7QKTPQLMsB3R+OvoxE6XnXeXEE2X7xe4G4l4X0gRiKQ== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.1.0" @@ -1396,39 +1613,32 @@ node-fetch "^2.6.1" universal-user-agent "^6.0.0" -"@octokit/rest@^18.6.2": - version "18.6.2" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.6.2.tgz#181ef6a23f1e5977569f439bd256041dc9d5a696" - integrity sha512-q6nrxhM+oXzPmbZlykNaBP1vG0+mU6URLBy9cl4XXrWcD0k0ShYiaXDaPewbllTxoMevqv+OABb+Q7ycUWkE2A== +"@octokit/rest@^18.7.0": + version "18.9.1" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.9.1.tgz#db1d7ac1d7b10e908f7d4b78fe35a392554ccb26" + integrity sha512-idZ3e5PqXVWOhtZYUa546IDHTHjkGZbj3tcJsN0uhCy984KD865e8GB2WbYDc2ZxFuJRiyd0AftpL2uPNhF+UA== dependencies: "@octokit/core" "^3.5.0" "@octokit/plugin-paginate-rest" "^2.6.2" "@octokit/plugin-request-log" "^1.0.2" - "@octokit/plugin-rest-endpoint-methods" "5.3.3" - -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1": - version "6.16.4" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.16.4.tgz#d24f5e1bacd2fe96d61854b5bda0e88cf8288dfe" - integrity sha512-UxhWCdSzloULfUyamfOg4dJxV9B+XjgrIZscI0VCbp4eNrjmorGEw+4qdwcpTsu6DIrm9tQsFQS2pK5QkqQ04A== - dependencies: - "@octokit/openapi-types" "^7.3.2" + "@octokit/plugin-rest-endpoint-methods" "5.8.0" -"@octokit/types@^6.13.0", "@octokit/types@^6.16.6": - version "6.16.6" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.16.6.tgz#c113a0408a799ccb93c8749806733ad5d3edd142" - integrity sha512-PrEGjMnEhLlNttsuLadEWqXdMYJX3icHHaRs/ChJebRT79VDh/cNkk8bURx05BEEwr7QvaLsRzjt3hNxUJZfXA== +"@octokit/types@^6.0.3", "@octokit/types@^6.10.0", "@octokit/types@^6.12.2", "@octokit/types@^6.16.1", "@octokit/types@^6.16.6", "@octokit/types@^6.24.0", "@octokit/types@^6.25.0": + version "6.26.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.26.0.tgz#b8af298485d064ad9424cb41520541c1bf820346" + integrity sha512-RDxZBAFMtqs1ZPnbUu1e7ohPNfoNhTiep4fErY7tZs995BeHu369Vsh5woMIaFbllRWEZBfvTCS4hvDnMPiHrA== dependencies: - "@octokit/openapi-types" "^7.3.4" + "@octokit/openapi-types" "^10.0.0" -"@opentelemetry/api@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-0.20.0.tgz#d4e26d30dc0c5da697d1ff51434ad8f0cf30e565" - integrity sha512-n06MtDYEc2H07S/NTvGMlxF2Ijp0YbNrI/rBgLcxpEh3hxOkPZA12gxlUoZkBHWCZYau2j3b/uL+QFpiQKOjSw== +"@opentelemetry/api@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.0.2.tgz#921e1f2b2484b762d77225a8a25074482d93fccf" + integrity sha512-DCF9oC89ao8/EJUqrp/beBlDR8Bp2R43jqtzayqCoomIvkwTuPfLcHdVhIGRR69GFlkykFjcDW+V92t0AS7Tww== -"@opentelemetry/semantic-conventions@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-0.20.0.tgz#adc7e391bba6db9bbaba04ae263c3e92b1703d44" - integrity sha512-x40C3vQMttFlnNEfhFwO49jHrY6AoWnntL35TCem3LINr/aw1W0hGhdKY/zweC64CBJEyiHumaae480rqF8eOA== +"@opentelemetry/semantic-conventions@^0.24.0": + version "0.24.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz#1028ef0e0923b24916158d80d2ddfd67ea8b6740" + integrity sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA== "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -1492,10 +1702,10 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rushstack/node-core-library@3.39.0": - version "3.39.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.39.0.tgz#38928946d15ae89b773386cf97433d0d1ec83b93" - integrity sha512-kgu3+7/zOBkZU0+NdJb1rcHcpk3/oTjn5c8cg5nUTn+JDjEw58yG83SoeJEcRNNdl11dGX0lKG2PxPsjCokZOQ== +"@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" @@ -1507,18 +1717,26 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.2.12": - version "0.2.12" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.12.tgz#c434d62b28e0418a040938226f8913971d0424c7" - integrity sha512-nbePcvF8hQwv0ql9aeQxcaMPK/h1OLAC00W7fWCRWIvD2MchZOE8jumIIr66HGrfG2X1sw++m/ZYI4D+BM5ovQ== +"@rushstack/rig-package@0.2.13": + version "0.2.13" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.13.tgz#418f0aeb4c9b33bd8bd2547759fc0ae91fd970c7" + integrity sha512-qQMAFKvfb2ooaWU9DrGIK9d8QfyHy/HiuITJbWenlKgzcDXQvQgEduk57YF4Y7LLasDJ5ZzLaaXwlfX8qCRe5Q== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.8.0": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.8.0.tgz#611accb931b9ac62ff4d078f68f95c47f6606724" - integrity sha512-nZ8cbzVF1VmFPfSJfy8vEohdiFAH/59Y/Y+B4nsJbn4SkifLJ8LqNZ5+LxCC2UR242EXFumxlsY1d6fPBxck5Q== +"@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/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" @@ -1571,20 +1789,20 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== -"@tsconfig/node16@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.1.tgz#a6ca6a9a0ff366af433f42f5f0e124794ff6b8f1" - integrity sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA== +"@tsconfig/node16@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" + integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== "@types/angular@^1.6.47": - version "1.8.1" - resolved "https://registry.yarnpkg.com/@types/angular/-/angular-1.8.1.tgz#940b16476adff7b66608aae778e5e9f1c57ab847" - integrity sha512-8zEjTC3gpkva6/dbUkiSxIUGUxYm9HD/pJJ0lbqfEM2TWqi/3vs4VtgoFxVXt5bmuJ+6G2caO2HaMD+NzB1VwA== + version "1.8.2" + resolved "https://registry.yarnpkg.com/@types/angular/-/angular-1.8.2.tgz#35d357097a853147a1b65ad34670322ca4e56b69" + integrity sha512-V0Hgx2Q3wFNcrrmx8zVepdasDuwnK4lqQFe0Zr9Ll3DoTJIuhKOpyfHC6KuVDBXJGgTkMKtELbvDe9crIkSGzg== "@types/archiver@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/archiver/-/archiver-5.1.0.tgz#869f4ce4028e49cf9a0243cf914415f4cc3d1f3d" - integrity sha512-baFOhanb/hxmcOd1Uey2TfFg43kTSmM6py1Eo7Rjbv/ivcl7PXLhY0QgXGf50Hx/eskGCFqPfhs/7IZLb15C5g== + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/archiver/-/archiver-5.1.1.tgz#d6d7610de4386b293abd5c1cb1875e0a4f4e1c30" + integrity sha512-heuaCk0YH5m274NOLSi66H1zX6GtZoMsdE6TYFcpFFjBjg0FoU4i4/M/a/kNlgNg26Xk3g364mNOYe1JaiEPOQ== dependencies: "@types/glob" "*" @@ -1605,9 +1823,9 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.2.tgz#f3d71178e187858f7c45e30380f8f1b7415a12d8" - integrity sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ== + 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" @@ -1619,9 +1837,9 @@ "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.0.tgz#0c888dd70b3ee9eebb6e4f200e809da0076262be" - integrity sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A== + 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" @@ -1635,9 +1853,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*": - version "7.11.1" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.1.tgz#654f6c4f67568e24c23b367e947098c6206fa639" - integrity sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw== + 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" @@ -1654,33 +1872,36 @@ integrity sha512-ZmI0sZGAUNXUfMWboWwi4LcfpoVUYldyN6Oe0oJ5cCsHDU/LlRq8nQKPXhYLOx36QYSW9bNIb1vvRrD6K7Llgw== "@types/bluebird@^3.5.27": - version "3.5.35" - resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.35.tgz#3964c48372bf62d60616d8673dd77a9719ebac9b" - integrity sha512-2WeeXK7BuQo7yPI4WGOBum90SzF/f8rqlvpaXx4rjeTmNssGRDHWf7fgDUH90xMB3sUOu716fUK5d+OVx0+ncQ== + version "3.5.36" + resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.36.tgz#00d9301d4dc35c2f6465a8aec634bb533674c652" + integrity sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q== -"@types/cli-progress@^3.4.2": - version "3.9.1" - resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.9.1.tgz#285e7fbdad6e7baf072d163ae1c3b23b7b219130" - integrity sha512-X/tKJv/GoYlCBS9wwJTLrVSxzIOI/Cj1cCatYOAAoQne3aT1QbHBptBS5+zLe2ToSljAijHU1N/ouBNFvZ2H/g== - dependencies: - "@types/node" "*" +"@types/btoa-lite@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/btoa-lite/-/btoa-lite-1.0.0.tgz#e190a5a548e0b348adb0df9ac7fa5f1151c7cca4" + integrity sha512-wJsiX1tosQ+J5+bY5LrSahHxr2wT+uME5UDwdN1kg4frt40euqA+wzECkmq4t5QbveHiJepfdThgQrPw6KiSlg== -"@types/conventional-commits-parser@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz#1a4796a0ae2bf33b41ea49f55e27ccbdb29cce5e" - integrity sha512-xkKomW6PqJS0rzFPPQSzKwbKIRqAGjYa1aWWkoT14YYodXyEpG4ok4H1US3olqGBxejz7EeBfT3fTJ3hUOiUkQ== +"@types/cldrjs@^0.4.22": + version "0.4.22" + resolved "https://registry.yarnpkg.com/@types/cldrjs/-/cldrjs-0.4.22.tgz#24e31cdf15a4ea806ca0a774b024150d1066fea1" + integrity sha512-YyzxXZ5s9xwPWznXnI3++X14JGnomDdDAlin7kWZvxX/MzirC9BNFcDSQ0yR8YG2M/xNMn0nXsCGkgbFVyXjGw== + +"@types/cli-progress@^3.4.2": + version "3.9.2" + resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.9.2.tgz#6ca355f96268af39bee9f9307f0ac96145639c26" + integrity sha512-VO5/X5Ij+oVgEVjg5u0IXVe3JQSKJX+Ev8C5x+0hPy0AuWyW+bF8tbajR7cPFnDGhs7pidztcac+ccrDtk5teA== dependencies: "@types/node" "*" "@types/convert-source-map@^1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@types/convert-source-map/-/convert-source-map-1.5.1.tgz#d4d180dd6adc5cb68ad99bd56e03d637881f4616" - integrity sha512-laiDIXqqthjJlyAMYAXOtN3N8+UlbM+KvZi4BaY5ZOekmVkBs/UxfK5O0HWeJVG2eW8F+Mu2ww13fTX+kY1FlQ== + version "1.5.2" + resolved "https://registry.yarnpkg.com/@types/convert-source-map/-/convert-source-map-1.5.2.tgz#318dc22d476632a4855594c16970c6dc3ed086e7" + integrity sha512-tHs++ZeXer40kCF2JpE51Hg7t4HPa18B1b1Dzy96S0eCw8QKECNMYMfwa1edK/x8yCN0r4e6ewvLcc5CsVGkdg== "@types/diff@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@types/diff/-/diff-5.0.0.tgz#eb71e94feae62548282c4889308a3dfb57e36020" - integrity sha512-jrm2K65CokCCX4NmowtA+MfXyuprZC13jbRuwprs6/04z/EcFg/MCwYdsHn+zgV4CQBiATiI7AEq7y1sZCtWKA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/diff/-/diff-5.0.1.tgz#9c9b9a331d4e41ccccff553f5d7ef964c6cf4042" + integrity sha512-XIpxU6Qdvp1ZE6Kr3yrkv1qgUab0fyf4mHYvW8N3Bx3PCsbN6or1q9/q72cv5jIFWolaGH08U9XyYoLLIykyKQ== "@types/duplexify@^3.6.0": version "3.6.0" @@ -1689,31 +1910,26 @@ dependencies: "@types/node" "*" -"@types/ejs@^3.0.6": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.0.6.tgz#aca442289df623bfa8e47c23961f0357847b83fe" - integrity sha512-fj1hi+ZSW0xPLrJJD+YNwIh9GZbyaIepG26E/gXvp8nCa2pYokxUYO1sK9qjGxp2g8ryZYuon7wmjpwE2cyASQ== - "@types/eslint-scope@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.0.tgz#4792816e31119ebd506902a482caec4951fabd86" - integrity sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw== + version "3.7.1" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.1.tgz#8dc390a7b4f9dd9f1284629efce982e41612116e" + integrity sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g== dependencies: "@types/eslint" "*" "@types/estree" "*" "@types/eslint@*": - version "7.2.13" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.13.tgz#e0ca7219ba5ded402062ad6f926d491ebb29dd53" - integrity sha512-LKmQCWAlnVHvvXq4oasNUMTJJb2GwSyTY8+1C7OH5ILR8mPLaljv1jxL1bXW3xB3jFbQxTKxJAvI8PyjB09aBg== + version "7.28.0" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.0.tgz#7e41f2481d301c68e14f483fe10b017753ce8d5a" + integrity sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A== dependencies: "@types/estree" "*" "@types/json-schema" "*" "@types/estree@*": - version "0.0.48" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.48.tgz#18dc8091b285df90db2f25aa7d906cfc394b7f74" - integrity sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew== + version "0.0.50" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" + integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== "@types/estree@0.0.39": version "0.0.39" @@ -1730,33 +1946,26 @@ resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== -"@types/git-raw-commits@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/git-raw-commits/-/git-raw-commits-2.0.0.tgz#157e9e4709db0748fb1aa623f8927ddd4864bac6" - integrity sha512-sHXOKjKqu1kQxbxkZiz2s0yx2kc7g20g6tE98LYGq5jQyT9r+GRyTn19NBfPotOlXhGO6oPvYT3tdnPl8MYYyA== - dependencies: - "@types/node" "*" - "@types/glob@*", "@types/glob@^7.1.1": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== + version "7.1.4" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" + integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== dependencies: "@types/minimatch" "*" "@types/node" "*" -"@types/hammerjs@2.0.39": - version "2.0.39" - resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.39.tgz#4be64bbacf3813c79c0dab895c6b0fdc7d5e513f" - integrity sha512-lYR2Y/tV2ujpk/WyUc7S0VLI0a9hrtVIN9EwnrNo5oSEJI2cK2/XrgwOQmXLL3eTulOESvh9qP6si9+DWM9cOA== +"@types/hammerjs@2.0.40": + version "2.0.40" + resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.40.tgz#ded0240b6ea1ad7afc1e60374c49087aaea5dbd8" + integrity sha512-VbjwR1fhsn2h2KXAY4oy1fm7dCxaKy0D+deTb8Ilc3Eo3rc5+5eA4rfYmZaHgNJKxVyI0f6WIXzO2zLkVmQPHA== -"@types/inquirer@^7.3.0": - version "7.3.2" - resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-7.3.2.tgz#35d2ef4d98dd42feeb4e1256cdeb9f13f457d420" - integrity sha512-EkeX/hU0SWinA2c7Qu/+6+7KbepFPYJcjankUgtA/VSY6BlVHybL0Cgyey9PDbXwhNXnNGBLU3t+MORp23RgAw== +"@types/inquirer@^8.0.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.1.0.tgz#99fab20fd6fb3ee2b0352042082fe8dbec76bf55" + integrity sha512-FqQ0zoCqh5dLQnrY+GE9d5B8wNiXSuEZo9YLIGhVOkJRBTTnYUDJ5maGzzTGE5nihSnGajdMP6RmbzV1oWgflQ== dependencies: "@types/through" "*" - rxjs "^6.4.0" + rxjs "^7.2.0" "@types/is-windows@^1.0.0": version "1.0.0" @@ -1769,41 +1978,53 @@ integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw== "@types/jasmine-ajax@^3.3.1": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@types/jasmine-ajax/-/jasmine-ajax-3.3.2.tgz#5faf8babea4e64e04e37223678b2b24a8d5aa3e4" - integrity sha512-HxfL3/vhg7EWdZrPudIXuJ8BN8orqpDvfHUkrn2ws8TkWkr6itQW44dIxMPSgYa29jGraAGoMFRLbAut3fMHZQ== + version "3.3.3" + resolved "https://registry.yarnpkg.com/@types/jasmine-ajax/-/jasmine-ajax-3.3.3.tgz#ec89515434d4aee9772e25a730bd626ecf44260d" + integrity sha512-e2iJYrdwfxr6WmLHxNjISUgbrbGaRsFHsc9xnrq8SGFzbSYPDZ4lmAkIulAAjqrkZ1z21OJCZsZwWMnxoeX7+A== -"@types/jasmine@*", "@types/jasmine@3.7.7": - version "3.7.7" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.7.7.tgz#56718af036be3c9f86eca560a22e39440b2b0784" - integrity sha512-yZzGe1d1T0y+imXDZ79F030nn8qbmiwpWKCZKvKN0KbTzwXAVYShUxkIxu1ba+vhIdabTGVGCfbtZC0oOam8TQ== +"@types/jasmine@*", "@types/jasmine@3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.8.2.tgz#27ab0aaac29581bcbde5774e1843f90df977078e" + integrity sha512-u5h7dqzy2XpXTzhOzSNQUQpKGFvROF8ElNX9P/TJvsHnTg/JvsAseVsGWQAQQldqanYaM+5kwxW909BBFAUYsg== "@types/jasminewd2@^2.0.8": - version "2.0.9" - resolved "https://registry.yarnpkg.com/@types/jasminewd2/-/jasminewd2-2.0.9.tgz#db3946314605deea9d5c7aea0b61d807089ba76d" - integrity sha512-Oz+Faunpe2SimFvkMYMXxpK89WXl7rZHG8abTOKcGndu4xOoSbUZ+jUdZ0LQpmDqPEGLBWXF/yZP1tlsplGhzw== + version "2.0.10" + resolved "https://registry.yarnpkg.com/@types/jasminewd2/-/jasminewd2-2.0.10.tgz#ae31c237aa6421bde30f1058b1d20f4577e54443" + integrity sha512-J7mDz7ovjwjc+Y9rR9rY53hFWKATcIkrr9DwQWmOas4/pnIPJTXawnzjwpHm3RSxz/e3ZVUvQ7cRbd5UQLo10g== dependencies: "@types/jasmine" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": - version "7.0.7" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" - integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== +"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.8": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + +"@types/jsonwebtoken@^8.3.3": + version "8.5.4" + resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-8.5.4.tgz#50ccaf0aa6f5d7b9956e70fe323b76e582991913" + integrity sha512-4L8msWK31oXwdtC81RmRBAULd0ShnAHjBuKT9MRQpjP0piNrZdXyTRcKY9/UIfhGeKIT4PvF5amOOUbbT/9Wpg== + dependencies: + "@types/node" "*" "@types/long@^4.0.0", "@types/long@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + "@types/minimatch@*", "@types/minimatch@^3.0.3": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" - integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA== + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" + integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== "@types/minimist@^1.2.0": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" - integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== + version "1.2.2" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" + integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/multimatch@^4.0.0": version "4.0.0" @@ -1812,18 +2033,10 @@ dependencies: multimatch "*" -"@types/node-fetch@^2.5.7": - version "2.5.10" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.10.tgz#9b4d4a0425562f9fcea70b12cb3fcdd946ca8132" - integrity sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - "@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0": - version "15.12.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.4.tgz#e1cf817d70a1e118e81922c4ff6683ce9d422e26" - integrity sha512-zrNj1+yqYF4WskCMOHwN+w9iuD12+dGm0rQ35HLl9/Ouuq52cEtd0CH9qMgrdNmi5ejC1/V7vKEXYubB+65DkA== + version "16.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.6.1.tgz#aee62c7b966f55fc66c7b6dfa1d58db2a616da61" + integrity sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw== "@types/node@10.17.13": version "10.17.13" @@ -1841,14 +2054,14 @@ integrity sha512-1RWYiq+5UfozGsU6MwJyFX6BtktcT10XRjvcAQmskCtMcW3tPske88lM/nHv7BQG1w9KBXI1zPGuu5PnNCX14g== "@types/node@^12.11.1": - version "12.20.15" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.15.tgz#10ee6a6a3f971966fddfa3f6e89ef7a73ec622df" - integrity sha512-F6S4Chv4JicJmyrwlDkxUdGNSplsQdGwp1A0AJloEVDirWdZOAiRHhovDlsFkKUrquUXhz1imJhXHsf59auyAg== + version "12.20.19" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.19.tgz#538e61fc220f77ae4a4663c3d8c3cb391365c209" + integrity sha512-niAuZrwrjKck4+XhoCw6AAVQBENHftpXw9F4ryk66fTgYaKQ53R4FI7c9vUGGw5vQis1HKBHDR1gcYI/Bq1xvw== "@types/normalize-package-data@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" - integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== "@types/parse-json@^4.0.0": version "4.0.0" @@ -1873,19 +2086,19 @@ integrity sha512-tHdDdGUBKTbiLLwf5mF78EP35F31UZekG+GRNowl8G5rMQoupAT4qWn/7AaGOvmaqvROdqC3Io/hP1ZyO58QkA== "@types/selenium-webdriver@^3.0.0": - version "3.0.17" - resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.17.tgz#50bea0c3c2acc31c959c5b1e747798b3b3d06d4b" - integrity sha512-tGomyEuzSC1H28y2zlW6XPCaDaXFaD6soTdb4GNdmte2qfHtrKqhy0ZFs4r/1hpazCfEZqeTSRLvSasmEx89uw== + version "3.0.19" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.19.tgz#28ecede76f15b13553b4e86074d4cf9a0bbe49c4" + integrity sha512-OFUilxQg+rWL2FMxtmIgCkUDlJB6pskkpvmew7yeXfzzsOBb5rc+y2+DjHm+r3r1ZPPcJefK3DveNSYWGiy68g== "@types/semver@^7.3.4": - version "7.3.6" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.6.tgz#e9831776f4512a7ba6da53e71c26e5fb67882d63" - integrity sha512-0caWDWmpCp0uifxFh+FaqK3CuZ2SkRR/ZRxAV5+zNdC3QVUi6wyOJnefhPvtNt8NQWXB5OA93BUvZsXpWat2Xw== + version "7.3.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.8.tgz#508a27995498d7586dcecd77c25e289bfaf90c59" + integrity sha512-D/2EJvAlCEtYFEYmmlGwbGXuK886HzyCc3nZX/tkFTQdEU8jZDAgiv08P162yB17y4ZXZoq7yFAnW4GDBb9Now== "@types/shelljs@^0.8.6": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.8.tgz#e439c69929b88a2c8123c1a55e09eb708315addf" - integrity sha512-lD3LWdg6j8r0VRBFahJVaxoW0SIcswxKaFUrmKl33RJVeeoNYQAz4uqCJ5Z6v4oIBOsC5GozX+I5SorIKiTcQA== + version "0.8.9" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.9.tgz#45dd8501aa9882976ca3610517dac3831c2fbbf4" + integrity sha512-flVe1dvlrCyQJN/SGrnBxqHG+RzXrVKsmjD8WS/qYHpq5UPjfq7UWFBENP0ZuOl0g6OpAlL6iBoLSvKYUUmyQw== dependencies: "@types/glob" "*" "@types/node" "*" @@ -1907,65 +2120,63 @@ dependencies: "@types/node" "*" +"@types/uuid@^8.3.1": + version "8.3.1" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.1.tgz#1a32969cf8f0364b3d8c8af9cc3555b7805df14f" + integrity sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg== + "@types/webpack-sources@^0.1.5": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.8.tgz#078d75410435993ec8a0a2855e88706f3f751f81" - integrity sha512-JHB2/xZlXOjzjBB6fMOpH1eQAfsrpqVVIbneE0Rok16WXwFaznaI5vfg75U5WgGJm7V9W1c4xeRQDjX/zwvghA== + version "0.1.9" + resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.9.tgz#da69b06eb34f6432e6658acb5a6893c55d983920" + integrity sha512-bvzMnzqoK16PQIC8AYHNdW45eREJQMd6WG/msQWX5V2+vZmODCOPb4TJcbgRljTZZTwTM4wUMcsI8FftNA7new== dependencies: "@types/node" "*" "@types/source-list-map" "*" source-map "^0.6.1" -"@types/yaml@^1.9.7": - version "1.9.7" - resolved "https://registry.yarnpkg.com/@types/yaml/-/yaml-1.9.7.tgz#2331f36e0aac91311a63d33eb026c21687729679" - integrity sha512-8WMXRDD1D+wCohjfslHDgICd2JtMATZU8CkhH8LVJqcJs6dyYj5TGptzP8wApbmEullGBSsCEzzap73DQ1HJaA== - dependencies: - yaml "*" - "@types/yargs-parser@*": - version "20.2.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" - integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== + version "20.2.1" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" + integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== "@types/yargs@^16.0.1": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.3.tgz#4b6d35bb8e680510a7dc2308518a80ee1ef27e01" - integrity sha512-YlFfTGS+zqCgXuXNV26rOIeETOkXnGQXP/pjjL9P0gO/EP9jTmc7pUBhx+jVEIxpq41RX33GQ7N3DzOSfZoglQ== + version "16.0.4" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" + integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== dependencies: "@types/yargs-parser" "*" "@types/yauzl@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af" - integrity sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA== + version "2.9.2" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.2.tgz#c48e5d56aff1444409e39fa164b0b4d4552a7b7a" + integrity sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA== dependencies: "@types/node" "*" -"@typescript-eslint/types@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.0.tgz#a33504e1ce7ac51fc39035f5fe6f15079d4dafb0" - integrity sha512-p16xMNKKoiJCVZY5PW/AfILw2xe1LfruTcfAKBj3a+wgNYP5I9ZEKNDOItoRt53p4EiPV6iRSICy8EPanG9ZVA== +"@typescript-eslint/types@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.2.tgz#fc0489c6b89773f99109fb0aa0aaddff21f52fcd" + integrity sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ== "@typescript-eslint/typescript-estree@^4.8.2": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.0.tgz#e66d4e5aa2ede66fec8af434898fe61af10c71cf" - integrity sha512-m19UQTRtxMzKAm8QxfKpvh6OwQSXaW1CdZPoCaQuLwAq7VZMNuhJmZR4g5281s2ECt658sldnJfdpSZZaxUGMQ== + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.2.tgz#a0ea8b98b274adbb2577100ba545ddf8bf7dc219" + integrity sha512-TJ0/hEnYxapYn9SGn3dCnETO0r+MjaxtlWZ2xU+EvytF0g4CqTpZL48SqSNn2hXsPolnewF30pdzR9a5Lj3DNg== dependencies: - "@typescript-eslint/types" "4.28.0" - "@typescript-eslint/visitor-keys" "4.28.0" + "@typescript-eslint/types" "4.29.2" + "@typescript-eslint/visitor-keys" "4.29.2" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.0.tgz#255c67c966ec294104169a6939d96f91c8a89434" - integrity sha512-PjJyTWwrlrvM5jazxYF5ZPs/nl0kHDZMVbuIcbpawVXaDPelp3+S9zpOz5RmVUfS/fD5l5+ZXNKnWhNYjPzCvw== +"@typescript-eslint/visitor-keys@4.29.2": + version "4.29.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz#d2da7341f3519486f50655159f4e5ecdcb2cd1df" + integrity sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag== dependencies: - "@typescript-eslint/types" "4.28.0" + "@typescript-eslint/types" "4.29.2" eslint-visitor-keys "^2.0.0" "@webassemblyjs/ast@1.11.0": @@ -2090,9 +2301,9 @@ "@xtuc/long" "4.2.2" "@webcomponents/custom-elements@^1.1.0": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@webcomponents/custom-elements/-/custom-elements-1.4.3.tgz#1800d49f38bb4425ebfd160b50115e62776109d7" - integrity sha512-iD0YW46SreUQANGccywK/eC+gZELNHocZZrY2fGwrIlx/biQOTkAF9IohisibHbrmIHmA9pVCIdGwzfO+W0gig== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@webcomponents/custom-elements/-/custom-elements-1.5.0.tgz#7d07ff4979312dda167cc0a2b7586e76dc1cf6ab" + integrity sha512-c+7jPQCs9h/BYVcZ2Kna/3tsl3A/9EyXfvWjp5RiTDm1OpTcbZaCa1z4RNcTe/hUtXaqn64JjNW1yrWT+rZ8gg== "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -2142,15 +2353,20 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +acorn-walk@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" + integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== + acorn@^6.1.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== -acorn@^8.2.1: - version "8.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.0.tgz#af53266e698d7cffa416714b503066a82221be60" - integrity sha512-ULr0LDaEqQrMFGyQ3bhJkLsbtrQ8QibAseGZeaSUiT/6zb9IvIkomWHJIvgvwad+hinRAgsI51JcWk2yvwyL+w== +acorn@^8.2.1, acorn@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== add-stream@^1.0.0: version "1.0.0" @@ -2165,11 +2381,6 @@ adjust-sourcemap-loader@^4.0.0: loader-utils "^2.0.0" regex-parser "^2.2.11" -adm-zip@0.4.11: - version "0.4.11" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.11.tgz#2aa54c84c4b01a9d0fb89bb11982a51f13e3d62a" - integrity sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA== - adm-zip@^0.4.9, adm-zip@~0.4.3: version "0.4.16" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" @@ -2243,17 +2454,7 @@ ajv@8.2.0: require-from-string "^2.0.2" uri-js "^4.2.2" -ajv@^5.1.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -ajv@^6.1.0, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@~6.12.6: +ajv@^6.1.0, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.12.6, ajv@~6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2264,9 +2465,9 @@ ajv@^6.1.0, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@~6.12.6: uri-js "^4.2.2" ajv@^8.0.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.0.tgz#60cc45d9c46a477d80d92c48076d972c342e5720" - integrity sha512-cnUG4NSBiM4YFBxgZIj/In3/6KX+rQ2l2YPRVcvAMQGWEPKuXoPIhxzwqh31jA3IPbI4qEOp/5ILI4ynioXsGQ== + version "8.6.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.2.tgz#2fb45e0e5fcbc0813326c1c3da535d1881bb0571" + integrity sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w== dependencies: fast-deep-equal "^3.1.1" json-schema-traverse "^1.0.0" @@ -2293,6 +2494,11 @@ alphanum-sort@^1.0.2: resolved "https://registry.yarnpkg.com/angular/-/angular-1.7.9.tgz#e52616e8701c17724c3c238cfe4f9446fd570bc4" integrity sha512-5se7ZpcOtu0MBFlzGv5dsM1quQDoDeUTwZrWjGtTNA7O88cD8TEk5IEKCTDa3uECV9XnvKREVUr7du1ACiWGFQ== +"angular-1.8@npm:angular@1.8": + version "1.8.2" + resolved "https://registry.yarnpkg.com/angular/-/angular-1.8.2.tgz#5983bbb5a9fa63e213cb7749199e0d352de3a2f1" + integrity sha512-IauMOej2xEe7/7Ennahkbb5qd/HFADiNuLSESz9Q27inmi32zB0lnAsFeLEWcox3Gd1F6YhNd1CP7/9IukJ0Gw== + "angular-mocks-1.5@npm:angular-mocks@1.5": version "1.5.11" resolved "https://registry.yarnpkg.com/angular-mocks/-/angular-mocks-1.5.11.tgz#a0e1dd0ea55fd77ee7a757d75536c5e964c86f81" @@ -2308,16 +2514,11 @@ alphanum-sort@^1.0.2: resolved "https://registry.yarnpkg.com/angular-mocks/-/angular-mocks-1.7.9.tgz#0a3b7e28b9a493b4e3010ed2b0f69a68e9b4f79b" integrity sha512-LQRqqiV3sZ7NTHBnNmLT0bXtE5e81t97+hkJ56oU0k3dqKv1s6F+nBWRlOVzqHWPGFOiPS8ZJVdrS8DFzHyNIA== -"angular-mocks@npm:angular-mocks@1.8": +"angular-mocks-1.8@npm:angular-mocks@1.8": version "1.8.2" resolved "https://registry.yarnpkg.com/angular-mocks/-/angular-mocks-1.8.2.tgz#dc022420b86978cf317a8447c116c0be73a853bf" integrity sha512-I5L3P0l21HPdVsP4A4qWmENt4ePjjbkDFdAzOaM7QiibFySbt14DptPbt2IjeG4vFBr4vSLbhIz8Fk03DISl8Q== -"angular@npm:angular@1.8": - version "1.8.2" - resolved "https://registry.yarnpkg.com/angular/-/angular-1.8.2.tgz#5983bbb5a9fa63e213cb7749199e0d352de3a2f1" - integrity sha512-IauMOej2xEe7/7Ennahkbb5qd/HFADiNuLSESz9Q27inmi32zB0lnAsFeLEWcox3Gd1F6YhNd1CP7/9IukJ0Gw== - ansi-align@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" @@ -2546,11 +2747,6 @@ array-each@^1.0.0, array-each@^1.0.1: resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= - 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" @@ -2725,9 +2921,9 @@ async@^2.1.2, async@^2.6.2: lodash "^4.17.14" async@^3.1.0, async@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" - integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== + version "3.2.1" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.1.tgz#d3274ec66d107a47476a4c49136aacdb00665fc8" + integrity sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg== asynckit@^0.4.0: version "0.4.0" @@ -2757,7 +2953,7 @@ aws-sign2@~0.7.0: resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= -aws4@^1.6.0, aws4@^1.8.0: +aws4@^1.8.0: version "1.11.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== @@ -2789,9 +2985,9 @@ babel-plugin-polyfill-corejs2@^0.2.0: semver "^6.1.1" babel-plugin-polyfill-corejs3@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.3.tgz#72add68cf08a8bf139ba6e6dfc0b1d504098e57b" - integrity sha512-rCOFzEIJpJEAU14XCcV/erIf/wZQMmMT5l5vXOpL5uoznyOGfDIjPj6FVytMvtzaKSTSVKouOCTPJ5OMUZH30g== + version "0.2.4" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz#68cb81316b0e8d9d721a92e0009ec6ecd4cd2ca9" + integrity sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ== dependencies: "@babel/helper-define-polyfill-provider" "^0.2.2" core-js-compat "^3.14.0" @@ -3072,16 +3268,16 @@ brotli@^1.3.2: dependencies: base64-js "^1.1.2" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.6.4, browserslist@^4.9.1: - version "4.16.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" - integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.16.7, browserslist@^4.6.4, browserslist@^4.9.1: + version "4.16.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.7.tgz#108b0d1ef33c4af1b587c54f390e7041178e4335" + integrity sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA== dependencies: - caniuse-lite "^1.0.30001219" + caniuse-lite "^1.0.30001248" colorette "^1.2.2" - electron-to-chromium "^1.3.723" + electron-to-chromium "^1.3.793" escalade "^3.1.1" - node-releases "^1.1.71" + node-releases "^1.1.73" browserstack-local@^1.3.7: version "1.4.8" @@ -3115,6 +3311,11 @@ browserstacktunnel-wrapper@^2.0.4: https-proxy-agent "^2.2.1" unzipper "^0.9.3" +btoa-lite@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" + integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= + buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" @@ -3149,9 +3350,9 @@ buffer-fill@^1.0.0: integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== buffer-indexof-polyfill@~1.0.0: version "1.0.2" @@ -3317,14 +3518,6 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - camelcase-keys@^6.2.2: version "6.2.2" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" @@ -3334,11 +3527,6 @@ camelcase-keys@^6.2.2: map-obj "^4.0.0" quick-lru "^4.0.1" -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= - camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" @@ -3364,10 +3552,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001219: - version "1.0.30001239" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001239.tgz#66e8669985bb2cb84ccb10f68c25ce6dd3e4d2b8" - integrity sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001248: + version "1.0.30001251" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz#6853a606ec50893115db660f82c094d18f096d85" + integrity sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A== canonical-path@1.0.0: version "1.0.0" @@ -3430,9 +3618,9 @@ chalk@^3.0.0: supports-color "^7.1.0" chalk@^4.1.0, chalk@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -3488,7 +3676,7 @@ chokidar@^2.0.0, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chownr@^1.1.1: +chownr@^1.1.1, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -3539,33 +3727,20 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -cldr-data-downloader@^0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/cldr-data-downloader/-/cldr-data-downloader-0.3.5.tgz#f5445cb9d222bf7fa8426c62e0ae9d7d4897b243" - integrity sha512-uyIMa1K98DAp/PE7dYpq2COIrkWn681Atjng1GgEzeJzYb1jANtugtp9wre6+voE+qzVC8jtWv6E/xZ1GTJdlw== - dependencies: - adm-zip "0.4.11" - mkdirp "0.5.0" - nopt "3.0.x" - progress "1.1.8" - q "1.0.1" - request "~2.87.0" - request-progress "0.3.1" - -cldr@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cldr/-/cldr-7.0.0.tgz#8e0f42acc21b5762842cf23a747120be898447fe" - integrity sha512-BmD93+RhHGkdVRO9LYL6kd7IA9ANxnpH1A+OM6FdhKVYXqRgBaDmt9P83VaQB6gMBaFvOl4IozW/g3ViLn9LeQ== +cldr@5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/cldr/-/cldr-5.7.0.tgz#8c466bdc2500fd293462029631011adcd55bc5ae" + integrity sha512-Pyoh0kwXJIUvbAvQoQqKIr0pKWwWfkcYCIDKWmVIxJ9HftSsg57AqyfW1EzWRcP4nJj40WX4vB/lXQ+Uw4NbNA== dependencies: - escodegen "^2.0.0" + escodegen "^1.12.0" esprima "^4.0.1" memoizeasync "^1.1.0" passerror "^1.1.1" pegjs "^0.10.0" seq "^0.3.5" unicoderegexp "^0.4.1" - xmldom "^0.6.0" - xpath "^0.0.32" + xmldom "^0.3.0" + xpath "^0.0.27" cldrjs@0.5.5: version "0.5.5" @@ -3719,11 +3894,6 @@ cloneable-readable@^1.0.0: process-nextick-args "^2.0.0" readable-stream "^2.3.5" -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -3771,9 +3941,9 @@ color-name@^1.0.0, color-name@^1.1.4, color-name@~1.1.4: integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== color-string@^1.5.2: - version "1.5.5" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.5.tgz#65474a8f0e7439625f3d27a6a19d89fc45223014" - integrity sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg== + version "1.6.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.6.0.tgz#c3915f61fe267672cb7e1e064c9d692219f6c312" + integrity sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA== dependencies: color-name "^1.0.0" simple-swizzle "^0.2.2" @@ -3792,14 +3962,14 @@ color@3.0.x: color-string "^1.5.2" colord@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/colord/-/colord-2.0.1.tgz#1e7fb1f9fa1cf74f42c58cb9c20320bab8435aa0" - integrity sha512-vm5YpaWamD0Ov6TSG0GGmUIwstrWcfKQV/h2CmbR7PbNu41+qdB5PW9lpzhjedrpm08uuYvcXi0Oel1RLZIJuA== + version "2.7.0" + resolved "https://registry.yarnpkg.com/colord/-/colord-2.7.0.tgz#706ea36fe0cd651b585eb142fe64b6480185270e" + integrity sha512-pZJBqsHz+pYyw3zpX6ZRXWoCHM1/cvFikY9TV8G3zcejCaKE0lhankoj8iScyrrePA8C7yJ5FStfA9zbcOnw7Q== colorette@^1.2.1, colorette@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" - integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + version "1.3.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af" + integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w== colors@1.0.3: version "1.0.3" @@ -3824,7 +3994,7 @@ colorspace@1.1.x: color "3.0.x" text-hex "1.0.x" -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.5, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -4017,15 +4187,15 @@ conventional-changelog-conventionalcommits@^4.5.0: q "^1.5.1" conventional-changelog-core@^4.2.1: - version "4.2.2" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.2.tgz#f0897df6d53b5d63dec36b9442bd45354f8b3ce5" - integrity sha512-7pDpRUiobQDNkwHyJG7k9f6maPo9tfPzkSWbRq97GGiZqisElhnvUZSvyQH20ogfOjntB5aadvv6NNcKL1sReg== + version "4.2.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.3.tgz#ce44d4bbba4032e3dc14c00fcd5b53fc00b66433" + integrity sha512-MwnZjIoMRL3jtPH5GywVNqetGILC7g6RQFvdb8LRU/fA/338JbeWAku3PZ8yQ+mtVRViiISqJlb0sOz0htBZig== dependencies: add-stream "^1.0.0" - conventional-changelog-writer "^4.0.18" + conventional-changelog-writer "^5.0.0" conventional-commits-parser "^3.2.0" dateformat "^3.0.0" - get-pkg-repo "^1.0.0" + get-pkg-repo "^4.0.0" git-raw-commits "^2.0.8" git-remote-origin-url "^2.0.0" git-semver-tags "^4.1.1" @@ -4034,7 +4204,6 @@ conventional-changelog-core@^4.2.1: q "^1.5.1" read-pkg "^3.0.0" read-pkg-up "^3.0.0" - shelljs "^0.8.3" through2 "^4.0.0" conventional-changelog-ember@^2.0.9: @@ -4078,12 +4247,11 @@ conventional-changelog-preset-loader@^2.3.4: resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== -conventional-changelog-writer@^4.0.18: - version "4.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz#1ca7880b75aa28695ad33312a1f2366f4b12659f" - integrity sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw== +conventional-changelog-writer@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-5.0.0.tgz#c4042f3f1542f2f41d7d2e0d6cad23aba8df8eec" + integrity sha512-HnDh9QHLNWfL6E1uHz6krZEQOgm8hN7z/m7tT16xwd802fwgMN0Wqd7AQYVkhpsjDUx/99oo+nGgvKF657XP5g== dependencies: - compare-func "^2.0.0" conventional-commits-filter "^2.0.7" dateformat "^3.0.0" handlebars "^4.7.6" @@ -4188,16 +4356,16 @@ copy-webpack-plugin@8.1.1: serialize-javascript "^5.0.1" core-js-bundle@^3.10.2: - version "3.15.1" - resolved "https://registry.yarnpkg.com/core-js-bundle/-/core-js-bundle-3.15.1.tgz#4598cbd9d2a800fae050546e74d43b6a8407f9ee" - integrity sha512-zaIQXPUH8eqA74UWg4TfIeyzoY+aPNxDU5SG/eN6HdX9oAimMkJ7V5vBIrFiSYJKekHDaGMEe+47kM5M4Hkikg== + version "3.16.1" + resolved "https://registry.yarnpkg.com/core-js-bundle/-/core-js-bundle-3.16.1.tgz#410c73317f7154dc4aac0674556b7003a7f4c47f" + integrity sha512-pPavAOLKXD2YXNBhS3jq4WMGJPeqgo4W9WZ7GebxXTZY/jvnD5ID+J3nUOCS7UXwCNsQKbbUg1+hp/4rmvzNeg== core-js-compat@^3.14.0, core-js-compat@^3.6.2: - version "3.15.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.15.1.tgz#1afe233716d37ee021956ef097594071b2b585a7" - integrity sha512-xGhzYMX6y7oEGQGAJmP2TmtBLvR4nZmRGEcFa3ubHOq5YEp51gGN9AovVa0AoujGZIq+Wm6dISiYyGNfdflYww== + version "3.16.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.1.tgz#c44b7caa2dcb94b673a98f27eee1c8312f55bc2d" + integrity sha512-NHXQXvRbd4nxp9TEmooTJLUf94ySUG6+DSsscBpTftN1lQLQ4LjnWvc7AoIo4UjDsFF3hB8Uh5LLCRRdaiT5MQ== dependencies: - browserslist "^4.16.6" + browserslist "^4.16.7" semver "7.0.0" core-js@3.12.0: @@ -4316,9 +4484,9 @@ css-color-names@^1.0.1: integrity sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA== css-declaration-sorter@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.0.3.tgz#9dfd8ea0df4cc7846827876fafb52314890c21a9" - integrity sha512-52P95mvW1SMzuRZegvpluT6yEv0FqQusydKQPZsNN5Q7hh8EwQvN8E2nwuJ16BBvNN6LcoIZXu/Bk58DAhrrxw== + version "6.1.1" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.1.1.tgz#77b32b644ba374bc562c0fc6f4fdaba4dfb0b749" + integrity sha512-BZ1aOuif2Sb7tQYY1GeCjG7F++8ggnwUkH5Ictw0mrdpqpEd+zWmcPdstnH2TItlb74FqR0DrVEieon221T/1Q== dependencies: timsort "^0.3.0" @@ -4374,15 +4542,15 @@ css-prefers-color-scheme@^3.1.1: dependencies: postcss "^7.0.5" -css-select@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-3.1.2.tgz#d52cbdc6fee379fba97fb0d3925abbd18af2d9d8" - integrity sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA== +css-select@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067" + integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA== dependencies: boolbase "^1.0.0" - css-what "^4.0.0" - domhandler "^4.0.0" - domutils "^2.4.3" + css-what "^5.0.0" + domhandler "^4.2.0" + domutils "^2.6.0" nth-check "^2.0.0" css-tree@^1.1.2: @@ -4393,10 +4561,10 @@ css-tree@^1.1.2: mdn-data "2.0.14" source-map "^0.6.1" -css-what@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-4.0.0.tgz#35e73761cab2eeb3d3661126b23d7aa0e8432233" - integrity sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A== +css-what@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" + integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== css@^2.0.0: version "2.2.4" @@ -4473,13 +4641,14 @@ cssnano-utils@^2.0.1: integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ== cssnano@^5.0.0: - version "5.0.6" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.6.tgz#2a91ad34c6521ae31eab3da9c90108ea3093535d" - integrity sha512-NiaLH/7yqGksFGsFNvSRe2IV/qmEBAeDE64dYeD8OBrgp6lE8YoMeQJMtsv5ijo6MPyhuoOvFhI94reahBRDkw== + version "5.0.7" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.7.tgz#e81894bdf31aa01a0ca3d1d0eee47be18f7f3012" + integrity sha512-7C0tbb298hef3rq+TtBbMuezBQ9VrFtrQEsPNuBKNVgWny/67vdRsnq8EoNu7TRjAHURgYvWlRIpCUmcMZkRzw== dependencies: - cosmiconfig "^7.0.0" cssnano-preset-default "^5.1.3" is-resolvable "^1.1.0" + lilconfig "^2.0.3" + yaml "^1.10.2" csso@^4.2.0: version "4.2.0" @@ -4495,13 +4664,6 @@ csv-streamify@^3.0.4: dependencies: through2 "2.0.1" -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= - dependencies: - array-find-index "^1.0.1" - custom-event@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" @@ -4549,7 +4711,14 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@4, debug@4.3.1, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: +debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + dependencies: + ms "2.1.2" + +debug@4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -4578,7 +4747,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.1.2, decamelize@^1.2.0: +decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -4952,7 +5121,7 @@ domelementtype@^2.0.1, domelementtype@^2.2.0: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== -domhandler@^4.0.0, domhandler@^4.2.0: +domhandler@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.0.tgz#f9768a5f034be60a89a27c2e4d0f74eba0d8b059" integrity sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA== @@ -4964,7 +5133,7 @@ domino@~2.1.6: resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.6.tgz#fe4ace4310526e5e7b9d12c7de01b7f485a57ffe" integrity sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ== -domutils@^2.4.3: +domutils@^2.6.0: version "2.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.7.0.tgz#8ebaf0c41ebafcf55b0b72ec31c56323712c5442" integrity sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg== @@ -5013,9 +5182,9 @@ duplexify@^3.6.0: stream-shift "^1.0.0" duplexify@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.1.tgz#7027dc374f157b122a8ae08c2d3ea4d2d953aa61" - integrity sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA== + version "4.1.2" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" + integrity sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw== dependencies: end-of-stream "^1.4.1" inherits "^2.0.3" @@ -5045,16 +5214,6 @@ ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: dependencies: safe-buffer "^5.0.1" -ecstatic@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/ecstatic/-/ecstatic-3.3.2.tgz#6d1dd49814d00594682c652adb66076a69d46c48" - integrity sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog== - dependencies: - he "^1.1.1" - mime "^1.6.0" - minimist "^1.1.0" - url-join "^2.0.5" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -5067,10 +5226,10 @@ ejs@^3.1.6: dependencies: jake "^10.6.1" -electron-to-chromium@^1.3.723: - version "1.3.755" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.755.tgz#4b6101f13de910cf3f0a1789ddc57328133b9332" - integrity sha512-BJ1s/kuUuOeo1bF/EM2E4yqW9te0Hpof3wgwBx40AWJE18zsD1Tqo0kr7ijnOc+lRsrlrqKPauJAHqaxOItoUA== +electron-to-chromium@^1.3.793: + version "1.3.806" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.806.tgz#21502100f11aead6c501d1cd7f2504f16c936642" + integrity sha512-AH/otJLAAecgyrYp0XK1DPiGVWcOgwPeJBOLeuFQ5l//vhQhwC9u6d+GijClqJAmsHG4XDue81ndSQPohUu0xA== emoji-regex@^7.0.1: version "7.0.3" @@ -5286,7 +5445,7 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -escodegen@^1.8.1: +escodegen@^1.12.0, escodegen@^1.8.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== @@ -5553,7 +5712,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0, extend@^3.0.2, extend@~3.0.1, extend@~3.0.2: +extend@^3.0.0, extend@^3.0.2, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -5612,27 +5771,21 @@ fancy-log@^1.3.2: parse-node-version "^1.0.0" time-stamp "^1.0.0" -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - fast-deep-equal@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^3.1.1, fast-glob@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" - integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" + glob-parent "^5.1.2" merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" + micromatch "^4.0.4" fast-json-stable-stringify@2.1.0, fast-json-stable-stringify@^2.0.0: version "2.1.0" @@ -5650,9 +5803,9 @@ fast-levenshtein@~2.0.6: integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fast-safe-stringify@^2.0.4: - version "2.0.7" - resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" - integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== + version "2.0.8" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz#dc2af48c46cf712b683e849b2bbd446b32de936f" + integrity sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag== fast-text-encoding@^1.0.0, fast-text-encoding@^1.0.3: version "1.0.3" @@ -5667,9 +5820,9 @@ fast-url-parser@^1.1.3: punycode "^1.3.2" fastq@^1.6.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" - integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== + version "1.11.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.1.tgz#5d8175aae17db61947f8b162cfc7f63264d22807" + integrity sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw== dependencies: reusify "^1.0.4" @@ -5724,9 +5877,9 @@ filelist@^1.0.1: minimatch "^3.0.4" filesize@^6.1.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.3.0.tgz#dff53cfb3f104c9e422f346d53be8dbcc971bf11" - integrity sha512-ytx0ruGpDHKWVoiui6+BY/QMNngtDQ/pJaFwfBpQif0J63+E8DLdFyqS3NkKQn7vIruUEpoGD9JUJSg7Kp+I0g== + version "6.4.0" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.4.0.tgz#914f50471dd66fdca3cefe628bd0cde4ef769bcd" + integrity sha512-mjFIpOHC4jbfcTfoh4rkWpI31mF7viw9ikj/JyLoKzqlwG/YsefKfvYlYhdYdg/9mtK2z1AzgN/0LvVQ3zdlSQ== filing-cabinet@^3.0.0: version "3.0.0" @@ -5856,14 +6009,15 @@ fined@^1.0.1: parse-filepath "^1.0.1" firebase-tools@^9.0.0: - version "9.14.0" - resolved "https://registry.yarnpkg.com/firebase-tools/-/firebase-tools-9.14.0.tgz#30d837c7ce8454746e69c5bf7e4f3689ae686dcb" - integrity sha512-CHR1Xw5LJ+hDQ/SaRqvuNXJEmpbPsOEtNRj6oD44VFGRp9ZTjY3irilSj6uv7S2P1A1XLEGyO7jEpCH5mkc9RQ== + version "9.16.5" + resolved "https://registry.yarnpkg.com/firebase-tools/-/firebase-tools-9.16.5.tgz#c6d38bded228fd2a5dfd781a42287c78dab66b86" + integrity sha512-dp/cvt+39wv5CO+MzX36snmRnvn5j7Nn73QfKiIvHXAT5Ek/fRJn2pWnaxP+bhd19SuEY1Buf8PcdlMl42hzlw== dependencies: "@google-cloud/pubsub" "^2.7.0" "@types/archiver" "^5.1.0" JSONStream "^1.2.1" abort-controller "^3.0.0" + ajv "^6.12.6" archiver "^5.0.0" body-parser "^1.19.0" chokidar "^3.0.2" @@ -5986,16 +6140,7 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@~2.3.1, form-data@~2.3.2: +form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== @@ -6058,7 +6203,7 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== @@ -6214,22 +6359,16 @@ get-own-enumerable-property-symbols@^3.0.0: resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== -get-pkg-repo@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" - integrity sha1-xztInAbYDMVTbCyFP54FIyBWly0= +get-pkg-repo@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-4.1.2.tgz#c4ffd60015cf091be666a0212753fc158f01a4c0" + integrity sha512-/FjamZL9cBYllEbReZkxF2IMh80d8TJoC4e3bmLNif8ibHw95aj0N/tzqK0kZz9eU/3w3dL6lF4fnnX/sDdW3A== dependencies: - hosted-git-info "^2.1.4" - meow "^3.3.0" - normalize-package-data "^2.3.0" - parse-github-repo-url "^1.3.0" + "@hutson/parse-repository-url" "^3.0.0" + hosted-git-info "^4.0.0" + meow "^7.0.0" through2 "^2.0.0" -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= - get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -6310,7 +6449,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: +glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -6480,10 +6619,10 @@ google-auth-library@^6.1.3: jws "^4.0.0" lru-cache "^6.0.0" -google-auth-library@^7.0.0, google-auth-library@^7.0.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-7.1.2.tgz#29fc0fe8b6d5a59b93b7cb561b1a28bcc93360b7" - integrity sha512-FMipHgfe2u1LzWsf2n9zEB9KsJ8M3n8OYTHbHtlkzPCyo7IknXQR5X99nfvwUHGuX+iEpihUZxDuPm7+qBYeXg== +google-auth-library@^7.0.0, google-auth-library@^7.6.1: + version "7.6.1" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-7.6.1.tgz#be3d393212fc9dafee7d05975c4ebe88efecc16d" + integrity sha512-aP/WTx+rE3wQ3zPgiCZsJ1EIb2v7P+QwxVwAqrKjcPz4SK57kyAfcX75VoAgjtwZzl70upcNlvFn8FSmC4nMBQ== dependencies: arrify "^2.0.0" base64-js "^1.3.0" @@ -6530,10 +6669,10 @@ google-closure-compiler@20210601.0.0: google-closure-compiler-osx "^20210601.0.0" google-closure-compiler-windows "^20210601.0.0" -google-gax@^2.12.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-2.16.0.tgz#ec6412b6b2e5331ec11f34eabf279c5b0eeb4346" - integrity sha512-IwHxHs9gEbvQ0Ne12taqDjJT9cpoLqM7tJamvctIGmkyqnQrdnbDJTGK2Rf85piMYGzmOuPKas9TkhCaoTVIJA== +google-gax@^2.17.1: + version "2.24.1" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-2.24.1.tgz#470480ab4968c4ca224ba3ebb9e5f6fefc5d4531" + integrity sha512-/oBk3S2jKZO5e85Dnqe0Zo3iAkQuMhy3BfczU6LoLxsoY99E/8EmOPiT7gHxb5KWZzghjo5HyITExLiuIjJ+0A== dependencies: "@grpc/grpc-js" "~1.3.0" "@grpc/proto-loader" "^0.6.1" @@ -6541,17 +6680,18 @@ google-gax@^2.12.0: abort-controller "^3.0.0" duplexify "^4.0.0" fast-text-encoding "^1.0.3" - google-auth-library "^7.0.2" + google-auth-library "^7.6.1" is-stream-ended "^0.1.4" node-fetch "^2.6.1" object-hash "^2.1.1" - protobufjs "^6.10.2" + proto3-json-serializer "^0.1.1" + protobufjs "6.11.2" retry-request "^4.0.0" google-p12-pem@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.1.0.tgz#a1421b432fcc926812e3835289807170768a9885" - integrity sha512-JUtEHXL4DY/N+xhlm7TC3qL797RPAtk0ZGXNs3/gWyiDHYoA/8Rjes0pztkda+sZv4ej1EoO2KhWgW5V9KTrSQ== + version "3.1.2" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.1.2.tgz#c3d61c2da8e10843ff830fdb0d2059046238c1d4" + integrity sha512-tjf3IQIt7tWCDsa0ofDQ1qqSCNzahXDxdAGJDbruWqu3eCg5CKLYKN+hi0s6lfvzYZ1GDVr+oDF9OOWlDSdf0A== dependencies: node-forge "^0.10.0" @@ -6572,10 +6712,10 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@4.2.6, graceful-fs@^4.0.0, 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.3, 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== +graceful-fs@4.2.8, graceful-fs@^4.0.0, 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.3, graceful-fs@^4.2.4, graceful-fs@^4.2.6: + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== graphviz@0.0.9: version "0.0.9" @@ -6585,9 +6725,9 @@ graphviz@0.0.9: temp "~0.4.0" gtoken@^5.0.4: - version "5.3.0" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.3.0.tgz#6536eb2880d9829f0b9d78f756795d4d9064b217" - integrity sha512-mCcISYiaRZrJpfqOs0QWa6lfEM/C1V9ASkzFmuz43XBb5s1Vynh+CZy1ECeeJXVGx2PRByjYzb4Y4/zr1byr0w== + version "5.3.1" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.3.1.tgz#c1c2598a826f2b5df7c6bb53d7be6cf6d50c3c78" + integrity sha512-yqOREjzLHcbzz1UrQoxhBtpk8KjrVhuqPE7od1K2uhyxG2BHjKZetlbLw/SPZak/QqTIQW+addS+EcjqQsZbwQ== dependencies: gaxios "^4.0.0" google-p12-pem "^3.0.3" @@ -6674,14 +6814,6 @@ har-schema@^2.0.0: resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - integrity sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0= - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - har-validator@~5.1.3: version "5.1.5" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" @@ -6734,6 +6866,13 @@ has-symbols@^1.0.1, has-symbols@^1.0.2: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -6789,7 +6928,7 @@ has@^1.0.3: dependencies: traverse ">=0.2.4" -he@^1.1.1: +he@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -6816,7 +6955,7 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -hosted-git-info@^4.0.1: +hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961" integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg== @@ -6928,21 +7067,23 @@ http-proxy@^1.13.0, http-proxy@^1.17.0, http-proxy@^1.18.0: follow-redirects "^1.0.0" requires-port "^1.0.0" -http-server@^0.12.3: - version "0.12.3" - resolved "https://registry.yarnpkg.com/http-server/-/http-server-0.12.3.tgz#ba0471d0ecc425886616cb35c4faf279140a0d37" - integrity sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA== +http-server@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/http-server/-/http-server-13.0.0.tgz#27ab5f3bad0e27a29965a4029c26170162f7b98f" + integrity sha512-tqOx2M1CiZ3aVaE7Ue/0lup9kOG+Zqg6wdT1HygvxFnvPpU9doBMPcQ1ffT0/QS3J9ua35gipg0o3Dr8N0K0Tg== dependencies: basic-auth "^1.0.3" colors "^1.4.0" corser "^2.0.1" - ecstatic "^3.3.2" + he "^1.1.0" http-proxy "^1.18.0" + mime "^1.6.0" minimist "^1.2.5" opener "^1.5.1" portfinder "^1.0.25" secure-compare "3.0.1" union "~0.5.0" + url-join "^2.0.5" http-signature@~1.2.0: version "1.2.0" @@ -6984,10 +7125,10 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.0.tgz#3dbd5d28e76234689ee29bb41e048f28e3e46616" - integrity sha512-xK7lO0EtSzfFPiw+oQncQVy/XqV7UVVjxBByc+Iv5iK3yhW9boDoWgvZy3OGo48QKg/hUtZkzz0hi2HXa0kn7w== +husky@7.0.2, husky@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.2.tgz#21900da0f30199acca43a46c043c4ad84ae88dff" + integrity sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg== iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" @@ -7071,13 +7212,6 @@ incremental-dom@0.7.0: resolved "https://registry.yarnpkg.com/incremental-dom/-/incremental-dom-0.7.0.tgz#b03664731bdc430035f32df7d76fa56daedee9b8" integrity sha512-SBHQ6AiCmtwh7TU9hjq2CspasJe7ggGa9k+qYZft+d5Qq9v7V+07wlnRSZH5GGYjI8wn6U5p7dDua7f1bih52g== -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= - dependencies: - repeating "^2.0.0" - indent-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" @@ -7151,9 +7285,9 @@ inquirer@8.0.0: through "^2.3.6" inquirer@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.1.tgz#7c53d94c6d03011c7bb2a947f0dca3b98246c26a" - integrity sha512-hUDjc3vBkh/uk1gPfMAD/7Z188Q8cvTGl0nxwaCdwSbzFh6ZKkZh+s2ozVxbE5G9ZNRyeY0+lgbAIOUFsFf98w== + version "8.1.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.2.tgz#65b204d2cd7fb63400edd925dfe428bafd422e3d" + integrity sha512-DHLKJwLPNgkfwNmsuEUKSejJFbkv0FMO9SMiQbjI3n5NQuCrSIBqP66ggqyz2a6t2qEolKrMjhQ3+W/xXgUQ+Q== dependencies: ansi-escapes "^4.2.1" chalk "^4.1.1" @@ -7165,7 +7299,7 @@ inquirer@^8.0.0: mute-stream "0.0.8" ora "^5.3.0" run-async "^2.4.0" - rxjs "^6.6.6" + rxjs "^7.2.0" string-width "^4.1.0" strip-ansi "^6.0.0" through "^2.3.6" @@ -7267,11 +7401,12 @@ is-accessor-descriptor@^1.0.0: kind-of "^6.0.0" is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" @@ -7322,9 +7457,9 @@ is-color-stop@^1.1.0: rgba-regex "^1.0.0" is-core-module@^2.1.0, is-core-module@^2.2.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" - integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== + version "2.5.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491" + integrity sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg== dependencies: has "^1.0.3" @@ -7343,9 +7478,11 @@ is-data-descriptor@^1.0.0: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" - integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A== + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" is-descriptor@^0.1.0: version "0.1.6" @@ -7387,11 +7524,6 @@ is-extglob@^2.1.0, is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -7569,12 +7701,12 @@ is-reference@^1.1.2: "@types/estree" "*" is-regex@^1.0.4: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" - integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== dependencies: call-bind "^1.0.2" - has-symbols "^1.0.2" + has-tostringtag "^1.0.0" is-regexp@^1.0.0: version "1.0.0" @@ -7614,9 +7746,9 @@ is-stream@^1.1.0: integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== is-text-path@^1.0.1: version "1.0.1" @@ -7789,10 +7921,10 @@ jasmine-ajax@^4.0.0: resolved "https://registry.yarnpkg.com/jasmine-ajax/-/jasmine-ajax-4.0.0.tgz#7d8ba7e47e3f7e780e155fe9aa563faafa7e1a26" integrity sha512-htTxNw38BSHxxmd8RRMejocdPqLalGHU6n3HWFbzp/S8AuTQd1MYjkSH3dYDsbZ7EV1Xqx/b94m3tKaVSVBV2A== -jasmine-core@^3.5.0, jasmine-core@^3.6.0, jasmine-core@~3.7.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.7.1.tgz#0401327f6249eac993d47bbfa18d4e8efacfb561" - integrity sha512-DH3oYDS/AUvvr22+xUBW62m1Xoy7tUlY1tsxKEJvl5JeJ7q8zd1K5bUwiOxdH+erj6l2vAMM3hV25Xs9/WrmuQ== +jasmine-core@^3.5.0, jasmine-core@^3.6.0, jasmine-core@~3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.8.0.tgz#815399aae5aa5d9beeb1262805f981b99ffc9bf0" + integrity sha512-zl0nZWDrmbCiKns0NcjkFGYkVTGCPUgoHypTaj+G2AzaWus7QGoXARSlYsSle2VRpSdfJmM+hzmFKzQNhF2kHg== jasmine-core@~2.8.0: version "2.8.0" @@ -7816,13 +7948,13 @@ jasmine@2.8.0: glob "^7.0.6" jasmine-core "~2.8.0" -jasmine@^3.5.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.7.0.tgz#d36638c0c815e6ad5666676e386d79e2ccb70835" - integrity sha512-wlzGQ+cIFzMEsI+wDqmOwvnjTvolLFwlcpYLCqSPPH0prOQaW3P+IzMhHYn934l1imNvw07oCyX+vGUv3wmtSQ== +jasmine@^3.5.0, jasmine@^3.7.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.8.0.tgz#4497bc797eede7ca9de18179aedd4cf50245d8dc" + integrity sha512-kdQ3SfcNpMbbMdgJPLyFe9IksixdnrgYaCJapP9sS0aLgdWdIZADNXEr+11Zafxm1VDfRSC5ZL4fzXT0bexzXw== dependencies: glob "^7.1.6" - jasmine-core "~3.7.0" + jasmine-core "~3.8.0" jasminewd2@^2.1.0: version "2.2.0" @@ -7839,9 +7971,9 @@ jest-worker@26.6.2, jest-worker@^26.2.1, jest-worker@^26.3.0, jest-worker@^26.6. supports-color "^7.0.0" jest-worker@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.2.tgz#4ebeb56cef48b3e7514552f80d0d80c0129f0b05" - integrity sha512-EoBdilOTTyOgmHXtw/cPc+ZrCA0KJMrkXzkrPGNwLmnvvlN1nj7MPrxpT7m+otSv2e1TLaVffzDnE/LB14zJMg== + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.6.tgz#a5fdb1e14ad34eb228cfe162d9f729cdbfa28aed" + integrity sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA== dependencies: "@types/node" "*" merge-stream "^2.0.0" @@ -7942,11 +8074,6 @@ json-ptr@^2.2.0: dependencies: tslib "^2.2.0" -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -8035,9 +8162,9 @@ jsprim@^1.2.2: verror "1.10.0" jszip@^3.1.3, jszip@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.6.0.tgz#839b72812e3f97819cc13ac4134ffced95dd6af9" - integrity sha512-jgnQoG9LKnWO3mnVNBnfhkh0QknICd1FGSrXcgrl67zioyJ4wgx25o9ZqwNtrROSflGBCGYnJfjrIyRIby1OoQ== + version "3.7.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9" + integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg== dependencies: lie "~3.3.0" pako "~1.0.2" @@ -8329,6 +8456,11 @@ liftoff@^3.1.0: rechoir "^0.6.2" resolve "^1.1.7" +lilconfig@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.3.tgz#68f3005e921dafbd2a2afb48379986aa6d2579fd" + integrity sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg== + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -8560,11 +8692,6 @@ lodash.snakecase@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40= -lodash.toarray@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" - integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= - lodash.union@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" @@ -8641,14 +8768,6 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -loud-rejection@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" @@ -8728,13 +8847,6 @@ magic-string@0.25.7, magic-string@^0.25.2: dependencies: sourcemap-codec "^1.4.4" -magic-string@^0.22.4: - version "0.22.5" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" - integrity sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w== - dependencies: - vlq "^0.2.2" - make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -8795,7 +8907,7 @@ map-cache@^0.2.0, map-cache@^0.2.2: resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= -map-obj@^1.0.0, map-obj@^1.0.1: +map-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= @@ -8904,21 +9016,22 @@ memory-fs@^0.4.1: errno "^0.1.3" readable-stream "^2.0.1" -meow@^3.3.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= - dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" +meow@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.1.tgz#7c01595e3d337fcb0ec4e8eed1666ea95903d306" + integrity sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "4.1.0" + normalize-package-data "^2.5.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.13.1" + yargs-parser "^18.1.3" meow@^8.0.0: version "8.1.2" @@ -8983,7 +9096,7 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.2: +micromatch@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== @@ -8991,17 +9104,17 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.2.3" -mime-db@1.48.0, "mime-db@>= 1.43.0 < 2": - version "1.48.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d" - integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ== +mime-db@1.49.0, "mime-db@>= 1.43.0 < 2": + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== mime-types@^2.1.12, mime-types@^2.1.16, mime-types@^2.1.27, mime-types@^2.1.28, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.31" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b" - integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg== + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== dependencies: - mime-db "1.48.0" + mime-db "1.49.0" mime@1.6.0, mime@^1.4.1, mime@^1.6.0: version "1.6.0" @@ -9068,12 +9181,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@1.x, minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: +minimist@1.x, minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -9091,9 +9199,9 @@ minipass-collect@^1.0.2: minipass "^3.0.0" minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.3.3.tgz#34c7cea038c817a8658461bf35174551dce17a0a" - integrity sha512-akCrLDWfbdAWkMLBxJEeWTdNsjML+dt5YgOI4gJ53vuO0vrmYQkUPxa6j6V65s9CcePIr2SSWqjT2EcrNseryQ== + version "1.3.4" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.3.4.tgz#63f5af868a38746ca7b33b03393ddf8c291244fe" + integrity sha512-TielGogIzbUEtd1LsjZFs47RWuHHfhl6TiCx1InVxApBAmQ8bL0dL5ilkLGcRvuyW/A9nE+Lvn855Ewz8S0PnQ== dependencies: minipass "^3.1.0" minipass-sized "^1.0.3" @@ -9130,7 +9238,7 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -9145,7 +9253,7 @@ minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: dependencies: yallist "^4.0.0" -minizlib@^1.2.1: +minizlib@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== @@ -9173,14 +9281,7 @@ mkdirp-classic@^0.5.2: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" - integrity sha1-HXMHam35hs2TROFecfzAWkyavxI= - dependencies: - minimist "0.0.8" - -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: +"mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -9287,14 +9388,14 @@ mute-stream@0.0.8: integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nan@^2.12.1, nan@^2.14.2: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== + version "2.15.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" + integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== nanoid@^3.1.23: - version "3.1.23" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" - integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== + version "3.1.25" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152" + integrity sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q== nanomatch@^1.2.9: version "1.2.13" @@ -9324,9 +9425,9 @@ nash@^3.0.0: minimist "^1.1.0" needle@^2.5.2: - version "2.6.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.6.0.tgz#24dbb55f2509e2324b4a99d61f413982013ccdbe" - integrity sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== + version "2.8.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.8.0.tgz#1c8ef9c1a2c29dcc1e83d73809d7bc681c80a048" + integrity sha512-ZTq6WYkN/3782H1393me3utVYdq2XyqNUFBsprEE3VMAT0+hP/cItpnITpqsY6ep2yeFE4Tqtqwc74VqUlUYtw== dependencies: debug "^3.2.6" iconv-lite "^0.4.4" @@ -9363,9 +9464,9 @@ nice-try@^1.0.4: integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== nock@^13.0.3: - version "13.1.0" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.1.0.tgz#41c8ce8b35ab7d618c4cbf40de1d5bce319979ba" - integrity sha512-3N3DUY8XYrxxzWazQ+nSBpiaJ3q6gcpNh4gXovC/QBxrsvNp4tq+wsLHF6mJ3nrn3lPLn7KCJqKxy/9aD+0fdw== + version "13.1.1" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.1.1.tgz#3c830129d4560957f59b6f480a41ddbaf9cf57af" + integrity sha512-YKTR9MjfK3kS9/l4nuTxyYm30cgOExRHzkLNhL8nhEUyU4f8Za/dRxOqjhVT1vGs0svWo3dDnJTUX1qxYeWy5w== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" @@ -9373,11 +9474,11 @@ nock@^13.0.3: propagate "^2.0.0" node-emoji@^1.4.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da" - integrity sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw== + version "1.11.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== dependencies: - lodash.toarray "^4.4.0" + lodash "^4.17.21" node-fetch@^2.3.0, node-fetch@^2.6.1: version "2.6.1" @@ -9421,10 +9522,10 @@ node-gyp@^8.0.0: tar "^6.1.0" which "^2.0.2" -node-releases@^1.1.71: - version "1.1.73" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" - integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg== +node-releases@^1.1.73: + version "1.1.74" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.74.tgz#e5866488080ebaa70a93b91144ccde06f3c3463e" + integrity sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw== node-source-walk@^4.0.0, node-source-walk@^4.2.0: version "4.2.0" @@ -9433,23 +9534,11 @@ node-source-walk@^4.0.0, node-source-walk@^4.2.0: dependencies: "@babel/parser" "^7.0.0" -node-uuid@1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" - integrity sha1-sEDrCSOWivq/jTL7HxfxFn/auQc= - nodejs-websocket@^1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/nodejs-websocket/-/nodejs-websocket-1.7.2.tgz#94abd1e248f57d4d1c663dec3831015c6dad98a6" integrity sha512-PFX6ypJcCNDs7obRellR0DGTebfUhw1SXGKe2zpB+Ng1DQJhdzbzx1ob+AvJCLzy2TJF4r8cCDqMQqei1CZdPQ== -nopt@3.0.x: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= - dependencies: - abbrev "1" - nopt@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" @@ -9457,7 +9546,7 @@ nopt@^5.0.0: dependencies: abbrev "1" -normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0: +normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -9615,11 +9704,6 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM= - oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -9650,9 +9734,9 @@ object-hash@^2.1.1: integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== object-inspect@^1.9.0: - version "1.10.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" - integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== + version "1.11.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== object-is@^1.0.1: version "1.1.5" @@ -9844,7 +9928,7 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" -ora@^5.0.0, ora@^5.3.0, ora@^5.4.1: +ora@^5.3.0, ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== @@ -10063,11 +10147,6 @@ parse-filepath@^1.0.1: map-cache "^0.2.0" path-root "^0.1.1" -parse-github-repo-url@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" - integrity sha1-nn2LslKmy2ukJZUGC3v23z28H1A= - parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -10932,9 +11011,9 @@ postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0. supports-color "^6.1.0" postcss@^8.1.7, postcss@^8.2.10, postcss@^8.2.13, postcss@^8.2.9: - version "8.3.5" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.5.tgz#982216b113412bc20a86289e91eb994952a5b709" - integrity sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA== + version "8.3.6" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" + integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A== dependencies: colorette "^1.2.2" nanoid "^3.1.23" @@ -10969,10 +11048,10 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" - integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== +prettier@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" + integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== pretty-bytes@^5.3.0: version "5.6.0" @@ -11006,11 +11085,6 @@ process-nextick-args@~1.0.6: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= -progress@1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74= - progress@^2.0.1, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -11039,10 +11113,15 @@ propagate@^2.0.0: resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== -protobufjs@6.8.8: - version "6.8.8" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c" - integrity sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw== +proto3-json-serializer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/proto3-json-serializer/-/proto3-json-serializer-0.1.1.tgz#b53d2f02082e95ed901b9843c382aa2f89de8b62" + integrity sha512-Wucuvf7SqAw1wcai0zV+3jW3QZJiO/W9wZoJaTheebYdwfj2k9VfF3Gw9r2vGAaTeslhMbkVbojJG0+LjpgLxQ== + +protobufjs@6.11.2, protobufjs@^6.10.0: + version "6.11.2" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.2.tgz#de39fabd4ed32beaa08e9bb1e30d08544c1edf8b" + integrity sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -11054,14 +11133,14 @@ protobufjs@6.8.8: "@protobufjs/path" "^1.1.2" "@protobufjs/pool" "^1.1.0" "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.0" - "@types/node" "^10.1.0" + "@types/long" "^4.0.1" + "@types/node" ">=13.7.0" long "^4.0.0" -protobufjs@^6.10.0, protobufjs@^6.10.2: - version "6.11.2" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.2.tgz#de39fabd4ed32beaa08e9bb1e30d08544c1edf8b" - integrity sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw== +protobufjs@6.8.8: + version "6.8.8" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c" + integrity sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -11073,8 +11152,8 @@ protobufjs@^6.10.0, protobufjs@^6.10.2: "@protobufjs/path" "^1.1.2" "@protobufjs/pool" "^1.1.0" "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" ">=13.7.0" + "@types/long" "^4.0.0" + "@types/node" "^10.1.0" long "^4.0.0" protractor@^7.0.0: @@ -11177,7 +11256,7 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@^1.3.2, punycode@^1.4.1: +punycode@^1.3.2: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= @@ -11212,11 +11291,6 @@ puppeteer@5.4.1: unbzip2-stream "^1.3.3" ws "^7.2.3" -q@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.0.1.tgz#11872aeedee89268110b10a718448ffb10112a14" - integrity sha1-EYcq7t7okmgRCxCnGESP+xARKhQ= - q@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" @@ -11244,7 +11318,7 @@ qs@^6.4.0, qs@^6.6.0: dependencies: side-channel "^1.0.4" -qs@~6.5.1, qs@~6.5.2: +qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== @@ -11341,9 +11415,9 @@ read-cache@^1.0.0: pify "^2.3.0" read-package-json-fast@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-2.0.2.tgz#2dcb24d9e8dd50fb322042c8c35a954e6cc7ac9e" - integrity sha512-5fyFUyO9B799foVk4n6ylcoAktG/FbE3jwRKxvwaeSrIunaoMc0u81dzXxjeAFKOce7O5KncdfwpGvvs6r5PsQ== + version "2.0.3" + resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz#323ca529630da82cb34b36cc0b996693c98c2b83" + integrity sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ== dependencies: json-parse-even-better-errors "^2.3.0" npm-normalize-package-bin "^1.0.1" @@ -11475,14 +11549,6 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - redent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -11498,7 +11564,7 @@ redeyed@~2.1.0: dependencies: esprima "~4.0.0" -reflect-metadata@^0.1.3: +reflect-metadata@^0.1.13, reflect-metadata@^0.1.3: version "0.1.13" resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== @@ -11515,11 +11581,16 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@0.13.7, regenerator-runtime@^0.13.4: +regenerator-runtime@0.13.7: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== + regenerator-transform@^0.14.2: version "0.14.5" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4" @@ -11618,13 +11689,6 @@ repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - replace-ext@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" @@ -11639,13 +11703,6 @@ replace-homedir@^1.0.0: is-absolute "^1.0.0" remove-trailing-separator "^1.1.0" -request-progress@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-0.3.1.tgz#0721c105d8a96ac6b2ce8b2c89ae2d5ecfcf6b3a" - integrity sha1-ByHBBdipasayzossia4tXs/Pazo= - dependencies: - throttleit "~0.0.2" - request@^2.87.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -11672,32 +11729,6 @@ request@^2.87.0, request@^2.88.2: tunnel-agent "^0.6.0" uuid "^3.3.2" -request@~2.87.0: - version "2.87.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" - integrity sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -11841,11 +11872,12 @@ ret@~0.1.10: integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== retry-request@^4.0.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-4.1.3.tgz#d5f74daf261372cff58d08b0a1979b4d7cab0fde" - integrity sha512-QnRZUpuPNgX0+D1xVxul6DbJ9slvo4Rm6iV/dn63e048MvGbUZiKySVt6Tenp04JqmchxjiLltGerOJys7kJYQ== + version "4.2.2" + resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-4.2.2.tgz#b7d82210b6d2651ed249ba3497f07ea602f1a903" + integrity sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg== dependencies: debug "^4.1.1" + extend "^3.0.2" retry@^0.12.0: version "0.12.0" @@ -11904,13 +11936,6 @@ rollup-plugin-commonjs@^10.1.0: resolve "^1.11.0" rollup-pluginutils "^2.8.1" -rollup-plugin-hashbang@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-hashbang/-/rollup-plugin-hashbang-2.2.2.tgz#971fc49b452e63f9dfdc75f79ae7256b3485e750" - integrity sha512-Yxw9ogeK3KncG1e4CvK0I0IKVBNeJP+DTZS3bExGTfGjw0WP1C7xxbY7LtRd8IKx4fFf53hz7XR1XG7UV6xqCw== - dependencies: - magic-string "^0.22.4" - 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" @@ -11964,6 +11989,13 @@ rollup@2.16.1: optionalDependencies: fsevents "~2.1.2" +rollup@^2.53.3: + version "2.56.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.56.2.tgz#a045ff3f6af53ee009b5f5016ca3da0329e5470f" + integrity sha512-s8H00ZsRi29M2/lGdm1u8DJpJ9ML8SUOpVVBd33XNeEeL3NVaTiUcSBHzBdF3eAyR0l7VSpsuoVUGrRHq7aPwQ== + optionalDependencies: + fsevents "~2.3.2" + rollup@~1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.11.3.tgz#6f436db2a2d6b63f808bf60ad01a177643dedb81" @@ -12010,12 +12042,19 @@ rxjs@6.6.7, rxjs@^6.4.0, rxjs@^6.5.3, rxjs@^6.6.6: dependencies: tslib "^1.9.0" +rxjs@^7.2.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6" + integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw== + dependencies: + tslib "~2.1.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.1, 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== @@ -12100,11 +12139,11 @@ schema-utils@^2.6.5, schema-utils@^2.7.0: ajv-keywords "^3.5.2" schema-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" - integrity sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== + version "3.1.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== dependencies: - "@types/json-schema" "^7.0.6" + "@types/json-schema" "^7.0.8" ajv "^6.12.5" ajv-keywords "^3.5.2" @@ -12237,6 +12276,13 @@ serialize-javascript@^5.0.1: dependencies: randombytes "^2.1.0" +serialize-javascript@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -12331,7 +12377,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shelljs@^0.8.3, shelljs@^0.8.4: +shelljs@^0.8.4: version "0.8.4" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== @@ -12372,9 +12418,9 @@ slash@^3.0.0: integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== smart-buffer@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" - integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== snapdragon-node@^2.0.1: version "2.1.1" @@ -12528,7 +12574,7 @@ source-map-resolve@^0.6.0: atob "^2.1.2" decode-uri-component "^0.2.0" -source-map-support@0.5.19, source-map-support@^0.5.17, source-map-support@^0.5.5, source-map-support@~0.5.12, source-map-support@~0.5.19: +source-map-support@0.5.19, source-map-support@^0.5.5, source-map-support@~0.5.12, source-map-support@~0.5.19: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -12608,9 +12654,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz#8a595135def9592bda69709474f1cbeea7c2467f" - integrity sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ== + version "3.0.10" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== spdy-transport@^3.0.0: version "3.0.0" @@ -12861,13 +12907,6 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= - dependencies: - get-stdin "^4.0.1" - strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -13014,14 +13053,14 @@ sver-compat@^1.5.0: es6-symbol "^3.1.1" svgo@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.3.0.tgz#6b3af81d0cbd1e19c83f5f63cec2cb98c70b5373" - integrity sha512-fz4IKjNO6HDPgIQxu4IxwtubtbSfGEAJUq/IXyTPIkGhWck/faiiwfkvsB8LnBkKLvSoyNNIY6d13lZprJMc9Q== + version "2.4.0" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.4.0.tgz#0c42653101fd668692c0f69b55b8d7b182ef422b" + integrity sha512-W25S1UUm9Lm9VnE0TvCzL7aso/NCzDEaXLaElCUO/KaVitw0+IBicSVfM1L1c0YHK5TOFh73yQ2naCpVHEQ/OQ== dependencies: "@trysound/sax" "0.1.1" - chalk "^4.1.0" + colorette "^1.2.2" commander "^7.1.0" - css-select "^3.1.2" + css-select "^4.1.3" css-tree "^1.1.2" csso "^4.2.0" stable "^0.1.8" @@ -13066,22 +13105,22 @@ tar-stream@^2.1.4, tar-stream@^2.2.0: readable-stream "^3.1.1" tar@^4.3.0: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + version "4.4.17" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.17.tgz#44be5e3fa8353ee1d11db3b1401561223a5c3985" + integrity sha512-q7OwXq6NTdcYIa+k58nEMV3j1euhDhGCs/VRw9ymx/PbH0jtIM2+VTgDE/BW3rbLkrBUXs5fzEKgic5oUciu7g== dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" tar@^6.0.2, tar@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83" - integrity sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA== + version "6.1.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.8.tgz#4fc50cfe56511c538ce15b71e05eebe66530cbd4" + integrity sha512-sb9b0cp855NbkMJcskdSYA7b11Q8JsX4qe4pyUAfHp+Y6jBjJeek2ZVlwEfWayshEIwlIzXx0Fain3QG9JPm2A== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" @@ -13128,18 +13167,18 @@ terser-webpack-plugin@5.1.2: terser "^5.7.0" terser-webpack-plugin@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.3.tgz#30033e955ca28b55664f1e4b30a1347e61aa23af" - integrity sha512-cxGbMqr6+A2hrIB5ehFIF+F/iST5ZOxvOmy9zih9ySbP1C2oEWQSOUS+2SNBTjzx5xLKO4xnod9eywdfq1Nb9A== + version "5.1.4" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz#c369cf8a47aa9922bd0d8a94fe3d3da11a7678a1" + integrity sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA== dependencies: jest-worker "^27.0.2" p-limit "^3.1.0" schema-utils "^3.0.0" - serialize-javascript "^5.0.1" + serialize-javascript "^6.0.0" source-map "^0.6.1" terser "^5.7.0" -terser@5.7.0, terser@^5.0.0, terser@^5.7.0: +terser@5.7.0: version "5.7.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.0.tgz#a761eeec206bc87b605ab13029876ead938ae693" integrity sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g== @@ -13157,6 +13196,15 @@ terser@^4.4.0: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^5.0.0, terser@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.1.tgz#2dc7a61009b66bb638305cb2a824763b116bf784" + integrity sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg== + dependencies: + commander "^2.20.0" + source-map "~0.7.2" + source-map-support "~0.5.19" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -13181,11 +13229,6 @@ text-table@0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -throttleit@~0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf" - integrity sha1-z+34jmDADdlpe2H90qg0OptoDq8= - through2-filter@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" @@ -13333,13 +13376,6 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -tough-cookie@~2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA== - dependencies: - punycode "^1.4.1" - tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -13370,11 +13406,6 @@ tree-kill@1.2.2: resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= - trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" @@ -13391,19 +13422,21 @@ triple-beam@^1.2.0, triple-beam@^1.3.0: integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== ts-node@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.0.0.tgz#05f10b9a716b0b624129ad44f0ea05dac84ba3be" - integrity sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg== + version "10.2.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.0.tgz#f1e88249a00e26aa95e9a93c50f70241a8a1c4bb" + integrity sha512-FstYHtQz6isj8rBtYMN4bZdnXN1vq4HCbqn9vdNQcInRqtB86PePJQIxE6es0PhxKWhj2PHuwbG40H+bxkZPmg== dependencies: + "@cspotcode/source-map-support" "0.6.1" "@tsconfig/node10" "^1.0.7" "@tsconfig/node12" "^1.0.7" "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.1" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" arg "^4.1.0" create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" - source-map-support "^0.5.17" yn "3.1.1" tsickle@0.38.1: @@ -13421,15 +13454,25 @@ tslib@2.2.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== +tslib@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" + integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== + tslib@^1.10.0, tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1, tslib@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" - integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.2.0, tslib@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + +tslib@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== tslint-eslint-rules@5.4.0: version "5.4.0" @@ -13445,7 +13488,7 @@ tslint-no-toplevel-property-access@0.0.2: resolved "https://registry.yarnpkg.com/tslint-no-toplevel-property-access/-/tslint-no-toplevel-property-access-0.0.2.tgz#c9b19bbd525ea7b8577e5ada601cc8625b4ed004" integrity sha512-Oc+UUurlGLBkgeUSGxMoTpRUpaXsjqzQCEAYrYQyuU8330fi5FKlye5n53y87EJ24AlfdoxMPV7DJfFOADapfg== -tslint@6.1.3: +tslint@6.1.3, tslint@^6.1.3: version "6.1.3" resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" integrity sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg== @@ -13492,6 +13535,11 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +tunnel@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -13517,6 +13565,11 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +type-fest@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" + integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== + type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" @@ -13561,9 +13614,9 @@ type@^2.0.0: integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== typed-graphqlify@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/typed-graphqlify/-/typed-graphqlify-3.1.2.tgz#4bd26c11082b130bebc811030f892e2b22902d66" - integrity sha512-z0x63rRNswSKbIIjZyooKMzV4tHLt1OhWmsUkz1dohnv8+6T1J55DCRRb1CFaYWmkD8DkJ9miSP8VNB9N/1VPQ== + version "3.1.4" + resolved "https://registry.yarnpkg.com/typed-graphqlify/-/typed-graphqlify-3.1.4.tgz#f5e494cd78bb87a4284df8c34b8f29617596aaec" + integrity sha512-/LnB/b5TXXL9zY5I5hE6/SwAaxZZsvQPxjZGIHtMa/Y0pcnw52uwVA5UnLNesgWtgFkfPYw2NAx31vGbnaqh+A== typedarray-to-buffer@^3.1.5: version "3.1.5" @@ -13587,25 +13640,25 @@ typescript@4.2.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== +typescript@4.3.5, typescript@~4.3.4, typescript@~4.3.5: + version "4.3.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" + integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== + 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.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" - integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== - -typescript@~4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz#3f85b986945bcf31071decdd96cf8bfa65f9dcbc" - integrity sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew== +typescript@~4.4.0: + version "4.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86" + integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ== uglify-js@^3.1.4: - version "3.13.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.9.tgz#4d8d21dcd497f29cfd8e9378b9df123ad025999b" - integrity sha512-wZbyTQ1w6Y7fHdt8sJnHfSIuWeDgk6B5rCb4E/AM6QNNPbOMIZph21PW5dRB3h7Df0GszN+t7RuUH6sWK5bF0g== + version "3.14.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.1.tgz#e2cb9fe34db9cb4cf7e35d1d26dfea28e09a7d06" + integrity sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g== ultron@~1.1.0: version "1.1.1" @@ -13739,6 +13792,14 @@ universal-analytics@^0.4.16: request "^2.88.2" uuid "^3.0.0" +universal-github-app-jwt@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/universal-github-app-jwt/-/universal-github-app-jwt-1.1.0.tgz#0abaa876101cdf1d3e4c546be2768841c0c1b514" + integrity sha512-3b+ocAjjz4JTyqaOT+NNBd5BtTuvJTxWElIoeHSVelUV9J3Jp7avmQTdLKCaoqi/5Ox2o/q+VK19TJ233rVXVQ== + dependencies: + "@types/jsonwebtoken" "^8.3.3" + jsonwebtoken "^8.5.1" + universal-user-agent@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" @@ -13867,9 +13928,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.4.3, url-parse@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" - integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== + version "1.5.3" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" + integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" @@ -13905,12 +13966,12 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@8.3.2: +uuid@8.3.2, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^3.0.0, uuid@^3.1.0, uuid@^3.3.2, uuid@^3.4.0: +uuid@^3.0.0, uuid@^3.3.2, uuid@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -14040,11 +14101,6 @@ vlq@1.0.1: resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== -vlq@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" - integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== - void-elements@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" @@ -14202,9 +14258,9 @@ webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.3.0: source-map "~0.6.1" webpack-sources@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.0.tgz#9ed2de69b25143a4c18847586ad9eccb19278cfa" - integrity sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ== + version "2.3.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.1.tgz#570de0af163949fe272233c2cefe1b56f74511fd" + integrity sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA== dependencies: source-list-map "^2.0.1" source-map "^0.6.1" @@ -14395,10 +14451,10 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -ws@>=7.4.6, ws@^7.2.3: - version "7.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.0.tgz#0033bafea031fb9df041b2026fc72a571ca44691" - integrity sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw== +ws@>=7.4.6: + version "8.1.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.1.0.tgz#75e5ec608f66d3d3934ec6dbc4ebc8a34a68638c" + integrity sha512-0UWlCD2s3RSclw8FN+D0zDTUyMO+1kHwJQQJzkgUh16S8d3NYON0AKCEQPffE0ez4JyRFu76QDA9KR5bOG/7jw== ws@^6.2.1: version "6.2.2" @@ -14407,6 +14463,11 @@ ws@^6.2.1: dependencies: async-limiter "~1.0.0" +ws@^7.2.3: + version "7.5.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" + integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== + ws@~3.3.1: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" @@ -14439,25 +14500,25 @@ xmlbuilder@~11.0.0: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== +xmldom@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.3.0.tgz#e625457f4300b5df9c2e1ecb776147ece47f3e5a" + integrity sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g== + xmldom@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.5.0.tgz#193cb96b84aa3486127ea6272c4596354cb4962e" integrity sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA== -xmldom@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.6.0.tgz#43a96ecb8beece991cef382c08397d82d4d0c46f" - integrity sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg== - xmlhttprequest-ssl@~1.5.4: version "1.5.5" resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xpath@^0.0.32: - version "0.0.32" - resolved "https://registry.yarnpkg.com/xpath/-/xpath-0.0.32.tgz#1b73d3351af736e17ec078d6da4b8175405c48af" - integrity sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw== +xpath@^0.0.27: + version "0.0.27" + resolved "https://registry.yarnpkg.com/xpath/-/xpath-0.0.27.tgz#dd3421fbdcc5646ac32c48531b4d7e9d0c2cfa92" + integrity sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ== xregexp@2.0.0: version "2.0.0" @@ -14489,7 +14550,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== @@ -14499,7 +14560,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@*, yaml@^1.10.0: +yaml@^1.10.0, yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== @@ -14512,7 +14573,7 @@ yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.2: +yargs-parser@^18.1.2, yargs-parser@^18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -14580,9 +14641,9 @@ yargs@^16.0.0, yargs@^16.1.1: yargs-parser "^20.2.2" yargs@^17.0.0: - version "17.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb" - integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ== + version "17.1.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.1.1.tgz#c2a8091564bdb196f7c0a67c1d12e5b85b8067ba" + integrity sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ== dependencies: cliui "^7.0.2" escalade "^3.1.1"