@mirascript/cli 0.1.91 → 0.1.93-alpha.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/package.json +5 -5
- package/tests/format.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirascript/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.93-alpha.2",
|
|
4
4
|
"author": "CloudPSS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Cli for MiraScript, an expression based scripting language.",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@commander-js/extra-typings": "^15.0.0",
|
|
38
|
-
"@mirascript/bindings": "~0.1.
|
|
39
|
-
"@mirascript/
|
|
40
|
-
"@mirascript/
|
|
38
|
+
"@mirascript/bindings": "~0.1.93-alpha.2",
|
|
39
|
+
"@mirascript/help": "~0.1.93-alpha.2",
|
|
40
|
+
"@mirascript/mirascript": "~0.1.93-alpha.2",
|
|
41
41
|
"ansi-styles": "^7.0.0",
|
|
42
42
|
"commander": "^15.0.0",
|
|
43
43
|
"supports-color": "^11.0.0"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"ava": "^8.0.1",
|
|
47
47
|
"c8": "^12.0.0",
|
|
48
|
-
"type-fest": "^5.
|
|
48
|
+
"type-fest": "^5.9.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"watch": "pnpm build --watch",
|
package/tests/format.ts
CHANGED
|
@@ -39,6 +39,10 @@ test('formats stdin with width options and reports syntax errors', async (t) =>
|
|
|
39
39
|
const empty = await run(['format', '-']);
|
|
40
40
|
t.is(empty.code, 0);
|
|
41
41
|
t.is(empty.stdout, '\n');
|
|
42
|
+
|
|
43
|
+
const singleLine = await run(['format', '-'], ' \n \n[1,2]\n \n');
|
|
44
|
+
t.is(singleLine.code, 0);
|
|
45
|
+
t.is(singleLine.stdout, '[1, 2]');
|
|
42
46
|
});
|
|
43
47
|
|
|
44
48
|
test('check and write use deterministic exit codes', async (t) => {
|
|
@@ -49,7 +53,7 @@ test('check and write use deterministic exit codes', async (t) => {
|
|
|
49
53
|
t.is((await run(['format', '--check', file])).code, 1);
|
|
50
54
|
t.is((await run(['format', '--write', file])).code, 0);
|
|
51
55
|
t.is((await run(['format', '--check', file])).code, 0);
|
|
52
|
-
t.is(await readFile(file, 'utf8'), 'let x = [1, 2, 3, 4]
|
|
56
|
+
t.is(await readFile(file, 'utf8'), 'let x = [1, 2, 3, 4];');
|
|
53
57
|
} finally {
|
|
54
58
|
await rm(directory, { recursive: true, force: true });
|
|
55
59
|
}
|