Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(conventional-recommended-bump)!: new Bumper exported class #1218

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

dangreen
Copy link
Member

BREAKING CHANGES: old exported function was removed, please read docs how to use new Bumper exported class.

BREAKING CHANGES: old exported function was removed, please read docs how to use new `Bumper` exported class.
@coveralls
Copy link

Coverage Status

coverage: 91.878% (+0.2%) from 91.66%
when pulling 25465d1 on feat-crb-new-bumper
into 53254b3 on master.

@ghiscoding
Copy link

@dangreen it's nice to see so many conventional-changelog changes recently but it's hard to follow especially since there's no migration info like this package. I'm trying to apply the changes to Lerna-Lite (a lighter version of Lerna) but from I see, it looks like all the options used by Lerna like lernaPackage, path, tagPrefix are now only accessible from the CLI? That's not possible in the case of Lerna/Lerna-Lite since it must be executed dynamically by code and preset can also be dynamic in Lerna so CLI is not an option. All that to say that I'm confused with the migration even after taking a look at the content of this PR

This is part of what Lerna's code looks like

  const options: conventionalRecommendedBump.Options = {
    path: pkg.location,
  };

  if (type === 'independent') {
    options.lernaPackage = pkg.name;
  } else {
    // only fixed mode can have a custom tag prefix
    options.tagPrefix = tagPrefix;
  }

const data = await conventionalRecommendedBump(options);
let releaseType = data.releaseType || 'patch';
const newVer = semver.inc(pkg.version, prereleaseType, prereleaseId), buildMetadata)

all I seem to get is this piece of code and I don't understand where to put the options

const bumper = new Bumper(pkg.location);
const recommendation = await bumper.bump();

@dangreen
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants