🎉 initiate project *astro_rewrite*

This commit is contained in:
sindrekjelsrud 2023-07-19 21:31:30 +02:00
parent ffd4d5e86c
commit 2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions

31
node_modules/preferred-pm/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,31 @@
# preferred-pm
## 3.0.3
### Patch Changes
- 094cecc: Fix types.
## 3.0.2
### Patch Changes
- 17d5363: Update find-up to v5.
## 3.0.1
### Patch Changes
- f9c6c94: Pin find-yarn-workspace-root2 to version 1.2.16. Newer versions of the package have @types/node in peer dependencies.
## 3.0.0
### Major Changes
- 49172aa: Dropped support of Node.js<10.
### Minor Changes
- d50a9b7: Detects a pnpm workspace.
- cec674b: Add types.
- 727f01a: Yarn is the preferred package manager inside a Yarn workspace.

21
node_modules/preferred-pm/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018-2021 Zoltan Kochan <z@kochan.io>
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.

38
node_modules/preferred-pm/README.md generated vendored Normal file
View file

@ -0,0 +1,38 @@
# preferred-pm
> Returns the preferred package manager of a project
[![npm version](https://img.shields.io/npm/v/preferred-pm.svg)](https://www.npmjs.com/package/preferred-pm)
* Inside a Yarn workspace, Yarn is preferred.
* Inside a pnpm workspace, pnpm is preferred.
* If a `package-lock.json` is present, npm is preferred.
* If a `yarn.lock` is present, Yarn is preferred.
* If a `pnpm-lock.yaml` is present, pnpm is preferred.
* If a `node_modules` is present, tries to detect which package manager installed it.
## Installation
```
<pnpm|yarn|npm> add preferred-pm
```
## Usage
```js
'use strict'
const preferredPM = require('preferred-pm')
preferredPM(process.cwd())
.then(pm => console.log(pm))
//> {name: "npm", version: ">=5"}
```
## Related
* [which-pm](https://github.com/zkochan/packages/tree/master/which-pm) - Detects what package manager was used for installation
* [which-pm-runs](https://github.com/zkochan/packages/tree/master/which-pm-runs) - Detects what package manager executes the process
## License
[MIT](LICENSE) © [Zoltan Kochan](https://kochan.io)

3
node_modules/preferred-pm/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
export = preferredPM
declare function preferredPM (pkgPath: string): Promise<{ name: 'npm' | 'pnpm' | 'yarn', version: string } | undefined>

52
node_modules/preferred-pm/index.js generated vendored Normal file
View file

@ -0,0 +1,52 @@
'use strict'
const findYarnWorkspaceRoot = require('find-yarn-workspace-root2')
const findUp = require('find-up')
const path = require('path')
const pathExists = require('path-exists')
const whichPM = require('which-pm')
module.exports = async function preferredPM (pkgPath) {
if (typeof pkgPath !== 'string') {
throw new TypeError(`pkgPath should be a string, got ${typeof pkgPath}`)
}
if (await pathExists(path.join(pkgPath, 'package-lock.json'))) {
return {
name: 'npm',
version: '>=5'
}
}
if (await pathExists(path.join(pkgPath, 'yarn.lock'))) {
return {
name: 'yarn',
version: '*'
}
}
if (await pathExists(path.join(pkgPath, 'pnpm-lock.yaml'))) {
return {
name: 'pnpm',
version: '>=3'
}
}
if (await pathExists(path.join(pkgPath, 'shrinkwrap.yaml'))) {
return {
name: 'pnpm',
version: '1 || 2'
}
}
if (await findUp('pnpm-lock.yaml', { cwd: pkgPath })) {
return {
name: 'pnpm',
version: '>=3'
}
}
try {
if (typeof findYarnWorkspaceRoot(pkgPath) === 'string') {
return {
name: 'yarn',
version: '*'
}
}
} catch (err) {}
const pm = await whichPM(pkgPath)
return pm && { name: pm.name, version: pm.version || '*' }
}

45
node_modules/preferred-pm/package.json generated vendored Normal file
View file

@ -0,0 +1,45 @@
{
"name": "preferred-pm",
"version": "3.0.3",
"description": "Detects what package manager was used for installation",
"main": "index.js",
"files": [
"index.js",
"index.d.ts"
],
"scripts": {
"test": "standard && preview && node test"
},
"engines": {
"node": ">=10"
},
"repository": "https://github.com/zkochan/packages/tree/master/preferred-pm",
"bugs": {
"url": "https://github.com/zkochan/packages/labels/package%3A%20preferred-pm"
},
"keywords": [
"npm",
"pnpm",
"yarn"
],
"author": {
"name": "Zoltan Kochan",
"email": "z@kochan.io",
"url": "https://www.kochan.io/",
"twitter": "ZoltanKochan"
},
"license": "MIT",
"dependencies": {
"find-up": "^5.0.0",
"find-yarn-workspace-root2": "1.2.16",
"path-exists": "^4.0.0",
"which-pm": "2.0.0"
},
"devDependencies": {
"ncp": "^2.0.0",
"package-preview": "3.0.0",
"standard": "^16.0.1",
"tape": "^5.0.1",
"tempy": "^1.0.0"
}
}