Skip to content
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

Bump example app to RNW .72 #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion example/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import {
View,
Button,
FlatList,
Slider,
TextInput,
Keyboard
} from "react-native";
import Tts from "react-native-tts";
import Slider from "@react-native-community/slider";

type Props = {};
export default class App extends Component<Props> {
Expand Down
15 changes: 12 additions & 3 deletions example/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,24 @@
*
* @format
*/
const fs = require('fs');
const path = require('path');
const blacklist = require('metro-config/src/defaults/blacklist');
const exclusionList = require('metro-config/src/defaults/exclusionList');

const rnwPath = fs.realpathSync(
path.resolve(require.resolve('react-native-windows/package.json'), '..'),
);

module.exports = {
resolver: {
blacklistRE: blacklist([
blockList: exclusionList([
// This stops "react-native run-windows" from causing the metro server to crash if its already running
new RegExp(
`${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
),
// This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip
// This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
new RegExp(`${rnwPath}/build/.*`),
new RegExp(`${rnwPath}/target/.*`),
/.*\.ProjectImports\.zip/,
]),
},
Expand All @@ -25,5 +32,7 @@ module.exports = {
inlineRequires: true,
},
}),
// This fixes the 'missing-asset-registry-path` error (see https://github.com/microsoft/react-native-windows/issues/11437)
assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
},
};
34 changes: 22 additions & 12 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,39 @@
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"test:windows": "yarn jest --setupFiles=./jest-setups/jest.setup.windows.js --runInBand",
"test:windows_nosound_ci": "yarn jest __tests__/TestTTSInit.test.js --setupFiles=./jest-setups/jest.setup.windows.js"
"test:windows_nosound_ci": "yarn jest __tests__/TestTTSInit.test.js --setupFiles=./jest-setups/jest.setup.windows.js",
"windows": "react-native run-windows"
},
"dependencies": {
"react": "16.13.1",
"react-native": "0.63.4",
"@react-native-community/slider": "^4.4.2",
"react": "18.2.0",
"react-native": "0.72.0",
"react-native-tts": "../",
"react-native-windows": "^0.63.0-0"
"react-native-windows": "0.72.1"
},
"devDependencies": {
"appium": "1.18.3",
"babel-jest": "^26.6.3",
"jest": "23.1.0",
"metro-config": "^0.76.5",
"metro-react-native-babel-preset": "^0.64.0",
"react-test-renderer": "16.3.1",
"selenium-appium": "0.0.15",
"selenium-webdriver": "^4.0.0-alpha.8"
},
"jest": {
"preset": "react-native",
"transform": {
"^.+\\.jsx?$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
}
"jest": {
"preset": "react-native",
"transform": {
"^.+\\.jsx?$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
}
40 changes: 40 additions & 0 deletions example/windows/ExperimentalFeatures.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--
This file contains some important settings that will apply globally for
your app and *all* native modules your app consumes. These values were
set when you created the app project, and in some cases cannot be
simply changed here without recreating a new project.
-->

<PropertyGroup Label="Microsoft.ReactNative Experimental Features">
<!--
Enables default usage of Hermes.

See https://microsoft.github.io/react-native-windows/docs/hermes
-->
<UseHermes>false</UseHermes>

<!--
Changes compilation to assume use of WinUI 3 instead of System XAML.
Requires creation of new project.

See https://microsoft.github.io/react-native-windows/docs/winui3
-->
<UseWinUI3>false</UseWinUI3>

<!--
Changes compilation to assume use of Microsoft.ReactNative NuGet packages
instead of building the framework from source.
Requires creation of new project.

See https://microsoft.github.io/react-native-windows/docs/nuget
-->
<UseExperimentalNuget>false</UseExperimentalNuget>

<ReactExperimentalFeaturesSet>true</ReactExperimentalFeaturesSet>

</PropertyGroup>

</Project>
13 changes: 13 additions & 0 deletions example/windows/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="packages" />
</config>
<packageSources>
<clear />
<add key="Nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
</configuration>
Loading