refactor(npm): push npm struct creation to a higher level (#18139)

This has been bothering me for a while and it became more painful while
working on #18136 because injecting the shared progress bar became very
verbose. Basically we should move the creation of all these npm structs
up to a higher level.

This is a stepping stone for a future refactor where we can improve how
we create all our structs.
This commit is contained in:
David Sherret 2023-03-12 23:32:59 -04:00 committed by GitHub
parent 8db853514c
commit bcb6ee9d08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 178 additions and 136 deletions

View file

@ -448,8 +448,7 @@ async fn create_main_worker_internal(
.add_package_reqs(vec![package_ref.req.clone()])
.await?;
let pkg_nv = ps
.npm_resolver
.resolution()
.npm_resolution
.resolve_pkg_id_from_pkg_req(&package_ref.req)?
.nv;
let node_resolution = node::node_resolve_binary_export(