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: 10 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@

version: 2
updates:
- package-ecosystem: 'npm' # pnpm is detected automatically via pnpm-lock.yaml
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'monthly'
groups:
npm-all:
exclude-patterns:
- '@projectwallace/*'
projectwallace:
patterns:
- '@projectwallace/*'
npm-all:
patterns:
- '*'
exclude-patterns:
- '@projectwallace/*'
cooldown:
default-days: 7
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
Expand All @@ -22,3 +26,5 @@ updates:
github-actions:
patterns:
- '*'
cooldown:
default-days: 7
11 changes: 7 additions & 4 deletions .github/workflows/dependency-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
ref: main
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 24
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm run build
Expand All @@ -34,10 +35,12 @@ jobs:
contents: read
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
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm run build
Expand All @@ -58,6 +61,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: base-packages
Expand All @@ -71,5 +75,4 @@ jobs:
base-packages: './base-packs/*.tgz'
source-packages: './source-packs/*.tgz'
pack-size-threshold: -1
size-threshold: -1
duplicate-threshold: 3
duplicate-threshold: 2
82 changes: 71 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,92 @@ on:
release:
types: [created]

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

jobs:
publish-npm:
test:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 24
cache: pnpm
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
package-manager-cache: false
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Bump version from release tag
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
- 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:
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 $VERSION"
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
63 changes: 28 additions & 35 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: Tests

on:
Expand All @@ -17,86 +14,82 @@ jobs:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 22
cache: pnpm
cache: 'pnpm'
node-version: 24
- run: pnpm install --frozen-lockfile
- run: pnpm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}

check:
name: Check types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 22
cache: pnpm
cache: 'pnpm'
node-version: 24
- run: pnpm install --frozen-lockfile
- run: pnpm run check

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 22
cache: pnpm
cache: 'pnpm'
node-version: 24
- run: pnpm install --frozen-lockfile
- run: pnpm run build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 22
cache: pnpm
cache: 'pnpm'
node-version: 24
- 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage
dist
node_modules
.claude
8 changes: 8 additions & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { KnipConfig } from 'knip'

const config: KnipConfig = {
project: ['src/**/*.ts'],
ignoreDependencies: ['@projectwallace/preset-oxlint'],
}

export default config
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Discover the composition of your CSS @layers in a tree-based format.",
"keywords": [
"architecture",
"cascade",
"composition",
"css",
"layer",
Expand Down Expand Up @@ -38,19 +39,21 @@
"build": "tsdown",
"test": "vitest",
"check": "tsc --noEmit",
"lint": "oxlint && oxfmt --check"
"lint": "oxlint && oxfmt --check",
"knip": "knip"
},
"dependencies": {
"@projectwallace/css-parser": "~0.18.1"
"@projectwallace/css-parser": "~0.18.2"
},
"devDependencies": {
"@projectwallace/preset-oxlint": "^0.0.11",
"knip": "^6.31.0",
"oxfmt": "^0.61.0",
"oxlint": "^1.74.0",
"publint": "^0.3.21",
"tsdown": "^0.22.9",
"typescript": "7.0.2",
"vite": "^8.1.5",
"vite": "^8.2.0",
"vitest": "^4.1.10"
},
"engines": {
Expand Down
Loading