Merge pull request #10729 from Budibase/fix/package_resolutions
Fix - Package resolutions
This commit is contained in:
commit
df97e405dc
|
@ -54,9 +54,6 @@ jobs:
|
||||||
- run: yarn build --configuration=production
|
- run: yarn build --configuration=production
|
||||||
- run: yarn build:sdk
|
- run: yarn build:sdk
|
||||||
|
|
||||||
- name: Reset pro dependencies
|
|
||||||
run: node scripts/resetProDependencies.js
|
|
||||||
|
|
||||||
- name: Publish budibase packages to NPM
|
- name: Publish budibase packages to NPM
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
|
@ -60,9 +60,6 @@ jobs:
|
||||||
- run: yarn build --configuration=production
|
- run: yarn build --configuration=production
|
||||||
- run: yarn build:sdk
|
- run: yarn build:sdk
|
||||||
|
|
||||||
- name: Reset pro dependencies
|
|
||||||
run: node scripts/resetProDependencies.js
|
|
||||||
|
|
||||||
- name: Publish budibase packages to NPM
|
- name: Publish budibase packages to NPM
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
|
@ -110,5 +110,11 @@
|
||||||
"packages/pro/packages/pro"
|
"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": {}
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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")
|
|
||||||
}
|
|
Loading…
Reference in New Issue