Skip to content
Open
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@ jobs:
run: pnpm -r --filter='!native-widgets' --filter=$(if [ "${{ steps.files.outputs.global_files }}" = "" ] && ${{ github.event_name == 'pull_request' }}; then echo '...[origin/main]'; else echo '**'; fi) run build
env:
NODE_OPTIONS: --max_old_space_size=8192
- name: "Validating manifest format"
run: pnpm run validate-manifest-format
- name: "Validating native dependencies"
run: pnpm run validate-native-dependencies
env:
CI_COMMIT_MESSAGE: ${{ github.event.head_commit.message || github.event.pull_request.title }}
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
pnpm run validate-native-dependencies "$1"
2 changes: 1 addition & 1 deletion configs/e2e/mendix-versions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"latest": "11.12.3"
"latest": "11.14.0"
}
10 changes: 8 additions & 2 deletions configs/jsactions/rollup-plugin-collect-dependencies.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ async function resolvePackage(target, sourceDir, optional = false) {
}

async function hasNativeCode(dir) {
return (await fg(["**/{android,ios}/*", "**/*.podspec"], { cwd: dir })).length > 0;
return (await fg(
["**/{android,ios}/*", "**/*.podspec"],
{
cwd: dir,
ignore: ["**/example*/**", "**/__tests__/**", "**/docs/**"]
}
)).length > 0;
}

async function getTransitiveDependencies(packagePath, isExternal) {
Expand Down Expand Up @@ -187,7 +193,7 @@ export async function copyJsModule(moduleSourcePath, to) {

// Skip certain directories
if (
relativePath.match(/[\\/](android|ios|windows|mac|jest|github|gradle|__.*__|docs|example.*)[\\/]/)
relativePath.match(/(^|[\\/])(android|ios|windows|mac|jest|github|gradle|__.*__|docs|example.*)([\\/]|$)/)
) {
return false;
}
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"build-mpk": "ts-node --project ./scripts/tsconfig.json ./scripts/release/build-mpk.ts",
"version": "ts-node --project ./scripts/tsconfig.json ./scripts/release/BumpVersion.ts",
"validate-staged-widget-versions": "node scripts/validation/validate-versions-staged-files.js",
"validate-manifest-format": "node scripts/validation/validate-manifest-format.js",
"validate-native-dependencies": "node scripts/validation/validate-native-dependencies.js",
"setup-mobile": "pnpm setup-android && pnpm setup-ios",
"build:widgets": "node ./scripts/widget/buildWidgets.js",
"test_widgets:maestro:ios": "bash maestro/run_maestro_widget_tests.sh ios",
Expand Down Expand Up @@ -106,7 +108,7 @@
"react-native-gesture-handler@2.31.2": "patches/react-native-gesture-handler+2.31.2.patch",
"react-native-slider@0.11.0": "patches/react-native-slider+0.11.0.patch",
"react-native-snap-carousel@3.9.1": "patches/react-native-snap-carousel+3.9.1.patch",
"@mendix/pluggable-widgets-tools": "patches/@mendix__pluggable-widgets-tools.patch"
"@mendix/pluggable-widgets-tools@11.12.0": "patches/@mendix__pluggable-widgets-tools@11.12.0.patch"
}
},
"packageManager": "pnpm@10.32.0+sha512.9b2634bb3fed5601c33633f2d92593f506270a3963b8c51d2b2d6a828da615ce4e9deebef9614ccebbc13ac8d3c0f9c9ccceb583c69c8578436fa477dbb20d70"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/configs/rollup-plugin-collect-dependencies.mjs b/configs/rollup-plugin-collect-dependencies.mjs
index d45c737bf32cb1029249fdc069b3df3f832d1ab4..9246919bd939c622447ba0227c5b695892f162a8 100644
index d45c737bf32cb1029249fdc069b3df3f832d1ab4..9f5ae6f6adf3e41220d897ba1aa074c7da458314 100644
--- a/configs/rollup-plugin-collect-dependencies.mjs
+++ b/configs/rollup-plugin-collect-dependencies.mjs
@@ -1,8 +1,7 @@
Expand All @@ -21,7 +21,22 @@ index d45c737bf32cb1029249fdc069b3df3f832d1ab4..9246919bd939c622447ba0227c5b6958
);
}
}
@@ -169,14 +168,28 @@ async function copyJsModule(moduleSourcePath, to) {
@@ -125,7 +124,13 @@ async function resolvePackage(target, sourceDir, optional = false) {
}

async function hasNativeCode(dir) {
- return (await fg(["**/{android,ios}/*", "**/*.podspec"], { cwd: dir })).length > 0;
+ return (await fg(
+ ["**/{android,ios}/*", "**/*.podspec"],
+ {
+ cwd: dir,
+ ignore: ["**/example*/**", "**/__tests__/**", "**/docs/**"]
+ }
+ )).length > 0;
}

async function getTransitiveDependencies(packagePath, isExternal) {
@@ -169,14 +174,28 @@ async function copyJsModule(moduleSourcePath, to) {
if (existsSync(to)) {
return;
}
Expand All @@ -45,7 +60,7 @@ index d45c737bf32cb1029249fdc069b3df3f832d1ab4..9246919bd939c622447ba0227c5b6958
+ filter: src => {
+ const relativePath = src.replace(actualSourcePath, "").replace(/^[\\/]/, "");
+
+ if (relativePath.match(/[\\/](android|ios|windows|mac|jest|github|gradle|__.*__|docs|example.*)[\\/]/)) {
+ if (relativePath.match(/(^|[\\/])(android|ios|windows|mac|jest|github|gradle|__.*__|docs|example.*)([\\/]|$)/)) {
+ return false;
+ }
+
Expand Down
Loading
Loading