upgrade: date package upgrade for Solid 2.0#870
Conversation
🦋 Changeset detectedLatest commit: 01fc319 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
# Conflicts: # packages/date/test/date-difference.test.ts
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
.changeset/date-solid2-migration.mdpackages/date/README.mdpackages/date/package.jsonpackages/date/src/primitives.tspackages/date/src/types.tspackages/date/test/date-difference.test.tspackages/date/test/date-now.test.tspackages/date/test/server.test.tspackages/date/tsconfig.json
💤 Files with no reviewable changes (1)
- packages/date/tsconfig.json
Bumps peer dependencies to
solid-js@^2.0.0-beta.10and@solidjs/web@^2.0.0-beta.10@solid-primitives/timerand@solid-primitives/memodeps; inlinesTimeoutSourcetypecreateDateNow— convertscreateEffectto the required split(compute, apply)two-argument formcreateCountdown— replaces removedcreateComputedwithcreateRenderEffect(compute, apply)createDate— replaces removedcreateWritableMemowithcreateSignal(fn)writable-computed overloadcreateStoreimport moved fromsolid-js/storetosolid-js;isServerimport moved to@solidjs/webflush()after signal writes (pull-based reactivity requires explicit flush outside tracking contexts), signals created outsidecreateRootto avoidSIGNAL_WRITE_IN_OWNED_SCOPEtest/server.test.tsfor SSR safety across all five primitivesSummary by CodeRabbit
New Features
Chores
@solidjs/web2.0-beta.10.Documentation