diff --git a/scripts/components/release_lifecycle_manager.test.ts b/scripts/components/release_lifecycle_manager.test.ts index b2418649e4..a845a34e1d 100644 --- a/scripts/components/release_lifecycle_manager.test.ts +++ b/scripts/components/release_lifecycle_manager.test.ts @@ -48,8 +48,11 @@ void describe('ReleaseLifecycleManager', async () => { const runPublishInTestDir = () => runPublish({ useLocalRegistry: true }, testWorkingDir); - const packageABaseName = `${testNameNormalized}-packageA-${shortId}`; - const packageBBaseName = `${testNameNormalized}-packageB-${shortId}`; + // converting to lowercase because npm init creates packages with all lowercase + const packageABaseName = + `${testNameNormalized}-package-a-${shortId}`.toLocaleLowerCase(); + const packageBBaseName = + `${testNameNormalized}-package-b-${shortId}`.toLocaleLowerCase(); await gitClient.init(); await npmClient.init(); @@ -69,7 +72,6 @@ void describe('ReleaseLifecycleManager', async () => { await $`npx changeset init`; await gitClient.commitAllChanges('initial commit'); await runPublishInTestDir(); - await runPublishInTestDir(); await commitVersionBumpChangeset( testWorkingDir, diff --git a/scripts/version_runner.ts b/scripts/version_runner.ts index 8ca98ef23a..21b405967a 100644 --- a/scripts/version_runner.ts +++ b/scripts/version_runner.ts @@ -12,10 +12,16 @@ export const runVersion = async ( // taking inspiration from https://github.com/changesets/changesets/pull/1045/files // we fetch all refs so that changesets doesn't go into the shallow clone codepath - await execa('git', ['fetch', '--unshallow', '--no-tags'], { - stdio: 'inherit', - cwd, - }); + try { + await execa('git', ['fetch', '--unshallow', '--no-tags'], { + stdio: 'inherit', + cwd, + }); + } catch (err) { + console.log( + 'git fetch --unshallow failed. This likely means we already have an un-shallow repo' + ); + } const args = ['version', ...additionalArgs]; await execa('changeset', args, {