diff --git a/typings/internalBinding/modules.d.ts b/typings/internalBinding/modules.d.ts index 7d35b864dae356..e19c662ded3379 100644 --- a/typings/internalBinding/modules.d.ts +++ b/typings/internalBinding/modules.d.ts @@ -9,7 +9,7 @@ export type PackageConfig = { export type DeserializedPackageConfig = { data: PackageConfig, exists: boolean, - path: URL['pathname'], + path: string, } export type SerializedPackageConfig = [ PackageConfig['name'], @@ -22,9 +22,10 @@ export type SerializedPackageConfig = [ export interface ModulesBinding { readPackageJSON(path: string): SerializedPackageConfig | undefined; - getNearestParentPackageJSON(path: string): SerializedPackageConfig | undefined - getNearestRawParentPackageJSON(origin: URL['pathname']): [ReturnType, DeserializedPackageConfig['path']] | undefined getNearestParentPackageJSONType(path: string): PackageConfig['type'] + getNearestParentPackageJSON(path: string): SerializedPackageConfig | undefined getPackageScopeConfig(path: string): SerializedPackageConfig | undefined - getPackageJSONScripts(): string | undefined + enableCompileCache(path?: string): { status: number, message?: string, directory?: string } + getCompileCacheDir(): string | undefined + flushCompileCache(keepDeserializedCache?: boolean): void }