make-cancellable-promise
Advanced tools
Comparing version 1.3.1 to 1.3.2
{ | ||
"name": "make-cancellable-promise", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Make any Promise cancellable.", | ||
@@ -16,5 +16,6 @@ "type": "module", | ||
"scripts": { | ||
"build": "yarn build-esm && yarn build-cjs", | ||
"build-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext", | ||
"build-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs && echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json", | ||
"build": "yarn build-esm && yarn build-cjs && yarn build-cjs-package", | ||
"build-esm": "tsc --project tsconfig.build.json --outDir dist/esm", | ||
"build-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs --verbatimModuleSyntax false", | ||
"build-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json", | ||
"clean": "rimraf dist", | ||
@@ -26,3 +27,3 @@ "lint": "eslint .", | ||
"tsc": "tsc --noEmit", | ||
"unit": "vitest run" | ||
"unit": "vitest" | ||
}, | ||
@@ -40,10 +41,14 @@ "keywords": [ | ||
"eslint": "^8.26.0", | ||
"eslint-config-wojtekmaj": "^0.8.4", | ||
"eslint-config-wojtekmaj": "^0.9.0", | ||
"husky": "^8.0.0", | ||
"prettier": "^2.7.0", | ||
"pretty-quick": "^3.1.0", | ||
"lint-staged": "^14.0.0", | ||
"prettier": "^3.0.0", | ||
"rimraf": "^3.0.0", | ||
"typescript": "^5.0.0", | ||
"vitest": "^0.30.1" | ||
"vitest": "^0.34.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"provenance": true | ||
}, | ||
"files": [ | ||
@@ -50,0 +55,0 @@ "dist", |
@@ -12,3 +12,3 @@ [![npm](https://img.shields.io/npm/v/make-cancellable-promise.svg)](https://www.npmjs.com/package/make-cancellable-promise) ![downloads](https://img.shields.io/npm/dt/make-cancellable-promise.svg) [![CI](https://github.com/wojtekmaj/make-cancellable-promise/workflows/CI/badge.svg)](https://github.com/wojtekmaj/make-cancellable-promise/actions) | ||
- Do stuff with it! | ||
```js | ||
```ts | ||
const { promise, cancel } = makeCancellablePromise(myPromise); | ||
@@ -27,3 +27,3 @@ ``` | ||
```js | ||
```ts | ||
const { promise, cancel } = makeCancellablePromise(myPromise); | ||
@@ -36,3 +36,3 @@ ``` | ||
```jsx | ||
```tsx | ||
function MyComponent() { | ||
@@ -67,1 +67,18 @@ const [status, setStatus] = useState('initial'); | ||
``` | ||
## License | ||
The MIT License. | ||
## Author | ||
<table> | ||
<tr> | ||
<td > | ||
<img src="https://avatars.githubusercontent.com/u/5426427?v=4&s=128" width="64" height="64" alt="Wojciech Maj"> | ||
</td> | ||
<td> | ||
<a href="https://github.com/wojtekmaj">Wojciech Maj</a> | ||
</td> | ||
</tr> | ||
</table> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9104
81