move-semver-tags-action 7.0.21 → 7.0.22
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/bin/index.js +2 -2
- package/package.json +8 -12
- package/src/action.js +1 -1
- package/src/defaults.js +1 -1
- package/src/git.js +4 -4
- package/src/index.js +10 -10
package/bin/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "move-semver-tags-action",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.22",
|
|
4
4
|
"description": "Move your SemVer major and minor tags automatically",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint:git": "node node_modules/@crowdstrike/commitlint/bin --from HEAD~1",
|
|
15
|
-
"lint": "eslint
|
|
15
|
+
"lint": "eslint",
|
|
16
16
|
"test": "mocha",
|
|
17
17
|
"release": "commit-and-tag-version --commit-all"
|
|
18
18
|
},
|
|
@@ -49,21 +49,17 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@crowdstrike/commitlint": "^8.0.3",
|
|
52
|
-
"@kellyselden/node-template": "6.
|
|
52
|
+
"@kellyselden/node-template": "6.8.3",
|
|
53
53
|
"@vercel/ncc": "0.38.3",
|
|
54
54
|
"chai": "^4.5.0",
|
|
55
55
|
"commit-and-tag-version": "^12.0.0",
|
|
56
|
-
"eslint": "^
|
|
57
|
-
"eslint-config-sane": "^
|
|
58
|
-
"eslint-config-sane-node": "^2.0.0",
|
|
59
|
-
"eslint-plugin-json-files": "^5.1.0",
|
|
56
|
+
"eslint": "^9.34.0",
|
|
57
|
+
"eslint-config-sane-node": "^5.0.0",
|
|
60
58
|
"eslint-plugin-mocha": "^10.5.0",
|
|
61
|
-
"eslint-plugin-n": "^17.20.0",
|
|
62
|
-
"eslint-plugin-prefer-let": "^4.0.0",
|
|
63
59
|
"git-fixtures": "^9.0.0",
|
|
64
|
-
"mocha": "^11.7.
|
|
65
|
-
"mocha-helpers": "^10.
|
|
66
|
-
"renovate-config-standard": "2.
|
|
60
|
+
"mocha": "^11.7.1",
|
|
61
|
+
"mocha-helpers": "^10.2.1",
|
|
62
|
+
"renovate-config-standard": "2.4.2",
|
|
67
63
|
"sinon": "^21.0.0",
|
|
68
64
|
"standard-node-template": "7.2.0"
|
|
69
65
|
}
|
package/src/action.js
CHANGED
package/src/defaults.js
CHANGED
package/src/git.js
CHANGED
|
@@ -13,9 +13,9 @@ async function getTags(tmpPath) {
|
|
|
13
13
|
'-v:refname',
|
|
14
14
|
'--format',
|
|
15
15
|
'%(*objectname) %(tag) %(subject)',
|
|
16
|
-
'refs/tags'
|
|
16
|
+
'refs/tags',
|
|
17
17
|
], {
|
|
18
|
-
cwd: tmpPath
|
|
18
|
+
cwd: tmpPath,
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
let lines = stdout.split(EOL);
|
|
@@ -26,7 +26,7 @@ async function getTags(tmpPath) {
|
|
|
26
26
|
return {
|
|
27
27
|
commit,
|
|
28
28
|
tag,
|
|
29
|
-
message: message.join(' ')
|
|
29
|
+
message: message.join(' '),
|
|
30
30
|
};
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -34,5 +34,5 @@ async function getTags(tmpPath) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
module.exports = {
|
|
37
|
-
getTags
|
|
37
|
+
getTags,
|
|
38
38
|
};
|
package/src/index.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
const semver = require('semver');
|
|
4
4
|
const {
|
|
5
|
-
getTags
|
|
5
|
+
getTags,
|
|
6
6
|
} = require('./git');
|
|
7
7
|
const defaults = require('../src/defaults');
|
|
8
8
|
|
|
9
9
|
async function moveSemverTags({
|
|
10
10
|
cwd: tmpPath = process.cwd(),
|
|
11
|
-
copyAnnotations = defaults.copyAnnotations
|
|
11
|
+
copyAnnotations = defaults.copyAnnotations,
|
|
12
12
|
}) {
|
|
13
13
|
let { execa } = await import('execa');
|
|
14
14
|
|
|
@@ -20,11 +20,11 @@ async function moveSemverTags({
|
|
|
20
20
|
for (let {
|
|
21
21
|
commit,
|
|
22
22
|
tag,
|
|
23
|
-
message
|
|
23
|
+
message,
|
|
24
24
|
} of tags) {
|
|
25
25
|
tagsObj[tag] = {
|
|
26
26
|
commit,
|
|
27
|
-
message
|
|
27
|
+
message,
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
if (semver.valid(tag) === null) {
|
|
@@ -35,7 +35,7 @@ async function moveSemverTags({
|
|
|
35
35
|
|
|
36
36
|
let {
|
|
37
37
|
major,
|
|
38
|
-
minor
|
|
38
|
+
minor,
|
|
39
39
|
} = parsed;
|
|
40
40
|
|
|
41
41
|
let majorMinor = `${major}.${minor}`;
|
|
@@ -45,7 +45,7 @@ async function moveSemverTags({
|
|
|
45
45
|
|
|
46
46
|
Object.assign(tagsObj[tag], {
|
|
47
47
|
major: `v${major}`,
|
|
48
|
-
minor: `v${major}.${minor}
|
|
48
|
+
minor: `v${major}.${minor}`,
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -56,14 +56,14 @@ async function moveSemverTags({
|
|
|
56
56
|
for (let [tag, range] of Object.entries(majorsAndMinors)) {
|
|
57
57
|
let {
|
|
58
58
|
commit: originalCommit,
|
|
59
|
-
message: originalMessage = ''
|
|
59
|
+
message: originalMessage = '',
|
|
60
60
|
} = tagsObj[tag] || {};
|
|
61
61
|
|
|
62
62
|
let maxSatisfying = semver.maxSatisfying(tagVersions, range);
|
|
63
63
|
|
|
64
64
|
let {
|
|
65
65
|
commit: maxSatisfyingCommit,
|
|
66
|
-
message: maxSatisfyingMessage
|
|
66
|
+
message: maxSatisfyingMessage,
|
|
67
67
|
} = tagsObj[maxSatisfying];
|
|
68
68
|
|
|
69
69
|
if (maxSatisfyingCommit === originalCommit) {
|
|
@@ -79,14 +79,14 @@ async function moveSemverTags({
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
await execa('git', ['tag', '-a', tag, maxSatisfyingCommit, '--force', '-m', message], {
|
|
82
|
-
cwd: tmpPath
|
|
82
|
+
cwd: tmpPath,
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
newTags.push(tag);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
await execa('git', ['push', 'origin', 'tag', ...newTags, '--force'], {
|
|
89
|
-
cwd: tmpPath
|
|
89
|
+
cwd: tmpPath,
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|