Skip to content

Commit 589b7c7

Browse files
committed
fix(frontend): force side-effect imports in ports-v2 init.ts
Re-exports alone don't load modules with sideEffects:false. Added explicit imports before re-exports to force wiring registration.
1 parent 1addd97 commit 589b7c7

23 files changed

Lines changed: 120 additions & 13 deletions

File tree

apps/chaingraph-backend/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# @badaitech/chaingraph-backend
22

3+
## 0.7.4
4+
5+
### Patch Changes
6+
7+
- fix(frontend): force side-effect imports in ports-v2 init.ts
8+
- Updated dependencies
9+
- @badaitech/chaingraph-nodes@0.7.4
10+
- @badaitech/chaingraph-types@0.7.4
11+
- @badaitech/chaingraph-trpc@0.7.4
12+
313
## 0.7.3
414

515
### Patch Changes

apps/chaingraph-backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@badaitech/chaingraph-backend",
33
"type": "module",
4-
"version": "0.7.3",
4+
"version": "0.7.4",
55
"private": false,
66
"description": "Backend server for the Chaingraph project",
77
"license": "BUSL-1.1",

apps/chaingraph-execution-api/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @badaitech/chaingraph-execution-api
22

3+
## 0.7.4
4+
5+
### Patch Changes
6+
7+
- fix(frontend): force side-effect imports in ports-v2 init.ts
8+
- Updated dependencies
9+
- @badaitech/chaingraph-executor@0.7.4
10+
- @badaitech/chaingraph-nodes@0.7.4
11+
- @badaitech/chaingraph-types@0.7.4
12+
- @badaitech/chaingraph-trpc@0.7.4
13+
- @badaitech/badai-api@0.7.4
14+
315
## 0.7.3
416

517
### Patch Changes

apps/chaingraph-execution-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@badaitech/chaingraph-execution-api",
33
"type": "module",
4-
"version": "0.7.3",
4+
"version": "0.7.4",
55
"private": false,
66
"description": "Chaingraph tRPC Server - Scalable API server for Chaingraph execution management",
77
"license": "BUSL-1.1",

apps/chaingraph-execution-worker/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @badaitech/chaingraph-execution-worker
22

3+
## 0.7.4
4+
5+
### Patch Changes
6+
7+
- fix(frontend): force side-effect imports in ports-v2 init.ts
8+
- Updated dependencies
9+
- @badaitech/chaingraph-executor@0.7.4
10+
- @badaitech/chaingraph-nodes@0.7.4
11+
- @badaitech/chaingraph-types@0.7.4
12+
- @badaitech/chaingraph-trpc@0.7.4
13+
- @badaitech/badai-api@0.7.4
14+
315
## 0.7.3
416

517
### Patch Changes

apps/chaingraph-execution-worker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@badaitech/chaingraph-execution-worker",
33
"type": "module",
4-
"version": "0.7.3",
4+
"version": "0.7.4",
55
"private": false,
66
"description": "Chaingraph Execution Worker Service using DBOS for durable workflow execution",
77
"license": "BUSL-1.1",

apps/chaingraph-frontend/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @badaitech/chaingraph-frontend
22

3+
## 0.7.4
4+
5+
### Patch Changes
6+
7+
- fix(frontend): force side-effect imports in ports-v2 init.ts
8+
- Updated dependencies
9+
- @badaitech/chaingraph-executor@0.7.4
10+
- @badaitech/chaingraph-nodes@0.7.4
11+
- @badaitech/chaingraph-types@0.7.4
12+
- @badaitech/chaingraph-trpc@0.7.4
13+
- @badaitech/badai-api@0.7.4
14+
315
## 0.7.3
416

517
### Patch Changes

apps/chaingraph-frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@badaitech/chaingraph-frontend",
33
"type": "module",
4-
"version": "0.7.3",
4+
"version": "0.7.4",
55
"private": false,
66
"description": "Frontend application for the Chaingraph project",
77
"license": "BUSL-1.1",

apps/chaingraph-frontend/src/store/ports-v2/init.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@
1919
* This file should be imported once in the main store initialization.
2020
*/
2121

22+
// CRITICAL: Import modules first to force them to load (executes sample() calls)
23+
// Re-exports alone are not enough - with sideEffects:false, bundler will tree-shake them
24+
import './cleanup'
25+
import './dynamic-ports'
26+
import './echo-detection'
27+
import './initialization'
28+
29+
// Then re-export markers to prevent tree-shaking of this module
2230
export { CLEANUP_WIRING } from './cleanup'
2331
export { DYNAMIC_PORTS_WIRING } from './dynamic-ports'
24-
// Re-export wiring modules to prevent tree-shaking in lib builds
25-
// Each module registers sample() calls as side effects when imported
2632
export { ECHO_DETECTION_WIRING } from './echo-detection'
2733
export { INITIALIZATION_WIRING } from './initialization'
2834

packages/badai-api-example/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @badaitech/badai-api-example
22

3+
## 0.7.4
4+
5+
### Patch Changes
6+
7+
- fix(frontend): force side-effect imports in ports-v2 init.ts
8+
- Updated dependencies
9+
- @badaitech/badai-api@0.7.4
10+
311
## 0.7.3
412

513
### Patch Changes

0 commit comments

Comments
 (0)