-
Notifications
You must be signed in to change notification settings - Fork 22
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
getObject()
for Yup reports types of DefinitelyTyped
#1089
Comments
I think the logic for deciding what's typed is wrong in the algolia index. npm correctly detects that there's .d.ts inside the I can see two possible improvements here:
Are you interested in investigating those? |
Oh, another problem, looks like Microsoft deleted the "create a search index" function in June: microsoft/DefinitelyTyped-tools#456 (comment) Maybe a new method is needed for determining this information: npm-search/src/typescript/index.ts Lines 24 to 40 in d99c31f
|
Thanks for noticing that, that's indeed problematic. This probably means we need to do a reindex once this is fixed to catch packages that were added to DT since |
Ok added a new issue for this, since it's a bit unrelated: #1090 |
I think @Josehower would take over 2. above, I'll let him continue here. |
getObject()
for Yup reports types of Definitely TypedgetObject()
for Yup reports types of DefinitelyTyped
Hi @Haroenv thanks for your time, I have been trying to setup the project on my machine so try to research a bit more about the problem or potential solutions to it, but I can't make the app to run locally is asking me a API key, i tried with the API key we use on one of our services but it didn't work.
Wondering how can I get that API key to make it work of if there is an specific setup that need to be done, unfortunately I didn't have success with the setup on CONTRIBUTING.md UPDATE: new error message after testing the setup on https://github.com/algolia/npm-search/blob/master/CONTRIBUTING.md |
DM me on Twitter, I can set you up with a testing account for this :) it needs large limits |
I think the TypeScript compiler will look for a bundled npm-search/src/typescript/index.ts Lines 69 to 87 in d99c31f
I.e. if a package both contains built-in TypeScript declarations and a |
That would solve the original problem in upleveled/preflight, I think: https://github.com/upleveled/preflight/blob/5af8a398ec370c79e22ab770307ec81d574c8e29/src/checks/noDependencyProblems/noDependenciesWithoutTypes.ts#L63-L67 where you're getting |
The order was chosen for performance, as DT doesn't require any extra network requests. Maybe if it's deprecated we still fall through to "included" checks, but regularly we keep DT first? |
I'm not familiar with how Algolia npm-search works, I'm kinda surprised npm-search/src/typescript/index.ts Lines 64 to 67 in d99c31f
Are Lines 64 to 67 in d99c31f
Line 134 in d99c31f
|
Maybe it's taking the current version |
Wonder if that's actually a bug / missing feature in the npm feature of adding types information to the registry: (because in this case, the cc @orta |
Probably that version of yup was published with a version of the npm CLI/pacote that hadn't implemented the RFC yet? |
If Algolia npm-search indexes all the npm packages, and there are only about 8,000 DT types, is the performance of keeping DT first significant? |
@Josehower @Haroenv Thanks for creating and merging #1091 🙌 I think this hasn't taken into account the second improvement that @Haroenv mentioned above though:
@Haroenv can you reopen this? Or should I create a new issue for this improvement? |
I think with the changed order, the point 1 no longer is needed, unless you see some cases where that would still be relevant? |
Hi @Haroenv and other maintainers 👋 Hope you are well! Thanks again for your continued effort on the projects in the Algolia ecosystem!
I'm not sure if I'm reporting this in the right place, but I wanted to reach out about what appears to be a data problem with
npm-search
index (we've only seen a single library so far):Running
index.getObject()
with the package nameyup
returns the following:However, on the npm website, the
yup
package is reported as having built-in types and the@types/yup
package has been deprecated:Both the current version and the beta version of
yup
have no"types"
or"typings"
keys in thepackage.json
:For the current
[email protected]
, there is however noindex.d.ts
in the root:But there is one in
[email protected]
:Is the npm website or Algolia's index wrong? (seems like npm website is wrong 🤔)
Our usage:
https://github.com/upleveled/preflight/blob/5af8a398ec370c79e22ab770307ec81d574c8e29/src/checks/noDependencyProblems/noDependenciesWithoutTypes.ts#L63-L67
The text was updated successfully, but these errors were encountered: