|
| 1 | +diff --git a/bin/mx-scripts.js b/bin/mx-scripts.js |
| 2 | +--- a/bin/mx-scripts.js |
| 3 | ++++ b/bin/mx-scripts.js |
| 4 | +@@ -107,7 +107,7 @@ function getRealCommand(cmd, toolsRoot) { |
| 5 | + } |
| 6 | + |
| 7 | + function findNodeModulesBin() { |
| 8 | +- let parentDir = join(__dirname, ".."); |
| 9 | ++ let parentDir = join(__dirname, "../.."); |
| 10 | + const bins = []; |
| 11 | + while (parse(parentDir).root !== parentDir) { |
| 12 | + const candidate = join(parentDir, "node_modules/.bin"); |
| 13 | +diff --git a/configs/eslint.ts.base.json b/configs/eslint.ts.base.json |
| 14 | +--- a/configs/eslint.ts.base.json |
| 15 | ++++ b/configs/eslint.ts.base.json |
| 16 | +@@ -18,7 +18,8 @@ |
| 17 | + "plugin:@typescript-eslint/recommended", |
| 18 | + "prettier", |
| 19 | + "plugin:prettier/recommended", |
| 20 | +- "plugin:react-hooks/recommended" |
| 21 | ++ "plugin:react-hooks/recommended", |
| 22 | ++ "plugin:react/jsx-runtime" |
| 23 | + ], |
| 24 | + "parser": "@typescript-eslint/parser", |
| 25 | + "parserOptions": { |
| 26 | +diff --git a/configs/rollup-plugin-collect-dependencies.mjs b/configs/rollup-plugin-collect-dependencies.mjs |
| 27 | +--- a/configs/rollup-plugin-collect-dependencies.mjs |
| 28 | ++++ b/configs/rollup-plugin-collect-dependencies.mjs |
| 29 | +@@ -2,9 +2,8 @@ |
| 30 | + |
| 31 | + import fg from "fast-glob"; |
| 32 | + import fsExtra from "fs-extra"; |
| 33 | +-import { existsSync, readFileSync, writeFileSync } from "fs"; |
| 34 | ++import { existsSync, readFileSync, writeFileSync, cpSync, lstatSync, realpathSync } from "fs"; |
| 35 | + import { dirname, join, parse } from "path"; |
| 36 | +-import copy from "recursive-copy"; |
| 37 | + import { promisify } from "util"; |
| 38 | + import resolve from "resolve"; |
| 39 | + import _ from "lodash"; |
| 40 | +@@ -171,15 +170,41 @@ async function copyJsModule(moduleSourcePath, to) { |
| 41 | + if (existsSync(to)) { |
| 42 | + return; |
| 43 | + } |
| 44 | +- return promisify(copy)(moduleSourcePath, to, { |
| 45 | +- filter: [ |
| 46 | +- "**/*.*", |
| 47 | +- LICENSE_GLOB, |
| 48 | +- "!**/{android,ios,windows,mac,jest,github,gradle,__*__,docs,jest,example*}/**/*", |
| 49 | +- "!**/*.{config,setup}.*", |
| 50 | +- "!**/*.{podspec,flow}" |
| 51 | +- ] |
| 52 | +- }); |
| 53 | ++ |
| 54 | ++ try { |
| 55 | ++ // Check if the source is a symlink and resolve it to the actual path |
| 56 | ++ let actualSourcePath = moduleSourcePath; |
| 57 | ++ if (lstatSync(moduleSourcePath).isSymbolicLink()) { |
| 58 | ++ actualSourcePath = realpathSync(moduleSourcePath); |
| 59 | ++ } |
| 60 | ++ |
| 61 | ++ cpSync(actualSourcePath, to, { |
| 62 | ++ recursive: true, |
| 63 | ++ dereference: true, // Follow symlinks and copy the actual files |
| 64 | ++ filter: (src, dest) => { |
| 65 | ++ const relativePath = src.replace(actualSourcePath, '').replace(/^[\\/]/, ''); |
| 66 | ++ |
| 67 | ++ // Skip certain directories |
| 68 | ++ if (relativePath.match(/[\\/](android|ios|windows|mac|jest|github|gradle|__.*__|docs|example.*)[\\/]/)) { |
| 69 | ++ return false; |
| 70 | ++ } |
| 71 | ++ |
| 72 | ++ // Skip certain file types |
| 73 | ++ if (relativePath.match(/\.(config|setup)\.|\.podspec$|\.flow$/)) { |
| 74 | ++ return false; |
| 75 | ++ } |
| 76 | ++ |
| 77 | ++ // Include LICENSE files |
| 78 | ++ if (relativePath.match(/license/i)) { |
| 79 | ++ return true; |
| 80 | ++ } |
| 81 | ++ |
| 82 | ++ return true; |
| 83 | ++ } |
| 84 | ++ }); |
| 85 | ++ } catch (error) { |
| 86 | ++ throw error; |
| 87 | ++ } |
| 88 | + } |
| 89 | + |
| 90 | + function getModuleName(modulePath) { |
| 91 | +diff --git a/configs/rollup.config.native.mjs b/configs/rollup.config.native.mjs |
| 92 | +--- a/configs/rollup.config.native.mjs |
| 93 | ++++ b/configs/rollup.config.native.mjs |
| 94 | +@@ -62,7 +62,6 @@ const nativeExternal = [ |
| 95 | + /^react($|\/)/, |
| 96 | + /^react-native-gesture-handler($|\/)/, |
| 97 | + /^react-native-reanimated($|\/)/, |
| 98 | +- /^react-native-fast-image($|\/)/, |
| 99 | + /^react-native-svg($|\/)/, |
| 100 | + /^react-native-vector-icons($|\/)/, |
| 101 | + /^@?react-navigation($|\/)/, |
0 commit comments