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(unstable/pm): support npm packages in 'deno add' #22715
Conversation
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.
Good job, this looks good to me. I'll leave it to David to do a final pass.
.map_err(|_| anyhow!("Custom jsr URL cannot be a base."))? | ||
.pop_if_empty() | ||
.push("packages"); | ||
let mut search_url = jsr_api_url().join("packages")?; |
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.
Nice clean up
let range_symbol = if req.version_req.version_text().starts_with('~') { | ||
'~' | ||
} else { | ||
'^' | ||
}; |
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.
TIOLI: factor out to a common function to remove duplication?
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.
Great! LGTM!
Please land with |
Also moves the cache for npm package metadata endpoints from
$DENO_DIR/registries
to the normal http cache like we use for jsr. It's slightly more convenient.