parse-tmx 2.28.0 → 2.29.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 (3) hide show
  1. package/README.md +11 -0
  2. package/dist/index.js +26 -34
  3. package/package.json +8 -9
package/README.md CHANGED
@@ -111,6 +111,17 @@ const loadMap = async () => {
111
111
  }
112
112
  ```
113
113
 
114
+ ### Commands
115
+
116
+ Run from `packages/parse-tmx/`:
117
+
118
+ ```bash
119
+ pnpm build # compile to dist/
120
+ pnpm test # vitest watch mode (coverage is run from the repo root)
121
+ pnpm lint:fix # auto-fix lint
122
+ pnpm typecheck # type check
123
+ ```
124
+
114
125
  ## <a name="license">⚖️ License</a>
115
126
 
116
127
  This project is licensed under the [Apache-2.0 license](https://github.com/Esposter/Esposter/blob/main/LICENSE).
package/dist/index.js CHANGED
@@ -7,7 +7,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
8
  var __getProtoOf = Object.getPrototypeOf;
9
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
10
+ var __esmMin = (fn, res, err) => () => {
11
+ if (err) throw err[0];
12
+ try {
13
+ return fn && (res = fn(fn = 0)), res;
14
+ } catch (e) {
15
+ throw err = [e], e;
16
+ }
17
+ };
11
18
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
12
19
  var __exportAll = (all, no_symbols) => {
13
20
  let target = {};
@@ -1611,7 +1618,7 @@ var require_sniff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1611
1618
  for (let i = 0; i < resourceHeader.length; i++) if (isBinaryDataByte(resourceHeader[i])) return "application/octet-stream";
1612
1619
  return "text/plain";
1613
1620
  }
1614
- const apacheBugValues = new Set([
1621
+ const apacheBugValues = /* @__PURE__ */ new Set([
1615
1622
  "text/plain",
1616
1623
  "text/plain; charset=ISO-8859-1",
1617
1624
  "text/plain; charset=iso-8859-1",
@@ -2257,7 +2264,9 @@ var init_latin1 = __esmMin((() => {
2257
2264
  function assertEmptyRest(rest) {
2258
2265
  if (Object.keys(rest).length > 0) throw new TypeError("Unexpected extra options");
2259
2266
  }
2260
- var init_assert = __esmMin((() => {}));
2267
+ var init_assert = __esmMin((() => {
2268
+ Object.getPrototypeOf(Uint8Array);
2269
+ }));
2261
2270
  //#endregion
2262
2271
  //#region ../../node_modules/.pnpm/@exodus+bytes@1.15.1_@noble+hashes@2.2.0/node_modules/@exodus/bytes/fallback/base64.js
2263
2272
  var base64_exports = /* @__PURE__ */ __exportAll({
@@ -2278,7 +2287,7 @@ function toBase64$1(arr, isURL, padding) {
2278
2287
  if (!helpers.pairs) {
2279
2288
  helpers.pairs = [];
2280
2289
  if (nativeDecoder) {
2281
- helpers.codepairs = new Uint16Array(4096);
2290
+ helpers.codepairs = /* @__PURE__ */ new Uint16Array(4096);
2282
2291
  const u16 = helpers.codepairs;
2283
2292
  const u8 = new Uint8Array(u16.buffer, u16.byteOffset, u16.byteLength);
2284
2293
  for (let i = 0; i < 64; i++) {
@@ -24096,7 +24105,7 @@ function deLoose(str, loose, res) {
24096
24105
  }
24097
24106
  function encode$2(str, loose = false) {
24098
24107
  if (typeof str !== "string") throw new TypeError(E_STRING);
24099
- if (str.length === 0) return new Uint8Array();
24108
+ if (str.length === 0) return /* @__PURE__ */ new Uint8Array();
24100
24109
  return deLoose(str, loose, nativeEncoder.encode(str));
24101
24110
  }
24102
24111
  function decode$1(arr, loose = false) {
@@ -25571,15 +25580,6 @@ var init_single_byte = __esmMin((() => {
25571
25580
  init_latin1();
25572
25581
  init_single_byte$1();
25573
25582
  ({TextDecoder: TextDecoder$2, btoa} = globalThis);
25574
- new Set([
25575
- "iso-8859-1",
25576
- "iso-8859-9",
25577
- "iso-8859-11",
25578
- "iso-8859-6",
25579
- "iso-8859-8",
25580
- "iso-8859-8-i",
25581
- "iso-8859-16"
25582
- ]);
25583
25583
  NON_LATIN = /[^\x00-\xFF]/;
25584
25584
  useLatin1btoa = Uint8Array.fromBase64 && btoa;
25585
25585
  }));
@@ -25776,7 +25776,7 @@ var init_encoding$1 = __esmMin((() => {
25776
25776
  init_encoding_util();
25777
25777
  E_ENCODING = "Unknown encoding";
25778
25778
  E_MULTI = "import '@exodus/bytes/encoding.js' for legacy multi-byte encodings support";
25779
- multibyteSet = new Set([
25779
+ multibyteSet = /* @__PURE__ */ new Set([
25780
25780
  "big5",
25781
25781
  "euc-kr",
25782
25782
  "euc-jp",
@@ -25785,14 +25785,6 @@ var init_encoding$1 = __esmMin((() => {
25785
25785
  "gbk",
25786
25786
  "gb18030"
25787
25787
  ]);
25788
- new Set([
25789
- "utf",
25790
- "iso",
25791
- "koi",
25792
- "euc",
25793
- "ibm",
25794
- "gbk"
25795
- ]);
25796
25788
  isMultibyte = (enc) => multibyteSet.has(enc);
25797
25789
  }));
25798
25790
  var init_encoding = __esmMin((() => {
@@ -60197,7 +60189,7 @@ var require_percent_encoding = /* @__PURE__ */ __commonJSMin(((exports, module)
60197
60189
  function isC0ControlPercentEncode(c) {
60198
60190
  return c <= 31 || c > 126;
60199
60191
  }
60200
- const extraFragmentPercentEncodeSet = new Set([
60192
+ const extraFragmentPercentEncodeSet = /* @__PURE__ */ new Set([
60201
60193
  p(" "),
60202
60194
  p("\""),
60203
60195
  p("<"),
@@ -60207,7 +60199,7 @@ var require_percent_encoding = /* @__PURE__ */ __commonJSMin(((exports, module)
60207
60199
  function isFragmentPercentEncode(c) {
60208
60200
  return isC0ControlPercentEncode(c) || extraFragmentPercentEncodeSet.has(c);
60209
60201
  }
60210
- const extraQueryPercentEncodeSet = new Set([
60202
+ const extraQueryPercentEncodeSet = /* @__PURE__ */ new Set([
60211
60203
  p(" "),
60212
60204
  p("\""),
60213
60205
  p("#"),
@@ -60218,12 +60210,12 @@ var require_percent_encoding = /* @__PURE__ */ __commonJSMin(((exports, module)
60218
60210
  function isQueryPercentEncode(c) {
60219
60211
  return isC0ControlPercentEncode(c) || extraQueryPercentEncodeSet.has(c);
60220
60212
  }
60221
- const extraSpecialQueryPercentEncodeSet = new Set([...extraQueryPercentEncodeSet, p("'")]);
60213
+ const extraSpecialQueryPercentEncodeSet = /* @__PURE__ */ new Set([...extraQueryPercentEncodeSet, p("'")]);
60222
60214
  const extraSpecialQueryPercentEncodeChars = String.fromCodePoint(...[...extraSpecialQueryPercentEncodeSet].sort());
60223
60215
  function isSpecialQueryPercentEncode(c) {
60224
60216
  return isC0ControlPercentEncode(c) || extraSpecialQueryPercentEncodeSet.has(c);
60225
60217
  }
60226
- const extraPathPercentEncodeSet = new Set([
60218
+ const extraPathPercentEncodeSet = /* @__PURE__ */ new Set([
60227
60219
  p("?"),
60228
60220
  p("`"),
