Skip to content

Commit 636f1c4

Browse files
committed
Rename "next" prerelease channel to "canary"
The "next" prerelease channel represents what will be published the next time we do a stable release. We publish a new "next" release every day using a timed CI workflow. When we introduced this prerelease channel a few years ago, another name we considered was "canary". But I proposed "next" instead to create a greater distinction between this channel and the "experimental" channel (which is published at the same cadence, but includes extra experimental features), because some other projects use "canary" to refer to releases that are more unstable than how we would use it. The main downside of "next" is someone might mistakenly assume the name refers to Next.js. We were aware of this risk at the time but didn't think it would be an issue in practice. However, colloquially, we've ended up referring to this as the "canary" channel anyway to avoid precisely that confusion. So after further discussion, we've agreed to rename to "canary". This affects the label used in the version string, e.g. 18.3.0-next-a1c2d3e4 => 18.3.0-canary-a1c2d3e4 as well as the npm dist tags used to publish the releases. For now, I've chosen to publish the canaries using both `@canary` and `@next` dist tags, so that downstream consumers who might depend on `@next` have time to adjust. We can remove that later after the change has been communicated.
1 parent 5dd90c5 commit 636f1c4

File tree

6 files changed

+47
-33
lines changed

6 files changed

+47
-33
lines changed

.circleci/config.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -605,18 +605,28 @@ workflows:
605605
when: << pipeline.parameters.prerelease_commit_sha >>
606606
jobs:
607607
- publish_prerelease:
608-
name: Publish to Next channel
608+
name: Publish to Canary channel
609609
commit_sha: << pipeline.parameters.prerelease_commit_sha >>
610610
release_channel: stable
611-
dist_tag: "next"
611+
# The tags to use when publishing canaries. The main one we should
612+
# always include is "canary" but we can use multiple (e.g. alpha,
613+
# beta, rc). To declare multiple, use a comma-separated string, like
614+
# this:
615+
# dist_tag: "canary,alpha,beta,rc"
616+
#
617+
# TODO: We currently tag canaries with "next" in addition to "canary"
618+
# because this used to be called the "next" channel and some
619+
# downstream consumers might still expect that tag. We can remove this
620+
# after some time has elapsed and the change has been communicated.
621+
dist_tag: "canary,next"
612622
- publish_prerelease:
613623
name: Publish to Experimental channel
614624
requires:
615625
# NOTE: Intentionally running these jobs sequentially because npm
616626
# will sometimes fail if you try to concurrently publish two
617627
# different versions of the same package, even if they use different
618628
# dist tags.
619-
- Publish to Next channel
629+
- Publish to Canary channel
620630
commit_sha: << pipeline.parameters.prerelease_commit_sha >>
621631
release_channel: experimental
622632
dist_tag: experimental
@@ -634,7 +644,7 @@ workflows:
634644
- main
635645
jobs:
636646
- publish_prerelease:
637-
name: Publish to Next channel
647+
name: Publish to Canary channel
638648
commit_sha: << pipeline.git.revision >>
639649
release_channel: stable
640650
dist_tag: "next"
@@ -645,7 +655,7 @@ workflows:
645655
# will sometimes fail if you try to concurrently publish two
646656
# different versions of the same package, even if they use different
647657
# dist tags.
648-
- Publish to Next channel
658+
- Publish to Canary channel
649659
commit_sha: << pipeline.git.revision >>
650660
release_channel: experimental
651661
dist_tag: experimental

ReactVersions.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,26 @@
77
//
88
// The @latest channel uses the version as-is, e.g.:
99
//
10-
// 18.0.0
10+
// 18.3.0
1111
//
12-
// The @next channel appends additional information, with the scheme
12+
// The @canary channel appends additional information, with the scheme
1313
// <version>-<label>-<commit_sha>, e.g.:
1414
//
15-
// 18.0.0-alpha-a1c2d3e4
15+
// 18.3.0-canary-a1c2d3e4
1616
//
1717
// The @experimental channel doesn't include a version, only a date and a sha, e.g.:
1818
//
1919
// 0.0.0-experimental-241c4467e-20200129
2020

2121
const ReactVersion = '18.3.0';
2222

23-
// The label used by the @next channel. Represents the upcoming release's
24-
// stability. Could be "alpha", "beta", "rc", etc.
25-
const nextChannelLabel = 'next';
23+
// The label used by the @canary channel. Represents the upcoming release's
24+
// stability. Most of the time, this will be "canary", but we may temporarily
25+
// choose to change it to "alpha", "beta", "rc", etc.
26+
//
27+
// It only affects the label used in the version string. To customize the
28+
// npm dist tags used during publish, refer to .circleci/config.yml.
29+
const canaryChannelLabel = 'canary';
2630

2731
const stablePackages = {
2832
'eslint-plugin-react-hooks': '5.0.0',
@@ -40,14 +44,14 @@ const stablePackages = {
4044
scheduler: '0.24.0',
4145
};
4246

43-
// These packages do not exist in the @next or @latest channel, only
47+
// These packages do not exist in the @canary or @latest channel, only
4448
// @experimental. We don't use semver, just the commit sha, so this is just a
4549
// list of package names instead of a map.
4650
const experimentalPackages = [];
4751

4852
module.exports = {
4953
ReactVersion,
50-
nextChannelLabel,
54+
canaryChannelLabel,
5155
stablePackages,
5256
experimentalPackages,
5357
};

fixtures/devtools/regression/canary.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<script src="https://unpkg.com/scheduler@canary/umd/scheduler-tracing.development.js"></script>
1616
<script src="https://unpkg.com/react@canary/umd/react.development.js"></script>
1717
<script src="https://unpkg.com/react-dom@canary/umd/react-dom.development.js"></script>
18-
<script src="https://unpkg.com/react-cache@next/umd/react-cache.development.js"></script>
19-
18+
<script src="https://unpkg.com/react-cache@canary/umd/react-cache.development.js"></script>
19+
2020
<!-- Don't use this in production: -->
2121
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
2222
</head>
@@ -38,4 +38,4 @@
3838
Learn more at https://reactjs.org/docs/getting-started.html
3939
-->
4040
</body>
41-
</html>
41+
</html>

fixtures/devtools/regression/next.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
__REACT_DEVTOOLS_GLOBAL_HOOK__ = parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
1212
</script>
1313

14-
<script src="https://unpkg.com/scheduler@next/umd/scheduler.development.js"></script>
15-
<script src="https://unpkg.com/scheduler@next/umd/scheduler-tracing.development.js"></script>
16-
<script src="https://unpkg.com/react@next/umd/react.development.js"></script>
17-
<script src="https://unpkg.com/react-dom@next/umd/react-dom.development.js"></script>
18-
<script src="https://unpkg.com/react-cache@next/umd/react-cache.development.js"></script>
19-
14+
<script src="https://unpkg.com/scheduler@canary/umd/scheduler.development.js"></script>
15+
<script src="https://unpkg.com/scheduler@canary/umd/scheduler-tracing.development.js"></script>
16+
<script src="https://unpkg.com/react@canary/umd/react.development.js"></script>
17+
<script src="https://unpkg.com/react-dom@canary/umd/react-dom.development.js"></script>
18+
<script src="https://unpkg.com/react-cache@canary/umd/react-cache.development.js"></script>
19+
2020
<!-- Don't use this in production: -->
2121
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
2222
</head>
@@ -38,4 +38,4 @@
3838
Learn more at https://reactjs.org/docs/getting-started.html
3939
-->
4040
</body>
41-
</html>
41+
</html>

scripts/release/prepare-release-from-npm-commands/get-latest-next-version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
const {execRead, logPromise} = require('../utils');
66

77
const run = async () => {
8-
const version = await execRead('npm info react@next version');
8+
const version = await execRead('npm info react@canary version');
99

1010
return version;
1111
};
1212

1313
module.exports = async params => {
14-
return logPromise(run(params), 'Determining latest "next" release version');
14+
return logPromise(run(params), 'Determining latest "canary" release version');
1515
};

scripts/rollup/build-all-release-channels.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const {
1313
ReactVersion,
1414
stablePackages,
1515
experimentalPackages,
16-
nextChannelLabel,
16+
canaryChannelLabel,
1717
} = require('../../ReactVersions');
1818

1919
// Runs the build script for both stable and experimental release channels,
@@ -127,7 +127,7 @@ function processStable(buildDir) {
127127
const version = stablePackages[moduleName];
128128
versionsMap.set(
129129
moduleName,
130-
version + '-' + nextChannelLabel + '-' + sha + '-' + dateString,
130+
version + '-' + canaryChannelLabel + '-' + sha + '-' + dateString,
131131
defaultVersionIfNotFound
132132
);
133133
}
@@ -140,7 +140,7 @@ function processStable(buildDir) {
140140
fs.renameSync(buildDir + '/node_modules', buildDir + '/oss-stable');
141141
updatePlaceholderReactVersionInCompiledArtifacts(
142142
buildDir + '/oss-stable',
143-
ReactVersion + '-' + nextChannelLabel + '-' + sha + '-' + dateString
143+
ReactVersion + '-' + canaryChannelLabel + '-' + sha + '-' + dateString
144144
);
145145

146146
// Now do the semver ones
@@ -191,16 +191,16 @@ function processStable(buildDir) {
191191
reactNativeBuildDir,
192192
ReactVersion +
193193
'-' +
194-
nextChannelLabel +
194+
canaryChannelLabel +
195195
'-' +
196196
hash.digest('hex').slice(0, 8)
197197
);
198198
}
199199

200-
// Update remaining placeholders with next channel version
200+
// Update remaining placeholders with canary channel version
201201
updatePlaceholderReactVersionInCompiledArtifacts(
202202
buildDir,
203-
ReactVersion + '-' + nextChannelLabel + '-' + sha + '-' + dateString
203+
ReactVersion + '-' + canaryChannelLabel + '-' + sha + '-' + dateString
204204
);
205205

206206
if (fs.existsSync(buildDir + '/sizes')) {
@@ -251,10 +251,10 @@ function processExperimental(buildDir, version) {
251251
);
252252
}
253253

254-
// Update remaining placeholders with next channel version
254+
// Update remaining placeholders with canary channel version
255255
updatePlaceholderReactVersionInCompiledArtifacts(
256256
buildDir,
257-
ReactVersion + '-' + nextChannelLabel + '-' + sha + '-' + dateString
257+
ReactVersion + '-' + canaryChannelLabel + '-' + sha + '-' + dateString
258258
);
259259

260260
if (fs.existsSync(buildDir + '/sizes')) {

0 commit comments

Comments
 (0)