esm-dev / esm.sh

A fast, smart, & global CDN for modern(es2015+) web development.
https://esm.sh
MIT License
3.14k stars 151 forks source link

README: React use `@canary` instead of `@next` dist-tag #624

Closed azu closed 1 year ago

azu commented 1 year ago

Strictly speaking, Canary is not a new release channel—it used to be called Next. However, we’ve decided to rename it to avoid confusion with Next.js. We’re announcing it as a new release channel to communicate the new expectations, such as Canaries being an officially supported way to use React. https://react.dev/blog/2023/05/03/react-canaries

It looks like that current react's @next and @canary point to same version.

npm info react

react@18.2.0 | MIT | deps: 1 | versions: 1325
React is a JavaScript library for building user interfaces.
https://reactjs.org/

keywords: react

dist
.tarball: https://registry.npmjs.org/react/-/react-18.2.0.tgz
.shasum: 555bd98592883255fa00de14f1151a917b5d77d5
.integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
.unpackedSize: 316.1 kB

dependencies:
loose-envify: ^1.1.0

maintainers:
- gaearon <dan.abramov@gmail.com>
- gnoff <jcs.gnoff@gmail.com>
- fb <opensource+npm@fb.com>
- sophiebits <npm@sophiebits.com>
- react-bot <react-core@meta.com>

dist-tags:
beta: 18.0.0-beta-24dd07bd2-20211208                 experimental: 0.0.0-experimental-7cd98ef2b-20230509  next: 18.3.0-canary-7cd98ef2b-20230509
canary: 18.3.0-canary-7cd98ef2b-20230509             latest: 18.2.0                                       rc: 18.0.0-rc.3

However, it is not clear how long @next will be maintained. It is therefore recommended to use the @canary dist-tag as an example.

import React from "https://esm.sh/react"      // 18.2.0 (latest)
import React from "https://esm.sh/react@17"   // 17.0.2
- import React from "https://esm.sh/react@next" // 18.3.0-next-3de926449-20220927
+ import React from "https://esm.sh/react@canary" // 18.3.0-canary-7cd98ef2b-20230509
ije commented 1 year ago

@azu thanks for the info, just updated