Skip to content

fix: support prototype-named search keys - #839

Open
OskarEichler wants to merge 2 commits into
krisk:mainfrom
OskarEichler:codex/prototype-safe-key-maps
Open

OskarEichler wants to merge 2 commits into
krisk:mainfrom
OskarEichler:codex/prototype-safe-key-maps

Conversation

@OskarEichler

Copy link
Copy Markdown

Problem

Fuse stores configured key IDs in ordinary objects. A key named __proto__ therefore invokes the inherited prototype setter instead of recording its numeric index. Text searches can mask this because they scan every indexed field, but an object query for that configured key reads the wrong field and returns no match.

Fix

  • Use null-prototype objects for KeyStore and both FuseIndex key-map initializations.
  • Add a public object-query regression for an own __proto__ data field.
  • Rebuild the committed distributions.

No behavior changes for ordinary key names.

Verification

  • Full suite: 22 files and 450 tests passed.
  • ESLint and TypeScript checks passed.
  • All package distributions rebuilt successfully.
  • Changed files pass Prettier and git diff --check.
  • The repository-wide format command still encounters its existing parser failure on import-assertion syntax in three untouched tests; no affected file has a formatting error.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant