@mailwoman/registry 11.1.0 → 11.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.
Files changed (122) hide show
  1. package/README.md +18 -3
  2. package/data/manifests/artifacts.json +35 -0
  3. package/data/manifests/coverage.json +63 -0
  4. package/data/manifests/sources.lock.json +12 -0
  5. package/data/normalized/language-subtags.json +18518 -0
  6. package/lib/artifacts/bcp47/extlang.fixture.json +260 -0
  7. package/lib/artifacts/bcp47/extlang.ts +32 -0
  8. package/lib/artifacts/bcp47/grandfathered.fixture.json +28 -0
  9. package/lib/artifacts/bcp47/grandfathered.ts +32 -0
  10. package/lib/artifacts/bcp47/language.fixture.json +8278 -0
  11. package/lib/artifacts/bcp47/language.ts +32 -0
  12. package/lib/artifacts/bcp47/redundant.fixture.json +69 -0
  13. package/lib/artifacts/bcp47/redundant.ts +32 -0
  14. package/lib/artifacts/bcp47/region.fixture.json +307 -0
  15. package/lib/artifacts/bcp47/region.ts +32 -0
  16. package/lib/artifacts/bcp47/script.fixture.json +227 -0
  17. package/lib/artifacts/bcp47/script.ts +32 -0
  18. package/lib/artifacts/bcp47/variant.fixture.json +141 -0
  19. package/lib/artifacts/bcp47/variant.ts +32 -0
  20. package/lib/bcp47/subtag-index.ts +65 -0
  21. package/lib/bcp47/tag.ts +301 -0
  22. package/lib/errors.ts +11 -1
  23. package/lib/index.ts +8 -2
  24. package/lib/iso15924/codes.ts +169 -0
  25. package/lib/iso15924/unicode-script.ts +124 -0
  26. package/lib/iso639/languages.ts +88 -0
  27. package/lib/types.ts +58 -0
  28. package/out/artifacts/bcp47/extlang.d.ts +21 -0
  29. package/out/artifacts/bcp47/extlang.d.ts.map +1 -0
  30. package/out/artifacts/bcp47/extlang.fixture.json +260 -0
  31. package/out/artifacts/bcp47/extlang.js +17 -0
  32. package/out/artifacts/bcp47/extlang.js.map +1 -0
  33. package/out/artifacts/bcp47/grandfathered.d.ts +21 -0
  34. package/out/artifacts/bcp47/grandfathered.d.ts.map +1 -0
  35. package/out/artifacts/bcp47/grandfathered.fixture.json +28 -0
  36. package/out/artifacts/bcp47/grandfathered.js +17 -0
  37. package/out/artifacts/bcp47/grandfathered.js.map +1 -0
  38. package/out/artifacts/bcp47/language.d.ts +21 -0
  39. package/out/artifacts/bcp47/language.d.ts.map +1 -0
  40. package/out/artifacts/bcp47/language.fixture.json +8278 -0
  41. package/out/artifacts/bcp47/language.js +17 -0
  42. package/out/artifacts/bcp47/language.js.map +1 -0
  43. package/out/artifacts/bcp47/redundant.d.ts +21 -0
  44. package/out/artifacts/bcp47/redundant.d.ts.map +1 -0
  45. package/out/artifacts/bcp47/redundant.fixture.json +69 -0
  46. package/out/artifacts/bcp47/redundant.js +17 -0
  47. package/out/artifacts/bcp47/redundant.js.map +1 -0
  48. package/out/artifacts/bcp47/region.d.ts +21 -0
  49. package/out/artifacts/bcp47/region.d.ts.map +1 -0
  50. package/out/artifacts/bcp47/region.fixture.json +307 -0
  51. package/out/artifacts/bcp47/region.js +17 -0
  52. package/out/artifacts/bcp47/region.js.map +1 -0
  53. package/out/artifacts/bcp47/script.d.ts +21 -0
  54. package/out/artifacts/bcp47/script.d.ts.map +1 -0
  55. package/out/artifacts/bcp47/script.fixture.json +227 -0
  56. package/out/artifacts/bcp47/script.js +17 -0
  57. package/out/artifacts/bcp47/script.js.map +1 -0
  58. package/out/artifacts/bcp47/variant.d.ts +21 -0
  59. package/out/artifacts/bcp47/variant.d.ts.map +1 -0
  60. package/out/artifacts/bcp47/variant.fixture.json +141 -0
  61. package/out/artifacts/bcp47/variant.js +17 -0
  62. package/out/artifacts/bcp47/variant.js.map +1 -0
  63. package/out/bcp47/subtag-index.d.ts +22 -0
  64. package/out/bcp47/subtag-index.d.ts.map +1 -0
  65. package/out/bcp47/subtag-index.js +43 -0
  66. package/out/bcp47/subtag-index.js.map +1 -0
  67. package/out/bcp47/tag.d.ts +47 -0
  68. package/out/bcp47/tag.d.ts.map +1 -0
  69. package/out/bcp47/tag.js +218 -0
  70. package/out/bcp47/tag.js.map +1 -0
  71. package/out/errors.d.ts +4 -0
  72. package/out/errors.d.ts.map +1 -1
  73. package/out/errors.js.map +1 -1
  74. package/out/index.d.ts +8 -2
  75. package/out/index.d.ts.map +1 -1
  76. package/out/index.js +4 -1
  77. package/out/index.js.map +1 -1
  78. package/out/iso15924/codes.d.ts +57 -0
  79. package/out/iso15924/codes.d.ts.map +1 -0
  80. package/out/iso15924/codes.js +133 -0
  81. package/out/iso15924/codes.js.map +1 -0
  82. package/out/iso15924/unicode-script.d.ts +10 -0
  83. package/out/iso15924/unicode-script.d.ts.map +1 -0
  84. package/out/iso15924/unicode-script.js +103 -0
  85. package/out/iso15924/unicode-script.js.map +1 -0
  86. package/out/iso639/languages.d.ts +40 -0
  87. package/out/iso639/languages.d.ts.map +1 -0
  88. package/out/iso639/languages.js +54 -0
  89. package/out/iso639/languages.js.map +1 -0
  90. package/out/sdk/fetch.d.ts +5 -1
  91. package/out/sdk/fetch.d.ts.map +1 -1
  92. package/out/sdk/fetch.js +18 -4
  93. package/out/sdk/fetch.js.map +1 -1
  94. package/out/sdk/fetch.run.js +17 -3
  95. package/out/sdk/fetch.run.js.map +1 -1
  96. package/out/sdk/sources.d.ts +1 -1
  97. package/out/sdk/sources.d.ts.map +1 -1
  98. package/out/sdk/sources.js +18 -1
  99. package/out/sdk/sources.js.map +1 -1
  100. package/out/tools/generate.run.js +51 -4
  101. package/out/tools/generate.run.js.map +1 -1
  102. package/out/tools/language-subtags.d.ts +59 -0
  103. package/out/tools/language-subtags.d.ts.map +1 -0
  104. package/out/tools/language-subtags.js +145 -0
  105. package/out/tools/language-subtags.js.map +1 -0
  106. package/out/tools/normalize.d.ts +3 -1
  107. package/out/tools/normalize.d.ts.map +1 -1
  108. package/out/tools/normalize.js.map +1 -1
  109. package/out/tools/normalize.run.js +22 -3
  110. package/out/tools/normalize.run.js.map +1 -1
  111. package/out/types.d.ts +57 -0
  112. package/out/types.d.ts.map +1 -1
  113. package/out/types.js +12 -0
  114. package/out/types.js.map +1 -1
  115. package/package.json +6 -3
  116. package/sdk/fetch.run.ts +19 -3
  117. package/sdk/fetch.ts +26 -5
  118. package/sdk/sources.ts +19 -1
  119. package/tools/generate.run.ts +57 -4
  120. package/tools/language-subtags.ts +195 -0
  121. package/tools/normalize.run.ts +25 -3
  122. package/tools/normalize.ts +1 -1
package/README.md CHANGED
@@ -105,6 +105,21 @@ independent byte walker and against the Rust reader over the same fixture artifa
105
105
 
106
106
  ## Follow-up
107
107
 
108
- ISO 3166-2 subdivisions, ISO 639 language codes, ISO 15924 scripts, UN M49 regions, BCP 47, Unicode locale
109
- identifiers, UN/LOCODE, metropolitan IATA codes and Zod adapters are tracked as later milestones of
110
- sister-software/mailwoman#2945 and are not in this package.
108
+ ISO 3166-2 subdivisions, UN M49 region records, Unicode locale extensions, UN/LOCODE, metropolitan IATA codes
109
+ and Zod adapters are tracked in sister-software/mailwoman#2947 and are not in this package yet.
110
+
111
+ ## Languages, scripts and BCP 47 tags
112
+
113
+ The IANA Language Subtag Registry (CC0 1.0, pinned as `iana-language-subtags`) supplies every BCP 47 subtag.
114
+ The generator writes one table per subtag type under `lib/artifacts/bcp47/`: a `<type>.fixture.json` holding one
115
+ registry row per line, and a module that imports it. A bundle that checks scripts keeps the script table and leaves
116
+ out the 8,276 language rows.
117
+
118
+ | Module | Answers |
119
+ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
120
+ | `@mailwoman/registry/iso15924/codes` | `parseScriptCode`, `getScript`, `unicodeScriptsOf` (`Jpan` gives `Hani`, `Hira`, `Kana`), `isWrittenInScript` |
121
+ | `@mailwoman/registry/iso639/languages` | `parseLanguageSubtag`, `getLanguage` with suppressed script, macrolanguage and scope |
122
+ | `@mailwoman/registry/bcp47/tag` | `parseLanguageTag` (RFC 5646 validity and canonical form), `impliedScript` |
123
+
124
+ `parseLanguageTag("zh-yue")` gives `yue`, `parseLanguageTag("JA-JPAN-JP")` gives `ja-Jpan-JP`, and a tag with an
125
+ unregistered subtag is refused as `not-found-in-snapshot` with that subtag as `part`.
@@ -28,5 +28,40 @@
28
28
  "sha256": "2154993ce8f65602a0000b9ca3ea0d5ed29a1f1719ce39ff6dd791d0ec8b106b",
