keithamus / sort-package-json

Sort an Object or package.json based on the well-known package.json keys
MIT License
790 stars 83 forks source link

chore: meta tweak #291

Closed aarondill closed 1 year ago

aarondill commented 1 year ago

This fix returns the output of npm run update-snapshot to the closest to the previous output as is possible. The new increased output of cli.js takes from the focus of the script by displaying multiple lines at the end regardless of the state of package.json, so this PR silences the cli, instead sorting the package in the background, potentially even without user awareness.

fisker commented 1 year ago

Maybe we should change

- node cli.js package.json
+ node cli.js \"package.json\"

To show user that better quote pattern/file s.

Because shell may expand glob pattern and get unexpected result.

aarondill commented 1 year ago

Maybe we should change

- node cli.js package.json
+ node cli.js \"package.json\"

To show user that better quote pattern/file s.

Because shell may expand glob pattern and get unexpected result.

I could change it to node cli.js 'package.json' (single quotes avoids need to escape them) if this concerns you

fisker commented 1 year ago

single quote doesn't work on windows.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 2.4.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: