nodejs_package_managers 0.3.3

Helpers for npm, pnpm, yarn, and bun package managers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::LockfileDependency;
use crate::yarn::{YarnLock, YarnLockError};

pub type BunLockbError = YarnLockError;

pub struct BunLockb;

impl BunLockb {
    pub fn parse<T: AsRef<str>>(content: T) -> Result<Vec<LockfileDependency>, BunLockbError> {
        // Bun's lockfile is in yarn v1 format, so this is ok!
        YarnLock::parse(content)
    }
}