Socket
Socket
Sign inDemoInstall

enhanced-resolve

Package Overview
Dependencies
Maintainers
4
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enhanced-resolve - npm Package Compare versions

Comparing version 5.6.0 to 5.7.0

2

lib/PnpPlugin.js

@@ -12,3 +12,3 @@ /*

* @typedef {Object} PnpApiImpl
* @property {function(string, string, Object): string} resolveToUnqualified
* @property {function(string, string, object): string} resolveToUnqualified
*/

@@ -15,0 +15,0 @@

@@ -97,3 +97,3 @@ /*

/** @template T @typedef {{ add: (T) => void }} WriteOnlySet<T> */
/** @template T @typedef {{ add: (T) => void }} WriteOnlySet */

@@ -100,0 +100,0 @@ /**

@@ -64,3 +64,3 @@ /*

* @property {FileSystem} fileSystem The file system which should be used
* @property {(Object | boolean)=} unsafeCache Use this cache object to unsafely cache the successful requests
* @property {(object | boolean)=} unsafeCache Use this cache object to unsafely cache the successful requests
* @property {boolean=} symlinks Resolve symlinks to their symlinked location

@@ -96,3 +96,3 @@ * @property {Resolver=} resolver A prepared Resolver to which the plugins are attached

* @property {FileSystem} fileSystem
* @property {Object | false} unsafeCache
* @property {object | false} unsafeCache
* @property {boolean} symlinks

@@ -99,0 +99,0 @@ * @property {Resolver=} resolver

{
"name": "enhanced-resolve",
"version": "5.6.0",
"version": "5.7.0",
"author": "Tobias Koppers @sokra",

@@ -35,4 +35,4 @@ "description": "Offers a async require.resolve function. It's highly configurable.",

"should": "^13.2.3",
"tooling": "webpack/tooling#v1.11.0",
"typescript": "^4.0.2"
"tooling": "webpack/tooling#v1.14.0",
"typescript": "^4.2.0-beta"
},

@@ -39,0 +39,0 @@ "engines": {

@@ -9,2 +9,11 @@ /*

declare interface AliasOption {
alias: string | false | string[];
name: string;
onlyModule?: boolean;
}
type AliasOptionNewRequest = string | false | string[];
declare interface AliasOptions {
[index: string]: AliasOptionNewRequest;
}
declare interface BaseResolveRequest {

@@ -14,3 +23,3 @@ path: string | false;

descriptionFileRoot?: string;
descriptionFileData?: any;
descriptionFileData?: object;
relativePath?: string;

@@ -25,10 +34,18 @@ ignoreSymlinks?: boolean;

(arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
): void;
};
lstatSync?: (arg0: string, arg1?: any) => FileSystemStats;
lstatSync?: (arg0: string, arg1?: object) => FileSystemStats;
stat: {
(arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
): void;
};
statSync: (arg0: string, arg1?: any) => FileSystemStats;
statSync: (arg0: string, arg1?: object) => FileSystemStats;
readdir: {

@@ -41,3 +58,3 @@ (

arg0: string,
arg1: any,
arg1: object,
arg2: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]>

@@ -48,19 +65,27 @@ ): void;

arg0: string,
arg1?: any
arg1?: object
) => (string | Buffer)[] | FileSystemDirent[];
readFile: {
(arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
): void;
};
readFileSync: (arg0: string, arg1?: any) => string | Buffer;
readFileSync: (arg0: string, arg1?: object) => string | Buffer;
readJson?: {
(arg0: string, arg1: FileSystemCallback<any>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<any>): void;
(arg0: string, arg1: FileSystemCallback<object>): void;
(arg0: string, arg1: object, arg2: FileSystemCallback<object>): void;
};
readJsonSync?: (arg0: string, arg1?: any) => any;
readJsonSync?: (arg0: string, arg1?: object) => object;
readlink: {
(arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
): void;
};
readlinkSync: (arg0: string, arg1?: any) => string | Buffer;
readlinkSync: (arg0: string, arg1?: object) => string | Buffer;
purge(what?: any): void;

@@ -77,3 +102,7 @@ }

(arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
): void;
};

@@ -87,3 +116,3 @@ readdir: {

arg0: string,
arg1: any,
arg1: object,
arg2: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]>

@@ -93,16 +122,28 @@ ): void;

readJson?: {
(arg0: string, arg1: FileSystemCallback<any>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<any>): void;
(arg0: string, arg1: FileSystemCallback<object>): void;
(arg0: string, arg1: object, arg2: FileSystemCallback<object>): void;
};
readlink: {
(arg0: string, arg1: FileSystemCallback<string | Buffer>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
): void;
};
lstat?: {
(arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
): void;
};
stat: {
(arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
(arg0: string, arg1: any, arg2: FileSystemCallback<string | Buffer>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
): void;
};

@@ -136,4 +177,7 @@ }

}
type Plugin =
| { apply: (arg0: Resolver) => void }
| ((this: Resolver, arg1: Resolver) => void);
declare interface PnpApiImpl {
resolveToUnqualified: (arg0: string, arg1: string, arg2?: any) => string;
resolveToUnqualified: (arg0: string, arg1: string, arg2: object) => string;
}

@@ -151,3 +195,3 @@ declare interface PossibleFileSystemError {

declare interface ResolveContext {
contextDependencies?: { add: (T?: any) => void };
contextDependencies?: WriteOnlySet<string>;

@@ -157,3 +201,3 @@ /**

*/
fileDependencies?: { add: (T?: any) => void };
fileDependencies?: WriteOnlySet<string>;

@@ -163,3 +207,3 @@ /**

*/
missingDependencies?: { add: (T?: any) => void };
missingDependencies?: WriteOnlySet<string>;

@@ -177,16 +221,6 @@ /**

declare interface ResolveOptions {
alias: {
alias: string | false | string[];
name: string;
onlyModule?: boolean;
}[];
fallback: {
alias: string | false | string[];
name: string;
onlyModule?: boolean;
}[];
alias: AliasOption[];
fallback: AliasOption[];
aliasFields: Set<string | string[]>;
cachePredicate: (
arg0: BaseResolveRequest & Partial<ParsedIdentifier>
) => boolean;
cachePredicate: (arg0: ResolveRequest) => boolean;
cacheWithContext: boolean;

@@ -204,3 +238,3 @@

fileSystem: FileSystem;
unsafeCache: any;
unsafeCache: false | object;
symlinks: boolean;

@@ -211,6 +245,3 @@ resolver?: Resolver;

mainFiles: Set<string>;
plugins: (
| { apply: (arg0: Resolver) => void }
| ((this: Resolver, arg1: Resolver) => void)
)[];
plugins: Plugin[];
pnpApi: null | PnpApiImpl;

@@ -224,2 +255,3 @@ roots: Set<string>;

}
type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
declare abstract class Resolver {

@@ -232,18 +264,14 @@ fileSystem: FileSystem;

AsyncSeriesBailHook<
[BaseResolveRequest & Partial<ParsedIdentifier>, ResolveContext],
null | (BaseResolveRequest & Partial<ParsedIdentifier>)
[ResolveRequest, ResolveContext],
null | ResolveRequest
>,
BaseResolveRequest & Partial<ParsedIdentifier>
ResolveRequest
]
>;
noResolve: SyncHook<
[BaseResolveRequest & Partial<ParsedIdentifier>, Error]
>;
noResolve: SyncHook<[ResolveRequest, Error]>;
resolve: AsyncSeriesBailHook<
[BaseResolveRequest & Partial<ParsedIdentifier>, ResolveContext],
null | (BaseResolveRequest & Partial<ParsedIdentifier>)
[ResolveRequest, ResolveContext],
null | ResolveRequest
>;
result: AsyncSeriesHook<
[BaseResolveRequest & Partial<ParsedIdentifier>, ResolveContext]
>;
result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
};

@@ -254,8 +282,8 @@ ensureHook(

| AsyncSeriesBailHook<
[BaseResolveRequest & Partial<ParsedIdentifier>, ResolveContext],
null | (BaseResolveRequest & Partial<ParsedIdentifier>)
[ResolveRequest, ResolveContext],
null | ResolveRequest
>
): AsyncSeriesBailHook<
[BaseResolveRequest & Partial<ParsedIdentifier>, ResolveContext],
null | (BaseResolveRequest & Partial<ParsedIdentifier>)
[ResolveRequest, ResolveContext],
null | ResolveRequest
>;

@@ -266,12 +294,12 @@ getHook(

| AsyncSeriesBailHook<
[BaseResolveRequest & Partial<ParsedIdentifier>, ResolveContext],
null | (BaseResolveRequest & Partial<ParsedIdentifier>)
[ResolveRequest, ResolveContext],
null | ResolveRequest
>
): AsyncSeriesBailHook<
[BaseResolveRequest & Partial<ParsedIdentifier>, ResolveContext],
null | (BaseResolveRequest & Partial<ParsedIdentifier>)
[ResolveRequest, ResolveContext],
null | ResolveRequest
>;
resolveSync(context: any, path: string, request: string): string | false;
resolveSync(context: object, path: string, request: string): string | false;
resolve(
context: any,
context: object,
path: string,

@@ -283,3 +311,3 @@ request: string,

arg1?: string | false,
arg2?: BaseResolveRequest & Partial<ParsedIdentifier>
arg2?: ResolveRequest
) => void

@@ -305,9 +333,3 @@ ): void;

*/
alias?:
| { [index: string]: string | false | string[] }
| {
alias: string | false | string[];
name: string;
onlyModule?: boolean;
}[];
alias?: AliasOptions | AliasOption[];

@@ -317,9 +339,3 @@ /**

*/
fallback?:
| { [index: string]: string | false | string[] }
| {
alias: string | false | string[];
name: string;
onlyModule?: boolean;
}[];
fallback?: AliasOptions | AliasOption[];

@@ -334,5 +350,3 @@ /**

*/
cachePredicate?: (
arg0: BaseResolveRequest & Partial<ParsedIdentifier>
) => boolean;
cachePredicate?: (arg0: ResolveRequest) => boolean;

@@ -382,3 +396,3 @@ /**

*/
unsafeCache?: any;
unsafeCache?: boolean | object;

@@ -417,6 +431,3 @@ /**

*/
plugins?: (
| { apply: (arg0: Resolver) => void }
| ((this: Resolver, arg1: Resolver) => void)
)[];
plugins?: Plugin[];

@@ -463,2 +474,5 @@ /**

}
declare interface WriteOnlySet<T> {
add: (T?: any) => void;
}
declare function exports(

@@ -499,6 +513,2 @@ context?: any,

) => any;
export type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
export type Plugin =
| { apply: (arg0: Resolver) => void }
| ((this: Resolver, arg1: Resolver) => void);
export {

@@ -512,2 +522,4 @@ CachedInputFileSystem,

ResolveContext,
ResolveRequest,
Plugin,
UserResolveOptions as ResolveOptions

@@ -514,0 +526,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc