Skip to content

Fix deprecated legacy API imports with modern API shims#2850

Open
TokenSpender wants to merge 11 commits into
Comfy-Org:mainfrom
TokenSpender:main
Open

Fix deprecated legacy API imports with modern API shims#2850
TokenSpender wants to merge 11 commits into
Comfy-Org:mainfrom
TokenSpender:main

Conversation

@TokenSpender
Copy link
Copy Markdown

ComfyUI has deprecated direct imports of several legacy API paths and logs
DEPRECATION WARNING in the browser console when these are imported directly
by extensions.

This replaces static imports with shims that check for the new
window.comfyAPI API first, falling back to the legacy path for backward
compatibility with older ComfyUI versions.

Files changed:

  • comfyui-manager.js: ui.js, button.js + buttonGroup.js shims. Also
    replaces repeated inline await import() calls with top-level hoisted
    variables for ComfyButton and ComfyButtonGroup.
  • components-manager.js: groupNode.js + ui.js shims
  • comfyui-gui-builder.js: ui.js shim
  • comfyui-share-common.js: ui.js shim
  • comfyui-share-copus.js: ui.js shim
  • comfyui-share-openart.js: ui.js shim
  • comfyui-share-youml.js: ui.js shim
  • common.js: ui.js shim
  • custom-nodes-manager.js: ui.js shim
  • model-manager.js: ui.js shim
  • snapshot.js: ui.js shim

All static imports have been moved above shim blocks to maintain valid
JavaScript module syntax.

Addresses multiple open issues reporting DEPRECATION WARNING in the browser console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant