Skip to content

fix(store): preserve class accessor precedence in createMutable - #4703

Merged
ryansolid merged 3 commits into
solidjs:mainfrom
wozhenbang2004:patch-1
Nov 10, 2026
Merged

ryansolid merged 3 commits into
solidjs:mainfrom
wozhenbang2004:patch-1

Conversation

@wozhenbang2004

Copy link
Copy Markdown
Contributor

Summary

createMutable collects class descriptors from derived prototypes toward ancestors. Overwriting previously collected descriptors can replace an overridden or own property with an ancestor accessor.

Preserve the first descriptor for each property while retaining key collection and proxy binding. Add regressions for derived getters/setters, instance accessors and instance data properties, plus a patch changeset.

How did you test this change?

  • pnpm run build — all 4 workspace tasks passed.
  • pnpm run test — all 7 tasks passed, including 495 client tests, 18 server tests and the TypeScript tests.
  • pnpm run coverage — all 495 client tests passed.
  • pnpm exec prettier --check packages/solid/store/src/mutable.ts packages/solid/store/test/mutable.spec.ts .changeset/retain-mutable-class-descriptors.md — passed.

The three new regressions failed against unmodified bc50fe5 and passed with this fix.

Retain the nearest descriptor while walking class prototypes so ancestor accessors cannot replace derived or own properties.
Check derived accessors, instance accessors and own data properties, including reactive reads and derived setters.
Record the store bug fix as a patch release.
@changeset-bot

changeset-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 595ae87

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

This PR includes changesets to release 2 packages
Name Type
solid-js Patch
test-integration Patch

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

@ryansolid ryansolid added the 1.x label Nov 6, 2026
@ryansolid
ryansolid merged commit f24b303 into solidjs:main Nov 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants