Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
908bc61
chore: add import cycle baseline check for src
ampagent Sep 27, 2026
d91d543
fix: repair pnpm lockfile
github-actions[bot] Sep 27, 2026
bb255b1
fix: resolve pnpm lockfile conflict
github-actions[bot] Sep 28, 2026
f823954
fix: repair pnpm lockfile
github-actions[bot] Sep 28, 2026
d2194f1
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Sep 29, 2026
218206b
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Sep 29, 2026
9c8c2f9
Merge remote-tracking branch 'origin/main' into drjkl/depcruise-no-ci…
DrJKL Sep 29, 2026
7bd1e8b
chore: regenerate import-cycle baseline after merging main
DrJKL Sep 29, 2026
c634582
fix: harden import cycle check boundaries and tests
DrJKL Sep 29, 2026
3345062
fix: count self-imports as import cycles
DrJKL Sep 29, 2026
38d7392
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Sep 29, 2026
c5e83a9
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Sep 29, 2026
a954617
Merge remote-tracking branch 'origin/main' into drjkl/depcruise-no-ci…
DrJKL Sep 30, 2026
3c3ae4f
chore: regenerate import-cycle baseline after merging main
DrJKL Sep 30, 2026
8c7b057
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Sep 30, 2026
5292026
chore: regenerate import-cycle baseline after merging main
DrJKL Sep 30, 2026
ecaf56f
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Sep 30, 2026
8f7f86e
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Oct 1, 2026
83b5c51
chore: regenerate import-cycle baseline after merging main
DrJKL Oct 1, 2026
a49294d
Merge remote-tracking branch 'origin/main' into drjkl/depcruise-no-ci…
DrJKL Oct 2, 2026
4bceca3
chore: regenerate import-cycle baseline after merging main
DrJKL Oct 2, 2026
1a0c7bb
Merge remote-tracking branch 'origin/main' into drjkl/depcruise-no-ci…
DrJKL Oct 2, 2026
4b04920
chore: regenerate import-cycle baseline after merging main
DrJKL Oct 2, 2026
c55dc63
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Oct 4, 2026
d179d8a
Merge branch 'main' into drjkl/depcruise-no-circular
DrJKL Oct 5, 2026
8725c51
Merge remote-tracking branch 'origin/main' into drjkl/depcruise-no-ci…
DrJKL Oct 6, 2026
cfab0d1
chore: regenerate import-cycle baseline after merging main
DrJKL Oct 6, 2026
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: 18 additions & 0 deletions .dependency-cruiser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { IConfiguration } from 'dependency-cruiser'

const config: IConfiguration = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ Nit — This file was registered with knip and .fallowrc.jsonc but not added to tsconfig.json's include, which enumerates root-level TS config files individually (eslint.config.ts, knip.config.ts, lint-staged.config.ts, playwright.config.ts, vitest.config.ts). The IConfiguration annotation — the whole reason to author the config in TypeScript — is therefore never checked by pnpm typecheck, and an invalid option would only fail at depcruise runtime.

Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).

options: {
tsConfig: { fileName: 'tsconfig.json' },
tsPreCompilationDeps: 'specify',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium — tsPreCompilationDeps: 'specify' makes dependency-cruiser emit type-only imports and tag each one preCompilationOnly, but cruiseOutputSchema in scripts/check-import-cycles.ts only picks resolved, so zod strips the tag and import type edges become indistinguishable from runtime edges. Adding a single new import type between two modules will fail the gate with "new import cycle edge(s) ... Break the cycle" even though the compiled output has no cycle. Either filter on preCompilationOnly (presumably why 'specify' was chosen over true) and regenerate the baseline, or decide explicitly that type-only cycles count and document it.

Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).

doNotFollow: { path: 'node_modules' },
exclude: {
path: ['\\.(test|spec|stories)\\.ts$', '/__tests?__/', '/test/']
},
enhancedResolveOptions: {
extensions: ['.ts', '.mts', '.js', '.vue', '.json'],
mainFields: ['module', 'main', 'types']
}
}
}

