diff --git a/package.json b/package.json index b6972d0ae7772b..f6b6e563eb9150 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ "babel-loader": "8.2.2", "babel-plugin-annotate-pure-calls": "0.4.0", "babel-plugin-tester": "10.1.0", - "beachball": "2.18.0", + "beachball": "2.31.0", "chalk": "4.1.0", "chromedriver": "104.0.0", "ci-info": "3.2.0", diff --git a/scripts/beachball/config.test.ts b/scripts/beachball/config.test.ts index fb023124eab368..654f86b71c80a3 100644 --- a/scripts/beachball/config.test.ts +++ b/scripts/beachball/config.test.ts @@ -8,6 +8,9 @@ describe(`beachball configs`, () => { changehint: "Run 'yarn change' to generate a change file", disallowedChangeTypes: ['major'], generateChangelog: true, + hooks: { + precommit: expect.any(Function), + }, ignorePatterns: [ '**/*.{shot,snap}', '**/*.{test,spec}.{ts,tsx}', diff --git a/scripts/beachball/shared.config.ts b/scripts/beachball/shared.config.ts index f2e154b61e6ec2..6e034e464dd43b 100644 --- a/scripts/beachball/shared.config.ts +++ b/scripts/beachball/shared.config.ts @@ -1,4 +1,5 @@ import type { BeachballConfig } from 'beachball'; +import { execSync } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; @@ -8,7 +9,7 @@ const baseConfig: typeof import('./base.config.json') = JSON.parse( fs.readFileSync(path.resolve(__dirname, 'base.config.json'), { encoding: 'utf8' }), ); -export const config: typeof baseConfig & Required> = { +export const config: typeof baseConfig & Required> = { ...baseConfig, changelog: { customRenderers: { @@ -16,4 +17,16 @@ export const config: typeof baseConfig & Required { + try { + // Fixes any dependency mismatches caused by beachball scoping + const cmd = 'yarn nx workspace-generator dependency-mismatch'; + const out = execSync(cmd); + console.log(out.toString()); + } catch (err) { + console.error(err); + } + }, + }, }; diff --git a/yarn.lock b/yarn.lock index df23a510368cab..183a68ac1e2764 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8217,26 +8217,23 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -beachball@2.18.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/beachball/-/beachball-2.18.0.tgz#429fbe6c546c9db7557d7594cf35f029263bef49" - integrity sha512-3Uk4TJfDQoj/zQy1c9vQeVZZ2sKWWDdL/d3zlyCM2pJsZjQSYveLjRRBJjG7fsz+lFtU0uYiUhbMW4oWn9HXSw== +beachball@2.31.0: + version "2.31.0" + resolved "https://registry.yarnpkg.com/beachball/-/beachball-2.31.0.tgz#dd556f2a75ab08039320e94291eed3b87809f502" + integrity sha512-xi6xf9nLLp9dpXBhnQuDsWdM6k+I34CrSdtniW8Qlt/BdHoUdTGhFFk9ky30pgywCam/bgGQbMd2FOChaUvfjQ== dependencies: - cosmiconfig "^6.0.0" - execa "^4.0.3" - fs-extra "^8.0.1" - git-url-parse "^11.1.2" - glob "^7.1.4" - human-id "^2.0.1" + cosmiconfig "^7.0.0" + execa "^5.0.0" + fs-extra "^10.0.0" lodash "^4.17.15" minimatch "^3.0.4" p-limit "^3.0.2" - prompts "~2.1.0" - semver "^6.1.1" + prompts "^2.1.0" + semver "^7.0.0" toposort "^2.0.2" - uuid "^8.3.1" - workspace-tools "^0.16.2" - yargs-parser "^20.2.4" + uuid "^9.0.0" + workspace-tools "^0.27.0" + yargs-parser "^21.0.0" beeper@^1.0.0: version "1.1.1" @@ -13890,7 +13887,7 @@ fs-exists-sync@^0.1.0: resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" integrity sha1-mC1ok6+RjnLQjeyehnP/K1qNat0= -fs-extra@8.1.0, fs-extra@^8.0.0, fs-extra@^8.0.1, fs-extra@^8.1.0: +fs-extra@8.1.0, fs-extra@^8.0.0, fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== @@ -15600,11 +15597,6 @@ https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" -human-id@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/human-id/-/human-id-2.0.1.tgz#71aadd0f46d577fd982358133cfd43f2a46f1477" - integrity sha512-XWoYbGsEfBB0mtUHiyihsefgf+s1tNQHj7sX1kgDxUM0IEKk8rcZIPTwUpqDdFIQbkViOLejbc0t8jBzz5jL3w== - human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -18273,7 +18265,7 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -kleur@^3.0.2, kleur@^3.0.3: +kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== @@ -22279,13 +22271,13 @@ prompts@^2.0.1, prompts@^2.3.0, prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prompts@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.1.0.tgz#bf90bc71f6065d255ea2bdc0fe6520485c1b45db" - integrity sha512-+x5TozgqYdOwWsQFZizE/Tra3fKvAoy037kOyU6cgz84n8f6zxngLOV4O32kTwt9FcLCxAqw0P/c8rOr9y+Gfg== +prompts@^2.1.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: - kleur "^3.0.2" - sisteransi "^1.0.0" + kleur "^3.0.3" + sisteransi "^1.0.5" promzard@^0.3.0: version "0.3.0" @@ -24683,7 +24675,7 @@ sirv@^1.0.7: mime "^2.3.1" totalist "^1.0.0" -sisteransi@^1.0.0, sisteransi@^1.0.5: +sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== @@ -27310,11 +27302,16 @@ uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2, uuid@^3.4.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.1.0, uuid@^8.3.0, uuid@^8.3.1, uuid@^8.3.2: +uuid@^8.1.0, uuid@^8.3.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" @@ -28085,7 +28082,7 @@ worker-rpc@^0.1.0: dependencies: microevent.ts "~0.1.1" -workspace-tools@0.18.4, workspace-tools@^0.16.2, workspace-tools@^0.18.2, workspace-tools@^0.23.0: +workspace-tools@0.18.4, workspace-tools@^0.16.2, workspace-tools@^0.18.2, workspace-tools@^0.23.0, workspace-tools@^0.27.0: version "0.18.4" resolved "https://registry.yarnpkg.com/workspace-tools/-/workspace-tools-0.18.4.tgz#a59ca6dc864d07aafc06a9ff4a9ff093456b8765" integrity sha512-ZdhlB4NEC3uJ4eW7snyHKOfzMC00HXWO2QbIU3aY8XBdtE+VrU2ajv+oxDUIZfCLD4Wlk3ltWaPt4Jk6IC9bMA== @@ -28339,7 +28336,7 @@ yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3, yargs-parser@^20.2.4: +yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==