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

Update the config.js library file to look for release-it.cjs #751

Merged
merged 2 commits into from
Apr 9, 2021

Conversation

sirbeagle
Copy link
Contributor

Hi there. This is a super-simple pull request that adds to the config.js library file to look for release-it.cjs in addition to release-it.js as a possible configuration file.

In our company we use release-it to help automate versioning and packaging a bunch of different repositories. Most of the repos use the same release configuration, and as part of a general consolidation effort we'd like to look at a single configuration with the ability to override it if necessary.

We trying out a new mechanism where we are storing the release-it configuration in a .js file and putting in a little bit of logic to make overrides dead simple.

A typical configuration file in one of the repos might look something like this:

const releaseItConfig = require('@buildinglink/js-build-tools/release-it-base-configuration')

const releaseItOverrides = {
  // uncomment the next line to prevent any automatic updates to imported packages
  lockPackageVersions: true
}

module.exports = releaseItConfig(releaseItOverrides)

Neat! Our only problem? Most of our repos are set up as modules, so in order to keep with using CommonJS for release-it configurations we have to use .cjs as the file extension. Hence this PR. ;-) The cosmiconfig package that the config.js file is using seems to follow a similar approach.

Thank you for your consideration, and thank you for all of the hard work you've put into release-it! We love it!

…ion to the already existing release-it.js option; Update the docs to match;
README.md Outdated Show resolved Hide resolved
@sirbeagle sirbeagle requested a review from webpro April 7, 2021 13:36
@webpro webpro merged commit e5cfa9c into release-it:master Apr 9, 2021
@webpro
Copy link
Collaborator

webpro commented Apr 9, 2021

Thanks @sirbeagle, it's now in v14.6.0.

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

Successfully merging this pull request may close these issues.

None yet

2 participants