perf: don't request the full metadata

ref #2632
PR #2633
This commit is contained in:
Zoltan Kochan
2020-06-15 23:00:20 +03:00
committed by GitHub
parent e1ca9fc13d
commit 6808c43faf
4 changed files with 12 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/outdated": minor
---
Don't request the full metadata just for getting the list of dist-tags.

View File

@@ -0,0 +1,5 @@
---
"@pnpm/plugin-commands-publishing": minor
---
Don't request the full metadata just for getting the list of published versions.

View File

@@ -15,7 +15,7 @@ export function createManifestGetter (
opts: ManifestGetterOptions
): (packageName: string, pref: string) => Promise<DependencyManifest | null> {
const resolve = createResolver(Object.assign(opts, {
fullMetadata: true,
fullMetadata: false,
metaCache: new LRU({
max: 10000,
maxAge: 120 * 1000, // 2 minutes

View File

@@ -51,7 +51,7 @@ export default async function (
const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package)
const storeDir = await storePath(opts.workspaceDir, opts.storeDir)
const resolve = createResolver(Object.assign(opts, {
fullMetadata: true,
fullMetadata: false,
metaCache: new LRU({
max: 10000,
maxAge: 120 * 1000, // 2 minutes