pub enum NpmPkgManager {
Npm,
Pnpm,
YarnClassic,
YarnBerryPnP,
Bun,
Unknown,
}Expand description
Identified Node.js package manager / layout flavor.
Variants§
Npm
node_modules/ present, no other markers. Default assumption.
Pnpm
pnpm content-store layout (node_modules/.modules.yaml or
node_modules/.pnpm/). Patching is safe via CoW; the operator
gets a heads-up event.
YarnClassic
yarn classic — yarn.lock present, real node_modules/, no
PnP loader. Behaves like npm at the FS level.
YarnBerryPnP
yarn-berry with Plug’n’Play (.pnp.cjs present). Packages
live inside .yarn/cache/*.zip. Apply must refuse.
Bun
bun-managed project — bun.lock (text, current default) or
bun.lockb (binary, legacy) at the project root. Bun
hard-links from ~/.bun/install/cache/ into node_modules/
by default on Linux/macOS, so apply must CoW the link before
rewriting (handled generically by break_hardlink_if_needed).
The operator gets a heads-up event so it’s clear which package
manager the patch landed against.
Unknown
No discernible package manager — empty or non-Node project.
Trait Implementations§
Source§impl Clone for NpmPkgManager
impl Clone for NpmPkgManager
Source§fn clone(&self) -> NpmPkgManager
fn clone(&self) -> NpmPkgManager
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NpmPkgManager
impl Debug for NpmPkgManager
Source§impl PartialEq for NpmPkgManager
impl PartialEq for NpmPkgManager
Source§fn eq(&self, other: &NpmPkgManager) -> bool
fn eq(&self, other: &NpmPkgManager) -> bool
self and other values to be equal, and is used by ==.impl Copy for NpmPkgManager
impl Eq for NpmPkgManager
impl StructuralPartialEq for NpmPkgManager
Auto Trait Implementations§
impl Freeze for NpmPkgManager
impl RefUnwindSafe for NpmPkgManager
impl Send for NpmPkgManager
impl Sync for NpmPkgManager
impl Unpin for NpmPkgManager
impl UnsafeUnpin for NpmPkgManager
impl UnwindSafe for NpmPkgManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more