@rsvelte/vite-plugin-svelte-native 0.2.0 → 0.2.2

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/index.cjs CHANGED
@@ -3,6 +3,7 @@
3
3
  // dependency that ships a single `rsvelte.node` artifact.
4
4
 
5
5
  const { decodeEnvelope, decodeBatch } = require('./envelope.js');
6
+ const { decodeParseEnvelope } = require('./parse-envelope.js');
6
7
 
7
8
  const { platform, arch } = process;
8
9
 
@@ -127,6 +128,13 @@ module.exports.preprocess = binding.preprocess;
127
128
  module.exports.svelte2tsx = binding.svelte2tsx;
128
129
  module.exports.hmrDiff = binding.hmrDiff;
129
130
  module.exports.resolveId = binding.resolveId;
131
+ // Standalone parse surfaces. `parse` returns a JSON string (decode with
132
+ // `JSON.parse`); `parseEnvelope` returns the raw-transfer Buffer that skips
133
+ // `JSON.parse` entirely — decode it with `decodeParseEnvelope` (re-exported
134
+ // below). Both mirror `src/napi.rs`'s `#[napi(js_name = "parse"/"parseEnvelope")]`.
135
+ module.exports.parse = binding.parse;
136
+ module.exports.parseEnvelope = binding.parseEnvelope;
137
+ module.exports.decodeParseEnvelope = decodeParseEnvelope;
130
138
  // Upstream Svelte version this binding emits code for — used by
131
139
  // downstream consumers (the `@rsvelte/vite-plugin-svelte` fork, etc.)
132
140
  // for `gte(VERSION, '5.36.0')`-style feature detection. Synced
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@rsvelte/vite-plugin-svelte-native",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "NAPI bindings to the rsvelte compiler — used by the @rsvelte vite-plugin-svelte shim",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/baseballyama/rsvelte.git",
9
- "directory": "npm/vite-plugin-svelte-native"
9
+ "directory": "apps/apps/npm/vite-plugin-svelte-native"
10
10
  },
11
- "homepage": "https://github.com/baseballyama/rsvelte/tree/main/npm/vite-plugin-svelte-native#readme",
11
+ "homepage": "https://github.com/baseballyama/rsvelte/tree/main/apps/npm/vite-plugin-svelte-native#readme",
12
12
  "bugs": {
13
13
  "url": "https://github.com/baseballyama/rsvelte/issues"
14
14
  },
@@ -23,15 +23,16 @@
23
23
  "types": "./index.d.ts",
24
24
  "files": [
25
25
  "envelope.js",
26
+ "parse-envelope.js",
26
27
  "index.cjs",
27
28
  "index.d.ts"
28
29
  ],
29
30
  "optionalDependencies": {
30
- "@rsvelte/vite-plugin-svelte-native-darwin-arm64": "^0.2.0",
31
- "@rsvelte/vite-plugin-svelte-native-darwin-x64": "^0.2.0",
32
- "@rsvelte/vite-plugin-svelte-native-linux-arm64-gnu": "^0.2.0",
33
- "@rsvelte/vite-plugin-svelte-native-linux-x64-gnu": "^0.2.0",
34
- "@rsvelte/vite-plugin-svelte-native-win32-x64-msvc": "^0.2.0"
31
+ "@rsvelte/vite-plugin-svelte-native-darwin-arm64": "^0.2.2",
32
+ "@rsvelte/vite-plugin-svelte-native-darwin-x64": "^0.2.2",
33
+ "@rsvelte/vite-plugin-svelte-native-linux-arm64-gnu": "^0.2.2",
34
+ "@rsvelte/vite-plugin-svelte-native-linux-x64-gnu": "^0.2.2",
35
+ "@rsvelte/vite-plugin-svelte-native-win32-x64-msvc": "^0.2.2"
35
36
  },
36
37
  "publishConfig": {
37
38
  "access": "public"