Comparing version 0.0.4 to 0.0.5
const path = require('path'); | ||
const fs = require('fs'); | ||
const Promise = require('bluebird'); | ||
const pify = require('pify'); | ||
const stat = Promise.promisify(fs.stat); | ||
function getPaths(abs, rel, ext) { | ||
return stat(path.join(abs, rel)) | ||
return pify(fs.stat)(path.join(abs, rel)) | ||
.then(stats => { | ||
@@ -17,2 +15,3 @@ if (stats.isDirectory()) { | ||
} | ||
// a file | ||
@@ -28,2 +27,3 @@ return { rel, ext: path.extname(rel).slice(1) }; | ||
} | ||
throw err; | ||
@@ -30,0 +30,0 @@ }); |
119
package.json
{ | ||
"name": "get-paths", | ||
"description": | ||
"Helper function to get an absolute path for a template engine view", | ||
"version": "0.0.4", | ||
"description": "Helper function to get an absolute path for a template engine view", | ||
"version": "0.0.5", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
"ava": { | ||
"failFast": true, | ||
"verbose": true | ||
}, | ||
"bugs": { | ||
@@ -11,2 +14,7 @@ "url": "https://github.com/niftylettuce/get-paths/issues", | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"contributors": [ | ||
@@ -16,24 +24,21 @@ "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)" | ||
"dependencies": { | ||
"bluebird": "^3.5.1", | ||
"fs-extra": "^4.0.2" | ||
"pify": "^4.0.1" | ||
}, | ||
"ava": { | ||
"failFast": true, | ||
"verbose": true | ||
}, | ||
"devDependencies": { | ||
"auto-bind": "^1.1.0", | ||
"ava": "^0.22.0", | ||
"codecov": "^2.3.0", | ||
"cross-env": "^5.0.5", | ||
"eslint": "^4.5.0", | ||
"eslint-config-prettier": "^2.3.0", | ||
"eslint-plugin-prettier": "^2.2.0", | ||
"husky": "^0.14.3", | ||
"lint-staged": "^4.0.4", | ||
"nyc": "^11.1.0", | ||
"prettier": "^1.6.1", | ||
"remark-cli": "^4.0.0", | ||
"remark-preset-github": "^0.0.6", | ||
"xo": "^0.19.0" | ||
"@commitlint/cli": "^8.1.0", | ||
"@commitlint/config-conventional": "^8.1.0", | ||
"auto-bind": "^2.1.0", | ||
"ava": "2.x", | ||
"codecov": "^3.5.0", | ||
"cross-env": "^5.2.1", | ||
"eslint": "^6.3.0", | ||
"eslint-config-xo-lass": "^1.0.3", | ||
"eslint-plugin-node": "^10.0.0", | ||
"fixpack": "^2.3.1", | ||
"husky": "^3.0.5", | ||
"lint-staged": "^9.2.5", | ||
"nyc": "^14.1.1", | ||
"remark-cli": "7.x", | ||
"remark-preset-github": "^0.0.16", | ||
"xo": "^0.24.0" | ||
}, | ||
@@ -44,14 +49,37 @@ "engines": { | ||
"homepage": "https://github.com/niftylettuce/get-paths", | ||
"keywords": ["get-paths", "lass"], | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged && npm test", | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"keywords": [ | ||
"get-paths", | ||
"lass" | ||
], | ||
"license": "MIT", | ||
"lint-staged": { | ||
"*.{js,jsx,mjs,ts,tsx,css,less,scss,json,graphql}": [ | ||
"prettier --write --single-quote --trailing-comma none", | ||
"*.js": [ | ||
"xo --fix", | ||
"git add" | ||
], | ||
"*.md": ["remark . -qfo", "git add"] | ||
"*.md": [ | ||
"remark . -qfo", | ||
"git add" | ||
], | ||
"package.json": [ | ||
"fixpack", | ||
"git add" | ||
] | ||
}, | ||
"main": "index.js", | ||
"prettier": { | ||
"singleQuote": true, | ||
"bracketSpacing": true, | ||
"trailingComma": "none" | ||
}, | ||
"remarkConfig": { | ||
"plugins": ["preset-github"] | ||
"plugins": [ | ||
"preset-github" | ||
] | ||
}, | ||
@@ -64,4 +92,3 @@ "repository": { | ||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", | ||
"lint": "xo && remark . -qfo", | ||
"precommit": "lint-staged && npm test", | ||
"lint": "xo && remark . -qfo && eslint -c .lib.eslintrc index.js", | ||
"test": "npm run lint && npm run test-coverage", | ||
@@ -71,30 +98,8 @@ "test-coverage": "cross-env NODE_ENV=test nyc ava" | ||
"xo": { | ||
"extends": "prettier", | ||
"plugins": ["prettier"], | ||
"parserOptions": { | ||
"sourceType": "script" | ||
}, | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"bracketSpacing": true, | ||
"trailingComma": "none" | ||
} | ||
], | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 80, | ||
"ignoreUrls": true | ||
} | ||
], | ||
"capitalized-comments": "off", | ||
"camelcase": "off", | ||
"no-warning-comments": "off", | ||
"no-use-extend-native/no-use-extend-native": "off" | ||
}, | ||
"space": true | ||
"prettier": true, | ||
"space": true, | ||
"extends": [ | ||
"xo-lass" | ||
] | ||
} | ||
} |
const test = require('ava'); | ||
const getPaths = require('../'); | ||
const getPaths = require('..'); | ||
@@ -5,0 +5,0 @@ test('returns a function', t => { |
Sorry, the diff of this file is not supported yet
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
1
6049
16
32
+ Addedpify@^4.0.1
+ Addedpify@4.0.1(transitive)
- Removedbluebird@^3.5.1
- Removedfs-extra@^4.0.2
- Removedbluebird@3.7.2(transitive)
- Removedfs-extra@4.0.3(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removeduniversalify@0.1.2(transitive)