Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@

version: 2
updates:
- package-ecosystem: 'npm'
- package-ecosystem: 'npm' # pnpm is detected automatically via pnpm-lock.yaml
directory: '/'
schedule:
interval: 'monthly'
groups:
vite:
npm-all:
exclude-patterns:
- '@projectwallace/*'
projectwallace:
patterns:
- 'vitest'
- '@vitest/*'
oxc:
patterns:
- 'oxlint'
- 'oxfmt'
- '@projectwallace/*'
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,31 @@ on:
types: [created]

permissions:
id-token: write # Required for OIDC
id-token: write # Required for OIDC provenance attestations
contents: write # Required for pushing version bump commit

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
- run: npm install --ignore-scripts --no-audit --no-fund
- run: npm test
- run: npm run build
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
- run: pnpm run build
- name: Bump version from release tag
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
VERSION=${GITHUB_REF_NAME#v}
npm version $VERSION --no-git-tag-version
pnpm version $VERSION --no-git-tag-version
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add package.json package-lock.json
git add package.json pnpm-lock.yaml
git commit -m "chore: bump version to $VERSION"
git push origin HEAD:${{ github.event.repository.default_branch }}
- run: npm publish --access public
git push origin HEAD:$DEFAULT_BRANCH
- run: pnpm publish --no-git-checks
69 changes: 44 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,61 @@ on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
cache: 'npm'
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npm test
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v6.0.0
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}

check:
name: Check types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
cache: 'npm'
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npm run check
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run check

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
cache: 'npm'
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npm run build
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -60,24 +72,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
cache: 'npm'
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npm run lint
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint

npm-audit:
name: Audit packages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
cache: 'npm'
node-version: 22
- run: npm audit --audit-level=high
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm audit --audit-level=high
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Security settings are configured in pnpm-workspace.yaml
Loading
Loading