upgrade: range package upgrade for Solid 2.0#912
Conversation
🦋 Changeset detectedLatest commit: deb876c 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 |
|
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
🧹 Nitpick comments (1)
packages/range/README.md (1)
53-53: 💤 Low valueFix heading level increment.
The
#### Definitionheading (h4) follows## \createNumericRange`` (h2), skipping h3. Markdown heading levels should increment by one.📝 Proposed fix
-#### Definition +### DefinitionApply the same fix to other
#### Definitionheadings at lines 77, 130, 159, 214, 250, and 304.🤖 Prompt for 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. In `@packages/range/README.md` at line 53, The README uses a level-4 heading "#### Definition" immediately after the level-2 heading "## `createNumericRange`", skipping h3; update the heading levels so they increment by one (change each "#### Definition" that directly follows a "## ..." section to "### Definition") and apply the same fix to the other occurrences of "#### Definition" noted in the file (any "#### Definition" headings that should be a subheading of the preceding "## ..." section).
🤖 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 @.changeset/range-solid2-migration.md:
- Line 16: The changeset text incorrectly marks both repeat and <Repeat> as
deprecated; update the sentence so only <Repeat> is described as deprecated
while making clear that the repeat primitive remains supported for incremental
child creation/disposal (keep the pointer to the README for migration guidance).
Locate the sentence that mentions both "repeat" and "<Repeat>" and rewrite it to
deprecate only "<Repeat>" and explicitly state that "repeat" continues to be
supported for cases requiring incremental child creation/disposal.
In `@packages/range/README.md`:
- Line 15: The TOC entry for `<Repeat>` points to `#repeat-1` which doesn't
match the actual heading `## \`<Repeat>\` ⚠️ Deprecated` (which GitHub will turn
into a different fragment); fix by either updating the TOC link to the actual
fragment for that heading or change the heading to a predictable fragment (e.g.,
`## \`<Repeat>\`` or `## Repeat — Deprecated` removing the emoji/extra
characters) and keep the deprecation note in the section body so the anchor
becomes `#repeat` (or update the link to the exact generated fragment) to
restore the broken link.
---
Nitpick comments:
In `@packages/range/README.md`:
- Line 53: The README uses a level-4 heading "#### Definition" immediately after
the level-2 heading "## `createNumericRange`", skipping h3; update the heading
levels so they increment by one (change each "#### Definition" that directly
follows a "## ..." section to "### Definition") and apply the same fix to the
other occurrences of "#### Definition" noted in the file (any "#### Definition"
headings that should be a subheading of the preceding "## ..." section).
🪄 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: d788ff95-5a4b-45a8-a147-75dc7f2bc528
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (13)
.changeset/range-solid2-migration.mdpackages/range/README.mdpackages/range/package.jsonpackages/range/src/createNumericRange.tspackages/range/src/index.tspackages/range/src/indexRange.tspackages/range/src/mapRange.tspackages/range/src/repeat.tspackages/range/test/createNumericRange.test.tspackages/range/test/indexRange.test.tspackages/range/test/mapRange.test.tspackages/range/test/repeat.test.tspackages/range/test/server.test.ts
Solid 2.0 compatibility**
solid-js@^2.0.0-beta.13and@solidjs/web@^2.0.0-beta.13isServerandJSXtypes now imported from@solidjs/webindexRangeinternal signals markedownedWrite: trueviaINTERNAL_OPTIONS— required because their setters are called from insidecreateMemo(theIndexRangecomponent wrapper), which is an owned scope in Solid 2.0Test suite updates
createComputed(removed in 2.0) replaced with split-formcreateEffectcreateRootto avoidSIGNAL_WRITE_IN_OWNED_SCOPE—createRootis now an owned scope in beta.13flush()added after signal writes, and again aftermapped()calls inindexRangetests (internal setter writes are batched)test/server.test.tsadded<Repeat>deprecation<Repeat>is marked@deprecatedin favour of the built-in<Repeat count={n}>from@solidjs/web. The README documents the migration path including the fallback and offset patterns. The underlyingrepeatprimitive is not deprecated — it has unique incremental diffing behaviour the built-in lacks.New:
createNumericRangeA reactive number array generator modelled on Python's
range():Built on
mapRangewith the identity function, so it inherits incremental diffing. Designed as the idiomatic companion to Solid 2.0's built-in<For>.Summary by CodeRabbit
New Features
createNumericRangehelper for creating reactive numeric arrays with flexible range parametersBreaking Changes
solid-jsand@solidjs/webv2.0.0-beta.13+<Repeat>component deprecated; use Solid's built-in<Repeat count={n}>insteadDocumentation