@anolilab/semantic-release-preset 2.0.2 → 2.0.5
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 +5 -5
- package/CHANGELOG.md +21 -0
- package/README.md +8 -7
- package/lib/postinstall.js +18 -16
- package/package.json +4 -4
package/.releaserc-with-npm.json
CHANGED
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"@semantic-release/changelog",
|
|
30
30
|
"@semantic-release/npm",
|
|
31
31
|
[
|
|
32
|
-
"@semantic-release/
|
|
32
|
+
"@semantic-release/git",
|
|
33
33
|
{
|
|
34
|
-
"
|
|
35
|
-
"failComment": false
|
|
34
|
+
"message": "chore(release): ${nextRelease.gitTag} [skip ci]\\n\\n${nextRelease.notes}"
|
|
36
35
|
}
|
|
37
36
|
],
|
|
38
37
|
[
|
|
39
|
-
"@semantic-release/
|
|
38
|
+
"@semantic-release/github",
|
|
40
39
|
{
|
|
41
|
-
"
|
|
40
|
+
"successComment": false,
|
|
41
|
+
"failComment": false
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
44
|
]
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
### @anolilab/semantic-release-preset [2.0.5](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@2.0.4...@anolilab/semantic-release-preset@2.0.5) (2022-05-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* changed workflow of release to push the updated package.json to github ([9f5718c](https://github.com/anolilab/javascript-style-guide/commit/9f5718c403200921cfb3b7134491fc1b26617a1f))
|
|
7
|
+
|
|
8
|
+
### @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)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* update all deps of the package and fixes found code style issues ([2776ecd](https://github.com/anolilab/javascript-style-guide/commit/2776ecd44d35f1d317abf367e69fef24dbd00335))
|
|
14
|
+
|
|
15
|
+
### @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)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* changed release flow for the npm release config ([d58fd2e](https://github.com/anolilab/javascript-style-guide/commit/d58fd2ec8519c61e6a420b2094b27319015318a3))
|
|
21
|
+
|
|
1
22
|
### @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)
|
|
2
23
|
|
|
3
24
|
|
package/README.md
CHANGED
|
@@ -98,30 +98,31 @@ File content:
|
|
|
98
98
|
"@semantic-release/changelog",
|
|
99
99
|
"@semantic-release/npm",
|
|
100
100
|
[
|
|
101
|
-
"@semantic-release/
|
|
101
|
+
"@semantic-release/git",
|
|
102
102
|
{
|
|
103
|
-
"
|
|
104
|
-
"failComment": false
|
|
103
|
+
"message": "chore(release): ${nextRelease.gitTag} [skip ci]\\n\\n${nextRelease.notes}"
|
|
105
104
|
}
|
|
106
105
|
],
|
|
107
106
|
[
|
|
108
|
-
"@semantic-release/
|
|
107
|
+
"@semantic-release/github",
|
|
109
108
|
{
|
|
110
|
-
"
|
|
109
|
+
"successComment": false,
|
|
110
|
+
"failComment": false
|
|
111
111
|
}
|
|
112
112
|
]
|
|
113
113
|
]
|
|
114
114
|
}
|
|
115
|
-
|
|
116
115
|
```
|
|
117
116
|
|
|
118
117
|
### Add [Commitizen](https://github.com/commitizen/cz-cli)
|
|
119
118
|
Add `cz` to your `package.json scripts`
|
|
120
119
|
|
|
121
120
|
```json
|
|
121
|
+
{
|
|
122
122
|
"scripts": {
|
|
123
123
|
"commit": "cz"
|
|
124
124
|
}
|
|
125
|
+
}
|
|
125
126
|
```
|
|
126
127
|
|
|
127
128
|
### Environment Variables Configuration
|
|
@@ -247,7 +248,7 @@ jobs:
|
|
|
247
248
|
GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
|
248
249
|
GIT_COMMITTER_NAME: "github-actions-shell"
|
|
249
250
|
GIT_COMMITTER_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
|
250
|
-
run: "yarn
|
|
251
|
+
run: "yarn semantic-release"
|
|
251
252
|
```
|
|
252
253
|
|
|
253
254
|
## Note on GitHub protected branches
|
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.5",
|
|
4
4
|
"description": "Anolilab Coding Standard for semantic-release.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -48,9 +48,9 @@
|
|
|
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",
|