@d-zero/cz-config 6.0.0-alpha.2 → 6.0.0-alpha.3
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/monorepo-scopes.js +8 -8
- package/package.json +15 -15
package/monorepo-scopes.js
CHANGED
|
@@ -3,10 +3,10 @@ const path = require('node:path');
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Get the list of packages in the monorepo
|
|
6
|
-
* @param {(string | RegExp)[]} removes
|
|
7
|
-
* @returns {string[]}
|
|
6
|
+
* @param {(string | RegExp)[]} removes - Patterns to strip from each package name
|
|
7
|
+
* @returns {string[]} The list of package names
|
|
8
8
|
*/
|
|
9
|
-
module.exports = function (removes) {
|
|
9
|
+
module.exports = function getMonorepoScopes(removes) {
|
|
10
10
|
const cwd = process.cwd();
|
|
11
11
|
const lernaPath = path.resolve(cwd, 'lerna.json');
|
|
12
12
|
if (!fs.existsSync(lernaPath)) {
|
|
@@ -16,7 +16,7 @@ module.exports = function (removes) {
|
|
|
16
16
|
const packages = fs.globSync(lerna.packages);
|
|
17
17
|
return packages
|
|
18
18
|
.map((packagePath) => {
|
|
19
|
-
let packageJson
|
|
19
|
+
let packageJson;
|
|
20
20
|
try {
|
|
21
21
|
packageJson = fs.readFileSync(
|
|
22
22
|
path.resolve(cwd, packagePath, 'package.json'),
|
|
@@ -26,14 +26,14 @@ module.exports = function (removes) {
|
|
|
26
26
|
//
|
|
27
27
|
}
|
|
28
28
|
if (!packageJson) {
|
|
29
|
-
return
|
|
29
|
+
return;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
let name =
|
|
31
|
+
const package_ = JSON.parse(packageJson);
|
|
32
|
+
let name = package_.name;
|
|
33
33
|
for (const remove of removes) {
|
|
34
34
|
name = name.replace(remove, '');
|
|
35
35
|
}
|
|
36
36
|
return name;
|
|
37
37
|
})
|
|
38
|
-
.filter((name) => name !==
|
|
38
|
+
.filter((name) => name !== undefined);
|
|
39
39
|
};
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/cz-config",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.3",
|
|
4
4
|
"description": "Configurations of cz-customizable",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "D-ZERO Co., Ltd.",
|
|
5
7
|
"repository": {
|
|
6
8
|
"type": "git",
|
|
7
9
|
"url": "https://github.com/d-zero-dev/linters.git",
|
|
8
10
|
"directory": "packages/@d-zero/cz-config"
|
|
9
11
|
},
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"access": "public"
|
|
14
|
-
},
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">=22.0.0"
|
|
17
|
-
},
|
|
12
|
+
"files": [
|
|
13
|
+
"*.js"
|
|
14
|
+
],
|
|
18
15
|
"type": "commonjs",
|
|
19
16
|
"exports": {
|
|
20
17
|
".": "./index.js",
|
|
21
18
|
"./ui": "./ui.js",
|
|
22
19
|
"./scopes": "./scopes.js"
|
|
23
20
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
27
24
|
"dependencies": {
|
|
28
|
-
"commitizen": "4.3.
|
|
29
|
-
"cz-customizable": "7.5.
|
|
25
|
+
"commitizen": "4.3.2",
|
|
26
|
+
"cz-customizable": "7.5.4"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=22.0.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "b03aff7503c8440b023d79f81c11d44887aa9fc9"
|
|
32
32
|
}
|