-
Notifications
You must be signed in to change notification settings - Fork 9
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: put npm packument info in lockfile #42
base: main
Are you sure you want to change the base?
Conversation
)] | ||
pub struct MissingNpmPackageInfo; | ||
|
||
pub async fn transform4_to_5( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is async because this transform needs info about the npm packages (which might need to be downloaded). it's annoying because it infects the rest of the API for loading a lockfile
}) | ||
} | ||
|
||
pub fn new_current_version( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this to have a sync way to make a lockfile. if it needs to do the async transform, it returns an error (which the caller needs to handle). this is also useful for tests and other places where you know the lockfile is already on the latest version
async fn get_npm_package_info( | ||
&self, | ||
values: &[PackageNv], | ||
) -> Result<Vec<Lockfile5NpmInfo>, Box<dyn std::error::Error + Send + Sync>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a better error type
No description provided.