Options
All
  • Public
  • Public/Protected
  • All
Menu

Package plugin-github

@yarnpkg/plugin-github

This plugin improves the performances when cloning packages from Git by making use of the hosted GitHub API.

Install

This plugin is included by default in Yarn.

Type aliases

ParsedGithubUrl

ParsedGithubUrl: object

Type declaration

  • Optional auth?: undefined | string
  • reponame: string
  • treeish: string
  • username: string

Variables

Const githubPatterns

githubPatterns: RegExp[] = [/^https?:\/\/(?:([^/]+?)@)?github.com\/([^\/#]+)\/([^\/#]+)\/tarball\/([^\/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^\/#]+)\/([^\/#]+?)(?:\.git)?(?:#(.*))?$/,]

Const invalidScenarios

invalidScenarios: object[] = [{url: 'shttp://github.com/owner/repo.git#master',}, {url: 'got://github.com/owner/repo#ff786f9f',}, {url: 'git://github.com/owner/repo',}, {url: 'http://github.com/owner',}]

Const validScenarios

validScenarios: (object | object)[] = [{url: 'http://github.com/owner/repo.git',auth: undefined, username: 'owner', reponame: 'repo', treeish: `master`,}, {url: 'https://github.com/owner/repo.git',auth: undefined, username: 'owner', reponame: 'repo', treeish: `master`,}, {url: 'https://yarnpkg::;*%$:@github.com/owner/repo.git',auth: `yarnpkg::;*%$:`, username: 'owner', reponame: 'repo', treeish: `master`,}, {url: 'https://yarnpkg:$fooABC@:@github.com/owner/repo.git',auth: `yarnpkg:$fooABC@:`, username: 'owner', reponame: 'repo', treeish: `master`,}, {url: 'https://yarnpkg:password@github.com/owner/repo.git',auth: `yarnpkg:password`, username: 'owner', reponame: 'repo', treeish: `master`,}, {url: 'https://github.com/owner/repo.git#commit:abcdef',auth: undefined, username: 'owner', reponame: 'repo', treeish: `abcdef`,}, {url: 'https://github.com/owner/repo.git#abcdef',auth: undefined, username: 'owner', reponame: 'repo', treeish: `abcdef`,}]

Functions

invalidGithubUrlMessage

  • invalidGithubUrlMessage(url: string): string

isGithubUrl

  • isGithubUrl(url: string): boolean

parseGithubUrl

Object literals

Const plugin

plugin: object

hooks

hooks: object

fetchHostedRepository

  • fetchHostedRepository(previous: null | object, locator: Locator, opts: object & object): Promise<null | object | object>

Generated using TypeDoc