rregex 1.0.0 → 1.0.4

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/lib/types.d.ts CHANGED
@@ -1,51 +1,416 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * @returns {any}
4
+ * @param {string} text
5
+ * @returns {string}
5
6
  */
6
- export function get_metadata(): any;
7
+ export function escape(text: string): string;
8
+
9
+ export type Hir = {
10
+ '@type': 'struct'
11
+ '@name': 'regex_syntax::hir::Hir'
12
+ bold: boolean;
13
+ italic: boolean;
14
+ size: number;
15
+ }
16
+
17
+
18
+
19
+ export type HirKind =
20
+ | HirKindEmptyVariant
21
+ | HirKindLiteralVariant
22
+ | HirKindClassVariant
23
+ | HirKindAnchorVariant
24
+ | HirKindWordBoundaryVariant
25
+ | HirKindRepetitionVariant
26
+ | HirKindGroupVariant
27
+ | HirKindConcatVariant
28
+ | HirKindAlternationVariant
29
+
30
+ export type HirKindEmptyVariant = {
31
+ '@type': 'struct'
32
+ '@name': 'regex_syntax::hir::HirKind'
33
+ '@variant': 'Empty'
34
+ }
35
+
36
+ export type HirKindLiteralVariant = {
37
+ '@type': 'struct'
38
+ '@name': 'regex_syntax::hir::HirKind'
39
+ '@variant': 'Literal'
40
+ 'value': Literal
41
+ }
42
+
43
+ export type HirKindClassVariant = {
44
+ '@type': 'struct'
45
+ '@name': 'regex_syntax::hir::HirKind'
46
+ '@variant': 'Class'
47
+ 'value': Class
48
+ }
49
+
50
+ export type HirKindAnchorVariant = {
51
+ '@type': 'struct'
52
+ '@name': 'regex_syntax::hir::HirKind'
53
+ '@variant': 'Anchor'
54
+ 'value': Anchor
55
+ }
56
+
57
+ export type HirKindWordBoundaryVariant = {
58
+ '@type': 'struct'
59
+ '@name': 'regex_syntax::hir::HirKind'
60
+ '@variant': 'WordBoundary'
61
+ 'value': WordBoundary
62
+ }
63
+
64
+ export type HirKindRepetitionVariant = {
65
+ '@type': 'struct'
66
+ '@name': 'regex_syntax::hir::HirKind'
67
+ '@variant': 'Repetition'
68
+ 'value': Repetition
69
+ }
70
+
71
+ export type HirKindGroupVariant = {
72
+ '@type': 'struct'
73
+ '@name': 'regex_syntax::hir::HirKind'
74
+ '@variant': 'Group'
75
+ 'value': Group
76
+ }
77
+
78
+ export type HirKindConcatVariant = {
79
+ '@type': 'struct'
80
+ '@name': 'regex_syntax::hir::HirKind'
81
+ '@variant': 'Concat'
82
+ 'value': Hir[]
83
+ }
84
+
85
+ export type HirKindAlternationVariant = {
86
+ '@type': 'struct'
87
+ '@name': 'regex_syntax::hir::HirKind'
88
+ '@variant': 'Alternation'
89
+ 'value': Hir[]
90
+ }
91
+
92
+
93
+
94
+ export type Literal =
95
+ | LiteralUnicodeVariant
96
+ | LiteralByteVariant
97
+
98
+ export type LiteralUnicodeVariant = {
99
+ '@type': 'struct'
100
+ '@name': 'regex_syntax::hir::Literal'
101
+ '@variant': 'Unicode'
102
+ 'value': string
103
+ }
104
+
105
+ export type LiteralByteVariant = {
106
+ '@type': 'struct'
107
+ '@name': 'regex_syntax::hir::Literal'
108
+ '@variant': 'Byte'
109
+ 'value': number
110
+ }
111
+
112
+
113
+
114
+ export type Class =
115
+ | ClassUnicodeVariant
116
+ | ClassByteVariant
117
+
118
+ export type ClassUnicodeVariant = {
119
+ '@type': 'struct'
120
+ '@name': 'regex_syntax::hir::Class'
121
+ '@variant': 'Unicode'
122
+ 'value': ClassUnicode
123
+ }
124
+
125
+ export type ClassByteVariant = {
126
+ '@type': 'struct'
127
+ '@name': 'regex_syntax::hir::Class'
128
+ '@variant': 'Bytes'
129
+ 'value': ClassBytes
130
+ }
131
+
132
+
133
+
134
+ export type ClassUnicode = {
135
+ '@type': 'struct'
136
+ '@name': 'regex_syntax::hir::ClassUnicode'
137
+ 'ranges': ClassUnicodeRange[]
138
+ }
139
+
140
+
141
+
142
+ export type ClassUnicodeRange = {
143
+ '@type': 'struct'
144
+ '@name': 'regex_syntax::hir::ClassUnicodeRange'
145
+ start: string
146
+ end: string
147
+ }
148
+
149
+
150
+
151
+ export type ClassBytes = {
152
+ '@type': 'struct'
153
+ '@name': 'regex_syntax::hir::ClassBytes'
154
+ ranges: ClassBytesRange[]
155
+ }
156
+
157
+
158
+
159
+ export type ClassBytesRange = {
160
+ '@type': 'struct'
161
+ '@name': 'regex_syntax::hir::ClassBytesRange'
162
+ start: number
163
+ end: number
164
+ }
165
+
166
+
167
+
168
+ export type Anchor =
169
+ | AnchorStartLineVariant
170
+ | AnchorEndLineVariant
171
+ | AnchorStartTextVariant
172
+ | AnchorEndTextVariant
173
+
174
+ export type AnchorStartLineVariant = {
175
+ '@type': 'struct'
176
+ '@name': 'regex_syntax::hir::Anchor'
177
+ '@variant': 'StartLine'
178
+ }
179
+
180
+ export type AnchorEndLineVariant = {
181
+ '@type': 'struct'
182
+ '@name': 'regex_syntax::hir::Anchor'
183
+ '@variant': 'EndLine'
184
+ }
185
+
186
+ export type AnchorStartTextVariant = {
187
+ '@type': 'struct'
188
+ '@name': 'regex_syntax::hir::Anchor'
189
+ '@variant': 'StartText'
190
+ }
191
+
192
+ export type AnchorEndTextVariant = {
193
+ '@type': 'struct'
194
+ '@name': 'regex_syntax::hir::Anchor'
195
+ '@variant': 'EndText'
196
+ }
197
+
198
+
199
+
200
+ export type WordBoundary =
201
+ | WordBoundaryAsciiVariant
202
+ | WordBoundaryAsciiNegateVariant
203
+ | WordBoundaryUnicodeVariant
204
+ | WordBoundaryUnicodeNegateVariant
205
+
206
+ export type WordBoundaryAsciiVariant = {
207
+ '@type': 'struct'
208
+ '@name': 'regex_syntax::hir::WordBoundary'
209
+ '@variant': 'Ascii'
210
+ }
211
+
212
+ export type WordBoundaryAsciiNegateVariant = {
213
+ '@type': 'struct'
214
+ '@name': 'regex_syntax::hir::WordBoundary'
215
+ '@variant': 'AsciiNegate'
216
+ }
217
+
218
+ export type WordBoundaryUnicodeVariant = {
219
+ '@type': 'struct'
220
+ '@name': 'regex_syntax::hir::WordBoundary'
221
+ '@variant': 'Unicode'
222
+ }
223
+
224
+ export type WordBoundaryUnicodeNegateVariant = {
225
+ '@type': 'struct'
226
+ '@name': 'regex_syntax::hir::WordBoundary'
227
+ '@variant': 'UnicodeNegate'
228
+ }
229
+
230
+
231
+
232
+ export type Repetition = {
233
+ '@type': 'struct'
234
+ '@name': 'regex_syntax::hir::Repetition'
235
+ greedy: boolean
236
+ kind: RepetitionKind
237
+ hir: Hir
238
+ }
239
+
240
+
241
+
242
+ export type RepetitionKind =
243
+ | RepetitionKindZeroOrOneVariant
244
+ | RepetitionKindZeroOrMoreVariant
245
+ | RepetitionKindOneOrMoreVariant
246
+ | RepetitionKindRangeVariant
247
+
248
+ export type RepetitionKindZeroOrOneVariant = {
249
+ '@type': 'struct'
250
+ '@name': 'regex_syntax::hir::Repetition'
251
+ '@variant': 'ZeroOrOne'
252
+ }
253
+
254
+ export type RepetitionKindZeroOrMoreVariant = {
255
+ '@type': 'struct'
256
+ '@name': 'regex_syntax::hir::Repetition'
257
+ '@variant': 'ZeroOrMore'
258
+ }
259
+
260
+ export type RepetitionKindOneOrMoreVariant = {
261
+ '@type': 'struct'
262
+ '@name': 'regex_syntax::hir::Repetition'
263
+ '@variant': 'OneOrMore'
264
+ }
265
+
266
+ export type RepetitionKindRangeVariant = {
267
+ '@type': 'struct'
268
+ '@name': 'regex_syntax::hir::Repetition'
269
+ '@variant': 'Range'
270
+ value: RepetitionRange
271
+ }
272
+
273
+
274
+
275
+ export type RepetitionRange =
276
+ | RepetitionRangeExactlyVariant
277
+ | RepetitionRangeAtLeastVariant
278
+ | RepetitionRangeBoundedVariant
279
+
280
+ export type RepetitionRangeExactlyVariant = {
281
+ '@type': 'struct'
282
+ '@name': 'regex_syntax::hir::RepetitionRange'
283
+ '@variant': 'Exactly'
284
+ value: number
285
+ }
286
+
287
+ export type RepetitionRangeAtLeastVariant = {
288
+ '@type': 'struct'
289
+ '@name': 'regex_syntax::hir::RepetitionRange'
290
+ '@variant': 'AtLeast'
291
+ value: number
292
+ }
293
+
294
+ export type RepetitionRangeBoundedVariant = {
295
+ '@type': 'struct'
296
+ '@name': 'regex_syntax::hir::RepetitionRange'
297
+ '@variant': 'Bounded'
298
+ value: [number, number]
299
+ }
300
+
301
+
302
+
303
+ export type Group = {
304
+ '@type': 'struct'
305
+ '@name': 'regex_syntax::hir::Group'
306
+ kind: GroupKind
307
+ hir: Hir
308
+ }
309
+
310
+
311
+
312
+ export type GroupKind =
313
+ | GroupKindCaptureIndexVariant
314
+ | GroupKindCaptureNameVariant
315
+ | GroupKindNonCapturingVariant
316
+
317
+ export type GroupKindCaptureIndexVariant = {
318
+ '@type': 'struct'
319
+ '@name': 'regex_syntax::hir::GroupKind'
320
+ '@variant': 'CaptureIndex'
321
+ index: number
322
+ }
323
+
324
+ export type GroupKindCaptureNameVariant = {
325
+ '@type': 'struct'
326
+ '@name': 'regex_syntax::hir::GroupKind'
327
+ '@variant': 'CaptureName'
328
+ index: number
329
+ name: string
330
+ }
331
+
332
+ export type GroupKindNonCapturingVariant = {
333
+ '@type': 'struct'
334
+ '@name': 'regex_syntax::hir::GroupKind'
335
+ '@variant': 'NonCapturing'
336
+ }
337
+
338
+
339
+
340
+ export type Match = {
341
+ start: number
342
+ end: number
343
+ value: string
344
+ }
345
+
346
+
7
347
  /**
348
+ * A compiled regular expression for matching Unicode strings.
349
+ * @see https://docs.rs/regex/latest/regex/
8
350
  */
