Skip to content

Commit

Permalink
Switch to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Mar 3, 2024
1 parent f6e3b60 commit 12ac4be
Show file tree
Hide file tree
Showing 9 changed files with 3,148 additions and 4,971 deletions.
23 changes: 20 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,26 @@ runs:
using: composite
steps:
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2

- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
name: Install pnpm
with:
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
name: Setup pnpm cache
with:
node-version: 20
cache: 'npm'
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: npm ci
- name: pnpm install
run: pnpm install
shell: bash
6 changes: 0 additions & 6 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"enabled": false
},
"packageRules": [
{
"matchPackageNames": [
"npm"
],
"allowedVersions": "^10"
},
{
"matchPackageNames": [
"@types/node"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup

- run: npm run build
- run: pnpm build
- run: git diff --exit-code --name-only dist

typecheck:
Expand All @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup

- run: npx tsc
- run: pnpm tsc

test:
name: Test
Expand All @@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup

- run: npm run test:coverage
- run: pnpm test:coverage
- uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup

- run: npx eslint .
- run: pnpm eslint .

dprint:
name: dprint
Expand All @@ -66,7 +66,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup

- run: npx dprint check
- run: pnpm dprint check

smoke-test:
name: Smoke Test
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
npm run build
pnpm build
git add dist
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ re-tags `v2`. Unfortunately, you can only publish a GitHub action via the web UI
create the release, where the marketplace checkbox will already be checked.

```
$ npx release-it --ci # Release a patch version
$ npx release-it --ci --increment minor # Release a minor version bump.
$ npx release-it --ci --increment major # Don't do this unless .release-it.json is updated to potentially retag a new major version.
$ pnpx release-it --ci # Release a patch version
$ pnpx release-it --ci --increment minor # Release a minor version bump.
$ pnpx release-it --ci --increment major # Don't do this unless .release-it.json is updated to potentially retag a new major version.
```
Loading

0 comments on commit 12ac4be

Please sign in to comment.