richie5um / vscode-sort-json

VSCode Extension to Sort JSON objects
https://marketplace.visualstudio.com/items?itemName=richie5um2.vscode-sort-json
MIT License
110 stars 19 forks source link

Cannot sort setting.json (VSCode Settings) v1.19.1 #45

Closed chavyleung closed 3 years ago

chavyleung commented 3 years ago

But it works well under 1.19.0

jamesfancy commented 3 years ago

Cannot sort other json yet.

singularitti commented 3 years ago

Same here!

VSCode: Version: 1.52.1 Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523 Date: 2020-12-16T16:30:02.420Z Electron: 9.3.5 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Darwin x64 20.2.0

arosh commented 3 years ago

I am having a similar problem in my environment.

Previously, when I ran "Sort JSON" without selecting any text, the entire settings.json was sorted, but now it does not work. If I select the entire text and then run "Sort JSON", it works.

richie5um commented 3 years ago

Sorry everyone, I’ll take a look.

Tatsh commented 3 years ago

I get this error in the console:

[Extension Host] TypeError: Cannot read property 'includes' of undefined    
at sortActiveSelectionInternal (/Users/andrew.udvare/.vscode/extensions/richie5um2.vscode-sort-json-1.19.1/lib/sort-json.js:116:28)
    at sortActiveSelection (/Users/andrew.udvare/.vscode/extensions/richie5um2.vscode-sort-json-1.19.1/lib/sort-json.js:72:13)
    at _executeContributedCommand (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:701:220)    
at _.$executeContributedCommand (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:701:595)    
at m._doInvokeHandler (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:892:926)    
at m._invokeHandler (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:892:618)    
at m._receiveRequest (/Applications/MacPorts/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:891:252)    ...
Tatsh commented 3 years ago

Selecting then sorting works.