Skip to content

Commit a227bcd

Browse files
authored
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+
1 parent c6db19f commit a227bcd

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

packages/react-devtools-extensions/chrome/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const {resolve} = require('path');
77
const {argv} = require('yargs');
88

99
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/';
1111

1212
chromeLaunch(START_URL, {
1313
args: [

packages/react-devtools-extensions/edge/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {resolve} = require('path');
99
const {argv} = require('yargs');
1010

1111
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/';
1313

1414
const extargs = `--load-extension=${EXTENSION_PATH}`;
1515

packages/react-devtools-extensions/firefox/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const {resolve} = require('path');
88
const {argv} = require('yargs');
99

1010
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/';
1212

1313
const firefoxVersion = process.env.WEB_EXT_FIREFOX;
1414

scripts/devtools/prepare-release.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ async function reviewChangelogPrompt() {
209209
console.log(` ${chalk.bold(CHANGELOG_PATH)}`);
210210
console.log('');
211211
console.log('Please review the new changelog text for the following:');
212-
console.log(' 1. Organize the list into Features vs Bugfixes');
213212
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');
215215
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)'
217217
);
218218
console.log('');
219219
console.log(` ${chalk.bold.green(`open ${CHANGELOG_PATH}`)}`);

scripts/devtools/publish-release.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,17 @@ async function publishToNPM() {
8282
// If so we might be resuming from a previous run.
8383
// We could infer this by comparing the build-info.json,
8484
// 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+
8696
if (info) {
8797
console.log('');
8898
console.log(

0 commit comments

Comments
 (0)