Skip to content

Commit

Permalink
refactor: use pnpm (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
omBratteng authored Oct 23, 2024
1 parent 6242cbb commit 863177d
Show file tree
Hide file tree
Showing 9 changed files with 1,601 additions and 2,405 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/code-ql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@ jobs:
runs-on: ubuntu-20.04

steps:
-
name: Checkout repository
- name: Checkout repository
uses: actions/checkout@v4

-
name: Initialize CodeQL
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript
config-file: ./.github/codeql/codeql-config.yml

-
name: Perform CodeQL Analysis
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
30 changes: 12 additions & 18 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,38 @@ jobs:
name: Checkout code
uses: actions/checkout@v4

-
name: Enable Corepack
- name: Enable Corepack
run: corepack enable

-
uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 20
cache: yarn
node-version: 22
cache: pnpm

- name: Cache node_modules
id: cache-node_modules
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node_modules-
${{ runner.os }}-
-
name: Install dependencies
- name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
yarn install --immutable
pnpm install --frozen-lockfile
-
name: Lint
- name: Lint
run: |
yarn lint
pnpm lint
-
name: Build
- name: Build
run: |
yarn build
pnpm build
-
name: devcard.png
- name: devcard.png
uses: ./
with:
user_id: XDCZD-PHG
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ jobs:
labeler:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4

-
name: Run Labeler
- name: Run Labeler
uses: crazy-max/[email protected]
30 changes: 13 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,35 @@ jobs:
contents: write

steps:
-
name: Checkout code
- name: Checkout code
uses: actions/checkout@v4

- uses: chainguard-dev/actions/setup-gitsign@main

-
name: Enable Corepack
- name: Enable Corepack
run: corepack enable

-
uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 20
cache: yarn
node-version: 22
cache: pnpm

- uses: pnpm/[email protected]

- name: Cache node_modules
id: cache-node_modules
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node_modules-
${{ runner.os }}-
-
name: Install dependencies
- name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
yarn install --immutable
pnpm install --frozen-lockfile
- name: Setup git
run: |
Expand All @@ -66,15 +64,13 @@ jobs:
VERSION=$(node -p "require('./package.json').version")
sed -i "s/$OLD_VERSION/$VERSION/g" README.md
-
name: Prune dist
- name: Prune dist
run: |
rm -rf dist
-
name: Build
- name: Build
run: |
yarn build
pnpm build
git add -A dist
- name: Publish
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"simple-git": "^3.20.0"
},
"devDependencies": {
"@octokit/graphql": "^8.1.1",
"@types/jsdom": "21.x",
"@types/node": "22.x",
"@typescript-eslint/eslint-plugin": "^7.14.1",
Expand All @@ -44,5 +45,5 @@
"prettier": "^3.3.3",
"typescript": "^5.6.2"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
}
Loading

0 comments on commit 863177d

Please sign in to comment.