Skip to content

Commit de9eee1

Browse files
committed
CCM-16068 - Added support for setting up pnpm tooling
1 parent f861cd0 commit de9eee1

35 files changed

Lines changed: 9802 additions & 16891 deletions

File tree

.github/actions/build-docs/action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ runs:
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v6.0.2
12+
- name: Setup pnpm
13+
uses: pnpm/action-setup@v4
14+
with:
15+
version: 10.33.0
1216
- uses: actions/setup-node@v4
1317
with:
1418
node-version-file: '.tool-versions'
15-
- name: Npm cli install
19+
cache: 'pnpm'
20+
- name: pnpm install
1621
working-directory: ./docs
17-
run: npm ci --min-release-age 3
22+
run: pnpm install --frozen-lockfile
1823
shell: bash
1924
- name: Setup Ruby
2025
uses: ruby/setup-ruby@v1.180.1
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'npm install and setup'
2-
description: 'Setup node, authenticate github package repository and perform clean npm install'
1+
name: 'pnpm install and setup'
2+
description: 'Setup node, authenticate github package repository and perform clean pnpm install'
33

44
inputs:
55
GITHUB_TOKEN:
@@ -9,16 +9,22 @@ inputs:
99
runs:
1010
using: 'composite'
1111
steps:
12+
- name: 'Setup pnpm'
13+
uses: pnpm/action-setup@v4
14+
with:
15+
version: 10.33.0
16+
1217
- name: 'Use Node.js'
1318
uses: actions/setup-node@v4
1419
with:
1520
node-version-file: '.tool-versions'
1621
registry-url: 'https://npm.pkg.github.com'
1722
scope: '@nhsdigital'
23+
cache: 'pnpm'
1824

1925
- name: 'Install dependencies'
2026
shell: bash
2127
env:
2228
NODE_AUTH_TOKEN: ${{ inputs.GITHUB_TOKEN }}
2329
run: |
24-
npm ci --min-release-age 3
30+
pnpm install --frozen-lockfile

.github/dependabot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ updates:
1616
cooldown:
1717
default-days: 7
1818

19-
- package-ecosystem: "npm"
19+
- package-ecosystem: "pnpm"
2020
directory: "/"
2121
schedule:
2222
interval: "daily"

.github/workflows/stage-2-test.yaml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,21 @@ jobs:
4848
steps:
4949
- name: "Checkout code"
5050
uses: actions/checkout@v6.0.2
51+
- name: "Setup pnpm"
52+
uses: pnpm/action-setup@v4
53+
with:
54+
version: 10.33.0
5155
- name: "Use Node.js"
5256
uses: actions/setup-node@v4
5357
with:
5458
node-version-file: '.tool-versions'
59+
cache: 'pnpm'
5560
- name: "Repo setup"
5661
run: |
57-
npm ci --min-release-age 3
62+
pnpm install --frozen-lockfile
5863
- name: "Generate dependencies"
5964
run: |
60-
npm run generate-dependencies --workspaces --if-present
65+
pnpm run generate-dependencies
6166
git diff --exit-code
6267
test-unit:
6368
name: "Unit tests"
@@ -66,16 +71,21 @@ jobs:
6671
steps:
6772
- name: "Checkout code"
6873
uses: actions/checkout@v6.0.2
74+
- name: "Setup pnpm"
75+
uses: pnpm/action-setup@v4
76+
with:
77+
version: 10.33.0
6978
- name: "Use Node.js"
7079
uses: actions/setup-node@v4
7180
with:
7281
node-version-file: '.tool-versions'
82+
cache: 'pnpm'
7383
- name: "Repo setup"
7484
run: |
75-
npm ci --min-release-age 3
85+
pnpm install --frozen-lockfile
7686
- name: "Generate dependencies"
7787
run: |
78-
npm run generate-dependencies --workspaces --if-present
88+
pnpm run generate-dependencies
7989
- name: "Run unit test suite"
8090
run: |
8191
make test-unit
@@ -98,16 +108,21 @@ jobs:
98108
steps:
99109
- name: "Checkout code"
100110
uses: actions/checkout@v6.0.2
111+
- name: "Setup pnpm"
112+
uses: pnpm/action-setup@v4
113+
with:
114+
version: 10.33.0
101115
- name: "Use Node.js"
102116
uses: actions/setup-node@v4
103117
with:
104118
node-version-file: '.tool-versions'
119+
cache: 'pnpm'
105120
- name: "Repo setup"
106121
run: |
107-
npm ci --min-release-age 3
122+
pnpm install --frozen-lockfile
108123
- name: "Generate dependencies"
109124
run: |
110-
npm run generate-dependencies --workspaces --if-present
125+
pnpm run generate-dependencies
111126
- name: "Run linting"
112127
run: |
113128
make test-lint
@@ -118,16 +133,21 @@ jobs:
118133
steps:
119134
- name: "Checkout code"
120135
uses: actions/checkout@v6.0.2
136+
- name: "Setup pnpm"
137+
uses: pnpm/action-setup@v4
138+
with:
139+
version: 10.33.0
121140
- name: "Use Node.js"
122141
uses: actions/setup-node@v4
123142
with:
124143
node-version-file: '.tool-versions'
144+
cache: 'pnpm'
125145
- name: "Repo setup"
126146
run: |
127-
npm ci --min-release-age 3
147+
pnpm install --frozen-lockfile
128148
- name: "Generate dependencies"
129149
run: |
130-
npm run generate-dependencies --workspaces --if-present
150+
pnpm run generate-dependencies
131151
- name: "Run typecheck"
132152
run: |
133153
make test-typecheck

.npmrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ act 0.2.64
22
gitleaks 8.24.0
33
jq 1.6
44
nodejs 24.14.1
5+
pnpm 10.33.0
56
pre-commit 3.6.0
67
ruby 3.3.6
78
terraform 1.10.1

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
".github": false,
1212
".vscode": false
1313
},
14-
"jest.jestCommandLine": "npm run test:unit --workspaces --",
14+
"jest.jestCommandLine": "pnpm run --recursive test:unit --",
1515
"sonarlint.connectedMode.project": {
1616
"connectionId": "nhsdigital",
1717
"projectKey": "NHSDigital_nhs-notify-client-callbacks"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include scripts/init.mk
88
# Example CI/CD targets are: dependencies, build, clean, etc.
99

1010
dependencies: # Install dependencies needed to build and test the project @Pipeline
11-
npm ci
11+
pnpm install --frozen-lockfile
1212

1313
build: # Build the project artefact @Pipeline
1414
(cd docs && make build)

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ h help:
88
@egrep '^\S|^$$' Makefile
99

1010
install:
11-
npm install
11+
pnpm install
1212
bundle config set --local path vendor/bundle
1313
bundle install
1414

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "",
33
"dependencies": {
4-
"nhsuk-frontend": "^8.1.1"
4+
"nhsuk-frontend": "catalog:app"
55
},
66
"description": "",
77
"devDependencies": {},

0 commit comments

Comments
 (0)