-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update well-known-symbols #59
Comments
@novemberborn sorry to nag, but might it make sense to resolve this before [email protected]? It looks to me like declaring a symbol well-known might be a breaking change for AVA. It would cause existing snapshot assertions containing the symbol to start failing. Have you considered dynamically determining whether a symbol is well-known, with something like: const wellKnownSymbols = new Set(
Reflect.ownKeys(Symbol)
.filter(key => typeof Symbol[key] === 'symbol')
.map(key => Symbol[key])
);
function isWellKnown(symbol) {
return wellKnownSymbols.has(symbol);
} |
No worries, it's a good point!
That could be interesting. I need to see how these symbols are serialized and how compatibility across JS versions is dealt with. Perhaps the logic can be adjusted so we can add well-known symbols without causing compatibility issues. |
@ninevra I've decided not to tackle this for AVA 4. I'm hoping I can do some work on this package to modernize it and if need be that'll be AVA 5. |
https://github.com/novemberborn/well-known-symbols/releases/tag/v3.0.0 adds
Symbol.matchAll
. I need to assess what that means for existing AVA snapshots that already include that symbol.The text was updated successfully, but these errors were encountered: