workspace

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.0.5

type Option func(*Workspace)

Option configures workspace behavior.

func WithNodeStrictWorkspace added in v0.0.5

func WithNodeStrictWorkspace(enabled bool) Option

WithNodeStrictWorkspace limits Node discovery to workspace manifests only.

type ProjectConfig added in v0.0.5

type ProjectConfig struct {
	Name       string
	Path       string
	ModulePath string
	Version    string
}

ProjectConfig represents a project configuration

type Workspace

type Workspace struct {
	RootPath     string
	WorkFilePath string
	Projects     []*models.Project
	// contains filtered or unexported fields
}

Workspace represents a workspace containing Go and/or Node projects.

func New

func New(fs filesystem.FileSystem, options ...Option) *Workspace

New creates a new Workspace instance.

func (*Workspace) ChangesetDir

func (w *Workspace) ChangesetDir() string

ChangesetDir returns the path to the .changeset directory.

func (*Workspace) Detect

func (w *Workspace) Detect() error

Detect finds and loads the workspace from the current directory.

func (*Workspace) GetProject

func (w *Workspace) GetProject(name string) (*models.Project, error)

GetProject returns a project by name.

func (*Workspace) GetProjectNames

func (w *Workspace) GetProjectNames() []string

GetProjectNames returns a list of all project names.

type WorkspaceBuilder added in v0.0.5

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

WorkspaceBuilder helps create test workspaces

func NewWorkspaceBuilder added in v0.0.5

func NewWorkspaceBuilder(root string) *WorkspaceBuilder

NewWorkspaceBuilder creates a new WorkspaceBuilder

func (*WorkspaceBuilder) AddChangelog added in v0.0.5

func (wb *WorkspaceBuilder) AddChangelog(project, content string) *WorkspaceBuilder

AddChangelog adds a changelog for a project

func (*WorkspaceBuilder) AddChangeset added in v0.0.5

func (wb *WorkspaceBuilder) AddChangeset(id, project, bump, message string) *WorkspaceBuilder

AddChangeset adds a changeset to the workspace

func (*WorkspaceBuilder) AddProject added in v0.0.5

func (wb *WorkspaceBuilder) AddProject(name, path, modulePath string) *WorkspaceBuilder

AddProject adds a project to the workspace

func (*WorkspaceBuilder) Build added in v0.0.5

Build finalizes the workspace and returns the filesystem

func (*WorkspaceBuilder) DisableProject added in v0.0.5

func (wb *WorkspaceBuilder) DisableProject(project string) *WorkspaceBuilder

DisableProject disables a project (sets version.txt to "false")

func (*WorkspaceBuilder) FileSystem added in v0.0.5

func (wb *WorkspaceBuilder) FileSystem() *filesystem.MockFileSystem

FileSystem returns the mock filesystem

func (*WorkspaceBuilder) SetVersion added in v0.0.5

func (wb *WorkspaceBuilder) SetVersion(project, version string) *WorkspaceBuilder

SetVersion sets the version for a project

Jump to

Keyboard shortcuts

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