@pob/sort-pkg 6.2.0 → 7.1.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 CHANGED
@@ -3,6 +3,32 @@
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.0](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@7.0.0...@pob/sort-pkg@7.1.0) (2024-04-21)
7
+
8
+ Note: no notable changes
9
+
10
+
11
+
12
+
13
+ ## [7.0.0](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@6.2.0...@pob/sort-pkg@7.0.0) (2023-12-29)
14
+
15
+
16
+ ### ⚠ BREAKING CHANGES
17
+
18
+ * **@pob/sort-pkg:** resort fields and add some missing fields
19
+
20
+ ### Features
21
+
22
+ * **@pob/sort-pkg:** resort fields and add some missing fields ([4e4c521](https://github.com/christophehurpeau/pob/commit/4e4c5219cdf6dd65abf70a0d9fb5b564127cdf51))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * add missing authors field ([3d70b07](https://github.com/christophehurpeau/pob/commit/3d70b0793836d83200bffedfebbff48a86231a89))
28
+
29
+ Version bump for dependency: sort-object
30
+
31
+
6
32
  ## [6.2.0](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@6.1.0...@pob/sort-pkg@6.2.0) (2023-12-10)
7
33
 
8
34
 
package/lib/index.js CHANGED
@@ -4,27 +4,34 @@ import sortObject from '@pob/sort-object';
4
4
 
5
5
  export default function sortPkg(pkg) {
6
6
  sortObject(pkg, [
7
+ /* information on the package */
7
8
  'name',
8
9
  'private',
9
10
  'version',
10
11
  'description',
11
12
  'keywords',
12
13
  'author',
14
+ 'authors',
13
15
  'contributors',
14
16
  'license',
15
17
  'repository',
16
18
  'homepage',
17
19
  'bugs',
18
- 'preferGlobal',
20
+ /* package type */
19
21
  'type',
22
+ /* corepack */ 'packageManager',
23
+ /* package env and configuration */
20
24
  'engines',
21
25
  'engineStrict',
22
26
  'os',
23
27
  'cpu',
24
- /* yarn berry */ 'packageManager',
25
- 'publishConfig',
28
+ 'libc',
29
+ 'sideEffects',
30
+ 'config',
31
+ /* workspaces */
26
32
  'workspaces',
27
- 'browserslist',
33
+ /* exports */
34
+ 'bin',
28
35
  'main',
29
36
  'types',
30
37
  'typesVersions',
@@ -33,23 +40,29 @@ export default function sortPkg(pkg) {
33
40
  'browser',
34
41
  'browserify',
35
42
  'exports',
36
- 'sideEffects',
37
- 'config',
38
- 'style',
39
- 'bin',
43
+ 'style', // https://stackoverflow.com/questions/32037150/style-field-in-package-json
44
+ /* documentation */
40
45
  'man',
46
+ /* publish */
47
+ 'publishConfig',
41
48
  'directories',
42
49
  'files',
50
+ /* scripts */
43
51
  'scripts',
44
- 'husky',
45
- 'lint-staged',
52
+ /* dependencies configs */
46
53
  'babel',
47
- 'prettier',
54
+ 'browserslist',
48
55
  'commitlint',
49
56
  'eslintConfig',
50
- 'stylelint',
57
+ 'husky',
51
58
  'jest',
59
+ 'lint-staged',
52
60
  'pob',
61
+ 'prettier',
62
+ 'stylelint',
63
+ /* dependencies */
64
+ 'overrides',
65
+ 'overridesExplained',
53
66
  'resolutions',
54
67
  'resolutionsExplained',
55
68
  'peerDependencies',
@@ -64,6 +77,8 @@ export default function sortPkg(pkg) {
64
77
  ]);
65
78
 
66
79
  if (pkg.scripts) sortObject(pkg.scripts);
80
+ if (pkg.overrides) sortObject(pkg.overrides);
81
+ if (pkg.overridesExplained) sortObject(pkg.overridesExplained);
67
82
  if (pkg.resolutions) sortObject(pkg.resolutions);
68
83
  if (pkg.resolutionsExplained) sortObject(pkg.resolutionsExplained);
69
84
  if (pkg.peerDependencies) sortObject(pkg.peerDependencies);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/sort-pkg",
3
- "version": "6.2.0",
3
+ "version": "7.1.0",
4
4
  "description": "sort package.json",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
@@ -15,15 +15,15 @@
15
15
  "engines": {
16
16
  "node": ">=18.12.0"
17
17
  },
18
- "publishConfig": {
19
- "access": "public"
20
- },
18
+ "sideEffects": false,
21
19
  "main": "./lib/index.js",
22
20
  "exports": {
23
21
  ".": "./lib/index.js",
24
22
  "./package.json": "./package.json"
25
23
  },
26
- "sideEffects": false,
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
27
  "files": [
28
28
  "lib"
29
29
  ],
@@ -31,9 +31,9 @@
31
31
  "lint": "yarn run lint:eslint",
32
32
  "lint:eslint": "yarn ../.. run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet @pob/sort-pkg"
33
33
  },
34
- "prettier": "@pob/root/prettier-config",
35
34
  "pob": {},
35
+ "prettier": "@pob/root/prettier-config",
36
36
  "dependencies": {
37
- "@pob/sort-object": "6.2.0"
37
+ "@pob/sort-object": "6.3.0"
38
38
  }
39
39
  }