[cli] Turn off validate-def checks against npm #4249
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hear me out, this is the beginning of a series of changes. After having a read of #87 and then testing
validate-def
I found that the testing against npmjs doesn't actually work. It usesgot
to ping npmjs.com but because it's hitting a website even if the website says 404 the website itself it a 200 response. Furthermore hitting a website like crazy reaches aHTTPError: Response code 429 (Too Many Requests)
error. I've changed this to useapi.npms.io/v2/
instead which can support the load and will reliably return with whether the request succeeds or fails.But the code using a mix of then/catch + async/await doesn't actually work properly, even if the
got
reaches a 404 it still ends sayingAll libdefs are named and structured correctly
.Finally there is one library called
core.es5
that was added 2 years ago and isn't actually an npm library, because of this it is meant to fail but it's perfectly valid given the reason it's there but it's not in the right place (definitions/npm
) and as a result I cannot have the npmjs check working until we've shifted the definition somewhere else (I'm thinkingdefinitions/core
but I'll raise a discussion around this first).What this PR does
Turn off the npmjs part of the validation to improve speed as we improve other areas to allow it turn back on.