script for pinning dev versions of BB packages
This commit is contained in:
parent
2fc283ad06
commit
a1e5124aba
|
@ -43,7 +43,7 @@
|
|||
"test:e2e": "lerna run cy:test",
|
||||
"test:e2e:ci": "lerna run cy:ci",
|
||||
"build:docker": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh && cd -",
|
||||
"build:docker:develop": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -",
|
||||
"build:docker:develop": "node scripts/pinVersions && lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -",
|
||||
"multi:enable": "lerna run multi:enable",
|
||||
"multi:disable": "lerna run multi:disable"
|
||||
}
|
||||
|
|
|
@ -65,10 +65,10 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^0.9.99-alpha.2",
|
||||
"@budibase/client": "^0.9.99-alpha.2",
|
||||
"@budibase/bbui": "0.9.99-alpha.2",
|
||||
"@budibase/client": "0.9.99-alpha.2",
|
||||
"@budibase/colorpicker": "1.1.2",
|
||||
"@budibase/string-templates": "^0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "0.9.99-alpha.2",
|
||||
"@sentry/browser": "5.19.1",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
"dev:builder": "rollup -cw"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^0.9.99-alpha.2",
|
||||
"@budibase/standard-components": "^0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "^0.9.99-alpha.2",
|
||||
"@budibase/bbui": "0.9.99-alpha.2",
|
||||
"@budibase/standard-components": "0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "0.9.99-alpha.2",
|
||||
"regexparam": "^1.3.0",
|
||||
"shortid": "^2.2.15",
|
||||
"svelte-spa-router": "^3.0.5"
|
||||
|
|
|
@ -62,9 +62,9 @@
|
|||
"author": "Budibase",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@budibase/auth": "^0.9.99-alpha.2",
|
||||
"@budibase/client": "^0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "^0.9.99-alpha.2",
|
||||
"@budibase/auth": "0.9.99-alpha.2",
|
||||
"@budibase/client": "0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "0.9.99-alpha.2",
|
||||
"@elastic/elasticsearch": "7.10.0",
|
||||
"@koa/router": "8.0.0",
|
||||
"@sendgrid/mail": "7.1.1",
|
||||
|
@ -117,7 +117,7 @@
|
|||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/preset-env": "^7.14.4",
|
||||
"@budibase/standard-components": "^0.9.99-alpha.2",
|
||||
"@budibase/standard-components": "0.9.99-alpha.2",
|
||||
"@jest/test-sequencer": "^24.8.0",
|
||||
"@types/bull": "^3.15.1",
|
||||
"@types/jest": "^26.0.23",
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"license": "MIT",
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^0.9.99-alpha.2",
|
||||
"@budibase/bbui": "0.9.99-alpha.2",
|
||||
"@spectrum-css/card": "^3.0.3",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
"@spectrum-css/link": "^3.1.3",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"manifest": "node ./scripts/gen-collection-info.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/handlebars-helpers": "^0.11.4",
|
||||
"@budibase/handlebars-helpers": "0.11.4",
|
||||
"dayjs": "^1.10.4",
|
||||
"handlebars": "^4.7.6",
|
||||
"handlebars-utils": "^1.0.6",
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
"author": "Budibase",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@budibase/auth": "^0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "^0.9.99-alpha.2",
|
||||
"@budibase/auth": "0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "0.9.99-alpha.2",
|
||||
"@koa/router": "^8.0.0",
|
||||
"@techpass/passport-openidconnect": "^0.3.0",
|
||||
"aws-sdk": "^2.811.0",
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
const fs = require("fs")
|
||||
const path = require("path")
|
||||
|
||||
const MONOREPO_ROOT = "packages"
|
||||
|
||||
const packages = fs.readdirSync(MONOREPO_ROOT)
|
||||
|
||||
function pinDeps(dependencies) {
|
||||
for (let dependency in dependencies) {
|
||||
if (dependency.startsWith("@budibase")) {
|
||||
dependencies[dependency] = dependencies[dependency].replace("^", "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// iterate over the monorepo packages
|
||||
for (let pkg of packages) {
|
||||
const pkgPath = path.join(MONOREPO_ROOT, pkg)
|
||||
|
||||
// only directories
|
||||
if (fs.statSync(pkgPath).isDirectory()) {
|
||||
|
||||
|
||||
// get the package JSON file
|
||||
const pkgJsonPath = path.join(pkgPath, "package.json")
|
||||
const pkgJson = require(`../${pkgJsonPath}`)
|
||||
|
||||
// find any budibase dependencies, and pin them
|
||||
pinDeps(pkgJson.dependencies)
|
||||
pinDeps(pkgJson.devDependencies)
|
||||
|
||||
// update the package JSON files
|
||||
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2))
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Pinned dev versions for budibase packages successfully.")
|
Loading…
Reference in New Issue