Skip to content

Commit

Permalink
chore: migrate to pnpm from yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
wadackel committed Dec 14, 2023
1 parent b605b8f commit b3172b2
Show file tree
Hide file tree
Showing 7 changed files with 2,448 additions and 1,773 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0

- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version-file: '.node-version'
cache: 'yarn'
cache: 'pnpm'

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

- name: Check
run: yarn run check
run: pnpm check
15 changes: 9 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0

- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version-file: '.node-version'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

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

- name: Bump version and publish
id: bump-version
run: |
git config user.name '[bot] github action (${{ github.workflow }})'
git config user.email 'engineer-team@knowledgework.com'
yarn version --${{ github.event_name == 'schedule' && 'patch' || github.event.inputs.versionClass }}
pnpm version --${{ github.event_name == 'schedule' && 'patch' || github.event.inputs.versionClass }}
echo "new_version=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/pnpm-lock.yaml
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "eslint-config-kwork",
"description": "ESLint configs for KnowledgeWork's projects.",
"version": "1.3.5",
"packageManager": "pnpm@8.12.0",
"repository": {
"type": "git",
"url": "https://github.com/knowledge-work/eslint-config-kwork.git"
Expand All @@ -17,12 +18,12 @@
"frontend.js"
],
"scripts": {
"setup": "yarn",
"check": "yarn run check:prettier",
"setup": "pnpm i",
"check": "pnpm check:prettier",
"check:prettier": "prettier --check .",
"format": "prettier --write .",
"preversion": "echo \"Run check for version $npm_package_version\" && yarn run check",
"postversion": "git push --tags && git push origin main && yarn publish ."
"preversion": "echo \"Run check for version $npm_package_version\" && pnpm check",
"postversion": "git push --tags && git push origin main && pnpm publish ."
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.2.1",
Expand Down
Loading

0 comments on commit b3172b2

Please sign in to comment.