@ecopages/react 0.2.0-alpha.16 → 0.2.0-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,7 @@ All notable changes to `@ecopages/react` are documented here.
10
10
 
11
11
  - Fixed React hydration, Fast Refresh, module loading, doctype handling, island asset reuse, and mixed-renderer boundary resolution across Bun, Vite, and Nitro flows.
12
12
  - Restored direct `ReactPlugin` construction so the exported class still accepts the public plugin options shape.
13
+ - Fixed React boundary payload compatibility coverage and removed the plugin/renderer integration-name import cycle.
13
14
 
14
15
  ### Features
15
16
 
@@ -28,6 +29,7 @@ All notable changes to `@ecopages/react` are documented here.
28
29
 
29
30
  - Added Vitest browser coverage for the React `dynamic()` utility using React Testing Library.
30
31
  - Added browser execution coverage for the generated React hydration bootstrap, including router ownership registration and page-root cleanup.
32
+ - Added renderer-level coverage for the boundary payload compatibility contract, including non-attachable fragment roots.
31
33
 
32
34
  ### Documentation
33
35
 
package/README.md CHANGED
@@ -70,6 +70,12 @@ The React integration can participate in mixed-renderer apps in three ways:
70
70
 
71
71
  When a non-React render pass enters a React-owned boundary, Ecopages hands that boundary back to the React renderer. When React renders through a non-React shell, that shell must serialize to HTML so React can insert the result into the final response without escaping it.
72
72
 
73
+ Important:
74
+
75
+ - Components that may render foreign children must declare those children in `config.dependencies.components`.
76
+ - Ecopages validates mixed-renderer ownership from declared dependencies during render preparation. It does not infer every foreign boundary from rendered HTML alone.
77
+ - React still keeps its own child transport and hydration rules for React-owned subtrees.
78
+
73
79
  ## Server and Client Graph Contract
74
80
 
75
81
  The React integration supports Node.js modules and server-only code **only on the server execution graph**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecopages/react",
3
- "version": "0.2.0-alpha.16",
3
+ "version": "0.2.0-alpha.18",
4
4
  "description": "React integration for Ecopages",
5
5
  "keywords": [
6
6
  "ecopages",
@@ -53,14 +53,14 @@
53
53
  "directory": "packages/integrations/react"
54
54
  },
55
55
  "peerDependencies": {
56
- "@ecopages/core": "0.2.0-alpha.16",
56
+ "@ecopages/core": "0.2.0-alpha.18",
57
57
  "@types/react": "^19",
58
58
  "@types/react-dom": "^19",
59
59
  "react": "^19",
60
60
  "react-dom": "^19"
61
61
  },
62
62
  "dependencies": {
63
- "@ecopages/file-system": "0.2.0-alpha.16",
63
+ "@ecopages/file-system": "0.2.0-alpha.18",
64
64
  "@ecopages/logger": "^0.2.3",
65
65
  "@mdx-js/esbuild": "^3.0.1",
66
66
  "@mdx-js/mdx": "^3.1.0",
@@ -6,7 +6,7 @@ import { getAppBuildExecutor } from "@ecopages/core/build/build-adapter";
6
6
  import { ECO_DOCUMENT_OWNER_ATTRIBUTE } from "@ecopages/core/router/navigation-coordinator";
7
7
  import { createRequire } from "node:module";
8
8
  import path from "node:path";
9
- import { PLUGIN_NAME } from "./react.plugin.js";
9
+ import { REACT_PLUGIN_NAME } from "./react.constants.js";
10
10
  import { hasSingleRootElement } from "./utils/html-boundary.js";
11
11
  import { ReactBundleService } from "./services/react-bundle.service.js";
12
12
  import { ReactHmrPageMetadataCache } from "./services/react-hmr-page-metadata-cache.js";
@@ -29,7 +29,7 @@ class BundleError extends Error {
29
29
  }
30
30
  }
31
31
  class ReactRenderer extends IntegrationRenderer {
32
- name = PLUGIN_NAME;
32
+ name = REACT_PLUGIN_NAME;
33
33
  componentDirectory = RESOLVED_ASSETS_DIR;
34
34
  reactRuntimeModules;
35
35
  routerAdapter;
@@ -0,0 +1 @@
1
+ export declare const REACT_PLUGIN_NAME = "react";
@@ -0,0 +1,4 @@
1
+ const REACT_PLUGIN_NAME = "react";
2
+ export {
3
+ REACT_PLUGIN_NAME
4
+ };
@@ -1,11 +1,12 @@
1
1
  import { IntegrationPlugin } from "@ecopages/core/plugins/integration-plugin";
2
2
  import { Logger } from "@ecopages/logger";
3
+ import { REACT_PLUGIN_NAME } from "./react.constants.js";
3
4
  import { ReactRenderer } from "./react-renderer.js";
4
5
  import { ReactHmrStrategy } from "./react-hmr-strategy.js";
5
6
  import { ReactRuntimeBundleService } from "./services/react-runtime-bundle.service.js";
6
7
  import { ReactHmrPageMetadataCache } from "./services/react-hmr-page-metadata-cache.js";
7
8
  const appLogger = new Logger("[ReactPlugin]");
8
- const PLUGIN_NAME = "react";
9
+ const PLUGIN_NAME = REACT_PLUGIN_NAME;
9
10
  const mergePluginLists = (...lists) => {
10
11
  const merged = lists.flatMap((list) => list ? [...list] : []);
11
12
  return merged.length > 0 ? merged : void 0;