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
e2d1eeb3
Commit
e2d1eeb3
authored
4 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix(npm): cache known publicly-scoped packages
parent
e7164136
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/datasource/npm/get.ts
+11
-1
11 additions, 1 deletion
lib/datasource/npm/get.ts
with
11 additions
and
1 deletion
lib/datasource/npm/get.ts
+
11
−
1
View file @
e2d1eeb3
...
@@ -207,7 +207,17 @@ export async function getDependency(
...
@@ -207,7 +207,17 @@ export async function getDependency(
const
cacheMinutes
=
process
.
env
.
RENOVATE_CACHE_NPM_MINUTES
const
cacheMinutes
=
process
.
env
.
RENOVATE_CACHE_NPM_MINUTES
?
parseInt
(
process
.
env
.
RENOVATE_CACHE_NPM_MINUTES
,
10
)
?
parseInt
(
process
.
env
.
RENOVATE_CACHE_NPM_MINUTES
,
10
)
:
5
;
:
5
;
if
(
!
packageName
.
startsWith
(
'
@
'
))
{
// TODO: use dynamic detection of public repos instead of a static list
const
whitelistedPublicScopes
=
[
'
@graphql-codegen
'
,
'
@storybook
'
,
'
@types
'
,
'
@typescript-eslint
'
,
];
if
(
whitelistedPublicScopes
.
includes
(
scope
)
||
!
packageName
.
startsWith
(
'
@
'
)
)
{
await
renovateCache
.
set
(
cacheNamespace
,
pkgUrl
,
dep
,
cacheMinutes
);
await
renovateCache
.
set
(
cacheNamespace
,
pkgUrl
,
dep
,
cacheMinutes
);
}
}
return
dep
;
return
dep
;
...
...
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