chore: adopt strict validation for all command line arguments MCP-298 #796
code-health.yml
on: pull_request
Matrix: Run MongoDB tests
Run git secrets
1m 11s
Report Coverage
27s
Annotations
19 errors and 1 warning
|
Run MongoDB tests (macos-latest)
Process completed with exit code 1.
|
|
tests/integration/build.test.ts > Build Test > should have matching exports between CommonJS and ESM tools modules:
tests/integration/build.test.ts#L63
SyntaxError: Cannot use import statement outside a module
❯ tests/integration/build.test.ts:63:27
Module /Users/runner/work/mongodb-mcp-server/mongodb-mcp-server/dist/cjs/tools/index.js:1 seems to be an ES Module but shipped in a CommonJS package. To fix this issue, change the file extension to .mjs or add "type": "module" in your package.json.
|
|
tests/integration/build.test.ts > Build Test > should have matching exports between CommonJS and ESM modules:
tests/integration/build.test.ts#L37
SyntaxError: Unexpected token 'export'
❯ tests/integration/build.test.ts:37:27
Module /Users/runner/work/mongodb-mcp-server/mongodb-mcp-server/dist/cjs/lib.js:1 seems to be an ES Module but shipped in a CommonJS package. To fix this issue, change the file extension to .mjs or add "type": "module" in your package.json.
|
|
tests/integration/build.test.ts > Build Test > should successfully require CommonJS module:
tests/integration/build.test.ts#L21
SyntaxError: Unexpected token 'export'
❯ tests/integration/build.test.ts:21:27
Module /Users/runner/work/mongodb-mcp-server/mongodb-mcp-server/dist/cjs/lib.js:1 seems to be an ES Module but shipped in a CommonJS package. To fix this issue, change the file extension to .mjs or add "type": "module" in your package.json.
|
|
tests/e2e/cli.test.ts > CLI entrypoint > warnings and error messages > vector search misconfiguration > should warn if vectorSearch is enabled but embeddings provider is not configured:
tests/e2e/e2eUtils.ts#L39
Error: spawn EFTYPE
❯ runServer tests/e2e/e2eUtils.ts:39:30
❯ tests/e2e/cli.test.ts:113:42
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -4028, code: 'EFTYPE', syscall: 'spawn' }
|
|
tests/e2e/cli.test.ts > CLI entrypoint > warnings and error messages > invalid arguments > should show a suggestion when the only change is on the case:
tests/e2e/cli.test.ts#L103
AssertionError: expected 'EFTYPE' to be 1 // Object.is equality
- Expected:
1
+ Received:
"EFTYPE"
❯ tests/e2e/cli.test.ts:103:48
|
|
tests/e2e/cli.test.ts > CLI entrypoint > warnings and error messages > invalid arguments > should show a suggestion when is a simple typo:
tests/e2e/cli.test.ts#L103
AssertionError: expected 'EFTYPE' to be 1 // Object.is equality
- Expected:
1
+ Received:
"EFTYPE"
❯ tests/e2e/cli.test.ts:103:48
|
|
tests/e2e/cli.test.ts > CLI entrypoint > warnings and error messages > invalid arguments > should show an error when an argument is not known:
tests/e2e/cli.test.ts#L103
AssertionError: expected 'EFTYPE' to be 1 // Object.is equality
- Expected:
1
+ Received:
"EFTYPE"
❯ tests/e2e/cli.test.ts:103:48
|
|
tests/e2e/cli.test.ts > CLI entrypoint > warnings and error messages > Deprecated CLI arguments > deprecation behaviour of --connectionString > shows the reference message when --connectionString was passed:
tests/e2e/e2eUtils.ts#L39
Error: spawn EFTYPE
❯ runServer tests/e2e/e2eUtils.ts:39:30
❯ tests/e2e/cli.test.ts:70:50
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -4028, code: 'EFTYPE', syscall: 'spawn' }
|
|
tests/e2e/cli.test.ts > CLI entrypoint > warnings and error messages > Deprecated CLI arguments > deprecation behaviour of --connectionString > warns the usage of --connectionString as it is deprecated:
tests/e2e/e2eUtils.ts#L39
Error: spawn EFTYPE
❯ runServer tests/e2e/e2eUtils.ts:39:30
❯ tests/e2e/cli.test.ts:65:50
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -4028, code: 'EFTYPE', syscall: 'spawn' }
|
|
tests/e2e/cli.test.ts > CLI entrypoint > should handle complex configuration:
tests/e2e/e2eUtils.ts#L39
Error: spawn EFTYPE
❯ runServer tests/e2e/e2eUtils.ts:39:30
❯ tests/e2e/cli.test.ts:30:34
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -4028, code: 'EFTYPE', syscall: 'spawn' }
|
|
tests/e2e/cli.test.ts > CLI entrypoint > should handle dry run request:
tests/e2e/e2eUtils.ts#L39
Error: spawn EFTYPE
❯ runServer tests/e2e/e2eUtils.ts:39:30
❯ tests/e2e/cli.test.ts:22:34
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -4028, code: 'EFTYPE', syscall: 'spawn' }
|
|
tests/e2e/cli.test.ts > CLI entrypoint > should handle help request:
tests/e2e/e2eUtils.ts#L39
Error: spawn EFTYPE
❯ runServer tests/e2e/e2eUtils.ts:39:30
❯ tests/e2e/cli.test.ts:16:42
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -4028, code: 'EFTYPE', syscall: 'spawn' }
|
|
tests/e2e/cli.test.ts > CLI entrypoint > should handle version request:
tests/e2e/e2eUtils.ts#L39
Error: spawn EFTYPE
❯ runServer tests/e2e/e2eUtils.ts:39:30
❯ tests/e2e/cli.test.ts:10:42
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -4028, code: 'EFTYPE', syscall: 'spawn' }
|
|
Run MongoDB tests (ubuntu-latest)
Process completed with exit code 1.
|
|
tests/integration/build.test.ts > Build Test > should have matching exports between CommonJS and ESM tools modules:
tests/integration/build.test.ts#L63
SyntaxError: Cannot use import statement outside a module
❯ tests/integration/build.test.ts:63:27
Module /home/runner/work/mongodb-mcp-server/mongodb-mcp-server/dist/cjs/tools/index.js:1 seems to be an ES Module but shipped in a CommonJS package. To fix this issue, change the file extension to .mjs or add "type": "module" in your package.json.
|
|
tests/integration/build.test.ts > Build Test > should have matching exports between CommonJS and ESM modules:
tests/integration/build.test.ts#L37
SyntaxError: Unexpected token 'export'
❯ tests/integration/build.test.ts:37:27
Module /home/runner/work/mongodb-mcp-server/mongodb-mcp-server/dist/cjs/lib.js:1 seems to be an ES Module but shipped in a CommonJS package. To fix this issue, change the file extension to .mjs or add "type": "module" in your package.json.
|
|
tests/integration/build.test.ts > Build Test > should successfully require CommonJS module:
tests/integration/build.test.ts#L21
SyntaxError: Unexpected token 'export'
❯ tests/integration/build.test.ts:21:27
Module /home/runner/work/mongodb-mcp-server/mongodb-mcp-server/dist/cjs/lib.js:1 seems to be an ES Module but shipped in a CommonJS package. To fix this issue, change the file extension to .mjs or add "type": "module" in your package.json.
|
|
Report Coverage
Unable to download artifact(s): Artifact not found for name: test-results
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md
|
|
Run MongoDB tests (ubuntu-latest)
No files were found with the provided path: coverage/lcov.info. No artifacts will be uploaded.
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
atlas-local-test-results
|
18.8 KB |
sha256:467b10b9cd44c06e0d0cf93ef91ec8beeac415cc750c53cdfe99ee265f8ef614
|
|
|
atlas-test-results
|
20.5 KB |
sha256:e1ceb2538c85b0b7bbf18dd3002641061c2def15e0e265ff7bf1542cc661c9f0
|
|
|
run-atlas-local-tests-permissions-005e6402c0857fb36b75029d72aa4772
|
140 Bytes |
sha256:a6b07543a08f463092ee6019e061d45569066fba808373190a709594b1438f30
|
|
|
run-atlas-tests-permissions-f6238babe47747a1d1297b999850eee7
|
140 Bytes |
sha256:1cddef1d0114e8b59f23953f4332889076580bfb17dd6d48aa17e4f911645bbc
|
|
|
run-git-secrets-permissions-b39373b2dafe29115fc8a35c8aae2748
|
140 Bytes |
sha256:15586ec600ee66a3adbc608ea21af928280b28840a49a2d4a6201646f8afa722
|
|
|
run-tests-permissions-f5f66305cb8a285c6e5778d0d53efd07
|
140 Bytes |
sha256:18870b364c0c65ed534d3cf621e32bb2d04e6a84896d1083528a1619db814948
|
|