Parse an eryx.toml source string.
@eryx/project Module
Project manifest and lockfile helpers.
As the project manifest is a TOML file, programmatic changes can cause a complete re-formatting of the file. As such, this library exposes a CST view for the manifest, and is it strongly recommended to make edits within the CST view. See the toml documentation for more details on this.
Summary
Functions
API Reference
Functions
project.load
Load an eryx.toml file. Defaults to ./eryx.toml.
project.find
Find the nearest eryx.toml, searching upward from start or the current
working directory. Returns nil when no project manifest is found.
project.loadNearest
Load the nearest project manifest, searching upward from start or the
current working directory.
project.getTool
Return a third-party [tool.<name>] table from a parsed manifest document.
The returned value is read from the CST-backed document so callers can inspect
the exact currently loaded config without Eryx validating that tool's schema.
project.encode
Encode a manifest document. Unchanged CST documents round-trip exactly; changed CST documents preserve as much source formatting as the TOML CST encoder can patch.
project.save
Write a manifest document to disk. Defaults to the path it was loaded from,
or ./eryx.toml for documents created from a string.
lock.load
Load an eryx.lock file. If rootOrPath is a directory, eryx.lock inside
that directory is loaded. If it is a file path, that file is loaded.
lock.exists
Return whether a lockfile exists for a project root.
lock.save
Write a lockfile document to disk. Defaults to the path it was loaded from,
or ./eryx.lock for documents created from a string.
Types
Author
ProjectMetadata
Links
GitDependency
Represents a dependency that is available on git
Exactly one of rev, tag or branch must be specified
PathDependency
Represents a dependency that is on the local filesystem
This dependency will not be copied, and is only referenced as an alias. A child eryx.toml is ignored.
LocalDependency
Represents a dependency that is on the local filesystem
The contents of this dependency will be copied to the local project, and any root eryx.toml will be used for child dependency resolution
UrlDependency
Represents a dependency that is a downloadable archive
The archive may optionally include an eryx.toml, which will be used for child depdendency resolution
RepositoryDependency
Represents a package available on a repository