@ot-builder/io-bin-name 1.3.3 → 1.5.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.json CHANGED
@@ -2,7 +2,280 @@
2
2
  "name": "@ot-builder/io-bin-name",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 18 Dec 2021 01:17:28 GMT",
5
+ "date": "Sat, 02 Apr 2022 01:38:49 GMT",
6
+ "tag": "@ot-builder/io-bin-name_v1.5.1",
7
+ "version": "1.5.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "otbbuilder-dev@users.noreply.github.com",
12
+ "package": "@ot-builder/io-bin-name",
13
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af",
14
+ "comment": "Enforce ordering of name entries"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@ot-builder/io-bin-name",
19
+ "comment": "Bump @ot-builder/bin-util to v1.5.1",
20
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@ot-builder/io-bin-name",
25
+ "comment": "Bump @ot-builder/common-impl to v1.5.1",
26
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@ot-builder/io-bin-name",
31
+ "comment": "Bump @ot-builder/errors to v1.5.1",
32
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@ot-builder/io-bin-name",
37
+ "comment": "Bump @ot-builder/ot-glyphs to v1.5.1",
38
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@ot-builder/io-bin-name",
43
+ "comment": "Bump @ot-builder/ot-metadata to v1.5.1",
44
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@ot-builder/io-bin-name",
49
+ "comment": "Bump @ot-builder/ot-name to v1.5.1",
50
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@ot-builder/io-bin-name",
55
+ "comment": "Bump @ot-builder/prelude to v1.5.1",
56
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@ot-builder/io-bin-name",
61
+ "comment": "Bump @ot-builder/primitive to v1.5.1",
62
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@ot-builder/io-bin-name",
67
+ "comment": "Bump @ot-builder/ot-sfnt to v1.5.1",
68
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@ot-builder/io-bin-name",
73
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.5.1",
74
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@ot-builder/io-bin-name",
79
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.5.1",
80
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@ot-builder/io-bin-name",
85
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.5.1",
86
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@ot-builder/io-bin-name",
91
+ "comment": "Bump @ot-builder/test-util to v1.5.1",
92
+ "commit": "f87981f0891315771cda43fb56a3d8e85731a0af"
93
+ }
94
+ ]
95
+ }
96
+ },
97
+ {
98
+ "date": "Sat, 26 Mar 2022 01:37:00 GMT",
99
+ "tag": "@ot-builder/io-bin-name_v1.5.0",
100
+ "version": "1.5.0",
101
+ "comments": {
102
+ "minor": [
103
+ {
104
+ "author": "beachball",
105
+ "package": "@ot-builder/io-bin-name",
106
+ "comment": "Bump @ot-builder/bin-util to v1.5.0",
107
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@ot-builder/io-bin-name",
112
+ "comment": "Bump @ot-builder/common-impl to v1.5.0",
113
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
114
+ },
115
+ {
116
+ "author": "beachball",
117
+ "package": "@ot-builder/io-bin-name",
118
+ "comment": "Bump @ot-builder/errors to v1.5.0",
119
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
120
+ },
121
+ {
122
+ "author": "beachball",
123
+ "package": "@ot-builder/io-bin-name",
124
+ "comment": "Bump @ot-builder/ot-glyphs to v1.5.0",
125
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
126
+ },
127
+ {
128
+ "author": "beachball",
129
+ "package": "@ot-builder/io-bin-name",
130
+ "comment": "Bump @ot-builder/ot-metadata to v1.5.0",
131
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
132
+ },
133
+ {
134
+ "author": "beachball",
135
+ "package": "@ot-builder/io-bin-name",
136
+ "comment": "Bump @ot-builder/ot-name to v1.5.0",
137
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
138
+ },
139
+ {
140
+ "author": "beachball",
141
+ "package": "@ot-builder/io-bin-name",
142
+ "comment": "Bump @ot-builder/prelude to v1.5.0",
143
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
144
+ },
145
+ {
146
+ "author": "beachball",
147
+ "package": "@ot-builder/io-bin-name",
148
+ "comment": "Bump @ot-builder/primitive to v1.5.0",
149
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
150
+ },
151
+ {
152
+ "author": "beachball",
153
+ "package": "@ot-builder/io-bin-name",
154
+ "comment": "Bump @ot-builder/ot-sfnt to v1.5.0",
155
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
156
+ },
157
+ {
158
+ "author": "beachball",
159
+ "package": "@ot-builder/io-bin-name",
160
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.5.0",
161
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
162
+ },
163
+ {
164
+ "author": "beachball",
165
+ "package": "@ot-builder/io-bin-name",
166
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.5.0",
167
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
168
+ },
169
+ {
170
+ "author": "beachball",
171
+ "package": "@ot-builder/io-bin-name",
172
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.5.0",
173
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
174
+ },
175
+ {
176
+ "author": "beachball",
177
+ "package": "@ot-builder/io-bin-name",
178
+ "comment": "Bump @ot-builder/test-util to v1.5.0",
179
+ "commit": "0d6eb83609255ffdfd147ed0610aab1aa424b357"
180
+ }
181
+ ]
182
+ }
183
+ },
184
+ {
185
+ "date": "Sat, 26 Feb 2022 01:27:19 GMT",
186
+ "tag": "@ot-builder/io-bin-name_v1.4.0",
187
+ "version": "1.4.0",
188
+ "comments": {
189
+ "minor": [
190
+ {
191
+ "author": "otbbuilder-dev@users.noreply.github.com",
192
+ "package": "@ot-builder/io-bin-name",
193
+ "commit": "d5ef5ade3424ec81b7545c9967badddeb9cc8f1b",
194
+ "comment": "Enhance OTBCLI with better subset, drop and transform-glyphs"
195
+ },
196
+ {
197
+ "author": "beachball",
198
+ "package": "@ot-builder/io-bin-name",
199
+ "comment": "Bump @ot-builder/bin-util to v1.4.0",
200
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
201
+ },
202
+ {
203
+ "author": "beachball",
204
+ "package": "@ot-builder/io-bin-name",
205
+ "comment": "Bump @ot-builder/common-impl to v1.4.0",
206
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
207
+ },
208
+ {
209
+ "author": "beachball",
210
+ "package": "@ot-builder/io-bin-name",
211
+ "comment": "Bump @ot-builder/errors to v1.4.0",
212
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
213
+ },
214
+ {
215
+ "author": "beachball",
216
+ "package": "@ot-builder/io-bin-name",
217
+ "comment": "Bump @ot-builder/ot-glyphs to v1.4.0",
218
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
219
+ },
220
+ {
221
+ "author": "beachball",
222
+ "package": "@ot-builder/io-bin-name",
223
+ "comment": "Bump @ot-builder/ot-metadata to v1.4.0",
224
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
225
+ },
226
+ {
227
+ "author": "beachball",
228
+ "package": "@ot-builder/io-bin-name",
229
+ "comment": "Bump @ot-builder/ot-name to v1.4.0",
230
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
231
+ },
232
+ {
233
+ "author": "beachball",
234
+ "package": "@ot-builder/io-bin-name",
235
+ "comment": "Bump @ot-builder/prelude to v1.4.0",
236
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
237
+ },
238
+ {
239
+ "author": "beachball",
240
+ "package": "@ot-builder/io-bin-name",
241
+ "comment": "Bump @ot-builder/primitive to v1.4.0",
242
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
243
+ },
244
+ {
245
+ "author": "beachball",
246
+ "package": "@ot-builder/io-bin-name",
247
+ "comment": "Bump @ot-builder/ot-sfnt to v1.4.0",
248
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
249
+ },
250
+ {
251
+ "author": "beachball",
252
+ "package": "@ot-builder/io-bin-name",
253
+ "comment": "Bump @ot-builder/io-bin-sfnt to v1.4.0",
254
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
255
+ },
256
+ {
257
+ "author": "beachball",
258
+ "package": "@ot-builder/io-bin-name",
259
+ "comment": "Bump @ot-builder/io-bin-glyph-store to v1.4.0",
260
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
261
+ },
262
+ {
263
+ "author": "beachball",
264
+ "package": "@ot-builder/io-bin-name",
265
+ "comment": "Bump @ot-builder/io-bin-metadata to v1.4.0",
266
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
267
+ },
268
+ {
269
+ "author": "beachball",
270
+ "package": "@ot-builder/io-bin-name",
271
+ "comment": "Bump @ot-builder/test-util to v1.4.0",
272
+ "commit": "f1c3eedd84cadff44ee97d878a245b451ce7bd59"
273
+ }
274
+ ]
275
+ }
276
+ },
277
+ {
278
+ "date": "Sat, 18 Dec 2021 01:19:54 GMT",
6
279
  "tag": "@ot-builder/io-bin-name_v1.3.3",
7
280
  "version": "1.3.3",
8
281
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,74 @@
1
1
  # Change Log - @ot-builder/io-bin-name
2
2
 
3
- This log was last generated on Sat, 18 Dec 2021 01:17:28 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 02 Apr 2022 01:38:49 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.5.1
8
+
9
+ Sat, 02 Apr 2022 01:38:49 GMT
10
+
11
+ ### Patches
12
+
13
+ - Enforce ordering of name entries (otbbuilder-dev@users.noreply.github.com)
14
+ - Bump @ot-builder/bin-util to v1.5.1
15
+ - Bump @ot-builder/common-impl to v1.5.1
16
+ - Bump @ot-builder/errors to v1.5.1
17
+ - Bump @ot-builder/ot-glyphs to v1.5.1
18
+ - Bump @ot-builder/ot-metadata to v1.5.1
19
+ - Bump @ot-builder/ot-name to v1.5.1
20
+ - Bump @ot-builder/prelude to v1.5.1
21
+ - Bump @ot-builder/primitive to v1.5.1
22
+ - Bump @ot-builder/ot-sfnt to v1.5.1
23
+ - Bump @ot-builder/io-bin-sfnt to v1.5.1
24
+ - Bump @ot-builder/io-bin-glyph-store to v1.5.1
25
+ - Bump @ot-builder/io-bin-metadata to v1.5.1
26
+ - Bump @ot-builder/test-util to v1.5.1
27
+
28
+ ## 1.5.0
29
+
30
+ Sat, 26 Mar 2022 01:37:00 GMT
31
+
32
+ ### Minor changes
33
+
34
+ - Bump @ot-builder/bin-util to v1.5.0
35
+ - Bump @ot-builder/common-impl to v1.5.0
36
+ - Bump @ot-builder/errors to v1.5.0
37
+ - Bump @ot-builder/ot-glyphs to v1.5.0
38
+ - Bump @ot-builder/ot-metadata to v1.5.0
39
+ - Bump @ot-builder/ot-name to v1.5.0
40
+ - Bump @ot-builder/prelude to v1.5.0
41
+ - Bump @ot-builder/primitive to v1.5.0
42
+ - Bump @ot-builder/ot-sfnt to v1.5.0
43
+ - Bump @ot-builder/io-bin-sfnt to v1.5.0
44
+ - Bump @ot-builder/io-bin-glyph-store to v1.5.0
45
+ - Bump @ot-builder/io-bin-metadata to v1.5.0
46
+ - Bump @ot-builder/test-util to v1.5.0
47
+
48
+ ## 1.4.0
49
+
50
+ Sat, 26 Feb 2022 01:27:19 GMT
51
+
52
+ ### Minor changes
53
+
54
+ - Enhance OTBCLI with better subset, drop and transform-glyphs (otbbuilder-dev@users.noreply.github.com)
55
+ - Bump @ot-builder/bin-util to v1.4.0
56
+ - Bump @ot-builder/common-impl to v1.4.0
57
+ - Bump @ot-builder/errors to v1.4.0
58
+ - Bump @ot-builder/ot-glyphs to v1.4.0
59
+ - Bump @ot-builder/ot-metadata to v1.4.0
60
+ - Bump @ot-builder/ot-name to v1.4.0
61
+ - Bump @ot-builder/prelude to v1.4.0
62
+ - Bump @ot-builder/primitive to v1.4.0
63
+ - Bump @ot-builder/ot-sfnt to v1.4.0
64
+ - Bump @ot-builder/io-bin-sfnt to v1.4.0
65
+ - Bump @ot-builder/io-bin-glyph-store to v1.4.0
66
+ - Bump @ot-builder/io-bin-metadata to v1.4.0
67
+ - Bump @ot-builder/test-util to v1.4.0
68
+
7
69
  ## 1.3.3
8
70
 
9
- Sat, 18 Dec 2021 01:17:28 GMT
71
+ Sat, 18 Dec 2021 01:19:54 GMT
10
72
 
11
73
  ### Patches
12
74
 
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./main"), exports);
4
+ tslib_1.__exportStar(require("./main"), exports);
5
5
  //# sourceMappingURL=index.js.map
package/lib/name/index.js CHANGED
@@ -63,6 +63,15 @@ const NameRecord = {
63
63
  throw errors_1.Errors.Name.EncodingNotSupported(rec.platformID, rec.encodingID);
64
64
  frag.uint16(buf.byteLength);
65
65
  frag.uint16(alloc.add(buf));
66
+ },
67
+ compare(a, b) {
68
+ if (a.platformID !== b.platformID)
69
+ return a.platformID - b.platformID;
70
+ if (a.encodingID !== b.encodingID)
71
+ return a.encodingID - b.encodingID;
72
+ if (a.languageID !== b.languageID)
73
+ return a.languageID - b.languageID;
74
+ return a.nameID - b.nameID;
66
75
  }
67
76
  };
68
77
  const LangTagRecord = {
@@ -101,10 +110,11 @@ exports.NameIo = {
101
110
  const format = table.langTagMap && table.langTagMap.length ? 1 : 0;
102
111
  const frStrings = new bin_util_1.Frag();
103
112
  const noa = new NameOffsetAllocator();
113
+ const sortedRecords = Array.from(table.records).sort(NameRecord.compare);
104
114
  frag.uint16(format);
105
- frag.uint16(table.records.length);
115
+ frag.uint16(sortedRecords.length);
106
116
  frag.ptr16(frStrings);
107
- for (const rec of table.records) {
117
+ for (const rec of sortedRecords) {
108
118
  frag.push(NameRecord, rec, noa);
109
119
  }
110
120
  if (format === 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ot-builder/io-bin-name",
3
- "version": "1.3.3",
3
+ "version": "1.5.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,24 +23,24 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@ot-builder/bin-util": "1.3.3",
27
- "@ot-builder/common-impl": "1.3.3",
28
- "@ot-builder/errors": "1.3.3",
29
- "@ot-builder/ot-glyphs": "1.3.3",
30
- "@ot-builder/ot-metadata": "1.3.3",
31
- "@ot-builder/ot-name": "1.3.3",
32
- "@ot-builder/prelude": "1.3.3",
33
- "@ot-builder/primitive": "1.3.3",
34
- "@ot-builder/ot-sfnt": "1.3.3",
35
- "@ot-builder/io-bin-sfnt": "1.3.3",
26
+ "@ot-builder/bin-util": "1.5.1",
27
+ "@ot-builder/common-impl": "1.5.1",
28
+ "@ot-builder/errors": "1.5.1",
29
+ "@ot-builder/ot-glyphs": "1.5.1",
30
+ "@ot-builder/ot-metadata": "1.5.1",
31
+ "@ot-builder/ot-name": "1.5.1",
32
+ "@ot-builder/prelude": "1.5.1",
33
+ "@ot-builder/primitive": "1.5.1",
34
+ "@ot-builder/ot-sfnt": "1.5.1",
35
+ "@ot-builder/io-bin-sfnt": "1.5.1",
36
36
  "iconv-lite": "^0.6.3",
37
37
  "tslib": "^2.0.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@ot-builder/io-bin-glyph-store": "1.3.3",
41
- "@ot-builder/io-bin-metadata": "1.3.3",
42
- "@ot-builder/test-util": "1.3.3",
40
+ "@ot-builder/io-bin-glyph-store": "1.5.1",
41
+ "@ot-builder/io-bin-metadata": "1.5.1",
42
+ "@ot-builder/test-util": "1.5.1",
43
43
  "@types/jest": "^26.0.23",
44
- "jest": "^27.0.6"
44
+ "jest": "^27.5.1"
45
45
  }
46
46
  }