summaryrefslogtreecommitdiff
path: root/cli/graph_util.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-11-13 10:42:15 -0500
committerGitHub <noreply@github.com>2022-11-13 10:42:15 -0500
commit2063ed7385712290d5f8e011145a58f7c95737e8 (patch)
treeea9ed19d5104fdcea44d0014f0b00770d523121b /cli/graph_util.rs
parentf81ad0b7c2ba85eeb99535189a6617af6488ff88 (diff)
feat(npm): require --unstable for npm specifiers in remote modules (#16612)
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r--cli/graph_util.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs
index cfd79d491..b919d5042 100644
--- a/cli/graph_util.rs
+++ b/cli/graph_util.rs
@@ -80,9 +80,7 @@ impl GraphData {
let mut has_npm_specifier_in_graph = false;
for (specifier, result) in graph.specifiers() {
- if specifier.scheme() == "npm"
- && NpmPackageReference::from_specifier(&specifier).is_ok()
- {
+ if NpmPackageReference::from_specifier(&specifier).is_ok() {
has_npm_specifier_in_graph = true;
continue;
}
@@ -230,9 +228,7 @@ impl GraphData {
for (dep_specifier, dep) in dependencies.iter().rev() {
// todo(dsherret): ideally there would be a way to skip external dependencies
// in the graph here rather than specifically npm package references
- if dep_specifier.starts_with("npm:")
- && NpmPackageReference::from_str(dep_specifier).is_ok()
- {
+ if NpmPackageReference::from_str(dep_specifier).is_ok() {
continue;
}