Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
bc652673
Commit
bc652673
authored
6 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix: properly handle null rollback
parent
c2c50222
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/workers/repository/process/lookup/index.js
+10
-1
10 additions, 1 deletion
lib/workers/repository/process/lookup/index.js
lib/workers/repository/process/lookup/rollback.js
+2
-2
2 additions, 2 deletions
lib/workers/repository/process/lookup/rollback.js
with
12 additions
and
3 deletions
lib/workers/repository/process/lookup/index.js
+
10
−
1
View file @
bc652673
...
...
@@ -77,7 +77,16 @@ async function lookupUpdates(config) {
);
const
updates
=
[];
if
(
!
allSatisfyingVersions
.
length
)
{
updates
.
push
(
getRollbackUpdate
(
config
,
allVersions
));
const
rollback
=
getRollbackUpdate
(
config
,
allVersions
);
if
(
!
rollback
)
{
return
[
{
type
:
'
warning
'
,
message
:
`Can't find version matching
${
currentValue
}
for
${
depName
}
`
,
},
];
}
updates
.
push
(
rollback
);
}
const
rangeStrategy
=
getRangeStrategy
(
config
);
const
fromVersion
=
getFromVersion
(
config
,
rangeStrategy
,
allVersions
);
...
...
This diff is collapsed.
Click to expand it.
lib/workers/repository/process/lookup/rollback.js
+
2
−
2
View file @
bc652673
...
...
@@ -15,7 +15,7 @@ function getRollbackUpdate(config, versions) {
{
versionScheme
},
'
Current version scheme does not support isLessThanRange()
'
);
return
[]
;
return
null
;
}
const
lessThanVersions
=
versions
.
filter
(
version
=>
isLessThanRange
(
version
,
currentValue
)
...
...
@@ -26,7 +26,7 @@ function getRollbackUpdate(config, versions) {
{
packageFile
,
depName
,
currentValue
},
'
Missing version has nothing to roll back to
'
);
return
[]
;
return
null
;
}
logger
.
info
(
{
packageFile
,
depName
,
currentValue
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment