Skip to main content

@yarnpkg/parsers

Index

Functions

parseResolution

parseShell

  • parseShell(source: string, options?: { isGlobPattern: (arg: string) => boolean }): ShellLine
  • Parameters

    • source: string
    • options: { isGlobPattern: (arg: string) => boolean } = ...

    Returns ShellLine

parseSyml

  • parseSyml(source: string): {}
  • Parameters

    • source: string

    Returns {}

    • [key string]: any

stringifyArgument

  • stringifyArgument(argument: Argument): string
  • Parameters

    Returns string

stringifyArgumentSegment

stringifyArithmeticExpression

stringifyCommand

  • stringifyCommand(command: Command): string
  • Parameters

    • command: Command

    Returns string

stringifyCommandChain

stringifyCommandChainThen

  • stringifyCommandChainThen(commandChainThen: CommandChainThen): string
  • Parameters

    • commandChainThen: CommandChainThen

    Returns string

stringifyCommandLine

stringifyCommandLineThen

  • stringifyCommandLineThen(commandLineThen: CommandLineThen): string
  • Parameters

    • commandLineThen: CommandLineThen

    Returns string

stringifyEnvSegment

  • stringifyEnvSegment(envSegment: EnvSegment): string

stringifyRedirectArgument

  • stringifyRedirectArgument(argument: RedirectArgument): string
  • Parameters

    • argument: RedirectArgument

    Returns string

stringifyResolution

  • stringifyResolution(resolution: Resolution): string

stringifyShell

  • stringifyShell(shellLine: ShellLine, __namedParameters?: { endSemicolon?: boolean }): string
  • Parameters

    • shellLine: ShellLine
    • __namedParameters: { endSemicolon?: boolean } = {}

    Returns string

stringifySyml

  • stringifySyml(value: any): string
  • Parameters

    • value: any

    Returns string

PreserveOrdering

PreserveOrdering: typeof PreserveOrdering

stringifyValueArgument

  • stringifyValueArgument(argument: { segments: ArgumentSegment[]; type: argument }): string
  • Parameters

    Returns string

References

stringifyShellLine

Renames and re-exports stringifyShell

Type Aliases

Argument

Argument: RedirectArgument | ValueArgument

ArgumentSegment

ArgumentSegment: { text: string; type: text } | { pattern: string; type: glob } | { quoted: boolean; shell: ShellLine; type: shell } | { alternativeValue?: ValueArgument[]; defaultValue?: ValueArgument[]; name: string; quoted: boolean; type: variable } | { arithmetic: ArithmeticExpression; type: arithmetic }

ArithmeticExpression

ArithmeticExpression: ArithmeticPrimary | ArithmeticOperatorExpression

ArithmeticPrimary

ArithmeticPrimary: { type: number; value: number } | { name: string; type: variable }

CommandChain

CommandChain: Command & { then?: CommandChainThen }

CommandLine

CommandLine: { chain: CommandChain; then?: CommandLineThen }

Type declaration

EnvSegment

EnvSegment: { args: [] | [ValueArgument]; name: string }

Type declaration

  • args: [] | [ValueArgument]
  • name: string

Resolution

Resolution: { descriptor: { description?: string; fullName: string }; from?: { description?: string; fullName: string } }

Type declaration

  • descriptor: { description?: string; fullName: string }
    • optionaldescription?: string
    • fullName: string
  • optionalfrom?: { description?: string; fullName: string }
    • optionaldescription?: string
    • fullName: string

ShellLine

ShellLine: { command: CommandLine; type: ; | & }[]