Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace optimist with minimist #150

Merged
merged 4 commits into from
Oct 21, 2022
Merged

replace optimist with minimist #150

merged 4 commits into from
Oct 21, 2022

Conversation

AndreeWille
Copy link
Contributor

This replaces optimist with minimist because optimist is no longer maintained and has a security issue related to an older version of minimist. See #133

francescarpi It looks like the tests doesn't cover the import and export scripts so i was not able to test it. Also i am not familiar with redux-i18n so i didn't add new tests. On the other hand i checked with a node script that the behaviour of the two libraries are the same.

var argsOptimist = require('optimist').argv;
console.log('optimist: ', argsOptimist)

var argsMinimist = require('minimist')(process.argv.slice(2));
console.log('minimist:  ', argsMinimist)

then i ran node index.js --foo bar hello world

output:

optimist:  {
  _: [ 'hello', 'world' ],
  foo: 'bar',
  '$0': '../../.nvm/versions/node/v16.18.0/bin/node ./index.js'
}
minimist:  { _: [ 'hello', 'world' ], foo: 'bar' }

The only difference is see is $0 property in the optimist version which is missing in minimist. I am not sure about if this is an issue or if this information is not needed for redux-i18n

@francescarpi francescarpi added dependencies Pull requests that update a dependency file HACKTOBERFEST-ACCEPTED labels Oct 21, 2022
@francescarpi
Copy link
Member

Hi @AndreeWille .

It seems it works fine!
Thanks a lot.

@AndreeWille
Copy link
Contributor Author

Oh wow! That was quick! Thank you very much!

@francescarpi
Copy link
Member

I've got a problem with my "npmjs" credentials and I cannot deploy the new version, yet. It will be solved on Monday.

@AndreeWille
Copy link
Contributor Author

@francescarpi i just noticed the change is not published yet. Let me know when i can help you with anything.

@francescarpi
Copy link
Member

Hi @AndreeWille . Sorry, we had problems with our npm's account. It's solved.
I just publish the new version 1.5.25.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file HACKTOBERFEST-ACCEPTED
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants