Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module.exports = () => {
const params = commandLineArgs(paramDefinitions);

splitCommaParams(params.skipPackages);
splitCommaParams(params.onlyPackages);

return params;
};
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,6 @@ const run = async ({cwd, packages, version, ci}, versionsMap) => {
clear();

if (packages.includes('react')) {
// A separate "React version" is used for the embedded renderer version to support DevTools,
// since it needs to distinguish between different version ranges of React.
// We need to replace it as well as the "next" version number.
const buildInfoPath = join(nodeModulesPath, 'react', 'build-info.json');
const {reactVersion} = await readJson(buildInfoPath);

if (!reactVersion) {
console.error(
theme`{error Unsupported or invalid build metadata in} {path build/node_modules/react/build-info.json}` +
theme`{error . This could indicate that you have specified an outdated "next" version.}`
);
process.exit(1);
}

// We print the diff to the console for review,
// but it can be large so let's also write it to disk.
const diffPath = join(cwd, 'build', 'temp.diff');
Expand All @@ -152,10 +138,6 @@ const run = async ({cwd, packages, version, ci}, versionsMap) => {
while (afterContents.indexOf(version) >= 0) {
afterContents = afterContents.replace(version, newStableVersion);
}
// Replace inline renderer version numbers (e.g. shared/ReactVersion).
while (afterContents.indexOf(reactVersion) >= 0) {
afterContents = afterContents.replace(reactVersion, newStableVersion);
}
Comment on lines -155 to -158
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we pull all the same versions in this command, this 2nd loop is basically a no-op after the first one.

if (beforeContents !== afterContents) {
numFilesModified++;
// Using a relative path for diff helps with the snapshot test
Expand Down
1 change: 1 addition & 0 deletions scripts/release/publish-commands/parse-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const paramDefinitions = [
module.exports = () => {
const params = commandLineArgs(paramDefinitions);
splitCommaParams(params.skipPackages);
splitCommaParams(params.onlyPackages);
splitCommaParams(params.tags);
params.tags.forEach(tag => {
switch (tag) {
Expand Down
Loading