sveltejs / svelte · Issue No. 18600
Found while reviewing runtime complexity in packages/svelte/src alongside https://github.com/sveltejs/svelte/pull/18602.
packages/svelte/src/internal/client/reactivity/props.js:238-252includes while building ownKeysspread_props(...) listownKeys(target) {
const keys = [];
for (let p of target.props) {
// ...
for (const key in p) {
if (!keys.includes(key)) keys.push(key);
}
for (const key of Object.getOwnPropertySymbols(p)) {
if (!keys.includes(key)) keys.push(key);
}
}
return keys;
}
#18602 is a compile-time Map lookup fix. This is a separate runtime path and needs care around Proxy invariants and key order.
Build uniqueness with a Set (or object-as-set for strings + Set for symbols), then return Array.from(set). Preserve first-seen order if that is currently load-bearing.
Object.keys / Reflect.ownKeys on spread propsRelay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.