File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,13 @@ async function publish() {
9999 'Updating 2nd-gen version.ts from 1st-gen'
100100 ) ;
101101
102+ // Step 3.5: Refresh lockfile and rebuild after version changes
103+ run (
104+ 'yarn install --refresh-lockfile' ,
105+ 'Refreshing lockfile with new versions'
106+ ) ;
107+ run ( 'yarn build' , 'Rebuilding packages with new versions' ) ;
108+
102109 // Step 4: Publish to npm
103110 run (
104111 `yarn changeset publish --no-git-tag --tag ${ args . tag } ` ,
Original file line number Diff line number Diff line change @@ -90,12 +90,14 @@ module.exports = defineConfig({
9090 const semverSort = ( a , b ) => {
9191 // Push latest & * to the bottom because we want to use the highest *specified* version
9292 if ( [ 'latest' , '*' ] . includes ( a ) ) {
93- return 0 ;
93+ return 1 ;
9494 }
9595 if ( [ 'latest' , '*' ] . includes ( b ) ) {
96- return 1 ;
96+ return - 1 ;
9797 }
98- return semver . gt ( semver . coerce ( a ) , semver . coerce ( b ) ) ;
98+ // Return proper sort comparator values: negative if b > a, 0 if equal, positive if a > b
99+ // This sorts in descending order (highest version first)
100+ return semver . compare ( semver . coerce ( b ) , semver . coerce ( a ) ) ;
99101 } ;
100102
101103 /**
You can’t perform that action at this time.
0 commit comments