Skip to content

feat: add registry search response types - #212

Open
pengyuayn wants to merge 1 commit into
npm:mainfrom
pengyuayn:feat/search-api-response-types
Open

feat: add registry search response types#212
pengyuayn wants to merge 1 commit into
npm:mainfrom
pengyuayn:feat/search-api-response-types

Conversation

@pengyuayn

Copy link
Copy Markdown

Summary

  • Add exported TypeScript types for the npm registry /-/v1/search response.
  • Model search packages, score details, flags, publisher/maintainer users, trusted publisher metadata, and downloads/dependents fields from the live registry response.
  • Add a regression test that fetches a real search response and type-checks it against SearchResponse.

References

Closes #28

Validation

  • npx tap test/search.ts
  • npm run eslint -- test/search.ts types/index.d.ts
  • git diff --check

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.

[BUG] Add types for search API responses

1 participant