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

confortable

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

confortable - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

11

confortable.js
var exists = require('fs').existsSync
, path = require('path');
, path = require('path')
, HOME;
var withinHome = function (dir) {
return (path.relative(process.env.HOME, dir).slice(0, 2) !== '..');
return (path.relative(HOME, dir).slice(0, 2) !== '..');
};
var findFromStart = function (name, start) {
// set HOME in here, so that tests can monkey-patch process.env.HOME
HOME = process.env.HOME || process.env.HOMEDRIVE + process.env.HOMEPATH;
start = start || process.cwd();
var relative = path.relative(process.env.HOME, start)
var relative = path.relative(HOME, start)
, noRelation = (relative === start) // i.e. different drive or undefined HOME

@@ -17,3 +20,3 @@ , isAbove = (relative.slice(0, 2) === '..');

var startCfg = path.join(start, name)
, homeCfg = path.join(process.env.HOME, name);
, homeCfg = path.join(HOME, name);

@@ -20,0 +23,0 @@ if (exists(startCfg)) {

@@ -0,1 +1,5 @@

0.2.1 / 2013-04-10
==================
* Better windows support by using env.HOMEDIR and env.HOMEDRIVE (thanks agsh)
0.2.0 / 2012-10-26

@@ -2,0 +6,0 @@ ==================

@@ -5,3 +5,3 @@ {

"description": "Finds the right recursively placed config file",
"version": "0.2.0",
"version": "0.2.1",
"repository": {

@@ -20,3 +20,3 @@ "type": "git",

"scripts": {
"test": "tap ./test"
"test": "tap ./test/*.js"
},

@@ -23,0 +23,0 @@ "devDependencies": {

@@ -31,3 +31,3 @@ # Confortable [![Build Status](https://secure.travis-ci.org/clux/confortable.png)](http://travis-ci.org/clux/confortable)

```bash
$ npm install conf
$ npm install confortable
```

@@ -34,0 +34,0 @@

@@ -17,3 +17,3 @@ var conf = require('../')

, join(cwd, name)
]
];

@@ -42,3 +42,3 @@ fs.writeFileSync(files[0], "{}");

, join(cwd, name)
]
];

@@ -45,0 +45,0 @@ fs.writeFileSync(files[0], "{}");

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