@pob/root 5.4.2 → 5.7.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/.editorconfig +13 -0
- package/.eslintrc.json +1 -17
- package/CHANGELOG.md +70 -0
- package/LICENSE +1 -1
- package/README.md +25 -0
- package/bin/pob-root-lint-staged.mjs +18 -0
- package/bin/postinstall/install-husky.js +9 -5
- package/bin/postinstall/update-yarn.js +1 -1
- package/github-workflows/push-renovate-pob_root.yml +5 -2
- package/lib/.eslintrc.json +4 -0
- package/package.json +28 -9
- package/bin/lint-staged.js +0 -12
package/.editorconfig
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# EditorConfig helps developers define and maintain consistent
|
|
2
|
+
# coding styles between different editors and IDEs
|
|
3
|
+
# http://editorconfig.org
|
|
4
|
+
|
|
5
|
+
root = true
|
|
6
|
+
|
|
7
|
+
[*]
|
|
8
|
+
indent_style = space
|
|
9
|
+
indent_size = 2
|
|
10
|
+
end_of_line = lf
|
|
11
|
+
charset = utf-8
|
|
12
|
+
trim_trailing_whitespace = true
|
|
13
|
+
insert_final_newline = true
|
package/.eslintrc.json
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"root": true,
|
|
3
|
-
"extends": ["@pob/eslint-config/
|
|
4
|
-
"overrides": [
|
|
5
|
-
{
|
|
6
|
-
"files": ["lib/**/*.test.js", "lib/__tests__/**/*.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
|
-
]
|
|
3
|
+
"extends": ["@pob/eslint-config/root-commonjs"]
|
|
20
4
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,76 @@
|
|
|
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.7.0](https://github.com/christophehurpeau/pob/compare/@pob/root@5.6.1...@pob/root@5.7.0) (2021-11-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **@pob/root:** lint-staged bin ([c3fb251](https://github.com/christophehurpeau/pob/commit/c3fb251ac3fee9080a056c144702b87cdf86b8f1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **@pob/root:** use husky script ([7a668c2](https://github.com/christophehurpeau/pob/commit/7a668c280101dca57198a10d73321df7135b03fb))
|
|
17
|
+
* **deps:** update dependency lint-staged to v12 ([#1098](https://github.com/christophehurpeau/pob/issues/1098)) ([70e9712](https://github.com/christophehurpeau/pob/commit/70e97125201a969c3b4040ee0966869c4fa47dad))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [5.6.1](https://github.com/christophehurpeau/pob/compare/@pob/root@5.6.0...@pob/root@5.6.1) (2021-11-11)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **@pob/root:** fix running install without immutable in ci ([a0132ca](https://github.com/christophehurpeau/pob/commit/a0132caa200714a806520cff004c169f32c74e98))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# [5.6.0](https://github.com/christophehurpeau/pob/compare/@pob/root@5.5.0...@pob/root@5.6.0) (2021-11-11)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* **@pob/root:** dont install with immutable when updating pob root ([7fc32d4](https://github.com/christophehurpeau/pob/commit/7fc32d44383299e8b138eb4248e5ff09e0a11ff8))
|
|
40
|
+
* **deps:** update dependency lint-staged to v11.2.5 ([#1082](https://github.com/christophehurpeau/pob/issues/1082)) ([16321c0](https://github.com/christophehurpeau/pob/commit/16321c00814b04c2ee33bae003ef2f911c9e94a7))
|
|
41
|
+
* **deps:** update dependency lint-staged to v11.2.6 ([#1083](https://github.com/christophehurpeau/pob/issues/1083)) ([9f25941](https://github.com/christophehurpeau/pob/commit/9f25941086f15de78c8117c15034321a1b6ff38f))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* **deps:** update commitlint monorepo to v14 (major) ([#1088](https://github.com/christophehurpeau/pob/issues/1088)) ([6a012c5](https://github.com/christophehurpeau/pob/commit/6a012c526c7ba2447ffc712da21a944372f42a2f))
|
|
47
|
+
* improve npmignore ([b47706a](https://github.com/christophehurpeau/pob/commit/b47706af4f9be4f8103ec1306879bbd0a6989e6b))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# [5.5.0](https://github.com/christophehurpeau/pob/compare/@pob/root@5.4.2...@pob/root@5.5.0) (2021-10-25)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* **@pob/root:** argument install in legacy yarn 1 ([7cf1566](https://github.com/christophehurpeau/pob/commit/7cf1566bfd536223e37bf6b7d11790d79e0e2270))
|
|
59
|
+
* **deps:** update dependency @commitlint/cli to v13.2.1 ([#1067](https://github.com/christophehurpeau/pob/issues/1067)) ([f6c56df](https://github.com/christophehurpeau/pob/commit/f6c56df3803151aadc1877a76910e84762548512))
|
|
60
|
+
* **deps:** update dependency lint-staged to v11.2.1 ([#1066](https://github.com/christophehurpeau/pob/issues/1066)) ([995eefe](https://github.com/christophehurpeau/pob/commit/995eefe9920a07cbf5d2575577de2477df4647f5))
|
|
61
|
+
* **deps:** update dependency lint-staged to v11.2.2 ([#1068](https://github.com/christophehurpeau/pob/issues/1068)) ([1351272](https://github.com/christophehurpeau/pob/commit/135127291756f79d39129a7ae657d8b9b171b4f3))
|
|
62
|
+
* **deps:** update dependency lint-staged to v11.2.3 ([#1070](https://github.com/christophehurpeau/pob/issues/1070)) ([adf2a74](https://github.com/christophehurpeau/pob/commit/adf2a7474d1355e2c405b146d6fbe25e81b6cf2e))
|
|
63
|
+
* **deps:** update dependency lint-staged to v11.2.4 ([#1079](https://github.com/christophehurpeau/pob/issues/1079)) ([8221e57](https://github.com/christophehurpeau/pob/commit/8221e5740953e2c72f90b0fa808bb93a9dcfac3f))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* **@pob/root:** update yarn ([d77b408](https://github.com/christophehurpeau/pob/commit/d77b408d1198c6dac181578c00f1afa0be38aa5d))
|
|
69
|
+
* **deps:** update dependency @commitlint/cli to v13.2.0 ([#1056](https://github.com/christophehurpeau/pob/issues/1056)) ([b4a0b61](https://github.com/christophehurpeau/pob/commit/b4a0b61ade5cfdee584d9a341a1d579ac67201d3))
|
|
70
|
+
* **deps:** update dependency lint-staged to v11.2.0 ([#1062](https://github.com/christophehurpeau/pob/issues/1062)) ([4d01261](https://github.com/christophehurpeau/pob/commit/4d0126137a8574297918fef5bfeb4b0dfbf4361f))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
6
76
|
## [5.4.2](https://github.com/christophehurpeau/pob/compare/@pob/root@5.4.1...@pob/root@5.4.2) (2021-09-05)
|
|
7
77
|
|
|
8
78
|
|
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2021 Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)
|
|
2
2
|
|
|
3
3
|
Permission to use, copy, modify, and/or distribute this software for
|
|
4
4
|
any purpose with or without fee is hereby granted, provided that the
|
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<h3 align="center">
|
|
2
|
+
@pob/root
|
|
3
|
+
</h3>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
root package
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://npmjs.org/package/@pob/root"><img src="https://img.shields.io/npm/v/@pob/root.svg?style=flat-square"></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install --save @pob/root
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import pobRoot from '@pob/root';
|
|
23
|
+
|
|
24
|
+
console.log(pobRoot);
|
|
25
|
+
```
|
|
@@ -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(
|
|
29
|
-
|
|
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
|
|
74
|
+
writeHook('pre-commit', `${pmExec} pob-root-lint-staged`);
|
|
71
75
|
|
|
72
76
|
if (isYarnPnp) {
|
|
73
77
|
ensureHookDeleted('post-checkout');
|
|
@@ -79,7 +83,7 @@ if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- yarn.lock)" ]; then
|
|
|
79
83
|
yarn install ${
|
|
80
84
|
isYarnBerry
|
|
81
85
|
? '--immutable --immutable-cache'
|
|
82
|
-
: '
|
|
86
|
+
: '--prefer-offline --pure-lockfile --ignore-optional'
|
|
83
87
|
} || true
|
|
84
88
|
fi`;
|
|
85
89
|
|
|
@@ -6,7 +6,7 @@ const semver = require('semver');
|
|
|
6
6
|
module.exports = function updateYarn({ pkg, pm }) {
|
|
7
7
|
if (pm.name !== 'yarn' || !pm.version) return;
|
|
8
8
|
|
|
9
|
-
if (semver.lt(pm.version, '3.0
|
|
9
|
+
if (semver.lt(pm.version, '3.1.0')) {
|
|
10
10
|
// Upgrade from yarn 1
|
|
11
11
|
if (semver.lt(pm.version, '2.0.0')) {
|
|
12
12
|
console.log('-- Upgrade from yarn 1 --');
|
|
@@ -26,7 +26,10 @@ jobs:
|
|
|
26
26
|
v2-dependencies--${{ matrix.node-version }}-
|
|
27
27
|
|
|
28
28
|
- name: Check Dependencies
|
|
29
|
-
|
|
29
|
+
# no immutable here
|
|
30
|
+
run: yarn install
|
|
31
|
+
env:
|
|
32
|
+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
|
30
33
|
|
|
31
34
|
- name: Run pob-root-postinstall
|
|
32
35
|
run: yarn run pob-root-postinstall
|
|
@@ -41,5 +44,5 @@ jobs:
|
|
|
41
44
|
git add .
|
|
42
45
|
git -c user.name="Christophe Hurpeau" \
|
|
43
46
|
-c user.email="christophehurpeau@users.noreply.github.com" \
|
|
44
|
-
commit -m "chore: update pob root" --author="github-actions[bot] <actions@github.com>"
|
|
47
|
+
commit -m "chore: update pob root" --author="github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
|
45
48
|
git push
|
package/package.json
CHANGED
|
@@ -1,37 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/root",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "root package",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
|
|
5
7
|
"license": "ISC",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/christophehurpeau/pob.git",
|
|
11
|
+
"directory": "@pob/root"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/christophehurpeau/pob",
|
|
6
14
|
"type": "commonjs",
|
|
7
15
|
"engines": {
|
|
8
|
-
"node": "
|
|
16
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
9
17
|
},
|
|
10
18
|
"publishConfig": {
|
|
11
19
|
"access": "public"
|
|
12
20
|
},
|
|
21
|
+
"main": "./lib/index.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./lib/index.js",
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": false,
|
|
13
27
|
"bin": {
|
|
14
28
|
"commitlint": "./bin/commitlint.js",
|
|
15
|
-
"lint-staged": "./bin/lint-staged.
|
|
29
|
+
"pob-root-lint-staged": "./bin/pob-root-lint-staged.mjs",
|
|
16
30
|
"pob-root-postinstall": "./bin/pob-root-postinstall.js",
|
|
17
31
|
"pretty-eslint-config": "./bin/pretty-eslint-config.js",
|
|
18
32
|
"pretty-pkg": "./bin/pretty-pkg.js",
|
|
19
33
|
"repository-check-dirty": "./bin/repository-check-dirty.js"
|
|
20
34
|
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"lint": "yarn run lint:eslint",
|
|
37
|
+
"lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet @pob/root"
|
|
38
|
+
},
|
|
21
39
|
"prettier": {
|
|
22
40
|
"trailingComma": "all",
|
|
23
41
|
"singleQuote": true,
|
|
24
42
|
"arrowParens": "always"
|
|
25
43
|
},
|
|
44
|
+
"pob": {},
|
|
26
45
|
"dependencies": {
|
|
27
|
-
"@commitlint/cli": "
|
|
28
|
-
"@pob/pretty-eslint-config": "^2.
|
|
29
|
-
"@pob/pretty-pkg": "^3.
|
|
46
|
+
"@commitlint/cli": "14.1.0",
|
|
47
|
+
"@pob/pretty-eslint-config": "^2.2.0",
|
|
48
|
+
"@pob/pretty-pkg": "^3.2.0",
|
|
30
49
|
"husky": "^7.0.0",
|
|
31
|
-
"lint-staged": "
|
|
32
|
-
"repository-check-dirty": "^3.
|
|
50
|
+
"lint-staged": "12.0.2",
|
|
51
|
+
"repository-check-dirty": "^3.2.0",
|
|
33
52
|
"semver": "^7.1.2",
|
|
34
53
|
"which-pm-runs": "1.0.0"
|
|
35
54
|
},
|
|
36
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "755170313fa739009cfb0f87d61ade5d035fd707"
|
|
37
56
|
}
|
package/bin/lint-staged.js
DELETED
|
@@ -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
|
-
));
|