From 7f849e9a4485a4c06b673850dc91f702cbf8e7ab Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Mon, 4 Aug 2025 10:16:24 -0400 Subject: [PATCH] Update remaining @comfyorg/litegraph references --- .claude/commands/create-frontend-release.md | 48 +-------------------- README.md | 9 +--- scripts/prepare-types.js | 4 +- src/lib/litegraph/API.md | 4 +- src/lib/litegraph/README.md | 12 +++--- src/main.ts | 2 +- tests-ui/unit-testing.md | 2 +- 7 files changed, 13 insertions(+), 68 deletions(-) diff --git a/.claude/commands/create-frontend-release.md b/.claude/commands/create-frontend-release.md index 91afe7de3..cce1664c6 100644 --- a/.claude/commands/create-frontend-release.md +++ b/.claude/commands/create-frontend-release.md @@ -171,53 +171,7 @@ echo "Last stable release: $LAST_STABLE" ### Step 7: Analyze Dependency Updates -1. **Check for dependency version changes:** - ```bash - # Compare package.json between versions to detect dependency updates - PREV_PACKAGE_JSON=$(git show ${BASE_TAG}:package.json 2>/dev/null || echo '{}') - CURRENT_PACKAGE_JSON=$(cat package.json) - - # Extract litegraph versions - PREV_LITEGRAPH=$(echo "$PREV_PACKAGE_JSON" | grep -o '"@comfyorg/litegraph": "[^"]*"' | grep -o '[0-9][^"]*' || echo "not found") - CURRENT_LITEGRAPH=$(echo "$CURRENT_PACKAGE_JSON" | grep -o '"@comfyorg/litegraph": "[^"]*"' | grep -o '[0-9][^"]*' || echo "not found") - - echo "Litegraph version change: ${PREV_LITEGRAPH} → ${CURRENT_LITEGRAPH}" - ``` - -2. **Generate litegraph changelog if version changed:** - ```bash - if [ "$PREV_LITEGRAPH" != "$CURRENT_LITEGRAPH" ] && [ "$PREV_LITEGRAPH" != "not found" ]; then - echo "đŸ“Ļ Fetching litegraph changes between v${PREV_LITEGRAPH} and v${CURRENT_LITEGRAPH}..." - - # Clone or update litegraph repo for changelog analysis - if [ ! -d ".temp-litegraph" ]; then - git clone https://github.com/comfyanonymous/litegraph.js.git .temp-litegraph - else - cd .temp-litegraph && git fetch --all && cd .. - fi - - # Get litegraph changelog between versions - LITEGRAPH_CHANGES=$(cd .temp-litegraph && git log v${PREV_LITEGRAPH}..v${CURRENT_LITEGRAPH} --oneline --no-merges 2>/dev/null || \ - git log --oneline --no-merges --since="$(git log -1 --format=%ci ${BASE_TAG})" --until="$(git log -1 --format=%ci HEAD)" 2>/dev/null || \ - echo "Unable to fetch litegraph changes") - - # Categorize litegraph changes - LITEGRAPH_FEATURES=$(echo "$LITEGRAPH_CHANGES" | grep -iE "(feat|feature|add)" || echo "") - LITEGRAPH_FIXES=$(echo "$LITEGRAPH_CHANGES" | grep -iE "(fix|bug)" || echo "") - LITEGRAPH_BREAKING=$(echo "$LITEGRAPH_CHANGES" | grep -iE "(break|breaking)" || echo "") - LITEGRAPH_OTHER=$(echo "$LITEGRAPH_CHANGES" | grep -viE "(feat|feature|add|fix|bug|break|breaking)" || echo "") - - # Clean up temp directory - rm -rf .temp-litegraph - - echo "✅ Litegraph changelog extracted" - else - echo "â„šī¸ No litegraph version change detected" - LITEGRAPH_CHANGES="" - fi - ``` - -3. **Check other significant dependency updates:** +1. **Check significant dependency updates:** ```bash # Extract all dependency changes for major version bumps OTHER_DEP_CHANGES="" diff --git a/README.md b/README.md index 89aa97687..32756e810 100644 --- a/README.md +++ b/README.md @@ -694,14 +694,7 @@ For detailed instructions on adding and using custom icons, see [src/assets/icon ### litegraph.js -This repo is using litegraph package hosted on . Any changes to litegraph should be submitted in that repo instead. - -#### Test litegraph.js changes - -- Run `npm link` in the local litegraph repo. -- Run `npm link @comfyorg/litegraph` in this repo. - -This will replace the litegraph package in this repo with the local litegraph repo. +The litegraph library is now included as a git subtree in `src/lib/litegraph`. Any changes to litegraph should be made directly in this location. ### i18n diff --git a/scripts/prepare-types.js b/scripts/prepare-types.js index 86890ed33..625579dad 100644 --- a/scripts/prepare-types.js +++ b/scripts/prepare-types.js @@ -16,9 +16,7 @@ const typesPackage = { homepage: mainPackage.homepage, description: `TypeScript definitions for ${mainPackage.name}`, license: mainPackage.license, - dependencies: { - '@comfyorg/litegraph': mainPackage.dependencies['@comfyorg/litegraph'] - }, + dependencies: {}, peerDependencies: { vue: mainPackage.dependencies.vue, zod: mainPackage.dependencies.zod diff --git a/src/lib/litegraph/API.md b/src/lib/litegraph/API.md index 59d728c07..5604f4e4d 100644 --- a/src/lib/litegraph/API.md +++ b/src/lib/litegraph/API.md @@ -151,10 +151,10 @@ widget.onPointerDown = function (pointer, node, canvas) { ### TypeScript & JSDoc -In-IDE typing is available for use in at least mainstream editors. It can be added to JS projects using the @comfyorg/litegraph npm package. +In-IDE typing is available for use in at least mainstream editors. TypeScript definitions are available in the litegraph library. ```ts -/** @import { IWidget } from './path/to/@comfyorg/litegraph/litegraph.d.ts' */ +/** @import { IWidget } from './path/to/litegraph/litegraph.d.ts' */ /** @type IWidget */ const widget = node.widgets[0] widget.onPointerDown = function (pointer, node, canvas) {} diff --git a/src/lib/litegraph/README.md b/src/lib/litegraph/README.md index 1d79f8c7c..fe084376e 100755 --- a/src/lib/litegraph/README.md +++ b/src/lib/litegraph/README.md @@ -16,9 +16,9 @@ Some early highlights: - Batch output connection move/disconnect () - And now with hundreds more... -# Install +# Usage -`npm i @comfyorg/litegraph` +This library is included as a git subtree in the ComfyUI frontend project at `src/lib/litegraph`. # litegraph.js @@ -48,12 +48,12 @@ It can be integrated easily in any existing web applications and graphs can be r - Easy to integrate in any JS application (one single file, no dependencies) - Typescript support -## Installation +## Integration -You can install it using npm +This library is integrated as a git subtree in the ComfyUI frontend project. To use it in your code: -```bash -npm install @comfyorg/litegraph +```typescript +import { LGraph, LGraphNode, LiteGraph } from '@/lib/litegraph' ``` ## How to code a new Node type diff --git a/src/main.ts b/src/main.ts index d196d2303..1c98a2903 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,3 @@ -import '@/lib/litegraph/src/style.css' import { definePreset } from '@primevue/themes' import Aura from '@primevue/themes/aura' import * as Sentry from '@sentry/vue' @@ -14,6 +13,7 @@ import { VueFire, VueFireAuth } from 'vuefire' import '@/assets/css/style.css' import { FIREBASE_CONFIG } from '@/config/firebase' +import '@/lib/litegraph/src/style.css' import router from '@/router' import App from './App.vue' diff --git a/tests-ui/unit-testing.md b/tests-ui/unit-testing.md index c04ff2fba..1abfb58c0 100644 --- a/tests-ui/unit-testing.md +++ b/tests-ui/unit-testing.md @@ -58,7 +58,7 @@ Testing LiteGraph-related functionality: ```typescript // Example from: tests-ui/tests/litegraph.test.ts -import { LGraph, LGraphNode, LiteGraph } from '@comfyorg/litegraph' +import { LGraph, LGraphNode, LiteGraph } from '@/lib/litegraph' import { describe, expect, it } from 'vitest' // Create dummy node for testing