Module package

Module package 

Source
Expand description

Package.json parsing and package manager detection. Package module for nrs.

Handles package.json parsing, script extraction, and package manager detection.

Re-exports§

pub use scripts::parse_package_json;
pub use scripts::parse_scripts;
pub use scripts::parse_scripts_from_json;
pub use scripts::parse_scripts_required;

Modules§

scripts
Script parsing from package.json.

Structs§

NtlConfig
NTL configuration structure.
Package
Parsed package.json structure.
Script
A script defined in package.json.
Scripts
Collection of scripts from a project.
Workspace
Represents a workspace in a monorepo.
WorkspaceInfo
Result of workspace detection.

Enums§

Runner
Supported package managers.
WorkspaceType
Type of workspace configuration.
WorkspacesConfig
Workspaces configuration.

Constants§

LIFECYCLE_SCRIPTS
Lifecycle scripts that are hidden by default.

Functions§

detect_runner
Detect the package manager for a project.
detect_runner_reason
Detect the package manager for a project and return the reason for the detection.
detect_workspace_info
Detect workspace configuration and return detailed info.
detect_workspaces
Detect workspaces in a monorepo.
extract_descriptions
Extract descriptions from all available sources in a Package.
get_description
Get the display description for a script.
get_short_description
Get a short description, truncated if necessary.
has_lock_file
Check if a specific lock file exists in the project directory.
is_lifecycle_script
Check if a script name is a lifecycle script.
is_monorepo
Check if a directory is a monorepo root.