@rsvelte/vite-plugin-svelte-native 0.3.11 → 0.3.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsvelte/vite-plugin-svelte-native",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "NAPI bindings to the rsvelte compiler — used by the @rsvelte vite-plugin-svelte shim",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,11 +30,11 @@
30
30
  "index.d.ts"
31
31
  ],
32
32
  "optionalDependencies": {
33
- "@rsvelte/vite-plugin-svelte-native-darwin-arm64": "^0.3.11",
34
- "@rsvelte/vite-plugin-svelte-native-darwin-x64": "^0.3.11",
35
- "@rsvelte/vite-plugin-svelte-native-linux-arm64-gnu": "^0.3.11",
36
- "@rsvelte/vite-plugin-svelte-native-linux-x64-gnu": "^0.3.11",
37
- "@rsvelte/vite-plugin-svelte-native-win32-x64-msvc": "^0.3.11"
33
+ "@rsvelte/vite-plugin-svelte-native-darwin-arm64": "^0.3.12",
34
+ "@rsvelte/vite-plugin-svelte-native-darwin-x64": "^0.3.12",
35
+ "@rsvelte/vite-plugin-svelte-native-linux-arm64-gnu": "^0.3.12",
36
+ "@rsvelte/vite-plugin-svelte-native-linux-x64-gnu": "^0.3.12",
37
+ "@rsvelte/vite-plugin-svelte-native-win32-x64-msvc": "^0.3.12"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
package/parse-envelope.js CHANGED
@@ -19,7 +19,7 @@ const MAGIC = 0x3156_5052; // "RPV1" little-endian
19
19
  // reorder, `typeParameters` on function-like nodes, Identifier `optional`);
20
20
  // v4 adds the object-method `typeParameters`-after-`body` flag byte.
21
21
  // Keep in lockstep with `napi_raw_parse.rs`'s `VERSION`.
22
- const VERSION = 10;
22
+ const VERSION = 11;
23
23
  const HEADER_LEN = 24;
24
24
 
25
25
  // Tags — must mirror napi_raw_parse.rs.
@@ -1126,6 +1126,8 @@ function readJsRestElement(ctx, start, end) {
1126
1126
  const node = { type: 'RestElement', start, end };
1127
1127
  if (loc !== null) node.loc = loc;
1128
1128
  node.argument = argument;
1129
+ const typeAnnotation = readOptTypeAnnotation(ctx);
1130
+ if (typeAnnotation !== null) node.typeAnnotation = typeAnnotation;
1129
1131
  return node;
1130
1132
  }
1131
1133