node

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNode

func NewNode(baseURL, baseDir string) core.Language

Types

type Node

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

func (*Node) GetDefaultVersion

func (n *Node) GetDefaultVersion(ctx context.Context) *core.InstalledVersion

func (*Node) Install

func (n *Node) Install(ctx context.Context, version *core.RemoteVersion) error

func (*Node) ListInstalledVersions

func (n *Node) ListInstalledVersions(ctx context.Context) ([]*core.InstalledVersion, error)

func (*Node) ListRemoteVersions

func (n *Node) ListRemoteVersions(ctx context.Context) ([]*core.RemoteVersion, error)

func (*Node) Name

func (n *Node) Name() string

func (*Node) SetDefaultVersion

func (n *Node) SetDefaultVersion(ctx context.Context, version string) error

func (*Node) Uninstall

func (n *Node) Uninstall(ctx context.Context, version string) error

type Version

type Version struct {
	Version string   `json:"version"`
	Date    string   `json:"date"`
	Npm     string   `json:"npm"`
	LTS     any      `json:"lts"`
	Files   []string `json:"files"`
}

func (*Version) ConvertToLTS

func (v *Version) ConvertToLTS() string

Jump to

Keyboard shortcuts

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