@menapo/vi18n 0.1.1 → 0.2.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/README.md +19 -0
- package/dist/{apply-Bre-lY9J.js → apply-Bg-3rB2m.js} +69 -89
- package/dist/{captured-Bj8bO6vd.js → captured-DfLk50Ji.js} +196 -217
- package/dist/{check-BIKEuu6B.js → check-CunekuYs.js} +76 -85
- package/dist/cli.js +2 -3
- package/dist/{collect-Cx4_SKOe.js → collect-CYATDjdo.js} +1 -2
- package/dist/collisions-CDSdtLQm.js +215 -0
- package/dist/{compile-Cc97JaW2.js → compile-DqkofbiO.js} +376 -331
- package/dist/compile-hva0qjhZ.js +240 -0
- package/dist/concurrency-BCY_4zcr.js +1 -0
- package/dist/concurrency-Dy2ny50V.js +107 -0
- package/dist/config.d.ts +1 -5
- package/dist/config.js +4 -5
- package/dist/{types-D3QGM8XO.js → diagnostics-LgIWyeSp.js} +28 -27
- package/dist/{dir-zw6bGMKQ.js → dir-TGLYuOZb.js} +34 -37
- package/dist/{duplicates-yuRljQ6h.js → duplicates-8cudcHNj.js} +10 -27
- package/dist/engine-ecRD8-IE.js +556 -0
- package/dist/engine.d.ts +1 -5
- package/dist/engine.js +297 -168
- package/dist/exchange-DjwlrTQ9.js +41 -0
- package/dist/{exclude-Du-Zd_qI.js → exclude-BFETmvde.js} +2 -3
- package/dist/{export-C9Sy6UWv.js → export-D2tsqWIr.js} +17 -38
- package/dist/{extract-C3S8btx0.js → extract-BxYchVmY.js} +114 -82
- package/dist/{formats-9unqj_fZ.js → formats-BaryZ2N7.js} +352 -276
- package/dist/fs-ezCMZeDV.js +52 -0
- package/dist/i18next-COO6o0tX.js +1907 -0
- package/dist/i18next-Dr7DCQlQ.js +1 -0
- package/dist/{import-nANvQutw.js → import-vSC29Cn4.js} +81 -75
- package/dist/index.d.ts +1 -13
- package/dist/index.js +14 -16
- package/dist/{init-C2ScuW6a.js → init-Cc7A-8VX.js} +466 -501
- package/dist/{library-D5CWvTQs.js → library-tp_xqzSY.js} +975 -451
- package/dist/lingui-BnnlqGXT.js +902 -0
- package/dist/lint.d.ts +0 -4
- package/dist/lint.js +70 -82
- package/dist/{load-gW-oJt1Q.js → load-BSIeGJ5v.js} +275 -148
- package/dist/{load-CQRz4PpM.js → load-SSrAeJVB.js} +1214 -1116
- package/dist/{locales-DX4MOBFE.js → locales-D0U-yVRm.js} +271 -237
- package/dist/{lsp-RMMMc88P.js → lsp-DvC11pBZ.js} +4 -5
- package/dist/{match-BGr8EXB3.js → match-BLDcj610.js} +11 -4
- package/dist/{mcp-CHVwBoRP.js → mcp-D2zzOTBy.js} +4 -5
- package/dist/{merge-driver-BTX87aVm.js → merge-driver-BLI8OtAc.js} +138 -122
- package/dist/migrate-1r43OBfe.js +1 -0
- package/dist/migrate-ChDGhlC-.js +2169 -0
- package/dist/{openai-CTaMDcl-.js → openai-CLn4puY8.js} +128 -87
- package/dist/{output-DWE3SIUA.js → output-D5tAt8q4.js} +15 -9
- package/dist/parse.d.ts +1 -3
- package/dist/parse.js +7 -8
- package/dist/{pipeline-C9Dbotkh.js → pipeline-BJSkkRYC.js} +387 -359
- package/dist/{pipeline-DbX6rlo5.js → pipeline-BeCc441z.js} +1 -1
- package/dist/project-B5KIO0q-.js +544 -0
- package/dist/{pseudo-DRv30iN5.js → pseudo-B2DUpoLu.js} +126 -3
- package/dist/{raw-C4Y6vyGY.js → raw-YsYZMS9n.js} +52 -29
- package/dist/react-intl-C8JehBBL.js +634 -0
- package/dist/rename-ZVGq9ZG1.js +577 -0
- package/dist/repeated-uuI1tUGg.js +85 -0
- package/dist/restore-xlBIrtRt.js +199 -0
- package/dist/rewrite-BwzXoBiA.js +415 -0
- package/dist/{rich-DCUKl5HM.js → rich-ApY1Dm4S.js} +35 -28
- package/dist/rolldown-runtime-C1I3wEg2.js +43 -0
- package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
- package/dist/run-CQ9pDLSa.js +674 -0
- package/dist/scan-worker.d.ts +2 -4
- package/dist/scan-worker.js +1 -1
- package/dist/{scoped-BMYpSthj.js → scoped-h3KE8XWW.js} +3 -4
- package/dist/{server-Da1Ot9IN.js → server-Br8tAuG2.js} +312 -386
- package/dist/{server-deBOq2vq.js → server-DJRpUQVZ.js} +1059 -333
- package/dist/server.d.ts +1 -17
- package/dist/server.js +419 -379
- package/dist/{sitemap-DJXzKoza.js → sitemap-CSAkm6oi.js} +21 -33
- package/dist/{sources-D19czDSA.js → sources-DNVbYsgs.js} +713 -373
- package/dist/{status-zr4jY59Y.js → status-q6M3rBrh.js} +30 -30
- package/dist/{stdio-FPOKQAgu.js → stdio-D9kTzyqB.js} +2 -4
- package/dist/{stdio-CVaJfxA7.js → stdio-FWIVU3P4.js} +1 -2
- package/dist/sync-BNIAwMhR.js +1352 -0
- package/dist/{t-DC-c9zE5.js → t-gvEXx25s.js} +76 -53
- package/dist/test.d.ts +5 -16
- package/dist/test.js +126 -56
- package/dist/translate-BP4iVhOR.js +336 -0
- package/dist/{ts-BaU5yOf0.js → ts-BX6kwig5.js} +25 -14
- package/dist/{types-DtvQ7UdD.js → types-3kwyaCAm.js} +1 -2
- package/dist/{types-DsdWBG0b.d.ts → types-B4wNX6PA.d.ts} +6 -8
- package/dist/{types-CgUCkFU1.d.ts → types-_4UdFhR9.d.ts} +24 -21
- package/dist/types-xR2exI3L.js +42 -0
- package/dist/{units-CQ5Q99RC.js → units-DPPfCN7j.js} +7 -16
- package/dist/{url-CRfCOhUI.js → url-Bpc6wLea.js} +24 -11
- package/dist/{url-CsBkRaJy.js → url-D2_VlEeH.js} +25 -12
- package/dist/{validate-BxpupdAf.js → validate-CgzaDdOY.js} +690 -377
- package/dist/{validate-D6DJepZv.js → validate-PGgMsasz.js} +3 -5
- package/dist/{version-Byqi2guX.js → version-DC-J5WvV.js} +3 -5
- package/dist/{vite-scan-CT_vsp4g.js → vite-scan-kM8Ta3rO.js} +87 -92
- package/dist/vite.d.ts +2 -6
- package/dist/vite.js +6500 -6032
- package/dist/vue-i18n-_uIXlFVh.js +806 -0
- package/dist/{which-BOemZ5Q8.js → which-DFWk_KwN.js} +44 -37
- package/dist/{worker-84U6uYB3.js → worker-zlhNj4y3.js} +454 -608
- package/package.json +5 -5
- package/dist/check-HsmmpJZg.js +0 -1
- package/dist/codec-DuvU2VQy.js +0 -207
- package/dist/collisions-CfpZU8e4.js +0 -217
- package/dist/compile-BaDh0cHG.js +0 -245
- package/dist/concurrency-C9UUWuDC.js +0 -96
- package/dist/concurrency-DONL7t4V.js +0 -1
- package/dist/engine-C2ENBRJe.js +0 -531
- package/dist/i18next-9HAoxwUI.js +0 -1
- package/dist/i18next-BEJgv_S8.js +0 -1596
- package/dist/lingui-zUiCl9Um.js +0 -833
- package/dist/messages-BfjIExyB.js +0 -166
- package/dist/migrate-IpLDMXmq.js +0 -1484
- package/dist/migrate-rCQuOGsf.js +0 -1
- package/dist/project-Bw9UPIdx.js +0 -1046
- package/dist/project-C4GpaN-n.js +0 -381
- package/dist/react-intl-BP0u-D5m.js +0 -519
- package/dist/restore-CiYv-jxS.js +0 -175
- package/dist/rewrite-EsIw_lsq.js +0 -803
- package/dist/run-BEcnBbu-.js +0 -694
- package/dist/runtime-DTMmliT1.js +0 -64
- package/dist/sync-B9V2KFwb.js +0 -658
- package/dist/translate-CQnJfLjO.js +0 -299
- package/dist/types-wSh9fCBY.js +0 -11
- package/dist/vue-i18n-g0iGy6CZ.js +0 -651
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/oxc-parser@0.156.0/node_modules/oxc-parser/src-js/generated/constants.js
|
|
2
2
|
/**
|
|
3
3
|
* Total size of the allocator block (including metadata and allocator `ChunkFooter`).
|
|
4
4
|
*/
|
|
@@ -13,8 +13,7 @@ const BUFFER_SIZE = 2147483576;
|
|
|
13
13
|
* (`BUFFER_SIZE` minus `RawTransferMetadata`).
|
|
14
14
|
*/
|
|
15
15
|
const ACTIVE_SIZE = 2147483560;
|
|
16
|
-
|
|
17
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.154.0/node_modules/oxc-parser/src-js/generated/deserialize/js.js
|
|
16
|
+
// ../../node_modules/.pnpm/oxc-parser@0.156.0/node_modules/oxc-parser/src-js/generated/deserialize/js.js
|
|
18
17
|
let uint8;
|
|
19
18
|
let int32;
|
|
20
19
|
let float64;
|
|
@@ -331,11 +330,10 @@ function deserializeTaggedTemplateExpression(pos) {
|
|
|
331
330
|
return node;
|
|
332
331
|
}
|
|
333
332
|
function deserializeTemplateElement(pos) {
|
|
334
|
-
let tail = deserializeBool(pos + 12), start = deserializeI32(pos), end = deserializeI32(pos + 4)
|
|
335
|
-
value.cooked !== null && deserializeBool(pos + 13) && (value.cooked = value.cooked.replace(/\uFFFD(.{4})/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))));
|
|
333
|
+
let tail = deserializeBool(pos + 12), start = deserializeI32(pos), end = deserializeI32(pos + 4);
|
|
336
334
|
return {
|
|
337
335
|
type: "TemplateElement",
|
|
338
|
-
value,
|
|
336
|
+
value: deserializeTemplateElementValue(pos + 16),
|
|
339
337
|
tail,
|
|
340
338
|
start,
|
|
341
339
|
end
|
|
@@ -344,7 +342,7 @@ function deserializeTemplateElement(pos) {
|
|
|
344
342
|
function deserializeTemplateElementValue(pos) {
|
|
345
343
|
return {
|
|
346
344
|
raw: deserializeStr(pos),
|
|
347
|
-
cooked:
|
|
345
|
+
cooked: deserializeOptionJSStr(pos + 16)
|
|
348
346
|
};
|
|
349
347
|
}
|
|
350
348
|
function deserializeComputedMemberExpression(pos) {
|
|
@@ -1846,16 +1844,14 @@ function deserializeNumericLiteral(pos) {
|
|
|
1846
1844
|
};
|
|
1847
1845
|
}
|
|
1848
1846
|
function deserializeStringLiteral(pos) {
|
|
1849
|
-
let start = deserializeI32(pos), end = deserializeI32(pos + 4)
|
|
1847
|
+
let start = deserializeI32(pos), end = deserializeI32(pos + 4);
|
|
1848
|
+
return {
|
|
1850
1849
|
type: "Literal",
|
|
1851
|
-
value:
|
|
1850
|
+
value: deserializeJSStr(pos + 16),
|
|
1852
1851
|
raw: int32[(pos >> 2) + 8] === 0 && int32[(pos >> 2) + 9] === 0 ? null : sourceText.slice(start, end),
|
|
1853
1852
|
start,
|
|
1854
1853
|
end
|
|
1855
|
-
}
|
|
1856
|
-
deserializeBool(pos + 12) && (value = value.replace(/\uFFFD(.{4})/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))));
|
|
1857
|
-
node.value = value;
|
|
1858
|
-
return node;
|
|
1854
|
+
};
|
|
1859
1855
|
}
|
|
1860
1856
|
function deserializeBigIntLiteral(pos) {
|
|
1861
1857
|
let start = deserializeI32(pos), end = deserializeI32(pos + 4), bigint = deserializeStr(pos + 16);
|
|
@@ -3827,8 +3823,20 @@ function deserializeBoxTSTypeParameterInstantiation(pos) {
|
|
|
3827
3823
|
function deserializeOptionBoxTSTypeParameterInstantiation(pos) {
|
|
3828
3824
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxTSTypeParameterInstantiation(pos);
|
|
3829
3825
|
}
|
|
3830
|
-
function
|
|
3831
|
-
|
|
3826
|
+
function deserializeJSStr(pos) {
|
|
3827
|
+
if (uint8[pos + 12] === 0) return deserializeStr(pos);
|
|
3828
|
+
let buffer = uint8, pos32 = pos >> 2, len = int32[pos32 + 2];
|
|
3829
|
+
pos = int32[pos32];
|
|
3830
|
+
let end = pos + len, out = "";
|
|
3831
|
+
for (; pos < end;) {
|
|
3832
|
+
let first = buffer[pos++], codePoint;
|
|
3833
|
+
codePoint = first < 128 ? first : first < 224 ? (first & 31) << 6 | buffer[pos++] & 63 : first < 240 ? (first & 15) << 12 | (buffer[pos++] & 63) << 6 | buffer[pos++] & 63 : (first & 7) << 18 | (buffer[pos++] & 63) << 12 | (buffer[pos++] & 63) << 6 | buffer[pos++] & 63;
|
|
3834
|
+
out += String.fromCodePoint(codePoint);
|
|
3835
|
+
}
|
|
3836
|
+
return out;
|
|
3837
|
+
}
|
|
3838
|
+
function deserializeOptionJSStr(pos) {
|
|
3839
|
+
return uint8[pos + 12] === 2 ? null : deserializeJSStr(pos);
|
|
3832
3840
|
}
|
|
3833
3841
|
function deserializeBoxComputedMemberExpression(pos) {
|
|
3834
3842
|
return deserializeComputedMemberExpression(int32[pos >> 2]);
|
|
@@ -4221,6 +4229,9 @@ function deserializeOptionModuleExportName(pos) {
|
|
|
4221
4229
|
function deserializeF64(pos) {
|
|
4222
4230
|
return float64[pos >> 3];
|
|
4223
4231
|
}
|
|
4232
|
+
function deserializeOptionStr(pos) {
|
|
4233
|
+
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeStr(pos);
|
|
4234
|
+
}
|
|
4224
4235
|
function deserializeU8(pos) {
|
|
4225
4236
|
return uint8[pos];
|
|
4226
4237
|
}
|
|
@@ -4591,8 +4602,7 @@ function deserializeVecExportEntry(pos) {
|
|
|
4591
4602
|
}
|
|
4592
4603
|
return arr;
|
|
4593
4604
|
}
|
|
4594
|
-
|
|
4595
|
-
//#region src/core/extract/raw.ts
|
|
4605
|
+
// src/core/extract/raw.ts
|
|
4596
4606
|
/**
|
|
4597
4607
|
* Raw-transfer parsing (PLAN §9, spike S7, §6 D104): the Oxc binding Vite
|
|
4598
4608
|
* ships writes the AST into a shared buffer (`parseRawSync`) and a generated
|
|
@@ -4609,21 +4619,31 @@ function deserializeVecExportEntry(pos) {
|
|
|
4609
4619
|
* the TypeScript one loads apart, on the first TypeScript parse.
|
|
4610
4620
|
*/
|
|
4611
4621
|
/**
|
|
4612
|
-
* Oxc versions whose raw AST layout the bundled deserializer (0.
|
|
4613
|
-
* reads: 0.
|
|
4614
|
-
*
|
|
4615
|
-
*
|
|
4616
|
-
*
|
|
4622
|
+
* Oxc versions whose raw AST layout the bundled deserializer (0.156.0)
|
|
4623
|
+
* reads: 0.155.0 to 0.157.0, whose generated deserializers share it. Since
|
|
4624
|
+
* 0.155.0 a string literal's value and a template's cooked text carry their
|
|
4625
|
+
* own flag byte (offset 12, `2` for no cooked text), so 0.154.0's buffer
|
|
4626
|
+
* reads wrong. 0.157.0 is here because Vite+ 1.5 pins its types but builds
|
|
4627
|
+
* its binding from 0.156.0; a binding that is 0.157.0 itself leaves a
|
|
4628
|
+
* TypeScript `Program.start` at 0, which the canary below rejects. A Vite on
|
|
4629
|
+
* any other Oxc parses with `parseSync` until this list (and the
|
|
4630
|
+
* devDependency) moves with it.
|
|
4617
4631
|
*/
|
|
4618
|
-
const LAYOUT_VERSIONS = /* @__PURE__ */ new Set([
|
|
4632
|
+
const LAYOUT_VERSIONS = /* @__PURE__ */ new Set([
|
|
4633
|
+
"0.155.0",
|
|
4634
|
+
"0.156.0",
|
|
4635
|
+
"0.157.0"
|
|
4636
|
+
]);
|
|
4619
4637
|
/**
|
|
4620
4638
|
* Sources that touch what differs between ESTree paths most easily: JSX,
|
|
4621
4639
|
* TypeScript, non-ASCII text (byte vs UTF-16 offsets), regular expressions,
|
|
4622
|
-
* bigints, templates, a hashbang and
|
|
4640
|
+
* bigints, templates (one without cooked text), a hashbang, comments, and a
|
|
4641
|
+
* TypeScript program that starts after a comment (its `start` is the first
|
|
4642
|
+
* statement's up to Oxc 0.156.0, 0 from 0.157.0).
|
|
4623
4643
|
*/
|
|
4624
4644
|
const CANARIES = {
|
|
4625
|
-
js: ["#!/usr/bin/env node\n/* ä */ import { t } from \"@menapo/vi18n\";\nexport const A = () => <p title={t(`Grüße ${n} 🎉`)}>{t('Hello {name}', { name })}</p>;\nconst r = /ä+(?<x>b)/giu, big = 10n, o = { ...a, [k]: void 0 }; label: for (;;) break label;\n", "jsx"],
|
|
4626
|
-
ts: ["
|
|
4645
|
+
js: ["#!/usr/bin/env node\n/* ä */ import { t } from \"@menapo/vi18n\";\nexport const A = () => <p title={t(`Grüße ${n} 🎉`)}>{t('Hello {name}', { name })}</p>;\nconst r = /ä+(?<x>b)/giu, big = 10n, o = { ...a, [k]: void 0 }; label: for (;;) break label;\nString.raw`\\u`;\n", "jsx"],
|
|
4646
|
+
ts: ["// ö\nenum E { A = 1 }\nexport abstract class C<T extends object = {}> implements I {\n declare x?: T; #p = 1; static { this.y = <const>[1]; }\n constructor(private readonly z: number) { f.call(window); }\n}\nexport function f(this: Window, ...rest: Array<string | undefined>): asserts rest is string[] {\n return (rest as never)!satisfies unknown;\n}\nnamespace N.M { export type T = keyof typeof f }\n", "ts"]
|
|
4627
4647
|
};
|
|
4628
4648
|
/**
|
|
4629
4649
|
* A raw-transfer `parseSync` over `binding`, or null when this platform or
|
|
@@ -4664,7 +4684,7 @@ function createRawParser(binding, parseSync) {
|
|
|
4664
4684
|
errors: data.errors
|
|
4665
4685
|
};
|
|
4666
4686
|
};
|
|
4667
|
-
const ts = () => tsLoad ??= import("./ts-
|
|
4687
|
+
const ts = () => tsLoad ??= import("./ts-BX6kwig5.js").then((mod) => {
|
|
4668
4688
|
const candidate = mod.deserialize;
|
|
4669
4689
|
if (!agrees(CANARIES.ts, (f, c, o) => rawParse(candidate, f, c, o), parseSync)) return false;
|
|
4670
4690
|
deserializeTs = candidate;
|
|
@@ -4701,8 +4721,11 @@ function agrees(canary, parse, parseSync) {
|
|
|
4701
4721
|
}
|
|
4702
4722
|
/** Deep equality as JSON, with the two literal values JSON cannot carry spelled out. */
|
|
4703
4723
|
function sameTree(a, b) {
|
|
4704
|
-
const replacer = (_key, value) =>
|
|
4724
|
+
const replacer = (_key, value) => {
|
|
4725
|
+
if (typeof value === "bigint") return `${value}n`;
|
|
4726
|
+
if (value instanceof RegExp) return `/${value.source}/${value.flags}`;
|
|
4727
|
+
return value;
|
|
4728
|
+
};
|
|
4705
4729
|
return JSON.stringify(a, replacer) === JSON.stringify(b, replacer);
|
|
4706
4730
|
}
|
|
4707
|
-
//#endregion
|
|
4708
4731
|
export { LAYOUT_VERSIONS, createRawParser };
|