Skip to content

fix: add explicit export entries for community forge adapters#1041

Merged
Wirasm merged 1 commit intodevfrom
fix/binary-build-adapter-exports
Apr 10, 2026
Merged

fix: add explicit export entries for community forge adapters#1041
Wirasm merged 1 commit intodevfrom
fix/binary-build-adapter-exports

Conversation

@Wirasm
Copy link
Copy Markdown
Collaborator

@Wirasm Wirasm commented Apr 10, 2026

Summary

  • Problem: Binary builds fail — bun build --compile cannot resolve @archon/adapters/community/forge/gitea and @archon/adapters/community/forge/gitlab through the wildcard export map
  • Why it matters: Release workflow will fail on next tag push; no binaries can be built
  • What changed: Added two explicit export entries in packages/adapters/package.json for the deep subpaths
  • What did not change: The wildcard "./*" is kept for all other subpath imports

UX Journey

Before

$ bash scripts/build-binaries.sh
error: Could not resolve: "@archon/adapters/community/forge/gitea"
error: Could not resolve: "@archon/adapters/community/forge/gitlab"

After

$ bash scripts/build-binaries.sh
Building bun-darwin-arm64 → dist/binaries/archon-darwin-arm64
  [85ms]  minify
 [559ms]  bundle  1470 modules
 [241ms] compile
Build complete.

Architecture Diagram

N/A — no architectural change, just a package.json exports fix.

Label Snapshot

  • Risk: risk: low
  • Size: size: XS
  • Scope: adapters
  • Module: adapters:exports

Change Metadata

  • Change type: fix
  • Primary scope: adapters

Linked Issue

Validation Evidence (required)

# Binary build succeeds:
VERSION=0.0.1 GIT_COMMIT=test1234 TARGET=bun-darwin-arm64 OUTFILE=/tmp/archon-test bash scripts/build-binaries.sh
# Build complete.

# Binary runs correctly:
/tmp/archon-test version
# Archon CLI v0.0.1 ...
# Update available: v0.0.1 → v0.3.2 — https://...

# Quiet mode suppresses notice:
/tmp/archon-test --quiet version
# (no update notice)
  • type-check, lint, tests all unaffected (package.json exports only)

Security Impact (required)

  • New permissions/capabilities? No
  • New external network calls? No
  • Secrets/tokens handling changed? No
  • File system access scope changed? No

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Database migration needed? No

Human Verification (required)

  • Verified scenarios: Built binary from repo root, ran version command, confirmed update notice works
  • Edge cases checked: --quiet suppression, cached vs fresh fetch
  • What was not verified: Cross-platform builds (CI handles those)

Side Effects / Blast Radius (required)

  • Affected subsystems/workflows: Binary build pipeline only
  • Potential unintended effects: None — explicit entries take precedence over wildcard and resolve to the same files
  • Guardrails/monitoring: CI release workflow will validate on next release

Rollback Plan (required)

  • Fast rollback command/path: Revert the commit (removes 2 lines from package.json)
  • Feature flags: N/A
  • Observable failure symptoms: Binary build fails with "Could not resolve" errors

Risks and Mitigations

  • None — minimal, well-understood change

Summary by CodeRabbit

  • New Features
    • Gitea community forge adapter is now explicitly available for import
    • GitLab community forge adapter is now explicitly available for import

bun build --compile cannot resolve deep subpath imports through
wildcard export maps. Adding explicit entries for gitea and gitlab
adapter paths fixes binary builds.
@Wirasm Wirasm merged commit c7412fb into dev Apr 10, 2026
3 of 4 checks passed
@Wirasm Wirasm deleted the fix/binary-build-adapter-exports branch April 10, 2026 11:13
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 146dacaf-f380-425b-b7c0-69dd1383ecd1

📥 Commits

Reviewing files that changed from the base of the PR and between 6f1b72e and 137975e.

📒 Files selected for processing (1)
  • packages/adapters/package.json

📝 Walkthrough

Walkthrough

Added explicit subpath exports for ./community/forge/gitea and ./community/forge/gitlab to packages/adapters/package.json, mapping each to their corresponding source index files. This addresses bundler resolution issues with the existing wildcard export pattern.

Changes

Cohort / File(s) Summary
Package exports configuration
packages/adapters/package.json
Added explicit subpath exports for Gitea and GitLab community forge adapters to enable proper resolution during bun build --compile operations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Exports now explicit, no more hidden deep,
Gitea and GitLab from shadows leap,
The bundler's confusion melts away,
As subpaths guide the build's bright day!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/binary-build-adapter-exports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Wirasm Wirasm mentioned this pull request Apr 10, 2026
Tyone88 pushed a commit to Tyone88/Archon that referenced this pull request Apr 16, 2026
…00#1041)

bun build --compile cannot resolve deep subpath imports through
wildcard export maps. Adding explicit entries for gitea and gitlab
adapter paths fixes binary builds.
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
…00#1041)

bun build --compile cannot resolve deep subpath imports through
wildcard export maps. Adding explicit entries for gitea and gitlab
adapter paths fixes binary builds.
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.

fix: binary build fails — Gitea/GitLab adapter subpath exports not resolved by bun bundler

1 participant