Skip to content

fix: change diff links for upgrade command #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2019
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
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"es6": true,
"jest": true,
"node": true
},
"rules": {
"prettier/prettier": [2, "fb"]
}
},
"jest": {
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/commands/runAndroid/runOnAllDevices.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @flow
*/


import {spawnSync, execFileSync} from 'child_process';
import logger from '../../tools/logger';
import adb from './adb';
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/commands/upgrade/__tests__/upgrade.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ test('fetches regular patch, adds remote, applies patch, installs deps, removes
expect(flushOutput()).toMatchInlineSnapshot(`
"info Fetching diff between v0.57.8 and v0.58.4...
[fs] write tmp-upgrade-rn.patch
$ execa git remote add tmp-rn-diff-purge https://github.com/pvinis/rn-diff-purge.git
$ execa git remote add tmp-rn-diff-purge https://github.com/react-native-community/rn-diff-purge.git
$ execa git fetch --no-tags tmp-rn-diff-purge
$ execa git apply --check tmp-upgrade-rn.patch --exclude=package.json -p2 --3way
info Applying diff...
Expand Down Expand Up @@ -179,14 +179,14 @@ test('cleans up if patching fails,', async () => {
expect(flushOutput()).toMatchInlineSnapshot(`
"info Fetching diff between v0.57.8 and v0.58.4...
[fs] write tmp-upgrade-rn.patch
$ execa git remote add tmp-rn-diff-purge https://github.com/pvinis/rn-diff-purge.git
$ execa git remote add tmp-rn-diff-purge https://github.com/react-native-community/rn-diff-purge.git
$ execa git fetch --no-tags tmp-rn-diff-purge
$ execa git apply --check tmp-upgrade-rn.patch --exclude=package.json -p2 --3way
info Applying diff (excluding: package.json, .flowconfig)...
$ execa git apply tmp-upgrade-rn.patch --exclude=package.json --exclude=.flowconfig -p2 --3way
error: .flowconfig: does not exist in index
error Automatically applying diff failed
info Here's the diff we tried to apply: https://github.com/pvinis/rn-diff-purge/compare/version/0.57.8...version/0.58.4
info Here's the diff we tried to apply: https://github.com/react-native-community/rn-diff-purge/compare/version/0.57.8...version/0.58.4
info You may find release notes helpful: https://github.com/facebook/react-native/releases/tag/v0.58.4
[fs] unlink tmp-upgrade-rn.patch
warn Continuing after failure. Most of the files are upgraded but you will need to deal with some conflicts manually
Expand Down
8 changes: 5 additions & 3 deletions packages/cli/src/commands/upgrade/upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ type FlagsT = {
legacy: boolean,
};

const rnDiffPurgeUrl = 'https://github.com/pvinis/rn-diff-purge';
const rnDiffPurgeUrl =
'https://github.com/react-native-community/rn-diff-purge';

const getLatestRNVersion = async (): Promise<string> => {
logger.info('No version passed. Fetching latest...');
Expand Down Expand Up @@ -52,7 +53,7 @@ const getPatch = async (currentVersion, newVersion, projectDir) => {
`Failed to fetch diff for react-native@${newVersion}. Maybe it's not released yet?`,
);
logger.info(
'For available releases to diff see: https://github.com/pvinis/rn-diff-purge#version-changes',
'For available releases to diff see: https://github.com/react-native-community/rn-diff-purge#version-changes',
);
return null;
}
Expand Down Expand Up @@ -187,7 +188,8 @@ async function upgrade(argv: Array<string>, ctx: ContextT, args: FlagsT) {
if (args.legacy) {
return legacyUpgrade.func(argv, ctx);
}
const rnDiffGitAddress = 'https://github.com/pvinis/rn-diff-purge.git';
const rnDiffGitAddress =
'https://github.com/react-native-community/rn-diff-purge.git';
const tmpRemote = 'tmp-rn-diff-purge';
const tmpPatchFile = 'tmp-upgrade-rn.patch';
const projectDir = ctx.root;
Expand Down