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.
- Workspace
Info - Result of workspace detection.
Enums§
- Runner
- Supported package managers.
- Workspace
Type - Type of workspace configuration.
- Workspaces
Config - 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.