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

Adds a 'did you mean?' note when failing to find a task #94

Merged
merged 2 commits into from
Aug 16, 2020

Conversation

orta
Copy link
Contributor

@orta orta commented Jul 30, 2020

I hit this enough times with a 'close but not quite' that I figured it was worth telling me what it actually was.

package.json Outdated
@@ -34,7 +34,8 @@
"last-run": "^1.1.0",
"object.defaults": "^1.0.0",
"object.reduce": "^1.0.0",
"undertaker-registry": "^1.0.0"
"undertaker-registry": "^1.0.0",
"fast-levenshtein": "^3.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, a new dep!

I originally added this as a function to the file, but spotted that this was in the dependency tree twice and figured that it was OK to use then. Open to changing it for sure.

lib/helpers/normalizeArgs.js Outdated Show resolved Hide resolved
@phated
Copy link
Member

phated commented Jul 30, 2020

This is super cool! However, the new dependency breaks our compatibility matrix (which we are updating for our next major): https://travis-ci.org/github/gulpjs/undertaker/builds/713364594

I'm also wondering if this should be done inside the default registry and implemented as a warning log so people can ignore them.

@yocontra
Copy link
Member

Thumbs up on this - I love improving the DX and think the more of this we do the better!

@orta
Copy link
Contributor Author

orta commented Jul 30, 2020

I'm happy with moving it to the registry, in either case I updated this PR to the same major version which I found in the dep tree and used TS' algo. The string-length dependent system there fits for me.

…ep tree, and copy TypeScript's rules for min distance
@phated
Copy link
Member

phated commented Aug 16, 2020

Sorry for the delay here. It's been so long since anything was touched in undertaker that the CI needed some updates. I'm making those now and will test this in a branch.

@phated
Copy link
Member

phated commented Aug 16, 2020

Alright, tested this successfully on Travis.

I think we need to rethink the assertions in this library and possibly switch everything over to gulplog, but that's in a breaking change, so I think this is a solid "new feature" release.

Thank you for the awesome work here!

@phated phated merged commit 89c9675 into gulpjs:master Aug 16, 2020
@phated
Copy link
Member

phated commented Aug 16, 2020

Published as 1.3.0

Thanks again! 🎉

@orta
Copy link
Contributor Author

orta commented Aug 17, 2020

Welcome! Thanks for updating CI

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.

None yet

4 participants