Skip to content

Commit 3ca91de

Browse files
committed
update tooling
1 parent 2b4490e commit 3ca91de

File tree

3 files changed

+60
-71
lines changed

3 files changed

+60
-71
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"nyc": "^15.1.0",
2929
"prettier": "^2.1.2",
3030
"should": "^13.2.3",
31-
"tooling": "webpack/tooling#v1.6.0",
31+
"tooling": "webpack/tooling#v1.8.0",
3232
"typescript": "3.8.3"
3333
},
3434
"engines": {

types.d.ts

Lines changed: 56 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { AsyncSeriesBailHook, AsyncSeriesHook, SyncHook } from "tapable";
88

99
declare interface BaseResolveRequest {
1010
path: string | false;
11-
descriptionFilePath?: undefined | string;
12-
descriptionFileRoot?: undefined | string;
11+
descriptionFilePath?: string;
12+
descriptionFileRoot?: string;
1313
descriptionFileData?: any;
14-
relativePath?: undefined | string;
15-
ignoreSymlinks?: undefined | boolean;
16-
fullySpecified?: undefined | boolean;
14+
relativePath?: string;
15+
ignoreSymlinks?: boolean;
16+
fullySpecified?: boolean;
1717
}
1818
declare class CachedInputFileSystem {
1919
constructor(fileSystem?: any, duration?: any);
@@ -77,12 +77,10 @@ declare interface FileSystem {
7777
arg2: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]>
7878
): void;
7979
};
80-
readJson?:
81-
| undefined
82-
| {
83-
(arg0: string, arg1: FileSystemCallback<any>): void;
84-
(arg0: string, arg1: any, arg2: FileSystemCallback<any>): void;
85-
};
80+
readJson?: {
81+
(arg0: string, arg1: FileSystemCallback<any>): void;
82+
(arg0: string, arg1: any, arg2: FileSystemCallback<any>): void;
83+
};
8684
readlink: {
8785
(arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
8886
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
@@ -93,10 +91,7 @@ declare interface FileSystem {
9391
};
9492
}
9593
declare interface FileSystemCallback<T> {
96-
(
97-
err: undefined | null | (PossibleFileSystemError & Error),
98-
result?: undefined | T
99-
): any;
94+
(err?: null | (PossibleFileSystemError & Error), result?: T): any;
10095
}
10196
declare interface FileSystemDirent {
10297
name: string | Buffer;
@@ -125,48 +120,48 @@ declare interface PnpApiImpl {
125120
resolveToUnqualified: (arg0: string, arg1: string, arg2?: any) => string;
126121
}
127122
declare interface PossibleFileSystemError {
128-
code?: undefined | string;
129-
errno?: undefined | number;
130-
path?: undefined | string;
131-
syscall?: undefined | string;
123+
code?: string;
124+
errno?: number;
125+
path?: string;
126+
syscall?: string;
132127
}
133128

134129
/**
135130
* Resolve context
136131
*/
137132
declare interface ResolveContext {
138-
contextDependencies?: undefined | { add: (T?: any) => void };
133+
contextDependencies?: { add: (T?: any) => void };
139134

140135
/**
141136
* files that was found on file system
142137
*/
143-
fileDependencies?: undefined | { add: (T?: any) => void };
138+
fileDependencies?: { add: (T?: any) => void };
144139

145140
/**
146141
* dependencies that was not found on file system
147142
*/
148-
missingDependencies?: undefined | { add: (T?: any) => void };
143+
missingDependencies?: { add: (T?: any) => void };
149144

150145
/**
151146
* set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`,
152147
*/
153-
stack?: undefined | Set<string>;
148+
stack?: Set<string>;
154149

155150
/**
156151
* log function
157152
*/
158-
log?: undefined | ((arg0: string) => void);
153+
log?: (arg0: string) => void;
159154
}
160155
declare interface ResolveOptions {
161156
alias: {
162157
alias: string | false | string[];
163158
name: string;
164-
onlyModule?: undefined | boolean;
159+
onlyModule?: boolean;
165160
}[];
166161
fallback: {
167162
alias: string | false | string[];
168163
name: string;
169-
onlyModule?: undefined | boolean;
164+
onlyModule?: boolean;
170165
}[];
171166
aliasFields: Set<string | string[]>;
172167
cachePredicate: (
@@ -186,7 +181,7 @@ declare interface ResolveOptions {
186181
fileSystem: FileSystem;
187182
unsafeCache: any;
188183
symlinks: boolean;
189-
resolver?: undefined | Resolver;
184+
resolver?: Resolver;
190185
modules: (string | string[])[];
191186
mainFields: { name: string[]; forceRelative: boolean }[];
192187
mainFiles: Set<string>;
@@ -256,8 +251,8 @@ declare abstract class Resolver {
256251
resolveContext: ResolveContext,
257252
callback: (
258253
arg0: null | Error,
259-
arg1: undefined | string | false,
260-
arg2: undefined | (BaseResolveRequest & Partial<ParsedIdentifier>)
254+
arg1?: string | false,
255+
arg2?: BaseResolveRequest & Partial<ParsedIdentifier>
261256
) => void
262257
): void;
263258
doResolve(
@@ -279,72 +274,70 @@ declare interface UserResolveOptions {
279274
* A list of module alias configurations or an object which maps key to value
280275
*/
281276
alias?:
282-
| undefined
283277
| { [index: string]: string | false | string[] }
284278
| {
285279
alias: string | false | string[];
286280
name: string;
287-
onlyModule?: undefined | boolean;
281+
onlyModule?: boolean;
288282
}[];
289283

290284
/**
291285
* A list of module alias configurations or an object which maps key to value, applied only after modules option
292286
*/
293287
fallback?:
294-
| undefined
295288
| { [index: string]: string | false | string[] }
296289
| {
297290
alias: string | false | string[];
298291
name: string;
299-
onlyModule?: undefined | boolean;
292+
onlyModule?: boolean;
300293
}[];
301294

302295
/**
303296
* A list of alias fields in description files
304297
*/
305-
aliasFields?: undefined | (string | string[])[];
298+
aliasFields?: (string | string[])[];
306299

307300
/**
308301
* A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
309302
*/
310-
cachePredicate?:
311-
| undefined
312-
| ((arg0: BaseResolveRequest & Partial<ParsedIdentifier>) => boolean);
303+
cachePredicate?: (
304+
arg0: BaseResolveRequest & Partial<ParsedIdentifier>
305+
) => boolean;
313306

314307
/**
315308
* Whether or not the unsafeCache should include request context as part of the cache key.
316309
*/
317-
cacheWithContext?: undefined | boolean;
310+
cacheWithContext?: boolean;
318311

319312
/**
320313
* A list of description files to read from
321314
*/
322-
descriptionFiles?: undefined | string[];
315+
descriptionFiles?: string[];
323316

324317
/**
325318
* A list of exports field condition names.
326319
*/
327-
conditionNames?: undefined | string[];
320+
conditionNames?: string[];
328321

329322
/**
330323
* Enforce that a extension from extensions must be used
331324
*/
332-
enforceExtension?: undefined | boolean;
325+
enforceExtension?: boolean;
333326

334327
/**
335328
* A list of exports fields in description files
336329
*/
337-
exportsFields?: undefined | (string | string[])[];
330+
exportsFields?: (string | string[])[];
338331

339332
/**
340333
* A list of imports fields in description files
341334
*/
342-
importsFields?: undefined | (string | string[])[];
335+
importsFields?: (string | string[])[];
343336

344337
/**
345338
* A list of extensions which should be tried for files
346339
*/
347-
extensions?: undefined | string[];
340+
extensions?: string[];
348341

349342
/**
350343
* The file system which should be used
@@ -359,73 +352,69 @@ declare interface UserResolveOptions {
359352
/**
360353
* Resolve symlinks to their symlinked location
361354
*/
362-
symlinks?: undefined | boolean;
355+
symlinks?: boolean;
363356

364357
/**
365358
* A prepared Resolver to which the plugins are attached
366359
*/
367-
resolver?: undefined | Resolver;
360+
resolver?: Resolver;
368361

369362
/**
370363
* A list of directories to resolve modules from, can be absolute path or folder name
371364
*/
372-
modules?: undefined | string | string[];
365+
modules?: string | string[];
373366

374367
/**
375368
* A list of main fields in description files
376369
*/
377-
mainFields?:
378-
| undefined
379-
| (
380-
| string
381-
| string[]
382-
| { name: string | string[]; forceRelative: boolean }
383-
)[];
370+
mainFields?: (
371+
| string
372+
| string[]
373+
| { name: string | string[]; forceRelative: boolean }
374+
)[];
384375

385376
/**
386377
* A list of main files in directories
387378
*/
388-
mainFiles?: undefined | string[];
379+
mainFiles?: string[];
389380

390381
/**
391382
* A list of additional resolve plugins which should be applied
392383
*/
393-
plugins?:
394-
| undefined
395-
| (
396-
| { apply: (arg0: Resolver) => void }
397-
| ((this: Resolver, arg1: Resolver) => void)
398-
)[];
384+
plugins?: (
385+
| { apply: (arg0: Resolver) => void }
386+
| ((this: Resolver, arg1: Resolver) => void)
387+
)[];
399388

400389
/**
401390
* A PnP API that should be used - null is "never", undefined is "auto"
402391
*/
403-
pnpApi?: undefined | null | PnpApiImpl;
392+
pnpApi?: null | PnpApiImpl;
404393

405394
/**
406395
* A list of root paths
407396
*/
408-
roots?: undefined | string[];
397+
roots?: string[];
409398

410399
/**
411400
* The request is already fully specified and no extensions or directories are resolved for it
412401
*/
413-
fullySpecified?: undefined | boolean;
402+
fullySpecified?: boolean;
414403

415404
/**
416405
* Resolve to a context instead of a file
417406
*/
418-
resolveToContext?: undefined | boolean;
407+
resolveToContext?: boolean;
419408

420409
/**
421410
* A list of resolve restrictions
422411
*/
423-
restrictions?: undefined | (string | RegExp)[];
412+
restrictions?: (string | RegExp)[];
424413

425414
/**
426415
* Use only the sync constiants of the file system calls
427416
*/
428-
useSyncFileSystemCalls?: undefined | boolean;
417+
useSyncFileSystemCalls?: boolean;
429418
}
430419
declare function exports(
431420
context?: any,

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,9 +2709,9 @@ to-regex-range@^5.0.1:
27092709
dependencies:
27102710
is-number "^7.0.0"
27112711

2712-
tooling@webpack/tooling#v1.6.0:
2713-
version "1.6.0"
2714-
resolved "https://codeload.github.com/webpack/tooling/tar.gz/a42d42ad589daf63b30cfc4c035c4bed93f4027b"
2712+
tooling@webpack/tooling#v1.8.0:
2713+
version "1.8.0"
2714+
resolved "https://codeload.github.com/webpack/tooling/tar.gz/92e13cc6cf7aae31030c736427c6ebf54f5af581"
27152715
dependencies:
27162716
"@yarnpkg/lockfile" "^1.1.0"
27172717
commondir "^1.0.1"

0 commit comments

Comments
 (0)