Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: event for a resolved package nv #59

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

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

src/registry.rs Outdated Show resolved Hide resolved
@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
@@ -903,36 +904,39 @@ pub struct SnapshotFromLockfileParams<'a> {
/// [`IncompleteSnapshot`] instance that's passed as the first argument for this
/// function.
#[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