export default config
7 changes: 6 additions & 1 deletion .fallowrc.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"enablers": ["fallow"],
"entryPoints": [
"**/.storybook/{main,preview}.ts",
".dependency-cruiser.ts",
"apps/website/src/scripts/**/*.ts",
"packages/ingest-types/openapi-ts.config.ts",
"scripts/**/*.{js,ts}"
Expand Down Expand Up @@ -59,7 +60,11 @@
"eslint-plugin-testing-library",
"postcss-html",
// Executed by models-snippets.test.ts inside the generated Node examples.
"mime-types"
"mime-types",
// dependency-cruiser loads it at runtime to parse .vue files (lint:cycles).
"@vue/compiler-sfc",
// Resolved by path string in scripts/vue-tsc-native.ts.
"typescript-native-bridge"
],

"ignoreUnresolvedImports": [
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/repo-checks/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: 'Repository consistency checks'
description: >
Runs knip, the locale integrity check and the ADR index check. Shared by
Runs knip, the locale integrity check, the ADR index check and the import
cycle baseline check. Shared by
ci-lint-format.yaml (PR) and ci-lint-format-queue.yaml (merge queue). The
caller is responsible for a blobless full-history checkout (locale:check
fetches source blobs from git history) and frontend setup.
Expand All @@ -23,3 +24,7 @@ runs:
- name: Verify ADR naming and index
shell: bash
run: pnpm adr:check

- name: Verify no new import cycles in src
shell: bash
run: pnpm lint:cycles
1,029 changes: 1,029 additions & 0 deletions .import-cycles-baseline.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"trailingComma": "none",
"printWidth": 80,
"ignorePatterns": [
".import-cycles-baseline.json",
"oxlint-suppressions.json",
"packages/registry-types/src/comfyRegistryTypes.ts",
"public/materialdesignicons.min.css",
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Guardrails: agents must use `comfyPage` fixture (not bare `page`), never add `wa
- `pnpm lint` / `pnpm lint:fix`: Lint (ESLint)
- `pnpm format` / `pnpm format:check`: oxfmt
- `pnpm typecheck`: Vue TSC type checking
- `pnpm lint:cycles`: Compare `src/` import-cycle edges with `.import-cycles-baseline.json`; new and removed edges both fail. Break new cycles; run `pnpm lint:cycles:update` only to record removed edges or an intentional new one
- `pnpm storybook`: Start Storybook development server

> **`vue-tsc` needs its own `node_modules` in the checkout.** `vue-tsc --noEmit`
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ Before submitting a PR, ensure all tests pass:
pnpm test:unit
pnpm typecheck
pnpm lint
pnpm lint:cycles
pnpm format
```

Expand Down
1 change: 1 addition & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const config: KnipConfig = {
'.': {
entry: [
'{build,scripts}/**/*.{js,ts}',
'.dependency-cruiser.ts',
'vitest.matrix.config.mts',
'src/assets/css/style.css',
'src/scripts/ui/menu/index.ts',
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"json-schema": "tsx scripts/generate-json-schema.ts",
"knip:no-cache": "knip",
"knip": "knip --cache",
"lint:cycles:update": "tsx scripts/check-import-cycles.ts --update",
"lint:cycles": "tsx scripts/check-import-cycles.ts",
"lint:fix:no-cache": "pnpm oxlint --fix && eslint --concurrency auto --fix",
"lint:fix:ci": "pnpm lint:fix --cache-strategy content",
"lint:fix": "pnpm oxlint --fix && eslint --cache --concurrency auto --fix",
Expand Down Expand Up @@ -191,8 +193,10 @@
"@vitejs/plugin-vue": "catalog:",
"@vitest/coverage-v8": "catalog:",
"@vitest/ui": "catalog:",
"@vue/compiler-sfc": "catalog:",
"@webgpu/types": "catalog:",
"cross-env": "catalog:",
"dependency-cruiser": "catalog:",
"eslint": "catalog:",
"eslint-config-prettier": "catalog:",
"eslint-import-resolver-typescript": "catalog:",
Expand Down
Loading
Loading