@skillstech/thunderlang 1.6.1 → 1.7.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/core.cjs +31 -28
  3. package/dist/index.cjs +292 -59
  4. package/dist/learn.cjs +81 -22
  5. package/package.json +1 -1
  6. package/src/ai.mjs +2 -1
  7. package/src/atlas.mjs +2 -1
  8. package/src/behaviour.mjs +246 -0
  9. package/src/cli-main.mjs +2818 -0
  10. package/src/cli.mjs +9 -2799
  11. package/src/conflict.mjs +0 -0
  12. package/src/core/ThunderDotnet.cs +195 -0
  13. package/src/core/check.mjs +4 -4
  14. package/src/core/cli.mjs +7 -2
  15. package/src/core/csharp-run.mjs +29 -8
  16. package/src/core/diagnostics.mjs +3 -1
  17. package/src/core/engine-core.mjs +20 -1
  18. package/src/core/go-run.mjs +3 -2
  19. package/src/core/java-run.mjs +3 -3
  20. package/src/core/kind.mjs +42 -0
  21. package/src/core/parser.mjs +54 -7
  22. package/src/core/project.mjs +3 -0
  23. package/src/core/react-run.mjs +3 -3
  24. package/src/core/runtime-npm.mjs +79 -0
  25. package/src/core/runtime-react.mjs +2 -1
  26. package/src/core/runtime-typescript.mjs +7 -3
  27. package/src/core/rust-run.mjs +3 -2
  28. package/src/core/target-csharp.mjs +5 -1
  29. package/src/core/target-go.mjs +1 -1
  30. package/src/core/target-python.mjs +1 -1
  31. package/src/core/target-rust.mjs +1 -1
  32. package/src/core/target-typescript.mjs +33 -1
  33. package/src/core/typescript-run.mjs +9 -4
  34. package/src/decision.mjs +2 -1
  35. package/src/distributed.mjs +2 -1
  36. package/src/emit.mjs +2 -2
  37. package/src/focus.mjs +2 -1
  38. package/src/intent-atlas.mjs +4 -3
  39. package/src/mcp.mjs +10 -3
  40. package/src/passport-fs.mjs +2 -1
  41. package/src/passport.mjs +2 -1
  42. package/src/privacy.mjs +2 -1
  43. package/src/read-repo.mjs +3 -2
  44. package/src/report.mjs +3 -2
  45. package/src/review.mjs +2 -1
  46. package/src/select.mjs +2 -1
  47. package/src/semantic-diff.mjs +7 -6
  48. package/src/system.mjs +2 -1
  49. package/src/text-order.mjs +6 -0
  50. package/src/thunderize.mjs +2 -1
  51. package/src/trace-data.mjs +3 -2
  52. package/src/trace.mjs +4 -3
  53. package/src/write-across-cli.mjs +22 -4
  54. package/src/write-across.mjs +2 -1
  55. package/syntaxes/thunder.tmLanguage.json +196 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,49 @@
1
+ # 1.7.0
2
+
3
+ - **.NET and NuGet from Thunder Core.** `Use "System.IO.Path" from .NET as paths` and `Use "Humanizer.NumberToWordsExtension"
4
+ from NuGet "Humanizer.Core" version "2.14.1" as words` give a program compiled to C# the .NET ecosystem. Static
5
+ methods and properties are called by name; the overload is chosen by which parameters every value fits; numbers come
6
+ back exact (`decimal` as written, `double` as it prints). The NuGet package and its version go into the generated
7
+ project. Programs that use .NET libraries run with real culture data, pinned to en-US. A failure is TC508 with its
8
+ real cause; every other target and the Thunder engine refuse a .NET library (new TC409).
9
+ - **See what a change does: `thunder write --behaviour`.** For Python, Thunder runs each edited function before and
10
+ after the change on inputs made from its own code (its numbers and one either side, its text, yes/no, the edges)
11
+ and lists the inputs whose answer changed: `amount 100, days 29, refunded False: before 'approve', after
12
+ 'review'`. Printed output and errors count. It runs your code, so it is opt-in; a changed file that no longer
13
+ loads is reported and not saved. Also `behaviour: true` on the MCP tool `intent_write`. Tested evidence on those
14
+ inputs, never called a proof. Across services too: `thunder write web orders billing --decision … --when …
15
+ --behaviour` runs each Python implementation (the checkout demo shows `subtotal 40: before 5.99, after 0`).
16
+ - **The read ↔ write round trip runs on made inputs too.** `docs/core-read-write.md` now also compares the original
17
+ Python with Core compiled back to Python on inputs made from each function's code: 11 of 11 functions, 134 of 134
18
+ inputs give the same results (alongside the 53 hand-picked inputs).
19
+ - **A `.thunder` file says what it is.** Outside a project, a file whose first line cannot start a mission
20
+ (`say "Hello"`, `Set total to 0`, `To greet:`, `A Trade has:`) is now run, tested, and checked as Thunder Core
21
+ without `--core`: `thunder run hello.thunder` just works. Files that start with a mission keyword stay missions,
22
+ so no existing mission changes meaning; a file that could be either (`use csv` alone) stays a mission, and
23
+ `--mission` / `--core` still decide when given. A mission check that finds no mission now says how to read the
24
+ file as a program.
25
+ - **One map of the language.** New docs page, *The Thunder language*: Thunder Text, Thunder Core, and missions side
26
+ by side with the same rule in each, which to use when, and how a file's kind is decided.
27
+ - **npm packages from Thunder Core.** `Use "date-fns" from npm as dates` gives a program compiled to TypeScript the npm
28
+ ecosystem, the way `Use csv as csv` gives Python programs Python's. Values cross the boundary in plain rules (lists
29
+ become arrays, records become objects, dates become a local-midnight `Date`), and numbers come back as the exact
30
+ decimal they are written as, so `0.07 + 0.01` is still exactly `0.08`. Scoped packages, paths inside a package,
31
+ `node:` built-ins, and one-function CommonJS packages (`.default`) work. A failure inside the package, a missing
32
+ name, or a promise is TC508 in words, against the Thunder line that called it. Every other target, and the Thunder
33
+ engine, refuses an npm package (new TC408) instead of guessing. `npm_packages.d.ts` keeps `tsc --strict` passing for
34
+ packages without types. `Use csv from Python as csv` is accepted too.
35
+ - **Faster start.** Every command starts about a quarter faster in CPU time: the Unicode collation data no longer loads
36
+ at start (sorting is by character order now, the same on every machine, where it used to depend on the machine's
37
+ locale), and on Node 22.1+ Thunder turns on Node's compile cache, so the compiler is not parsed again on every
38
+ command. `compiler/scripts/speed.mjs` measures everyday commands.
39
+ - **The engine never runs a program that did not compile.** `runInProcess`, `recordedRun`, and `testInProcess` (used by
40
+ the site and OpenThunder) now refuse with the program's problems; before, a test could pass on a broken program.
41
+ - **Clearer: a name that is only "a", "an", or "the".** `Receive a and b` now says `"a" can't be a name on its own:
42
+ Thunder skips "a", "an", and "the" in names`, with a suggestion, instead of `"Receive" is missing a name`.
43
+ - **On thunderlang.dev:** a Thunder playground (write a program; see what it prints, try its functions with your own
44
+ values, run its tests, step through it; share it by link), and ThunderBench, an open benchmark with every result
45
+ published (`thunderbench/`).
46
+
1
47
  # 1.6.1
2
48
 
3
49
  - **Fix: Thunder write wrote names the code does not have.** A word that is no name in the function or file
package/dist/core.cjs CHANGED
@@ -18876,6 +18876,9 @@ var BLOCKABLE_PHASES = [
18876
18876
  "release"
18877
18877
  ];
18878
18878
 
18879
+ // src/text-order.mjs
18880
+ var byText = (a, b) => a < b ? -1 : a > b ? 1 : 0;
18881
+
18879
18882
  // src/conflict.mjs
18880
18883
  var norm = (s) => String(s ?? "").trim().toLowerCase().replace(/[^a-z0-9]+/g, " ").trim();
18881
18884
  var NEG = /\b(no|not|never|forbidden|prohibited|unavailable|disallowed|without)\b/;
@@ -18917,7 +18920,7 @@ function detectConflicts(ast) {
18917
18920
  }
18918
18921
  }
18919
18922
  }
18920
- return out.sort((a, b) => `${a.type}\0${a.name}`.localeCompare(`${b.type}\0${b.name}`));
18923
+ return out.sort((a, b) => byText(`${a.type}\0${a.name}`, `${b.type}\0${b.name}`));
18921
18924
  }
