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
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

version: 2
updates:
- package-ecosystem: 'npm' # pnpm is detected automatically via pnpm-lock.yaml
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'monthly'
Expand All @@ -16,6 +16,8 @@ updates:
- '*'
exclude-patterns:
- '@projectwallace/*'
cooldown:
default-days: 7
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
Expand All @@ -24,3 +26,5 @@ updates:
github-actions:
patterns:
- '*'
cooldown:
default-days: 7
92 changes: 74 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,92 @@ on:
release:
types: [created]

permissions:
id-token: write # Required for OIDC provenance attestations
contents: write # Required to push version bump commit
permissions: {}

jobs:
publish-npm:
test:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 24
package-manager-cache: false
- run: pnpm install --frozen-lockfile
- run: pnpm test

build:
needs: test
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
package-manager-cache: false
- 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
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: pnpm version "${TAG_NAME#v}" --no-git-tag-version
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist
path: dist/

bump-version:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
persist-credentials: true
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- run: |
VERSION=${GITHUB_REF_NAME#v}
pnpm version $VERSION --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 }}
DEFAULT_BRANCH: main
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add package.json pnpm-lock.yaml
git commit -m "chore: bump version to ${TAG_NAME}"
git push origin HEAD:${DEFAULT_BRANCH}
git commit -m "chore: bump version to ${GITHUB_REF_NAME#v}"
git push origin HEAD:$DEFAULT_BRANCH
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: package-json
path: package.json

publish:
needs: bump-version
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC provenance
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 24
package-manager-cache: false
registry-url: 'https://registry.npmjs.org'
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist
path: dist/
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: package-json
- run: pnpm publish --no-git-checks
71 changes: 38 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Tests

on:
push:
Expand All @@ -14,79 +14,84 @@ jobs:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
cache: 'pnpm'
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: pnpm exec playwright install chromium --only-shell
- run: pnpm test --forbid-only

check-ts:
check:
name: Check types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
cache: 'pnpm'
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run check

lint-code:
name: Lint code (oxlint)
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
cache: 'pnpm'
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: pnpm run build

declutter-code:
name: Declutter code (Knip)
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
cache: 'pnpm'
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run knip
- run: pnpm run lint

audit:
npm-audit:
name: Audit packages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- run: pnpm audit --audit-level=high

knip:
name: Lint unused code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- run: pnpm run knip
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
"knip": "knip"
},
"dependencies": {
"@projectwallace/css-parser": "~0.17.0",
"@projectwallace/format-css": "^3.1.5"
"@projectwallace/css-parser": "~0.18.1",
"@projectwallace/format-css": "^3.1.6"
},
"devDependencies": {
"@playwright/test": "^1.61.1",
"@playwright/test": "^1.62.1",
"@projectwallace/preset-oxlint": "^0.0.11",
"@types/node": "^26.1.1",
"@types/node": "^26.1.2",
"c8": "^12.0.0",
"knip": "^6.27.0",
"oxfmt": "^0.59.0",
"oxlint": "^1.74.0",
"publint": "^0.3.21",
"tsdown": "^0.22.11",
"knip": "^6.31.0",
"oxfmt": "^0.61.0",
"oxlint": "^1.76.0",
"publint": "^0.3.22",
"tsdown": "^0.22.14",
"typescript": "^7.0.2"
},
"overrides": {
Expand Down
Loading
Loading