@bleedingdev/modern-js-main-doc 3.9.0-ultramodern.17 → 3.9.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.
@@ -229,10 +229,6 @@ through `pnpm-workspace.yaml` overrides. For the current UltraModern cohort,
229
229
  generated apps use:
230
230
 
231
231
  ```yaml
232
- trustPolicyExclude:
233
- - 'effect@4.0.0-rc.117'
234
- - '@effect/opentelemetry@4.0.0-rc.117'
235
-
236
232
  overrides:
237
233
  '@effect/opentelemetry': 4.0.0-rc.117
238
234
  '@effect/vitest': 4.0.0-rc.117
@@ -244,10 +240,7 @@ Effect prerelease can fail while building layers or HTTP middleware because runt
244
240
  services come from different package instances. The strict 24-hour release-age
245
241
  gate applies to installed packages; the current cohort has no Effect age
246
242
  exemption, and override-only `@effect/vitest` is not an installed approval
247
- target. `trustPolicyExclude` is a separate policy:
248
- its exact `effect` and `@effect/opentelemetry` exceptions cover their
249
- trusted-publisher to provenance metadata transition and are not release-age
250
- approvals.
243
+ target.
251
244
 
252
245
  ## Contract tests
253
246
 
@@ -11,6 +11,8 @@ Whether to enable [React Compiler](https://react.dev/learn/react-compiler). Reac
11
11
 
12
12
  Modern.js implements this capability based on the Rust-based React Compiler built into Rspack's `builtin:swc-loader` (equivalent to setting SWC's `jsc.transform.reactCompiler`), reusing Rspack's built-in SWC transform chain without introducing Babel.
13
13
 
14
+ The compiler only runs for browser environments (`output.target: 'web'`). Server environments (`node`, the `web-worker` SSR worker and BFF code) render once per request and gain nothing from memoization, so they are never compiled.
15
+
14
16
  :::tip
15
17
  This option is disabled by default. It must be enabled explicitly for any React version, including React 19.
16
18
  :::
@@ -70,9 +70,7 @@ and `@effect/vitest@4.0.0-rc.117`. Do not add app-local direct Effect
70
70
  versions that disagree with those overrides. The strict 24-hour release-age
71
71
  gate applies to installed packages; this cohort carries no Effect age
72
72
  exemption, and override-only `@effect/vitest` is not an installed approval
73
- target. Independently, exact `trustPolicyExclude` entries for `effect`
74
- and `@effect/opentelemetry` cover their trusted-publisher to provenance
75
- metadata transition; they are not release-age approvals.
73
+ target.
76
74
 
77
75
  ### Current generated dependency baseline
78
76
 
@@ -191,6 +191,7 @@ Adds additional logic when the server resets.
191
191
  - `'file-change'`: File change event
192
192
  - `event.payload`: When `type` is `'file-change'`, contains an array of file change information.
193
193
  - **Execution Phase:** When files change or repack is needed.
194
+ - **Repack Order:** On `'repack'` the dev server awaits the handlers in registration order before it purges the previous server bundle from the require cache. A rejecting handler skips the handlers after it. New requests wait until the handlers settle; requests already running keep the modules they loaded. A repack handler must not await a request to the dev server, because that request waits for the handler.
194
195
  - **Example:**
195
196
 
196
197
  ```typescript
@@ -221,10 +221,6 @@ UltraModern 生成的 workspace 会通过 `pnpm-workspace.yaml` overrides 锁定
221
221
  Effect 版本组。当前 UltraModern 版本组使用:
222
222
 
