-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(starter): fix up vscode settings merge 🐼 #7858
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
Conversation
🦋 Changeset detectedLatest commit: 1e4ab47 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
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.
Actually, the bug is on our side. The settings file is JSON5, meaning it supports comments, and we should parse it as such. We can use https://www.npmjs.com/package/json5-writer to handle json files in a way that preserves comments.
8e8bfe2
to
c5a53ec
Compare
Fixed |
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.
JSON5.parse is working fine but it's stripping the comments 🤔
On the other hand it is solving the main issue
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.
with @croct/json5-parser is working better and it's keeping the comments too.
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.
Close #5280
base/.vscode/settings.json is a JSON5 file, we need to use json5 lib to parse it.
Right now we have an error because in the Qwik CLI, we're trying to parse that file with JSON.parse; this will fallback to the catch branch and overwrite the entire file.