gazelle

package
v1.502.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePnpmLockFileDependencies

func ParsePnpmLockFileDependencies(lockfilePath string) map[string]map[string]string

Types

type PnpmLockfile

type PnpmLockfile struct {
	Dependencies         map[string]string
	DevDependencies      map[string]string `yaml:"devDependencies"`
	PeerDependencies     map[string]string `yaml:"peerDependencies"`
	OptionalDependencies map[string]string `yaml:"optionalDependencies"`

	Importers map[string]struct {
		Dependencies         map[string]string
		DevDependencies      map[string]string `yaml:"devDependencies"`
		PeerDependencies     map[string]string `yaml:"peerDependencies"`
		OptionalDependencies map[string]string `yaml:"optionalDependencies"`
	}
}
  Example pnpm-lock.yaml with workspaces

  ```
	lockfileVersion: 5.4
	specifiers:
		'@aspect-test/c': ^2.0.2
  		jquery: 3.6.1
	dependencies:
		'@aspect-test/c': 2.0.2
	devDependencies:
		jquery: 3.6.1
	packages:
		/@aspect-test/c/2.0.2:
			...
		...
	...
  ```

  or with pnpm-workspaces.yaml:

  ```
	lockfileVersion: 5.4
	importers:
		.:
			specifiers:
				'@aspect-test/a': ^2.0.2
			dependencies:
				'@aspect-test/a': ^2.0.2
		gazelle/ts/tests/simple_json_import:
			specifiers: {}
		infrastructure/cdn:
			specifiers:
				'@aspect-test/c': ^2.0.2
			dependencies:
				'@aspect-test/c': ^2.0.2
	packages:
		/@aspect-test/c/2.0.2:
			...
		...
	...
  ```

type PnpmProject

type PnpmProject struct {
	// contains filtered or unexported fields
}

A pnpm project and its package dependencies

func (*PnpmProject) AddPackage

func (p *PnpmProject) AddPackage(pkg string, label *label.Label)

func (*PnpmProject) Get

func (p *PnpmProject) Get(pkg string) *label.Label

func (*PnpmProject) IsReferenced

func (p *PnpmProject) IsReferenced() bool

func (*PnpmProject) Parent

func (p *PnpmProject) Parent() *PnpmProject

func (*PnpmProject) Pkg

func (p *PnpmProject) Pkg() string

type PnpmProjectMap

type PnpmProjectMap struct {
	// contains filtered or unexported fields
}

A global map of pnpm projects across the bazel workspace. Projects may be from across multiple pnpm workspaces.

func NewPnpmProjectMap

func NewPnpmProjectMap() *PnpmProjectMap

PnpmProjectMap ----------------------------------------------------------

func (*PnpmProjectMap) GetProject

func (pm *PnpmProjectMap) GetProject(project string) *PnpmProject

func (*PnpmProjectMap) IsProject

func (pm *PnpmProjectMap) IsProject(project string) bool

func (*PnpmProjectMap) IsReferenced

func (pm *PnpmProjectMap) IsReferenced(project string) bool

func (*PnpmProjectMap) NewWorkspace

func (pm *PnpmProjectMap) NewWorkspace(lockfile string) *PnpmWorkspace

type PnpmWorkspace

type PnpmWorkspace struct {
	// contains filtered or unexported fields
}

A pnpm workspace and its projects

func (*PnpmWorkspace) AddProject

func (w *PnpmWorkspace) AddProject(pkg string) *PnpmProject

func (*PnpmWorkspace) AddReference

func (w *PnpmWorkspace) AddReference(pkg, linkTo string)

func (*PnpmWorkspace) IsReferenced

func (w *PnpmWorkspace) IsReferenced(project string) bool

func (*PnpmWorkspace) Root

func (w *PnpmWorkspace) Root() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL