@samitouri / QOS-React / commits / 35b63ca90d

[ci:compiler] Only add latest tag to non-experimental (#31288)

It turns out npm sets the latest tag by default so simply removing it didn't change the previous behavior. The `latest` tag is typically used for stable release versions, and other tags for unstable versions such as prereleases. Since the compiler is still in prerelease, let's set the latest tag only for non-experimental releases to help signal which version is the safest to try out. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31288). * #31289 * __->__ #31288

lauren committed Oct 18, 2024 at 13:24 UTC 35b63ca90db4d5abe3bba6e5a47466d2c7b5a836
1 file changed +15
compiler/scripts/release/publish.js
+15
@@ -163,6 +163,21 @@ async function main() {
163 if (otp != null) {
164 opts.push(`--otp=${otp}`);
165 }
166 + /**
167 + * Typically, the `latest` tag is reserved for stable package versions. Since the the compiler
168 + * is still pre-release, until we have a stable release let's only add the
169 + * `latest` tag to non-experimental releases.
170 + *
171 + * `latest` is added by default, so we only override it for experimental releases so that
172 + * those don't get the `latest` tag.
173 + *
174 + * TODO: Update this when we have a stable release.
175 + */
176 + if (argv.tag === 'experimental') {
177 + opts.push('--tag=experimental');
178 + } else {
179 + opts.push('--tag=latest');
180 + }
181 try {
182 await spawnHelper(
183 'npm',