@@ -89,11 +89,12 @@ function main() {
8989 const explicit = readChangesetEntries ( )
9090
9191 if ( explicit . size === 0 ) {
92- const msg = 'No changeset entries found — nothing to preview.\n'
92+ const msg =
93+ 'No changeset entries found. Merging this PR will not cause a version bump for any packages.\n'
94+ process . stdout . write ( msg )
9395 if ( values . output ) {
9496 writeFileSync ( values . output , msg )
95- } else {
96- process . stdout . write ( msg )
97+ process . stdout . write ( `Written to ${ values . output } \n` )
9798 }
9899 return
99100 }
@@ -138,12 +139,11 @@ function main() {
138139
139140 // 7. Build markdown
140141 const lines = [ ]
141- lines . push ( '<!-- changeset-version-preview -->' )
142- lines . push ( '## Changeset Version Preview' )
143- lines . push ( '' )
144142
145143 if ( bumps . length === 0 ) {
146- lines . push ( 'No version changes detected.' )
144+ lines . push (
145+ 'No version changes detected. Merging this PR will not cause a version bump for any packages.' ,
146+ )
147147 } else {
148148 const explicitBumps = bumps . filter ( ( b ) => b . source !== 'dependency' )
149149 const dependencyBumps = bumps . filter ( ( b ) => b . source === 'dependency' )
@@ -184,13 +184,12 @@ function main() {
184184 }
185185
186186 lines . push ( '' )
187-
188187 const md = lines . join ( '\n' )
188+
189+ process . stdout . write ( md )
189190 if ( values . output ) {
190191 writeFileSync ( values . output , md )
191192 process . stdout . write ( `Written to ${ values . output } \n` )
192- } else {
193- process . stdout . write ( md )
194193 }
195194}
196195
0 commit comments