sort-package-json
Advanced tools
Comparing version 2.10.1 to 2.10.2
#!/usr/bin/env node | ||
import { globbySync } from 'globby' | ||
import { globSync } from 'tinyglobby' | ||
import fs from 'node:fs' | ||
@@ -47,3 +47,3 @@ import getStdin from 'get-stdin' | ||
function sortPackageJsonFiles(patterns, options) { | ||
const files = globbySync(patterns) | ||
const files = globSync(patterns) | ||
const reporter = new Reporter(files, options) | ||
@@ -50,0 +50,0 @@ const { isCheck } = options |
@@ -80,3 +80,3 @@ import sortObjectKeys from 'sort-object-keys' | ||
if (aName !== bName) { | ||
return aName.localeCompare(bName) | ||
return aName.localeCompare(bName, 'en') | ||
} | ||
@@ -83,0 +83,0 @@ if (!aRange) { |
{ | ||
"name": "sort-package-json", | ||
"version": "2.10.1", | ||
"version": "2.10.2", | ||
"description": "Sort an Object or package.json based on the well-known package.json keys", | ||
@@ -74,6 +74,6 @@ "keywords": [ | ||
"git-hooks-list": "^3.0.0", | ||
"globby": "^13.1.2", | ||
"is-plain-obj": "^4.1.0", | ||
"semver": "^7.6.0", | ||
"sort-object-keys": "^1.1.3" | ||
"sort-object-keys": "^1.1.3", | ||
"tinyglobby": "^0.2.9" | ||
}, | ||
@@ -80,0 +80,0 @@ "devDependencies": { |
@@ -100,2 +100,8 @@ # Sort Package.json | ||
This can, for instance, be used to generate a diff before changing `package.json`. | ||
```bash | ||
$ ( PKG="./package.json" ; cat "${PKG?}" | sort-package-json --stdin | diff "${PKG?}" - ; ) | ||
``` | ||
## API | ||
@@ -102,0 +108,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33536
426
+ Addedtinyglobby@^0.2.9
+ Addedfdir@6.4.2(transitive)
+ Addedpicomatch@4.0.2(transitive)
+ Addedtinyglobby@0.2.10(transitive)
- Removedglobby@^13.1.2
- Removed@nodelib/fs.scandir@2.1.5(transitive)
- Removed@nodelib/fs.stat@2.0.5(transitive)
- Removed@nodelib/fs.walk@1.2.8(transitive)
- Removedbraces@3.0.3(transitive)
- Removeddir-glob@3.0.1(transitive)
- Removedfast-glob@3.3.3(transitive)
- Removedfastq@1.18.0(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedglobby@13.2.2(transitive)
- Removedignore@5.3.2(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedmerge2@1.4.1(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedpath-type@4.0.0(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedqueue-microtask@1.2.3(transitive)
- Removedreusify@1.0.4(transitive)
- Removedrun-parallel@1.2.0(transitive)
- Removedslash@4.0.0(transitive)
- Removedto-regex-range@5.0.1(transitive)