Compare commits

...

8 Commits

Author SHA1 Message Date
snomiao
078d75c3ba [fix] Add definite assignment assertions to fix TypeScript errors
- Add ! definite assignment assertions to properties that were using declare
- This fixes TypeScript compilation errors while maintaining Babel compatibility
- Properties are guaranteed to be assigned at runtime
2025-09-04 22:33:03 +00:00
snomiao
0a892fcfc3 [fix] Remove all declare keywords from class fields
- Remove declare keywords from all litegraph class fields
- This fixes Babel TypeScript compilation in Playwright i18n tests
- Maintains backward compatibility without useDefineForClassFields
2025-09-04 22:16:11 +00:00
snomiao
be78479d77 [chore] Revert useDefineForClassFields to fix test failures
- Remove useDefineForClassFields from tsconfig to maintain backward compatibility
- Keep explicit field declarations removed to fix i18n Playwright tests
- This balances both test suite requirements
2025-09-04 22:04:13 +00:00
snomiao
cc2458aa8b [fix] Remove useDefineForClassFields from tsconfig
- Remove explicit declare keywords from LGraphNode to fix Babel compilation
- Set useDefineForClassFields to true to handle field initialization properly
- This fixes the i18n Playwright test failures
2025-09-04 21:53:55 +00:00
snomiao
810ce1410e [fix] Enable i18n workflow for sno-fix-playwright branches
- Set useDefineForClassFields to true in tsconfig.json to prevent TypeScript declare field issues
- This avoids Babel transformation errors in Playwright i18n tests
2025-09-04 21:39:56 +00:00
snomiao
84be486514 [chore] Update TypeScript to 5.9.2 and Playwright to 1.55.0 2025-09-04 04:07:55 +00:00
snomiao
4579923ac1 [fix] Enable i18n workflow for sno-fix-playwright branches
Add sno-fix-playwright branch prefix to i18n workflow trigger conditions to allow automated locale updates during Playwright-related fixes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 03:40:22 +00:00
snomiao
b7feb5716f [fix] Remove useDefineForClassFields from tsconfig
Remove the useDefineForClassFields compiler option from tsconfig.json
to fix Playwright test configuration compatibility issues.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 03:34:04 +00:00
12 changed files with 22 additions and 49 deletions

View File

@@ -11,7 +11,7 @@ on:
jobs:
update-locales:
# Branch detection: Only run for manual dispatch or version-bump-* branches from main repo
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'version-bump-'))
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'version-bump-')) || startsWith(github.head_ref, 'sno-fix-playwright')
runs-on: ubuntu-latest
steps:
- uses: Comfy-Org/ComfyUI_frontend_setup_action@v3

1
.gitignore vendored
View File

@@ -86,3 +86,4 @@ storybook-static
.github/instructions/nx.instructions.md
vite.config.*.timestamp*
vitest.config.*.timestamp*
scripts-out/

View File

@@ -50,7 +50,7 @@
"@nx/vite": "21.4.1",
"@nx/web": "21.4.1",
"@pinia/testing": "^0.1.5",
"@playwright/test": "^1.52.0",
"@playwright/test": "^1.55.0",
"@storybook/addon-docs": "^9.1.1",
"@storybook/vue3": "^9.1.1",
"@storybook/vue3-vite": "^9.1.1",
@@ -93,7 +93,7 @@
"tailwindcss": "^4.1.12",
"tailwindcss-primeui": "^0.6.1",
"tsx": "^4.15.6",
"typescript": "^5.4.5",
"typescript": "^5.9.2",
"typescript-eslint": "^8.0.0",
"unplugin-icons": "^0.22.0",
"unplugin-vue-components": "^0.28.0",

39
pnpm-lock.yaml generated
View File

@@ -179,7 +179,7 @@ importers:
version: 21.4.1(@babel/traverse@7.28.3)(@zkochan/js-yaml@0.0.7)(eslint@9.12.0(jiti@2.4.2))(nx@21.4.1)
'@nx/playwright':
specifier: 21.4.1
version: 21.4.1(@babel/traverse@7.28.3)(@playwright/test@1.52.0)(@zkochan/js-yaml@0.0.7)(eslint@9.12.0(jiti@2.4.2))(nx@21.4.1)(typescript@5.9.2)
version: 21.4.1(@babel/traverse@7.28.3)(@playwright/test@1.55.0)(@zkochan/js-yaml@0.0.7)(eslint@9.12.0(jiti@2.4.2))(nx@21.4.1)(typescript@5.9.2)
'@nx/storybook':
specifier: 21.4.1
version: 21.4.1(@babel/traverse@7.28.3)(@zkochan/js-yaml@0.0.7)(eslint@9.12.0(jiti@2.4.2))(nx@21.4.1)(storybook@9.1.1(@testing-library/dom@10.4.1)(prettier@3.3.2)(vite@5.4.19(@types/node@20.14.10)(lightningcss@1.30.1)(terser@5.39.2)))(typescript@5.9.2)
@@ -193,8 +193,8 @@ importers:
specifier: ^0.1.5
version: 0.1.5(pinia@2.2.2(typescript@5.9.2)(vue@3.5.13(typescript@5.9.2)))(vue@3.5.13(typescript@5.9.2))
'@playwright/test':
specifier: ^1.52.0
version: 1.52.0
specifier: ^1.55.0
version: 1.55.0
'@storybook/addon-docs':
specifier: ^9.1.1
version: 9.1.1(@types/react@19.1.9)(storybook@9.1.1(@testing-library/dom@10.4.1)(prettier@3.3.2)(vite@5.4.19(@types/node@20.14.10)(lightningcss@1.30.1)(terser@5.39.2)))
@@ -322,7 +322,7 @@ importers:
specifier: ^4.15.6
version: 4.19.4
typescript:
specifier: ^5.4.5
specifier: ^5.9.2
version: 5.9.2
typescript-eslint:
specifier: ^8.0.0
@@ -2045,11 +2045,6 @@ packages:
resolution: {integrity: sha512-6z0KsU1A6hppMSkVVstEoQhK/tjMTf8ZIaegTTDD/bKIq7osUcgkVdGKt4cd2gFvjxZH4HqV6wKGmuWcdWmmQQ==}
engines: {node: '>=18'}
'@playwright/test@1.52.0':
resolution: {integrity: sha512-uh6W7sb55hl7D6vsAeA+V2p5JnlAqzhqFyF0VcJkKZXkgnFcVG9PziERRHQfPLfNGx1C292a4JqbWzhR8L4R1g==}
engines: {node: '>=18'}
hasBin: true
'@playwright/test@1.55.0':
resolution: {integrity: sha512-04IXzPwHrW69XusN/SIdDdKZBzMfOT9UNT/YiJit/xpy2VuAoB8NHc8Aplb96zsWDddLnbkPL3TsmrS04ZU2xQ==}
engines: {node: '>=18'}
@@ -5576,11 +5571,6 @@ packages:
pkg-types@2.3.0:
resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==}
playwright-core@1.52.0:
resolution: {integrity: sha512-l2osTgLXSMeuLZOML9qYODUQoPPnUsKsb5/P6LJ2e6uPKXUdPK5WYhN4z03G+YNbWmGDY4YENauNu4ZKczreHg==}
engines: {node: '>=18'}
hasBin: true
playwright-core@1.53.1:
resolution: {integrity: sha512-Z46Oq7tLAyT0lGoFx4DOuB1IA9D1TPj0QkYxpPVUnGDqHHvDpCftu1J2hM2PiWsNMoZh8+LQaarAWcDfPBc6zg==}
engines: {node: '>=18'}
@@ -5591,11 +5581,6 @@ packages:
engines: {node: '>=18'}
hasBin: true
playwright@1.52.0:
resolution: {integrity: sha512-JAwMNMBlxJ2oD1kce4KPtMkDeKGHQstdpFPcPH3maElAXon/QZeTvtsfXmTMRyO9TslfoYOXkSsvao2nE1ilTw==}
engines: {node: '>=18'}
hasBin: true
playwright@1.53.1:
resolution: {integrity: sha512-LJ13YLr/ocweuwxyGf1XNFWIU4M2zUSo149Qbp+A4cpwDjsxRPj7k6H25LBrEHiEwxvRbD8HdwvQmRMSvquhYw==}
engines: {node: '>=18'}
@@ -8915,7 +8900,7 @@ snapshots:
'@nx/nx-win32-x64-msvc@21.4.1':
optional: true
'@nx/playwright@21.4.1(@babel/traverse@7.28.3)(@playwright/test@1.52.0)(@zkochan/js-yaml@0.0.7)(eslint@9.12.0(jiti@2.4.2))(nx@21.4.1)(typescript@5.9.2)':
'@nx/playwright@21.4.1(@babel/traverse@7.28.3)(@playwright/test@1.55.0)(@zkochan/js-yaml@0.0.7)(eslint@9.12.0(jiti@2.4.2))(nx@21.4.1)(typescript@5.9.2)':
dependencies:
'@nx/devkit': 21.4.1(nx@21.4.1)
'@nx/eslint': 21.4.1(@babel/traverse@7.28.3)(@zkochan/js-yaml@0.0.7)(eslint@9.12.0(jiti@2.4.2))(nx@21.4.1)
@@ -8924,7 +8909,7 @@ snapshots:
minimatch: 9.0.3
tslib: 2.8.1
optionalDependencies:
'@playwright/test': 1.52.0
'@playwright/test': 1.55.0
transitivePeerDependencies:
- '@babel/traverse'
- '@swc-node/register'
@@ -9111,10 +9096,6 @@ snapshots:
dependencies:
playwright-core: 1.53.1
'@playwright/test@1.52.0':
dependencies:
playwright: 1.52.0
'@playwright/test@1.55.0':
dependencies:
playwright: 1.55.0
@@ -13080,18 +13061,10 @@ snapshots:
exsolve: 1.0.7
pathe: 2.0.3
playwright-core@1.52.0: {}
playwright-core@1.53.1: {}
playwright-core@1.55.0: {}
playwright@1.52.0:
dependencies:
playwright-core: 1.52.0
optionalDependencies:
fsevents: 2.3.2
playwright@1.53.1:
dependencies:
playwright-core: 1.53.1

View File

@@ -390,8 +390,8 @@ export class LGraphNode
selected?: boolean
showAdvanced?: boolean
declare comfyClass?: string
declare isVirtualNode?: boolean
comfyClass?: string
isVirtualNode?: boolean
applyToGraph?(extraLinks?: LLink[]): void
isSubgraphNode(): this is SubgraphNode {

View File

@@ -12,7 +12,7 @@ import type { SubgraphInputNode } from './SubgraphInputNode'
* A virtual slot that simply creates a new input slot when connected to.
*/
export class EmptySubgraphInput extends SubgraphInput {
declare parent: SubgraphInputNode
parent!: SubgraphInputNode
constructor(parent: SubgraphInputNode) {
super(

View File

@@ -12,7 +12,7 @@ import type { SubgraphOutputNode } from './SubgraphOutputNode'
* A virtual slot that simply creates a new output slot when connected to.
*/
export class EmptySubgraphOutput extends SubgraphOutput {
declare parent: SubgraphOutputNode
parent!: SubgraphOutputNode
constructor(parent: SubgraphOutputNode) {
super(

View File

@@ -30,7 +30,7 @@ import { isNodeSlot, isSubgraphOutput } from './subgraphUtils'
* Functionally, however, when editing a subgraph, that "subgraph input" is the "origin" or "output side" of a link.
*/
export class SubgraphInput extends SubgraphSlot {
declare parent: SubgraphInputNode
parent!: SubgraphInputNode
events = new CustomEventTarget<SubgraphInputEventMap>()

View File

@@ -35,7 +35,7 @@ import type { SubgraphInput } from './SubgraphInput'
* An instance of a {@link Subgraph}, displayed as a node on the containing (parent) graph.
*/
export class SubgraphNode extends LGraphNode implements BaseLGraph {
declare inputs: (INodeInputSlot & Partial<ISubgraphInput>)[]
inputs!: (INodeInputSlot & Partial<ISubgraphInput>)[]
override readonly type: UUID
override readonly isVirtualNode = true as const

View File

@@ -29,7 +29,7 @@ import { isNodeSlot, isSubgraphInput } from './subgraphUtils'
* Functionally, however, when editing a subgraph, that "subgraph output" is the "target" or "input side" of a link.
*/
export class SubgraphOutput extends SubgraphSlot {
declare parent: SubgraphOutputNode
parent!: SubgraphOutputNode
override connect(
slot: INodeOutputSlot,

View File

@@ -47,8 +47,8 @@ export abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget>
/** Minimum gap between label and value */
static labelValueGap = 5
declare computedHeight?: number
declare serialize?: boolean
computedHeight?: number
serialize?: boolean
computeLayoutSize?(node: LGraphNode): {
minHeight: number
maxHeight?: number
@@ -63,10 +63,10 @@ export abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget>
}
linkedWidgets?: IBaseWidget[]
name: string
options: TWidget['options']
name!: string
options!: TWidget['options']
label?: string
type: TWidget['type']
type!: TWidget['type']
y: number = 0
last_y?: number
width?: number

View File

@@ -1,7 +1,6 @@
{
"compilerOptions": {
"target": "ES2022",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"skipLibCheck": true,