Skip to content

Fix TypeScript SDK tooling: replace Bun with npm, add tsup for publishing#3

Open
Copilot wants to merge 5 commits intoupdate-to-simpler-typesfrom
copilot/fix-repo-tooling
Open

Fix TypeScript SDK tooling: replace Bun with npm, add tsup for publishing#3
Copilot wants to merge 5 commits intoupdate-to-simpler-typesfrom
copilot/fix-repo-tooling

Conversation

Copy link

Copilot AI commented Mar 10, 2026

The ts/ package was wired for Bun — noEmit: true meant tsc produced nothing, moduleResolution: "bundler" was Node-incompatible, and no exports/types/files fields existed for npm publishing.

Changes

  • Remove bun.lockpackage-lock.json is the single source of truth
  • Add tsup as build tool (tsup.config.ts); replaces raw tsc for compilation:
    • Emits ESM to dist/
    • Generates .d.ts declarations
    • Bundles @code0-tech/tucana/helpers inline (that package ships a .ts helper with no compiled counterpart, requiring bundler-side resolution)
  • Fix package.json:
    • Rename "ts""@code0-tech/hercules"
    • Add main, module, types, exports, files for correct npm publish shape
    • buildtsup, add typecheck script (tsc --noEmit), drop unused ts-node
  • Fix tsconfig.json: remove noEmit, add declaration, declarationMap, sourceMap
  • Fix imports in action_sdk.ts: add missing .js extensions to 6 package subpath imports for consistent module resolution
  • Update README.md: replace bun install / bun with npm install / npx tsx

After these changes, npm run build produces:

dist/action_sdk.js      # compiled ESM
dist/action_sdk.js.map  # sourcemap
dist/action_sdk.d.ts    # type declarations

And npm pack correctly bundles only dist/ + README.md + package.json.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits March 10, 2026 20:33
Co-authored-by: Knerio <96529060+Knerio@users.noreply.github.com>
…x package.json for publishing

Co-authored-by: Knerio <96529060+Knerio@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix tooling for repository to support npm Fix TypeScript SDK tooling: replace Bun with npm, add tsup for publishing Mar 10, 2026
@Knerio Knerio changed the base branch from main to update-to-simpler-types March 10, 2026 20:39
# Conflicts:
#	ts/bun.lock
#	ts/package-lock.json
#	ts/src/action_sdk.ts
@Knerio Knerio marked this pull request as ready for review March 10, 2026 20:43
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