Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 95fb97b

Browse files
Update the RNW and RN versions to the latest (#11)
* Update the RNW version by windows-init with overwrite * Apply the previous sources to the latest project core
1 parent 74c054a commit 95fb97b

18 files changed

+1197
-976
lines changed

‎index.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ import UserAccountPanel from './src/UserAccountPanel';
99
import ApplicationSettingsPanel from './src/ApplicationSettingsPanel';
1010
import NoteWidgetDetailsPanel from './src/NoteWidgetDetailsPanel';
1111
import CreateNotePanel from './src/CreateNotePanel';
12-

‎metro.config.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
* @format
66
*/
77
const path = require('path');
8-
const blacklist = require('metro-config/src/defaults/blacklist');
8+
const exclusionList = require('metro-config/src/defaults/exclusionList');
99

1010
module.exports = {
1111
resolver: {
12-
blacklistRE: blacklist([
12+
blockList: exclusionList([
1313
// This stops "react-native run-windows" from causing the metro server to crash if its already running
1414
new RegExp(
1515
`${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
@@ -22,7 +22,7 @@ module.exports = {
2222
getTransformOptions: async () => ({
2323
transform: {
2424
experimentalImportSupport: false,
25-
inlineRequires: false,
25+
inlineRequires: true,
2626
},
2727
}),
2828
},

‎package.json‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
"scripts": {
66
"start": "react-native start",
77
"test": "jest",
8-
"lint": "eslint ."
8+
"lint": "eslint .",
9+
"windows": "react-native run-windows"
910
},
1011
"dependencies": {
1112
"react": "16.13.1",
12-
"react-native": "0.63.4",
13-
"react-native-windows": "^0.63.0-0"
13+
"react-native": "^0.64.0",
14+
"react-native-windows": "0.64.4"
1415
},
1516
"devDependencies": {
1617
"@babel/core": "^7.8.4",
@@ -25,4 +26,4 @@
2526
"jest": {
2627
"preset": "react-native"
2728
}
28-
}
29+
}

‎windows/ExperimentalFeatures.props‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup Label="Microsoft.ReactNative Experimental Features">
5+
6+
<!--
7+
Changes compilation to assume use of WinUI 3 instead of System XAML.
8+
Requires creation of new project.
9+
10+
See https://microsoft.github.io/react-native-windows/docs/0.64/winui3
11+
-->
12+
<UseWinUI3>false</UseWinUI3>
13+
14+
<!--
15+
Compiles Hermes-related code and sets it to the default JS engine.
16+
Requires the "ReactNative.Hermes.Windows" NuGet package.
17+
18+
See https://microsoft.github.io/react-native-windows/docs/0.64/hermes
19+
-->
20+
<UseHermes>false</UseHermes>
21+
22+
</PropertyGroup>
23+
24+
</Project>

‎windows/NuGet.Config‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<config>
4+
<add key="repositoryPath" value="packages" />
5+
</config>
6+
<packageSources>
7+
<clear />
8+
<add key="Nuget.org" value="https://api.nuget.org/v3/index.json" />
9+
<add key="react-native" value="https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json" />
10+
</packageSources>
11+
<disabledPackageSources>
12+
<clear />
13+
</disabledPackageSources>
14+
</configuration>

‎windows/ReactNativeNotes.sln‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.29215.179
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeNotes", "ReactNativeNotes\ReactNativeNotes.vcxproj", "{4FD7208C-F69F-44A1-88A9-0D55506E84BA}"
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactNativeNotes", "ReactNativeNotes\ReactNativeNotes.vcxproj", "{8408908B-5484-4B61-BA0B-1A69B672F9DC}"
77
ProjectSection(ProjectDependencies) = postProject
88
{F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136}
99
EndProjectSection
@@ -60,30 +60,30 @@ Global
6060
Release|x86 = Release|x86
6161
EndGlobalSection
6262
GlobalSection(ProjectConfigurationPlatforms) = postSolution
63-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|ARM.ActiveCfg = Debug|ARM
64-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|ARM.Build.0 = Debug|ARM
65-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|ARM.Deploy.0 = Debug|ARM
66-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|ARM64.ActiveCfg = Debug|ARM64
67-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|ARM64.Build.0 = Debug|ARM64
68-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|ARM64.Deploy.0 = Debug|ARM64
69-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|x64.ActiveCfg = Debug|x64
70-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|x64.Build.0 = Debug|x64
71-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|x64.Deploy.0 = Debug|x64
72-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|x86.ActiveCfg = Debug|Win32
73-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|x86.Build.0 = Debug|Win32
74-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Debug|x86.Deploy.0 = Debug|Win32
75-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|ARM.ActiveCfg = Release|ARM
76-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|ARM.Build.0 = Release|ARM
77-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|ARM.Deploy.0 = Release|ARM
78-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|ARM64.ActiveCfg = Release|ARM64
79-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|ARM64.Build.0 = Release|ARM64
80-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|ARM64.Deploy.0 = Release|ARM64
81-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|x64.ActiveCfg = Release|x64
82-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|x64.Build.0 = Release|x64
83-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|x64.Deploy.0 = Release|x64
84-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|x86.ActiveCfg = Release|Win32
85-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|x86.Build.0 = Release|Win32
86-
{4FD7208C-F69F-44A1-88A9-0D55506E84BA}.Release|x86.Deploy.0 = Release|Win32
63+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|ARM.ActiveCfg = Debug|ARM
64+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|ARM.Build.0 = Debug|ARM
65+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|ARM.Deploy.0 = Debug|ARM
66+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|ARM64.ActiveCfg = Debug|ARM64
67+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|ARM64.Build.0 = Debug|ARM64
68+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|ARM64.Deploy.0 = Debug|ARM64
69+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|x64.ActiveCfg = Debug|x64
70+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|x64.Build.0 = Debug|x64
71+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|x64.Deploy.0 = Debug|x64
72+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|x86.ActiveCfg = Debug|Win32
73+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|x86.Build.0 = Debug|Win32
74+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Debug|x86.Deploy.0 = Debug|Win32
75+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|ARM.ActiveCfg = Release|ARM
76+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|ARM.Build.0 = Release|ARM
77+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|ARM.Deploy.0 = Release|ARM
78+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|ARM64.ActiveCfg = Release|ARM64
79+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|ARM64.Build.0 = Release|ARM64
80+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|ARM64.Deploy.0 = Release|ARM64
81+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|x64.ActiveCfg = Release|x64
82+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|x64.Build.0 = Release|x64
83+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|x64.Deploy.0 = Release|x64
84+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|x86.ActiveCfg = Release|Win32
85+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|x86.Build.0 = Release|Win32
86+
{8408908B-5484-4B61-BA0B-1A69B672F9DC}.Release|x86.Deploy.0 = Release|Win32
8787
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM
8888
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM
8989
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64

‎windows/ReactNativeNotes/App.cpp‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
#include "AutolinkedNativeModules.g.h"
66
#include "ReactPackageProvider.h"
77

8-
using namespace winrt::ReactNativeNotes;
9-
using namespace winrt::ReactNativeNotes::implementation;
108
using namespace winrt;
119
using namespace Windows::UI::Xaml;
1210
using namespace Windows::UI::Xaml::Controls;
1311
using namespace Windows::UI::Xaml::Navigation;
1412
using namespace Windows::ApplicationModel;
15-
13+
namespace winrt::ReactNativeNotes::implementation
14+
{
1615
/// <summary>
1716
/// Initializes the singleton application object. This is the first line of
1817
/// authored code executed, and as such is the logical equivalent of main() or
@@ -25,7 +24,7 @@ App::App() noexcept
2524
InstanceSettings().UseWebDebugger(false);
2625
InstanceSettings().UseFastRefresh(false);
2726
#else
28-
JavaScriptMainModuleName(L"index");
27+
JavaScriptBundleFile(L"index");
2928
InstanceSettings().UseWebDebugger(true);
3029
InstanceSettings().UseFastRefresh(true);
3130
#endif
@@ -50,14 +49,26 @@ App::App() noexcept
5049
/// <param name="e">Details about the launch request and process.</param>
5150
void App::OnLaunched(activation::LaunchActivatedEventArgs const& e)
5251
{
53-
super::OnLaunched(e);
52+
super::OnLaunched( e );
5453

5554
auto coreTitleBar = Windows::ApplicationModel::Core::CoreApplication::GetCurrentView().TitleBar();
5655
coreTitleBar.ExtendViewIntoTitleBar( true );
5756
auto titleBar = Windows::UI::ViewManagement::ApplicationView::GetForCurrentView().TitleBar();
5857
titleBar.ButtonBackgroundColor( Windows::UI::Colors::Transparent() );
5958
Frame rootFrame = Window::Current().Content().as<Frame>();
60-
rootFrame.Navigate(xaml_typename<ReactNativeNotes::MainPage>(), box_value(e.Arguments()));
59+
rootFrame.Navigate( xaml_typename<ReactNativeNotes::MainPage>(), box_value( e.Arguments() ) );
60+
}
61+
62+
/// <summary>
63+
/// Invoked when the application is activated by some means other than normal launching.
64+
/// </summary>
65+
void App::OnActivated(Activation::IActivatedEventArgs const &e) {
66+
auto preActivationContent = Window::Current().Content();
67+
super::OnActivated(e);
68+
if (!preActivationContent && Window::Current()) {
69+
Frame rootFrame = Window::Current().Content().as<Frame>();
70+
rootFrame.Navigate(xaml_typename<MainPage>(), nullptr);
71+
}
6172
}
6273

6374
/// <summary>
@@ -81,3 +92,5 @@ void App::OnNavigationFailed(IInspectable const&, NavigationFailedEventArgs cons
8192
{
8293
throw hresult_error(E_FAIL, hstring(L"Failed to load Page ") + e.SourcePageType().Name);
8394
}
95+
96+
} // namespace winrt::ReactNativeNotes::implementation

‎windows/ReactNativeNotes/App.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace winrt::ReactNativeNotes::implementation
1010
{
1111
App() noexcept;
1212
void OnLaunched(activation::LaunchActivatedEventArgs const&);
13+
void OnActivated(Windows::ApplicationModel::Activation::IActivatedEventArgs const &e);
1314
void OnSuspending(IInspectable const&, Windows::ApplicationModel::SuspendingEventArgs const&);
1415
void OnNavigationFailed(IInspectable const&, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs const&);
1516
private:

‎windows/ReactNativeNotes/AutolinkedNativeModules.g.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
<!-- AutolinkedNativeModules.g.props contents generated by "react-native autolink-windows" -->
44
<PropertyGroup>
55
</PropertyGroup>
6-
</Project>
6+
</Project>

‎windows/ReactNativeNotes/MainPage.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ namespace winrt::ReactNativeNotes::factory_implementation
2424
{
2525
};
2626
}
27-

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /