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

npm-profile

Package Overview
Dependencies
Maintainers
6
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-profile - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

19

lib/index.js

@@ -7,2 +7,3 @@ 'use strict'

const { URL } = require('url')
const log = require('proc-log')

@@ -14,3 +15,3 @@ // try loginWeb, catch the "not supported" message and fall back to couch

if (er instanceof WebLoginNotSupported) {
process.emit('log', 'verbose', 'web login not supported, trying couch')
log.verbose('web login not supported, trying couch')
return prompter(creds)

@@ -28,3 +29,3 @@ .then(data => loginCouch(data.username, data.password, opts))

if (er instanceof WebLoginNotSupported) {
process.emit('log', 'verbose', 'web adduser not supported, trying couch')
log.verbose('web adduser not supported, trying couch')
return prompter(creds)

@@ -39,3 +40,3 @@ .then(data => adduserCouch(data.username, data.email, data.password, opts))

const adduserWeb = (opener, opts = {}) => {
process.emit('log', 'verbose', 'web adduser', 'before first POST')
log.verbose('web adduser', 'before first POST')
return webAuth(opener, opts, { create: true })

@@ -45,3 +46,3 @@ }

const loginWeb = (opener, opts = {}) => {
process.emit('log', 'verbose', 'web login', 'before first POST')
log.verbose('web login', 'before first POST')
return webAuth(opener, opts, {})

@@ -70,3 +71,3 @@ }

const { doneUrl, loginUrl } = content
process.emit('log', 'verbose', 'web auth', 'got response', content)
log.verbose('web auth', 'got response', content)
if (!isValidUrl(doneUrl) || !isValidUrl(loginUrl)) {

@@ -77,3 +78,3 @@ throw new WebLoginInvalidResponse('POST', res, content)

}).then(({ doneUrl, loginUrl }) => {
process.emit('log', 'verbose', 'web auth', 'opening url pair')
log.verbose('web auth', 'opening url pair')
return opener(loginUrl).then(

@@ -131,3 +132,3 @@ () => webAuthCheckLogin(doneUrl, { ...opts, cache: false })

}
process.emit('log', 'verbose', 'adduser', 'before first PUT', logObj)
log.verbose('adduser', 'before first PUT', logObj)

@@ -158,5 +159,5 @@ const target = '/-/user/org.couchdb.user:' + encodeURIComponent(username)

}
process.emit('log', 'verbose', 'login', 'before first PUT', logObj)
log.verbose('login', 'before first PUT', logObj)
const target = '-/user/org.couchdb.user:' + encodeURIComponent(username)
const target = '/-/user/org.couchdb.user:' + encodeURIComponent(username)
return fetch.json(target, {

@@ -163,0 +164,0 @@ ...opts,

{
"name": "npm-profile",
"version": "6.0.0",
"version": "6.0.1",
"description": "Library for updating an npmjs.com profile",

@@ -9,3 +9,4 @@ "keywords": [],

"dependencies": {
"npm-registry-fetch": "^12.0.0"
"npm-registry-fetch": "^12.0.2",
"proc-log": "^2.0.0"
},

@@ -22,5 +23,5 @@ "main": "./lib/index.js",

"devDependencies": {
"@npmcli/template-oss": "^2.5.1",
"nock": "^13.2.1",
"tap": "^15.1.5"
"@npmcli/template-oss": "^2.7.1",
"nock": "^13.2.4",
"tap": "^15.1.6"
},

@@ -36,3 +37,4 @@ "scripts": {

"postlint": "npm-template-check",
"lintfix": "npm run lint -- --fix"
"lintfix": "npm run lint -- --fix",
"template-copy": "npm-template-copy --force"
},

@@ -46,4 +48,4 @@ "tap": {

"templateOSS": {
"version": "2.5.1"
"version": "2.7.1"
}
}

@@ -529,10 +529,11 @@ # npm-profile

This modules logs by emitting `log` events on the global `process` object.
This modules logs by emitting `log` events on the global `process` object
via [`proc-log`](https://www.npmjs.com/package/proc-log).
These events look like this:
```js
process.emit('log', 'loglevel', 'feature', 'message part 1', 'part 2', 'part 3', 'etc')
procLog[loglevel]('feature', 'message part 1', 'part 2', 'part 3', 'etc')
```
`loglevel` can be one of: `error`, `warn`, `notice`, `http`, `timing`, `info`, `verbose`, and `silly`.
`loglevel` can be one of: `error`, `warn`, `notice`, `http`, `info`, `verbose`, and `silly`.

@@ -546,3 +547,3 @@ `feature` is any brief string that describes the component doing the logging.

```js
process.emit('log', 'http', 'request', '→', conf.method || 'GET', conf.target)
procLog.http('request', '→', conf.method || 'GET', conf.target)
```

@@ -553,6 +554,5 @@

```js
const log = require('npmlog')
process.on('log', function (level) {
return log[level].apply(log, [].slice.call(arguments, 1))
process.on('log', (level, feature, ...args) => {
console.log(level, feature, ...args)
})
```
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