Skip to content

Fix an error with meow in cli.js#152

Merged
stoe merged 1 commit intostoe:mainfrom
a-magdy:fix/148
Apr 17, 2026
Merged

Fix an error with meow in cli.js#152
stoe merged 1 commit intostoe:mainfrom
a-magdy:fix/148

Conversation

@a-magdy
Copy link
Copy Markdown
Contributor

@a-magdy a-magdy commented Apr 17, 2026

Description

The meow CLI parser was configured with input: [], which caused a type error (see #148). This change removes the invalid input option from the meow() call in cli.js. Additionally, the previously stubbed CLI tests (--help and --version) are now fully implemented using a child process helper, and .DS_Store is added to .gitignore.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Dependency update

Related Issues

Closes: #148

Changes Made

  • Removed the invalid input: [] option from the meow() configuration in cli.js, fixing a runtime type error
  • Implemented end-to-end CLI tests for --help and --version flags using spawnSync in test/cli.test.js
  • Added .DS_Store to .gitignore

Testing

Please describe the tests you ran and how to reproduce them:

Commands to test:
1. npm test
2. node cli.js --help
3. node cli.js --version

Checklist

  • My commits are signed with a verified signature (required)
  • I have followed the code style guidelines in this project
  • I have updated the README.md if applicable
  • I have added tests for new functionality
  • All tests pass locally (npm test, including pretest linting)
  • I have run the formatter (npm run format)
  • I have added/updated documentation for any new or changed functionality
  • My pull request title is descriptive and follows Gitmoji conventions

Additional Context

The meow library does not accept an input property in its options object. Passing input: [] caused a type error at runtime. The fix simply removes that property, letting meow handle positional input with its default behavior.

Copilot AI review requested due to automatic review settings April 17, 2026 15:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a runtime meow configuration error in the CLI entrypoint (per #148) and adds end-to-end coverage for the CLI’s --help/--version behavior.

Changes:

  • Remove invalid input: [] option from the meow() call to avoid runtime TypeError.
  • Implement CLI integration tests by spawning node cli.js for --help and --version.
  • Ignore macOS Finder metadata by adding .DS_Store to .gitignore.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
cli.js Removes unsupported meow option (input) that was causing runtime failures on newer Node versions.
test/cli.test.js Replaces stubbed CLI tests with child-process-based end-to-end assertions for --help and --version.
.gitignore Adds .DS_Store to prevent accidental commits of macOS metadata files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stoe stoe added the bug 🐛 Something not working? label Apr 17, 2026
@stoe stoe enabled auto-merge (squash) April 17, 2026 16:34
Copy link
Copy Markdown
Owner

@stoe stoe left a comment

Choose a reason for hiding this comment

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

Thank you so much for this contribution, @a-magdy
💚

@stoe stoe merged commit 0a65f0a into stoe:main Apr 17, 2026
9 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐛 Something not working?

Projects

None yet

Development

Successfully merging this pull request may close these issues.

meow throws TypeError with Node.js 22, 24, and 25 (installed via Homebrew)

3 participants