From a4235771679d7d9ba2a1d78c71ea4f4c918abe0e Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 8 Nov 2021 14:12:59 +0300 Subject: [PATCH 1/2] ci: added node.js 17 --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 48748e0..e7d51e8 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: [12.x, 14.x, 16.x] + node-version: [12.x, 14.x, 16.x, 17.x] webpack-version: [latest] runs-on: ${{ matrix.os }} From 49bbda63b7ca37f5e0f3a0056383aec6b766b731 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 8 Nov 2021 14:18:23 +0300 Subject: [PATCH 2/2] test: update --- test/CssMinimizerPlugin.test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/CssMinimizerPlugin.test.js b/test/CssMinimizerPlugin.test.js index c545f0c..7f77f5e 100644 --- a/test/CssMinimizerPlugin.test.js +++ b/test/CssMinimizerPlugin.test.js @@ -1,5 +1,4 @@ import path from "path"; -import crypto from "crypto"; import { SourceMapConsumer } from "source-map"; import MiniCssExtractPlugin from "mini-css-extract-plugin"; @@ -456,8 +455,8 @@ describe("CssMinimizerPlugin", () => { for (const assetName of Object.keys(assets)) { const [, webpackHash] = assetName.match(/^.+?\.(.+?)\..+$/); const { hashDigestLength, hashDigest, hashFunction } = output; - const cryptoHash = crypto - .createHash(hashFunction) + const cryptoHash = require("webpack") + .util.createHash(hashFunction) .update(readAsset(assetName, compiler, stats)) .digest(hashDigest) .slice(0, hashDigestLength);