move-semver-tags-action 7.0.21 → 7.0.23

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 CHANGED
@@ -9,8 +9,8 @@ const { argv } = require('yargs')
9
9
  'copy-annotations': {
10
10
  description: 'Copy the annotation from the latest tag',
11
11
  type: 'boolean',
12
- default: defaults.copyAnnotations
13
- }
12
+ default: defaults.copyAnnotations,
13
+ },
14
14
  });
15
15
 
16
16
  index(argv);
package/package.json CHANGED
@@ -1,44 +1,35 @@
1
1
  {
2
2
  "name": "move-semver-tags-action",
3
- "version": "7.0.21",
3
+ "version": "7.0.23",
4
4
  "description": "Move your SemVer major and minor tags automatically",
5
- "main": "src/index.js",
6
- "files": [
7
- "bin",
8
- "src"
9
- ],
10
- "bin": {
11
- "move-semver-tags-action": "bin/index.js"
12
- },
13
- "scripts": {
14
- "lint:git": "node node_modules/@crowdstrike/commitlint/bin --from HEAD~1",
15
- "lint": "eslint . --ext js,json",
16
- "test": "mocha",
17
- "release": "commit-and-tag-version --commit-all"
18
- },
19
- "commit-and-tag-version": {
20
- "scripts": {
21
- "prerelease": "ncc build src/action.js -o dist && git add -A dist",
22
- "posttag": "git push --follow-tags --atomic"
23
- }
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/kellyselden/move-semver-tags-action.git"
28
- },
29
5
  "keywords": [
30
6
  "github-actions",
31
7
  "semver",
32
8
  "tags"
33
9
  ],
34
- "author": "Kelly Selden, Jenny Judova, & Gonçalo Morais",
35
- "license": "MIT",
10
+ "homepage": "https://github.com/kellyselden/move-semver-tags-action#readme",
36
11
  "bugs": {
37
12
  "url": "https://github.com/kellyselden/move-semver-tags-action/issues"
38
13
  },
39
- "homepage": "https://github.com/kellyselden/move-semver-tags-action#readme",
40
- "engines": {
41
- "node": ">=20.9"
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/kellyselden/move-semver-tags-action.git"
17
+ },
18
+ "license": "MIT",
19
+ "author": "Kelly Selden, Jenny Judova, & Gonçalo Morais",
20
+ "main": "src/index.js",
21
+ "bin": {
22
+ "move-semver-tags-action": "bin/index.js"
23
+ },
24
+ "files": [
25
+ "bin",
26
+ "src"
27
+ ],
28
+ "scripts": {
29
+ "lint": "eslint",
30
+ "lint:git": "node node_modules/@crowdstrike/commitlint/bin --from HEAD~1",
31
+ "release": "commit-and-tag-version --commit-all",
32
+ "test": "mocha"
42
33
  },
43
34
  "dependencies": {
44
35
  "@actions/core": "^1.2.6",
@@ -49,22 +40,27 @@
49
40
  },
50
41
  "devDependencies": {
51
42
  "@crowdstrike/commitlint": "^8.0.3",
52
- "@kellyselden/node-template": "6.5.2",
43
+ "@kellyselden/node-template": "6.9.0",
53
44
  "@vercel/ncc": "0.38.3",
54
45
  "chai": "^4.5.0",
55
46
  "commit-and-tag-version": "^12.0.0",
56
- "eslint": "^8.57.1",
57
- "eslint-config-sane": "^1.0.2",
58
- "eslint-config-sane-node": "^2.0.0",
59
- "eslint-plugin-json-files": "^5.1.0",
47
+ "eslint": "^9.34.0",
48
+ "eslint-config-sane-node": "^6.0.0",
60
49
  "eslint-plugin-mocha": "^10.5.0",
61
- "eslint-plugin-n": "^17.20.0",
62
- "eslint-plugin-prefer-let": "^4.0.0",
63
50
  "git-fixtures": "^9.0.0",
64
- "mocha": "^11.7.0",
65
- "mocha-helpers": "^10.0.0",
66
- "renovate-config-standard": "2.3.0",
51
+ "mocha": "^11.7.1",
52
+ "mocha-helpers": "^10.2.1",
53
+ "renovate-config-standard": "2.4.2",
67
54
  "sinon": "^21.0.0",
68
55
  "standard-node-template": "7.2.0"
56
+ },
57
+ "engines": {
58
+ "node": ">=20.9"
59
+ },
60
+ "commit-and-tag-version": {
61
+ "scripts": {
62
+ "prerelease": "ncc build src/action.js -o dist && git add -A dist",
63
+ "posttag": "git push --follow-tags --atomic"
64
+ }
69
65
  }
70
66
  }
package/src/action.js CHANGED
@@ -9,7 +9,7 @@ const index = require('.');
9
9
 
10
10
  try {
11
11
  await index({
12
- copyAnnotations: yn(core.getInput('copy-annotations'))
12
+ copyAnnotations: yn(core.getInput('copy-annotations')),
13
13
  });
14
14
  } catch (err) {
15
15
  core.setFailed(err.message);
package/src/defaults.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- copyAnnotations: false
4
+ copyAnnotations: false,
5
5
  };
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