@commitlint/config-lerna-scopes 17.4.2 → 17.6.2
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/index.js +11 -2
- package/package.json +2 -3
package/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const glob = require('glob');
|
|
2
2
|
const Path = require('path');
|
|
3
3
|
const importFrom = require('import-from');
|
|
4
|
-
const resolvePkg = require('resolve-pkg');
|
|
5
4
|
const semver = require('semver');
|
|
6
5
|
|
|
7
6
|
module.exports = {
|
|
@@ -54,5 +53,15 @@ function getPackages(context) {
|
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
function getLernaVersion(cwd) {
|
|
57
|
-
|
|
56
|
+
const moduleEntrypoint = require.resolve('lerna', {
|
|
57
|
+
paths: [cwd],
|
|
58
|
+
});
|
|
59
|
+
const moduleDir = Path.join(
|
|
60
|
+
moduleEntrypoint.slice(0, moduleEntrypoint.lastIndexOf('node_modules')),
|
|
61
|
+
'node_modules',
|
|
62
|
+
'lerna'
|
|
63
|
+
);
|
|
64
|
+
const modulePackageJson = Path.join(moduleDir, 'package.json');
|
|
65
|
+
|
|
66
|
+
return require(modulePackageJson).version;
|
|
58
67
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/config-lerna-scopes",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.6.2",
|
|
4
4
|
"description": "Shareable commitlint config enforcing lerna package and workspace names as scopes",
|
|
5
5
|
"files": [
|
|
6
6
|
"index.js"
|
|
@@ -40,12 +40,11 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"glob": "^8.0.3",
|
|
42
42
|
"import-from": "4.0.0",
|
|
43
|
-
"resolve-pkg": "2.0.0",
|
|
44
43
|
"semver": "7.3.8"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@commitlint/test": "^17.4.2",
|
|
48
47
|
"@commitlint/utils": "^17.4.0"
|
|
49
48
|
},
|
|
50
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "ab8266ce7ae04b22b5795bf359330bd018b65729"
|
|
51
50
|
}
|