lib0 0.2.109 → 0.2.111

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.
Files changed (100) hide show
  1. package/array.d.ts +2 -2
  2. package/array.d.ts.map +1 -1
  3. package/array.js +5 -6
  4. package/bin/gentesthtml.js +16 -2
  5. package/coverage/tmp/coverage-37930-1752527249527-0.json +1 -0
  6. package/coverage/tmp/coverage-37931-1752527222567-0.json +1 -0
  7. package/dist/aes-gcm.cjs +4 -4
  8. package/dist/{array-f0f52786.cjs → array-f5410bdd.cjs} +6 -7
  9. package/dist/array-f5410bdd.cjs.map +1 -0
  10. package/dist/array.cjs +1 -1
  11. package/dist/array.d.ts +2 -2
  12. package/dist/array.d.ts.map +1 -1
  13. package/dist/{broadcastchannel-3f71755b.cjs → broadcastchannel-7479dcb7.cjs} +2 -2
  14. package/dist/{broadcastchannel-3f71755b.cjs.map → broadcastchannel-7479dcb7.cjs.map} +1 -1
  15. package/dist/broadcastchannel.cjs +9 -9
  16. package/dist/{buffer-c040e625.cjs → buffer-cba90761.cjs} +6 -6
  17. package/dist/{buffer-c040e625.cjs.map → buffer-cba90761.cjs.map} +1 -1
  18. package/dist/buffer.cjs +8 -8
  19. package/dist/cache.cjs +3 -3
  20. package/dist/component.cjs +5 -5
  21. package/dist/{decoding-7b1393a8.cjs → decoding-9732ddf2.cjs} +3 -3
  22. package/dist/{decoding-7b1393a8.cjs.map → decoding-9732ddf2.cjs.map} +1 -1
  23. package/dist/decoding.cjs +4 -4
  24. package/dist/{diff-117a5b30.cjs → diff-63d13d0f.cjs} +2 -2
  25. package/dist/{diff-117a5b30.cjs.map → diff-63d13d0f.cjs.map} +1 -1
  26. package/dist/diff.cjs +4 -4
  27. package/dist/{encoding-364fc682.cjs → encoding-62f41e96.cjs} +3 -3
  28. package/dist/{encoding-364fc682.cjs.map → encoding-62f41e96.cjs.map} +1 -1
  29. package/dist/encoding.cjs +3 -3
  30. package/dist/{environment-f28f4004.cjs → environment-2789c99d.cjs} +3 -3
  31. package/dist/{environment-f28f4004.cjs.map → environment-2789c99d.cjs.map} +1 -1
  32. package/dist/environment.cjs +5 -5
  33. package/dist/{function-e09c7eb7.cjs → function-6c17de82.cjs} +3 -3
  34. package/dist/{function-e09c7eb7.cjs.map → function-6c17de82.cjs.map} +1 -1
  35. package/dist/function.cjs +3 -3
  36. package/dist/index.cjs +12 -12
  37. package/dist/indexeddbV2.cjs +1 -1
  38. package/dist/jwt.cjs +8 -8
  39. package/dist/list.cjs +3 -3
  40. package/dist/logging.cjs +5 -5
  41. package/dist/logging.common.cjs +5 -5
  42. package/dist/logging.node.cjs +5 -5
  43. package/dist/{object-0dc73acd.cjs → object-491858d1.cjs} +24 -7
  44. package/dist/object-491858d1.cjs.map +1 -0
  45. package/dist/object.cjs +2 -1
  46. package/dist/object.cjs.map +1 -1
  47. package/dist/object.d.ts +12 -7
  48. package/dist/object.d.ts.map +1 -1
  49. package/dist/object.test.d.ts +1 -0
  50. package/dist/object.test.d.ts.map +1 -1
  51. package/dist/observable.cjs +1 -1
  52. package/dist/patience.cjs +1 -1
  53. package/dist/performance.node.cjs +3 -3
  54. package/dist/pledge.cjs +1 -1
  55. package/dist/{prng-57f83f83.cjs → prng-6cd9a82d.cjs} +3 -3
  56. package/dist/{prng-57f83f83.cjs.map → prng-6cd9a82d.cjs.map} +1 -1
  57. package/dist/prng.cjs +9 -9
  58. package/dist/prng.test.d.ts.map +1 -1
  59. package/dist/rabin-gf2-polynomial.cjs +8 -8
  60. package/dist/rabin-uncached.cjs +8 -8
  61. package/dist/rabin.cjs +8 -8
  62. package/dist/random.test.d.ts.map +1 -1
  63. package/dist/schema.cjs +545 -0
  64. package/dist/schema.cjs.map +1 -0
  65. package/dist/schema.d.ts +317 -0
  66. package/dist/schema.d.ts.map +1 -0
  67. package/dist/schema.test.d.ts +3 -0
  68. package/dist/schema.test.d.ts.map +1 -0
  69. package/dist/sort.test.d.ts.map +1 -1
  70. package/dist/{string-42009272.cjs → string-04e96f2d.cjs} +2 -2
  71. package/dist/{string-42009272.cjs.map → string-04e96f2d.cjs.map} +1 -1
  72. package/dist/string.cjs +2 -2
  73. package/dist/testing.cjs +10 -11
  74. package/dist/testing.cjs.map +1 -1
  75. package/dist/testing.d.ts.map +1 -1
  76. package/dist/url.cjs +1 -1
  77. package/dist/{websocket-3a481d20.cjs → websocket-2c325505.cjs} +1 -1
  78. package/dist/{websocket-3a481d20.cjs.map → websocket-2c325505.cjs.map} +1 -1
  79. package/dist/websocket.cjs +2 -2
  80. package/object.d.ts +12 -7
  81. package/object.d.ts.map +1 -1
  82. package/object.js +20 -5
  83. package/object.test.d.ts +1 -0
  84. package/object.test.d.ts.map +1 -1
  85. package/package.json +11 -5
  86. package/prng.test.d.ts.map +1 -1
  87. package/random.test.d.ts.map +1 -1
  88. package/schema.d.ts +317 -0
  89. package/schema.d.ts.map +1 -0
  90. package/schema.js +504 -0
  91. package/schema.test.d.ts +3 -0
  92. package/schema.test.d.ts.map +1 -0
  93. package/sort.test.d.ts.map +1 -1
  94. package/test.html +1 -0
  95. package/test.js +3 -2
  96. package/testing.d.ts.map +1 -1
  97. package/testing.js +0 -1
  98. package/coverage/tmp/coverage-32991-1750516864118-0.json +0 -1
  99. package/dist/array-f0f52786.cjs.map +0 -1
  100. package/dist/object-0dc73acd.cjs.map +0 -1
package/schema.js ADDED
@@ -0,0 +1,504 @@
1
+ /**
2
+ * @experimental WIP
3
+ *
4
+ * Simple & efficient schemas for your data.
5
+ */
6
+
7
+ import * as obj from './object.js'
8
+ import * as arr from './array.js'
9
+ import * as error from './error.js'
10
+ import * as env from './environment.js'
11
+
12
+ /**
13
+ * @typedef {string|number|bigint|boolean|null|undefined} LiteralType
14
+ */
15
+
16
+ /**
17
+ * @typedef {{ [k:string|number|symbol]: any }} AnyObject
18
+ */
19
+
20
+ /**
21
+ * @template T
22
+ * @typedef {T extends $Schema<infer X> ? X : T} TypeOfSchema
23
+ */
24
+
25
+ /**
26
+ * @template {readonly unknown[]} T
27
+ * @typedef {T extends []
28
+ * ? {}
29
+ * : T extends [infer First]
30
+ * ? First
31
+ * : T extends [infer First, ...infer Rest]
32
+ * ? First & Intersect<Rest>
33
+ * : never
34
+ * } Intersect
35
+ */
36
+
37
+ /**
38
+ * @template {readonly unknown[]} T
39
+ * @typedef {T extends readonly [$Schema<infer First>, ...infer Rest] ? [First, ...ExtractTypesFromSchemaArray<Rest>] : [] } ExtractTypesFromSchemaArray
40
+ */
41
+
42
+ /**
43
+ * @template T
44
+ * @typedef {T extends $Schema<infer S> ? $Schema<S> : never} CastToSchema
45
+ */
46
+
47
+ /**
48
+ * @template {unknown[]} Arr
49
+ * @typedef {Arr extends [...unknown[], infer L] ? L : never} TupleLast
50
+ */
51
+
52
+ /**
53
+ * @template {unknown[]} Arr
54
+ * @typedef {Arr extends [...infer Fs, unknown] ? Fs : never} TuplePop
55
+ */
56
+
57
+ const schemaSymbol = Symbol('0schema')
58
+
59
+ /**
60
+ * @template T
61
+ */
62
+ export class $Schema {
63
+ get [schemaSymbol] () { return true }
64
+ /**
65
+ * Use `schema.validate(obj)` with a typed parameter that is already of typed to be an instance of
66
+ * Schema. Validate will check the structure of the parameter and return true iff the instance
67
+ * really is an instance of Schema.
68
+ *
69
+ * @param {T} o
70
+ * @return {boolean}
71
+ */
72
+ validate (o) {
73
+ return this.check(o)
74
+ }
75
+
76
+ /* c8 ignore start */
77
+ /**
78
+ * Similar to validate, but this method accepts untyped parameters.
79
+ *
80
+ * @param {any} _o
81
+ * @return {_o is T}
82
+ */
83
+ check (_o) {
84
+ error.methodUnimplemented()
85
+ }
86
+ /* c8 ignore stop */
87
+
88
+ /**
89
+ * @type {$Schema<T?>}
90
+ */
91
+ get nullable () {
92
+ return union(this, null_)
93
+ }
94
+
95
+ /**
96
+ * @type {$Schema<T|undefined>}
97
+ */
98
+ get optional () {
99
+ return union(this, undefined_)
100
+ }
101
+
102
+ /**
103
+ * Cast a variable to a specific type. Returns the casted value, or throws an exception otherwise.
104
+ * Use this if you know that the type is of a specific type and you just want to convince the type
105
+ * system.
106
+ *
107
+ * **Do not rely on these error messages!**
108
+ * Performs an assertion check only if not in a production environment.
109
+ *
110
+ * @param {any} o
111
+ * @return {o extends T ? T : never}
112
+ */
113
+ cast (o) {
114
+ assert(o, this)
115
+ return o
116
+ }
117
+
118
+ /**
119
+ * Ensures that a variable is a a specific type. Returns the value, or throws an exception if the assertion check failed.
120
+ * Use this if you know that the type is of a specific type and you just want to convince the type
121
+ * system.
122
+ *
123
+ * Can be useful when defining lambdas: `s.lambda(s.$number, s.$void).ensure((n) => n + 1)`
124
+ *
125
+ * **Do not rely on these error messages!**
126
+ * Performs an assertion check if not in a production environment.
127
+ *
128
+ * @param {T} o
129
+ * @return {o extends T ? T : never}
130
+ */
131
+ ensure (o) {
132
+ assert(o, this)
133
+ return o
134
+ }
135
+ }
136
+
137
+ /**
138
+ * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C
139
+ * @extends {$Schema<C extends ((...args:any[]) => infer T) ? T : (C extends (new (...args:any[]) => any) ? InstanceType<C> : never)>}
140
+ */
141
+ export class $ConstructedBy extends $Schema {
142
+ /**
143
+ * @param {C} c
144
+ */
145
+ constructor (c) {
146
+ super()
147
+ this.v = c
148
+ }
149
+
150
+ /**
151
+ * @param {any} o
152
+ * @return {o is C extends ((...args:any[]) => infer T) ? T : (C extends (new (...args:any[]) => any) ? InstanceType<C> : never)} o
153
+ */
154
+ check (o) {
155
+ return o?.constructor === this.v
156
+ }
157
+ }
158
+
159
+ /**
160
+ * @template {(new (...args:any[]) => any) | ((...args:any[]) => any)} C
161
+ * @param {C} c
162
+ * @return {CastToSchema<$ConstructedBy<C>>}
163
+ */
164
+ export const constructedBy = c => new $ConstructedBy(c)
165
+
166
+ /**
167
+ * @template {LiteralType} T
168
+ * @extends {$Schema<T>}
169
+ */
170
+ export class $Literal extends $Schema {
171
+ /**
172
+ * @param {Array<T>} literals
173
+ */
174
+ constructor (literals) {
175
+ super()
176
+ this.v = literals
177
+ }
178
+
179
+ /**
180
+ * @param {any} o
181
+ * @return {o is T}
182
+ */
183
+ check (o) {
184
+ return this.v.some(a => a === o)
185
+ }
186
+ }
187
+
188
+ /**
189
+ * @template {LiteralType[]} T
190
+ * @param {T} literals
191
+ * @return {CastToSchema<$Literal<T[number]>>}
192
+ */
193
+ export const literal = (...literals) => new $Literal(literals)
194
+
195
+ /**
196
+ * @template {{[key:string|symbol|number]: $Schema<any>}} S
197
+ * @extends {$Schema<{ [Key in keyof S]: S[Key] extends $Schema<infer Type> ? Type : never }>}
198
+ */
199
+ export class $Object extends $Schema {
200
+ /**
201
+ * @param {S} v
202
+ */
203
+ constructor (v) {
204
+ super()
205
+ this.v = v
206
+ }
207
+
208
+ /**
209
+ * @param {any} o
210
+ * @return {o is { [K in keyof S]: S[K] extends $Schema<infer Type> ? Type : never }}
211
+ */
212
+ check (o) {
213
+ return o != null && obj.every(this.v, (vv, vk) => vv.check(o[vk]))
214
+ }
215
+ }
216
+
217
+ /**
218
+ * @template {{ [key:string|symbol|number]: $Schema<any> }} T
219
+ * @param {T} def
220
+ * @return {CastToSchema<$Object<T>>}
221
+ */
222
+ export const object = def => new $Object(def)
223
+
224
+ /**
225
+ * @template {$Schema<string|number|symbol>} Keys
226
+ * @template {$Schema<any>} Values
227
+ * @extends {$Schema<Record<Keys extends $Schema<infer K> ? K : never,Values extends $Schema<infer T> ? T : never>>}
228
+ */
229
+ export class $Record extends $Schema {
230
+ /**
231
+ * @param {Keys} keys
232
+ * @param {Values} values
233
+ */
234
+ constructor (keys, values) {
235
+ super()
236
+ this.keys = keys
237
+ this.values = values
238
+ }
239
+
240
+ /**
241
+ * @param {any} o
242
+ * @return {o is Record<Keys extends $Schema<infer K> ? K : never,Values extends $Schema<infer T> ? T : never>}
243
+ */
244
+ check (o) {
245
+ return o != null && obj.every(o, (vv, vk) => this.keys.check(vk) && this.values.check(vv))
246
+ }
247
+ }
248
+
249
+ /**
250
+ * @template {$Schema<string|number|symbol>} Keys
251
+ * @template {$Schema<any>} Values
252
+ * @param {Keys} keys
253
+ * @param {Values} values
254
+ * @return {CastToSchema<$Record<Keys,Values>>}
255
+ */
256
+ export const record = (keys, values) => new $Record(keys, values)
257
+
258
+ /**
259
+ * @template {$Schema<any>[]} S
260
+ * @extends {$Schema<{ [Key in keyof S]: S[Key] extends $Schema<infer Type> ? Type : never }>}
261
+ */
262
+ export class $Tuple extends $Schema {
263
+ /**
264
+ * @param {S} v
265
+ */
266
+ constructor (v) {
267
+ super()
268
+ this.v = v
269
+ }
270
+
271
+ /**
272
+ * @param {any} o
273
+ * @return {o is { [K in keyof S]: S[K] extends $Schema<infer Type> ? Type : never }}
274
+ */
275
+ check (o) {
276
+ return o != null && obj.every(this.v, (vv, vk) => /** @type {$Schema<any>} */ (vv).check(o[vk]))
277
+ }
278
+ }
279
+
280
+ /**
281
+ * @template {Array<$Schema<any>>} T
282
+ * @param {T} def
283
+ * @return {CastToSchema<$Tuple<T>>}
284
+ */
285
+ export const tuple = (...def) => new $Tuple(def)
286
+
287
+ /**
288
+ * @template {$Schema<any>} S
289
+ * @extends {$Schema<Array<S extends $Schema<infer T> ? T : never>>}
290
+ */
291
+ export class $Array extends $Schema {
292
+ /**
293
+ * @param {Array<S>} v
294
+ */
295
+ constructor (v) {
296
+ super()
297
+ /**
298
+ * @type {$Schema<S extends $Schema<infer T> ? T : never>}
299
+ */
300
+ this.v = v.length === 1 ? v[0] : new $Union(v)
301
+ }
302
+
303
+ /**
304
+ * @param {any} o
305
+ * @return {o is Array<S extends $Schema<infer T> ? T : never>} o
306
+ */
307
+ check (o) {
308
+ return arr.isArray(o) && arr.every(o, oi => this.v.check(oi))
309
+ }
310
+ }
311
+
312
+ /**
313
+ * @template {Array<$Schema<any>>} T
314
+ * @param {T} def
315
+ * @return {$Schema<Array<T extends Array<$Schema<infer S>> ? S : never>>}
316
+ */
317
+ export const array = (...def) => new $Array(def)
318
+
319
+ /**
320
+ * @template T
321
+ * @extends {$Schema<T>}
322
+ */
323
+ export class $InstanceOf extends $Schema {
324
+ /**
325
+ * @param {new (...args:any) => T} constructor
326
+ */
327
+ constructor (constructor) {
328
+ super()
329
+ this.v = constructor
330
+ }
331
+
332
+ /**
333
+ * @param {any} o
334
+ * @return {o is T}
335
+ */
336
+ check (o) {
337
+ return o instanceof this.v
338
+ }
339
+ }
340
+
341
+ /**
342
+ * @template T
343
+ * @param {new (...args:any) => T} c
344
+ * @return {$Schema<T>}
345
+ */
346
+ export const instance = c => new $InstanceOf(c)
347
+
348
+ /**
349
+ * @template {$Schema<any>[]} Args
350
+ * @typedef {(...args:ExtractTypesFromSchemaArray<TuplePop<Args>>)=>TypeOfSchema<TupleLast<Args>>} _LArgsToLambdaDef
351
+ */
352
+
353
+ /**
354
+ * @template {Array<$Schema<any>>} Args
355
+ * @extends {$Schema<_LArgsToLambdaDef<Args>>}
356
+ */
357
+ export class $Lambda extends $Schema {
358
+ /**
359
+ * @param {Args} args
360
+ */
361
+ constructor (args) {
362
+ super()
363
+ this.len = args.length - 1
364
+ this.args = tuple(...args.slice(-1))
365
+ this.res = args[this.len]
366
+ }
367
+
368
+ /**
369
+ * @param {any} f
370
+ * @return {f is _LArgsToLambdaDef<Args>}
371
+ */
372
+ check (f) {
373
+ return f.constructor === Function && f.length <= this.len
374
+ }
375
+ }
376
+
377
+ /**
378
+ * @template {$Schema<any>[]} Args
379
+ * @param {Args} args
380
+ * @return {$Schema<(...args:ExtractTypesFromSchemaArray<TuplePop<Args>>)=>TypeOfSchema<TupleLast<Args>>>}
381
+ */
382
+ export const lambda = (...args) => new $Lambda(args.length > 0 ? args : [void_])
383
+
384
+ /**
385
+ * @template {Array<$Schema<any>>} T
386
+ * @extends {$Schema<Intersect<ExtractTypesFromSchemaArray<T>>>}
387
+ */
388
+ export class $Intersection extends $Schema {
389
+ /**
390
+ * @param {T} v
391
+ */
392
+ constructor (v) {
393
+ super()
394
+ /**
395
+ * @type {T}
396
+ */
397
+ this.v = v
398
+ }
399
+
400
+ /**
401
+ * @param {any} o
402
+ * @return {o is Intersect<ExtractTypesFromSchemaArray<T>>}
403
+ */
404
+ check (o) {
405
+ // @ts-ignore
406
+ return arr.every(this.v, check => check.check(o))
407
+ }
408
+ }
409
+
410
+ /**
411
+ * @template {$Schema<any>[]} T
412
+ * @param {T} def
413
+ * @return {CastToSchema<$Intersection<T>>}
414
+ */
415
+ export const intersect = (...def) => new $Intersection(def)
416
+
417
+ /**
418
+ * @template S
419
+ * @extends {$Schema<S>}
420
+ */
421
+ export class $Union extends $Schema {
422
+ /**
423
+ * @param {Array<$Schema<S>>} v
424
+ */
425
+ constructor (v) {
426
+ super()
427
+ this.v = v
428
+ }
429
+
430
+ /**
431
+ * @param {any} o
432
+ * @return {o is S}
433
+ */
434
+ check (o) {
435
+ return arr.some(this.v, (vv) => vv.check(o))
436
+ }
437
+
438
+ static schema = constructedBy($Union)
439
+ }
440
+
441
+ /**
442
+ * @template {Array<$Schema<any>>} T
443
+ * @param {T} def
444
+ * @return {CastToSchema<$Union<T extends Array<$Schema<infer S>> ? S : never>>}
445
+ */
446
+ export const union = (...def) => $Union.schema.check(def[0]) ? new $Union([...def[0].v, ...def.slice(1)]) : new $Union(def)
447
+
448
+ /**
449
+ * @type {$Schema<any>}
450
+ */
451
+ export const any = intersect()
452
+
453
+ /**
454
+ * @type {$Schema<bigint>}
455
+ */
456
+ export const bigint = constructedBy(BigInt)
457
+
458
+ /**
459
+ * @type {$Schema<Symbol>}
460
+ */
461
+ export const symbol = constructedBy(Symbol)
462
+
463
+ /**
464
+ * @type {$Schema<number>}
465
+ */
466
+ export const number = constructedBy(Number)
467
+
468
+ /**
469
+ * @type {$Schema<string>}
470
+ */
471
+ export const string = constructedBy(String)
472
+
473
+ /**
474
+ * @type {$Schema<undefined>}
475
+ */
476
+ const undefined_ = literal(undefined)
477
+
478
+ /**
479
+ * @type {$Schema<void>}
480
+ */
481
+ const void_ = undefined_
482
+
483
+ /**
484
+ * @type {$Schema<null>}
485
+ */
486
+ const null_ = literal(null)
487
+
488
+ export { null_ as null, void_ as void, undefined_ as undefined }
489
+
490
+ /* c8 ignore start */
491
+ /**
492
+ * Assert that a variable is of this specific type.
493
+ * The assertion check is only performed in non-production environments.
494
+ *
495
+ * @type {<T>(o:any,schema:$Schema<T>) => asserts o is T}
496
+ */
497
+ export const assert = env.production
498
+ ? () => {}
499
+ : (o, schema) => {
500
+ if (!schema.check(o)) {
501
+ throw error.create(`Expected value to be of type ${schema.constructor.name}.`)
502
+ }
503
+ }
504
+ /* c8 ignore end */
@@ -0,0 +1,3 @@
1
+ export function testSchemas(_tc: t.TestCase): void;
2
+ import * as t from './testing.js';
3
+ //# sourceMappingURL=schema.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["schema.test.js"],"names":[],"mappings":"AAOO,iCAFI,EAAE,QAAQ,QA6NpB;mBAlOkB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"sort.test.d.ts","sourceRoot":"","sources":["sort.test.js"],"names":[],"mappings":"AAoEO,kCAFI,EAAE,QAAQ,QAqBpB;AAKM,mCAFI,EAAE,QAAQ,QAqBpB;AAKM,mCAFI,EAAE,QAAQ,QAqBpB;AAKM,yCAFI,EAAE,QAAQ,QAoBpB;AAKM,+CAFI,EAAE,QAAQ,QA4BpB;mBA5LkB,cAAc"}
1
+ {"version":3,"file":"sort.test.d.ts","sourceRoot":"","sources":["sort.test.js"],"names":[],"mappings":"AAoEO,kCAFI,EAAE,QAAQ,QAoBpB;AAKM,mCAFI,EAAE,QAAQ,QAoBpB;AAKM,mCAFI,EAAE,QAAQ,QAoBpB;AAKM,yCAFI,EAAE,QAAQ,QAoBpB;AAKM,+CAFI,EAAE,QAAQ,QA4BpB;mBAzLkB,cAAc"}
package/test.html CHANGED
@@ -154,6 +154,7 @@
154
154
  "lib0/performance.js": "./performance.js",
