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+
This commit is contained in:
Ruslan Lesiutin
2023-04-19 10:05:16 +01:00
committed by GitHub
parent c6db19f9cd
commit a227bcd4f4
5 changed files with 17 additions and 7 deletions

View File

@@ -209,11 +209,11 @@ async function reviewChangelogPrompt() {
console.log(` ${chalk.bold(CHANGELOG_PATH)}`);
console.log('');
console.log('Please review the new changelog text for the following:');
console.log(' 1. Organize the list into Features vs Bugfixes');
console.log(' 1. Filter out any non-user-visible changes (e.g. typo fixes)');
console.log(' 1. Combine related PRs into a single bullet list.');
console.log(' 2. Organize the list into Features vs Bugfixes');
console.log(' 3. Combine related PRs into a single bullet list');
console.log(
' 1. Replacing the "USERNAME" placeholder text with the GitHub username(s)'
' 4. Replacing the "USERNAME" placeholder text with the GitHub username(s)'
);
console.log('');
console.log(` ${chalk.bold.green(`open ${CHANGELOG_PATH}`)}`);

View File

@@ -82,7 +82,17 @@ async function publishToNPM() {
// If so we might be resuming from a previous run.
// We could infer this by comparing the build-info.json,
// But for now the easiest way is just to ask if this is expected.
const info = await execRead(`npm view ${npmPackage}@${version}`);
const info = await execRead(`npm view ${npmPackage}@${version}`)
// Early versions of npm view gives empty response, but newer versions give 404 error.
// Catch the error to keep it consistent.
.catch(childProcessError => {
if (childProcessError.stderr.startsWith('npm ERR! code E404')) {
return null;
}
throw childProcessError;
});
if (info) {
console.log('');
console.log(