Skip to main content

patchUtils

Index

Functions

applyPatchFile

  • applyPatchFile(effects: ParsedPatchFile, __namedParameters?: { baseFs?: FakeFS<PortablePath>; dryRun?: boolean; version?: null | string }): Promise<void>
  • Parameters

    • effects: ParsedPatchFile
    • __namedParameters: { baseFs?: FakeFS<PortablePath>; dryRun?: boolean; version?: null | string } = {}

    Returns Promise<void>

diffFolders

ensureUnpatchedDescriptor

ensureUnpatchedLocator

extractPackageToDisk

extractPatchFlags

  • extractPatchFlags(patchPath: PortablePath): { optional: boolean }
  • Parameters

    Returns { optional: boolean }

    • optional: boolean

isParentRequired

isPatchDescriptor

  • isPatchDescriptor(descriptor: Descriptor): boolean

isPatchLocator

  • isPatchLocator(locator: Locator): boolean
  • Parameters

    Returns boolean

loadPatchFiles

makeDescriptor

  • makeDescriptor(ident: Ident, __namedParameters: Pick<{ parentLocator: null | Locator; patchPaths: PortablePath[]; sourceDescriptor: Descriptor; sourceVersion: null | string }, parentLocator | patchPaths | sourceDescriptor>): Descriptor
  • Parameters

    • ident: Ident
    • __namedParameters: Pick<{ parentLocator: null | Locator; patchPaths: PortablePath[]; sourceDescriptor: Descriptor; sourceVersion: null | string }, parentLocator | patchPaths | sourceDescriptor>

    Returns Descriptor

makeLocator

  • makeLocator(ident: Ident, __namedParameters: Omit<{ parentLocator: null | Locator; patchPaths: PortablePath[]; sourceLocator: Locator; sourceVersion: null | string }, sourceVersion | sourceLocator> & { patchHash: string; sourcePackage: Package }): Locator
  • Parameters

    • ident: Ident
    • __namedParameters: Omit<{ parentLocator: null | Locator; patchPaths: PortablePath[]; sourceLocator: Locator; sourceVersion: null | string }, sourceVersion | sourceLocator> & { patchHash: string; sourcePackage: Package }

    Returns Locator

makePatchHash

  • makePatchHash(patchFiles: { optional: boolean; source: null | string }[], sourceVersion: null | string): string
  • Parameters

    • patchFiles: { optional: boolean; source: null | string }[]
    • sourceVersion: null | string

    Returns string

parseDescriptor

parseLocator

parsePatchFile

  • parsePatchFile(file: string): ParsedPatchFile
  • Parameters

    • file: string

    Returns ParsedPatchFile

unpatchDescriptor

unpatchLocator