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(Updaters, bumpFiles, packageFiles): Adds regex built-in updater. #457

Open
wants to merge 9 commits into
base: feat-bump-files
Choose a base branch
from

Conversation

jbottigliero
Copy link
Member

@jbottigliero jbottigliero commented Sep 28, 2019

  • Adds a built-in updater for regex
  • Allows passing of options to updaters (readVersion and writeVersion methods)

This updater was added based on feedback provided in #372

A few things to note... at the moment this code is only compatible with node >= 10 based on it's usage of named capture groups and positive lookahead regular expressions.

While it may be possible to implement this in some other way... In my opinion, these two features make for the most concise examples and reduced the required complexity of the updater code itself – with positive lookahead we can just call contents.replace(theProvidedRegExp, newVersion).

Joe Bottigliero and others added 8 commits August 24, 2019 07:33
Co-Authored-By: Sébastien Règne <regseb@users.noreply.github.com>
- Ensure `packageFile` parsing supports custo updaters.
- Abstracts the updater resolution code for bumpFiles and packageFiles
- Adds a built-in updater for `regex`
- Allows passing of `options` to updaters (`readVersion` and `writeVersion` methods)
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 98.954% when pulling fa724aa on feat-regex-updater into 57ce557 on feat-bump-files.

@jbottigliero
Copy link
Member Author

The test failure here is expected based on Travis configured to run in Node@8...

@kekel87
Copy link

kekel87 commented Feb 16, 2021

Any update of this ?

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