@braintree/extended-promise
Advanced tools
Comparing version 0.3.1 to 0.4.0
@@ -0,17 +1,27 @@ | ||
# 0.4.0 | ||
- Add typescript types | ||
# 0.3.1 | ||
* convert global to window (closes braintree-web#401) | ||
- convert global to window (closes braintree-web#401) | ||
# 0.3.0 | ||
* Add `suppressUnhandledPromiseMessage` option | ||
- Add `suppressUnhandledPromiseMessage` option | ||
# 0.2.1 | ||
* Limit promise method creation to known promise methods | ||
- Limit promise method creation to known promise methods | ||
# 0.2.0 | ||
* Allow ExtendedPromise to be a drop-in replacement for Promise | ||
- Allow ExtendedPromise to be a drop-in replacement for Promise | ||
# 0.1.1 | ||
* Fix issue where instantitation would fail if Promise global did not exist | ||
- Fix issue where instantitation would fail if Promise global did not exist | ||
# 0.1.0 | ||
* Initial release | ||
- Initial release |
{ | ||
"name": "@braintree/extended-promise", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"files": [ | ||
@@ -12,5 +12,9 @@ "index.js" | ||
"homepage": "https://github.com/braintree/extended-promise", | ||
"main": "index.js", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"lint": "eslint .", | ||
"prepublishOnly": "npm run build", | ||
"prebuild": "prettier --write .", | ||
"build": "tsc --declaration", | ||
"lint": "eslint --ext js,ts .", | ||
"posttest": "npm run lint", | ||
@@ -23,7 +27,16 @@ "test": "jest" | ||
"devDependencies": { | ||
"@types/jest": "^25.2.1", | ||
"eslint": "^6.7.2", | ||
"eslint-config-braintree": "^4.0.0", | ||
"jest": "^24.9.0" | ||
"eslint-config-braintree": "^5.0.0-typescript-prep-rc.17", | ||
"jest": "^25.3.0", | ||
"prettier": "^2.0.4", | ||
"ts-jest": "^25.3.1", | ||
"typescript": "^3.8.3" | ||
}, | ||
"dependencies": {} | ||
"dependencies": {}, | ||
"jest": { | ||
"preset": "ts-jest", | ||
"testEnvironment": "node", | ||
"verbose": true | ||
} | ||
} |
@@ -1,3 +0,2 @@ | ||
extended-promise | ||
---------------- | ||
## extended-promise | ||
@@ -21,3 +20,3 @@ Promises are great! But, could they be even better? | ||
class MyCustomObject { | ||
constructor () { | ||
constructor() { | ||
this._promise = new Promise((resolve, reject) => { | ||
@@ -34,3 +33,3 @@ this._resolveFunction = resolve; | ||
} else { | ||
this._rejectFunction(new Error('fail')); | ||
this._rejectFunction(new Error("fail")); | ||
} | ||
@@ -50,3 +49,3 @@ } | ||
class MyCustomObject { | ||
constructor () { | ||
constructor() { | ||
this._promise = new ExtendedPromise(); | ||
@@ -60,3 +59,3 @@ } | ||
} else { | ||
this._promise.reject(new Error('fail')); | ||
this._promise.reject(new Error("fail")); | ||
} | ||
@@ -85,3 +84,3 @@ } | ||
return Promise.reject(error); | ||
} | ||
}, | ||
}); | ||
@@ -96,3 +95,3 @@ ``` | ||
var promise = new ExtendedPromise({ | ||
suppressUnhandledPromiseMessage: true | ||
suppressUnhandledPromiseMessage: true, | ||
}); | ||
@@ -152,3 +151,3 @@ | ||
```js | ||
const PromisePolyfill = require('promise-polyfill'); | ||
const PromisePolyfill = require("promise-polyfill"); | ||
@@ -155,0 +154,0 @@ ExtendedPromise.setPromise(PromisePolyfill); |
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
11104
132
7
157
1