mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 21:14:45 +00:00
.
This commit is contained in:
parent
a004f0ae58
commit
fc725ba36b
7280 changed files with 19 additions and 1796407 deletions
26
node_modules/read-pkg-up/index.js
generated
vendored
26
node_modules/read-pkg-up/index.js
generated
vendored
|
@ -1,26 +0,0 @@
|
|||
'use strict';
|
||||
const findUp = require('find-up');
|
||||
const readPkg = require('read-pkg');
|
||||
|
||||
module.exports = options => {
|
||||
return findUp('package.json', options).then(fp => {
|
||||
if (!fp) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return readPkg(fp, options).then(pkg => ({pkg, path: fp}));
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = options => {
|
||||
const fp = findUp.sync('package.json', options);
|
||||
|
||||
if (!fp) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return {
|
||||
pkg: readPkg.sync(fp, options),
|
||||
path: fp
|
||||
};
|
||||
};
|
9
node_modules/read-pkg-up/license
generated
vendored
9
node_modules/read-pkg-up/license
generated
vendored
|
@ -1,9 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
47
node_modules/read-pkg-up/node_modules/read-pkg/index.js
generated
vendored
47
node_modules/read-pkg-up/node_modules/read-pkg/index.js
generated
vendored
|
@ -1,47 +0,0 @@
|
|||
'use strict';
|
||||
const path = require('path');
|
||||
const loadJsonFile = require('load-json-file');
|
||||
const pathType = require('path-type');
|
||||
|
||||
module.exports = (fp, opts) => {
|
||||
if (typeof fp !== 'string') {
|
||||
opts = fp;
|
||||
fp = '.';
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
return pathType.dir(fp)
|
||||
.then(isDir => {
|
||||
if (isDir) {
|
||||
fp = path.join(fp, 'package.json');
|
||||
}
|
||||
|
||||
return loadJsonFile(fp);
|
||||
})
|
||||
.then(x => {
|
||||
if (opts.normalize !== false) {
|
||||
require('normalize-package-data')(x);
|
||||
}
|
||||
|
||||
return x;
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = (fp, opts) => {
|
||||
if (typeof fp !== 'string') {
|
||||
opts = fp;
|
||||
fp = '.';
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp;
|
||||
|
||||
const x = loadJsonFile.sync(fp);
|
||||
|
||||
if (opts.normalize !== false) {
|
||||
require('normalize-package-data')(x);
|
||||
}
|
||||
|
||||
return x;
|
||||
};
|
9
node_modules/read-pkg-up/node_modules/read-pkg/license
generated
vendored
9
node_modules/read-pkg-up/node_modules/read-pkg/license
generated
vendored
|
@ -1,9 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
78
node_modules/read-pkg-up/node_modules/read-pkg/package.json
generated
vendored
78
node_modules/read-pkg-up/node_modules/read-pkg/package.json
generated
vendored
|
@ -1,78 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"read-pkg@3.0.0",
|
||||
"/Users/eric/repos/actions/setup-node"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "read-pkg@3.0.0",
|
||||
"_id": "read-pkg@3.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
|
||||
"_location": "/read-pkg-up/read-pkg",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "read-pkg@3.0.0",
|
||||
"name": "read-pkg",
|
||||
"escapedName": "read-pkg",
|
||||
"rawSpec": "3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/read-pkg-up"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
|
||||
"_spec": "3.0.0",
|
||||
"_where": "/Users/eric/repos/actions/setup-node",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/read-pkg/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"load-json-file": "^4.0.0",
|
||||
"normalize-package-data": "^2.3.2",
|
||||
"path-type": "^3.0.0"
|
||||
},
|
||||
"description": "Read a package.json file",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/read-pkg#readme",
|
||||
"keywords": [
|
||||
"json",
|
||||
"read",
|
||||
"parse",
|
||||
"file",
|
||||
"fs",
|
||||
"graceful",
|
||||
"load",
|
||||
"pkg",
|
||||
"package",
|
||||
"normalize"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "read-pkg",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/read-pkg.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "3.0.0"
|
||||
}
|
79
node_modules/read-pkg-up/node_modules/read-pkg/readme.md
generated
vendored
79
node_modules/read-pkg-up/node_modules/read-pkg/readme.md
generated
vendored
|
@ -1,79 +0,0 @@
|
|||
# read-pkg [](https://travis-ci.org/sindresorhus/read-pkg)
|
||||
|
||||
> Read a package.json file
|
||||
|
||||
|
||||
## Why
|
||||
|
||||
- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
|
||||
- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
|
||||
- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
|
||||
- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install read-pkg
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const readPkg = require('read-pkg');
|
||||
|
||||
readPkg().then(pkg => {
|
||||
console.log(pkg);
|
||||
//=> {name: 'read-pkg', ...}
|
||||
});
|
||||
|
||||
readPkg(__dirname).then(pkg => {
|
||||
console.log(pkg);
|
||||
//=> {name: 'read-pkg', ...}
|
||||
});
|
||||
|
||||
readPkg(path.join('unicorn', 'package.json')).then(pkg => {
|
||||
console.log(pkg);
|
||||
//=> {name: 'read-pkg', ...}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### readPkg([path], [options])
|
||||
|
||||
Returns a `Promise` for the parsed JSON.
|
||||
|
||||
### readPkg.sync([path], [options])
|
||||
|
||||
Returns the parsed JSON.
|
||||
|
||||
#### path
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `process.cwd()`
|
||||
|
||||
Path to a `package.json` file or its directory.
|
||||
|
||||
#### options
|
||||
|
||||
##### normalize
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file
|
||||
- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file
|
||||
- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
97
node_modules/read-pkg-up/package.json
generated
vendored
97
node_modules/read-pkg-up/package.json
generated
vendored
|
@ -1,97 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"read-pkg-up@4.0.0",
|
||||
"/Users/eric/repos/actions/setup-node"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "read-pkg-up@4.0.0",
|
||||
"_id": "read-pkg-up@4.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==",
|
||||
"_location": "/read-pkg-up",
|
||||
"_phantomChildren": {
|
||||
"load-json-file": "4.0.0",
|
||||
"normalize-package-data": "2.5.0",
|
||||
"path-type": "3.0.0"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "read-pkg-up@4.0.0",
|
||||
"name": "read-pkg-up",
|
||||
"escapedName": "read-pkg-up",
|
||||
"rawSpec": "4.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/test-exclude"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz",
|
||||
"_spec": "4.0.0",
|
||||
"_where": "/Users/eric/repos/actions/setup-node",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/read-pkg-up/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"find-up": "^3.0.0",
|
||||
"read-pkg": "^3.0.0"
|
||||
},
|
||||
"description": "Read the closest package.json file",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/read-pkg-up#readme",
|
||||
"keywords": [
|
||||
"json",
|
||||
"read",
|
||||
"parse",
|
||||
"file",
|
||||
"fs",
|
||||
"graceful",
|
||||
"load",
|
||||
"pkg",
|
||||
"package",
|
||||
"find",
|
||||
"up",
|
||||
"find-up",
|
||||
"findup",
|
||||
"look-up",
|
||||
"look",
|
||||
"search",
|
||||
"match",
|
||||
"resolve",
|
||||
"parent",
|
||||
"parents",
|
||||
"folder",
|
||||
"directory",
|
||||
"dir",
|
||||
"walk",
|
||||
"walking",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "read-pkg-up",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/read-pkg-up.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "4.0.0"
|
||||
}
|
82
node_modules/read-pkg-up/readme.md
generated
vendored
82
node_modules/read-pkg-up/readme.md
generated
vendored
|
@ -1,82 +0,0 @@
|
|||
# read-pkg-up [](https://travis-ci.org/sindresorhus/read-pkg-up)
|
||||
|
||||
> Read the closest package.json file
|
||||
|
||||
|
||||
## Why
|
||||
|
||||
- [Finds the closest package.json](https://github.com/sindresorhus/find-up)
|
||||
- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)
|
||||
- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)
|
||||
- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
|
||||
- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install read-pkg-up
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const readPkgUp = require('read-pkg-up');
|
||||
|
||||
(async () => {
|
||||
console.log(await readPkgUp());
|
||||
/*
|
||||
{
|
||||
pkg: {
|
||||
name: 'awesome-package',
|
||||
version: '1.0.0',
|
||||
…
|
||||
},
|
||||
path: '/Users/sindresorhus/dev/awesome-package/package.json'
|
||||
}
|
||||
*/
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### readPkgUp([options])
|
||||
|
||||
Returns a `Promise` for the result object.
|
||||
|
||||
### readPkgUp.sync([options])
|
||||
|
||||
Returns the result object.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### cwd
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `process.cwd()`
|
||||
|
||||
Directory to start looking for a package.json file.
|
||||
|
||||
##### normalize
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file
|
||||
- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
|
||||
- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories
|
||||
- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Loading…
Add table
Add a link
Reference in a new issue