yarn.d.ts
1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { GetVersion, Index, Options, SpawnOptions, YarnOptions } from '../types';
export interface NpmScope {
npmAlwaysAuth?: boolean;
npmAuthToken?: string;
npmRegistryServer?: string;
}
/** Reads an auth token from a yarn config, interpolates it, and sets it on the npm config. */
export declare const setNpmAuthToken: (npmConfig: Index<string | boolean>, [dep, scopedConfig]: [string, NpmScope]) => void;
/**
* Spawn yarn requires a different command on Windows.
*
* @param args
* @param [yarnOptions={}]
* @param [spawnOptions={}]
* @returns
*/
declare function spawnYarn(args: string | string[], yarnOptions?: YarnOptions, spawnOptions?: SpawnOptions): Promise<string>;
/**
* Get platform-specific default prefix to pass on to yarn.
*
* @param options
* @param [options.global]
* @param [options.prefix]
* @returns
*/
export declare function defaultPrefix(options: Options): Promise<any>;
/**
* @param [options]
* @param [options.cwd]
* @param [options.global]
* @param [options.prefix]
* @returns
*/
export declare const list: (options?: Options, spawnOptions?: SpawnOptions) => Promise<Index<R>>;
/**
* @param packageName
* @param currentVersion
* @param options
* @returns
*/
export declare const latest: GetVersion;
/**
* @param packageName
* @param currentVersion
* @param options
* @returns
*/
export declare const newest: GetVersion;
/**
* @param packageName
* @param currentVersion
* @param options
* @returns
*/
export declare const greatest: GetVersion;
/**
* @param packageName
* @param currentVersion
* @param options
* @returns
*/
export declare const minor: GetVersion;
/**
* @param packageName
* @param currentVersion
* @param options
* @returns
*/
export declare const patch: GetVersion;
export default spawnYarn;