fix(publish): add re-export shims to deprecated redirect packages#510
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The five redirect packages (owletto-sdk, owletto-connectors, owletto-worker, owletto-embeddings, owletto-openclaw) declare `main: index.js` but had no index.js on disk. Their published tarballs contained only package.json, so anyone migrating with `import … from '@lobu/owletto-sdk'` after the rename would hit ERR_MODULE_NOT_FOUND. Add hand-written index.js + index.d.ts shims that re-export from the renamed package. owletto-openclaw also forwards the default export (the OpenClaw plugin object). Allowlist these specific files in .gitignore so the existing packages/**/*.js dist-suppression rule doesn't strip them. Verified end-to-end: packed each redirect, installed in a fresh project, confirmed the deprecation message + that imports resolve to the renamed package's exports (71 named exports for owletto-sdk including ConnectorRuntime, default-export object for openclaw).
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
d826807 to
401187f
Compare
Contributor
|
Triage decision: Reasons:
Next: Assigned to @buremba for review. Manual merge required due to submodule changes. |
This was referenced May 4, 2026
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
The five redirect packages (
@lobu/owletto-{sdk,connectors,worker,embeddings,openclaw}) declaremain: index.jsbut had noindex.json disk. Published tarballs contained onlypackage.json, so anyone migrating gradually after #499 hitERR_MODULE_NOT_FOUNDonimport … from '@lobu/owletto-sdk'.This adds hand-written
index.js+index.d.tsre-export shims to each redirect package.owletto-openclawalso forwards the default export (the OpenClaw plugin object)..gitignoregets an allowlist so the existingpackages/**/*.jsdist-suppression rule doesn't strip these source files.Why this wasn't caught
The publish dry-run that PR #499 ran (
npm pack --dry-run --json) succeeded — npm doesn't verify that the files declared inpackage.jsonactually exist. The breakage only surfaces atrequire/importtime on a real install. Verified now end-to-end (see Test plan).Test plan
bunx --bun npm pack --dry-runshows index.js + index.d.ts in every redirect tarball.bun run typecheckclean.@lobu/owletto-sdk@6.0.0, installed in a fresh project alongside@lobu/connector-sdk, ranimport * as m from '@lobu/owletto-sdk'→ 71 named exports forwarded,ConnectorRuntimeresolves, deprecation message present inpackage.json.bun -e "import plugin from '@lobu/owletto-openclaw'"returns the OpenClaw plugin object withid,name,description,kind,register.Out of scope
@lobu/connectorsitself uses Bun-specificimport 'npm:turndown@7.2.2'syntax that doesn't resolve under standard Node ESM. Pre-existing in the package source — not introduced by this PR or by chore: rename packages #499. Worth a follow-up but separate concern.