Skip to content

upgrade: signal-builders package upgrade for Solid 2.0#915

Merged
davedbase merged 11 commits into
solidjs-community:nextfrom
davedbase:update/v2/signal-builders
May 30, 2026
Merged

upgrade: signal-builders package upgrade for Solid 2.0#915
davedbase merged 11 commits into
solidjs-community:nextfrom
davedbase:update/v2/signal-builders

Conversation

@davedbase
Copy link
Copy Markdown
Member

@davedbase davedbase commented May 22, 2026

Upgrades @solid-primitives/signal-builders to solid-js@^2.0.0-beta.13.

Changes

Solid 2.0 compatibility

  • Removed on() helper usage in capitalize (API removed in 2.0) — replaced with a plain createMemo
  • Updated tests to create signals outside createRoot and call flush() after writes, required by Solid 2.0's owned-scope write restriction and async batching model

Bug fixes

  • get and merge were missing createMemo wrappers — they declared Accessor<T> return types but returned plain non-reactive values; this fixes them to actually be reactive

Package

  • Peer dependency bumped to solid-js@^2.0.0-beta.13

Docs & metadata

  • README rewritten: cleaner usage section, fixed typos (intiger, an float, recursing), collapsed the "Object/Array" category into "Object", clarified remove vs filterOut distinction, noted shallow-merge behavior on merge and setter-function support on update, removed the outdated "proof of concept" section
  • Source comments cleaned up: removed comments that restated function names; kept only non-obvious behavioral notes
  • package.json: fixed placeholder author, updated primitive.list, added keywords

Breaking changes

  • solid-js@^2.0.0-beta.13 is now required
  • get() and merge() now return reactive Accessor<T> values — code that treated their results as plain values (working around the previous bug) will break

Summary by CodeRabbit

  • Documentation

    • Updated package readme with revised usage guidance, installation instructions, and builder reference documentation with expanded coverage examples.
  • Refactor

    • Migrated to Solid.js v2.0-beta.13; get and merge now return reactive accessor values (breaking change from previous non-reactive behavior).
  • Tests

    • Updated test suite for Solid.js v2.0-beta.13 compatibility.
  • Chores

    • Updated peer dependencies and package metadata.

Review Change Stack

@davedbase davedbase added this to the Solid 2.0 Migration milestone May 22, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

🦋 Changeset detected

Latest commit: 146cbc5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solid-primitives/signal-builders Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e9b9a5f9-1d15-4acb-adca-cbaa266091b1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@davedbase davedbase marked this pull request as ready for review May 22, 2026 20:43
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/signal-builders/src/string.ts`:
- Line 7: The current memoized capitalisation uses s[0]!.toUpperCase() which
will throw for empty strings; update the createMemo callback (the function that
reads const s = string()) to early-return an empty string (or s) when s === ""
(or s.length === 0) before calling s[0]!.toUpperCase(), otherwise perform the
existing s[0]!.toUpperCase() + s.substring(1).toLowerCase() logic so empty input
no longer crashes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f3a030a7-57f1-4bc7-8c2c-810885d647be

📥 Commits

Reviewing files that changed from the base of the PR and between 8e8ff1e and b26edb6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • .changeset/signal-builders-solid2-migration.md
  • packages/signal-builders/README.md
  • packages/signal-builders/package.json
  • packages/signal-builders/src/array.ts
  • packages/signal-builders/src/convert.ts
  • packages/signal-builders/src/number.ts
  • packages/signal-builders/src/object.ts
  • packages/signal-builders/src/string.ts
  • packages/signal-builders/src/update.ts
  • packages/signal-builders/test/index.test.ts
💤 Files with no reviewable changes (1)
  • packages/signal-builders/src/convert.ts

Comment thread packages/signal-builders/src/string.ts Outdated
Copy link
Copy Markdown
Member

@atk atk left a comment

Choose a reason for hiding this comment

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

The missing tests are not that important, but the JSdoc comments are bad DX and we should add all primitives to the list.

Comment thread packages/signal-builders/src/array.ts
Comment thread packages/signal-builders/package.json
Comment thread packages/signal-builders/test/index.test.ts
@davedbase davedbase merged commit 4c84a1b into solidjs-community:next May 30, 2026
1 check passed
@davedbase davedbase deleted the update/v2/signal-builders branch May 30, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants