@ot-builder/io-bin-name 1.4.0 → 1.5.2

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