From d5fff35b0643c226444977697c3cf2fc8b5ad5e4 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sat, 21 Apr 2018 23:07:45 +0300 Subject: [PATCH] fix: the created fetcher should have type {tarball: FetchFunction} --- shrinkwrap.yaml | 3 ++- src/index.ts | 13 ++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/shrinkwrap.yaml b/shrinkwrap.yaml index 2ddc071211..f72e0f36ec 100644 --- a/shrinkwrap.yaml +++ b/shrinkwrap.yaml @@ -1,5 +1,6 @@ dependencies: '@pnpm/fetcher-base': 1.0.0 + '@pnpm/tarball-fetcher': 'link:../__package_previews__/tarball-fetcher/@pnpm/tarball-fetcher' '@types/mem': 1.1.2 '@types/mz': 0.0.32 '@types/node': 9.6.2 @@ -1876,7 +1877,7 @@ packages: resolution: integrity: sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= registry: 'https://registry.npmjs.org/' -shrinkwrapMinorVersion: 4 +shrinkwrapMinorVersion: 5 shrinkwrapVersion: 3 specifiers: '@pnpm/fetcher-base': ^1.0.0 diff --git a/src/index.ts b/src/index.ts index 281694c7fe..b7f600b745 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import logger from '@pnpm/logger' import { + FetchFunction, FetchOptions, FetchResult, } from '@pnpm/fetcher-base' @@ -35,17 +36,7 @@ export default function ( ignoreFile?: IgnoreFunction, offline?: boolean, }, -): { - tarball: ( - resolution: { - integrity?: string, - registry?: string, - tarball: string, - }, - target: string, - opts: FetchOptions, - ) => Promise<{}> -} { +): { tarball: FetchFunction } { const download = createDownloader({ alwaysAuth: opts.alwaysAuth || false, registry: opts.registry,