Skip to content

Commit

Permalink
Minor variable name nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Mar 15, 2021
1 parent b331bf6 commit e6ae309
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/react-devtools-extensions/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ const build = async (tempPath, manifestPath) => {
// Pack the extension
const archive = archiver('zip', {zlib: {level: 9}});
const zipStream = createWriteStream(join(tempPath, 'ReactDevTools.zip'));
await new Promise((resolvePromise, reject) => {
await new Promise((resolvePromise, rejectPromise) => {
archive
.directory(zipPath, false)
.on('error', err => reject(err))
.on('error', err => rejectPromise(err))
.pipe(zipStream);
archive.finalize();
zipStream.on('close', () => resolvePromise());
Expand Down
12 changes: 6 additions & 6 deletions packages/react-devtools-extensions/firefox/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const {argv} = require('yargs');
const EXTENSION_PATH = resolve('./firefox/build/unpacked');
const START_URL = argv.url || 'https://reactjs.org/';

const ffVersion = process.env.WEB_EXT_FIREFOX;
const firefoxVersion = process.env.WEB_EXT_FIREFOX;

const getFFProfileName = () => {
const getFirefoxProfileName = () => {
// Keys are pulled from https://extensionworkshop.com/documentation/develop/web-ext-command-reference/#--firefox
// and profile names from https://searchfox.org/mozilla-central/source/toolkit/profile/xpcshell/head.js#96
switch (ffVersion) {
switch (firefoxVersion) {
case 'firefox':
return 'default-release';
case 'beta':
Expand All @@ -25,17 +25,17 @@ const getFFProfileName = () => {
case 'firefoxdeveloperedition':
return 'dev-edition-default';
default:
// Fall back to using the default Firefox profile for testing purposes.
// This prevents users from having to re-login-to sites before testing.
return 'default';
}
};

const main = async () => {
const finder = new Finder();

// Use default Firefox profile for testing purposes.
// This prevents users from having to re-login-to sites before testing.
const findPathPromise = new Promise((resolvePromise, rejectPromise) => {
finder.getPath(getFFProfileName(), (error, profile) => {
finder.getPath(getFirefoxProfileName(), (error, profile) => {
if (error) {
rejectPromise(error);
} else {
Expand Down
3 changes: 0 additions & 3 deletions scripts/rollup/build-all-release-channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ function updatePackageVersions(modulesDir, version) {
// Update version
packageInfo.version = version;

// Update dependency versions
if (packageInfo.dependencies) {
// Check everything under dependencies
for (const dep of Object.keys(packageInfo.dependencies)) {
// if it's a react package (available in the current repo), update the version
// TODO: is this too broad? Assumes all of the packages were built.
Expand All @@ -173,7 +171,6 @@ function updatePackageVersions(modulesDir, version) {
}
}
}
// Do the same for peerDeps
if (packageInfo.peerDependencies) {
for (const dep of Object.keys(packageInfo.peerDependencies)) {
if (allReactModuleNames.includes(dep)) {
Expand Down

0 comments on commit e6ae309

Please sign in to comment.