Skip to content

prebump hook uses the wrong version #1116

@ecraig12345

Description

@ecraig12345

In performBump, the versions in packageInfos have already been bumped, including when the prebump hook is called:

await callHook(options.hooks?.prebump, modifiedPackages, packageInfos, options.concurrency);

This contradicts the docs for prebump's version param (though this may be why the full packageInfos param was omitted):

* @param name The name of the package as defined in package.json
* @param version The pre-bump version of the package to be published
*/
prebump?: (packagePath: string, name: string, version: string) => void | Promise<void>;

This behavior is definitely wrong but could be a little risky to fix outside a major version, since people may be assuming the incorrect behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv3?Consider for v3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions