-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(repo): migrate to pnpm (#16284)
- Loading branch information
Showing
38 changed files
with
29,430 additions
and
171,902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,19 +14,19 @@ orbs: | |
# ------------------------- | ||
machine: | ||
pre: | ||
- mkdir ~/.cache/yarn | ||
- mkdir ~/.pnpm-store | ||
- mkdir ~/.cache/Cypress | ||
- mkdir ~/Library/Caches/Homebrew | ||
- mkdir /usr/local/Homebrew | ||
|
||
dependencies: | ||
cache_directories: | ||
- ~/.cache/yarn | ||
- ~/.pnpm-store | ||
- ~/.cache/Cypress | ||
- /usr/local/Homebrew | ||
- ~/Library/Caches/Homebrew | ||
override: | ||
- yarn install | ||
- pnpm install | ||
- brew install | ||
|
||
defaults: &defaults | ||
|
@@ -52,29 +52,30 @@ executors: | |
# COMMANDS | ||
# ------------------------- | ||
commands: | ||
run-yarn-install: | ||
run-pnpm-install: | ||
parameters: | ||
os: | ||
type: string | ||
steps: | ||
- restore_cache: | ||
name: Restore Yarn Package Cache | ||
name: Restore pnpm Package Cache | ||
keys: | ||
- node-deps-{{ arch }}-v2-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }} | ||
- node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }} | ||
- run: | ||
name: Install dependencies | ||
command: yarn install --prefer-offline --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn | ||
name: Install pnpm package manager | ||
command: | | ||
npm install -g @pnpm/[email protected] | ||
- run: | ||
name: Install Dependencies | ||
command: | | ||
pnpm install --frozen-lockfile | ||
- save_cache: | ||
name: Save Yarn Package Cache | ||
key: node-deps-{{ arch }}-v2-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }} | ||
name: Save pnpm Package Cache | ||
key: node-deps-{{ arch }}-v3-{{ checksum "pnpm-lock.yaml" }} | ||
paths: | ||
- ~/.cache/yarn | ||
- ~/.pnpm-store | ||
- ~/.cache/Cypress | ||
install-pnpm: | ||
steps: | ||
- run: | ||
name: Install PNPM | ||
command: npm install --prefix=$HOME/.local -g @pnpm/[email protected] | ||
- node_modules | ||
|
||
setup: | ||
parameters: | ||
|
@@ -114,13 +115,8 @@ commands: | |
- node/install: | ||
# Use LTS version | ||
node-version: '' | ||
- run-yarn-install: | ||
- run-pnpm-install: | ||
os: << parameters.os >> | ||
- when: | ||
condition: | ||
equal: [<< parameters.os >>, linux] | ||
steps: | ||
- install-pnpm | ||
|
||
# ------------------------- | ||
# JOBS | ||
|
@@ -162,7 +158,7 @@ jobs: | |
os: << parameters.os >> | ||
- run: | ||
name: Agent | ||
command: npx nx-cloud start-agent | ||
command: pnpm nx-cloud start-agent | ||
no_output_timeout: 60m | ||
|
||
# ------------------------- | ||
|
@@ -184,29 +180,29 @@ jobs: | |
os: linux | ||
- nx/set-shas: | ||
main-branch-name: 'master' | ||
- run: npx nx-cloud start-ci-run --stop-agents-after="e2e" | ||
- run: pnpm nx-cloud start-ci-run --stop-agents-after="e2e" | ||
- run: | ||
name: Check Documentation | ||
command: npx nx documentation --no-dte | ||
command: pnpm nx documentation --no-dte | ||
no_output_timeout: 20m | ||
- run: | ||
name: Run Checks/Lint/Test/Build | ||
no_output_timeout: 60m | ||
command: | | ||
pids=() | ||
npx nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD & | ||
pnpm nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD & | ||
pids+=($!) | ||
npx nx run-many -t check-imports check-commit check-lock-files depcheck --parallel=1 --no-dte & | ||
pnpm nx run-many -t check-imports check-commit check-lock-files depcheck --parallel=1 --no-dte & | ||
pids+=($!) | ||
yarn nx affected --target=lint --base=$NX_BASE --head=$NX_HEAD --parallel=3 & | ||
pnpm nx affected --target=lint --base=$NX_BASE --head=$NX_HEAD --parallel=3 & | ||
pids+=($!) | ||
yarn nx affected --target=test --base=$NX_BASE --head=$NX_HEAD --parallel=1 & | ||
pnpm nx affected --target=test --base=$NX_BASE --head=$NX_HEAD --parallel=1 & | ||
pids+=($!) | ||
(yarn nx affected --target=build --base=$NX_BASE --head=$NX_HEAD --parallel=3 && | ||
npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --parallel=1) & | ||
(pnpm nx affected --target=build --base=$NX_BASE --head=$NX_HEAD --parallel=3 && | ||
pnpm nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --parallel=1) & | ||
pids+=($!) | ||
for pid in "${pids[@]}"; do | ||
|
@@ -221,6 +217,7 @@ jobs: | |
NX_E2E_CI_CACHE_KEY: e2e-circleci-macos | ||
NX_DAEMON: 'true' | ||
NX_PERF_LOGGING: 'false' | ||
SELECTED_PM: 'npm' # explicitly define npm for macOS tests | ||
steps: | ||
- run: | ||
name: Set dynamic nx run variable | ||
|
@@ -232,7 +229,7 @@ jobs: | |
- run: | ||
name: Run E2E Tests for macOS | ||
command: | | ||
npx nx affected -t e2e-macos --parallel=1 | ||
pnpm nx affected -t e2e-macos --parallel=1 --base=$NX_BASE --head=$NX_HEAD | ||
no_output_timeout: 45m | ||
|
||
# ------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,10 +39,15 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PNPM | ||
run: | | ||
npm install -g @pnpm/[email protected] | ||
- name: Set node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'pnpm' | ||
|
||
- name: Cache node_modules | ||
id: cache-modules | ||
|
@@ -54,7 +59,7 @@ jobs: | |
|
||
- name: Install packages | ||
if: steps.cache-modules.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Homebrew cache directory path | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
|
@@ -320,14 +325,14 @@ jobs: | |
run: mkdir -p outputs | ||
|
||
- name: Install PNPM | ||
if: ${{ matrix.package_manager == 'pnpm' }} | ||
run: | | ||
npm install -g @pnpm/[email protected] | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'pnpm' | ||
registry-url: http://localhost:4872 | ||
|
||
- name: Cache node_modules | ||
|
@@ -338,8 +343,7 @@ jobs: | |
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }} | ||
|
||
- name: Install packages | ||
if: steps.cache-modules.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Cleanup | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,10 +30,15 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PNPM | ||
run: | | ||
npm install -g @pnpm/[email protected] | ||
- name: Set node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'pnpm' | ||
|
||
- name: Cache node_modules | ||
id: cache-modules | ||
|
@@ -44,7 +49,7 @@ jobs: | |
|
||
- name: Install packages | ||
if: steps.cache-modules.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Cache Cypress | ||
id: cache-cypress | ||
|
@@ -243,10 +248,15 @@ jobs: | |
- name: Prepare dir for output | ||
run: mkdir -p outputs | ||
|
||
- name: Install PNPM | ||
run: | | ||
npm install -g @pnpm/[email protected] | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'pnpm' | ||
registry-url: http://localhost:4872 | ||
|
||
- name: Cache node_modules | ||
|
@@ -257,8 +267,7 @@ jobs: | |
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }} | ||
|
||
- name: Install packages | ||
if: steps.cache-modules.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --non-interactive | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Cache Cypress | ||
id: cache-cypress | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
2628658
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev