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
75 changes: 75 additions & 0 deletions .github/workflows/dependency-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Dependency Diff

on:
pull_request:
branches: [main]

jobs:
build-base:
name: Pack base branch
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
with:
ref: main
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm run build
- run: pnpm pack --pack-destination ./base-packs
- uses: actions/upload-artifact@v7
with:
name: base-packages
path: ./base-packs/*.tgz

build-pr:
name: Pack PR branch
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm run build
- run: pnpm pack --pack-destination ./source-packs
- uses: actions/upload-artifact@v7
with:
name: source-packages
path: ./source-packs/*.tgz

diff-dependencies:
name: Diff dependencies
runs-on: ubuntu-latest
needs: [build-base, build-pr]
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
with:
fetch-depth: 0
- uses: actions/download-artifact@v8
with:
name: base-packages
path: ./base-packs
- uses: actions/download-artifact@v8
with:
name: source-packages
path: ./source-packs
- uses: e18e/action-dependency-diff@8e9b8c1957ab066d36235a43f4c1ff1522e1bdbc # v1.6.1
with:
base-packages: './base-packs/*.tgz'
source-packages: './source-packs/*.tgz'
pack-size-threshold: -1
size-threshold: -1
duplicate-threshold: 3
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ jobs:
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6
with:
token: ${{ secrets.CODECOV_TOKEN }}

build:
name: Build
Expand All @@ -65,8 +61,6 @@ jobs:
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm run build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

knip:
name: Lint unused code
Expand Down
58 changes: 4 additions & 54 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,8 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["import", "typescript", "oxc", "unicorn"],
"env": {
"node": true,
"browser": true,
"es2024": true
},
"categories": {
"perf": "error",
"correctness": "error",
"pedantic": "error"
},
"extends": ["./node_modules/@projectwallace/preset-oxlint/index.json"],
"rules": {
"unicorn/no-null": "error",
"unicorn/prefer-set-has": "off",
"prefer-string-slice": "off",
"prefer-code-point": "off",
"no-lonely-if": "off",
"unicorn/no-lonely-if": "off",
"no-unused-vars": "off",
"no-await-in-loop": "off",
"prefer-query-selector": "off",
"max-dependencies": "off",
"ban-types": "off",
"no-undefined": "off",
"no-useless-undefined": "off",
"max-classes-per-file": "off",
"max-lines-per-function": "off",
"prefer-math-trunc": "off",
"max-lines": "off",
"max-depth": [
"warn",
{
"max": 6
}
],
"explicit-function-return-type": "off",
"no-console": "off",
"no-optional-chaining": "off",
"no-commonjs": "off",
"unambiguous": "off",
"no-default-export": "off",
"no-async-await": "off",
"no-non-null-assertion": "off",
"no-plusplus": "off",
"no-bitwise": "off",
"default-case": "off",
"no-rest-spread-properties": "off",
"require-await": "warn",
"no-null": "off",
"no-warning-comments": "off",
"no-case-declarations": "off",
"no-inline-comments": "off",
"no-useless-return": "warn",
"require-unicode-regexp": "off"
"no-null": "allow",
"no-warning-comments": "allow",
"max-depth": ["warn", 6]
}
}
1 change: 1 addition & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { KnipConfig } from 'knip'

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

export default config
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@projectwallace/css-parser": "^0.16.0"
},
"devDependencies": {
"@codecov/rollup-plugin": "^2.0.1",
"@projectwallace/preset-oxlint": "^0.0.11",
"@vitest/coverage-v8": "^4.1.2",
"knip": "^6.3.0",
"oxfmt": "^0.57.0",
Expand All @@ -85,8 +85,5 @@
"node": ">=18.0.0",
"pnpm": ">=11.0.0"
},
"packageManager": "pnpm@11.1.1",
"pnpm": {
"onlyBuiltDependencies": []
}
"packageManager": "pnpm@11.1.1"
}
Loading