semantic-release-config-kuzzle 1.4.0-develop.2 → 1.4.0-develop.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/dist/index.js +47 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.plugins = exports.branches = void 0;
|
|
7
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
+
/**
|
|
10
|
+
* This function extract an Array of package.json file
|
|
11
|
+
* That are found inside the current repo. It will seek for folder
|
|
12
|
+
* Inside the workspace property of the root package.json file.
|
|
13
|
+
* @returns string[]
|
|
14
|
+
*/
|
|
15
|
+
function getWorkspacePackageJsonFiles() {
|
|
16
|
+
const rootPkg = JSON.parse(node_fs_1.default.readFileSync("package.json", "utf8"));
|
|
17
|
+
let workspaces = [];
|
|
18
|
+
if (Array.isArray(rootPkg.workspaces)) {
|
|
19
|
+
workspaces = rootPkg.workspaces;
|
|
20
|
+
}
|
|
21
|
+
else if (rootPkg.workspaces && Array.isArray(rootPkg.workspaces.packages)) {
|
|
22
|
+
workspaces = rootPkg.workspaces.packages;
|
|
23
|
+
}
|
|
24
|
+
const patterns = workspaces.map((ws) => ws.endsWith("/") ? `${ws}package.json` : `${ws}/package.json`);
|
|
25
|
+
return fast_glob_1.default.sync(patterns, {
|
|
26
|
+
onlyFiles: true,
|
|
27
|
+
unique: true,
|
|
28
|
+
dot: false,
|
|
29
|
+
followSymbolicLinks: true,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
4
32
|
/**
|
|
5
33
|
* Default semantic-release configuration for Kuzzle projects.
|
|
6
34
|
*/
|
|
@@ -38,6 +66,7 @@ const inferReleaseChannel = () => {
|
|
|
38
66
|
: ref;
|
|
39
67
|
return normalizedRef.split("/").pop();
|
|
40
68
|
};
|
|
69
|
+
const workspacePkgFiles = getWorkspacePackageJsonFiles();
|
|
41
70
|
const releaseChannel = process.env.RELEASE_CHANNEL || inferReleaseChannel() || releaseBranchName;
|
|
42
71
|
const plugins = [
|
|
43
72
|
["@semantic-release/commit-analyzer", { preset: "conventionalcommits" }],
|
|
@@ -51,12 +80,6 @@ const plugins = [
|
|
|
51
80
|
changelogFile: `changelogs/CHANGELOG_${releaseChannel}.md`,
|
|
52
81
|
},
|
|
53
82
|
],
|
|
54
|
-
[
|
|
55
|
-
"@semantic-release/git",
|
|
56
|
-
{
|
|
57
|
-
assets: [`changelogs/CHANGELOG_${releaseChannel}.md`],
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
83
|
];
|
|
61
84
|
exports.plugins = plugins;
|
|
62
85
|
if (process.env.GITHUB_TOKEN) {
|
|
@@ -83,4 +106,22 @@ if (process.env.SEMANTIC_RELEASE_SLACK_WEBHOOK) {
|
|
|
83
106
|
},
|
|
84
107
|
]);
|
|
85
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Git plugin must be in latest position
|
|
111
|
+
* because it will seek for files changed from the process
|
|
112
|
+
* and commit them. If you move the definition to soon, nothing will be pushed.
|
|
113
|
+
*/
|
|
114
|
+
plugins.push([
|
|
115
|
+
"@semantic-release/git",
|
|
116
|
+
{
|
|
117
|
+
assets: [
|
|
118
|
+
`changelogs/CHANGELOG_${releaseChannel}.md`,
|
|
119
|
+
"package.json",
|
|
120
|
+
"package-lock.json",
|
|
121
|
+
"pnpm-lock.yaml",
|
|
122
|
+
"yarn.lock",
|
|
123
|
+
...workspacePkgFiles,
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
]);
|
|
86
127
|
//# sourceMappingURL=index.js.map
|
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":";;;;;;AACA,0DAA2B;AAC3B,sDAAyB;AAEzB;;;;;GAKG;AACH,SAAS,4BAA4B;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAE,CAAC,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;IACpE,IAAI,UAAU,GAAa,EAAE,CAAC;IAE9B,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACtC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAClC,CAAC;SAAM,IAAI,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5E,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAED,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CACrC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,EAAE,eAAe,CAC9D,CAAC;IAEF,OAAO,mBAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;QACvB,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,IAAI;QACZ,GAAG,EAAE,KAAK;QACV,mBAAmB,EAAE,IAAI;KAC1B,CAAC,CAAC;AACL,CAAC;AAED;;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;AA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;SAC3D;KACF;CACF,CAAC;AAgDiB,0BAAO;AA9C1B,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;AAC3C,CAAC;AAED,IAAI,OAAO,CAAC,GAAG,CAAC,4BAA4B,KAAK,MAAM,EAAE,CAAC;IACxD,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACxC,CAAC;KAAM,CAAC;IACN,OAAO,CAAC,IAAI,CAAC;QACX,uBAAuB;QACvB;YACE,UAAU,EAAE,KAAK;SAClB;KACF,CAAC,CAAC;AACL,CAAC;AAED,IAAI,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC;QACX,4BAA4B;QAC5B;YACE,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,IAAI;YACrB,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,8BAA8B;SACzD;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AAEH,OAAO,CAAC,IAAI,CAAC;IACX,uBAAuB;IACvB;QACE,MAAM,EAAE;YACN,wBAAwB,cAAc,KAAK;YAC3C,cAAc;YACd,mBAAmB;YACnB,gBAAgB;YAChB,WAAW;YACX,GAAG,iBAAiB;SACrB;KACF;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release-config-kuzzle",
|
|
3
|
-
"version": "1.4.0-develop.
|
|
3
|
+
"version": "1.4.0-develop.4",
|
|
4
4
|
"description": "The semantic-release shareable config we use for Kuzzle projects.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@semantic-release/npm": "13.1.3",
|
|
31
31
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
32
32
|
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
33
|
+
"fast-glob": "^3.3.3",
|
|
33
34
|
"semantic-release": "25.0.2",
|
|
34
35
|
"semantic-release-slack-bot": "4.0.2"
|
|
35
36
|
},
|