Remove NodeJs 10 support (#3419)

This commit is contained in:
Peter Hedenskog 2021-07-21 16:47:42 +02:00 committed by GitHub
parent 504e22a133
commit 6d0027c94c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 20 deletions

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}

View File

@ -457,25 +457,13 @@ class HTMLBuilder {
res = this.storageManager.copyToResultDir(path.join(__dirname, 'assets'));
}
// Aggregate/summarize data
// When we move to NodeJS 12 we can use only allSettled.
if (Promise.allSettled) {
return res.then(() =>
Promise.allSettled(summaryRenders)
.then(() => Promise.allSettled(urlPageRenders))
.then(() =>
log.info('HTML stored in %s', this.storageManager.getBaseDir())
)
);
} else {
return res.then(() =>
Promise.all(summaryRenders)
.then(() => Promise.all(urlPageRenders))
.then(() =>
log.info('HTML stored in %s', this.storageManager.getBaseDir())
)
);
}
return res.then(() =>
Promise.allSettled(summaryRenders)
.then(() => Promise.allSettled(urlPageRenders))
.then(() =>
log.info('HTML stored in %s', this.storageManager.getBaseDir())
)
);
}
async _renderUrlPage(url, name, locals, alias) {