60229
60221
  p("{"),
@@ -60233,7 +60225,7 @@ var require_percent_encoding = /* @__PURE__ */ __commonJSMin(((exports, module)
60233
60225
  function isPathPercentEncode(c) {
60234
60226
  return isQueryPercentEncode(c) || extraPathPercentEncodeSet.has(c);
60235
60227
  }
60236
- const extraUserinfoPercentEncodeSet = new Set([
60228
+ const extraUserinfoPercentEncodeSet = /* @__PURE__ */ new Set([
60237
60229
  p("/"),
60238
60230
  p(":"),
60239
60231
  p(";"),
@@ -60247,7 +60239,7 @@ var require_percent_encoding = /* @__PURE__ */ __commonJSMin(((exports, module)
60247
60239
  function isUserinfoPercentEncode(c) {
60248
60240
  return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);
60249
60241
  }
60250
- const extraComponentPercentEncodeSet = new Set([
60242
+ const extraComponentPercentEncodeSet = /* @__PURE__ */ new Set([
60251
60243
  p("$"),
60252
60244
  p("%"),
60253
60245
  p("&"),
@@ -60257,7 +60249,7 @@ var require_percent_encoding = /* @__PURE__ */ __commonJSMin(((exports, module)
60257
60249
  function isComponentPercentEncode(c) {
60258
60250
  return isUserinfoPercentEncode(c) || extraComponentPercentEncodeSet.has(c);
60259
60251
  }
60260
- const extraURLEncodedPercentEncodeSet = new Set([
60252
+ const extraURLEncodedPercentEncodeSet = /* @__PURE__ */ new Set([
60261
60253
  p("!"),
60262
60254
  p("'"),
60263
60255
  p("("),
@@ -60881,7 +60873,7 @@ var require_url_state_machine = /* @__PURE__ */ __commonJSMin(((exports, module)
60881
60873
  }
60882
60874
  return true;
60883
60875
  };
60884
- const fileOtherwiseCodePoints = new Set([
60876
+ const fileOtherwiseCodePoints = /* @__PURE__ */ new Set([
60885
60877
  p("/"),
60886
60878
  p("\\"),
60887
60879
  p("?"),
@@ -61142,7 +61134,7 @@ var require_urlencoded = /* @__PURE__ */ __commonJSMin(((exports, module) => {
61142
61134
  value = bytes.slice(indexOfEqual + 1);
61143
61135
  } else {
61144
61136
  name = bytes;
61145
- value = new Uint8Array(0);
61137
+ value = /* @__PURE__ */ new Uint8Array(0);
61146
61138
  }
61147
61139
  name = replaceByteInByteSequence(name, 43, 32);
61148
61140
  value = replaceByteInByteSequence(value, 43, 32);
@@ -61374,7 +61366,7 @@ var require_URLSearchParams = /* @__PURE__ */ __commonJSMin(((exports) => {
61374
61366
  if (Impl.init) Impl.init(wrapper[implSymbol]);
61375
61367
  return wrapper[implSymbol];
61376
61368
  };
61377
- const exposed = new Set(["Window", "Worker"]);
61369
+ const exposed = /* @__PURE__ */ new Set(["Window", "Worker"]);
61378
61370
  exports.install = (globalObject, globalNames) => {
61379
61371
  if (!globalNames.some((globalName) => exposed.has(globalName))) return;
61380
61372
  const ctorRegistry = utils.initCtorRegistry(globalObject);
@@ -61868,7 +61860,7 @@ var require_URL = /* @__PURE__ */ __commonJSMin(((exports) => {
61868
61860
  if (Impl.init) Impl.init(wrapper[implSymbol]);
61869
61861
  return wrapper[implSymbol];
61870
61862
  };
61871
- const exposed = new Set(["Window", "Worker"]);
61863
+ const exposed = /* @__PURE__ */ new Set(["Window", "Worker"]);
61872
61864
  exports.install = (globalObject, globalNames) => {
61873
61865
  if (!globalNames.some((globalName) => exposed.has(globalName))) return;
61874
61866
  const ctorRegistry = utils.initCtorRegistry(globalObject);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse-tmx",
3
- "version": "2.28.0",
3
+ "version": "2.29.0",
4
4
  "description": "A parser for tmx.",
5
5
  "keywords": [
6
6
  "parser",
@@ -27,7 +27,6 @@
27
27
  },
28
28
  "scripts": {
29
29
  "build": "pnpm export:gen && rolldown --config rolldown.config.ts",
30
- "coverage": "vitest run --coverage",
31
30
  "export:gen": "ctix build --config ../configuration/.ctirc-ts",
32
31
  "format": "oxfmt",
33
32
  "format:check": "oxfmt --check",
@@ -37,20 +36,20 @@
37
36
  "typecheck": "tsgo"
38
37
  },
39
38
  "dependencies": {
40
- "@esposter/shared": "2.28.0",
41
- "@esposter/xml2js": "2.28.0",
39
+ "@esposter/shared": "2.29.0",
40
+ "@esposter/xml2js": "2.29.0",
42
41
  "data-urls": "^7.0.0",
43
42
  "dayjs": "^1.11.21"
44
43
  },
45
44
  "devDependencies": {
46
- "@esposter/configuration": "2.28.0",
45
+ "@esposter/configuration": "2.29.0",
47
46
  "@types/data-urls": "^3.0.5",
48
47
  "@types/xml2js": "^0.4.14",
49
- "@vitest/coverage-v8": "^4.1.8",
48
+ "@vitest/coverage-v8": "^4.1.9",
50
49
  "ctix": "^2.8.1",
51
- "rolldown": "^1.1.1",
50
+ "rolldown": "^1.1.2",
52
51
  "type-fest": "^5.7.0",
53
- "vitest": "^4.1.8"
52
+ "vitest": "^4.1.9"
54
53
  },
55
- "gitHead": "c633ee2d9e27aa520d3487a179982249463032a0"
54
+ "gitHead": "0166c5a9bea8b089ce37499f66b8d8095f4b4b23"
56
55
  }