From 5337a47dde86ebb5a925a4d3752a15947e9ce691 Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Mon, 8 Nov 2021 17:40:23 +0300 Subject: [PATCH] ci: add more node.js versions (#453) --- .github/workflows/nodejs.yml | 2 +- test/TerserPlugin.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 862fe62..14fdfd7 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -56,7 +56,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [10.x, 12.x, 14.x] + node-version: [10.x, 12.x, 14.x, 16.x, 17.x] webpack-version: [latest] runs-on: ${{ matrix.os }} diff --git a/test/TerserPlugin.test.js b/test/TerserPlugin.test.js index dcecf9b..4a4d532 100644 --- a/test/TerserPlugin.test.js +++ b/test/TerserPlugin.test.js @@ -5,7 +5,7 @@ import path from "path"; import { SourceMapConsumer } from "source-map"; import CopyWebpackPlugin from "copy-webpack-plugin"; import RequestShortener from "webpack/lib/RequestShortener"; -import { javascript, SourceMapDevToolPlugin } from "webpack"; +import { javascript, SourceMapDevToolPlugin, util } from "webpack"; import del from "del"; @@ -935,7 +935,7 @@ describe("TerserPlugin", () => { for (const assetName of Object.keys(assets)) { const [, webpackHash] = assetName.match(/^.+?\.(.+?)\..+$/); const { hashDigestLength, hashDigest, hashFunction } = output; - const cryptoHash = crypto + const cryptoHash = util .createHash(hashFunction) .update(readAsset(assetName, compiler, stats)) .digest(hashDigest)