18922
18925
 
18923
18926
  // src/distributed.mjs
@@ -18947,7 +18950,7 @@ function analyzeDistributed(ast) {
18947
18950
  findings2.push({ code: "IL-DIST-005", target: h.trigger, message: `Duplicate handler references undeclared event "${m[1]}".` });
18948
18951
  }
18949
18952
  }
18950
- return findings2.sort((a, b) => `${a.code} ${a.target}`.localeCompare(`${b.code} ${b.target}`));
18953
+ return findings2.sort((a, b) => byText(`${a.code} ${a.target}`, `${b.code} ${b.target}`));
18951
18954
  }
18952
18955
 
18953
18956
  // src/decision.mjs
@@ -18971,7 +18974,7 @@ function analyzeDecision(dec) {
18971
18974
  }
18972
18975
  }
18973
18976
  }
18974
- return findings2.sort((a, b) => `${a.code} ${a.message}`.localeCompare(`${b.code} ${b.message}`));
18977
+ return findings2.sort((a, b) => byText(`${a.code} ${a.message}`, `${b.code} ${b.message}`));
18975
18978
  }
18976
18979
 
18977
18980
  // src/privacy.mjs
@@ -19033,7 +19036,7 @@ function analyzePrivacy(ast) {
19033
19036
  });
19034
19037
  }
19035
19038
  }
19036
- out.sort((a, b) => (a.code + a.path).localeCompare(b.code + b.path));
19039
+ out.sort((a, b) => byText(a.code + a.path, b.code + b.path));
19037
19040
  return out;
19038
19041
  }
19039
19042
 
@@ -19407,7 +19410,7 @@ function notesSummary(ast) {
19407
19410
  byLens
19408
19411
  };
19409
19412
  }
19410
- var COMPILER_VERSION = "1.6.1";
19413
+ var COMPILER_VERSION = "1.7.0";
19411
19414
  var PROOF_SCHEMA_VERSION = "0.1.0";
19412
19415
  var SOURCE_PRODUCT = "skillstech-compiler";
19413
19416
  function buildContractGraph(ast, generatedAt) {
@@ -19480,7 +19483,7 @@ function semanticDiagnostics(ast) {
19480
19483
  err(
19481
19484
  "missing-subject",
19482
19485
  "No mission, service, event, api, database, or experience declared.",
19483
- "Every file must declare one subject so the compiler knows what it is reasoning about.",
19486
+ "Every mission file must declare one subject so the compiler knows what it is reasoning about. If this file is a Thunder program (code that runs), add --core, or put it in a project (thunder new).",
19484
19487
  [{ label: "Add a mission declaration", insert: "mission MyMission", block: "top" }]
19485
19488
  );
19486
19489
  }
@@ -31295,7 +31298,7 @@ function summarize(items, files) {
31295
31298
  inputs.get(p.name).push(it.id);
31296
31299
  }
31297
31300
  }
31298
- const byUse = (m) => [...m].map(([name, ids]) => ({ name, decisions: ids })).sort((a, b) => b.decisions.length - a.decisions.length || a.name.localeCompare(b.name));
31301
+ const byUse = (m) => [...m].map(([name, ids]) => ({ name, decisions: ids })).sort((a, b) => b.decisions.length - a.decisions.length || byText(a.name, b.name));
31299
31302
  return { files, items, counts, languages, folders, answers: byUse(answers), inputs: byUse(inputs) };
31300
31303
  }
31301
31304
  function searchRepo(index, { query = "", kinds = [], status = [], languages = [], path = "", answer = "", input = "" } = {}) {
@@ -31319,7 +31322,7 @@ function groupByFile(items) {
31319
31322
  if (!groups3.has(it.file)) groups3.set(it.file, []);
31320
31323
  groups3.get(it.file).push(it);
31321
31324
  }
31322
- return [...groups3].sort(([a], [b]) => a.localeCompare(b)).map(([file, list3]) => ({ file, language: list3[0].language, items: list3 }));
31325
+ return [...groups3].sort(([a], [b]) => byText(a, b)).map(([file, list3]) => ({ file, language: list3[0].language, items: list3 }));
31323
31326
  }
