Coder Social home page Coder Social logo

Comments (5)

eps1lon avatar eps1lon commented on July 27, 2024

According to semver 2 pre-release versions are supposed to be ordered by dot-separated string ordering

These versions are not ordered. Consumers of canary or rc-* versions are not supposed to use any ranges (^, ~, > etc.).

If you want to get the latest RC, you can use npm view react@rc --json versio n

from react.

pgsandstrom avatar pgsandstrom commented on July 27, 2024

I dont quite understand what you mean by "these versions are not ordered". Are there instances where an older version would have a newer date string? If not, than at least our issue would be resolved by my suggestion.

I understand that it would be strange to use ranges with an rc version. I also understand that npm has tags that can be used to find canary/next/rc versions. But that is not directly related to my issue.

The basic gist is: According to semver precedence of pre-releases must be determined by string ordering. It would help us if React complied with semver.

from react.

eps1lon avatar eps1lon commented on July 27, 2024

Are there instances where an older version would have a newer date string?

Meaning they're not ordered in a SemVer sense. If your application works with one Canary version, there's no "later" version that has any guarantees whether it works.

The basic gist is: According to semver precedence of pre-releases must be determined by string ordering. It would help us if React complied with semver.

That is what I mean with "there's no ordering". Given two Canary versions, there's no right precedence which version should be chosen. The "rc", "canary", "experimental" etc in these version strings are only helpers to quickly identify what release you're working with.

They do not work by design like rc.0 or canary.0. If they are, we do release them as such e.g. 19.0.0-rc.0.

from react.

dai-shi avatar dai-shi commented on July 27, 2024

fwiw, 19.0.0-rc.0 is released https://www.npmjs.com/package/react/v/19.0.0-rc.0, but it can't be used with caret.

repro:

$ npm i 'react@^19.0.0-rc.0'
$ jq .dependencies.react package.json 
"^19.0.0-rc.0"
$ grep "resolved.*react" package-lock.json
      "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-rc-fb9a90fa48-20240614.tgz",

from react.

eps1lon avatar eps1lon commented on July 27, 2024

Right, I remembered that wrong. It was purely for a nicer display not to allow caret ranges.

from react.

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.