@rollup/wasm-node 4.0.0-21 → 4.0.0-23

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/dist/bin/rollup CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v4.0.0-21
6
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
5
+ Rollup.js v4.0.0-23
6
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
7
7
 
8
8
  https://github.com/rollup/rollup
9
9
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -16,7 +16,7 @@ import native from '../../native.js';
16
16
  import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
17
17
  import * as tty from 'tty';
18
18
 
19
- var version = "4.0.0-21";
19
+ var version = "4.0.0-23";
20
20
 
21
21
  const comma = ','.charCodeAt(0);
22
22
  const semicolon = ';'.charCodeAt(0);
@@ -20544,8 +20544,8 @@ class Graph {
20544
20544
  timeEnd('mark included statements', 2);
20545
20545
  this.phase = BuildPhase.GENERATE;
20546
20546
  }
20547
- contextParse(code) {
20548
- const astBuffer = native.parse(code);
20547
+ contextParse(code, { allowReturnOutsideFunction = false } = {}) {
20548
+ const astBuffer = native.parse(code, allowReturnOutsideFunction);
20549
20549
  const readString = getReadStringFunction(astBuffer);
20550
20550
  return convertProgram(astBuffer.buffer, readString);
20551
20551
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/rollup.d.ts CHANGED
@@ -215,7 +215,7 @@ export interface PluginContext extends MinimalPluginContext {
215
215
  load: (
216
216
  options: { id: string; resolveDependencies?: boolean } & Partial<PartialNull<ModuleOptions>>
217
217
  ) => Promise<ModuleInfo>;
218
- parse: (input: string) => AstNode;
218
+ parse: (input: string, options?: { allowReturnOutsideFunction?: boolean }) => AstNode;
219
219
  resolve: (
220
220
  source: string,
221
221
  importer?: string,
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
31
31
 
32
32
  const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
33
33
 
34
- var version = "4.0.0-21";
34
+ var version = "4.0.0-23";
35
35
 
36
36
  function ensureArray$1(items) {
37
37
  if (Array.isArray(items)) {
@@ -21026,8 +21026,8 @@ class Graph {
21026
21026
  timeEnd('mark included statements', 2);
21027
21027
  this.phase = BuildPhase.GENERATE;
21028
21028
  }
21029
- contextParse(code) {
21030
- const astBuffer = native.parse(code);
21029
+ contextParse(code, { allowReturnOutsideFunction = false } = {}) {
21030
+ const astBuffer = native.parse(code, allowReturnOutsideFunction);
21031
21031
  const readString = getReadStringFunction(astBuffer);
21032
21032
  return convertProgram(astBuffer.buffer, readString);
21033
21033
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.0.0-21
4
- Sun, 24 Sep 2023 17:21:35 GMT - commit fa868ad975b9ae6007ddc64b1a9e82766de6fa9e
3
+ Rollup.js v4.0.0-23
4
+ Tue, 26 Sep 2023 20:13:39 GMT - commit f1d93caae901c556ffb1e2f553428754038d65c1
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -198,14 +198,15 @@ function getArrayU8FromWasm0(ptr, len) {
198
198
  }
199
199
  /**
200
200
  * @param {string} code
201
+ * @param {boolean} allow_return_outside_function
201
202
  * @returns {Uint8Array}
202
203
  */
203
- module.exports.parse = function(code) {
204
+ module.exports.parse = function(code, allow_return_outside_function) {
204
205
  try {
205
206
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
206
207
  const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
207
208
  const len0 = WASM_VECTOR_LEN;
208
- wasm.parse(retptr, ptr0, len0);
209
+ wasm.parse(retptr, ptr0, len0, allow_return_outside_function);
209
210
  var r0 = getInt32Memory0()[retptr / 4 + 0];
210
211
  var r1 = getInt32Memory0()[retptr / 4 + 1];
211
212
  var v2 = getArrayU8FromWasm0(r0, r1).slice();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollup/wasm-node",
3
- "version": "4.0.0-21",
3
+ "version": "4.0.0-23",
4
4
  "description": "Next-generation ES module bundler with Node wasm",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",