Граф коммитов

47 Коммитов

Автор SHA1 Сообщение Дата
Jon Thysell 845aad2404
Update to Microsoft.NETCore.UniversalWindowsPlatform 6.2.14 (#14084)
## Description

This PR upgrades the minimum version of `Microsoft.NETCore.UniversalWindowsPlatform` to 6.2.14 for UWP C# projects.

### Type of Change
- Bug fix (non-breaking change which fixes an issue)

### Why
This is long over-due as the latest (and probably last) version of this package hasn't changed in over two years. There's no reason for us to build against an older version. Just as importantly, this brings in a newer version of the .NetNative toolchain, which seems to resolve issues around C# builds hanging at the .NetNative step.

Resolves #14055
Resolves #9194
Resolves #4869

### What
Updated the minimum version of `Microsoft.NETCore.UniversalWindowsPlatform` to 6.2.14 for UWP C# projects. Added new entries to the props that enable C++ apps to consume C# modules to see the latest versions of .NetNative.

## Screenshots
N/A

## Testing
Verified E2Etests build and run.

## Changelog
Should this change be included in the release notes: _yes_

Update to Microsoft.NETCore.UniversalWindowsPlatform 6.2.14
2024-11-05 13:46:24 -08:00
JesseCol 598f233843
Update WinAppSDK from 1.5 to 1.6 (1.6.240923002) (#13977)
* Update WinAppSDK from 1.5 to 1.6 (1.6.240923002)

* Change files

* Adding more build fixes due to the fact that WinAppSDK 1.6 has a dependency on Microsoft.Web.WebView2

* Prevent Microsoft.Web.WebView2.Core.dll from being copied to avoid errors on arm64ec

---------

Co-authored-by: winappsdkdata_bot <winappsdkdata_bot@microsoft.com>
2024-10-18 09:37:02 -07:00
Tatiana Kapos e265163b8c
Integrate RN Nightly 10/1 (223e98cc4) (#13938)
* 0.77.0-nightly-20240925-0cb32d5ac

* 0.77.0-nightly-20241001-223e98cc4

* fix validate-overrides

* Change files

* fix build

* fix playground

* fix composition

* fix overrides

* fix snapshot + lint

* Change files

* try removing babel plugin

* add change back in

* bump dep
2024-10-15 19:23:19 +00:00
Jon Thysell 401416f637
Automatically set EnableSourceLink for in-repo builds only (#13666)
## Description

SourceLink is needed to ensure that our NuGet packages have matching source information when symbols are resolved. So we have an `EnableSourceLink` property which tells some of our projects to add source link, and we enable that when doing CI/PR/official builds by setting the property to true when we call msbuild in our pipelines.

This PR makes it so that instead of having to pass that property, the projects themselves automatically build with source link when they need to.

### Type of Change
- New feature (non-breaking change which adds functionality)

### Why
This makes it so that local builds of RNW are closer to the the same nuget restore behavior / packages.lock.json file as when they're built in pipelines.

This is part is working toward resolving #12004 and this functionality was extracted from PR #13634.

### What
Instead of requiring us to call msbuild with `/p:EnableSourceLink=true` for every solution (or relying on setting it in `ExperimentalFeatures.props`) we now detect when our library projects are being built within the repo (detecting the `src-win` folder which isn't present in the NPM publish) and enable source link then.

## Screenshots
N/A

## Testing
N/A

## Changelog
Should this change be included in the release notes: _yes_

Automatically set EnableSourceLink for in-repo builds only
2024-09-09 20:37:17 +00:00
Yajur Grover c5dff02edd
Integrate RN Nightly 7/1 (#13508)
* Integrate 7/1

* update lockfile

* revert postinstall removal

* bump yarn to 1.22.22

* Remove .yarnrc

* Replace react-native with @react-native-community/cli

* Change files

* Update react-native-init-windows.yml

* update lockfile

* Fix all instances of calling yarn for RN CLI to call npx instead

* More npx added

* More npx added

* Fix bundle commands

* Add @react-native-community/cli to dev dependencies of each app

* update cli versions

* fix sample apps just-task

* Revert test snapshot changes

* Fix iterateOverValues

* Add new fuseboxtracer to ReactCommon

* fix upgrading RN for test-cli

* add yarn install

* Fork files with warnings as errors

* fix testcli creation

* finx fabric snapshots

* Fix babel-preset and metro-config versions

* Change files

* Start stubbing out SampleTurboModule to fix e2etest

* Revert "Start stubbing out SampleTurboModule to fix e2etest"

This reverts commit 5386ebdcf8.

* Comment out new EventEmiiter usage in example page

* Update packages.lock.json

* try to fix debug test

* Disable debugging tests

* remove logging statements

---------

Co-authored-by: Jon Thysell <jthysell@microsoft.com>
Co-authored-by: Jon Thysell <thysell@gmail.com>
2024-08-07 16:13:28 -07:00
Chiara Mooney c0976782a5
Integrate RN Nightly Build 5/18 (#13282)
* Integrate 5/14

* Change files

* Fix CI #1

* Re-add BoundedConsumableBuffer.h

* Integrate 5/18
2024-05-31 14:20:48 -07:00
Andrew Coates 1c177d7469
Bump WindowsAppSDK version to 1.5.240227000 (#12848)
* Bump WindowsAppSDK version to 1.5.240227000

* Change files

* Run NuGetRestoreForceEvaluateAllSolutions.ps1

* Change files
2024-03-18 16:07:28 -07:00
Chiara Mooney 8f4fb70927
Integrate RN Nightly Build 1/29 (#12787)
* Integrate 1/26

* Change files

* Adjust Compile

* Update Package

* Change files

* Fix Build Error

* Change files

* Remove Yoga.cpp Fork

* try to fix react-native-init-windows.yml

* try to fix react-native-init.yml

* Integrate 1/29

* Format

---------

Co-authored-by: Jon Thysell (JAUNTY) <jthysell@microsoft.com>
2024-03-06 14:19:04 -08:00
Jon Thysell 9bd3906f3b
Update WinAppSDK versions to latest public builds (#12747)
## Description

This PR updates the default versions of `Microsoft.WindowsAppSDK` used to 1.4.240211001 when `<UseWinUI3>true</UseWinUI3>` is specified, and 1.5.240124002-experimental2 when `<UseExperimentalWinUI3>true</UseExperimentalWinUI3>` is specified.

This PR also updates all of the `packages.lock json` files to the defaults.

### Type of Change

- Bug fix (non-breaking change which fixes an issue)

### Why
To keep up with the latest public versions of WinAppSDK.

### What
See above.

## Screenshots
N/A

## Testing
Ran both PR and new Secure PR checks to make sure that everything still builds and works.

## Changelog
Should this change be included in the release notes: yes

Updated WindowsAppSDK dependency to 1.4.240211001
2024-02-21 10:37:56 -08:00
Yajur Grover ae282e6dd9
Integrate RN Nightly Build 7/28 (#11970)
* resolved merge conflicts and build errors

* Change files

* change file and formatting

* updated snapshot

* edited tester list

* updated snapshots

* updated lockfile

* fixed syntax error

* Revert "updated snapshots"

This reverts commit 19bfa39016.

* resolved linting errors

* Update to use newly renamed `@react-native/babel-preset` and `@react-native/metro-babel-transformer`

* fix changefiles

* ran universal unit tests

* Switch to ensure usage of @react-native/metro-config

* Workaround for null coalesing operator issue

---------

Co-authored-by: Yajur Grover <yajurgrover@microsoft.com>
Co-authored-by: TatianaKapos <tatianakapos@microsoft.com>
Co-authored-by: Jon Thysell <jthysell@microsoft.com>
2023-08-28 17:56:59 -07:00
Jon Thysell 9917e3b45f
Enable NuGet restore lock files for all projects (#12002)
## Description

This PR specifies that all projects should set the msbuild property `RestorePackagesWithLockFile` to `true` by default, not just the C# ones.

This way we can ensure that PR/CI will build reliably because every locked version should be available in the react-native-public ADO feed. Changes to NuGet dependencies in PRs should now explicilty fail if the new package version is not in the ADO feed, and therefore require us to manually approve the addition to the feed (as required by compliance).

Closes #11998

### Type of Change
- Bug fix (non-breaking change which fixes an issue)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)

### Why

This way we can ensure that PR/CI will build reliably because every locked version should be available in the react-native-public ADO feed. Changes to NuGet dependencies in PRs should now explicilty fail if the new package version is not in the ADO feed, and therefore require us to manually approve the addition to the feed (as required by compliance).

Closes #11998

### What
This PR specifies that all projects should set the msbuild property `RestorePackagesWithLockFile` to `true` by default, not just the C# ones.

## Screenshots
N/A

## Testing
N/A

## Changelog
Should this change be included in the release notes: no
2023-08-11 15:58:36 -07:00
Zihan Chen (MSFT) a5eb34c37c
@rnw/codegen generates GetStructInfo instead of REACT_STRUCT (#11982)
* #include <NativeModules.h>

* Separate custom types and reflection in template

* Generate GetStructInfo function instead of REACT_STRUCT

* ...

* Update generated files

* Change files

* ...
2023-08-07 19:58:14 +00:00
Julio César Rocha 791786e503
Attempt AddNetworkingHandler if HTTP module was not ready (#11926)
* Update packages.lock

* Remove HttpModule.h from OInstance.cpp

* Remove runtime option Blob.EnableModule

* Call SetupHttpResource only once

* Attempt AddNetworkingHandler if HTTP module was not ready

* Change files
2023-07-24 12:34:24 -07:00
Andrew Coates 6e4108cccd
CG: Move to single nuget source (#11855)
* CG: Move to single nuget source

* update nuget lock files

* Change files
2023-07-07 23:20:58 +00:00
Julio César Rocha f3fe56a572
Define FileReader turbo module (#11789)
* Declare FileReaderTurboModule

* Declare m_blobPersistor

* Use msrn namespace alias in FileReader module

* json lock

* Update lock files

* config

* Implement ReadAsDataUrl

* Define ReadAsText

* Define FileReaderResource

* Move persistor from module into resource

* Rename module name name

* Add using ModuleSpec

* clang format

* Change files
2023-06-21 15:32:10 -07:00
Vladimir Morozov 00ef6dfcfc
ABI-safe Hermes API and new JSI for Node-API (#11696)
* ABI-safe Hermes API and new JSI for Node-API

* Change files

* Use Hermes version 0.1.13 that supports UAP

* Format code

* Merge node-api-jsi project into ReactCommon project

* Fix x86 issues

* Eliminate Linker warnings

* Copy Node-API JSI files to MS.RN.Cxx Nuget

* Remove unnecessary settings from shared projects

* Format code and fix Layout-MSRN-Headers.ps1

* Fix loading Node-API JSI zip

* Remove node-api-jsi project from the playground project

* Update Hermes package version

* Change files

* Fix playground project compilation

* Use node-api-jsi with fixes for C++20

* Fix building playground apps

* Format code

* Make sure that the Hermes inspector works

* Update packages.lock.json files

* Update Hermes version with fixes for prepared scripts

* Use Hermes package 0.1.15 to fix UWP .Net projects

* Use SafeLoadLibrary and remove thread Id check for Jsi::Runtime
2023-06-12 21:45:47 -07:00
Tatiana Kapos 47eeb71307
RN Integration 5/5/23 (#11623)
* RN integration 5/5/23

* Change files

* yarn format/lint

* override Bridging.h

* bump flow-bin

* add error number

* remove stubbed method

* ImageRequest feedback

Co-authored-by: Jon Thysell <thysell@gmail.com>

---------

Co-authored-by: Jon Thysell <thysell@gmail.com>
2023-05-22 16:18:51 -07:00
Jon Thysell fe7d786b74
Fix typos and add `cspell` configuration (#11536)
## Description

This PR adds configuration files for `cspell`, which is available as a recommended VS Code plugin for this repo. This PR also fixes most "non-breaking" typos (comments, error messages, local names) for code files within the repo.

This PR **does not** add any kind of spell-checking enforcement on the repo.

### Type of Change
N/A

### Why

Clear up misunderstandings in comments / error messages.

### What
What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.

## Screenshots
N/A

## Testing
N/A
2023-05-05 13:12:29 -07:00
Chiara Mooney 73b38e47ce
Bump WinUI to v2.8 (#11493)
* Upgrade to WinUI 2.8

* Change files

* Test Fixes

* Import Updates

* Update

* Adjust Win32

* Update vnext/PropertySheets/NuGet.Cpp.props

---------

Co-authored-by: Jon Thysell <jthysell@microsoft.com>
2023-04-24 11:36:22 -07:00
Julio César Rocha 0a5309293c
Use Boost GUID generator (#11470)
* Update package lock

* Use Boost UUID library

* Change files

* Remove GuidHelper import
2023-04-10 18:54:10 -07:00
Tatiana Kapos 4872e779fd
Integrate RN Nightly Build 2/1/23 (#11161)
* integrate 2/1/23

* Change files

* bump hermes version

* Change files
2023-02-08 12:56:59 -08:00
Tatiana Kapos 88f5ad05ba
Integrate RN Nightly Build 1/25/23 (#11151)
* integrate 1/25/23

* Change files

* remove internalized slider test

* bump hermes version

* Change files
2023-02-01 15:47:52 -08:00
Tatiana Kapos 43490514c8
Integrate RN Nightly Build 1/11 (#11133)
* integrate 01/11/23

* Change files

* remove DatePicker

* bump hermes version

* fix playground runtime

* Change files

* fix textinput example and flow
2023-01-27 16:07:39 -08:00
Chiara Mooney bd502ff2e4
Integrate RN Nightly Build 12/28 (#11117)
* Integrate 12/28

* Change files

* Fix Native Changes

* Lingering Updates

* Lint

* Empty
2023-01-24 14:10:36 -08:00
Chiara Mooney 09529b2bfe
Integrate RN Nightly Build 12/14 (#11079)
* Integrate RN 12/14

* Integrate 12/14

* Change files

* Yarn

* Add Native Fixes

* Format and Versioning

* Update Version

* Change files

* Fix Lint

* Fix Overrides

* Yarn

* Update Hermes
2023-01-19 14:12:47 -08:00
Tatiana Kapos 6b10c0f1a9
Integrate 12/2/22 (#10999)
* integrate 12/2/22

* Change files

* add SchedulerPriority.h

* bump hermes version

* Change files

* try overriding TurboModule files

* yarn

* override AnimatedInterpolation

* yarn lint and issue number

* remove RectangleEdges.h

* fix bad merge

* add windows specific comments and link issues

* add back in newline

* try to fix code-gen parameters

* fix sample-app code-gen

* yarn and new lines
2023-01-10 11:19:17 -08:00
Tatiana Kapos d85e1c9ee4
Integration 11/18/22 (#10970)
* integration 11/18/22

* Change files

* switch ViewWin32 from setAndForwardRef to useMergeRefs

* fix build with overrides

* fix win32 pathing

* fix linter issue

* add in missing flow comment

* upgrade hermes version

* Change files

* revert hermes version

* missing hermes version

* try bumping hermes version again

* Change files
2022-12-06 14:05:09 -08:00
Chiara Mooney 7c8e70822d
Integrate 11/9 RN Nightly Bulid (#10883)
* Integrate 10/10

* Remaining Edits

* Change files

* Fix Overrides

* Fix Package.json

* Fix Package.json

* Bump codegen version

* Change files

* Bump Hermes

* Flow Fixes

* Yarn

* Type Change

* Test Test

* Fix Lint

* Fix Lint

* Fix Flow

* Update JSI

* Update Hermes

* Fix Hermes

* Change files

* Integrate 11/8

* Update Hermes

* Yarn

* Update codegen package for newer react-native-codegen version

* fix rntester win32

* Fix ExecuteJsiTests Run_JSDrivenTests

* Remove asyncstorage test (AsyncStorage was removed from RN)

* Bump rn/cli

* Bump cli-types, Add cli-doctor

* Fix Remaining Hermes

* Revert Color Change

* Fix Typo

Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>
2022-12-01 10:32:22 -08:00
Chiara Mooney fa576c66ef
[WIP] Integrate RN Nightly Build 10/10 (#10867)
* Integrate 10/10

* Change files

* Fix Breaks

* Fix Breaks

* Resolve Conflicts

* Fix RNTester

* Fix Flow

* Remove New Arch Sample

* Fix Flow + RNTester

* Merge

* Revert playground solution

* Fix Flow Windows

* Fix Lint

* Fix Lint TextInput

* Update Hermes Version

* Remove ScrollView Change

Co-authored-by: Jon Thysell (JAUNTY) <jthysell@microsoft.com>
2022-11-11 15:55:50 -08:00
Tatiana Kapos ca86014a9c
Integration 9/26/22 (#10816)
* fix typescript pathing to react-native/types

* integration 9/26/22

* Change files

* try to fix snapshot test

* fix playground build

* update hermes package

* match ts-jest version to jest version

* update yarn file

* jest done callback not used on async jest tests

* minor fixes

* Change files

* Increase timeout for configToProjectInfo

* fix failure transpiling jest-runner

* another attempt at timeout fix

* more fixes

* defork virtualizedlist

* realign jest version with core - add sample test to rnw and rnwin32 to allow jest to run

* missing space in repo-config package.json

* suppress new c++ warning CI hits

* fix

* Unblock most E2E

* update snapshot

* update snapshot

Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>
2022-11-09 13:35:37 -08:00
Jon Thysell 5885ee4477
Upgrade to VS 2022 (#9916)
*Description*

This PR updates RNW to build with (and require) Visual Studio 2022. This includes upgrading the `Microsoft.ReactNative.Managed.CodeGen` project to .NET 6.0

This PR does not change the minimum / target Windows SDK versions for RNW or RNW apps.

This PR does not change the language versions of C++ (17) and C# (8.0) used.

*Type of Change*
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- This change requires a documentation update

*Why*
Visual Studio 2022 is the currently supported version of Visual Studio and what is available to download without an MSDN subscription to access older versions. As Visual Studio 2019 support is reduced/deprecated, we need to migrate. 

Closes #8750
Closes #9499 
Closes #10130

*What*

What's changed:

* All VS project files have been updated to require a minimum of VS 2022 (aka version 17.0).
    * NuGet-based dependencies that are tied to VS version have been upgraded.
* The `Microsoft.ReactNative.Managed.CodeGen` project has been updated to .NET 6.0
    * The snapshots for the codegen tests have been updated to pass
* The E2E Test app has been updated to the latest version of `react-native-xaml` (needed to fix build issues)
    * Snapshots for E2E tests have been updated to pass

*Testing*

Builds and tests All tests
2022-10-31 11:00:09 -07:00
Chiara Mooney 4096480789
Integrate 7/14 RN Nightly Build (#10368)
* Integrate 7/14

* Change files

* Add BigInt APIs

* Fix Format

* Save State

* Fix Merge

* Yarn

* fix e2etest autolinking

* Fix integration-test-app

* Fix JasValueKind enum order

* Start to add abstraction layer for breaking `facebook::jsi::ValueKind`

* fix missing { typo

* Remove hardcoded hermes version from project files

* Bump to ReactNative.Hermes.Windows 0.70.0

* Temporary revert BigInt enum value order

* yarn format

* Cleanup ReactCommon vcxproj/filters

* Move JSI kind mapping into own file, add // TODO: JSIVALUECONVERSION comments

Co-authored-by: Jon Thysell (JAUNTY) <jthysell@microsoft.com>
2022-08-19 10:24:08 -07:00
Julio César Rocha 51857f2d52
Import WinUI package only if OverrideWinUIPackage is not set to "true" (#10267)
* Update packages.lock.json

* Import WinUI package only if OverrideWinUIPackage is not true

* Change files

* Revert Microsoft.ReactNative.Managed.UnitTests.csproj
2022-07-18 22:32:51 +00:00
Jon Thysell f886ae648f
CG: Update Newtonsoft.Json to 13.0.1 (#10208)
* CG: Update Newtonsoft.Json to 13.0.1

This PR updates our usage of Newtonsoft.Json to 13.0.1 to resolve two CG
alerts: WS-2022-0161 and GHSA-5crp-9r3c-p9vr

* Change files
2022-06-28 20:56:46 +00:00
Julio César Rocha 2983a5b601
Do not use Blob/FileReader modules in UWP (#10079)
* Do not use Blob/FileReader modules on UWP

* Change files

* Upgrade packages.lock.json

* Use runtime option Blob.EnableModule to condition instantiation
2022-06-08 17:34:31 -07:00
Julio César Rocha b412977a80
Implement Blob module (#9352)
* Added BlobModule and IWSModuleContHandler headers

* Implement Blob module

* Avoid raw self pointer in BlobModule

* Implement WebSocketModule msg processing

* clang format

* Don't return until websocketMessage event is sent

* Define CreateBlobModule()

* Add DEF exports

* Add Blob JS tests

* Add Blob JS tests

* Change files

* yarn lint

* Add overrides

* Register BlobModule in DesktopTestRunner

* Keep ignoring WebSocketBlob test by default

* Add BlobModule to default modules list

* Allow 'blob' responseType in HTTP module

* Ensure React Instance can be accessed when using older versions of react-native

* Emit error message on createFromParts failure

* Remove redundant extra modules in Desktop integration tests

* Declare IWebSocketModuleProxy

* Remove Blob and WS module factories from DLL boundary

* Implement IWebSocketModuleProxy

* clang format

* Update packages.lock

* Use winrt::array_view directly in ResolveMessage

* Define InstanceImpl::m_transitionalModuleProperties

* Include CreateModules.h in projects accessing MSRN.Cxx

* Define WinRT class WebSocketModuleContentHandler

- Have BlobModule constructor register the content handler in transitive
  property bag CxxNativeModule/WebSocketModuleContentHandler

* Have WebSocketModule use IInspectable as props arg

* Use property bag instead of global singletons for blob helpers

* Store blob helpers in prop bag as weak_ptr

* Replace remaining lock_guard<mutex> in BlobModule

* Define IUriHandler, IReqBodyHandler, IRespHandler.

* IHttpResource::SendRequest - add folly::dynamic data arg

* Add data arg to test SendRequest calls

* First implementation for BlobModuleUriHandler

* Remove WebSocketModuleContentHandler WinRT class

* Implement IBlobPersistor, MemoryBlobPersistor

* clang format

* Update yarn.lock

* Update RctRootVieTagGen location

* Implement addNetworkingHandler

* Fix createFromParts buffer persistence

* Drop WebSocketModule s_sharedState in favor of property bag

* Disable back WebSocketBlob test

* Rename iProperties to inspectableProperties

* Pass ReactContext properties to CreateHttpModule in InstanceWin

* Remove WebSocketModule constructor from x86 DLL boundary

* yarn lint

* Update packages.lock

* Make transitional property bag non-member

* Use blobURIScheme wherever possible

* Pass request content as folly::dynaic.

- Pass request ID directly from JavaScript layer.

* Use constexpr for folly indexes

* Implement GetMimeTypeFromUri

* Finish BlobModule handler implementations.

* Remove unused includes

* Ensure HttpModule::m_resource is set

* clang format

* clang format

* Allow blob responseType

* Use winrt::to_hstring instead of Utf8ToUtf16

* Pass inspectableProperties down to WinRTHttpResource

* Implement IHttpModuleProxy via WinRTHttpResource

* Consume URI handler

- IHttpResource
  - Rename SetOnRequest to SetOnRequestSuccess
  - Declare SetOnBlobData to pass complex (non-string) response data

* Consume IRequestBodyHandler

* Consume IResponseHandler

* Ensure properties exist in bag before using value

* Update packages lock

* Add missing call to Modules::SendEvent

* Fix Shared filters

* Rename SetOnBlobData to SetOnData (different args)

* Correctly retrieve blob slices

* Correctly retrieve blob slices

* Clang format

* Update project filters

* Drop BlobModuleUriHandler

* Continue handling requests when not blob-supported

* Add BlobTest

* Update packages.lock.json

* Define FileReaderModule

* Implement FileReaderModule

* Complete BlobTest

* Make IBlobPersistor::ResolveMessage throw std::invalid_argument

* Fail on Content-Encoding parsing even if no error handler

* Remove MIME mappings. Currently unused

* MemoryBlobPersistor::ResolveMessage throw on out of bounds

* lint

* Enable BlobTest by default

* Disable Blob test in CI (may hang)
2022-05-20 19:48:48 -07:00
Julio César Rocha 25d76fc058
Implement Origin Policy filter (#9771)
* Move all awaitable code into PerformSendRequest

* Await coroutine methods

* Remove blank lines

* Simplify co_return UntrackResponse

* Use dynamic body for server internal request

* Defne SetOnOptions

* Move url before headers in Response type

* Add dummy preflight filter

* Update x64 exports

* Use strand for server IO context

* Use HTTP message aliases

* Use HTTP message aliases

* Do not keep session references

Allows dropping server scope in tests.

* Comment out server scopes

* Use DynamicRequest|Response alias

* Format

* Use thread vector

* Drop outdated boost package validation in ReactCommon

* Define experimental write strand

* Drop server scope in default test

* Also pass server context to sessions

* Disable resource in default test

* Use Beast example

* Remove unused sample code

* Create HttpServer as listener wrapper

* Pass callbacks down to session

* Strong-name response as DynamicResponse

* Use DynamicRequest in handle_request

* Define HandleRequest as member function

* Lambda-based Respond()

* #if-out original sample code

* Keep count on get: ReaGetSucceeds

* Implement lambda_ using std::function

* Run context in io thread

* Join threads in Stop method

* Port send lambda to MS::R::T::HttpServer

* Update other basic tests

* Ensure Get+Options sequencing

* Clean up comments

* Use Callbacks() method

* Add concurrency argument

* Reduce macro usage

* Fix default OPTIONS handler

* Ensure number of headers

* Define ResponseType

* Use ResponseWrapper for polymorphism

* Define remaining wrapped types (File, String)

* Clean up server code

* (WIP) add test PreflightSucceeds

* catch hresult_error

* Use ProcessRequest result in PreformSendReq

* Rename test header value to Requested

* Propagate orror in ProcessRequest

* Rename OPReqFilter to PrototypeReqFilter

* Port request filter to WinRT IHttpFilter subtype

* Define allowed/forbidden methods and headers

* Define MSRN::Networking::OriginPolicyHttpFilter

* Move networking types into Shared\Networking folder

* Refactor: Move network types to Microsoft::React::Networking

* Clean up commented inline

* Make OPFilter::SendAsync non const

* Remove PrototypeHttpFilter

* Temporarily have desk.ITs depend on CppWinRT

* Define test OriginPolicyHttpFilterTest::UrlsHaveSameOrigin

* Add more same origin tests

* Start implementing ValidateRequest

* Finish ValidateRequest()

* Rename SingleOrigin to SameOrigin

* Implement SendPreflightAsync

* Fix OP assignment and GetOrigin rendering

* Parse Access-Control-Allow-Headers

* Done extracting access control values

* Use request as argument of ValidatePreflightResponse

* clang format

* Pass RequestArgs to request properties

* Pass RequestArgs to ValidateAllowOrigin

* Remove prototype non-WinRT filter

* Implement CorsUnsafeNotForbiddenRequestHeaderNames

* Test WinRT RequestHeader case sensitivity

* Fix ValidateAllowOrigin 4.10.5

* Add HttpOriginPolicyIntegrationTest

* Use boost:iequals to compare method names

* Add server support for CONNECT and TRACE methods

* Make HttpServer port uint16_t

* Prelfight only when OP is CORS.

- Add test SimpleCorsSameOriginSucceededs
- Add test NoCorsCrossOriginPatchSucceededs
- Add test NoCorsCrossOriginFetchRequestSucceeds
- Add test HTTP Server support for PATCH

* Use runtime option Http.StrictScheme

* Drop namespace from OriginPolicy

* Remove Origin from request heders

* Clean includes and usings in WinRTHttpResource.cpp

* Update preflight cache issue references (#9770)

* Pass origin in IHttpResource constructor

* clang format

* Prevent nullptr access when iterating preflight request headers

* Include request content headers in preflight headers list

* Send preflight to original request URL.

- Change test origin URL to non-existing http://example.rnw
- Have OriginPolicyHttpFilter::SendRequestAsync catch hresult_error to
  avoid losing info in (...) clause.

* Export APIs Set/GetRuntimeOptionString

- Switch to class-level static origin Uri.
- Define static (global) origin Uri via runtime option
  "Http.GlobalOrigin".

* clang format

* Implement TestOriginPolicy to parameterize OP tests

* Clean up non-parameterized tests

* Use constant for dummy cross origin

* Simplify test param constructors

* Start implementing ValidateResponse

* Add more tests

- FullCorsCrossOriginMissingCorsHeadersFails
- FullCorsCrossOriginMismatchedCorsHeaderFails

* clang format

* Change files

* Update namespaces in MSRN solution

* Move RequestArgs and ResponseType into new header

* Implement ExtractAccessControlValues

- Validate test result against ServerParams::Response::result

* Report specific origin mismatch errors in ValidatePreflightResponse

* Declare FullCorsCrossOriginCheckFailsOnPreflightRedirectFails

* Add ABI-safe runtime options free functions.

- Microsoft_React_SetRuntimeOptionBool
- Microsoft_React_SetRuntimeOptionInt
- Microsoft_React_SetRuntimeOptionString
- Microsoft_React_GetRuntimeOptionBool
- Microsoft_React_GetRuntimeOptionInt
- Microsoft_React_GetRuntimeOptionString

* Drop namespaced GetRuntimeOptionString

* Use case-insensitive comparison

* Drop newline from error message

* Return unmanaged copy in GetRuntimeOptionString

* Update FullCorsCrossOriginCheckFailsOnPreflightRedirectFails args

* Disallow preflight redirect.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSExternalRedirectNotAllowed

* Replace winrt::get_self<D,I> with .as<D>

* Drop LF from error messages

* Use self-managed variable port in tests

* Start writing FullCorsCorsCheckFailsOnResponseRedirectFails

* Scope disabling autoredirect to preflight request only

* Update TODOs with open issues

* Compute originAllowed

* Add test FullCorsSameOriginToSameOriginRedirectSucceeds

* Test FullCorsSameOriginToCrossOriginRedirectSucceeds

* Test FullCorsCrossOriginToOriginalOriginRedirectFails

* Declare FullCorsCrossOriginToAnotherCrossOriginRedirectSucceeds

* Implement OriginPolicyHttpFilter::ConstWcharComparer

* Use _wcsicmp instead of boost::iequals in ConstWcharComparer

* Correct SimpleCORS value search

* Disable FullCorsCrossOriginWithCredentialsSucceeds for now

* Rename type alias ResponseType to ResponseOperation

* clang format

* Handle originPolicy a request property instead of a member variable

* Avoid iterating response headers while removing items

* Gracefully fail when adding bad request headers

- Write remaining integration tests

* Use boost::iequals in PerformSendRequest

* clang format

* Use s_port for redirServer args

* Rename TestOriginPolicy to TestOriginPolicyWithRedirect

* Temporarily disabled tests

- FullCorsCrossOriginToAnotherCrossOriginRedirectWithPreflightSucceeds -
  pending redirect
- FullCorsRequestWithHostHeaderFails - Host request header is probematic

* Use std::queue for nonSimpleNames

* Finish ValidateResponse

* Clean up comments

* Add Test ExcludeHttpOnlyCookies

* Add tests KeepNonHttpOnlyCookies, RemoveAllCookies

* Address TODO comments

* Always allow simple-CORS methods in preflight

* Avoid auto for loop indexe sused against container .size()

* Update Desktop.Test.DLL exports for ARM64

* Skip test FullCorsCrossOriginToAnotherCrossOriginRedirectSucceeds

* Disable FullCorsCrossOriginToAnotherCrossOriginRedirectWithPreflightFails

* Ignore SimpleCorsForbiddenMethodFails

* Ignore SimpleCorsCrossOriginFetchFails

* RequestWithProxyAuthorizationHeaderFails

* Ignore SimpleCorsSameOriginSucceededs

* Ignore NoCorsCrossOriginFetchRequestSucceeds

* Revert "Ignore NoCorsCrossOriginFetchRequestSucceeds"

This reverts commit b5445fb5af.

* Revert "Ignore SimpleCorsSameOriginSucceededs"

This reverts commit ab75c37373.

* Revert "RequestWithProxyAuthorizationHeaderFails"

This reverts commit 70148b17de.

* Revert "Ignore SimpleCorsCrossOriginFetchFails"

This reverts commit 982e4508b9.

* Revert "Ignore SimpleCorsForbiddenMethodFails"

This reverts commit 869bda9782.

* Revert "Disable FullCorsCrossOriginToAnotherCrossOriginRedirectWithPreflightFails"

This reverts commit e9e178a07a.

* Revert "Skip test FullCorsCrossOriginToAnotherCrossOriginRedirectSucceeds"

This reverts commit 6688e7dce5.

* Skip OP integration tests

* Empty commit

* Use scoped_lock for runtime options

* Testing signature

* Have C++ Rt Option functions call ABI-safe ones

* Ensure different ports for each netwk test class

* Remove remaining hard-coded ports from WS tests

* Use ABI-safe callback for GetRtOptString

* Only insert boolean rt options when true

* Use static variable for port in HttpResourceIntegrationTest

* Add HttpResourceIntegrationTest::SimpleRedirectSucceeds

* Move C++ Rt Optio APIs to new header CppRuntimeOptions.h

* Implement internal Set/GetRuntimeOptionString

* clang format

* Rename Microsoft_React_* functions to MicrosoftReact*

* Update nuspec
2022-04-20 23:49:37 +00:00
Andrew Coates 4531ab803a
Removing some files that are no longer needed (#9755)
* Remove deskop base ShadowNode and ViewManager classes

* Change files

* update hash

* fixes

* format

* fix
2022-03-30 17:40:53 -07:00
Chiara Mooney b0dbc51d8a
Integrate RN Nightly Build 3/11 (#9726)
* Integrate 3/11

* Change files

* Fix Build Breaks

* Fix Build Break

* Format

* Fix Compiler Warning
2022-03-28 11:25:18 -07:00
Julio César Rocha 9a7beb80d6
Adjust PackageReferences ProjectCapability evaluation (#9664)
* Print Project Capabilities in Vars

* Update packages.lock.json

* Remove unused CppEnablePackageReferences.props

* Change files

* Drop ProjectCapability setting

* Revert "Remove unused CppEnablePackageReferences.props"

This reverts commit 2f653d2658.

* Revert "Revert "Remove unused CppEnablePackageReferences.props""

This reverts commit dcbcd85639.

* Move ProjectCapatility to React.Cpp.props

* Drop ProjectCapability=PackageReferences. Hangs VS2022
2022-03-09 02:10:14 +00:00
Julio César Rocha 2d3725153e
Update packages.lock.json (#9608)
* Update packages.lock.json

* Change files
2022-02-25 16:25:17 +00:00
Julio César Rocha ab5839b7c1
Update packages.lock.json (#9547)
* Update packages.lock.json

* Change files
2022-02-18 18:08:42 +00:00
Jon Thysell 0eb598de75
Normalize package reference for WinUI between C# and C++ templates (#9372)
* Normalize package reference for WinUI between C# and C++ templates

The targets for RNW UWP apps followed different patterns when trying to include WinUI. C++ included a one-liner with the WinUI package name and version props, directly in the app project file. C# ignored the props and used a large MSBuild conditional block directly in the app project file.

This change moves to using the one-liner for both, and puts it into the external targets file. Users who want to specify a different version can override the props (what we want) rather than modifying their project file. I've also moved around some of the other references so that the CsharpApp and CppApp targets are more normalized.

Closes #8486
2022-02-09 09:52:19 -08:00
Julio César Rocha bcdf9ad68e
Use PackageReference for C++ dependencies (#8195)
* Migrate `vnext` projects to `PackageReference`.

* Allow `run-windows` to directly restore `package.config` files when conflicting with `PackageReference` items.

* Allow parameterizing package names and versions which can be handled as any MSBuild property.

* Migrate C++ templates to `PackageReference`.

* Drop `packages` directory for `vnext` projects NuGet dependencies.\
  Dependencies will be accessed directly at the downloaded NuGet `globalPackagesFolder` using `msbuild /restore`.\
  This removes redundant copies of downloaded packages.
2021-12-03 23:19:47 -08:00
Chiara Mooney 2419191300
Integrate RN Nightly Build 11/11 (#9214)
* Integrate 11/11

* Adjust Overrides

* Fix Overrides

* Change files

* Fix Linting

* Fix E2E Test Case

* Patch Overrides

* Update Snapshot File Names

* Update Lock File

* Add API for isAccessibilityServiceEnabled

* Add noexcept

* Run Yarn Format

* Remove Stale Snapshots

* Upgrade deprecated-react-native-prop-types

* Add Callback to New Method

* Add flow-typed files to eslintignore

* Add flow-typed files to eslintignore

* Update ReactNativeVersionCheck

* Resolve ReactNativeVersionCheck flow issues

* Resolve flow issues

* Fix Lint

* Fix Flow

* Fix Flow

* Fix Flow

* Fix Flow

* Fix Flow

* Fix Flow

* Fix Lint

* Fix Flow
2021-12-02 12:15:57 -08:00
Nick Gerleman d336f1a736
NuGet Lockfile Improvements and Caching Removal (#9093)
* NuGet Caching Improvements

We are only caching the directory that packages.config style projects restore to. Cache the ProjectReference ones.

Enforces that lockfiles are updated in CI, so that we do not see lockfile changes during build interfering with cache. Updated related projects to look more like template, and fix non-deterministic lockfiles.

Adds logic to only cache the zipped nupkg files, since the nuget cache directory redundantly includes both them, and loose extracted files.

* fixes

* try diffferent glob

* fixes

* update directoeries

* typo

* try different glob

* No partial restore

* remove caching
2021-11-12 16:02:20 -08:00
Nick Gerleman 26db8a0e95
Cache NuGet Packages in CI (#9072)
* Cache NuGet Packages in CI

We keep on seeing network instability with NuGet restore. Locally cache the NuGet packages to try to fix some instability, and maybe speed things up a bit.

* Add PackageReference Locks

* Change files

* rnw-img-test

* separate dir

* typo

* invalidate cache

* Update msbuild.sln

* smh

* Update `run-windows-with-certificates` cache key

* Revert test image
2021-11-09 01:03:33 +00:00