You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a project version is being bumped after v1.0.0, options.dryRun === true, and release notes are being generated from a project CHANGELOG, the notes lifecycle does not log the generated release notes.
Instead, an Exception is thrown because the new project version hasn't been written to the CHANGELOG, and therefore can not be found within the CHANGELOG content.
Steps to reproduce
Run grease with options.dryRun === true in a project versioned after v1.0.0
See error during notes lifecycle
Expected behavior
The notes lifecycle should not require a version argument if options.dryRun === true.
The changelog lifecycle could also be re-implemented in grease, but it may be difficult to keep track of future updates to standard-version. If it is re-implemented, however, the lifecycle signature could be updated and the return type could be changed to Promise<string>, where string is the new CHANGELOG entry, Promise<void>:
// Search for package version in changelog contentif(!versions.includes(version)){constdata={errors: { version }, versions }constmessage=`${version} not found in ${options.infile}`thrownewException(ExceptionStatusCode.NOT_FOUND,message,data)}
The text was updated successfully, but these errors were encountered:
unicornware
changed the title
🐛 Can't find bumped package version in CHANGELOG during dry runs
🐛 Can't find package version in CHANGELOG during dry runs
Sep 16, 2021
Description
If a project version is being bumped after
v1.0.0
,options.dryRun === true
, and release notes are being generated from a projectCHANGELOG
, thenotes
lifecycle does not log the generated release notes.Instead, an
Exception
is thrown because the new project version hasn't been written to theCHANGELOG
, and therefore can not be found within theCHANGELOG
content.Steps to reproduce
grease
withoptions.dryRun === true
in a project versioned afterv1.0.0
notes
lifecycleExpected behavior
The
notes
lifecycle should not require aversion
argument ifoptions.dryRun === true
.Relevant screenshots
grease
output for@flex-development/[email protected]
Environment
v16.6.0
macOS v11.3.1
[email protected]
grease<=1.1.0
Possible solution
If possible, the
notes
lifecycle should tap intostandard-version
changelog
lifecycle to use itsoptions.dryRun
output.The
changelog
lifecycle could also be re-implemented ingrease
, but it may be difficult to keep track of future updates tostandard-version
. If it is re-implemented, however, the lifecycle signature could be updated and the return type could be changed toPromise<string>
, wherestring
is the newCHANGELOG
entry,Promise<void>
:The
notes
lifecycle signature could also be updated:Additional context
Exception
origin innotes
lifecycleThe text was updated successfully, but these errors were encountered: