Skip to content

Conversation

remorses
Copy link
Contributor

@remorses remorses commented Sep 12, 2025

Fix #1579
Fix sst/opencode-sdk-js#25

@opencode-ai/sdk package only has dist folder in package.json files, so bun install only copies dist folder and not src. So development imports fail. bun i only copies files in dist into node_modules

@Copilot Copilot AI review requested due to automatic review settings September 12, 2025 17:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a development setup issue for clean clone installations by ensuring TypeScript source files are included in the package distribution. The change addresses the problem where the "development" export conditions in package.json point to TypeScript source files that weren't being published.

  • Added src directory to the files array in both SDK and plugin package.json files
  • Ensures TypeScript source files are available for development mode module resolution

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/sdk/js/package.json Includes src directory in published files to support development exports
packages/plugin/package.json Includes src directory in published files to support development exports

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rekram1-node
Copy link
Collaborator

can you not do bun run dev or bun run --conditions=development ....?

Screenshot 2025-09-13 at 12 09 55 AM

@remorses
Copy link
Contributor Author

it makes no difference, it seems like your version of bun copies the src folder while mine does not.

@remorses
Copy link
Contributor Author

remorses commented Sep 13, 2025

it's good practice anyway to keep src files on npm to make things like sourcemaps and declaration maps work

@remorses remorses changed the title Fix dev command on clean clone and install Publish sdk src files to npm Sep 13, 2025
@remorses remorses changed the title Publish sdk src files to npm Publish sdk src files to npm, fix sdk resolution in development Sep 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants