Last active
December 12, 2024 09:53
-
-
Save jmfrancois/6d0de8152fb0274858b1d36684c4ec21 to your computer and use it in GitHub Desktop.
This gist is to help you to maintain your backstage app clean against a release
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const os = require('os'); | |
const fs = require('fs'); | |
const versions = require('./versions.json'); | |
function updatePart(dependencies) { | |
Object.keys(dependencies).forEach(dep => { | |
if (versions[dep]) { | |
dependencies[dep] = versions[dep]; | |
} | |
}) | |
} | |
function updatePackageJSON(packageJsonPath) { | |
if (!fs.existsSync(packageJsonPath)) { | |
return; | |
} | |
const p = require(packageJsonPath); | |
p.resolutions = versions; | |
if (p.dependencies) { | |
updatePart(p.dependencies); | |
} | |
if (p.devDependencies) { | |
updatePart(p.devDependencies); | |
} | |
p.resolutions = versions; | |
fs.writeFileSync(packageJsonPath, JSON.stringify(p, null, 2)); | |
} | |
updatePackageJSON(`./package.json`); | |
fs.readdirSync('./packages').forEach(folder => updatePackageJSON(`./packages/${folder}/package.json`)); | |
fs.readdirSync('./plugins').forEach(folder => updatePackageJSON(`./plugins/${folder}/package.json`)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@backstage/backend-common": "0.5.1", | |
"@backstage/catalog-client": "0.3.5", | |
"@backstage/catalog-model": "0.7.0", | |
"@backstage/cli": "0.5.0", | |
"@backstage/cli-common": "0.1.1", | |
"@backstage/config": "0.1.2", | |
"@backstage/config-loader": "0.5.0", | |
"@backstage/core": "0.5.0", | |
"@backstage/core-api": "0.2.9", | |
"@backstage/create-app": "0.3.7", | |
"@backstage/dev-utils": "0.1.8", | |
"@backstage/integration": "0.3.1", | |
"@backstage/techdocs-common": "0.3.6", | |
"@backstage/test-utils": "0.1.6", | |
"@backstage/test-utils-core": "0.1.1", | |
"@backstage/theme": "0.2.2", | |
"@backstage/plugin-api-docs": "0.4.3", | |
"@backstage/plugin-app-backend": "0.3.5", | |
"@backstage/plugin-auth-backend": "0.2.12", | |
"@backstage/plugin-catalog": "0.2.14", | |
"@backstage/plugin-catalog-backend": "0.5.5", | |
"@backstage/plugin-catalog-graphql": "0.2.6", | |
"@backstage/plugin-catalog-import": "0.3.6", | |
"@backstage/plugin-catalog-react": "0.0.1", | |
"@backstage/plugin-circleci": "0.2.6", | |
"@backstage/plugin-cloudbuild": "0.2.7", | |
"@backstage/plugin-cost-insights": "0.7.0", | |
"@backstage/plugin-explore": "0.2.3", | |
"@backstage/plugin-fossa": "0.1.2", | |
"@backstage/plugin-gcp-projects": "0.2.3", | |
"@backstage/plugin-github-actions": "0.3.0", | |
"@backstage/plugin-gitops-profiles": "0.2.3", | |
"@backstage/plugin-graphiql": "0.2.6", | |
"@backstage/plugin-graphql-backend": "0.1.5", | |
"@backstage/plugin-jenkins": "0.3.7", | |
"@backstage/plugin-kafka": "0.2.0", | |
"@backstage/plugin-kafka-backend": "0.2.0", | |
"@backstage/plugin-kubernetes": "0.3.7", | |
"@backstage/plugin-kubernetes-backend": "0.2.6", | |
"@backstage/plugin-lighthouse": "0.2.8", | |
"@backstage/plugin-newrelic": "0.2.3", | |
"@backstage/plugin-org": "0.3.4", | |
"@backstage/plugin-pagerduty": "0.2.6", | |
"@backstage/plugin-proxy-backend": "0.2.4", | |
"@backstage/plugin-register-component": "0.2.7", | |
"@backstage/plugin-rollbar": "0.2.8", | |
"@backstage/plugin-rollbar-backend": "0.1.7", | |
"@backstage/plugin-scaffolder": "0.4.1", | |
"@backstage/plugin-scaffolder-backend": "0.5.2", | |
"@backstage/plugin-search": "0.2.6", | |
"@backstage/plugin-sentry": "0.3.3", | |
"@backstage/plugin-sonarqube": "0.1.9", | |
"@backstage/plugin-tech-radar": "0.3.3", | |
"@backstage/plugin-techdocs": "0.5.4", | |
"@backstage/plugin-techdocs-backend": "0.5.4", | |
"@backstage/plugin-user-settings": "0.2.4", | |
"@backstage/plugin-welcome": "0.2.4" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment