@havelaer/msgs 0.0.14 → 0.0.15

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 (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -32,7 +32,12 @@ function resolveLocale(userLocales, supportedLocales, localeMatcher = "best fit"
32
32
  const base = stripExtensions(raw);
33
33
  const [canonical] = Intl.getCanonicalLocales(base);
34
34
  const chain = fallbackChain(canonical);
35
- for (const candidate of chain) if (runtimeSupported.has(candidate)) return candidate;
35
+ for (const candidate of chain) {
36
+ if (runtimeSupported.has(candidate)) return candidate;
37
+ if (!candidate.includes("-")) {
38
+ for (const supported of runtimeSupported) if (supported.startsWith(`${candidate}-`) || supported === candidate) return supported;
39
+ }
40
+ }
36
41
  }
37
42
  return runtimeSupported.values().next().value;
38
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@havelaer/msgs",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -35,6 +35,7 @@
35
35
  "scripts": {
36
36
  "check": "biome check .",
37
37
  "release": "npm run check && tsc && npm version patch -m 'chore: bump version %s'",
38
+ "postrelease": "git push && git push --tags",
38
39
  "build": "tsdown",
39
40
  "test": "vitest"
40
41
  },