9
- export class RRegExp {
351
+ export class RRegex {
10
352
  free(): void;
11
353
  /**
354
+ * Compiles a regular expression. Once compiled, it can be used repeatedly to search, split or replace text in a string.
355
+ * If an invalid expression is given, then an error is returned.
12
356
  * @param {string} re
13
357
  */
14
358
  constructor(re: string);
15
359
  /**
360
+ * Returns true if and only if there is a match for the regex in the string given.
361
+ * It is recommended to use this method if all you need to do is test a match, since the underlying matching engine may be able to do less work.
362
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.is_match
16
363
  * @param {string} text
17
364
  * @returns {boolean}
18
365
  */
19
- is_match(text: string): boolean;
366
+ isMatch(text: string): boolean;
20
367
  /**
368
+ * Returns the same as is_match, but starts the search at the given offset.
369
+ * The significance of the starting point is that it takes the surrounding context into consideration. For example, the `\A` anchor can only match when `start == 0`.
370
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.is_match_at
21
371
  * @param {string} text
22
372
  * @param {number} start
23
373
  * @returns {boolean}
24
374
  */
25
- is_match_at(text: string, start: number): boolean;
375
+ isMatchAt(text: string, start: number): boolean;
26
376
  /**
377
+ * Returns the start and end byte range of the leftmost-first match in `text`. If no match exists, then `undefined` is returned.
378
+ * Note that this should only be used if you want to discover the position of the match. Testing the existence of a match is faster if you use `is_match`.
379
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.find
27
380
  * @param {string} text
28
381
  * @returns {any}
29
382
  */
30
- find(text: string): any;
383
+ find(text: string): Match | undefined;
31
384
  /**
385
+ * Returns the same as find, but starts the search at the given offset.
386
+ * The significance of the starting point is that it takes the surrounding context into consideration. For example, the \A anchor can only match when `start == 0`.
387
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.find_at
32
388
  * @param {string} text
33
389
  * @param {number} start
34
390
  * @returns {any}
35
391
  */
36
- find_at(text: string, start: number): any;
392
+ findAt(text: string, start: number): Match | undefined;
37
393
  /**
394
+ * Returns an array for each successive non-overlapping match in text, returning the start and end byte indices with respect to text.
395
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.find_iter
38
396
  * @param {string} text
39
397
  * @returns {any}
40
398
  */
41
- find_all(text: string): any;
399
+ findAll(text: string): Match[];
42
400
  /**
401
+ * Replaces the leftmost-first match with the replacement provided.
402
+ * The replacement can be a regular string (where `$N` and `$name` are expanded to match capture groups) or a function that takes the matches’ `Captures` and returns the replaced string.
403
+ * If no match is found, then a copy of the string is returned unchanged.
404
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace
43
405
  * @param {string} text
44
406
  * @param {string} rep
45
407
  * @returns {string}
46
408
  */
47
409
  replace(text: string, rep: string): string;
48
410
  /**
411
+ * Replaces at most `limit` non-overlapping matches in `text` with the replacement provided. If `limit` is 0, then all non-overlapping matches are replaced.
412
+ * See the documentation for `replace` for details on how to access capturing group matches in the replacement string.
413
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.replacen
49
414
  * @param {string} text
50
415
  * @param {number} limit
51
416
  * @param {string} rep
@@ -53,46 +418,114 @@ export class RRegExp {
53
418
  */
54
419
  replacen(text: string, limit: number, rep: string): string;
55
420
  /**
421
+ * Replaces all non-overlapping matches in `text` with the replacement provided. This is the same as calling `replacen` with `limit` set to `0`.
422
+ * See the documentation for `replace` for details on how to access capturing group matches in the replacement string.
423
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace_all
56
424
  * @param {string} text
57
425
  * @param {string} rep
58
426
  * @returns {string}
59
427
  */
60
- replace_all(text: string, rep: string): string;
428
+ replaceAll(text: string, rep: string): string;
61
429
  /**
430
+ * Returns an iterator of substrings of `text` delimited by a match of the regular expression. Namely, each element of the iterator corresponds to text that isn’t matched by the regular expression.
431
+ * This method will not copy the text given.
432
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.split
62
433
  * @param {string} text
63
434
  * @returns {any}
64
435
  */
65
- split(text: string): any;
436
+ split(text: string): string[];
437
+ /**
438
+ * Returns an iterator of at most `limit` substrings of `text` delimited by a match of the regular expression. (A limit of 0 will return no substrings.) Namely, each element of the iterator corresponds to text that isn’t matched by the regular expression. The remainder of the string that is not split will be the last element in the iterator.
439
+ * This method will not copy the text given.
440
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.splitn
441
+ * @param {string} text
442
+ * @param {number} limit
443
+ * @returns {any}
444
+ */
445
+ splitn(text: string, limit: number): string[];
446
+ /**
447
+ * Returns the end location of a match in the text given.
448
+ * This method may have the same performance characteristics as `is_match`, except it provides an end location for a match. In particular, the location returned may be shorter than the proper end of the leftmost-first match.
449
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.shortest_match
450
+ * @param {string} text
451
+ * @returns {number | undefined}
452
+ */
453
+ shortestMatch(text: string): number | undefined;
66
454
  /**
455
+ * Returns the same as shortest_match, but starts the search at the given offset.
456
+ * The significance of the starting point is that it takes the surrounding context into consideration. For example, the \A anchor can only match when `start == 0`.
457
+ * @see https://docs.rs/regex/latest/regex/struct.Regex.html#method.shortest_match_at
67
458
  * @param {string} text
68
459
  * @param {number} limit
460
+ * @returns {number | undefined}
461
+ */
462
+ shortestMatchAt(text: string, limit: number): number | undefined;
463
+ /**
464
+ * Return the Regex syntax object
69
465
  * @returns {any}
70
466
  */
71
- splitn(text: string, limit: number): any;
467
+ syntax(): Hir;
468
+ /**
469
+ * Returns a string representing the regular expression
470
+ * @returns {string}
471
+ */
472
+ toString(): string;
473
+ }
474
+ /**
475
+ * Match multiple (possibly overlapping) regular expressions in a single scan.
476
+ * A regex set corresponds to the union of two or more regular expressions. That is, a regex set will match text where at least one of its constituent regular expressions matches. A regex set as its formulated here provides a touch more power: it will also report which regular expressions in the set match. Indeed, this is the key difference between regex sets and a single `Regex` with many alternates, since only one alternate can match at a time.
477
+ * @see https://docs.rs/regex/latest/regex/struct.RegexSet.html#method.empty
478
+ */
479
+ export class RRegexSet {
480
+ free(): void;
481
+ /**
482
+ * Create a new regex set with the given regular expressions.
483
+ * @param {Array<any>} list
484
+ */
485
+ constructor(list: Array<any>);
72
486
  /**
487
+ * Returns true if and only if one of the regexes in this set matches the text given.
488
+ * This method should be preferred if you only need to test whether any of the regexes in the set should match, but don’t care about which regexes matched. This is because the underlying matching engine will quit immediately after seeing the first match instead of continuing to find all matches.
489
+ * @see https://docs.rs/regex/latest/regex/struct.RegexSet.html#method.is_match
490
+ * @param {string} text
491
+ * @returns {boolean}
492
+ */
493
+ isMatch(text: string): boolean;
494
+ /**
495
+ * Returns the set of regular expressions that match in the given text.
496
+ * The set returned contains the index of each regular expression that matches in the given text. The index is in correspondence with the order of regular expressions given to RegexSet’s constructor.
497
+ * the set can also be used to iterate over the matched indices.
498
+ * @param {string} text
73
499
  * @returns {any}
74
500
  */
75
- syntax(): any;
501
+ matches(text: string): any;
76
502
  }
77
503
 
78
504
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
79
505
 
80
506
  export interface InitOutput {
81
507
  readonly memory: WebAssembly.Memory;
82
- readonly __wbg_rregexp_free: (a: number) => void;
83
- readonly rregexp_new: (a: number, b: number) => number;
84
- readonly rregexp_is_match: (a: number, b: number, c: number) => number;
85
- readonly rregexp_is_match_at: (a: number, b: number, c: number, d: number) => number;
86
- readonly rregexp_find: (a: number, b: number, c: number) => number;
87
- readonly rregexp_find_at: (a: number, b: number, c: number, d: number) => number;
88
- readonly rregexp_find_all: (a: number, b: number, c: number) => number;
89
- readonly rregexp_replace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
90
- readonly rregexp_replacen: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
91
- readonly rregexp_replace_all: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
92
- readonly rregexp_split: (a: number, b: number, c: number) => number;
93
- readonly rregexp_splitn: (a: number, b: number, c: number, d: number) => number;
94
- readonly rregexp_syntax: (a: number) => number;
95
- readonly get_metadata: () => number;
508
+ readonly __wbg_rregex_free: (a: number) => void;
509
+ readonly rregex_new: (a: number, b: number) => number;
510
+ readonly rregex_isMatch: (a: number, b: number, c: number) => number;
511
+ readonly rregex_isMatchAt: (a: number, b: number, c: number, d: number) => number;
512
+ readonly rregex_find: (a: number, b: number, c: number) => number;
513
+ readonly rregex_findAt: (a: number, b: number, c: number, d: number) => number;
514
+ readonly rregex_findAll: (a: number, b: number, c: number) => number;
515
+ readonly rregex_replace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
516
+ readonly rregex_replacen: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
517
+ readonly rregex_replaceAll: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
518
+ readonly rregex_split: (a: number, b: number, c: number) => number;
519
+ readonly rregex_splitn: (a: number, b: number, c: number, d: number) => number;
520
+ readonly rregex_shortestMatch: (a: number, b: number, c: number, d: number) => void;
521
+ readonly rregex_shortestMatchAt: (a: number, b: number, c: number, d: number, e: number) => void;
522
+ readonly rregex_syntax: (a: number) => number;
523
+ readonly rregex_toString: (a: number, b: number) => void;
524
+ readonly __wbg_rregexset_free: (a: number) => void;
525
+ readonly rregexset_new: (a: number) => number;
526
+ readonly rregexset_isMatch: (a: number, b: number, c: number) => number;
527
+ readonly rregexset_matches: (a: number, b: number, c: number) => number;
528
+ readonly escape: (a: number, b: number, c: number) => void;
96
529
  readonly __wbindgen_malloc: (a: number) => number;
97
530
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
98
531
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
@@ -109,3 +542,15 @@ export interface InitOutput {
109
542
  * @returns {Promise<InitOutput>}
110
543
  */
111
544
  export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
545
+
546
+ export const metadata: {
547
+ "name": "rregex",
548
+ "description": "Rust Regex binding for Javascript",
549
+ "authors": [
550
+ "Fede Ramirez <i@2fd.me>"
551
+ ],
552
+ "homepage": "https://2fd.github.io/rregex",
553
+ "repository": "https://github.com/2fd/rregex",
554
+ "regex": "1.0.6",
555
+ "regex-syntax": "0.6.25"
556
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rregex",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
4
4
  "description": "Rust Regex binding for Javascript",
5
5
  "private": false,
6
6
  "main": "./lib/commonjs.js",
@@ -8,18 +8,41 @@
8
8
  "module": "./lib/module.js",
9
9
  "types": "./lib/types.d.ts",
10
10
  "devDependencies": {
11
- "semantic-release": "^18.0.1"
11
+ "@babel/plugin-proposal-class-properties": "^7.16.0",
12
+ "@babel/preset-env": "^7.16.4",
13
+ "@babel/preset-typescript": "^7.16.0",
14
+ "@types/jest": "^27.0.3",
15
+ "@types/node": "^16.11.11",
16
+ "babel-jest": "^27.4.2",
17
+ "jest": "^27.4.3",
18
+ "semantic-release": "^18.0.1",
19
+ "toml": "^3.0.0",
20
+ "typescript": "^4.5.2"
12
21
  },
13
22
  "scripts": {
14
23
  "setup": "./bin/install.sh",
15
24
  "build": "./bin/build.sh",
16
- "test": "wasm-pack test",
25
+ "test": "wasm-pack test --node && jest --passWithNoTests",
26
+ "test:rs": "wasm-pack test",
27
+ "test:ts": "jest",
17
28
  "semantic-release": "semantic-release"
18
29
  },
19
30
  "release": {
20
31
  "ci": false,
21
32
  "branches": [
22
- "master"
33
+ {
34
+ "name": "1.0.x",
35
+ "range": "1.0.x",
36
+ "channel": "1.0.x"
37
+ },
38
+ {
39
+ "name": "1.1.x",
40
+ "range": "1.1.x",
41
+ "channel": "1.1.x"
42
+ },
43
+ {
44
+ "name": "master"
45
+ }
23
46
  ]
24
47
  },
25
48
  "repository": {