feat: publish @comfyorg/shared-frontend-utils to npm - #14456
feat: publish @comfyorg/shared-frontend-utils to npm#14456christian-byrne wants to merge 3 commits into
Conversation
Replace the @/utils/formatUtil path alias with the package's real entrypoint so the repo consumes the same subpath external consumers will, and drop the now-dead alias from tsconfig, vite, and storybook. Revives #13035.
Add the four publishing workflows (reusable publish, publish-on-merge gated on the Release label, version bump, and a pack-contents CI check), and the package metadata npm needs: license, author, repository, files, publishConfig.access, and a README so the npm page is not blank. The package now ships compiled ESM plus declarations from dist/ via publishConfig.exports, keeping the raw TypeScript exports for workspace development. Raw .ts cannot be consumed by plain Node or a non-transpiling bundler, so shipping source would only fail in the consumer. Drop the type-only @comfyorg/registry-types import from formatUtil, which is an unpublished workspace package: the locale tuple it derived is now the source of truth. Export PostHogEventLike so consumers can type their own before_send hook.
… README Only highlightQuery runs DOMPurify. linkifyHtml and nl2br return raw HTML built from their input, so the previous claim that all three were sanitized was wrong in the direction that matters for consumers.
🌐 Website E2ETip All tests passed.
|
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1772 passed, 0 failed · 1 flaky📊 Browser Reports
📦 Bundle: 8.19 MB gzip 🔴 +139 BDetailsSummary
Category Glance App Entry Points — 3.62 kB (baseline 3.62 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.29 MB (baseline 1.29 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 1 unchanged Views & Navigation — 111 kB (baseline 111 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 12 added / 12 removed / 4 unchanged Panels & Settings — 551 kB (baseline 551 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 15 unchanged User & Accounts — 28.7 kB (baseline 28.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 unchanged Editors & Dialogs — 124 kB (baseline 124 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 6 added / 6 removed / 1 unchanged UI Components — 70 kB (baseline 70 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 9 unchanged Data & Services — 3.44 MB (baseline 3.44 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 386 kB (baseline 386 kB) • 🔴 +35 BHelpers, composables, and utility bundles
Status: 18 added / 18 removed / 18 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.7 MB (baseline 12.7 MB) • ⚪ 0 BBundles that do not match a named category
Status: 72 added / 72 removed / 208 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-07-31T03:09:11.483Z",
"gitSha": "5d481fcf08f2f2e528a2598df22bb7b64a740959",
"branch": "glary/publish-shared-frontend-utils",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2191.9560000000047,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.125,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 636.7689999999999,
"heapDeltaBytes": 5177696,
"heapUsedBytes": 72976508,
"domNodes": 20,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 21.928,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2045.3549999999723,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.581000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 537.9649999999999,
"heapDeltaBytes": 5181984,
"heapUsedBytes": 73112040,
"domNodes": 16,
"jsHeapTotalBytes": 20049920,
"scriptDurationMs": 21.825999999999997,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1917.6820000000134,
"styleRecalcs": 77,
"styleRecalcDurationMs": 43.513,
"layouts": 12,
"layoutDurationMs": 3.5650000000000004,
"taskDurationMs": 943.7509999999999,
"heapDeltaBytes": -16012984,
"heapUsedBytes": 51698064,
"domNodes": -281,
"jsHeapTotalBytes": 21487616,
"scriptDurationMs": 129.41599999999997,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1840.4990000000225,
"styleRecalcs": 73,
"styleRecalcDurationMs": 37.468,
"layouts": 12,
"layoutDurationMs": 3.638,
"taskDurationMs": 907.024,
"heapDeltaBytes": -16814408,
"heapUsedBytes": 51095076,
"domNodes": -281,
"jsHeapTotalBytes": 20963328,
"scriptDurationMs": 125.51900000000002,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1732.9770000000053,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.183999999999997,
"layouts": 6,
"layoutDurationMs": 0.6769999999999998,
"taskDurationMs": 413.1520000000001,
"heapDeltaBytes": 7902632,
"heapUsedBytes": 75507200,
"domNodes": 77,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 24.409,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1773.1880000000046,
"styleRecalcs": 32,
"styleRecalcDurationMs": 17.335,
"layouts": 6,
"layoutDurationMs": 0.5309999999999998,
"taskDurationMs": 399.3300000000001,
"heapDeltaBytes": 7935796,
"heapUsedBytes": 75716268,
"domNodes": 78,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 22.100999999999996,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 575.5589999999984,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.443,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 386.70000000000005,
"heapDeltaBytes": -11737068,
"heapUsedBytes": 55878792,
"domNodes": 20,
"jsHeapTotalBytes": 21360640,
"scriptDurationMs": 62.259,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 626.1060000000498,
"styleRecalcs": 13,
"styleRecalcDurationMs": 10.46,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 414.41299999999995,
"heapDeltaBytes": -12317080,
"heapUsedBytes": 55557216,
"domNodes": 22,
"jsHeapTotalBytes": 21622784,
"scriptDurationMs": 64.421,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2031.0409999999592,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.704000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 704.144,
"heapDeltaBytes": 7645744,
"heapUsedBytes": 66088752,
"domNodes": -281,
"jsHeapTotalBytes": 4255744,
"scriptDurationMs": 111.07900000000001,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2027.8200000000197,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.095999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 730.0889999999999,
"heapDeltaBytes": 8101892,
"heapUsedBytes": 66780712,
"domNodes": -282,
"jsHeapTotalBytes": 4255744,
"scriptDurationMs": 118.81700000000001,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2175.4459999999654,
"styleRecalcs": 67,
"styleRecalcDurationMs": 12.213000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1275.817,
"heapDeltaBytes": 5247476,
"heapUsedBytes": 65831648,
"domNodes": -287,
"jsHeapTotalBytes": 5791744,
"scriptDurationMs": 423.39099999999996,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2208.4989999999607,
"styleRecalcs": 68,
"styleRecalcDurationMs": 14.510000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1343.998,
"heapDeltaBytes": 8123472,
"heapUsedBytes": 68349068,
"domNodes": -286,
"jsHeapTotalBytes": 4743168,
"scriptDurationMs": 444.24600000000004,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3246.11299999998,
"styleRecalcs": 65,
"styleRecalcDurationMs": 14.669999999999998,
"layouts": 60,
"layoutDurationMs": 7.495000000000001,
"taskDurationMs": 1555.231,
"heapDeltaBytes": 210588,
"heapUsedBytes": 61553300,
"domNodes": -287,
"jsHeapTotalBytes": 7925760,
"scriptDurationMs": 544.8389999999999,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3229.74899999997,
"styleRecalcs": 65,
"styleRecalcDurationMs": 14.636999999999997,
"layouts": 60,
"layoutDurationMs": 7.57,
"taskDurationMs": 1568.751,
"heapDeltaBytes": 1166420,
"heapUsedBytes": 62591196,
"domNodes": -287,
"jsHeapTotalBytes": 7401472,
"scriptDurationMs": 540.572,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2053.8369999999873,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.964000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 746.2579999999999,
"heapDeltaBytes": 7728316,
"heapUsedBytes": 68556704,
"domNodes": -283,
"jsHeapTotalBytes": 4255744,
"scriptDurationMs": 124.49499999999999,
"eventListeners": -146,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2042.7949999999555,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.678999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 723.7750000000001,
"heapDeltaBytes": 8378760,
"heapUsedBytes": 69319488,
"domNodes": -284,
"jsHeapTotalBytes": 5042176,
"scriptDurationMs": 121.378,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 622.9460000000131,
"styleRecalcs": 46,
"styleRecalcDurationMs": 11.034999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 410.44599999999997,
"heapDeltaBytes": -10773376,
"heapUsedBytes": 57317852,
"domNodes": 18,
"jsHeapTotalBytes": 21360640,
"scriptDurationMs": 119.48,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 619.7369999999864,
"styleRecalcs": 47,
"styleRecalcDurationMs": 14.76,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 433.022,
"heapDeltaBytes": -11198996,
"heapUsedBytes": 56560296,
"domNodes": 20,
"jsHeapTotalBytes": 21360640,
"scriptDurationMs": 129.894,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2009.0209999999615,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.936000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 478.11100000000005,
"heapDeltaBytes": 4655244,
"heapUsedBytes": 72701104,
"domNodes": 20,
"jsHeapTotalBytes": 21098496,
"scriptDurationMs": 17.33,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2004.2100000000573,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.358,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.4200000000001,
"heapDeltaBytes": 4521488,
"heapUsedBytes": 72338688,
"domNodes": 20,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 18.497999999999998,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1707.8750000000014,
"styleRecalcs": 76,
"styleRecalcDurationMs": 39.258,
"layouts": 16,
"layoutDurationMs": 4.702999999999999,
"taskDurationMs": 859.861,
"heapDeltaBytes": -20671656,
"heapUsedBytes": 47462776,
"domNodes": -279,
"jsHeapTotalBytes": 20963328,
"scriptDurationMs": 97.94900000000001,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1744.7349999999915,
"styleRecalcs": 76,
"styleRecalcDurationMs": 37.265,
"layouts": 16,
"layoutDurationMs": 4.117,
"taskDurationMs": 831.129,
"heapDeltaBytes": -19789616,
"heapUsedBytes": 48196128,
"domNodes": -279,
"jsHeapTotalBytes": 19914752,
"scriptDurationMs": 97.118,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1418.2220000000143,
"styleRecalcs": 18,
"styleRecalcDurationMs": 31.243000000000006,
"layouts": 14,
"layoutDurationMs": 13.496999999999998,
"taskDurationMs": 972.6430000000001,
"heapDeltaBytes": 30660280,
"heapUsedBytes": 98837248,
"domNodes": 13673,
"jsHeapTotalBytes": 16252928,
"scriptDurationMs": 36.246,
"eventListeners": 2371,
"totalBlockingTimeMs": 141,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8405.637000000013,
"styleRecalcs": 249,
"styleRecalcDurationMs": 36.888999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4636.947999999999,
"heapDeltaBytes": 13319712,
"heapUsedBytes": 72215060,
"domNodes": -283,
"jsHeapTotalBytes": 7331840,
"scriptDurationMs": 1424.0949999999998,
"eventListeners": -126,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8467.315999999983,
"styleRecalcs": 249,
"styleRecalcDurationMs": 37.199,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4765.644,
"heapDeltaBytes": 11071160,
"heapUsedBytes": 70083832,
"domNodes": -281,
"jsHeapTotalBytes": 7331840,
"scriptDurationMs": 1454.325,
"eventListeners": -126,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17330.30199999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17313.039,
"heapDeltaBytes": -33287380,
"heapUsedBytes": 171291504,
"domNodes": -8312,
"jsHeapTotalBytes": -9117696,
"scriptDurationMs": 561.136,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17468.448999999964,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17448.547,
"heapDeltaBytes": -58200940,
"heapUsedBytes": 166555964,
"domNodes": -8312,
"jsHeapTotalBytes": -15667200,
"scriptDurationMs": 583.271,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 21303.46900000001,
"styleRecalcs": 151,
"styleRecalcDurationMs": 20.067,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21250.129,
"heapDeltaBytes": -55192404,
"heapUsedBytes": 154288612,
"domNodes": -8332,
"jsHeapTotalBytes": -10428416,
"scriptDurationMs": 912.4399999999999,
"eventListeners": -16387,
"totalBlockingTimeMs": 404,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 21207.6679999999,
"styleRecalcs": 147,
"styleRecalcDurationMs": 19.074000000000034,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21180.822,
"heapDeltaBytes": -61927540,
"heapUsedBytes": 169037972,
"domNodes": -8312,
"jsHeapTotalBytes": -15671296,
"scriptDurationMs": 911.1570000000002,
"eventListeners": -16383,
"totalBlockingTimeMs": 164,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 460.5770000000575,
"styleRecalcs": 13,
"styleRecalcDurationMs": 20.683,
"layouts": 2,
"layoutDurationMs": 0.3799999999999999,
"taskDurationMs": 130.769,
"heapDeltaBytes": -15999296,
"heapUsedBytes": 51034384,
"domNodes": 130,
"jsHeapTotalBytes": 7467008,
"scriptDurationMs": 10.521,
"eventListeners": 67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 457.608999999934,
"styleRecalcs": 12,
"styleRecalcDurationMs": 16.045,
"layouts": 2,
"layoutDurationMs": 0.34400000000000014,
"taskDurationMs": 105.191,
"heapDeltaBytes": -16076148,
"heapUsedBytes": 50832236,
"domNodes": 117,
"jsHeapTotalBytes": 8253440,
"scriptDurationMs": 8.783000000000001,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (85)
💤 Files with no reviewable changes (3)
📝 WalkthroughWalkthroughThe shared frontend utilities become a public npm package with compiled exports, package validation, version bumping, publishing, and release comments. Frontend consumers now import utility functions from the package instead of the local format utility alias. ChangesShared frontend utilities package
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ReleasePR
participant GitHubActions
participant SharedUtilsPackage
participant NPM
participant ReleaseComment
ReleasePR->>GitHubActions: merge labeled release PR
GitHubActions->>SharedUtilsPackage: resolve version and build ref
GitHubActions->>NPM: validate and publish package
NPM-->>GitHubActions: publication result
GitHubActions->>ReleaseComment: create release summary
ReleaseComment-->>ReleasePR: post npm package link
Possibly related PRs
Suggested labels: Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #14456 +/- ##
==========================================
- Coverage 78.43% 78.42% -0.02%
==========================================
Files 1760 1767 +7
Lines 102113 102838 +725
Branches 32159 33059 +900
==========================================
+ Hits 80094 80647 +553
- Misses 21600 21760 +160
- Partials 419 431 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 33 files with indirect coverage changes 🚀 New features to boost your workflow:
|
PR Created by the Glary-Bot Agent
Summary
Publish
@comfyorg/shared-frontend-utils(the format/network/PII utils) to npm following the npm publishing playbook, and revive #13035 so the repo imports the package by its real entrypoint instead of a path alias.Note on #13035: despite the framing, that PR was not a publishing PR — it was a 65-file rewrite of
@/utils/formatUtil→@comfyorg/shared-frontend-utils/formatUtil, 400 commits stale. Its content is reproduced here against current main (70 files) because it is the natural companion to publishing: internal code now dogfoods the exact subpath external consumers use, so CI validates the exports map.Changes
publish-shared-frontend-utils.yaml(reusableworkflow_call/workflow_dispatch),publish-shared-frontend-utils-on-merge.yaml(gated on merged +Releaselabel),version-bump-shared-frontend-utils.yaml(dispatch →Release-labelled PR),ci-shared-frontend-utils-pack.yaml(typecheck + build + tarball assertions). Package metadata npm needs:license,author,repository,files,publishConfig.access: public,exports["./package.json"], and a README so the npm page is not blank. Removedprivate: true.@/utils/formatUtilwas an alias to this package already; the alias is now removed fromtsconfig.json,vite.config.mts, and.storybook/main.ts. ThenetworkUtilalias is untouched.typescript.Published shape
The package now ships compiled ESM + declarations from
dist/viapublishConfig.exports, while top-levelexportskeep pointing at raw.tsfor workspace development. So there is no committeddist/and no internal churn, but consumers get real JavaScript.This differs from
design-system, which ships raw source — that package ships CSS and SVG, which any consumer can read. Raw.tscannot be: plain Node refuses TypeScript undernode_modules, and a non-transpiling bundler ortscconsumer fails too. Shipping source would only have failed in the consumer, after release, which is the exact failure mode the playbook exists to prevent.Also dropped the type-only
@comfyorg/registry-typesimport fromformatUtil— that is an unpublished workspace package, so it would have leaked an unresolvable dependency into the published types. The locale tuple it derived is now the source of truth.Review Focus
Verified by consuming the tarball from a separate npm-based repo (not pnpm), which is where a bad shape explodes:
npm installof the tarball resolves; packed manifest carries real ranges (axios: ^1.15.2,dompurify: 3.4.7) with nocatalog:/workspace:leak (playbook Trap 2)importworks under plain Node ESM;tscresolves all three subpaths undermoduleResolution: nodenextwithskipLibCheck: falsepackage.json,LICENSE,README.md, and 6dist/files. No tests, notsconfig, noregistry-typesreferencesrc/*.ts, so it is not vacuous. Its allowlist includesREADME.md(playbook Trap 3)Three things need a human decision:
package.jsonsaysMIT, matching both already-published siblings (design-system,comfyui-desktop-bridge-types), but the repo rootLICENSEisGPL-3.0-onlyand npm force-includes it, so the tarball carries contradictory terms.design-system@1.0.1already shipped this way. I did not resolve it because relicensing extracted GPL code is not a call I can make. Either add a package-local MITLICENSEor set the field toGPL-3.0-only— and the same fix likely applies to the two live packages.pnpm publishfrompackages/shared-frontend-utils, or widenNPM_TOKEN, then configure the trusted publisher — pointing it atpublish-shared-frontend-utils.yaml, with environment left blank, since the publish job declares noenvironment:.design-system's posts to a hardcoded#product-designID; I did not guess a channel for this package. Add one env line mirroring that job once you pick a channel.id-token: writeis set on both the publish job and the calling job (the second is easy to miss and is whyci/design-system-trusted-publishingneeded a follow-up commit), withNODE_AUTH_TOKENretained as the fallback until an OIDC publish actually succeeds.Two pre-existing issues surfaced but deliberately not fixed here:
packages/shared-frontend-utilstypecheck was never wired into CI and failed on main (piiUtil.test.ts$set/$set_once) — fixed minimally by exportingPostHogEventLike, since the new pack workflow makes it blocking. Andcomment-release-linksbuilds its diff link from globalv<version>tags, so package release comments show an unrelated range; that affectsdesign-systemidentically and belongs in its own PR.Screenshots are not applicable — no UI surface. Verification was CI-guard simulation, a real external consumer install, and the gates below.
Gates:
pnpm typecheck,format:check,knip, ESLint (0 errors),yamllinton all new workflows,pinactrefs allowlisted, 88 package tests + 73 tests across the 6vi.mockfiles whose mock specifiers moved.