Comparing version 5.0.0 to 5.0.1
@@ -30,4 +30,12 @@ 'use strict' | ||
function executor(resolve, reject) { | ||
fs.readFile(path.resolve(file.cwd, file.path), options, done) | ||
var fp | ||
try { | ||
fp = path.resolve(file.cwd, file.path) | ||
} catch (err) { | ||
return reject(err) | ||
} | ||
fs.readFile(fp, options, done) | ||
function done(err, res) { | ||
@@ -73,9 +81,12 @@ if (err) { | ||
function executor(resolve, reject) { | ||
fs.writeFile( | ||
path.resolve(file.cwd, file.path), | ||
file.contents || '', | ||
options, | ||
done | ||
) | ||
var fp | ||
try { | ||
fp = path.resolve(file.cwd, file.path) | ||
} catch (err) { | ||
return reject(err) | ||
} | ||
fs.writeFile(fp, file.contents || '', options, done) | ||
function done(err) { | ||
@@ -82,0 +93,0 @@ if (err) { |
{ | ||
"name": "to-vfile", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Create a vfile from a file-path", | ||
@@ -33,4 +33,3 @@ "license": "MIT", | ||
"browserify": "^16.0.0", | ||
"esmangle": "^1.0.1", | ||
"nyc": "^11.0.0", | ||
"nyc": "^12.0.0", | ||
"prettier": "^1.12.1", | ||
@@ -40,2 +39,3 @@ "remark-cli": "^5.0.0", | ||
"tape": "^4.0.0", | ||
"tinyify": "^2.4.3", | ||
"xo": "^0.21.0" | ||
@@ -45,4 +45,4 @@ }, | ||
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix", | ||
"build-bundle": "browserify index.js --bare -s toVFile > to-vfile.js", | ||
"build-mangle": "esmangle to-vfile.js > to-vfile.min.js", | ||
"build-bundle": "browserify . -s toVFile > to-vfile.js", | ||
"build-mangle": "browserify . -s toVFile -p tinyify > to-vfile.min.js", | ||
"build": "npm run build-bundle && npm run build-mangle", | ||
@@ -49,0 +49,0 @@ "test-api": "node test", |
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
9021
104