refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)

This is required from BYONM (bring your own node_modules).

Part of #18967
This commit is contained in:
David Sherret 2023-09-28 16:43:45 -04:00 committed by GitHub
parent 0bd53fd52d
commit d43e48c4e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 360 additions and 263 deletions

View file

@ -268,7 +268,9 @@ fn resolve_npm_commands(
let mut result = HashMap::new();
let snapshot = npm_resolver.snapshot();
for id in snapshot.top_level_packages() {
let bin_commands = node_resolver.resolve_binary_commands(&id.nv)?;
let package_folder = npm_resolver.resolve_pkg_folder_from_pkg_id(id)?;
let bin_commands =
node_resolver.resolve_binary_commands(&package_folder)?;
for bin_command in bin_commands {
result.insert(
bin_command.to_string(),