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

fix: Fixed compatibility with SlikSVN #397

Merged
merged 1 commit into from
Oct 26, 2018
Merged

fix: Fixed compatibility with SlikSVN #397

merged 1 commit into from
Oct 26, 2018

Conversation

edgardmessias
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 25, 2018

Codecov Report

Merging #397 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
+ Coverage   61.94%   61.95%   +0.01%     
==========================================
  Files         170      170              
  Lines        7182     7184       +2     
  Branches     1359     1359              
==========================================
+ Hits         4449     4451       +2     
  Misses       2729     2729              
  Partials        4        4
Impacted Files Coverage Δ
src/svnFinder.ts 85.71% <100%> (+0.23%) ⬆️
out/svnFinder.js 60.31% <0%> (+0.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7e8adf...a71ac49. Read the comment docs.

@@ -112,9 +112,11 @@ export class SvnFinder {

public checkSvnVersion(svn: ISvn): Promise<ISvn> {
return new Promise<ISvn>((c, e) => {
if (!semver.valid(svn.version)) {
// fix compatibility with SlickSVN (like 1.6.17-SlikSvn-tag-1.6.17@1130898-X64)
const version = svn.version.replace(/^(\d+\.\d+\.\d+).*/, "$1");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the .* needed for? ^(\d+\.\d+\.\d+) gets the version alone

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fast version instead of match or exec

Copy link
Owner

@JohnstonCode JohnstonCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

@edgardmessias
Copy link
Contributor Author

I use replace for single code:
With exec:

...
let version = svn.version;
const match = /^(\d+\.\d+\.\d+)/.exec(svn.version);
if (match && match[0]) {
    version = match[0]
}
...

@JohnstonCode JohnstonCode merged commit 21b4f6d into master Oct 26, 2018
@JohnstonCode JohnstonCode deleted the fix_sliksvn branch October 26, 2018 13:41
JohnstonCode added a commit that referenced this pull request Oct 26, 2018
## [1.44.4](v1.44.3...v1.44.4) (2018-10-26)

### Bug Fixes

* Fixed compatibility with SlikSVN ([#397](#397)) ([21b4f6d](21b4f6d))
@JohnstonCode
Copy link
Owner

🎉 This PR is included in version 1.44.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants