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

chore: replace didyoumean with leven #104

Merged
merged 1 commit into from Jan 20, 2021

Conversation

saideepesh000
Copy link
Contributor

@saideepesh000 saideepesh000 commented Jan 18, 2021

What kind of change does this PR introduce?
Dependency migration.

Did you add tests for your changes?
No(If I need to add, where should be the first steps to start from).

If relevant, did you update the documentation?
No

Summary

To give suggestions to unknown commands we used didyoumean.js, however, it seems like it's not maintained anymore, so we're using leven.

Issue: #101

Does this PR introduce a breaking change?
This might work differently than the previous solution because each had their own implementations.

@welcome
Copy link

welcome bot commented Jan 18, 2021

Thanks for opening this pull request! Please check out our contributing guidelines.

@jamesgeorge007 jamesgeorge007 linked an issue Jan 20, 2021 that may be closed by this pull request
@jamesgeorge007 jamesgeorge007 added this to In progress in Roadmap via automation Jan 20, 2021
@jamesgeorge007 jamesgeorge007 changed the title refactor: replace didyoumean with leven chore: replace didyoumean with leven Jan 20, 2021
@jamesgeorge007 jamesgeorge007 marked this pull request as ready for review January 20, 2021 07:58
Roadmap automation moved this from In progress to Reviewer approved Jan 20, 2021
@jamesgeorge007 jamesgeorge007 merged commit f385459 into madlabsinc:next Jan 20, 2021
Roadmap automation moved this from Reviewer approved to Done Jan 20, 2021
@welcome
Copy link

welcome bot commented Jan 20, 2021

congrats
Congrats on your very first contribution 👏 Looking forward to having more from your side

@jamesgeorge007
Copy link
Member

Feel free to add a test case here:-

test('suggests the closest match', async t => {
  const { stderr, stdout } = await run(['inti'], { reject: false });
  t.is(stderr.trim(), 'Unknown command inti.');
  t.true(stdout.includes('Did you mean init?'));
});

@madlabsinc madlabsinc deleted a comment from saideepesh000 Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Roadmap
  
Done
Development

Successfully merging this pull request may close these issues.

Replace didyoumean with leven
2 participants