Skip to content

upgrade: date package upgrade for Solid 2.0#870

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

upgrade: date package upgrade for Solid 2.0#870
davedbase wants to merge 5 commits into
solidjs-community:nextfrom
davedbase:update/v2/date

Conversation

@davedbase
Copy link
Copy Markdown
Member

@davedbase davedbase commented May 4, 2026

Bumps peer dependencies to solid-js@^2.0.0-beta.10 and @solidjs/web@^2.0.0-beta.10

  • Drops @solid-primitives/timer and @solid-primitives/memo deps; inlines TimeoutSource type
  • createDateNow — converts createEffect to the required split (compute, apply) two-argument form
  • createCountdown — replaces removed createComputed with createRenderEffect(compute, apply)
  • createDate — replaces removed createWritableMemo with createSignal(fn) writable-computed overload
  • createStore import moved from solid-js/store to solid-js; isServer import moved to @solidjs/web
  • Tests updated: flush() after signal writes (pull-based reactivity requires explicit flush outside tracking contexts), signals created outside createRoot to avoid SIGNAL_WRITE_IN_OWNED_SCOPE
  • New test/server.test.ts for SSR safety across all five primitives

Summary by CodeRabbit

  • New Features

    • Added server-side rendering support with enhanced SSR test coverage.
  • Chores

    • Updated to Solid.js 2.0-beta.10 and @solidjs/web 2.0-beta.10.
    • Updated peer dependencies to align with Solid.js v2 beta releases.
  • Documentation

    • Added pnpm as an installation option in the README.

Review Change Stack

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

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: 01fc319

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/date 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

davedbase added 2 commits May 17, 2026 09:24
# Conflicts:
#	packages/date/test/date-difference.test.ts
@davedbase davedbase marked this pull request as ready for review May 17, 2026 13:26
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 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: 6caf3ad3-da52-42ce-b422-3f040e6aaeb7

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.

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: 2

🤖 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/date/package.json`:
- Around line 57-59: Update packages/date/package.json to align its Solid 2 beta
versions with the workspace baseline: change the "`@solidjs/web`" and "solid-js"
entries (both devDependencies and peerDependencies) from 2.0.0-beta.10 /
^2.0.0-beta.10 to 2.0.0-beta.14 / ^2.0.0-beta.14 respectively (or add a short
comment in the package.json describing why this package must remain on beta.10
if intentional); ensure you update both the devDependencies keys "`@solidjs/web`"
and "solid-js" and any peerDependencies that reference "^2.0.0-beta.10" so
versions are consistent with the root workspace.

In `@packages/date/src/primitives.ts`:
- Around line 77-81: The current scheduling code only treats false as disabled
which allows setInterval(update, 0) when interval resolves to 0; update the
condition that disables scheduling to also treat 0 as disabled by checking the
resolved ms value (the variable named interval and the resolved ms used with
setInterval/clearInterval): change the guard so that if ms === false || ms === 0
the function returns without creating the interval, ensuring no busy-loop timer
is created for ms = 0.
🪄 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: 4b38b736-cb78-4195-b8fc-505c15042211

📥 Commits

Reviewing files that changed from the base of the PR and between 76d6f2e and 9479fd9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • .changeset/date-solid2-migration.md
  • packages/date/README.md
  • packages/date/package.json
  • packages/date/src/primitives.ts
  • packages/date/src/types.ts
  • packages/date/test/date-difference.test.ts
  • packages/date/test/date-now.test.ts
  • packages/date/test/server.test.ts
  • packages/date/tsconfig.json
💤 Files with no reviewable changes (1)
  • packages/date/tsconfig.json

Comment thread packages/date/package.json Outdated
Comment thread packages/date/src/primitives.ts
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