is-language-code 5.1.3 → 5.2.1

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/CHANGELOG.md CHANGED
@@ -3,11 +3,51 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## 5.1.0 (2025-10-15)
6
+ ## 5.2.1 (2026-09-01)
7
+
8
+ ### Bug Fixes
9
+
10
+ - clarify invalid language subtags ([a2ddf70](https://github.com/codsen/codsen/commit/a2ddf704ec4b8c396aa0cf4fe1f57571470ab6df))
11
+ - set input arg type back to string and obligatory one at that ([636bf2f](https://github.com/codsen/codsen/commit/636bf2f20baa2e853e1d288c02ea3720c9631605))
12
+ - type defensive language validation ([0f5123e](https://github.com/codsen/codsen/commit/0f5123e1ce72d3854071b5e481e76ed5fa8d6c57))
13
+
14
+ ### Performance Improvements
15
+
16
+ - optimise package hot paths and JSON editing ([f3112bd](https://github.com/codsen/codsen/commit/f3112bd7fc0d7c9bc09312d3744c950691d72ca5))
17
+ - reduce complete tag lookups ([682371a](https://github.com/codsen/codsen/commit/682371a329d57281aea5eb34972b50efd83776a9))
18
+
19
+ ## 5.2.0 (2026-08-19)
20
+
21
+ ### Bug Fixes
22
+
23
+ - resolve various review findings ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
24
+ - retire direct publish aliases ([f98e31e](https://github.com/codsen/codsen/commit/f98e31eb89bc185471225664e610b55f34fbf648))
7
25
 
8
26
  ### Features
9
27
 
10
- - if value to be added is a number, keep it as is, don't stringify ([ce3e1a5](https://github.com/codsen/codsen/commit/ce3e1a525998ca3c0abf0142affef95b14cd1990))
28
+ - add codsen-glob and migrate glob consumers ([5595a2b](https://github.com/codsen/codsen/commit/5595a2b267eaa6cb60072d037aef00b7a28edd42))
29
+ - fix memory leak, rebase and update all data ([2ffb629](https://github.com/codsen/codsen/commit/2ffb6298ec337ec13c270e8d6e00afde161548a3))
30
+ - refresh the tooling and generate with the latest dependencies ([781f802](https://github.com/codsen/codsen/commit/781f802911066a82a4533b0e5a3fcbd742d0dd83))
31
+
32
+ ### Reverts
33
+
34
+ - Revert "Merge pull request #128 from codsen/release/npm-32198404552-1" ([5baeeaa](https://github.com/codsen/codsen/commit/5baeeaaa677b86f1eaa6396cadf3aea32b06416e)), closes [#128](https://github.com/codsen/codsen/issues/128)
35
+ - Revert "Merge pull request #127 from codsen/release/npm-32194020886-1" ([5f1e94d](https://github.com/codsen/codsen/commit/5f1e94deef910ce735266b16aeee08a76de7a862)), closes [#127](https://github.com/codsen/codsen/issues/127)
36
+
37
+ ## 5.2.0 (2026-08-05)
38
+
39
+ ### Features
40
+
41
+ - Replace the positional parser with an RFC 5646 cursor parser.
42
+ - Eliminate per-call RegExp retention; lookup sets and ranges are initialized once.
43
+ - Fix grandfathered casing, extlang prefixes/count, script→variant parsing, duplicate variants/singletons, extension/private-use handling, and private script endpoints.
44
+ - Update the registry from 2019 to the official IANA 2026-06-14 snapshot.
45
+ - Make [runme.js (line 1)](/Users/royrevelt/Documents/__PROJECTS/_____mono/packages/is-language-code/reference/runme.js:1) deterministic, cwd-independent, and prefix-aware.
46
+ - Fix the vacuous Datahub assertions and added regressions through test 65.
47
+ - Remove the now-unused codsen-utils dependency and synchronized the lockfile.
48
+ - Remove obsolete debug logging, resolving the line-label violations.
49
+
50
+ Thank you https://github.com/DamilojuVeriff for alerting about the leak and raising a POC PR.
11
51
 
12
52
  ## 5.0.0 (2022-12-01)
13
53
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright © 2010-2025 Roy Revelt and other contributors
3
+ Copyright © 2010-2026 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -33,21 +33,17 @@ npm i is-language-code
33
33
  ## Quick Take
34
34
 
35
35
  ```js
36
- import { strict as assert } from "assert";
36
+ import { strict as assert } from "node:assert";
37
37
 
38
38
  import { isLangCode } from "is-language-code";
39
39
 
40
- assert.deepEqual(isLangCode("de-419-DE"), {
41
- res: false,
42
- message: 'Two region subtags, "419" and "de".',
43
- });
44
-
45
40
  assert.deepEqual(isLangCode("sr-Latn"), {
46
41
  res: true,
47
42
  message: null,
48
43
  });
49
44
  ```
50
45
 
46
+
51
47
  ## Documentation
52
48
 
53
49
  Please [visit codsen.com](https://codsen.com/os/is-language-code/) for a full description of the API. If you’re looking for the **Changelog**, it’s [here](https://github.com/codsen/codsen/blob/main/packages/is-language-code/CHANGELOG.md). Also, try the [GUI playground](https://codsen.com/os/is-language-code/play).
@@ -60,6 +56,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
60
56
 
61
57
  MIT License
62
58
 
63
- Copyright © 2010-2025 Roy Revelt and other contributors
59
+ Copyright © 2010-2026 Roy Revelt and other contributors
64
60
 
65
61
  <p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>