cancelable-promise
Advanced tools
Comparing version 3.2.3 to 4.0.0
@@ -0,1 +1,23 @@ | ||
## [4.0.0](https://github.com/alkemics/CancelablePromise/releases/tag/4.0.0) (2021-05-27) | ||
- Update dependencies and add esm module | ||
**[Breaking change]** | ||
No more `dist` folder, you will find releases in `umd` and `esm` fodlers. | ||
```diff | ||
- https://unpkg.com/cancelable-promise@3.0.0/dist/CancelablePromise.min.js | ||
+ https://unpkg.com/cancelable-promise@4.0.0/umd/CancelablePromise.min.js | ||
+ https://unpkg.com/cancelable-promise@4.0.0/esm/CancelablePromise.min.js | ||
``` | ||
**[Feature]** ESM module | ||
```html | ||
<script type="module"> | ||
import { cancelable } from 'https://unpkg.com/cancelable-promise@4.0.0/esm/CancelablePromise.min.mjs'; | ||
</script> | ||
``` | ||
## [3.2.3](https://github.com/alkemics/CancelablePromise/releases/tag/v3.2.3) (2021-01-13) | ||
@@ -2,0 +24,0 @@ |
{ | ||
"name": "cancelable-promise", | ||
"version": "3.2.3", | ||
"version": "4.0.0", | ||
"description": "A simple cancelable promise", | ||
"main": "dist/CancelablePromise.js", | ||
"types": "dist/CancelablePromise.d.ts", | ||
"keywords": [ | ||
"promise", | ||
"cancelable", | ||
"cancellable" | ||
], | ||
"main": "umd/CancelablePromise.js", | ||
"module": "esm/CancelablePromise.mjs", | ||
"jsnext:main": "src/CancelablePromise.js", | ||
"types": "src/CancelablePromise.d.ts", | ||
"files": [ | ||
"dist/CancelablePromise.js", | ||
"dist/CancelablePromise.min.js", | ||
"dist/CancelablePromise.d.ts", | ||
"umd/CancelablePromise.js", | ||
"umd/CancelablePromise.min.js", | ||
"umd/CancelablePromise.d.ts", | ||
"esm/CancelablePromise.mjs", | ||
"esm/CancelablePromise.min.mjs", | ||
"esm/CancelablePromise.d.ts", | ||
"src/CancelablePromise.js", | ||
@@ -20,4 +29,4 @@ "src/CancelablePromise.d.ts", | ||
"scripts": { | ||
"babel": "babel src/CancelablePromise.js -d dist", | ||
"build": "npm run clean && npm run babel && npm run uglify && npm run copy", | ||
"babel": "babel src/CancelablePromise.js -d umd", | ||
"build": "npm run clean && npm run babel && npm run copy && npm run uglify", | ||
"clean": "node scripts.js clean", | ||
@@ -27,10 +36,18 @@ "copy": "node scripts.js copy", | ||
"jest:rc": "jest --findRelatedTests", | ||
"jest": "jest", | ||
"jest": "jest --ci --maxWorkers 1", | ||
"lint:rc": "eslint --fix", | ||
"lint": "eslint .", | ||
"prepare": "husky install", | ||
"prepublish": "npm run build", | ||
"prettier:rc": "prettier --write", | ||
"prettier": "prettier --write .", | ||
"release:major": "node scripts.js prepare_release major", | ||
"release:minor": "node scripts.js prepare_release minor", | ||
"release:patch": "node scripts.js prepare_release patch", | ||
"test:e2e": "concurrently 'npm run test:serve' 'wait-on http://localhost:3000/esm.html && npm run cypress' --kill-others --success first", | ||
"test:serve": "node tests/esm.server.js", | ||
"test": "npm run lint && npm run jest", | ||
"uglify": "uglifyjs dist/CancelablePromise.js -c -m -o dist/CancelablePromise.min.js" | ||
"uglify:esm": "terser esm/CancelablePromise.mjs -c -m -o esm/CancelablePromise.min.mjs", | ||
"uglify:umd": "terser umd/CancelablePromise.js -c -m -o umd/CancelablePromise.min.js", | ||
"uglify": "npm run uglify:umd && npm run uglify:esm" | ||
}, | ||
@@ -48,17 +65,20 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/cli": "~7.10.5", | ||
"@babel/core": "~7.11.4", | ||
"@babel/preset-env": "~7.11.0", | ||
"@babel/cli": "~7.14.3", | ||
"@babel/core": "~7.14.3", | ||
"@babel/preset-env": "~7.14.2", | ||
"babel-eslint": "~10.1.0", | ||
"core-js": "~3.6.4", | ||
"cypress": "~5.0.0", | ||
"eslint": "~7.7.0", | ||
"fs-extra": "~9.0.1", | ||
"husky": "~4.2.3", | ||
"jest": "~26.4.2", | ||
"lint-staged": "~10.2.13", | ||
"prettier": "~2.1.1", | ||
"semver": "~7.3.4", | ||
"uglify-js": "~3.10.3" | ||
"concurrently": "~6.2.0", | ||
"core-js": "~3.13.0", | ||
"cypress": "~7.4.0", | ||
"eslint": "~7.27.0", | ||
"express": "~4.17.1", | ||
"fs-extra": "~10.0.0", | ||
"husky": "~6.0.0", | ||
"jest": "~27.0.1", | ||
"lint-staged": "~11.0.0", | ||
"prettier": "~2.3.0", | ||
"semver": "~7.3.5", | ||
"terser": "~5.7.0", | ||
"wait-on": "~5.3.0" | ||
} | ||
} |
# cancelable-promise | ||
[![GitHub license](https://img.shields.io/github/license/alkemics/CancelablePromise)](https://github.com/alkemics/CancelablePromise/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/cancelable-promise)](https://www.npmjs.com/package/cancelable-promise) [![Node.js CI](https://github.com/alkemics/CancelablePromise/workflows/Node.js%20CI/badge.svg?branch=master)](https://github.com/alkemics/CancelablePromise/actions?query=workflow%3A%22Node.js+CI%22) [![End-to-end tests](https://github.com/alkemics/CancelablePromise/workflows/End-to-end%20tests/badge.svg?branch=master)](https://github.com/alkemics/CancelablePromise/actions?query=workflow%3A%22End-to-end+tests%22) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/alkemics/CancelablePromise/pulls) | ||
[![GitHub license](https://img.shields.io/github/license/alkemics/CancelablePromise)](https://github.com/alkemics/CancelablePromise/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/cancelable-promise)](https://www.npmjs.com/package/cancelable-promise) [![Unit tests](https://github.com/alkemics/CancelablePromise/workflows/Unit%20tests/badge.svg?branch=master)](https://github.com/alkemics/CancelablePromise/actions?query=workflow%3A%22Unit+20tests%22) [![Cypress tests](https://github.com/alkemics/CancelablePromise/workflows/Cypress%20tests/badge.svg?branch=master)](https://github.com/alkemics/CancelablePromise/actions?query=workflow%3A%22Cypress+tests%22) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/alkemics/CancelablePromise/pulls) | ||
@@ -76,3 +76,3 @@ A simple Cancelable Promise. | ||
```html | ||
<script src="https://unpkg.com/cancelable-promise@3.0.0/dist/CancelablePromise.min.js"></script> | ||
<script src="https://unpkg.com/cancelable-promise@4.0.0/umd/CancelablePromise.min.js"></script> | ||
<script> | ||
@@ -84,2 +84,9 @@ const { cancelable } = window.CancelablePromise; | ||
```html | ||
<script type="module"> | ||
import { cancelable } from 'https://unpkg.com/cancelable-promise@4.0.0/esm/CancelablePromise.min.mjs'; | ||
cancelable(new Promise((resolve) => resolve('ok'))); | ||
</script> | ||
``` | ||
## API | ||
@@ -232,6 +239,6 @@ | ||
Run `cypress` | ||
Run `cypress` tests | ||
```shell | ||
npm run cypress | ||
npm run test:e2e | ||
``` | ||
@@ -238,0 +245,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
60001
13
1143
258
17
1