Skip to content

Commit 3fb6845

Browse files
chore(deps): update (webpack-contrib#954)
1 parent b426f04 commit 3fb6845

File tree

7 files changed

+3914
-4449
lines changed

7 files changed

+3914
-4449
lines changed

.github/workflows/nodejs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
strategy:
9999
matrix:
100100
os: [ubuntu-latest, windows-latest, macos-latest]
101-
node-version: [12.x, 14.x, 16.x, 17.x]
101+
node-version: [12.x, 14.x, 16.x, 18.x]
102102

103103
runs-on: ${{ matrix.os }}
104104

jest.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module.exports = {
2-
testURL: "http://localhost/",
32
transformIgnorePatterns: ["/node_modules/", "<rootDir>/dist/"],
43
watchPathIgnorePatterns: ["<rootDir>/test/js"],
54
setupFilesAfterEnv: ["<rootDir>/setupTest.js"],

package-lock.json

+3,871-4,423
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
"@babel/core": "^7.17.5",
5656
"@babel/eslint-parser": "^7.17.0",
5757
"@babel/preset-env": "^7.16.11",
58-
"@commitlint/cli": "^16.2.1",
59-
"@commitlint/config-conventional": "^16.2.1",
58+
"@commitlint/cli": "^17.0.2",
59+
"@commitlint/config-conventional": "^17.0.2",
6060
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
61-
"babel-jest": "^27.5.1",
61+
"babel-jest": "^28.1.1",
6262
"bootstrap": "^4.6.0",
6363
"cross-env": "^7.0.3",
6464
"css-loader": "^6.7.0",
@@ -70,7 +70,8 @@
7070
"eslint-plugin-import": "^2.25.4",
7171
"file-loader": "^6.2.0",
7272
"husky": "^7.0.0",
73-
"jest": "^27.5.1",
73+
"jest": "^28.1.1",
74+
"jest-environment-jsdom": "^28.1.1",
7475
"jsdom": "^19.0.0",
7576
"lint-staged": "^12.3.4",
7677
"memfs": "^3.4.1",

test/cases/hmr/expected/main.js

+35-18
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ __webpack_require__.r(__webpack_exports__);
533533
/******/ var currentStatus = "idle";
534534
/******/
535535
/******/ // while downloading
536-
/******/ var blockingPromises;
536+
/******/ var blockingPromises = 0;
537+
/******/ var blockingPromisesWaiting = [];
537538
/******/
538539
/******/ // The update info
539540
/******/ var currentUpdateApplyHandlers;
@@ -723,29 +724,40 @@ __webpack_require__.r(__webpack_exports__);
723724
/******/ return Promise.all(results);
724725
/******/ }
725726
/******/
727+
/******/ function unblock() {
728+
/******/ if (--blockingPromises === 0) {
729+
/******/ setStatus("ready").then(function () {
730+
/******/ if (blockingPromises === 0) {
731+
/******/ var list = blockingPromisesWaiting;
732+
/******/ blockingPromisesWaiting = [];
733+
/******/ for (var i = 0; i < list.length; i++) {
734+
/******/ list[i]();
735+
/******/ }
736+
/******/ }
737+
/******/ });
738+
/******/ }
739+
/******/ }
740+
/******/
726741
/******/ function trackBlockingPromise(promise) {
727742
/******/ switch (currentStatus) {
728743
/******/ case "ready":
729744
/******/ setStatus("prepare");
730-
/******/ blockingPromises.push(promise);
731-
/******/ waitForBlockingPromises(function () {
732-
/******/ return setStatus("ready");
733-
/******/ });
734-
/******/ return promise;
745+
/******/ /* fallthrough */
735746
/******/ case "prepare":
736-
/******/ blockingPromises.push(promise);
747+
/******/ blockingPromises++;
748+
/******/ promise.then(unblock, unblock);
737749
/******/ return promise;
738750
/******/ default:
739751
/******/ return promise;
740752
/******/ }
741753
/******/ }
742754
/******/
743755
/******/ function waitForBlockingPromises(fn) {
744-
/******/ if (blockingPromises.length === 0) return fn();
745-
/******/ var blocker = blockingPromises;
746-
/******/ blockingPromises = [];
747-
/******/ return Promise.all(blocker).then(function () {
748-
/******/ return waitForBlockingPromises(fn);
756+
/******/ if (blockingPromises === 0) return fn();
757+
/******/ return new Promise(function (resolve) {
758+
/******/ blockingPromisesWaiting.push(function () {
759+
/******/ resolve(fn());
760+
/******/ });
749761
/******/ });
750762
/******/ }
751763
/******/
@@ -766,7 +778,6 @@ __webpack_require__.r(__webpack_exports__);
766778
/******/
767779
/******/ return setStatus("prepare").then(function () {
768780
/******/ var updatedModules = [];
769-
/******/ blockingPromises = [];
770781
/******/ currentUpdateApplyHandlers = [];
771782
/******/
772783
/******/ return Promise.all(
@@ -803,7 +814,11 @@ __webpack_require__.r(__webpack_exports__);
803814
/******/ function hotApply(options) {
804815
/******/ if (currentStatus !== "ready") {
805816
/******/ return Promise.resolve().then(function () {
806-
/******/ throw new Error("apply() is only allowed in ready status");
817+
/******/ throw new Error(
818+
/******/ "apply() is only allowed in ready status (state: " +
819+
/******/ currentStatus +
820+
/******/ ")"
821+
/******/ );
807822
/******/ });
808823
/******/ }
809824
/******/ return internalApply(options);
@@ -1024,7 +1039,8 @@ __webpack_require__.r(__webpack_exports__);
10241039
/******/
10251040
/******/ var currentUpdatedModulesList;
10261041
/******/ var waitingUpdateResolves = {};
1027-
/******/ function loadUpdateChunk(chunkId) {
1042+
/******/ function loadUpdateChunk(chunkId, updatedModulesList) {
1043+
/******/ currentUpdatedModulesList = updatedModulesList;
10281044
/******/ return new Promise((resolve, reject) => {
10291045
/******/ waitingUpdateResolves[chunkId] = resolve;
10301046
/******/ // start update chunk loading
@@ -1487,15 +1503,16 @@ __webpack_require__.r(__webpack_exports__);
14871503
/******/ ) {
14881504
/******/ promises.push(loadUpdateChunk(chunkId, updatedModulesList));
14891505
/******/ currentUpdateChunks[chunkId] = true;
1506+
/******/ } else {
1507+
/******/ currentUpdateChunks[chunkId] = false;
14901508
/******/ }
14911509
/******/ });
14921510
/******/ if (__webpack_require__.f) {
14931511
/******/ __webpack_require__.f.jsonpHmr = function (chunkId, promises) {
14941512
/******/ if (
14951513
/******/ currentUpdateChunks &&
1496-
/******/ !__webpack_require__.o(currentUpdateChunks, chunkId) &&
1497-
/******/ __webpack_require__.o(installedChunks, chunkId) &&
1498-
/******/ installedChunks[chunkId] !== undefined
1514+
/******/ __webpack_require__.o(currentUpdateChunks, chunkId) &&
1515+
/******/ !currentUpdateChunks[chunkId]
14991516
/******/ ) {
15001517
/******/ promises.push(loadUpdateChunk(chunkId));
15011518
/******/ currentUpdateChunks[chunkId] = true;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body {
22
background: green;
3-
background-image: url(http://example.com/a825917f3984c437782f/c9e192c015437a21dea1.svg);
3+
background-image: url(http://example.com/47e6924dce47554c1058/c9e192c015437a21dea1.svg);
44
}
55

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body {
22
background: red;
3-
background-image: url(http://example.com/72e334a82b025af50931/c9e192c015437a21dea1.svg);
3+
background-image: url(http://example.com/220588b7ee0332ae20e5/c9e192c015437a21dea1.svg);
44
}
55

0 commit comments

Comments
 (0)