Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 10:45 UTC
refactor(ts/e2e): remove deprecated `nodeVersions` property
Remove the deprecated `nodeVersions` property from E2EConfig in favor of the unified `versions.node` API. This completes the migration to the multi-runtime API that supports both Node.js and Deno. - Remove `nodeVersions` property from E2EConfig interface - Remove legacy handling in `normalizeVersionConfig()` - Update all 9 Node.js test files to use `versions: { node: [...] }` - Update README.md and JSDoc documentation
jkomyno committed
Feb 2, 2026 at 21:17 UTC
2367cd799bbbd18b8e37a2faf9d09e77e7bca035
13 files changed
+28
-40
ts/e2e-tests/_utils/README.md
+1
-2
@@ -50,7 +50,6 @@ Configuration object passed to `e2e()`:
50
| Property | Type | Description |
51
| -------------- | ------------------------------------- | ---------------------------------------------------------------- |
52
| `versions` | `RuntimeVersions` | Runtime versions to test. See RuntimeVersions below |
53
-| `nodeVersions` | `readonly NodeVersionFromUser[]` | **Deprecated.** Use `versions.node` instead |
53
| `env` | `Record<string, string \| undefined>` | Environment variables for Docker. Validated at startup |
54
| `usesFixtures` | `boolean` | When true, sets cwd to `{testDir}/fixtures`. Default: `false` |
55
| `defineTests` | `(ctx: DefineTestsContext) => void` | Callback to define tests using bun:test primitives |
@@ -162,7 +161,7 @@ it('calls LLM', async () => {
161
Node.js versions to test are resolved in this order:
162
163
1. **`COMPOSIO_E2E_NODE_VERSION` env var** (highest priority): Use `[env_value]`
165
-2. **`config.versions.node`** or **`config.nodeVersions`**: Use the provided array
164
+2. **`config.versions.node`**: Use the provided array
165
3. **Default**: Use version from `.nvmrc` file
166
167
### Well-Known Node Versions
ts/e2e-tests/_utils/src/e2e.ts
+1
-1
@@ -52,7 +52,7 @@ function inferCwd(importMetaUrl: string, repoRoot: string): string {
52
* import type { E2ETestResult } from '@e2e-tests/utils';
53
*
54
* e2e(import.meta.url, {
55
- * nodeVersions: ['20.19.0', '22.12.0'],
55
+ * versions: { node: ['20.19.0', '22.12.0'] },
56
* env: { COMPOSIO_API_KEY: process.env.COMPOSIO_API_KEY },
57
* defineTests: ({ describe, it, expect, beforeAll, runFixture }) => {
58
* let result: E2ETestResult;
ts/e2e-tests/_utils/src/runner.ts
+1
-6
@@ -576,17 +576,12 @@ function createDenoDockerExecutors(
576
// ============================================================================
577
578
/**
579
- * Normalize config to support both old (nodeVersions) and new (versions) formats.
579
+ * Normalize config to RuntimeVersions format.
580
*/
581
function normalizeVersionConfig(config: E2EConfig): RuntimeVersions {
582
- // New format takes precedence
582
if (config.versions) {
583
return config.versions;
584
}
586
- // Legacy format
587
- if (config.nodeVersions) {
588
- return { node: config.nodeVersions };
589
- }
585
// Default: use current Node.js version
586
return { node: ['current'] };
587
}
ts/e2e-tests/_utils/src/types.ts
-10
@@ -133,19 +133,9 @@ export interface DefineTestsContext {
133
* Configuration for e2e tests.
134
*/
135
export interface E2EConfig {
136
- /**
137
- * Node.js versions to test against.
138
- * Each version creates a separate describe block.
139
- * If not provided, defaults to the current Node runtime version.
140
- *
141
- * @deprecated Use `versions.node` instead. This property will be removed in a future version.
142
- */
143
- nodeVersions?: readonly NodeVersionFromUser[];
144
-
136
/**
137
* Runtime versions to test against.
138
* Supports Node.js and Deno runtimes.
148
- * Takes precedence over the deprecated `nodeVersions` property.
139
*
140
* @example
141
* ```typescript
ts/e2e-tests/runtimes/node/cjs-basic/e2e.test.ts
+9
-7
@@ -8,13 +8,15 @@ import { e2e, type E2ETestResult } from '@e2e-tests/utils';
8
import { describe, it, expect, beforeAll } from 'bun:test';
9
10
e2e(import.meta.url, {
11
- nodeVersions: [
12
- // may throw ERR_REQUIRE_ESM
13
- '20.18.0',
14
- // supports ESM by default
15
- '20.19.0',
16
- '22.12.0',
17
- ],
11
+ versions: {
12
+ node: [
13
+ // may throw ERR_REQUIRE_ESM
14
+ '20.18.0',
15
+ // supports ESM by default
16
+ '20.19.0',
17
+ '22.12.0',
18
+ ],
19
+ },
20
usesFixtures: true,
21
defineTests: ({ runFixture }) => {
22
let result: E2ETestResult;
ts/e2e-tests/runtimes/node/esm-basic/e2e.test.ts
+9
-7
@@ -8,13 +8,15 @@ import { e2e, type E2ETestResult } from '@e2e-tests/utils';
8
import { describe, it, expect, beforeAll } from 'bun:test';
9
10
e2e(import.meta.url, {
11
- nodeVersions: [
12
- // may throw ERR_REQUIRE_ESM
13
- '20.18.0',
14
- // supports ESM by default
15
- '20.19.0',
16
- '22.12.0',
17
- ],
11
+ versions: {
12
+ node: [
13
+ // may throw ERR_REQUIRE_ESM
14
+ '20.18.0',
15
+ // supports ESM by default
16
+ '20.19.0',
17
+ '22.12.0',
18
+ ],
19
+ },
20
usesFixtures: true,
21
defineTests: ({ runFixture }) => {
22
let result: E2ETestResult;
ts/e2e-tests/runtimes/node/file-roundtrip/e2e.test.ts
+1
-1
@@ -8,7 +8,7 @@ declare module 'bun' {
8
}
9
10
e2e(import.meta.url, {
11
- nodeVersions: ['current'],
11
+ versions: { node: ['current'] },
12
usesFixtures: true,
13
env: {
14
COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
ts/e2e-tests/runtimes/node/json-schema-to-zod-v3/e2e.test.ts
+1
-1
@@ -11,7 +11,7 @@ import { describe, it, expect } from 'bun:test';
11
import zodToJsonSchema from 'zod-to-json-schema';
12
13
e2e(import.meta.url, {
14
- nodeVersions: ['current'],
14
+ versions: { node: ['current'] },
15
defineTests: () => {
16
describe('json-schema-to-zod with Zod v3', () => {
17
describe('Basic functionality', () => {
ts/e2e-tests/runtimes/node/json-schema-to-zod-v4/e2e.test.ts
+1
-1
@@ -10,7 +10,7 @@ import { e2e } from '@e2e-tests/utils';
10
import { describe, it, expect } from 'bun:test';
11
12
e2e(import.meta.url, {
13
- nodeVersions: ['current'],
13
+ versions: { node: ['current'] },
14
defineTests: () => {
15
describe('json-schema-to-zod with Zod v4', () => {
16
describe('Basic functionality', () => {
ts/e2e-tests/runtimes/node/mastra-tool-router-zod-v3/e2e.test.ts
+1
-1
@@ -25,7 +25,7 @@ declare module 'bun' {
25
}
26
27
e2e(import.meta.url, {
28
- nodeVersions: ['22.12.0'],
28
+ versions: { node: ['22.12.0'] },
29
env: {
30
COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
31
OPENAI_API_KEY: Bun.env.OPENAI_API_KEY,
ts/e2e-tests/runtimes/node/mastra-tool-router-zod-v4/e2e.test.ts
+1
-1
@@ -25,7 +25,7 @@ declare module 'bun' {
25
}
26
27
e2e(import.meta.url, {
28
- nodeVersions: ['22.12.0'],
28
+ versions: { node: ['22.12.0'] },
29
env: {
30
COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
31
OPENAI_API_KEY: Bun.env.OPENAI_API_KEY,
ts/e2e-tests/runtimes/node/openai-zod4-compat/e2e.test.ts
+1
-1
@@ -15,7 +15,7 @@ declare module 'bun' {
15
}
16
17
e2e(import.meta.url, {
18
- nodeVersions: ['20.19.0', '22.12.0'],
18
+ versions: { node: ['20.19.0', '22.12.0'] },
19
usesFixtures: true,
20
env: {
21
COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/e2e.test.ts
+1
-1
@@ -17,7 +17,7 @@ declare module 'bun' {
17
}
18
19
e2e(import.meta.url, {
20
- nodeVersions: ['current'],
20
+ versions: { node: ['current'] },
21
env: {
22
COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
23
},