diff --git a/e2e-pw/package.json b/e2e-pw/package.json index fab2696d39..ad3a0e6bdd 100644 --- a/e2e-pw/package.json +++ b/e2e-pw/package.json @@ -4,7 +4,7 @@ "main": "index.js", "license": "MIT", "devDependencies": { - "@playwright/test": "^1.36.2", + "@playwright/test": "^1.37", "@types/fluent-ffmpeg": "^2.1.21", "@types/jimp": "^0.2.28", "@types/wait-on": "^5.3.1", @@ -18,7 +18,7 @@ "tree-kill": "^1.2.2", "ts-dedent": "^2.2.0", "typescript": "^5.1.6", - "vitest": "^0.33.0", + "vitest": "^0.34.1", "wait-on": "^7.0.1" }, "scripts": { diff --git a/e2e-pw/src/shared/python-runner/python-runner.ts b/e2e-pw/src/shared/python-runner/python-runner.ts index 81aa287f97..8e2673299d 100644 --- a/e2e-pw/src/shared/python-runner/python-runner.ts +++ b/e2e-pw/src/shared/python-runner/python-runner.ts @@ -10,7 +10,18 @@ dotenv.config({ path: process.env.CI ? ".env.ci" : ".env.dev" }); export type PythonCommandGenerator = (argv: string[]) => string; export class PythonRunner { - constructor(private pythonCommandGenerator: PythonCommandGenerator) {} + constructor( + private readonly pythonCommandGenerator: PythonCommandGenerator, + private readonly env?: Record + ) { + this.pythonCommandGenerator = pythonCommandGenerator; + + if (env) { + Object.entries(env).forEach(([key, value]) => { + process.env[key] = value; + }); + } + } public exec(sourceCode: string) { const dedentedSourceCode = dedentPythonCode(sourceCode); diff --git a/e2e-pw/yarn.lock b/e2e-pw/yarn.lock index 8f67bb8920..9d59fe3d6b 100644 --- a/e2e-pw/yarn.lock +++ b/e2e-pw/yarn.lock @@ -476,13 +476,13 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@playwright/test@^1.36.2": - version "1.36.2" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.36.2.tgz#9edd68a02b0929c5d78d9479a654ceb981dfb592" - integrity sha512-2rVZeyPRjxfPH6J0oGJqE8YxiM1IBRyM8hyrXYK7eSiAqmbNhxwcLa7dZ7fy9Kj26V7FYia5fh9XJRq4Dqme+g== +"@playwright/test@^1.37": + version "1.37.0" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.37.0.tgz#5b3b60dabaabc0d5d3021fb5a5bb8250b424c71d" + integrity sha512-181WBLk4SRUyH1Q96VZl7BP6HcK0b7lbdeKisn3N/vnjitk+9HbdlFz/L5fey05vxaAhldIDnzo8KUoy8S3mmQ== dependencies: "@types/node" "*" - playwright-core "1.36.2" + playwright-core "1.37.0" optionalDependencies: fsevents "2.3.2" @@ -652,44 +652,44 @@ "@typescript-eslint/types" "6.2.0" eslint-visitor-keys "^3.4.1" -"@vitest/expect@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.33.0.tgz#f48652591f3573ad6c2db828ad358d5c078845d3" - integrity sha512-sVNf+Gla3mhTCxNJx+wJLDPp/WcstOe0Ksqz4Vec51MmgMth/ia0MGFEkIZmVGeTL5HtjYR4Wl/ZxBxBXZJTzQ== +"@vitest/expect@0.34.1": + version "0.34.1" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.34.1.tgz#2ba6cb96695f4b4388c6d955423a81afc79b8da0" + integrity sha512-q2CD8+XIsQ+tHwypnoCk8Mnv5e6afLFvinVGCq3/BOT4kQdVQmY6rRfyKkwcg635lbliLPqbunXZr+L1ssUWiQ== dependencies: - "@vitest/spy" "0.33.0" - "@vitest/utils" "0.33.0" + "@vitest/spy" "0.34.1" + "@vitest/utils" "0.34.1" chai "^4.3.7" -"@vitest/runner@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.33.0.tgz#0b1a4d04ff8bc5cdad73920eac019d99550edf9d" - integrity sha512-UPfACnmCB6HKRHTlcgCoBh6ppl6fDn+J/xR8dTufWiKt/74Y9bHci5CKB8tESSV82zKYtkBJo9whU3mNvfaisg== +"@vitest/runner@0.34.1": + version "0.34.1" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.34.1.tgz#23c21ba1db8bff610988c72744db590d0fb6c4ba" + integrity sha512-YfQMpYzDsYB7yqgmlxZ06NI4LurHWfrH7Wy3Pvf/z/vwUSgq1zLAb1lWcItCzQG+NVox+VvzlKQrYEXb47645g== dependencies: - "@vitest/utils" "0.33.0" + "@vitest/utils" "0.34.1" p-limit "^4.0.0" pathe "^1.1.1" -"@vitest/snapshot@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.33.0.tgz#4400a90c48907808122b573053a2112a832b3698" - integrity sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA== +"@vitest/snapshot@0.34.1": + version "0.34.1" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.34.1.tgz#814c65f8e714eaf255f47838541004b2a2ba28e6" + integrity sha512-0O9LfLU0114OqdF8lENlrLsnn024Tb1CsS9UwG0YMWY2oGTQfPtkW+B/7ieyv0X9R2Oijhi3caB1xgGgEgclSQ== dependencies: magic-string "^0.30.1" pathe "^1.1.1" pretty-format "^29.5.0" -"@vitest/spy@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.33.0.tgz#366074d3cf9cf1ed8aeaa76e50e78c799fb242eb" - integrity sha512-Kv+yZ4hnH1WdiAkPUQTpRxW8kGtH8VRTnus7ZTGovFYM1ZezJpvGtb9nPIjPnptHbsyIAxYZsEpVPYgtpjGnrg== +"@vitest/spy@0.34.1": + version "0.34.1" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.34.1.tgz#2f77234a3d554c5dea664943f2caaab92d304f3c" + integrity sha512-UT4WcI3EAPUNO8n6y9QoEqynGGEPmmRxC+cLzneFFXpmacivjHZsNbiKD88KUScv5DCHVDgdBsLD7O7s1enFcQ== dependencies: tinyspy "^2.1.1" -"@vitest/utils@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.33.0.tgz#6b9820cb8f128d649da6f78ecaa9b73d6222b277" - integrity sha512-pF1w22ic965sv+EN6uoePkAOTkAPWM03Ri/jXNyMIKBb/XHLDPfhLvf/Fa9g0YECevAIz56oVYXhodLvLQ/awA== +"@vitest/utils@0.34.1": + version "0.34.1" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.34.1.tgz#e5545c6618775fb9a2dae2a80d94fc2f35222233" + integrity sha512-/ql9dsFi4iuEbiNcjNHQWXBum7aL8pyhxvfnD9gNtbjR9fUKAjxhj4AA3yfLXg6gJpMGGecvtF8Au2G9y3q47Q== dependencies: diff-sequences "^29.4.3" loupe "^2.3.6" @@ -1690,10 +1690,10 @@ pkg-types@^1.0.3: mlly "^1.2.0" pathe "^1.1.0" -playwright-core@1.36.2: - version "1.36.2" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.36.2.tgz#32382f2d96764c24c65a86ea336cf79721c2e50e" - integrity sha512-sQYZt31dwkqxOrP7xy2ggDfEzUxM1lodjhsQ3NMMv5uGTRDsLxU0e4xf4wwMkF2gplIxf17QMBCodSFgm6bFVQ== +playwright-core@1.37.0: + version "1.37.0" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.37.0.tgz#a0a009b840076706452e29aab0efe0ebf5d45ab1" + integrity sha512-1c46jhTH/myQw6sesrcuHVtLoSNfJv8Pfy9t3rs6subY7kARv0HRw5PpyfPYPpPtQvBOmgbE6K+qgYUpj81LAA== pngjs@^3.0.0: version "3.4.0" @@ -1922,10 +1922,10 @@ tinycolor2@^1.6.0: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.6.0.tgz#f98007460169b0263b97072c5ae92484ce02d09e" integrity sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw== -tinypool@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.6.0.tgz#c3640b851940abe2168497bb6e43b49fafb3ba7b" - integrity sha512-FdswUUo5SxRizcBc6b1GSuLpLjisa8N8qMyYoP3rl+bym+QauhtJP5bvZY1ytt8krKGmMLYIRl36HBZfeAoqhQ== +tinypool@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" + integrity sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww== tinyspy@^2.1.1: version "2.1.1" @@ -2018,10 +2018,10 @@ util-deprecate@^1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -vite-node@0.33.0: - version "0.33.0" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.33.0.tgz#c6a3a527e0b8090da7436241bc875760ae0eef28" - integrity sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw== +vite-node@0.34.1: + version "0.34.1" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.34.1.tgz#144900ca4bd54cc419c501d671350bcbc07eb1ee" + integrity sha512-odAZAL9xFMuAg8aWd7nSPT+hU8u2r9gU3LRm9QKjxBEF2rRdWpMuqkrkjvyVQEdNFiBctqr2Gg4uJYizm5Le6w== dependencies: cac "^6.7.14" debug "^4.3.4" @@ -2041,19 +2041,19 @@ vite-node@0.33.0: optionalDependencies: fsevents "~2.3.2" -vitest@^0.33.0: - version "0.33.0" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.33.0.tgz#e2be6153aec1d30e3460ac6d64265bf72da2551c" - integrity sha512-1CxaugJ50xskkQ0e969R/hW47za4YXDUfWJDxip1hwbnhUjYolpfUn2AMOulqG/Dtd9WYAtkHmM/m3yKVrEejQ== +vitest@^0.34.1: + version "0.34.1" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.34.1.tgz#3ad7f845e7a9fb0d72ab703cae832a54b8469e1e" + integrity sha512-G1PzuBEq9A75XSU88yO5G4vPT20UovbC/2osB2KEuV/FisSIIsw7m5y2xMdB7RsAGHAfg2lPmp2qKr3KWliVlQ== dependencies: "@types/chai" "^4.3.5" "@types/chai-subset" "^1.3.3" "@types/node" "*" - "@vitest/expect" "0.33.0" - "@vitest/runner" "0.33.0" - "@vitest/snapshot" "0.33.0" - "@vitest/spy" "0.33.0" - "@vitest/utils" "0.33.0" + "@vitest/expect" "0.34.1" + "@vitest/runner" "0.34.1" + "@vitest/snapshot" "0.34.1" + "@vitest/spy" "0.34.1" + "@vitest/utils" "0.34.1" acorn "^8.9.0" acorn-walk "^8.2.0" cac "^6.7.14" @@ -2066,9 +2066,9 @@ vitest@^0.33.0: std-env "^3.3.3" strip-literal "^1.0.1" tinybench "^2.5.0" - tinypool "^0.6.0" + tinypool "^0.7.0" vite "^3.0.0 || ^4.0.0" - vite-node "0.33.0" + vite-node "0.34.1" why-is-node-running "^2.2.2" wait-on@^7.0.1: