tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
prefetch-npm-deps: instrument some logging
Lily Foster
2 years ago
daec4bf7
81ed58b0
+5
1 changed file
expand all
collapse all
unified
split
pkgs
build-support
node
fetch-npm-deps
src
parse
mod.rs
+5
pkgs/build-support/node/fetch-npm-deps/src/parse/mod.rs
···
1
use anyhow::{anyhow, bail, Context};
2
use lock::UrlOrString;
0
3
use rayon::prelude::*;
4
use serde_json::{Map, Value};
5
use std::{
···
19
force_git_deps: bool,
20
force_empty_cache: bool,
21
) -> anyhow::Result<Vec<Package>> {
0
0
22
let mut packages = lock::packages(content)
23
.context("failed to extract packages from lockfile")?
24
.into_par_iter()
···
45
};
46
47
let path = dir.path().join("package");
0
0
48
49
let lockfile_contents = fs::read_to_string(path.join("package-lock.json"));
50
···
1
use anyhow::{anyhow, bail, Context};
2
use lock::UrlOrString;
3
+
use log::{debug, info};
4
use rayon::prelude::*;
5
use serde_json::{Map, Value};
6
use std::{
···
20
force_git_deps: bool,
21
force_empty_cache: bool,
22
) -> anyhow::Result<Vec<Package>> {
23
+
debug!("parsing lockfile with contents:\n{content}");
24
+
25
let mut packages = lock::packages(content)
26
.context("failed to extract packages from lockfile")?
27
.into_par_iter()
···
48
};
49
50
let path = dir.path().join("package");
51
+
52
+
info!("recursively parsing lockfile for {} at {path:?}", pkg.name);
53
54
let lockfile_contents = fs::read_to_string(path.join("package-lock.json"));
55