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
jbottigliero
wants to merge
9
commits into
feat-bump-files
Choose a base branch
from
feat-regex-updater
base: feat-bump-files
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)
The test failure here is expected based on Travis configured to run in Node@8... |
…of 'replace' RegExps
jbottigliero
force-pushed
the
feat-bump-files
branch
from
December 5, 2019 01:06
57ce557
to
3be2404
Compare
Any update of this ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
regex
options
to updaters (readVersion
andwriteVersion
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)
.