semantic-release-config-kuzzle 1.6.0 → 1.7.0-develop.2
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/README.md +1 -0
- package/dist/branches.d.ts +4 -0
- package/dist/branches.js +15 -0
- package/dist/branches.js.map +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +4 -150
- package/dist/index.js.map +1 -1
- package/dist/plugins.d.ts +7 -0
- package/dist/plugins.js +99 -0
- package/dist/plugins.js.map +1 -0
- package/dist/release-channel.d.ts +3 -0
- package/dist/release-channel.js +27 -0
- package/dist/release-channel.js.map +1 -0
- package/dist/workspaces.d.ts +4 -0
- package/dist/workspaces.js +30 -0
- package/dist/workspaces.js.map +1 -0
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ Shareable `semantic-release` configuration used by Kuzzle projects.
|
|
|
5
5
|
It provides:
|
|
6
6
|
- sensible default branches
|
|
7
7
|
- changelogs per release channel
|
|
8
|
+
- a `minor` release for `chore(deps):` commits
|
|
8
9
|
- optional GitHub/NPM/Slack integrations
|
|
9
10
|
- workspace version bumping when using npm workspaces
|
|
10
11
|
|
package/dist/branches.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.branches = exports.developBranchName = exports.releaseBranchName = void 0;
|
|
4
|
+
exports.releaseBranchName = process.env.SEMANTIC_RELEASE_RELEASE_BRANCH ?? "main";
|
|
5
|
+
exports.developBranchName = process.env.SEMANTIC_RELEASE_DEVELOP_BRANCH ?? "develop";
|
|
6
|
+
exports.branches = [
|
|
7
|
+
{
|
|
8
|
+
name: exports.releaseBranchName,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: exports.developBranchName,
|
|
12
|
+
prerelease: true,
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=branches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branches.js","sourceRoot":"","sources":["../lib/branches.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAC5B,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,MAAM,CAAC;AAE3C,QAAA,iBAAiB,GAC5B,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,SAAS,CAAC;AAE9C,QAAA,QAAQ,GAAiB;IACpC;QACE,IAAI,EAAE,yBAAiB;KACxB;IACD;QACE,IAAI,EAAE,yBAAiB;QACvB,UAAU,EAAE,IAAI;KACjB;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,154 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.plugins = exports.branches = void 0;
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Default semantic-release configuration for Kuzzle projects.
|
|
34
|
-
*/
|
|
35
|
-
const releaseBranchName = process.env.SEMANTIC_RELEASE_RELEASE_BRANCH ?? "main";
|
|
36
|
-
const developBranchName = process.env.SEMANTIC_RELEASE_DEVELOP_BRANCH ?? "develop";
|
|
37
|
-
const branches = [
|
|
38
|
-
{
|
|
39
|
-
name: releaseBranchName,
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: developBranchName,
|
|
43
|
-
prerelease: true,
|
|
44
|
-
},
|
|
45
|
-
];
|
|
46
|
-
exports.branches = branches;
|
|
47
|
-
/**
|
|
48
|
-
* Default plugins configuration.
|
|
49
|
-
* Main thing here is to use a different changelog file depending on the release channel.
|
|
50
|
-
*/
|
|
51
|
-
const inferReleaseChannel = () => {
|
|
52
|
-
const ref = process.env.GITHUB_REF_NAME ||
|
|
53
|
-
process.env.GITHUB_HEAD_REF ||
|
|
54
|
-
process.env.CI_COMMIT_BRANCH ||
|
|
55
|
-
process.env.CI_COMMIT_REF_NAME ||
|
|
56
|
-
process.env.BITBUCKET_BRANCH ||
|
|
57
|
-
process.env.CIRCLE_BRANCH ||
|
|
58
|
-
process.env.TRAVIS_BRANCH ||
|
|
59
|
-
process.env.BRANCH_NAME ||
|
|
60
|
-
process.env.GITHUB_REF;
|
|
61
|
-
if (!ref) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const normalizedRef = ref.startsWith("refs/heads/")
|
|
65
|
-
? ref.slice("refs/heads/".length)
|
|
66
|
-
: ref;
|
|
67
|
-
return normalizedRef.split("/").pop();
|
|
68
|
-
};
|
|
69
|
-
const workspacePkgFiles = getWorkspacePackageJsonFiles();
|
|
70
|
-
const releaseChannel = process.env.RELEASE_CHANNEL || inferReleaseChannel() || releaseBranchName;
|
|
71
|
-
const plugins = [
|
|
72
|
-
["@semantic-release/commit-analyzer", { preset: "conventionalcommits" }],
|
|
73
|
-
[
|
|
74
|
-
"@semantic-release/release-notes-generator",
|
|
75
|
-
{ preset: "conventionalcommits" },
|
|
76
|
-
],
|
|
77
|
-
[
|
|
78
|
-
"@semantic-release/changelog",
|
|
79
|
-
{
|
|
80
|
-
changelogFile: `changelogs/CHANGELOG_${releaseChannel}.md`,
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
];
|
|
84
|
-
exports.plugins = plugins;
|
|
85
|
-
if (process.env.GITHUB_TOKEN) {
|
|
86
|
-
plugins.push("@semantic-release/github");
|
|
87
|
-
}
|
|
88
|
-
const shouldPublishToNpm = process.env.SEMANTIC_RELEASE_NPM_PUBLISH === "true";
|
|
89
|
-
if (shouldPublishToNpm && workspacePkgFiles.length === 0) {
|
|
90
|
-
plugins.push("@semantic-release/npm");
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
plugins.push([
|
|
94
|
-
"@semantic-release/npm",
|
|
95
|
-
{
|
|
96
|
-
npmPublish: false,
|
|
97
|
-
},
|
|
98
|
-
]);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Add the exec plugin to update the version of workspaces
|
|
102
|
-
* Only if there is actual workspace to update :)
|
|
103
|
-
*/
|
|
104
|
-
if (workspacePkgFiles.length > 0) {
|
|
105
|
-
const shouldBuildPkg = process.env.SEMANTIC_RELEASE_NPM_BUILD === "true";
|
|
106
|
-
/**
|
|
107
|
-
* Sometimes we want to build the package after the version bump
|
|
108
|
-
* So the only way we can do that is by executing the build command
|
|
109
|
-
* After the npm version happened
|
|
110
|
-
*/
|
|
111
|
-
let prepareCmdString = "npm version ${nextRelease.version} --workspaces --no-git-tag-version";
|
|
112
|
-
if (shouldBuildPkg) {
|
|
113
|
-
prepareCmdString += " && npm run build";
|
|
114
|
-
}
|
|
115
|
-
const npmTag = releaseChannel;
|
|
116
|
-
plugins.push([
|
|
117
|
-
"@semantic-release/exec",
|
|
118
|
-
{
|
|
119
|
-
prepareCmd: prepareCmdString,
|
|
120
|
-
publishCmd: shouldPublishToNpm
|
|
121
|
-
? `npm publish --workspaces --if-present --tag ${npmTag}`
|
|
122
|
-
: undefined,
|
|
123
|
-
},
|
|
124
|
-
]);
|
|
125
|
-
}
|
|
126
|
-
if (process.env.SEMANTIC_RELEASE_SLACK_WEBHOOK) {
|
|
127
|
-
plugins.push([
|
|
128
|
-
"semantic-release-slack-bot",
|
|
129
|
-
{
|
|
130
|
-
notifyOnFail: false,
|
|
131
|
-
notifyOnSuccess: true,
|
|
132
|
-
slackWebhook: process.env.SEMANTIC_RELEASE_SLACK_WEBHOOK,
|
|
133
|
-
},
|
|
134
|
-
]);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Git plugin must be in latest position
|
|
138
|
-
* because it will seek for files changed from the process
|
|
139
|
-
* and commit them. If you move the definition to soon, nothing will be pushed.
|
|
140
|
-
*/
|
|
141
|
-
plugins.push([
|
|
142
|
-
"@semantic-release/git",
|
|
143
|
-
{
|
|
144
|
-
assets: [
|
|
145
|
-
`changelogs/CHANGELOG_${releaseChannel}.md`,
|
|
146
|
-
"package.json",
|
|
147
|
-
"package-lock.json",
|
|
148
|
-
"pnpm-lock.yaml",
|
|
149
|
-
"yarn.lock",
|
|
150
|
-
...workspacePkgFiles,
|
|
151
|
-
],
|
|
152
|
-
},
|
|
153
|
-
]);
|
|
4
|
+
const branches_1 = require("./branches");
|
|
5
|
+
Object.defineProperty(exports, "branches", { enumerable: true, get: function () { return branches_1.branches; } });
|
|
6
|
+
const plugins_1 = require("./plugins");
|
|
7
|
+
Object.defineProperty(exports, "plugins", { enumerable: true, get: function () { return plugins_1.plugins; } });
|
|
154
8
|
//# 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":";;;AAAA,yCAAsC;AAG7B,yFAHA,mBAAQ,OAGA;AAFjB,uCAAoC;AAEjB,wFAFV,iBAAO,OAEU"}
|
package/dist/plugins.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.plugins = void 0;
|
|
4
|
+
const release_channel_1 = require("./release-channel");
|
|
5
|
+
const workspaces_1 = require("./workspaces");
|
|
6
|
+
const workspacePkgFiles = (0, workspaces_1.getWorkspacePackageJsonFiles)();
|
|
7
|
+
/**
|
|
8
|
+
* Default plugins configuration.
|
|
9
|
+
* Main thing here is to use a different changelog file depending on the release channel.
|
|
10
|
+
*/
|
|
11
|
+
const plugins = [
|
|
12
|
+
[
|
|
13
|
+
"@semantic-release/commit-analyzer",
|
|
14
|
+
{
|
|
15
|
+
preset: "conventionalcommits",
|
|
16
|
+
releaseRules: [{ type: "chore", scope: "deps", release: "minor" }],
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
"@semantic-release/release-notes-generator",
|
|
21
|
+
{ preset: "conventionalcommits" },
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"@semantic-release/changelog",
|
|
25
|
+
{
|
|
26
|
+
changelogFile: `changelogs/CHANGELOG_${release_channel_1.releaseChannel}.md`,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
];
|
|
30
|
+
exports.plugins = plugins;
|
|
31
|
+
if (process.env.GITHUB_TOKEN) {
|
|
32
|
+
plugins.push("@semantic-release/github");
|
|
33
|
+
}
|
|
34
|
+
const shouldPublishToNpm = process.env.SEMANTIC_RELEASE_NPM_PUBLISH === "true";
|
|
35
|
+
if (shouldPublishToNpm && workspacePkgFiles.length === 0) {
|
|
36
|
+
plugins.push("@semantic-release/npm");
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
plugins.push([
|
|
40
|
+
"@semantic-release/npm",
|
|
41
|
+
{
|
|
42
|
+
npmPublish: false,
|
|
43
|
+
},
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Add the exec plugin to update the version of workspaces
|
|
48
|
+
* only if there are actual workspaces to update.
|
|
49
|
+
*/
|
|
50
|
+
if (workspacePkgFiles.length > 0) {
|
|
51
|
+
const shouldBuildPkg = process.env.SEMANTIC_RELEASE_NPM_BUILD === "true";
|
|
52
|
+
/**
|
|
53
|
+
* Sometimes we want to build the package after the version bump
|
|
54
|
+
* So the only way we can do that is by executing the build command
|
|
55
|
+
* After the npm version happened
|
|
56
|
+
*/
|
|
57
|
+
let prepareCmdString = "npm version ${nextRelease.version} --workspaces --no-git-tag-version";
|
|
58
|
+
if (shouldBuildPkg) {
|
|
59
|
+
prepareCmdString += " && npm run build";
|
|
60
|
+
}
|
|
61
|
+
const npmTag = release_channel_1.releaseChannel;
|
|
62
|
+
plugins.push([
|
|
63
|
+
"@semantic-release/exec",
|
|
64
|
+
{
|
|
65
|
+
prepareCmd: prepareCmdString,
|
|
66
|
+
publishCmd: shouldPublishToNpm
|
|
67
|
+
? `npm publish --workspaces --if-present --tag ${npmTag}`
|
|
68
|
+
: undefined,
|
|
69
|
+
},
|
|
70
|
+
]);
|
|
71
|
+
}
|
|
72
|
+
if (process.env.SEMANTIC_RELEASE_SLACK_WEBHOOK) {
|
|
73
|
+
plugins.push([
|
|
74
|
+
"semantic-release-slack-bot",
|
|
75
|
+
{
|
|
76
|
+
notifyOnFail: false,
|
|
77
|
+
notifyOnSuccess: true,
|
|
78
|
+
slackWebhook: process.env.SEMANTIC_RELEASE_SLACK_WEBHOOK,
|
|
79
|
+
},
|
|
80
|
+
]);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Git plugin must be in last position because it looks for files changed by
|
|
84
|
+
* previous plugins and commits them.
|
|
85
|
+
*/
|
|
86
|
+
plugins.push([
|
|
87
|
+
"@semantic-release/git",
|
|
88
|
+
{
|
|
89
|
+
assets: [
|
|
90
|
+
`changelogs/CHANGELOG_${release_channel_1.releaseChannel}.md`,
|
|
91
|
+
"package.json",
|
|
92
|
+
"package-lock.json",
|
|
93
|
+
"pnpm-lock.yaml",
|
|
94
|
+
"yarn.lock",
|
|
95
|
+
...workspacePkgFiles,
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
]);
|
|
99
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../lib/plugins.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AACnD,6CAA4D;AAE5D,MAAM,iBAAiB,GAAG,IAAA,yCAA4B,GAAE,CAAC;AAEzD;;;GAGG;AACH,MAAM,OAAO,GAAiB;IAC5B;QACE,mCAAmC;QACnC;YACE,MAAM,EAAE,qBAAqB;YAC7B,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;SACnE;KACF;IACD;QACE,2CAA2C;QAC3C,EAAE,MAAM,EAAE,qBAAqB,EAAE;KAClC;IACD;QACE,6BAA6B;QAC7B;YACE,aAAa,EAAE,wBAAwB,gCAAc,KAAK;SAC3D;KACF;CACF,CAAC;AA+EO,0BAAO;AA7EhB,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA4B,KAAK,MAAM,CAAC;AAE/E,IAAI,kBAAkB,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;IACzD,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;;;GAGG;AACH,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;IACjC,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,KAAK,MAAM,CAAC;IAEzE;;;;OAIG;IACH,IAAI,gBAAgB,GAClB,sEAAsE,CAAC;IAEzE,IAAI,cAAc,EAAE,CAAC;QACnB,gBAAgB,IAAI,mBAAmB,CAAC;IAC1C,CAAC;IAED,MAAM,MAAM,GAAG,gCAAc,CAAC;IAC9B,OAAO,CAAC,IAAI,CAAC;QACX,wBAAwB;QACxB;YACE,UAAU,EAAE,gBAAgB;YAC5B,UAAU,EAAE,kBAAkB;gBAC5B,CAAC,CAAC,+CAA+C,MAAM,EAAE;gBACzD,CAAC,CAAC,SAAS;SACd;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;;;GAGG;AACH,OAAO,CAAC,IAAI,CAAC;IACX,uBAAuB;IACvB;QACE,MAAM,EAAE;YACN,wBAAwB,gCAAc,KAAK;YAC3C,cAAc;YACd,mBAAmB;YACnB,gBAAgB;YAChB,WAAW;YACX,GAAG,iBAAiB;SACrB;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.releaseChannel = exports.getReleaseChannel = exports.inferReleaseChannel = void 0;
|
|
4
|
+
const branches_1 = require("./branches");
|
|
5
|
+
const inferReleaseChannel = () => {
|
|
6
|
+
const ref = process.env.GITHUB_REF_NAME ||
|
|
7
|
+
process.env.GITHUB_HEAD_REF ||
|
|
8
|
+
process.env.CI_COMMIT_BRANCH ||
|
|
9
|
+
process.env.CI_COMMIT_REF_NAME ||
|
|
10
|
+
process.env.BITBUCKET_BRANCH ||
|
|
11
|
+
process.env.CIRCLE_BRANCH ||
|
|
12
|
+
process.env.TRAVIS_BRANCH ||
|
|
13
|
+
process.env.BRANCH_NAME ||
|
|
14
|
+
process.env.GITHUB_REF;
|
|
15
|
+
if (!ref) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const normalizedRef = ref.startsWith("refs/heads/")
|
|
19
|
+
? ref.slice("refs/heads/".length)
|
|
20
|
+
: ref;
|
|
21
|
+
return normalizedRef.split("/").pop();
|
|
22
|
+
};
|
|
23
|
+
exports.inferReleaseChannel = inferReleaseChannel;
|
|
24
|
+
const getReleaseChannel = () => process.env.RELEASE_CHANNEL || (0, exports.inferReleaseChannel)() || branches_1.releaseBranchName;
|
|
25
|
+
exports.getReleaseChannel = getReleaseChannel;
|
|
26
|
+
exports.releaseChannel = (0, exports.getReleaseChannel)();
|
|
27
|
+
//# sourceMappingURL=release-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-channel.js","sourceRoot":"","sources":["../lib/release-channel.ts"],"names":[],"mappings":";;;AAAA,yCAA+C;AAExC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,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,aAAa,CAAC;QACjD,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC;QACjC,CAAC,CAAC,GAAG,CAAC;IAER,OAAO,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;AACxC,CAAC,CAAC;AArBW,QAAA,mBAAmB,uBAqB9B;AAEK,MAAM,iBAAiB,GAAG,GAAG,EAAE,CACpC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,IAAA,2BAAmB,GAAE,IAAI,4BAAiB,CAAC;AAD/D,QAAA,iBAAiB,qBAC8C;AAE/D,QAAA,cAAc,GAAG,IAAA,yBAAiB,GAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getWorkspacePackageJsonFiles = void 0;
|
|
7
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
+
/**
|
|
10
|
+
* Returns package.json files declared by the root package workspaces.
|
|
11
|
+
*/
|
|
12
|
+
function getWorkspacePackageJsonFiles() {
|
|
13
|
+
const rootPkg = JSON.parse(node_fs_1.default.readFileSync("package.json", "utf8"));
|
|
14
|
+
let workspaces = [];
|
|
15
|
+
if (Array.isArray(rootPkg.workspaces)) {
|
|
16
|
+
workspaces = rootPkg.workspaces;
|
|
17
|
+
}
|
|
18
|
+
else if (rootPkg.workspaces && Array.isArray(rootPkg.workspaces.packages)) {
|
|
19
|
+
workspaces = rootPkg.workspaces.packages;
|
|
20
|
+
}
|
|
21
|
+
const patterns = workspaces.map((ws) => ws.endsWith("/") ? `${ws}package.json` : `${ws}/package.json`);
|
|
22
|
+
return fast_glob_1.default.sync(patterns, {
|
|
23
|
+
onlyFiles: true,
|
|
24
|
+
unique: true,
|
|
25
|
+
dot: false,
|
|
26
|
+
followSymbolicLinks: true,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
exports.getWorkspacePackageJsonFiles = getWorkspacePackageJsonFiles;
|
|
30
|
+
//# sourceMappingURL=workspaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../lib/workspaces.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA2B;AAC3B,sDAAyB;AAEzB;;GAEG;AACH,SAAgB,4BAA4B;IAC1C,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;AApBD,oEAoBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release-config-kuzzle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-develop.2",
|
|
4
4
|
"description": "The semantic-release shareable config we use for Kuzzle projects.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsc",
|
|
19
|
-
"lint": "eslint",
|
|
20
|
-
"lint:fix": "eslint --fix",
|
|
21
|
-
"test": "
|
|
19
|
+
"lint": "eslint --ext .ts lib tests vitest.config.ts",
|
|
20
|
+
"lint:fix": "eslint --fix --ext .ts lib tests vitest.config.ts",
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"test:coverage": "vitest run --coverage",
|
|
22
23
|
"semantic-release:dry-run": "semantic-release --dry-run",
|
|
23
24
|
"semantic-release": "semantic-release"
|
|
24
25
|
},
|
|
@@ -27,24 +28,24 @@
|
|
|
27
28
|
"@semantic-release/commit-analyzer": "13.0.1",
|
|
28
29
|
"@semantic-release/exec": "7.1.0",
|
|
29
30
|
"@semantic-release/git": "10.0.1",
|
|
30
|
-
"@semantic-release/github": "12.0.
|
|
31
|
-
"@semantic-release/npm": "13.1.
|
|
31
|
+
"@semantic-release/github": "12.0.6",
|
|
32
|
+
"@semantic-release/npm": "13.1.5",
|
|
32
33
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
33
|
-
"conventional-changelog-conventionalcommits": "9.1
|
|
34
|
+
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
34
35
|
"fast-glob": "^3.3.3",
|
|
35
|
-
"semantic-release": "25.0.
|
|
36
|
+
"semantic-release": "25.0.3",
|
|
36
37
|
"semantic-release-slack-bot": "4.0.2"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/node": "24.*.*",
|
|
40
41
|
"@types/semantic-release": "21.1.0",
|
|
42
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
41
43
|
"eslint-plugin-kuzzle": "0.0.15",
|
|
42
|
-
"typescript": "5.4.*"
|
|
44
|
+
"typescript": "5.4.*",
|
|
45
|
+
"vitest": "4.1.5"
|
|
43
46
|
},
|
|
44
47
|
"files": [
|
|
45
48
|
"CHANGELOG.md",
|
|
46
|
-
"dist
|
|
47
|
-
"dist/index.js.map",
|
|
48
|
-
"dist/index.d.ts"
|
|
49
|
+
"dist"
|
|
49
50
|
]
|
|
50
51
|
}
|