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
a9a81275
Unverified
Commit
a9a81275
authored
2 years ago
by
RahulGautamSingh
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
refactor: runtime-config-narrowing (#15897)
* refactor/runtime-config-narrowing * remove test * apply fixes * reorder tests
parent
4b6fc851
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/config/types.ts
+2
-0
2 additions, 0 deletions
lib/config/types.ts
lib/workers/repository/extract/manager-files.ts
+16
-3
16 additions, 3 deletions
lib/workers/repository/extract/manager-files.ts
with
18 additions
and
3 deletions
lib/config/types.ts
+
2
−
0
View file @
a9a81275
...
@@ -228,6 +228,8 @@ export interface RenovateConfig
...
@@ -228,6 +228,8 @@ export interface RenovateConfig
fetchReleaseNotes
?:
boolean
;
fetchReleaseNotes
?:
boolean
;
secrets
?:
Record
<
string
,
string
>
;
secrets
?:
Record
<
string
,
string
>
;
aliases
?:
Record
<
string
,
any
>
;
skipInstalls
?:
boolean
;
}
}
export
interface
AllConfig
extends
RenovateConfig
,
GlobalOnlyConfig
{}
export
interface
AllConfig
extends
RenovateConfig
,
GlobalOnlyConfig
{}
...
...
This diff is collapsed.
Click to expand it.
lib/workers/repository/extract/manager-files.ts
+
16
−
3
View file @
a9a81275
...
@@ -6,13 +6,26 @@ import {
...
@@ -6,13 +6,26 @@ import {
extractPackageFile
,
extractPackageFile
,
get
,
get
,
}
from
'
../../../modules/manager
'
;
}
from
'
../../../modules/manager
'
;
import
type
{
PackageFile
}
from
'
../../../modules/manager/types
'
;
import
type
{
ExtractConfig
,
PackageFile
,
}
from
'
../../../modules/manager/types
'
;
import
{
readLocalFile
}
from
'
../../../util/fs
'
;
import
{
readLocalFile
}
from
'
../../../util/fs
'
;
function
getExtractConfig
(
config
:
WorkerExtractConfig
):
ExtractConfig
{
return
{
npmrc
:
config
.
npmrc
,
aliases
:
config
.
aliases
,
skipInstalls
:
config
.
skipInstalls
,
npmrcMerge
:
config
.
npmrcMerge
,
};
}
export
async
function
getManagerPackageFiles
(
export
async
function
getManagerPackageFiles
(
config
:
WorkerExtractConfig
config
:
WorkerExtractConfig
):
Promise
<
PackageFile
[]
>
{
):
Promise
<
PackageFile
[]
>
{
const
{
enabled
,
manager
,
fileList
}
=
config
;
const
{
enabled
,
manager
,
fileList
}
=
config
;
const
extractConfig
=
getExtractConfig
(
config
);
logger
.
trace
(
`getPackageFiles(
${
manager
}
)`
);
logger
.
trace
(
`getPackageFiles(
${
manager
}
)`
);
if
(
!
enabled
)
{
if
(
!
enabled
)
{
logger
.
debug
(
`
${
manager
}
is disabled`
);
logger
.
debug
(
`
${
manager
}
is disabled`
);
...
@@ -32,7 +45,7 @@ export async function getManagerPackageFiles(
...
@@ -32,7 +45,7 @@ export async function getManagerPackageFiles(
if
(
get
(
manager
,
'
extractAllPackageFiles
'
))
{
if
(
get
(
manager
,
'
extractAllPackageFiles
'
))
{
const
allPackageFiles
=
await
extractAllPackageFiles
(
const
allPackageFiles
=
await
extractAllPackageFiles
(
manager
,
manager
,
c
onfig
,
extractC
onfig
,
fileList
fileList
);
);
if
(
allPackageFiles
)
{
if
(
allPackageFiles
)
{
...
@@ -54,7 +67,7 @@ export async function getManagerPackageFiles(
...
@@ -54,7 +67,7 @@ export async function getManagerPackageFiles(
manager
,
manager
,
content
,
content
,
packageFile
,
packageFile
,
c
onfig
extractC
onfig
);
);
if
(
res
)
{
if
(
res
)
{
for
(
let
index
=
0
;
index
<
res
.
deps
.
length
;
index
+=
1
)
{
for
(
let
index
=
0
;
index
<
res
.
deps
.
length
;
index
+=
1
)
{
...
...
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