chore(publish): prep 15 packages for first npm publish at 0.6.2#82
Merged
Conversation
Two blockers were about to brick every consumer on \`npm install\`: 1. 11 packages lacked \`"type": "module"\`. With tsup configured to emit ESM + DTS, that produced \`index.mjs\`/\`index.d.mts\` while the \`main\` field said \`./dist/index.js\` — module not found. Fix: set \`"type": "module"\` on all 15 packages so tsup emits \`index.js\`/\`index.d.ts\` that match the declared \`main\`/\`types\`. 2. All 15 packages had \`exports["."].types\` pointing to \`./src/index.ts\`. The \`files\` array is \`["dist"]\`, so \`src/\` never ships in the tarball and TypeScript consumers would get no types. Fix: point \`exports["."].types\` at \`./dist/index.d.ts\`. Also: bump every workspace package from 0.6.0 to 0.6.2 to match the root version so the first publish is coherent. Verification: - pnpm -r run clean && pnpm -r run build — all 16 packages Done - every package's \`main\` + \`types\` resolve to an existing file - \`pnpm -r publish --access public --no-git-checks --dry-run\` lists all 15 @otaip/* packages at 0.6.2 - packed @otaip/agents-booking tarball manifest shows \`workspace:*\` correctly rewritten to 0.6.2 version ranges - pnpm test — 3,092 pass (3 skipped), lint + typecheck clean Does NOT publish anything. The release.yml / publish.yml pipeline still needs the NPM_TOKEN secret and the @otaip npm org before a real publish can land. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… dist The publish-prep change in this PR moved \`exports["."].types\` from \`./src/index.ts\` to \`./dist/index.d.ts\` on every workspace package, which is correct for the published tarballs. Side effect: TypeScript now needs \`dist/\` to exist to resolve cross-package \`@otaip/*\` imports, and CI ran typecheck before anything built. Reproduced locally: \`pnpm -r run clean && pnpm -r run typecheck\` fails in every package that imports from @otaip/core (duffel, agents-tmc, agents-platform, the nested agents/*). Fix: add a \`pnpm -r run build\` step in ci.yml before typecheck. Doubles as a clean-tree build validation — the same config ships to npm, so this is the right thing to verify on every PR anyway. Verified locally with clean → install → lint → build → typecheck → test: all 16 packages Done. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preparation for the first-ever npm publish of the `@otaip/*` scope. Found two structural blockers during pre-publish audit that would have bricked every consumer on `npm install`; fixed them both.
Blockers fixed
1. Wrong module type on 11 of 15 packages.
`core`, `agents-platform`, `agents-tmc`, and all nested `agents/*` except `lodging` lacked `"type": "module"`. With tsup configured `--format esm --dts`, that produced `dist/index.mjs` + `dist/index.d.mts`, but `package.json` said `main: "./dist/index.js"` and `types: "./dist/index.d.ts"`. Consumers would hit `Cannot find module`.
Fix: add `"type": "module"` to all 15 so tsup emits `index.js` / `index.d.ts` matching the declared fields. Verified each package's `main` and `types` now resolve to a real file.
2. Types exported from src (which doesn't ship).
All 15 packages had `exports["."].types: "./src/index.ts"`. But `files: ["dist"]` excludes `src/` from the tarball, so TypeScript users would get no types.
Fix: point `exports["."].types` at `./dist/index.d.ts`.
Version sync
All 15 workspace packages were still at `0.6.0` while root was `0.6.2`. Bumped them all to `0.6.2` so the first publish is coherent.
Dry-run output
```
$ pnpm -r publish --access public --no-git-checks --dry-run
```
Also inspected the `@otaip/agents-booking` tarball manifest — pnpm correctly rewrote every `workspace:*` dep to `"0.6.2"`.
What is NOT in this PR (you need to do before publishing)
Once published, smoke-test with:
```
npm view @otaip/core
npm view @otaip/agents-search
npm view @otaip/adapter-duffel
```
Test plan
🤖 Generated with Claude Code