chore[devtools/release-scripts]: update messages / fixed npm view com… (#26660)
Some minor changes, observed while working on 24.7.5 release: - Updated numeration of text instructions - `reactjs.org` -> `react.dev` - Fixed using `npm view` command for node 16+, `publish-release` script currently fails if used with node 16+
Ruslan Lesiutin committed
Apr 19, 2023 at 10:05 UTC
a227bcd4f4754b0a3f44f84e1e63a79d0ae130d3
5 files changed
+17
-7
packages/react-devtools-extensions/chrome/test.js
+1
-1
@@ -7,7 +7,7 @@ const {resolve} = require('path');
7
const {argv} = require('yargs');
8
9
const EXTENSION_PATH = resolve('./chrome/build/unpacked');
10
-const START_URL = argv.url || 'https://reactjs.org/';
10
+const START_URL = argv.url || 'https://react.dev/';
11
12
chromeLaunch(START_URL, {
13
args: [
packages/react-devtools-extensions/edge/test.js
+1
-1
@@ -9,7 +9,7 @@ const {resolve} = require('path');
9
const {argv} = require('yargs');
10
11
const EXTENSION_PATH = resolve('./edge/build/unpacked');
12
-const START_URL = argv.url || 'https://reactjs.org/';
12
+const START_URL = argv.url || 'https://react.dev/';
13
14
const extargs = `--load-extension=${EXTENSION_PATH}`;
15
packages/react-devtools-extensions/firefox/test.js
+1
-1
@@ -8,7 +8,7 @@ const {resolve} = require('path');
8
const {argv} = require('yargs');
9
10
const EXTENSION_PATH = resolve('./firefox/build/unpacked');
11
-const START_URL = argv.url || 'https://reactjs.org/';
11
+const START_URL = argv.url || 'https://react.dev/';
12
13
const firefoxVersion = process.env.WEB_EXT_FIREFOX;
14
scripts/devtools/prepare-release.js
+3
-3
@@ -209,11 +209,11 @@ async function reviewChangelogPrompt() {
209
console.log(` ${chalk.bold(CHANGELOG_PATH)}`);
210
console.log('');
211
console.log('Please review the new changelog text for the following:');
212
- console.log(' 1. Organize the list into Features vs Bugfixes');
212
console.log(' 1. Filter out any non-user-visible changes (e.g. typo fixes)');
214
- console.log(' 1. Combine related PRs into a single bullet list.');
213
+ console.log(' 2. Organize the list into Features vs Bugfixes');
214
+ console.log(' 3. Combine related PRs into a single bullet list');
215
console.log(
216
- ' 1. Replacing the "USERNAME" placeholder text with the GitHub username(s)'
216
+ ' 4. Replacing the "USERNAME" placeholder text with the GitHub username(s)'
217
);
218
console.log('');
219
console.log(` ${chalk.bold.green(`open ${CHANGELOG_PATH}`)}`);
scripts/devtools/publish-release.js
+11
-1
@@ -82,7 +82,17 @@ async function publishToNPM() {
82
// If so we might be resuming from a previous run.
83
// We could infer this by comparing the build-info.json,
84
// But for now the easiest way is just to ask if this is expected.
85
- const info = await execRead(`npm view ${npmPackage}@${version}`);
85
+ const info = await execRead(`npm view ${npmPackage}@${version}`)
86
+ // Early versions of npm view gives empty response, but newer versions give 404 error.
87
+ // Catch the error to keep it consistent.
88
+ .catch(childProcessError => {
89
+ if (childProcessError.stderr.startsWith('npm ERR! code E404')) {
90
+ return null;
91
+ }
92
+
93
+ throw childProcessError;
94
+ });
95
+
96
if (info) {
97
console.log('');
98
console.log(