mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 05:14:44 +00:00
.
This commit is contained in:
parent
fc725ba36b
commit
422b9fdb15
7395 changed files with 1786235 additions and 3476 deletions
18
node_modules/caller-callsite/index.js
generated
vendored
Normal file
18
node_modules/caller-callsite/index.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
const callsites = require('callsites');
|
||||
|
||||
module.exports = () => {
|
||||
const c = callsites();
|
||||
let caller;
|
||||
|
||||
for (let i = 0; i < c.length; i++) {
|
||||
const hasReceiver = c[i].getTypeName() !== null;
|
||||
|
||||
if (hasReceiver) {
|
||||
caller = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return c[caller];
|
||||
};
|
21
node_modules/caller-callsite/license
generated
vendored
Normal file
21
node_modules/caller-callsite/license
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
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.
|
48
node_modules/caller-callsite/package.json
generated
vendored
Normal file
48
node_modules/caller-callsite/package.json
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"name": "caller-callsite",
|
||||
"version": "2.0.0",
|
||||
"description": "Get the callsite of the caller function",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/caller-callsite",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"caller",
|
||||
"calling",
|
||||
"module",
|
||||
"parent",
|
||||
"callsites",
|
||||
"callsite",
|
||||
"stacktrace",
|
||||
"stack",
|
||||
"trace",
|
||||
"function",
|
||||
"file"
|
||||
],
|
||||
"dependencies": {
|
||||
"callsites": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"xo": {
|
||||
"esnext": true
|
||||
}
|
||||
|
||||
,"_resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz"
|
||||
,"_integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ="
|
||||
,"_from": "caller-callsite@2.0.0"
|
||||
}
|
41
node_modules/caller-callsite/readme.md
generated
vendored
Normal file
41
node_modules/caller-callsite/readme.md
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
# caller-callsite [](https://travis-ci.org/sindresorhus/caller-callsite)
|
||||
|
||||
> Get the [callsite](https://github.com/sindresorhus/callsites#api) of the caller function
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save caller-callsite
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
const callerCallsite = require('caller-callsite');
|
||||
|
||||
module.exports = () => {
|
||||
console.log(callerCallsite().getFileName());
|
||||
//=> '/Users/sindresorhus/dev/unicorn/bar.js'
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
// bar.js
|
||||
const foo = require('./foo');
|
||||
foo();
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### callerCallsite()
|
||||
|
||||
Returns a [`callsite`](https://github.com/sindresorhus/callsites#api) object.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Loading…
Add table
Add a link
Reference in a new issue