[draft] fix syntax highlighting for nullish coalescing #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bugfix
What is the current behavior?
Issue: codesandbox#5587
What is the new behavior?
What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.
??
operatorChecklist
Notes
The files now contain updated regexes for
ternary-expression.begin
andkeyword.operator.logical.tsx
. According to microsoft/TypeScript-TmLanguage#768, these are the two syntax rules that are affected by the nullish coalescing operator syntax.standalone-packages/vscode-extensions/out/bundles/main.min.json
: deleted the file, ran the app in development mode, loaded the app in the browser and grabbed the entirety ofglobal.fileReads
through the browser js console, and minified the json using an online tool, and re-created the filevscode-extensions/v17 -> vscode-extensions/v18, vscode31 -> vscode32
(applying a global find/replace on the codebase, including minified files)Caveats
microsoft/TypeScript-TmLanguage
and automatically pull the files from a remote, which is why I just "applied the diff" manuallyinformation_for_contributors
field of some of these tm files, which refer to specific commits like microsoft/TypeScript-TmLanguage@84238ef; guidance here would be appreciatednpm run update-grammars
script referenced in https://github.com/codesandbox/codesandbox-client/tree/master/standalone-packages/vscode-extensions/out/extensions/typescript-basics/syntaxes no longer exists, but it appears that it would be capable of pulling the latest version from the upstream Microsoft/Typescript-TmLanguage repo. I noticed thatbuilds
is gitignored; perhaps that's why I couldn't find the scripts?