diff --git a/beachball.config.js b/beachball.config.js index a07d8964b..359a92f7e 100644 --- a/beachball.config.js +++ b/beachball.config.js @@ -1,6 +1,6 @@ // @ts-check /** @type {import('beachball').BeachballConfig}*/ -module.exports = { +const config = { groupChanges: true, access: "public", ignorePatterns: [ @@ -16,4 +16,19 @@ module.exports = { // This one is especially important (otherwise dependabot would be blocked by change file requirements) "yarn.lock", ], + hooks: { + prepublish: (packagePath, name, version, packageInfos) => { + const { packageJsonPath } = packageInfos[name]; + const packageJson = require(packageJsonPath); + for (const [dep, version] of Object.entries(packageJson.dependencies || {})) { + // If the dep is a specific version, unpin before publishing. + // See the comment towards the end of renovate.json5 for why the deps are pinned to start out. + if (/^\d/.test(version)) { + packageJson.dependencies[dep] = `^${version}`; + } + } + }, + }, }; + +module.exports = config;