Skip to content

Commit 466cb1a

Browse files
authored
Merge pull request #198 from toolsplus/migrate-to-pnpm-catalogs
build: change from npm to pnpm
2 parents 67d8b40 + af1e1a7 commit 466cb1a

19 files changed

Lines changed: 20122 additions & 43446 deletions

File tree

.github/workflows/build-docs.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,20 @@ jobs:
1919
uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0 # Not needed if lastUpdated is not enabled
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
run_install: false
2226
- name: Setup Node
2327
uses: actions/setup-node@v4
2428
with:
2529
node-version: 20
26-
cache: npm
30+
cache: pnpm
2731
- name: Setup Pages
2832
uses: actions/configure-pages@v4
2933
- name: Install dependencies
30-
run: npm ci
34+
run: pnpm install --frozen-lockfile
3135
- name: Build with VitePress
3236
run: |
33-
npm run docs:build
37+
pnpm docs:build
3438
touch .vitepress/dist/.nojekyll

.github/workflows/ci-main.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ jobs:
1616
fetch-depth: 0
1717
- uses: nrwl/nx-set-shas@v4
1818
name: Derive appropriate SHAs for base and head for `nx affected` commands
19+
- uses: pnpm/action-setup@v4
20+
with:
21+
run_install: false
1922
- uses: actions/setup-node@v4
2023
with:
2124
node-version: 'lts/*'
22-
- run: npm ci
23-
- run: npx nx affected --target=build --parallel=2
24-
- run: npx nx affected --target=test --parallel=2
25+
cache: pnpm
26+
- run: pnpm install --frozen-lockfile
27+
- run: pnpm nx affected --target=build --parallel=2
28+
- run: pnpm nx affected --target=test --parallel=2

.github/workflows/ci-pr.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,26 @@ jobs:
1515
fetch-depth: 0
1616
- uses: nrwl/nx-set-shas@v4
1717
name: Derive appropriate SHAs for base and head for `nx affected` commands
18+
- uses: pnpm/action-setup@v4
19+
with:
20+
run_install: false
1821
- uses: actions/setup-node@v4
1922
with:
2023
node-version: 'lts/-1'
24+
cache: pnpm
2125
- name: 'Create E2E env file'
2226
run: |
2327
echo FORGE_EMAIL=${{ secrets.FORGE_EMAIL }} >> e2e/nx-forge-e2e/.env
2428
echo FORGE_API_TOKEN=${{ secrets.FORGE_API_TOKEN }} >> e2e/nx-forge-e2e/.env
2529
echo ATLASSIAN_PRODUCT=${{ vars.ATLASSIAN_PRODUCT }} >> e2e/nx-forge-e2e/.env
2630
echo ATLASSIAN_SITE_URL=${{ vars.ATLASSIAN_SITE_URL }} >> e2e/nx-forge-e2e/.env
2731
echo DEVELOPER_SPACE_ID=${{ secrets.DEVELOPER_SPACE_ID }} >> e2e/nx-forge-e2e/.env
28-
- run: npm ci
29-
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
30-
- run: npx nx affected --target=format:check --parallel=2
31-
- run: npx nx affected --target=lint --parallel=2
32-
- run: npx nx affected --target=build --parallel=3
33-
- run: npx nx affected --target=test --parallel=2
34-
- run: npx nx affected --target=e2e --parallel=2 --no-silent
32+
- run: pnpm install --frozen-lockfile
33+
- run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
34+
- run: pnpm nx affected --target=format:check --parallel=2
35+
- run: pnpm nx affected --target=lint --parallel=2
36+
- run: pnpm nx affected --target=build --parallel=3
37+
- run: pnpm nx affected --target=test --parallel=2
38+
- run: pnpm nx affected --target=e2e --parallel=2 --no-silent
3539
env:
3640
NODE_OPTIONS: '--no-deprecation'

.github/workflows/deploy-docs.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,22 @@ jobs:
3030
uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0 # Not needed if lastUpdated is not enabled
33+
- name: Setup pnpm
34+
uses: pnpm/action-setup@v4
35+
with:
36+
run_install: false
3337
- name: Setup Node
3438
uses: actions/setup-node@v4
3539
with:
3640
node-version: 20
37-
cache: npm
41+
cache: pnpm
3842
- name: Setup Pages
3943
uses: actions/configure-pages@v4
4044
- name: Install dependencies
41-
run: npm ci
45+
run: pnpm install --frozen-lockfile
4246
- name: Build with VitePress
4347
run: |
44-
npm run docs:build
48+
pnpm docs:build
4549
touch .vitepress/dist/.nojekyll
4650
- name: Upload artifact
4751
uses: actions/upload-pages-artifact@v3

.github/workflows/release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ jobs:
2424
name: Checkout [main]
2525
with:
2626
fetch-depth: 0
27+
- uses: pnpm/action-setup@v4
28+
with:
29+
run_install: false
2730
- uses: actions/setup-node@v4
2831
name: Setup Node.js
2932
with:
3033
node-version: 'lts/-1'
34+
cache: pnpm
3135
- name: 'Create E2E env file'
3236
run: |
3337
echo FORGE_EMAIL=${{ secrets.FORGE_EMAIL }} >> e2e/nx-forge-e2e/.env
@@ -36,17 +40,17 @@ jobs:
3640
echo ATLASSIAN_SITE_URL=${{ vars.ATLASSIAN_SITE_URL }} >> e2e/nx-forge-e2e/.env
3741
echo DEVELOPER_SPACE_ID=${{ secrets.DEVELOPER_SPACE_ID }} >> e2e/nx-forge-e2e/.env
3842
- name: Install dependencies
39-
run: npm ci
43+
run: pnpm install --frozen-lockfile
4044
- name: Build and test
4145
run: |
4246
rm -rf dist
43-
npx nx run nx-forge:build
44-
npx nx run nx-forge:test
47+
pnpm nx run nx-forge:build
48+
pnpm nx run nx-forge:test
4549
- run:
46-
npx nx run nx-forge-e2e:e2e
50+
pnpm nx run nx-forge-e2e:e2e
4751
env:
4852
NODE_OPTIONS: '--no-deprecation'
4953
- name: Release
5054
env:
5155
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
run: npx semantic-release
56+
run: pnpm exec semantic-release

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/out-tsc
77

88
# dependencies
9-
/node_modules
9+
node_modules
1010

1111
# IDEs and editors
1212
/.idea

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Long-term maintainability is a core priority. If you add new functionality, firs
2222

2323
## Technology Stack
2424

25-
- Use npm
25+
- Use pnpm
2626

2727
<!-- nx configuration start-->
2828
<!-- Leave the start & end comments to automatically receive updates. -->

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Before you start developing or making any changes to the project, ensure that you have installed the project dependencies via
66

7-
npm install
7+
pnpm install
88

99
This ensures the project toolchain is set up correctly. Specifically, this will install a husky commit hook that ensures commit messages follow the project guidelines.
1010

@@ -50,8 +50,8 @@ To publish packages to a local registry, do the following:
5050
1. Start Verdaccio by running `nx local-registry` in a terminal. This will become your main registry while the process is running.
5151
2. From the plugin project root run `nx build nx-forge`
5252
3. Make sure the `version` field in `dist/packages/nx-forge/package.json` is unique (not yet published, you may use `9.9.9-alpha.1` and increase the alpha count on each subsequent release).
53-
4. From `dist/packages/nx-forge` run `npm publish`
54-
5.On the consumer side you can now install the latest package version by running `npm i @toolsplus/nx-forge@latest`
53+
4. From `dist/packages/nx-forge` run `pnpm publish`
54+
5. On the consumer side you can now install the latest package version by running `pnpm add @toolsplus/nx-forge@latest`
5555

5656
Note that as soon as you terminate the process with the local Verdaccio registry, you will get back your previous registry configuration.
5757

@@ -66,9 +66,9 @@ From the project root run
6666
This will update Nx project dependencies in package.json and create a migrations.json file.
6767
Make sure package.json changes make sense and then run
6868

69-
npm install
69+
pnpm install
7070

71-
Once the npm command completes run
71+
Once the install completes, run
7272

7373
nx migrate --run-migrations
7474

@@ -80,4 +80,4 @@ Finally, proceed with committing and submitting the changes to the repo.
8080

8181
## Update plugin dependencies
8282

83-
If you are add or update plugin dependencies that the nx-forge plugin depends on, i.e. not dependencies used to build the nx-forge plugin, their version must be updated in `packages/nx-forge/package.json` to match the installed version. There are ESLint rules in place to verify that this correct and that all plugin dependencies are declared in the package.json.
83+
If you add or update plugin dependencies that the nx-forge plugin depends on, i.e., not dependencies used to build the nx-forge plugin, their version must be updated in `packages/nx-forge/package.json` to match the installed version. There are ESLint rules in place to verify that this is correct and that all plugin dependencies are declared in the package.json.

0 commit comments

Comments
 (0)