Comparing version 1.0.6 to 1.0.7
11
index.js
@@ -32,2 +32,8 @@ 'use strict'; | ||
function safe(fn) { | ||
try { | ||
fn(); | ||
} catch (e) {} | ||
} | ||
function _resolve(current, relpath) { | ||
@@ -54,3 +60,6 @@ var dirname = path.dirname(current); | ||
if (!isdir(nmdir)) return nmdir; | ||
var pkg = require(path.join(nmdir, 'package.json')); | ||
var pkg = {}; | ||
safe(function (__) { | ||
return pkg = require(path.join(nmdir, 'package.json')); | ||
}); | ||
var main = pkg.main || "index"; | ||
@@ -57,0 +66,0 @@ return path.join(nmdir, main); |
{ | ||
"name": "es6-deps", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "a simple util to get es6/jsx dependencies", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,2 +25,10 @@ var isdir = require('isdir'); | ||
function safe(fn) { | ||
try { | ||
fn(); | ||
} catch (e) { | ||
} | ||
} | ||
function _resolve(current, relpath) { | ||
@@ -47,3 +55,4 @@ var dirname = path.dirname(current); | ||
if (!isdir(nmdir)) return nmdir; | ||
var pkg = require(path.join(nmdir, 'package.json')); | ||
var pkg = {}; | ||
safe(__ => pkg = require(path.join(nmdir, 'package.json'))); | ||
var main = pkg.main || "index"; | ||
@@ -50,0 +59,0 @@ return path.join(nmdir, main); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11472
270