File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,15 @@ declare module 'npm-pick-manifest' {
23
23
) : import ( '../utilities/package-metadata' ) . PackageManifest ;
24
24
export = pickManifest ;
25
25
}
26
+
27
+ declare module 'pacote' {
28
+ export function manifest (
29
+ specifier : string ,
30
+ options : Record < string , unknown > ,
31
+ ) : Promise < { name : string ; version : string } > ;
32
+
33
+ export function packument (
34
+ specifier : string ,
35
+ options : Record < string , unknown > ,
36
+ ) : Promise < import ( '../utilities/package-metadata' ) . NpmRepositoryPackageJson > ;
37
+ }
Original file line number Diff line number Diff line change @@ -11,11 +11,10 @@ import * as lockfile from '@yarnpkg/lockfile';
11
11
import { existsSync , readFileSync } from 'fs' ;
12
12
import * as ini from 'ini' ;
13
13
import { homedir } from 'os' ;
14
+ import * as pacote from 'pacote' ;
14
15
import * as path from 'path' ;
15
16
import { JsonSchemaForNpmPackageJsonFiles } from './package-json' ;
16
17
17
- const pacote = require ( 'pacote' ) ;
18
-
19
18
const npmPackageJsonCache = new Map < string , Promise < Partial < NpmRepositoryPackageJson > > > ( ) ;
20
19
21
20
export interface NpmRepositoryPackageJson {
You can’t perform that action at this time.
0 commit comments