@milkenjoyer/toolchain 0.18.0 → 0.19.0
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/dist/{compatible-D8n_sQHa.mjs → compatible-D54mCSlT.mjs} +1 -1
- package/dist/{compatible-n7uFGrI3.d.mts → compatible-DIYO9MZf.d.mts} +1 -1
- package/dist/compatible.d.mts +1 -1
- package/dist/compatible.mjs +1 -1
- package/dist/{fmt-BaECz64m.mjs → fmt-C6autuPP.mjs} +1 -1
- package/dist/fmt.mjs +1 -1
- package/dist/formal.mjs +2 -1
- package/dist/{guard-Doqk4Fju.mjs → guard-fFg_0NIp.mjs} +9 -4
- package/dist/guard.d.mts +2 -2
- package/dist/guard.mjs +1 -1
- package/dist/{lint-CfztB4u8.mjs → lint-BJ6SmGk1.mjs} +1 -1
- package/dist/lint.mjs +1 -1
- package/dist/standard.mjs +26 -17
- package/dist/{versions-C7LKZGr3.mjs → versions-DpRzgSR_.mjs} +12 -12
- package/dist/{versions-D02TrtKw.d.mts → versions-DqZd0jF9.d.mts} +1 -1
- package/dist/versions.d.mts +1 -1
- package/dist/versions.mjs +1 -1
- package/node-version +1 -1
- package/package.json +10 -10
- package/src/fmt.ts +1 -1
- package/src/formal/tla.ts +11 -4
- package/src/lint.ts +1 -1
- package/src/standard/alchemy.ts +26 -29
- package/src/standard/manifest.ts +16 -0
- package/src/standard/toolchain.ts +37 -13
- package/src/versions.ts +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as lead, f as versionOf, i as familyOf, o as fixedBy, r as familyNamed, s as fixedOf, t as catalog, u as ownerOf } from "./versions-
|
|
1
|
+
import { c as lead, f as versionOf, i as familyOf, o as fixedBy, r as familyNamed, s as fixedOf, t as catalog, u as ownerOf } from "./versions-DpRzgSR_.mjs";
|
|
2
2
|
import * as Arr from "effect/Array";
|
|
3
3
|
import * as Data from "effect/Data";
|
|
4
4
|
import { dual } from "effect/Function";
|
package/dist/compatible.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VersionManifest, c as describeConflict, d as onLatestLine, f as otherTags, i as Solution, l as fixedRange, n as Packument, o as aliasTarget, p as solve, r as Packuments, s as conflicts, t as Conflict, u as latestOf } from "./compatible-
|
|
1
|
+
import { a as VersionManifest, c as describeConflict, d as onLatestLine, f as otherTags, i as Solution, l as fixedRange, n as Packument, o as aliasTarget, p as solve, r as Packuments, s as conflicts, t as Conflict, u as latestOf } from "./compatible-DIYO9MZf.mjs";
|
|
2
2
|
export { Conflict, Packument, Packuments, Solution, VersionManifest, aliasTarget, conflicts, describeConflict, fixedRange, latestOf, onLatestLine, otherTags, solve };
|
package/dist/compatible.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Conflict, n as Packument, r as Packuments, i as VersionManifest, a as aliasTarget, o as conflicts, s as describeConflict, c as fixedRange, l as latestOf, u as onLatestLine, d as otherTags, f as solve } from "./compatible-
|
|
1
|
+
export { t as Conflict, n as Packument, r as Packuments, i as VersionManifest, a as aliasTarget, o as conflicts, s as describeConflict, c as fixedRange, l as latestOf, u as onLatestLine, d as otherTags, f as solve } from "./compatible-D54mCSlT.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ultraciteFmt from "ultracite/oxfmt";
|
|
2
2
|
// src/fmt.ts
|
|
3
|
-
const { ignorePatterns: coreIgnores
|
|
3
|
+
const { ignorePatterns: coreIgnores } = ultraciteFmt;
|
|
4
4
|
const fmt = ({ ignores = [] } = {}) => ({
|
|
5
5
|
...ultraciteFmt,
|
|
6
6
|
ignorePatterns: [...coreIgnores, ...ignores]
|
package/dist/fmt.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as fmt } from "./fmt-
|
|
1
|
+
export { t as fmt } from "./fmt-C6autuPP.mjs";
|
package/dist/formal.mjs
CHANGED
|
@@ -307,7 +307,8 @@ const make$1 = Effect.gen(function* () {
|
|
|
307
307
|
const classpath = jars.join(":");
|
|
308
308
|
const run = Effect.fn("formal.java")(function* (args, cwd, seconds = 120) {
|
|
309
309
|
return yield* Effect.scoped(Effect.gen(function* () {
|
|
310
|
-
const
|
|
310
|
+
const temporary = yield* fs.makeTempDirectoryScoped({ prefix: "formal-java-" });
|
|
311
|
+
const process = yield* ChildProcess.make("java", [`-Djava.io.tmpdir=${temporary}`, ...args], {
|
|
311
312
|
cwd,
|
|
312
313
|
stdin: "ignore",
|
|
313
314
|
killSignal: "SIGKILL"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as otherTags, l as latestOf, u as onLatestLine } from "./compatible-
|
|
1
|
+
import { d as otherTags, l as latestOf, u as onLatestLine } from "./compatible-D54mCSlT.mjs";
|
|
2
2
|
import { i as enforcedTsgoRules } from "./effect-tsgo-D0QfeKGD.mjs";
|
|
3
3
|
import { t as exceptions } from "./exceptions-Dybl9xpc.mjs";
|
|
4
|
-
import { a as toolchainScopes, n as effectRules, r as foldkitPreset, t as birbprophetRules } from "./lint-
|
|
5
|
-
import { c as lead, f as versionOf } from "./versions-
|
|
4
|
+
import { a as toolchainScopes, n as effectRules, r as foldkitPreset, t as birbprophetRules } from "./lint-BJ6SmGk1.mjs";
|
|
5
|
+
import { c as lead, f as versionOf } from "./versions-DpRzgSR_.mjs";
|
|
6
6
|
import * as Arr from "effect/Array";
|
|
7
7
|
import { dual } from "effect/Function";
|
|
8
8
|
import * as HashSet from "effect/HashSet";
|
|
@@ -31,6 +31,11 @@ const Manifest = Schema.fromJsonString(Schema.Struct({
|
|
|
31
31
|
catalogs: Catalogs,
|
|
32
32
|
workspaces: Schema.optionalKey(Schema.Union([WorkspaceList, WorkspaceCatalogs]))
|
|
33
33
|
}));
|
|
34
|
+
const resolveCatalog = (name, written, groups) => {
|
|
35
|
+
if (!written.startsWith("catalog:")) return written;
|
|
36
|
+
const catalog = written.slice(8);
|
|
37
|
+
return (catalog === "" ? groups.get("workspaces.catalog")?.[name] ?? groups.get("catalog")?.[name] : groups.get(`workspaces.catalogs.${catalog}`)?.[name] ?? groups.get(`catalogs.${catalog}`)?.[name]) ?? written;
|
|
38
|
+
};
|
|
34
39
|
const named = (prefix, catalogs) => Arr.map(R.toEntries(catalogs), ([name, ranges]) => [`${prefix}.${name}`, ranges]);
|
|
35
40
|
const manifestRanges = (text) => {
|
|
36
41
|
const decoded = Schema.decodeResult(Manifest)(text);
|
|
@@ -140,4 +145,4 @@ const familyTagFindings = (registry, family) => Option.match(latestOf(registry,
|
|
|
140
145
|
})
|
|
141
146
|
});
|
|
142
147
|
const tagFindings = dual(2, (current, registry) => Arr.flatMap(current.families, (family) => familyTagFindings(registry, family)));
|
|
143
|
-
export { ruleFindings as a, exactFindings as c, pinFindings as i, manifestRanges as l, foldkitViteFindings as n, tagFindings as o, isFoldkitViteInput as r, PLAIN as s, exceptionFindings as t };
|
|
148
|
+
export { ruleFindings as a, exactFindings as c, pinFindings as i, manifestRanges as l, foldkitViteFindings as n, tagFindings as o, isFoldkitViteInput as r, PLAIN as s, exceptionFindings as t, resolveCatalog as u };
|
package/dist/guard.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as Packuments } from "./compatible-
|
|
1
|
+
import { r as Packuments } from "./compatible-DIYO9MZf.mjs";
|
|
2
2
|
import { t as Exception } from "./exceptions-LNZ022dl.mjs";
|
|
3
|
-
import { t as Catalog } from "./versions-
|
|
3
|
+
import { t as Catalog } from "./versions-DqZd0jF9.mjs";
|
|
4
4
|
import { OxlintConfig } from "vite-plus/lint";
|
|
5
5
|
type Ranges = Readonly<Record<string, string>>;
|
|
6
6
|
export declare const manifestRanges: (text: string) => ReadonlyArray<readonly [string, Ranges]>;
|
package/dist/guard.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as exactFindings, t as exceptionFindings, n as foldkitViteFindings, r as isFoldkitViteInput, l as manifestRanges, i as pinFindings, a as ruleFindings, o as tagFindings } from "./guard-
|
|
1
|
+
export { c as exactFindings, t as exceptionFindings, n as foldkitViteFindings, r as isFoldkitViteInput, l as manifestRanges, i as pinFindings, a as ruleFindings, o as tagFindings } from "./guard-fFg_0NIp.mjs";
|
|
@@ -89,7 +89,7 @@ const toolchainScopes = [
|
|
|
89
89
|
const atError = (prefix, rules) => R.fromEntries(Arr.map(rules, (rule) => [`${prefix}/${rule}`, "error"]));
|
|
90
90
|
const effectRules = atError(plugin.meta.name, R.keys(plugin.rules));
|
|
91
91
|
const birbprophetRules = atError(plugin$1.meta.name, R.keys(plugin$1.rules));
|
|
92
|
-
const { ignorePatterns: coreIgnores
|
|
92
|
+
const { ignorePatterns: coreIgnores } = ultraciteCore;
|
|
93
93
|
const resolved = (specifier) => decodeURIComponent(new URL(import.meta.resolve(specifier)).pathname);
|
|
94
94
|
const ownExtension = Str.slice(Str.lastIndexOf(".")(import.meta.filename).pipe(Option.getOrElse(() => -1)))(import.meta.filename);
|
|
95
95
|
const sibling = (module) => resolved(`./${module}${ownExtension}`);
|
package/dist/lint.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as birbprophetRules, n as effectRules, r as foldkitPreset, i as lint, a as toolchainScopes } from "./lint-
|
|
1
|
+
export { t as birbprophetRules, n as effectRules, r as foldkitPreset, i as lint, a as toolchainScopes } from "./lint-BJ6SmGk1.mjs";
|
package/dist/standard.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { f as versionOf } from "./versions-DpRzgSR_.mjs";
|
|
3
|
+
import { a as ruleFindings, c as exactFindings, l as manifestRanges, s as PLAIN, u as resolveCatalog } from "./guard-fFg_0NIp.mjs";
|
|
4
|
+
import { t as fmt } from "./fmt-C6autuPP.mjs";
|
|
4
5
|
import { n as criticalFindings, t as decode } from "./specs-file-NsQF4V7X.mjs";
|
|
5
6
|
import * as Arr from "effect/Array";
|
|
6
7
|
import * as Option from "effect/Option";
|
|
@@ -167,11 +168,6 @@ const skillNames = (repo) => Effect.succeed(repo.tracked.flatMap((file) => {
|
|
|
167
168
|
}] : []);
|
|
168
169
|
}));
|
|
169
170
|
// src/standard/alchemy.ts
|
|
170
|
-
const resolve = (name, written, groups) => {
|
|
171
|
-
if (!written.startsWith("catalog:")) return written;
|
|
172
|
-
const catalog = written.slice(8);
|
|
173
|
-
return (catalog === "" ? groups.get("workspaces.catalog")?.[name] ?? groups.get("catalog")?.[name] : groups.get(`workspaces.catalogs.${catalog}`)?.[name] ?? groups.get(`catalogs.${catalog}`)?.[name]) ?? written;
|
|
174
|
-
};
|
|
175
171
|
const alchemyPins = (repo) => Effect.gen(function* () {
|
|
176
172
|
const root = yield* read(repo, "package.json", manifestRanges);
|
|
177
173
|
if (!root.ok) return root.findings;
|
|
@@ -184,19 +180,23 @@ const alchemyPins = (repo) => Effect.gen(function* () {
|
|
|
184
180
|
findings.push(...input.findings);
|
|
185
181
|
continue;
|
|
186
182
|
}
|
|
187
|
-
for (const [field, ranges] of input.value) for (const [name, written] of Object.entries(ranges).toSorted(([a], [b]) => a.localeCompare(b))) if (name === "alchemy" || name.startsWith("@alchemy.run/")) entries.push({
|
|
183
|
+
for (const [field, ranges] of input.value) for (const [name, written] of Object.entries(ranges).toSorted(([a], [b]) => a.localeCompare(b))) if ((name === "alchemy" || name.startsWith("@alchemy.run/")) && !written.startsWith("workspace:")) entries.push({
|
|
188
184
|
file,
|
|
189
185
|
field,
|
|
190
186
|
name,
|
|
191
|
-
version:
|
|
187
|
+
version: resolveCatalog(name, written, groups)
|
|
192
188
|
});
|
|
193
189
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
190
|
+
return Option.match(versionOf("alchemy"), {
|
|
191
|
+
onNone: () => [...findings, {
|
|
192
|
+
file: "package.json",
|
|
193
|
+
message: "toolchain catalog has no Alchemy version"
|
|
194
|
+
}],
|
|
195
|
+
onSome: (expected) => [...findings, ...entries.filter((entry) => entry.version !== expected).map((entry) => ({
|
|
196
|
+
file: entry.file,
|
|
197
|
+
message: `${entry.field} ${entry.name}: ${entry.version} must match the exact Alchemy version ${expected}`
|
|
198
|
+
}))]
|
|
198
199
|
});
|
|
199
|
-
return findings;
|
|
200
200
|
});
|
|
201
201
|
// src/standard/config.ts
|
|
202
202
|
const ConfigValue = Schema.declare((value) => typeof value === "object" && value !== null);
|
|
@@ -847,8 +847,7 @@ const pin = (repo) => Effect.gen(function* () {
|
|
|
847
847
|
if (!input.ok) return input.findings;
|
|
848
848
|
const groups = new Map(input.value);
|
|
849
849
|
const version = groups.get("dependencies")?.[packageName] ?? groups.get("devDependencies")?.[packageName];
|
|
850
|
-
const
|
|
851
|
-
const resolved = name === void 0 ? version : name === "" ? groups.get("workspaces.catalog")?.[packageName] ?? groups.get("catalog")?.[packageName] : groups.get(`workspaces.catalogs.${name}`)?.[packageName] ?? groups.get(`catalogs.${name}`)?.[packageName];
|
|
850
|
+
const resolved = version === void 0 ? void 0 : resolveCatalog(packageName, version, groups);
|
|
852
851
|
return resolved !== void 0 && PLAIN.test(resolved) ? [] : [{
|
|
853
852
|
file: "package.json",
|
|
854
853
|
message: "pin @milkenjoyer/toolchain to an exact version or an exact catalog entry"
|
|
@@ -879,9 +878,19 @@ const renovate = (repo) => Effect.gen(function* () {
|
|
|
879
878
|
}];
|
|
880
879
|
});
|
|
881
880
|
const exact = (repo) => Effect.gen(function* () {
|
|
881
|
+
const root = yield* read(repo, "package.json", manifestRanges);
|
|
882
|
+
if (!root.ok) return root.findings;
|
|
883
|
+
const groups = new Map(root.value);
|
|
882
884
|
const findings = [];
|
|
883
885
|
for (const file of repo.tracked.filter((f) => /(?:^|\/)package\.json$/u.test(f))) {
|
|
884
|
-
const input = yield* read(repo, file, (text) => exactFindings(file, text))
|
|
886
|
+
const input = yield* read(repo, file, (text) => [...exactFindings(file, text), ...manifestRanges(text).flatMap(([field, ranges]) => Object.entries(ranges).flatMap(([name, written]) => {
|
|
887
|
+
if (name === "alchemy" || name.startsWith("@alchemy.run/") || written.startsWith("workspace:")) return [];
|
|
888
|
+
const actual = resolveCatalog(name, written, groups);
|
|
889
|
+
return Option.match(versionOf(name), {
|
|
890
|
+
onNone: () => [],
|
|
891
|
+
onSome: (expected) => actual === expected ? [] : [`${field} ${name}: ${actual} must match the toolchain catalog's ${expected}`]
|
|
892
|
+
});
|
|
893
|
+
}))]);
|
|
885
894
|
findings.push(...input.ok ? input.value.map((message) => ({
|
|
886
895
|
file,
|
|
887
896
|
message
|
|
@@ -5,17 +5,17 @@ import * as R from "effect/Record";
|
|
|
5
5
|
import * as Schema from "effect/Schema";
|
|
6
6
|
import * as Str from "effect/String";
|
|
7
7
|
// src/versions.ts
|
|
8
|
-
const nodeVersion = "26.13.
|
|
8
|
+
const nodeVersion = "26.13.1";
|
|
9
9
|
const families = [
|
|
10
10
|
{
|
|
11
11
|
name: "vite-plus",
|
|
12
|
-
version: "1.
|
|
12
|
+
version: "1.6.0",
|
|
13
13
|
packages: ["vite-plus"],
|
|
14
14
|
scopes: []
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
name: "alchemy",
|
|
18
|
-
version: "2.0.0-beta.
|
|
18
|
+
version: "2.0.0-beta.87",
|
|
19
19
|
packages: [
|
|
20
20
|
"@alchemy.run/domain",
|
|
21
21
|
"alchemy",
|
|
@@ -50,7 +50,7 @@ const families = [
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
name: "effect",
|
|
53
|
-
version: "4.1.
|
|
53
|
+
version: "4.1.4",
|
|
54
54
|
packages: [
|
|
55
55
|
"effect",
|
|
56
56
|
"@effect/platform-browser",
|
|
@@ -63,13 +63,13 @@ const families = [
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
name: "@effect/tsgo",
|
|
66
|
-
version: "0.
|
|
66
|
+
version: "0.69.0",
|
|
67
67
|
packages: ["@effect/tsgo"],
|
|
68
68
|
scopes: []
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
name: "ultracite",
|
|
72
|
-
version: "8.
|
|
72
|
+
version: "8.2.1",
|
|
73
73
|
packages: ["ultracite"],
|
|
74
74
|
scopes: []
|
|
75
75
|
},
|
|
@@ -81,7 +81,7 @@ const families = [
|
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
name: "effect-oxlint",
|
|
84
|
-
version: "0.
|
|
84
|
+
version: "0.5.1",
|
|
85
85
|
packages: ["effect-oxlint"],
|
|
86
86
|
scopes: []
|
|
87
87
|
},
|
|
@@ -95,22 +95,22 @@ const families = [
|
|
|
95
95
|
const fixed = [
|
|
96
96
|
{
|
|
97
97
|
name: "oxlint",
|
|
98
|
-
version: "1.
|
|
98
|
+
version: "1.93.0",
|
|
99
99
|
by: "vite-plus"
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
name: "@oxlint/plugins",
|
|
103
|
-
version: "1.
|
|
103
|
+
version: "1.93.0",
|
|
104
104
|
by: "vite-plus"
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
name: "oxlint-tsgolint",
|
|
108
|
-
version: "7.0.
|
|
108
|
+
version: "7.0.2006",
|
|
109
109
|
by: "vite-plus"
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
name: "oxfmt",
|
|
113
|
-
version: "0.
|
|
113
|
+
version: "0.78.0",
|
|
114
114
|
by: "vite-plus"
|
|
115
115
|
},
|
|
116
116
|
{
|
|
@@ -120,7 +120,7 @@ const fixed = [
|
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
name: "vite",
|
|
123
|
-
version: "npm:@voidzero-dev/vite-plus-core@1.
|
|
123
|
+
version: "npm:@voidzero-dev/vite-plus-core@1.6.0",
|
|
124
124
|
by: "vite-plus"
|
|
125
125
|
}
|
|
126
126
|
];
|
|
@@ -10,7 +10,7 @@ type Fixed = {
|
|
|
10
10
|
readonly version: string;
|
|
11
11
|
readonly by: string;
|
|
12
12
|
};
|
|
13
|
-
declare const nodeVersion = "26.13.
|
|
13
|
+
declare const nodeVersion = "26.13.1";
|
|
14
14
|
declare const families: ReadonlyArray<Family>;
|
|
15
15
|
declare const fixed: ReadonlyArray<Fixed>;
|
|
16
16
|
type Catalog = {
|
package/dist/versions.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as families, c as fixed, d as lead, f as nodeVersion, g as versions, h as versionOf, i as catalog, l as fixedBy, m as pinned, n as Family, o as familyNamed, p as ownerOf, r as Fixed, s as familyOf, t as Catalog, u as fixedOf } from "./versions-
|
|
1
|
+
import { a as families, c as fixed, d as lead, f as nodeVersion, g as versions, h as versionOf, i as catalog, l as fixedBy, m as pinned, n as Family, o as familyNamed, p as ownerOf, r as Fixed, s as familyOf, t as Catalog, u as fixedOf } from "./versions-DqZd0jF9.mjs";
|
|
2
2
|
export { Catalog, Family, Fixed, catalog, families, familyNamed, familyOf, fixed, fixedBy, fixedOf, lead, nodeVersion, ownerOf, pinned, versionOf, versions };
|
package/dist/versions.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as catalog, n as families, r as familyNamed, i as familyOf, a as fixed, o as fixedBy, s as fixedOf, c as lead, l as nodeVersion, u as ownerOf, d as pinned, f as versionOf, p as versions } from "./versions-
|
|
1
|
+
export { t as catalog, n as families, r as familyNamed, i as familyOf, a as fixed, o as fixedBy, s as fixedOf, c as lead, l as nodeVersion, u as ownerOf, d as pinned, f as versionOf, p as versions } from "./versions-DpRzgSR_.mjs";
|
package/node-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
26.13.
|
|
1
|
+
26.13.1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milkenjoyer/toolchain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/birbprophet/agent-kit.git",
|
|
@@ -109,30 +109,30 @@
|
|
|
109
109
|
},
|
|
110
110
|
"dependencies": {
|
|
111
111
|
"@boatdev/sdk": "1.13.0",
|
|
112
|
-
"@effect/platform-node": "4.1.
|
|
113
|
-
"@effect/tsgo": "0.
|
|
112
|
+
"@effect/platform-node": "4.1.4",
|
|
113
|
+
"@effect/tsgo": "0.69.0",
|
|
114
114
|
"@foldkit/oxlint-plugin": "0.15.4",
|
|
115
115
|
"@mpsuesser/oxlint-plugin-effect": "0.6.0",
|
|
116
116
|
"@octokit/rest": "22.0.1",
|
|
117
|
-
"effect": "4.1.
|
|
118
|
-
"effect-oxlint": "0.
|
|
117
|
+
"effect": "4.1.4",
|
|
118
|
+
"effect-oxlint": "0.5.1",
|
|
119
119
|
"oxc-parser": "0.157.0",
|
|
120
120
|
"semver": "7.8.6",
|
|
121
|
-
"ultracite": "8.
|
|
121
|
+
"ultracite": "8.2.1",
|
|
122
122
|
"yaml": "2.9.1",
|
|
123
123
|
"z3-solver": "5.3.3"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@birbprophet/test-kit": "0.0.0",
|
|
127
|
-
"@effect/vitest": "4.1.
|
|
127
|
+
"@effect/vitest": "4.1.4",
|
|
128
128
|
"@types/semver": "7.8.0",
|
|
129
129
|
"jsonata": "2.2.2",
|
|
130
130
|
"knip": "6.44.1",
|
|
131
|
-
"oxlint": "1.
|
|
132
|
-
"vite-plus": "1.
|
|
131
|
+
"oxlint": "1.93.0",
|
|
132
|
+
"vite-plus": "1.6.0"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|
|
135
135
|
"knip": "6.44.1",
|
|
136
|
-
"vite-plus": "1.
|
|
136
|
+
"vite-plus": "1.6.0"
|
|
137
137
|
}
|
|
138
138
|
}
|
package/src/fmt.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type FmtOptions = {
|
|
|
5
5
|
readonly ignores?: ReadonlyArray<string>;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
const { ignorePatterns: coreIgnores
|
|
8
|
+
const { ignorePatterns: coreIgnores } = ultraciteFmt;
|
|
9
9
|
|
|
10
10
|
export const fmt = ({ ignores = [] }: FmtOptions = {}): OxfmtConfig => ({
|
|
11
11
|
...ultraciteFmt,
|
package/src/formal/tla.ts
CHANGED
|
@@ -165,11 +165,18 @@ const make = Effect.gen(function* () {
|
|
|
165
165
|
) {
|
|
166
166
|
return yield* Effect.scoped(
|
|
167
167
|
Effect.gen(function* () {
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
stdin: "ignore",
|
|
171
|
-
killSignal: "SIGKILL",
|
|
168
|
+
const temporary = yield* fs.makeTempDirectoryScoped({
|
|
169
|
+
prefix: "formal-java-",
|
|
172
170
|
});
|
|
171
|
+
const process = yield* ChildProcess.make(
|
|
172
|
+
"java",
|
|
173
|
+
[`-Djava.io.tmpdir=${temporary}`, ...args],
|
|
174
|
+
{
|
|
175
|
+
cwd,
|
|
176
|
+
stdin: "ignore",
|
|
177
|
+
killSignal: "SIGKILL",
|
|
178
|
+
}
|
|
179
|
+
);
|
|
173
180
|
return yield* Effect.all(
|
|
174
181
|
[
|
|
175
182
|
process.stdout.pipe(Stream.decodeText, Stream.mkString),
|
package/src/lint.ts
CHANGED
|
@@ -124,7 +124,7 @@ export const birbprophetRules = atError(
|
|
|
124
124
|
R.keys(birbprophetPlugin.rules)
|
|
125
125
|
);
|
|
126
126
|
|
|
127
|
-
const { ignorePatterns: coreIgnores
|
|
127
|
+
const { ignorePatterns: coreIgnores } = ultraciteCore;
|
|
128
128
|
|
|
129
129
|
const resolved = (specifier: string): string =>
|
|
130
130
|
decodeURIComponent(new URL(import.meta.resolve(specifier)).pathname);
|
package/src/standard/alchemy.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { versionOf } from "../versions.ts";
|
|
5
|
+
import { manifestRanges, resolveCatalog } from "./manifest.ts";
|
|
4
6
|
import { read, type Finding, type Rule } from "./repo.ts";
|
|
5
7
|
|
|
6
8
|
interface AlchemyEntry {
|
|
@@ -9,21 +11,6 @@ interface AlchemyEntry {
|
|
|
9
11
|
readonly name: string;
|
|
10
12
|
readonly version: string;
|
|
11
13
|
}
|
|
12
|
-
const resolve = (
|
|
13
|
-
name: string,
|
|
14
|
-
written: string,
|
|
15
|
-
groups: ReadonlyMap<string, Ranges>
|
|
16
|
-
): string => {
|
|
17
|
-
if (!written.startsWith("catalog:")) return written;
|
|
18
|
-
const catalog = written.slice(8);
|
|
19
|
-
return (
|
|
20
|
-
(catalog === ""
|
|
21
|
-
? (groups.get("workspaces.catalog")?.[name] ??
|
|
22
|
-
groups.get("catalog")?.[name])
|
|
23
|
-
: (groups.get(`workspaces.catalogs.${catalog}`)?.[name] ??
|
|
24
|
-
groups.get(`catalogs.${catalog}`)?.[name])) ?? written
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
14
|
export const alchemyPins: Rule = (repo) =>
|
|
28
15
|
Effect.gen(function* () {
|
|
29
16
|
const root = yield* read(repo, "package.json", manifestRanges);
|
|
@@ -46,25 +33,35 @@ export const alchemyPins: Rule = (repo) =>
|
|
|
46
33
|
for (const [name, written] of Object.entries(ranges).toSorted(
|
|
47
34
|
([a], [b]) => a.localeCompare(b)
|
|
48
35
|
)) {
|
|
49
|
-
if (
|
|
36
|
+
if (
|
|
37
|
+
(name === "alchemy" || name.startsWith("@alchemy.run/")) &&
|
|
38
|
+
!written.startsWith("workspace:")
|
|
39
|
+
)
|
|
50
40
|
entries.push({
|
|
51
41
|
file,
|
|
52
42
|
field,
|
|
53
43
|
name,
|
|
54
|
-
version:
|
|
44
|
+
version: resolveCatalog(name, written, groups),
|
|
55
45
|
});
|
|
56
46
|
}
|
|
57
47
|
}
|
|
58
48
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
49
|
+
return Option.match(versionOf("alchemy"), {
|
|
50
|
+
onNone: () => [
|
|
51
|
+
...findings,
|
|
52
|
+
{
|
|
53
|
+
file: "package.json",
|
|
54
|
+
message: "toolchain catalog has no Alchemy version",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
onSome: (expected) => [
|
|
58
|
+
...findings,
|
|
59
|
+
...entries
|
|
60
|
+
.filter((entry) => entry.version !== expected)
|
|
61
|
+
.map((entry) => ({
|
|
62
|
+
file: entry.file,
|
|
63
|
+
message: `${entry.field} ${entry.name}: ${entry.version} must match the exact Alchemy version ${expected}`,
|
|
64
|
+
})),
|
|
65
|
+
],
|
|
66
|
+
});
|
|
70
67
|
});
|
package/src/standard/manifest.ts
CHANGED
|
@@ -39,6 +39,22 @@ const Manifest = Schema.fromJsonString(
|
|
|
39
39
|
|
|
40
40
|
export type Ranges = Readonly<Record<string, string>>;
|
|
41
41
|
|
|
42
|
+
export const resolveCatalog = (
|
|
43
|
+
name: string,
|
|
44
|
+
written: string,
|
|
45
|
+
groups: ReadonlyMap<string, Ranges>
|
|
46
|
+
): string => {
|
|
47
|
+
if (!written.startsWith("catalog:")) return written;
|
|
48
|
+
const catalog = written.slice(8);
|
|
49
|
+
return (
|
|
50
|
+
(catalog === ""
|
|
51
|
+
? (groups.get("workspaces.catalog")?.[name] ??
|
|
52
|
+
groups.get("catalog")?.[name])
|
|
53
|
+
: (groups.get(`workspaces.catalogs.${catalog}`)?.[name] ??
|
|
54
|
+
groups.get(`catalogs.${catalog}`)?.[name])) ?? written
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
42
58
|
const named = (
|
|
43
59
|
prefix: string,
|
|
44
60
|
catalogs: Readonly<Record<string, Ranges>>
|
|
@@ -2,9 +2,16 @@ import { fileURLToPath } from "node:url";
|
|
|
2
2
|
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import { FileSystem } from "effect/FileSystem";
|
|
5
|
+
import * as Option from "effect/Option";
|
|
5
6
|
import * as Schema from "effect/Schema";
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import { versionOf } from "../versions.ts";
|
|
9
|
+
import {
|
|
10
|
+
exactFindings,
|
|
11
|
+
manifestRanges,
|
|
12
|
+
PLAIN,
|
|
13
|
+
resolveCatalog,
|
|
14
|
+
} from "./manifest.ts";
|
|
8
15
|
import { read, type Finding, type Rule } from "./repo.ts";
|
|
9
16
|
|
|
10
17
|
const packageName = "@milkenjoyer/toolchain";
|
|
@@ -16,16 +23,10 @@ export const pin: Rule = (repo) =>
|
|
|
16
23
|
const version =
|
|
17
24
|
groups.get("dependencies")?.[packageName] ??
|
|
18
25
|
groups.get("devDependencies")?.[packageName];
|
|
19
|
-
const name =
|
|
20
|
-
version?.startsWith("catalog:") === true ? version.slice(8) : undefined;
|
|
21
26
|
const resolved =
|
|
22
|
-
|
|
23
|
-
?
|
|
24
|
-
:
|
|
25
|
-
? (groups.get("workspaces.catalog")?.[packageName] ??
|
|
26
|
-
groups.get("catalog")?.[packageName])
|
|
27
|
-
: (groups.get(`workspaces.catalogs.${name}`)?.[packageName] ??
|
|
28
|
-
groups.get(`catalogs.${name}`)?.[packageName]);
|
|
27
|
+
version === undefined
|
|
28
|
+
? undefined
|
|
29
|
+
: resolveCatalog(packageName, version, groups);
|
|
29
30
|
return resolved !== undefined && PLAIN.test(resolved)
|
|
30
31
|
? []
|
|
31
32
|
: [
|
|
@@ -73,13 +74,36 @@ export const renovate: Rule = (repo) =>
|
|
|
73
74
|
});
|
|
74
75
|
export const exact: Rule = (repo) =>
|
|
75
76
|
Effect.gen(function* () {
|
|
77
|
+
const root = yield* read(repo, "package.json", manifestRanges);
|
|
78
|
+
if (!root.ok) return root.findings;
|
|
79
|
+
const groups = new Map(root.value);
|
|
76
80
|
const findings: Finding[] = [];
|
|
77
81
|
for (const file of repo.tracked.filter((f) =>
|
|
78
82
|
/(?:^|\/)package\.json$/u.test(f)
|
|
79
83
|
)) {
|
|
80
|
-
const input = yield* read(repo, file, (text) =>
|
|
81
|
-
exactFindings(file, text)
|
|
82
|
-
|
|
84
|
+
const input = yield* read(repo, file, (text) => [
|
|
85
|
+
...exactFindings(file, text),
|
|
86
|
+
...manifestRanges(text).flatMap(([field, ranges]) =>
|
|
87
|
+
Object.entries(ranges).flatMap(([name, written]) => {
|
|
88
|
+
if (
|
|
89
|
+
name === "alchemy" ||
|
|
90
|
+
name.startsWith("@alchemy.run/") ||
|
|
91
|
+
written.startsWith("workspace:")
|
|
92
|
+
)
|
|
93
|
+
return [];
|
|
94
|
+
const actual = resolveCatalog(name, written, groups);
|
|
95
|
+
return Option.match(versionOf(name), {
|
|
96
|
+
onNone: () => [],
|
|
97
|
+
onSome: (expected) =>
|
|
98
|
+
actual === expected
|
|
99
|
+
? []
|
|
100
|
+
: [
|
|
101
|
+
`${field} ${name}: ${actual} must match the toolchain catalog's ${expected}`,
|
|
102
|
+
],
|
|
103
|
+
});
|
|
104
|
+
})
|
|
105
|
+
),
|
|
106
|
+
]);
|
|
83
107
|
findings.push(
|
|
84
108
|
...(input.ok
|
|
85
109
|
? input.value.map((message) => ({ file, message }))
|
package/src/versions.ts
CHANGED
|
@@ -18,18 +18,18 @@ export type Fixed = {
|
|
|
18
18
|
readonly by: string;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export const nodeVersion = "26.13.
|
|
21
|
+
export const nodeVersion = "26.13.1";
|
|
22
22
|
|
|
23
23
|
export const families: ReadonlyArray<Family> = [
|
|
24
24
|
{
|
|
25
25
|
name: "vite-plus",
|
|
26
|
-
version: "1.
|
|
26
|
+
version: "1.6.0",
|
|
27
27
|
packages: ["vite-plus"],
|
|
28
28
|
scopes: [],
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
name: "alchemy",
|
|
32
|
-
version: "2.0.0-beta.
|
|
32
|
+
version: "2.0.0-beta.87",
|
|
33
33
|
packages: [
|
|
34
34
|
"@alchemy.run/domain",
|
|
35
35
|
"alchemy",
|
|
@@ -64,7 +64,7 @@ export const families: ReadonlyArray<Family> = [
|
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
name: "effect",
|
|
67
|
-
version: "4.1.
|
|
67
|
+
version: "4.1.4",
|
|
68
68
|
packages: [
|
|
69
69
|
"effect",
|
|
70
70
|
"@effect/platform-browser",
|
|
@@ -77,13 +77,13 @@ export const families: ReadonlyArray<Family> = [
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
name: "@effect/tsgo",
|
|
80
|
-
version: "0.
|
|
80
|
+
version: "0.69.0",
|
|
81
81
|
packages: ["@effect/tsgo"],
|
|
82
82
|
scopes: [],
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
name: "ultracite",
|
|
86
|
-
version: "8.
|
|
86
|
+
version: "8.2.1",
|
|
87
87
|
packages: ["ultracite"],
|
|
88
88
|
scopes: [],
|
|
89
89
|
},
|
|
@@ -95,7 +95,7 @@ export const families: ReadonlyArray<Family> = [
|
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
name: "effect-oxlint",
|
|
98
|
-
version: "0.
|
|
98
|
+
version: "0.5.1",
|
|
99
99
|
packages: ["effect-oxlint"],
|
|
100
100
|
scopes: [],
|
|
101
101
|
},
|
|
@@ -108,14 +108,14 @@ export const families: ReadonlyArray<Family> = [
|
|
|
108
108
|
];
|
|
109
109
|
|
|
110
110
|
export const fixed: ReadonlyArray<Fixed> = [
|
|
111
|
-
{ name: "oxlint", version: "1.
|
|
112
|
-
{ name: "@oxlint/plugins", version: "1.
|
|
113
|
-
{ name: "oxlint-tsgolint", version: "7.0.
|
|
114
|
-
{ name: "oxfmt", version: "0.
|
|
111
|
+
{ name: "oxlint", version: "1.93.0", by: "vite-plus" },
|
|
112
|
+
{ name: "@oxlint/plugins", version: "1.93.0", by: "vite-plus" },
|
|
113
|
+
{ name: "oxlint-tsgolint", version: "7.0.2006", by: "vite-plus" },
|
|
114
|
+
{ name: "oxfmt", version: "0.78.0", by: "vite-plus" },
|
|
115
115
|
{ name: "vitest", version: "5.1.0", by: "vite-plus" },
|
|
116
116
|
{
|
|
117
117
|
name: "vite",
|
|
118
|
-
version: "npm:@voidzero-dev/vite-plus-core@1.
|
|
118
|
+
version: "npm:@voidzero-dev/vite-plus-core@1.6.0",
|
|
119
119
|
by: "vite-plus",
|
|
120
120
|
},
|
|
121
121
|
];
|