Socket
Socket
Sign inDemoInstall

app-conf

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-conf - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

15

entries.js

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

var j = require('path').join
var realpath = require('fs-promise').realpath
var resolvePath = require('path').resolve

@@ -18,8 +19,12 @@

var realpathCache = {}
function readFile (path) {
return fs$readFile(path).then(function (buffer) {
return {
path: path,
content: buffer
}
return realpath(path, realpathCache).then(function (path) {
return fs$readFile(path).then(function (buffer) {
return {
path: path,
content: buffer
}
})
})

@@ -26,0 +31,0 @@ }

@@ -31,6 +31,7 @@ 'use strict'

function fixPaths (value, base) {
var RELATIVE_PATH_RE = /^\.{1,2}[/\\]/
function resolveRelativePaths (value, base) {
var path
if (isString(value)) {
if (isString(value) && RELATIVE_PATH_RE.test(value)) {
path = resolvePath(base, value)

@@ -48,3 +49,3 @@

var promises = map(value, function (item, key) {
return fixPaths(item, base).then(function (item) {
return resolveRelativePaths(item, base).then(function (item) {
value[key] = item

@@ -81,3 +82,3 @@ })

return Bluebird.try(unserialize, [file]).then(function (value) {
return fixPaths(value, dirname(file.path))
return resolveRelativePaths(value, dirname(file.path))
}).catch(UnknownFormatError, unknownFormatHandler)

@@ -84,0 +85,0 @@ }).each(function (value) {

{
"name": "app-conf",
"version": "0.3.5",
"version": "0.3.6",
"description": "",

@@ -8,3 +8,3 @@ "keywords": [],

"lint": "standard",
"test": "mocha --require must index.spec.js"
"test": "npm run lint && mocha --require must index.spec.js"
},

@@ -39,3 +39,2 @@ "repository": {

"lodash.isstring": "^3",
"lodash.keys": "^3",
"lodash.map": "^3",

@@ -42,0 +41,0 @@ "lodash.merge": "^3",

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