Skip to content

Commit

Permalink
Update to Unicode 16
Browse files Browse the repository at this point in the history
Tested with Node.js w/ [ICU 76.1](https://github.com/unicode-org/icu/releases/tag/release-76-1) data

Resolved #57
  • Loading branch information
cometkim committed Nov 1, 2024
1 parent 1c01ab2 commit 3d4af84
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 284 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ A lightweight implementation of the [Unicode Text Segmentation (UAX \#29)](https

## Unicode® Version

Unicode® 15.1.0
Unicode® 16.0.0

Unicode® Standard Annex \#29 - [Revision 43](https://www.unicode.org/reports/tr29/tr29-43.html) (2023-08-16)
Unicode® Standard Annex \#29 - [Revision 45](https://www.unicode.org/reports/tr29/tr29-45.html) (2024-08-28)

## APIs

Expand Down Expand Up @@ -231,7 +231,7 @@ Since [Hermes doesn't support the `Intl.Segmenter` API](https://github.com/faceb

| Name | Unicode® | ESM? | Size | Size (min) | Size (min+gzip) | Size (min+br) |
|------------------------------|----------|------|----------:|-----------:|----------------:|--------------:|
| `unicode-segmenter/grapheme` | 15.1.0 | ✔️ | 28,270 | 24,291 | 6,347 | 4,273 |
| `unicode-segmenter/grapheme` | 16.0.0 | ✔️ | 28,330 | 24,351 | 6,395 | 4,300 |
| `graphemer` | 15.0.0 | ✖️ ️| 410,435 | 95,104 | 15,752 | 10,660 |
| `grapheme-splitter` | 10.0.0 | ✖️ | 122,252 | 23,680 | 7,852 | 4,841 |
| `@formatjs/intl-segmenter`* | 15.0.0 | ✖️ | 491,043 | 318,721 | 54,248 | 34,380 |
Expand Down
6 changes: 3 additions & 3 deletions scripts/unicode.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ let preamble = `
`.trimStart();

/** @type {[major: number, minor: number, patch: number]} */
const UNICODE_VERSION = [15, 1, 0];
const UNICODE_VERSION = [16, 0, 0];
const UNICODE_VERSION_STRING = UNICODE_VERSION.join('.');

// these are the surrogate codepoints, which are not valid rust characters
Expand Down Expand Up @@ -375,7 +375,7 @@ let parseTestData = (data, optsplit = []) => {
outcs.push(workcs || []);
return [outcs, outis];
};

/**
* @param {string} str
* @return {UnicodeValues[]}
Expand Down Expand Up @@ -761,7 +761,7 @@ let printTestDataModule = async f => {
*/
`,
);

/**
* @typedef {[UnicodeValues, UnicodeValues[]]} TestCaseRow
*/
Expand Down
2 changes: 1 addition & 1 deletion src/_emoji_table.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3d4af84

Please sign in to comment.