29
29
  "bytes": 3056,
30
30
  "profile": "open-2026-11"
31
+ },
32
+ "bcp47-language-subtags": {
33
+ "sha256": "76bb110dddfaa14152ec56d22f17a217786e178aab27be4be941fa5352ab0b77",
34
+ "bytes": 430494,
35
+ "profile": "open-2026-11"
36
+ },
37
+ "bcp47-extlang-subtags": {
38
+ "sha256": "afd04073183f12bd2d441296a9a096b536089bc69d678796f4fca91dab8b0cf8",
39
+ "bytes": 28558,
40
+ "profile": "open-2026-11"
41
+ },
42
+ "bcp47-script-subtags": {
43
+ "sha256": "cc1df22ac33578051db30a82995730a78886561d69c28f397cc4c62f2ba88a9e",
44
+ "bytes": 12401,
45
+ "profile": "open-2026-11"
46
+ },
47
+ "bcp47-region-subtags": {
48
+ "sha256": "90c64d8a94501748af5e970d83c312304791d8fde5b257f6468edcbc7a366c48",
49
+ "bytes": 15602,
50
+ "profile": "open-2026-11"
51
+ },
52
+ "bcp47-variant-subtags": {
53
+ "sha256": "c700051c492f068b317280a7f1a396728500fe250d1e74b0706051112b8c0761",
54
+ "bytes": 14002,
55
+ "profile": "open-2026-11"
56
+ },
57
+ "bcp47-grandfathered-subtags": {
58
+ "sha256": "391ad938a27deb57ea3eac5e2329123e524b1e9416c159127701b796b7eb88e9",
59
+ "bytes": 2688,
60
+ "profile": "open-2026-11"
61
+ },
62
+ "bcp47-redundant-subtags": {
63
+ "sha256": "2126f847feae97610986ad3902871600165717858f061ee61699acae144dc2b6",
64
+ "bytes": 5969,
65
+ "profile": "open-2026-11"
31
66
  }
