@bleedingdev/modern-js-main-doc 3.5.0-ultramodern.17 → 3.5.0-ultramodern.19

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.
@@ -78,6 +78,44 @@ mise exec -- pnpm check
78
78
  mise exec -- pnpm build
79
79
  ```
80
80
 
81
+ ### Migrating to `3.5.0-ultramodern.18`
82
+
83
+ Use `3.5.0-ultramodern.18` or newer for localized Cloudflare SSR workspaces.
84
+ This cohort moves bare locale-root redirects into the framework-owned
85
+ Cloudflare Worker entry and the i18n server runtime. A request for `/` is
86
+ redirected server-side with `302` to the negotiated locale path, for example
87
+ `/cs` for `Accept-Language: cs-CZ` or `/en` for English and fallback traffic.
88
+
89
+ Existing generated workspaces should upgrade the whole BleedingDev Modern
90
+ package cohort together:
91
+
92
+ ```bash
93
+ pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.18 ultramodern \
94
+ migrate-strict-effect --version 3.5.0-ultramodern.18
95
+ pnpm install
96
+ pnpm check
97
+ pnpm build
98
+ pnpm cloudflare:build
99
+ ```
100
+
101
+ For deployed Cloudflare Workers, redeploy after the cohort update and verify
102
+ the root response before accepting the migration:
103
+
104
+ ```bash
105
+ curl -I -H 'Accept-Language: cs-CZ,cs;q=0.9,en;q=0.1' https://<worker-host>/
106
+ ```
107
+
108
+ The expected response is `302` with `Location: /cs` or the matching locale,
109
+ `Cache-Control: private, no-store`, and `Vary` covering the locale detection
110
+ headers. Following the redirect should return the SSR locale page with the
111
+ matching document language and i18n SSR data.
112
+
113
+ Do not fix older root `404` responses by adding app-owned root route files,
114
+ client-side redirects, custom navigation wrappers, Cloudflare Worker
115
+ postprocessing, generated output edits, or local redirect shims. If `/` still
116
+ returns `404` after upgrading, confirm the production build log shows
117
+ `Modern.js Framework v3.5.0-ultramodern.18` or newer and redeploy the Worker.
118
+
81
119
  Strict generated API migration requires `3.5.0-ultramodern.10` or newer.
82
120
  `3.4.0-ultramodern.20` and earlier cohorts do not include this full direct
83
121
  `api/index.ts` generator, generated `.mts` checks, strict Oxlint boundary rule
@@ -71,6 +71,40 @@ mise exec -- pnpm check
71
71
  mise exec -- pnpm build
72
72
  ```
73
73
 
74
+ ### 迁移到 `3.5.0-ultramodern.18`
75
+
76
+ 本地化 Cloudflare SSR workspace 应使用 `3.5.0-ultramodern.18` 或更新版本。这个
77
+ cohort 将裸 locale root 重定向移动到框架拥有的 Cloudflare Worker entry 和 i18n
78
+ server runtime 中。请求 `/` 时,框架会按语言协商在服务端返回 `302`,例如
79
+ `Accept-Language: cs-CZ` 会跳转到 `/cs`,英语或 fallback 流量会跳转到 `/en`。
80
+
81
+ 既有生成 workspace 应整体升级同一个 BleedingDev Modern package cohort:
82
+
83
+ ```bash
84
+ pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.18 ultramodern \
85
+ migrate-strict-effect --version 3.5.0-ultramodern.18
86
+ pnpm install
87
+ pnpm check
88
+ pnpm build
89
+ pnpm cloudflare:build
90
+ ```
91
+
92
+ Cloudflare Workers 已部署环境需要在 cohort 更新后重新部署,并在接受迁移前验证 root
93
+ 响应:
94
+
95
+ ```bash
96
+ curl -I -H 'Accept-Language: cs-CZ,cs;q=0.9,en;q=0.1' https://<worker-host>/
97
+ ```
98
+
99
+ 期望响应是 `302`,并带有 `Location: /cs` 或匹配的 locale、
100
+ `Cache-Control: private, no-store`,以及覆盖语言检测 Header 的 `Vary`。继续跟随该
101
+ redirect 后,应返回匹配语言的 SSR 页面,文档语言和 i18n SSR 数据也应一致。
102
+
103
+ 不要通过 app 自有 root route、客户端 redirect、自定义导航 wrapper、Cloudflare Worker
104
+ postprocess、生成产物编辑或本地 redirect shim 来修复旧版本的 root `404`。如果升级后
105
+ `/` 仍然返回 `404`,先确认生产构建日志显示
106
+ `Modern.js Framework v3.5.0-ultramodern.18` 或更新版本,然后重新部署 Worker。
107
+
74
108
  严格生成 API 迁移要求 `3.5.0-ultramodern.10` 或更新版本。
75
109
  `3.4.0-ultramodern.20` 及更早 cohort 还没有这套完整的直接
76
110
  `api/index.ts` 生成器、生成的 `.mts` 检查、严格 Oxlint 边界规则、Effect 版本组
package/package.json CHANGED
@@ -19,14 +19,14 @@
19
19
  "modern.js",
20
20
  "ultramodern.js"
21
21
  ],
22
- "version": "3.5.0-ultramodern.17",
22
+ "version": "3.5.0-ultramodern.19",
23
23
  "publishConfig": {
24
24
  "registry": "https://registry.npmjs.org/",
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
28
  "mermaid": "^11.16.0",
29
- "@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.5.0-ultramodern.17"
29
+ "@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.5.0-ultramodern.19"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@rsbuild/plugin-sass": "2.0.0",