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
2b49c3fd
Commit
2b49c3fd
authored
3 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix(npm): allow for undefined lock packages
parent
e2edb344
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/manager/npm/post-update/npm.ts
+2
-2
2 additions, 2 deletions
lib/manager/npm/post-update/npm.ts
with
2 additions
and
2 deletions
lib/manager/npm/post-update/npm.ts
+
2
−
2
View file @
2b49c3fd
...
@@ -129,8 +129,8 @@ export async function generateLockFile(
...
@@ -129,8 +129,8 @@ export async function generateLockFile(
// massage lock file for npm 7+
// massage lock file for npm 7+
try
{
try
{
const
lockFileParsed
=
JSON
.
parse
(
await
readFile
(
lockFileName
,
'
utf8
'
));
const
lockFileParsed
=
JSON
.
parse
(
await
readFile
(
lockFileName
,
'
utf8
'
));
const
packageNames
=
Object
.
keys
(
lockFileParsed
.
packages
)
;
if
(
is
.
plain
Object
(
lockFileParsed
.
packages
)
)
{
if
(
is
.
nonEmptyArray
(
packageNames
))
{
const
packageNames
=
Object
.
keys
(
lockFileParsed
.
packages
);
let
lockFileMassaged
=
false
;
let
lockFileMassaged
=
false
;
for
(
const
{
depName
}
of
upgrades
)
{
for
(
const
{
depName
}
of
upgrades
)
{
for
(
const
packageName
of
packageNames
)
{
for
(
const
packageName
of
packageNames
)
{
...
...
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