This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

7
node_modules/has-yarn/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
/**
Check if a project is using [Yarn](https://yarnpkg.com).
@param cwd - The current working directory. Default: `process.cwd()`.
@returns Whether the project uses Yarn.
*/
export default function (cwd?: string): boolean;

7
node_modules/has-yarn/index.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import process from 'node:process';
import path from 'node:path';
import fs from 'node:fs';
export default function hasYarn(cwd = process.cwd()) {
return fs.existsSync(path.resolve(cwd, 'yarn.lock'));
}

9
node_modules/has-yarn/license generated vendored Normal file
View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

42
node_modules/has-yarn/package.json generated vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"name": "has-yarn",
"version": "3.0.0",
"description": "Check if a project is using Yarn",
"license": "MIT",
"repository": "sindresorhus/has-yarn",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"yarn",
"has",
"detect",
"is",
"project",
"app",
"module",
"package",
"manager",
"npm"
],
"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.17.0",
"xo": "^0.44.0"
}
}

51
node_modules/has-yarn/readme.md generated vendored Normal file
View File

@@ -0,0 +1,51 @@
# has-yarn
> Check if a project is using [Yarn](https://yarnpkg.com)
Useful for tools that needs to know whether to use `yarn` or `npm` to install dependencies.
It checks if a `yarn.lock` file is present in the working directory.
## Install
```
$ npm install has-yarn
```
## Usage
```
.
├── foo
│   └── package.json
└── bar
├── package.json
└── yarn.lock
```
```js
import hasYarn from 'has-yarn';
hasYarn('foo');
//=> false
hasYarn('bar');
//=> true
```
## API
### hasYarn(cwd?)
Returns a `boolean` of whether the project uses Yarn.
#### cwd
Type: `string`\
Default: `process.cwd()`
The current working directory.
## Related
- [has-yarn-cli](https://github.com/sindresorhus/has-yarn-cli) - CLI for this module