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

feat: add json api end-point with versions list #70

Merged
merged 1 commit into from
May 16, 2022

Conversation

cmengler
Copy link
Contributor

@cmengler cmengler commented May 3, 2022

I'm using melos to manage a multi-package repository -- as part of the melos publish process, it retrieves a list of all versions from https://pub.dev/packages/[package].json end-point.

This PR adds a new API route /packages/[package].json that returns a JSON payload consisting of name and a list of versions strings -- e.g. https://pub.dev/packages/unpub.json

{
  "name": "unpub",
  "versions": [
    "2.0.0",
    "1.2.2",
    "1.2.1",
    "1.2.0",
    "1.1.0",
    "1.0.0",
    "0.4.0",
    "0.3.0",
    "0.2.2",
    "0.2.1",
    "0.2.0",
    "0.1.2",
    "0.1.1+1",
    "0.1.1",
    "0.1.0",
    "0.0.1"
  ]
}

@jrc2139
Copy link

jrc2139 commented May 4, 2022

worked perfectly for me. thanks!

Copy link
Collaborator

@talisk talisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your contribution.

@talisk talisk merged commit 82e5fba into pd4d10:master May 16, 2022
@cmengler cmengler deleted the dev/add_json_versions_api branch May 18, 2022 13:41
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.

3 participants