Skip to content

Commit 4777305

Browse files
authored
chore: switch to pnpm (#180)
1 parent 28ea23b commit 4777305

File tree

10 files changed

+6304
-5519
lines changed

10 files changed

+6304
-5519
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v4
18+
with:
19+
version: 9
20+
run_install: false
1721
- uses: actions/setup-node@v4
1822
with:
1923
node-version: 18
20-
- run: yarn install --frozen-lockfile
21-
- run: yarn build
22-
- run: yarn test
24+
cache: pnpm
25+
- run: pnpm install --frozen-lockfile
26+
- run: pnpm run build
27+
- run: pnpm run test
2328

2429
e2e:
2530
runs-on: ubuntu-latest
@@ -29,9 +34,14 @@ jobs:
2934
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'bazel-contrib/publish-to-bcr' }}
3035
steps:
3136
- uses: actions/checkout@v4
37+
- uses: pnpm/action-setup@v4
38+
with:
39+
version: 9
40+
run_install: false
3241
- uses: actions/setup-node@v4
3342
with:
3443
node-version: 18
44+
cache: pnpm
3545
# Setup gcloud application default credentials. While the credentials are not actually
3646
# used because Google api services are stubbed, instantiating any of the Google node
3747
# clients requires the credentials file to exist and be valid.
@@ -41,5 +51,5 @@ jobs:
4151
- uses: google-github-actions/setup-gcloud@v2
4252
with:
4353
version: ">= 363.0.0"
44-
- run: yarn install --frozen-lockfile
45-
- run: yarn e2e
54+
- run: pnpm install --frozen-lockfile
55+
- run: pnpm run e2e

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
dist
22
node_modules
3-
yarn-error.log
43
.DS_Store
54
.terraform
65
*.tfstate.backup

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on
2+
# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what
3+
# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules)
4+
hoist=false

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
pnpm-lock.yaml
12
templates/.bcr
2-
templates/README.md
3+
templates/README.md

deployment/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ terraform init
5555
### Build the app
5656

5757
```shell
58-
yarn install
59-
yarn build
58+
pnpm install
59+
pnpm run build
6060
```
6161

6262
### Deploy the app
@@ -140,8 +140,8 @@ terraform init
140140
### Build the app
141141

142142
```shell
143-
yarn install
144-
yarn build
143+
pnpm install
144+
pnpm run build
145145
```
146146

147147
### Deploy the app

e2e/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Run with
44

55
```bash
6-
yarn e2e
6+
pnpm run e2e
77
```
88

99
Requires `gcloud` application default credentials. The e2e tests stub google cloud APIs and

package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prebuild": "node tools/clean-dist-files.js",
1111
"build": "tsc && node tools/copy-dist-files.js",
1212
"test": "jest src",
13-
"pree2e": "yarn build",
13+
"pree2e": "pnpm run build",
1414
"e2e": "jest e2e"
1515
},
1616
"dependencies": {
@@ -21,6 +21,7 @@
2121
"@octokit/auth-app": "^4.0.4",
2222
"@octokit/core": "^4.0.4",
2323
"@octokit/rest": "^19.0.3",
24+
"@octokit/types": "^10.0.0",
2425
"@octokit/webhooks": "^10.0.8",
2526
"@octokit/webhooks-methods": "^3.0.0",
2627
"@octokit/webhooks-types": "^6.2.4",
@@ -51,14 +52,25 @@
5152
"@types/tar": "^6.1.10",
5253
"@types/uuid": "^9.0.0",
5354
"archiver": "^6.0.1",
55+
"expect": "^28.1.3",
5456
"globby": "^14.0.0",
5557
"imapflow": "^1.0.147",
5658
"jest": "^28.1.3",
59+
"jest-mock": "^28.1.3",
5760
"mailparser": "3.6.6",
5861
"mockttp": "^3.10.0",
5962
"portfinder": "^1.0.32",
6063
"ts-jest": "^28.0.7",
6164
"ts-node": "^10.9.1",
6265
"typescript": "^5.0.0"
66+
},
67+
"pnpm": {
68+
"packageExtensions": {
69+
"@google-cloud/secret-manager": {
70+
"dependencies": {
71+
"long": "5.2.3"
72+
}
73+
}
74+
}
6375
}
6476
}

0 commit comments

Comments
 (0)