rregex 1.10.7 → 1.10.9

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/README.md CHANGED
@@ -47,15 +47,15 @@ Rust has a powerful Regex library with a lot of features that don't exists en th
47
47
 
48
48
  This package includes builds for multiple runtimes
49
49
 
50
- | Runtime | Import |
51
- | ------------------ | ---------------------------------------------------- |
52
- | Node.js (esm) | `import { RRegex, RRegexSet } from 'rregex'` |
53
- | Node.js (commonjs) | `const { RRegex, RRegexSet } = require('rregex')` |
54
- | Deno | `import { RRegex, RRegexSet } from '@rregex/rregex'` |
55
- | Bun | `import { RRegex, RRegexSet } from '@rregex/rregex'` |
56
- | Cloudflare Workers | TODO |
57
- | Browser | TODO |
58
- | Standalone | TODO |
50
+ | Runtime | Import | version |
51
+ | ------------------ | ------------------------------------------------------- | ---------- |
52
+ | Node.js (esm) | `import { RRegex, RRegexSet } from 'rregex'` | `*` |
53
+ | Node.js (commonjs) | `const { RRegex, RRegexSet } = require('rregex')` | `*` |
54
+ | Deno | `import { RRegex, RRegexSet } from '@rregex/rregex'` | `>=1.10.8` |
55
+ | Bun | `import { RRegex, RRegexSet } from '@rregex/rregex'` | `>=1.10.8` |
56
+ | Cloudflare Workers | `import { RRegex, RRegexSet } from 'rregex/lib/cf.mjs'` | `>=1.10.8` |
57
+ | Browser | TODO | |
58
+ | Standalone | TODO | |
59
59
 
60
60
  ## Known Issues
61
61
 
@@ -1249,3 +1249,73 @@ export class RRegexSet {
1249
1249
  */
1250
1250
  matches(text: string): number[];
1251
1251
  }
1252
+
1253
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
1254
+
1255
+ export interface InitOutput {
1256
+ readonly memory: WebAssembly.Memory;
1257
+ readonly __wbg_rregex_free: (a: number) => void;
1258
+ readonly rregex_new: (a: number, b: number, c: number) => void;
1259
+ readonly rregex_isMatch: (a: number, b: number, c: number) => number;
1260
+ readonly rregex_isMatchAt: (a: number, b: number, c: number, d: number) => number;
1261
+ readonly rregex_find: (a: number, b: number, c: number, d: number) => void;
1262
+ readonly rregex_findAt: (a: number, b: number, c: number, d: number, e: number) => void;
1263
+ readonly rregex_findAll: (a: number, b: number, c: number, d: number) => void;
1264
+ readonly rregex_captureNames: (a: number, b: number) => void;
1265
+ readonly rregex_captures: (a: number, b: number, c: number, d: number) => void;
1266
+ readonly rregex_capturesAll: (a: number, b: number, c: number, d: number) => void;
1267
+ readonly rregex_capturesLength: (a: number) => number;
1268
+ readonly rregex_replace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1269
+ readonly rregex_replacen: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1270
+ readonly rregex_replaceAll: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1271
+ readonly rregex_split: (a: number, b: number, c: number, d: number) => void;
1272
+ readonly rregex_splitn: (a: number, b: number, c: number, d: number, e: number) => void;
1273
+ readonly rregex_shortestMatch: (a: number, b: number, c: number, d: number) => void;
1274
+ readonly rregex_shortestMatchAt: (a: number, b: number, c: number, d: number, e: number) => void;
1275
+ readonly rregex_syntax: (a: number, b: number) => void;
1276
+ readonly rregex_toString: (a: number, b: number) => void;
1277
+ readonly __wbg_rregexset_free: (a: number) => void;
1278
+ readonly rregexset_new: (a: number, b: number) => void;
1279
+ readonly rregexset_isMatch: (a: number, b: number, c: number) => number;
1280
+ readonly rregexset_matches: (a: number, b: number, c: number, d: number) => void;
1281
+ readonly escape: (a: number, b: number, c: number) => void;
1282
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
1283
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
1284
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1285
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
1286
+ readonly __wbindgen_exn_store: (a: number) => void;
1287
+ }
1288
+
1289
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
1290
+ /**
1291
+ * Instantiates the given `module`, which can either be bytes or
1292
+ * a precompiled `WebAssembly.Module`.
1293
+ *
1294
+ * @param {SyncInitInput} module
1295
+ *
1296
+ * @returns {InitOutput}
1297
+ */
1298
+ export function initSync(module: SyncInitInput): InitOutput;
1299
+
1300
+ /**
1301
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1302
+ * for everything else, calls `WebAssembly.instantiate` directly.
1303
+ *
1304
+ * @param {InitInput | Promise<InitInput>} module_or_path
1305
+ *
1306
+ * @returns {Promise<InitOutput>}
1307
+ */
1308
+ export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
1309
+
1310
+ /** Build metadata */
1311
+ export const metadata: {
1312
+ "name": "rregex",
1313
+ "description": "Rust Regex binding for Javascript",
1314
+ "authors": [
1315
+ "Fede Ramirez <i@2fd.me>"
1316
+ ],
1317
+ "homepage": "http://rregex.dev",
1318
+ "repository": "https://github.com/2fd/rregex",
1319
+ "regex": "1.10.4",
1320
+ "regex-syntax": "0.8.3"
1321
+ }
@@ -1,7 +1,10 @@
1
- import * as wasm from "./rregex.wasm";
2
- import { __wbg_set_wasm } from "./bundler_bg.mjs";
3
- __wbg_set_wasm(wasm);
4
- export * from "./bundler_bg.mjs";
1
+
2
+ import wasm from "./rregex.wasm";
3
+ import { initSync } from "./web.js";
4
+ export * from "./web.js";
5
+
6
+ initSync(wasm);
7
+
5
8
 
6
9
  export const metadata = {
7
10
  "name": "rregex",
package/lib/commonjs.d.ts CHANGED
@@ -1249,3 +1249,15 @@ export class RRegexSet {
1249
1249
  */
1250
1250
  matches(text: string): number[];
1251
1251
  }
1252
+
1253
+ /** Build metadata */export const metadata: {
1254
+ "name": "rregex",
1255
+ "description": "Rust Regex binding for Javascript",
1256
+ "authors": [
1257
+ "Fede Ramirez <i@2fd.me>"
1258
+ ],
1259
+ "homepage": "http://rregex.dev",
1260
+ "repository": "https://github.com/2fd/rregex",
1261
+ "regex": "1.10.4",
1262
+ "regex-syntax": "0.8.3"
1263
+ }
package/lib/rregex.wasm CHANGED
Binary file
@@ -1298,3 +1298,15 @@ declare interface InitOutput {
1298
1298
  * @returns {Promise<InitOutput>}
1299
1299
  */
1300
1300
  declare function wasm_bindgen (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
1301
+
1302
+ /** Build metadata */export const metadata: {
1303
+ "name": "rregex",
1304
+ "description": "Rust Regex binding for Javascript",
1305
+ "authors": [
1306
+ "Fede Ramirez <i@2fd.me>"
1307
+ ],
1308
+ "homepage": "http://rregex.dev",
1309
+ "repository": "https://github.com/2fd/rregex",
1310
+ "regex": "1.10.4",
1311
+ "regex-syntax": "0.8.3"
1312
+ }
package/lib/types.d.ts CHANGED
@@ -1307,6 +1307,7 @@ export function initSync(module: SyncInitInput): InitOutput;
1307
1307
  */
1308
1308
  export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
1309
1309
 
1310
+ /** Build metadata */
1310
1311
  export const metadata: {
1311
1312
  "name": "rregex",
1312
1313
  "description": "Rust Regex binding for Javascript",