Skip to content

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jul 12, 2024

We can use this to immediately start downloading package tarballs and setting up the node_modules directory.

We can't send the package id or folder id here because we don't know that until the end of resolution, but that's fine because this allows us to start downloading and extracting the tarball to the global cache as well as setting up the non-copy folder at node_modules/.deno/<folder-id>/<package-name>/ where <folder-id> is just the package nv (folder-id with an index of 0). At the end we can then setup the copy folders.

Closes #24

@dsherret dsherret marked this pull request as draft July 13, 2024 00:32
@dsherret dsherret marked this pull request as ready for review July 13, 2024 19:55
#[allow(clippy::needless_lifetimes)] // clippy bug
pub async fn snapshot_from_lockfile<'a>(
params: SnapshotFromLockfileParams<'a>,
pub async fn snapshot_from_lockfile<'a, TNpmRegistryApi: NpmRegistryApi>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need events when resolving one of these from a lockfile, but we can add that in a separate PR.

Copy link
Member Author

@dsherret dsherret Jul 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted out from registry.rs. No changes other than pub(crate) on matches_os_or_cpu_vec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Events for resolved npm packages

1 participant