@html-validate/semantic-release-monorepo-config 6.6.2 → 6.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/index.js +23 -2
- package/package.json +3 -4
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const fs = require("node:fs");
|
|
2
2
|
const path = require("node:path");
|
|
3
|
-
const findUp = require("find-up");
|
|
4
3
|
const commitAnalyzer = require("@html-validate/semantic-release-config/lib/commit-analyzer");
|
|
5
4
|
const releaseNotesGenerator = require("@html-validate/semantic-release-config/lib/release-notes-generator");
|
|
6
5
|
const gitlab = require("@html-validate/semantic-release-config/lib/gitlab");
|
|
@@ -9,8 +8,30 @@ const exec = require("@html-validate/semantic-release-config/lib/exec");
|
|
|
9
8
|
const git = require("@html-validate/semantic-release-config/lib/git");
|
|
10
9
|
const branches = require("@html-validate/semantic-release-config/lib/branches");
|
|
11
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @param {string} name
|
|
13
|
+
* @param {string} cwd
|
|
14
|
+
* @returns {string | undefined}
|
|
15
|
+
*/
|
|
16
|
+
function findUp(name, cwd) {
|
|
17
|
+
let directory = path.resolve(cwd);
|
|
18
|
+
const { root } = path.parse(directory);
|
|
19
|
+
const stopAt = path.resolve(directory, root);
|
|
20
|
+
|
|
21
|
+
while (directory !== stopAt) {
|
|
22
|
+
const filePath = path.resolve(directory, name);
|
|
23
|
+
if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
|
|
24
|
+
return filePath;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
directory = path.dirname(directory);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
12
33
|
const PACKAGE_JSON = "package.json";
|
|
13
|
-
const pkgPath = findUp.
|
|
34
|
+
const pkgPath = findUp(PACKAGE_JSON, process.cwd());
|
|
14
35
|
const { workspaces } = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
15
36
|
|
|
16
37
|
const pkgJson = workspaces.map((it) => path.join(it, PACKAGE_JSON));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@html-validate/semantic-release-monorepo-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0",
|
|
4
4
|
"description": "Semantic release monorepo configuration used by the various HTML-validate packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"semantic-release"
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"index.js"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@html-validate/semantic-release-config": "6.
|
|
25
|
-
"find-up": "^5.0.0",
|
|
24
|
+
"@html-validate/semantic-release-config": "6.7.0",
|
|
26
25
|
"lerna": "8.1.8",
|
|
27
26
|
"semantic-release-lerna": "2.8.0"
|
|
28
27
|
},
|
|
@@ -33,5 +32,5 @@
|
|
|
33
32
|
"publishConfig": {
|
|
34
33
|
"access": "public"
|
|
35
34
|
},
|
|
36
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "6d34f5cc493e096f07d925d4610082f38317eef5"
|
|
37
36
|
}
|