summaryrefslogtreecommitdiff
path: root/cli/npm/common.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/npm/common.rs')
-rw-r--r--cli/npm/common.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/cli/npm/common.rs b/cli/npm/common.rs
index bf45aa5b8..c55f73cd5 100644
--- a/cli/npm/common.rs
+++ b/cli/npm/common.rs
@@ -3,14 +3,6 @@
use deno_npm::npm_rc::RegistryConfig;
use reqwest::header;
-/// Gets the corresponding @types package for the provided package name.
-pub fn types_package_name(package_name: &str) -> String {
- debug_assert!(!package_name.starts_with("@types/"));
- // Scoped packages will get two underscores for each slash
- // https://github.com/DefinitelyTyped/DefinitelyTyped/tree/15f1ece08f7b498f4b9a2147c2a46e94416ca777#what-about-scoped-packages
- format!("@types/{}", package_name.replace('/', "__"))
-}
-
// TODO(bartlomieju): support more auth methods besides token and basic auth
pub fn maybe_auth_header_for_npm_registry(
registry_config: &RegistryConfig,
@@ -31,17 +23,3 @@ pub fn maybe_auth_header_for_npm_registry(
None
}
-
-#[cfg(test)]
-mod test {
- use super::types_package_name;
-
- #[test]
- fn test_types_package_name() {
- assert_eq!(types_package_name("name"), "@types/name");
- assert_eq!(
- types_package_name("@scoped/package"),
- "@types/@scoped__package"
- );
- }
-}