Skip to content

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

Open
davedbase wants to merge 5 commits into
solidjs-community:nextfrom
davedbase:update/v2/signal-builders
Open

upgrade: signal-builders package upgrade for Solid 2.0#915
davedbase wants to merge 5 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: b7fba70

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: 58cb6895-b401-4973-aaeb-f9bad79d00bf

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
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.

1 participant