Skip to content

Commit

Permalink
use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
vlkerag committed Jul 2, 2024
1 parent 6877fc4 commit 502373a
Show file tree
Hide file tree
Showing 18 changed files with 12,140 additions and 11,499 deletions.
16 changes: 0 additions & 16 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
<!--
### Production Release
To add this PR to the next release:
- Run `yarn changeset add` locally to create a changeset and follow the instructions.
- Push these changes to your branch.
- Once merged, changeset will create a new PR titled 'Version Packages'
### Beta Release
To trigger a beta release:
- Run `yarn changeset add` locally to create a changeset and follow the instructions.
- Push these changes to your branch
- Apply the `[beta] @guardian/consent-management-platform` label to your pull request. This action will automatically trigger the [`cmp-beta-release-on-label.yml`](../.github/workflows/cmp-beta-release-on-label.yml) workflow.
- Upon completion, the beta version will be posted by the `github-actions bot` in your pull request.
- After testing the published beta, feel free to delete the generated .yml file if you decide not to update the cmp version.
-->

## What does this change?
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/monitoring-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,50 +21,55 @@ jobs:
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
aws-region: eu-west-1

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 'latest'

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: './monitoring/.nvmrc'
cache: yarn
cache: pnpm
cache-dependency-path: |
monitoring/yarn.lock
cdk/yarn.lock
monitoring/pnpm-lock.yaml
cdk/pnpm-lock.yaml
- name: Lambda Install CDK dependencies
working-directory: './monitoring'
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Lambda lint
working-directory: './monitoring'
run: yarn lint
run: pnpm lint

- name: Lambda Build
working-directory: './monitoring'
run: yarn build
run: pnpm build

- name: Lambda Build
- name: Lambda Test
working-directory: './monitoring'
run: yarn test
run: pnpm test

- name: CDK Install CDK dependencies
working-directory: './cdk'
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: CDK Test
working-directory: './cdk'
run: yarn test
run: pnpm test

- name: CDK lint
working-directory: './cdk'
run: yarn lint
run: pnpm lint

- name: CDK Build
working-directory: './cdk'
run: yarn build
run: pnpm build

- name: CDK Synth
working-directory: './cdk'
run: yarn synth
run: pnpm synth

- name: ZIP Lambda files
working-directory: './cdk'
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"<node_internals>/**"
],
"cwd": "${workspaceFolder}/monitoring",
"runtimeExecutable": "yarn",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
"start",
"--env=prod",
Expand All @@ -29,7 +29,7 @@
"<node_internals>/**"
],
"cwd": "${workspaceFolder}/monitoring",
"runtimeExecutable": "yarn",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
"start",
"--env=prod",
Expand All @@ -46,7 +46,7 @@
"<node_internals>/**"
],
"cwd": "${workspaceFolder}/monitoring",
"runtimeExecutable": "yarn",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
"start",
"--env=prod",
Expand Down
6 changes: 3 additions & 3 deletions cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ find useful scripts within the [`script`](./script) directory for common tasks.

There are also some other commands defined in `package.json`, including:

- `yarn lint --fix` attempt to autofix any linter errors
- `yarn format` format the code using Prettier
- `yarn watch` watch for changes and compile
- `pnpm lint --fix` attempt to autofix any linter errors
- `pnpm format` format the code using Prettier
- `pnpm watch` watch for changes and compile

However, it's advised you configure your IDE to format on save to avoid horrible "correct linting" commits.
1 change: 1 addition & 0 deletions cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"bin": "bin/cdk.js",
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "tsc",
"watch": "tsc -w",
"test": "jest",
Expand Down
Loading

0 comments on commit 502373a

Please sign in to comment.