@mirascript/bindings 0.1.91 → 0.1.92
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 +3 -3
- package/tests/index.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirascript/bindings",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.92",
|
|
4
4
|
"author": "CloudPSS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "MiraScript compiler bindings",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@mirascript/napi": "~0.1.
|
|
36
|
-
"@mirascript/wasm": "~0.1.
|
|
35
|
+
"@mirascript/napi": "~0.1.92",
|
|
36
|
+
"@mirascript/wasm": "~0.1.92"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"ava": "^8.0.1",
|
package/tests/index.ts
CHANGED
|
@@ -42,3 +42,10 @@ test('WASM range formatting preserves template literal content', async (t) => {
|
|
|
42
42
|
t.deepEqual(result.edits, []);
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
+
|
|
46
|
+
test('WASM document formatting trims a single content line', async (t) => {
|
|
47
|
+
const module = await wasm.loadModule();
|
|
48
|
+
const source = ' \n \n[1,2]\n \n';
|
|
49
|
+
const result = module.formatSync(source, { input_mode: 'Script', trivia: true });
|
|
50
|
+
t.deepEqual(result.edits, [{ start: 0, end: source.length, text: '[1, 2]' }]);
|
|
51
|
+
});
|