@empiricalrun/test-run 0.10.0 → 0.10.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/CHANGELOG.md +13 -0
- package/dist/dashboard.d.ts.map +1 -1
- package/dist/dashboard.js +3 -2
- package/dist/lib/cmd.js +1 -1
- package/dist/lib/run-all-tests.d.ts.map +1 -1
- package/dist/lib/run-all-tests.js +3 -4
- package/dist/utils/config.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @empiricalrun/test-run
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9b873e3: fix: escape special characters before creating test-run command
|
|
8
|
+
- 8a83b29: fix: ts-node not found error
|
|
9
|
+
|
|
10
|
+
## 0.10.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- f05aac2: feat: add environment overrides for projects in tool calls
|
|
15
|
+
|
|
3
16
|
## 0.10.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/dashboard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG7C,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,eAAO,MAAM,wBAAwB,GACnC,aAAa,MAAM,EACnB,iBAAiB,MAAM,KACtB,OAAO,CAAC;IACT,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd,
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG7C,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,eAAO,MAAM,wBAAwB,GACnC,aAAa,MAAM,EACnB,iBAAiB,MAAM,KACtB,OAAO,CAAC;IACT,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd,CAwDA,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAa,OAAO,CACxD,mBAAmB,EAAE,CA0CtB,CAAC"}
|
package/dist/dashboard.js
CHANGED
|
@@ -14,6 +14,7 @@ const fetchEnvironmentAndBuild = async (projectName, environmentSlug) => {
|
|
|
14
14
|
console.error("No API token found. Skipping fetch environment and latest build from dashboard.");
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
+
// TODO: This API endpoint is deprecated. We should use the /list endpoint instead.
|
|
17
18
|
const resp = await fetch(`${DOMAIN}/api/environments?project_repo_name=${projectRepo}&environment_slug=${environmentSlug}`, {
|
|
18
19
|
method: "GET",
|
|
19
20
|
headers: {
|
|
@@ -57,7 +58,7 @@ const fetchEnvironmentVariables = async () => {
|
|
|
57
58
|
});
|
|
58
59
|
if (!envVarsResp.ok) {
|
|
59
60
|
if (envVarsResp.status === 400) {
|
|
60
|
-
return { data: {
|
|
61
|
+
return { data: { environment_variables: [] } };
|
|
61
62
|
}
|
|
62
63
|
throw new Error(`HTTP ${envVarsResp.status}: Failed to fetch environment variables`);
|
|
63
64
|
}
|
|
@@ -68,7 +69,7 @@ const fetchEnvironmentVariables = async () => {
|
|
|
68
69
|
maxTimeout: 60_000,
|
|
69
70
|
factor: 3,
|
|
70
71
|
});
|
|
71
|
-
return data && data.data ? data.data.
|
|
72
|
+
return data && data.data ? data.data.environment_variables : [];
|
|
72
73
|
}
|
|
73
74
|
catch (error) {
|
|
74
75
|
return [];
|
package/dist/lib/cmd.js
CHANGED
|
@@ -12,7 +12,7 @@ function getCommandFromString(command) {
|
|
|
12
12
|
args: matches.slice(1).map((match) => {
|
|
13
13
|
if ((match.startsWith('"') && match.endsWith('"')) ||
|
|
14
14
|
(match.startsWith("'") && match.endsWith("'"))) {
|
|
15
|
-
return match.slice(1, -1);
|
|
15
|
+
return match.slice(1, -1).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
16
16
|
}
|
|
17
17
|
return match;
|
|
18
18
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-all-tests.d.ts","sourceRoot":"","sources":["../../src/lib/run-all-tests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAQ5D,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,eAAe,EACf,cAAc,EACd,WAAW,EACX,YAAY,EACZ,QAAQ,GACT,EAAE;IACD,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"run-all-tests.d.ts","sourceRoot":"","sources":["../../src/lib/run-all-tests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAQ5D,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,eAAe,EACf,cAAc,EACd,WAAW,EACX,YAAY,EACZ,QAAQ,GACT,EAAE;IACD,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B,GAAG,YAAY,CAsBf"}
|
|
@@ -15,14 +15,13 @@ function runAllTestsCmd({ projects, passthroughArgs, patternsToGrep, filesFilter
|
|
|
15
15
|
.map((pattern) => ` -g "${pattern}"`)
|
|
16
16
|
.join(" ");
|
|
17
17
|
let args = ` ${filesFilter || ""} ${grepArgs} ${projectsArg} ${passthroughArgs || ""}`;
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
process.env.RUN_PLAYWRIGHT_HEADED === "true") {
|
|
18
|
+
const envVars = Object.assign({ ...process.env, PW_TEST_HTML_REPORT_OPEN: "never" }, envOverrides);
|
|
19
|
+
if (envVars.RUN_PLAYWRIGHT_HEADED === "true") {
|
|
21
20
|
args = `${args} --headed`;
|
|
22
21
|
}
|
|
23
22
|
const testRunCmd = normalizeSpaces(`npx ${testRunner} test ${args}`);
|
|
24
23
|
return {
|
|
25
24
|
...(0, cmd_1.getCommandFromString)(testRunCmd),
|
|
26
|
-
env,
|
|
25
|
+
env: envVars,
|
|
27
26
|
};
|
|
28
27
|
}
|
package/dist/utils/config.js
CHANGED
|
@@ -19,7 +19,7 @@ async function getProjectsFromPlaywrightConfig(platform, repoDir) {
|
|
|
19
19
|
const projects = configModule.default.projects;
|
|
20
20
|
console.log(JSON.stringify(projects));
|
|
21
21
|
`);
|
|
22
|
-
const result = (0, child_process_1.execSync)(`npx -y ts-node ${tmpScriptPath}`, {
|
|
22
|
+
const result = (0, child_process_1.execSync)(`npx -y ts-node@latest ${tmpScriptPath}`, {
|
|
23
23
|
encoding: "utf8",
|
|
24
24
|
env: {
|
|
25
25
|
...process.env,
|