semantic-release-config-kuzzle 1.3.0 → 1.4.0-develop.1
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/dist/index.js +55 -24
- package/dist/index.js.map +1 -1
- package/package.json +17 -21
package/dist/index.js
CHANGED
|
@@ -1,47 +1,78 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.plugins = exports.branches = void 0;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Default semantic-release configuration for Kuzzle projects.
|
|
6
|
+
*/
|
|
7
|
+
const releaseBranchName = process.env.SEMANTIC_RELEASE_RELEASE_BRANCH ?? "main";
|
|
8
|
+
const developBranchName = process.env.SEMANTIC_RELEASE_DEVELOP_BRANCH ?? "develop";
|
|
5
9
|
const branches = [
|
|
6
10
|
{
|
|
7
|
-
name:
|
|
11
|
+
name: releaseBranchName,
|
|
8
12
|
},
|
|
9
13
|
{
|
|
10
|
-
name:
|
|
14
|
+
name: developBranchName,
|
|
11
15
|
prerelease: true,
|
|
12
16
|
},
|
|
13
17
|
];
|
|
14
18
|
exports.branches = branches;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Default plugins configuration.
|
|
21
|
+
* Main thing here is to use a different changelog file depending on the release channel.
|
|
22
|
+
*/
|
|
23
|
+
const inferReleaseChannel = () => {
|
|
24
|
+
const ref = process.env.GITHUB_REF_NAME ||
|
|
25
|
+
process.env.GITHUB_HEAD_REF ||
|
|
26
|
+
process.env.CI_COMMIT_BRANCH ||
|
|
27
|
+
process.env.CI_COMMIT_REF_NAME ||
|
|
28
|
+
process.env.BITBUCKET_BRANCH ||
|
|
29
|
+
process.env.CIRCLE_BRANCH ||
|
|
30
|
+
process.env.TRAVIS_BRANCH ||
|
|
31
|
+
process.env.BRANCH_NAME ||
|
|
32
|
+
process.env.GITHUB_REF;
|
|
33
|
+
if (!ref) {
|
|
34
|
+
return;
|
|
19
35
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
]);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
// eslint-disable-next-line no-console
|
|
31
|
-
console.warn("Could not infer package type, assuming publication is handled externally.");
|
|
32
|
-
}
|
|
36
|
+
const normalizedRef = ref.startsWith("refs/heads/")
|
|
37
|
+
? ref.slice("refs/heads/".length)
|
|
38
|
+
: ref;
|
|
39
|
+
return normalizedRef.split("/").pop();
|
|
40
|
+
};
|
|
41
|
+
const releaseChannel = process.env.RELEASE_CHANNEL || inferReleaseChannel() || releaseBranchName;
|
|
33
42
|
const plugins = [
|
|
34
43
|
["@semantic-release/commit-analyzer", { preset: "conventionalcommits" }],
|
|
35
44
|
[
|
|
36
45
|
"@semantic-release/release-notes-generator",
|
|
37
46
|
{ preset: "conventionalcommits" },
|
|
38
47
|
],
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
[
|
|
49
|
+
"@semantic-release/changelog",
|
|
50
|
+
{
|
|
51
|
+
changelogFile: `changelogs/CHANGELOG_${releaseChannel}.md`,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
"@semantic-release/git",
|
|
56
|
+
{
|
|
57
|
+
assets: [`changelogs/CHANGELOG_${releaseChannel}.md`],
|
|
58
|
+
},
|
|
59
|
+
],
|
|
43
60
|
];
|
|
44
61
|
exports.plugins = plugins;
|
|
62
|
+
if (process.env.GITHUB_TOKEN) {
|
|
63
|
+
plugins.push("@semantic-release/github");
|
|
64
|
+
}
|
|
65
|
+
if (process.env.SEMANTIC_RELEASE_NPM_PUBLISH === "true") {
|
|
66
|
+
plugins.push("@semantic-release/npm");
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
plugins.push([
|
|
70
|
+
"@semantic-release/npm",
|
|
71
|
+
{
|
|
72
|
+
npmPublish: false,
|
|
73
|
+
},
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
45
76
|
if (process.env.SEMANTIC_RELEASE_SLACK_WEBHOOK) {
|
|
46
77
|
plugins.push([
|
|
47
78
|
"semantic-release-slack-bot",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,MAAM,CAAC;AAChF,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,SAAS,CAAC;AAE3D,MAAM,QAAQ,GAAiB;IAC7B;QACE,IAAI,EAAE,iBAAiB;KACxB;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,IAAI;KACjB;CACF,CAAC;AA8EO,4BAAQ;AA5EjB;;;GAGG;AACH,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAC/B,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,eAAe;QAC3B,OAAO,CAAC,GAAG,CAAC,eAAe;QAC3B,OAAO,CAAC,GAAG,CAAC,gBAAgB;QAC5B,OAAO,CAAC,GAAG,CAAC,kBAAkB;QAC9B,OAAO,CAAC,GAAG,CAAC,gBAAgB;QAC5B,OAAO,CAAC,GAAG,CAAC,aAAa;QACzB,OAAO,CAAC,GAAG,CAAC,aAAa;QACzB,OAAO,CAAC,GAAG,CAAC,WAAW;QACvB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;IAEzB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO;IACT,CAAC;IAED,MAAM,aAAa,GAAG,GAAG,CAAC,UAAU,CAAC,aA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,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release-config-kuzzle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-develop.1",
|
|
4
4
|
"description": "The semantic-release shareable config we use for Kuzzle projects.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"clean": "rimraf dist",
|
|
10
|
-
"lint": "eslint",
|
|
11
|
-
"lint:fix": "eslint --fix",
|
|
12
|
-
"prepare": "husky",
|
|
13
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
-
},
|
|
15
5
|
"repository": {
|
|
16
6
|
"type": "git",
|
|
17
7
|
"url": "git+https://github.com/kuzzleio/semantic-release-config-kuzzle.git"
|
|
@@ -22,27 +12,33 @@
|
|
|
22
12
|
"url": "https://github.com/kuzzleio/semantic-release-config-kuzzle/issues"
|
|
23
13
|
},
|
|
24
14
|
"homepage": "https://github.com/kuzzleio/semantic-release-config-kuzzle#readme",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"lint": "eslint",
|
|
20
|
+
"lint:fix": "eslint --fix",
|
|
21
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
22
|
+
"semantic-release:dry-run": "semantic-release --dry-run",
|
|
23
|
+
"semantic-release": "semantic-release"
|
|
24
|
+
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@semantic-release/changelog": "6.0.3",
|
|
27
|
+
"@semantic-release/commit-analyzer": "13.0.1",
|
|
27
28
|
"@semantic-release/git": "10.0.1",
|
|
29
|
+
"@semantic-release/github": "12.0.2",
|
|
30
|
+
"@semantic-release/npm": "13.1.3",
|
|
31
|
+
"@semantic-release/release-notes-generator": "14.1.0",
|
|
28
32
|
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
33
|
+
"semantic-release": "25.0.2",
|
|
29
34
|
"semantic-release-slack-bot": "4.0.2"
|
|
30
35
|
},
|
|
31
36
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@commitlint/config-conventional": "20.2.0",
|
|
34
|
-
"@types/node": "25.0.2",
|
|
37
|
+
"@types/node": "24.*.*",
|
|
35
38
|
"@types/semantic-release": "21.1.0",
|
|
36
|
-
"cz-conventional-changelog": "3.3.0",
|
|
37
39
|
"eslint-plugin-kuzzle": "0.0.15",
|
|
38
|
-
"husky": "9.1.7",
|
|
39
|
-
"rimraf": "6.1.2",
|
|
40
|
-
"semantic-release": "25.0.2",
|
|
41
40
|
"typescript": "5.4.*"
|
|
42
41
|
},
|
|
43
|
-
"peerDependencies": {
|
|
44
|
-
"semantic-release": ">=23.1.1"
|
|
45
|
-
},
|
|
46
42
|
"files": [
|
|
47
43
|
"CHANGELOG.md",
|
|
48
44
|
"dist/index.js",
|