Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(tests): disable --experimental-require-module (default since Node 20.19.0) since it breaks jest-based testing (#6075)

David Alexander Pfeifferc6864ed8d988
diff --git a/.nvmrc b/.nvmrc
index 4349175bcf..85aee5a534 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-v20.18.3
\ No newline at end of file
+v20
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b60e67eb9d..d2e35c56b4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -797,6 +797,9 @@ importers:
autoprefixer:
specifier: ^10.4.19
version: 10.4.19([email protected])
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
dotenv-cli:
specifier: ^7.4.2
version: 7.4.2
@@ -6318,6 +6321,11 @@ packages:
resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==}
engines: {node: '>=12.0.0'}
+ resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==}
+ engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'}
+ hasBin: true
+
resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==}
@@ -19054,6 +19062,10 @@ snapshots:
dependencies:
luxon: 3.4.4
+ dependencies:
+ cross-spawn: 7.0.6
+
dependencies:
node-fetch: 2.6.7
diff --git a/web/package.json b/web/package.json
index 49ae82e4d4..e0356a473c 100644
--- a/web/package.json
+++ b/web/package.json
@@ -14,12 +14,12 @@
"prettier": "prettier --write ./src *.{ts,js}",
"clean": "rm -rf node_modules",
"start": "dotenv -e ../.env -- sh -c 'NEXT_MANUAL_SIG_HANDLE=true next start'",
- "test": "dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects async-server",
- "test-sync": "dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects sync-server",
- "test-client": "dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects client",
- "test:watch": "dotenv -e ../.env -- jest --watch --runInBand",
+ "test": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects async-server",
+ "test-sync": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects sync-server",
+ "test-client": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects client",
+ "test:watch": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --watch --runInBand",
"test:e2e": "dotenv -e ../.env -- playwright test",
- "test:e2e:server": "dotenv -e ../.env -- jest --runInBand --detectOpenHandles --verbose --selectProjects e2e-server"
+ "test:e2e:server": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --runInBand --detectOpenHandles --verbose --selectProjects e2e-server"
},
"dependencies": {
"@anthropic-ai/tokenizer": "^0.0.4",
@@ -181,6 +181,7 @@
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^7.12.0",
"autoprefixer": "^10.4.19",
+ "cross-env": "^7.0.3",
"dotenv-cli": "^7.4.2",
"eslint": "^8.56.0",
"eslint-config-next": "^14.2.15",