Socket
Socket
Sign inDemoInstall

@npmcli/config

Package Overview
Dependencies
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcli/config - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

4

lib/parse-field.js

@@ -18,3 +18,3 @@ // Parse a field, coercing it to the best type available.

const isBool = typeList.has(typeDefs.Boolean.type)
const isString = typeList.has(typeDefs.String.type)
const isString = isPath || typeList.has(typeDefs.String.type)
const isUmask = typeList.has(typeDefs.Umask.type)

@@ -42,3 +42,3 @@ const isNumber = typeList.has(typeDefs.Number.type)

// otherwise, parse these values out
if (!isString) {
if (!isString && !isPath && !isNumber) {
switch (f) {

@@ -45,0 +45,0 @@ case 'true': return true

@@ -13,2 +13,9 @@ const nopt = require('nopt')

const noptValidatePath = nopt.typeDefs.path.validate
const validatePath = (data, k, val) => {
if (typeof val !== 'string')
return false
return noptValidatePath(data, k, val)
}
// add descriptions so we can validate more usefully

@@ -33,2 +40,3 @@ module.exports = {

...nopt.typeDefs.path,
validate: validatePath,
description: 'valid filesystem path',

@@ -35,0 +43,0 @@ },

{
"name": "@npmcli/config",
"version": "1.2.3",
"version": "1.2.4",
"files": [

@@ -5,0 +5,0 @@ "lib"

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