-
Notifications
You must be signed in to change notification settings - Fork 135
Description
Describe the bug
For example, we have such a .vscode/settings.json and we run vp migrate while choose to merge VSCode config
It is actually a JSONC file but Vite+ will use JSON.parse to parse it and break the migration
Perhaps we need to change parser to jsonc when migrating editor's config, and it can bring jsonc-parser as a new dependency (It seems already availible in catalog but never use)
Reproduction
https://github.com/liangmiQwQ/vp-migrate-vscode
Steps to reproduce
Run pnpm run try in the repo
System Info
VITE+ - The Unified Toolchain for the Web
Environment:
Version 24.14.0
Source default
Source Path /Users/liangmi/.vite-plus/config.json
Tool Paths:
node /Users/liangmi/.vite-plus/js_runtime/node/24.14.0/bin/node
npm /Users/liangmi/.vite-plus/js_runtime/node/24.14.0/bin/npm
npx /Users/liangmi/.vite-plus/js_runtime/node/24.14.0/bin/npxUsed Package Manager
pnpm
Logs
Expected property name or '}' in JSON at position 4 (line 2 column 3)
SyntaxError: Expected property name or '}' in JSON at position 4 (line 2 column 3)
at JSON.parse (<anonymous>)
at readJsonFile (file:///Users/liangmi/code/vite-plus/packages/cli/dist/global/json-Dglt0cMI.js:125:14)
at mergeAndWriteEditorConfig (file:///Users/liangmi/code/vite-plus/packages/cli/dist/global/workspace-CHw21TZm.js:2825:45)
at writeEditorConfigs (file:///Users/liangmi/code/vite-plus/packages/cli/dist/global/workspace-CHw21TZm.js:2816:36)
at async executeMigrationPlan (file:///Users/liangmi/code/vite-plus/packages/cli/dist/global/migrate.js:409:2)
at async main (file:///Users/liangmi/code/vite-plus/packages/cli/dist/global/migrate.js:489:17)
■ Canceled (0s)Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackPriority
None yet
Effort
None yet
{ // THERE IS A COMMENT "git.enableCommitSigning": true, }