Skip to content

fix: fix cli not reading stdin#3967

Open
UziTech wants to merge 2 commits intomarkedjs:masterfrom
UziTech:fix-cli
Open

fix: fix cli not reading stdin#3967
UziTech wants to merge 2 commits intomarkedjs:masterfrom
UziTech:fix-cli

Conversation

@UziTech
Copy link
Copy Markdown
Member

@UziTech UziTech commented May 5, 2026

Marked version: 18.0.3

Markdown flavor: CLI

Description

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

@UziTech is attempting to deploy a commit to the MarkedJS Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marked-website Ready Ready Preview, Comment May 5, 2026 4:45am

Request Review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the CLI input handling and enhances the test suite with integration tests. The review identifies a compatibility risk with import.meta.dirname for Node.js versions prior to 20.11.0 and suggests reverting to the previous __dirname approach. Additionally, it notes that shell interpolation for stdin in tests is fragile and recommends using child_process.spawn for improved robustness.

Comment thread test/unit/bin.test.js
Comment thread test/unit/bin.test.js
Comment thread test/unit/bin.test.js
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.

CLI Does not Work in 18.0.3

1 participant