glotfox 0.1.2 → 0.1.3

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.
@@ -1145,9 +1145,11 @@ function digitRuns(s) {
1145
1145
  }
1146
1146
  var escapeRe = (s) => s.replace(/[.*+?^$()|[\]\\{}]/g, "\\$&");
1147
1147
  var containsTerm = (text, term) => new RegExp(`(?<![\\p{L}\\p{N}])${escapeRe(term)}(?![\\p{L}\\p{N}])`, "iu").test(text);
1148
+ var CATEGORY_ORDER = ["zero", "one", "two", "few", "many", "other"];
1148
1149
  function requiredCategories(locale, type) {
1149
1150
  try {
1150
- return new Intl.PluralRules(locale, { type }).resolvedOptions().pluralCategories;
1151
+ const categories = new Intl.PluralRules(locale, { type }).resolvedOptions().pluralCategories;
1152
+ return CATEGORY_ORDER.filter((c) => categories.includes(c));
1151
1153
  } catch {
1152
1154
  return null;
1153
1155
  }
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  loadConfig,
8
8
  pull,
9
9
  push
10
- } from "./chunk-V7VH3XEQ.js";
10
+ } from "./chunk-KZT2UWY7.js";
11
11
 
12
12
  // src/cli.ts
13
13
  import { parseArgs } from "node:util";
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  pull,
10
10
  push,
11
11
  scanSource
12
- } from "./chunk-V7VH3XEQ.js";
12
+ } from "./chunk-KZT2UWY7.js";
13
13
  export {
14
14
  check,
15
15
  extract,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glotfox",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "GlotFox CLI: extract translation keys from React/Next.js and vanilla JS/TS projects",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@glotfox/shared": "0.0.0",
24
- "@types/node": "^22.10.0",
24
+ "@types/node": "^24.0.0",
25
25
  "esbuild": "^0.25.12",
26
26
  "typescript": "^5.7.0",
27
27
  "vitest": "^3.0.0"