From 56f1ec72bff84248248268e3a8b7e0280fe8ffef Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Sat, 9 Apr 2022 09:55:38 -0300 Subject: [PATCH] Downgrade mock-fs and install polyfill for Promise.allSettled (to support Node v10) --- lib/plugin/gitlab/GitLab.js | 3 ++- package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/plugin/gitlab/GitLab.js b/lib/plugin/gitlab/GitLab.js index 6ab7ebf1..19f954cd 100644 --- a/lib/plugin/gitlab/GitLab.js +++ b/lib/plugin/gitlab/GitLab.js @@ -4,6 +4,7 @@ const got = require('got'); const globby = require('globby'); const FormData = require('form-data'); const _ = require('lodash'); +const allSettled = require('promise.allsettled'); const Release = require('../GitRelease'); const { format, e } = require('../../util'); const prompts = require('./prompts'); @@ -148,7 +149,7 @@ class GitLab extends Release { }); }); try { - await Promise.allSettled(requests).then(results => { + await allSettled(requests).then(results => { for (const result of results) { if (result.status === 'rejected') { throw e('Missing one or more milestones in GitLab. Creating a GitLab release will fail.', docs); diff --git a/package.json b/package.json index d7dc08a0..6a4dc676 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "ora": "5.4.1", "os-name": "4.0.1", "parse-json": "5.2.0", + "promise.allsettled": "1.0.5", "semver": "7.3.5", "shelljs": "0.8.5", "update-notifier": "5.1.0", @@ -94,7 +95,7 @@ "eslint-plugin-import": "2.25.4", "eslint-plugin-prettier": "4.0.0", "markdown-toc": "1.2.0", - "mock-fs": "5.1.2", + "mock-fs": "4.14.0", "mock-stdio": "1.0.3", "nock": "13.2.4", "node-fetch": "2.6.7",