Skip to content
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

Show diff after sorting #48

Open
muuvmuuv opened this issue Oct 25, 2018 · 2 comments · May be fixed by #268
Open

Show diff after sorting #48

muuvmuuv opened this issue Oct 25, 2018 · 2 comments · May be fixed by #268

Comments

@muuvmuuv
Copy link

Would be nice to show the difference between the original and the formatted package.json.

https://www.npmjs.com/package/diff

@keithamus
Copy link
Owner

PRs welcome!

@miwashutaro0611
Copy link

@keithamus
Hi!
I would like to work on this issues, is that OK?

The following modifications are expected.
Is this a problem?

Sample Projects

$ tree
.
├── package-lock.json
├── package.json
├── project1
│   └── package.json
└── project2
    └── package.json

File Contents

package.json

{
  "name": "sort-pack-test-root",
  "version": "1.0.0",
  "description": "",
  "keywords": [],
  "license": "ISC",
  "author": "hoge <hoge@gmail.com> (https://github.com/hoge)",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "colors": "^1.4.0",
    "diff": "^5.1.0",
    "sort-package-json": "^1.57.0"
  }
}

project1/package.json

{
  "author": "hoge <hoge@gmail.com> (https://github.com/hoge)",
  "main": "index.js",
  "name": "sort-pack-test-project1",
  "version": "1.0.0",
  "description": "",
  "keywords": [],
  "license": "ISC",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  }
}

project2/package.json

{
  "name": "sort-pack-test-project2",
  "version": "1.0.0",
  "description": "",
  "keywords": [],
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "license": "ISC",
  "author": "hoge <hoge@gmail.com> (https://github.com/hoge)",
  "main": "index.js"
}

Result

diff-result.mov

@miwashutaro0611 miwashutaro0611 linked a pull request Sep 26, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants