Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
applications
renovate
Commits
07affef4
Commit
07affef4
authored
4 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix(npm): run full install if npm: refs found
Closes #9654
parent
e4db9e59
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/manager/npm/extract/__snapshots__/index.spec.ts.snap
+1
-1
1 addition, 1 deletion
lib/manager/npm/extract/__snapshots__/index.spec.ts.snap
lib/manager/npm/extract/index.ts
+6
-5
6 additions, 5 deletions
lib/manager/npm/extract/index.ts
with
7 additions
and
6 deletions
lib/manager/npm/extract/__snapshots__/index.spec.ts.snap
+
1
−
1
View file @
07affef4
...
...
@@ -361,7 +361,7 @@ Object {
"packageJsonName": undefined,
"packageJsonType": "app",
"pnpmShrinkwrap": undefined,
"skipInstalls":
tru
e,
"skipInstalls":
fals
e,
"yarnLock": undefined,
"yarnWorkspacesPackages": undefined,
"yarnrc": undefined,
...
...
This diff is collapsed.
Click to expand it.
lib/manager/npm/extract/index.ts
+
6
−
5
View file @
07affef4
...
...
@@ -126,7 +126,7 @@ export async function extractPackageFile(
let
lernaJsonFile
:
string
;
let
lernaPackages
:
string
[];
let
lernaClient
:
'
yarn
'
|
'
npm
'
;
let
hasF
ile
Refs
=
false
;
let
hasF
ancy
Refs
=
false
;
let
lernaJson
:
{
packages
:
string
[];
npmClient
:
string
;
...
...
@@ -224,6 +224,7 @@ export async function extractPackageFile(
if
(
dep
.
currentValue
.
startsWith
(
'
npm:
'
))
{
dep
.
npmPackageAlias
=
true
;
hasFancyRefs
=
true
;
const
valSplit
=
dep
.
currentValue
.
replace
(
'
npm:
'
,
''
).
split
(
'
@
'
);
if
(
valSplit
.
length
===
2
)
{
dep
.
lookupName
=
valSplit
[
0
];
...
...
@@ -237,7 +238,7 @@ export async function extractPackageFile(
}
if
(
dep
.
currentValue
.
startsWith
(
'
file:
'
))
{
dep
.
skipReason
=
SkipReason
.
File
;
hasF
ile
Refs
=
true
;
hasF
ancy
Refs
=
true
;
return
dep
;
}
if
(
isValid
(
dep
.
currentValue
))
{
...
...
@@ -345,11 +346,11 @@ export async function extractPackageFile(
}
let
skipInstalls
=
config
.
skipInstalls
;
if
(
skipInstalls
===
null
)
{
if
(
hasF
ile
Refs
)
{
if
(
hasF
ancy
Refs
)
{
// https://github.com/npm/cli/issues/1432
// Explanation:
// - npm install --package-lock-only is buggy for transitive deps in file: references
// - So we set skipInstalls to false if file: refs are found *and* the user hasn't explicitly set the value already
// - npm install --package-lock-only is buggy for transitive deps in file:
and npm:
references
// - So we set skipInstalls to false if file:
or npm:
refs are found *and* the user hasn't explicitly set the value already
logger
.
debug
(
'
Automatically setting skipInstalls to false
'
);
skipInstalls
=
false
;
}
else
{
...
...
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