Skip to content

Commit ead3ea0

Browse files
author
Lucas Bento
authored
Merge branch 'master' into feat/allowEnteringAppName
2 parents c5fd41c + babab41 commit ead3ea0

File tree

9 files changed

+2703
-2738
lines changed

9 files changed

+2703
-2738
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!.eslintrc.js
2+
build/

.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
extends: 'react-app',
3+
plugins: ['prettier'],
4+
rules: {
5+
'prettier/prettier': 'error'
6+
}
7+
}

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44
"homepage": "https://react-native-community.github.io/upgrade-helper",
55
"license": "MIT",
66
"dependencies": {
7-
"@testing-library/react": "^8.0.2",
8-
"antd": "^3.19.1",
9-
"markdown-to-jsx": "^6.10.2",
10-
"query-string": "^6.7.0",
11-
"react": "^16.8.0",
12-
"react-content-loader": "^4.2.2",
13-
"react-diff-view": "^2.1.3",
14-
"react-dom": "^16.8.0",
15-
"react-dom-confetti": "^0.1.1",
16-
"react-ga": "^2.5.7",
17-
"react-github-btn": "^1.0.0",
7+
"@testing-library/react": "9.4.0",
8+
"antd": "3.26.5",
9+
"markdown-to-jsx": "6.10.3",
10+
"query-string": "6.9.0",
11+
"react": "16.12.0",
12+
"react-content-loader": "4.3.4",
13+
"react-diff-view": "2.4.1",
14+
"react-dom": "16.12.0",
15+
"react-dom-confetti": "0.1.3",
16+
"react-ga": "2.7.0",
17+
"react-github-btn": "1.1.1",
1818
"react-scripts": "3.0.1",
19-
"semver": "^6.0.0",
20-
"styled-components": "^4.2.0"
19+
"semver": "6.3.0",
20+
"styled-components": "4.4.1"
2121
},
2222
"devDependencies": {
23-
"eslint": "^5.16.0",
24-
"eslint-plugin-prettier": "^3.1.0",
25-
"gh-pages": "^2.0.0",
26-
"husky": "^3.0.1",
27-
"prettier": "^1.18.2",
28-
"pretty-quick": "^1.11.1"
23+
"eslint": "5.16.0",
24+
"eslint-plugin-prettier": "3.1.2",
25+
"gh-pages": "2.1.1",
26+
"husky": "3.1.0",
27+
"prettier": "1.19.1",
28+
"pretty-quick": "2.0.1"
2929
},
3030
"scripts": {
3131
"start": "react-scripts start",
@@ -51,4 +51,4 @@
5151
"last 1 safari version"
5252
]
5353
}
54-
}
54+
}

renovate.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": [
3+
"config:base"
4+
],
5+
"packageRules": [
6+
{
7+
"updateTypes": ["patch", "pin", "digest"],
8+
"automerge": true
9+
}
10+
]
11+
}

src/__tests__/components/common/__snapshots__/VersionSelector.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exports[`renders without crashing 1`] = `
1212
What's your current React Native version?
1313
</h4>
1414
<div
15-
class="ant-select-lg sc-bxivhb iYdHlP sc-bwzfXH jwfMIB ant-select ant-select-enabled ant-select-loading"
15+
class="ant-select-lg sc-bwzfXH jwfMIB sc-bxivhb iYdHlP ant-select ant-select-enabled ant-select-loading"
1616
>
1717
<div
1818
aria-autocomplete="list"
@@ -68,7 +68,7 @@ exports[`renders without crashing 1`] = `
6868
To which version would you like to upgrade?
6969
</h4>
7070
<div
71-
class="ant-select-lg sc-ifAKCX dTveGH sc-bwzfXH jwfMIB ant-select ant-select-enabled ant-select-loading"
71+
class="ant-select-lg sc-bwzfXH jwfMIB sc-ifAKCX dTveGH ant-select ant-select-enabled ant-select-loading"
7272
>
7373
<div
7474
aria-autocomplete="list"

src/components/common/DiffViewer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ const DiffViewer = ({
8080
const fetchDiff = async () => {
8181
setLoading(true)
8282

83-
const response = await (await fetch(
84-
getDiffPatchURL({ fromVersion, toVersion })
85-
)).text()
83+
const response = await (
84+
await fetch(getDiffPatchURL({ fromVersion, toVersion }))
85+
).text()
8686

8787
setDiff(
8888
parseDiff(replaceAppName(response)).sort(({ newPath }) =>

src/components/pages/Home.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState, useEffect } from 'react'
22
import styled from 'styled-components'
3-
import { Card } from 'antd'
3+
import { Alert, Card } from 'antd'
44
import GitHubButton from 'react-github-btn'
55
import ReactGA from 'react-ga'
66
import VersionSelector from '../common/VersionSelector'
@@ -31,6 +31,7 @@ const TitleContainer = styled.div`
3131
const Subtitle = styled.div({
3232
display: 'flex',
3333
alignItems: 'center',
34+
justifyContent: 'center',
3435
marginTop: 50
3536
})
3637

@@ -58,6 +59,7 @@ const Home = () => {
5859
const [fromVersion, setFromVersion] = useState('')
5960
const [toVersion, setToVersion] = useState('')
6061
const [showDiff, setShowDiff] = useState(false)
62+
const [showAppNameWarning, setAppNameWarning] = useState(false)
6163
const [settings, setSettings] = useState({
6264
[`${SHOW_LATEST_RCS}`]: false
6365
})
@@ -77,6 +79,7 @@ const Home = () => {
7779

7880
setFromVersion(fromVersion)
7981
setToVersion(toVersion)
82+
setAppNameWarning(true)
8083
setShowDiff(true)
8184
}
8285

@@ -124,11 +127,18 @@ const Home = () => {
124127
showReleaseCandidates={settings[SHOW_LATEST_RCS]}
125128
/>
126129

127-
<Subtitle>
128-
Don't forget: `RnDiffApp` is a placeholder. When upgrading, all
130+
{showAppNameWarning ? (
131+
<Subtitle>
132+
<Alert
133+
message="Don't forget: `RnDiffApp` is a placeholder. When upgrading, all
129134
instances of `RnDiffApp` should be `YourProjectName`, all `rndiffapp`
130-
should be `yourprojectname` etc.
131-
</Subtitle>
135+
should be `yourprojectname` etc."
136+
type="warning"
137+
closable
138+
onClose={() => setAppNameWarning(false)}
139+
/>
140+
</Subtitle>
141+
) : null}
132142
</Container>
133143

134144
<DiffViewer

0 commit comments

Comments
 (0)