Skip to content

Commit 0748616

Browse files
committed
Fix workflows and monorepo deps
* Remove 'react' packages from monorepo dependencies. * Ensure 'react-native-web' package is built first.
1 parent e9badc3 commit 0748616

File tree

11 files changed

+63
-87
lines changed

11 files changed

+63
-87
lines changed

.codesandbox/ci.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packages": ["packages/react-native-web", "packages/babel-plugin-react-native-web"],
3-
"buildCommand": "compile",
3+
"buildCommand": "build",
44
"sandboxes": ["/packages/react-native-web-examples/"],
55
"node": "16"
66
}

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Fork, then clone the repo:
1414
git clone https://github.com/your-username/react-native-web.git
1515
```
1616

17-
Install dependencies (requires Node.js >= 14.0):
17+
Install dependencies (requires Node.js >= 16.0):
1818

1919
```
2020
npm install
@@ -86,7 +86,7 @@ Run all the automated tests:
8686
npm run test
8787
```
8888

89-
### New Features
89+
## New Features
9090

9191
Please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.
9292

.github/workflows/performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/checkout@v2
1010
- uses: necolas/compressed-size-action@master
1111
with:
12-
build-script: "build -w react-native-web"
12+
build-script: "compile"
1313
exclude: "./packages/react-native-web/dist/cjs/{index.js,**/*.js}"
1414
pattern: "./packages/react-native-web/dist/{index.js,**/*.js}"
1515
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/react-integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- uses: actions/setup-node@v1
1414
with:
15-
node-version: '14.x'
15+
node-version: '16.x'
1616
- run: npm install
17-
# Install next-tagged versions
18-
- run: npm update react@next react-dom@next
19-
# Only run the unit tests
17+
# Update react-native-web to use react@next
18+
- run: npm update react@next react-dom@next -w react-native-web
19+
# Run the unit tests
2020
- run: npm run unit

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v1
1616
with:
17-
node-version: '14.x'
17+
node-version: '16.x'
1818
- run: npm install
1919
- run: npm run format
2020

@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@v2
2525
- uses: actions/setup-node@v1
2626
with:
27-
node-version: '14.x'
27+
node-version: '16.x'
2828
- run: npm install
2929
- run: npm run flow
3030

@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@v2
3535
- uses: actions/setup-node@v1
3636
with:
37-
node-version: '14.x'
37+
node-version: '16.x'
3838
- run: npm install
3939
- run: npm run lint
4040

@@ -44,6 +44,6 @@ jobs:
4444
- uses: actions/checkout@v2
4545
- uses: actions/setup-node@v1
4646
with:
47-
node-version: '14.x'
47+
node-version: '16.x'
4848
- run: npm install
4949
- run: npm run unit

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Nicolas Gallagher.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Development monorepo
22

3+
This is the development monorepo for "React Native for Web" and related projects.
4+
35
## Structure
46

57
* `.github`
@@ -23,7 +25,8 @@
2325
* Use `npm run dev -w <package-name>` to run the dev script for a specific package.
2426
* `test`
2527
* Use `npm run test` to run tests for every package.
26-
* Use `npm run test` to run tests for every package.
28+
29+
More details can be found in the contributing guide below.
2730

2831
## Contributing
2932

package-lock.json

Lines changed: 19 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"scripts": {
66
"clean": "del-cli ./packages/*/dist",
77
"build": "npm run clean && npm run build --workspaces --if-present",
8+
"compile": "npm run build",
89
"dev": "npm run dev --workspaces --if-present",
910
"flow": "flow --flowconfig-name ./configs/.flowconfig",
1011
"format": "prettier --check --ignore-path ./configs/.prettierignore \"**/*.js\"",
@@ -55,12 +56,10 @@
5556
"lint-staged": "^10.5.4",
5657
"minimist": "^1.2.6",
5758
"npm-run-all": "^4.1.3",
58-
"prettier": "^2.2.1",
59-
"react": "^17.0.2",
60-
"react-dom": "^17.0.2",
61-
"react-test-renderer": "^17.0.2"
59+
"prettier": "^2.2.1"
6260
},
6361
"workspaces": [
62+
"packages/react-native-web",
6463
"packages/*"
6564
],
6665
"husky": {

packages/benchmarks/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
"scripts": {
66
"clean": "del-cli ./dist",
77
"build": "NODE_ENV=production npm run dev",
8-
"dev": "npm run clean && mkdir -p dist && cp -f index.html dist/index.html && ./node_modules/.bin/webpack-cli --config ./webpack.config.js"
8+
"dev": "npm run clean && mkdir -p dist && cp -f index.html dist/index.html && webpack --config ./webpack.config.js"
99
},
1010
"dependencies": {
1111
"classnames": "^2.3.1",
1212
"d3-scale-chromatic": "^2.0.0",
13+
"react": ">=17.0.2",
14+
"react-dom": ">=17.0.2",
1315
"react-native-web": "0.18.3"
1416
},
1517
"devDependencies": {

0 commit comments

Comments
 (0)