@html-validate/semantic-release-config 6.6.1 → 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.
Files changed (2) hide show
  1. package/lib/changelog.js +25 -3
  2. package/package.json +3 -4
package/lib/changelog.js CHANGED
@@ -1,7 +1,29 @@
1
- const fs = require("fs");
2
- const findUp = require("find-up");
1
+ const fs = require("node:fs");
2
+ const path = require("node:path");
3
3
 
4
- const pkgPath = findUp.sync("package.json");
4
+ /**
5
+ * @param {string} name
6
+ * @param {string} cwd
7
+ * @returns {string | undefined}
8
+ */
9
+ function findUp(name, cwd) {
10
+ let directory = path.resolve(cwd);
11
+ const { root } = path.parse(directory);
12
+ const stopAt = path.resolve(directory, root);
13
+
14
+ while (directory !== stopAt) {
15
+ const filePath = path.resolve(directory, name);
16
+ if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
17
+ return filePath;
18
+ }
19
+
20
+ directory = path.dirname(directory);
21
+ }
22
+
23
+ return undefined;
24
+ }
25
+
26
+ const pkgPath = findUp("package.json", process.cwd());
5
27
  const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
6
28
 
7
29
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-validate/semantic-release-config",
3
- "version": "6.6.1",
3
+ "version": "6.7.0",
4
4
  "description": "Semantic release configuration used by the various HTML-validate packages",
5
5
  "keywords": [
6
6
  "semantic-release"
@@ -34,8 +34,7 @@
34
34
  "@semantic-release/npm": "12.0.1",
35
35
  "@semantic-release/release-notes-generator": "14.0.1",
36
36
  "conventional-changelog-conventionalcommits": "8.0.0",
37
- "find-up": "^5.0.0",
38
- "semantic-release": "24.1.0"
37
+ "semantic-release": "24.1.2"
39
38
  },
40
39
  "devDependencies": {
41
40
  "lodash": "4.17.21",
@@ -51,5 +50,5 @@
51
50
  "publishConfig": {
52
51
  "access": "public"
53
52
  },
54
- "gitHead": "02db1e026d880fc2057b7e1190634c8b4b7a5698"
53
+ "gitHead": "6d34f5cc493e096f07d925d4610082f38317eef5"
55
54
  }