@@ -37,6 +37,7 @@ async function main(): Promise<void> {
3737
3838 await Promise . all ( manifests . packageJson . map ( file => updatePackageJson ( file , version ) ) ) ;
3939 await Promise . all ( manifests . cargoToml . map ( file => updateCargoToml ( file , version ) ) ) ;
40+ await updateReadmeVersions ( version ) ;
4041
4142 const publishableTypeScriptPackages = await getPublishableTypeScriptPackages ( manifests . packageJson ) ;
4243 const publishableRustPackages = await getPublishableRustPackages ( manifests . cargoToml ) ;
@@ -142,6 +143,13 @@ async function updateCargoToml(filePath: string, version: string): Promise<void>
142143 }
143144 }
144145
146+ // Update workspace dependency versions (e.g., vbare-gen = { path = "../vbare-gen", version = "0.0.1" })
147+ const depMatch = line . match ( / ^ ( \s * [ A - Z a - z 0 - 9 _ - ] + \s * = \s * { [ ^ } ] * p a t h \s * = \s * " [ ^ " ] + " , \s * v e r s i o n \s * = \s * " ) ( [ ^ " ] * ) ( " .* } ) $ / ) ;
148+ if ( depMatch ) {
149+ updated = true ;
150+ return `${ depMatch [ 1 ] } ${ version } ${ depMatch [ 3 ] } ` ;
151+ }
152+
145153 return line ;
146154 } ) ;
147155
@@ -159,6 +167,30 @@ async function updateCargoToml(filePath: string, version: string): Promise<void>
159167 console . log ( `Updated ${ relative ( filePath ) } to ${ version } ` ) ;
160168}
161169
170+ async function updateReadmeVersions ( version : string ) : Promise < void > {
171+ const readmePaths = [
172+ path . join ( repoRoot , 'rust' , 'README.md' ) ,
173+ path . join ( repoRoot , 'typescript' , 'README.md' )
174+ ] ;
175+
176+ for ( const readmePath of readmePaths ) {
177+ try {
178+ const raw = await fs . readFile ( readmePath , 'utf8' ) ;
179+ const newline = raw . includes ( '\r\n' ) ? '\r\n' : '\n' ;
180+
181+ // Replace "FILL ME IN" with the actual version
182+ const updated = raw . replace ( / [ " ' ] F I L L M E I N [ " ' ] / g, `"${ version } "` ) ;
183+
184+ if ( updated !== raw ) {
185+ await fs . writeFile ( readmePath , updated , 'utf8' ) ;
186+ console . log ( `Updated ${ relative ( readmePath ) } versions to ${ version } ` ) ;
187+ }
188+ } catch ( error ) {
189+ console . warn ( `Skipping ${ relative ( readmePath ) } (file not found or error reading)` ) ;
190+ }
191+ }
192+ }
193+
162194type PublishableTypeScriptPackage = {
163195 name : string ;
164196 directory : string ;
0 commit comments