upgrade: pagination package upgrade for Solid 2.0#871
Conversation
🦋 Changeset detectedLatest commit: 3277cfa 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: 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/pagination/src/index.ts`:
- Around line 398-403: The Promise returned by fetcher(currentPage) can reject
and leaves fetching stuck true; wrap the call so rejections are handled (use
.catch(...) or try/catch and a .finally) and always call setFetching(false) even
on error, while preserving the cancelled check and existing behavior for empty
content (use the same symbols: fetcher, currentPage, cancelled, setEnd,
setPages, setFetching); optionally log the error or setEnd(true) on fatal
failures to avoid deadlock and prevent unhandled rejections.
🪄 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: 3fed58dc-f439-4b4c-a4ff-813e3104b0b7
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
.changeset/pagination-solid2-migration.mdpackages/pagination/README.mdpackages/pagination/package.jsonpackages/pagination/src/index.tspackages/pagination/test/index.test.tspackages/pagination/test/server.test.ts
# Conflicts: # packages/pagination/test/index.test.ts # pnpm-lock.yaml
Migrate
@solid-primitives/paginationto Solid.js v2.0 beta.10. ReplacescreateResource(removed) with a manual fetch + cancellation effect, replacescreateComputed(removed) with a derived memo for page clamping, movesisServerto@solidjs/web, and removesbatch().Summary by CodeRabbit
Release Notes
Breaking Changes
@solidjs/webpeer dependencycreateInfiniteScrollno longer exposespages.loadingandpages.errorpropertiesisServermust now be imported from@solidjs/webcreateInfiniteScrollreturn type:loaderis now a ref function instead of a directiveDocumentation