31324
31327
  function readFiles(files) {
31325
31328
  return files.map((f) => {
@@ -35015,7 +35018,7 @@ function callsSummary(model) {
35015
35018
  else p.calls++;
35016
35019
  if (p.examples.length < 3) p.examples.push({ from: a.id, to: b.id, says: l.kind === "sends-to" ? `${a.label} sends ${l.method ? `${l.method} ${l.path}` : l.event ? `the event ${l.event}` : `a task`} to ${b.label}` : `${a.label} calls ${b.label}` });
35017
35020
  }
35018
- return [...pairs2.values()].sort((x, y) => y.calls + y.sends - (x.calls + x.sends) || x.from.localeCompare(y.from) || x.to.localeCompare(y.to));
35021
+ return [...pairs2.values()].sort((x, y) => y.calls + y.sends - (x.calls + x.sends) || byText(x.from, y.from) || byText(x.to, y.to));
35019
35022
  }
35020
35023
 
35021
35024
  // src/flow/ts-parse.mjs
@@ -41110,7 +41113,7 @@ function settingsIn(files) {
41110
41113
  }
41111
41114
  }
41112
41115
  }
41113
- return out.sort((a, b) => a.file.localeCompare(b.file) || a.line - b.line || a.key.localeCompare(b.key));
41116
+ return out.sort((a, b) => byText(a.file, b.file) || a.line - b.line || byText(a.key, b.key));
41114
41117
  }
41115
41118
  var NAME = '((?:[`"\\[]?[A-Za-z_][\\w$]*[`"\\]]?\\.){0,2}[`"\\[]?[A-Za-z_][\\w$]*[`"\\]]?)';
41116
41119
  var NOT_TABLES = /* @__PURE__ */ new Set(["select", "set", "where", "values", "dual", "lateral", "unnest", "only", "table", "if", "exists", "not", "the", "a", "an", "my", "your", "this", "that", "each", "all", "json_table", "information_schema", "pg_catalog", "sys"]);
@@ -41180,7 +41183,7 @@ function tablesIn(files) {
41180
41183
  if (seen.has(k)) return false;
41181
41184
  seen.add(k);
41182
41185
  return true;
41183
- }).sort((a, b) => a.file.localeCompare(b.file) || a.line - b.line || a.table.localeCompare(b.table));
41186
+ }).sort((a, b) => byText(a.file, b.file) || a.line - b.line || byText(a.table, b.table));
41184
41187
  }
41185
41188
  var DEFINES = /* @__PURE__ */ new Set(["creates", "alters", "drops"]);
41186
41189
 
@@ -41325,8 +41328,8 @@ function linkRepos(read) {
41325
41328
  return true;
41326
41329
  });
41327
41330
  };
41328
- links.splice(0, links.length, ...once(links).sort((a, b) => sortKey(a).localeCompare(sortKey(b))));
41329
- notLinked.splice(0, notLinked.length, ...once(notLinked).sort((a, b) => sortKey(a).localeCompare(sortKey(b))));
41331
+ links.splice(0, links.length, ...once(links).sort((a, b) => byText(sortKey(a), sortKey(b))));
41332
+ notLinked.splice(0, notLinked.length, ...once(notLinked).sort((a, b) => byText(sortKey(a), sortKey(b))));
41330
41333
  const repos = read.map(({ unknown, ...r }) => ({ ...r, unknown: unknown ?? [], packages: pk(r), settings: r.settings ?? [], tables: tb(r) }));
41331
41334
  const body2 = { schema: TRACE_SCHEMA, rulesVersion: TRACE_RULES_VERSION, repos, links, notLinked, shared };
41332
41335
  return { ...body2, fingerprint: sha256(JSON.stringify(body2)) };
@@ -41474,7 +41477,7 @@ function writeRuleAcross(files, { decision, rule, when }) {
41474
41477
  }
41475
41478
  result.files[k] = source;
41476
41479
  }
41477
- result.plan.sort((a, b) => where(a).localeCompare(where(b)) || a.line - b.line);
41480
+ result.plan.sort((a, b) => byText(where(a), where(b)) || a.line - b.line);
41478
41481
  if (problems.length) return { ...base2, files: {}, plan: [], rule: result.rule, notIncluded: result.notIncluded, tests: result.tests, problems: ["Nothing was changed: every implementation must be written exactly, or none is.", ...problems] };
41479
41482
  return { ...result, ok: true };
41480
41483
  }
