fix: compile cypress to commonjs to fix docker issue

This commit is contained in:
wancat committed 2024-02-28 23:20:29 +08:00
1 parent 2aa1c84e73
commit 818e4e95e4
6 files changed
+24 -12

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
*/node_modules
**/node_modules
.git
*/dist
+4 -2
View File
@@ -12,6 +12,7 @@ services:
- BASE_URL=http://app-test
- TESTING_USERNAME=alex
- TESTING_PASSWORD=Alex1234
# - DEBUG=cypress:*
depends_on:
- app-test
@@ -23,8 +24,9 @@ services:
target: prod
networks:
internal:
ports:
- 5173:80
# Only open the port for debugging
# ports:
# - 5173:80
depends_on:
- backend
File renamed without changes.
+4 -2
View File
@@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"main": "index.js",
"type": "module",
"type": "commonjs",
"license": "MIT",
"scripts": {
"test": "yarn cypress run",
@@ -12,9 +12,11 @@
"dependencies": {
"@testing-library/cypress": "^10.0.1",
"cypress": "^13.5.1",
"dotenv": "^16.3.1"
"dotenv": "^16.3.1",
"ts-node": "^10.9.2"
},
"devDependencies": {
"@types/dotenv": "^8.2.0",
"typescript": "^5.3.3"
}
}
+7 -6
View File
@@ -1,10 +1,11 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["cypress", "@testing-library/cypress"],
"sourceMap": false,
"inlineSourceMap": true
"outDir": "dist",
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress", "node", "@testing-library/cypress"],
"esModuleInterop": true
},
"include": ["node_modules/cypress", "cypress/**/*.ts"],
"exclude": ["node_modules/cypress", "cypress.config.ts", "../packages"]
"include": ["**/*.ts"],
"exclude": ["dist"]
}
+8 -1
View File
@@ -1043,6 +1043,13 @@
"@types/docker-modem" "*"
"@types/node" "*"
"@types/dotenv@^8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@types/dotenv/-/dotenv-8.2.0.tgz#5cd64710c3c98e82d9d15844375a33bf1b45d053"
integrity sha512-ylSC9GhfRH7m1EUXBXofhgx4lUWmFeQDINW5oLuS+gxWdfUeW4zJdeVTYVkexEW+e2VUvlZR2kGnGGipAWR7kw==
dependencies:
dotenv "*"
"@types/express-serve-static-core@^4.17.33":
version "4.17.43"
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz#10d8444be560cb789c4735aea5eac6e5af45df54"
@@ -2777,7 +2784,7 @@ dompurify@^3.0.6:
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.9.tgz#b3f362f24b99f53498c75d43ecbd784b0b3ad65e"
integrity sha512-uyb4NDIvQ3hRn6NiC+SIFaP4mJ/MdXlvtunaqK9Bn6dD3RuB/1S/gasEjDHD8eiaqdSael2vBv+hOs7Y+jhYOQ==
dotenv@^16.3.1, dotenv@^16.4.1:
dotenv@*, dotenv@^16.3.1, dotenv@^16.4.1:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==