Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch to pnpm #180

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm run test

e2e:
runs-on: ubuntu-latest
Expand All @@ -29,9 +34,14 @@ jobs:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'bazel-contrib/publish-to-bcr' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
# Setup gcloud application default credentials. While the credentials are not actually
# used because Google api services are stubbed, instantiating any of the Google node
# clients requires the credentials file to exist and be valid.
Expand All @@ -41,5 +51,5 @@ jobs:
- uses: google-github-actions/setup-gcloud@v2
with:
version: ">= 363.0.0"
- run: yarn install --frozen-lockfile
- run: yarn e2e
- run: pnpm install --frozen-lockfile
- run: pnpm run e2e
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dist
node_modules
yarn-error.log
.DS_Store
.terraform
*.tfstate.backup
Expand Down
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on
# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what
# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules)
hoist=false
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pnpm-lock.yaml
templates/.bcr
templates/README.md
templates/README.md
8 changes: 4 additions & 4 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ terraform init
### Build the app

```shell
yarn install
yarn build
pnpm install
pnpm run build
```

### Deploy the app
Expand Down Expand Up @@ -140,8 +140,8 @@ terraform init
### Build the app

```shell
yarn install
yarn build
pnpm install
pnpm run build
```

### Deploy the app
Expand Down
2 changes: 1 addition & 1 deletion e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Run with

```bash
yarn e2e
pnpm run e2e
```

Requires `gcloud` application default credentials. The e2e tests stub google cloud APIs and
Expand Down
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prebuild": "node tools/clean-dist-files.js",
"build": "tsc && node tools/copy-dist-files.js",
"test": "jest src",
"pree2e": "yarn build",
"pree2e": "pnpm run build",
"e2e": "jest e2e"
},
"dependencies": {
Expand All @@ -21,6 +21,7 @@
"@octokit/auth-app": "^4.0.4",
"@octokit/core": "^4.0.4",
"@octokit/rest": "^19.0.3",
"@octokit/types": "^10.0.0",
"@octokit/webhooks": "^10.0.8",
"@octokit/webhooks-methods": "^3.0.0",
"@octokit/webhooks-types": "^6.2.4",
Expand Down Expand Up @@ -51,14 +52,25 @@
"@types/tar": "^6.1.10",
"@types/uuid": "^9.0.0",
"archiver": "^6.0.1",
"expect": "^28.1.3",
"globby": "^14.0.0",
"imapflow": "^1.0.147",
"jest": "^28.1.3",
"jest-mock": "^28.1.3",
"mailparser": "3.6.6",
"mockttp": "^3.10.0",
"portfinder": "^1.0.32",
"ts-jest": "^28.0.7",
"ts-node": "^10.9.1",
"typescript": "^5.0.0"
},
"pnpm": {
"packageExtensions": {
"@google-cloud/secret-manager": {
"dependencies": {
"long": "5.2.3"
}
}
}
}
}
Loading
Loading