mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: use pnpm as the package manager instead of yarn (#62924)
Use pnpm instead of yarn as the package manager and interaction tool for the repo PR Close #62924
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
# @generated
|
||||
# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
|
||||
# This file should be checked into version control along with the pnpm-lock.yaml file.
|
||||
.npmrc=-1406867100
|
||||
.pnpmfile.cjs=-620026605
|
||||
adev/package.json=-1392052458
|
||||
adev/shared-docs/package.json=-1522726993
|
||||
adev/shared-docs/pipeline/api-gen/package.json=939673974
|
||||
integration/package.json=-239561259
|
||||
modules/package.json=-2120293624
|
||||
package.json=-1777065984
|
||||
packages/animations/package.json=-678724831
|
||||
packages/benchpress/package.json=-2137616181
|
||||
packages/common/package.json=1729763064
|
||||
packages/compiler-cli/linker/babel/test/package.json=939673974
|
||||
packages/compiler-cli/package.json=56003825
|
||||
packages/compiler/package.json=1190056499
|
||||
packages/core/package.json=1154833122
|
||||
packages/core/test/bundling/package.json=-1992355537
|
||||
packages/elements/package.json=-892969618
|
||||
packages/forms/package.json=-877154917
|
||||
packages/localize/package.json=-1162087867
|
||||
packages/platform-browser-dynamic/package.json=1901947880
|
||||
packages/platform-browser/package.json=-1163479450
|
||||
packages/platform-server/package.json=-737662753
|
||||
packages/router/package.json=860819913
|
||||
packages/upgrade/package.json=16347051
|
||||
pnpm-lock.yaml=-563335343
|
||||
pnpm-workspace.yaml=1065599792
|
||||
tools/bazel/rules_angular_store/package.json=-239561259
|
||||
tools/pnpm-patches/dagre-d3-es+7.0.11.patch=-904066270
|
||||
yarn.lock=-1679940630
|
||||
@@ -62,4 +62,5 @@ packages/router/node_modules
|
||||
packages/zone.js/node_modules
|
||||
packages/upgrade/node_modules
|
||||
packages/benchpress/node_modules
|
||||
packages/service-worker/node_modules
|
||||
tools/bazel/rules_angular_store/node_modules
|
||||
|
||||
@@ -38,7 +38,7 @@ test --nolegacy_external_runfiles
|
||||
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
|
||||
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
|
||||
# This flag is needed to so that the bazel cache is not invalidated
|
||||
# when running bazel via `yarn bazel`.
|
||||
# when running bazel via `pnpm bazel`.
|
||||
# See https://github.com/angular/angular/issues/27514.
|
||||
build --incompatible_strict_action_env
|
||||
run --incompatible_strict_action_env
|
||||
@@ -60,11 +60,11 @@ build --enable_runfiles
|
||||
# Releases should always be stamped with version control info
|
||||
# This command assumes node on the path and is a workaround for
|
||||
# https://github.com/bazelbuild/bazel/issues/4802
|
||||
build:release --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=release"
|
||||
build:release --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=release"
|
||||
build:release --stamp
|
||||
|
||||
# Snapshots should also be stamped with version control information.
|
||||
build:snapshot-build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot"
|
||||
build:snapshot-build --workspace_status_command="pnpm --silent ng-dev release build-env-stamp --mode=snapshot"
|
||||
build:snapshot-build --stamp
|
||||
|
||||
# Angular DevTools for Firefox releases *cannot* be stamped and `--config snapshot-build-firefox` is a no-op.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "Angular dev container",
|
||||
"dockerFile": "Dockerfile",
|
||||
"appPort": [4000, 4200, 4433, 5000, 8080, 9876],
|
||||
"postCreateCommand": "yarn install",
|
||||
"postCreateCommand": "pnpm install",
|
||||
"extensions": [
|
||||
"devondcarew.bazel-code",
|
||||
"ms-vscode.vscode-typescript-tslint-plugin"
|
||||
|
||||
@@ -34,7 +34,7 @@ runs:
|
||||
run: ./tools/saucelabs/sauce-service.sh ready-wait
|
||||
- name: Running tests on Saucelabs.
|
||||
shell: bash
|
||||
run: KARMA_WEB_TEST_MODE=SL_REQUIRED yarn karma start ./karma-js.conf.js --single-run
|
||||
run: KARMA_WEB_TEST_MODE=SL_REQUIRED pnpm karma start ./karma-js.conf.js --single-run
|
||||
- name: Stop Saucelabs tunnel service
|
||||
shell: bash
|
||||
run: ./tools/saucelabs/sauce-service.sh stop
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
name: 'Installing Yarn dependencies'
|
||||
description: 'Installs the dependencies using Yarn'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: |
|
||||
./node_modules/
|
||||
# If just `WORKSPACE` or `yarn.lock` is changed, the most recent cache can be restored.
|
||||
# See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action.
|
||||
key: v1-angular-main-deps-${{hashFiles('WORKSPACE')}}-${{hashFiles('yarn.lock')}}
|
||||
restore-keys: v1-angular-main-deps-
|
||||
|
||||
- run: yarn install --frozen-lockfile --non-interactive
|
||||
shell: bash
|
||||
@@ -27,9 +27,9 @@ jobs:
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Build adev to ensure it continues to work
|
||||
run: yarn bazel build //adev:build --full_build_adev --config=release
|
||||
run: pnpm bazel build //adev:build --full_build_adev --config=release
|
||||
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
with:
|
||||
workflow-artifact-name: 'adev-preview'
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
# that the action was triggered by a team member.
|
||||
ref: ${{steps.comment-branch.outputs.head_ref}}
|
||||
|
||||
- uses: ./.github/actions/yarn-install
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
with:
|
||||
@@ -47,9 +47,9 @@ jobs:
|
||||
env:
|
||||
# Untrusted input used in an executable code, must be wrapped as an env var to prevent injections
|
||||
COMMENT_BODY: ${{ github.event.comment.body }}
|
||||
run: yarn benchmarks prepare-for-github-action "$COMMENT_BODY"
|
||||
run: pnpm benchmarks prepare-for-github-action "$COMMENT_BODY"
|
||||
|
||||
- run: yarn benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
|
||||
- run: pnpm benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
|
||||
id: benchmark
|
||||
name: Running benchmark
|
||||
|
||||
|
||||
+32
-33
@@ -25,17 +25,17 @@ jobs:
|
||||
with:
|
||||
cache-node-modules: true
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Check code lint
|
||||
run: yarn -s tslint
|
||||
run: pnpm tslint
|
||||
- name: Check for circular dependencies
|
||||
run: yarn -s ts-circular-deps:check
|
||||
run: pnpm ts-circular-deps:check
|
||||
- name: Validate pull approve configuration
|
||||
run: yarn -s ng-dev pullapprove verify
|
||||
run: pnpm ng-dev pullapprove verify
|
||||
- name: Validate angular robot configuration
|
||||
run: yarn -s ng-dev ngbot verify
|
||||
run: pnpm ng-dev ngbot verify
|
||||
- name: Confirm code builds with typescript as expected
|
||||
run: yarn -s check-tooling-setup
|
||||
run: pnpm check-tooling-setup
|
||||
|
||||
devtools:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -51,16 +51,16 @@ jobs:
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run unit tests
|
||||
run: yarn devtools:test
|
||||
run: pnpm devtools:test
|
||||
- name: Test build
|
||||
run: yarn devtools:build:chrome
|
||||
run: pnpm devtools:build:chrome
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
|
||||
with:
|
||||
command: yarn devtools:test:e2e
|
||||
start: yarn bazel run //devtools/src:devserver
|
||||
command: pnpm devtools:test:e2e
|
||||
start: pnpm bazel run //devtools/src:devserver
|
||||
wait-on: 'http://localhost:4200'
|
||||
wait-on-timeout: 300
|
||||
|
||||
@@ -78,9 +78,9 @@ jobs:
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile --network-timeout 100000
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run CI tests for framework
|
||||
run: yarn test:ci
|
||||
run: pnpm test:ci
|
||||
|
||||
integration-tests:
|
||||
runs-on: ubuntu-latest-4core
|
||||
@@ -96,9 +96,9 @@ jobs:
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile --network-timeout 100000
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run integration CI tests for framework
|
||||
run: yarn integration-tests:ci
|
||||
run: pnpm integration-tests:ci
|
||||
|
||||
adev:
|
||||
runs-on:
|
||||
@@ -113,11 +113,11 @@ jobs:
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run tests
|
||||
run: yarn bazel test //adev/...
|
||||
run: pnpm bazel test //adev/...
|
||||
- name: Build adev in fast mode to ensure it continues to work
|
||||
run: yarn bazel build //adev:build --config=release
|
||||
run: pnpm bazel build //adev:build --config=release
|
||||
|
||||
publish-snapshots:
|
||||
runs-on:
|
||||
@@ -132,9 +132,9 @@ jobs:
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
|
||||
- run: yarn build
|
||||
- run: pnpm build
|
||||
- run: ./scripts/ci/publish-build-artifacts.sh
|
||||
|
||||
zone-js:
|
||||
@@ -156,9 +156,9 @@ jobs:
|
||||
with:
|
||||
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- run: |
|
||||
yarn bazel build \
|
||||
pnpm bazel build \
|
||||
//packages/zone.js/bundles:zone.umd.js \
|
||||
//packages/zone.js:npm_package \
|
||||
//packages/zone.js/test/closure:closure
|
||||
@@ -176,15 +176,14 @@ jobs:
|
||||
cp dist/bin/packages/zone.js/test/closure/zone.closure.js ./packages/zone.js/build/test/zone.closure.mjs
|
||||
|
||||
# Install
|
||||
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
|
||||
- run: pnpm -C packages/zone.js install --frozen-lockfile
|
||||
# Run zone.js tools tests
|
||||
- run: yarn --cwd packages/zone.js promisefinallytest
|
||||
- run: yarn --cwd packages/zone.js jest:test
|
||||
- run: yarn --cwd packages/zone.js jest:nodetest
|
||||
- run: yarn --cwd packages/zone.js vitest:test
|
||||
- run: yarn --cwd packages/zone.js electrontest
|
||||
- run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
|
||||
- run: yarn --cwd packages/zone.js/test/typings test
|
||||
- run: pnpm -C packages/zone.js promisefinallytest
|
||||
- run: pnpm -C packages/zone.js jest:test
|
||||
- run: pnpm -C packages/zone.js jest:nodetest
|
||||
- run: pnpm -C packages/zone.js vitest:test
|
||||
- run: pnpm -C packages/zone.js electrontest
|
||||
- run: pnpm -C packages/zone.js/test/typings test
|
||||
|
||||
# saucelabs:
|
||||
# runs-on: ubuntu-latest-4core
|
||||
@@ -196,7 +195,7 @@ jobs:
|
||||
# with:
|
||||
# cache-node-modules: true
|
||||
# - name: Install node modules
|
||||
# run: yarn install --frozen-lockfile
|
||||
# run: pnpm install --frozen-lockfile
|
||||
# - uses: ./.github/actions/saucelabs-legacy
|
||||
|
||||
adev-deploy:
|
||||
@@ -211,9 +210,9 @@ jobs:
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Build adev to ensure it continues to work
|
||||
run: yarn bazel build //adev:build --full_build_adev --config=release
|
||||
run: pnpm bazel build //adev:build --full_build_adev --config=release
|
||||
- name: Deploy to firebase
|
||||
uses: ./.github/actions/deploy-docs-site
|
||||
with:
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
with:
|
||||
cache-node-modules: true
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Setup Bazel Remote Caching
|
||||
@@ -25,10 +25,10 @@ jobs:
|
||||
- name: Setup Saucelabs Variables
|
||||
uses: angular/dev-infra/github-actions/saucelabs@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Set up Sauce Tunnel Daemon
|
||||
run: yarn bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
|
||||
run: pnpm bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
|
||||
env:
|
||||
SAUCE_TUNNEL_IDENTIFIER: angular-framework-${{ github.run_number }}
|
||||
- name: Run all saucelabs bazel tests
|
||||
run: |
|
||||
TESTS=$(./node_modules/.bin/bazelisk query --output label '(kind(karma_web_test, ...) intersect attr("tags", "saucelabs", ...)) except attr("tags", "fixme-saucelabs", ...)')
|
||||
yarn bazel test --config=saucelabs --jobs=$JOBS ${TESTS}
|
||||
pnpm bazel test --config=saucelabs --jobs=$JOBS ${TESTS}
|
||||
|
||||
@@ -23,9 +23,9 @@ jobs:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn -s install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- id: workflows
|
||||
run: echo "workflows=$(yarn -s ng-dev perf workflows --list)" >> "$GITHUB_OUTPUT"
|
||||
run: echo "workflows=$(pnpm ng-dev perf workflows --list)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
workflow:
|
||||
timeout-minutes: 30
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn -s install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
# We utilize the google-github-actions/auth action to allow us to get an active credential using workflow
|
||||
# identity federation. This allows us to request short lived credentials on demand, rather than storing
|
||||
# credentials in secrets long term. More information can be found at:
|
||||
@@ -50,4 +50,4 @@ jobs:
|
||||
project_id: 'internal-200822'
|
||||
workload_identity_provider: 'projects/823469418460/locations/global/workloadIdentityPools/measurables-tracking/providers/angular'
|
||||
service_account: 'measures-uploader@internal-200822.iam.gserviceaccount.com'
|
||||
- run: yarn ng-dev perf workflows --name ${{ matrix.workflow }} --commit-sha ${{github.sha}}
|
||||
- run: pnpm ng-dev perf workflows --name ${{ matrix.workflow }} --commit-sha ${{github.sha}}
|
||||
|
||||
+31
-32
@@ -23,21 +23,21 @@ jobs:
|
||||
with:
|
||||
cache-node-modules: true
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Check code lint
|
||||
run: yarn -s tslint
|
||||
run: pnpm tslint
|
||||
- name: Check for circular dependencies
|
||||
run: yarn -s ts-circular-deps:check
|
||||
run: pnpm ts-circular-deps:check
|
||||
- name: Validate pull approve configuration
|
||||
run: yarn -s ng-dev pullapprove verify
|
||||
run: pnpm ng-dev pullapprove verify
|
||||
- name: Validate angular robot configuration
|
||||
run: yarn -s ng-dev ngbot verify
|
||||
run: pnpm ng-dev ngbot verify
|
||||
- name: Confirm code builds with typescript as expected
|
||||
run: yarn -s check-tooling-setup
|
||||
run: pnpm check-tooling-setup
|
||||
- name: Check commit message
|
||||
run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
|
||||
run: pnpm ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
|
||||
- name: Check code format
|
||||
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
|
||||
run: pnpm ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
|
||||
- name: Check Package Licenses
|
||||
uses: angular/dev-infra/github-actions/linting/licenses@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
with:
|
||||
@@ -55,16 +55,16 @@ jobs:
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run unit tests
|
||||
run: yarn devtools:test
|
||||
run: pnpm devtools:test
|
||||
- name: Test build
|
||||
run: yarn devtools:build:chrome
|
||||
run: pnpm devtools:build:chrome
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
|
||||
with:
|
||||
command: yarn devtools:test:e2e
|
||||
start: yarn bazel run //devtools/src:devserver
|
||||
command: pnpm devtools:test:e2e
|
||||
start: pnpm bazel run //devtools/src:devserver
|
||||
wait-on: 'http://localhost:4200'
|
||||
wait-on-timeout: 300
|
||||
|
||||
@@ -80,12 +80,12 @@ jobs:
|
||||
- name: Setup Bazel Remote Caching
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile --network-timeout 100000
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run CI tests for framework
|
||||
run: yarn test:ci
|
||||
run: pnpm test:ci
|
||||
env:
|
||||
# Ensures Aspect lock files are up-to-date.
|
||||
# TODO(devversion): Remove when removing yarn.
|
||||
# TODO(devversion): Remove when removing pnpm.
|
||||
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
|
||||
- name: Upload GRPC logs (for debugging of RBE issues)
|
||||
if: always()
|
||||
@@ -106,9 +106,9 @@ jobs:
|
||||
- name: Setup Bazel Remote Caching
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile --network-timeout 100000
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run integration CI tests for framework
|
||||
run: yarn integration-tests:ci
|
||||
run: pnpm integration-tests:ci
|
||||
|
||||
adev:
|
||||
runs-on:
|
||||
@@ -121,11 +121,11 @@ jobs:
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run tests
|
||||
run: yarn bazel test //adev/...
|
||||
run: pnpm bazel test //adev/...
|
||||
- name: Build adev in fast mode to ensure it continues to work
|
||||
run: yarn bazel build //adev:build --config=release
|
||||
run: pnpm bazel build //adev:build --config=release
|
||||
|
||||
zone-js:
|
||||
runs-on:
|
||||
@@ -144,9 +144,9 @@ jobs:
|
||||
- name: Setup Bazel RBE
|
||||
uses: angular/dev-infra/github-actions/bazel/configure-remote@4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
- run: |
|
||||
yarn bazel build \
|
||||
pnpm bazel build \
|
||||
//packages/zone.js/bundles:zone.umd.js \
|
||||
//packages/zone.js:npm_package \
|
||||
//packages/zone.js/test/closure:closure
|
||||
@@ -164,15 +164,14 @@ jobs:
|
||||
cp dist/bin/packages/zone.js/test/closure/zone.closure.js ./packages/zone.js/build/test/zone.closure.mjs
|
||||
|
||||
# Install
|
||||
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
|
||||
- run: pnpm -C packages/zone.js install --frozen-lockfile
|
||||
# Run zone.js tools tests
|
||||
- run: yarn --cwd packages/zone.js promisefinallytest
|
||||
- run: yarn --cwd packages/zone.js jest:test
|
||||
- run: yarn --cwd packages/zone.js jest:nodetest
|
||||
- run: yarn --cwd packages/zone.js vitest:test
|
||||
- run: yarn --cwd packages/zone.js electrontest
|
||||
- run: yarn --cwd packages/zone.js/test/typings install --frozen-lockfile --non-interactive
|
||||
- run: yarn --cwd packages/zone.js/test/typings test
|
||||
- run: pnpm -C packages/zone.js promisefinallytest
|
||||
- run: pnpm -C packages/zone.js jest:test
|
||||
- run: pnpm -C packages/zone.js jest:nodetest
|
||||
- run: pnpm -C packages/zone.js vitest:test
|
||||
- run: pnpm -C packages/zone.js electrontest
|
||||
- run: pnpm -C packages/zone.js/test/typings test
|
||||
|
||||
# saucelabs:
|
||||
# runs-on: ubuntu-latest-4core
|
||||
@@ -184,5 +183,5 @@ jobs:
|
||||
# with:
|
||||
# cache-node-modules: true
|
||||
# - name: Install node modules
|
||||
# run: yarn install --frozen-lockfile
|
||||
# run: pnpm install --frozen-lockfile
|
||||
# - uses: ./.github/actions/saucelabs-legacy
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
set +e
|
||||
|
||||
yarn -s ng-dev commit-message pre-commit-validate --file $1 2>/dev/null
|
||||
pnpm --silent ng-dev commit-message pre-commit-validate --file $1 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "WARNING: failed to run commit message validation (ng-dev commit-mesage pre-commit-validate)"
|
||||
fi
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
set +e
|
||||
|
||||
yarn -s ng-dev format staged 2>/dev/null
|
||||
pnpm --silent ng-dev format staged 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "WARNING: failed to run file formatting (ng-dev format staged)"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set +e
|
||||
|
||||
yarn -s ng-dev commit-message restore-commit-message-draft $1 $2 2>/dev/null
|
||||
pnpm --silent ng-dev commit-message restore-commit-message-draft $1 $2 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "WARNING: failed to attempt to restore commit message draft (ng-dev commit-message restore-commit-message-draft)"
|
||||
fi
|
||||
|
||||
+23
-23
@@ -1,25 +1,23 @@
|
||||
function readPackage(pkg, context) {
|
||||
// TODO(devversion): This exists temporarily during migration as we can't have `workspace:*` deps
|
||||
// in the `package.json` also processed by Yarn
|
||||
if (pkg.name === 'angular-srcs') {
|
||||
pkg.dependencies = {
|
||||
...pkg.dependencies,
|
||||
// These dependencies are added to the workspace root so that peer dependencies
|
||||
// are resolved via these locally-built versions. e.g. compiler-cli's peer deps.
|
||||
'@angular/compiler': 'workspace:*',
|
||||
'@angular/compiler-cli': 'workspace:*',
|
||||
'@angular/core': 'workspace:*',
|
||||
'@angular/common': 'workspace:*',
|
||||
'@angular/router': 'workspace:*',
|
||||
'@angular/platform-browser': 'workspace:*',
|
||||
'@angular/platform-browser-dynamic': 'workspace:*',
|
||||
'@angular/platform-server': 'workspace:*',
|
||||
'@angular/forms': 'workspace:*',
|
||||
'@angular/elements': 'workspace:*',
|
||||
'@angular/animations': 'workspace:*',
|
||||
};
|
||||
}
|
||||
// TODO: Define these packages in a single common location.
|
||||
const localAngularPackages = [
|
||||
'@angular/animations',
|
||||
'@angular/common',
|
||||
'@angular/compiler',
|
||||
'@angular/compiler-cli',
|
||||
'@angular/core',
|
||||
'@angular/elements',
|
||||
'@angular/forms',
|
||||
'@angular/language-service',
|
||||
'@angular/localize',
|
||||
'@angular/platform-browser',
|
||||
'@angular/platform-browser-dynamic',
|
||||
'@angular/platform-server',
|
||||
'@angular/router',
|
||||
'@angular/service-worker',
|
||||
'@angular/upgrade',
|
||||
];
|
||||
|
||||
function readPackage(pkg, context) {
|
||||
// TODO(devversion): This allows us to make compiler/TS a production dependency of compiler-cli
|
||||
// because `rules_js` doesn't otherwise include the dependency in the `npm_package_store`.
|
||||
// See: https://github.com/aspect-build/rules_js/issues/2226
|
||||
@@ -42,12 +40,14 @@ function readPackage(pkg, context) {
|
||||
}
|
||||
|
||||
// Change all locally generated packages to directly depend on the other local packages, instead
|
||||
// of expecting them as peerDependencies automatically as we do not auto install peer deps.
|
||||
if (version === '0.0.0-PLACEHOLDER') {
|
||||
// of expecting them as peerDependencies automatically as we do not auto install peer deps. The
|
||||
// package is also removed from peerDependencies as it was moved over and will just cause errors.
|
||||
if (localAngularPackages.includes(key)) {
|
||||
pkg.dependencies = {
|
||||
...pkg.dependencies,
|
||||
[key]: 'workspace: *',
|
||||
};
|
||||
delete pkg.peerDependencies[key];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+1
-2
@@ -332,12 +332,11 @@ groups:
|
||||
'packages/examples/{*,.*}',
|
||||
'scripts/**/{*,.*}',
|
||||
'third_party/**/{*,.*}',
|
||||
'tools/bazel-repo-patches/**/{*,.*}',
|
||||
'tools/contributing-stats/**/{*,.*}',
|
||||
'tools/gulp-tasks/**/{*,.*}',
|
||||
'tools/legacy-saucelabs/**/{*,.*}',
|
||||
'tools/manual_api_docs/**/{*,.*}',
|
||||
'tools/npm-patches/**/{*,.*}',
|
||||
'tools/pnpm-patches/**/{*,.*}',
|
||||
'tools/rxjs/**/{*,.*}',
|
||||
'tools/saucelabs-daemon/**/{*,.*}',
|
||||
'tools/saucelabs/**/{*,.*}',
|
||||
|
||||
@@ -68,30 +68,6 @@ rules_js_register_toolchains(
|
||||
node_version = NODE_VERSION,
|
||||
)
|
||||
|
||||
# Download npm dependencies.
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
|
||||
load("//integration:npm_package_archives.bzl", "npm_package_archives")
|
||||
|
||||
yarn_install(
|
||||
name = "npm",
|
||||
# Note that we add the postinstall scripts here so that the dependencies are re-installed
|
||||
# when the postinstall patches are modified.
|
||||
data = [
|
||||
YARN_LABEL,
|
||||
"//:.yarnrc",
|
||||
"//:tools/npm-patches/@angular+ng-dev+0.0.0-a6dcd24107d12114198251ee5d20cda814a1986a.patch",
|
||||
"//tools:postinstall-patches.js",
|
||||
],
|
||||
# Currently disabled due to:
|
||||
# 1. Missing Windows support currently.
|
||||
# 2. Incompatibilites with the `ts_library` rule.
|
||||
exports_directories_only = False,
|
||||
manual_build_file_contents = npm_package_archives(),
|
||||
package_json = "//:package.json",
|
||||
yarn = YARN_LABEL,
|
||||
yarn_lock = "//:yarn.lock",
|
||||
)
|
||||
|
||||
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
|
||||
|
||||
npm_translate_lock(
|
||||
@@ -121,14 +97,14 @@ npm_translate_lock(
|
||||
"//packages/platform-browser-dynamic:package.json",
|
||||
"//packages/platform-server:package.json",
|
||||
"//packages/router:package.json",
|
||||
"//packages/service-worker:package.json",
|
||||
"//packages/upgrade:package.json",
|
||||
"//tools/bazel/rules_angular_store:package.json",
|
||||
],
|
||||
npmrc = "//:.npmrc",
|
||||
pnpm_lock = "//:pnpm-lock.yaml",
|
||||
update_pnpm_lock = True,
|
||||
pnpm_version = "10.12.1",
|
||||
verify_node_modules_ignored = "//:.bazelignore",
|
||||
yarn_lock = "//:yarn.lock",
|
||||
)
|
||||
|
||||
load("@npm2//:repositories.bzl", "npm_repositories")
|
||||
@@ -184,12 +160,6 @@ load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories"
|
||||
|
||||
web_test_repositories()
|
||||
|
||||
load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "esbuild_repositories")
|
||||
|
||||
esbuild_repositories(
|
||||
npm_repository = "npm",
|
||||
)
|
||||
|
||||
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
|
||||
|
||||
rules_pkg_dependencies()
|
||||
@@ -246,18 +216,6 @@ http_archive(
|
||||
url = "https://saucelabs.com/downloads/sc-4.8.2-osx.zip",
|
||||
)
|
||||
|
||||
yarn_install(
|
||||
name = "npm_ts_versions",
|
||||
data = [
|
||||
YARN_LABEL,
|
||||
"//:.yarnrc",
|
||||
],
|
||||
exports_directories_only = False,
|
||||
package_json = "//packages/core/schematics/migrations/signal-migration/test/ts-versions:package.json",
|
||||
yarn = YARN_LABEL,
|
||||
yarn_lock = "//packages/core/schematics/migrations/signal-migration/test/ts-versions:yarn.lock",
|
||||
)
|
||||
|
||||
git_repository(
|
||||
name = "devinfra",
|
||||
commit = "4d2f875ec29ee71e0fe1a349a99c5ab2ccb71e30",
|
||||
|
||||
+5
-5
@@ -6,7 +6,7 @@ The content is written primarily in Markdown format located in `src/content`. Fo
|
||||
|
||||
## Local Development
|
||||
|
||||
For local development, [yarn](https://yarnpkg.com/) is the preferred package manager. You can set up a local environment with the following commands
|
||||
For local development, [pnpm](https://pnpm.io/) is the preferred package manager. You can set up a local environment with the following commands
|
||||
:
|
||||
|
||||
```bash
|
||||
@@ -17,11 +17,11 @@ git clone https://github.com/angular/angular.git
|
||||
cd angular
|
||||
|
||||
# Install dependencies
|
||||
yarn
|
||||
pnpm
|
||||
|
||||
# Build and run local dev server
|
||||
# NOTE: Initial build will take some time
|
||||
yarn docs
|
||||
pnpm docs
|
||||
```
|
||||
|
||||
If you are having issues with the docs building, see the [FAQs](#faqs) section.
|
||||
@@ -46,8 +46,8 @@ This is most likely due to a bazel dependency / caching issue. To resolve this,
|
||||
|
||||
```
|
||||
# Try this first
|
||||
yarn bazel clean
|
||||
pnpm bazel clean
|
||||
|
||||
# If that doesn't work, try it with the expunge flag
|
||||
yarn bazel clean --expunge
|
||||
pnpm bazel clean --expunge
|
||||
```
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Building and Testing Angular
|
||||
|
||||
This document describes how to set up your development environment to build and test Angular.
|
||||
It also explains the basic mechanics of using `git`, `node`, and `yarn`.
|
||||
It also explains the basic mechanics of using `git`, `node`, and `pnpm`.
|
||||
|
||||
* [Prerequisite Software](#prerequisite-software)
|
||||
* [Getting the Sources](#getting-the-sources)
|
||||
@@ -35,7 +35,7 @@ following on your development machine:
|
||||
`.nvmrc` is read by [nvm](https://github.com/nvm-sh/nvm) commands like `nvm install`
|
||||
and `nvm use`.
|
||||
|
||||
* [Yarn](https://yarnpkg.com) (version specified in the engines field
|
||||
* [pnpm](https://pnpm.io/) (version specified in the engines field
|
||||
of [`package.json`](../package.json)) which is used to install dependencies.
|
||||
|
||||
* On Windows: [MSYS2](https://www.msys2.org/) which is used by Bazel. Follow
|
||||
@@ -69,7 +69,7 @@ Next, install the JavaScript modules needed to build and test Angular:
|
||||
|
||||
```shell
|
||||
# Install Angular project dependencies (package.json)
|
||||
yarn install
|
||||
pnpm install
|
||||
```
|
||||
|
||||
## Building
|
||||
@@ -77,7 +77,7 @@ yarn install
|
||||
To build Angular run:
|
||||
|
||||
```shell
|
||||
yarn build
|
||||
pnpm build
|
||||
```
|
||||
|
||||
* Results are put in the `dist/packages-dist` folder.
|
||||
@@ -90,7 +90,7 @@ To see how to run and debug Angular tests locally please refer to the
|
||||
Bazel [Testing Angular](./building-with-bazel.md#testing-angular) section.
|
||||
|
||||
Note that you should execute all test suites before submitting a PR to
|
||||
GitHub (`yarn test //packages/...`).
|
||||
GitHub (`pnpm test //packages/...`).
|
||||
|
||||
However, affected tests will be executed on our CI infrastructure. So if you forgot to run some
|
||||
affected tests which would fail, GitHub will indicate the error state and present you the failures.
|
||||
@@ -101,18 +101,6 @@ PRs can only be merged if the code is formatted properly and all tests are passi
|
||||
<a name="clang-format"></a>
|
||||
<a name="prettier"></a>
|
||||
|
||||
### Testing changes against a local library/project
|
||||
|
||||
Often for developers the best way to ensure the changes they have made work as expected is to run
|
||||
use changes in another library or project. To do this developers can build Angular locally, and
|
||||
using `yarn link` build a local project with the created artifacts.
|
||||
|
||||
This can be done by running:
|
||||
|
||||
```sh
|
||||
yarn ng-dev misc build-and-link <path-to-local-project-root>
|
||||
```
|
||||
|
||||
### Building and serving a project
|
||||
|
||||
#### Cache
|
||||
@@ -140,17 +128,17 @@ If the source code is not properly formatted, the CI will fail and the PR cannot
|
||||
|
||||
You can automatically format your code by running:
|
||||
|
||||
- `yarn ng-dev format changed [shaOrRef]`: format only files changed since the provided
|
||||
- `pnpm ng-dev format changed [shaOrRef]`: format only files changed since the provided
|
||||
sha/ref. `shaOrRef` defaults to `main`.
|
||||
- `yarn ng-dev format all`: format _all_ source code
|
||||
- `yarn ng-dev format files <files..>`: format only provided files
|
||||
- `pnpm ng-dev format all`: format _all_ source code
|
||||
- `pnpm ng-dev format files <files..>`: format only provided files
|
||||
|
||||
## Linting/verifying your Source Code
|
||||
|
||||
You can check that your code is properly formatted and adheres to coding style by running:
|
||||
|
||||
``` shell
|
||||
$ yarn lint
|
||||
$ pnpm lint
|
||||
```
|
||||
|
||||
## Publishing Snapshot Builds
|
||||
@@ -167,7 +155,7 @@ snapshots of the Angular packages created based on the code in the Pull Request.
|
||||
|
||||
You can also manually publish `*-builds` snapshots just like our CI build does for upstream
|
||||
builds. Before being able to publish the packages, you need to build them locally by running the
|
||||
`yarn build` command.
|
||||
`pnpm build` command.
|
||||
|
||||
First time, you need to create the GitHub repositories:
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ The binaries for Bazel are provided by
|
||||
the [`@bazel/bazelisk`](https://github.com/bazelbuild/bazelisk)
|
||||
npm package and its platform-specific dependencies.
|
||||
|
||||
You can run Bazel with the `yarn bazel` command.
|
||||
You can run Bazel with the `pnpm bazel` command.
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -36,8 +36,8 @@ want Bazel to create several symlinks in your project directory
|
||||
|
||||
## Building Angular
|
||||
|
||||
- Build a package: `yarn bazel build packages/core`
|
||||
- Build all packages: `yarn bazel build packages/...`
|
||||
- Build a package: `pnpm bazel build packages/core`
|
||||
- Build all packages: `pnpm bazel build packages/...`
|
||||
|
||||
You can use [ibazel] to run in a "watch mode" that continuously
|
||||
keeps the outputs up-to-date as you save sources.
|
||||
@@ -46,15 +46,15 @@ keeps the outputs up-to-date as you save sources.
|
||||
|
||||
## Testing Angular
|
||||
|
||||
- Test package in node: `yarn test packages/core/test:test`
|
||||
- Test package in karma: `yarn test packages/core/test:test_web`
|
||||
- Test all packages: `yarn test packages/...`
|
||||
- Test package in node: `pnpm test packages/core/test:test`
|
||||
- Test package in karma: `pnpm test packages/core/test:test_web`
|
||||
- Test all packages: `pnpm test packages/...`
|
||||
|
||||
The ellipsis in the examples above are not meant to be substituted by a package name, but
|
||||
are used by Bazel as a wildcard to execute all tests in the specified path. To execute all the tests for a
|
||||
single package, the commands are (exemplary):
|
||||
- `yarn test //packages/core/...` for all tests, or
|
||||
- `yarn test //packages/core/test:test` for a particular test suite.
|
||||
- `pnpm test //packages/core/...` for all tests, or
|
||||
- `pnpm test //packages/core/test:test` for a particular test suite.
|
||||
|
||||
Bazel very effectively caches build results, so it's common for your first time building a target
|
||||
to be much slower than subsequent builds.
|
||||
@@ -78,7 +78,7 @@ using the proper flags with your Bazel test runs in Angular.
|
||||
- Open Chrome at: [chrome://inspect](chrome://inspect)
|
||||
- Click on `Open dedicated DevTools for Node` to launch a debugger.
|
||||
- Run your test with the debug configuration,
|
||||
e.g. `yarn bazel test packages/core/test:test --config=debug`
|
||||
e.g. `pnpm bazel test packages/core/test:test --config=debug`
|
||||
|
||||
The process should automatically connect to the debugger.
|
||||
For more, see the [rules_nodejs Debugging documentation](https://bazelbuild.github.io/rules_nodejs/index.html#debugging).
|
||||
@@ -108,7 +108,7 @@ First time setup:
|
||||
**Setting breakpoints directly in your code files may not work in VSCode**. This is because the
|
||||
files you're actually debugging are built files that exist in a `./private/...` folder.
|
||||
The easiest way to debug a test for now is to add a `debugger` statement in the code
|
||||
and launch the bazel corresponding test (`yarn bazel test <target> --config=debug`).
|
||||
and launch the bazel corresponding test (`pnpm bazel test <target> --config=debug`).
|
||||
|
||||
Bazel will wait on a connection. Go to the debug view (by clicking on the sidebar or
|
||||
Apple+Shift+D on Mac) and click on the green play icon next to the configuration name
|
||||
@@ -117,7 +117,7 @@ Apple+Shift+D on Mac) and click on the green play icon next to the configuration
|
||||
### Debugging a Karma Test
|
||||
|
||||
- Run test with `_debug` appended to the target name,
|
||||
e.g. `yarn bazel run packages/core/test:test_web_debug`.
|
||||
e.g. `pnpm bazel run packages/core/test:test_web_debug`.
|
||||
Every `ng_web_test_suite` target has an additional `_debug` target.
|
||||
- Open any browser at: [http://localhost:9876/debug.html](http://localhost:9876/debug.html)
|
||||
- Open the browser's DevTools to debug the tests (after, for example, having focused on specific
|
||||
@@ -128,12 +128,12 @@ Apple+Shift+D on Mac) and click on the green play icon next to the configuration
|
||||
Open `external` directory which contains everything that bazel downloaded while executing the
|
||||
workspace file:
|
||||
```sh
|
||||
open $(yarn -s bazel info output_base)/external
|
||||
open $(pnpm -s bazel info output_base)/external
|
||||
```
|
||||
|
||||
See subcommands that bazel executes (helpful for debugging):
|
||||
```sh
|
||||
yarn bazel build //packages/core:package -s
|
||||
pnpm bazel build //packages/core:package -s
|
||||
```
|
||||
|
||||
## Stamping
|
||||
@@ -189,7 +189,7 @@ The first step is to generate a profile of the build using the `--profile filena
|
||||
flag.
|
||||
|
||||
```sh
|
||||
yarn bazel build //packages/compiler --profile filename_name.profile
|
||||
pnpm bazel build //packages/compiler --profile filename_name.profile
|
||||
```
|
||||
|
||||
This generates a `filename_name.profile` that you can then analyse
|
||||
@@ -202,20 +202,20 @@ command.
|
||||
You can obtain a simple report directly in the console by running:
|
||||
|
||||
```sh
|
||||
yarn bazel analyze-profile filename_name.profile
|
||||
pnpm bazel analyze-profile filename_name.profile
|
||||
```
|
||||
|
||||
This will show the phase summary, individual phase information and critical path.
|
||||
|
||||
You can also list all individual tasks and the time they took using `--task_tree`.
|
||||
```sh
|
||||
yarn bazel analyze-profile filename_name.profile --task_tree ".*"
|
||||
pnpm bazel analyze-profile filename_name.profile --task_tree ".*"
|
||||
```
|
||||
|
||||
To show all tasks that take longer than a certain threshold, use the `--task_tree_threshold` flag.
|
||||
The default behavior is to use a 50ms threshold.
|
||||
```sh
|
||||
yarn bazel analyze-profile filename_name.profile --task_tree ".*" --task_tree_threshold 5000
|
||||
pnpm bazel analyze-profile filename_name.profile --task_tree ".*" --task_tree_threshold 5000
|
||||
```
|
||||
|
||||
`--task_tree` takes a regexp as argument that filters by the text shown after the time taken.
|
||||
@@ -228,7 +228,7 @@ Compiling TypeScript shows as:
|
||||
To filter all tasks by TypeScript compilations that took more than 5 seconds, use:
|
||||
|
||||
```sh
|
||||
yarn bazel analyze-profile filename_name.profile --task_tree "Compiling TypeScript" --task_tree_threshold 5000
|
||||
pnpm bazel analyze-profile filename_name.profile --task_tree "Compiling TypeScript" --task_tree_threshold 5000
|
||||
```
|
||||
|
||||
### Using the HTML profile report
|
||||
@@ -236,7 +236,7 @@ yarn bazel analyze-profile filename_name.profile --task_tree "Compiling TypeScri
|
||||
A more comprehensive way to visualize the profile information is through the HTML report:
|
||||
|
||||
```sh
|
||||
yarn bazel analyze-profile filename_name.profile --html --html_details --html_histograms
|
||||
pnpm bazel analyze-profile filename_name.profile --html --html_details --html_histograms
|
||||
```
|
||||
|
||||
This generates a `filename_name.profile.html` file that you can open in your browser.
|
||||
@@ -286,7 +286,7 @@ Require stack:
|
||||
|
||||
`bazel run` only works in Bazel Windows with non-test targets. Ensure that you are using `bazel test` instead.
|
||||
|
||||
e.g: `yarn bazel test packages/core/test/bundling/forms:symbol_test`
|
||||
e.g: `pnpm bazel test packages/core/test/bundling/forms:symbol_test`
|
||||
|
||||
#### mkdir missing
|
||||
If you see the following error::
|
||||
@@ -303,11 +303,11 @@ The `msys64` library and associated tools (like `mkdir`) are required to build A
|
||||
|
||||
Make sure you have `C:\msys64\usr\bin` in the "system" `PATH` rather than the "user" `PATH`.
|
||||
|
||||
After that, a `git clean -xfd`, `yarn`, and `yarn build` should resolve this issue.
|
||||
After that, a `git clean -xfd`, `pnpm`, and `pnpm build` should resolve this issue.
|
||||
|
||||
### Xcode
|
||||
|
||||
If running `yarn bazel build packages/...` returns the following error:
|
||||
If running `pnpm bazel build packages/...` returns the following error:
|
||||
|
||||
```
|
||||
ERROR: /private/var/tmp/[...]/external/local_config_cc/BUILD:50:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL
|
||||
@@ -331,7 +331,7 @@ If VSCode is not the root cause, you might try:
|
||||
bazel clean --expunge
|
||||
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
||||
sudo xcodebuild -license
|
||||
yarn bazel build //packages/core # Run a build outside VSCode to pre-build the xcode; then safe to run VSCode
|
||||
pnpm bazel build //packages/core # Run a build outside VSCode to pre-build the xcode; then safe to run VSCode
|
||||
```
|
||||
|
||||
Source: https://stackoverflow.com/questions/45276830/xcode-version-must-be-specified-to-use-an-apple-crosstool
|
||||
|
||||
@@ -18,7 +18,7 @@ tool will automatically merge it based on the applied target label.
|
||||
To merge a PR run:
|
||||
|
||||
```sh
|
||||
$ yarn ng-dev pr merge <pr number>
|
||||
$ pnpm ng-dev pr merge <pr number>
|
||||
```
|
||||
|
||||
## Primitives and blocked merges
|
||||
|
||||
@@ -68,11 +68,11 @@ If you modify any part of a public API in one of the supported public packages,
|
||||
test in CI with an error message that instructs you to accept the golden file.
|
||||
|
||||
The public API guard provides a Bazel target that updates the current status of a given package. If
|
||||
you add to or modify the public API in any way, you must use [yarn](https://yarnpkg.com/) to execute
|
||||
you add to or modify the public API in any way, you must use [pnpm](https://pnpm.io/) to execute
|
||||
the Bazel target in your terminal shell of choice (a recent version of `bash` is recommended).
|
||||
|
||||
```shell
|
||||
yarn bazel run //packages/<modified_package>:<modified_package>_api.accept
|
||||
pnpm bazel run //packages/<modified_package>:<modified_package>_api.accept
|
||||
```
|
||||
|
||||
Here is an example of a CI test failure that resulted from adding a new allowed type to a public
|
||||
@@ -109,6 +109,6 @@ If you modify a public API, you must accept the new golden file.
|
||||
|
||||
|
||||
To do so, execute the following Bazel target:
|
||||
yarn bazel run //packages/core:core_api.accept
|
||||
pnpm bazel run //packages/core:core_api.accept
|
||||
|
||||
```
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
### Running benchmark
|
||||
|
||||
```
|
||||
yarn benchmarks run
|
||||
pnpm benchmarks run
|
||||
```
|
||||
|
||||
### Running a comparison with local changes
|
||||
|
||||
```
|
||||
yarn benchmarks run-compare main
|
||||
yarn benchmarks run-compare <compare-sha> [bazel-target]
|
||||
pnpm benchmarks run-compare main
|
||||
pnpm benchmarks run-compare <compare-sha> [bazel-target]
|
||||
```
|
||||
|
||||
If no benchmark target is specified, a prompt will allow you to select an available benchmark.
|
||||
@@ -32,4 +32,4 @@ You can start a comparison by adding a comment as follows to any PR:
|
||||
```
|
||||
|
||||
**Note**: An explicit benchmark target must be provided. You can use the prompt
|
||||
of `yarn benchmarks run` to discover available benchmarks.
|
||||
of `pnpm benchmarks run` to discover available benchmarks.
|
||||
|
||||
+9
-9
@@ -24,16 +24,16 @@ To set up your development environment, first install the [correct version of No
|
||||
nvm install
|
||||
```
|
||||
|
||||
Second, install [Yarn](https://classic.yarnpkg.com/en/):
|
||||
Second, install [pnpm](https://pnpm.io/):
|
||||
|
||||
```shell
|
||||
npm install -g yarn@1
|
||||
npm install -g pnpm
|
||||
```
|
||||
|
||||
Third, install NPM dependencies:
|
||||
|
||||
```shell
|
||||
yarn --frozen-lockfile
|
||||
pnpm --frozen-lockfile
|
||||
```
|
||||
|
||||
Now you should be ready to build the DevTools extension.
|
||||
@@ -43,7 +43,7 @@ Now you should be ready to build the DevTools extension.
|
||||
To run the extension in development mode run:
|
||||
|
||||
```shell
|
||||
yarn devtools:devserver
|
||||
pnpm devtools:devserver
|
||||
```
|
||||
|
||||
This would start a development server that you can access on <http://localhost:4200>. In development, Angular DevTools
|
||||
@@ -55,20 +55,20 @@ DevTools then communicate with the user's app via message passing.
|
||||
Before running end-to-end tests, you need to start the development server using:
|
||||
|
||||
```shell
|
||||
yarn devtools:devserver
|
||||
pnpm devtools:devserver
|
||||
```
|
||||
You have two options for running cypress, you can use the interactive cypress UI or you can run Cypress in headless mode.
|
||||
|
||||
To open Cypress for Angular DevTools in interactive mode, run:
|
||||
|
||||
```shell
|
||||
yarn devtools:e2e:open
|
||||
pnpm devtools:e2e:open
|
||||
```
|
||||
|
||||
To run Cypress tests headless, use:
|
||||
|
||||
```shell
|
||||
yarn devtools:test:e2e
|
||||
pnpm devtools:test:e2e
|
||||
```
|
||||
|
||||
### Release builds
|
||||
@@ -76,8 +76,8 @@ yarn devtools:test:e2e
|
||||
You can build the release version of Angular DevTools for either Chrome or Firefox with:
|
||||
|
||||
```shell
|
||||
yarn devtools:build:chrome:release
|
||||
yarn devtools:build:firefox:release
|
||||
pnpm devtools:build:chrome:release
|
||||
pnpm devtools:build:firefox:release
|
||||
```
|
||||
|
||||
Either way, the built extension will be at `dist/bin/devtools/projects/shell-browser/src/prodapp`.
|
||||
|
||||
@@ -8,7 +8,7 @@ To install Angular DevTools in Firefox follow the steps:
|
||||
|
||||
* Click on `Load Temporary Add-on` button to select and load the Angular DevTools extension for Firefox.
|
||||
|
||||
* Select any file from `dist/bin/devtools/projects/shell-browser/src/prodapp` directory to load extension. If you have not built the extension for Firefox yet, you can do it using `yarn devtools:build:firefox` which will generate build for Firefox.
|
||||
* Select any file from `dist/bin/devtools/projects/shell-browser/src/prodapp` directory to load extension. If you have not built the extension for Firefox yet, you can do it using `pnpm devtools:build:firefox` which will generate build for Firefox.
|
||||
|
||||
* After selecting file and clicking open, you should be able to see Angular DevTools as a temporary Extension in Firefox.
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ git fetch upstream main
|
||||
git checkout "${MERGED_RELEASE_COMMIT}"
|
||||
|
||||
nvm install
|
||||
yarn --immutable
|
||||
pnpm --immutable
|
||||
```
|
||||
|
||||
Note that while the steps below can technically be done without merging the release PR
|
||||
@@ -71,7 +71,7 @@ Next, build and package the extension:
|
||||
|
||||
```shell
|
||||
# Build the Chrome version.
|
||||
yarn devtools:build:chrome:release
|
||||
pnpm devtools:build:chrome:release
|
||||
|
||||
# Package the extension.
|
||||
(cd dist/bin/devtools/projects/shell-browser/src/prodapp && zip -r ~/devtools-chrome.zip *)
|
||||
@@ -92,7 +92,7 @@ To publish Angular DevTools as a Firefox Add-on, first build and package the ext
|
||||
|
||||
```shell
|
||||
# Build the Firefox version.
|
||||
yarn devtools:build:firefox:release
|
||||
pnpm devtools:build:firefox:release
|
||||
|
||||
# Package the extension.
|
||||
(cd dist/bin/devtools/projects/shell-browser/src/prodapp && zip -r ~/devtools-firefox.zip *)
|
||||
|
||||
@@ -10,7 +10,7 @@ To install Angular DevTools in Safari follow the steps:
|
||||
|
||||
* Make sure the flag in `Develop -> Experimental Features -> Web Inspector Extensions` is checked.
|
||||
|
||||
* Build Angular DevTools with a chrome configuration with `yarn devtools:build:chrome` this will create an Angular DevTools build in `dist/bin/devtools/projects/shell-browser/src/prodapp`.
|
||||
* Build Angular DevTools with a chrome configuration with `pnpm devtools:build:chrome` this will create an Angular DevTools build in `dist/bin/devtools/projects/shell-browser/src/prodapp`.
|
||||
|
||||
* Run `xcrun safari-web-extension-converter --macos-only dist/bin/devtools/projects/shell-browser/src/prodapp`. This will convert Angular DevTools into a Safari web extension. This command should open Xcode when it completes.
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ to NPM. These are tested on all PRs and commits as part of our bazel tests.
|
||||
To check or update the public api goldens, run one of the following commands:
|
||||
|
||||
```bash
|
||||
yarn public-api:check
|
||||
yarn public-api:update
|
||||
pnpm public-api:check
|
||||
pnpm public-api:update
|
||||
```
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ const API_TARGETS_LOCATION = 'packages/...';
|
||||
|
||||
// The shell command to query for all Public API guard tests.
|
||||
const BAZEL_PUBLIC_API_TARGET_QUERY_CMD =
|
||||
`yarn -s bazel query --output label 'kind(js_test, ${API_TARGETS_LOCATION}) ` +
|
||||
`pnpm --silent bazel query --output label 'kind(js_test, ${API_TARGETS_LOCATION}) ` +
|
||||
`intersect attr("tags", "api_guard", ${API_TARGETS_LOCATION})'`;
|
||||
// Bazel targets for testing Public API goldens
|
||||
process.stdout.write('Gathering all Public API targets...');
|
||||
@@ -28,7 +28,7 @@ const ALL_PUBLIC_API_ACCEPTS = ALL_PUBLIC_API_TESTS.map((test) => `${test}.accep
|
||||
/** Builds all targets in parallel. */
|
||||
function buildTargets(targets) {
|
||||
process.stdout.write('Building all public API targets...');
|
||||
const commandResult = exec(`yarn -s bazel build ${targets.join(' ')}`, {silent: true});
|
||||
const commandResult = exec(`pnpm --silent bazel build ${targets.join(' ')}`, {silent: true});
|
||||
if (commandResult.code) {
|
||||
console.error(commandResult.stdout || commandResult.stderr);
|
||||
} else {
|
||||
@@ -43,7 +43,7 @@ function buildTargets(targets) {
|
||||
function runBazelCommandOnTargets(command, targets, present) {
|
||||
for (const target of targets) {
|
||||
process.stdout.write(`${present}: ${target}`);
|
||||
const commandResult = exec(`yarn -s bazel ${command} ${target}`, {silent: true});
|
||||
const commandResult = exec(`pnpm --silent bazel ${command} ${target}`, {silent: true});
|
||||
process.stdout.clearLine();
|
||||
process.stdout.cursorTo(0);
|
||||
if (commandResult.code) {
|
||||
|
||||
+28
-1
@@ -7,7 +7,34 @@
|
||||
|
||||
load("@devinfra//bazel/integration:index.bzl", "integration_test")
|
||||
load("//:packages.bzl", "INTEGRATION_PACKAGES")
|
||||
load("//integration:npm_package_archives.bzl", "NPM_PACKAGE_ARCHIVES")
|
||||
|
||||
NPM_PACKAGE_ARCHIVES = [
|
||||
"@babel/core",
|
||||
"@rollup/plugin-babel",
|
||||
"@rollup/plugin-node-resolve",
|
||||
"@rollup/plugin-commonjs",
|
||||
"check-side-effects",
|
||||
"jasmine",
|
||||
"http-server",
|
||||
"typescript",
|
||||
"rxjs",
|
||||
"systemjs",
|
||||
"tslib",
|
||||
"patch-package",
|
||||
"protractor",
|
||||
"terser",
|
||||
"rollup",
|
||||
"rollup-plugin-sourcemaps",
|
||||
"@angular/ssr",
|
||||
"@angular/build",
|
||||
"@angular/cli",
|
||||
"@angular-devkit/build-angular",
|
||||
"@bazel/bazelisk",
|
||||
"@types/jasmine",
|
||||
"@types/jasminewd2",
|
||||
"@types/node",
|
||||
"zone.js",
|
||||
]
|
||||
|
||||
def _ng_integration_test(name, setup_chromium = False, **kwargs):
|
||||
"Set defaults for the npm_integration_test common to the angular repo"
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
# The @npm packages at the root node_modules are used by integration tests
|
||||
# with `file:../../node_modules/foobar` references
|
||||
NPM_PACKAGE_ARCHIVES = [
|
||||
"@babel/core",
|
||||
"@rollup/plugin-babel",
|
||||
"@rollup/plugin-node-resolve",
|
||||
"@rollup/plugin-commonjs",
|
||||
"check-side-effects",
|
||||
"jasmine",
|
||||
"http-server",
|
||||
"typescript",
|
||||
"rxjs",
|
||||
"systemjs",
|
||||
"tslib",
|
||||
"patch-package",
|
||||
"protractor",
|
||||
"terser",
|
||||
"rollup",
|
||||
"rollup-plugin-sourcemaps",
|
||||
"@angular/ssr",
|
||||
"@angular/build",
|
||||
"@angular/cli",
|
||||
"@angular-devkit/build-angular",
|
||||
"@bazel/bazelisk",
|
||||
"@types/jasmine",
|
||||
"@types/jasminewd2",
|
||||
"@types/node",
|
||||
"zone.js",
|
||||
]
|
||||
|
||||
def npm_package_archive_label(package_name):
|
||||
return package_name.replace("/", "_").replace("@", "") + "_archive"
|
||||
|
||||
def npm_package_archives():
|
||||
"""Function to generate pkg_tar definitions for WORKSPACE yarn_install manual_build_file_contents"""
|
||||
npm_packages_to_archive = NPM_PACKAGE_ARCHIVES
|
||||
result = """load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
"""
|
||||
for name in npm_packages_to_archive:
|
||||
label_name = npm_package_archive_label(name)
|
||||
last_segment_name = name.split("/")[-1]
|
||||
result += """pkg_tar(
|
||||
name = "{label_name}",
|
||||
srcs = ["//{name}:{last_segment_name}__all_files"],
|
||||
extension = "tar.gz",
|
||||
strip_prefix = "/external/angular/node_modules/{name}",
|
||||
# should not be built unless it is a dependency of another rule
|
||||
tags = ["manual"],
|
||||
)
|
||||
""".format(name = name, label_name = label_name, last_segment_name = last_segment_name)
|
||||
return result
|
||||
@@ -3,20 +3,20 @@
|
||||
## Run in the browser
|
||||
|
||||
```bash
|
||||
yarn bazel run modules/benchmarks/src/tree/{name}:devserver
|
||||
pnpm bazel run modules/benchmarks/src/tree/{name}:devserver
|
||||
|
||||
# e.g. "ng2" tree benchmark:
|
||||
yarn bazel run modules/benchmarks/src/tree/ng2:devserver
|
||||
pnpm bazel run modules/benchmarks/src/tree/ng2:devserver
|
||||
```
|
||||
|
||||
## Run e2e tests
|
||||
|
||||
```
|
||||
# Run e2e tests of individual applications:
|
||||
yarn bazel test modules/benchmarks/src/tree/ng2/...
|
||||
pnpm bazel test modules/benchmarks/src/tree/ng2/...
|
||||
|
||||
# Run all e2e tests:
|
||||
yarn bazel test modules/benchmarks/...
|
||||
pnpm bazel test modules/benchmarks/...
|
||||
```
|
||||
|
||||
## Use of *_aot.ts files
|
||||
@@ -41,5 +41,5 @@ runs. The following options can be set through [test environment variables](http
|
||||
Here is an example command that sets the `PERF_DRYRUN` option:
|
||||
|
||||
```bash
|
||||
yarn bazel test modules/benchmarks/src/tree/baseline:perf --test_env=PERF_DRYRUN=true
|
||||
pnpm bazel test modules/benchmarks/src/tree/baseline:perf --test_env=PERF_DRYRUN=true
|
||||
```
|
||||
@@ -5,8 +5,8 @@ demonstrates how a specific example can be built and served with Bazel:
|
||||
|
||||
```bash
|
||||
# e.g. src/zippy_component
|
||||
yarn bazel run modules/playground/src/zippy_component:devserver
|
||||
pnpm bazel run modules/playground/src/zippy_component:devserver
|
||||
|
||||
# e.g. src/upgrade
|
||||
yarn bazel run modules/playground/src/upgrade:devserver
|
||||
pnpm bazel run modules/playground/src/upgrade:devserver
|
||||
```
|
||||
@@ -14,12 +14,12 @@ This small benchmark suite is dedicated to mesure & describe how compute time is
|
||||
|
||||
## Build & run
|
||||
|
||||
`yarn bazel run //modules/ssr-benchmarks:run`
|
||||
`pnpm bazel run //modules/ssr-benchmarks:run`
|
||||
|
||||
|
||||
### Running the benchmark in a browser environment
|
||||
|
||||
`yarn bazel run //modules/ssr-benchmarks:run_browser`
|
||||
`pnpm bazel run //modules/ssr-benchmarks:run_browser`
|
||||
|
||||
This bazel target will build the benchmark, start a http-server with a html that will load the benckmark script.
|
||||
The benchmark script with this target will have DOM Emulation disabled.
|
||||
@@ -36,7 +36,7 @@ Then in the performance tab of the devtools, trigger "Record & Reload" to genera
|
||||
|
||||
A target is dedicated to generate a v8 log that can be fed to the [Deopt Explorer extension](https://github.com/microsoft/deoptexplorer-vscode).
|
||||
|
||||
1. Run `yarn bazel run //modules/ssr-benchmarks:run_deopt`,
|
||||
1. Run `pnpm bazel run //modules/ssr-benchmarks:run_deopt`,
|
||||
2. open the project generated at the path after `Successfully ran all commands in test directory:`,
|
||||
3. open the logfile in the extension
|
||||
|
||||
|
||||
+35
-19
@@ -6,22 +6,17 @@
|
||||
"homepage": "https://github.com/angular/angular",
|
||||
"bugs": "https://github.com/angular/angular/issues",
|
||||
"license": "MIT",
|
||||
"packageManager": "pnpm@10.12.1",
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
||||
"yarn": ">=1.22.4 <2",
|
||||
"npm": "Please use yarn instead of NPM to install dependencies"
|
||||
"npm": "Please use pnpm instead of NPM to install dependencies",
|
||||
"yarn": "Please use pnpm instead of Yarn to install dependencies",
|
||||
"pnpm": "10.12.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.git"
|
||||
},
|
||||
"scripts": {
|
||||
"/": "",
|
||||
"// 1": "Many of our checks/scripts/tools have moved to our ng-dev tool",
|
||||
"// 2": "Find the usage you are looking for with:",
|
||||
"// 3": "yarn ng-dev --help",
|
||||
"/ ": "",
|
||||
"postinstall": "node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js && patch-package --patch-dir tools/npm-patches",
|
||||
"prepare": "husky",
|
||||
"ng-dev": "tsx --tsconfig .ng-dev/tsconfig.json node_modules/@angular/ng-dev/bundles/cli.mjs",
|
||||
"build": "tsx --tsconfig scripts/tsconfig.json scripts/build/build-packages-dist.mts",
|
||||
@@ -29,25 +24,25 @@
|
||||
"test:ci": "bazelisk test -- //... -//integration/... -//adev/... -//devtools/... -//modules/ssr-benchmarks/...",
|
||||
"integration-tests:ci": "bazelisk test -- //integration/...",
|
||||
"test-tsec": "bazelisk test //... --build_tag_filters=tsec --test_tag_filters=tsec",
|
||||
"lint": "yarn -s tslint && yarn -s ng-dev format changed --check",
|
||||
"lint": "pnpm --silent tslint && pnpm --silent ng-dev format changed --check",
|
||||
"tslint": "tslint -c tslint.json --project tsconfig-tslint.json",
|
||||
"public-api:check": "node goldens/public-api/manage.js test",
|
||||
"public-api:update": "node goldens/public-api/manage.js accept",
|
||||
"symbol-extractor:check": "node tools/symbol-extractor/run_all_symbols_extractor_tests.js test",
|
||||
"symbol-extractor:update": "node tools/symbol-extractor/run_all_symbols_extractor_tests.js accept",
|
||||
"ts-circular-deps:check": "yarn -s ng-dev ts-circular-deps check --config ./packages/circular-deps-test.conf.js",
|
||||
"check-tooling-setup": "yarn tsc --project .ng-dev/tsconfig.json && yarn tsc --project scripts/tsconfig.json",
|
||||
"ts-circular-deps:check": "pnpm -s ng-dev ts-circular-deps check --config ./packages/circular-deps-test.conf.js",
|
||||
"check-tooling-setup": "pnpm tsc --project .ng-dev/tsconfig.json && pnpm tsc --project scripts/tsconfig.json",
|
||||
"devtools:devserver": "ibazel run //devtools/src:devserver",
|
||||
"devtools:test:e2e": "yarn cypress run --project ./devtools/cypress",
|
||||
"devtools:e2e:open": "yarn cypress open --project ./devtools/cypress",
|
||||
"devtools:test:e2e": "pnpm cypress run --project ./devtools/cypress",
|
||||
"devtools:e2e:open": "pnpm cypress open --project ./devtools/cypress",
|
||||
"devtools:build:chrome": "bazelisk build --//devtools/projects/shell-browser/src:flag_browser=chrome //devtools/projects/shell-browser/src:prodapp",
|
||||
"devtools:build:firefox": "bazelisk build --config snapshot-build-firefox --//devtools/projects/shell-browser/src:flag_browser=firefox //devtools/projects/shell-browser/src:prodapp",
|
||||
"devtools:build:chrome:release": "yarn run -s devtools:build:chrome",
|
||||
"devtools:build:firefox:release": "yarn run -s devtools:build:firefox --jobs 4",
|
||||
"devtools:build:chrome:release": "pnpm run -s devtools:build:chrome",
|
||||
"devtools:build:firefox:release": "pnpm run -s devtools:build:firefox --jobs 4",
|
||||
"devtools:test": "bazelisk test --//devtools/projects/shell-browser/src:flag_browser=chrome -- //devtools/...",
|
||||
"devtools:test:unit": "bazelisk test -- //devtools/...",
|
||||
"docs": "[[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn ibazel run //adev:build.serve",
|
||||
"docs:build": "[[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel build //adev:build",
|
||||
"docs": "[[ -n $CI ]] && echo 'Cannot run this pnpm script on CI' && exit 1 || pnpm ibazel run //adev:build.serve",
|
||||
"docs:build": "[[ -n $CI ]] && echo 'Cannot run this pnpm script on CI' && exit 1 || pnpm bazel build //adev:build",
|
||||
"benchmarks": "tsx --tsconfig=scripts/tsconfig.json scripts/benchmarks/index.mts",
|
||||
"diff-release-package": "tsx --tsconfig=scripts/tsconfig.json scripts/diff-release-package.mts"
|
||||
},
|
||||
@@ -56,10 +51,22 @@
|
||||
"@angular-devkit/build-angular": "20.2.0-next.2",
|
||||
"@angular-devkit/core": "20.2.0-next.2",
|
||||
"@angular-devkit/schematics": "20.2.0-next.2",
|
||||
"@angular/animations": "workspace:*",
|
||||
"@angular/build": "20.2.0-next.2",
|
||||
"@angular/cdk": "20.2.0-next.2",
|
||||
"@angular/cli": "20.2.0-next.2",
|
||||
"@angular/common": "workspace:*",
|
||||
"@angular/compiler": "workspace:*",
|
||||
"@angular/compiler-cli": "workspace:*",
|
||||
"@angular/core": "workspace:*",
|
||||
"@angular/elements": "workspace:*",
|
||||
"@angular/forms": "workspace:*",
|
||||
"@angular/material": "20.2.0-next.2",
|
||||
"@angular/platform-browser": "workspace:*",
|
||||
"@angular/platform-browser-dynamic": "workspace:*",
|
||||
"@angular/platform-server": "workspace:*",
|
||||
"@angular/router": "workspace:*",
|
||||
"@angular/service-worker": "workspace:*",
|
||||
"@angular/ssr": "20.2.0-next.2",
|
||||
"@babel/cli": "7.28.0",
|
||||
"@babel/core": "7.28.0",
|
||||
@@ -213,6 +220,15 @@
|
||||
"patchedDependencies": {
|
||||
"dagre-d3-es@7.0.11": "tools/pnpm-patches/dagre-d3-es+7.0.11.patch"
|
||||
},
|
||||
"onlyBuiltDependencies": []
|
||||
"packageExtensions": {
|
||||
"grpc-gcp": {
|
||||
"peerDependencies": {
|
||||
"protobufjs": "*"
|
||||
}
|
||||
}
|
||||
},
|
||||
"onlyBuiltDependencies": [
|
||||
"cypress"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,5 +7,5 @@ In order to publish this package manually, one can run the following command aft
|
||||
the `version` in the `package.json` of this package:
|
||||
|
||||
```
|
||||
yarn bazel run //packages/benchpress:npm_package.publish
|
||||
pnpm bazel run //packages/benchpress:npm_package.publish
|
||||
```
|
||||
@@ -14,5 +14,5 @@ Generally this tooling will be wrapped in a transpiler specific plugin, such as
|
||||
The unit tests are built and run using Bazel:
|
||||
|
||||
```bash
|
||||
yarn bazel test //packages/compiler-cli/linker/test
|
||||
pnpm bazel test //packages/compiler-cli/linker/test
|
||||
```
|
||||
|
||||
@@ -8,5 +8,5 @@ See the [linker package README](../README.md) for more information.
|
||||
The unit tests are built and run using Bazel:
|
||||
|
||||
```bash
|
||||
yarn bazel test //packages/compiler-cli/linker/babel/test
|
||||
pnpm bazel test //packages/compiler-cli/linker/babel/test
|
||||
```
|
||||
|
||||
@@ -160,15 +160,15 @@ Note:
|
||||
The simplest way to run all the compliance tests is:
|
||||
|
||||
```sh
|
||||
yarn test //packages/compiler-cli/test/compliance/...
|
||||
pnpm test //packages/compiler-cli/test/compliance/...
|
||||
```
|
||||
|
||||
If you only want to run one of the three types of test you can be more specific:
|
||||
|
||||
```sh
|
||||
yarn test //packages/compiler-cli/test/compliance/full
|
||||
yarn test //packages/compiler-cli/test/compliance/linked
|
||||
yarn test //packages/compiler-cli/test/compliance/test_cases/...
|
||||
pnpm test //packages/compiler-cli/test/compliance/full
|
||||
pnpm test //packages/compiler-cli/test/compliance/linked
|
||||
pnpm test //packages/compiler-cli/test/compliance/test_cases/...
|
||||
```
|
||||
|
||||
(The last command runs the partial compilation tests.)
|
||||
@@ -207,14 +207,14 @@ to the Bazel test command.
|
||||
For example:
|
||||
|
||||
```sg
|
||||
yarn test //packages/compiler-cli/test/compliance/full --config=debug
|
||||
yarn test //packages/compiler-cli/test/compliance/linked --config=debug
|
||||
pnpm test //packages/compiler-cli/test/compliance/full --config=debug
|
||||
pnpm test //packages/compiler-cli/test/compliance/linked --config=debug
|
||||
```
|
||||
|
||||
To debug generating the partial golden output use the following form of Bazel command:
|
||||
|
||||
```sh
|
||||
yarn bazel run //packages/compiler-cli/test/compliance/test_cases:partial_<path/to/test_case>.debug
|
||||
pnpm bazel run //packages/compiler-cli/test/compliance/test_cases:partial_<path/to/test_case>.debug
|
||||
```
|
||||
|
||||
The `path/to/test_case` is relative to the `test_cases` directory. So for this `TEST_CASES.json` file at:
|
||||
@@ -226,7 +226,7 @@ packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_directives/mat
|
||||
The command to debug the test-cases would be:
|
||||
|
||||
```
|
||||
yarn bazel run //packages/compiler-cli/test/compliance/test_cases:partial_r3_view_compiler_directives/matching.debug
|
||||
pnpm bazel run //packages/compiler-cli/test/compliance/test_cases:partial_r3_view_compiler_directives/matching.debug
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {exec} from 'shelljs';
|
||||
const {BUILD_WORKSPACE_DIRECTORY} = process.env;
|
||||
|
||||
const rulesResult = exec(
|
||||
'yarn --silent bazel query \'filter("\\.update$", kind(rule, //packages/compiler-cli/test/compliance/test_cases:*))\' --output label',
|
||||
'pnpm --silent bazel query \'filter("\\.update$", kind(rule, //packages/compiler-cli/test/compliance/test_cases:*))\' --output label',
|
||||
{cwd: BUILD_WORKSPACE_DIRECTORY, env: process.env, silent: true});
|
||||
|
||||
if (rulesResult.code !== 0) {
|
||||
@@ -12,6 +12,6 @@ if (rulesResult.code !== 0) {
|
||||
|
||||
for (const rule of rulesResult.split('\n')) {
|
||||
if (rule.trim() !== '') {
|
||||
console.log('yarn bazel run ' + rule);
|
||||
console.log('pnpm bazel run ' + rule);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export function checkExpectations(
|
||||
`The generated file at ${generatedPath} does not exist.\n` +
|
||||
'Perhaps there is no matching input source file in the TEST_CASES.json file for this test case.\n' +
|
||||
'Or maybe you need to regenerate the GOLDEN_PARTIAL.js file by running:\n\n' +
|
||||
` yarn bazel run //packages/compiler-cli/test/compliance/test_cases:${testPath}.golden.update`,
|
||||
` pnpm bazel run //packages/compiler-cli/test/compliance/test_cases:${testPath}.golden.update`,
|
||||
);
|
||||
// Clear the stack so that we get a nice error message
|
||||
error.stack = '';
|
||||
|
||||
@@ -13,7 +13,7 @@ import shelljs from 'shelljs';
|
||||
const {exec} = shelljs;
|
||||
|
||||
process.stdout.write('Gathering all partial golden update targets');
|
||||
const queryCommand = `yarn -s bazel query --output label "kind(_write_source_file, //packages/compiler-cli/test/compliance/test_cases:*)"`;
|
||||
const queryCommand = `pnpm -s bazel query --output label "kind(_write_source_file, //packages/compiler-cli/test/compliance/test_cases:*)"`;
|
||||
const allUpdateTargets = exec(queryCommand, {silent: true})
|
||||
.trim()
|
||||
.split('\n')
|
||||
@@ -33,7 +33,7 @@ process.stdout.cursorTo(0);
|
||||
for (const [index, target] of allUpdateTargets.entries()) {
|
||||
const progress = `${index + 1} / ${allUpdateTargets.length}`;
|
||||
process.stdout.write(`[${progress}] Running: ${target}`);
|
||||
const commandResult = exec(`yarn bazel run ${target}`, {silent: true});
|
||||
const commandResult = exec(`pnpm bazel run ${target}`, {silent: true});
|
||||
process.stdout.clearLine();
|
||||
process.stdout.cursorTo(0);
|
||||
if (commandResult.code) {
|
||||
|
||||
@@ -6,8 +6,8 @@ This is asserted by keeping gold files of all symbols which are expected to be r
|
||||
When doing renaming it is often necessary to update the gold files; to do so use these scripts:
|
||||
|
||||
```
|
||||
yarn run symbol-extractor:check
|
||||
yarn run symbol-extractor:update
|
||||
pnpm run symbol-extractor:check
|
||||
pnpm run symbol-extractor:update
|
||||
```
|
||||
|
||||
## Debugging
|
||||
@@ -15,14 +15,14 @@ yarn run symbol-extractor:update
|
||||
You can inspect the build output of each project by building the `:bundles` target.
|
||||
|
||||
```bash
|
||||
yarn bazel build //packages/core/test/bundling/standalone_bootstrap:bundles
|
||||
pnpm bazel build //packages/core/test/bundling/standalone_bootstrap:bundles
|
||||
```
|
||||
|
||||
This output is always unmangled and can be easily used for debugging. Alternatively, you
|
||||
can also serve the output by running:
|
||||
|
||||
```bash
|
||||
yarn bazel run //packages/core/test/bundling/standalone_bootstrap:bundles.serve
|
||||
pnpm bazel run //packages/core/test/bundling/standalone_bootstrap:bundles.serve
|
||||
```
|
||||
|
||||
If needed, you can also control the Angular CLI optimizations via environment variables that
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
This folder contains a simple application that can be used as a playground for the `NgOptimizedImage` directive testing. You can run the following command to start the dev server:
|
||||
|
||||
```
|
||||
yarn ibazel run packages/core/test/bundling/image-directive:devserver
|
||||
pnpm ibazel run packages/core/test/bundling/image-directive:devserver
|
||||
```
|
||||
|
||||
There is also a set of e2e tests (powered by Protractor), which can be invoked by running:
|
||||
|
||||
```
|
||||
yarn bazel test packages/core/test/bundling/image-directive:protractor_tests
|
||||
pnpm bazel test packages/core/test/bundling/image-directive:protractor_tests
|
||||
```
|
||||
|
||||
@@ -8,14 +8,14 @@ behavior) just like an Angular application developer would write.
|
||||
|
||||
```
|
||||
# Serving individual examples (e.g. common)
|
||||
yarn bazel run //packages/examples/common:devserver
|
||||
pnpm bazel run //packages/examples/common:devserver
|
||||
|
||||
# "core" examples
|
||||
yarn bazel run //packages/examples/core:devserver
|
||||
pnpm bazel run //packages/examples/core:devserver
|
||||
```
|
||||
|
||||
# Running the tests
|
||||
|
||||
```
|
||||
yarn bazel test //packages/examples/...
|
||||
pnpm bazel test //packages/examples/...
|
||||
```
|
||||
@@ -5,7 +5,7 @@ set -ex
|
||||
# so that it can be consumed by the Angular extension for local development.
|
||||
# Usage: ./build.sh /path/to/vscode-ng-language-service
|
||||
|
||||
readonly bazel_bin=$(yarn run -s bazel info bazel-bin)
|
||||
readonly bazel_bin=$(pnpm --silent bazel info bazel-bin)
|
||||
readonly extension_repo="$1"
|
||||
|
||||
if [[ -z "${extension_repo}" ]]; then
|
||||
@@ -24,7 +24,7 @@ _sedi () {
|
||||
sed "${sedi[@]}" "$@"
|
||||
}
|
||||
|
||||
yarn bazel build --config=release //packages/language-service:npm_package
|
||||
pnpm bazel build --config=release //packages/language-service:npm_package
|
||||
pushd "${extension_repo}"
|
||||
rm -rf .angular_packages/language-service
|
||||
mkdir -p .angular_packages/language-service
|
||||
@@ -39,5 +39,5 @@ npm_package(
|
||||
)
|
||||
EOT
|
||||
_sedi 's#\# PLACE_HOLDER_FOR_angular/angular_packages/language-service/build.sh#"//.angular_packages/language-service:package.json", \# FOR TESTING ONLY! DO NOT COMMIT THIS LINE!#' WORKSPACE
|
||||
yarn add @angular/language-service@file:".angular_packages/language-service"
|
||||
pnpm add @angular/language-service@file:".angular_packages/language-service"
|
||||
popd
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("//tools:defaults2.bzl", "api_golden_test", "api_golden_test_npm_package", "generate_api_docs", "ng_package", "ng_project", "ts_config")
|
||||
load("//tools:defaults2.bzl", "api_golden_test", "api_golden_test_npm_package", "generate_api_docs", "ng_package", "ng_project", "npm_package", "ts_config")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -66,6 +66,14 @@ ng_package(
|
||||
],
|
||||
)
|
||||
|
||||
npm_package(
|
||||
name = "pkg",
|
||||
srcs = [":npm_package"],
|
||||
replace_prefixes = {
|
||||
"npm_package/": "",
|
||||
},
|
||||
)
|
||||
|
||||
api_golden_test_npm_package(
|
||||
name = "service-worker_api",
|
||||
data = [
|
||||
|
||||
Generated
+4269
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
- .
|
||||
- test/typings/
|
||||
Generated
+12762
-10020
File diff suppressed because it is too large
Load Diff
@@ -20,5 +20,26 @@ packages:
|
||||
- packages/localize/
|
||||
- packages/elements/
|
||||
- packages/benchpress/
|
||||
- packages/service-worker/
|
||||
- packages/upgrade/
|
||||
- tools/bazel/rules_angular_store/
|
||||
|
||||
allowedDeprecatedVersions:
|
||||
angular: '*'
|
||||
tslint: '*'
|
||||
gulp-conventional-changelog: '5'
|
||||
protractor: '7'
|
||||
'@babel/plugin-proposal-async-generator-functions': '7'
|
||||
|
||||
overrides:
|
||||
'@angular/compiler': 'workspace:*'
|
||||
'@angular/compiler-cli': 'workspace:*'
|
||||
'@angular/core': 'workspace:*'
|
||||
'@angular/common': 'workspace:*'
|
||||
'@angular/router': 'workspace:*'
|
||||
'@angular/platform-browser': 'workspace:*'
|
||||
'@angular/platform-browser-dynamic': 'workspace:*'
|
||||
'@angular/platform-server': 'workspace:*'
|
||||
'@angular/forms': 'workspace:*'
|
||||
'@angular/elements': 'workspace:*'
|
||||
'@angular/animations': 'workspace:*'
|
||||
|
||||
+6
-7
@@ -10,15 +10,14 @@
|
||||
"postUpgradeTasks": {
|
||||
"commands": [
|
||||
"git restore .yarn/releases/yarn-1.22.22.cjs pnpm-lock.yaml .npmrc",
|
||||
"yarn install --frozen-lockfile --non-interactive",
|
||||
"yarn bazel sync --only=repo || true",
|
||||
"yarn bazel run //.github/actions/deploy-docs-site:main.update",
|
||||
"yarn bazel run //packages/common:base_currencies_file.update",
|
||||
"yarn bazel run //packages/common/locales:closure_locale_file.update",
|
||||
"yarn bazel run //packages/core:base_locale_file.update"
|
||||
"pnpm install --frozen-lockfile",
|
||||
"pnpm bazel sync --only=repo || true",
|
||||
"pnpm bazel run //.github/actions/deploy-docs-site:main.update",
|
||||
"pnpm bazel run //packages/common:base_currencies_file.update",
|
||||
"pnpm bazel run //packages/common/locales:closure_locale_file.update",
|
||||
"pnpm bazel run //packages/core:base_locale_file.update"
|
||||
],
|
||||
"fileFilters": [
|
||||
".aspect/rules/external_repository_action_cache/**/*",
|
||||
".github/actions/deploy-docs-site/**/*",
|
||||
"packages/**/*",
|
||||
"pnpm-lock.yaml"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## Benchmarks script
|
||||
|
||||
This folder contains a convenience script for running benchmarks and performing comparisons. It can
|
||||
be run via `yarn benchmarks`. See command line help for possible commands.
|
||||
be run via `pnpm benchmarks`. See command line help for possible commands.
|
||||
|
||||
The benchmark script is used in conjunction with the benchmark compare GitHub actions workflow, allowing
|
||||
organization members to initiate a benchmark comparison via a GitHub comment in a PR.
|
||||
|
||||
@@ -19,7 +19,7 @@ sh.set('-e');
|
||||
export const projectDir: string = join(dirname(fileURLToPath(import.meta.url)), '../..');
|
||||
|
||||
/** Command that runs Bazel. */
|
||||
export const bazelCmd = process.env.BAZEL || `yarn -s bazel`;
|
||||
export const bazelCmd = process.env.BAZEL || `pnpm --silent bazel`;
|
||||
|
||||
/** Name of the Bazel tag that will be used to find release package targets. */
|
||||
const releaseTargetTag = 'release-with-framework';
|
||||
|
||||
@@ -22,13 +22,13 @@ if [[ -z "${SAUCE_TUNNEL_IDENTIFIER:-}" ]]; then
|
||||
fi
|
||||
|
||||
# First build the background-service binary target so the build runs in the foreground
|
||||
yarn bazel build //tools/saucelabs-daemon/background-service --build_runfile_links
|
||||
pnpm bazel build //tools/saucelabs-daemon/background-service --build_runfile_links
|
||||
|
||||
# Query for the test targets to run
|
||||
TESTS=$(./node_modules/.bin/bazelisk query --output label '(kind(karma_web_test, ...) intersect attr("tags", "saucelabs", ...)) except attr("tags", "fixme-saucelabs", ...)')
|
||||
|
||||
# Build all test targets so the build can fan out to all CPUs
|
||||
yarn bazel build ${TESTS}
|
||||
pnpm bazel build ${TESTS}
|
||||
|
||||
# Start the saucelabs-daemon background service in the background. Run directly from the generated
|
||||
# bash script instead of using bazel run so we get the PID of the node process. Otherwise killing
|
||||
@@ -51,6 +51,6 @@ trap kill_background_service INT TERM
|
||||
sleep 2
|
||||
|
||||
# Run all of the saucelabs test targets
|
||||
yarn bazel test --config=saucelabs --jobs="$NUMBER_OF_PARALLEL_BROWSERS" ${TESTS} "$@"
|
||||
pnpm bazel test --config=saucelabs --jobs="$NUMBER_OF_PARALLEL_BROWSERS" ${TESTS} "$@"
|
||||
|
||||
kill_background_service
|
||||
|
||||
@@ -2,11 +2,6 @@ load("//tools:defaults2.bzl", "ts_config")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files([
|
||||
"tsconfig.json",
|
||||
"postinstall-patches.js",
|
||||
])
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig_build",
|
||||
src = "tsconfig.json",
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
diff --git a/node_modules/@angular/ng-dev/utils/config.js b/node_modules/@angular/ng-dev/utils/config.js
|
||||
index 9d2fa6b..374acf0 100755
|
||||
--- a/node_modules/@angular/ng-dev/utils/config.js
|
||||
+++ b/node_modules/@angular/ng-dev/utils/config.js
|
||||
@@ -14,7 +14,7 @@ import { determineRepoBaseDirFromCwd } from './repo-directory.js';
|
||||
* The filename expected for creating the ng-dev config, without the file
|
||||
* extension to allow either a typescript or javascript file to be used.
|
||||
*/
|
||||
-const CONFIG_FILE_PATH = '.ng-dev/config.mjs';
|
||||
+const CONFIG_FILE_PATH = '.ng-dev/config.mts';
|
||||
/**
|
||||
* The filename expected for local user config, without the file extension to allow a typescript,
|
||||
* javascript or json file to be used.
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/node_modules/@angular-devkit/architect-cli/bin/architect.js b/node_modules/@angular-devkit/architect-cli/bin/architect.js
|
||||
index 27b74b3..96b16a4 100644
|
||||
--- a/node_modules/@angular-devkit/architect-cli/bin/architect.js
|
||||
+++ b/node_modules/@angular-devkit/architect-cli/bin/architect.js
|
||||
@@ -198,8 +198,6 @@ async function main(args) {
|
||||
// Show usage of deprecated options
|
||||
registry.useXDeprecatedProvider((msg) => logger.warn(msg));
|
||||
const { workspace } = await core_1.workspaces.readWorkspace(configFilePath, core_1.workspaces.createWorkspaceHost(new node_2.NodeJsSyncHost()));
|
||||
- // Clear the console.
|
||||
- process.stdout.write('\u001Bc');
|
||||
return await _executeTarget(logger, workspace, root, argv, registry);
|
||||
}
|
||||
main(process.argv.slice(2)).then((code) => {
|
||||
@@ -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.dev/license
|
||||
*/
|
||||
|
||||
try {
|
||||
require.resolve('shelljs');
|
||||
} catch (e) {
|
||||
// We are in an bazel managed external node_modules repository
|
||||
// and the resolve has failed because node did not preserve the symlink
|
||||
// when loading the script.
|
||||
// This can be fixed using the --preserve-symlinks-main flag which
|
||||
// is introduced in node 10.2.0
|
||||
console.warn(
|
||||
`Running postinstall-patches.js script in an external repository requires --preserve-symlinks-main node flag introduced in node 10.2.0. ` +
|
||||
`Current node version is ${process.version}. Node called with '${process.argv.join(' ')}'.`,
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const {set, cd, sed, echo, ls, rm} = require('shelljs');
|
||||
const {readFileSync, writeFileSync} = require('fs');
|
||||
const path = require('path');
|
||||
const log = console.info;
|
||||
|
||||
// COMMENTED OUT BECAUSE WE CURRENTLY REQUIRE NO PATCHES
|
||||
// UNCOMMENT TO REENABLE PATCHING AND LOG OUTPUT
|
||||
//
|
||||
log('===== about to run the postinstall-patches.js script =====');
|
||||
// fail on first error
|
||||
set('-e');
|
||||
// print commands as being executed
|
||||
set('-v');
|
||||
// jump to project root
|
||||
cd(path.join(__dirname, '../'));
|
||||
|
||||
/* EXAMPLE PATCH:
|
||||
// https://github.com/ReactiveX/rxjs/pull/3302
|
||||
// make node_modules/rxjs compilable with Typescript 2.7
|
||||
// remove when we update to rxjs v6
|
||||
log('\n# patch: reactivex/rxjs#3302 make node_modules/rxjs compilable with Typescript 2.7');
|
||||
sed('-i', '(\'response\' in xhr)', '(\'response\' in (xhr as any))',
|
||||
'node_modules/rxjs/src/observable/dom/AjaxObservable.ts');
|
||||
*/
|
||||
|
||||
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/',
|
||||
'node_modules/rxjs/observable/',
|
||||
'node_modules/rxjs/operator/',
|
||||
// rxjs/operators is a public entry point that also contains files to support legacy deep import
|
||||
// paths, so we need to preserve index.* and package.json files that are required for module
|
||||
// resolution.
|
||||
'node_modules/rxjs/operators/!(index.*|package.json)',
|
||||
'node_modules/rxjs/scheduler/',
|
||||
'node_modules/rxjs/symbol/',
|
||||
'node_modules/rxjs/util/',
|
||||
'node_modules/rxjs/internal/Rx.d.ts',
|
||||
'node_modules/rxjs/AsyncSubject.*',
|
||||
'node_modules/rxjs/BehaviorSubject.*',
|
||||
'node_modules/rxjs/InnerSubscriber.*',
|
||||
'node_modules/rxjs/interfaces.*',
|
||||
'node_modules/rxjs/Notification.*',
|
||||
'node_modules/rxjs/Observable.*',
|
||||
'node_modules/rxjs/Observer.*',
|
||||
'node_modules/rxjs/Operator.*',
|
||||
'node_modules/rxjs/OuterSubscriber.*',
|
||||
'node_modules/rxjs/ReplaySubject.*',
|
||||
'node_modules/rxjs/Rx.*',
|
||||
'node_modules/rxjs/Scheduler.*',
|
||||
'node_modules/rxjs/Subject.*',
|
||||
'node_modules/rxjs/SubjectSubscription.*',
|
||||
'node_modules/rxjs/Subscriber.*',
|
||||
'node_modules/rxjs/Subscription.*',
|
||||
]);
|
||||
|
||||
log('===== finished running the postinstall-patches.js script =====');
|
||||
@@ -10,7 +10,7 @@ If you are having trouble running Saucelabs tests locally you can contact [Joey
|
||||
2. Once you have your environment variables set up, run the setup task in the root of the repo:
|
||||
|
||||
``` bash
|
||||
yarn bazel run //tools/saucelabs-daemon/background-service -- <number_of_browsers>
|
||||
pnpm bazel run //tools/saucelabs-daemon/background-service -- <number_of_browsers>
|
||||
```
|
||||
|
||||
This will start a daemon process that will connect to Saucelabs and provision browsers
|
||||
@@ -21,7 +21,7 @@ once you start running your first test target.
|
||||
For example, `packages/core/test:test_web` becomes `packages/core/test:test_web_saucelabs`.
|
||||
|
||||
```
|
||||
yarn bazel test //packages/core/test:test_web_saucelabs
|
||||
pnpm bazel test //packages/core/test:test_web_saucelabs
|
||||
```
|
||||
|
||||
## Additional test features
|
||||
|
||||
@@ -108,7 +108,7 @@ function main(argv: [string, string, string] | [string, string]): boolean {
|
||||
if (!success) {
|
||||
console.error(`TEST FAILED!`);
|
||||
console.error(` To update the golden file run: `);
|
||||
console.error(` yarn bazel run ${process.env['TEST_TARGET']}.accept`);
|
||||
console.error(` pnpm bazel run ${process.env['TEST_TARGET']}.accept`);
|
||||
}
|
||||
|
||||
return success;
|
||||
|
||||
@@ -28,8 +28,8 @@ const BAZEL_QUERY =
|
||||
`'kind(js_test, ${TEST_TARGETS_LOCATION}) ` +
|
||||
`intersect attr("tags", "symbol_extractor", ${TEST_TARGETS_LOCATION})'`;
|
||||
const ALL_TEST_TARGETS = spawnSync(
|
||||
'yarn',
|
||||
['-s', 'bazel', 'query', '--output', 'label', BAZEL_QUERY],
|
||||
'pnpm',
|
||||
['--silent', 'bazel', 'query', '--output', 'label', BAZEL_QUERY],
|
||||
{encoding: 'utf8', shell: true, cwd: path.resolve(__dirname, '../..')},
|
||||
)
|
||||
.stdout.trim()
|
||||
@@ -50,7 +50,7 @@ const ALL_ACCEPT_TARGETS = ALL_TEST_TARGETS.map((test) => `${test}.accept`);
|
||||
/** Builds all targets in parallel. */
|
||||
function buildTargets(targets) {
|
||||
process.stdout.write('Building all symbol extractor targets...');
|
||||
const commandResult = spawnSync('yarn', ['-s', 'bazel', 'build', targets.join(' ')], {
|
||||
const commandResult = spawnSync('pnpm', ['--silent', 'bazel', 'build', targets.join(' ')], {
|
||||
encoding: 'utf8',
|
||||
shell: true,
|
||||
});
|
||||
@@ -66,7 +66,9 @@ function buildTargets(targets) {
|
||||
function runBazelCommandOnTargets(command, targets, present) {
|
||||
for (const target of targets) {
|
||||
process.stdout.write(`${present}: ${target}`);
|
||||
const commandResult = spawnSync('yarn', ['-s', 'bazel', command, target], {encoding: 'utf8'});
|
||||
const commandResult = spawnSync('pnpm', ['--silent', 'bazel', command, target], {
|
||||
encoding: 'utf8',
|
||||
});
|
||||
process.stdout.clearLine();
|
||||
process.stdout.cursorTo(0);
|
||||
if (commandResult.status) {
|
||||
|
||||
Reference in New Issue
Block a user