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

allow for passing object keys to searchopts to allow pagination #2303

Merged
merged 4 commits into from
Dec 8, 2020

Conversation

nlf
Copy link
Contributor

@nlf nlf commented Dec 8, 2020

our search endpoint wants the query parameter ?from=2, for example, in order to do offsets for pagination purposes. we currently have no way to express that.

this is the shortest path to resolving that problem, by allowing users to pass --searchopts=from=2, parsing it as a query parameter, and then passing that resulting object to libnpmsearch

there's a corresponding pull request for libnpmsearch to ensure that this nested opts parameter gets used.

References

Related to npm/libnpmsearch#6

@nlf nlf requested a review from a team as a code owner December 8, 2020 22:05
@darcyclarke darcyclarke added Release 7.x work is associated with a specific npm 7 release release: next These items should be addressed in the next release labels Dec 8, 2020
isaacs and others added 4 commits December 8, 2020 15:48
Fixes prototype pollution issue
Update to accept query params as options, so we can paginate.
@isaacs isaacs changed the base branch from latest to release/v7.1.1 December 8, 2020 23:57
@isaacs isaacs merged commit 3db90d9 into release/v7.1.1 Dec 8, 2020
@nlf nlf deleted the nlf/search-opts branch March 28, 2022 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: next These items should be addressed in the next release Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants