Skip to content

Follow the command passed to nodemon -x - #2373

Merged
webpro merged 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/nodemon-exec-alias
Nov 16, 2026
Merged

webpro merged 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/nodemon-exec-alias

Conversation

@everton-dgn

Copy link
Copy Markdown
Contributor

nodemon -x "<command>" wasn't followed the way nodemon --exec "<command>" is, so a file or dependency used only in that command was reported as unused. With "dev": "nodemon -x \"ts-node src/index.ts\"" (example), ts-node is reported as an unused dependency.

nodemon treats -x as --exec (source), so x is now an alias of exec in the plugin args.

@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/knip@2373
npm i https://pkg.pr.new/@knip/language-server@2373
npm i https://pkg.pr.new/@knip/mcp@2373

commit: d7ff306

@webpro webpro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, Éverton! Adding the alias lets -x reuse the existing --exec handling.

@webpro
webpro merged commit aac8a9d into webpro-nl:main Nov 16, 2026
33 checks passed
@webpro

webpro commented Nov 18, 2026

Copy link
Copy Markdown
Member

🚀 This pull request is included in v6.46.0. See Release 6.46.0 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

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