Comparing version 1.0.0 to 2.0.0
@@ -5,2 +5,5 @@ 'use strict'; | ||
module.exports = cwd => fs.existsSync(path.resolve(cwd || process.cwd(), 'yarn.lock')); | ||
const hasYarn = (cwd = process.cwd()) => fs.existsSync(path.resolve(cwd, 'yarn.lock')); | ||
module.exports = hasYarn; | ||
module.exports.default = hasYarn; |
{ | ||
"name": "has-yarn", | ||
"version": "1.0.0", | ||
"description": "Check if a project is using Yarn", | ||
"license": "MIT", | ||
"repository": "sindresorhus/has-yarn", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"yarn", | ||
"has", | ||
"detect", | ||
"is", | ||
"project", | ||
"app", | ||
"module", | ||
"package", | ||
"manager", | ||
"npm" | ||
], | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true | ||
} | ||
"name": "has-yarn", | ||
"version": "2.0.0", | ||
"description": "Check if a project is using Yarn", | ||
"license": "MIT", | ||
"repository": "sindresorhus/has-yarn", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"keywords": [ | ||
"yarn", | ||
"has", | ||
"detect", | ||
"is", | ||
"project", | ||
"app", | ||
"module", | ||
"package", | ||
"manager", | ||
"npm" | ||
], | ||
"devDependencies": { | ||
"ava": "^1.2.1", | ||
"tsd-check": "^0.3.0", | ||
"xo": "^0.24.0" | ||
} | ||
} |
@@ -7,7 +7,9 @@ # has-yarn [![Build Status](https://travis-ci.org/sindresorhus/has-yarn.svg?branch=master)](https://travis-ci.org/sindresorhus/has-yarn) | ||
It checks if a `yarn.lock` file is present in the working directory. | ||
## Install | ||
``` | ||
$ npm install --save has-yarn | ||
$ npm install has-yarn | ||
``` | ||
@@ -42,3 +44,3 @@ | ||
Returns a `boolean`. | ||
Returns a `boolean` of whether the project uses Yarn. | ||
@@ -53,4 +55,9 @@ #### cwd | ||
## Related | ||
- [has-yarn-cli](https://github.com/sindresorhus/has-yarn-cli) - CLI for this module | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3147
5
13
61
0
3