Skip to content

Commit d4e1afa

Browse files
committed
Release v2.0.1
1 parent c09f139 commit d4e1afa

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

‎bootstrap.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ for dir in $(find unicode-* -maxdepth 0 -type d | sort -r); do
1111
cd "${dir}";
1212
echo "Taking care of ${dir}…";
1313
git add -A;
14-
git commit -m 'Release v2.0.0';
15-
git tag v2.0.0;
14+
git commit -m 'Release v2.0.1';
15+
git tag v2.0.1;
1616
git push;
1717
git push --tags;
1818
cd ..;

‎templates/README.md‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,33 +64,37 @@ Other than categories, data on Unicode properties, blocks, scripts, and script e
6464
// `Names`:
6565

6666
import names from '@unicode/unicode-<%= version %>/Names/index.mjs'; // Array of canonical names.
67-
<% dirs.Names.forEach(function(subdir) { %>import <%= subdir %> from '@unicode/unicode-<%= version %>/Names/<%= subdir %>/index.mjs'; // Lookup map from code point to aliases.
67+
<% dirs.Names.forEach(function(subdir) {
68+
const id = subdir.replaceAll(/[^a-zA-Z0-9_$]/g, '_').replace(/^([0-9])/, '_$1');
69+
%>import <%= id %> from '@unicode/unicode-<%= version %>/Names/<%= subdir %>/index.mjs'; // Lookup map from code point to aliases.
6870
<% }); %>
6971
<% Object.keys(dirs).forEach(function(type) {
7072
if (type == 'Names' && !dirs[type].subType) { return; }
7173
%>
7274
// `<%= type %>`:
7375
<%
7476
if (/^(?:Bidi_Class|Bidi_Paired_Bracket_Type|Bidi_Mirroring_Glyph|General_Category)$/.test(type)) {
77+
const id = type.replaceAll(/[^a-zA-Z0-9_$]/g, '_').replace(/^([0-9])/, '_$1');
7578
%>
76-
import <%= type %> from '@unicode/unicode-<%= version %>/<%= type %>/index.mjs'; // Lookup map.
79+
import <%= id %> from '@unicode/unicode-<%= version %>/<%= type %>/index.mjs'; // Lookup map.
7780
<%
7881
}
7982
dirs[type].forEach(function(dir) {
83+
const id = dir.replaceAll(/[^a-zA-Z0-9_$]/g, '_').replace(/^([0-9])/, '_$1');
8084
if ('Case_Folding' == type || 'Simple_Case_Mapping' == type || 'Special_Casing' == type) {
8185
%>
82-
import <%= dir %>CodePoints from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/code-points.mjs'; // Lookup map from code point to code point or array of code points.
83-
import <%= dir %>Symbols from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/symbols.mjs'; // Lookup map from symbol to symbol(s).
86+
import <%= id %>CodePoints from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/code-points.mjs'; // Lookup map from code point to code point or array of code points.
87+
import <%= id %>Symbols from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/symbols.mjs'; // Lookup map from symbol to symbol(s).
8488
<%
8589
} else if ('Sequence_Property' == type) {
8690
%>
87-
import <%= dir %> from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/index.mjs'; // Array containing a string for each sequence.
91+
import <%= id %> from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/index.mjs'; // Array containing a string for each sequence.
8892
<%
8993
} else {
9094
%>
91-
import <%= dir %>CodePoints from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/code-points.mjs';
92-
import <%= dir %>Symbols from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/symbols.mjs';
93-
import <%= dir %>Regex from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/regex.mjs';
95+
import <%= id %>CodePoints from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/code-points.mjs';
96+
import <%= id %>Symbols from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/symbols.mjs';
97+
import <%= id %>Regex from '@unicode/unicode-<%= version %>/<%= type %>/<%= dir %>/regex.mjs';
9498
<%
9599
}
96100
});

‎templates/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@unicode/unicode-<%= version %>",
3-
"version": "1.6.17",
3+
"version": "2.0.1",
44
"description": "JavaScript-compatible Unicode data. Arrays of code points, arrays of symbols, and regular expressions for Unicode v<%= version %>’s categories, scripts, blocks, bidi, and other properties.",
55
"homepage": "https://github.com/node-unicode/unicode-<%= version %>",
66
"main": "index.mjs",

0 commit comments

Comments
 (0)