@pob/sort-pkg 7.1.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +3 -3
- package/lib/index.js +61 -61
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.1.1](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@7.1.0...@pob/sort-pkg@7.1.1) (2024-05-05)
|
|
7
|
+
|
|
8
|
+
Note: no notable changes
|
|
9
|
+
|
|
10
|
+
Version bump for dependency: sort-object
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## [7.1.0](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@7.0.0...@pob/sort-pkg@7.1.0) (2024-04-21)
|
|
7
14
|
|
|
8
15
|
Note: no notable changes
|
package/README.md
CHANGED
|
@@ -22,10 +22,10 @@ npm install --save @pob/sort-pkg
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
24
|
```js
|
|
25
|
-
const fs = require(
|
|
26
|
-
const sortPkg = require(
|
|
25
|
+
const fs = require("fs");
|
|
26
|
+
const sortPkg = require("@pob/sort-pkg");
|
|
27
27
|
|
|
28
|
-
const pkg = JSON.parse(fs.readFileSync(
|
|
28
|
+
const pkg = JSON.parse(fs.readFileSync("package.json", "utf-8"));
|
|
29
29
|
sortPkg(pkg);
|
|
30
30
|
fs.writeFileSync(JSON.stringify(pkg, null, 2), pkg);
|
|
31
31
|
```
|
package/lib/index.js
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
/* eslint-disable complexity */
|
|
2
2
|
|
|
3
|
-
import sortObject from
|
|
3
|
+
import sortObject from "@pob/sort-object";
|
|
4
4
|
|
|
5
5
|
export default function sortPkg(pkg) {
|
|
6
6
|
sortObject(pkg, [
|
|
7
7
|
/* information on the package */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
"name",
|
|
9
|
+
"private",
|
|
10
|
+
"version",
|
|
11
|
+
"description",
|
|
12
|
+
"keywords",
|
|
13
|
+
"author",
|
|
14
|
+
"authors",
|
|
15
|
+
"contributors",
|
|
16
|
+
"license",
|
|
17
|
+
"repository",
|
|
18
|
+
"homepage",
|
|
19
|
+
"bugs",
|
|
20
20
|
/* package type */
|
|
21
|
-
|
|
22
|
-
/* corepack */
|
|
21
|
+
"type",
|
|
22
|
+
/* corepack */ "packageManager",
|
|
23
23
|
/* package env and configuration */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
"engines",
|
|
25
|
+
"engineStrict",
|
|
26
|
+
"os",
|
|
27
|
+
"cpu",
|
|
28
|
+
"libc",
|
|
29
|
+
"sideEffects",
|
|
30
|
+
"config",
|
|
31
31
|
/* workspaces */
|
|
32
|
-
|
|
32
|
+
"workspaces",
|
|
33
33
|
/* exports */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
"bin",
|
|
35
|
+
"main",
|
|
36
|
+
"types",
|
|
37
|
+
"typesVersions",
|
|
38
|
+
"jsnext:main",
|
|
39
|
+
"module",
|
|
40
|
+
"browser",
|
|
41
|
+
"browserify",
|
|
42
|
+
"exports",
|
|
43
|
+
"style", // https://stackoverflow.com/questions/32037150/style-field-in-package-json
|
|
44
44
|
/* documentation */
|
|
45
|
-
|
|
45
|
+
"man",
|
|
46
46
|
/* publish */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
"publishConfig",
|
|
48
|
+
"directories",
|
|
49
|
+
"files",
|
|
50
50
|
/* scripts */
|
|
51
|
-
|
|
51
|
+
"scripts",
|
|
52
52
|
/* dependencies configs */
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
"babel",
|
|
54
|
+
"browserslist",
|
|
55
|
+
"commitlint",
|
|
56
|
+
"eslintConfig",
|
|
57
|
+
"husky",
|
|
58
|
+
"jest",
|
|
59
|
+
"lint-staged",
|
|
60
|
+
"pob",
|
|
61
|
+
"prettier",
|
|
62
|
+
"stylelint",
|
|
63
63
|
/* dependencies */
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
"overrides",
|
|
65
|
+
"overridesExplained",
|
|
66
|
+
"resolutions",
|
|
67
|
+
"resolutionsExplained",
|
|
68
|
+
"peerDependencies",
|
|
69
|
+
"peerDependenciesMeta",
|
|
70
|
+
"devPeerDependencies",
|
|
71
|
+
"dependencies",
|
|
72
|
+
"devDependencies",
|
|
73
|
+
"dependenciesMeta",
|
|
74
|
+
"optionalDependencies",
|
|
75
|
+
"bundledDependencies",
|
|
76
|
+
"bundleDependencies",
|
|
77
77
|
]);
|
|
78
78
|
|
|
79
79
|
if (pkg.scripts) sortObject(pkg.scripts);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/sort-pkg",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"description": "sort package.json",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"pob": {},
|
|
35
35
|
"prettier": "@pob/root/prettier-config",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@pob/sort-object": "6.3.
|
|
37
|
+
"@pob/sort-object": "6.3.1"
|
|
38
38
|
}
|
|
39
39
|
}
|