Expand description
§monochange_npm
monochange_npm discovers npm-family packages and normalizes them for shared planning.
Reach for this crate when you want one adapter for npm, pnpm, and Bun workspaces that emits monochange_core package and dependency records.
§Why use it?
- discover several JavaScript package-manager layouts with one crate
- normalize workspace metadata into the same graph used by the rest of
monochange - capture dependency edges from
package.jsonandpnpm-workspace.yaml
§Best for
- scanning JavaScript or TypeScript monorepos into normalized package records
- supporting npm, pnpm, and Bun with one discovery surface
- feeding JS workspace topology into shared planning code
§Public entry points
discover_npm_packages(root)discovers npm, pnpm, and Bun workspaces plus standalone packagesNpmAdapterexposes the shared adapter interface
§Scope
package.jsonworkspacespnpm-workspace.yaml- Bun lockfile detection
- normalized dependency extraction
Re-exports§
pub use analysis::NpmSemanticAnalyzer;pub use analysis::semantic_analyzer;
Modules§
Structs§
- NpmAdapter
- Shared npm-family ecosystem adapter.
Enums§
Constants§
Functions§
- adapter
- Return the shared npm-family ecosystem adapter.
- append_
npm_ trust_ environment_ arg - build_
npm_ trust_ command - default_
dependency_ fields - Return the manifest fields that usually contain dependency versions.
- default_
dependency_ version_ prefix - default_
lockfile_ commands - Return the default lockfile refresh commands for
package. - discover_
lockfiles - Discover lockfiles that should be refreshed for
package. - discover_
npm_ packages - Discover npm, pnpm, and Bun packages rooted at
root. - load_
configured_ npm_ package - Load one explicitly configured npm package without recursively scanning the repo.
- render_
npm_ trust_ command - supported_
versioned_ file_ kind - Classify an npm-family versioned file path.
- update_
bun_ lock - Update text-based Bun lockfiles by replacing package version literals.
- update_
bun_ lock_ binary - Update a binary
bun.lockbfile in place. - update_
json_ dependency_ fields - Update dependency sections inside a parsed
package.json-style value. - update_
package_ lock - Update versions embedded in a parsed
package-lock.jsondocument. - update_
pnpm_ lock - Update versions embedded in a parsed
pnpm-lock.yamlmapping. - update_
pnpm_ lock_ text - Update
pnpm-lock.yamltext in place using direct YAML-aware replacements. - validate_
versioned_ file - Return the default dependency-version prefix for this ecosystem. Validate that an npm/deno versioned file contains a readable version field.
- write_
npm_ placeholder_ manifest