You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/0012-introduce-reactNativeMetadata.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
---
2
-
title: Introducing `reactNativeMeta` to `package.json`, for RN specific metadata
2
+
title: Introducing `reactNativeMetadata` to `package.json`, for RN specific metadata
3
3
author:
4
4
- Lorenzo Sciandra
5
5
date: 25-01-2021
6
6
---
7
7
8
-
# RFC0012: Introducing `reactNativeMeta` to `package.json`, for RN specific metadata
8
+
# RFC0012: Introducing `reactNativeMetadata` to `package.json`, for RN specific metadata
9
9
10
10
## Summary
11
11
12
-
This RFC wants to introduce and formally discuss a new section for the package.json of a react-native project (app or library), called `reactNativeMeta`.
12
+
This RFC wants to introduce and formally discuss a new section for the package.json of a react-native project (app or library), called `reactNativeMetadata`.
13
13
14
14
This new section will allow developer to express certain characteristics of their code in a more formalized manner, that can easily used by tooling to act towards the code accordingly.
15
15
@@ -26,7 +26,7 @@ This is how this section would look like...
26
26
"name": "@rnx-kit/metro-serializer",
27
27
"version": "1.0.11",
28
28
...,
29
-
"reactNativeMeta": {
29
+
"reactNativeMetadata": {
30
30
"version": "2.3",
31
31
"type": "library",
32
32
"features": {
@@ -51,7 +51,7 @@ This is how this section would look like...
51
51
"name": "contoso",
52
52
"version": "2.0.3",
53
53
...,
54
-
"reactNativeMeta": {
54
+
"reactNativeMetadata": {
55
55
"version": "1.0",
56
56
"type": "app",
57
57
"features": {
@@ -75,7 +75,7 @@ A similar problem was also encountered by [React Native Directory](https://react
75
75
76
76
It became clear that there was a need to be able to communicate and parse certain information about a react-native library via its `package.json`, which led to [a meeting](https://github.com/microsoft/rnx-kit/discussions/2125) between Meta, Microsoft and Expo to figure out a common solution.
77
77
78
-
This RFC is the result of that meeting: a new section of the `package.json`, called `reactNativeMeta`, to contain certain metadata about a react-native project - it being either a library or an app.
78
+
This RFC is the result of that meeting: a new section of the `package.json`, called `reactNativeMetadata`, to contain certain metadata about a react-native project - it being either a library or an app.
79
79
80
80
There are a few areas that this section could express in a consistent manner; here's a list of the ones we could think of (in no particular order):
81
81
@@ -84,14 +84,14 @@ There are a few areas that this section could express in a consistent manner; he
84
84
- if an app has opted in into Fabric, TM, or both
85
85
- if an app is using Hermes or another js engine
86
86
87
-
Sidenote: the name `reactNativeMeta` was chosen to mirror the camel case pattern used by other fields such as `peerDependenciesMeta`.
87
+
Sidenote: the name `reactNativeMetadata` was chosen to mirror the camel case pattern used by other fields such as `peerDependenciesMeta`.
88
88
89
89
## Detailed design
90
90
91
91
This is the section that in this first draft will need to be properly finalised. For now, here's what we envisioned:
92
92
93
93
```js
94
-
reactNativeMeta: {
94
+
reactNativeMetadata: {
95
95
version: string, // ex. 1.0.0 - we know that this spec might evolve in the future
96
96
type: string; // "app" or "library"
97
97
features: {
@@ -130,7 +130,7 @@ The main drawback is that we'd need to convince developers to start using it, so
130
130
131
131
## Alternatives
132
132
133
-
`reactNativeMeta` is, by design, fully original and new: there are other files that are used to define configurations for various aspect of react-native based projects (such as `react-native.config.js`, `app.json`, Expo's `app.config.js`, `expo-module.config.json`) but this one does **not** overlap with any of them. Explicitly, this one has the purpose of being filled only with metadata to be read by package managers and other tools.
133
+
`reactNativeMetadata` is, by design, fully original and new: there are other files that are used to define configurations for various aspect of react-native based projects (such as `react-native.config.js`, `app.json`, Expo's `app.config.js`, `expo-module.config.json`) but this one does **not** overlap with any of them. Explicitly, this one has the purpose of being filled only with metadata to be read by package managers and other tools.
0 commit comments