Skip to content

Rename "next" prerelease channel to "canary" #26761

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

Merged
merged 1 commit into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -605,18 +605,28 @@ workflows:
when: << pipeline.parameters.prerelease_commit_sha >>
jobs:
- publish_prerelease:
name: Publish to Next channel
name: Publish to Canary channel
commit_sha: << pipeline.parameters.prerelease_commit_sha >>
release_channel: stable
dist_tag: "next"
# The tags to use when publishing canaries. The main one we should
# always include is "canary" but we can use multiple (e.g. alpha,
# beta, rc). To declare multiple, use a comma-separated string, like
# this:
# dist_tag: "canary,alpha,beta,rc"
#
# TODO: We currently tag canaries with "next" in addition to "canary"
# because this used to be called the "next" channel and some
# downstream consumers might still expect that tag. We can remove this
# after some time has elapsed and the change has been communicated.
dist_tag: "canary,next"
- publish_prerelease:
name: Publish to Experimental channel
requires:
# NOTE: Intentionally running these jobs sequentially because npm
# will sometimes fail if you try to concurrently publish two
# different versions of the same package, even if they use different
# dist tags.
- Publish to Next channel
- Publish to Canary channel
commit_sha: << pipeline.parameters.prerelease_commit_sha >>
release_channel: experimental
dist_tag: experimental
Expand All @@ -634,7 +644,7 @@ workflows:
- main
jobs:
- publish_prerelease:
name: Publish to Next channel
name: Publish to Canary channel
commit_sha: << pipeline.git.revision >>
release_channel: stable
dist_tag: "next"
Expand All @@ -645,7 +655,7 @@ workflows:
# will sometimes fail if you try to concurrently publish two
# different versions of the same package, even if they use different
# dist tags.
- Publish to Next channel
- Publish to Canary channel
commit_sha: << pipeline.git.revision >>
release_channel: experimental
dist_tag: experimental
20 changes: 12 additions & 8 deletions ReactVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,26 @@
//
// The @latest channel uses the version as-is, e.g.:
//
// 18.0.0
// 18.3.0
//
// The @next channel appends additional information, with the scheme
// The @canary channel appends additional information, with the scheme
// <version>-<label>-<commit_sha>, e.g.:
//
// 18.0.0-alpha-a1c2d3e4
// 18.3.0-canary-a1c2d3e4
//
// The @experimental channel doesn't include a version, only a date and a sha, e.g.:
//
// 0.0.0-experimental-241c4467e-20200129

const ReactVersion = '18.3.0';

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

const stablePackages = {
'eslint-plugin-react-hooks': '5.0.0',
Expand All @@ -40,14 +44,14 @@ const stablePackages = {
scheduler: '0.24.0',
};

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

module.exports = {
ReactVersion,
nextChannelLabel,
canaryChannelLabel,
stablePackages,
experimentalPackages,
};
6 changes: 3 additions & 3 deletions fixtures/devtools/regression/canary.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<script src="https://unpkg.com/scheduler@canary/umd/scheduler-tracing.development.js"></script>
<script src="https://unpkg.com/react@canary/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@canary/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/react-cache@next/umd/react-cache.development.js"></script>
<script src="https://unpkg.com/react-cache@canary/umd/react-cache.development.js"></script>

<!-- Don't use this in production: -->
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>
Expand All @@ -38,4 +38,4 @@
Learn more at https://reactjs.org/docs/getting-started.html
-->
</body>
</html>
</html>
14 changes: 7 additions & 7 deletions fixtures/devtools/regression/next.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
__REACT_DEVTOOLS_GLOBAL_HOOK__ = parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
</script>

<script src="https://unpkg.com/scheduler@next/umd/scheduler.development.js"></script>
<script src="https://unpkg.com/scheduler@next/umd/scheduler-tracing.development.js"></script>
<script src="https://unpkg.com/react@next/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@next/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/react-cache@next/umd/react-cache.development.js"></script>
<script src="https://unpkg.com/scheduler@canary/umd/scheduler.development.js"></script>
<script src="https://unpkg.com/scheduler@canary/umd/scheduler-tracing.development.js"></script>
<script src="https://unpkg.com/react@canary/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@canary/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/react-cache@canary/umd/react-cache.development.js"></script>

<!-- Don't use this in production: -->
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>
Expand All @@ -38,4 +38,4 @@
Learn more at https://reactjs.org/docs/getting-started.html
-->
</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
const {execRead, logPromise} = require('../utils');

const run = async () => {
const version = await execRead('npm info react@next version');
const version = await execRead('npm info react@canary version');

return version;
};

module.exports = async params => {
return logPromise(run(params), 'Determining latest "next" release version');
return logPromise(run(params), 'Determining latest "canary" release version');
};
16 changes: 8 additions & 8 deletions scripts/rollup/build-all-release-channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {
ReactVersion,
stablePackages,
experimentalPackages,
nextChannelLabel,
canaryChannelLabel,
} = require('../../ReactVersions');

// Runs the build script for both stable and experimental release channels,
Expand Down Expand Up @@ -127,7 +127,7 @@ function processStable(buildDir) {
const version = stablePackages[moduleName];
versionsMap.set(
moduleName,
version + '-' + nextChannelLabel + '-' + sha + '-' + dateString,
version + '-' + canaryChannelLabel + '-' + sha + '-' + dateString,
defaultVersionIfNotFound
);
}
Expand All @@ -140,7 +140,7 @@ function processStable(buildDir) {
fs.renameSync(buildDir + '/node_modules', buildDir + '/oss-stable');
updatePlaceholderReactVersionInCompiledArtifacts(
buildDir + '/oss-stable',
ReactVersion + '-' + nextChannelLabel + '-' + sha + '-' + dateString
ReactVersion + '-' + canaryChannelLabel + '-' + sha + '-' + dateString
);

// Now do the semver ones
Expand Down Expand Up @@ -191,16 +191,16 @@ function processStable(buildDir) {
reactNativeBuildDir,
ReactVersion +
'-' +
nextChannelLabel +
canaryChannelLabel +
'-' +
hash.digest('hex').slice(0, 8)
);
}

// Update remaining placeholders with next channel version
// Update remaining placeholders with canary channel version
updatePlaceholderReactVersionInCompiledArtifacts(
buildDir,
ReactVersion + '-' + nextChannelLabel + '-' + sha + '-' + dateString
ReactVersion + '-' + canaryChannelLabel + '-' + sha + '-' + dateString
);

if (fs.existsSync(buildDir + '/sizes')) {
Expand Down Expand Up @@ -251,10 +251,10 @@ function processExperimental(buildDir, version) {
);
}

// Update remaining placeholders with next channel version
// Update remaining placeholders with canary channel version
updatePlaceholderReactVersionInCompiledArtifacts(
buildDir,
ReactVersion + '-' + nextChannelLabel + '-' + sha + '-' + dateString
ReactVersion + '-' + canaryChannelLabel + '-' + sha + '-' + dateString
);

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