Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

has-yarn

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-yarn - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

index.d.ts

5

index.js

@@ -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;

75

package.json
{
"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

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