@bleedingdev/modern-js-main-doc 3.8.1-ultramodern.4 → 3.8.2-ultramodern.2
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/docs/en/configure/app/server/rsc.mdx +2 -2
- package/docs/en/guides/basic-features/render/rsc.mdx +2 -2
- package/docs/en/guides/get-started/ultramodern.mdx +19 -16
- package/docs/zh/configure/app/server/rsc.mdx +2 -2
- package/docs/zh/guides/basic-features/render/rsc.mdx +2 -2
- package/docs/zh/guides/get-started/ultramodern.mdx +16 -16
- package/package.json +2 -2
|
@@ -10,9 +10,9 @@ title: rsc
|
|
|
10
10
|
Configure React Server Components (RSC).
|
|
11
11
|
|
|
12
12
|
:::warning UltraModern availability
|
|
13
|
-
RSC is not shipped
|
|
13
|
+
RSC is experimental, default-off, and unsupported for external consumers; it is not shipped in the current UltraModern company distribution. Release-cohort and clean-room release-acceptance tests verify that RSC runtimes are absent and cannot resolve, and the release cohort has no maintained `@bleedingdev/*` RSC runtime package; when enabled, the framework intentionally fails closed unless an application supplies the complete optional toolchain.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The root-only `react-server-dom-rspack@0.0.3` patch backports Flight decoder security fixes for this repository's RSC tests; it is never copied into generated workspaces or published to consumers, so an app installing the upstream package receives unpatched bytes. [SyMind/react#1](https://github.com/SyMind/react/pull/1) merged on 2026-08-11; [BleedingDev/react#1](https://github.com/BleedingDev/react/pull/1) and [rspack#15144](https://github.com/web-infra-dev/rspack/issues/15144) remain open. npm still reports `react-server-dom-rspack` `latest` as `0.0.3`, with no patched consumer release, so the root-only patch remains necessary for this repository's RSC tests. This boundary is pending final owner ratification.
|
|
16
16
|
:::
|
|
17
17
|
|
|
18
18
|
```ts title="modern.config.ts"
|
|
@@ -22,9 +22,9 @@ Before starting, we recommend reading React's official [Server Components docume
|
|
|
22
22
|
## Quick Start
|
|
23
23
|
|
|
24
24
|
:::warning UltraModern availability
|
|
25
|
-
RSC is not shipped
|
|
25
|
+
RSC is experimental, default-off, and unsupported for external consumers; it is not shipped in the current UltraModern company distribution. Release-cohort and clean-room release-acceptance tests verify that RSC runtimes are absent and cannot resolve, and the release cohort has no maintained `@bleedingdev/*` RSC runtime package; when enabled, the framework intentionally fails closed unless an application supplies the complete optional toolchain.
|
|
26
26
|
|
|
27
|
-
The
|
|
27
|
+
The root-only `react-server-dom-rspack@0.0.3` patch backports Flight decoder security fixes for this repository's RSC tests; it is never copied into generated workspaces or published to consumers, so an app installing the upstream package receives unpatched bytes. [SyMind/react#1](https://github.com/SyMind/react/pull/1) merged on 2026-08-11; [BleedingDev/react#1](https://github.com/BleedingDev/react/pull/1) and [rspack#15144](https://github.com/web-infra-dev/rspack/issues/15144) remain open. npm still reports `react-server-dom-rspack` `latest` as `0.0.3`, with no patched consumer release, so the root-only patch remains necessary for this repository's RSC tests. This boundary is pending final owner ratification.
|
|
28
28
|
:::
|
|
29
29
|
|
|
30
30
|
Keep [`server.rsc`](/configure/app/server/rsc) set to `false`:
|
|
@@ -78,20 +78,22 @@ mise exec -- pnpm check
|
|
|
78
78
|
mise exec -- pnpm build
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
### Migrating
|
|
81
|
+
### Migrating localized Cloudflare SSR workspaces
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
Current cohorts localize Cloudflare SSR workspaces.
|
|
84
|
+
The framework moves bare locale-root redirects into the framework-owned
|
|
85
85
|
Cloudflare Worker entry and the i18n server runtime. A request for `/` is
|
|
86
86
|
redirected server-side with `302` to the negotiated locale path, for example
|
|
87
87
|
`/cs` for `Accept-Language: cs-CZ` or `/en` for English and fallback traffic.
|
|
88
88
|
|
|
89
89
|
Existing generated workspaces should upgrade the whole BleedingDev Modern
|
|
90
|
-
package cohort together
|
|
90
|
+
package cohort together. Resolve the current cohort version first, then run
|
|
91
|
+
the matching migration:
|
|
91
92
|
|
|
92
93
|
```bash
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
COHORT="$(npm view @bleedingdev/modern-js-create version)"
|
|
95
|
+
pnpm dlx "@bleedingdev/modern-js-create@$COHORT" ultramodern \
|
|
96
|
+
migrate-strict-effect --version "$COHORT"
|
|
95
97
|
pnpm install
|
|
96
98
|
pnpm check
|
|
97
99
|
pnpm build
|
|
@@ -114,22 +116,23 @@ Do not fix older root `404` responses by adding app-owned root route files,
|
|
|
114
116
|
client-side redirects, custom navigation wrappers, Cloudflare Worker
|
|
115
117
|
postprocessing, generated output edits, or local redirect shims. If `/` still
|
|
116
118
|
returns `404` after upgrading, confirm the production build log shows
|
|
117
|
-
`Modern.js Framework
|
|
119
|
+
`Modern.js Framework v<cohort-version>` for the cohort you migrated to and
|
|
120
|
+
redeploy the Worker.
|
|
118
121
|
|
|
119
|
-
Strict generated API migration
|
|
120
|
-
`
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
newer with `--ultramodern-package-version`.
|
|
122
|
+
Strict generated API migration is part of every current cohort: the direct
|
|
123
|
+
`api/index.ts` generator, generated `.mts` checks, the strict Oxlint boundary
|
|
124
|
+
rule set, Effect cohort overrides, and the strict Effect migration command.
|
|
125
|
+
Agents that cannot install the BleedingDev cohort yet should use the local
|
|
126
|
+
Modern.js workspace for migration validation; otherwise pin the target cohort
|
|
127
|
+
with `--ultramodern-package-version`.
|
|
126
128
|
|
|
127
129
|
Before hand-editing package aliases or generated metadata, run the framework
|
|
128
130
|
migration command from the target workspace:
|
|
129
131
|
|
|
130
132
|
```bash
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
COHORT="$(npm view @bleedingdev/modern-js-create version)"
|
|
134
|
+
pnpm dlx "@bleedingdev/modern-js-create@$COHORT" ultramodern \
|
|
135
|
+
migrate-strict-effect --version "$COHORT"
|
|
133
136
|
pnpm api:check
|
|
134
137
|
pnpm contract:check
|
|
135
138
|
```
|
|
@@ -10,9 +10,9 @@ title: rsc
|
|
|
10
10
|
配置 React Server Components (RSC)。
|
|
11
11
|
|
|
12
12
|
:::warning UltraModern 可用性
|
|
13
|
-
|
|
13
|
+
RSC 仍属实验性能力,默认关闭,且不对外部消费者提供支持;当前 UltraModern 公司发行版不会随附 RSC。发布批次与 clean-room 发布验收测试验证 RSC 运行时不存在且无法解析,发布批次也没有已维护的 `@bleedingdev/*` RSC 运行时包;启用 RSC 时,除非应用提供完整的可选工具链,否则框架会按 fail-closed 处理。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
根目录专用的 `react-server-dom-rspack@0.0.3` 补丁仅为本仓库的 RSC 回归测试回移 Flight 解码器安全修复;它不会复制到生成工作区或发布给消费者,因此应用自行安装上游包得到的是未打补丁的字节。[SyMind/react#1](https://github.com/SyMind/react/pull/1) 已于 2026-08-11 合并;[BleedingDev/react#1](https://github.com/BleedingDev/react/pull/1) 与 [rspack#15144](https://github.com/web-infra-dev/rspack/issues/15144) 仍处于 open 状态。npm 上 `react-server-dom-rspack` 的 `latest` 仍为 `0.0.3`,且没有包含补丁的消费者发行版,因此根目录补丁对于本仓库的 RSC 测试仍是必要的。此边界仍待所有者最终批准。
|
|
16
16
|
:::
|
|
17
17
|
|
|
18
18
|
```ts title="modern.config.ts"
|
|
@@ -22,9 +22,9 @@ React Server Components (RSC) 是一种新的组件类型,允许在服务端
|
|
|
22
22
|
## 快速开始
|
|
23
23
|
|
|
24
24
|
:::warning UltraModern 可用性
|
|
25
|
-
|
|
25
|
+
RSC 仍属实验性能力,默认关闭,且不对外部消费者提供支持;当前 UltraModern 公司发行版不会随附 RSC。发布批次与 clean-room 发布验收测试验证 RSC 运行时不存在且无法解析,发布批次也没有已维护的 `@bleedingdev/*` RSC 运行时包;启用 RSC 时,除非应用提供完整的可选工具链,否则框架会按 fail-closed 处理。
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
根目录专用的 `react-server-dom-rspack@0.0.3` 补丁仅为本仓库的 RSC 回归测试回移 Flight 解码器安全修复;它不会复制到生成工作区或发布给消费者,因此应用自行安装上游包得到的是未打补丁的字节。[SyMind/react#1](https://github.com/SyMind/react/pull/1) 已于 2026-08-11 合并;[BleedingDev/react#1](https://github.com/BleedingDev/react/pull/1) 与 [rspack#15144](https://github.com/web-infra-dev/rspack/issues/15144) 仍处于 open 状态。npm 上 `react-server-dom-rspack` 的 `latest` 仍为 `0.0.3`,且没有包含补丁的消费者发行版,因此根目录补丁对于本仓库的 RSC 测试仍是必要的。此边界仍待所有者最终批准。
|
|
28
28
|
:::
|
|
29
29
|
|
|
30
30
|
请保持 [`server.rsc`](/configure/app/server/rsc) 为 `false`:
|
|
@@ -71,18 +71,19 @@ mise exec -- pnpm check
|
|
|
71
71
|
mise exec -- pnpm build
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
###
|
|
74
|
+
### 迁移本地化 Cloudflare SSR workspace
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
cohort 将裸 locale root 重定向移动到框架拥有的 Cloudflare Worker entry 和 i18n
|
|
76
|
+
当前 cohort 均支持本地化 Cloudflare SSR workspace。框架将裸 locale root 重定向移动到框架拥有的 Cloudflare Worker entry 和 i18n
|
|
78
77
|
server runtime 中。请求 `/` 时,框架会按语言协商在服务端返回 `302`,例如
|
|
79
78
|
`Accept-Language: cs-CZ` 会跳转到 `/cs`,英语或 fallback 流量会跳转到 `/en`。
|
|
80
79
|
|
|
81
|
-
既有生成 workspace 应整体升级同一个 BleedingDev Modern package cohort
|
|
80
|
+
既有生成 workspace 应整体升级同一个 BleedingDev Modern package cohort。
|
|
81
|
+
先解析当前 cohort 版本,再运行同版本迁移命令:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
COHORT="$(npm view @bleedingdev/modern-js-create version)"
|
|
85
|
+
pnpm dlx "@bleedingdev/modern-js-create@$COHORT" ultramodern \
|
|
86
|
+
migrate-strict-effect --version "$COHORT"
|
|
86
87
|
pnpm install
|
|
87
88
|
pnpm check
|
|
88
89
|
pnpm build
|
|
@@ -102,21 +103,20 @@ redirect 后,应返回匹配语言的 SSR 页面,文档语言和 i18n SSR
|
|
|
102
103
|
|
|
103
104
|
不要通过 app 自有 root route、客户端 redirect、自定义导航 wrapper、Cloudflare Worker
|
|
104
105
|
postprocess、生成产物编辑或本地 redirect shim 来修复旧版本的 root `404`。如果升级后
|
|
105
|
-
`/` 仍然返回 `404
|
|
106
|
-
`Modern.js Framework
|
|
106
|
+
`/` 仍然返回 `404`,先确认生产构建日志显示的
|
|
107
|
+
`Modern.js Framework v<cohort-version>` 就是迁移目标 cohort,然后重新部署 Worker。
|
|
107
108
|
|
|
108
|
-
严格生成 API
|
|
109
|
-
`
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Modern.js workspace 做迁移校验;否则用 `--ultramodern-package-version` 固定
|
|
113
|
-
`3.5.0-ultramodern.10` 或更新版本。
|
|
109
|
+
严格生成 API 迁移是当前每个 cohort 的组成部分:直接 `api/index.ts` 生成器、生成的
|
|
110
|
+
`.mts` 检查、严格 Oxlint 边界规则、Effect 版本组 overrides 和严格 Effect 迁移命令。
|
|
111
|
+
还不能安装 BleedingDev cohort 的 agent 应使用本地 Modern.js workspace 做迁移校验;
|
|
112
|
+
否则用 `--ultramodern-package-version` 固定目标 cohort。
|
|
114
113
|
|
|
115
114
|
手写 package alias 或生成 metadata 之前,先在目标 workspace 运行框架迁移命令:
|
|
116
115
|
|
|
117
116
|
```bash
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
COHORT="$(npm view @bleedingdev/modern-js-create version)"
|
|
118
|
+
pnpm dlx "@bleedingdev/modern-js-create@$COHORT" ultramodern \
|
|
119
|
+
migrate-strict-effect --version "$COHORT"
|
|
120
120
|
pnpm api:check
|
|
121
121
|
pnpm contract:check
|
|
122
122
|
```
|
package/package.json
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"modern.js",
|
|
20
20
|
"ultramodern.js"
|
|
21
21
|
],
|
|
22
|
-
"version": "3.8.
|
|
22
|
+
"version": "3.8.2-ultramodern.2",
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.8.
|
|
27
|
+
"@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.8.2-ultramodern.2",
|
|
28
28
|
"mermaid": "^11.16.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|