@anolilab/semantic-release-preset 2.0.1 → 2.0.4
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/.releaserc-with-npm.json +7 -7
- package/CHANGELOG.md +21 -0
- package/lib/postinstall.js +18 -16
- package/package.json +6 -6
package/.releaserc-with-npm.json
CHANGED
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"@semantic-release/changelog",
|
|
30
|
-
"@semantic-release/npm",
|
|
31
30
|
[
|
|
32
|
-
"@semantic-release/
|
|
31
|
+
"@semantic-release/git",
|
|
33
32
|
{
|
|
34
|
-
"
|
|
35
|
-
"failComment": false
|
|
33
|
+
"message": "chore(release): ${nextRelease.gitTag} [skip ci]\\n\\n${nextRelease.notes}"
|
|
36
34
|
}
|
|
37
35
|
],
|
|
38
36
|
[
|
|
39
|
-
"@semantic-release/
|
|
37
|
+
"@semantic-release/github",
|
|
40
38
|
{
|
|
41
|
-
"
|
|
39
|
+
"successComment": false,
|
|
40
|
+
"failComment": false
|
|
42
41
|
}
|
|
43
|
-
]
|
|
42
|
+
],
|
|
43
|
+
"@semantic-release/npm"
|
|
44
44
|
]
|
|
45
45
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
### @anolilab/semantic-release-preset [2.0.4](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@2.0.3...@anolilab/semantic-release-preset@2.0.4) (2022-05-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update all deps of the package and fixes found code style issues ([2776ecd](https://github.com/anolilab/javascript-style-guide/commit/2776ecd44d35f1d317abf367e69fef24dbd00335))
|
|
7
|
+
|
|
8
|
+
### @anolilab/semantic-release-preset [2.0.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@2.0.2...@anolilab/semantic-release-preset@2.0.3) (2022-05-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* changed release flow for the npm release config ([d58fd2e](https://github.com/anolilab/javascript-style-guide/commit/d58fd2ec8519c61e6a420b2094b27319015318a3))
|
|
14
|
+
|
|
15
|
+
### @anolilab/semantic-release-preset [2.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@2.0.1...@anolilab/semantic-release-preset@2.0.2) (2022-05-06)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **deps:** upgraded deps in all packages ([091353c](https://github.com/anolilab/javascript-style-guide/commit/091353cdd01a0bb3d0e48da9266a6a2978283e2b))
|
|
21
|
+
|
|
1
22
|
### @anolilab/semantic-release-preset [2.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@2.0.0...@anolilab/semantic-release-preset@2.0.1) (2022-02-15)
|
|
2
23
|
|
|
3
24
|
|
package/lib/postinstall.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { existsSync, readFileSync, writeFile } from "node:fs";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
5
|
+
import { promisify } from "node:util";
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line no-undef
|
|
3
8
|
if (process.env.CI) {
|
|
9
|
+
// eslint-disable-next-line no-undef
|
|
4
10
|
process.exit(0);
|
|
5
11
|
}
|
|
6
12
|
|
|
7
|
-
import { writeFile, existsSync, readFileSync } from 'fs';
|
|
8
|
-
import { resolve, join } from 'path';
|
|
9
|
-
import { promisify } from 'util';
|
|
10
|
-
|
|
11
13
|
const writeFileAsync = promisify(writeFile);
|
|
12
14
|
|
|
13
15
|
// get the path to the host project.
|
|
14
|
-
|
|
16
|
+
// eslint-disable-next-line no-undef
|
|
17
|
+
const projectPath = resolve(process.cwd(), "..", "..", "..");
|
|
15
18
|
|
|
16
|
-
console.log(
|
|
19
|
+
console.log("Configuring @anolilab/semantic-release-preset", projectPath, "\n");
|
|
17
20
|
|
|
18
21
|
/**
|
|
19
22
|
* Writes .releaserc.json if it doesn't exist. Warns if it exists.
|
|
@@ -22,20 +25,19 @@ const writeReleaserc = () => {
|
|
|
22
25
|
const packageJsonPath = join(projectPath, "package.json");
|
|
23
26
|
|
|
24
27
|
if (existsSync(packageJsonPath)) {
|
|
25
|
-
const packageJsonContent = readFileSync(packageJsonPath,
|
|
28
|
+
const packageJsonContent = readFileSync(packageJsonPath, "utf8");
|
|
26
29
|
|
|
27
30
|
if (packageJsonContent.includes("multi-semantic-release")) {
|
|
28
|
-
console.warn(
|
|
31
|
+
console.warn("⚠️ found use of multi-semantic-release;");
|
|
29
32
|
|
|
30
33
|
return Promise.resolve();
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
|
|
34
|
-
|
|
35
37
|
const filePath = join(projectPath, ".releaserc.json");
|
|
36
38
|
|
|
37
39
|
if (existsSync(filePath)) {
|
|
38
|
-
console.warn(
|
|
40
|
+
console.warn("⚠️ .releaserc.json already exists;");
|
|
39
41
|
|
|
40
42
|
return Promise.resolve();
|
|
41
43
|
}
|
|
@@ -55,7 +57,7 @@ const writeCommitlintConfig = () => {
|
|
|
55
57
|
const filePath = join(projectPath, "commitlint.config.cjs");
|
|
56
58
|
|
|
57
59
|
if (existsSync(filePath)) {
|
|
58
|
-
console.warn(
|
|
60
|
+
console.warn("⚠️ commitlint.config.cjs already exists;");
|
|
59
61
|
|
|
60
62
|
return Promise.resolve();
|
|
61
63
|
}
|
|
@@ -76,7 +78,7 @@ const writeCzrc = () => {
|
|
|
76
78
|
const filePath = join(projectPath, ".czrc");
|
|
77
79
|
|
|
78
80
|
if (existsSync(filePath)) {
|
|
79
|
-
console.warn(
|
|
81
|
+
console.warn("⚠️ .czrc already exists;");
|
|
80
82
|
|
|
81
83
|
return Promise.resolve();
|
|
82
84
|
}
|
|
@@ -97,12 +99,12 @@ const writeCzrc = () => {
|
|
|
97
99
|
await writeCzrc();
|
|
98
100
|
|
|
99
101
|
console.log("😎 Everything went well, have fun!");
|
|
100
|
-
|
|
102
|
+
// eslint-disable-next-line no-undef
|
|
101
103
|
process.exit(0);
|
|
102
|
-
} catch (
|
|
104
|
+
} catch (error) {
|
|
103
105
|
console.log("😬 something went wrong:");
|
|
104
|
-
console.error(
|
|
105
|
-
|
|
106
|
+
console.error(error.message);
|
|
107
|
+
// eslint-disable-next-line no-undef
|
|
106
108
|
process.exit(1);
|
|
107
109
|
}
|
|
108
110
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/semantic-release-preset",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Anolilab Coding Standard for semantic-release.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
"postinstall": "node lib/postinstall.js"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@commitlint/cli": "^16.2.
|
|
52
|
-
"@commitlint/config-conventional": "^16.2.
|
|
53
|
-
"@commitlint/core": "^16.2.
|
|
51
|
+
"@commitlint/cli": "^16.2.4",
|
|
52
|
+
"@commitlint/config-conventional": "^16.2.4",
|
|
53
|
+
"@commitlint/core": "^16.2.4",
|
|
54
54
|
"@semantic-release/changelog": "^6.0.1",
|
|
55
55
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
56
56
|
"@semantic-release/exec": "^6.0.3",
|
|
57
57
|
"@semantic-release/git": "^10.0.1",
|
|
58
|
-
"@semantic-release/github": "^8.0.
|
|
59
|
-
"@semantic-release/npm": "^9.0.
|
|
58
|
+
"@semantic-release/github": "^8.0.4",
|
|
59
|
+
"@semantic-release/npm": "^9.0.1",
|
|
60
60
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
61
61
|
"commitizen": "^4.2.4",
|
|
62
62
|
"conventional-changelog-conventionalcommits": "^4.6.3",
|