一键导入
update-preact
Instructions and guidelines for updating the pinned Preact JS git submodule and synchronizing upstream updates to the Dart preact_signals package.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Instructions and guidelines for updating the pinned Preact JS git submodule and synchronizing upstream updates to the Dart preact_signals package.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Highly optimized Flutter UI bindings and GPU rendering for reactive signals.
Comprehensive hook utility functions integrating reactive signals seamlessly with flutter_hooks.
Comprehensive reactive state hooks for integration with flutter_hooks.
Standardized compiler diagnostics, static analysis lints, and automated IDE quick-fixes.
Use when you need to convert / rewrite existing HTML (from a file or url) into Jaspr code.
Use when working in a Jaspr project, on Jaspr components, or other Jaspr-related tasks. Contains fundamentals of writing Jaspr components and using HTML components.
| name | update-preact |
| description | Instructions and guidelines for updating the pinned Preact JS git submodule and synchronizing upstream updates to the Dart preact_signals package. |
This guide details the systematic process for updating the pinned Preact.js Signals JS/TS git submodule (third_party/preactjs_signals) and porting its structural updates, algorithmic changes, and optimizations into the Dart preact_signals package.
The upstream JavaScript/TypeScript implementation is tracked via a Git submodule located at third_party/preactjs_signals.
If the submodule is not initialized, run:
git submodule update --init --recursive
To upgrade the pinned submodule version:
cd third_party/preactjs_signals
git fetch --tags origin
git checkout tags/v1.3.0 # or specific tag/commit hash
cd ...
git add third_party/preactjs_signals
Once the submodule is checked out to the new version, review the differences inside Preact's TypeScript core codebase:
Compare changes to locate:
Signal, Computed, or Effect.preact_signalsAll ported logic must reside in the packages/preact_signals package.
Modify the corresponding Dart implementation files to accurately align with the updated Preact JS algorithms:
[!IMPORTANT] Keep the Dart implementation highly semantic and idiomatic. While replicating Preact's structural logic is necessary to preserve reactive correctness and avoid cycles, leverage Dart's language features (such as
lateinitializers,WeakReference,Expando, orExtension types) appropriately.
Ensure any new test cases introduced in Preact core's test suite are ported to:
When changes are ported, increment package versions and document changes.
Execute these verification commands prior to staging code changes:
# 1. Update monorepo dependencies
melos bootstrap
# 2. Run static analysis
melos run analyze
# 3. Format files
dart format .
# 4. Execute all unit tests and verify 100% success
melos run test
# 5. Review combined coverage and verify high metrics
melos run coverage