From 6a9d29ab751e775b5ca55ff4aeb7c104210932fe Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 29 Jul 2024 15:57:38 +0200 Subject: [PATCH 1/4] Bundle pro instead of relying on removing backend-core --- scripts/build.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 4383950f88..93a2a1e589 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -51,20 +51,6 @@ async function runBuild(entry, outfile) { fs.readFileSync(tsconfig, "utf-8") ) - if ( - !fs.existsSync(path.join(__dirname, "../packages/pro/src")) && - tsconfigPathPluginContent.compilerOptions?.paths - ) { - // If we don't have pro, we cannot bundle backend-core. - // Otherwise, the main context will not be shared between libraries - delete tsconfigPathPluginContent?.compilerOptions?.paths?.[ - "@budibase/backend-core" - ] - delete tsconfigPathPluginContent?.compilerOptions?.paths?.[ - "@budibase/backend-core/*" - ] - } - const sharedConfig = { entryPoints: [entry], bundle: true, @@ -75,7 +61,7 @@ async function runBuild(entry, outfile) { svelteCompilePlugin, TsconfigPathsPlugin({ tsconfig: tsconfigPathPluginContent }), nodeExternalsPlugin({ - allowList: ["@budibase/frontend-core", "svelte"], + allowList: ["@budibase/frontend-core", "@budibase/pro", "svelte"], }), ], preserveSymlinks: true, From 458cc7fb24a7f468a40882637afdd9bfdd8cc974 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 29 Jul 2024 15:58:29 +0200 Subject: [PATCH 2/4] Remove unused script --- scripts/bootstrap.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100755 scripts/bootstrap.sh diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh deleted file mode 100755 index a5a4fc0108..0000000000 --- a/scripts/bootstrap.sh +++ /dev/null @@ -1,6 +0,0 @@ -if [ -d "packages/pro/src" ]; then - cd packages/pro - - yarn - lerna bootstrap -fi \ No newline at end of file From cc1b6f663e1005c667a746896daa8277f8a0b546 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 29 Jul 2024 15:58:50 +0200 Subject: [PATCH 3/4] Allow running devDocker --- scripts/devDocker.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/devDocker.sh b/scripts/devDocker.sh index e25819d514..3c327c0b21 100755 --- a/scripts/devDocker.sh +++ b/scripts/devDocker.sh @@ -1,11 +1,5 @@ #!/bin/bash -# Check if the pro submodule is loaded -if [ ! -d "./packages/pro/src" ]; then - echo "[ERROR] Submodule is not loaded. This is only allowed with loaded submodules." - exit 1 -fi - yarn build:apps docker compose -f hosting/docker-compose.build.yaml -f hosting/docker-compose.dev.yaml --env-file hosting/.env up --build --scale proxy-service=0 From 10016913b040e4f0d44b96f9be98b2e36fb9ca2f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 29 Jul 2024 15:59:06 +0200 Subject: [PATCH 4/4] Update esbuild-node-externals --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 29b87898ac..f3cbd75836 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@types/proper-lockfile": "^4.1.4", "@typescript-eslint/parser": "6.9.0", "esbuild": "^0.18.17", - "esbuild-node-externals": "^1.8.0", + "esbuild-node-externals": "^1.14.0", "eslint": "^8.52.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-jest": "^27.9.0", diff --git a/yarn.lock b/yarn.lock index d43d77f6f5..76dd059574 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10319,10 +10319,10 @@ es6-promise@^4.2.4: resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== -esbuild-node-externals@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/esbuild-node-externals/-/esbuild-node-externals-1.8.0.tgz#878fbe458d4e58337753c2eacfd7200dc1077bd1" - integrity sha512-pYslmT8Bl383UnfxzHQQRpCgBNIOwAzDaYheuIeI4CODxelsN/eQroVn5STDow5QOpRalMgWUR+R8LfSgUROcw== +esbuild-node-externals@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/esbuild-node-externals/-/esbuild-node-externals-1.14.0.tgz#fc2950c67a068dc2b538fd1381ad7d8e20a6f54d" + integrity sha512-jMWnTlCII3cLEjR5+u0JRSTJuP+MgbjEHKfwSIAI41NgLQ0ZjfzjchlbEn0r7v2u5gCBMSEYvYlkO7GDG8gG3A== dependencies: find-up "^5.0.0" tslib "^2.4.1"