mirror of
https://github.com/morluto/rea
synced 2026-10-26 14:25:49 -04:00
refactor: use canonical implementations and types directly
Remove forwarding wrappers and shadow aliases, migrate callers and verification scripts to their owners, and share one exhaustive semantic resource-bound projection.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { compareUnicodeCodePoints } from "../unicodeCodePointOrder.js";
|
||||
import type { Evidence } from "../evidence.js";
|
||||
import {
|
||||
type ApplicationEdge,
|
||||
@@ -38,7 +38,7 @@ export const buildJavaScriptNativeHandoffs = (
|
||||
providers: uniqueProviders(linked),
|
||||
evidence_ids: linked
|
||||
.map(({ evidence_id: id }) => id)
|
||||
.sort(compareCodePoints),
|
||||
.sort(compareUnicodeCodePoints),
|
||||
recommended_tools: [
|
||||
"open_binary" as const,
|
||||
"binary_overview" as const,
|
||||
@@ -50,7 +50,7 @@ export const buildJavaScriptNativeHandoffs = (
|
||||
];
|
||||
})
|
||||
.sort((left, right) =>
|
||||
compareCodePoints(left.native_node_id, right.native_node_id),
|
||||
compareUnicodeCodePoints(left.native_node_id, right.native_node_id),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -95,7 +95,9 @@ const nativeExportNodes = (
|
||||
return [...new Set(ids)]
|
||||
.map((id) => nodeById.get(id))
|
||||
.filter((node): node is ApplicationNode => node?.kind === "native-export")
|
||||
.sort((left, right) => compareCodePoints(left.node_id, right.node_id));
|
||||
.sort((left, right) =>
|
||||
compareUnicodeCodePoints(left.node_id, right.node_id),
|
||||
);
|
||||
};
|
||||
|
||||
const requestedExports = (nodes: readonly ApplicationNode[]): string[] => {
|
||||
@@ -106,7 +108,7 @@ const requestedExports = (nodes: readonly ApplicationNode[]): string[] => {
|
||||
...stringArray(observation.properties.members),
|
||||
]),
|
||||
);
|
||||
return [...new Set(values)].sort(compareCodePoints);
|
||||
return [...new Set(values)].sort(compareUnicodeCodePoints);
|
||||
};
|
||||
|
||||
const stringArray = (value: unknown): string[] =>
|
||||
@@ -125,7 +127,7 @@ const uniqueProviders = (
|
||||
]),
|
||||
).values(),
|
||||
].sort((left, right) =>
|
||||
compareCodePoints(
|
||||
compareUnicodeCodePoints(
|
||||
`${left.id}\0${left.name}\0${left.version ?? ""}`,
|
||||
`${right.id}\0${right.name}\0${right.version ?? ""}`,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user