Skip to content

feat!: migrate adapter to Molecule API#11

Merged
aose-yuu merged 8 commits into
mainfrom
feat/molecule-migration
Dec 19, 2025
Merged

feat!: migrate adapter to Molecule API#11
aose-yuu merged 8 commits into
mainfrom
feat/molecule-migration

Conversation

@aose-yuu
Copy link
Copy Markdown
Contributor

@aose-yuu aose-yuu commented Dec 19, 2025

Purpose

Migrate the React adapter from the legacy logic API to the molecule API in @sigrea/core.

Summary

  • Renamed useLogic to useMolcule and replaced mountLogic/cleanupLogic with direct molecule creation and disposeMolecule.
  • Kept React Strict Mode behavior by preserving the internal subscriber + pending-dispose tracking.
  • Updated exports, docs, playground, tests (including strict-mode coverage), and changelog.
  • Bumped @sigrea/core to ^0.4.0.

Breaking change / Migration

  • useLogic(...) -> useMolcule(...)

Verification

  • pnpm test (CI)
  • pnpm typecheck (CI)
  • pnpm build (CI)
  • pnpm format (CI)
  • CI PR title check passes (Conventional Commits)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pnpm-lock.yaml Outdated
Comment on lines +9 to +16
.:
dependencies:
'@sigrea/core':
specifier: ^0.3.1
version: 0.3.1
devDependencies:
'@biomejs/biome':
specifier: 1.9.4
version: 1.9.4
'@sigrea/core':
specifier: ^0.3.1
version: 0.3.1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore @sigrea/core resolution in lockfile

The lockfile still lists @sigrea/core as a devDependency (lines 9-16) but its resolution block was removed (rg "@sigrea/core@" pnpm-lock.yaml now returns no matches), so pnpm install --frozen-lockfile will fail because the lock cannot resolve that package and will force a re-resolution. Reintroduce the package entry so installs remain reproducible.

Useful? React with 👍 / 👎.

@aose-yuu aose-yuu merged commit 92a0634 into main Dec 19, 2025
1 check passed
@aose-yuu aose-yuu deleted the feat/molecule-migration branch December 19, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant