@yarnpkg/core
Advanced tools
Comparing version 4.0.0-rc.21 to 4.0.0-rc.22
@@ -5,3 +5,3 @@ import { FakeFS, PortablePath, Filename } from '@yarnpkg/fslib'; | ||
import { LocatorHash, Locator } from './types'; | ||
export declare type CacheOptions = { | ||
export type CacheOptions = { | ||
mockedPackages?: Set<LocatorHash>; | ||
@@ -8,0 +8,0 @@ unstablePackages?: Set<LocatorHash>; |
@@ -17,2 +17,7 @@ "use strict"; | ||
class Cache { | ||
static async find(configuration, { immutable, check } = {}) { | ||
const cache = new Cache(configuration.get(`cacheFolder`), { configuration, immutable, check }); | ||
await cache.setup(); | ||
return cache; | ||
} | ||
constructor(cacheCwd, { configuration, immutable = configuration.get(`enableImmutableCache`), check = false }) { | ||
@@ -47,7 +52,2 @@ // Contains the list of cache files that got accessed since the last time | ||
} | ||
static async find(configuration, { immutable, check } = {}) { | ||
const cache = new Cache(configuration.get(`cacheFolder`), { configuration, immutable, check }); | ||
await cache.setup(); | ||
return cache; | ||
} | ||
get mirrorCwd() { | ||
@@ -54,0 +54,0 @@ if (!this.configuration.get(`enableMirror`)) |
@@ -31,3 +31,3 @@ /// <reference types="node" /> | ||
} | ||
export declare type SupportedArchitectures = { | ||
export type SupportedArchitectures = { | ||
os: Array<string> | null; | ||
@@ -40,3 +40,3 @@ cpu: Array<string> | null; | ||
*/ | ||
export declare type FormatType = formatUtils.Type; | ||
export type FormatType = formatUtils.Type; | ||
/** | ||
@@ -69,3 +69,3 @@ * @deprecated Use {@link formatUtils.Type} | ||
}; | ||
export declare type BaseSettingsDefinition<T extends SettingsType = SettingsType> = { | ||
export type BaseSettingsDefinition<T extends SettingsType = SettingsType> = { | ||
description: string; | ||
@@ -79,3 +79,3 @@ type: T; | ||
}); | ||
export declare type ShapeSettingsDefinition = BaseSettingsDefinition<SettingsType.SHAPE> & { | ||
export type ShapeSettingsDefinition = BaseSettingsDefinition<SettingsType.SHAPE> & { | ||
properties: { | ||
@@ -85,7 +85,7 @@ [propertyName: string]: SettingsDefinition; | ||
}; | ||
export declare type MapSettingsDefinition = BaseSettingsDefinition<SettingsType.MAP> & { | ||
export type MapSettingsDefinition = BaseSettingsDefinition<SettingsType.MAP> & { | ||
valueDefinition: SettingsDefinitionNoDefault; | ||
normalizeKeys?: (key: string) => string; | ||
}; | ||
export declare type SimpleSettingsDefinition = BaseSettingsDefinition<Exclude<SettingsType, SettingsType.SHAPE | SettingsType.MAP>> & { | ||
export type SimpleSettingsDefinition = BaseSettingsDefinition<Exclude<SettingsType, SettingsType.SHAPE | SettingsType.MAP>> & { | ||
default: any; | ||
@@ -96,5 +96,5 @@ defaultText?: any; | ||
}; | ||
export declare type SettingsDefinitionNoDefault = MapSettingsDefinition | ShapeSettingsDefinition | Omit<SimpleSettingsDefinition, 'default'>; | ||
export declare type SettingsDefinition = MapSettingsDefinition | ShapeSettingsDefinition | SimpleSettingsDefinition; | ||
export declare type PluginConfiguration = { | ||
export type SettingsDefinitionNoDefault = MapSettingsDefinition | ShapeSettingsDefinition | Omit<SimpleSettingsDefinition, 'default'>; | ||
export type SettingsDefinition = MapSettingsDefinition | ShapeSettingsDefinition | SimpleSettingsDefinition; | ||
export type PluginConfiguration = { | ||
modules: Map<string, any>; | ||
@@ -176,7 +176,7 @@ plugins: Set<string>; | ||
} | ||
export declare type PackageExtensionData = miscUtils.MapValueToObjectValue<miscUtils.MapValue<ConfigurationValueMap['packageExtensions']>>; | ||
declare type SimpleDefinitionForType<T> = SimpleSettingsDefinition & { | ||
export type PackageExtensionData = miscUtils.MapValueToObjectValue<miscUtils.MapValue<ConfigurationValueMap['packageExtensions']>>; | ||
type SimpleDefinitionForType<T> = SimpleSettingsDefinition & { | ||
type: (T extends boolean ? SettingsType.BOOLEAN : never) | (T extends number ? SettingsType.NUMBER : never) | (T extends PortablePath ? SettingsType.ABSOLUTE_PATH : never) | (T extends string ? SettingsType.LOCATOR | SettingsType.LOCATOR_LOOSE | SettingsType.SECRET | SettingsType.STRING : never) | SettingsType.ANY; | ||
}; | ||
declare type DefinitionForTypeHelper<T> = T extends Map<string, infer U> ? (MapSettingsDefinition & { | ||
type DefinitionForTypeHelper<T> = T extends Map<string, infer U> ? (MapSettingsDefinition & { | ||
valueDefinition: Omit<DefinitionForType<U>, 'default'>; | ||
@@ -186,3 +186,3 @@ }) : T extends miscUtils.ToMapValue<infer U> ? (ShapeSettingsDefinition & { | ||
}) : SimpleDefinitionForType<T>; | ||
declare type DefinitionForType<T> = T extends Array<infer U> ? (DefinitionForTypeHelper<U> & { | ||
type DefinitionForType<T> = T extends Array<infer U> ? (DefinitionForTypeHelper<U> & { | ||
isArray: true; | ||
@@ -192,6 +192,6 @@ }) : (DefinitionForTypeHelper<T> & { | ||
}); | ||
export declare type ConfigurationDefinitionMap<V = ConfigurationValueMap> = { | ||
export type ConfigurationDefinitionMap<V = ConfigurationValueMap> = { | ||
[K in keyof V]: DefinitionForType<V[K]>; | ||
}; | ||
declare type SettingTransforms = { | ||
type SettingTransforms = { | ||
hideSecrets: boolean; | ||
@@ -205,3 +205,3 @@ getNativePaths: boolean; | ||
} | ||
export declare type FindProjectOptions = { | ||
export type FindProjectOptions = { | ||
lookup?: ProjectLookup; | ||
@@ -208,0 +208,0 @@ strict?: boolean; |
@@ -688,13 +688,2 @@ "use strict"; | ||
class Configuration { | ||
constructor(startingCwd) { | ||
this.projectCwd = null; | ||
this.plugins = new Map(); | ||
this.settings = new Map(); | ||
this.values = new Map(); | ||
this.sources = new Map(); | ||
this.invalid = new Map(); | ||
this.packageExtensions = new Map(); | ||
this.limits = new Map(); | ||
this.startingCwd = startingCwd; | ||
} | ||
static create(startingCwd, projectCwdOrPlugins, maybePlugins) { | ||
@@ -992,2 +981,13 @@ const configuration = new Configuration(startingCwd); | ||
} | ||
constructor(startingCwd) { | ||
this.projectCwd = null; | ||
this.plugins = new Map(); | ||
this.settings = new Map(); | ||
this.values = new Map(); | ||
this.sources = new Map(); | ||
this.invalid = new Map(); | ||
this.packageExtensions = new Map(); | ||
this.limits = new Map(); | ||
this.startingCwd = startingCwd; | ||
} | ||
activatePlugin(name, plugin) { | ||
@@ -994,0 +994,0 @@ this.plugins.set(name, plugin); |
@@ -12,3 +12,3 @@ /// <reference types="node" /> | ||
} | ||
export declare type PipevpOptions = { | ||
export type PipevpOptions = { | ||
cwd: PortablePath; | ||
@@ -24,3 +24,3 @@ env?: { | ||
}; | ||
export declare type PipeErrorOptions = { | ||
export type PipeErrorOptions = { | ||
fileName: string; | ||
@@ -34,3 +34,3 @@ code: number | null; | ||
} | ||
export declare type ExecErrorOptions = PipeErrorOptions & { | ||
export type ExecErrorOptions = PipeErrorOptions & { | ||
stdout: Buffer | string; | ||
@@ -47,3 +47,3 @@ stderr: Buffer | string; | ||
}>; | ||
export declare type ExecvpOptions = { | ||
export type ExecvpOptions = { | ||
cwd: PortablePath; | ||
@@ -50,0 +50,0 @@ env?: { |
@@ -6,7 +6,7 @@ import { FakeFS, PortablePath } from '@yarnpkg/fslib'; | ||
import { LocatorHash, Locator } from './types'; | ||
export declare type MinimalFetchOptions = { | ||
export type MinimalFetchOptions = { | ||
project: Project; | ||
fetcher: Fetcher; | ||
}; | ||
export declare type FetchOptions = MinimalFetchOptions & { | ||
export type FetchOptions = MinimalFetchOptions & { | ||
cache: Cache; | ||
@@ -17,3 +17,3 @@ cacheOptions?: CacheOptions; | ||
}; | ||
export declare type FetchResult = { | ||
export type FetchResult = { | ||
packageFs: FakeFS<PortablePath>; | ||
@@ -20,0 +20,0 @@ /** |
@@ -29,3 +29,3 @@ import { ColorFormat } from 'clipanion'; | ||
}; | ||
export declare type Type = keyof typeof Type; | ||
export type Type = keyof typeof Type; | ||
export declare enum Style { | ||
@@ -106,6 +106,6 @@ BOLD = 2 | ||
}; | ||
declare type AllTransforms = typeof transforms; | ||
export declare type Source<T> = T extends keyof AllTransforms ? Parameters<AllTransforms[T]['json']>[0] | null : string | null; | ||
export declare type Tuple<T extends Type = Type> = readonly [Source<T>, T]; | ||
export declare type Field = { | ||
type AllTransforms = typeof transforms; | ||
export type Source<T> = T extends keyof AllTransforms ? Parameters<AllTransforms[T]['json']>[0] | null : string | null; | ||
export type Tuple<T extends Type = Type> = readonly [Source<T>, T]; | ||
export type Field = { | ||
label: string; | ||
@@ -112,0 +112,0 @@ value: Tuple<any>; |
@@ -21,3 +21,3 @@ /// <reference types="node" /> | ||
}; | ||
export declare type Body = ({ | ||
export type Body = ({ | ||
[key: string]: any; | ||
@@ -31,3 +31,3 @@ } | string | Buffer | null); | ||
} | ||
export declare type Options = { | ||
export type Options = { | ||
configuration: Configuration; | ||
@@ -34,0 +34,0 @@ customErrorMessage?: (err: RequestError, configuration: Configuration) => string | null; |
@@ -8,4 +8,4 @@ import { PortablePath } from '@yarnpkg/fslib'; | ||
} | ||
export declare type BuildDirective = [BuildType, string]; | ||
export declare type InstallStatus = { | ||
export type BuildDirective = [BuildType, string]; | ||
export type InstallStatus = { | ||
packageLocation: PortablePath | null; | ||
@@ -15,3 +15,3 @@ buildDirective: Array<BuildDirective> | null; | ||
}; | ||
export declare type FinalizeInstallStatus = { | ||
export type FinalizeInstallStatus = { | ||
locatorHash: LocatorHash; | ||
@@ -21,3 +21,3 @@ buildLocations: Array<PortablePath>; | ||
}; | ||
export declare type FinalizeInstallData = { | ||
export type FinalizeInstallData = { | ||
/** | ||
@@ -50,3 +50,3 @@ * A list of extra package instances that may have been installed on the | ||
}; | ||
export declare type InstallPackageExtraApi = { | ||
export type InstallPackageExtraApi = { | ||
/** | ||
@@ -53,0 +53,0 @@ * The core reclaims the virtual filesystem by default when the |
@@ -7,3 +7,3 @@ /// <reference types="node" /> | ||
import { Locator } from './types'; | ||
export declare type LightReportOptions = { | ||
export type LightReportOptions = { | ||
configuration: Configuration; | ||
@@ -10,0 +10,0 @@ stdout: Writable; |
@@ -9,10 +9,2 @@ "use strict"; | ||
class LightReport extends Report_1.Report { | ||
constructor({ configuration, stdout, suggestInstall = true }) { | ||
super(); | ||
this.errorCount = 0; | ||
formatUtils.addLogFilterSupport(this, { configuration }); | ||
this.configuration = configuration; | ||
this.stdout = stdout; | ||
this.suggestInstall = suggestInstall; | ||
} | ||
static async start(opts, cb) { | ||
@@ -31,2 +23,10 @@ const report = new this(opts); | ||
} | ||
constructor({ configuration, stdout, suggestInstall = true }) { | ||
super(); | ||
this.errorCount = 0; | ||
formatUtils.addLogFilterSupport(this, { configuration }); | ||
this.configuration = configuration; | ||
this.stdout = stdout; | ||
this.suggestInstall = suggestInstall; | ||
} | ||
hasErrors() { | ||
@@ -33,0 +33,0 @@ return this.errorCount > 0; |
@@ -6,6 +6,6 @@ import { PortablePath } from '@yarnpkg/fslib'; | ||
import { Locator, Package } from './types'; | ||
export declare type MinimalLinkOptions = { | ||
export type MinimalLinkOptions = { | ||
project: Project; | ||
}; | ||
export declare type LinkOptions = MinimalLinkOptions & { | ||
export type LinkOptions = MinimalLinkOptions & { | ||
report: Report; | ||
@@ -12,0 +12,0 @@ }; |
@@ -5,4 +5,4 @@ import { FakeFS, Filename, PortablePath } from '@yarnpkg/fslib'; | ||
import { IdentHash } from './types'; | ||
export declare type AllDependencies = 'dependencies' | 'devDependencies' | 'peerDependencies'; | ||
export declare type HardDependencies = 'dependencies' | 'devDependencies'; | ||
export type AllDependencies = 'dependencies' | 'devDependencies' | 'peerDependencies'; | ||
export type HardDependencies = 'dependencies' | 'devDependencies'; | ||
export interface WorkspaceDefinition { | ||
@@ -9,0 +9,0 @@ pattern: string; |
@@ -28,7 +28,7 @@ /// <reference types="node" /> | ||
}; | ||
export declare type MapValue<T> = T extends Map<any, infer V> ? V : never; | ||
export type MapValue<T> = T extends Map<any, infer V> ? V : never; | ||
export interface ToMapValue<T extends object> { | ||
get<K extends keyof T>(key: K): T[K]; | ||
} | ||
export declare type MapValueToObjectValue<T> = T extends Map<infer K, infer V> ? (K extends string | number | symbol ? MapValueToObjectValue<Record<K, V>> : never) : T extends ToMapValue<infer V> ? MapValueToObjectValue<V> : T extends PortablePath ? PortablePath : T extends object ? { | ||
export type MapValueToObjectValue<T> = T extends Map<infer K, infer V> ? (K extends string | number | symbol ? MapValueToObjectValue<Record<K, V>> : never) : T extends ToMapValue<infer V> ? MapValueToObjectValue<V> : T extends PortablePath ? PortablePath : T extends object ? { | ||
[K in keyof T]: MapValueToObjectValue<T[K]>; | ||
@@ -54,3 +54,3 @@ } : T; | ||
} | ||
export declare type Deferred<T = void> = { | ||
export type Deferred<T = void> = { | ||
promise: Promise<T>; | ||
@@ -105,7 +105,7 @@ resolve: (val: T) => void; | ||
export declare function tryParseOptionalBoolean(value: unknown): boolean | undefined | null; | ||
export declare type FilterKeys<T extends {}, Filter> = { | ||
export type FilterKeys<T extends {}, Filter> = { | ||
[K in keyof T]: T[K] extends Filter ? K : never; | ||
}[keyof T]; | ||
export declare function isPathLike(value: string): boolean; | ||
declare type MergeObjects<T extends Array<unknown>, Accumulator> = T extends [infer U, ...infer Rest] ? MergeObjects<Rest, Accumulator & U> : Accumulator; | ||
type MergeObjects<T extends Array<unknown>, Accumulator> = T extends [infer U, ...infer Rest] ? MergeObjects<Rest, Accumulator & U> : Accumulator; | ||
/** | ||
@@ -112,0 +112,0 @@ * Merges multiple objects into the target argument. |
export declare function builtinModules(): Set<string>; | ||
export declare type Architecture = { | ||
export type Architecture = { | ||
os: string; | ||
@@ -7,3 +7,3 @@ cpu: string; | ||
}; | ||
export declare type ArchitectureSet = { | ||
export type ArchitectureSet = { | ||
os: Array<string> | null; | ||
@@ -10,0 +10,0 @@ cpu: Array<string> | null; |
@@ -17,6 +17,6 @@ /// <reference types="node" /> | ||
import { Locator, Descriptor } from './types'; | ||
declare type ProcessEnvironment = { | ||
type ProcessEnvironment = { | ||
[key: string]: string; | ||
}; | ||
export declare type CommandContext = { | ||
export type CommandContext = { | ||
cwd: PortablePath; | ||
@@ -40,3 +40,3 @@ env: Record<string, string | undefined>; | ||
} | ||
export declare type WrapNetworkRequestInfo = httpUtils.Options & { | ||
export type WrapNetworkRequestInfo = httpUtils.Options & { | ||
target: string | URL; | ||
@@ -138,3 +138,3 @@ body: httpUtils.Body; | ||
} | ||
export declare type Plugin<PluginHooks = any> = { | ||
export type Plugin<PluginHooks = any> = { | ||
configuration?: Partial<ConfigurationDefinitionMap>; | ||
@@ -141,0 +141,0 @@ commands?: Array<CommandClass<CommandContext>>; |
@@ -22,3 +22,3 @@ import { PortablePath } from '@yarnpkg/fslib'; | ||
} | ||
export declare type InstallOptions = { | ||
export type InstallOptions = { | ||
/** | ||
@@ -81,6 +81,6 @@ * Instance of the cache that the project will use when packages have to be | ||
}; | ||
declare type RestoreInstallStateOpts = { | ||
type RestoreInstallStateOpts = { | ||
[key in keyof typeof INSTALL_STATE_FIELDS]?: boolean; | ||
}; | ||
export declare type PeerRequirement = { | ||
export type PeerRequirement = { | ||
subject: LocatorHash; | ||
@@ -87,0 +87,0 @@ requested: Ident; |
@@ -12,11 +12,11 @@ /// <reference types="node" /> | ||
export declare function isReportError(error: Error): error is ReportError; | ||
export declare type ProgressDefinition = { | ||
export type ProgressDefinition = { | ||
progress?: number; | ||
title?: string; | ||
}; | ||
export declare type ProgressIterable = AsyncIterable<ProgressDefinition> & { | ||
export type ProgressIterable = AsyncIterable<ProgressDefinition> & { | ||
hasProgress: boolean; | ||
hasTitle: boolean; | ||
}; | ||
export declare type SectionOptions = { | ||
export type SectionOptions = { | ||
reportHeader?: () => void; | ||
@@ -26,3 +26,3 @@ reportFooter?: (elapsedTime: number) => void; | ||
}; | ||
export declare type TimerOptions = Pick<SectionOptions, 'skipIfEmpty'>; | ||
export type TimerOptions = Pick<SectionOptions, 'skipIfEmpty'>; | ||
export declare abstract class Report { | ||
@@ -29,0 +29,0 @@ private reportedInfos; |
@@ -5,7 +5,7 @@ import { FetchOptions } from './Fetcher'; | ||
import { Descriptor, Locator, Package } from './types'; | ||
export declare type MinimalResolveOptions = { | ||
export type MinimalResolveOptions = { | ||
project: Project; | ||
resolver: Resolver; | ||
}; | ||
export declare type ResolveOptions = MinimalResolveOptions & { | ||
export type ResolveOptions = MinimalResolveOptions & { | ||
fetchOptions?: FetchOptions | null; | ||
@@ -12,0 +12,0 @@ report: Report; |
@@ -42,7 +42,7 @@ /// <reference types="node" /> | ||
}): Promise<void>; | ||
declare type HasPackageScriptOption = { | ||
type HasPackageScriptOption = { | ||
project: Project; | ||
}; | ||
export declare function hasPackageScript(locator: Locator, scriptName: string, { project }: HasPackageScriptOption): Promise<boolean>; | ||
declare type ExecutePackageScriptOptions = { | ||
type ExecutePackageScriptOptions = { | ||
cwd?: PortablePath | undefined; | ||
@@ -56,3 +56,3 @@ project: Project; | ||
export declare function executePackageShellcode(locator: Locator, command: string, args: Array<string>, { cwd, project, stdin, stdout, stderr }: ExecutePackageScriptOptions): Promise<number>; | ||
declare type ExecuteWorkspaceScriptOptions = { | ||
type ExecuteWorkspaceScriptOptions = { | ||
cwd?: PortablePath | undefined; | ||
@@ -65,3 +65,3 @@ stdin: Readable | null; | ||
export declare function hasWorkspaceScript(workspace: Workspace, scriptName: string): boolean; | ||
declare type ExecuteWorkspaceLifecycleScriptOptions = { | ||
type ExecuteWorkspaceLifecycleScriptOptions = { | ||
cwd?: PortablePath | undefined; | ||
@@ -72,7 +72,7 @@ report: Report; | ||
export declare function maybeExecuteWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, opts: ExecuteWorkspaceLifecycleScriptOptions): Promise<void>; | ||
declare type GetPackageAccessibleBinariesOptions = { | ||
type GetPackageAccessibleBinariesOptions = { | ||
project: Project; | ||
}; | ||
declare type Binary = [Locator, NativePath]; | ||
declare type PackageAccessibleBinaries = Map<string, Binary>; | ||
type Binary = [Locator, NativePath]; | ||
type PackageAccessibleBinaries = Map<string, Binary>; | ||
/** | ||
@@ -91,3 +91,3 @@ * Return the binaries that can be accessed by the specified package | ||
export declare function getWorkspaceAccessibleBinaries(workspace: Workspace): Promise<PackageAccessibleBinaries>; | ||
declare type ExecutePackageAccessibleBinaryOptions = { | ||
type ExecutePackageAccessibleBinaryOptions = { | ||
cwd: PortablePath; | ||
@@ -114,3 +114,3 @@ nodeArgs?: Array<string>; | ||
export declare function executePackageAccessibleBinary(locator: Locator, binaryName: string, args: Array<string>, { cwd, project, stdin, stdout, stderr, nodeArgs, packageAccessibleBinaries }: ExecutePackageAccessibleBinaryOptions): Promise<number>; | ||
declare type ExecuteWorkspaceAccessibleBinaryOptions = { | ||
type ExecuteWorkspaceAccessibleBinaryOptions = { | ||
cwd: PortablePath; | ||
@@ -117,0 +117,0 @@ stdin: Readable | null; |
@@ -7,3 +7,3 @@ /// <reference types="node" /> | ||
import { Locator } from './types'; | ||
export declare type StreamReportOptions = { | ||
export type StreamReportOptions = { | ||
configuration: Configuration; | ||
@@ -10,0 +10,0 @@ forgettableBufferSize?: number; |
@@ -86,2 +86,28 @@ "use strict"; | ||
class StreamReport extends Report_1.Report { | ||
static async start(opts, cb) { | ||
const report = new this(opts); | ||
const emitWarning = process.emitWarning; | ||
process.emitWarning = (message, name) => { | ||
if (typeof message !== `string`) { | ||
const error = message; | ||
message = error.message; | ||
name = name !== null && name !== void 0 ? name : error.name; | ||
} | ||
const fullMessage = typeof name !== `undefined` | ||
? `${name}: ${message}` | ||
: message; | ||
report.reportWarning(MessageName_1.MessageName.UNNAMED, fullMessage); | ||
}; | ||
try { | ||
await cb(report); | ||
} | ||
catch (error) { | ||
report.reportExceptionOnce(error); | ||
} | ||
finally { | ||
await report.finalize(); | ||
process.emitWarning = emitWarning; | ||
} | ||
return report; | ||
} | ||
constructor({ configuration, stdout, json = false, includeFooter = true, includeLogs = !json, includeInfos = includeLogs, includeWarnings = includeLogs, forgettableBufferSize = BASE_FORGETTABLE_BUFFER_SIZE, forgettableNames = new Set(), }) { | ||
@@ -124,28 +150,2 @@ super(); | ||
} | ||
static async start(opts, cb) { | ||
const report = new this(opts); | ||
const emitWarning = process.emitWarning; | ||
process.emitWarning = (message, name) => { | ||
if (typeof message !== `string`) { | ||
const error = message; | ||
message = error.message; | ||
name = name !== null && name !== void 0 ? name : error.name; | ||
} | ||
const fullMessage = typeof name !== `undefined` | ||
? `${name}: ${message}` | ||
: message; | ||
report.reportWarning(MessageName_1.MessageName.UNNAMED, fullMessage); | ||
}; | ||
try { | ||
await cb(report); | ||
} | ||
catch (error) { | ||
report.reportExceptionOnce(error); | ||
} | ||
finally { | ||
await report.finalize(); | ||
process.emitWarning = emitWarning; | ||
} | ||
return report; | ||
} | ||
hasErrors() { | ||
@@ -152,0 +152,0 @@ return this.errorCount > 0; |
@@ -227,3 +227,3 @@ /// <reference types="node" /> | ||
export declare function tryParseLocator(string: string, strict?: boolean): Locator | null; | ||
declare type ParseRangeOptions = { | ||
type ParseRangeOptions = { | ||
/** Throw an error if bindings are missing */ | ||
@@ -238,3 +238,3 @@ requireBindings?: boolean; | ||
}; | ||
declare type ParseRangeReturnType<Opts extends ParseRangeOptions> = ({ | ||
type ParseRangeReturnType<Opts extends ParseRangeOptions> = ({ | ||
params: Opts extends { | ||
@@ -241,0 +241,0 @@ requireBindings: true; |
@@ -13,3 +13,3 @@ import { PortablePath } from '@yarnpkg/fslib'; | ||
} | ||
export declare type RegistryBlock = { | ||
export type RegistryBlock = { | ||
values?: { | ||
@@ -27,3 +27,3 @@ [key in MetricName]?: Array<string>; | ||
}; | ||
export declare type RegistryFile = { | ||
export type RegistryFile = { | ||
lastUpdate?: number; | ||
@@ -30,0 +30,0 @@ blocks?: { |
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
import * as formatUtils from './formatUtils'; | ||
export declare type TreeNode = { | ||
export type TreeNode = { | ||
label?: string; | ||
@@ -11,6 +11,6 @@ value?: formatUtils.Tuple; | ||
}; | ||
export declare type TreeMap = { | ||
export type TreeMap = { | ||
[key: string]: TreeNode; | ||
}; | ||
export declare type TreeifyNode = { | ||
export type TreeifyNode = { | ||
[key: string]: TreeifyNode; | ||
@@ -17,0 +17,0 @@ }; |
@@ -7,3 +7,3 @@ import { PortablePath } from '@yarnpkg/fslib'; | ||
*/ | ||
export declare type IdentHash = string & { | ||
export type IdentHash = string & { | ||
__identHash: string; | ||
@@ -38,3 +38,3 @@ }; | ||
*/ | ||
export declare type DescriptorHash = string & { | ||
export type DescriptorHash = string & { | ||
__descriptorHash: string; | ||
@@ -65,3 +65,3 @@ }; | ||
*/ | ||
export declare type LocatorHash = string & { | ||
export type LocatorHash = string & { | ||
__locatorHash: string; | ||
@@ -174,3 +174,3 @@ }; | ||
} | ||
export declare type PackageExtension = ({ | ||
export type PackageExtension = ({ | ||
type: PackageExtensionType.Dependency; | ||
@@ -177,0 +177,0 @@ descriptor: Descriptor; |
/// <reference types="node" /> | ||
import { PortablePath } from '@yarnpkg/fslib'; | ||
import { ExtractBufferOptions } from '../tgzUtils'; | ||
export declare type ConvertToZipPayload = { | ||
export type ConvertToZipPayload = { | ||
tmpFile: PortablePath; | ||
@@ -6,0 +6,0 @@ tgz: Buffer | Uint8Array; |
{ | ||
"name": "@yarnpkg/core", | ||
"version": "4.0.0-rc.21", | ||
"version": "4.0.0-rc.22", | ||
"stableVersion": "3.2.3", | ||
@@ -16,6 +16,6 @@ "license": "BSD-2-Clause", | ||
"@types/treeify": "^1.0.0", | ||
"@yarnpkg/fslib": "^3.0.0-rc.21", | ||
"@yarnpkg/libzip": "^3.0.0-rc.21", | ||
"@yarnpkg/parsers": "^3.0.0-rc.21", | ||
"@yarnpkg/shell": "^4.0.0-rc.21", | ||
"@yarnpkg/fslib": "^3.0.0-rc.22", | ||
"@yarnpkg/libzip": "^3.0.0-rc.22", | ||
"@yarnpkg/parsers": "^3.0.0-rc.22", | ||
"@yarnpkg/shell": "^4.0.0-rc.22", | ||
"camelcase": "^5.3.1", | ||
@@ -51,6 +51,6 @@ "chalk": "^3.0.0", | ||
"@types/tunnel": "^0.0.0", | ||
"@yarnpkg/cli": "^4.0.0-rc.21", | ||
"@yarnpkg/plugin-link": "^3.0.0-rc.21", | ||
"@yarnpkg/plugin-npm": "^3.0.0-rc.21", | ||
"@yarnpkg/plugin-pnp": "^4.0.0-rc.21", | ||
"@yarnpkg/cli": "^4.0.0-rc.22", | ||
"@yarnpkg/plugin-link": "^3.0.0-rc.22", | ||
"@yarnpkg/plugin-npm": "^3.0.0-rc.22", | ||
"@yarnpkg/plugin-pnp": "^4.0.0-rc.22", | ||
"comment-json": "^2.2.0", | ||
@@ -57,0 +57,0 @@ "esbuild": "npm:esbuild-wasm@^0.15.5", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
774320
13457
Updated@yarnpkg/fslib@^3.0.0-rc.22
Updated@yarnpkg/libzip@^3.0.0-rc.22
Updated@yarnpkg/shell@^4.0.0-rc.22