223
223
  ```yaml
224
- trustPolicyExclude:
225
- - 'effect@4.0.0-rc.117'
226
- - '@effect/opentelemetry@4.0.0-rc.117'
227
-
228
224
  overrides:
229
225
  '@effect/opentelemetry': 4.0.0-rc.117
230
226
  '@effect/vitest': 4.0.0-rc.117
@@ -235,9 +231,6 @@ overrides:
235
231
  middleware 构建可能因为运行时 service 来自不同包实例而失败。严格的 24 小时发布年龄
236
232
  门禁适用于实际安装的包;当前版本组没有 Effect 年龄豁免,且仅用于 override 的
237
233
  `@effect/vitest` 不是已安装的审批目标。
238
- `trustPolicyExclude` 是另一项独立策略:其中精确的 `effect` 与
239
- `@effect/opentelemetry` 例外用于处理 trusted-publisher metadata 向 provenance
240
- attestation 的迁移,并不等同于 release-age 审批。
241
234
 
242
235
  ## 契约测试
243
236
 
@@ -11,6 +11,8 @@ title: reactCompiler
11
11
 
12
12
  Modern.js 基于 Rspack `builtin:swc-loader` 内置的 Rust 版 React Compiler 实现该能力(等价于设置 SWC 的 `jsc.transform.reactCompiler`),复用 Rspack 内置的 SWC 转换链,无需额外引入 Babel。
13
13
 
14
+ 该编译仅作用于浏览器环境(`output.target: 'web'`)。服务端环境(`node`、`web-worker` SSR Worker 以及 BFF 代码)每次请求只渲染一次,无法从自动记忆化中获益,因此不会被编译。
15
+
14
16
  :::tip
15
17
  该配置默认关闭,任何 React 版本下都需要显式开启,包括 React 19。
16
18
  :::
@@ -69,9 +69,6 @@ curl -I -H 'Accept-Language: cs-CZ,cs;q=0.9,en;q=0.1' https://<worker-host>/
69
69
  `@effect/vitest@4.0.0-rc.117`。不要添加与这些 overrides 冲突的 app 本地直接
70
70
  Effect 版本。严格的 24 小时发布年龄门禁适用于实际安装的包;当前版本组不包含 Effect
71
71
  年龄豁免,仅用于 override 的 `@effect/vitest` 也不是已安装的审批目标。
72
- `trustPolicyExclude` 是独立策略,仅为 `effect` 和
73
- `@effect/opentelemetry` 保留精确例外,以处理 trusted-publisher metadata 向
74
- provenance attestation 的迁移;它不属于 release-age 审批。
75
72
 
76
73
  ### 当前生成依赖基线
77
74
 
@@ -191,6 +191,7 @@ api.onPrepare(async () => {
191
191
  - `'file-change'`: 文件变化事件
192
192
  - `event.payload`: 当 `type` 为 `'file-change'` 时,包含文件变化信息数组。
193
193
  - **执行阶段:** 当文件发生变化或需要重新打包时。
194
+ - **重新打包顺序:** 对于 `'repack'`,开发服务器会按注册顺序等待处理函数完成,再从 require 缓存中清除上一代服务端产物。某个处理函数抛出错误时,其后的处理函数不再执行。新请求会等待处理函数完成;已在执行的请求继续使用已加载的模块。重新打包处理函数不能等待发往开发服务器的请求,因为该请求会等待处理函数完成。
194
195
  - **示例:**
195
196
 
196
197
  ```typescript
package/package.json CHANGED
@@ -19,13 +19,13 @@
19
19
  "modern.js",
20
20
  "ultramodern.js"
21
21
  ],
22
- "version": "3.9.0-ultramodern.17",
22
+ "version": "3.9.0-ultramodern.19",
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.9.0-ultramodern.17",
28
- "@modern-js/ultramodern-sandpack-profile": "npm:@bleedingdev/modern-js-ultramodern-sandpack-profile@3.9.0-ultramodern.17",
27
+ "@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.9.0-ultramodern.19",
28
+ "@modern-js/ultramodern-sandpack-profile": "npm:@bleedingdev/modern-js-ultramodern-sandpack-profile@3.9.0-ultramodern.19",
29
29
  "mermaid": "^11.17.2"
30
30
  },
31
31
  "devDependencies": {