From 58feaf8eac311a3723e5f23a85ebca90b37cf426 Mon Sep 17 00:00:00 2001 From: David Sheldrick Date: Thu, 29 Feb 2024 17:12:40 +0000 Subject: [PATCH] fix setAllVersions (#3009) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit follow up to #3008 ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [x] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. --- scripts/lib/publishing.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/scripts/lib/publishing.ts b/scripts/lib/publishing.ts index c5944094b..b58df39d0 100644 --- a/scripts/lib/publishing.ts +++ b/scripts/lib/publishing.ts @@ -55,19 +55,10 @@ export async function setAllVersions(version: string) { path.join(packageDetails.dir, 'package.json'), JSON.stringify(manifest, null, '\t') + '\n' ) - if (manifest.name === '@tldraw/editor') { - const versionFileContents = `export const version = '${version}'\n` - writeFileSync(path.join(packageDetails.dir, 'src', 'version.ts'), versionFileContents) - } - if (manifest.name === 'tldraw') { - const versionFileContents = `export const version = '${version}'\n` - writeFileSync( - path.join(packageDetails.dir, 'src', 'lib', 'ui', 'version.ts'), - versionFileContents - ) - } } + await exec('yarn', ['refresh-assets']) + const lernaJson = JSON.parse(readFileSync('lerna.json', 'utf8')) lernaJson.version = version writeFileSync('lerna.json', JSON.stringify(lernaJson, null, '\t') + '\n')