155
155
  "lib0/dist/performance.cjs": "./dist/performance.node.cjs",
156
156
  "lib0/performance": "./performance.js",
157
+ "lib0/schema": "./schema.js",
157
158
  "isomorphic.js": "./node_modules/isomorphic.js/browser.mjs",
158
159
  "isomorphic.js/package.json": "./node_modules/isomorphic.js/package.json"
159
160
  },
package/test.js CHANGED
@@ -39,7 +39,7 @@ import * as list from './list.test.js'
39
39
  import * as cache from './cache.test.js'
40
40
  import * as symbol from './symbol.test.js'
41
41
  import * as traits from './traits.test.js'
42
-
42
+ import * as schema from './schema.test.js'
43
43
  import { isBrowser, isNode } from './environment.js'
44
44
 
45
45
  /* c8 ignore next */
@@ -86,7 +86,8 @@ runTests({
86
86
  list,
87
87
  cache,
88
88
  symbol,
89
- traits
89
+ traits,
90
+ schema
90
91
  }).then(success => {
91
92
  /* c8 ignore next */
92
93
  if (isNode) {
package/testing.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["testing.js"],"names":[],"mappings":";AA+DA,gCAAiD;AAGjD,oCAAmG;AAEnG;IACE;;;OAGG;IACH,wBAHW,MAAM,YACN,MAAM,EAmBhB;IAhBC;;OAEG;IACH,YAFU,MAAM,CAEY;IAC5B;;OAEG;IACH,UAFU,MAAM,CAEQ;IACxB;;;;OAIG;IACH,MAFU,IAAI,MAAM,EAAC,GAAG,CAAC,CAEJ;IACrB,qBAAiB;IACjB,wBAAiB;IAGnB,kBAGC;IAED;;OAEG;IAEH,mBAOC;IAED;;;;OAIG;IACH,sBAMC;CACF;AAED,oCAA6E;AAgBtE,gCANI,MAAM,QACN,MAAM,YACG,QAAQ,KAAE,IAAI,GAAC,QAAQ,GAAG,CAAC,KACpC,MAAM,iBACN,MAAM,oBA0EhB;AAcM,sCAHI,MAAM,SACN,MAAM,QAEwF;AAYlG,2BAFI,MAAM,QAE6B;AAE9C,yDAAoC;AAEpC,8EAA0C;AAoBnC,mCAHI,MAAM,eACM,GAAG,OAAE,IAAI,QAS/B;AAoBM,wCAHI,MAAM,eACM,GAAG,OAAE,QAAQ,GAAG,CAAC,iBASvC;AAoBM,qCAJI,MAAM,eACM,GAAG,OAAE,IAAI,GACpB,MAAM,CAYjB;AAoBM,0CAJI,MAAM,eACM,GAAG,OAAE,QAAQ,GAAG,CAAC,GAC5B,QAAQ,MAAM,CAAC,CAY1B;AASM,4EAFK,OAAO,CAYlB;AAQM,kCALI,MAAM,KACN,MAAM,gCAUhB;AASM,mFAA2F;AA8H3F,oGAFa,GAAG,0BAAK,MAAM,QAAC,GAAG,KAAE,OAAO,wBAE8E;AAUtH,gHAA8H;AAK9H,6CAFgB,GAAG,OAAE,QAAQ,GAAG,CAAC,iBASvC;AAMM,mCAHgB,GAAG,OAAE,IAAI,QAW/B;AAMM,wCAHgB,GAAG,OAAE,QAAQ,GAAG,CAAC,iBAWvC;AAKM;QAFW,MAAM;YAAS,MAAM,UAAW,QAAQ,KAAE,IAAI,GAAC,QAAQ,GAAG,CAAC;;qBA2C5E;AAQM,6BAHI,MAAM,SAMhB;AAQM,4BAHI,OAAO,QAOjB;sBAhlBqB,WAAW"}
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["testing.js"],"names":[],"mappings":";AA8DA,gCAAiD;AAGjD,oCAAmG;AAEnG;IACE;;;OAGG;IACH,wBAHW,MAAM,YACN,MAAM,EAmBhB;IAhBC;;OAEG;IACH,YAFU,MAAM,CAEY;IAC5B;;OAEG;IACH,UAFU,MAAM,CAEQ;IACxB;;;;OAIG;IACH,MAFU,IAAI,MAAM,EAAC,GAAG,CAAC,CAEJ;IACrB,qBAAiB;IACjB,wBAAiB;IAGnB,kBAGC;IAED;;OAEG;IAEH,mBAOC;IAED;;;;OAIG;IACH,sBAMC;CACF;AAED,oCAA6E;AAgBtE,gCANI,MAAM,QACN,MAAM,YACG,QAAQ,KAAE,IAAI,GAAC,QAAQ,GAAG,CAAC,KACpC,MAAM,iBACN,MAAM,oBA0EhB;AAcM,sCAHI,MAAM,SACN,MAAM,QAEwF;AAYlG,2BAFI,MAAM,QAE6B;AAE9C,yDAAoC;AAEpC,8EAA0C;AAoBnC,mCAHI,MAAM,eACM,GAAG,OAAE,IAAI,QAS/B;AAoBM,wCAHI,MAAM,eACM,GAAG,OAAE,QAAQ,GAAG,CAAC,iBASvC;AAoBM,qCAJI,MAAM,eACM,GAAG,OAAE,IAAI,GACpB,MAAM,CAYjB;AAoBM,0CAJI,MAAM,eACM,GAAG,OAAE,QAAQ,GAAG,CAAC,GAC5B,QAAQ,MAAM,CAAC,CAY1B;AASM,4EAFK,OAAO,CAYlB;AAQM,kCALI,MAAM,KACN,MAAM,gCAUhB;AASM,mFAA2F;AA8H3F,oGAFa,GAAG,0BAAK,MAAM,QAAC,GAAG,KAAE,OAAO,wBAE8E;AAUtH,gHAA8H;AAK9H,6CAFgB,GAAG,OAAE,QAAQ,GAAG,CAAC,iBASvC;AAMM,mCAHgB,GAAG,OAAE,IAAI,QAW/B;AAMM,wCAHgB,GAAG,OAAE,QAAQ,GAAG,CAAC,iBAWvC;AAKM;QAFW,MAAM;YAAS,MAAM,UAAW,QAAQ,KAAE,IAAI,GAAC,QAAQ,GAAG,CAAC;;qBA2C5E;AAQM,6BAHI,MAAM,SAMhB;AAQM,4BAHI,OAAO,QAOjB;sBA/kBqB,WAAW"}
package/testing.js CHANGED
@@ -60,7 +60,6 @@ import * as performance from 'lib0/performance'
60
60
  import * as traits from './traits.js'
61
61
 
62
62
  export { production } from './environment.js'
63
-
64
63
  export const extensive = env.hasConf('extensive')
65
64
 
66
65
  /* c8 ignore next */