Skip to content

Commit

Permalink
chore[devtools/release-scripts]: update messages / fixed npm view com…
Browse files Browse the repository at this point in the history
…mand usage for node 16+
  • Loading branch information
hoxyq committed Apr 18, 2023
1 parent 77d3b02 commit ff8faaf
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/chrome/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./chrome/build/unpacked');
const START_URL = argv.url || 'https://reactjs.org/';
const START_URL = argv.url || 'https://react.dev/';

chromeLaunch(START_URL, {
args: [
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/edge/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./edge/build/unpacked');
const START_URL = argv.url || 'https://reactjs.org/';
const START_URL = argv.url || 'https://react.dev/';

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

Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/firefox/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./firefox/build/unpacked');
const START_URL = argv.url || 'https://reactjs.org/';
const START_URL = argv.url || 'https://react.dev/';

const firefoxVersion = process.env.WEB_EXT_FIREFOX;

Expand Down
6 changes: 3 additions & 3 deletions scripts/devtools/prepare-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)}`);
Expand Down
12 changes: 11 additions & 1 deletion scripts/devtools/publish-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ff8faaf

Please sign in to comment.