Skip to content

fix(publish): add re-export shims to deprecated redirect packages#510

Merged
buremba merged 2 commits into
mainfrom
fix/redirect-package-shims
May 4, 2026
Merged

fix(publish): add re-export shims to deprecated redirect packages#510
buremba merged 2 commits into
mainfrom
fix/redirect-package-shims

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented May 4, 2026

Summary

The five redirect packages (@lobu/owletto-{sdk,connectors,worker,embeddings,openclaw}) declare main: index.js but had no index.js on disk. Published tarballs contained only package.json, so anyone migrating gradually after #499 hit ERR_MODULE_NOT_FOUND on import … from '@lobu/owletto-sdk'.

This adds hand-written index.js + index.d.ts re-export shims to each redirect package. owletto-openclaw also forwards the default export (the OpenClaw plugin object). .gitignore gets an allowlist so the existing packages/**/*.js dist-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 in package.json actually exist. The breakage only surfaces at require/import time on a real install. Verified now end-to-end (see Test plan).

Test plan

  • bunx --bun npm pack --dry-run shows index.js + index.d.ts in every redirect tarball.
  • bun run typecheck clean.
  • Real install: packed @lobu/owletto-sdk@6.0.0, installed in a fresh project alongside @lobu/connector-sdk, ran import * as m from '@lobu/owletto-sdk' → 71 named exports forwarded, ConnectorRuntime resolves, deprecation message present in package.json.
  • bun -e "import plugin from '@lobu/owletto-openclaw'" returns the OpenClaw plugin object with id, name, description, kind, register.

Out of scope

  • @lobu/connectors itself uses Bun-specific import '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.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@buremba buremba force-pushed the fix/redirect-package-shims branch from d826807 to 401187f Compare May 4, 2026 00:04
@github-actions github-actions Bot added the triage:needs-human Triage agent escalated for human review label May 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Triage decision: needs-human

Reasons:

  • Hard gate: Submodule two-PR rule triggered by changes under packages/web/
  • Per AGENTS.md, any change under packages/web/ requires needs-human classification due to the submodule two-PR rule

Next: Assigned to @buremba for review. Manual merge required due to submodule changes.

@buremba buremba merged commit cb499fc into main May 4, 2026
16 checks passed
@buremba buremba deleted the fix/redirect-package-shims branch May 4, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:needs-human Triage agent escalated for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants