From bb3179cdf4281cc4425b683e88c671d0a89983d7 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 29 May 2023 12:46:19 +0200 Subject: [PATCH 1/2] Use resolutions for pro --- package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package.json b/package.json index 35452b024a..3849c65274 100644 --- a/package.json +++ b/package.json @@ -110,5 +110,11 @@ "packages/pro/packages/pro" ] }, + "resolutions": { + "@budibase/backend-core": "0.0.0", + "@budibase/shared-core": "0.0.0", + "@budibase/string-templates": "0.0.0", + "@budibase/types": "0.0.0" + }, "dependencies": {} } From 47b2bfbc20c795526555bae8d48bceac128be278 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 29 May 2023 12:57:17 +0200 Subject: [PATCH 2/2] Remove custom resetProDependencies --- .github/workflows/release-develop.yml | 3 --- .github/workflows/release-master.yml | 3 --- scripts/resetProDependencies.js | 38 --------------------------- 3 files changed, 44 deletions(-) delete mode 100755 scripts/resetProDependencies.js diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index ebd2f4c3ef..c724b717e2 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -54,9 +54,6 @@ jobs: - run: yarn build --configuration=production - run: yarn build:sdk - - name: Reset pro dependencies - run: node scripts/resetProDependencies.js - - name: Publish budibase packages to NPM env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 304b0de100..4959194064 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -60,9 +60,6 @@ jobs: - run: yarn build --configuration=production - run: yarn build:sdk - - name: Reset pro dependencies - run: node scripts/resetProDependencies.js - - name: Publish budibase packages to NPM env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/scripts/resetProDependencies.js b/scripts/resetProDependencies.js deleted file mode 100755 index d46a79d6b8..0000000000 --- a/scripts/resetProDependencies.js +++ /dev/null @@ -1,38 +0,0 @@ -const fs = require("fs") -const path = require("path") -const { execSync } = require("child_process") - -// Get the list of workspaces with mismatched dependencies -const output = execSync("yarn --silent workspaces info --json", { - encoding: "utf-8", -}) -const data = JSON.parse(output) - -const packageJsonPath = path.join( - data["@budibase/pro"].location, - "package.json" -) -const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8")) - -let hasChanges = false - -const dependencies = data["@budibase/pro"].workspaceDependencies -dependencies.forEach(dependency => { - if (packageJson.dependencies?.[dependency]) { - packageJson.dependencies[dependency] = "0.0.0" - hasChanges = true - } - if (packageJson.devDependencies?.[dependency]) { - packageJson.devDependencies[dependency] = "0.0.0" - hasChanges = true - } - if (packageJson.peerDependencies?.[dependency]) { - packageJson.peerDependencies[dependency] = "0.0.0" - hasChanges = true - } -}) - -// Write changes to package.json if there are any -if (hasChanges) { - fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n") -}