Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/re2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@unicode/unicode-15.0.0": "^1.6.17",
"@unicode/unicode-16.0.0": "^1.6.17",
"@unicode/unicode-16.0.0": "^2.0.7",
"unicode-property-value-aliases": "^3.9.0"
}
}
6 changes: 3 additions & 3 deletions packages/re2/scripts/genUnicodeTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import unicode16 from "@unicode/unicode-16.0.0";
// loadCodePoints() below dynamically imports `@unicode/unicode-15.0.0/<prop>/<name>/code-points.js`
// paths, and requires the package to be installed.
import "@unicode/unicode-15.0.0";
import CommonCaseFolding from "@unicode/unicode-16.0.0/Case_Folding/C/code-points.js";
import SimpleCaseFolding from "@unicode/unicode-16.0.0/Case_Folding/S/code-points.js";
import CommonCaseFolding from "@unicode/unicode-16.0.0/Case_Folding/C/code-points.mjs";
import SimpleCaseFolding from "@unicode/unicode-16.0.0/Case_Folding/S/code-points.mjs";
import unicodePropertyValueAliases from "unicode-property-value-aliases";

const MAX_CODE_POINT = 0x10ffff;
Expand Down Expand Up @@ -92,7 +92,7 @@ const reducedOrbit = buildReducedOrbit();
const loadCodePoints = async (pkg, type, name) => {
try {
const { default: codePoints } = await import(
`${pkg}/${type}/${name}/code-points.js`
`${pkg}/${type}/${name}/code-points.${pkg === "@unicode/unicode-16.0.0" ? "mjs" : "js"}`
);
return new Set(codePoints);
} catch (_e) {
Expand Down
2 changes: 1 addition & 1 deletion packages/re2/src/UnicodeConformance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const loadCodePoints = async (
longName: string,
): Promise<number[]> => {
const mod = await import(
`@unicode/unicode-16.0.0/${kind}/${longName}/code-points.js`
`@unicode/unicode-16.0.0/${kind}/${longName}/code-points.mjs`
);
return mod.default as number[];
};
Expand Down
2 changes: 1 addition & 1 deletion packages/re2/src/UnicodeTableContents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const loadCodePoints = async (
): Promise<Set<number> | null> => {
try {
const mod = (await import(
`${pkg}/${property}/${longName}/code-points.js`
`${pkg}/${property}/${longName}/code-points.${pkg === "@unicode/unicode-16.0.0" ? "mjs" : "js"}`
)) as { default: number[] };
return new Set<number>(mod.default);
} catch {
Expand Down
Loading