Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sequent-promises

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequent-promises - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Changelog

## [0.1.0](https://github.com/Krivega/sequent-promises/compare/v0.0.3...v0.1.0) (2020-06-10)
### ⚠ BREAKING CHANGES
- success instead of results
### Features
- return success with results ([6d728cd](https://github.com/Krivega/sequent-promises/commit/6d728cd78026f3b687f9858a885742ade27ffb87))
### [0.0.3](https://github.com/Krivega/sequent-promises/compare/v0.0.2...v0.0.3) (2020-03-31)

@@ -7,0 +17,0 @@

2

dist/index.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const r=()=>!0;exports.default=(e,s=r)=>e.reduce((r,e)=>r.then(({results:r,errors:t})=>{let o;return o=s(e)?e():Promise.reject((r=>{const e=new Error("Promise was not running");return e.basePromise=r,e.id="ERROR_NOT_RUNNING",e.name="Not running",e})(e)),o.then(e=>({errors:t,results:[...r,e]})).catch(e=>({results:r,errors:[...t,e]}))}),Promise.resolve({results:[],errors:[]})),exports.isNotRunningError=({id:r})=>"ERROR_NOT_RUNNING"===r;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=()=>!0;exports.default=(r,s=e)=>r.reduce((e,r)=>e.then(({success:e,errors:t,results:o})=>{let n;return n=s(r)?r():Promise.reject((e=>{const r=new Error("Promise was not running");return r.basePromise=e,r.id="ERROR_NOT_RUNNING",r.name="Not running",r})(r)),n.then(r=>({errors:t,success:[...e,r],results:[...o,r]})).catch(r=>({success:e,errors:[...t,r],results:[...o,r]}))}),Promise.resolve({success:[],errors:[],results:[]})),exports.isNotRunningError=({id:e})=>"ERROR_NOT_RUNNING"===e;
{
"name": "sequent-promises",
"version": "0.1.0",
"description": "sequentPromises resolves Promises sequentially",

@@ -7,7 +8,4 @@ "keywords": [

],
"version": "0.0.3",
"author": {
"name": "Krivega Dmitriy",
"email": "mr.krivega@gmail.com",
"url": "https://krivega.com"
"bugs": {
"url": "https://github.com/Krivega/sequent-promises/issues"
},

@@ -18,9 +16,8 @@ "repository": {

},
"bugs": {
"url": "https://github.com/Krivega/sequent-promises/issues"
"license": "MIT",
"author": {
"name": "Krivega Dmitriy",
"email": "mr.krivega@gmail.com",
"url": "https://krivega.com"
},
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"main:src": "src/index.js",
"exports": {

@@ -32,2 +29,4 @@ ".": {

},
"main": "dist/index.js",
"module": "dist/index.mjs",
"files": [

@@ -37,2 +36,11 @@ "dist/**/*",

],
"scripts": {
"build": "NODE_ENV=production rollup --config",
"format": "prettier --write \"src/**/*.js\"",
"lint": "eslint src/. --ext .js",
"prepare": "npm run build",
"prepublishOnly": "npm test && npm run lint",
"release": "standard-version",
"test": "jest"
},
"dependencies": {

@@ -42,34 +50,26 @@ "promise-delay": "^2.1.0"

"devDependencies": {
"@babel/core": "^7.8.6",
"@babel/preset-env": "^7.8.6",
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"babel-eslint": "10.1.0",
"babel-jest": "^25.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jest": "^23.8.0",
"babel-jest": "^26.0.1",
"eslint": "^7.2.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jest": "^23.13.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.3",
"husky": "^4.2.3",
"jest": "25.2.4",
"lint-staged": "^10.0.8",
"prettier": "^2.0.2",
"rollup": "^2.3.1",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-terser": "^5.2.0",
"standard-version": "^7.1.0"
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.20.0",
"husky": "^4.2.5",
"jest": "26.0.1",
"lint-staged": "^10.2.9",
"prettier": "^2.0.5",
"rollup": "^2.15.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-terser": "^6.1.0",
"standard-version": "^8.0.0"
},
"scripts": {
"lint": "eslint src/. --ext .js",
"format": "prettier --write \"src/**/*.js\"",
"test": "jest",
"build": "NODE_ENV=production rollup --config",
"prepare": "npm run build",
"prepublishOnly": "npm test && npm run lint",
"release": "standard-version"
},
"main:src": "src/index.js",
"standard-version": {

@@ -76,0 +76,0 @@ "scripts": {

@@ -32,7 +32,10 @@ # sequent-promises

sequentPromises([promiseResolve, promiseReject, promiseResolve]).then(({ results, errors }) => {
console.log(results); //[result, result]
console.log(errors); //[Not running: Promise was not running]
console.log(isNotRunningError(errors[0])); //true;
});
sequentPromises([promiseResolve, promiseReject, promiseResolve]).then(
({ success, errors, results }) => {
console.log(success); // [result, result]
console.log(errors); // ['Not running: Promise was not running']
console.log(results); // [result, 'Not running: Promise was not running', result]
console.log(isNotRunningError(errors[0])); //true;
}
);
```

@@ -39,0 +42,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc