mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 10:59:53 +00:00
Update remaining @comfyorg/litegraph references
This commit is contained in:
@@ -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=""
|
||||
|
||||
@@ -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 <https://github.com/Comfy-Org/litegraph.js>. 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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
@@ -16,9 +16,9 @@ Some early highlights:
|
||||
- Batch output connection move/disconnect (<https://github.com/Comfy-Org/litegraph.js/pull/39>)
|
||||
- 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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user