Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions patches/@mendix+pluggable-widgets-tools+11.6.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
diff --git a/bin/mx-scripts.js b/bin/mx-scripts.js
--- a/bin/mx-scripts.js
+++ b/bin/mx-scripts.js
@@ -107,7 +107,7 @@ function getRealCommand(cmd, toolsRoot) {
}

function findNodeModulesBin() {
- let parentDir = join(__dirname, "..");
+ let parentDir = join(__dirname, "../..");
const bins = [];
while (parse(parentDir).root !== parentDir) {
const candidate = join(parentDir, "node_modules/.bin");
diff --git a/configs/eslint.ts.base.json b/configs/eslint.ts.base.json
--- a/configs/eslint.ts.base.json
+++ b/configs/eslint.ts.base.json
@@ -18,7 +18,8 @@
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
- "plugin:react-hooks/recommended"
+ "plugin:react-hooks/recommended",
+ "plugin:react/jsx-runtime"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
diff --git a/configs/rollup-plugin-collect-dependencies.mjs b/configs/rollup-plugin-collect-dependencies.mjs
--- a/configs/rollup-plugin-collect-dependencies.mjs
+++ b/configs/rollup-plugin-collect-dependencies.mjs
@@ -2,9 +2,8 @@

import fg from "fast-glob";
import fsExtra from "fs-extra";
-import { existsSync, readFileSync, writeFileSync } from "fs";
+import { existsSync, readFileSync, writeFileSync, cpSync, lstatSync, realpathSync } from "fs";
import { dirname, join, parse } from "path";
-import copy from "recursive-copy";
import { promisify } from "util";
import resolve from "resolve";
import _ from "lodash";
@@ -171,15 +170,41 @@ async function copyJsModule(moduleSourcePath, to) {
if (existsSync(to)) {
return;
}
- return promisify(copy)(moduleSourcePath, to, {
- filter: [
- "**/*.*",
- LICENSE_GLOB,
- "!**/{android,ios,windows,mac,jest,github,gradle,__*__,docs,jest,example*}/**/*",
- "!**/*.{config,setup}.*",
- "!**/*.{podspec,flow}"
- ]
- });
+
+ try {
+ // Check if the source is a symlink and resolve it to the actual path
+ let actualSourcePath = moduleSourcePath;
+ if (lstatSync(moduleSourcePath).isSymbolicLink()) {
+ actualSourcePath = realpathSync(moduleSourcePath);
+ }
+
+ cpSync(actualSourcePath, to, {
+ recursive: true,
+ dereference: true, // Follow symlinks and copy the actual files
+ filter: (src, dest) => {
+ const relativePath = src.replace(actualSourcePath, '').replace(/^[\\/]/, '');
+
+ // Skip certain directories
+ if (relativePath.match(/[\\/](android|ios|windows|mac|jest|github|gradle|__.*__|docs|example.*)[\\/]/)) {
+ return false;
+ }
+
+ // Skip certain file types
+ if (relativePath.match(/\.(config|setup)\.|\.podspec$|\.flow$/)) {
+ return false;
+ }
+
+ // Include LICENSE files
+ if (relativePath.match(/license/i)) {
+ return true;
+ }
+
+ return true;
+ }
+ });
+ } catch (error) {
+ throw error;
+ }
}

function getModuleName(modulePath) {
diff --git a/configs/rollup.config.native.mjs b/configs/rollup.config.native.mjs
--- a/configs/rollup.config.native.mjs
+++ b/configs/rollup.config.native.mjs
@@ -62,7 +62,6 @@ const nativeExternal = [
/^react($|\/)/,
/^react-native-gesture-handler($|\/)/,
/^react-native-reanimated($|\/)/,
- /^react-native-fast-image($|\/)/,
/^react-native-svg($|\/)/,
/^react-native-vector-icons($|\/)/,
/^@?react-navigation($|\/)/,
Loading