Knip: More Pruning (#5374)

* knip: Don't ignore exports that are only used within a given file

* knip: More pruning after rebase

* knip: Vite plugin config fix

* knip: vitest plugin config

* knip: Playwright config, remove unnecessary ignores.

* knip: Simplify project file enumeration.

* knip: simplify the config file patterns ?(.optional_segment)

* knip: tailwind v4 fix

* knip: A little more, explain some of the deps.
Should be good for this PR.

* knip: remove unused disabling of classMembers.
It's opt-in, which we should probably do.

* knip: floating comments
We should probably delete _one_ of these parallell trees, right?

* knip: Add additional entrypoints

* knip: Restore UserData that's exposed via the types for now.

* knip: Add as an entry file even though knip says it's not necessary.

* knip: re-export functions used by nodes (h/t @christian-byrne)
This commit is contained in:
Alexander Brown
2025-09-07 01:10:32 -07:00
committed by snomiao
parent cb4ffcdcbd
commit 5370700b8c
88 changed files with 210 additions and 287 deletions

View File

@@ -16,7 +16,7 @@ import {
createTestSubgraphNode
} from './subgraphHelpers'
export interface SubgraphFixtures {
interface SubgraphFixtures {
/** A minimal subgraph with no inputs, outputs, or nodes */
emptySubgraph: Subgraph

View File

@@ -17,7 +17,7 @@ import type {
import type { UUID } from '@/lib/litegraph/src/utils/uuid'
import { createUuidv4 } from '@/lib/litegraph/src/utils/uuid'
export interface TestSubgraphOptions {
interface TestSubgraphOptions {
id?: UUID
name?: string
nodeCount?: number
@@ -27,20 +27,20 @@ export interface TestSubgraphOptions {
outputs?: Array<{ name: string; type: ISlotType }>
}
export interface TestSubgraphNodeOptions {
interface TestSubgraphNodeOptions {
id?: NodeId
pos?: [number, number]
size?: [number, number]
}
export interface NestedSubgraphOptions {
interface NestedSubgraphOptions {
depth?: number
nodesPerLevel?: number
inputsPerSubgraph?: number
outputsPerSubgraph?: number
}
export interface SubgraphStructureExpectation {
interface SubgraphStructureExpectation {
inputCount?: number
outputCount?: number
nodeCount?: number
@@ -49,7 +49,7 @@ export interface SubgraphStructureExpectation {
hasOutputNode?: boolean
}
export interface CapturedEvent<T = unknown> {
interface CapturedEvent<T = unknown> {
type: string
detail: T
timestamp: number
@@ -422,6 +422,3 @@ export function createEventCapture<T = unknown>(
capturedEvents.filter((e) => e.type === type)
}
}
// Re-export expect from vitest for convenience
export { expect } from 'vitest'