diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 30144e413..e9894c7ce 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -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 }} diff --git a/lib/plugins/html/htmlBuilder.js b/lib/plugins/html/htmlBuilder.js index d770e5e4a..90297d863 100644 --- a/lib/plugins/html/htmlBuilder.js +++ b/lib/plugins/html/htmlBuilder.js @@ -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) {