mirror of
https://github.com/actions/labeler.git
synced 2025-12-17 15:46:44 +00:00
build
This commit is contained in:
35
node_modules/p-limit/index.d.ts
generated
vendored
35
node_modules/p-limit/index.d.ts
generated
vendored
@@ -1,29 +1,38 @@
|
||||
export interface Limit {
|
||||
/**
|
||||
* @param fn - Promise-returning/async function.
|
||||
* @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions.
|
||||
* @returns The promise returned by calling `fn(...arguments)`.
|
||||
*/
|
||||
@param fn - Promise-returning/async function.
|
||||
@param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions.
|
||||
@returns The promise returned by calling `fn(...arguments)`.
|
||||
*/
|
||||
<Arguments extends unknown[], ReturnType>(
|
||||
fn: (...arguments: Arguments) => PromiseLike<ReturnType> | ReturnType,
|
||||
...arguments: Arguments
|
||||
): Promise<ReturnType>;
|
||||
|
||||
/**
|
||||
* The number of promises that are currently running.
|
||||
*/
|
||||
The number of promises that are currently running.
|
||||
*/
|
||||
readonly activeCount: number;
|
||||
|
||||
/**
|
||||
* The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
|
||||
*/
|
||||
The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
|
||||
*/
|
||||
readonly pendingCount: number;
|
||||
|
||||
/**
|
||||
Discard pending promises that are waiting to run.
|
||||
|
||||
This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app.
|
||||
|
||||
Note: This does not cancel promises that are already running.
|
||||
*/
|
||||
clearQueue(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run multiple promise-returning & async functions with limited concurrency.
|
||||
*
|
||||
* @param concurrency - Concurrency limit. Minimum: `1`.
|
||||
* @returns A `limit` function.
|
||||
*/
|
||||
Run multiple promise-returning & async functions with limited concurrency.
|
||||
|
||||
@param concurrency - Concurrency limit. Minimum: `1`.
|
||||
@returns A `limit` function.
|
||||
*/
|
||||
export default function pLimit(concurrency: number): Limit;
|
||||
|
||||
9
node_modules/p-limit/index.js
generated
vendored
9
node_modules/p-limit/index.js
generated
vendored
@@ -2,8 +2,8 @@
|
||||
const pTry = require('p-try');
|
||||
|
||||
const pLimit = concurrency => {
|
||||
if (concurrency < 1) {
|
||||
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
|
||||
if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
|
||||
return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up'));
|
||||
}
|
||||
|
||||
const queue = [];
|
||||
@@ -42,6 +42,11 @@ const pLimit = concurrency => {
|
||||
},
|
||||
pendingCount: {
|
||||
get: () => queue.length
|
||||
},
|
||||
clearQueue: {
|
||||
value: () => {
|
||||
queue.length = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
33
node_modules/p-limit/package.json
generated
vendored
33
node_modules/p-limit/package.json
generated
vendored
@@ -1,34 +1,28 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"p-limit@2.2.0",
|
||||
"/Users/pjquirk/Source/GitHub/actions/labeler"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "p-limit@2.2.0",
|
||||
"_id": "p-limit@2.2.0",
|
||||
"_from": "p-limit@^2.0.0",
|
||||
"_id": "p-limit@2.3.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
|
||||
"_integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||
"_location": "/p-limit",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "p-limit@2.2.0",
|
||||
"raw": "p-limit@^2.0.0",
|
||||
"name": "p-limit",
|
||||
"escapedName": "p-limit",
|
||||
"rawSpec": "2.2.0",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.2.0"
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/p-locate",
|
||||
"/pkg-dir/p-locate"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
|
||||
"_spec": "2.2.0",
|
||||
"_where": "/Users/pjquirk/Source/GitHub/actions/labeler",
|
||||
"_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"_shasum": "3dd33c647a214fdfffd835933eb086da0dc21db1",
|
||||
"_spec": "p-limit@^2.0.0",
|
||||
"_where": "/Users/dakale/dev/GitHub/actions/labeler/node_modules/p-locate",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
@@ -37,9 +31,11 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/p-limit/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"p-try": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Run multiple promise-returning & async functions with limited concurrency",
|
||||
"devDependencies": {
|
||||
"ava": "^1.2.1",
|
||||
@@ -57,6 +53,7 @@
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"homepage": "https://github.com/sindresorhus/p-limit#readme",
|
||||
"keywords": [
|
||||
"promise",
|
||||
@@ -84,5 +81,5 @@
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd-check"
|
||||
},
|
||||
"version": "2.2.0"
|
||||
"version": "2.3.0"
|
||||
}
|
||||
|
||||
31
node_modules/p-limit/readme.md
generated
vendored
31
node_modules/p-limit/readme.md
generated
vendored
@@ -2,14 +2,12 @@
|
||||
|
||||
> Run multiple promise-returning & async functions with limited concurrency
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install p-limit
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
@@ -30,7 +28,6 @@ const input = [
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### pLimit(concurrency)
|
||||
@@ -39,8 +36,9 @@ Returns a `limit` function.
|
||||
|
||||
#### concurrency
|
||||
|
||||
Type: `number`<br>
|
||||
Minimum: `1`
|
||||
Type: `number`\
|
||||
Minimum: `1`\
|
||||
Default: `Infinity`
|
||||
|
||||
Concurrency limit.
|
||||
|
||||
@@ -68,13 +66,19 @@ The number of promises that are currently running.
|
||||
|
||||
The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
|
||||
|
||||
### limit.clearQueue()
|
||||
|
||||
Discard pending promises that are waiting to run.
|
||||
|
||||
This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app.
|
||||
|
||||
Note: This does not cancel promises that are already running.
|
||||
|
||||
## FAQ
|
||||
|
||||
### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package?
|
||||
|
||||
This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause and clear the queue.
|
||||
|
||||
This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause the queue.
|
||||
|
||||
## Related
|
||||
|
||||
@@ -84,7 +88,14 @@ This package is only about limiting the number of concurrent executions, while `
|
||||
- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
|
||||
- [More…](https://github.com/sindresorhus/promise-fun)
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-p-limit?utm_source=npm-p-limit&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user