-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
refactor(core): detect if codegen should quote property without using eval() #8045
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Size Change: 0 B Total Size: 813 kB ℹ️ View Unchanged
|
})(propName); | ||
// Escape quotes as well | ||
const key = shouldQuote ? JSON.stringify(propName) : propName; | ||
const isIdentifier = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the test 😅 not really confident it works here, but it looks like it does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have decent tests for this, plus this is a direct translation of the spec, so I won't worry about it too much.
… eval() (#8045) refactor(core): detect if should quote property when codegen without using eval()
Pre-flight checklist
Motivation
Split out from #7993
Test Plan
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs