diff --git a/package.json b/package.json index 36cd6bf67..f2b51ecc9 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "singleQuote": true }, "scripts": { - "dev": "node --loader ts-node/esm --trace-warnings src/engine/native/node/index.ts", + "dev": "ts-node src/engine/native/node/index.ts --trace-warnings", "dev-ms-no-iam": "cd src/management-system-v2 && yarn dev", "dev-ms": "cd src/management-system-v2 && cross-env USE_AUTHORIZATION=true yarn dev", "dev-ms-api-no-iam": "cd src/management-system && cross-env process.env.API_ONLY=true USE_AUTHORIZATION=false yarn web:dev-start-backend", @@ -47,7 +47,7 @@ "dev-ms-old-iam": "cd src/management-system && yarn web:dev-iam", "dev-web": "yarn build && cd src/engine/native/web/server && yarn serve", "dev-many": "node src/engine/e2e_tests/process/deployment/startEngines.js", - "build": "cd src/engine/native/node && webpack --config webpack.native.config.js && webpack --config webpack.injector.config.ts && node --loader ts-node/esm ./build-injector.js && cd ../../universal && webpack --config webpack.universal.config.js", + "build": "cd src/engine/native/node && webpack --config webpack.native.config.js && webpack --config webpack.injector.config.ts && ts-node ./build-injector.js && cd ../../universal && NODE_OPTIONS=--openssl-legacy-provider webpack --config webpack.universal.config.js", "build-ms-web": "cd src/management-system && yarn web:build-server-frontend", "build-ms-server": "cd src/management-system && NODE_OPTIONS=--openssl-legacy-provider yarn web:build-server && cd .. && cd management-system-v2 && yarn build && cp -r .next/standalone ../../build/management-system/server/v2", "build-web": "yarn build && cd src/engine/native/web/server && yarn build", @@ -91,14 +91,14 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-import": "^2.27.5", - "eslint-plugin-jest": "^27.2.1", + "eslint-plugin-jest": "27.6.0", "eslint-plugin-node": "^11.1.0", "fs-extra": "^7.0.1", "html-webpack-inline-source-plugin": "^0.0.10", "html-webpack-plugin": "^3.2.0", "husky": "^4.2.3", - "jest": "^29.6.2", - "jest-when": "^2.7.0", + "jest": "29.7.0", + "jest-when": "3.6.0", "jsdoc": "^3.6.6", "mini-css-extract-plugin": "^0.6.0", "nodemon": "^2.0.12", @@ -108,8 +108,8 @@ "supertest": "^4.0.2", "ts-jest": "29.1.1", "ts-loader": "8.2.0", - "ts-node": "^10.9.1", - "typescript": "5.2.2", + "ts-node": "10.9.1", + "typescript": "5.3.2", "uuid": "^9.0.0", "webpack": "^4.35.3", "webpack-cli": "^3.3.0", diff --git a/src/engine/e2e_tests/globalSetup.js b/src/engine/e2e_tests/globalSetup.js index 04c8a2783..39a85e09e 100644 --- a/src/engine/e2e_tests/globalSetup.js +++ b/src/engine/e2e_tests/globalSetup.js @@ -27,9 +27,10 @@ module.exports = () => { let out = ''; let ready = false; + console.log('Starting engine...'); const engineProcess = spawn( - 'node', - ['--loader', 'ts-node/esm', path.resolve(__dirname, 'testEngine', 'startEngine.js')], + 'yarn', + ['ts-node', path.resolve(__dirname, 'testEngine', 'startEngine.js')], { cwd: __dirname, detached: false, @@ -52,5 +53,8 @@ module.exports = () => { ready = true; // avoid setting multiple timeouts } }); + engineProcess.stderr.on('data', (data) => { + console.error(data.toString()); + }); }); }; diff --git a/src/engine/e2e_tests/process/deployment/startEngines.js b/src/engine/e2e_tests/process/deployment/startEngines.js index a7650d134..a312211c8 100644 --- a/src/engine/e2e_tests/process/deployment/startEngines.js +++ b/src/engine/e2e_tests/process/deployment/startEngines.js @@ -19,15 +19,9 @@ function startMockEngineProcess(mockFilesPath) { } let outputHandlers = []; - const engineProcess = spawn( - 'node', - [ - '--loader', - 'ts-node/esm', - path.resolve(__dirname, 'mockEngine.js'), - path.resolve(__dirname, mockFilesPath), - ], + 'yarn', + ['ts-node', path.resolve(__dirname, 'mockEngine.js'), path.resolve(__dirname, mockFilesPath)], { cwd: __dirname, detached: false, diff --git a/yarn.lock b/yarn.lock index 02ebcd442..cac75fb52 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1351,6 +1351,7 @@ preact "^10.11.2" "@casl/ability-v6@npm:@casl/ability@^6.5.0", "@casl/ability@6.5.0": + name "@casl/ability-v6" version "6.5.0" resolved "https://registry.yarnpkg.com/@casl/ability/-/ability-6.5.0.tgz#a151a7637886099b8ffe52a96601225004a5c157" integrity sha512-3guc94ugr5ylZQIpJTLz0CDfwNi0mxKVECj1vJUPAvs+Lwunh/dcuUjwzc4MHM9D8JOYX0XUZMEPedpB3vIbOw== @@ -8824,7 +8825,7 @@ eslint-plugin-import@^2.17.3, eslint-plugin-import@^2.27.5, eslint-plugin-import semver "^6.3.1" tsconfig-paths "^3.14.2" -eslint-plugin-jest@^27.2.1: +eslint-plugin-jest@27.6.0: version "27.6.0" resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.6.0.tgz#e5c0cf735b3c8cad0ef9db5b565b2fc99f5e55ed" integrity sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng== @@ -13046,6 +13047,11 @@ jest-watcher@^29.7.0: jest-util "^29.7.0" string-length "^4.0.1" +jest-when@3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/jest-when/-/jest-when-3.6.0.tgz#b46ee408d68f671447b218f2ae6bd93fb5028acf" + integrity sha512-+cZWTy0ekAJo7M9Om0Scdor1jm3wDiYJWmXE8U22UVnkH54YCXAuaqz3P+up/FdtOg8g4wHOxV7Thd7nKhT6Dg== + jest-when@^2.7.0: version "2.8.1" resolved "https://registry.yarnpkg.com/jest-when/-/jest-when-2.8.1.tgz#8a428145fa9113bc35ea053fb61bff36f4483935" @@ -13089,15 +13095,7 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" - integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw== - dependencies: - import-local "^1.0.0" - jest-cli "^23.6.0" - -jest@^29.6.2: +jest@29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== @@ -13107,6 +13105,14 @@ jest@^29.6.2: import-local "^3.0.2" jest-cli "^29.7.0" +jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" + integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw== + dependencies: + import-local "^1.0.0" + jest-cli "^23.6.0" + joi@^17.4.0: version "17.11.0" resolved "https://registry.yarnpkg.com/joi/-/joi-17.11.0.tgz#aa9da753578ec7720e6f0ca2c7046996ed04fc1a" @@ -19909,7 +19915,7 @@ ts-loader@^9.2.5: semver "^7.3.4" source-map "^0.7.4" -ts-node@10.9.1, ts-node@^10.9.1: +ts-node@10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== @@ -20105,6 +20111,11 @@ typescript@5.2.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== +typescript@5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43" + integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"