refactor: upgrade to deno_npm 0.3.0 (#18671)

This allows us to specify the `@types/node` version constraint in the
CLI instead of in deno_npm.
This commit is contained in:
David Sherret 2023-04-13 10:47:45 -04:00 committed by GitHub
parent 2eb0f9fb5c
commit efa7c19890
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 59 additions and 31 deletions

View file

@ -1866,7 +1866,7 @@ console.log(b, "hello deno");
fn test_documents_refresh_dependencies_config_change() {
let npm_registry_api = CliNpmRegistryApi::new_uninitialized();
let npm_resolution =
NpmResolution::new(npm_registry_api.clone(), None, None);
NpmResolution::from_serialized(npm_registry_api.clone(), None, None);
// it should never happen that a user of this API causes this to happen,
// but we'll guard against it anyway

View file

@ -441,7 +441,7 @@ fn create_lsp_structs(
http_client,
progress_bar.clone(),
);
let resolution = NpmResolution::new(api.clone(), None, None);
let resolution = NpmResolution::from_serialized(api.clone(), None, None);
let fs_resolver = create_npm_fs_resolver(
npm_cache.clone(),
&progress_bar,
@ -697,7 +697,7 @@ impl Inner {
// create a new snapshotted npm resolution and resolver
let resolution = NpmResolution::new(
self.npm_api.clone(),
Some(self.npm_resolution.snapshot()),
self.npm_resolution.snapshot(),
None,
);
NpmPackageResolver::new(