Repository navigation
Cordis 4.0.0-rc.11 #203
shigma
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Breaking Changes
Config handling is split out of
internal/updateinto separate events. Update listeners now receive(resolvedConfig, next)without thenoSaveargument; persistence handlers should move tointernal/commit(fiber, originalConfig). Config resolution usesinternal/config(fiber, next). Thefiber.update(config, noSave)call signature is unchanged.Several internal APIs have changed:
fiber.configretains the original config instead of the resolved value. Plugins receive interpolated and validated values through their callback or constructor argument.fiber.storeis split intofiber.committedfor injected bindings andfiber.provisionsfor the fiber's own provided bindings.Impl.fiberis replaced byImpl.ctx; the owning fiber is available throughimpl.ctx.fiber.ctx.reflect.notify()no longer returns a list of fibers.Notable Changes
internal/config(fiber, next)hook lets the loader interpolate expressions before schema validation on each load or reload. The newinternal/commit(fiber, originalConfig)event handles persistence of the original input, whileinternal/updatereceives the resolved config. This keeps reloads working with current values and preserves expressions for write-back.Features
!!jsexpressions indisabled(feat(loader): evaluate!!jsexpressions indisabled#179)Bug Fixes
ctx.parallel()(fix(core): report parallel dispatch mode #136)internal/updatehooks with the fiber (fix(core): dispose internal/update hooks with the fiber #56).yarnrc.ymlfiles (fix(create): leave an invalid.yarnrc.ymlalone #173)process.argv[1]when collecting externals (fix(hmr): guard absent process.argv[1] when collecting externals #170)baseDiron Windows (fix(hmr): match watch paths that differ in case from baseDir on Windows #157)ENOENTas a missing file (fix(include): only treat ENOENT as a missing file #171)_initTaskset until initialization settles (fix(loader): keep_initTaskset until init settles #166)voidreturn type for throttled and debounced functions (fix(timer): enforce void return type for throttled and debounced functions #163)不兼容变更
internal/update中的配置处理职责拆分到独立事件。更新监听器的参数改为(resolvedConfig, next),移除了noSave;持久化逻辑应迁移至internal/commit(fiber, originalConfig),配置解析通过internal/config(fiber, next)完成。fiber.update(config, noSave)的调用签名保持不变。部分内部 API 发生变更:
fiber.config保留原始配置,而非解析后的值。插件通过回调或构造函数的参数接收经过插值和校验的配置。fiber.store拆分为记录注入绑定的fiber.committed和记录自身提供绑定的fiber.provisions。Impl.fiber改为Impl.ctx,可通过impl.ctx.fiber访问所属 fiber。ctx.reflect.notify()不再返回 fiber 列表。重要变更
internal/config(fiber, next)钩子允许 loader 在每次加载或重载时先对表达式插值,再进行 schema 校验;新增的internal/commit(fiber, originalConfig)事件负责持久化原始输入,internal/update则接收解析后的配置。这样既能在重载时使用当前值,也能在写回时保留表达式。新特性
disabled中求值!!js表达式 (feat(loader): evaluate!!jsexpressions indisabled#179)问题修复
ctx.parallel()上报正确的派发模式 (fix(core): report parallel dispatch mode #136)internal/update钩子 (fix(core): dispose internal/update hooks with the fiber #56).yarnrc.yml文件,不覆盖其内容 (fix(create): leave an invalid.yarnrc.ymlalone #173)process.argv[1]的情况 (fix(hmr): guard absent process.argv[1] when collecting externals #170)baseDir大小写不同的监听路径 (fix(hmr): match watch paths that differ in case from baseDir on Windows #157)ENOENT视为文件不存在 (fix(include): only treat ENOENT as a missing file #171)_initTask,直到初始化完成或失败 (fix(loader): keep_initTaskset until init settles #166)void(fix(timer): enforce void return type for throttled and debounced functions #163)Packages
This discussion was created from the release Cordis 4.0.0-rc.11.
All reactions