Skip to content

fix: include CLI binaries in package build - #522

Open
kocaemre wants to merge 1 commit into
airframesio:masterfrom
kocaemre:fix/build-cli-bin
Open

fix: include CLI binaries in package build#522
kocaemre wants to merge 1 commit into
airframesio:masterfrom
kocaemre:fix/build-cli-bin

Conversation

@kocaemre

@kocaemre kocaemre commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • Adds the two package.json CLI bin targets to the tsup entry map
  • Adds a regression test that keeps package bin paths and build entries in sync

Fixes #500.

Test plan

  • npm test -- --runTestsByPath lib/package-bin.test.ts
  • npm run build
  • npx eslint tsup.config.ts lib/package-bin.test.ts
  • git diff --check

Note: I also tried the repository-wide npm run lint; it currently reports pre-existing generated/stale formatting errors outside this change (for example dist/index.d.ts, lib/DateTimeUtils.ts, and lib/utils/result_formatter.test.ts). The touched-file lint command above passes.

Summary by CodeRabbit

  • New Features

    • Added separate command-line tools for decoding ACARS data and running decoder tests.
    • The packaged command-line tools now resolve correctly when installed and executed.
  • Bug Fixes

    • Improved consistency between available command names and their packaged entry points.
  • Tests

    • Added automated checks to verify command availability, build outputs, and executable mappings.

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 24e5ae9e-7c67-435b-a369-284d54131c66

📥 Commits

Reviewing files that changed from the base of the PR and between ea962d2 and 851be8b.

📒 Files selected for processing (2)
  • lib/package-bin.test.ts
  • tsup.config.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The tsup configuration now builds the main bundle and two CLI binaries. A new test verifies that the package bin targets match the generated CLI output paths and tsup entry names.

Changes

CLI binary packaging

Layer / File(s) Summary
CLI build entries
tsup.config.ts
The tsup entry map now builds index.ts, lib/bin/acars-decoder.ts, and lib/bin/acars-decoder-test.ts.
Package target validation
lib/package-bin.test.ts
The test verifies both CLI names, their dist/bin targets, and their matching tsup entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 851be

The package will now build and ship its two already-declared CLI commands, with a regression test keeping package metadata and build entries aligned. No actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit checks the build with care
Two CLI paths now wait there
Tsup gathers each small file
Tests confirm the paths in style
Hop, hop, binaries compile!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the primary change: including CLI binaries in the package build.
Linked Issues check ✅ Passed The PR addresses issue #500 by adding both declared CLI entry points to the tsup build and generating outputs under dist/bin with paths that match package.json. The regression test checks synchronizat…
Out of Scope Changes check ✅ Passed The changes are limited to the tsup build configuration and a focused regression test. Both changes directly support issue #500.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Full details: Linked Issues check

Explanation

The PR addresses issue #500 by adding both declared CLI entry points to the tsup build and generating outputs under dist/bin with paths that match package.json. The regression test checks synchronization between the package declarations and build entries.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

Bug: tsup config doesn't build the CLI binaries declared in package.json — acars-decoder / acars-decoder-test are broken after npm install

1 participant