package.json-validator icon indicating copy to clipboard operation
package.json-validator copied to clipboard

🚀 Feature: Switch from optimist (deprecated) to yargs

Open altano opened this issue 10 months ago • 4 comments

We don't need to get into a conversation about whether warnings like this are helpful or not, but they are happening.

My latest one was from pulling in eslint-plugin-package-json, because of this dependency chain:

eslint-plugin-package-json 0.12.0
└─┬ package-json-validator 0.6.3
  └─┬ optimist 0.6.1
    └── minimist 0.0.10

It looks like package-json-validator would benefit from either moving from optimist (deprecated) to directly using an updated version of minimist or switching to something like yargs.

altano avatar Apr 01 '24 01:04 altano

+1

de-don avatar May 23 '24 09:05 de-don

Oop, sorry for the delay! Agreed. Using deprecated dependencies isn't good.

Per https://www.npmjs.com/package/optimist:

I don't want to maintain this module anymore since I just use minimist, the argument parsing engine, directly instead nowadays.

See yargs for the modern, pirate-themed successor to optimist.

minimist does a good bit less than what this currently uses optimist for. So I'd say let's move to yargs. 👍 accepting PRs!

JoshuaKGoldberg avatar Jul 11 '24 02:07 JoshuaKGoldberg

@JoshuaKGoldberg I have opened PR, please check it :)

de-don avatar Sep 12 '24 19:09 de-don

Great! I get a notification for every comment, issue, and PR in this repo - so any PR that gets sent effectively tags me. I'll look soon!

JoshuaKGoldberg avatar Sep 12 '24 20:09 JoshuaKGoldberg