Skip to content

fix(cli): fail cleanly on invalid extract --data - #25

Merged
Kikobeats merged 1 commit into
masterfrom
fix/cli-invalid-data-fail
Aug 25, 2026
Merged

fix(cli): fail cleanly on invalid extract --data#25
Kikobeats merged 1 commit into
masterfrom
fix/cli-invalid-data-fail

Conversation

@Kikobeats

Copy link
Copy Markdown
Member

Summary

  • Release failed on cli › fail footer prints FAIL on stderr
  • Invalid --data was JSON.parsed after the spinner started, so the FAIL line could miss stderr
  • Parse --data first and print Invalid --data JSON on the fail footer

Test plan

  • microlink extract https://example.com --data '{' prints FAIL and Invalid --data JSON on stderr
  • pnpm exec ava test/cli.mjs -m "fail footer*" passes

Made with Cursor

JSON.parse ran after the spinner started, so the FAIL
footer could miss stderr when the process exited.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 34 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 991a608e-2ff1-4dd4-a61d-649f72229c0b

📥 Commits

Reviewing files that changed from the base of the PR and between a6da33a and 4e96b6c.

📒 Files selected for processing (2)
  • packages/core/bin/index.js
  • packages/core/test/cli.mjs

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.

@Kikobeats
Kikobeats merged commit c8ac889 into master Aug 25, 2026
8 checks passed
@Kikobeats
Kikobeats deleted the fix/cli-invalid-data-fail branch August 25, 2026 07:11
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 32820309351

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-0.01%) to 76.287%

Details

  • Coverage decreased (-0.01%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (10 of 11 lines covered, 90.91%).
  • 1 coverage regression across 1 file.

Uncovered Changes

File Changed Covered %
packages/core/bin/index.js 11 10 90.91%

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
packages/core/bin/index.js 1 78.25%

Coverage Stats

Coverage Status
Relevant Lines: 4721
Covered Lines: 3607
Line Coverage: 76.4%
Relevant Branches: 719
Covered Branches: 543
Branch Coverage: 75.52%
Branches in Coverage %: Yes
Coverage Strength: 13.75 hits per line

💛 - Coveralls

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.

2 participants