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

Fix types #80

Merged
merged 13 commits into from Feb 24, 2024
Merged

Conversation

tommy-mitchell
Copy link
Contributor

@tommy-mitchell tommy-mitchell commented Feb 22, 2024

Fixes #62.

I've gone through https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md and updated the registry types to match (though it seems a little outdated, see https://docs.npmjs.com/about-registry-signatures or npm/registry#24). I've also updated the return type of packageJson to match the options provided.

Type tests are failing due to a tsd issue, need to make a PR to add an error code.

@tommy-mitchell
Copy link
Contributor Author

Did some manual testing of outputs and added a few more undocumented fields. Think this is good for review.

Not sure what's up with the failing CI, I can't reproduce the errors locally.

@tommy-mitchell tommy-mitchell marked this pull request as ready for review February 23, 2024 04:57
@tommy-mitchell
Copy link
Contributor Author

tommy-mitchell commented Feb 23, 2024

Think I figured it out - packageJson({fullMetadata: false}) returns FullVersion, which has [key: string]: unknown:

image

Not sure why that wasn't resolving like that locally for me, though.

@tommy-mitchell
Copy link
Contributor Author

tommy-mitchell commented Feb 23, 2024

Another missing tsd code (tsdjs/tsd#211):

Found an error that tsd does not currently support (ts18046)

I didn't even realize they went that high.

@tommy-mitchell
Copy link
Contributor Author

Tests are passing now!

@sindresorhus sindresorhus merged commit f217ebe into sindresorhus:main Feb 24, 2024
2 checks passed
@tommy-mitchell
Copy link
Contributor Author

@sindresorhus this was my last PR :)

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.

AbbreviatedMetadata type is incorrect
2 participants