Documentation ¶
Index ¶
- type NoWorkspacesFoundError
- type PackageManager
- func (pm PackageManager) GetWorkspaceIgnores(rootpath turbopath.AbsoluteSystemPath) ([]string, error)
- func (pm PackageManager) GetWorkspaces(rootpath turbopath.AbsoluteSystemPath) ([]string, error)
- func (pm PackageManager) ReadLockfile(projectDirectory turbopath.AbsoluteSystemPath, rootPackageJSON *fs.PackageJSON) (lockfile.Lockfile, error)
- type PackageType
- type Pnpm6Workspaces
- type PnpmWorkspaces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoWorkspacesFoundError ¶
type NoWorkspacesFoundError struct{}
NoWorkspacesFoundError is a custom error used so that upstream implementations can switch on it
func (*NoWorkspacesFoundError) Error ¶
func (e *NoWorkspacesFoundError) Error() string
type PackageManager ¶
type PackageManager struct { // The descriptive name of the Package Manager. Name string // The unique identifier of the Package Manager. Slug string // The command used to invoke the Package Manager. Command string // The location of the package spec file used by the Package Manager. Specfile string // The location of the package lock file used by the Package Manager. Lockfile string // The directory in which package assets are stored by the Package Manager. PackageDir string // The location of the file that defines the workspace. Empty if workspaces defined in package.json WorkspaceConfigurationPath string // The separator that the Package Manger uses to identify arguments that // should be passed through to the underlying script. ArgSeparator func(userArgs []string) []string // Gets lockfile name. GetLockfileName func(projectDirectory turbopath.AbsoluteSystemPath) string // Gets lockfile path. GetLockfilePath func(projectDirectory turbopath.AbsoluteSystemPath) turbopath.AbsoluteSystemPath // Read from disk a lockfile for a package manager. GetLockfileContents func(projectDirectory turbopath.AbsoluteSystemPath) ([]byte, error) // Read a lockfile for a given package manager UnmarshalLockfile func(rootPackageJSON *fs.PackageJSON, contents []byte) (lockfile.Lockfile, error) // contains filtered or unexported fields }
PackageManager is an abstraction across package managers
func GetPackageManager ¶
func GetPackageManager(name string) (packageManager *PackageManager, err error)
GetPackageManager reads the package manager name sent by the Rust side
func (PackageManager) GetWorkspaceIgnores ¶
func (pm PackageManager) GetWorkspaceIgnores(rootpath turbopath.AbsoluteSystemPath) ([]string, error)
GetWorkspaceIgnores returns an array of globs not to search for workspaces.
func (PackageManager) GetWorkspaces ¶
func (pm PackageManager) GetWorkspaces(rootpath turbopath.AbsoluteSystemPath) ([]string, error)
GetWorkspaces returns the list of package.json files for the current repository.
func (PackageManager) ReadLockfile ¶
func (pm PackageManager) ReadLockfile(projectDirectory turbopath.AbsoluteSystemPath, rootPackageJSON *fs.PackageJSON) (lockfile.Lockfile, error)
ReadLockfile will read the applicable lockfile into memory
type PackageType ¶
type PackageType string
PackageType represents the mode in which turbo is running.
const ( // Single is for single-package mode. Single PackageType = "single" // Multi is for monorepo mode. Multi PackageType = "multi" )
func InferRoot ¶
func InferRoot(directory turbopath.AbsoluteSystemPath) (turbopath.AbsoluteSystemPath, PackageType)
InferRoot identifies which directory we should treat as the root, and which mode turbo should be in when operating at that directory.
type Pnpm6Workspaces ¶
type Pnpm6Workspaces struct {
Packages []string `yaml:"packages,omitempty"`
}
Pnpm6Workspaces is a representation of workspace package globs found in pnpm-workspace.yaml
type PnpmWorkspaces ¶
type PnpmWorkspaces struct {
Packages []string `yaml:"packages,omitempty"`
}
PnpmWorkspaces is a representation of workspace package globs found in pnpm-workspace.yaml