actions-up 1.14.1 → 1.14.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.
@@ -1,9 +1,10 @@
1
- import { normalizeVersion as e } from "../versions/normalize-version.js";
2
- import { isSemverLike as t } from "../versions/is-semver-like.js";
3
- import { createGitHubClient as n } from "./create-github-client.js";
4
- import r from "semver";
5
- async function i(i, o, u) {
6
- let d = u?.client ?? n(o), f = u?.includeBranches ?? !1, p = u?.style ?? "sha", m = i.filter((e) => e.type === "external" || e.type === "reusable-workflow");
1
+ import { isSemverLike as e } from "../versions/is-semver-like.js";
2
+ import { preserveTagFormat as t } from "../versions/preserve-tag-format.js";
3
+ import { normalizeVersion as n } from "../versions/normalize-version.js";
4
+ import { createGitHubClient as r } from "./create-github-client.js";
5
+ import i from "semver";
6
+ async function a(t, a, s) {
7
+ let d = s?.client ?? r(a), f = s?.includeBranches ?? !1, p = s?.style ?? "sha", m = t.filter((e) => e.type === "external" || e.type === "reusable-workflow");
7
8
  if (m.length === 0) return [];
8
9
  let h = /* @__PURE__ */ new Map();
9
10
  for (let e of m) {
@@ -13,158 +14,158 @@ async function i(i, o, u) {
13
14
  let g = {
14
15
  rateLimitError: null,
15
16
  rateLimitHit: !1
16
- }, _ = await [...h.keys()].reduce((n, i) => n.then(async (n) => {
17
- if (g.rateLimitHit) return [...n, {
17
+ }, _ = await [...h.keys()].reduce((t, r) => t.then(async (t) => {
18
+ if (g.rateLimitHit) return [...t, {
18
19
  currentRefType: "unknown",
19
20
  publishedAt: null,
20
21
  version: null,
21
- actionName: i,
22
+ actionName: r,
22
23
  sha: null
23
24
  }];
24
- let a = i.split("/");
25
- if (a.length < 2) return [...n, {
25
+ let a = r.split("/");
26
+ if (a.length < 2) return [...t, {
26
27
  currentRefType: "unknown",
27
28
  publishedAt: null,
28
29
  version: null,
29
- actionName: i,
30
+ actionName: r,
30
31
  sha: null
31
32
  }];
32
- let [o, u] = a;
33
- if (!o || !u) return [...n, {
33
+ let [o, s] = a;
34
+ if (!o || !s) return [...t, {
34
35
  currentRefType: "unknown",
35
36
  publishedAt: null,
36
37
  version: null,
37
- actionName: i,
38
+ actionName: r,
38
39
  sha: null
39
40
  }];
40
41
  try {
41
- let a = h.get(i)[0]?.version, p = c(a);
42
- if (a && !s(a) && !t(a)) {
43
- let e = await d.getRefType(o, u, a);
44
- if (p = e === "branch" || e === "tag" ? e : p, e === "branch" && !f) return [...n, {
42
+ let a = h.get(r)[0]?.version, p = l(a);
43
+ if (a && !c(a) && !e(a)) {
44
+ let e = await d.getRefType(o, s, a);
45
+ if (p = e === "branch" || e === "tag" ? e : p, e === "branch" && !f) return [...t, {
45
46
  currentRefType: p,
46
47
  skipReason: "branch",
47
48
  status: "skipped",
48
49
  publishedAt: null,
49
50
  version: null,
50
- actionName: i,
51
+ actionName: r,
51
52
  sha: null
52
53
  }];
53
54
  }
54
- let m = await d.getLatestRelease(o, u);
55
+ let m = await d.getLatestRelease(o, s);
55
56
  if (!m) {
56
- let e = await d.getAllReleases(o, u, 1);
57
+ let e = await d.getAllReleases(o, s, 1);
57
58
  m = e.find((e) => !e.isPrerelease) ?? e[0] ?? null;
58
59
  }
59
60
  if (m) {
60
- let { publishedAt: a, version: s, sha: c } = m, f = !1;
61
+ let { publishedAt: a, version: c, sha: l } = m, f = !1;
61
62
  {
62
- let n = e(s), i = !!(s && s.trim() !== ""), a = i && /^v?\d+$/u.test(s.trim()), o = r.valid(n);
63
- f = !i || a || !o || !t(s);
63
+ let t = n(c), r = !!(c && c.trim() !== ""), a = r && /^v?\d+$/u.test(c.trim()), o = i.valid(t);
64
+ f = !r || a || !o || !e(c);
64
65
  }
65
66
  if (f) {
66
- let a = await d.getAllTags(o, u, 30);
67
+ let a = await d.getAllTags(o, s, 30);
67
68
  if (a.length > 0) {
68
- let c = a.filter((e) => t(e.tag)).map((t) => ({
69
- v: r.valid(e(t.tag)),
70
- raw: t
69
+ let l = a.filter((t) => e(t.tag)).map((e) => ({
70
+ v: i.valid(n(e.tag)),
71
+ raw: e
71
72
  }));
72
- if (c.length > 0) {
73
- c.sort((e, t) => {
74
- let n = r.rcompare(e.v, t.v);
73
+ if (l.length > 0) {
74
+ l.sort((e, t) => {
75
+ let n = i.rcompare(e.v, t.v);
75
76
  if (n !== 0) return n;
76
- let i = +!!/\d+\.\d+/u.test(e.raw.tag);
77
- return +!!/\d+\.\d+/u.test(t.raw.tag) - i;
77
+ let r = +!!/\d+\.\d+/u.test(e.raw.tag);
78
+ return +!!/\d+\.\d+/u.test(t.raw.tag) - r;
78
79
  });
79
- let t = c[0].raw, a = r.valid(e(s) ?? void 0);
80
- if (!a || r.gt(c[0].v, a) || r.eq(c[0].v, a) && /\d+\.\d+/u.test(t.tag)) {
81
- let e = t.tag, r = t.sha?.length ? t.sha : null;
82
- if (!r && e) try {
83
- r = await d.getTagSha(o, u, e);
80
+ let e = l[0].raw, a = i.valid(n(c) ?? void 0);
81
+ if (!a || i.gt(l[0].v, a) || i.eq(l[0].v, a) && /\d+\.\d+/u.test(e.tag)) {
82
+ let n = e.tag, i = e.sha?.length ? e.sha : null;
83
+ if (!i && n) try {
84
+ i = await d.getTagSha(o, s, n);
84
85
  } catch (e) {
85
- if (l(e)) throw e;
86
+ if (u(e)) throw e;
86
87
  }
87
- return [...n, {
88
+ return [...t, {
88
89
  currentRefType: p,
89
- version: e,
90
+ version: n,
90
91
  publishedAt: null,
91
- sha: r,
92
- actionName: i
92
+ sha: i,
93
+ actionName: r
93
94
  }];
94
95
  }
95
96
  }
96
97
  }
97
98
  }
98
- if (s) {
99
- let e = c;
99
+ if (c) {
100
+ let e = l;
100
101
  try {
101
- c = await d.getTagSha(o, u, s) ?? e;
102
+ l = await d.getTagSha(o, s, c) ?? e;
102
103
  } catch (t) {
103
- if (l(t)) throw t;
104
- c = e;
104
+ if (u(t)) throw t;
105
+ l = e;
105
106
  }
106
107
  }
107
- return [...n, {
108
+ return [...t, {
108
109
  currentRefType: p,
109
110
  status: "ok",
110
111
  publishedAt: a,
111
- actionName: i,
112
- version: s,
113
- sha: c
112
+ actionName: r,
113
+ version: c,
114
+ sha: l
114
115
  }];
115
116
  }
116
- let g = await d.getAllTags(o, u, 30);
117
+ let g = await d.getAllTags(o, s, 30);
117
118
  if (g.length > 0) {
118
- let a = g.filter((e) => t(e.tag)).map((t) => ({
119
- v: r.valid(e(t.tag)),
120
- raw: t
121
- })), s;
119
+ let a = g.filter((t) => e(t.tag)).map((e) => ({
120
+ v: i.valid(n(e.tag)),
121
+ raw: e
122
+ })), c;
122
123
  a.length > 0 ? (a.sort((e, t) => {
123
- let n = r.rcompare(e.v, t.v);
124
+ let n = i.rcompare(e.v, t.v);
124
125
  if (n !== 0) return n;
125
- let i = +!!/\d+\.\d+/u.test(e.raw.tag);
126
- return +!!/\d+\.\d+/u.test(t.raw.tag) - i;
127
- }), s = a[0].raw) : s = g[0];
128
- let c = s.tag, f = s.sha?.length ? s.sha : null;
129
- if (!f && c) try {
130
- f = await d.getTagSha(o, u, c);
126
+ let r = +!!/\d+\.\d+/u.test(e.raw.tag);
127
+ return +!!/\d+\.\d+/u.test(t.raw.tag) - r;
128
+ }), c = a[0].raw) : c = g[0];
129
+ let l = c.tag, f = c.sha?.length ? c.sha : null;
130
+ if (!f && l) try {
131
+ f = await d.getTagSha(o, s, l);
131
132
  } catch (e) {
132
- if (l(e)) throw e;
133
+ if (u(e)) throw e;
133
134
  }
134
- return [...n, {
135
+ return [...t, {
135
136
  currentRefType: p,
136
137
  status: "ok",
137
138
  publishedAt: null,
138
- actionName: i,
139
- version: c,
139
+ actionName: r,
140
+ version: l,
140
141
  sha: f
141
142
  }];
142
143
  }
143
- return [...n, {
144
+ return [...t, {
144
145
  currentRefType: p,
145
146
  publishedAt: null,
146
147
  version: null,
147
- actionName: i,
148
+ actionName: r,
148
149
  sha: null
149
150
  }];
150
151
  } catch (e) {
151
- return e instanceof Error && e.name === "GitHubRateLimitError" ? (g.rateLimitHit = !0, g.rateLimitError = e, [...n, {
152
+ return e instanceof Error && e.name === "GitHubRateLimitError" ? (g.rateLimitHit = !0, g.rateLimitError = e, [...t, {
152
153
  currentRefType: "unknown",
153
154
  publishedAt: null,
154
155
  version: null,
155
- actionName: i,
156
+ actionName: r,
156
157
  sha: null
157
- }]) : (console.warn(`Failed to check ${i}:`, e), [...n, {
158
+ }]) : (console.warn(`Failed to check ${r}:`, e), [...t, {
158
159
  currentRefType: "unknown",
159
160
  publishedAt: null,
160
161
  version: null,
161
- actionName: i,
162
+ actionName: r,
162
163
  sha: null
163
164
  }]);
164
165
  }
165
166
  }), Promise.resolve([]));
166
167
  if (g.rateLimitError) {
167
- let e = !!(o ?? process.env.GITHUB_TOKEN), t = `${g.rateLimitError.message || "GitHub API rate limit exceeded."}\n${e ? "Wait for reset or reduce request rate." : "Please set GITHUB_TOKEN environment variable to increase the limit.\nSee: https://github.com/azat-io/actions-up?tab=readme-ov-file#github-token"}`, n = Error(t);
168
+ let e = !!(a ?? process.env.GITHUB_TOKEN), t = `${g.rateLimitError.message || "GitHub API rate limit exceeded."}\n${e ? "Wait for reset or reduce request rate." : "Please set GITHUB_TOKEN environment variable to increase the limit.\nSee: https://github.com/azat-io/actions-up?tab=readme-ov-file#github-token"}`, n = Error(t);
168
169
  throw n.name = "GitHubRateLimitError", n;
169
170
  }
170
171
  let v = /* @__PURE__ */ new Map();
@@ -180,7 +181,7 @@ async function i(i, o, u) {
180
181
  let y = [];
181
182
  for (let e of m) {
182
183
  let t = v.get(e.name);
183
- t ? y.push(a(e, {
184
+ t ? y.push(o(e, {
184
185
  publishedAt: t.publishedAt,
185
186
  version: t.version,
186
187
  sha: t.sha
@@ -189,68 +190,68 @@ async function i(i, o, u) {
189
190
  skipReason: t.skipReason,
190
191
  status: t.status,
191
192
  style: p
192
- })) : y.push(a(e, {
193
+ })) : y.push(o(e, {
193
194
  publishedAt: null,
194
195
  version: null,
195
196
  sha: null
196
197
  }, {
197
- currentRefType: c(e.version),
198
+ currentRefType: l(e.version),
198
199
  style: p
199
200
  }));
200
201
  }
201
202
  return y;
202
203
  }
203
- function a(t, n, i) {
204
- let { version: a, sha: c, publishedAt: l } = n, u = t.version ?? "unknown", d = e(u), f = a ? e(a) : null, p = i.currentRefType, { style: m } = i, h = i.status ?? "ok", g = i.skipReason, _ = !1, v = !1;
205
- if (h === "skipped") return {
204
+ function o(e, r, a) {
205
+ let { version: o, sha: l, publishedAt: u } = r, d = e.version ?? "unknown", f = n(d), p = a.currentRefType, { style: m } = a, h = (m === "preserve" && p === "tag" ? t(d, o) : null) ?? o, g = h ? n(h) : null, _ = a.status ?? "ok", v = a.skipReason, y = !1, b = !1;
206
+ if (_ === "skipped") return {
206
207
  currentRefType: p,
207
- currentVersion: u,
208
+ currentVersion: d,
208
209
  isBreaking: !1,
209
210
  hasUpdate: !1,
210
- latestVersion: a,
211
- publishedAt: l,
212
- skipReason: g,
213
- latestSha: c,
214
- action: t,
215
- status: h
211
+ latestVersion: o,
212
+ publishedAt: u,
213
+ skipReason: v,
214
+ latestSha: l,
215
+ action: e,
216
+ status: _
216
217
  };
217
- if (d && s(d)) c ? _ = !o(d, c) : f && (_ = !0);
218
- else if (d && f) {
219
- let e = r.valid(d), n = r.valid(f);
220
- if (e && n) {
221
- if (_ = r.lt(e, n), _) {
222
- let t = r.major(e);
223
- v = r.major(n) > t;
218
+ if (f && c(f)) l ? y = !s(f, l) : g && (y = !0);
219
+ else if (f && g) {
220
+ let t = i.valid(f), n = i.valid(g);
221
+ if (t && n) {
222
+ if (y = i.lt(t, n), y) {
223
+ let e = i.major(t);
224
+ b = i.major(n) > e;
224
225
  }
225
- !_ && r.eq(e, n) && !s(t.version) && c && m === "sha" && (_ = !0, v = !1);
226
- } else d !== f && (_ = !0);
226
+ !y && i.eq(t, n) && !c(e.version) && l && m === "sha" && (y = !0, b = !1);
227
+ } else f !== g && (y = !0);
227
228
  }
228
229
  return {
229
230
  currentRefType: p,
230
- currentVersion: u,
231
- latestVersion: a,
232
- publishedAt: l,
233
- isBreaking: v,
234
- skipReason: g,
235
- latestSha: c,
236
- hasUpdate: _,
237
- action: t,
238
- status: h
231
+ currentVersion: d,
232
+ latestVersion: o,
233
+ publishedAt: u,
234
+ isBreaking: b,
235
+ skipReason: v,
236
+ latestSha: l,
237
+ hasUpdate: y,
238
+ action: e,
239
+ status: _
239
240
  };
240
241
  }
241
- function o(e, t) {
242
+ function s(e, t) {
242
243
  let n = e.replace(/^v/u, ""), r = t.replace(/^v/u, ""), i = Math.min(n.length, r.length);
243
244
  return i < 7 ? !1 : n.slice(0, Math.max(0, i)).toLowerCase() === r.slice(0, Math.max(0, i)).toLowerCase();
244
245
  }
245
- function s(e) {
246
+ function c(e) {
246
247
  if (!e) return !1;
247
248
  let t = e.replace(/^v/u, "");
248
249
  return /^[0-9a-f]{7,40}$/iu.test(t);
249
250
  }
250
- function c(e) {
251
- return e ? s(e) ? "sha" : t(e) ? "tag" : "unknown" : "unknown";
251
+ function l(t) {
252
+ return t ? c(t) ? "sha" : e(t) ? "tag" : "unknown" : "unknown";
252
253
  }
253
- function l(e) {
254
+ function u(e) {
254
255
  return e instanceof Error && e.name === "GitHubRateLimitError";
255
256
  }
256
- export { i as checkUpdates };
257
+ export { a as checkUpdates };
@@ -15,7 +15,7 @@ async function n(n) {
15
15
  function i(e) {
16
16
  return e.replaceAll(/[$()*+\-./?[\\\]^{|}]/gu, String.raw`\$&`);
17
17
  }
18
- let o = i(e.action.name), s = e.currentVersion ? i(e.currentVersion) : "";
18
+ let o = i(e.action.name), s = e.currentVersion ? i(e.currentVersion) : "", c = s ? String.raw`(?=(?:['"]|[ \t\]}{,#]|$))` : "";
19
19
  if (o.includes("\n") || o.includes("\r")) {
20
20
  console.error(`Invalid action name: ${e.action.name}`);
21
21
  continue;
@@ -32,8 +32,8 @@ async function n(n) {
32
32
  console.error(`Invalid SHA format: ${t}`);
33
33
  continue;
34
34
  }
35
- let c = String.raw`['"]?\buses\b['"]?\s*:\s*`, l = String.raw`(?:^[^\S\n]*(?:-[^\S\n]*)?|[{\[,][^\S\n]*)` + c, u = new RegExp(String.raw`(?<prefix>${l})` + String.raw`(?<quote>['"]?)` + String.raw`(?<name>${o})@${s}` + String.raw`\k<quote>` + String.raw`(?<after>[ \t\]}{,]*)` + String.raw`(?<comment>[^\S\r\n]*#[^\r\n]*)?`, "gm");
36
- a = a.replace(u, (i, ...a) => {
35
+ let l = String.raw`['"]?\buses\b['"]?\s*:\s*`, u = String.raw`(?:^[^\S\n]*(?:-[^\S\n]*)?|[{\[,][^\S\n]*)` + l, d = new RegExp(String.raw`(?<prefix>${u})` + String.raw`(?<quote>['"]?)` + String.raw`(?<name>${o})@${s}${c}` + String.raw`\k<quote>` + String.raw`(?<after>[ \t\]}{,]*)` + String.raw`(?<comment>[^\S\r\n]*#[^\r\n]*)?`, "gm");
36
+ a = a.replace(d, (i, ...a) => {
37
37
  let o = a.at(-3), c = a.at(-2), l = a.at(-1), u = c.indexOf("\n", o + i.length), d = (u === -1 ? c.slice(o + i.length) : c.slice(o + i.length, u)).trim().length > 0, f = l.after.endsWith(" ") ? "" : " ", p = "";
38
38
  if (n === "sha") p = d && !l.comment && s !== "" ? "" : `${f}# ${e.latestVersion}`;
39
39
  else if (l.comment && !r(l.comment)) {
@@ -1,24 +1,35 @@
1
- function e(e, t) {
2
- return e.hasUpdate ? t === "sha" || e.currentRefType === "sha" ? e.latestSha ? {
3
- ...e,
4
- targetRef: e.latestSha,
5
- targetRefStyle: "sha"
6
- } : {
7
- ...e,
1
+ import { preserveTagFormat as e } from "../versions/preserve-tag-format.js";
2
+ function t(t, n) {
3
+ if (!t.hasUpdate) return {
4
+ ...t,
8
5
  targetRefStyle: null,
9
6
  targetRef: null
10
- } : e.currentRefType === "tag" && e.latestVersion ? {
11
- ...e,
12
- targetRef: e.latestVersion,
13
- targetRefStyle: "tag"
7
+ };
8
+ if (n === "sha" || t.currentRefType === "sha") return t.latestSha ? {
9
+ ...t,
10
+ targetRef: t.latestSha,
11
+ targetRefStyle: "sha"
14
12
  } : {
15
- ...e,
13
+ ...t,
16
14
  targetRefStyle: null,
17
15
  targetRef: null
18
- } : {
19
- ...e,
16
+ };
17
+ if (t.currentRefType === "tag" && t.latestVersion) {
18
+ let n = e(t.currentVersion, t.latestVersion);
19
+ return n ? {
20
+ ...t,
21
+ targetRef: n,
22
+ targetRefStyle: "tag"
23
+ } : {
24
+ ...t,
25
+ targetRefStyle: null,
26
+ targetRef: null
27
+ };
28
+ }
29
+ return {
30
+ ...t,
20
31
  targetRefStyle: null,
21
32
  targetRef: null
22
33
  };
23
34
  }
24
- export { e as resolveTargetReference };
35
+ export { t as resolveTargetReference };
@@ -1,14 +1,14 @@
1
- import { normalizeVersion as e } from "./normalize-version.js";
2
- import { isSemverLike as t } from "./is-semver-like.js";
1
+ import { isSemverLike as e } from "./is-semver-like.js";
2
+ import { normalizeVersion as t } from "./normalize-version.js";
3
3
  import n from "semver";
4
4
  function r(r, a, o) {
5
- if (!a || !t(a) || r.length === 0) return null;
6
- let s = n.valid(e(a));
5
+ if (!a || !e(a) || r.length === 0) return null;
6
+ let s = n.valid(t(a));
7
7
  if (!s) return null;
8
8
  let c = n.major(s), l = n.minor(s), u = [];
9
9
  for (let i of r) {
10
- if (!t(i.tag)) continue;
11
- let r = n.valid(e(i.tag));
10
+ if (!e(i.tag)) continue;
11
+ let r = n.valid(t(i.tag));
12
12
  r && n.gt(r, s) && n.major(r) === c && (o === "patch" && n.minor(r) !== l || u.push({
13
13
  tag: i,
14
14
  parsed: r
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Preserve the semver granularity of the current tag when projecting a newer
3
+ * tag reference.
4
+ *
5
+ * Examples:
6
+ *
7
+ * - `v6` + `v7.0.2` -> `v7`
8
+ * - `v6.1` + `v6.2.3` -> `v6.2`
9
+ * - `v6.1.4` + `v6.2.3` -> `v6.2.3`.
10
+ *
11
+ * Returns null when the target tag cannot be preserved safely.
12
+ *
13
+ * @param currentVersion - Current tag reference found in the workflow.
14
+ * @param latestVersion - Latest resolved tag reference.
15
+ * @returns Preserved tag reference or null when preservation is unsafe.
16
+ */
17
+ export declare function preserveTagFormat(currentVersion: undefined | string | null, latestVersion: undefined | string | null): string | null;
@@ -0,0 +1,11 @@
1
+ import { isSemverLike as e } from "./is-semver-like.js";
2
+ function t(t, n) {
3
+ if (!t || !n) return null;
4
+ let r = t.trim(), i = n.trim();
5
+ if (!e(r) || !e(i)) return null;
6
+ let a = r.startsWith("v");
7
+ if (a !== i.startsWith("v")) return null;
8
+ let o = r.replace(/^v/u, "").split("."), s = i.replace(/^v/u, "").split(".");
9
+ return s.length < o.length ? null : `${a ? "v" : ""}${s.slice(0, o.length).join(".")}`;
10
+ }
11
+ export { t as preserveTagFormat };
package/dist/package.js CHANGED
@@ -1,2 +1,2 @@
1
- var e = "1.14.1";
1
+ var e = "1.14.2";
2
2
  export { e as version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "actions-up",
3
- "version": "1.14.1",
3
+ "version": "1.14.2",
4
4
  "description": "Interactive CLI tool to update GitHub Actions with SHA pinning or preserved refs",
5
5
  "keywords": [
6
6
  "github-actions",
@@ -40,8 +40,8 @@
40
40
  "enquirer": "^2.4.1",
41
41
  "nanospinner": "^1.2.2",
42
42
  "picocolors": "^1.1.1",
43
- "semver": "^7.7.4",
44
- "yaml": "^2.8.3"
43
+ "semver": "^7.8.0",
44
+ "yaml": "^2.9.0"
45
45
  },
46
46
  "engines": {
47
47
  "node": "^18.0.0 || >=20.0.0"
package/readme.md CHANGED
@@ -3,9 +3,8 @@
3
3
  <img
4
4
  src="https://raw.githubusercontent.com/azat-io/actions-up/main/assets/logo.svg"
5
5
  alt="Actions Up logo"
6
- width="160"
7
- height="160"
8
6
  align="right"
7
+ width="160"
9
8
  />
10
9
 
11
10
  [![Version](https://img.shields.io/npm/v/actions-up.svg?color=fff&labelColor=4493f8)](https://npmjs.com/package/actions-up)
@@ -102,7 +101,8 @@ Per-project
102
101
  npm install --save-dev actions-up
103
102
  ```
104
103
 
105
- Alternatively, you can install Actions Up with [Homebrew](https://brew.sh)
104
+ Alternatively, you can install Actions Up with
105
+ [Homebrew](https://formulae.brew.sh/formula/actions-up)
106
106
 
107
107
  ```bash
108
108
  brew install actions-up
@@ -214,9 +214,11 @@ Use `--style preserve` to keep the current reference style:
214
214
  npx actions-up --style preserve
215
215
  ```
216
216
 
217
- `preserve` keeps tag references on tags and SHA references on SHAs. For example,
218
- `actions/checkout@v5` updates to `actions/checkout@v6.0.2`, while a SHA-pinned
219
- action continues updating to the latest resolved SHA.
217
+ `preserve` keeps tag references on tags and SHA references on SHAs. Tag refs
218
+ also keep their granularity, so `actions/checkout@v5` updates to
219
+ `actions/checkout@v6`, while `actions/checkout@v5.0` updates to
220
+ `actions/checkout@v6.0`. A SHA-pinned action continues updating to the latest
221
+ resolved SHA.
220
222
 
221
223
  ## GitHub Actions Integration
222
224