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

15 Коммитов

Автор SHA1 Сообщение Дата
Julio César Rocha ef642b3b06
[0.71] Use TurboModules for networking in MSRN (#11890)
* Implement HTTP incremental updates (#10933)

* Declare remaining HTTP module event names

* Set Progress handler

* More debug data

* Update AutolinkedNativeModules.g

* Define IHttpResource::SetOnIncrementalData

* Set up and invoke OnIncrementalData

* Clean up Progress functor

* Handle didReceiveNetworkDataProgress event

- Define IHttpResource::SetOnDataProgress

* Default segment size to 8MB

* Define IHttpResource::SetOnResponseComplete

- Separates request completion event from non-incremental data reception event.

* Revert playground-win32 generated files

* Change files

* Address feedback

* Added docs for IHttpResource methods

* Test Access-Control-Request-Headers (#11031)

* Add test ValidatePreflightResponseMainAndContentHeadersSucceeds
* Allow resetting static origin

* Allow disabling static graph restore under VS (#11186)

* Drop RestoreUseStaticGraphEvaluation

* emtpy

* Change files

* Revert unrelated files

* Revert to main

* Condition restore graph to DisableRestoreUseStaticGraphEvaluation

* Use case-insensitive comparison for CORS preflight responses (#11511)

* Remove usage of RestoreUseStaticGraphEvaluation

* Add test ValidatePreflightResponseHeadersCaseMismatchSucceeds

* Use case-insensitive comparer for AllowedHeaders

* Change files

* Revert "Remove usage of RestoreUseStaticGraphEvaluation"

This reverts commit 735b168892.

* Rename ConstWcharComparer to CaseInsensitiveComparer

* Update vnext/Desktop.UnitTests/OriginPolicyHttpFilterTest.cpp

Co-authored-by: Danny van Velzen <dannyvv@microsoft.com>

* Remove unused code

* Make ExposedHeaders case-insensitive

---------

Co-authored-by: Danny van Velzen <dannyvv@microsoft.com>

* Change multi_threaded_map to single_threaded_map in WinRTHttpResource (#11604)

* Change multi_threaded_map to single_threaded_map in WinRTHttpResource

* Change files

* Fix fetch failing with certain custom user agents (#11775)

* Fix fetch failing with certain custom user agents

* Change files

* Bump C++ Windows Version macros to Windows 10 (#11516)

* Bump default _WIN32_WINNT_VERSION

* Change files

* Remove unused Beast-dependent code (#11517)

* Remove unused Beast production code

* Change files

* clang format

---------

Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>

* 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

* Define WebSocket TurboModule (#11802)

* Add WSTurboModule.h

* Implement CreateResource and MSRN SendEvent

* Define IWebSocketModuleContentHandler::ProcessMessage with JSValueObject

* Complete WebSocketTurboModule::CreateResource

* Complete WebSocketTurboModule::Connect

* Implement close, send, sendBinary and ping

* Include NativeWebSocketModuleSpec

* Make Close spec-compliant

* Add spec-compliant method stubs

* Make remaining existing methods spec-compliant

* Move NOOP Add/RemoveListeners implementation into source file

* clang format

* Use double as keys for m_resourceMap

* Change files

* Define HTTP TurboModule (#11825)

* Declare TurboModule

* Generate NativeNetworkingWindows spec

* Define HttpTurboModule

* Begin resource setup

* Initialize: Up to SetOnData

* Define wchar_t event names

* Migrate IRequestBodyHandler to JSValue

IMPORTANT: Migrate and fix RequestArgs::Data

* Migrate IResponseHandler to JSValue

* Rename m_onDataDynamic as m_onDataObject

* Implement Microsoft::React::Modules::ToJSValue

* Migrate IHttpResource to JSValue

* Fix Playground flavors ordering

* Finish implementing Initialize

* Define ToDynamic

* Change files

* Revert module.g.cpp

* Revert "Revert module.g.cpp"

This reverts commit 2f6c88a0a4.

* Define target SetCppWinRTReferences

* clang format

* Revert temporary symbol exports

* Fix RedirectHttpFilterUnitTest import order

* Preserve include ordering in RedirectHttpFilterUnitTest.cpp

* Fix JSValueArray list constructor

* Drop RCTNetworkingNative in favor of NativeNetworkingWindows

* Add NativeNetworkingWindows to overrides

* Fix overrides.json newline

* Desktop int. tests: set RN_PLATFORM to win32

* Use iterator to lookup content types

* Revert module.g.cpp to main

* Use iterator for ToRequestBody content type

* Drop namespace from JSValueObject usage

* Finish HttpTurboModule

* clang format

* Use iOS HTTP spec

* Use DynamicReader and DynamicWriter for folly conversions

* Revert overrides.json

* Don't add newline to overrides.json

* Make RCTNetworking.windows.js a copy of RCTNetworking.ios.js

* Override upgrade

* Default IncludeFabricInterface to true (#11835)

* Default IncludeFabricInterface to true

* Change files

* Remove IncludeFabricInterface from ExperimentalFeatures

* Define Blob TurboModule (#11842)

* REVERT: remove CompositionView exports

* Declare BlobTurboModule

* Revert "REVERT: remove CompositionView exports"

This reverts commit 1ba874e0a0.

* Define BlobTurboModule

* Declare IBlobResource

* Define DefaultBlobResource

* Define BlobCallbacks

* Migrate BlobWebSocketModuleContentHandler

* Pass needed args to DefaultBlobResource

* Define IBlobResource +/- network handlers

* Implement BlobModule using IBlobResource

* Fix GetConstants ownership

* Change files

* Set up error callback!

* clang format

* Remove BlobModule::SharedState

* Clean up includes and usings

* Remove ProcessMessage folly variant

* Remove folly:dynamic references

* Define IBlobResource::FieldNames

* Move IBlobPersistor out of Modules/

* Remove TODO comments

* clang format

* Add missing include to DefaultBlobResource

* Use TurboModules for networking in MSRN (#11867)

* Update packages.json

* Define GetHttpTurboModuleName

* Update packages.json

* Define GetHttpModuleProvider

* Define other netwk modules provider methods

* Register networking turbomodules

* Change files

* clang format

* Uncomment MSRN forward declarations

* Remove cntPtr.h include

* Remove CoreNativeModules

* Revert packages.lock.json

* Remove change files

* Change files

* Revert lock files

* Generalize FileReader promise type parameters

* Adjust Networking override to v0.71.x

* Use correct data types in FileReaderTurboModule::ReadAs* (#11902)

* Use ReadAs* data argument as JSValueObject

* Change files

---------

Co-authored-by: Danny van Velzen <dannyvv@microsoft.com>
Co-authored-by: Liron Yahdav <lyahdav@users.noreply.github.com>
Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>
2023-07-17 21:22:18 -07: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
Tatiana Kapos d9bc366f9b
Integrate 7/29 RN Nightly Build (#10479)
Updating RN: 8af7870c6...a21a1f845

* integrate-7-29-22

* Change files

* add stub methods to get build working

* add stub method to NodeJsi

* fix virtualizedList path

* override attributedString and cleanup stub methods

* fix build

* upgrade hermes to 0.71.0.20220831

* downgrade to hermes-windows .70 and override JSI files

* Fix babel and eslint issues

* Fix overrides

* Consolidate correct babel config

Co-authored-by: Jon Thysell (JAUNTY) <jthysell@microsoft.com>
2022-10-04 10:17:58 -07:00
Nick Gerleman b787f09af7
Remove prettier extension reccomendation (#9653)
We run prettier through ESLint. Remove the reccomendation to install the prettier plugin for gthe repo
2022-03-11 12:40:50 -08:00
Nick Gerleman dfc6ca9c55
Add beachball change transformer (#9488)
* Add beachball change transformer

Beachball has a relatively recent option, which allows modifying changefiles before trying to bump/publish. We can use this to workaround two common painpoints.

1. Changes backported to 0.69 and later will not need any modification to changefiles when cherry-picking.
2. We do some formatting to create consistency of omiting the version in change messages in our changelogs

* Remove stale file

* Change files

* Fix bug around missing packages

* Fuller JS env in setup

* Simplify logic

* Fix template path

* use remote midgard-yarn on ubuntu agent

* yaml

* Build more

* Move beachball config to its own package

* Consistency

* Cleanup yarn install logic for hosted vs managed images

* Fixup lockfile issues

* Update min to node 14

* Import shared variables and rename

* Variable fixup
2022-02-12 15:11:21 +00:00
dannyvv 01c20a6851
Add SBom Manifest Generation (#9497) 2022-02-08 10:12:43 -08:00
Nick Gerleman 2df3273449
Fix TypeScript eslint Config (#5980)
* Fixup eslint config

* Change files

* Revert getTreeDumpResult changes
2020-09-20 20:27:38 -07:00
Nick Gerleman cf5770eaaa
Start Sharing Test Configuration Between Node Projects (#5946)
* Start Sharing Test Configuration Between Node Projects

This change moves some of the work I did for setting up unit tests and end to end tests for react-native-platform-override to a shared location. This prepares us for enabling these sorts of tests across projects in the repo without duplicating configuration. Some work still needs to be done per-project to enable this, and some of this still needs to be documented.

Validated:
- One-click debug tests from VS Code
- Unit tests are automatically run when you type, end to end tests aren't
- yarn test will automatically detect unit tests and end to ends tests

* Change files

* Remove extra babel config
2020-09-11 01:30:52 -07:00
Nick Gerleman 62f3bb771a
Enable @typescript-eslint/no-floating-promises and @typescript-eslint/no-misused-promises (#5924)
* Enable @typescript-eslint/no-floating-promises

This rule will create errors if we have an unhandled promise, such as forgetting the "await" operator. Enable the rule and fix up current instances by adding "await" or using the "void" operator, as the rule suggests to signal intentional floating promises.

This rule requires type information, which requires pointing eslint config to a local project. This doesnt't work over an entire monorepo, such as when using VS Code outside of an individual package, so we split up our eslint config into a per-package one and one that can run in the package root without project-local info. The former is run by "yarn lint" during CI and the latter is shown by VS Code.

This also found some accidentally checked in build targets that we can remove.

* Change files

* Keep wrapped in conditional

* Add @typescript-eslint/no-misused-promises
2020-09-08 22:51:48 +00:00
Andrew Coates f8c0d1c4d3
Generate sourcemap for offline RNTester bundle in win32 (#4483)
* Generate sourcemap for offline RNTester bundle in win32

* Change files
2020-04-03 18:25:07 +00:00
Andrew Coates 61a1d87c0b
SourceCode module should provide scriptURL when running livereload without webdebugger (#3803)
* Minor fixups after initial rn-win32 checkin

* Provide source uri in SourceCode module when using livereload

* Provide source uri in SourceCode module when using livereload

* Change files

* build fix

* fix build

* fix build
2019-12-20 10:45:50 -08:00
Andrew Coates 0bd7ead9e2
Start tracking API changes, and generating API documentation (#2932)
* Start API documentation

* Change files
2019-08-15 15:21:01 -07:00
Andrew Coates b8baa5e251
Verify format of cpp/h files during CI (#2739)
* Add script to format files

* Updated format for files

* More formatting..

* Add verify command

* Verify formatting as part of CI

* Fix pre/post install hooks so that they write package.json in a way that matches prettier

* Fix formatting
2019-07-08 15:37:31 -07:00
Andrew Coates 90d63820ef
Fix RNTester bundle (#2728)
* Fix RNTester bundle

* Update GettingStarted for new location of RNTester

* Try fixing CLI

* RNTester bundle only builds against our RN fork for now
2019-07-03 15:52:05 -07:00
acoates-ms 388743e157
Hook up some basic formatting configuration for vscode (#2655)
* Hook up some basic formatting configuration for vscode

* Replace tslint with eslint

* Format on save

* Fix a bunch of eslint errors

* Dont run lint on already build files

* lint now enforces LF to match community
2019-07-01 12:38:12 -07:00