Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-git

@yarnpkg/plugin-git

This plugin adds support for cloning packages from Git repositories.

Install

This plugin is included by default in Yarn.

Type aliases

RepoUrlParts

RepoUrlParts: object

Type declaration

  • extra: object
    • [key: string]: string
  • repo: string
  • treeish: object

Variables

Const gitPatterns

gitPatterns: RegExp[] = [/^ssh:/,/^git(?:\+[^:]+)?:/,// `git+` is optional, `.git` is required/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,// GitHub `/tarball/` URLs/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,]

Functions

clone

  • clone(url: string, configuration: Configuration): Promise<string & object>

fetchBase

  • fetchBase(root: PortablePath, __namedParameters: object): Promise<object>

fetchChangedFiles

  • fetchChangedFiles(root: PortablePath, __namedParameters: object): Promise<(string & object)[]>

fetchChangedWorkspaces

  • fetchChangedWorkspaces(__namedParameters: object): Promise<Set<Workspace>>

fetchRoot

  • fetchRoot(initialCwd: PortablePath): Promise<null | string & object>

isGitUrl

  • isGitUrl(url: string): boolean

lsRemote

  • lsRemote(repo: string, configuration: Configuration): Promise<Map<any, any>>

makeGitEnvironment

  • makeGitEnvironment(): object

normalizeLocator

normalizeRepoUrl

  • normalizeRepoUrl(url: string, __namedParameters?: object): string

resolveUrl

  • resolveUrl(url: string, configuration: Configuration): Promise<string>

splitRepoUrl

Object literals

Const plugin

plugin: object

fetchers

fetchers: GitFetcher[] = [GitFetcher,]

resolvers

resolvers: GitResolver[] = [GitResolver,]

configuration

configuration: object

changesetBaseRefs

changesetBaseRefs: object

default

default: string[] = [`master`, `origin/master`, `upstream/master`, `main`, `origin/main`, `upstream/main`]

description

description: string = `The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.`

isArray

isArray: true = true

isNullable

isNullable: false = false

type

type: STRING = SettingsType.STRING

changesetIgnorePatterns

changesetIgnorePatterns: object

default

default: never[] = []

description

description: string = `Array of glob patterns; files matching them will be ignored when fetching the changed files`

isArray

isArray: true = true

type

type: STRING = SettingsType.STRING

cloneConcurrency

cloneConcurrency: object

default

default: number = 2

description

description: string = `Maximal number of concurrent clones`

type

type: NUMBER = SettingsType.NUMBER

Generated using TypeDoc