@pob/sort-pkg 4.0.0 → 4.0.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/.eslintrc.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "root": true,
3
- "extends": ["@pob/eslint-config/root-commonjs"]
3
+ "extends": ["@pob/eslint-config/root-module"]
4
4
  }
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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
+ ## [4.0.1](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@4.0.0...@pob/sort-pkg@4.0.1) (2021-12-12)
7
+
8
+
9
+ ### Reverts
10
+
11
+ * fix: go back to commonjs modules for yarn pnp compatibility ([4e943b6](https://github.com/christophehurpeau/pob/commit/4e943b65ac843b6900aa4f86294f13b8fb18a0e8))
12
+
13
+
14
+
15
+
16
+
6
17
  # [4.0.0](https://github.com/christophehurpeau/pob/compare/@pob/sort-pkg@3.3.0...@pob/sort-pkg@4.0.0) (2021-12-11)
7
18
 
8
19
 
@@ -1,4 +1,20 @@
1
1
  {
2
2
  "root": true,
3
- "extends": ["@pob/eslint-config/node-commonjs"]
3
+ "extends": ["@pob/eslint-config/node-module"],
4
+ "overrides": [
5
+ {
6
+ "files": ["**/*.test.{cjs,js}", "__tests__/**/*.{cjs,js}"],
7
+ "env": {
8
+ "jest": true
9
+ },
10
+ "rules": {
11
+ "import/no-extraneous-dependencies": [
12
+ "error",
13
+ {
14
+ "devDependencies": true
15
+ }
16
+ ]
17
+ }
18
+ }
19
+ ]
4
20
  }
package/lib/index.js CHANGED
@@ -1,10 +1,8 @@
1
1
  /* eslint-disable complexity */
2
2
 
3
- 'use strict';
3
+ import sortObject from '@pob/sort-object';
4
4
 
5
- const sortObject = require('@pob/sort-object');
6
-
7
- module.exports = function sortPkg(pkg) {
5
+ export default function sortPkg(pkg) {
8
6
  sortObject(pkg, [
9
7
  'name',
10
8
  'private',
@@ -91,4 +89,4 @@ module.exports = function sortPkg(pkg) {
91
89
  if (pkg.optionalDependencies) sortObject(pkg.optionalDependencies);
92
90
 
93
91
  return pkg;
94
- };
92
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/sort-pkg",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "sort package.json",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
@@ -11,7 +11,7 @@
11
11
  "directory": "@pob/sort-pkg"
12
12
  },
13
13
  "homepage": "https://github.com/christophehurpeau/pob",
14
- "type": "commonjs",
14
+ "type": "module",
15
15
  "engines": {
16
16
  "node": "^14.13.1 || >=16.0.0"
17
17
  },
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "pob": {},
37
37
  "dependencies": {
38
- "@pob/sort-object": "^4.0.0"
38
+ "@pob/sort-object": "^4.0.1"
39
39
  },
40
- "gitHead": "eec3c30b83fbb8d9dd9caa947c6c64977dd14403"
40
+ "gitHead": "c4e9e72111816af56f3303a4c04988011428b06e"
41
41
  }