New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

repo-url

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

repo-url - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

9

index.js

@@ -14,3 +14,4 @@ var Client = require('silent-npm-registry-client');

if (err) return fn(err);
fn(null, repo.url);
fn(null, repo.url
.replace(/^git\+/, ''));
});

@@ -23,9 +24,6 @@ }

fn(null, repo.url
.replace('git://github.com/', 'git@github.com:'));
.replace(/^.*github.com\//, 'git@github.com:'));
});
};
// git://github.com/juliangruber/repo-url(.git)
// https://github.com/juliangruber/repo-url.git
repoUrl.https = function (module, fn) {

@@ -35,2 +33,3 @@ getRepository(module, function (err, repo) {

fn(null, repo.url
.replace(/^git\+/, '')
.replace('git://', 'https://'));

@@ -37,0 +36,0 @@ });

{
"name": "repo-url",
"description": "Get a npm package's repo url, with convenient cli.",
"version": "0.1.0",
"version": "0.2.0",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

@@ -1,2 +0,1 @@

# repo-url

@@ -27,3 +26,3 @@

```bash
```
$ repo-url [OPTIONS] [MODULE]

@@ -30,0 +29,0 @@

@@ -19,1 +19,17 @@ var repoUrl = require('..');

});
test('git+https repo url', function (t) {
t.plan(2);
repoUrl('gulp', function (err, url) {
t.error(err);
t.equal(url, 'https://github.com/gulpjs/gulp.git');
});
});
test('git+https to ssh repo url', function (t) {
t.plan(2);
repoUrl.ssh('gulp', function (err, url) {
t.error(err);
t.equal(url, 'git@github.com:gulpjs/gulp.git');
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc