Coder Social home page Coder Social logo

Comments (12)

amio avatar amio commented on July 17, 2024 2

๐Ÿ‘† Should add this to knowledge base.

from badgen.net.

amio avatar amio commented on July 17, 2024 1

Weird, @nestjs/core/* stop working for me now ๐Ÿค”

I used to get latest from full meta list, then turn to that tricky method(use /* to get latest only) to reduce response size, seems we need to go back again ๐Ÿคจ

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024 1

No problem, i'm working on that.

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024 1

just a note for curious devs working with the NPM API:
endpoint registry.npmjs.org/[pkg-name]

a) with scoped packages there is no /latest, but have /dist-tag-name
b) for not scoped ones is exactly the opposite - there IS /latest, but not have /dist-tag-name

pahahahaha

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024

So.. it seems the api currently works as expected both for scoped and non-scoped ones?

So we can just request registry.npmjs.org/[pkg-name]

and get dist-tag field, and get version from there dist-tag.latest by default.

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024

AHA! Got it... /latest does not work for the scoped ones :D

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024

The interesting thing in that API is that the problem is only when /latest otherwise it works for other tags like /@nestjs/core/next ๐Ÿ˜† but not for /@nestjs/core/latest.

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024

Watafak /next gives me error (get not allowed method), no matter what package (except scoped ones).. ๐Ÿคฃ

from badgen.net.

amio avatar amio commented on July 17, 2024

๐Ÿ˜‚npm registry:

1488583772894

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024

hahaaha

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024

I don't know how some people build such APIs ;d

from badgen.net.

tunnckoCore avatar tunnckoCore commented on July 17, 2024

Just realized, that if you want to get another tag, you just can do it with another endpoint, like it is able for the latest tag.

So in case we recieve different than latest, we will trigger (only then) the full metadata and get it from dist-tags...

from badgen.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.