@pob/root 5.6.1 → 5.8.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,62 @@
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
+ # [5.8.0](https://github.com/christophehurpeau/pob/compare/@pob/root@5.7.2...@pob/root@5.8.0) (2021-11-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **deps:** update dependency lint-staged to v12.0.3 ([#1107](https://github.com/christophehurpeau/pob/issues/1107)) ([b86a68f](https://github.com/christophehurpeau/pob/commit/b86a68fb7ad45cf231a1ed975df7ee83c65f517e))
12
+ * **deps:** update dependency lint-staged to v12.1.2 ([#1112](https://github.com/christophehurpeau/pob/issues/1112)) ([8be59f6](https://github.com/christophehurpeau/pob/commit/8be59f604f2b1b93e9859c966cf8f34b7cbe3d74))
13
+
14
+
15
+ ### Features
16
+
17
+ * **deps:** update dependency lint-staged to v12.1.1 ([#1110](https://github.com/christophehurpeau/pob/issues/1110)) ([1b6d958](https://github.com/christophehurpeau/pob/commit/1b6d958089f85f5ad1bf6bfadec272f86e99d618))
18
+
19
+
20
+
21
+
22
+
23
+ ## [5.7.2](https://github.com/christophehurpeau/pob/compare/@pob/root@5.7.1...@pob/root@5.7.2) (2021-11-14)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **@pob/root:** export ./createLintStagedConfig ([2c39f36](https://github.com/christophehurpeau/pob/commit/2c39f3671c9c38aac3d4b60b885624532531af9c))
29
+
30
+
31
+
32
+
33
+
34
+ ## [5.7.1](https://github.com/christophehurpeau/pob/compare/@pob/root@5.7.0...@pob/root@5.7.1) (2021-11-14)
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * **@pob/root:** export createLintStagedConfig ([f329521](https://github.com/christophehurpeau/pob/commit/f329521adc5537881635d4401010f6a9bb175dfd))
40
+
41
+
42
+
43
+
44
+
45
+ # [5.7.0](https://github.com/christophehurpeau/pob/compare/@pob/root@5.6.1...@pob/root@5.7.0) (2021-11-14)
46
+
47
+
48
+ ### Bug Fixes
49
+
50
+ * **@pob/root:** lint-staged bin ([c3fb251](https://github.com/christophehurpeau/pob/commit/c3fb251ac3fee9080a056c144702b87cdf86b8f1))
51
+
52
+
53
+ ### Features
54
+
55
+ * **@pob/root:** use husky script ([7a668c2](https://github.com/christophehurpeau/pob/commit/7a668c280101dca57198a10d73321df7135b03fb))
56
+ * **deps:** update dependency lint-staged to v12 ([#1098](https://github.com/christophehurpeau/pob/issues/1098)) ([70e9712](https://github.com/christophehurpeau/pob/commit/70e97125201a969c3b4040ee0966869c4fa47dad))
57
+
58
+
59
+
60
+
61
+
6
62
  ## [5.6.1](https://github.com/christophehurpeau/pob/compare/@pob/root@5.6.0...@pob/root@5.6.1) (2021-11-11)
7
63
 
8
64
 
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+
3
+ // eslint-disable-next-line import/no-unresolved
4
+ import lintStaged from 'lint-staged';
5
+
6
+ // const path = require('path');
7
+ // const pkg = require('lint-staged/package.json');
8
+
9
+ // // eslint-disable-next-line import/no-dynamic-require
10
+ // require(path.join(
11
+ // 'lint-staged',
12
+ // typeof pkg.bin === 'string' ? pkg.bin : pkg.bin['lint-staged'],
13
+ // ));
14
+
15
+ lintStaged({
16
+ concurrent: true,
17
+ relative: true,
18
+ });
@@ -25,9 +25,13 @@ const ensureHuskyNotInDevDependencies = (pkg) => {
25
25
  };
26
26
 
27
27
  const writeHook = (hookName, hookContent) => {
28
- fs.writeFileSync(path.resolve(`.husky/${hookName}`), `${hookContent}\n`, {
29
- mode: '755',
30
- });
28
+ fs.writeFileSync(
29
+ path.resolve(`.husky/${hookName}`),
30
+ `#!/usr/bin/env sh\n. "$(dirname "$0")/_/husky.sh"\n\n${hookContent.trim()}\n`,
31
+ {
32
+ mode: '755',
33
+ },
34
+ );
31
35
  };
32
36
 
33
37
  const ensureHookDeleted = (hookName) => {
@@ -67,7 +71,7 @@ module.exports = function installHusky({ pkg, pm }) {
67
71
  const pmExec = pm.name === 'npm' ? 'npx --no-install' : pm.name;
68
72
 
69
73
  writeHook('commit-msg', `${pmExec} commitlint --edit $1`);
70
- writeHook('pre-commit', `${pmExec} lint-staged -r`);
74
+ writeHook('pre-commit', `${pmExec} pob-root-lint-staged`);
71
75
 
72
76
  if (isYarnPnp) {
73
77
  ensureHookDeleted('post-checkout');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/root",
3
- "version": "5.6.1",
3
+ "version": "5.8.0",
4
4
  "description": "root package",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
@@ -21,12 +21,14 @@
21
21
  "main": "./lib/index.js",
22
22
  "exports": {
23
23
  ".": "./lib/index.js",
24
+ "./createLintStagedConfig": "./createLintStagedConfig.js",
25
+ "./createLintStagedConfig.js": "./createLintStagedConfig.js",
24
26
  "./package.json": "./package.json"
25
27
  },
26
28
  "sideEffects": false,
27
29
  "bin": {
28
30
  "commitlint": "./bin/commitlint.js",
29
- "lint-staged": "./bin/lint-staged.js",
31
+ "pob-root-lint-staged": "./bin/pob-root-lint-staged.mjs",
30
32
  "pob-root-postinstall": "./bin/pob-root-postinstall.js",
31
33
  "pretty-eslint-config": "./bin/pretty-eslint-config.js",
32
34
  "pretty-pkg": "./bin/pretty-pkg.js",
@@ -47,10 +49,10 @@
47
49
  "@pob/pretty-eslint-config": "^2.2.0",
48
50
  "@pob/pretty-pkg": "^3.2.0",
49
51
  "husky": "^7.0.0",
50
- "lint-staged": "11.2.6",
52
+ "lint-staged": "12.1.2",
51
53
  "repository-check-dirty": "^3.2.0",
52
54
  "semver": "^7.1.2",
53
55
  "which-pm-runs": "1.0.0"
54
56
  },
55
- "gitHead": "d90275559b59bb33030b0b762e8755045b021289"
57
+ "gitHead": "0e6a3cfc36ebda0daa441a33b96288fbb08d8c21"
56
58
  }
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- 'use strict';
4
-
5
- const path = require('path');
6
- const pkg = require('lint-staged/package.json');
7
-
8
- // eslint-disable-next-line import/no-dynamic-require
9
- require(path.join(
10
- 'lint-staged',
11
- typeof pkg.bin === 'string' ? pkg.bin : pkg.bin['lint-staged'],
12
- ));