Skip to content

Conversation

@amikofalvy
Copy link
Collaborator

Summary

Fixed 10 failing CLI tests by updating package.json files to point to compiled JavaScript instead of TypeScript source files.

Root Cause

Node.js cannot import TypeScript files directly. When the CLI tests spawned Node.js processes, imports of @inkeep/agents-sdk and @inkeep/agents-core would fail with ERR_UNKNOWN_FILE_EXTENSION because package.json pointed to src/index.ts instead of dist/index.js.

Changes

  • packages/agents-sdk/package.json: Set main to dist/index.js, added types field and proper exports configuration
  • packages/agents-core/package.json: Set main to dist/index.js, updated all exports to point to compiled output with type definitions
  • Both clean-package.config.json files: Emptied replace objects since package.json now has publish-ready configuration
  • Test fix: Added mock for node:module to fix type definitions test timeout

Results

✅ All 273 CLI tests now pass (previously 10 failing)
✅ Workspace dependencies work correctly (Node.js imports compiled JS)
✅ Published packages will work the same way (no clean-package transformation needed)
✅ Type definitions still work perfectly (.d.ts files are in dist/)

This follows standard TypeScript monorepo patterns where package.json always points to compiled output.

Test Plan

  • CLI tests pass locally
  • Type definitions test passes individually
  • Full test suite passes in CI

🤖 Generated with Claude Code

amikofalvy and others added 3 commits October 15, 2025 13:43
Fixed 10 failing CLI tests by updating package.json files to point to
compiled JavaScript instead of TypeScript source files.

Root cause: Node.js cannot import TypeScript files directly. When the CLI
tests spawned Node.js processes, imports of @inkeep/agents-sdk and
@inkeep/agents-core would fail with ERR_UNKNOWN_FILE_EXTENSION because
package.json pointed to src/index.ts instead of dist/index.js.

Changes:
- packages/agents-sdk/package.json: Set main to dist/index.js, added types
  field and proper exports configuration
- packages/agents-core/package.json: Set main to dist/index.js, updated all
  exports to point to compiled output with type definitions
- Both clean-package.config.json files: Emptied replace objects since
  package.json now has publish-ready configuration

All 273 CLI tests now pass. This follows standard TypeScript monorepo
patterns where package.json always points to compiled output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Oct 15, 2025

⚠️ No Changeset found

Latest commit: 66329f7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
agents-docs Ready Ready Preview Comment Oct 15, 2025 11:45pm
agents-manage-api Ready Ready Preview Comment Oct 15, 2025 11:45pm
agents-manage-ui Ready Ready Preview Comment Oct 15, 2025 11:45pm
agents-run-api Ready Ready Preview Comment Oct 15, 2025 11:45pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants