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
87dc1d0f
Commit
87dc1d0f
authored
3 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix: check for matchResult
parent
3cdfd7a2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/manager/npm/update/locked-dependency/yarn-lock/replace.ts
+9
-0
9 additions, 0 deletions
...manager/npm/update/locked-dependency/yarn-lock/replace.ts
with
9 additions
and
0 deletions
lib/manager/npm/update/locked-dependency/yarn-lock/replace.ts
+
9
−
0
View file @
87dc1d0f
import
{
logger
}
from
'
../../../../../logger
'
;
import
{
regEx
}
from
'
../../../../../util/regex
'
;
export
function
replaceConstraintVersion
(
...
...
@@ -16,6 +17,14 @@ export function replaceConstraintVersion(
const
matchString
=
`(
${
escaped
}
((",|,)[^\n:]+)?:\n)(.*\n)*?(
\\
s+dependencies|\n[@a-z])`
;
// yarn will fill in the details later
const
matchResult
=
regEx
(
matchString
).
exec
(
lockFileContent
);
// istanbul ignore if
if
(
!
matchResult
)
{
logger
.
debug
(
{
depName
,
constraint
,
newVersion
},
'
Could not find constraint in lock file
'
);
return
lockFileContent
;
}
let
constraintLine
=
matchResult
[
1
];
if
(
newConstraint
)
{
const
newDepNameConstraint
=
`
${
depName
}
@
${
newConstraint
}
`
;
...
...
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