Skip to content

Commit

Permalink
chore: update dependencies, upgrade to PNPM version 9 and improve Git…
Browse files Browse the repository at this point in the history
…Hub Actions setup (#8)
  • Loading branch information
LuudJanssen authored Oct 28, 2024
2 parents 84f0e28 + 1d9f0f0 commit 1b395d1
Show file tree
Hide file tree
Showing 6 changed files with 2,869 additions and 3,325 deletions.
24 changes: 24 additions & 0 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Prepare
description: Sets up Node.js and PNPM and installs dependencies

runs:
using: "composite"

steps:
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
shell: bash

# Don't run scripts to prevent a malicious package from stealing tokens
# or doing other harmful things.
run: pnpm install --ignore-scripts
15 changes: 2 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,8 @@ jobs:
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Prepare
uses: ./.github/actions/prepare

- name: Run builds
run: pnpm build
47 changes: 7 additions & 40 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,8 @@ jobs:
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Prepare
uses: ./.github/actions/prepare

- name: Run lint commands
run: pnpm lint
Expand All @@ -47,19 +36,8 @@ jobs:
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Prepare
uses: ./.github/actions/prepare

- name: Run builds
run: pnpm build
Expand All @@ -74,19 +52,8 @@ jobs:
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Prepare
uses: ./.github/actions/prepare

- name: Run builds
- name: Run tests
run: pnpm test
17 changes: 3 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,8 @@ jobs:
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Prepare
uses: ./.github/actions/prepare

- name: Run builds
- name: Run tests
run: pnpm test
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,20 @@
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"@release-it/conventional-changelog": "^8.0.1",
"@tsconfig/strictest": "^2.0.3",
"@release-it/conventional-changelog": "^9.0.1",
"@tsconfig/strictest": "^2.0.5",
"env-cmd": "^10.1.0",
"prettier": "^3.1.1",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-packagejson": "^2.4.12",
"release-it": "^17.1.1",
"prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^4.1.0",
"prettier-plugin-packagejson": "^2.5.3",
"release-it": "^17.10.0",
"remark": "^15.0.1",
"remark-directive": "^3.0.0",
"rimraf": "^5.0.5",
"typescript": "~5.2.2",
"vitest": "^1.3.1"
"rimraf": "^6.0.1",
"typescript": "~5.6.3",
"vitest": "^2.1.3"
},
"engines": {
"pnpm": ">=9.0.0"
}
}
Loading

0 comments on commit 1b395d1

Please sign in to comment.