pnpm/fetching/fetcher-base
await-ovo 77c754b10a
chore: eslint issues (#6123)
2023-02-23 12:12:32 +02:00
..
src refactor: group projects in different subdirectories (#5659) 2022-11-20 01:35:22 +02:00
CHANGELOG.md chore(release): 7.27.0 2023-02-08 14:27:15 +02:00
README.md refactor: group projects in different subdirectories (#5659) 2022-11-20 01:35:22 +02:00
package.json chore: eslint issues (#6123) 2023-02-23 12:12:32 +02:00
tsconfig.json fix: remove `suppressImplicitAnyIndexErrors` from typescript settings (#5991) 2023-01-28 18:19:26 +02:00
tsconfig.lint.json refactor: put all non-public projects to directories that start with __ 2022-11-20 02:40:44 +02:00

README.md

@pnpm/fetcher-base

Types for pnpm-compatible fetchers

npm version

Installation

pnpm add @pnpm/fetcher-base

Usage

Here's a template for a fetcher using types from @pnpm/fetcher-base:

import { Resolution } from '@pnpm/resolver-base'
import {
  FetchOptions,
  FetchResult,
} from '@pnpm/fetcher-base'

export async function demoFetcher (
  resolution: Resolution,
  targetFolder: string,
  opts: FetchOptions,
): Promise<FetchResult> {
  // ...
  return {
    filesIndex,
    tempLocation,
  }
}

License

MIT