File tree Expand file tree Collapse file tree 7 files changed +69
-27
lines changed
packages/react-native-web/src Expand file tree Collapse file tree 7 files changed +69
-27
lines changed Original file line number Diff line number Diff line change 1
- name : compressed-size
1
+ name : performance
2
+
2
3
on : [pull_request]
4
+
3
5
jobs :
4
- build :
6
+ compressed-size :
5
7
runs-on : ubuntu-latest
6
8
steps :
7
9
- uses : actions/checkout@v2
Original file line number Diff line number Diff line change
1
+ name : test
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " master"
7
+ pull_request :
8
+ types : [opened, synchronize, reopened]
9
+
10
+ jobs :
11
+ format :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ - uses : actions/setup-node@v1
16
+ with :
17
+ node-version : ' 14.x'
18
+ - run : npm install -g yarn
19
+ - run : yarn install
20
+ - run : yarn fmt:report
21
+
22
+ type-check :
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - uses : actions/checkout@v2
26
+ - uses : actions/setup-node@v1
27
+ with :
28
+ node-version : ' 14.x'
29
+ - run : npm install -g yarn
30
+ - run : yarn install
31
+ - run : yarn flow
32
+
33
+ lint :
34
+ runs-on : ubuntu-latest
35
+ steps :
36
+ - uses : actions/checkout@v2
37
+ - uses : actions/setup-node@v1
38
+ with :
39
+ node-version : ' 14.x'
40
+ - run : npm install -g yarn
41
+ - run : yarn install
42
+ - run : yarn lint:report
43
+
44
+ unit-test :
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ - uses : actions/checkout@v2
48
+ - uses : actions/setup-node@v1
49
+ with :
50
+ node-version : ' 14.x'
51
+ - run : npm install -g yarn
52
+ - run : yarn install
53
+ - run : yarn jest
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -208,8 +208,8 @@ MIT license.
208
208
209
209
[ package-badge ] : https://img.shields.io/npm/v/react-native-web.svg?style=flat
210
210
[ package-url ] : https://yarnpkg.com/en/package/react-native-web
211
- [ ci-badge ] : https://travis-ci.org /necolas/react-native-web.svg?branch=master
212
- [ ci-url ] : https://travis-ci.org /necolas/react-native-web
211
+ [ ci-badge ] : https://github.com /necolas/react-native-web/workflows/test/badge .svg
212
+ [ ci-url ] : https://github.com /necolas/react-native-web/actions
213
213
[ react-native-url ] : https://facebook.github.io/react-native/
214
214
[ contributing-url ] : https://github.com/necolas/react-native-web/blob/master/.github/CONTRIBUTING.md
215
215
[ good-first-issue-url ] : https://github.com/necolas/react-native-web/labels/good%20first%20issue
Original file line number Diff line number Diff line change 13
13
"docs:release" : " cd packages/docs && yarn release" ,
14
14
"flow" : " flow" ,
15
15
"fmt" : " prettier --write \" **/*.js\" " ,
16
+ "fmt:report" : " prettier --check \" **/*.js\" " ,
16
17
"jest" : " jest --config ./scripts/jest/config.js" ,
17
- "lint" : " yarn lint:check --fix" ,
18
- "lint:check " : " eslint packages scripts" ,
18
+ "lint" : " yarn lint:report --fix" ,
19
+ "lint:report " : " eslint packages scripts" ,
19
20
"precommit" : " lint-staged" ,
20
21
"prerelease" : " yarn test && yarn compile && yarn compile:commonjs" ,
21
22
"release" : " node ./scripts/release/publish.js" ,
22
23
"postrelease" : " yarn benchmarks:release && yarn docs:release" ,
23
- "test" : " yarn flow && yarn lint:check && yarn jest --runInBand"
24
+ "test" : " yarn flow && yarn lint:report && yarn jest --runInBand"
24
25
},
25
26
"devDependencies" : {
26
27
"@babel/cli" : " ^7.8.4" ,
Original file line number Diff line number Diff line change @@ -418,10 +418,14 @@ describe('components/Modal', () => {
418
418
419
419
function TestComponent ( ) {
420
420
React . useEffect ( ( ) => spy ( 'mount' ) , [ ] ) ;
421
- return < Modal visible = { true } > < a ref = { ( ref ) => ref ? spy ( 'ref' ) : spy ( 'noref' ) } /> </ Modal > ;
421
+ return (
422
+ < Modal visible = { true } >
423
+ < a ref = { ref => ( ref ? spy ( 'ref' ) : spy ( 'noref' ) ) } />
424
+ </ Modal >
425
+ ) ;
422
426
}
423
427
424
- render ( < TestComponent /> )
428
+ render ( < TestComponent /> ) ;
425
429
426
430
expect ( spy ) . toHaveBeenNthCalledWith ( 1 , 'ref' ) ;
427
431
expect ( spy ) . toHaveBeenNthCalledWith ( 2 , 'mount' ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import * as React from 'react';
11
11
import mergeRefs from '../mergeRefs' ;
12
12
13
13
export default function useMergeRefs ( ...args : $ReadOnlyArray < React . ElementRef < any >> ) {
14
- // TODO(memoize) #1755
15
14
return React . useMemo (
16
15
( ) => mergeRefs ( ...args ) ,
17
16
// eslint-disable-next-line
You can’t perform that action at this time.
0 commit comments