diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-10 17:57:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 17:57:10 +0100 |
commit | 53e974b276b095faf52918c4c6e988e9d2788cef (patch) | |
tree | 44b9807d87e90005f02192bb01e96ef053096f1a /cli/npm/resolvers/mod.rs | |
parent | fd32f75da997b805a4ba95c68b4aaeed9f020cb1 (diff) |
feat: remove --unstable flag requirement for npm: specifiers (#16473)
This commit makes "npm:" specifiers not require "--unstable" flag.
At the moment some APIs used by Node polyfills still require
"--unstable" which will be addressed in follow up PRs.
Diffstat (limited to 'cli/npm/resolvers/mod.rs')
-rw-r--r-- | cli/npm/resolvers/mod.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/cli/npm/resolvers/mod.rs b/cli/npm/resolvers/mod.rs index 6cd40594b..bc6cb4060 100644 --- a/cli/npm/resolvers/mod.rs +++ b/cli/npm/resolvers/mod.rs @@ -68,7 +68,6 @@ impl NpmProcessState { #[derive(Clone)] pub struct NpmPackageResolver { - unstable: bool, no_npm: bool, inner: Arc<dyn InnerNpmPackageResolver>, local_node_modules_path: Option<PathBuf>, @@ -80,7 +79,6 @@ pub struct NpmPackageResolver { impl std::fmt::Debug for NpmPackageResolver { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("NpmPackageResolver") - .field("unstable", &self.unstable) .field("no_npm", &self.no_npm) .field("inner", &"<omitted>") .field("local_node_modules_path", &self.local_node_modules_path) @@ -92,14 +90,12 @@ impl NpmPackageResolver { pub fn new( cache: NpmCache, api: RealNpmRegistryApi, - unstable: bool, no_npm: bool, local_node_modules_path: Option<PathBuf>, ) -> Self { Self::new_with_maybe_snapshot( cache, api, - unstable, no_npm, local_node_modules_path, None, @@ -142,7 +138,6 @@ impl NpmPackageResolver { fn new_with_maybe_snapshot( cache: NpmCache, api: RealNpmRegistryApi, - unstable: bool, no_npm: bool, local_node_modules_path: Option<PathBuf>, initial_snapshot: Option<NpmResolutionSnapshot>, @@ -170,7 +165,6 @@ impl NpmPackageResolver { )), }; Self { - unstable, no_npm, inner, local_node_modules_path, @@ -250,12 +244,6 @@ impl NpmPackageResolver { return Ok(()); } - if !self.unstable { - bail!( - "Unstable use of npm specifiers. The --unstable flag must be provided." - ) - } - if self.no_npm { let fmt_reqs = packages .iter() @@ -315,7 +303,6 @@ impl NpmPackageResolver { Self::new_with_maybe_snapshot( self.cache.clone(), self.api.clone(), - self.unstable, self.no_npm, self.local_node_modules_path.clone(), Some(self.snapshot()), |