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)