mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
109
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e2592b5fb | ||
|
|
3766e58b9a | ||
|
|
6031905711 | ||
|
|
990ca0d100 | ||
|
|
e02e7b1a29 | ||
|
|
af904e563e | ||
|
|
a073080810 | ||
|
|
5a4ed2d955 | ||
|
|
0a3bcc97ec | ||
|
|
a81e94a40c | ||
|
|
fa465c6da9 | ||
|
|
0b14a19ea6 | ||
|
|
3774f75705 | ||
|
|
279835dc14 | ||
|
|
3fb6c12ec8 | ||
|
|
fe043446e8 | ||
|
|
c47205990d | ||
|
|
2f40224faf | ||
|
|
fb09b37646 | ||
|
|
488b31d29a | ||
|
|
99b7cb77a7 | ||
|
|
969e14271c | ||
|
|
8386a9e4f1 | ||
|
|
163d553ba2 | ||
|
|
589bf35cd1 | ||
|
|
dd6c23fb61 | ||
|
|
218d2f6fdc | ||
|
|
456e01bf3f | ||
|
|
8bc133c6c1 | ||
|
|
f7ea40bc28 | ||
|
|
ad5949ffd6 | ||
|
|
2d2011c7ae | ||
|
|
29b74061e4 | ||
|
|
4f2755bda5 | ||
|
|
64d34080af | ||
|
|
b9dcc1b670 | ||
|
|
49b0045669 | ||
|
|
2b5938c900 | ||
|
|
d3890080c8 | ||
|
|
62fd6895e3 | ||
|
|
7b8590f860 | ||
|
|
4e595b7c7d | ||
|
|
ed24a4d05b | ||
|
|
92cae27cb2 | ||
|
|
490b05d0d8 | ||
|
|
09441d8691 | ||
|
|
5735bb5955 | ||
|
|
6e9a46ab81 | ||
|
|
f599e2a613 | ||
|
|
b577679746 | ||
|
|
88f05b219c | ||
|
|
dc3736893d | ||
|
|
3a954caf4f | ||
|
|
2dfb36e3c6 | ||
|
|
10b45b6200 | ||
|
|
430765b071 | ||
|
|
ed6aa0f25a | ||
|
|
8027067322 | ||
|
|
eb9e94256e | ||
|
|
dc4a6d2c7e | ||
|
|
417e068220 | ||
|
|
dc132a4fd4 | ||
|
|
18ba21149a | ||
|
|
53f89bacd4 | ||
|
|
14dc03e2bd | ||
|
|
22002bb70c | ||
|
|
b00d3be572 | ||
|
|
4acb3d3e7c | ||
|
|
f4b6131850 | ||
|
|
b9e6e349f5 | ||
|
|
1c2b9f9206 | ||
|
|
1c5fb903fd | ||
|
|
6936bd9f6b | ||
|
|
8c2f9e47fa | ||
|
|
ee811a82ec | ||
|
|
2e55154665 | ||
|
|
5c369aa34c | ||
|
|
2065c31800 | ||
|
|
5684546251 | ||
|
|
f09f4a779e | ||
|
|
ec5bc3b285 | ||
|
|
46c75c1043 | ||
|
|
e3bf881ae6 | ||
|
|
e4368154a5 | ||
|
|
4148746941 | ||
|
|
34f7137cdc | ||
|
|
4d45e5987c | ||
|
|
2e4da10b52 | ||
|
|
b10faf6c02 | ||
|
|
c6395eccd4 | ||
|
|
515c735347 | ||
|
|
6807231120 | ||
|
|
fc4a692b8e | ||
|
|
8db93abf12 | ||
|
|
7cd3328b21 | ||
|
|
072b105f52 | ||
|
|
c1827fcd04 | ||
|
|
0915833f7c | ||
|
|
57a1820c85 | ||
|
|
e1a6c38cc1 | ||
|
|
e314f6161a | ||
|
|
ce243df972 | ||
|
|
23b2b99c4b | ||
|
|
5ef054921c | ||
|
|
71b7dd8519 | ||
|
|
5b544c7cd8 | ||
|
|
a4d43290c8 | ||
|
|
7fb90c3f1b | ||
|
|
362ed179a8 |
+2
-2
@@ -69,7 +69,7 @@ munge_underscores=true
|
||||
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/packages/react-native/index.js'
|
||||
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-native/\1'
|
||||
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
|
||||
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
|
||||
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
|
||||
|
||||
module.system.haste.module_ref_prefix=m#
|
||||
|
||||
@@ -98,4 +98,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.284.0
|
||||
^0.287.0
|
||||
|
||||
@@ -133,6 +133,7 @@ vendor/
|
||||
# Swift Package build folder
|
||||
/packages/react-native/.build
|
||||
/packages/react-native/.swiftpm
|
||||
/packages/react-native/React/includes/
|
||||
|
||||
# @react-native/codegen
|
||||
/packages/react-native/React/FBReactNativeSpec/
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
# Changelog
|
||||
|
||||
## v0.82.0-rc.5
|
||||
|
||||
### Breaking
|
||||
|
||||
- **InteractionManager:** InteractionManager has been deprecated and no longer respects interaction handles. Instead, it is now recommended to avoid executing long-running JavaScript tasks by breaking them up into smaller tasks and scheduling them using `requestIdleCallback()`. ([03d9f34a82](https://github.com/facebook/react-native/commit/03d9f34a8252456d389d9f9a3bd04b99a2828c16) by [@yungsters](https://github.com/yungsters))
|
||||
|
||||
### Added
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- **New Architecture:** Crash the app if they force the legacy architecture. ([dc132a4fd4](https://github.com/facebook/react-native/commit/dc132a4fd4ca8dc28dc7dbb2406ac67dac1a0ee7) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- **Fabric:** Add invalidation callback for non-recycled component instances ([dc4a6d2c7e](https://github.com/facebook/react-native/commit/dc4a6d2c7e2ed421b61929896f60b1a864a60d97) by [@kkafar](https://github.com/kkafar))
|
||||
|
||||
## v0.82.0-rc.4
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Hermes V1:** Fixed coordinates for Hermes V1 artifacts ([674fb77d93](https://github.com/facebook/react-native/commit/674fb77d93dfe67a5fe90449dc71b195b1851e13) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- **Switch:** Fix Switch layout to work with iOS26 ([91d427fe52](https://github.com/facebook/react-native/commit/91d427fe52a307f9aa8579912ef956d61808dad2) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
|
||||
## v0.82.0-rc.3
|
||||
|
||||
### Added
|
||||
@@ -16,6 +39,15 @@
|
||||
|
||||
- **Codegen:** Fix regression that skips artifacts code generation ([f6f5ea0b2e](https://github.com/facebook/react-native/commit/f6f5ea0b2eed894725d8f6e8bd045c99c3182026) by [@kitten](https://github.com/kitten))
|
||||
|
||||
## v0.81.4
|
||||
|
||||
### Fixed
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Fix regression that skips artifacts code generation ([f6f5ea0b2e](https://github.com/facebook/react-native/commit/f6f5ea0b2eed894725d8f6e8bd045c99c3182026) by [@kitten](https://github.com/kitten))
|
||||
- Reapplied "Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source" ([bb73315a3f](https://github.com/facebook/react-native/commit/bb73315a3fd8cd203c4ddb3ffa10bfec307c7e92) by [@kitten](https://github.com/kitten))
|
||||
|
||||
## v0.81.3
|
||||
|
||||
### Fixed
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoole
|
||||
|
||||
That's fine for local development, but you should not commit this change.
|
||||
********************************************************************************
|
||||
"""
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
allprojects {
|
||||
|
||||
Vendored
+9
-9
@@ -3057,30 +3057,30 @@ type util$InspectOptions = {
|
||||
};
|
||||
|
||||
declare type util$ParseArgsOption =
|
||||
| {|
|
||||
| $ReadOnly<{|
|
||||
type: 'boolean',
|
||||
multiple?: false,
|
||||
short?: string,
|
||||
default?: boolean,
|
||||
|}
|
||||
| {|
|
||||
|}>
|
||||
| $ReadOnly<{|
|
||||
type: 'boolean',
|
||||
multiple: true,
|
||||
short?: string,
|
||||
default?: Array<boolean>,
|
||||
|}
|
||||
| {|
|
||||
|}>
|
||||
| $ReadOnly<{|
|
||||
type: 'string',
|
||||
multiple?: false,
|
||||
short?: string,
|
||||
default?: string,
|
||||
|}
|
||||
| {|
|
||||
|}>
|
||||
| $ReadOnly<{|
|
||||
type: 'string',
|
||||
multiple: true,
|
||||
short?: string,
|
||||
default?: Array<string>,
|
||||
|};
|
||||
|}>;
|
||||
|
||||
type util$ParseArgsOptionToValue<TOption> = TOption['type'] extends 'boolean'
|
||||
? TOption['multiple'] extends true
|
||||
@@ -3137,7 +3137,7 @@ declare module 'util' {
|
||||
declare function stripVTControlCharacters(str: string): string;
|
||||
|
||||
declare function parseArgs<
|
||||
TOptions: {[string]: util$ParseArgsOption} = {||},
|
||||
TOptions: {+[string]: util$ParseArgsOption} = {||},
|
||||
>(config: {|
|
||||
args?: Array<string>,
|
||||
options?: TOptions,
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"fb-dotslash": "0.5.8",
|
||||
"flow-api-translator": "0.32.0",
|
||||
"flow-bin": "^0.284.0",
|
||||
"flow-bin": "^0.287.0",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.32.0",
|
||||
"hermes-transform": "0.32.0",
|
||||
|
||||
@@ -119,7 +119,6 @@ async function runServer(
|
||||
watchFolders,
|
||||
});
|
||||
const {middleware, websocketEndpoints} = createDevMiddleware({
|
||||
projectRoot,
|
||||
serverBaseUrl: devServerUrl,
|
||||
logger: createDevMiddlewareLogger(terminalReporter),
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<d090ed9a9e781c82884f22944254ed65>>
|
||||
Git revision: 8b84a77b2c82c670886ef064dfc92d6bce83e579
|
||||
@generated SignedSource<<e0cc45c5c3854d0d3013f1c735e804b8>>
|
||||
Git revision: 8cce39003f66f66a8fb4c0e581a2b5046cf9c1d1
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
|
||||
packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-debugging-basics.jpg
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 45 KiB |
packages/debugger-frontend/dist/third-party/front_end/Images/react_native/learn-native-debugging.jpg
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 51 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 4.0 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+16
-14
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -983,7 +983,7 @@ import*as e from"../../../services/trace_bounds/trace_bounds.js";import*as t fro
|
||||
|
||||
<p class="tooltip">${Ai(Oi.feedbackTooltip)}</p>
|
||||
</div>
|
||||
`,n=s.Directives.repeat([i],(()=>this.#ve),(e=>e));s.render(n,this.#e,{host:this})}}customElements.define("devtools-performance-sidebar-insights",Ui);var Bi=Object.freeze({__proto__:null,SidebarInsightsTab:Ui});class qi extends Event{removedAnnotation;static eventName="removeannotation";constructor(e){super(qi.eventName,{bubbles:!0,composed:!0}),this.removedAnnotation=e}}class Vi extends Event{annotation;static eventName="revealannotation";constructor(e){super(Vi.eventName,{bubbles:!0,composed:!0}),this.annotation=e}}class ji extends r.Widget.VBox{#ri=new r.TabbedPane.TabbedPane;#tn=new Wi;#in=new Ki;#nn=a.Settings.Settings.instance().createSetting("timeline-user-has-opened-sidebar-once",!1);userHasOpenedSidebarOnce(){return this.#nn.get()}constructor(){super(),this.setMinimumSize(170,0),this.#ri.appendTab("insights","Insights",this.#tn,void 0,void 0,!1,!1,0,"timeline.insights-tab"),this.#ri.appendTab("annotations","Annotations",this.#in,void 0,void 0,!1,!1,1,"timeline.annotations-tab"),this.#ri.selectTab("insights")}wasShown(){this.#nn.set(!0),this.#ri.show(this.element),this.#rn(),"insights"===this.#ri.selectedTabId&&this.#ri.tabIsDisabled("insights")&&this.#ri.selectTab("annotations")}setAnnotations(e,t){this.#in.setAnnotations(e,t),this.#rn()}#rn(){const e=this.#in.deduplicatedAnnotations();this.#ri.setBadge("annotations",e.length>0?e.length.toString():null)}setParsedTrace(e,t){this.#tn.setParsedTrace(e,t)}setInsights(e){this.#tn.setInsights(e),this.#ri.setTabEnabled("insights",null!==e)}setActiveInsight(e){this.#tn.setActiveInsight(e),e&&this.#ri.selectTab("insights")}}class Wi extends r.Widget.VBox{#sn=new Ui;constructor(){super(),this.element.classList.add("sidebar-insights"),this.element.appendChild(this.#sn)}setParsedTrace(e,t){this.#sn.parsedTrace=e,this.#sn.traceMetadata=t}setInsights(e){this.#sn.insights=e}setActiveInsight(e){this.#sn.activeInsight=e}}class Ki extends r.Widget.VBox{#sn=new xi;constructor(){super(),this.element.classList.add("sidebar-annotations"),this.element.appendChild(this.#sn)}setAnnotations(e,t){this.#sn.annotationEntryToColorMap=t,this.#sn.annotations=e}deduplicatedAnnotations(){return this.#sn.deduplicatedAnnotations()}}var Gi=Object.freeze({__proto__:null,DEFAULT_SIDEBAR_TAB:"insights",DEFAULT_SIDEBAR_WIDTH_PX:240,RemoveAnnotation:qi,RevealAnnotation:Vi,SidebarWidget:ji}),Yi={cssText:`:host{max-height:100%;overflow:hidden auto;scrollbar-width:thin}.timeline-summary{font-size:var(--sys-typescale-body4-size);flex-direction:column;padding:0 var(--sys-size-6) var(--sys-size-4) var(--sys-size-8)}.summary-range{font-weight:var(--ref-typeface-weight-medium);height:24.5px;line-height:22px}.category-summary{gap:var(--sys-size-4);display:flex;flex-direction:column}.category-row{min-height:16px;line-height:16px}.category-swatch{display:inline-block;width:var(--sys-size-6);height:var(--sys-size-6);margin-right:var(--sys-size-4);top:var(--sys-size-1);position:relative;border:var(--sys-size-1) solid var(--sys-color-neutral-outline)}.category-name{display:inline;word-break:break-all}.category-value{text-align:right;position:relative;float:right;z-index:0;width:var(--sys-size-19)}.background-bar-container{position:absolute;inset:0 0 0 var(--sys-size-3);z-index:-1}.background-bar{width:100%;float:right;height:var(--sys-size-8);background-color:var(--sys-color-surface-yellow);border-bottom:var(--sys-size-1) solid var(--sys-color-yellow-outline)}\n/*# sourceURL=${import.meta.resolve("./timelineSummary.css")} */\n`};const{render:Xi,html:Ji}=s,Zi={total:"Total",rangeSS:"Range: {PH1} – {PH2}"},Qi=t.i18n.registerUIStrings("panels/timeline/components/TimelineSummary.ts",Zi),en=t.i18n.getLocalizedString.bind(void 0,Qi);class tn extends HTMLElement{#e=r.UIUtils.createShadowRootWithCoreStyles(this,{cssFile:Yi,delegatesFocus:void 0});#on=0;#an=0;#ln=0;#dn=[];set data(e){this.#ln=e.total,this.#dn=e.categories,this.#on=e.rangeStart,this.#an=e.rangeEnd,this.#i()}#i(){const e=Ji`
|
||||
`,n=s.Directives.repeat([i],(()=>this.#ve),(e=>e));s.render(n,this.#e,{host:this})}}customElements.define("devtools-performance-sidebar-insights",Ui);var Bi=Object.freeze({__proto__:null,SidebarInsightsTab:Ui});class qi extends Event{removedAnnotation;static eventName="removeannotation";constructor(e){super(qi.eventName,{bubbles:!0,composed:!0}),this.removedAnnotation=e}}class Vi extends Event{annotation;static eventName="revealannotation";constructor(e){super(Vi.eventName,{bubbles:!0,composed:!0}),this.annotation=e}}class ji extends r.Widget.VBox{#ri=new r.TabbedPane.TabbedPane;#tn=new Wi;#in=new Ki;#nn=a.Settings.Settings.instance().createSetting("timeline-user-has-opened-sidebar-once",!1);userHasOpenedSidebarOnce(){return this.#nn.get()}constructor(){super(),this.setMinimumSize(170,0);const e=!S.Runtime.experiments.isEnabled("react-native-specific-ui");e&&this.#ri.appendTab("insights","Insights",this.#tn,void 0,void 0,!1,!1,0,"timeline.insights-tab"),this.#ri.appendTab("annotations","Annotations",this.#in,void 0,void 0,!1,!1,1,"timeline.annotations-tab"),this.#ri.selectTab(e?"insights":"annotations")}wasShown(){this.#nn.set(!0),this.#ri.show(this.element),this.#rn(),"insights"===this.#ri.selectedTabId&&this.#ri.tabIsDisabled("insights")&&this.#ri.selectTab("annotations")}setAnnotations(e,t){this.#in.setAnnotations(e,t),this.#rn()}#rn(){const e=this.#in.deduplicatedAnnotations();this.#ri.setBadge("annotations",e.length>0?e.length.toString():null)}setParsedTrace(e,t){this.#tn.setParsedTrace(e,t)}setInsights(e){this.#tn.setInsights(e),this.#ri.setTabEnabled("insights",null!==e)}setActiveInsight(e){this.#tn.setActiveInsight(e),e&&this.#ri.selectTab("insights")}}class Wi extends r.Widget.VBox{#sn=new Ui;constructor(){super(),this.element.classList.add("sidebar-insights"),this.element.appendChild(this.#sn)}setParsedTrace(e,t){this.#sn.parsedTrace=e,this.#sn.traceMetadata=t}setInsights(e){this.#sn.insights=e}setActiveInsight(e){this.#sn.activeInsight=e}}class Ki extends r.Widget.VBox{#sn=new xi;constructor(){super(),this.element.classList.add("sidebar-annotations"),this.element.appendChild(this.#sn)}setAnnotations(e,t){this.#sn.annotationEntryToColorMap=t,this.#sn.annotations=e}deduplicatedAnnotations(){return this.#sn.deduplicatedAnnotations()}}var Gi=Object.freeze({__proto__:null,DEFAULT_SIDEBAR_TAB:"insights",DEFAULT_SIDEBAR_WIDTH_PX:240,RemoveAnnotation:qi,RevealAnnotation:Vi,SidebarWidget:ji}),Yi={cssText:`:host{max-height:100%;overflow:hidden auto;scrollbar-width:thin}.timeline-summary{font-size:var(--sys-typescale-body4-size);flex-direction:column;padding:0 var(--sys-size-6) var(--sys-size-4) var(--sys-size-8)}.summary-range{font-weight:var(--ref-typeface-weight-medium);height:24.5px;line-height:22px}.category-summary{gap:var(--sys-size-4);display:flex;flex-direction:column}.category-row{min-height:16px;line-height:16px}.category-swatch{display:inline-block;width:var(--sys-size-6);height:var(--sys-size-6);margin-right:var(--sys-size-4);top:var(--sys-size-1);position:relative;border:var(--sys-size-1) solid var(--sys-color-neutral-outline)}.category-name{display:inline;word-break:break-all}.category-value{text-align:right;position:relative;float:right;z-index:0;width:var(--sys-size-19)}.background-bar-container{position:absolute;inset:0 0 0 var(--sys-size-3);z-index:-1}.background-bar{width:100%;float:right;height:var(--sys-size-8);background-color:var(--sys-color-surface-yellow);border-bottom:var(--sys-size-1) solid var(--sys-color-yellow-outline)}\n/*# sourceURL=${import.meta.resolve("./timelineSummary.css")} */\n`};const{render:Xi,html:Ji}=s,Zi={total:"Total",rangeSS:"Range: {PH1} – {PH2}"},Qi=t.i18n.registerUIStrings("panels/timeline/components/TimelineSummary.ts",Zi),en=t.i18n.getLocalizedString.bind(void 0,Qi);class tn extends HTMLElement{#e=r.UIUtils.createShadowRootWithCoreStyles(this,{cssFile:Yi,delegatesFocus:void 0});#on=0;#an=0;#ln=0;#dn=[];set data(e){this.#ln=e.total,this.#dn=e.categories,this.#on=e.rangeStart,this.#an=e.rangeEnd,this.#i()}#i(){const e=Ji`
|
||||
<div class="timeline-summary">
|
||||
<div class="summary-range">${en(Zi.rangeSS,{PH1:t.TimeUtilities.millisToString(this.#on),PH2:t.TimeUtilities.millisToString(this.#an)})}</div>
|
||||
<div class="category-summary">
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,71 +1,71 @@
|
||||
#!/usr/bin/env dotslash
|
||||
|
||||
// @generated SignedSource<<9c0f52fabb1406dea9e1411186a49f4d>>
|
||||
// @generated SignedSource<<f03dde90e30b4654dc18ba4c688f588e>>
|
||||
|
||||
|
||||
{
|
||||
"name": "React Native DevTools",
|
||||
"platforms": {
|
||||
"linux-aarch64": {
|
||||
"size": 116052194,
|
||||
"size": 116056498,
|
||||
"hash": "sha256",
|
||||
"digest": "6ea405e02fb26fd4de16f93a35ea340c4bd3f8dac31e5d25d935f01540b7ff8e",
|
||||
"digest": "74ddbe463a81b57533a87f4301c6a6c74323018f70e4f1dbeed0dfbe2ebab257",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQMey7qYki6P6n_9C16jhxcWaGPGaH0dBIM76nl4xNfemVIfEVrvL143BIUFDetFqifepJowUX0BKF4tqnGpAeK_Y-yDzRK86RGK8dPqzx3xUih3niIDVmVt02JZzTpupw8gYhxV9SsuhEfkIIEZHIMOj9QWXkvJbKE-EPYTnwrnsdDkxcVb-ydEDC8"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQNNgo1RofrfkLfx2qh_zLXdyNL54sIiYfd6p9aXIk-1zJ2lV1dpD2p58FTweCN6y3RZcdE_u9U8z16S_xRbtgA0mobHgSK6JASeR3dCLmMAazKXiiSb98rToqI9XAdOc4pJOGhOb2PVQ_c6lzngiOQ0vkyYU7xFENy-7jKKLbqYFSoDgT7RBs4dnbw"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools-linux-arm64/React Native DevTools"
|
||||
},
|
||||
"linux-x86_64": {
|
||||
"size": 115921596,
|
||||
"size": 115924960,
|
||||
"hash": "sha256",
|
||||
"digest": "a7a07c684e436bd0f8ccfd3b2cbdb7c5b74b7bd662f60b6a142855568726c44e",
|
||||
"digest": "eba05066886fe6cd88b4123ed423ad301fd35b2f12381627b3b22c7955c73333",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOAG_xwP5LIc02siy7Er7cAhxD4GBoIYYbGe9jC9sDQe7rU_RGP0k553rIPMdFmDEmE210O83SjHn6g3VUWnxzatO4oqgy7cWfJzYFbYymxI8sac2hMFKH7Fe4S9nlovqHGkw63_3tzGFdxTa2gG99A46-zYfqEgFrvMlTCdd64D2tV1ut9Q5aP"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOXAiG9ivBeW9v9jZMpg7nJZRT1SNBjTz8Nc5_SWUPCUf3xDekbhB6w3lWc8JtfklAzOL5TlJOsvIT3eujx2exadBpcS5NiAnq47KYvcgGP9iVxv5NuRwxttCc3Vncl5CLpGA6-Ifkt1g2-MrdM5yiaSaMKOCDQ83C2Fw07zH6tXt28jsZcTaPj"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools-linux-x64/React Native DevTools"
|
||||
},
|
||||
"macos-aarch64": {
|
||||
"size": 110891220,
|
||||
"size": 110890882,
|
||||
"hash": "sha256",
|
||||
"digest": "47b256fa80b5158e80cb9a308ba62d655f3ad9b5069edb5272b10b771996e31f",
|
||||
"digest": "f289b7ae3c300b9d744c729a0024e55a2a8d6953a6a8e834d867f705daad1153",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPtR9VRT74xLvGOA6aY6HIx2OL-8diOgIClmMqp1IomIRj7IwORZ6DwZIEp__xGLyAIN1g7XNr9tTJ7W1OgDW7Kq74xtgc7UTve04Wz1y2ftpIDaSX5G4zUd2h6TTRCFWXz3ey3hLN1LmoeFE0p0--ajTQaPT0T-MipxvI5KAu_DimzBZL78e4CE_hV"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQP4xY72fwAGy3-m2Gx7mPodV90K-GbWYYIZ9_xgI89O0rm5GPmXE0u-C18Vq2h6x3zL479nhS7o9_OonWaISxx6TMYZcZsG9nkqTW3-uWcUi6ndzPNQILwryGVg034jrlmjKLB2CiIRoJvdW37wB_1AWFCOKO9gXRozFKV4ndjGDxDC6HJvbfFTacvX"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
|
||||
},
|
||||
"macos-x86_64": {
|
||||
"size": 117768466,
|
||||
"size": 117778007,
|
||||
"hash": "sha256",
|
||||
"digest": "5a6da66e54213e6fe764563a4b952e311e7dd9bbe24566226003ac04dd4505cd",
|
||||
"digest": "a4698d6c3e2fdfb0c7bafec2130f3701c655468f953af836bf66ce3fe848c6ae",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPE0gNVns9ZPmZNcsdsLq0FELH3tLhSERRZF1-IUaNnYUzUtjtPAIC3GeDqx1VOtFw2NMzO5oAl9Ei3CEf30lbNU-7iq65JL2xgXQMamI81tz8IwKEhul9f1GHIOb9qrTohGa-D3XeEFDDjNygMA4r9oXZqQol1nINLebnXUVhbEh92kfWZKZZguQ"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQMpGXCifWF6VrFwv_jM4lw-E8eFi59l776z1OYrS8u3mLluAyA8bUtscEyLwoMitqyjF7or5lPuW7OFyiyZ00bKFxSC5lH6Xo_Sc41cQN5n5hmXCX7Wpku9ilU39_ZWmI95W3_oAacYXA1l6ZmHX2AWlv3jERpywrP4J_RNFBi5UAvOhPFo4LtRXw"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
|
||||
},
|
||||
"windows-x86_64": {
|
||||
"size": 125527605,
|
||||
"size": 125528869,
|
||||
"hash": "sha256",
|
||||
"digest": "630102d4174fea343452a595f9f74f7817553f3e6573f7479b8990d0fe8ec27b",
|
||||
"digest": "95234a13e6ba55556cff46f3da8af9e57ff1010c5483265cbbd444cad01c4216",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQP6r04FTh5QxNDyLwpzq5rPLpVmkzLJj7x9XVGcPdJyS_oAQOIdHOCpIGgl8yKVJjE2rdhlWLSb04OoHrWJ5Yx_R-6RXBjgvY_DcntfXMnzHDUr5sZ3Ca1zTlt6_wbFYUHpdiGougDIirzEsb3dxCsIBIOkH5UPDbVzXrlN0qlCtJPLWcBzdKaI"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOJdgsL68PBrM0rJk-WOm-re-8uqKfI1FfcTcAr1hiFSQr2bKBOqQNtHLnEA6JlRvKrwlOp4XTB6y9pC1TISeGo2dG_BYwN9jsVRLzcGWvfnpZ6GR7evVe82-XKS3Ya5YpScRdLycRqrhHuACXXbQ0HNvhNJjBWZtnQ8N3vOFJXn5QOGlobXqYp"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
|
||||
@@ -8,11 +8,15 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
|
||||
const {BrowserWindow, Menu, app, shell, ipcMain} = require('electron') as any;
|
||||
import SettingsStore from './SettingsStore.js';
|
||||
|
||||
const path = require('path');
|
||||
const util = require('util');
|
||||
|
||||
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
|
||||
const {BrowserWindow, Menu, app, shell, ipcMain} = require('electron') as any;
|
||||
|
||||
const appSettings = new SettingsStore();
|
||||
const windowMetadata = new WeakMap<
|
||||
typeof BrowserWindow,
|
||||
$ReadOnly<{
|
||||
@@ -53,10 +57,11 @@ function handleLaunchArgs(argv: string[]) {
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
// Create the browser window.
|
||||
frontendWindow = new BrowserWindow({
|
||||
width: 1200,
|
||||
height: 600,
|
||||
...(getSavedWindowPosition(windowKey) ?? {
|
||||
width: 1200,
|
||||
height: 600,
|
||||
}),
|
||||
webPreferences: {
|
||||
partition: 'persist:react-native-devtools',
|
||||
preload: require.resolve('./preload.js'),
|
||||
@@ -66,6 +71,8 @@ function handleLaunchArgs(argv: string[]) {
|
||||
});
|
||||
// Auto-hide the Windows/Linux menu bar
|
||||
frontendWindow.setMenuBarVisibility(false);
|
||||
// Observe and update saved window position
|
||||
setupWindowResizeListeners(frontendWindow, windowKey);
|
||||
}
|
||||
|
||||
// Open links in the default browser instead of in new Electron windows.
|
||||
@@ -119,6 +126,37 @@ function configureAppMenu() {
|
||||
Menu.setApplicationMenu(menu);
|
||||
}
|
||||
|
||||
function getSavedWindowPosition(
|
||||
windowKey: string,
|
||||
): ?{width: number, height: number, x?: number, y?: number} {
|
||||
return appSettings.get('windowArrangements', {})[windowKey];
|
||||
}
|
||||
|
||||
function saveWindowPosition(
|
||||
windowKey: string,
|
||||
position: {x: number, y: number, width: number, height: number},
|
||||
) {
|
||||
const windowArrangements = appSettings.get('windowArrangements', {});
|
||||
windowArrangements[windowKey] = position;
|
||||
appSettings.set('windowArrangements', windowArrangements);
|
||||
}
|
||||
|
||||
function setupWindowResizeListeners(
|
||||
browserWindow: typeof BrowserWindow,
|
||||
windowKey: string,
|
||||
) {
|
||||
const savePosition = () => {
|
||||
if (!browserWindow.isDestroyed()) {
|
||||
const [x, y] = browserWindow.getPosition();
|
||||
const [width, height] = browserWindow.getSize();
|
||||
saveWindowPosition(windowKey, {x, y, width, height});
|
||||
}
|
||||
};
|
||||
browserWindow.on('moved', savePosition);
|
||||
browserWindow.on('resized', savePosition);
|
||||
browserWindow.on('closed', savePosition);
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
handleLaunchArgs(process.argv.slice(app.isPackaged ? 1 : 2));
|
||||
configureAppMenu();
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
|
||||
const {app} = require('electron') as any;
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
type Options = $ReadOnly<{
|
||||
name?: string,
|
||||
defaults?: Object,
|
||||
}>;
|
||||
|
||||
/**
|
||||
* A data persistence layer for storing application settings, modelled after
|
||||
* [`electron-store`](https://www.npmjs.com/package/electron-store).
|
||||
*
|
||||
* Values are saved in a `config.json` file in `app.getPath('userData')`.
|
||||
*
|
||||
* Compatibility:
|
||||
* - Maintains API and file format compatibility with `electron-store@8.2.0`.
|
||||
* - Supports the Electron main process only.
|
||||
*/
|
||||
export default class SettingsStore {
|
||||
#defaultValues: Object = {};
|
||||
path: string;
|
||||
|
||||
constructor(options: Options = {}) {
|
||||
options = {
|
||||
name: 'config',
|
||||
...options,
|
||||
};
|
||||
this.#defaultValues = {
|
||||
...this.#defaultValues,
|
||||
...options.defaults,
|
||||
};
|
||||
this.path = path.resolve(
|
||||
app.getPath('userData'),
|
||||
`${options.name ?? 'config'}.json`,
|
||||
);
|
||||
}
|
||||
|
||||
get(key: string, defaultValue?: any): any {
|
||||
const store = this.store;
|
||||
return store[key] !== undefined ? store[key] : defaultValue;
|
||||
}
|
||||
|
||||
set(key: string, value: any): void {
|
||||
const {store} = this;
|
||||
if (typeof key === 'object') {
|
||||
const object = key;
|
||||
for (const [k, v] of Object.entries(object)) {
|
||||
store[k] = v;
|
||||
}
|
||||
} else {
|
||||
store[key] = value;
|
||||
}
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
has(key: string): boolean {
|
||||
return key in this.store;
|
||||
}
|
||||
|
||||
reset(...keys: Array<string>): void {
|
||||
for (const key of keys) {
|
||||
if (this.#defaultValues[key] != null) {
|
||||
this.set(key, this.#defaultValues[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete(key: string): void {
|
||||
const {store} = this;
|
||||
delete store[key];
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
this.store = {};
|
||||
for (const key of Object.keys(this.#defaultValues)) {
|
||||
this.reset(key);
|
||||
}
|
||||
}
|
||||
|
||||
get store(): {[string]: mixed} {
|
||||
try {
|
||||
const data = fs.readFileSync(this.path, 'utf8');
|
||||
const deserializedData = this._deserialize(data);
|
||||
return {
|
||||
...((deserializedData: any): {[string]: mixed}),
|
||||
};
|
||||
} catch (error) {
|
||||
if (error?.code === 'ENOENT') {
|
||||
this._ensureDirectory();
|
||||
return {};
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
set store(value: mixed): void {
|
||||
this._ensureDirectory();
|
||||
this._write(value);
|
||||
}
|
||||
|
||||
_deserialize = (value: string): mixed => JSON.parse(value);
|
||||
_serialize = (value: mixed): string =>
|
||||
JSON.stringify(value, undefined, '\t') ?? '';
|
||||
|
||||
_ensureDirectory(): void {
|
||||
fs.mkdirSync(path.dirname(this.path), {recursive: true});
|
||||
}
|
||||
|
||||
_write(value: mixed): void {
|
||||
const data = this._serialize(value);
|
||||
|
||||
fs.writeFileSync(this.path, data, {mode: 0o666});
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,9 @@ app.setVersion(pkg.version + '-' + buildInfo.revision);
|
||||
const {
|
||||
values: {version = false},
|
||||
} = util.parseArgs({
|
||||
options: {version: {type: 'boolean'}},
|
||||
options: {
|
||||
version: {type: 'boolean'},
|
||||
},
|
||||
args: process.argv.slice(app.isPackaged ? 1 : 2),
|
||||
strict: false,
|
||||
});
|
||||
|
||||
@@ -30,6 +30,7 @@ async function unstable_spawnDebuggerShellWithArgs(
|
||||
{
|
||||
mode = 'detached',
|
||||
flavor = 'prebuilt',
|
||||
prebuiltBinaryPath,
|
||||
}: $ReadOnly<{
|
||||
// In 'syncAndExit' mode, the current process will block until the spawned process exits, and then it will exit
|
||||
// with the same exit code as the spawned process.
|
||||
@@ -37,9 +38,13 @@ async function unstable_spawnDebuggerShellWithArgs(
|
||||
// continue to run normally.
|
||||
mode?: 'syncThenExit' | 'detached',
|
||||
flavor?: DebuggerShellFlavor,
|
||||
prebuiltBinaryPath?: string,
|
||||
}> = {},
|
||||
): Promise<void> {
|
||||
const [binaryPath, baseArgs] = getShellBinaryAndArgs(flavor);
|
||||
const [binaryPath, baseArgs] = getShellBinaryAndArgs(
|
||||
flavor,
|
||||
prebuiltBinaryPath,
|
||||
);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const child = spawn(binaryPath, [...baseArgs, ...args], {
|
||||
@@ -109,14 +114,13 @@ export type DebuggerShellPreparationResult = $ReadOnly<{
|
||||
*/
|
||||
async function unstable_prepareDebuggerShell(
|
||||
flavor: DebuggerShellFlavor,
|
||||
{prebuiltBinaryPath}: {prebuiltBinaryPath?: string} = {},
|
||||
): Promise<DebuggerShellPreparationResult> {
|
||||
const [binaryPath, baseArgs] = getShellBinaryAndArgs(flavor);
|
||||
|
||||
try {
|
||||
switch (flavor) {
|
||||
case 'prebuilt':
|
||||
const prebuiltResult = await prepareDebuggerShellFromDotSlashFile(
|
||||
DEVTOOLS_BINARY_DOTSLASH_FILE,
|
||||
prebuiltBinaryPath ?? DEVTOOLS_BINARY_DOTSLASH_FILE,
|
||||
);
|
||||
if (prebuiltResult.code !== 'success') {
|
||||
return prebuiltResult;
|
||||
@@ -128,6 +132,11 @@ async function unstable_prepareDebuggerShell(
|
||||
flavor as empty;
|
||||
throw new Error(`Unknown flavor: ${flavor}`);
|
||||
}
|
||||
|
||||
const [binaryPath, baseArgs] = getShellBinaryAndArgs(
|
||||
flavor,
|
||||
prebuiltBinaryPath,
|
||||
);
|
||||
const {code, stderr} = await spawnAndGetStderr(binaryPath, [
|
||||
...baseArgs,
|
||||
'--version',
|
||||
@@ -149,10 +158,14 @@ async function unstable_prepareDebuggerShell(
|
||||
|
||||
function getShellBinaryAndArgs(
|
||||
flavor: DebuggerShellFlavor,
|
||||
prebuiltBinaryPath: ?string,
|
||||
): [string, Array<string>] {
|
||||
switch (flavor) {
|
||||
case 'prebuilt':
|
||||
return [require('fb-dotslash'), [DEVTOOLS_BINARY_DOTSLASH_FILE]];
|
||||
return [
|
||||
require('fb-dotslash'),
|
||||
[prebuiltBinaryPath ?? DEVTOOLS_BINARY_DOTSLASH_FILE],
|
||||
];
|
||||
case 'dev':
|
||||
return [
|
||||
// NOTE: Internally at Meta, this is aliased to a workspace that is
|
||||
|
||||
@@ -21,10 +21,6 @@ import {
|
||||
withServerForEachTest,
|
||||
} from './ServerUtils';
|
||||
import {createHash} from 'crypto';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
const fsPromise = fs.promises;
|
||||
|
||||
// WebSocket is unreliable when using fake timers.
|
||||
jest.useRealTimers();
|
||||
@@ -47,7 +43,6 @@ describe.each(['HTTP', 'HTTPS'])(
|
||||
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: __dirname,
|
||||
secure: protocol === 'HTTPS',
|
||||
});
|
||||
|
||||
@@ -472,14 +467,7 @@ describe.each(['HTTP', 'HTTPS'])(
|
||||
}
|
||||
});
|
||||
|
||||
test('reads source from disk', async () => {
|
||||
// Should be just 'foo\n', but the newline can get mangled by the OS
|
||||
// and/or SCM, so let's read the source of truth from disk.
|
||||
const fileRealContents = await fsPromise.readFile(
|
||||
path.join(__dirname, '__fixtures__', 'mock-source-file.txt'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
test('throws when attempting to pass a filesystem url', async () => {
|
||||
const {device, debugger_} = await createAndConnectTarget(
|
||||
serverRef,
|
||||
autoCleanup.signal,
|
||||
@@ -490,6 +478,7 @@ describe.each(['HTTP', 'HTTPS'])(
|
||||
vm: 'bar-vm',
|
||||
},
|
||||
);
|
||||
|
||||
try {
|
||||
await sendFromTargetToDebugger(device, debugger_, 'page1', {
|
||||
method: 'Debugger.scriptParsed',
|
||||
@@ -500,7 +489,7 @@ describe.each(['HTTP', 'HTTPS'])(
|
||||
endLine: 0,
|
||||
startColumn: 0,
|
||||
endColumn: 0,
|
||||
hash: createHash('sha256').update(fileRealContents).digest('hex'),
|
||||
hash: createHash('sha256').update('').digest('hex'),
|
||||
},
|
||||
});
|
||||
const response = await debugger_.sendAndGetResponse({
|
||||
@@ -511,8 +500,15 @@ describe.each(['HTTP', 'HTTPS'])(
|
||||
},
|
||||
});
|
||||
expect(response.result).toEqual(
|
||||
expect.objectContaining({scriptSource: fileRealContents}),
|
||||
expect.objectContaining({
|
||||
error: {
|
||||
message: expect.stringContaining(
|
||||
'Can\'t parse requested URL "__fixtures__/mock-source-file.txt"',
|
||||
),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
// The device does not receive the getScriptSource request, since it
|
||||
// is handled by the proxy.
|
||||
expect(device.wrappedEventParsed).not.toBeCalledWith({
|
||||
|
||||
@@ -33,7 +33,6 @@ describe.each(['HTTP', 'HTTPS'])(
|
||||
protocol => {
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
secure: protocol === 'HTTPS',
|
||||
});
|
||||
const autoCleanup = withAbortSignalForEachTest();
|
||||
|
||||
@@ -39,7 +39,6 @@ describe('inspector proxy device message middleware', () => {
|
||||
const createCustomMessageHandler = jest.fn().mockImplementation(() => null);
|
||||
const {server} = await createServer({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
unstable_customInspectorMessageHandler: createCustomMessageHandler,
|
||||
});
|
||||
|
||||
@@ -83,7 +82,6 @@ describe('inspector proxy device message middleware', () => {
|
||||
const createCustomMessageHandler = jest.fn().mockImplementation(() => null);
|
||||
const {server} = await createServer({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
unstable_customInspectorMessageHandler: createCustomMessageHandler,
|
||||
});
|
||||
const {serverBaseUrl, serverBaseWsUrl} = serverRefUrls(server);
|
||||
@@ -169,7 +167,6 @@ describe('inspector proxy device message middleware', () => {
|
||||
|
||||
const {server} = await createServer({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
unstable_customInspectorMessageHandler: createCustomMessageHandler,
|
||||
});
|
||||
|
||||
@@ -231,7 +228,6 @@ describe('inspector proxy device message middleware', () => {
|
||||
const handleDeviceMessage = jest.fn();
|
||||
const {server} = await createServer({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
unstable_customInspectorMessageHandler: () => ({
|
||||
handleDeviceMessage,
|
||||
handleDebuggerMessage() {},
|
||||
@@ -264,7 +260,6 @@ describe('inspector proxy device message middleware', () => {
|
||||
const handleDeviceMessage = jest.fn();
|
||||
const {server} = await createServer({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
unstable_customInspectorMessageHandler: () => ({
|
||||
handleDeviceMessage,
|
||||
handleDebuggerMessage() {},
|
||||
@@ -304,7 +299,6 @@ describe('inspector proxy device message middleware', () => {
|
||||
const handleDebuggerMessage = jest.fn();
|
||||
const {server} = await createServer({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
unstable_customInspectorMessageHandler: () => ({
|
||||
handleDeviceMessage() {},
|
||||
handleDebuggerMessage,
|
||||
@@ -341,7 +335,6 @@ describe('inspector proxy device message middleware', () => {
|
||||
const handleDebuggerMessage = jest.fn();
|
||||
const {server} = await createServer({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
unstable_customInspectorMessageHandler: () => ({
|
||||
handleDeviceMessage() {},
|
||||
handleDebuggerMessage,
|
||||
|
||||
@@ -37,7 +37,6 @@ const PAGE_DEFAULTS = {
|
||||
describe('inspector-proxy device socket handoff', () => {
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
});
|
||||
const autoCleanup = withAbortSignalForEachTest();
|
||||
afterEach(() => {
|
||||
|
||||
@@ -27,7 +27,6 @@ jest.useFakeTimers();
|
||||
describe('inspector proxy HTTP API', () => {
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
});
|
||||
const autoCleanup = withAbortSignalForEachTest();
|
||||
afterEach(() => {
|
||||
@@ -261,7 +260,6 @@ describe('inspector proxy HTTP API', () => {
|
||||
describe('HTTP vs HTTPS', () => {
|
||||
const secureServerRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
secure: true,
|
||||
});
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ jest.setTimeout(10000);
|
||||
describe('inspector proxy React Native reloads', () => {
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
});
|
||||
const autoCleanup = withAbortSignalForEachTest();
|
||||
afterEach(() => {
|
||||
|
||||
@@ -34,7 +34,6 @@ describe('enableStandaloneFuseboxShell experiment', () => {
|
||||
};
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
unstable_browserLauncher: BrowserLauncherWithFuseboxShell,
|
||||
unstable_experiments: {
|
||||
enableStandaloneFuseboxShell: true,
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
foo
|
||||
@@ -17,7 +17,6 @@ jest.setTimeout(10000);
|
||||
describe('embedder script', () => {
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
});
|
||||
|
||||
test('is always served', async () => {
|
||||
|
||||
@@ -24,8 +24,6 @@ import path from 'path';
|
||||
import serveStaticMiddleware from 'serve-static';
|
||||
|
||||
type Options = $ReadOnly<{
|
||||
projectRoot: string,
|
||||
|
||||
/**
|
||||
* The base URL to the dev server, as reachable from the machine on which
|
||||
* dev-middleware is hosted. Typically `http://localhost:${metroPort}`.
|
||||
@@ -78,7 +76,6 @@ type DevMiddlewareAPI = $ReadOnly<{
|
||||
}>;
|
||||
|
||||
export default function createDevMiddleware({
|
||||
projectRoot,
|
||||
serverBaseUrl,
|
||||
logger,
|
||||
// $FlowFixMe[incompatible-type]
|
||||
@@ -96,7 +93,6 @@ export default function createDevMiddleware({
|
||||
);
|
||||
|
||||
const inspectorProxy = new InspectorProxy(
|
||||
projectRoot,
|
||||
serverBaseUrl,
|
||||
eventReporter,
|
||||
experiments,
|
||||
|
||||
@@ -28,9 +28,7 @@ import type {
|
||||
|
||||
import CdpDebugLogging from './CdpDebugLogging';
|
||||
import DeviceEventReporter from './DeviceEventReporter';
|
||||
import * as fs from 'fs';
|
||||
import invariant from 'invariant';
|
||||
import * as path from 'path';
|
||||
import WS from 'ws';
|
||||
|
||||
const debug = require('debug')('Metro:InspectorProxy');
|
||||
@@ -75,7 +73,6 @@ export type DeviceOptions = $ReadOnly<{
|
||||
name: string,
|
||||
app: string,
|
||||
socket: WS,
|
||||
projectRoot: string,
|
||||
eventReporter: ?EventReporter,
|
||||
createMessageMiddleware: ?CreateCustomMessageHandlerFn,
|
||||
deviceRelativeBaseUrl: URL,
|
||||
@@ -120,9 +117,6 @@ export default class Device {
|
||||
// Mapping built from scriptParsed events and used to fetch file content in `Debugger.getScriptSource`.
|
||||
#scriptIdToSourcePathMapping: Map<string, string> = new Map();
|
||||
|
||||
// Root of the project used for relative to absolute source path conversion.
|
||||
#projectRoot: string;
|
||||
|
||||
#deviceEventReporter: ?DeviceEventReporter;
|
||||
|
||||
#pagesPollingIntervalId: ReturnType<typeof setInterval>;
|
||||
@@ -151,7 +145,6 @@ export default class Device {
|
||||
name,
|
||||
app,
|
||||
socket,
|
||||
projectRoot,
|
||||
eventReporter,
|
||||
createMessageMiddleware,
|
||||
serverRelativeBaseUrl,
|
||||
@@ -163,7 +156,6 @@ export default class Device {
|
||||
this.#name = name;
|
||||
this.#app = app;
|
||||
this.#deviceSocket = socket;
|
||||
this.#projectRoot = projectRoot;
|
||||
this.#serverRelativeBaseUrl = serverRelativeBaseUrl;
|
||||
this.#deviceRelativeBaseUrl = deviceRelativeBaseUrl;
|
||||
this.#deviceEventReporter = eventReporter
|
||||
@@ -880,7 +872,7 @@ export default class Device {
|
||||
return this.#processDebuggerSetBreakpointByUrl(req, debuggerInfo);
|
||||
case 'Debugger.getScriptSource':
|
||||
// Sends response to debugger via side-effect
|
||||
this.#processDebuggerGetScriptSource(req, socket);
|
||||
void this.#processDebuggerGetScriptSource(req, socket);
|
||||
return null;
|
||||
case 'Network.loadNetworkResource':
|
||||
// If we're rewriting URLs (to frontend-relative), we don't want to
|
||||
@@ -965,10 +957,10 @@ export default class Device {
|
||||
return processedReq;
|
||||
}
|
||||
|
||||
#processDebuggerGetScriptSource(
|
||||
async #processDebuggerGetScriptSource(
|
||||
req: CDPRequest<'Debugger.getScriptSource'>,
|
||||
socket: WS,
|
||||
): void {
|
||||
): Promise<void> {
|
||||
const sendSuccessResponse = (scriptSource: string) => {
|
||||
const result: {
|
||||
scriptSource: string,
|
||||
@@ -1005,33 +997,23 @@ export default class Device {
|
||||
const pathToSource = this.#scriptIdToSourcePathMapping.get(
|
||||
req.params.scriptId,
|
||||
);
|
||||
if (pathToSource != null) {
|
||||
const httpURL = this.#tryParseHTTPURL(pathToSource);
|
||||
if (httpURL) {
|
||||
// URL is server-relatve, so we should be able to fetch it from here.
|
||||
this.#fetchText(httpURL).then(
|
||||
text => sendSuccessResponse(text),
|
||||
err =>
|
||||
sendErrorResponse(
|
||||
`Failed to fetch source url ${pathToSource}: ${err.message}`,
|
||||
),
|
||||
|
||||
try {
|
||||
const httpURL =
|
||||
pathToSource == null ? null : this.#tryParseHTTPURL(pathToSource);
|
||||
if (!httpURL) {
|
||||
throw new Error(
|
||||
`Can't parse requested URL ${pathToSource === undefined ? 'undefined' : JSON.stringify(pathToSource)}`,
|
||||
);
|
||||
} else {
|
||||
let file;
|
||||
try {
|
||||
file = fs.readFileSync(
|
||||
path.resolve(this.#projectRoot, pathToSource),
|
||||
'utf8',
|
||||
);
|
||||
} catch (err) {
|
||||
sendErrorResponse(
|
||||
`Failed to fetch source file ${pathToSource}: ${err.message}`,
|
||||
);
|
||||
}
|
||||
if (file != null) {
|
||||
sendSuccessResponse(file);
|
||||
}
|
||||
}
|
||||
|
||||
const text = await this.#fetchText(httpURL);
|
||||
|
||||
sendSuccessResponse(text);
|
||||
} catch (err) {
|
||||
sendErrorResponse(
|
||||
`Failed to fetch source url ${pathToSource === undefined ? 'undefined' : JSON.stringify(pathToSource)} for scriptId ${req.params.scriptId}: ${err.message}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,9 +75,6 @@ export interface InspectorProxyQueries {
|
||||
* Main Inspector Proxy class that connects JavaScript VM inside Android/iOS apps and JS debugger.
|
||||
*/
|
||||
export default class InspectorProxy implements InspectorProxyQueries {
|
||||
// Root of the project used for relative to absolute source path conversion.
|
||||
#projectRoot: string;
|
||||
|
||||
// The base URL to the dev server from the dev-middleware host.
|
||||
#serverBaseUrl: URL;
|
||||
|
||||
@@ -101,7 +98,6 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
#eventLoopPerfTracker: EventLoopPerfTracker;
|
||||
|
||||
constructor(
|
||||
projectRoot: string,
|
||||
serverBaseUrl: string,
|
||||
eventReporter: ?EventReporter,
|
||||
experiments: Experiments,
|
||||
@@ -109,7 +105,6 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
customMessageHandler: ?CreateCustomMessageHandlerFn,
|
||||
trackEventLoopPerf?: boolean = false,
|
||||
) {
|
||||
this.#projectRoot = projectRoot;
|
||||
this.#serverBaseUrl = new URL(serverBaseUrl);
|
||||
this.#devices = new Map();
|
||||
this.#eventReporter = eventReporter;
|
||||
@@ -355,7 +350,6 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
name: deviceName,
|
||||
app: appName,
|
||||
socket,
|
||||
projectRoot: this.#projectRoot,
|
||||
eventReporter: this.#eventReporter,
|
||||
createMessageMiddleware: this.#customMessageHandler,
|
||||
deviceRelativeBaseUrl,
|
||||
@@ -372,12 +366,6 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
|
||||
this.#devices.set(deviceId, newDevice);
|
||||
|
||||
this.#logger?.info(
|
||||
"Connection established to app='%s' on device='%s'.",
|
||||
appName,
|
||||
deviceName,
|
||||
);
|
||||
|
||||
debug(
|
||||
"Got new device connection: name='%s', app=%s, device=%s, via=%s",
|
||||
deviceName,
|
||||
@@ -450,7 +438,7 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
);
|
||||
|
||||
socket.on('close', (code: number, reason: string) => {
|
||||
this.#logger?.info(
|
||||
debug(
|
||||
"Connection closed to device='%s' for app='%s' with code='%s' and reason='%s'.",
|
||||
deviceName,
|
||||
appName,
|
||||
@@ -526,7 +514,7 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
throw new Error(INTERNAL_ERROR_MESSAGES.UNREGISTERED_DEVICE);
|
||||
}
|
||||
|
||||
this.#logger?.info(
|
||||
debug(
|
||||
"Connection established to DevTools for app='%s' on device='%s'.",
|
||||
device.getApp() || 'unknown',
|
||||
device.getName() || 'unknown',
|
||||
@@ -594,7 +582,7 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
});
|
||||
|
||||
socket.on('close', (code: number, reason: string) => {
|
||||
this.#logger?.info(
|
||||
debug(
|
||||
"Connection closed to DevTools for app='%s' on device='%s' with code='%s' and reason='%s'.",
|
||||
device.getApp() || 'unknown',
|
||||
device.getName() || 'unknown',
|
||||
|
||||
@@ -21,6 +21,7 @@ import type {NextHandleFunction} from 'connect';
|
||||
import type {IncomingMessage, ServerResponse} from 'http';
|
||||
|
||||
import getDevToolsFrontendUrl from '../utils/getDevToolsFrontendUrl';
|
||||
import {createHash} from 'crypto';
|
||||
import url from 'url';
|
||||
|
||||
const LEGACY_SYNTHETIC_PAGE_TITLE =
|
||||
@@ -190,11 +191,15 @@ export default function openDebuggerMiddleware({
|
||||
}
|
||||
}
|
||||
if (shouldUseStandaloneFuseboxShell) {
|
||||
const windowKey = [
|
||||
serverBaseUrl,
|
||||
target.webSocketDebuggerUrl,
|
||||
target.appId,
|
||||
].join('-');
|
||||
const windowKey = createHash('sha256')
|
||||
.update(
|
||||
[
|
||||
serverBaseUrl,
|
||||
target.webSocketDebuggerUrl,
|
||||
target.appId,
|
||||
].join('-'),
|
||||
)
|
||||
.digest('hex');
|
||||
if (!browserLauncher.unstable_showFuseboxShell) {
|
||||
throw new Error(
|
||||
'Fusebox shell is not supported by the current browser launcher',
|
||||
|
||||
+9
-9
@@ -67,18 +67,18 @@ class ReactRootProjectPlugin : Plugin<Project> {
|
||||
) {
|
||||
project.logger.error(
|
||||
"""
|
||||
********************************************************************************
|
||||
********************************************************************************
|
||||
|
||||
WARNING: Setting `newArchEnabled=false` in your `gradle.properties` file is not
|
||||
supported anymore since React Native 0.82.
|
||||
|
||||
You can remove the line from your `gradle.properties` file.
|
||||
|
||||
The application will run with the New Architecture enabled by default.
|
||||
WARNING: Setting `newArchEnabled=false` in your `gradle.properties` file is not
|
||||
supported anymore since React Native 0.82.
|
||||
|
||||
********************************************************************************
|
||||
You can remove the line from your `gradle.properties` file.
|
||||
|
||||
"""
|
||||
The application will run with the New Architecture enabled by default.
|
||||
|
||||
********************************************************************************
|
||||
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+14
-14
@@ -168,13 +168,13 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
|
||||
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
|
||||
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
|
||||
# or link against a old prefab target (this is needed for React Native 0.76 on).
|
||||
set(REACTNATIVE_MERGED_SO true)
|
||||
|
||||
|
||||
{{ libraryIncludes }}
|
||||
|
||||
|
||||
set(AUTOLINKED_LIBRARIES
|
||||
{{ libraryModules }}
|
||||
)
|
||||
@@ -191,28 +191,28 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
|
||||
* once the code is regenerated.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "autolinking.h"
|
||||
{{ autolinkingCppIncludes }}
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams ¶ms) {
|
||||
{{ autolinkingCppTurboModuleJavaProviders }}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
|
||||
{{ autolinkingCppTurboModuleCxxProviders }}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
|
||||
{{ autolinkingCppComponentDescriptors }}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
"""
|
||||
@@ -228,22 +228,22 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
|
||||
* once the code is regenerated.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <ReactCommon/CallInvoker.h>
|
||||
#include <ReactCommon/JavaTurboModule.h>
|
||||
#include <ReactCommon/TurboModule.h>
|
||||
#include <jsi/jsi.h>
|
||||
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
|
||||
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams ¶ms);
|
||||
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker);
|
||||
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry);
|
||||
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
"""
|
||||
|
||||
+5
-5
@@ -65,19 +65,19 @@ abstract class GenerateEntryPointTask : DefaultTask() {
|
||||
val generatedFileContentsTemplate =
|
||||
"""
|
||||
package com.facebook.react;
|
||||
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
|
||||
import com.facebook.react.views.view.WindowUtilKt;
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
/**
|
||||
* This class is the entry point for loading React Native using the configuration
|
||||
* that the users specifies in their .gradle files.
|
||||
@@ -102,7 +102,7 @@ abstract class GenerateEntryPointTask : DefaultTask() {
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
"""
|
||||
.trimIndent()
|
||||
}
|
||||
}
|
||||
|
||||
+13
-13
@@ -137,61 +137,61 @@ abstract class GeneratePackageListTask : DefaultTask() {
|
||||
val generatedFileContentsTemplate =
|
||||
"""
|
||||
package com.facebook.react;
|
||||
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainPackageConfig;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
{{ packageImports }}
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
private MainPackageConfig mConfig;
|
||||
|
||||
|
||||
public PackageList(ReactNativeHost reactNativeHost) {
|
||||
this(reactNativeHost, null);
|
||||
}
|
||||
|
||||
|
||||
public PackageList(Application application) {
|
||||
this(application, null);
|
||||
}
|
||||
|
||||
|
||||
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
|
||||
this.reactNativeHost = reactNativeHost;
|
||||
mConfig = config;
|
||||
}
|
||||
|
||||
|
||||
public PackageList(Application application, MainPackageConfig config) {
|
||||
this.reactNativeHost = null;
|
||||
this.application = application;
|
||||
mConfig = config;
|
||||
}
|
||||
|
||||
|
||||
private ReactNativeHost getReactNativeHost() {
|
||||
return this.reactNativeHost;
|
||||
}
|
||||
|
||||
|
||||
private Resources getResources() {
|
||||
return this.getApplication().getResources();
|
||||
}
|
||||
|
||||
|
||||
private Application getApplication() {
|
||||
if (this.reactNativeHost == null) return this.application;
|
||||
return this.reactNativeHost.getApplication();
|
||||
}
|
||||
|
||||
|
||||
private Context getApplicationContext() {
|
||||
return this.getApplication().getApplicationContext();
|
||||
}
|
||||
|
||||
|
||||
public ArrayList<ReactPackage> getPackages() {
|
||||
return new ArrayList<>(Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(mConfig){{ packageClassInstances }}
|
||||
|
||||
+18
-18
@@ -21,24 +21,24 @@ internal object BackwardCompatUtils {
|
||||
if (reactMap.isNotEmpty()) {
|
||||
project.logger.error(
|
||||
"""
|
||||
********************************************************************************
|
||||
|
||||
ERROR: Using old project.ext.react configuration.
|
||||
We identified that your project is using a old configuration block as:
|
||||
|
||||
project.ext.react = [
|
||||
// ...
|
||||
]
|
||||
|
||||
You should migrate to the new configuration:
|
||||
|
||||
react {
|
||||
// ...
|
||||
}
|
||||
You can find documentation inside `android/app/build.gradle` on how to use it.
|
||||
|
||||
********************************************************************************
|
||||
"""
|
||||
********************************************************************************
|
||||
|
||||
ERROR: Using old project.ext.react configuration.
|
||||
We identified that your project is using a old configuration block as:
|
||||
|
||||
project.ext.react = [
|
||||
// ...
|
||||
]
|
||||
|
||||
You should migrate to the new configuration:
|
||||
|
||||
react {
|
||||
// ...
|
||||
}
|
||||
You can find documentation inside `android/app/build.gradle` on how to use it.
|
||||
|
||||
********************************************************************************
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+4
-4
@@ -105,11 +105,11 @@ private fun detectCliFile(reactNativeRoot: File, preconfiguredCliFile: File?): F
|
||||
|
||||
error(
|
||||
"""
|
||||
Couldn't determine CLI location!
|
||||
Couldn't determine CLI location!
|
||||
|
||||
Please set `react { cliFile = file(...) }` inside your
|
||||
build.gradle to the path of the react-native cli.js file.
|
||||
This file typically resides in `node_modules/react-native/cli.js`
|
||||
Please set `react { cliFile = file(...) }` inside your
|
||||
build.gradle to the path of the react-native cli.js file.
|
||||
This file typically resides in `node_modules/react-native/cli.js`
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
|
||||
+92
-92
@@ -120,20 +120,20 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
|
||||
assertThat(output)
|
||||
.isEqualTo(
|
||||
"""
|
||||
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
|
||||
# or link against a old prefab target (this is needed for React Native 0.76 on).
|
||||
set(REACTNATIVE_MERGED_SO true)
|
||||
|
||||
|
||||
|
||||
set(AUTOLINKED_LIBRARIES
|
||||
|
||||
)
|
||||
"""
|
||||
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
|
||||
# or link against a old prefab target (this is needed for React Native 0.76 on).
|
||||
set(REACTNATIVE_MERGED_SO true)
|
||||
|
||||
|
||||
|
||||
set(AUTOLINKED_LIBRARIES
|
||||
|
||||
)
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -147,24 +147,24 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
|
||||
assertThat(output)
|
||||
.isEqualTo(
|
||||
"""
|
||||
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
|
||||
# or link against a old prefab target (this is needed for React Native 0.76 on).
|
||||
set(REACTNATIVE_MERGED_SO true)
|
||||
|
||||
add_subdirectory("./a/directory/" aPackage_autolinked_build)
|
||||
add_subdirectory("./another/directory/with\ spaces/" anotherPackage_autolinked_build)
|
||||
add_subdirectory("./another/directory/cxx/" anotherPackage_cxxmodule_autolinked_build)
|
||||
|
||||
set(AUTOLINKED_LIBRARIES
|
||||
react_codegen_aPackage
|
||||
react_codegen_anotherPackage
|
||||
another_cxxModule
|
||||
)
|
||||
"""
|
||||
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
|
||||
# or link against a old prefab target (this is needed for React Native 0.76 on).
|
||||
set(REACTNATIVE_MERGED_SO true)
|
||||
|
||||
add_subdirectory("./a/directory/" aPackage_autolinked_build)
|
||||
add_subdirectory("./another/directory/with\ spaces/" anotherPackage_autolinked_build)
|
||||
add_subdirectory("./another/directory/cxx/" anotherPackage_cxxmodule_autolinked_build)
|
||||
|
||||
set(AUTOLINKED_LIBRARIES
|
||||
react_codegen_aPackage
|
||||
react_codegen_anotherPackage
|
||||
another_cxxModule
|
||||
)
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -178,38 +178,38 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
|
||||
assertThat(output)
|
||||
.isEqualTo(
|
||||
"""
|
||||
/**
|
||||
* This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "autolinking.h"
|
||||
#include "autolinking.h"
|
||||
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams ¶ms) {
|
||||
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams ¶ms) {
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
|
||||
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
|
||||
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
"""
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -223,50 +223,50 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
|
||||
assertThat(output)
|
||||
.isEqualTo(
|
||||
"""
|
||||
/**
|
||||
* This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
* once the code is regenerated.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "autolinking.h"
|
||||
#include <aPackage.h>
|
||||
#include <anotherPackage.h>
|
||||
#include <react/renderer/components/anotherPackage/ComponentDescriptors.h>
|
||||
#include <AnotherCxxModule.h>
|
||||
#include "autolinking.h"
|
||||
#include <aPackage.h>
|
||||
#include <anotherPackage.h>
|
||||
#include <react/renderer/components/anotherPackage/ComponentDescriptors.h>
|
||||
#include <AnotherCxxModule.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams ¶ms) {
|
||||
auto module_aPackage = aPackage_ModuleProvider(moduleName, params);
|
||||
if (module_aPackage != nullptr) {
|
||||
return module_aPackage;
|
||||
}
|
||||
auto module_anotherPackage = anotherPackage_ModuleProvider(moduleName, params);
|
||||
if (module_anotherPackage != nullptr) {
|
||||
return module_anotherPackage;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams ¶ms) {
|
||||
auto module_aPackage = aPackage_ModuleProvider(moduleName, params);
|
||||
if (module_aPackage != nullptr) {
|
||||
return module_aPackage;
|
||||
}
|
||||
auto module_anotherPackage = anotherPackage_ModuleProvider(moduleName, params);
|
||||
if (module_anotherPackage != nullptr) {
|
||||
return module_anotherPackage;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
|
||||
if (moduleName == AnotherCxxModule::kModuleName) {
|
||||
return std::make_shared<AnotherCxxModule>(jsInvoker);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
|
||||
if (moduleName == AnotherCxxModule::kModuleName) {
|
||||
return std::make_shared<AnotherCxxModule>(jsInvoker);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
|
||||
providerRegistry->add(concreteComponentDescriptorProvider<AnotherPackageComponentDescriptor>());
|
||||
return;
|
||||
}
|
||||
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
|
||||
providerRegistry->add(concreteComponentDescriptorProvider<AnotherPackageComponentDescriptor>());
|
||||
return;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
"""
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+16
-16
@@ -138,16 +138,16 @@ class GenerateCodegenArtifactsTaskTest {
|
||||
// language=JSON
|
||||
writeText(
|
||||
"""
|
||||
{
|
||||
"name": "@a/library",
|
||||
"codegenConfig": {
|
||||
"name": "an-awesome-library",
|
||||
"android": {
|
||||
"javaPackageName": "com.awesome.package"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
{
|
||||
"name": "@a/library",
|
||||
"codegenConfig": {
|
||||
"name": "an-awesome-library",
|
||||
"android": {
|
||||
"javaPackageName": "com.awesome.package"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -172,12 +172,12 @@ class GenerateCodegenArtifactsTaskTest {
|
||||
// language=JSON
|
||||
writeText(
|
||||
"""
|
||||
{
|
||||
"name": "@a/library",
|
||||
"codegenConfig": {
|
||||
}
|
||||
}
|
||||
"""
|
||||
{
|
||||
"name": "@a/library",
|
||||
"codegenConfig": {
|
||||
}
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+38
-38
@@ -47,45 +47,45 @@ class GenerateEntryPointTaskTest {
|
||||
assertThat(result)
|
||||
.isEqualTo(
|
||||
"""
|
||||
package com.facebook.react;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
|
||||
import com.facebook.react.views.view.WindowUtilKt;
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* This class is the entry point for loading React Native using the configuration
|
||||
* that the users specifies in their .gradle files.
|
||||
*
|
||||
* The `loadReactNative(this)` method invocation should be called inside the
|
||||
* application onCreate otherwise the app won't load correctly.
|
||||
*/
|
||||
public class ReactNativeApplicationEntryPoint {
|
||||
public static void loadReactNative(Context context) {
|
||||
try {
|
||||
SoLoader.init(context, OpenSourceMergedSoMapping.INSTANCE);
|
||||
} catch (IOException error) {
|
||||
throw new RuntimeException(error);
|
||||
package com.facebook.react;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
|
||||
import com.facebook.react.views.view.WindowUtilKt;
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* This class is the entry point for loading React Native using the configuration
|
||||
* that the users specifies in their .gradle files.
|
||||
*
|
||||
* The `loadReactNative(this)` method invocation should be called inside the
|
||||
* application onCreate otherwise the app won't load correctly.
|
||||
*/
|
||||
public class ReactNativeApplicationEntryPoint {
|
||||
public static void loadReactNative(Context context) {
|
||||
try {
|
||||
SoLoader.init(context, OpenSourceMergedSoMapping.INSTANCE);
|
||||
} catch (IOException error) {
|
||||
throw new RuntimeException(error);
|
||||
}
|
||||
|
||||
if (com.facebook.react.BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
DefaultNewArchitectureEntryPoint.load();
|
||||
}
|
||||
|
||||
if (com.facebook.react.BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {
|
||||
WindowUtilKt.setEdgeToEdgeFeatureFlagOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (com.facebook.react.BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
DefaultNewArchitectureEntryPoint.load();
|
||||
}
|
||||
|
||||
if (com.facebook.react.BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {
|
||||
WindowUtilKt.setEdgeToEdgeFeatureFlagOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+114
-114
@@ -59,11 +59,11 @@ class GeneratePackageListTaskTest {
|
||||
assertThat(result)
|
||||
.isEqualTo(
|
||||
"""
|
||||
// @react-native/a-package
|
||||
import com.facebook.react.aPackage;
|
||||
// @react-native/another-package
|
||||
import com.facebook.react.anotherPackage;
|
||||
"""
|
||||
// @react-native/a-package
|
||||
import com.facebook.react.aPackage;
|
||||
// @react-native/another-package
|
||||
import com.facebook.react.anotherPackage;
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -85,10 +85,10 @@ class GeneratePackageListTaskTest {
|
||||
assertThat(result)
|
||||
.isEqualTo(
|
||||
"""
|
||||
,
|
||||
new APackage(),
|
||||
new AnotherPackage()
|
||||
"""
|
||||
,
|
||||
new APackage(),
|
||||
new AnotherPackage()
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -234,69 +234,69 @@ class GeneratePackageListTaskTest {
|
||||
assertThat(result)
|
||||
.isEqualTo(
|
||||
"""
|
||||
package com.facebook.react;
|
||||
package com.facebook.react;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainPackageConfig;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainPackageConfig;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
private MainPackageConfig mConfig;
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
private MainPackageConfig mConfig;
|
||||
|
||||
public PackageList(ReactNativeHost reactNativeHost) {
|
||||
this(reactNativeHost, null);
|
||||
}
|
||||
public PackageList(ReactNativeHost reactNativeHost) {
|
||||
this(reactNativeHost, null);
|
||||
}
|
||||
|
||||
public PackageList(Application application) {
|
||||
this(application, null);
|
||||
}
|
||||
public PackageList(Application application) {
|
||||
this(application, null);
|
||||
}
|
||||
|
||||
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
|
||||
this.reactNativeHost = reactNativeHost;
|
||||
mConfig = config;
|
||||
}
|
||||
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
|
||||
this.reactNativeHost = reactNativeHost;
|
||||
mConfig = config;
|
||||
}
|
||||
|
||||
public PackageList(Application application, MainPackageConfig config) {
|
||||
this.reactNativeHost = null;
|
||||
this.application = application;
|
||||
mConfig = config;
|
||||
}
|
||||
public PackageList(Application application, MainPackageConfig config) {
|
||||
this.reactNativeHost = null;
|
||||
this.application = application;
|
||||
mConfig = config;
|
||||
}
|
||||
|
||||
private ReactNativeHost getReactNativeHost() {
|
||||
return this.reactNativeHost;
|
||||
}
|
||||
private ReactNativeHost getReactNativeHost() {
|
||||
return this.reactNativeHost;
|
||||
}
|
||||
|
||||
private Resources getResources() {
|
||||
return this.getApplication().getResources();
|
||||
}
|
||||
private Resources getResources() {
|
||||
return this.getApplication().getResources();
|
||||
}
|
||||
|
||||
private Application getApplication() {
|
||||
if (this.reactNativeHost == null) return this.application;
|
||||
return this.reactNativeHost.getApplication();
|
||||
}
|
||||
private Application getApplication() {
|
||||
if (this.reactNativeHost == null) return this.application;
|
||||
return this.reactNativeHost.getApplication();
|
||||
}
|
||||
|
||||
private Context getApplicationContext() {
|
||||
return this.getApplication().getApplicationContext();
|
||||
}
|
||||
private Context getApplicationContext() {
|
||||
return this.getApplication().getApplicationContext();
|
||||
}
|
||||
|
||||
public ArrayList<ReactPackage> getPackages() {
|
||||
return new ArrayList<>(Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(mConfig)
|
||||
));
|
||||
}
|
||||
}
|
||||
"""
|
||||
public ArrayList<ReactPackage> getPackages() {
|
||||
return new ArrayList<>(Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(mConfig)
|
||||
));
|
||||
}
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -312,74 +312,74 @@ class GeneratePackageListTaskTest {
|
||||
assertThat(result)
|
||||
.isEqualTo(
|
||||
"""
|
||||
package com.facebook.react;
|
||||
package com.facebook.react;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainPackageConfig;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainPackageConfig;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
|
||||
// @react-native/a-package
|
||||
import com.facebook.react.aPackage;
|
||||
// @react-native/another-package
|
||||
import com.facebook.react.anotherPackage;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
private MainPackageConfig mConfig;
|
||||
// @react-native/a-package
|
||||
import com.facebook.react.aPackage;
|
||||
// @react-native/another-package
|
||||
import com.facebook.react.anotherPackage;
|
||||
|
||||
public PackageList(ReactNativeHost reactNativeHost) {
|
||||
this(reactNativeHost, null);
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
private MainPackageConfig mConfig;
|
||||
|
||||
public PackageList(Application application) {
|
||||
this(application, null);
|
||||
}
|
||||
public PackageList(ReactNativeHost reactNativeHost) {
|
||||
this(reactNativeHost, null);
|
||||
}
|
||||
|
||||
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
|
||||
this.reactNativeHost = reactNativeHost;
|
||||
mConfig = config;
|
||||
}
|
||||
public PackageList(Application application) {
|
||||
this(application, null);
|
||||
}
|
||||
|
||||
public PackageList(Application application, MainPackageConfig config) {
|
||||
this.reactNativeHost = null;
|
||||
this.application = application;
|
||||
mConfig = config;
|
||||
}
|
||||
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
|
||||
this.reactNativeHost = reactNativeHost;
|
||||
mConfig = config;
|
||||
}
|
||||
|
||||
private ReactNativeHost getReactNativeHost() {
|
||||
return this.reactNativeHost;
|
||||
}
|
||||
public PackageList(Application application, MainPackageConfig config) {
|
||||
this.reactNativeHost = null;
|
||||
this.application = application;
|
||||
mConfig = config;
|
||||
}
|
||||
|
||||
private Resources getResources() {
|
||||
return this.getApplication().getResources();
|
||||
}
|
||||
private ReactNativeHost getReactNativeHost() {
|
||||
return this.reactNativeHost;
|
||||
}
|
||||
|
||||
private Application getApplication() {
|
||||
if (this.reactNativeHost == null) return this.application;
|
||||
return this.reactNativeHost.getApplication();
|
||||
}
|
||||
private Resources getResources() {
|
||||
return this.getApplication().getResources();
|
||||
}
|
||||
|
||||
private Context getApplicationContext() {
|
||||
return this.getApplication().getApplicationContext();
|
||||
}
|
||||
private Application getApplication() {
|
||||
if (this.reactNativeHost == null) return this.application;
|
||||
return this.reactNativeHost.getApplication();
|
||||
}
|
||||
|
||||
public ArrayList<ReactPackage> getPackages() {
|
||||
return new ArrayList<>(Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(mConfig),
|
||||
new APackage(),
|
||||
new AnotherPackage()
|
||||
));
|
||||
}
|
||||
}
|
||||
"""
|
||||
private Context getApplicationContext() {
|
||||
return this.getApplication().getApplicationContext();
|
||||
}
|
||||
|
||||
public ArrayList<ReactPackage> getPackages() {
|
||||
return new ArrayList<>(Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(mConfig),
|
||||
new APackage(),
|
||||
new AnotherPackage()
|
||||
));
|
||||
}
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+6
-6
@@ -34,9 +34,9 @@ class AgpConfiguratorUtilsTest {
|
||||
writeText(
|
||||
// language=xml
|
||||
"""
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
</manifest>
|
||||
"""
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
</manifest>
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -53,9 +53,9 @@ class AgpConfiguratorUtilsTest {
|
||||
writeText(
|
||||
// language=xml
|
||||
"""
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.facebook.react" >
|
||||
</manifest>
|
||||
"""
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.facebook.react" >
|
||||
</manifest>
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+36
-36
@@ -549,9 +549,9 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("gradle.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
VERSION_NAME=1000.0.0
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
VERSION_NAME=1000.0.0
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -560,9 +560,9 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("version.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=1000.0.0
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=1000.0.0
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -583,11 +583,11 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("gradle.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
VERSION_NAME=0.0.0-20221101-2019-cfe811ab1
|
||||
HERMES_VERSION_NAME=0.12.0-commitly-20221101-2019-cfe811ab1
|
||||
HERMES_V1_VERSION_NAME=250829098.0.0-stable
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
VERSION_NAME=0.0.0-20221101-2019-cfe811ab1
|
||||
HERMES_VERSION_NAME=0.12.0-commitly-20221101-2019-cfe811ab1
|
||||
HERMES_V1_VERSION_NAME=250829098.0.0-stable
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -596,9 +596,9 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("version.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=250829098.0.0-stable
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=250829098.0.0-stable
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -619,8 +619,8 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("gradle.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -629,8 +629,8 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("version.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -650,9 +650,9 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("gradle.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
VERSION_NAME=
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
VERSION_NAME=
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -661,9 +661,9 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("version.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -683,10 +683,10 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("gradle.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
react.internal.publishingGroup=io.github.test
|
||||
react.internal.hermesPublishingGroup=io.github.test
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
react.internal.publishingGroup=io.github.test
|
||||
react.internal.hermesPublishingGroup=io.github.test
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -695,9 +695,9 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("version.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -716,8 +716,8 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("gradle.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -726,9 +726,9 @@ class DependencyUtilsTest {
|
||||
tempFolder.newFile("version.properties").apply {
|
||||
writeText(
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
HERMES_V1_VERSION_NAME=
|
||||
ANOTHER_PROPERTY=true
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+5
-5
@@ -320,11 +320,11 @@ class PathUtilsTest {
|
||||
writeText(
|
||||
// language=json
|
||||
"""
|
||||
{
|
||||
"name": "a-library",
|
||||
"codegenConfig": {}
|
||||
}
|
||||
"""
|
||||
{
|
||||
"name": "a-library",
|
||||
"codegenConfig": {}
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+9
-9
@@ -150,11 +150,11 @@ class ProjectUtilsTest {
|
||||
writeText(
|
||||
// language=json
|
||||
"""
|
||||
{
|
||||
"name": "a-library",
|
||||
"codegenConfig": {}
|
||||
}
|
||||
"""
|
||||
{
|
||||
"name": "a-library",
|
||||
"codegenConfig": {}
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -170,10 +170,10 @@ class ProjectUtilsTest {
|
||||
writeText(
|
||||
// language=json
|
||||
"""
|
||||
{
|
||||
"name": "a-library"
|
||||
}
|
||||
"""
|
||||
{
|
||||
"name": "a-library"
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+31
-31
@@ -238,30 +238,30 @@ class ReactSettingsExtensionTest {
|
||||
File(generatedFolder, "autolinking.json").apply {
|
||||
writeText(
|
||||
"""
|
||||
{
|
||||
"root": "/",
|
||||
"reactNativePath": "/node_modules/react-native",
|
||||
"reactNativeVersion": "0.75",
|
||||
"dependencies": {},
|
||||
"healthChecks": [],
|
||||
"platforms": {
|
||||
"ios": {},
|
||||
"android": {}
|
||||
},
|
||||
"assets": [],
|
||||
"project": {
|
||||
"ios": {},
|
||||
"android": {
|
||||
"sourceDir": "/",
|
||||
"appName": "app",
|
||||
"packageName": "com.TestApp",
|
||||
"applicationId": "com.TestApp",
|
||||
"mainActivity": ".MainActivity",
|
||||
"assets": []
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
{
|
||||
"root": "/",
|
||||
"reactNativePath": "/node_modules/react-native",
|
||||
"reactNativeVersion": "0.75",
|
||||
"dependencies": {},
|
||||
"healthChecks": [],
|
||||
"platforms": {
|
||||
"ios": {},
|
||||
"android": {}
|
||||
},
|
||||
"assets": [],
|
||||
"project": {
|
||||
"ios": {},
|
||||
"android": {
|
||||
"sourceDir": "/",
|
||||
"appName": "app",
|
||||
"packageName": "com.TestApp",
|
||||
"applicationId": "com.TestApp",
|
||||
"mainActivity": ".MainActivity",
|
||||
"assets": []
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
@@ -309,13 +309,13 @@ class ReactSettingsExtensionTest {
|
||||
File(generatedFolder, "autolinking.json").apply {
|
||||
writeText(
|
||||
"""
|
||||
{
|
||||
"project": {
|
||||
"ios": {},
|
||||
"android": {}
|
||||
}
|
||||
}
|
||||
"""
|
||||
{
|
||||
"project": {
|
||||
"ios": {},
|
||||
"android": {}
|
||||
}
|
||||
}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
+2
-2
@@ -197,10 +197,10 @@ class JsonUtilsTest {
|
||||
val validJson =
|
||||
createJsonFile(
|
||||
"""
|
||||
|
||||
|
||||
> AwesomeProject@0.0.1 npx
|
||||
> rnc-cli config
|
||||
|
||||
|
||||
{
|
||||
"reactNativeVersion": "1000.0.0",
|
||||
"project": {
|
||||
|
||||
+30
@@ -10,11 +10,41 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const {version: packageVersion} = require('../package.json');
|
||||
const main = require('./configs/main');
|
||||
|
||||
module.exports = function (babel, options) {
|
||||
return main(options);
|
||||
};
|
||||
|
||||
let cacheKey;
|
||||
module.exports.getCacheKey = () => {
|
||||
if (cacheKey != null) {
|
||||
// Memoize
|
||||
return cacheKey;
|
||||
}
|
||||
if (!packageVersion.endsWith('-main')) {
|
||||
// Assume the integrity of package contents for published npm releases.
|
||||
cacheKey = packageVersion;
|
||||
return cacheKey;
|
||||
}
|
||||
// For anyone working with a `-main` version, contents may vary over time
|
||||
// even though the version does not. Hash the relevant contents of this
|
||||
// package. Lazy-load dependencies we only need on this slow path.
|
||||
const {createHash} = require('crypto');
|
||||
const {readFileSync} = require('fs');
|
||||
const key = createHash('md5');
|
||||
[
|
||||
readFileSync(__filename),
|
||||
readFileSync(require.resolve('./configs/main.js')),
|
||||
readFileSync(require.resolve('./configs/hmr.js')),
|
||||
readFileSync(require.resolve('./configs/lazy-imports.js')),
|
||||
readFileSync(require.resolve('./passthrough-syntax-plugins.js')),
|
||||
readFileSync(require.resolve('./plugin-warn-on-deep-imports.js')),
|
||||
].forEach(part => key.update(part));
|
||||
cacheKey = key.digest('hex');
|
||||
return cacheKey;
|
||||
};
|
||||
|
||||
module.exports.getPreset = main.getPreset;
|
||||
module.exports.passthroughSyntaxPlugins = require('./passthrough-syntax-plugins');
|
||||
|
||||
+2
-1
@@ -23,13 +23,14 @@ import type {
|
||||
*/
|
||||
|
||||
const {parseSync, transformFromAstSync} = require('@babel/core');
|
||||
const {getCacheKey: getPresetCacheKey} = require('@react-native/babel-preset');
|
||||
const makeHMRConfig = require('@react-native/babel-preset/src/configs/hmr');
|
||||
const crypto = require('crypto');
|
||||
const fs = require('fs');
|
||||
const nullthrows = require('nullthrows');
|
||||
const path = require('path');
|
||||
|
||||
const cacheKeyParts = [fs.readFileSync(__filename)];
|
||||
const cacheKeyParts = [getPresetCacheKey(), fs.readFileSync(__filename)];
|
||||
|
||||
// TS detection conditions copied from @react-native/babel-preset
|
||||
function isTypeScriptSource(fileName /*: string */) {
|
||||
|
||||
@@ -47,7 +47,7 @@ function combineSchemas(
|
||||
}
|
||||
return merged;
|
||||
},
|
||||
{modules: {}},
|
||||
{modules: {} /*:: as SchemaType['modules'] */},
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
@@ -14,8 +14,10 @@ import FlatList, {type FlatListProps} from '../../Lists/FlatList';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
// $FlowExpectedError[unclear-type]
|
||||
export default (createAnimatedComponent(FlatList): component<ItemT = any>(
|
||||
export default createAnimatedComponent(FlatList) as $FlowFixMe as component<
|
||||
// $FlowExpectedError[unclear-type]
|
||||
ItemT = any,
|
||||
>(
|
||||
ref?: React.RefSetter<FlatList<ItemT>>,
|
||||
...props: AnimatedProps<FlatListProps<ItemT>>
|
||||
));
|
||||
);
|
||||
|
||||
@@ -14,9 +14,10 @@ import Image from '../../Image/Image';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
export default (createAnimatedComponent(
|
||||
(Image: $FlowFixMe),
|
||||
): AnimatedComponentType<
|
||||
export default (createAnimatedComponent<
|
||||
$FlowFixMe,
|
||||
React.ElementRef<typeof Image>,
|
||||
>((Image: $FlowFixMe)): AnimatedComponentType<
|
||||
React.ElementConfig<typeof Image>,
|
||||
React.ElementRef<typeof Image>,
|
||||
>);
|
||||
|
||||
@@ -15,7 +15,7 @@ import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
// $FlowFixMe[incompatible-type]
|
||||
export default (createAnimatedComponent(SectionList): component<
|
||||
export default createAnimatedComponent(SectionList) as $FlowFixMe as component<
|
||||
// $FlowExpectedError[unclear-type]
|
||||
ItemT = any,
|
||||
// $FlowExpectedError[unclear-type]
|
||||
@@ -23,4 +23,4 @@ export default (createAnimatedComponent(SectionList): component<
|
||||
>(
|
||||
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
|
||||
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
|
||||
));
|
||||
);
|
||||
|
||||
@@ -14,6 +14,10 @@ import Text, {type TextProps} from '../../Text/Text';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
export default (createAnimatedComponent(
|
||||
(Text: $FlowFixMe),
|
||||
): AnimatedComponentType<TextProps, React.ElementRef<typeof Text>>);
|
||||
export default (createAnimatedComponent<
|
||||
$FlowFixMe,
|
||||
React.ElementRef<typeof Text>,
|
||||
>((Text: $FlowFixMe)): AnimatedComponentType<
|
||||
TextProps,
|
||||
React.ElementRef<typeof Text>,
|
||||
>);
|
||||
|
||||
@@ -15,7 +15,8 @@ import View from '../../Components/View/View';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
export default (createAnimatedComponent(View): AnimatedComponentType<
|
||||
// $FlowFixMe[incompatible-type]
|
||||
export default createAnimatedComponent(View) as AnimatedComponentType<
|
||||
ViewProps,
|
||||
React.ElementRef<typeof View>,
|
||||
>);
|
||||
>;
|
||||
|
||||
@@ -63,17 +63,29 @@ type PassThroughProps = $ReadOnly<{
|
||||
passthroughAnimatedPropExplicitValues?: ViewProps | null,
|
||||
}>;
|
||||
|
||||
export type AnimatedProps<Props: {...}> = {
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>,
|
||||
} & PassThroughProps;
|
||||
type LooseOmit<O: interface {}, K: $Keys<$FlowFixMe>> = Pick<
|
||||
O,
|
||||
Exclude<$Keys<O>, K>,
|
||||
>;
|
||||
|
||||
export type AnimatedBaseProps<Props: {...}> = {
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>,
|
||||
};
|
||||
export type AnimatedProps<Props: {...}> = LooseOmit<
|
||||
{
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>,
|
||||
},
|
||||
'ref',
|
||||
> &
|
||||
PassThroughProps;
|
||||
|
||||
export type AnimatedBaseProps<Props: {...}> = LooseOmit<
|
||||
{
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>,
|
||||
},
|
||||
'ref',
|
||||
>;
|
||||
|
||||
export type AnimatedComponentType<Props: {...}, +Instance = mixed> = component(
|
||||
ref?: React.RefSetter<Instance>,
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ export interface RefreshControlPropsAndroid extends ViewProps {
|
||||
/**
|
||||
* Size of the refresh indicator, see RefreshControl.SIZE.
|
||||
*/
|
||||
size?: number | undefined;
|
||||
size?: 'default' | 'large' | undefined;
|
||||
}
|
||||
|
||||
export interface RefreshControlProps
|
||||
|
||||
@@ -1690,6 +1690,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
||||
return (
|
||||
<StickyHeaderComponent
|
||||
key={key}
|
||||
/* $FlowFixMe[incompatible-type] */
|
||||
ref={ref => this._setStickyHeaderRef(key, ref)}
|
||||
nextHeaderLayoutY={this._headerLayoutYs.get(
|
||||
this._getKeyForIndex(nextIndex, children),
|
||||
|
||||
+3
-6
@@ -8,11 +8,8 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {
|
||||
AbstractImageAndroid,
|
||||
AbstractImageIOS,
|
||||
ImageType as ImageComponent,
|
||||
} from './ImageTypes.flow';
|
||||
import type {HostInstance} from '../..';
|
||||
import type {AbstractImageAndroid, AbstractImageIOS} from './ImageTypes.flow';
|
||||
|
||||
import useMergeRefs from '../Utilities/useMergeRefs';
|
||||
import * as React from 'react';
|
||||
@@ -33,7 +30,7 @@ export function unstable_getImageComponentDecorator(): ?ImageComponentDecorator
|
||||
return injectedImageComponentDecorator;
|
||||
}
|
||||
|
||||
type ImageInstance = React.ElementRef<ImageComponent>;
|
||||
type ImageInstance = HostInstance;
|
||||
|
||||
type ImageAttachedCallback = (
|
||||
imageInstance: ImageInstance,
|
||||
|
||||
@@ -8,12 +8,11 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {HostInstance} from '../..';
|
||||
import type {RootTag} from '../Types/RootTagTypes';
|
||||
import type {ResolvedAssetSource} from './AssetSourceResolver';
|
||||
import type {ImageProps as ImagePropsType} from './ImageProps';
|
||||
import type {ImageSource} from './ImageSource';
|
||||
import typeof ImageViewNativeComponent from './ImageViewNativeComponent';
|
||||
import typeof TextInlineImageNativeComponent from './TextInlineImageNativeComponent';
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
@@ -67,17 +66,14 @@ type ImageComponentStaticsAndroid = $ReadOnly<{
|
||||
}>;
|
||||
|
||||
export type AbstractImageAndroid = component(
|
||||
ref?: React.RefSetter<
|
||||
| React.ElementRef<TextInlineImageNativeComponent>
|
||||
| React.ElementRef<ImageViewNativeComponent>,
|
||||
>,
|
||||
ref?: React.RefSetter<HostInstance>,
|
||||
...props: ImagePropsType
|
||||
);
|
||||
|
||||
export type ImageAndroid = AbstractImageAndroid & ImageComponentStaticsAndroid;
|
||||
|
||||
export type AbstractImageIOS = component(
|
||||
ref?: React.RefSetter<React.ElementRef<ImageViewNativeComponent>>,
|
||||
ref?: React.RefSetter<HostInstance>,
|
||||
...props: ImagePropsType
|
||||
);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
|
||||
@interface RCTImageShadowView : RCTShadowView
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#import <React/RCTLog.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@implementation RCTImageShadowView
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import <React/RCTView.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@class RCTBridge;
|
||||
@class RCTImageSource;
|
||||
@@ -29,4 +29,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#import <React/RCTUtils.h>
|
||||
#import <React/UIView+React.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
/**
|
||||
* Determines whether an image of `currentSize` should be reloaded for display
|
||||
@@ -505,4 +505,4 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
#import <React/RCTViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
|
||||
@interface RCTImageViewManager : RCTViewManager
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTImageViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@@ -117,4 +117,4 @@ RCT_EXPORT_METHOD(queryCache
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -129,11 +129,13 @@ export function getWithFallback_DEPRECATED<Config: {...}>(
|
||||
// `getRuntimeConfig == null` when static view configs are disabled
|
||||
// If `setRuntimeConfigProvider` is not configured, use native reflection.
|
||||
if (hasNativeViewConfig(name)) {
|
||||
/* $FlowFixMe[incompatible-type] Extra ref prop */
|
||||
return get<Config>(name, viewConfigProvider);
|
||||
}
|
||||
} else {
|
||||
// If there is no runtime config, then the native component is unavailable.
|
||||
if (getRuntimeConfig(name) != null) {
|
||||
/* $FlowFixMe[incompatible-type] Extra ref prop */
|
||||
return get<Config>(name, viewConfigProvider);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ export type GradientValue = {
|
||||
direction?: string | undefined;
|
||||
colorStops: ReadonlyArray<{
|
||||
color: ColorValue | null;
|
||||
positions?: ReadonlyArray<string[]> | undefined;
|
||||
positions?: ReadonlyArray<string> | undefined;
|
||||
}>;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import "RCTTextAttributes.h"
|
||||
|
||||
@@ -32,4 +32,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTBaseTextShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTShadowView+Layout.h>
|
||||
|
||||
@@ -159,4 +159,4 @@ static void RCTInlineViewYogaNodeDirtied(YGNodeConstRef node)
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -18,4 +18,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTBaseTextViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@implementation RCTBaseTextViewManager
|
||||
|
||||
@@ -61,4 +61,4 @@ RCT_REMAP_SHADOW_PROPERTY(textTransform, textAttributes.textTransform, RCTTextTr
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#import <React/RCTTextDecorationLineType.h>
|
||||
#import <React/RCTTextTransform.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -104,4 +104,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTTextAttributes.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTAssert.h>
|
||||
#import <React/RCTFont.h>
|
||||
@@ -355,4 +355,4 @@ static NSString *capitalizeText(NSString *text)
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -20,4 +20,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTRawTextShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTShadowView+Layout.h>
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -18,4 +18,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTRawTextViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTRawTextShadowView.h>
|
||||
|
||||
@@ -29,4 +29,4 @@ RCT_EXPORT_SHADOW_PROPERTY(text, NSString)
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import "RCTBaseTextShadowView.h"
|
||||
|
||||
@@ -30,4 +30,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTTextShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTShadowView+Layout.h>
|
||||
@@ -467,4 +467,4 @@ static float RCTTextShadowViewBaseline(YGNodeConstRef node, const float width, c
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTComponent.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@@ -31,4 +31,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTTextView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <MobileCoreServices/UTCoreTypes.h>
|
||||
|
||||
@@ -295,4 +295,4 @@
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import "RCTBaseTextViewManager.h"
|
||||
|
||||
@@ -16,4 +16,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTTextViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTShadowView+Layout.h>
|
||||
#import <React/RCTShadowView.h>
|
||||
@@ -94,4 +94,4 @@ RCT_EXPORT_VIEW_PROPERTY(selectable, BOOL)
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
|
||||
#import "RCTBaseTextInputView.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -18,4 +18,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTMultilineTextInputView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTUtils.h>
|
||||
|
||||
@@ -64,4 +64,4 @@
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
|
||||
#import "RCTBaseTextInputViewManager.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -18,4 +18,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
#import <React/RCTMultilineTextInputView.h>
|
||||
#import <React/RCTMultilineTextInputViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@implementation RCTMultilineTextInputViewManager
|
||||
|
||||
@@ -25,4 +25,4 @@ RCT_REMAP_VIEW_PROPERTY(dataDetectorTypes, backedTextInputView.dataDetectorTypes
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import "RCTBaseTextShadowView.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -27,4 +27,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTBaseTextInputShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTShadowView+Layout.h>
|
||||
@@ -365,4 +365,4 @@ static float RCTTextInputShadowViewBaseline(YGNodeConstRef node, const float wid
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTView.h>
|
||||
|
||||
@@ -65,4 +65,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTBaseTextInputView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTConvert.h>
|
||||
@@ -843,4 +843,4 @@ static BOOL findMismatch(NSString *first, NSString *second, NSRange *firstRange,
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
#import "RCTBaseTextViewManager.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
|
||||
@interface RCTBaseTextInputViewManager : RCTBaseTextViewManager
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTBaseTextInputViewManager.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTConvert.h>
|
||||
@@ -181,4 +181,4 @@ RCT_EXPORT_METHOD(setTextAndSelection
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
#import <React/RCTShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
|
||||
@interface RCTInputAccessoryShadowView : RCTShadowView
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <React/RCTInputAccessoryShadowView.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
#import <React/RCTUtils.h>
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_COMPONENT
|
||||
#ifndef RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
@class RCTBridge;
|
||||
@class RCTInputAccessoryViewContent;
|
||||
@@ -19,4 +19,4 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_FIT_RM_OLD_COMPONENT
|
||||
#endif // RCT_REMOVE_LEGACY_ARCH
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user