Skip to content

upgrade: selection package upgrade for Solid 2.0#895

Draft
davedbase wants to merge 1 commit into
solidjs-community:nextfrom
davedbase:update/v2/selection
Draft

upgrade: selection package upgrade for Solid 2.0#895
davedbase wants to merge 1 commit into
solidjs-community:nextfrom
davedbase:update/v2/selection

Conversation

@davedbase
Copy link
Copy Markdown
Member

src/index.ts`

  • isServer import moved from solid-js/web@solidjs/web
  • INTERNAL_OPTIONS imported from @solid-primitives/utils and applied to both internal signals so setSelection can be called from reactive scopes
  • The first createEffect (event listener setup with no reactive deps) was removed — listeners now register directly with onCleanup
  • The second createEffect (DOM apply) converted to the Solid 2.0 split pattern: createEffect(compute, apply)

package.json

  • solid-js bumped to 2.0.0-beta.10 (peer + dev)
  • @solidjs/web: 2.0.0-beta.10 added (peer + dev)
  • @solid-primitives/utils: workspace:^ added as a runtime dependency
  • @babel/core and babel-preset-solid@2.0.0-beta.10 added as devDeps
  • vitest script points to a local vitest.config.ts

vitest.config.ts (new)

  • Custom config using babel-preset-solid with moduleName: "@solidjs/web", mirroring the virtual package's approach to work around the vite-plugin-solid / Solid 2.0 incompatibility

test/index.test.tsx

  • render import from @solidjs/web; flush imported from solid-js
  • All 6 tests rewritten: synchronous, inside createRoot, using dispatchEvent + flush() in place of the old await createEffect(async () => {...}) pattern

test/server.test.ts (new) — SSR no-op verification

.changeset/selection-solid2-migration.md — major bump changeset

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

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: 479ba79

The changes in this PR will be included in the next version bump.

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 davedbase changed the title upgrade: selection packages upgrade for Solid 2.0 upgrade: selection package upgrade for Solid 2.0 May 12, 2026
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