Skip to content

Commit

Permalink
Use pnpm as package manager (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
adenj authored Nov 11, 2024
1 parent 6cd60e7 commit 62cb135
Show file tree
Hide file tree
Showing 10 changed files with 9,201 additions and 8,678 deletions.
6 changes: 1 addition & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,4 @@ npm-debug.log
yarn-error.log
# end managed by skuba

# Ignore .npmrc. This is no longer managed by skuba as pnpm projects use a managed .npmrc.
# IMPORTANT: if migrating to pnpm, remove this line and add an .npmrc IN THE SAME COMMIT.
# You can use `skuba format` to generate the file or otherwise commit an empty file.
# Doing so will conflict with a local .npmrc and make it more difficult to unintentionally commit auth secrets.
.npmrc
pnpm-debug.log
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,24 @@ jobs:
fetch-depth: 0
token: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}

- name: Set up pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build
run: yarn build
run: pnpm build

- name: Publish action
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
10 changes: 7 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: pnpm

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Test
run: yarn test:ci
run: pnpm test:ci

- name: Lint
run: yarn lint
run: pnpm lint
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,4 @@ package-lock.json
yarn-error.log
# end managed by skuba

# Ignore .npmrc. This is no longer managed by skuba as pnpm projects use a managed .npmrc.
# IMPORTANT: if migrating to pnpm, remove this line and add an .npmrc IN THE SAME COMMIT.
# You can use `skuba format` to generate the file or otherwise commit an empty file.
# Doing so will conflict with a local .npmrc and make it more difficult to unintentionally commit auth secrets.
.npmrc
.pnpm-store
9 changes: 9 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# managed by skuba
package-manager-strict-version=true
public-hoist-pattern[]="@types*"
public-hoist-pattern[]="*eslint*"
public-hoist-pattern[]="*prettier*"
public-hoist-pattern[]="esbuild"
public-hoist-pattern[]="jest"
public-hoist-pattern[]="tsconfig-seek"
# end managed by skuba
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ jobs:
node-version: 20.x

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Publish
uses: seek-oss/changesets-snapshot@v0
with:
pre-publish: yarn build
pre-publish: pnpm build
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
"skuba": "9.1.0",
"tsup": "^8.0.1"
},
"packageManager": "[email protected]",
"volta": {
"node": "20.18.0",
"yarn": "1.22.22"
"pnpm": "9.12.3"
},
"skuba": {
"entryPoint": "src/index.ts",
Expand Down
Loading

0 comments on commit 62cb135

Please sign in to comment.