synopkg 14.0.1

Consistent dependency versions in large JavaScript Monorepos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::specifier::Specifier;

#[derive(Debug, PartialEq)]
pub struct Url {
  /// - "http://insecure.com/foo.tgz"
  /// - "https://server.com/foo.tgz"
  /// - "https://server.com/foo.tgz"
  pub raw: String,
}

impl Url {
  pub fn create(raw: &str) -> Specifier {
    Specifier::Url(Self { raw: raw.to_string() })
  }
}