@devries-cameron20 / composio Mirror · read-only / commits / db7b57643
Fork 0

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 21, 14:45 UTC

fix(ts): declare the supported Node.js engine floor (#4219)

## Summary The ESM-only transition in #3494 established Node.js 22.22.3 as the minimum supported runtime for the public TypeScript SDK packages, but their published manifests still omit `engines.node`. That leaves package managers without a package-level compatibility signal before an older runtime encounters an ESM loading failure. For example, the current `@composio/core@0.17.0` package fails with `ERR_REQUIRE_ESM` when required on Node.js 22.0.0, while the same load succeeds on Node.js 22.22.3. This aligns the published metadata with the support floor already documented and tested by the repository. Related: #3494 ## Changes - Add `"engines": { "node": ">=22.22.3" }` to all 14 public TypeScript release workspaces. - Add a release-workflow invariant that discovers public TypeScript workspaces from the root workspace configuration and rejects missing or drifted Node.js engine ranges. - Add a patch changeset covering exactly those 14 published packages. <details> <summary>Package scope</summary> - Core packages: `@composio/core`, `@composio/slim`, `@composio/experimental`, and `@composio/json-schema-to-zod` - Providers: Anthropic, Claude Agent SDK, Cloudflare, Google, LangChain, LlamaIndex, Mastra, OpenAI Agents, OpenAI, and Vercel - Excluded as private/unpublished: CLI, CLI keyring, CLI local tools, JSON Schema to Effect Schema, and TypeScript builders </details> ## Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor/Chore - [ ] Documentation - [ ] Breaking change ## How Has This Been Tested? Validated with the repository-pinned Node.js 24.17.0, pnpm 11.8.0, and Bun 1.4.0 toolchain: - `pnpm install --frozen-lockfile` - `pnpm run test:release-workflow` - `pnpm validate:changesets` - `pnpm exec changeset status --since=origin/next` (exactly 14 patch releases) - `pnpm build:packages` (19/19 packages) - `pnpm typecheck` (14/14 tasks) - `pnpm lint:packages` (successful; only pre-existing warnings in untouched source files) - Prettier over every touched file - `git diff --check origin/next...HEAD` The published-package probe also confirmed that `@composio/core@0.17.0` has no `engines` metadata, CommonJS loading fails on Node.js 22.0.0, and the same package loads successfully on Node.js 22.22.3. No lockfiles, generated files, or runtime source files changed. ## Screenshots (if applicable) Not applicable. ## Checklist - [x] I have read the Code of Conduct and this PR adheres to it - [x] I ran linters/tests locally and they passed - [x] I updated documentation as needed - [x] I added tests or explain why not applicable - [x] I added a changeset if this change affects published packages ## Additional context The runtime floor itself is not new: #3494 shipped and documented it as a breaking change in the existing `0.x` line. This patch makes registry metadata accurately reflect that existing support contract, so the accompanying releases are patches. --------- Co-authored-by: Tomas Golob <tgolob@users.noreply.github.com> Co-authored-by: Alberto Schiabel <jkomyno@users.noreply.github.com> Co-authored-by: jkomyno <alberto@composio.dev>

tgolob committed Aug 24, 2026 at 19:11 UTC db7b5764375c1f3d0940ece637752c6224eb87dd
16 files changed +110
.changeset/declare-node-engine-floor.md new
+18
@@ -0,0 +1,18 @@
1 +---
2 +'@composio/core': patch
3 +'@composio/slim': patch
4 +'@composio/experimental': patch
5 +'@composio/json-schema-to-zod': patch
6 +'@composio/anthropic': patch
7 +'@composio/claude-agent-sdk': patch
8 +'@composio/cloudflare': patch
9 +'@composio/google': patch
10 +'@composio/langchain': patch
11 +'@composio/llamaindex': patch
12 +'@composio/mastra': patch
13 +'@composio/openai-agents': patch
14 +'@composio/openai': patch
15 +'@composio/vercel': patch
16 +---
17 +
18 +Declare Node.js 22.22.3 as the minimum supported runtime for every published TypeScript package so package managers surface incompatible runtimes before users encounter ESM loading failures.
test/release-workflow.test.ts
+50
@@ -133,6 +133,34 @@ function readDocumentedSdkVersions(sdkLabel) {
133 return readSdkVersions(rows);
134 }
135
136 +function readTypeScriptWorkspacePackages() {
137 + const workspacePackages = [];
138 +
139 + for (const workspacePattern of packageJson.workspaces ?? []) {
140 + if (!workspacePattern.startsWith('ts/packages/')) continue;
141 +
142 + const workspacePaths = workspacePattern.endsWith('/*')
143 + ? readdirSync(new URL(`../${workspacePattern.slice(0, -2)}/`, import.meta.url), {
144 + withFileTypes: true,
145 + })
146 + .filter(entry => entry.isDirectory())
147 + .map(entry => `${workspacePattern.slice(0, -1)}${entry.name}`)
148 + : [workspacePattern];
149 +
150 + for (const workspacePath of workspacePaths) {
151 + const manifestUrl = new URL(`../${workspacePath}/package.json`, import.meta.url);
152 + if (!existsSync(manifestUrl)) continue;
153 +
154 + workspacePackages.push({
155 + manifest: JSON.parse(readFileSync(manifestUrl, 'utf8')),
156 + path: `${workspacePath}/package.json`,
157 + });
158 + }
159 + }
160 +
161 + return workspacePackages;
162 +}
163 +
164 function runPythonBuildFixture({ providers, providerFiles = [], failingProvider = '' }) {
165 const fixtureDir = mkdtempSync(join(tmpdir(), 'composio-python-build-'));
166 const buildLogPath = join(fixtureDir, 'build.log');
@@ -349,6 +377,28 @@ if (
377 );
378 }
379
380 +{
381 + const MIN_NODE_VERSION = '>=22.22.3';
382 + const publicTsReleaseWorkspaces = readTypeScriptWorkspacePackages().filter(
383 + ({ manifest }) => manifest.private !== true
384 + );
385 + const invalidNodeEngines = publicTsReleaseWorkspaces.filter(
386 + ({ manifest }) => manifest.engines?.node !== MIN_NODE_VERSION
387 + );
388 +
389 + if (publicTsReleaseWorkspaces.length === 0) {
390 + throw new Error('Node.js engine validation must discover public TypeScript workspaces');
391 + }
392 + if (invalidNodeEngines.length > 0) {
393 + const details = invalidNodeEngines
394 + .map(({ manifest, path }) => `- ${path}: ${manifest.engines?.node ?? '<missing>'}`)
395 + .join('\n');
396 + throw new Error(
397 + `Public TypeScript workspaces must declare engines.node as ${MIN_NODE_VERSION}:\n${details}`
398 + );
399 + }
400 +}
401 +
402 // --- Python release metadata: package version, runtime version, and docs changelog must agree ---
403
404 if (!pythonReleaseWorkflow.includes('run: pnpm test:release-workflow')) {
ts/packages/core/package.json
+3
@@ -1,6 +1,9 @@
1 {
2 "name": "@composio/core",
3 "type": "module",
4 + "engines": {
5 + "node": ">=22.22.3"
6 + },
7 "version": "0.17.0",
8 "description": "",
9 "main": "src/index.ts",
ts/packages/experimental/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "Experimental Composio integrations and helpers",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/json-schema-to-zod/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/anthropic/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "Non-Agentic Provider for Anthropic in Composio SDK",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/claude-agent-sdk/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "Composio provider for Claude Agent SDK",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/cloudflare/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/google/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "Google GenAI Provider for Composio SDK",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/langchain/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "",
5 "main": "dist/index.js",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/llamaindex/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "Agentic Provider for llamaindex in Composio SDK",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/mastra/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "Agentic Provider for mastra in Composio SDK",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/openai-agents/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/openai/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/providers/vercel/package.json
+3
@@ -4,6 +4,9 @@
4 "description": "",
5 "main": "src/index.ts",
6 "type": "module",
7 + "engines": {
8 + "node": ">=22.22.3"
9 + },
10 "repository": {
11 "type": "git",
12 "url": "https://github.com/ComposioHQ/composio.git",
ts/packages/slim/package.json
+3
@@ -1,6 +1,9 @@
1 {
2 "name": "@composio/slim",
3 "type": "module",
4 + "engines": {
5 + "node": ">=22.22.3"
6 + },
7 "version": "0.17.0",
8 "description": "Slim Composio core package without packaged source or docs",
9 "main": "dist/index.mjs",