Description
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.
Relevant screenshots
grease output for @flex-development/log@2.0.0

Environment
- Node Version:
v16.6.0
- OS:
macOS v11.3.1
- Package Manager:
yarn@3.0.2
- Package version(s):
grease<=1.1.0
Possible solution
If possible, the notes lifecycle should tap into standard-version changelog lifecycle to use its options.dryRun output.
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>:
const Changelog: (
options?: IGreaseOptions,
newVersion?: NullishSemanticVersion
) => Promise<NullishString>
The notes lifecycle signature could also be updated:
const Notes: (
options?: IGreaseOptions,
changelog?: NullishString,
version?: NullishSemanticVersion
) => Promise<NullishString>
Additional context
Exception origin in notes lifecycle
// Search for package version in changelog content
if (!versions.includes(version)) {
const data = { errors: { version }, versions }
const message = `${version} not found in ${options.infile}`
throw new Exception(ExceptionStatusCode.NOT_FOUND, message, data)
}
Description
If a project version is being bumped after
v1.0.0,options.dryRun === true, and release notes are being generated from a projectCHANGELOG, thenoteslifecycle does not log the generated release notes.Instead, an
Exceptionis thrown because the new project version hasn't been written to theCHANGELOG, and therefore can not be found within theCHANGELOGcontent.Steps to reproduce
greasewithoptions.dryRun === truein a project versioned afterv1.0.0noteslifecycleExpected behavior
The
noteslifecycle should not require aversionargument ifoptions.dryRun === true.Relevant screenshots
greaseoutput for@flex-development/log@2.0.0Environment
v16.6.0macOS v11.3.1yarn@3.0.2grease<=1.1.0Possible solution
If possible, the
noteslifecycle should tap intostandard-versionchangeloglifecycle to use itsoptions.dryRunoutput.The
changeloglifecycle 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>, wherestringis the newCHANGELOGentry,Promise<void>:The
noteslifecycle signature could also be updated:Additional context
Exceptionorigin innoteslifecycle