@pob/sort-pkg 7.1.0 → 7.2.0
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 +53 -0
- package/README.md +3 -3
- package/lib/index.js +62 -61
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,59 @@
|
|
|
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.2.0](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@7.1.1...@pob/sort-pkg@7.2.0) (2024-06-07)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* **deps:** use async prettier or prettier/sync
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add package yarn-version ([e2e8be6](https://github.com/christophehurpeau/pob/commit/e2e8be65fd50f9084c519fd07503748a1d970509))
|
|
15
|
+
* **deps:** update @pob/eslint-config to v56 (major) ([#2036](https://github.com/christophehurpeau/pob/issues/2036)) ([b26302b](https://github.com/christophehurpeau/pob/commit/b26302bd6dbf9bf4da2e97238c59ae80282ad9a4))
|
|
16
|
+
* **deps:** update dependency @rollup/plugin-run to v3.1.0 ([#2079](https://github.com/christophehurpeau/pob/issues/2079)) ([c2ef4fa](https://github.com/christophehurpeau/pob/commit/c2ef4fa22322952dcb626a5d99bc16e141684cd0))
|
|
17
|
+
* **deps:** update dependency conventional-changelog-conventionalcommits to v8 ([#2033](https://github.com/christophehurpeau/pob/issues/2033)) ([e7a568e](https://github.com/christophehurpeau/pob/commit/e7a568e4fabea00955bc6f005d85088f947f58cb))
|
|
18
|
+
* **deps:** update dependency esbuild to v0.21.0 ([#2040](https://github.com/christophehurpeau/pob/issues/2040)) ([dc252dc](https://github.com/christophehurpeau/pob/commit/dc252dc815dd450e2687e3f5784c3604bcfbab3c))
|
|
19
|
+
* **deps:** update dependency glob to v10.4.0 ([#2061](https://github.com/christophehurpeau/pob/issues/2061)) ([05dd06f](https://github.com/christophehurpeau/pob/commit/05dd06f1fb51d3cff0b95d6457fb9060d5d2db29))
|
|
20
|
+
* **deps:** update dependency prettier to v3 ([#1698](https://github.com/christophehurpeau/pob/issues/1698)) ([a65e641](https://github.com/christophehurpeau/pob/commit/a65e6418d4b80680b753a773b02925603df8ea12))
|
|
21
|
+
* **deps:** update dependency prettier to v3.3.0 ([#2071](https://github.com/christophehurpeau/pob/issues/2071)) ([04f24c3](https://github.com/christophehurpeau/pob/commit/04f24c33fcab0472cc830675696c219ee5ba14f9))
|
|
22
|
+
* **deps:** update dependency yeoman-generator to v7.2.0 ([#2063](https://github.com/christophehurpeau/pob/issues/2063)) ([a5b8748](https://github.com/christophehurpeau/pob/commit/a5b8748fecedff6291475656672feb1766c60e5f))
|
|
23
|
+
* migrate pob.babelEnvs to pob.envs + pob.bundler ([6baa9bb](https://github.com/christophehurpeau/pob/commit/6baa9bb986a1321beefcf9de3de566c285e548d1))
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* commit build of yarn-version ([539f4b2](https://github.com/christophehurpeau/pob/commit/539f4b2e12d8df4dc5cec272a24343721f4d2bdb))
|
|
28
|
+
* **deps:** update dependency esbuild to v0.21.1 ([#2042](https://github.com/christophehurpeau/pob/issues/2042)) ([2c47629](https://github.com/christophehurpeau/pob/commit/2c476296d1ecabaf272461df0901786bcea07aab))
|
|
29
|
+
* **deps:** update dependency esbuild to v0.21.2 ([#2051](https://github.com/christophehurpeau/pob/issues/2051)) ([8e8596f](https://github.com/christophehurpeau/pob/commit/8e8596f11350ee7e152ebec5603295edea8e6da7))
|
|
30
|
+
* **deps:** update dependency esbuild to v0.21.3 ([#2055](https://github.com/christophehurpeau/pob/issues/2055)) ([f27179c](https://github.com/christophehurpeau/pob/commit/f27179c5d6f4259a2885ee9097cf857b73849cef))
|
|
31
|
+
* **deps:** update dependency esbuild to v0.21.4 ([#2065](https://github.com/christophehurpeau/pob/issues/2065)) ([984e479](https://github.com/christophehurpeau/pob/commit/984e479c1958c224bc584936c13908578563e29d))
|
|
32
|
+
* **deps:** update dependency glob to v10.3.14 ([#2047](https://github.com/christophehurpeau/pob/issues/2047)) ([201fff2](https://github.com/christophehurpeau/pob/commit/201fff2e3def4a8c7344af403464e7bf16eb44bc))
|
|
33
|
+
* **deps:** update dependency glob to v10.3.15 ([#2050](https://github.com/christophehurpeau/pob/issues/2050)) ([8142969](https://github.com/christophehurpeau/pob/commit/8142969c29cda5fb5f8cf924522fd719ac0278d7))
|
|
34
|
+
* **deps:** update dependency glob to v10.3.16 ([#2056](https://github.com/christophehurpeau/pob/issues/2056)) ([d5ce7c0](https://github.com/christophehurpeau/pob/commit/d5ce7c0922a93a188250eb5e6a5eb8b14ac76630))
|
|
35
|
+
* **deps:** update dependency glob to v10.4.1 ([#2062](https://github.com/christophehurpeau/pob/issues/2062)) ([c9eb614](https://github.com/christophehurpeau/pob/commit/c9eb614f8b0906bf4757bb21ed2bed570dbf55c4))
|
|
36
|
+
* **deps:** update dependency lint-staged to v15.2.4 ([#2057](https://github.com/christophehurpeau/pob/issues/2057)) ([3266770](https://github.com/christophehurpeau/pob/commit/3266770fc90c82ccc25cd0bce67106063cf38b51))
|
|
37
|
+
* **deps:** update dependency lint-staged to v15.2.5 ([#2066](https://github.com/christophehurpeau/pob/issues/2066)) ([0c5396b](https://github.com/christophehurpeau/pob/commit/0c5396b73c9a99e37964c9752f2f55b4079f888e))
|
|
38
|
+
* **deps:** update dependency mem-fs-editor to v11.0.1 ([#2060](https://github.com/christophehurpeau/pob/issues/2060)) ([a4824cb](https://github.com/christophehurpeau/pob/commit/a4824cb89b8d94846ac7eb4ca062a500cadcc606))
|
|
39
|
+
* **deps:** update dependency prettier to v3.3.1 ([#2078](https://github.com/christophehurpeau/pob/issues/2078)) ([57ecb30](https://github.com/christophehurpeau/pob/commit/57ecb301bc6dded8e9063c1e3afc9f6f04d023b1))
|
|
40
|
+
* **deps:** update dependency semver to v7.6.1 ([#2041](https://github.com/christophehurpeau/pob/issues/2041)) ([17b20a3](https://github.com/christophehurpeau/pob/commit/17b20a3a352e4fbcda88d2e43938a8dbafe0667c))
|
|
41
|
+
* **deps:** update dependency semver to v7.6.2 ([#2048](https://github.com/christophehurpeau/pob/issues/2048)) ([e4a50f3](https://github.com/christophehurpeau/pob/commit/e4a50f3c11b87306ed30ec0cbcdd8f6f23a4ac75))
|
|
42
|
+
* **deps:** update dependency yeoman-environment to v4.4.1 ([#2073](https://github.com/christophehurpeau/pob/issues/2073)) ([528734e](https://github.com/christophehurpeau/pob/commit/528734e27f1f0b59ab5f5d87ff98e95385168b72))
|
|
43
|
+
* **deps:** update yarn monorepo ([#2045](https://github.com/christophehurpeau/pob/issues/2045)) ([bfce168](https://github.com/christophehurpeau/pob/commit/bfce1680e6df15f6a57e83fefc39e1257bf8f6e3))
|
|
44
|
+
* fix for CommonTestingGenerator ([e7f93df](https://github.com/christophehurpeau/pob/commit/e7f93df65007fe8a6e5faac6fd3d796adf6d3233))
|
|
45
|
+
* fix yarn-version command ([87e25ca](https://github.com/christophehurpeau/pob/commit/87e25cae86d3730f14e50e6370efe69bd2e21814))
|
|
46
|
+
* **pob:** leave default compressionLevel config ([3d4c5d1](https://github.com/christophehurpeau/pob/commit/3d4c5d1e92ec1194dec99e768c2743e085c1fa94))
|
|
47
|
+
* **pob:** missing await ([f91682b](https://github.com/christophehurpeau/pob/commit/f91682b72016733065d7d505c6be5d4fddad25d8))
|
|
48
|
+
* update json5 ([4034c94](https://github.com/christophehurpeau/pob/commit/4034c947a1111021ee037144cefbee0cd39b9d33))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## [7.1.1](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@7.1.0...@pob/sort-pkg@7.1.1) (2024-05-05)
|
|
53
|
+
|
|
54
|
+
Note: no notable changes
|
|
55
|
+
|
|
56
|
+
Version bump for dependency: sort-object
|
|
57
|
+
|
|
58
|
+
|
|
6
59
|
## [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
60
|
|
|
8
61
|
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,81 +1,82 @@
|
|
|
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
|
+
if (pkg.pob) sortObject(pkg.pob);
|
|
79
80
|
if (pkg.scripts) sortObject(pkg.scripts);
|
|
80
81
|
if (pkg.overrides) sortObject(pkg.overrides);
|
|
81
82
|
if (pkg.overridesExplained) sortObject(pkg.overridesExplained);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/sort-pkg",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
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
|
}
|