32
67
  }
@@ -51,6 +51,69 @@
51
51
  "count": 6,
52
52
  "kinds": ["onlyOurAirports: XK,XP,ZZ", "onlyWikidata: AX,BV,SJ"],
53
53
  "missMeans": "a comparison rather than a namespace"
54
+ },
55
+ "bcp47-language": {
56
+ "source": "iana-language-subtags",
57
+ "count": 8276,
58
+ "statuses": {
59
+ "current": 8044,
60
+ "deprecated": 232
61
+ },
62
+ "missMeans": "not-found-in-snapshot: the registry's File-Date 2026-09-17 edition holds no such subtag"
63
+ },
64
+ "bcp47-extlang": {
65
+ "source": "iana-language-subtags",
66
+ "count": 258,
67
+ "statuses": {
68
+ "current": 253,
69
+ "deprecated": 5
70
+ },
71
+ "missMeans": "not-found-in-snapshot: the registry's File-Date 2026-09-17 edition holds no such subtag"
72
+ },
73
+ "bcp47-script": {
74
+ "source": "iana-language-subtags",
75
+ "count": 225,
76
+ "statuses": {
77
+ "current": 225,
78
+ "deprecated": 0
79
+ },
80
+ "missMeans": "not-found-in-snapshot: the registry's File-Date 2026-09-17 edition holds no such subtag"
81
+ },
82
+ "bcp47-region": {
83
+ "source": "iana-language-subtags",
84
+ "count": 305,
85
+ "statuses": {
86
+ "current": 294,
87
+ "deprecated": 11
88
+ },
89
+ "missMeans": "not-found-in-snapshot: the registry's File-Date 2026-09-17 edition holds no such subtag"
90
+ },
91
+ "bcp47-variant": {
92
+ "source": "iana-language-subtags",
93
+ "count": 139,
94
+ "statuses": {
95
+ "current": 134,
96
+ "deprecated": 5
97
+ },
98
+ "missMeans": "not-found-in-snapshot: the registry's File-Date 2026-09-17 edition holds no such subtag"
99
+ },
100
+ "bcp47-grandfathered": {
101
+ "source": "iana-language-subtags",
102
+ "count": 26,
103
+ "statuses": {
104
+ "current": 2,
105
+ "deprecated": 24
106
+ },
107
+ "missMeans": "not-found-in-snapshot: the registry's File-Date 2026-09-17 edition holds no such subtag"
108
+ },
109
+ "bcp47-redundant": {
110
+ "source": "iana-language-subtags",
111
+ "count": 67,
112
+ "statuses": {
113
+ "current": 42,
114
+ "deprecated": 25
115
+ },
116
+ "missMeans": "not-found-in-snapshot: the registry's File-Date 2026-09-17 edition holds no such subtag"
54
117
  }
55
118
  }
56
119
  }
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "profile": "open-2026-11",
3
3
  "sources": {
4
+ "iana-language-subtags": {
5
+ "url": "https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry",
6
+ "sha256": "755fad43283be7b41ebe3c89ad054b6eaf928f404f9c0edb74799e0eab74beb1",
7
+ "bytes": 731819,
8
+ "publication": "Tue, 13 Oct 2026 20:07:00 GMT",
9
+ "terms": {
10
+ "statement": "IANA and IETF intend that the Protocol Registries may be freely used by any party for any purpose. Any applicable rights that they may have in the Protocol Registries are subject to the Creative Commons CC0 1.0 dedication.",
11
+ "readAt": "https://www.iana.org/help/licensing-terms",
12
+ "elected": true
13
+ },
14
+ "feeds": ["bcp47-language", "bcp47-extlang", "iso15924-script", "bcp47-region", "bcp47-variant"]
15
+ },
4
16
  "ourairports-airports": {
5
17
  "url": "https://davidmegginson.github.io/ourairports-data/airports.csv",
6
18
  "sha256": "e2e65a3ddaf76170c0e2c373cb8b68597bdf3b59d243c4d6db454d48498ba6d7",