@vxrn/vite-flow 1.1.371 → 1.1.373
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/transformFlowBabel.cjs +10 -3
- package/dist/cjs/transformFlowBabel.js +8 -2
- package/dist/cjs/transformFlowBabel.js.map +1 -1
- package/dist/cjs/transformFlowBabel.native.js +12 -2
- package/dist/cjs/transformFlowBabel.native.js.map +2 -2
- package/dist/esm/transformFlowBabel.js +8 -1
- package/dist/esm/transformFlowBabel.js.map +1 -1
- package/dist/esm/transformFlowBabel.mjs +9 -2
- package/dist/esm/transformFlowBabel.mjs.map +1 -1
- package/dist/esm/transformFlowBabel.native.js +12 -1
- package/dist/esm/transformFlowBabel.native.js.map +2 -2
- package/package.json +18 -15
- package/src/transformFlowBabel.ts +5 -1
- package/types/transformFlowBabel.d.ts.map +1 -1
|
@@ -34,18 +34,25 @@ __export(transformFlowBabel_exports, {
|
|
|
34
34
|
transformFlowBabel: () => transformFlowBabel
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(transformFlowBabel_exports);
|
|
37
|
-
var import_core = __toESM(require("@babel/core"), 1)
|
|
37
|
+
var import_core = __toESM(require("@babel/core"), 1),
|
|
38
|
+
import_resolve = require("@vxrn/resolve");
|
|
38
39
|
async function transformFlowBabel(input, {
|
|
39
40
|
development = !1
|
|
40
41
|
} = {}) {
|
|
41
42
|
return await new Promise((res, rej) => {
|
|
42
43
|
import_core.default.transform(input, {
|
|
43
|
-
|
|
44
|
+
filename: "file.js",
|
|
45
|
+
// this is required for @react-native/babel-plugin-codegen to work.
|
|
46
|
+
presets: [[(0, import_resolve.resolvePath)("metro-react-native-babel-preset"), {
|
|
44
47
|
// To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
|
|
45
48
|
useTransformReactJSXExperimental: !0,
|
|
46
49
|
unstable_transformProfile: "hermes-stable"
|
|
47
50
|
}]],
|
|
48
|
-
plugins: [["
|
|
51
|
+
plugins: [["babel-plugin-syntax-hermes-parser"],
|
|
52
|
+
// This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
|
|
53
|
+
["@react-native/babel-plugin-codegen"],
|
|
54
|
+
// Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
|
|
55
|
+
["@babel/plugin-transform-react-jsx", {
|
|
49
56
|
development
|
|
50
57
|
}], ["@babel/plugin-transform-private-methods", {
|
|
51
58
|
loose: !0
|
|
@@ -25,15 +25,17 @@ __export(transformFlowBabel_exports, {
|
|
|
25
25
|
transformFlowBabel: () => transformFlowBabel
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(transformFlowBabel_exports);
|
|
28
|
-
var import_core = __toESM(require("@babel/core"), 1);
|
|
28
|
+
var import_core = __toESM(require("@babel/core"), 1), import_resolve = require("@vxrn/resolve");
|
|
29
29
|
async function transformFlowBabel(input, { development = !1 } = {}) {
|
|
30
30
|
return await new Promise((res, rej) => {
|
|
31
31
|
import_core.default.transform(
|
|
32
32
|
input,
|
|
33
33
|
{
|
|
34
|
+
filename: "file.js",
|
|
35
|
+
// this is required for @react-native/babel-plugin-codegen to work.
|
|
34
36
|
presets: [
|
|
35
37
|
[
|
|
36
|
-
"
|
|
38
|
+
(0, import_resolve.resolvePath)("metro-react-native-babel-preset"),
|
|
37
39
|
{
|
|
38
40
|
// To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
|
|
39
41
|
useTransformReactJSXExperimental: !0,
|
|
@@ -42,6 +44,10 @@ async function transformFlowBabel(input, { development = !1 } = {}) {
|
|
|
42
44
|
]
|
|
43
45
|
],
|
|
44
46
|
plugins: [
|
|
47
|
+
["babel-plugin-syntax-hermes-parser"],
|
|
48
|
+
// This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
|
|
49
|
+
["@react-native/babel-plugin-codegen"],
|
|
50
|
+
// Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
|
|
45
51
|
["@babel/plugin-transform-react-jsx", { development }],
|
|
46
52
|
["@babel/plugin-transform-private-methods", { loose: !0 }]
|
|
47
53
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/transformFlowBabel.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkB;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkB,oCAClB,iBAA4B;AAE5B,eAAsB,mBACpB,OACA,EAAE,cAAc,GAAM,IAA+B,CAAC,GACtD;AACA,SAAO,MAAM,IAAI,QAAgB,CAAC,KAAK,QAAQ;AAC7C,gBAAAA,QAAM;AAAA,MACJ;AAAA,MACA;AAAA,QACE,UAAU;AAAA;AAAA,QACV,SAAS;AAAA,UACP;AAAA,gBACE,4BAAY,iCAAiC;AAAA,YAC7C;AAAA;AAAA,cAEE,kCAAkC;AAAA,cAClC,2BAA2B;AAAA,YAC7B;AAAA,UACF;AAAA,QACF;AAAA,QACA,SAAS;AAAA,UACP,CAAC,mCAAmC;AAAA;AAAA,UACpC,CAAC,oCAAoC;AAAA;AAAA,UACrC,CAAC,qCAAqC,EAAE,YAAY,CAAC;AAAA,UACrD,CAAC,2CAA2C,EAAE,OAAO,GAAK,CAAC;AAAA,QAC7D;AAAA,MACF;AAAA,MACA,CAAC,KAAU,WAAW;AACpB,SAAI,CAAC,UAAU,QAAK,IAAI,OAAO,QAAQ,GACvC,IAAI,OAAQ,IAAK;AAAA,MACnB;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
|
|
5
5
|
"names": ["babel"]
|
|
6
6
|
}
|
|
@@ -26,14 +26,16 @@ __export(transformFlowBabel_exports, {
|
|
|
26
26
|
transformFlowBabel: () => transformFlowBabel
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(transformFlowBabel_exports);
|
|
29
|
-
var import_core = __toESM(require("@babel/core"), 1);
|
|
29
|
+
var import_core = __toESM(require("@babel/core"), 1), import_resolve = require("@vxrn/resolve");
|
|
30
30
|
async function transformFlowBabel(input) {
|
|
31
31
|
var { development = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
32
32
|
return await new Promise(function(res, rej) {
|
|
33
33
|
import_core.default.transform(input, {
|
|
34
|
+
filename: "file.js",
|
|
35
|
+
// this is required for @react-native/babel-plugin-codegen to work.
|
|
34
36
|
presets: [
|
|
35
37
|
[
|
|
36
|
-
"
|
|
38
|
+
(0, import_resolve.resolvePath)("metro-react-native-babel-preset"),
|
|
37
39
|
{
|
|
38
40
|
// To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
|
|
39
41
|
useTransformReactJSXExperimental: !0,
|
|
@@ -42,6 +44,14 @@ async function transformFlowBabel(input) {
|
|
|
42
44
|
]
|
|
43
45
|
],
|
|
44
46
|
plugins: [
|
|
47
|
+
[
|
|
48
|
+
"babel-plugin-syntax-hermes-parser"
|
|
49
|
+
],
|
|
50
|
+
// This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
|
|
51
|
+
[
|
|
52
|
+
"@react-native/babel-plugin-codegen"
|
|
53
|
+
],
|
|
54
|
+
// Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
|
|
45
55
|
[
|
|
46
56
|
"@babel/plugin-transform-react-jsx",
|
|
47
57
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/one/packages/vite-flow/src/transformFlowBabel.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;kBAAkB;
|
|
5
|
-
"names": ["transformFlowBabel", "input", "development", "Promise", "res", "rej", "babel", "transform", "presets", "useTransformReactJSXExperimental", "unstable_transformProfile", "plugins", "loose", "err", "result", "code"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;kBAAkB,oCAClB,iBAA4B;AAE5B,eAAsBA,mBACpBC,OAAa;MACb,EAAEC,cAAc,GAAK,IAArB,UAAA,SAAA,KAAA,UAAA,CAAA,MAAA,SAAA,UAAA,CAAA,IAAqD,CAAC;AAEtD,SAAO,MAAM,IAAIC,QAAgB,SAACC,KAAKC,KAAAA;AACrCC,gBAAAA,QAAMC,UACJN,OACA;MACEO,UAAU;;MACVC,SAAS;QACP;cACEC,4BAAY,iCAAA;UACZ;;YAEEC,kCAAkC;YAClCC,2BAA2B;UAC7B;;;MAGJC,SAAS;QACP;UAAC;;;QACD;UAAC;;;QACD;UAAC;UAAqC;YAAEX;UAAY;;QACpD;UAAC;UAA2C;YAAEY,OAAO;UAAK;;;IAE9D,GACA,SAACC,KAAUC,QAAAA;AACT,OAAI,CAACA,UAAUD,QAAKV,IAAIU,OAAO,QAAA,GAC/BX,IAAIY,OAAQC,IAAI;IAClB,CAAA;EAEJ,CAAA;AACF;",
|
|
5
|
+
"names": ["transformFlowBabel", "input", "development", "Promise", "res", "rej", "babel", "transform", "filename", "presets", "resolvePath", "useTransformReactJSXExperimental", "unstable_transformProfile", "plugins", "loose", "err", "result", "code"]
|
|
6
6
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import babel from "@babel/core";
|
|
2
|
+
import { resolvePath } from "@vxrn/resolve";
|
|
2
3
|
async function transformFlowBabel(input, { development = !1 } = {}) {
|
|
3
4
|
return await new Promise((res, rej) => {
|
|
4
5
|
babel.transform(
|
|
5
6
|
input,
|
|
6
7
|
{
|
|
8
|
+
filename: "file.js",
|
|
9
|
+
// this is required for @react-native/babel-plugin-codegen to work.
|
|
7
10
|
presets: [
|
|
8
11
|
[
|
|
9
|
-
"
|
|
12
|
+
resolvePath("metro-react-native-babel-preset"),
|
|
10
13
|
{
|
|
11
14
|
// To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
|
|
12
15
|
useTransformReactJSXExperimental: !0,
|
|
@@ -15,6 +18,10 @@ async function transformFlowBabel(input, { development = !1 } = {}) {
|
|
|
15
18
|
]
|
|
16
19
|
],
|
|
17
20
|
plugins: [
|
|
21
|
+
["babel-plugin-syntax-hermes-parser"],
|
|
22
|
+
// This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
|
|
23
|
+
["@react-native/babel-plugin-codegen"],
|
|
24
|
+
// Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
|
|
18
25
|
["@babel/plugin-transform-react-jsx", { development }],
|
|
19
26
|
["@babel/plugin-transform-private-methods", { loose: !0 }]
|
|
20
27
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/transformFlowBabel.ts"],
|
|
4
|
-
"mappings": "AAAA,OAAO,WAAW;
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,mBAAmB;AAE5B,eAAsB,mBACpB,OACA,EAAE,cAAc,GAAM,IAA+B,CAAC,GACtD;AACA,SAAO,MAAM,IAAI,QAAgB,CAAC,KAAK,QAAQ;AAC7C,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,QACE,UAAU;AAAA;AAAA,QACV,SAAS;AAAA,UACP;AAAA,YACE,YAAY,iCAAiC;AAAA,YAC7C;AAAA;AAAA,cAEE,kCAAkC;AAAA,cAClC,2BAA2B;AAAA,YAC7B;AAAA,UACF;AAAA,QACF;AAAA,QACA,SAAS;AAAA,UACP,CAAC,mCAAmC;AAAA;AAAA,UACpC,CAAC,oCAAoC;AAAA;AAAA,UACrC,CAAC,qCAAqC,EAAE,YAAY,CAAC;AAAA,UACrD,CAAC,2CAA2C,EAAE,OAAO,GAAK,CAAC;AAAA,QAC7D;AAAA,MACF;AAAA,MACA,CAAC,KAAU,WAAW;AACpB,SAAI,CAAC,UAAU,QAAK,IAAI,OAAO,QAAQ,GACvC,IAAI,OAAQ,IAAK;AAAA,MACnB;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import babel from "@babel/core";
|
|
2
|
+
import { resolvePath } from "@vxrn/resolve";
|
|
2
3
|
async function transformFlowBabel(input, {
|
|
3
4
|
development = !1
|
|
4
5
|
} = {}) {
|
|
5
6
|
return await new Promise((res, rej) => {
|
|
6
7
|
babel.transform(input, {
|
|
7
|
-
|
|
8
|
+
filename: "file.js",
|
|
9
|
+
// this is required for @react-native/babel-plugin-codegen to work.
|
|
10
|
+
presets: [[resolvePath("metro-react-native-babel-preset"), {
|
|
8
11
|
// To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
|
|
9
12
|
useTransformReactJSXExperimental: !0,
|
|
10
13
|
unstable_transformProfile: "hermes-stable"
|
|
11
14
|
}]],
|
|
12
|
-
plugins: [["
|
|
15
|
+
plugins: [["babel-plugin-syntax-hermes-parser"],
|
|
16
|
+
// This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
|
|
17
|
+
["@react-native/babel-plugin-codegen"],
|
|
18
|
+
// Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
|
|
19
|
+
["@babel/plugin-transform-react-jsx", {
|
|
13
20
|
development
|
|
14
21
|
}], ["@babel/plugin-transform-private-methods", {
|
|
15
22
|
loose: !0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["babel","transformFlowBabel","input","development","Promise","res","rej","transform","presets","useTransformReactJSXExperimental","unstable_transformProfile","plugins","loose","err","result","code"],"sources":["../../src/transformFlowBabel.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;
|
|
1
|
+
{"version":3,"names":["babel","resolvePath","transformFlowBabel","input","development","Promise","res","rej","transform","filename","presets","useTransformReactJSXExperimental","unstable_transformProfile","plugins","loose","err","result","code"],"sources":["../../src/transformFlowBabel.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,WAAA,QAAmB;AAE5B,eAAsBC,mBACpBC,KAAA,EACA;EAAEC,WAAA,GAAc;AAAM,IAA+B,CAAC,GACtD;EACA,OAAO,MAAM,IAAIC,OAAA,CAAgB,CAACC,GAAA,EAAKC,GAAA,KAAQ;IAC7CP,KAAA,CAAMQ,SAAA,CACJL,KAAA,EACA;MACEM,QAAA,EAAU;MAAA;MACVC,OAAA,EAAS,CACP,CACET,WAAA,CAAY,iCAAiC,GAC7C;QAAA;QAEEU,gCAAA,EAAkC;QAClCC,yBAAA,EAA2B;MAC7B,EACF,CACF;MACAC,OAAA,EAAS,CACP,CAAC,mCAAmC;MAAA;MACpC,CAAC,oCAAoC;MAAA;MACrC,CAAC,qCAAqC;QAAET;MAAY,CAAC,GACrD,CAAC,2CAA2C;QAAEU,KAAA,EAAO;MAAK,CAAC;IAE/D,GACA,CAACC,GAAA,EAAUC,MAAA,KAAW;MACpB,CAAI,CAACA,MAAA,IAAUD,GAAA,KAAKR,GAAA,CAAIQ,GAAA,IAAO,QAAQ,GACvCT,GAAA,CAAIU,MAAA,CAAQC,IAAK;IACnB,CACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import babel from "@babel/core";
|
|
2
|
+
import { resolvePath } from "@vxrn/resolve";
|
|
2
3
|
async function transformFlowBabel(input) {
|
|
3
4
|
var { development = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4
5
|
return await new Promise(function(res, rej) {
|
|
5
6
|
babel.transform(input, {
|
|
7
|
+
filename: "file.js",
|
|
8
|
+
// this is required for @react-native/babel-plugin-codegen to work.
|
|
6
9
|
presets: [
|
|
7
10
|
[
|
|
8
|
-
"
|
|
11
|
+
resolvePath("metro-react-native-babel-preset"),
|
|
9
12
|
{
|
|
10
13
|
// To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
|
|
11
14
|
useTransformReactJSXExperimental: !0,
|
|
@@ -14,6 +17,14 @@ async function transformFlowBabel(input) {
|
|
|
14
17
|
]
|
|
15
18
|
],
|
|
16
19
|
plugins: [
|
|
20
|
+
[
|
|
21
|
+
"babel-plugin-syntax-hermes-parser"
|
|
22
|
+
],
|
|
23
|
+
// This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
|
|
24
|
+
[
|
|
25
|
+
"@react-native/babel-plugin-codegen"
|
|
26
|
+
],
|
|
27
|
+
// Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
|
|
17
28
|
[
|
|
18
29
|
"@babel/plugin-transform-react-jsx",
|
|
19
30
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/one/packages/vite-flow/src/transformFlowBabel.ts"],
|
|
4
|
-
"mappings": "AAAA,OAAOA,WAAW;
|
|
5
|
-
"names": ["babel", "transformFlowBabel", "input", "development", "Promise", "res", "rej", "transform", "presets", "useTransformReactJSXExperimental", "unstable_transformProfile", "plugins", "loose", "err", "result", "code"]
|
|
4
|
+
"mappings": "AAAA,OAAOA,WAAW;AAClB,SAASC,mBAAmB;AAE5B,eAAsBC,mBACpBC,OAAa;MACb,EAAEC,cAAc,GAAK,IAArB,UAAA,SAAA,KAAA,UAAA,CAAA,MAAA,SAAA,UAAA,CAAA,IAAqD,CAAC;AAEtD,SAAO,MAAM,IAAIC,QAAgB,SAACC,KAAKC,KAAAA;AACrCP,UAAMQ,UACJL,OACA;MACEM,UAAU;;MACVC,SAAS;QACP;UACET,YAAY,iCAAA;UACZ;;YAEEU,kCAAkC;YAClCC,2BAA2B;UAC7B;;;MAGJC,SAAS;QACP;UAAC;;;QACD;UAAC;;;QACD;UAAC;UAAqC;YAAET;UAAY;;QACpD;UAAC;UAA2C;YAAEU,OAAO;UAAK;;;IAE9D,GACA,SAACC,KAAUC,QAAAA;AACT,OAAI,CAACA,UAAUD,QAAKR,IAAIQ,OAAO,QAAA,GAC/BT,IAAIU,OAAQC,IAAI;IAClB,CAAA;EAEJ,CAAA;AACF;",
|
|
5
|
+
"names": ["babel", "resolvePath", "transformFlowBabel", "input", "development", "Promise", "res", "rej", "transform", "filename", "presets", "useTransformReactJSXExperimental", "unstable_transformProfile", "plugins", "loose", "err", "result", "code"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/vite-flow",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"types": "./types/index.d.ts",
|
|
3
|
+
"version": "1.1.373",
|
|
5
4
|
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
"./package.json": "./package.json",
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"import": "./dist/esm/index.mjs",
|
|
10
|
+
"require": "./dist/cjs/index.cjs"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
6
13
|
"main": "dist/cjs",
|
|
7
14
|
"module": "dist/esm",
|
|
15
|
+
"types": "./types/index.d.ts",
|
|
8
16
|
"files": [
|
|
9
17
|
"src",
|
|
10
18
|
"types",
|
|
@@ -12,30 +20,25 @@
|
|
|
12
20
|
],
|
|
13
21
|
"scripts": {
|
|
14
22
|
"build": "tamagui-build",
|
|
15
|
-
"
|
|
23
|
+
"clean": "tamagui-build clean",
|
|
24
|
+
"clean:build": "tamagui-build clean:build",
|
|
16
25
|
"lint": "../../node_modules/.bin/biome check src",
|
|
17
26
|
"lint:fix": "../../node_modules/.bin/biome check --apply-unsafe src",
|
|
18
|
-
"
|
|
19
|
-
"clean:build": "tamagui-build clean:build"
|
|
20
|
-
},
|
|
21
|
-
"exports": {
|
|
22
|
-
"./package.json": "./package.json",
|
|
23
|
-
".": {
|
|
24
|
-
"types": "./types/index.d.ts",
|
|
25
|
-
"import": "./dist/esm/index.mjs",
|
|
26
|
-
"require": "./dist/cjs/index.cjs"
|
|
27
|
-
}
|
|
27
|
+
"watch": "tamagui-build --watch"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/core": "^7.26.0",
|
|
31
31
|
"@babel/plugin-transform-private-methods": "^7.25.9",
|
|
32
|
+
"@react-native/babel-plugin-codegen": "^0.76.5",
|
|
33
|
+
"@vxrn/resolve": "1.1.373",
|
|
34
|
+
"babel-plugin-syntax-hermes-parser": "^0.25.1",
|
|
32
35
|
"flow-remove-types": "^2.247.1",
|
|
33
36
|
"metro-react-native-babel-preset": "^0.77.0",
|
|
34
|
-
"vite": "^6.0.
|
|
37
|
+
"vite": "^6.0.6"
|
|
35
38
|
},
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@biomejs/biome": "^1.8.3",
|
|
38
|
-
"@tamagui/build": "^1.
|
|
41
|
+
"@tamagui/build": "^1.121.2"
|
|
39
42
|
},
|
|
40
43
|
"publishConfig": {
|
|
41
44
|
"access": "public"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import babel from '@babel/core'
|
|
2
|
+
import { resolvePath } from '@vxrn/resolve'
|
|
2
3
|
|
|
3
4
|
export async function transformFlowBabel(
|
|
4
5
|
input: string,
|
|
@@ -8,9 +9,10 @@ export async function transformFlowBabel(
|
|
|
8
9
|
babel.transform(
|
|
9
10
|
input,
|
|
10
11
|
{
|
|
12
|
+
filename: 'file.js', // this is required for @react-native/babel-plugin-codegen to work.
|
|
11
13
|
presets: [
|
|
12
14
|
[
|
|
13
|
-
'
|
|
15
|
+
resolvePath('metro-react-native-babel-preset'),
|
|
14
16
|
{
|
|
15
17
|
// To use the `@babel/plugin-transform-react-jsx` plugin for JSX.
|
|
16
18
|
useTransformReactJSXExperimental: true,
|
|
@@ -19,6 +21,8 @@ export async function transformFlowBabel(
|
|
|
19
21
|
],
|
|
20
22
|
],
|
|
21
23
|
plugins: [
|
|
24
|
+
['babel-plugin-syntax-hermes-parser'], // This parser is required for the `@babel/plugin-transform-react-jsx` plugin to work.
|
|
25
|
+
['@react-native/babel-plugin-codegen'], // Transforms thing like `export default (codegenNativeComponent<NativeProps>('DebuggingOverlay'));` into `export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);`, we need to do this here since Flow types are required to generate that `__INTERNAL_VIEW_CONFIG`. Without this we'll get warnings/errors like "Codegen didn't run for DebuggingOverlay".
|
|
22
26
|
['@babel/plugin-transform-react-jsx', { development }],
|
|
23
27
|
['@babel/plugin-transform-private-methods', { loose: true }],
|
|
24
28
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformFlowBabel.d.ts","sourceRoot":"","sources":["../src/transformFlowBabel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transformFlowBabel.d.ts","sourceRoot":"","sources":["../src/transformFlowBabel.ts"],"names":[],"mappings":"AAGA,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,EAAE,WAAmB,EAAE,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,mBA8BxD"}
|