Skip to content

Commit

Permalink
Internal: Switch from yarn to pnpm (#178)
Browse files Browse the repository at this point in the history
It's faster, less buggy than yarn 1.x, and easier to work with than yarn
3/4.

One note: I did not try to migrate the lockfile, so this also updates
all dependencies based on semver range in our package.json
  • Loading branch information
IanVS authored Jul 12, 2024
1 parent f558d5d commit fef70a6
Show file tree
Hide file tree
Showing 6 changed files with 1,408 additions and 1,083 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ jobs:
build:
strategy:
matrix:
node: [16.x, 18.x, 20.x]
node: [18.x, 20.x, 22.x]
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
# Pulls version from packageManager key in package.json
- name: Setup pnpm
uses: pnpm/action-setup@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- run: yarn install --frozen-lockfile --non-interactive
cache: 'pnpm'
- run: pnpm install
- name: Build
run: yarn compile
run: pnpm compile
- name: Test
run: yarn test
run: pnpm test
- name: Check formatting
run: yarn format:check
run: pnpm format:check
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.4.1
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
tests/
lib/

pnpm-lock.yaml

# Until we can find a way to ignore codeblocks (we need before/after)
README.md
docs/TROUBLESHOOTING.md
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"types"
],
"scripts": {
"prepare": "yarn run compile",
"prepare": "pnpm run compile",
"compile": "tsc",
"preexample": "yarn run compile",
"preexample": "pnpm run compile",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules vitest --run",
"test:watch": "vitest",
"format": "prettier . --write",
Expand Down Expand Up @@ -85,5 +85,5 @@
"optional": true
}
},
"packageManager": "[email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
"packageManager": "[email protected]+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903"
}
Loading

0 comments on commit fef70a6

Please sign in to comment.