Update app and tooling
This commit is contained in:
parent
3046531bdd
commit
e620ec7349
4950 changed files with 2975120 additions and 10 deletions
17
node_modules/p-finally/index.js
generated
vendored
Normal file
17
node_modules/p-finally/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = async (
|
||||
promise,
|
||||
onFinally = (() => {})
|
||||
) => {
|
||||
let value;
|
||||
try {
|
||||
value = await promise;
|
||||
} catch (error) {
|
||||
await onFinally();
|
||||
throw error;
|
||||
}
|
||||
|
||||
await onFinally();
|
||||
return value;
|
||||
};
|
||||
9
node_modules/p-finally/license
generated
vendored
Normal file
9
node_modules/p-finally/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
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.
|
||||
39
node_modules/p-finally/package.json
generated
vendored
Normal file
39
node_modules/p-finally/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"name": "p-finally",
|
||||
"version": "2.0.1",
|
||||
"description": "`Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/p-finally",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"promise",
|
||||
"finally",
|
||||
"handler",
|
||||
"function",
|
||||
"async",
|
||||
"await",
|
||||
"promises",
|
||||
"settled",
|
||||
"ponyfill",
|
||||
"polyfill",
|
||||
"shim",
|
||||
"bluebird"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
59
node_modules/p-finally/readme.md
generated
vendored
Normal file
59
node_modules/p-finally/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# p-finally [](https://travis-ci.org/sindresorhus/p-finally)
|
||||
|
||||
> [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome
|
||||
|
||||
Useful for cleanup.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install p-finally
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const pFinally = require('p-finally');
|
||||
|
||||
const directory = createTempDirectory();
|
||||
|
||||
(async () => {
|
||||
await pFinally(write(directory), () => {
|
||||
cleanup(directory);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### pFinally(promise, onFinally?)
|
||||
|
||||
Returns a `Promise`.
|
||||
|
||||
#### onFinally
|
||||
|
||||
Type: `Function`
|
||||
|
||||
Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [p-try](https://github.com/sindresorhus/p-try) - `Promise.try()` ponyfill - Starts a promise chain
|
||||
- [More…](https://github.com/sindresorhus/promise-fun)
|
||||
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-p-finally?utm_source=npm-p-finally&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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue