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
Binary file added .DS_Store
Binary file not shown.
33 changes: 27 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm run build # Ensure packages pass attw, etc.
- run: pnpm run -r build # Build packages/site
flint:
name: Flint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm run build
- run: pnpm run -r build # Build packages/site
- run: pnpm run --filter=site prebuild # Generate packages/site/.astro
- run: pnpm run flint
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm run build
- run: pnpm run -r prebuild # Generate packages/site/.astro without a full build.
- run: pnpm run --filter=site prebuild # Generate packages/site/.astro
- run: pnpm run lint
lint_knip:
name: Lint Knip
Expand All @@ -37,9 +43,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
fetch-depth: 0 # required so origin/main can be diffed
- uses: ./.github/actions/prepare
- run: pnpm run build # https://github.com/vitest-dev/vitest/discussions/9353
- run: pnpm run test
- name: Cache dependencies and Vite cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
key: cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
path: node_modules/.vite
- run: pnpm exec tsc -b # For types tests
- run: pnpm run build -W ./packages/ts-patch/ # vitest-dev/vitest#9429
- # Run partial test pass on PRs (only changed files)
if: ${{ github.event_name == 'pull_request' }}
name: Run affected tests
run: pnpm run test --changed "origin/main"
- # On main, run the full test suite w/ type checking
if: ${{ github.ref == 'refs/heads/main' }}
name: Run full test suite
run: pnpm run test

name: CI

Expand Down
Binary file added packages/.DS_Store
Binary file not shown.
Binary file added packages/cli/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project cli"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/utils": "workspace:^",
Expand Down
Binary file added packages/comparisons/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/comparisons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project comparisons"
},
"dependencies": {
"prettier": "3.7.4"
},
Expand Down
Binary file added packages/core/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project core"
},
"dependencies": {
"@flint.fyi/utils": "workspace:^",
"cached-factory": "^0.1.0",
Expand Down
Binary file added packages/flint/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/flint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"!lib/**/*.map",
"!lib/bin/**"
],
"scripts": {
"test": "vitest --typecheck --project flint"
},
"dependencies": {
"@flint.fyi/cli": "workspace:",
"@flint.fyi/core": "workspace:",
Expand Down
1 change: 1 addition & 0 deletions packages/flint/tsconfig.src.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{ "path": "../core" },
{ "path": "../json" },
{ "path": "../md" },
{ "path": "../package-json" },
{ "path": "../ts" },
{ "path": "../yaml" }
]
Expand Down
Binary file added packages/json/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project json"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"typescript": "^5.9.0 || ^6.0.0",
Expand Down
Binary file added packages/md/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/md/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project md"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/utils": "workspace:^",
Expand Down
Binary file added packages/package-json/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/package-json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project package-json"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"typescript": "^5.9.0 || ^6.0.0"
Expand Down
Binary file added packages/plugin-astro/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-astro"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"typescript": "^5.9.3"
Expand Down
Binary file added packages/plugin-browser/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-browser"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/ts": "workspace:^",
Expand Down
Binary file added packages/plugin-cspell/.DS_Store
Binary file not shown.
Binary file added packages/plugin-flint/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-flint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-flint"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/ts": "workspace:^",
Expand Down
Binary file added packages/plugin-jsx/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-jsx"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/ts": "workspace:^",
Expand Down
Binary file added packages/plugin-next/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-next"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"typescript": "^5.9.3"
Expand Down
Binary file added packages/plugin-node/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-node"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/ts": "workspace:^",
Expand Down
Binary file added packages/plugin-nuxt/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-nuxt"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"typescript": "^5.9.3"
Expand Down
Binary file added packages/plugin-performance/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-performance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-performance"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/ts": "workspace:^",
Expand Down
Binary file added packages/plugin-react/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-react"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"typescript": "^5.9.3"
Expand Down
Binary file added packages/plugin-solid/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-solid"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"typescript": "^5.9.3"
Expand Down
Binary file added packages/plugin-spelling/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/plugin-spelling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project plugin-spelling"
},
"dependencies": {
"@cspell/url": "^9.2.2",
"@flint.fyi/core": "workspace:^",
Expand Down
Binary file added packages/rule-tester/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/rule-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project rule-tester"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/utils": "workspace:^",
Expand Down
Binary file added packages/site/.DS_Store
Binary file not shown.
Binary file added packages/site/public/.DS_Store
Binary file not shown.
Binary file added packages/text/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project text"
},
"dependencies": {
"@flint.fyi/core": "workspace:^"
},
Expand Down
Binary file added packages/ts-patch/.DS_Store
Binary file not shown.
Binary file added packages/ts/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project ts"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/utils": "workspace:^",
Expand Down
Binary file added packages/utils/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project utils"
},
"devDependencies": {
"tsdown": "0.19.0-beta.2",
"vitest": "4.0.15"
Expand Down
Binary file added packages/yaml/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions packages/yaml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"lib/",
"!lib/**/*.map"
],
"scripts": {
"test": "vitest --typecheck --project yaml"
},
"dependencies": {
"@flint.fyi/core": "workspace:^",
"@flint.fyi/utils": "workspace:^",
Expand Down
Binary file added packages/yml/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ peerDependencyRules:
allowedVersions:
astro: "5"

shellEmulator: true
strictDepBuilds: true
strictPeerDependencies: true
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"./packages/*/bin/index.js"
],
"references": [
{ "path": "./packages/cli" },
{ "path": "./packages/comparisons" },
{ "path": "./packages/core" },
{ "path": "./packages/cli" },
{ "path": "./packages/flint" },
{ "path": "./packages/json" },
{ "path": "./packages/md" },
Expand All @@ -23,8 +23,8 @@
{ "path": "./packages/plugin-flint" },
{ "path": "./packages/plugin-jsx" },
{ "path": "./packages/plugin-next" },
{ "path": "./packages/plugin-nuxt" },
{ "path": "./packages/plugin-node" },
{ "path": "./packages/plugin-nuxt" },
{ "path": "./packages/plugin-performance" },
{ "path": "./packages/plugin-react" },
{ "path": "./packages/plugin-solid" },
Expand Down
39 changes: 21 additions & 18 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
import { readdirSync } from "node:fs";
import path from "node:path";
import { defineConfig } from "vitest/config";

export default defineConfig({
resolve: {
conditions: ["@flint.fyi/source"],
},
test: {
projects: readdirSync("./packages").map((name) => ({
test: {
clearMocks: true,
include: ["**/src/**/*.test.ts"],
name,
root: `./packages/${name}`,
setupFiles: [
"console-fail-test/setup",
"@flint.fyi/ts-patch/install-patch-hooks",
],
testTimeout: 10_000,
typecheck: {
enabled: true,
projects: readdirSync(path.join(import.meta.dirname, "packages")).map(
(name) => ({
ssr: {
resolve: { conditions: ["@flint.fyi/source"] },
},
test: {
clearMocks: true,
include: ["**/src/**/*.test.ts"],
name,
root: path.join(import.meta.dirname, "packages", name),
setupFiles: [
"console-fail-test/setup",
"@flint.fyi/ts-patch/install-patch-hooks",
],
testTimeout: 10_000,
typecheck: {
enabled: true,
},
},
},
})),
}),
),
},
});
Loading