Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

registry-auth-token

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

registry-auth-token - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

CHANGELOG.md

2

index.js

@@ -15,3 +15,3 @@ var path = require('path')

pathname = parsed.pathname || '/'
var regUrl = '//' + parsed.hostname + pathname.replace(/\/$/, '')
var regUrl = '//' + parsed.host + pathname.replace(/\/$/, '')
var urlAlt = regUrl.slice(-1) === '/' ? regUrl : regUrl + '/'

@@ -18,0 +18,0 @@

{
"name": "registry-auth-token",
"version": "1.1.0",
"version": "1.1.1",
"description": "Get the auth token set for an npm registry (if any)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -47,2 +47,18 @@ var fs = require('fs')

it('should return auth token if registry url has port specified', function (done) {
var content = [
'registry=http://localhost:8770/',
// before the patch this token was selected.
'//localhost/:_authToken=ohno',
'//localhost:8770/:_authToken=beepboop', ''
].join('\n')
fs.writeFile(npmRcPath, content, function (err) {
var getAuthToken = requireUncached('./index')
assert(!err, err)
assert.equal(getAuthToken(), 'beepboop')
done()
})
})
it('should try with and without a slash at the end of registry url', function (done) {

@@ -49,0 +65,0 @@ var content = [

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