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
18 changes: 9 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@

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

permissions:
id-token: write # Required for OIDC
id-token: write # Required for OIDC provenance attestations
contents: write # Required to push 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 ci --ignore-scripts --no-audit --no-fund
- run: npx playwright install chromium --only-shell
- run: npm test -- --forbid-only
- run: npm run build
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install chromium --only-shell
- run: pnpm test --forbid-only
- run: pnpm run build
- name: Bump version in package.json
run: |
VERSION="${{ github.event.release.tag_name }}"
npm version "${VERSION#v}" --no-git-tag-version
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: pnpm version "${TAG_NAME#v}" --no-git-tag-version
- name: Commit and push version bump
env:
TAG_NAME: ${{ github.event.release.tag_name }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
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 commit -m "chore: bump version to ${{ github.event.release.tag_name }}"
git push origin HEAD:main
- run: npm publish --access public
git add package.json pnpm-lock.yaml
git commit -m "chore: bump version to ${TAG_NAME}"
git push origin HEAD:${DEFAULT_BRANCH}
- run: pnpm publish --no-git-checks
100 changes: 58 additions & 42 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Test

on:
Expand All @@ -9,89 +6,108 @@ 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
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install chromium --only-shell
- run: npm test -- --forbid-only
run: pnpm exec playwright install chromium --only-shell
- run: pnpm test --forbid-only
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v6
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

check-ts:
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
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run check

lint-code:
name: Lint code (oxlint)
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 lint
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint

declutter-code:
name: Declutter code (Knip)
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 knip
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run knip

bundle-analysis:
name: Report bundle analysis (codecov)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # 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
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

npm-audit:
audit:
name: Audit packages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- 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
node-version: 24
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