updates 16.5.2 → 16.5.3
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 -1
- package/dist/index.js +84 -87
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ All `pkg` options support glob matching via [picomatch](https://github.com/micro
|
|
|
31
31
|
|
|
32
32
|
The config file is used to configure certain options of the module. It is placed at `updates.config.{js,ts,mjs,mts}` or `.config/updates.config.{js,ts,mjs,mts}`, relative to `package.json` / `pyproject.toml` / `go.mod`.
|
|
33
33
|
|
|
34
|
-
Since Node.js
|
|
34
|
+
Since Node.js v22.18.0, typescript configuration files work out of the box. For older node versions, set `NODE_OPTIONS="--experimental-strip-types"` in your environment.
|
|
35
35
|
|
|
36
36
|
```ts
|
|
37
37
|
export default {
|
package/dist/index.js
CHANGED
|
@@ -1144,7 +1144,7 @@ function vs() {
|
|
|
1144
1144
|
return Object.assign(s, e), at = s, at;
|
|
1145
1145
|
}
|
|
1146
1146
|
var ys = /* @__PURE__ */ vs();
|
|
1147
|
-
const Qr = /* @__PURE__ */ Ue(ys), Es = "16.5.
|
|
1147
|
+
const Qr = /* @__PURE__ */ Ue(ys), Es = "16.5.3", Rs = {
|
|
1148
1148
|
version: Es
|
|
1149
1149
|
};
|
|
1150
1150
|
var ye = {}, ge = {}, Jr;
|
|
@@ -4669,7 +4669,25 @@ function Do(e) {
|
|
|
4669
4669
|
}
|
|
4670
4670
|
return i;
|
|
4671
4671
|
}
|
|
4672
|
-
const jo =
|
|
4672
|
+
const jo = [
|
|
4673
|
+
"dependencies",
|
|
4674
|
+
"devDependencies",
|
|
4675
|
+
"peerDependencies",
|
|
4676
|
+
"optionalDependencies",
|
|
4677
|
+
"resolutions"
|
|
4678
|
+
], qo = [
|
|
4679
|
+
"tool.poetry.dependencies",
|
|
4680
|
+
"tool.poetry.dev-dependencies",
|
|
4681
|
+
"tool.poetry.test-dependencies",
|
|
4682
|
+
"tool.poetry.group.dev.dependencies",
|
|
4683
|
+
"tool.poetry.group.test.dependencies"
|
|
4684
|
+
], Fo = [
|
|
4685
|
+
"project.dependencies",
|
|
4686
|
+
"project.optional-dependencies",
|
|
4687
|
+
"dependency-groups.dev",
|
|
4688
|
+
"dependency-groups.lint",
|
|
4689
|
+
"dependency-groups.test"
|
|
4690
|
+
], Bo = /^.*?:\/\/(.*?@)?(github\.com[:/])/i, Ho = /^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i, wr = /^[0-9a-f]{7,}$/i, Ei = /[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g, _e = (e) => e.replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&"), Pe = (e) => e.endsWith("/") ? e.substring(0, e.length - 1) : e, Hi = Rs.version, fe = "\0", $r = {
|
|
4673
4691
|
"package.json": "npm",
|
|
4674
4692
|
"pyproject.toml": "pypi",
|
|
4675
4693
|
"go.mod": "go"
|
|
@@ -4744,20 +4762,20 @@ const jo = /^.*?:\/\/(.*?@)?(github\.com[:/])/i, qo = /^([^/]+)\/([^/#]+)?.*?\/(
|
|
|
4744
4762
|
v: "version",
|
|
4745
4763
|
V: "verbose"
|
|
4746
4764
|
}
|
|
4747
|
-
}), [
|
|
4765
|
+
}), [Go, Pr, Dr] = ["magenta", "red", "green"].map((e) => Z["no-color"] ? String : (i) => es(e, String(i))), Se = De(ve(Z.greatest)), mr = De(ve(Z.prerelease)), vr = De(ve(Z.release)), Ri = De(ve(Z.patch)), wi = De(ve(Z.minor)), $i = ve(Z["allow-downgrade"]), Mo = ve(Z.modes) || /* @__PURE__ */ new Set(["npm", "pypi"]), Gi = Z.githubapi ? Pe(Z.githubapi) : "https://api.github.com", Si = Z.pypiapi ? Pe(Z.pypiapi) : "https://pypi.org", Uo = "https://proxy.golang.org", ko = Z.goproxy ? Pe(Z.goproxy) : Xo(), Oe = (e) => e.replace(/^v/, "");
|
|
4748
4766
|
function we(e, i) {
|
|
4749
4767
|
for (const s of i instanceof Set ? i : [])
|
|
4750
4768
|
if (s.test(e)) return !0;
|
|
4751
4769
|
return !1;
|
|
4752
4770
|
}
|
|
4753
|
-
function
|
|
4771
|
+
function Vo(e, i) {
|
|
4754
4772
|
const s = i[`${e}:registry`] || i.registry;
|
|
4755
4773
|
return s.endsWith("/") ? s : `${s}/`;
|
|
4756
4774
|
}
|
|
4757
|
-
function
|
|
4758
|
-
return be.GOPROXY ? be.GOPROXY.split(/[,|]/).map((e) => e.trim()).filter((e) => !!e && e !== "direct") : [
|
|
4775
|
+
function Xo() {
|
|
4776
|
+
return be.GOPROXY ? be.GOPROXY.split(/[,|]/).map((e) => e.trim()).filter((e) => !!e && e !== "direct") : [Uo];
|
|
4759
4777
|
}
|
|
4760
|
-
function
|
|
4778
|
+
function Ko(e, i) {
|
|
4761
4779
|
return i.split(".").reduce((s, o) => s?.[o] ?? null, e);
|
|
4762
4780
|
}
|
|
4763
4781
|
function Ge(e) {
|
|
@@ -4772,9 +4790,9 @@ function Mi(e, i) {
|
|
|
4772
4790
|
const o = br(i);
|
|
4773
4791
|
return o === i ? null : Mi(e, o);
|
|
4774
4792
|
}
|
|
4775
|
-
function
|
|
4793
|
+
function Wo(e, i, s, o) {
|
|
4776
4794
|
if (e.startsWith("@")) {
|
|
4777
|
-
const c = (/@[a-z0-9][\w-.]+/.exec(e) || [""])[0], r = Pe(
|
|
4795
|
+
const c = (/@[a-z0-9][\w-.]+/.exec(e) || [""])[0], r = Pe(Vo(c, o));
|
|
4778
4796
|
if (r !== i)
|
|
4779
4797
|
try {
|
|
4780
4798
|
const t = St(r, s);
|
|
@@ -4795,23 +4813,23 @@ function jr(e, i, s) {
|
|
|
4795
4813
|
};
|
|
4796
4814
|
}
|
|
4797
4815
|
async function Je(e, i) {
|
|
4798
|
-
Z.verbose && console.error(`${
|
|
4816
|
+
Z.verbose && console.error(`${Go("fetch")} ${e}`);
|
|
4799
4817
|
const s = await fetch(e, i);
|
|
4800
4818
|
return Z.verbose && console.error(`${s.ok ? Dr(s.status) : Pr(s.status)} ${e}`), s;
|
|
4801
4819
|
}
|
|
4802
|
-
async function
|
|
4803
|
-
const { auth: t, registry: n } =
|
|
4820
|
+
async function zo(e, i, s, o, c, r) {
|
|
4821
|
+
const { auth: t, registry: n } = Wo(e, s, c, r), u = i === "resolutions" ? He(e) : e, a = `${n}/${u.replace(/\//g, "%2f")}`, l = await Je(a, jr(o, t?.type, t?.token));
|
|
4804
4822
|
if (l?.ok)
|
|
4805
4823
|
return [await l.json(), i, n, e];
|
|
4806
4824
|
throw l?.status && l?.statusText ? new Error(`Received ${l.status} ${l.statusText} from ${a}`) : new Error(`Unable to fetch ${e} from ${n}`);
|
|
4807
4825
|
}
|
|
4808
|
-
async function
|
|
4826
|
+
async function Yo(e, i, s) {
|
|
4809
4827
|
const o = `${Si}/pypi/${e}/json`, c = await Je(o, jr(s));
|
|
4810
4828
|
if (c?.ok)
|
|
4811
4829
|
return [await c.json(), i, null, e];
|
|
4812
4830
|
throw c?.status && c?.statusText ? new Error(`Received ${c.status} ${c.statusText} from ${o}`) : new Error(`Unable to fetch ${e} from ${Si}`);
|
|
4813
4831
|
}
|
|
4814
|
-
function
|
|
4832
|
+
function Qo(e) {
|
|
4815
4833
|
return e.split(/\r?\n/).map((i) => i.trim()).filter(Boolean);
|
|
4816
4834
|
}
|
|
4817
4835
|
async function Ui(e, i, s, o) {
|
|
@@ -4825,10 +4843,10 @@ async function Ui(e, i, s, o) {
|
|
|
4825
4843
|
return t.json();
|
|
4826
4844
|
throw t?.status && t?.statusText ? new Error(`Received ${t.status} ${t.statusText} from ${r}`) : new Error(`Unable to fetch ${e} from ${c}`);
|
|
4827
4845
|
}
|
|
4828
|
-
function
|
|
4846
|
+
function Jo(e) {
|
|
4829
4847
|
return e = e.replace("git@", "").replace(/.+?\/\//, "https://").replace(/\.git$/, ""), /^[a-z]+:[a-z0-9-]\/[a-z0-9-]$/.test(e) ? e.replace(/^(.+?):/, (i, s) => `https://${s}.com/`) : /^[a-z0-9-]\/[a-z0-9-]$/.test(e) ? `https://github.com/${e}` : e;
|
|
4830
4848
|
}
|
|
4831
|
-
function
|
|
4849
|
+
function Zo(e) {
|
|
4832
4850
|
return e.startsWith("https://bitbucket.org") ? "src/HEAD" : "tree/HEAD";
|
|
4833
4851
|
}
|
|
4834
4852
|
function bi({ repository: e, homepage: i, info: s }, o, c) {
|
|
@@ -4838,7 +4856,7 @@ function bi({ repository: e, homepage: i, info: s }, o, c) {
|
|
|
4838
4856
|
return `https://github.com/${c.replace(/^@/, "")}`;
|
|
4839
4857
|
if (e) {
|
|
4840
4858
|
const t = typeof e == "string" ? e : e.url;
|
|
4841
|
-
r =
|
|
4859
|
+
r = Jo(t), r && typeof e != "string" && e.directory && (r = `${r}/${Zo(r)}/${e.directory}`);
|
|
4842
4860
|
}
|
|
4843
4861
|
return r || i || "";
|
|
4844
4862
|
}
|
|
@@ -4852,7 +4870,7 @@ async function Ne(e, i) {
|
|
|
4852
4870
|
}
|
|
4853
4871
|
Er === "win32" && Number(Wi?.node?.split(".")[0]) >= 23 && await new Promise((s) => setTimeout(s, 50)), zi(i || e ? 1 : 0);
|
|
4854
4872
|
}
|
|
4855
|
-
function
|
|
4873
|
+
function ea(e = {}) {
|
|
4856
4874
|
for (const s of Object.keys(e))
|
|
4857
4875
|
for (const o of Object.values(e[s]))
|
|
4858
4876
|
typeof o.oldPrint == "string" && (o.old = o.oldPrint, delete o.oldPrint), typeof o.newPrint == "string" && (o.new = o.newPrint, delete o.newPrint), typeof o.oldOriginal == "string" && (o.old = o.oldOriginal, delete o.oldOriginal);
|
|
@@ -4867,10 +4885,10 @@ function Qo(e = {}) {
|
|
|
4867
4885
|
s.results[o] || (s.results[o] = {}), s.results[o][t] || (s.results[o][t] = {}), s.results[o][t][n] = r;
|
|
4868
4886
|
}
|
|
4869
4887
|
console.info(JSON.stringify(s));
|
|
4870
|
-
} else i && console.info(
|
|
4888
|
+
} else i && console.info(ia(e));
|
|
4871
4889
|
return Z["error-on-outdated"] ? i ? 2 : 0 : Z["error-on-unchanged"] ? i ? 0 : 2 : 0;
|
|
4872
4890
|
}
|
|
4873
|
-
function
|
|
4891
|
+
function ta(e, i) {
|
|
4874
4892
|
Er === "win32" && Qi(e, 0), Ji(e, i, Er === "win32" ? { flag: "r+" } : void 0);
|
|
4875
4893
|
}
|
|
4876
4894
|
function _i(e, i, s) {
|
|
@@ -4886,7 +4904,7 @@ function _i(e, i, s) {
|
|
|
4886
4904
|
return t.replace(/\.$/, "");
|
|
4887
4905
|
}
|
|
4888
4906
|
const Oi = (e) => ts(e).length;
|
|
4889
|
-
function
|
|
4907
|
+
function ra(e, i = " ") {
|
|
4890
4908
|
let s = "";
|
|
4891
4909
|
const o = new Array(e[0].length).fill(0);
|
|
4892
4910
|
for (const c of e)
|
|
@@ -4905,25 +4923,25 @@ function Zo(e, i = " ") {
|
|
|
4905
4923
|
}
|
|
4906
4924
|
return s;
|
|
4907
4925
|
}
|
|
4908
|
-
function
|
|
4926
|
+
function na(e) {
|
|
4909
4927
|
return /\/v[0-9]$/.test(e) && (e = br(e)), e;
|
|
4910
4928
|
}
|
|
4911
|
-
function
|
|
4929
|
+
function ia(e) {
|
|
4912
4930
|
const i = [["NAME", "OLD", "NEW", "AGE", "INFO"]], s = /* @__PURE__ */ new Set();
|
|
4913
4931
|
for (const o of Object.keys(e))
|
|
4914
4932
|
for (const [c, r] of Object.entries(e[o])) {
|
|
4915
4933
|
const t = c.split(fe)[1], n = `${o}|${t}`;
|
|
4916
4934
|
s.has(n) || (s.add(n), i.push([
|
|
4917
|
-
o === "go" ?
|
|
4935
|
+
o === "go" ? na(t) : t,
|
|
4918
4936
|
_i(r.old, r.new, Pr),
|
|
4919
4937
|
_i(r.new, r.old, Dr),
|
|
4920
4938
|
r.age || "",
|
|
4921
4939
|
r.info || ""
|
|
4922
4940
|
]));
|
|
4923
4941
|
}
|
|
4924
|
-
return
|
|
4942
|
+
return ra(i);
|
|
4925
4943
|
}
|
|
4926
|
-
function
|
|
4944
|
+
function sa(e, i) {
|
|
4927
4945
|
let s = e;
|
|
4928
4946
|
for (const o of Object.keys(i)) {
|
|
4929
4947
|
const c = o.split(fe)[1], r = i[o].oldOriginal || i[o].old, t = new RegExp(`"${_e(c)}": *"${_e(r)}"`, "g");
|
|
@@ -4931,7 +4949,7 @@ function ra(e, i) {
|
|
|
4931
4949
|
}
|
|
4932
4950
|
return s;
|
|
4933
4951
|
}
|
|
4934
|
-
function
|
|
4952
|
+
function oa(e, i) {
|
|
4935
4953
|
let s = e;
|
|
4936
4954
|
for (const o of Object.keys(i)) {
|
|
4937
4955
|
const c = o.split(fe)[1], r = i[o].oldOriginal || i[o].old;
|
|
@@ -4947,7 +4965,7 @@ function na(e, i) {
|
|
|
4947
4965
|
}
|
|
4948
4966
|
return s;
|
|
4949
4967
|
}
|
|
4950
|
-
function
|
|
4968
|
+
function aa(e, i, s) {
|
|
4951
4969
|
let o = e.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g, i);
|
|
4952
4970
|
if (s && s !== e && /^[\^~]/.test(o)) {
|
|
4953
4971
|
const c = s.substring(1).split("."), r = o.substring(1).split(".");
|
|
@@ -4969,7 +4987,7 @@ function Le(e) {
|
|
|
4969
4987
|
return "";
|
|
4970
4988
|
}
|
|
4971
4989
|
}
|
|
4972
|
-
function
|
|
4990
|
+
function ua(e, i, { range: s, semvers: o, usePre: c, useRel: r, useGreatest: t }) {
|
|
4973
4991
|
let n = Le(s), u = 0;
|
|
4974
4992
|
c = ki(s) || c, c && (o.add("prerelease"), o.has("patch") && o.add("prepatch"), o.has("minor") && o.add("preminor"), o.has("major") && o.add("premajor"));
|
|
4975
4993
|
for (const a of i) {
|
|
@@ -4986,13 +5004,13 @@ function sa(e, i, { range: s, semvers: o, usePre: c, useRel: r, useGreatest: t }
|
|
|
4986
5004
|
}
|
|
4987
5005
|
return n || null;
|
|
4988
5006
|
}
|
|
4989
|
-
function
|
|
5007
|
+
function ca(e, { mode: i, range: s, useGreatest: o, useRel: c, usePre: r, semvers: t }) {
|
|
4990
5008
|
if (i === "go")
|
|
4991
5009
|
return oe.gt(Oe(e.Version), Oe(s)) ? e.Version : null;
|
|
4992
5010
|
if (s === "*" || s.includes("||")) return null;
|
|
4993
5011
|
let n = [];
|
|
4994
5012
|
i === "pypi" ? n = Object.keys(e.releases).filter((a) => oe.valid(a)) : i === "npm" && (n = Object.keys(e.versions).filter((a) => oe.valid(a)));
|
|
4995
|
-
const u =
|
|
5013
|
+
const u = ua(e, n, { range: s, semvers: t, usePre: r, useRel: c, useGreatest: o });
|
|
4996
5014
|
if (!u) return null;
|
|
4997
5015
|
if (o)
|
|
4998
5016
|
return u;
|
|
@@ -5012,17 +5030,17 @@ function Vi(e) {
|
|
|
5012
5030
|
const i = {}, s = be.UPDATES_GITHUB_API_TOKEN || be.GITHUB_API_TOKEN || be.GH_TOKEN || be.HOMEBREW_GITHUB_API_TOKEN;
|
|
5013
5031
|
return s && (i.headers = { Authorization: `Bearer ${s}` }), Je(e, i);
|
|
5014
5032
|
}
|
|
5015
|
-
async function
|
|
5033
|
+
async function la(e, i) {
|
|
5016
5034
|
const s = `${Gi}/repos/${e}/${i}/commits`, o = await Vi(s);
|
|
5017
5035
|
if (!o?.ok) return { hash: "", commit: {} };
|
|
5018
5036
|
const c = await o.json(), { sha: r, commit: t } = c[0];
|
|
5019
5037
|
return { hash: r, commit: t };
|
|
5020
5038
|
}
|
|
5021
|
-
async function
|
|
5039
|
+
async function fa(e, i) {
|
|
5022
5040
|
const s = await Vi(`${Gi}/repos/${e}/${i}/git/refs/tags`);
|
|
5023
5041
|
return s?.ok ? (await s.json()).map((r) => r.ref.replace(/^refs\/tags\//, "")) : [];
|
|
5024
5042
|
}
|
|
5025
|
-
function
|
|
5043
|
+
function pa(e, i, s) {
|
|
5026
5044
|
const o = Oe(i);
|
|
5027
5045
|
if (oe.valid(o))
|
|
5028
5046
|
if (s) {
|
|
@@ -5042,11 +5060,11 @@ function ca(e, i, s) {
|
|
|
5042
5060
|
return c;
|
|
5043
5061
|
}
|
|
5044
5062
|
}
|
|
5045
|
-
async function
|
|
5046
|
-
const o = i.old.replace(
|
|
5063
|
+
async function ha(e, i, s) {
|
|
5064
|
+
const o = i.old.replace(Bo, ""), [c, r, t, n] = Ho.exec(o) || [];
|
|
5047
5065
|
if (!(!r || !t || !n))
|
|
5048
5066
|
if (wr.test(n)) {
|
|
5049
|
-
const { hash: u, commit: a } = await
|
|
5067
|
+
const { hash: u, commit: a } = await la(r, t);
|
|
5050
5068
|
if (!u) return;
|
|
5051
5069
|
const l = a?.committer?.date ?? a?.author?.date, d = u.substring(0, n.length);
|
|
5052
5070
|
if (n !== d) {
|
|
@@ -5054,12 +5072,12 @@ async function la(e, i, s) {
|
|
|
5054
5072
|
return { key: e, newRange: f, user: r, repo: t, oldRef: n, newRef: d, newDate: l };
|
|
5055
5073
|
}
|
|
5056
5074
|
} else {
|
|
5057
|
-
const u = await
|
|
5075
|
+
const u = await fa(r, t), a = pa(u, n, s);
|
|
5058
5076
|
if (a)
|
|
5059
5077
|
return { key: e, newRange: a, user: r, repo: t, oldRef: n, newRef: a };
|
|
5060
5078
|
}
|
|
5061
5079
|
}
|
|
5062
|
-
function
|
|
5080
|
+
function da(e) {
|
|
5063
5081
|
return e.replace(/-.*/, "");
|
|
5064
5082
|
}
|
|
5065
5083
|
function xi(e) {
|
|
@@ -5069,10 +5087,10 @@ function xi(e) {
|
|
|
5069
5087
|
function ve(e) {
|
|
5070
5088
|
return e === void 0 ? !1 : e === "" ? !0 : typeof e == "string" ? e.includes(",") ? new Set(Ge(e)) : /* @__PURE__ */ new Set([e]) : Array.isArray(e) ? new Set(e) : !1;
|
|
5071
5089
|
}
|
|
5072
|
-
function
|
|
5090
|
+
function ga(e) {
|
|
5073
5091
|
return Array.from(e.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g), (i) => i[0]);
|
|
5074
5092
|
}
|
|
5075
|
-
function
|
|
5093
|
+
function ma(e) {
|
|
5076
5094
|
return Array.from(e.matchAll(/(----BEGIN [^]+?PRIVATE KEY----)/g), (i) => i[0]);
|
|
5077
5095
|
}
|
|
5078
5096
|
function Sr(e, i) {
|
|
@@ -5104,7 +5122,7 @@ function Ii(e, i, s, o) {
|
|
|
5104
5122
|
if (c.test(e)) return !0;
|
|
5105
5123
|
return !s.size;
|
|
5106
5124
|
}
|
|
5107
|
-
function
|
|
5125
|
+
function va(e) {
|
|
5108
5126
|
const i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
5109
5127
|
if (e)
|
|
5110
5128
|
for (const o of e) {
|
|
@@ -5120,7 +5138,7 @@ function da(e) {
|
|
|
5120
5138
|
} else if (c?.isDirectory())
|
|
5121
5139
|
for (const r of Object.keys($r)) {
|
|
5122
5140
|
const t = Ar(o, r);
|
|
5123
|
-
let n;
|
|
5141
|
+
let n = null;
|
|
5124
5142
|
try {
|
|
5125
5143
|
n = Br(t);
|
|
5126
5144
|
} catch {
|
|
@@ -5137,7 +5155,7 @@ function da(e) {
|
|
|
5137
5155
|
}
|
|
5138
5156
|
return [i, s];
|
|
5139
5157
|
}
|
|
5140
|
-
async function
|
|
5158
|
+
async function ya(e) {
|
|
5141
5159
|
const i = [];
|
|
5142
5160
|
for (const o of ["", ".config/"])
|
|
5143
5161
|
for (const c of ["js", "ts", "mjs", "mts"])
|
|
@@ -5149,7 +5167,7 @@ async function ga(e) {
|
|
|
5149
5167
|
}
|
|
5150
5168
|
return s;
|
|
5151
5169
|
}
|
|
5152
|
-
async function
|
|
5170
|
+
async function Ea() {
|
|
5153
5171
|
for (const p of [qr, Ki])
|
|
5154
5172
|
p?._handle?.setBlocking?.(!0);
|
|
5155
5173
|
const e = 96, i = typeof Z.sockets == "number" ? Z.sockets : e, { help: s, version: o, file: c, types: r, update: t } = Z;
|
|
@@ -5188,46 +5206,25 @@ async function ma() {
|
|
|
5188
5206
|
`), await Ne()), o && (console.info(Hi), await Ne());
|
|
5189
5207
|
const n = {}, u = {}, a = {}, l = {};
|
|
5190
5208
|
let d = 0;
|
|
5191
|
-
const [f, h] =
|
|
5209
|
+
const [f, h] = va(ve(c));
|
|
5192
5210
|
for (const p of f) {
|
|
5193
5211
|
const E = br(Be(p)), A = He(p), v = $r[A];
|
|
5194
|
-
if (!
|
|
5212
|
+
if (!Mo.has(v) && !h.has(p)) continue;
|
|
5195
5213
|
l[v] = p, n[v] || (n[v] = {});
|
|
5196
|
-
const m = await
|
|
5214
|
+
const m = await ya(E);
|
|
5197
5215
|
let b = [], w = [];
|
|
5198
5216
|
Z.include && Z.include !== !0 && (b = (Array.isArray(Z.include) ? Z.include : [Z.include]).flatMap((O) => Ge(O))), Z.exclude && Z.exclude !== !0 && (w = (Array.isArray(Z.exclude) ? Z.exclude : [Z.exclude]).flatMap((O) => Ge(O)));
|
|
5199
5217
|
const x = Ti(b, m?.include ?? []), B = Ti(w, m?.exclude ?? []), M = {}, G = _s("npm", { registry: "https://registry.npmjs.org" }) || {}, T = { npmrc: G, recursive: !0 };
|
|
5200
5218
|
if (v === "npm") {
|
|
5201
5219
|
G["strict-ssl"] === !1 && (M.rejectUnauthorized = !1);
|
|
5202
5220
|
for (const O of ["cert", "ca", "key"]) {
|
|
5203
|
-
const I = O === "key" ?
|
|
5221
|
+
const I = O === "key" ? ma : ga;
|
|
5204
5222
|
let D = [];
|
|
5205
5223
|
G[O] && (D = (Array.isArray(G[O]) ? G[O] : [G[O]]).flatMap((C) => I(C))), G[`${O}file`] && (D = Array.from(I(Fr(G[`opt${p}`], "utf8")))), D.length && (M[O] = O === "ca" ? [...cs, ...D] : D);
|
|
5206
5224
|
}
|
|
5207
5225
|
}
|
|
5208
5226
|
let _ = [];
|
|
5209
|
-
r ? _ = Array.isArray(r) ? r : Ge(r) : "types" in m && Array.isArray(m.types) ? _ = m.types : v === "npm" ? _ = [
|
|
5210
|
-
"dependencies",
|
|
5211
|
-
"devDependencies",
|
|
5212
|
-
"optionalDependencies",
|
|
5213
|
-
"peerDependencies",
|
|
5214
|
-
"resolutions"
|
|
5215
|
-
] : v === "pypi" ? _ = [
|
|
5216
|
-
// uv
|
|
5217
|
-
"project.dependencies",
|
|
5218
|
-
"project.optional-dependencies",
|
|
5219
|
-
"dependency-groups.dev",
|
|
5220
|
-
"dependency-groups.lint",
|
|
5221
|
-
"dependency-groups.test",
|
|
5222
|
-
// poetry
|
|
5223
|
-
"tool.poetry.dependencies",
|
|
5224
|
-
"tool.poetry.dev-dependencies",
|
|
5225
|
-
"tool.poetry.test-dependencies",
|
|
5226
|
-
"tool.poetry.group.dev.dependencies",
|
|
5227
|
-
"tool.poetry.group.test.dependencies"
|
|
5228
|
-
] : v === "go" && (_ = [
|
|
5229
|
-
"deps"
|
|
5230
|
-
]);
|
|
5227
|
+
r ? _ = Array.isArray(r) ? r : Ge(r) : "types" in m && Array.isArray(m.types) ? _ = m.types : v === "npm" ? _ = jo : v === "pypi" ? _ = [...Fo, ...qo] : v === "go" && (_ = ["deps"]);
|
|
5231
5228
|
let L = {};
|
|
5232
5229
|
if (v === "go")
|
|
5233
5230
|
a[v] = rs("go", [
|
|
@@ -5250,7 +5247,7 @@ async function ma() {
|
|
|
5250
5247
|
L = no(a[v]);
|
|
5251
5248
|
else {
|
|
5252
5249
|
L.deps = {};
|
|
5253
|
-
for (const O of
|
|
5250
|
+
for (const O of Qo(a[v])) {
|
|
5254
5251
|
const [I, D] = O.split("@");
|
|
5255
5252
|
D && (L.deps[I] = D);
|
|
5256
5253
|
}
|
|
@@ -5260,7 +5257,7 @@ async function ma() {
|
|
|
5260
5257
|
}
|
|
5261
5258
|
for (const O of _) {
|
|
5262
5259
|
let I;
|
|
5263
|
-
if (v === "npm" || v === "go" ? I = L[O] || {} : I =
|
|
5260
|
+
if (v === "npm" || v === "go" ? I = L[O] || {} : I = Ko(L, O) || {}, Array.isArray(I) && v === "pypi")
|
|
5264
5261
|
for (const { name: D, version: C } of Do(I))
|
|
5265
5262
|
n[v][`${O}${fe}${D}`] = {
|
|
5266
5263
|
old: xi(C),
|
|
@@ -5274,7 +5271,7 @@ async function ma() {
|
|
|
5274
5271
|
} : v === "npm" && Ii(D, v, x, B) ? u[`${O}${fe}${D}`] = {
|
|
5275
5272
|
old: C
|
|
5276
5273
|
} : v === "go" && (n[v][`${O}${fe}${D}`] = {
|
|
5277
|
-
old:
|
|
5274
|
+
old: da(C),
|
|
5278
5275
|
oldOriginal: C
|
|
5279
5276
|
});
|
|
5280
5277
|
}
|
|
@@ -5284,11 +5281,11 @@ async function ma() {
|
|
|
5284
5281
|
const H = await kr(Object.keys(n[v]).map((O) => async () => {
|
|
5285
5282
|
const [I, D] = O.split(fe);
|
|
5286
5283
|
if (v === "npm")
|
|
5287
|
-
return
|
|
5284
|
+
return zo(D, I, F, M, T, G);
|
|
5288
5285
|
if (v === "pypi")
|
|
5289
|
-
return
|
|
5286
|
+
return Yo(D, I, M);
|
|
5290
5287
|
{
|
|
5291
|
-
const C = Array.from(
|
|
5288
|
+
const C = Array.from(ko);
|
|
5292
5289
|
return [await Ui(D, "latest", M, C), "deps", null, D];
|
|
5293
5290
|
}
|
|
5294
5291
|
}), { concurrency: i });
|
|
@@ -5297,7 +5294,7 @@ async function ma() {
|
|
|
5297
5294
|
const $ = typeof Se == "boolean" ? Se : we(O.name, Se), X = typeof mr == "boolean" ? mr : we(O.name, mr), k = typeof vr == "boolean" ? vr : we(O.name, vr);
|
|
5298
5295
|
let ne;
|
|
5299
5296
|
Ri === !0 || we(O.name, Ri) ? ne = /* @__PURE__ */ new Set(["patch"]) : wi === !0 || we(O.name, wi) ? ne = /* @__PURE__ */ new Set(["patch", "minor"]) : ne = /* @__PURE__ */ new Set(["patch", "minor", "major"]);
|
|
5300
|
-
const S = `${I}${fe}${C}`, R = n[v][S].old, V = n[v][S].oldOriginal, N =
|
|
5297
|
+
const S = `${I}${fe}${C}`, R = n[v][S].old, V = n[v][S].oldOriginal, N = ca(O, {
|
|
5301
5298
|
usePre: X,
|
|
5302
5299
|
useRel: k,
|
|
5303
5300
|
useGreatest: $,
|
|
@@ -5306,7 +5303,7 @@ async function ma() {
|
|
|
5306
5303
|
mode: v
|
|
5307
5304
|
});
|
|
5308
5305
|
let U = "";
|
|
5309
|
-
if (
|
|
5306
|
+
if (["go", "pypi"].includes(v) && N ? U = N : N && (U = aa(R, N, V)), !N || V && V === U)
|
|
5310
5307
|
delete n[v][S];
|
|
5311
5308
|
else {
|
|
5312
5309
|
n[v][S].new = U, v === "npm" ? n[v][S].info = bi(O?.versions?.[N], D, O.name) : v === "pypi" ? n[v][S].info = bi(O, D, O.info.name) : n[v][S].info = O?.Origin?.URL ?? `https://${C}`;
|
|
@@ -5315,11 +5312,11 @@ async function ma() {
|
|
|
5315
5312
|
}
|
|
5316
5313
|
}
|
|
5317
5314
|
if (Object.keys(u).length) {
|
|
5318
|
-
const O = await kr(Object.entries(u).map(([I, D]) => () => {
|
|
5315
|
+
const O = (await kr(Object.entries(u).map(([I, D]) => () => {
|
|
5319
5316
|
const C = I.split(fe)[1], $ = typeof Se == "boolean" ? Se : we(C, Se);
|
|
5320
|
-
return
|
|
5321
|
-
}), { concurrency: i });
|
|
5322
|
-
for (const I of
|
|
5317
|
+
return ha(I, D, $);
|
|
5318
|
+
}), { concurrency: i })).filter((I) => I !== void 0);
|
|
5319
|
+
for (const I of O) {
|
|
5323
5320
|
const { key: D, newRange: C, user: $, repo: X, oldRef: k, newRef: ne, newDate: S } = I;
|
|
5324
5321
|
n[v][D] = {
|
|
5325
5322
|
old: u[D].old,
|
|
@@ -5337,13 +5334,13 @@ async function ma() {
|
|
|
5337
5334
|
for (const p of Object.keys(n))
|
|
5338
5335
|
g += Object.keys(n[p]).length;
|
|
5339
5336
|
g || Ai("All dependencies are up to date.");
|
|
5340
|
-
const y =
|
|
5337
|
+
const y = ea(n);
|
|
5341
5338
|
if (t) {
|
|
5342
5339
|
for (const p of Object.keys(n))
|
|
5343
5340
|
if (Object.keys(n[p]).length) {
|
|
5344
5341
|
try {
|
|
5345
|
-
const E = p === "npm" ?
|
|
5346
|
-
|
|
5342
|
+
const E = p === "npm" ? sa : oa;
|
|
5343
|
+
ta(l[p], E(a[p], n[p]));
|
|
5347
5344
|
} catch (E) {
|
|
5348
5345
|
throw new Error(`Error writing ${He(l[p])}: ${E.message}`);
|
|
5349
5346
|
}
|
|
@@ -5353,7 +5350,7 @@ async function ma() {
|
|
|
5353
5350
|
await Ne(void 0, y);
|
|
5354
5351
|
}
|
|
5355
5352
|
try {
|
|
5356
|
-
await
|
|
5353
|
+
await Ea();
|
|
5357
5354
|
} catch (e) {
|
|
5358
5355
|
await Ne(e);
|
|
5359
5356
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "updates",
|
|
3
|
-
"version": "16.5.
|
|
3
|
+
"version": "16.5.3",
|
|
4
4
|
"description": "Flexible npm and poetry dependency update tool",
|
|
5
5
|
"author": "silverwind",
|
|
6
6
|
"repository": "silverwind/updates",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"smol-toml": "1.4.1",
|
|
35
35
|
"timerel": "5.8.1",
|
|
36
36
|
"typescript": "5.8.3",
|
|
37
|
-
"typescript-config-silverwind": "
|
|
37
|
+
"typescript-config-silverwind": "10.0.1",
|
|
38
38
|
"versions": "13.1.0",
|
|
39
39
|
"vite": "7.0.6",
|
|
40
40
|
"vite-config-silverwind": "5.4.0",
|