Comfy-Org / Comfy-Org/ComfyUI_frontend
Legacy src/scripts/utils.ts deprecated re-exports
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 702
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 512
Description
## Recommendation
### 🔀 CONSOLIDATE: Clean up legacy utils.ts
`src/scripts/utils.ts` contains deprecated re-exports and legacy utilities that have modern replacements.
## What Was Found
| Function | Status | Modern Replacement |
|---|---|---|
| `applyTextReplacements` | Marked `@deprecated` | `src/utils/searchAndReplace.ts` |
| `downloadBlob` | Re-export | `src/base/common/downloadUtil.ts` |
| `clone` | Legacy | `structuredClone` or `es-toolkit/cloneDeep` |
| `getStorageValue` / `setStorageValue` | No modern equivalent | Should be extracted to proper util |
| `prop` | Has `@ts-expect-error` | Likely unused |
## Context
`applyTextReplacements` is kept only for external callers (custom nodes). The rest can be migrated or removed if no external consumers exist.
---
**Category:** Vestigial System | **Confidence:** MEDIUM | **Tools:** Semantic analysis
_Filed by audit-code skill_
Part of #11022
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11053-Legacy-src-scripts-utils-ts-deprecated-re-exports-33e6d73d365081459db8c4d49b2cb56e) by [Unito](https://www.unito.io)
Contributor guide
Research direction
Start with src/scripts/utils.ts and search for consumers of each listed export, including external-call considerations for applyTextReplacements. Compare the replacements in src/utils/searchAndReplace.ts and src/base/common/downloadUtil.ts, then verify that each legacy utility is migrated, extracted, retained, or removed as appropriate; the issue is done when no unjustified deprecated re-exports remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100