Skip to content

Commit cae2276

Browse files
authored
fix: Running validator causes 'Maximum call stack size exceeded' error (#746)
1 parent 1ab1eaa commit cae2276

13 files changed

+82
-59
lines changed

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"@typescript-eslint/typescript-estree": "^8.21.0",
107107
"@vitejs/plugin-react": "^4.3.1",
108108
"allotment": "^1.20.2",
109+
"astring": "^1.9.0",
109110
"chokidar": "^4.0.3",
110111
"clsx": "^2.1.1",
111112
"constrained-editor-plugin": "^1.3.0",
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import browser from "k6/browser";
2-
32
export default function () {}
43
export function handleSummary() {
54
console.log("This is the handleSummary shim");
@@ -10,7 +9,11 @@ export const options = {
109
executor: "shared-iterations",
1110
vus: 1,
1211
iterations: 1,
13-
options: { browser: { type: "chromium" } },
14-
},
15-
},
12+
options: {
13+
browser: {
14+
type: "chromium"
15+
}
16+
}
17+
}
18+
}
1619
};

src/main/__snapshots__/script/browser-options/without-browser-import.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ export function handleSummary() {
44
}
55
export const options = {
66
scenarios: {
7-
default: { executor: "shared-iterations", vus: 1, iterations: 1 },
8-
},
7+
default: {
8+
executor: "shared-iterations",
9+
vus: 1,
10+
iterations: 1
11+
}
12+
}
913
};
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import { check } from "k6";
2-
1+
import {check} from "k6";
32
export function handleSummary() {
43
console.log("This is the user-defined handleSummary function");
54
}
6-
75
export default function () {
86
check(true, {
9-
"is true": (value) => value === true,
7+
'is true': value => value === true
108
});
119
}
1210
export const options = {
1311
scenarios: {
14-
default: { executor: "shared-iterations", vus: 1, iterations: 1 },
15-
},
12+
default: {
13+
executor: "shared-iterations",
14+
vus: 1,
15+
iterations: 1
16+
}
17+
}
1618
};
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
import { check } from "k6";
2-
1+
import {check} from "k6";
32
export default function () {
43
check(true, {
5-
"is true": (value) => value === true,
4+
'is true': value => value === true
65
});
76
}
87
export function handleSummary() {
98
console.log("This is the handleSummary shim");
109
}
1110
export const options = {
1211
scenarios: {
13-
default: { executor: "shared-iterations", vus: 1, iterations: 1 },
14-
},
12+
default: {
13+
executor: "shared-iterations",
14+
vus: 1,
15+
iterations: 1
16+
}
17+
}
1518
};

src/main/__snapshots__/script/groups-shim/with-different-alias-for-execution-import.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ import http from "k6/http";
33
console.log("This is the groups shim");
44
})();
55
import myExec from "k6/execution";
6-
76
export default function () {}
87
export function handleSummary() {
98
console.log("This is the handleSummary shim");
109
}
1110
export const options = {
1211
scenarios: {
13-
default: { executor: "shared-iterations", vus: 1, iterations: 1 },
14-
},
12+
default: {
13+
executor: "shared-iterations",
14+
vus: 1,
15+
iterations: 1
16+
}
17+
}
1518
};

src/main/__snapshots__/script/groups-shim/with-http-import.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import http from "k6/http";
2-
32
(function () {
43
console.log("This is the groups shim");
54
})();
@@ -11,6 +10,10 @@ export function handleSummary() {
1110
}
1211
export const options = {
1312
scenarios: {
14-
default: { executor: "shared-iterations", vus: 1, iterations: 1 },
15-
},
13+
default: {
14+
executor: "shared-iterations",
15+
vus: 1,
16+
iterations: 1
17+
}
18+
}
1619
};

src/main/__snapshots__/script/groups-shim/without-http-import.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ export function handleSummary() {
44
}
55
export const options = {
66
scenarios: {
7-
default: { executor: "shared-iterations", vus: 1, iterations: 1 },
8-
},
7+
default: {
8+
executor: "shared-iterations",
9+
vus: 1,
10+
iterations: 1
11+
}
12+
}
913
};

src/main/__snapshots__/script/options-export/options-export.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ export function handleSummary() {
44
}
55
export const options = {
66
scenarios: {
7-
default: { executor: "shared-iterations", vus: 1, iterations: 1 },
8-
},
7+
default: {
8+
executor: "shared-iterations",
9+
vus: 1,
10+
iterations: 1
11+
}
12+
}
913
};

0 commit comments

Comments
 (0)