Skip to content

Commit

Permalink
Merge remote-tracking branch 'necolas/master' into kidroca/feat/image…
Browse files Browse the repository at this point in the history
…-source-headers

# Conflicts:
#	packages/react-native-web/src/exports/Image/index.js
  • Loading branch information
kidroca committed Nov 25, 2022
2 parents e5a4597 + fa47f80 commit abbfe8f
Show file tree
Hide file tree
Showing 24 changed files with 180 additions and 111 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Thank you for contributing!
To commit, publish, and push a final version:

```
npm run release -- <version> --opt=<opt-code>
npm run release -- <version> --otp=<otp-code>
```

Release candidates or versions that you'd like to publish to npm, but do not want to produce a commit and push it to GitHub:
Expand Down
119 changes: 70 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/babel-plugin-react-native-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"registry": "https://registry.npmjs.org/"
},
"name": "babel-plugin-react-native-web",
"version": "0.18.7",
"version": "0.18.10",
"description": "Babel plugin for React Native for Web",
"main": "index.js",
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ export { default as unstable_createElement } from 'react-native-web/dist/exports
`;

exports[`Rewrite react-native to react-native-web import from "native-native": import from "native-native" 1`] = `
exports[`Rewrite react-native to react-native-web import from "react-native": import from "react-native" 1`] = `
import ReactNative from 'react-native';
import { View } from 'react-native';
import { Invalid, View as MyView } from 'react-native';
import { useLocaleContext } from 'react-native';
import * as ReactNativeModules from 'react-native';
↓ ↓ ↓ ↓ ↓ ↓
Expand All @@ -43,12 +44,13 @@ import ReactNative from 'react-native-web/dist/index';
import View from 'react-native-web/dist/exports/View';
import { Invalid } from 'react-native-web/dist/index';
import MyView from 'react-native-web/dist/exports/View';
import useLocaleContext from 'react-native-web/dist/exports/useLocaleContext';
import * as ReactNativeModules from 'react-native-web/dist/index';
`;

exports[`Rewrite react-native to react-native-web import from "native-native": import from "native-native" 2`] = `
exports[`Rewrite react-native to react-native-web import from "react-native": import from "react-native" 2`] = `
import ReactNative from 'react-native';
import { View } from 'react-native';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ const pluginTester = require('babel-plugin-tester').default;
const tests = [
// import react-native
{
title: 'import from "native-native"',
title: 'import from "react-native"',
code: `import ReactNative from 'react-native';
import { View } from 'react-native';
import { Invalid, View as MyView } from 'react-native';
import { useLocaleContext } from 'react-native';
import * as ReactNativeModules from 'react-native';`,
snapshot: true
},
{
title: 'import from "native-native"',
title: 'import from "react-native"',
code: `import ReactNative from 'react-native';
import { View } from 'react-native';
import { Invalid, View as MyView } from 'react-native';
Expand All @@ -39,6 +40,7 @@ export { StyleSheet, Text, unstable_createElement } from 'react-native';`,
export { StyleSheet, Text, unstable_createElement } from 'react-native-web';`,
snapshot: true
},
// require react-native
{
title: 'require "react-native"',
code: `const ReactNative = require('react-native');
Expand Down
4 changes: 2 additions & 2 deletions packages/benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"prop-types": "^15.6.0",
"react": ">=17.0.2",
"react-dom": ">=17.0.2",
"react-native-web": "0.18.6"
"react-native-web": "0.18.8"
},
"devDependencies": {
"babel-loader": "^8.2.5",
"babel-plugin-react-native-web": "0.18.6",
"babel-plugin-react-native-web": "0.18.8",
"css-loader": "^6.7.1",
"style-loader": "^3.3.1",
"url-loader": "^4.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-web-docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "react-native-web-docs",
"version": "0.18.7",
"version": "0.18.10",
"description": "Documentation website for React Native for Web",
"scripts": {
"dev": "eleventy --serve",
Expand Down
6 changes: 3 additions & 3 deletions packages/react-native-web-examples/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"private": true,
"name": "react-native-web-examples",
"version": "0.18.7",
"version": "0.18.10",
"scripts": {
"build": "next build",
"dev": "next",
"start": "next start"
},
"dependencies": {
"babel-plugin-react-native-web": "0.18.7",
"babel-plugin-react-native-web": "0.18.10",
"next": "^12.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-native-web": "0.18.7"
"react-native-web": "0.18.10"
},
"devDependencies": {
"@babel/core": "^7.18.6",
Expand Down
2 changes: 2 additions & 0 deletions packages/react-native-web-examples/pages/checkbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default function CheckboxPage() {
<CheckBox disabled style={styles.item} value={false} />
<Divider />
<CheckBox disabled style={styles.item} value={true} />
<Divider />
<CheckBox accessibilityReadOnly style={styles.item} value={true} />
</View>
<View style={styles.row}>
<CheckBox value={false} />
Expand Down
2 changes: 2 additions & 0 deletions packages/react-native-web-examples/pages/pressable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export default function PressablePage() {
delayPressIn={delay}
delayPressOut={delay}
disabled={disabled}
onBlur={handleEvent('onBlur')}
onFocus={handleEvent('onFocus')}
onHoverIn={handleEvent('onHoverIn')}
onHoverOut={handleEvent('onHoverOut')}
onKeyDown={(e) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The [documentation site](https://necolas.github.io/react-native-web/) ([source](

## Example

The [examples app](https://pk4zn6v4o0.sse.codesandbox.io/) ([source](https://github.com/necolas/react-native-web/blob/master/packages/react-native-web-examples)) demonstrates many available features. Fork the [codesandbox](https://codesandbox.io/s/github/necolas/react-native-web/tree/master/packages/react-native-web-examples) to make changes and see the results.
The [examples app](https://p9t5cp.sse.codesandbox.io/) ([source](https://github.com/necolas/react-native-web/blob/master/packages/react-native-web-examples)) demonstrates many available features. Fork the [codesandbox](https://codesandbox.io/s/github/necolas/react-native-web/tree/master/packages/react-native-web-examples) to make changes and see the results.

You'll notice that there is no reference to `react-dom` in components. The `App` component that is shown below is defined using the APIs and Components of React Native, but it can also be rendered on the web using React Native for Web.

Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"registry": "https://registry.npmjs.org/"
},
"name": "react-native-web",
"version": "0.18.7",
"version": "0.18.10",
"description": "React Native for Web",
"module": "dist/index.js",
"main": "dist/cjs/index.js",
Expand Down
Loading

0 comments on commit abbfe8f

Please sign in to comment.