@@ -42374,7 +42377,7 @@ function thunderizeFiles(files, { name = "app" } = {}) {
42374
42377
  skipped.push({ path: f.path, reason: `could not be read: ${e.message}` });
42375
42378
  }
42376
42379
  }
42377
- out.sort((a, b) => a.path.localeCompare(b.path));
42380
+ out.sort((a, b) => byText(a.path, b.path));
42378
42381
  const total = { files: out.length, actions: 0, rules: 0, functions: 0, notReadYet: 0 };
42379
42382
  for (const f of out) for (const k of ["actions", "rules", "functions", "notReadYet"]) total[k] += f.counts[k];
42380
42383
  const langs = [...new Set(out.map((f) => LANGUAGE_NAMES[f.language] || f.language))].sort();
@@ -43166,7 +43169,7 @@ function thunderReview(oldFiles, newFiles) {
43166
43169
  for (const x of rest2) items.splice(items.indexOf(x), 1);
43167
43170
  }
43168
43171
  for (const x of items) if (x.also) x.subject = `${x.subject} and ${x.also.length} more`;
43169
- items.sort((a, b) => SEVERITY_ORDER.indexOf(a.severity) - SEVERITY_ORDER.indexOf(b.severity) || KIND_ORDER.indexOf(a.kind) - KIND_ORDER.indexOf(b.kind) || String(a.where.file).localeCompare(String(b.where.file)) || (a.where.line ?? 0) - (b.where.line ?? 0));
43172
+ items.sort((a, b) => SEVERITY_ORDER.indexOf(a.severity) - SEVERITY_ORDER.indexOf(b.severity) || KIND_ORDER.indexOf(a.kind) - KIND_ORDER.indexOf(b.kind) || byText(String(a.where.file), String(b.where.file)) || (a.where.line ?? 0) - (b.where.line ?? 0));
43170
43173
  const count2 = (s) => items.filter((x) => x.severity === s).length;
43171
43174
  const summary2 = { meaning: count2("meaning"), risk: count2("risk"), form: count2("form"), unchanged, files: paths.filter((p) => A.sources.get(p) !== B.sources.get(p)).length };
43172
43175
  const onlyNotRead = !items.length && summary2.files && notRead.length === summary2.files;
@@ -44509,9 +44512,9 @@ function diffGraphs(before, after) {
44509
44512
  const bn = bNodes.get(id2);
44510
44513
  if (bn && contentKey(bn) !== contentKey(an)) changedNodes.push({ id: id2, type: an.type, before: bn, after: an });
44511
44514
  }
44512
- addedNodes.sort((a, b) => a.id.localeCompare(b.id));
44513
- removedNodes.sort((a, b) => a.id.localeCompare(b.id));
44514
- changedNodes.sort((a, b) => a.id.localeCompare(b.id));
44515
+ addedNodes.sort((a, b) => byText(a.id, b.id));
44516
+ removedNodes.sort((a, b) => byText(a.id, b.id));
44517
+ changedNodes.sort((a, b) => byText(a.id, b.id));
44515
44518
  const bRel = new Set((before.relationships || []).map(relKey));
44516
44519
  const aRel = new Set((after.relationships || []).map(relKey));
44517
44520
  const addedRelationships = (after.relationships || []).filter((r) => !bRel.has(relKey(r)));
@@ -44596,11 +44599,11 @@ function mergeGraphs(base2, ours, theirs) {
44596
44599
  const present = inO !== inB ? inO : inT;
44597
44600
  if (present) mergedRels.push(r);
44598
44601
  }
44599
- mergedRels.sort((a, b2) => relKey(a).localeCompare(relKey(b2)));
44602
+ mergedRels.sort((a, b2) => byText(relKey(a), relKey(b2)));
44600
44603
  return {
44601
44604
  schema: "intent-merge-v1",
44602
- merged: { nodes: [...merged.values()].sort((a, b2) => a.id.localeCompare(b2.id)), relationships: mergedRels },
44603
- conflicts: conflicts.sort((a, b2) => a.id.localeCompare(b2.id)),
44605
+ merged: { nodes: [...merged.values()].sort((a, b2) => byText(a.id, b2.id)), relationships: mergedRels },
44606
+ conflicts: conflicts.sort((a, b2) => byText(a.id, b2.id)),
44604
44607
  clean: conflicts.length === 0,
44605
44608
  summary: { nodes: merged.size, relationships: mergedRels.length, conflicts: conflicts.length }
44606
44609
  };
@@ -45852,10 +45855,10 @@ function buildAtlas(graphs, opts = {}) {
45852
45855
  for (const n of g.nodes) if (!nodes2.has(n.id)) nodes2.set(n.id, n);
45853
45856
  for (const r of g.relationships) relationships.push(r);
45854
45857
  }
45855
- const nodeList = [...nodes2.values()].sort((a, b) => a.id.localeCompare(b.id));
45858
+ const nodeList = [...nodes2.values()].sort((a, b) => byText(a.id, b.id));
45856
45859
  const byType = {};
45857
45860
  for (const n of nodeList) byType[n.type] = (byType[n.type] || 0) + 1;
45858
- missions.sort((a, b) => a.id.localeCompare(b.id));
45861
+ missions.sort((a, b) => byText(a.id, b.id));
45859
45862
  return {
45860
45863
  schema: ATLAS_SCHEMA,
45861
45864
  product: opts.product || null,
@@ -45888,7 +45891,7 @@ function searchAtlas(atlas, query, opts = {}) {
45888
45891
  };
45889
45892
  let hits = atlas.nodes.filter((n) => `${n.id} ${n.title || ""} ${n.description || ""}`.toLowerCase().includes(q2));
45890
45893
  if (opts.type) hits = hits.filter((n) => n.type === opts.type);
45891
- hits.sort((a, b) => score(a) - score(b) || a.type.localeCompare(b.type) || a.id.localeCompare(b.id));
45894
+ hits.sort((a, b) => score(a) - score(b) || byText(a.type, b.type) || byText(a.id, b.id));
45892
45895
  return hits.slice(0, opts.limit || 25);
45893
45896
  }
45894
45897
 
@@ -45951,7 +45954,7 @@ function buildMissionIndex(files, opts = {}) {
45951
45954
  reviewed: ast.approval?.reviewed === true
45952
45955
  };
45953
45956
  }).filter((m) => m.mission);
45954
- missions.sort((a, b) => a.mission.localeCompare(b.mission));
45957
+ missions.sort((a, b) => byText(a.mission, b.mission));
45955
45958
  const byArea = {};
45956
45959
  for (const m of missions) {
45957
45960
  const a = m.area || "uncategorized";
@@ -46259,7 +46262,7 @@ function buildFocusGraph(atlas, { seeds = [], depth = 2, scope = null } = {}) {
46259
46262
  }
46260
46263
  frontier = next;
46261
46264
  }
46262
- const focusNodes = [...included.values()].map(({ node: node2, reason, depth: dd }) => ({ id: node2.id, type: node2.type, title: node2.title || node2.id, focusReason: reason, depth: dd, confidence: node2.confidence || null, provenance: node2.provenance || null })).sort((a, b) => a.depth - b.depth || a.id.localeCompare(b.id));
46265
+ const focusNodes = [...included.values()].map(({ node: node2, reason, depth: dd }) => ({ id: node2.id, type: node2.type, title: node2.title || node2.id, focusReason: reason, depth: dd, confidence: node2.confidence || null, provenance: node2.provenance || null })).sort((a, b) => a.depth - b.depth || byText(a.id, b.id));
46263
46266
  const idSet = new Set(focusNodes.map((n) => n.id));
46264
46267
  const focusRels = rels2.filter((r) => idSet.has(r.from) && idSet.has(r.to));
46265
46268
  const byReason = {};
@@ -47217,7 +47220,7 @@ function assemblePassport({ parts, change = null, runs = [], purpose = null, ext
47217
47220
  notRead.push({ part: p.name, file: u.file, line: u.line, what: owner ? `${owner.label}: ${u.why}` : u.why });
47218
47221
  }
47219
47222
  }
47220
- const order = (a, b) => `${a.part}/${a.file}`.localeCompare(`${b.part}/${b.file}`) || (a.lines?.[0] ?? a.line ?? 0) - (b.lines?.[0] ?? b.line ?? 0);
47223
+ const order = (a, b) => byText(`${a.part}/${a.file}`, `${b.part}/${b.file}`) || (a.lines?.[0] ?? a.line ?? 0) - (b.lines?.[0] ?? b.line ?? 0);
47221
47224
  behavior.sort(order);
47222
47225
  effects.sort(order);
47223
47226
  notRead.sort(order);