From f369287ffc5a9d61448735625c72a3e7512d8b69 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 23 Dec 2025 16:15:27 +0300 Subject: [PATCH 01/13] chore: update some deps --- package-lock.json | 861 +++++++----------- package.json | 15 +- test/serve/basic/multi-dev-server.config.js | 61 +- test/serve/basic/serve-basic.test.js | 5 +- .../serve-variable/serve-variable.test.js | 5 +- .../serve-custom-config.test.js | 5 +- 6 files changed, 379 insertions(+), 573 deletions(-) diff --git a/package-lock.json b/package-lock.json index be2594cd1ce..2346c08eb09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,9 +24,9 @@ "coffeescript": "^2.7.0", "colorette": "^2.0.16", "concat-stream": "^2.0.0", - "cspell": "^8.3.2", + "cspell": "^9.4.0", "css-loader": "^7.1.2", - "del-cli": "^6.0.0", + "del-cli": "^7.0.0", "eslint": "^9.29.0", "eslint-config-prettier": "^10.1.5", "eslint-config-webpack": "^4.5.0", @@ -37,12 +37,12 @@ "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unicorn": "^62.0.0", "execa": "^5.0.0", - "get-port": "^5.1.1", + "get-port": "^7.1.0", "globals": "^16.2.0", "husky": "^9.1.4", "jest": "^30.2.0", "lerna": "^9.0.3", - "lint-staged": "^15.2.9", + "lint-staged": "^16.2.7", "mini-css-extract-plugin": "^2.6.1", "nyc": "^17.1.0", "prettier": "^3.6.0", @@ -101,7 +101,6 @@ "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -2106,129 +2105,130 @@ } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.19.4.tgz", - "integrity": "sha512-2ZRcZP/ncJ5q953o8i+R0fb8+14PDt5UefUNMrFZZHvfTI0jukAASOQeLY+WT6ASZv6CgbPrApAdbppy9FaXYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspell/dict-ada": "^4.1.0", - "@cspell/dict-al": "^1.1.0", - "@cspell/dict-aws": "^4.0.10", - "@cspell/dict-bash": "^4.2.0", - "@cspell/dict-companies": "^3.1.15", - "@cspell/dict-cpp": "^6.0.8", - "@cspell/dict-cryptocurrencies": "^5.0.4", - "@cspell/dict-csharp": "^4.0.6", - "@cspell/dict-css": "^4.0.17", - "@cspell/dict-dart": "^2.3.0", - "@cspell/dict-data-science": "^2.0.8", - "@cspell/dict-django": "^4.1.4", - "@cspell/dict-docker": "^1.1.13", - "@cspell/dict-dotnet": "^5.0.9", - "@cspell/dict-elixir": "^4.0.7", - "@cspell/dict-en_us": "^4.4.3", - "@cspell/dict-en-common-misspellings": "^2.0.10", - "@cspell/dict-en-gb": "1.1.33", - "@cspell/dict-filetypes": "^3.0.11", - "@cspell/dict-flutter": "^1.1.0", - "@cspell/dict-fonts": "^4.0.4", - "@cspell/dict-fsharp": "^1.1.0", - "@cspell/dict-fullstack": "^3.2.6", - "@cspell/dict-gaming-terms": "^1.1.1", - "@cspell/dict-git": "^3.0.4", - "@cspell/dict-golang": "^6.0.20", - "@cspell/dict-google": "^1.0.8", - "@cspell/dict-haskell": "^4.0.5", - "@cspell/dict-html": "^4.0.11", - "@cspell/dict-html-symbol-entities": "^4.0.3", - "@cspell/dict-java": "^5.0.11", - "@cspell/dict-julia": "^1.1.0", - "@cspell/dict-k8s": "^1.0.10", - "@cspell/dict-kotlin": "^1.1.0", - "@cspell/dict-latex": "^4.0.3", - "@cspell/dict-lorem-ipsum": "^4.0.4", - "@cspell/dict-lua": "^4.0.7", - "@cspell/dict-makefile": "^1.0.4", - "@cspell/dict-markdown": "^2.0.10", - "@cspell/dict-monkeyc": "^1.0.10", - "@cspell/dict-node": "^5.0.7", - "@cspell/dict-npm": "^5.2.1", - "@cspell/dict-php": "^4.0.14", - "@cspell/dict-powershell": "^5.0.14", - "@cspell/dict-public-licenses": "^2.0.13", - "@cspell/dict-python": "^4.2.17", - "@cspell/dict-r": "^2.1.0", - "@cspell/dict-ruby": "^5.0.8", - "@cspell/dict-rust": "^4.0.11", - "@cspell/dict-scala": "^5.0.7", - "@cspell/dict-shell": "^1.1.0", - "@cspell/dict-software-terms": "^5.0.5", - "@cspell/dict-sql": "^2.2.0", - "@cspell/dict-svelte": "^1.0.6", - "@cspell/dict-swift": "^2.0.5", - "@cspell/dict-terraform": "^1.1.1", - "@cspell/dict-typescript": "^3.2.1", - "@cspell/dict-vue": "^3.0.4" + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.4.0.tgz", + "integrity": "sha512-Hm2gpMg/lRv4fKtiO2NfBiaJdFZVVb1V1a+IVhlD9qCuObLhCt60Oze2kD1dQzhbaIX756cs/eyxa5bQ5jihhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/dict-ada": "^4.1.1", + "@cspell/dict-al": "^1.1.1", + "@cspell/dict-aws": "^4.0.16", + "@cspell/dict-bash": "^4.2.2", + "@cspell/dict-companies": "^3.2.7", + "@cspell/dict-cpp": "^6.0.15", + "@cspell/dict-cryptocurrencies": "^5.0.5", + "@cspell/dict-csharp": "^4.0.7", + "@cspell/dict-css": "^4.0.18", + "@cspell/dict-dart": "^2.3.1", + "@cspell/dict-data-science": "^2.0.12", + "@cspell/dict-django": "^4.1.5", + "@cspell/dict-docker": "^1.1.16", + "@cspell/dict-dotnet": "^5.0.10", + "@cspell/dict-elixir": "^4.0.8", + "@cspell/dict-en_us": "^4.4.24", + "@cspell/dict-en-common-misspellings": "^2.1.8", + "@cspell/dict-en-gb-mit": "^3.1.14", + "@cspell/dict-filetypes": "^3.0.14", + "@cspell/dict-flutter": "^1.1.1", + "@cspell/dict-fonts": "^4.0.5", + "@cspell/dict-fsharp": "^1.1.1", + "@cspell/dict-fullstack": "^3.2.7", + "@cspell/dict-gaming-terms": "^1.1.2", + "@cspell/dict-git": "^3.0.7", + "@cspell/dict-golang": "^6.0.24", + "@cspell/dict-google": "^1.0.9", + "@cspell/dict-haskell": "^4.0.6", + "@cspell/dict-html": "^4.0.13", + "@cspell/dict-html-symbol-entities": "^4.0.4", + "@cspell/dict-java": "^5.0.12", + "@cspell/dict-julia": "^1.1.1", + "@cspell/dict-k8s": "^1.0.12", + "@cspell/dict-kotlin": "^1.1.1", + "@cspell/dict-latex": "^4.0.4", + "@cspell/dict-lorem-ipsum": "^4.0.5", + "@cspell/dict-lua": "^4.0.8", + "@cspell/dict-makefile": "^1.0.5", + "@cspell/dict-markdown": "^2.0.13", + "@cspell/dict-monkeyc": "^1.0.11", + "@cspell/dict-node": "^5.0.8", + "@cspell/dict-npm": "^5.2.25", + "@cspell/dict-php": "^4.1.0", + "@cspell/dict-powershell": "^5.0.15", + "@cspell/dict-public-licenses": "^2.0.15", + "@cspell/dict-python": "^4.2.23", + "@cspell/dict-r": "^2.1.1", + "@cspell/dict-ruby": "^5.0.9", + "@cspell/dict-rust": "^4.0.12", + "@cspell/dict-scala": "^5.0.8", + "@cspell/dict-shell": "^1.1.2", + "@cspell/dict-software-terms": "^5.1.15", + "@cspell/dict-sql": "^2.2.1", + "@cspell/dict-svelte": "^1.0.7", + "@cspell/dict-swift": "^2.0.6", + "@cspell/dict-terraform": "^1.1.3", + "@cspell/dict-typescript": "^3.2.3", + "@cspell/dict-vue": "^3.0.5", + "@cspell/dict-zig": "^1.0.0" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@cspell/cspell-json-reporter": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-8.19.4.tgz", - "integrity": "sha512-pOlUtLUmuDdTIOhDTvWxxta0Wm8RCD/p1V0qUqeP6/Ups1ajBI4FWEpRFd7yMBTUHeGeSNicJX5XeX7wNbAbLQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.4.0.tgz", + "integrity": "sha512-TpHY7t13xNhcZF9bwOfgVIhcyPDamMnxU/TBYhf4mPtXPLrZ5gBTg3UZh0/9Zn3naMjmJtngdsLvB2wai9xBlQ==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/cspell-types": "8.19.4" + "@cspell/cspell-types": "9.4.0" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@cspell/cspell-pipe": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.19.4.tgz", - "integrity": "sha512-GNAyk+7ZLEcL2fCMT5KKZprcdsq3L1eYy3e38/tIeXfbZS7Sd1R5FXUe6CHXphVWTItV39TvtLiDwN/2jBts9A==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.4.0.tgz", + "integrity": "sha512-cI0sUe7SB99hJB1T6PhH/MpSrnml1kOekTCE+VH3Eb7zkVP5/mwJXs8BlufdvwBona+Cgkx6jeWlhFpxLc39Yg==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@cspell/cspell-resolver": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.19.4.tgz", - "integrity": "sha512-S8vJMYlsx0S1D60glX8H2Jbj4mD8519VjyY8lu3fnhjxfsl2bDFZvF3ZHKsLEhBE+Wh87uLqJDUJQiYmevHjDg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.4.0.tgz", + "integrity": "sha512-o9gbbdXlhxG2rqtGqQ7xZ8MGDDsPLbskBnTeuA++ix4Ch/HdjrBNmKReIGAEqJPfP+JGgoEKqFISHUDKAJ/ygQ==", "dev": true, "license": "MIT", "dependencies": { "global-directory": "^4.0.1" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@cspell/cspell-service-bus": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.19.4.tgz", - "integrity": "sha512-uhY+v8z5JiUogizXW2Ft/gQf3eWrh5P9036jN2Dm0UiwEopG/PLshHcDjRDUiPdlihvA0RovrF0wDh4ptcrjuQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.4.0.tgz", + "integrity": "sha512-UottRlFPN6FGUfojx5HtUPZTeYXg2rf2HvO/HLh0KicirVYO16vFxTevg9MyOvw1EXSsDRz8ECANjiE7fnzBCQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@cspell/cspell-types": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.19.4.tgz", - "integrity": "sha512-ekMWuNlFiVGfsKhfj4nmc8JCA+1ZltwJgxiKgDuwYtR09ie340RfXFF6YRd2VTW5zN7l4F1PfaAaPklVz6utSg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.4.0.tgz", + "integrity": "sha512-vSpd50OfmthBH0aRFRLA2zJFtwli3ntHA0WAOJ8tIMLUCJgF3udooRXFeX3wR8ri69C9mc3864LC4inyRC/E9w==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@cspell/dict-ada": { @@ -2263,9 +2263,9 @@ } }, "node_modules/@cspell/dict-companies": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.2.8.tgz", - "integrity": "sha512-NTP6ITcNvQqpZT86yPZX6kfGhjxD409K8GxFPSHODqKOLxi6eQkUTW9YSXe0o1rzio2Lm7P17laugXjvGnwOjg==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.2.9.tgz", + "integrity": "sha512-y5GdU+LnuMhUE/WYwOYt7GcJdrpmV4KXE1oFb5toEsnGa2KzffUbS6lwPpeRBocQoqZj8jJYFtxoQ+2KVg++/A==", "dev": true, "license": "MIT" }, @@ -2295,8 +2295,7 @@ "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.19.tgz", "integrity": "sha512-VYHtPnZt/Zd/ATbW3rtexWpBnHUohUrQOHff/2JBhsVgxOrksAxJnLAO43Q1ayLJBJUUwNVo+RU0sx0aaysZfg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@cspell/dict-dart": { "version": "2.3.2", @@ -2348,16 +2347,16 @@ "license": "MIT" }, "node_modules/@cspell/dict-en-common-misspellings": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.1.9.tgz", - "integrity": "sha512-3pvtsn5UiW0TftC/fa3kKczD+rKFerTjxl0E/ZApz109ZkyjqolgoRPEVrERFdhGngnQ0s+634WkWRxN8nT4GA==", + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.1.10.tgz", + "integrity": "sha512-+S10oo15G3Axz1W4FGmYNq9u0xxS6OhNl9dXY3qjYBOqhzfF3l1oM/TpkfH/1NH31r3GneuPVXKXT7y16qwJYA==", "dev": true, "license": "CC BY-SA 4.0" }, - "node_modules/@cspell/dict-en-gb": { - "version": "1.1.33", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz", - "integrity": "sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==", + "node_modules/@cspell/dict-en-gb-mit": { + "version": "3.1.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb-mit/-/dict-en-gb-mit-3.1.15.tgz", + "integrity": "sha512-iF1KPSULjpAbtmPFTzyykytQPliBw5Qc7EVt5a/cdpJ/WBnosjBKHj0/svESc+enQoxq7bMcmhL9qJeGHQAWyQ==", "dev": true, "license": "MIT" }, @@ -2411,9 +2410,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-golang": { - "version": "6.0.24", - "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.24.tgz", - "integrity": "sha512-rY7PlC3MsHozmjrZWi0HQPUl0BVCV0+mwK0rnMT7pOIXqOe4tWCYMULDIsEk4F0gbIxb5badd2dkCPDYjLnDgA==", + "version": "6.0.25", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.25.tgz", + "integrity": "sha512-Q0mkUj1mFN1P5LZoKBeTLOQehlHMYv62K0Px9FS7qykSvZjBz44bhCezJuepTPCiCFqmwQgT2fc3Ixw+fhO6pQ==", "dev": true, "license": "MIT" }, @@ -2436,16 +2435,14 @@ "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.14.tgz", "integrity": "sha512-2bf7n+kS92g+cMKV0wr9o/Oq9n8JzU7CcrB96gIh2GHgnF+0xDOqO2W/1KeFAqOfqosoOVE48t+4dnEMkkoJ2Q==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@cspell/dict-html-symbol-entities": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.5.tgz", "integrity": "sha512-429alTD4cE0FIwpMucvSN35Ld87HCyuM8mF731KU5Rm4Je2SG6hmVx7nkBsLyrmH3sQukTcr1GaiZsiEg8svPA==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@cspell/dict-java": { "version": "5.0.12", @@ -2583,9 +2580,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-rust": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.12.tgz", - "integrity": "sha512-z2QiH+q9UlNhobBJArvILRxV8Jz0pKIK7gqu4TgmEYyjiu1TvnGZ1tbYHeu9w3I/wOP6UMDoCBTty5AlYfW0mw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.1.0.tgz", + "integrity": "sha512-ysFxxKc3QjPWtPacbwxzz8sDOACHNShlhQpnBsDXAHN3LogmuBsQtfyuU30APqFjCOg9KwGciKYC/hcGxJCbiA==", "dev": true, "license": "MIT" }, @@ -2604,9 +2601,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-software-terms": { - "version": "5.1.17", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.17.tgz", - "integrity": "sha512-Dxea28iyreQSxChRLWH9TFYXHMWKEt68H0DRD+urZpWtzzMRXxqh1xHX0itGw0OpgR/aJBETNWLrxebdu0Dl+Q==", + "version": "5.1.18", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.18.tgz", + "integrity": "sha512-+RUM+DnRnGzDjnJrAEiEQnopPGBXQ5kUY9t38WdTVYVgkpIE0/dcMX+s5uAp7vvKezhU6gW+CGW5K5xdF2KKiw==", "dev": true, "license": "MIT" }, @@ -2643,8 +2640,7 @@ "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.2.3.tgz", "integrity": "sha512-zXh1wYsNljQZfWWdSPYwQhpwiuW0KPW1dSd8idjMRvSD0aSvWWHoWlrMsmZeRl4qM4QCEAjua8+cjflm41cQBg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@cspell/dict-vue": { "version": "3.0.5", @@ -2653,48 +2649,55 @@ "dev": true, "license": "MIT" }, + "node_modules/@cspell/dict-zig": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-zig/-/dict-zig-1.0.0.tgz", + "integrity": "sha512-XibBIxBlVosU06+M6uHWkFeT0/pW5WajDRYdXG2CgHnq85b0TI/Ks0FuBJykmsgi2CAD3Qtx8UHFEtl/DSFnAQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@cspell/dynamic-import": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.19.4.tgz", - "integrity": "sha512-0LLghC64+SiwQS20Sa0VfFUBPVia1rNyo0bYeIDoB34AA3qwguDBVJJkthkpmaP1R2JeR/VmxmJowuARc4ZUxA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.4.0.tgz", + "integrity": "sha512-d2fjLjzrKGUIn5hWK8gMuyAh2pqXSxBqOHpU1jR3jxbrO3MilunKNijaSstv7CZn067Jpc36VfaKQodaXNZzUA==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/url": "8.19.4", - "import-meta-resolve": "^4.1.0" + "@cspell/url": "9.4.0", + "import-meta-resolve": "^4.2.0" }, "engines": { - "node": ">=18.0" + "node": ">=20" } }, "node_modules/@cspell/filetypes": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-8.19.4.tgz", - "integrity": "sha512-D9hOCMyfKtKjjqQJB8F80PWsjCZhVGCGUMiDoQpcta0e+Zl8vHgzwaC0Ai4QUGBhwYEawHGiWUd7Y05u/WXiNQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.4.0.tgz", + "integrity": "sha512-RMrYHkvPF0tHVFM+T4voEhX9sfYQrd/mnNbf6+O4CWUyLCz4NQ5H9yOgEIJwEcLu4y3NESGXFef/Jn5xo0CUfg==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@cspell/strong-weak-map": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.19.4.tgz", - "integrity": "sha512-MUfFaYD8YqVe32SQaYLI24/bNzaoyhdBIFY5pVrvMo1ZCvMl8AlfI2OcBXvcGb5aS5z7sCNCJm11UuoYbLI1zw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.4.0.tgz", + "integrity": "sha512-ui7mlXYmqElS/SmRubPBNWdkQVWgWbB6rjCurc+0owYXlnweItAMHTxC8mCWM/Au22SF1dB/JR8QBELFXLkTjQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@cspell/url": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/@cspell/url/-/url-8.19.4.tgz", - "integrity": "sha512-Pa474iBxS+lxsAL4XkETPGIq3EgMLCEb9agj3hAd2VGMTCApaiUvamR4b+uGXIPybN70piFxvzrfoxsG2uIP6A==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.4.0.tgz", + "integrity": "sha512-nt88P6m20AaVbqMxsyPf8KqyWPaFEW2UANi0ijBxc2xTkD2KiUovxfZUYW6NMU9XBYZlovT5LztkEhst2yBcSA==", "dev": true, "license": "MIT", "engines": { - "node": ">=18.0" + "node": ">=20" } }, "node_modules/@cspotcode/source-map-support": { @@ -2939,7 +2942,6 @@ "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -2953,7 +2955,6 @@ "integrity": "sha512-R8uZemG9dKTbru/DQRPblbJyXpObwKzo8rv1KYGGuPUPtjM4LXBYM9q5CIZAComzZupws3tWbDwam5AFpPLyJQ==", "dev": true, "license": "MIT", - "peer": true, "workspaces": [ "examples/*" ], @@ -5751,7 +5752,6 @@ "integrity": "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@octokit/auth-token": "^4.0.0", "@octokit/graphql": "^7.1.0", @@ -6397,7 +6397,6 @@ "integrity": "sha512-JCs+MqoXfXrRPGbGmho/zGS/jMcn3ieKl/A8YImqib76C8kjgZwq5uUFzc30lJkMvcchuRn6/v8IApLxli3Jyw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.9.0", "@typescript-eslint/types": "^8.47.0", @@ -6637,7 +6636,6 @@ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -6816,7 +6814,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.3.tgz", "integrity": "sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==", "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -6984,7 +6981,6 @@ "integrity": "sha512-PKhLGDq3JAg0Jk/aK890knnqduuI/Qj+udH7wCf0217IGi4gt+acgCyPVe79qoT+qKUvHMDQkwJeKW9fwl8Cyw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.50.1", @@ -7024,7 +7020,6 @@ "integrity": "sha512-hM5faZwg7aVNa819m/5r7D0h0c9yC4DUlWAOvHAtISdFTc8xB86VmX5Xqabrama3wIPJ/q9RbGS1worb6JfnMg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.50.1", "@typescript-eslint/types": "8.50.1", @@ -7829,7 +7824,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -7918,7 +7912,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -8756,7 +8749,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -9366,42 +9358,34 @@ } }, "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.1.1.tgz", + "integrity": "sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A==", "dev": true, "license": "MIT", "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" + "slice-ansi": "^7.1.0", + "string-width": "^8.0.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "dev": true, - "license": "MIT" - }, "node_modules/cli-truncate/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", + "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", + "get-east-asian-width": "^1.3.0", "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -9670,13 +9654,13 @@ } }, "node_modules/commander": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", - "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", + "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/comment-json": { @@ -10853,7 +10837,6 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -10919,161 +10902,162 @@ } }, "node_modules/cspell": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-8.19.4.tgz", - "integrity": "sha512-toaLrLj3usWY0Bvdi661zMmpKW2DVLAG3tcwkAv4JBTisdIRn15kN/qZDrhSieUEhVgJgZJDH4UKRiq29mIFxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspell/cspell-json-reporter": "8.19.4", - "@cspell/cspell-pipe": "8.19.4", - "@cspell/cspell-types": "8.19.4", - "@cspell/dynamic-import": "8.19.4", - "@cspell/url": "8.19.4", - "chalk": "^5.4.1", - "chalk-template": "^1.1.0", - "commander": "^13.1.0", - "cspell-dictionary": "8.19.4", - "cspell-gitignore": "8.19.4", - "cspell-glob": "8.19.4", - "cspell-io": "8.19.4", - "cspell-lib": "8.19.4", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.4.0.tgz", + "integrity": "sha512-ZvXO+EY/G0/msu7jwRiVk0sXL/zB7DMJLBvjSUrK82uVbDoDxHwXxUuOz2UVnk2+J61//ldIZrjxVK8KMvaJlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspell/cspell-json-reporter": "9.4.0", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "@cspell/dynamic-import": "9.4.0", + "@cspell/url": "9.4.0", + "ansi-regex": "^6.2.2", + "chalk": "^5.6.2", + "chalk-template": "^1.1.2", + "commander": "^14.0.2", + "cspell-config-lib": "9.4.0", + "cspell-dictionary": "9.4.0", + "cspell-gitignore": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-io": "9.4.0", + "cspell-lib": "9.4.0", "fast-json-stable-stringify": "^2.1.0", - "file-entry-cache": "^9.1.0", - "semver": "^7.7.1", - "tinyglobby": "^0.2.13" + "flatted": "^3.3.3", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15" }, "bin": { "cspell": "bin.mjs", "cspell-esm": "bin.mjs" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/streetsidesoftware/cspell?sponsor=1" } }, "node_modules/cspell-config-lib": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.19.4.tgz", - "integrity": "sha512-LtFNZEWVrnpjiTNgEDsVN05UqhhJ1iA0HnTv4jsascPehlaUYVoyucgNbFeRs6UMaClJnqR0qT9lnPX+KO1OLg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.4.0.tgz", + "integrity": "sha512-CvQKSmK/DRIf3LpNx2sZth65pHW2AHngZqLkH3DTwnAPbiCAsE0XvCrVhvDfCNu/6uJIaa+NVHSs8GOf//DHBQ==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/cspell-types": "8.19.4", - "comment-json": "^4.2.5", - "yaml": "^2.7.1" + "@cspell/cspell-types": "9.4.0", + "comment-json": "^4.4.1", + "smol-toml": "^1.5.2", + "yaml": "^2.8.2" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/cspell-dictionary": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.19.4.tgz", - "integrity": "sha512-lr8uIm7Wub8ToRXO9f6f7in429P1Egm3I+Ps3ZGfWpwLTCUBnHvJdNF/kQqF7PL0Lw6acXcjVWFYT7l2Wdst2g==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.4.0.tgz", + "integrity": "sha512-c2qscanRZChoHZFYI7KpvBMdy8i6wNwl2EflcNRrFiFOq67t9CgxLe54PafaqhrHGpBc8nElaZKciLvjj6Uscw==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/cspell-pipe": "8.19.4", - "@cspell/cspell-types": "8.19.4", - "cspell-trie-lib": "8.19.4", - "fast-equals": "^5.2.2" + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "cspell-trie-lib": "9.4.0", + "fast-equals": "^5.3.3" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/cspell-gitignore": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-8.19.4.tgz", - "integrity": "sha512-KrViypPilNUHWZkMV0SM8P9EQVIyH8HvUqFscI7+cyzWnlglvzqDdV4N5f+Ax5mK+IqR6rTEX8JZbCwIWWV7og==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.4.0.tgz", + "integrity": "sha512-HMrzLmJBUMSpaMMkltlTAz/aVOrHxixyhKfg5WbFCJ5JYZO6Qu3/JU3wRoOFoud9449wRjLkvrGmbbL2+vO6Lw==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/url": "8.19.4", - "cspell-glob": "8.19.4", - "cspell-io": "8.19.4" + "@cspell/url": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-io": "9.4.0" }, "bin": { "cspell-gitignore": "bin.mjs" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/cspell-glob": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.19.4.tgz", - "integrity": "sha512-042uDU+RjAz882w+DXKuYxI2rrgVPfRQDYvIQvUrY1hexH4sHbne78+OMlFjjzOCEAgyjnm1ktWUCCmh08pQUw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.4.0.tgz", + "integrity": "sha512-Q87Suj9oXrhoKck15qWorCizBjMNxG/k3NjnhKIAMrF+PdUa1Mpl0MOD+hqV1Wvwh1UHcIMYCP3bR3XpBbNx+Q==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/url": "8.19.4", - "picomatch": "^4.0.2" + "@cspell/url": "9.4.0", + "picomatch": "^4.0.3" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/cspell-grammar": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.19.4.tgz", - "integrity": "sha512-lzWgZYTu/L7DNOHjxuKf8H7DCXvraHMKxtFObf8bAzgT+aBmey5fW2LviXUkZ2Lb2R0qQY+TJ5VIGoEjNf55ow==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.4.0.tgz", + "integrity": "sha512-ie7OQ4Neflo+61bMzoLR7GtlZfMBAm2KL1U4iNqh15wUE5fDbvXeN15H5lu+gcO8BwYvC5wxZknw1x62/J8+3Q==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/cspell-pipe": "8.19.4", - "@cspell/cspell-types": "8.19.4" + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0" }, "bin": { "cspell-grammar": "bin.mjs" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/cspell-io": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.19.4.tgz", - "integrity": "sha512-W48egJqZ2saEhPWf5ftyighvm4mztxEOi45ILsKgFikXcWFs0H0/hLwqVFeDurgELSzprr12b6dXsr67dV8amg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.4.0.tgz", + "integrity": "sha512-8w30dqlO54H9w6WGlvZhHI5kytVbF3bYPqKJAZLWKEO36L2mdpf6/abx/FA4yVLJ56wmH1x0N0ZK32wNRl5C6A==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/cspell-service-bus": "8.19.4", - "@cspell/url": "8.19.4" + "@cspell/cspell-service-bus": "9.4.0", + "@cspell/url": "9.4.0" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/cspell-lib": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.19.4.tgz", - "integrity": "sha512-NwfdCCYtIBNQuZcoMlMmL3HSv2olXNErMi/aOTI9BBAjvCHjhgX5hbHySMZ0NFNynnN+Mlbu5kooJ5asZeB3KA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.4.0.tgz", + "integrity": "sha512-ajjioE59IEDNUPawfaBpiMfGC32iKPkuYd4T9ftguuef8VvyKRifniiUi1nxwGgAhzSfxHvWs7qdT+29Pp5TMQ==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/cspell-bundled-dicts": "8.19.4", - "@cspell/cspell-pipe": "8.19.4", - "@cspell/cspell-resolver": "8.19.4", - "@cspell/cspell-types": "8.19.4", - "@cspell/dynamic-import": "8.19.4", - "@cspell/filetypes": "8.19.4", - "@cspell/strong-weak-map": "8.19.4", - "@cspell/url": "8.19.4", + "@cspell/cspell-bundled-dicts": "9.4.0", + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-resolver": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "@cspell/dynamic-import": "9.4.0", + "@cspell/filetypes": "9.4.0", + "@cspell/strong-weak-map": "9.4.0", + "@cspell/url": "9.4.0", "clear-module": "^4.1.2", - "comment-json": "^4.2.5", - "cspell-config-lib": "8.19.4", - "cspell-dictionary": "8.19.4", - "cspell-glob": "8.19.4", - "cspell-grammar": "8.19.4", - "cspell-io": "8.19.4", - "cspell-trie-lib": "8.19.4", + "cspell-config-lib": "9.4.0", + "cspell-dictionary": "9.4.0", + "cspell-glob": "9.4.0", + "cspell-grammar": "9.4.0", + "cspell-io": "9.4.0", + "cspell-trie-lib": "9.4.0", "env-paths": "^3.0.0", - "fast-equals": "^5.2.2", - "gensequence": "^7.0.0", + "gensequence": "^8.0.8", "import-fresh": "^3.3.1", "resolve-from": "^5.0.0", "vscode-languageserver-textdocument": "^1.0.12", @@ -11081,7 +11065,7 @@ "xdg-basedir": "^5.1.0" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/cspell-lib/node_modules/env-paths": { @@ -11098,18 +11082,18 @@ } }, "node_modules/cspell-trie-lib": { - "version": "8.19.4", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.19.4.tgz", - "integrity": "sha512-yIPlmGSP3tT3j8Nmu+7CNpkPh/gBO2ovdnqNmZV+LNtQmVxqFd2fH7XvR1TKjQyctSH1ip0P5uIdJmzY1uhaYg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.4.0.tgz", + "integrity": "sha512-bySJTm8XDiJAoC1MDo4lE/KpSNxydo13ZETC8TF7Hb3rbWI1c6o5eZ4+i/tkG3M94OvKV91+MeAvoMCe7GGgAw==", "dev": true, "license": "MIT", "dependencies": { - "@cspell/cspell-pipe": "8.19.4", - "@cspell/cspell-types": "8.19.4", - "gensequence": "^7.0.0" + "@cspell/cspell-pipe": "9.4.0", + "@cspell/cspell-types": "9.4.0", + "gensequence": "^8.0.8" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/cspell/node_modules/semver": { @@ -11499,14 +11483,15 @@ } }, "node_modules/del-cli": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/del-cli/-/del-cli-6.0.0.tgz", - "integrity": "sha512-9nitGV2W6KLFyya4qYt4+9AKQFL+c0Ehj5K7V7IwlxTc6RMCfQUGY9E9pLG6e8TQjtwXpuiWIGGZb3mfVxyZkw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/del-cli/-/del-cli-7.0.0.tgz", + "integrity": "sha512-fRl4pWJYu9WFQH8jXdQUYvcD0IMtij9WEc7qmB7xOyJEweNJNuE7iKmqNeoOT1DbBUjtRjxlw8Y63qKBI/NQ1g==", "dev": true, "license": "MIT", "dependencies": { - "del": "^8.0.0", - "meow": "^13.2.0" + "del": "^8.0.1", + "meow": "^14.0.0", + "presentable-error": "^0.0.1" }, "bin": { "del": "cli.js", @@ -11520,13 +11505,13 @@ } }, "node_modules/del-cli/node_modules/meow": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", - "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-14.0.0.tgz", + "integrity": "sha512-JhC3R1f6dbspVtmF3vKjAWz1EVIvwFrGGPLSdU6rK79xBwHWTuHoLnRX/t1/zHS1Ch1Y2UtIrih7DAHuH9JFJA==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12113,7 +12098,6 @@ "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -12203,7 +12187,6 @@ "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -12362,7 +12345,6 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -12407,7 +12389,6 @@ "integrity": "sha512-4Nv70A4cHwKadDGlD2Znt+lbbsBKcY0N/GAeN2/0kDaVW3Lv8txVsvkvJcSUiAcS9qvLOPOwDihnlfSk32x85Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/utils": "^8.0.0" }, @@ -12434,7 +12415,6 @@ "integrity": "sha512-PR81eOGq4S7diVnV9xzFSBE4CDENRQGP0Lckkek8AdHtbj+6Bm0cItwlFnxsLFriJHspiE3mpu8U20eODyToIg==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "@es-joy/jsdoccomment": "~0.76.0", "@es-joy/resolve.exports": "1.2.0", @@ -12477,7 +12457,6 @@ "integrity": "sha512-68PealUpYoHOBh332JLLD9Sj7OQUDkFpmcfqt8R9sySfFSeuGJjMTJQvCRRB96zO3A/PELRLkPrzsHmzEFQQ5A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.5.0", "enhanced-resolve": "^5.17.1", @@ -12531,7 +12510,6 @@ "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "prettier-linter-helpers": "^1.0.0", "synckit": "^0.11.7" @@ -12563,7 +12541,6 @@ "integrity": "sha512-HIlIkGLkvf29YEiS/ImuDZQbP12gWyx5i3C6XrRxMvVdqMroCI9qoVYCoIl17ChN+U89pn9sVwLxhIWj5nEc7g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "@eslint-community/eslint-utils": "^4.9.0", @@ -13204,19 +13181,6 @@ "node": ">=0.8.0" } }, - "node_modules/file-entry-cache": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", - "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -13351,20 +13315,6 @@ "flat": "cli.js" } }, - "node_modules/flat-cache": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", - "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.3.1", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/flatted": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", @@ -13635,13 +13585,13 @@ } }, "node_modules/gensequence": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", - "integrity": "sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==", + "version": "8.0.8", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-8.0.8.tgz", + "integrity": "sha512-omMVniXEXpdx/vKxGnPRoO2394Otlze28TyxECbFVyoSpZ9H3EO7lemjcB12OpQJzRW4e5tt/dL1rOxry6aMHg==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/gensync": { @@ -13895,13 +13845,13 @@ } }, "node_modules/get-port": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", - "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-7.1.0.tgz", + "integrity": "sha512-QB9NKEeDg3xxVwCCwJQ9+xycaz6pBB6iQ76wiWMl1927n0Kir6alPiP+yuiICLLU4jpMe08dXfpebuQppFA2zw==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -14396,7 +14346,6 @@ "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -15555,13 +15504,16 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", + "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", "dev": true, "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.3.1" + }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -16283,7 +16235,6 @@ "integrity": "sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@jest/core": "30.2.0", "@jest/types": "30.2.0", @@ -17863,6 +17814,19 @@ "node": ">=8" } }, + "node_modules/lerna/node_modules/get-port": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", + "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lerna/node_modules/get-stream": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", @@ -18179,19 +18143,6 @@ "node": ">=10" } }, - "node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, "node_modules/lines-and-columns": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.3.tgz", @@ -18203,172 +18154,38 @@ } }, "node_modules/lint-staged": { - "version": "15.5.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.5.2.tgz", - "integrity": "sha512-YUSOLq9VeRNAo/CTaVmhGDKG+LBtA8KF1X4K5+ykMSwWST1vDxJRB2kv2COgLb1fvpCo+A/y9A0G0znNVmdx4w==", + "version": "16.2.7", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.2.7.tgz", + "integrity": "sha512-lDIj4RnYmK7/kXMya+qJsmkRFkGolciXjrsZ6PC25GdTfWOAWetR0ZbsNXRAj1EHHImRSalc+whZFg56F5DVow==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^5.4.1", - "commander": "^13.1.0", - "debug": "^4.4.0", - "execa": "^8.0.1", - "lilconfig": "^3.1.3", - "listr2": "^8.2.5", + "commander": "^14.0.2", + "listr2": "^9.0.5", "micromatch": "^4.0.8", + "nano-spawn": "^2.0.0", "pidtree": "^0.6.0", "string-argv": "^0.3.2", - "yaml": "^2.7.0" + "yaml": "^2.8.1" }, "bin": { "lint-staged": "bin/lint-staged.js" }, "engines": { - "node": ">=18.12.0" + "node": ">=20.17" }, "funding": { "url": "https://opencollective.com/lint-staged" } }, - "node_modules/lint-staged/node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/lint-staged/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/listr2": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.3.3.tgz", - "integrity": "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-9.0.5.tgz", + "integrity": "sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==", "dev": true, "license": "MIT", "dependencies": { - "cli-truncate": "^4.0.0", + "cli-truncate": "^5.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", "log-update": "^6.1.0", @@ -18376,7 +18193,7 @@ "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/listr2/node_modules/ansi-styles": { @@ -18684,39 +18501,6 @@ "dev": true, "license": "MIT" }, - "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", - "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", - "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, "node_modules/log-update/node_modules/string-width": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", @@ -20227,6 +20011,19 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/nano-spawn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nano-spawn/-/nano-spawn-2.0.0.tgz", + "integrity": "sha512-tacvGzUY5o2D8CBh2rrwxyNojUsZNU2zjNTzKQrkgGJQTbGAfArVWXSKMBokBeeg6C7OLRGUEyoFlYbfeWQIqw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/nano-spawn?sponsor=1" + } + }, "node_modules/nanoid": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", @@ -21013,7 +20810,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "@napi-rs/wasm-runtime": "0.2.4", "@yarnpkg/lockfile": "^1.1.0", @@ -22762,7 +22558,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -22885,7 +22680,6 @@ "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -24021,7 +23815,6 @@ "integrity": "sha512-uf6HoO8fy6ClsrShvMgaKUn14f2EHQLQRtpsZZLeU/Mv0Q1K5P0+x2uvH6Cub39TVVbWNSrraUhDAoFph6vh0A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -24525,17 +24318,17 @@ } }, "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", + "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" @@ -24565,6 +24358,19 @@ "npm": ">= 3.0.0" } }, + "node_modules/smol-toml": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.0.tgz", + "integrity": "sha512-4zemZi0HvTnYwLfrpk/CF9LOd9Lt87kAt50GnqhMpyF9U3poDAP2+iukq2bZsO/ufegbYehBkqINbsWxj4l4cw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/cyyynthia" + } + }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -26040,7 +25846,6 @@ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -26119,8 +25924,7 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "peer": true + "license": "0BSD" }, "node_modules/tuf-js": { "version": "4.0.0", @@ -26287,7 +26091,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -26302,7 +26105,6 @@ "integrity": "sha512-ytTHO+SoYSbhAH9CrYnMhiLx8To6PSSvqnvXyPUgPETCvB6eBKmTI9w6XMPS3HsBRGkwTVBX+urA8dYQx6bHfQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/eslint-plugin": "8.50.1", "@typescript-eslint/parser": "8.50.1", @@ -26779,7 +26581,6 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.104.1.tgz", "integrity": "sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==", "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -26829,7 +26630,6 @@ "integrity": "sha512-WAWwIoIUx4yC2AEBqXbDkcmh/LzAaenv0+nISBflP5l+XIXO9/x6poWarGA3RTrfavk9H3oWQ64Wm0z26/UGKA==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "0.5.7", "acorn": "^8.0.4", @@ -26927,7 +26727,6 @@ "integrity": "sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "@types/bonjour": "^3.5.13", "@types/connect-history-api-fallback": "^1.5.4", diff --git a/package.json b/package.json index edf9e5cf1eb..7716ade12ad 100644 --- a/package.json +++ b/package.json @@ -38,11 +38,10 @@ "fix": "npm run fix:code", "fix:code": "npm run lint:code -- --fix", "pretest": "npm run build && npm run lint", - "test": "jest --reporters=default", + "test": "npm run test:base", + "test:base": "node --experimental-vm-modules ./node_modules/.bin/jest", "test:smoketests": "nyc node smoketests", - "test:coverage": "nyc --no-clean jest", - "test:cli": "jest test --reporters=default", - "test:packages": "jest packages/ --reporters=default", + "test:coverage": "nyc --no-clean npm run test:base -- --coverage", "test:ci": "npm run test:cli && npm run test:packages", "publish:monorepo": "npm run build && lerna version && lerna publish from-git", "update:docs": "node ./scripts/update-docs", @@ -63,9 +62,9 @@ "coffeescript": "^2.7.0", "colorette": "^2.0.16", "concat-stream": "^2.0.0", - "cspell": "^8.3.2", + "cspell": "^9.4.0", "css-loader": "^7.1.2", - "del-cli": "^6.0.0", + "del-cli": "^7.0.0", "eslint": "^9.29.0", "eslint-config-webpack": "^4.5.0", "eslint-config-prettier": "^10.1.5", @@ -76,12 +75,12 @@ "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unicorn": "^62.0.0", "execa": "^5.0.0", - "get-port": "^5.1.1", + "get-port": "^7.1.0", "globals": "^16.2.0", "husky": "^9.1.4", "jest": "^30.2.0", "lerna": "^9.0.3", - "lint-staged": "^15.2.9", + "lint-staged": "^16.2.7", "mini-css-extract-plugin": "^2.6.1", "nyc": "^17.1.0", "prettier": "^3.6.0", diff --git a/test/serve/basic/multi-dev-server.config.js b/test/serve/basic/multi-dev-server.config.js index 5644e58f910..26405fe26a6 100644 --- a/test/serve/basic/multi-dev-server.config.js +++ b/test/serve/basic/multi-dev-server.config.js @@ -1,33 +1,38 @@ -const getPort = require("get-port"); - const WebpackCLITestPlugin = require("../../utils/webpack-cli-test-plugin"); const { devServerConfig } = require("./helper/base-dev-server.config"); -module.exports = async () => [ - { - name: "one", - mode: "development", - devtool: false, - output: { - filename: "first-output/[name].js", - }, - devServer: { - ...devServerConfig, - port: await getPort(), - }, - plugins: [new WebpackCLITestPlugin(["mode", "output"], false, "hooks.compilation.taps")], - }, - { - name: "two", - mode: "development", - devtool: false, - entry: "./src/other.js", - output: { - filename: "second-output/[name].js", +const getGetPort = () => import("get-port"); + +module.exports = async () => { + const port1 = await (await getGetPort()).default(); + const port2 = await (await getGetPort()).default(); + + return [ + { + name: "one", + mode: "development", + devtool: false, + output: { + filename: "first-output/[name].js", + }, + devServer: { + ...devServerConfig, + port: port1, + }, + plugins: [new WebpackCLITestPlugin(["mode", "output"], false, "hooks.compilation.taps")], }, - devServer: { - ...devServerConfig, - port: await getPort(), + { + name: "two", + mode: "development", + devtool: false, + entry: "./src/other.js", + output: { + filename: "second-output/[name].js", + }, + devServer: { + ...devServerConfig, + port: port2, + }, }, - }, -]; + ]; +}; diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index 6d49c20cae9..3a40429160a 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -1,9 +1,10 @@ "use strict"; const path = require("node:path"); -const getPort = require("get-port"); const { normalizeStderr, normalizeStdout, runWatch } = require("../../utils/test-utils"); +const getGetPort = () => import("get-port"); + const testPath = path.resolve(__dirname); const normalStdKillOptions = { @@ -15,7 +16,7 @@ describe("basic serve usage", () => { let port; beforeEach(async () => { - port = await getPort(); + port = await (await getGetPort()).default(); }); it("should work", async () => { diff --git a/test/serve/serve-variable/serve-variable.test.js b/test/serve/serve-variable/serve-variable.test.js index 4628807744b..2066defbaff 100644 --- a/test/serve/serve-variable/serve-variable.test.js +++ b/test/serve/serve-variable/serve-variable.test.js @@ -1,16 +1,17 @@ "use strict"; const path = require("node:path"); -const getPort = require("get-port"); const { normalizeStderr, runWatch } = require("../../utils/test-utils"); +const getGetPort = () => import("get-port"); + const testPath = path.resolve(__dirname); describe("serve variable", () => { let port; beforeEach(async () => { - port = await getPort(); + port = await (await getGetPort()).default(); }); it("compiles without flags and export variable", async () => { diff --git a/test/serve/with-custom-port/serve-custom-config.test.js b/test/serve/with-custom-port/serve-custom-config.test.js index e90c87a5ad4..d9f437b7924 100644 --- a/test/serve/with-custom-port/serve-custom-config.test.js +++ b/test/serve/with-custom-port/serve-custom-config.test.js @@ -1,16 +1,17 @@ "use strict"; const path = require("node:path"); -const getPort = require("get-port"); const { normalizeStderr, runWatch } = require("../../utils/test-utils"); +const getGetPort = () => import("get-port"); + const testPath = path.resolve(__dirname); describe("serve with devServer in config", () => { let port; beforeEach(async () => { - port = await getPort(); + port = await (await getGetPort()).default(); }); it("should pick up the host and port from config", async () => { From dbf45227d0535ad6072622933757d405faab5a3e Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 23 Dec 2025 16:29:56 +0300 Subject: [PATCH 02/13] chore: update execa --- package-lock.json | 273 ++++++++++++++++-- package.json | 2 +- .../disable-interpret.test.js | 6 +- test/build/env/array/array-env.test.js | 8 +- test/build/env/object/object-env.test.js | 6 +- test/create-webpack-app/test.utils.js | 27 +- test/utils/test-utils.js | 27 +- 7 files changed, 288 insertions(+), 61 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2346c08eb09..fbd955814b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "eslint-plugin-n": "^17.19.0", "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unicorn": "^62.0.0", - "execa": "^5.0.0", + "execa": "^9.6.1", "get-port": "^7.1.0", "globals": "^16.2.0", "husky": "^9.1.4", @@ -6258,6 +6258,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@sec-ant/readable-stream": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", + "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==", + "dev": true, + "license": "MIT" + }, "node_modules/@sigstore/bundle": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-4.0.0.tgz", @@ -12870,35 +12877,152 @@ } }, "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.1.tgz", + "integrity": "sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==", "dev": true, "license": "MIT", "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "@sindresorhus/merge-streams": "^4.0.0", + "cross-spawn": "^7.0.6", + "figures": "^6.1.0", + "get-stream": "^9.0.0", + "human-signals": "^8.0.1", + "is-plain-obj": "^4.1.0", + "is-stream": "^4.0.1", + "npm-run-path": "^6.0.0", + "pretty-ms": "^9.2.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^4.0.0", + "yoctocolors": "^2.1.1" }, "engines": { - "node": ">=10" + "node": "^18.19.0 || >=20.5.0" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/execa/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/execa/node_modules/@sindresorhus/merge-streams": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", + "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", "dev": true, - "license": "ISC" + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/figures": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz", + "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-unicode-supported": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/human-signals": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz", + "integrity": "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/execa/node_modules/is-stream": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/npm-run-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", + "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^4.0.0", + "unicorn-magic": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/strip-final-newline": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", + "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/exit-x": { "version": "0.2.2", @@ -13872,13 +13996,30 @@ } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", + "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", "dev": true, "license": "MIT", + "dependencies": { + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" + }, "engines": { - "node": ">=10" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream/node_modules/is-stream": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -16271,6 +16412,50 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/jest-changed-files/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/jest-changed-files/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, "node_modules/jest-circus": { "version": "30.2.0", "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.2.0.tgz", @@ -22269,6 +22454,19 @@ "dev": true, "license": "MIT" }, + "node_modules/parse-ms": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", + "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse-path": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.1.0.tgz", @@ -22718,6 +22916,22 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/pretty-ms": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz", + "integrity": "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-ms": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/proc-log": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz", @@ -27660,6 +27874,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/yoctocolors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz", + "integrity": "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yoctocolors-cjs": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", diff --git a/package.json b/package.json index 7716ade12ad..dffc8518544 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "eslint-plugin-n": "^17.19.0", "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unicorn": "^62.0.0", - "execa": "^5.0.0", + "execa": "^9.6.1", "get-port": "^7.1.0", "globals": "^16.2.0", "husky": "^9.1.4", diff --git a/test/build/config-format/disable-interpret/disable-interpret.test.js b/test/build/config-format/disable-interpret/disable-interpret.test.js index 0e5a00cd0ed..8e286c13dc0 100644 --- a/test/build/config-format/disable-interpret/disable-interpret.test.js +++ b/test/build/config-format/disable-interpret/disable-interpret.test.js @@ -1,16 +1,14 @@ const { existsSync, unlinkSync } = require("node:fs"); const { resolve } = require("node:path"); -const execa = require("execa"); const { run } = require("../../../utils/test-utils"); -const { sync: spawnSync } = execa; - describe("webpack cli", () => { it('should work with the "disable-interpret" option from flags', async () => { const configFileName = "webpack.config"; const configFilePath = resolve(__dirname, `${configFileName}.ts`); - const buildScripts = spawnSync("yarn", ["tsc", configFilePath]); + const { execa } = await import("execa"); + const buildScripts = execa("yarn", ["tsc", configFilePath]); expect(buildScripts.stdout).toBeTruthy(); const { exitCode, stderr, stdout } = await run(__dirname, ["--disable-interpret"]); diff --git a/test/build/env/array/array-env.test.js b/test/build/env/array/array-env.test.js index 64f26cd150e..0a9d7d586d4 100644 --- a/test/build/env/array/array-env.test.js +++ b/test/build/env/array/array-env.test.js @@ -1,9 +1,6 @@ "use strict"; const path = require("node:path"); -const execa = require("execa"); - -const { sync: spawnSync } = execa; const { run } = require("../../../utils/test-utils"); @@ -18,8 +15,9 @@ describe("env array", () => { expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); - const devScript = spawnSync("node", [devFile]); - const prodScript = spawnSync("node", [prodFile]); + const { execa } = await import("execa"); + const devScript = execa("node", [devFile]); + const prodScript = execa("node", [prodFile]); expect(devScript.stdout).toBe("environment is development"); expect(prodScript.stdout).toBe("environment is production"); diff --git a/test/build/env/object/object-env.test.js b/test/build/env/object/object-env.test.js index 385e6ac9f59..eecd717a02c 100644 --- a/test/build/env/object/object-env.test.js +++ b/test/build/env/object/object-env.test.js @@ -1,9 +1,6 @@ "use strict"; const path = require("node:path"); -const execa = require("execa"); - -const { sync: spawnSync } = execa; const { run } = require("../../../utils/test-utils"); @@ -15,8 +12,9 @@ describe("env object", () => { expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); + const { execa } = await import("execa"); const executable = path.join(__dirname, "./dist/main.js"); - const bundledScript = spawnSync("node", [executable]); + const bundledScript = await execa("node", [executable]); expect(bundledScript.stdout).toBe("environment is development"); }); diff --git a/test/create-webpack-app/test.utils.js b/test/create-webpack-app/test.utils.js index b654c549038..8f0eea45b39 100644 --- a/test/create-webpack-app/test.utils.js +++ b/test/create-webpack-app/test.utils.js @@ -3,11 +3,9 @@ const path = require("node:path"); const { stripVTControlCharacters } = require("node:util"); const concat = require("concat-stream"); -const execa = require("execa"); const { Writable } = require("readable-stream"); const testUtilsPkg = require("../utils/test-utils"); -const { node: execaNode } = execa; const { processKill } = testUtilsPkg; const ENABLE_LOG_COMPILATION = process.env.ENABLE_PIPE || false; @@ -28,16 +26,21 @@ function createPathDependentUtils(cli) { */ const createProcess = (cwd, args, options) => { const { nodeOptions = [] } = options; - const processExecutor = nodeOptions.length ? execaNode : execa; - - return processExecutor(CLI_PATH, args, { - cwd: path.resolve(cwd), - reject: false, - stdio: ENABLE_LOG_COMPILATION ? "inherit" : "pipe", - maxBuffer: Infinity, - env: { WEBPACK_CLI_HELP_WIDTH: 1024 }, - ...options, - }); + + return Promise.resolve() + .then(() => import("execa")) + .then((execa) => { + const processExecutor = nodeOptions.length ? execa.execaNode : execa.execa; + + return processExecutor(CLI_PATH, args, { + cwd: path.resolve(cwd), + reject: false, + stdio: ENABLE_LOG_COMPILATION ? "inherit" : "pipe", + maxBuffer: Infinity, + env: { WEBPACK_CLI_HELP_WIDTH: 1024 }, + ...options, + }); + }); }; /** diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 8aaaf84e639..e65ccfc26f8 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -6,11 +6,9 @@ const os = require("node:os"); const path = require("node:path"); const { stripVTControlCharacters } = require("node:util"); const concat = require("concat-stream"); -const execa = require("execa"); const { Writable } = require("readable-stream"); const { cli } = require("webpack"); -const { node: execaNode } = execa; const WEBPACK_PATH = path.resolve(__dirname, "../../packages/webpack-cli/bin/cli.js"); const ENABLE_LOG_COMPILATION = process.env.ENABLE_PIPE || false; const isWindows = process.platform === "win32"; @@ -43,16 +41,21 @@ const processKill = (process) => { */ const createProcess = (cwd, args, options) => { const { nodeOptions = [] } = options; - const processExecutor = nodeOptions.length ? execaNode : execa; - - return processExecutor(WEBPACK_PATH, args, { - cwd: path.resolve(cwd), - reject: false, - stdio: ENABLE_LOG_COMPILATION ? "inherit" : "pipe", - maxBuffer: Infinity, - env: { WEBPACK_CLI_HELP_WIDTH: 1024 }, - ...options, - }); + + return Promise.resolve() + .then(() => import("execa")) + .then((execa) => { + const processExecutor = nodeOptions.length ? execa.execaNode : execa.execa; + + return processExecutor(WEBPACK_PATH, args, { + cwd: path.resolve(cwd), + reject: false, + stdio: ENABLE_LOG_COMPILATION ? "inherit" : "pipe", + maxBuffer: Infinity, + env: { WEBPACK_CLI_HELP_WIDTH: 1024 }, + ...options, + }); + }); }; /** From c4b3f7571e499964801a1b9d71df2339366d7db5 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 23 Dec 2025 16:53:43 +0300 Subject: [PATCH 03/13] chore: update script --- scripts/update-docs.js | 20 ++- smoketests/helpers.js | 400 +++++++++++++++++++++-------------------- 2 files changed, 223 insertions(+), 197 deletions(-) diff --git a/scripts/update-docs.js b/scripts/update-docs.js index eb9b82a72a5..8132eaa4aab 100644 --- a/scripts/update-docs.js +++ b/scripts/update-docs.js @@ -1,12 +1,15 @@ const { writeFileSync } = require("node:fs"); const { resolve } = require("node:path"); -const { sync } = require("execa"); const { version } = require("webpack-dev-server/package.json"); const [majorDevServerVersion] = version.split("."); -try { - const { stdout: cliOptions } = sync( +/** + * @returns {Promise} + */ +async function updateDocs() { + const { execa } = await import("execa"); + const { stdout: cliOptions } = await execa( resolve(__dirname, "../packages/webpack-cli/bin/cli.js"), ["--help=verbose", "--no-color"], { @@ -16,13 +19,13 @@ try { ); // format output for markdown - const mdContent = ["```\n", cliOptions, "\n```"].join(""); + const mdContent = ["```\n", cliOptions, "\n```\n"].join(""); // create OPTIONS.md writeFileSync("OPTIONS.md", mdContent); // serve options - const { stdout: serveOptions } = sync( + const { stdout: serveOptions } = await execa( resolve(__dirname, "../packages/webpack-cli/bin/cli.js"), ["serve", "--help", "--no-color"], { @@ -32,12 +35,17 @@ try { ); // format output for markdown - const serveContent = ["```\n", serveOptions, "\n```"].join(""); + const serveContent = ["```\n", serveOptions, "\n```\n"].join(""); // create SERVE.md writeFileSync(`SERVE-OPTIONS-v${majorDevServerVersion}.md`, serveContent); console.log(`Successfully updated "OPTIONS.md" and "SERVE-OPTIONS-v${majorDevServerVersion}.md"`); +} + +try { + // eslint-disable-next-line unicorn/prefer-top-level-await + updateDocs(); } catch (err) { console.error(err); } diff --git a/smoketests/helpers.js b/smoketests/helpers.js index 65835c0dfd2..d5553a69e6b 100644 --- a/smoketests/helpers.js +++ b/smoketests/helpers.js @@ -1,7 +1,6 @@ const fs = require("node:fs"); const path = require("node:path"); const { stripVTControlCharacters } = require("node:util"); -const execa = require("execa"); const ROOT_PATH = process.env.GITHUB_WORKSPACE || path.resolve(__dirname, ".."); @@ -26,106 +25,115 @@ const runTest = (pkg, cliArgs = [], logMessage = undefined, isSubPackage = false // Simulate package missing swapPkgName(pkg, isSubPackage); - const proc = execa(CLI_ENTRY_PATH, cliArgs, { - cwd: __dirname, - }); - - proc.stdin.setDefaultEncoding("utf8"); - - proc.stdout.on("data", (chunk) => { - console.log(` stdout: ${chunk.toString()}`); - }); - - return new Promise((resolve) => { - const timeout = setTimeout(() => { - console.log(" timeout: killing process"); - proc.kill(); - }, 60000); - - const prompt = "Would you like to install"; - let hasLogMessage = false; - let hasPrompt = false; - let hasPassed = false; - - proc.stderr.on("data", (chunk) => { - const data = stripVTControlCharacters(chunk.toString()); - - console.log(` stderr: ${data}`); - - if (data.includes(logMessage)) { - hasLogMessage = true; - } - - if (data.includes(prompt)) { - hasPrompt = true; - } - - if (hasLogMessage && hasPrompt) { - hasPassed = true; - proc.kill(); - } - }); - - proc.on("exit", () => { - swapPkgName(`.${pkg}`, isSubPackage); - clearTimeout(timeout); - resolve(hasPassed); - }); - - proc.on("error", () => { - swapPkgName(`.${pkg}`, isSubPackage); - clearTimeout(timeout); - resolve(false); + return Promise.resolve() + .then(() => import("execa")) + .then(({ execa }) => + execa(CLI_ENTRY_PATH, cliArgs, { + cwd: __dirname, + }), + ) + .then((proc) => { + proc.stdin.setDefaultEncoding("utf8"); + + proc.stdout.on("data", (chunk) => { + console.log(` stdout: ${chunk.toString()}`); + }); + return new Promise((resolve) => { + const timeout = setTimeout(() => { + console.log(" timeout: killing process"); + proc.kill(); + }, 60000); + + const prompt = "Would you like to install"; + let hasLogMessage = false; + let hasPrompt = false; + let hasPassed = false; + + proc.stderr.on("data", (chunk) => { + const data = stripVTControlCharacters(chunk.toString()); + + console.log(` stderr: ${data}`); + + if (data.includes(logMessage)) { + hasLogMessage = true; + } + + if (data.includes(prompt)) { + hasPrompt = true; + } + + if (hasLogMessage && hasPrompt) { + hasPassed = true; + proc.kill(); + } + }); + + proc.on("exit", () => { + swapPkgName(`.${pkg}`, isSubPackage); + clearTimeout(timeout); + resolve(hasPassed); + }); + + proc.on("error", () => { + swapPkgName(`.${pkg}`, isSubPackage); + clearTimeout(timeout); + resolve(false); + }); + }); }); - }); }; const runTestStdout = ({ packageName, cliArgs, logMessage, isSubPackage } = {}) => { // Simulate package missing swapPkgName(packageName, isSubPackage); - const proc = execa(CLI_ENTRY_PATH, cliArgs, { - cwd: __dirname, - }); - - proc.stdin.setDefaultEncoding("utf8"); - - return new Promise((resolve) => { - const timeout = setTimeout(() => { - console.log(" timeout: killing process"); - proc.kill(); - }, 60000); - - let hasPassed = false; - - proc.stdout.on("data", (chunk) => { - const data = stripVTControlCharacters(chunk.toString()); - - console.log(` stdout: ${data}`); - - if (data.includes(logMessage)) { - hasPassed = true; - proc.kill(); - } + return Promise.resolve() + .then(() => import("execa")) + .then(({ execa }) => + execa(CLI_ENTRY_PATH, cliArgs, { + cwd: __dirname, + }), + ) + .then((proc) => { + proc.stdin.setDefaultEncoding("utf8"); + + return new Promise((resolve) => { + const timeout = setTimeout(() => { + console.log(" timeout: killing process"); + proc.kill(); + }, 60000); + + let hasPassed = false; + + proc.stdout.on("data", (chunk) => { + const data = stripVTControlCharacters(chunk.toString()); + + console.log(` stdout: ${data}`); + + if (data.includes(logMessage)) { + hasPassed = true; + proc.kill(); + } + }); + + proc.stderr.on("data", (chunk) => { + const data = stripVTControlCharacters(chunk.toString()); + console.log(` stderr: ${data}`); + }); + + proc.on("exit", () => { + swapPkgName(`.${packageName}`, isSubPackage); + clearTimeout(timeout); + resolve(hasPassed); + }); + + proc.on("error", () => { + swapPkgName(`.${packageName}`, isSubPackage); + clearTimeout(timeout); + resolve(false); + }); + }); }); - - proc.stderr.on("data", (chunk) => { - const data = stripVTControlCharacters(chunk.toString()); - console.log(` stderr: ${data}`); - }); - - proc.on("exit", () => { - swapPkgName(`.${packageName}`, isSubPackage); - clearTimeout(timeout); - resolve(hasPassed); - }); - - proc.on("error", () => { - swapPkgName(`.${packageName}`, isSubPackage); - clearTimeout(timeout); - resolve(false); - }); - }); }; const runTestStdoutWithInput = ({ @@ -138,112 +146,122 @@ const runTestStdoutWithInput = ({ // Simulate package missing swapPkgName(packageName, isSubPackage); - const proc = execa(CLI_ENTRY_PATH, cliArgs, { - cwd: __dirname, - }); - - proc.stdin.setDefaultEncoding("utf8"); - - return new Promise((resolve) => { - const timeout = setTimeout(() => { - console.log(" timeout: killing process"); - proc.kill(); - }, 300000); - - let hasPassed = false; - - proc.stdout.on("data", (chunk) => { - const data = stripVTControlCharacters(chunk.toString()); - console.log(` stdout: ${data}`); - - if (data.includes(logMessage)) { - hasPassed = true; - proc.kill(); - } - - for (const input of Object.keys(inputs)) { - if (data.includes(input)) { - proc.stdin.write(inputs[input]); - } - } - }); - - proc.stderr.on("data", (chunk) => { - const data = stripVTControlCharacters(chunk.toString()); - console.log(` stderr: ${data}`); + return Promise.resolve() + .then(() => import("execa")) + .then(({ execa }) => + execa(CLI_ENTRY_PATH, cliArgs, { + cwd: __dirname, + }), + ) + .then((proc) => { + proc.stdin.setDefaultEncoding("utf8"); + + return new Promise((resolve) => { + const timeout = setTimeout(() => { + console.log(" timeout: killing process"); + proc.kill(); + }, 300000); + + let hasPassed = false; + + proc.stdout.on("data", (chunk) => { + const data = stripVTControlCharacters(chunk.toString()); + console.log(` stdout: ${data}`); + + if (data.includes(logMessage)) { + hasPassed = true; + proc.kill(); + } + + for (const input of Object.keys(inputs)) { + if (data.includes(input)) { + proc.stdin.write(inputs[input]); + } + } + }); + + proc.stderr.on("data", (chunk) => { + const data = stripVTControlCharacters(chunk.toString()); + console.log(` stderr: ${data}`); + }); + + proc.on("exit", () => { + swapPkgName(`.${packageName}`, isSubPackage); + clearTimeout(timeout); + resolve(hasPassed); + }); + + proc.on("error", () => { + swapPkgName(`.${packageName}`, isSubPackage); + clearTimeout(timeout); + resolve(false); + }); + }); }); - - proc.on("exit", () => { - swapPkgName(`.${packageName}`, isSubPackage); - clearTimeout(timeout); - resolve(hasPassed); - }); - - proc.on("error", () => { - swapPkgName(`.${packageName}`, isSubPackage); - clearTimeout(timeout); - resolve(false); - }); - }); }; const runTestWithHelp = (pkg, cliArgs = [], logMessage = undefined, isSubPackage = false) => { // Simulate package missing swapPkgName(pkg, isSubPackage); - const proc = execa(CLI_ENTRY_PATH, cliArgs, { - cwd: __dirname, - }); - - proc.stdin.setDefaultEncoding("utf8"); - - proc.stdout.on("data", (chunk) => { - console.log(` stdout: ${chunk.toString()}`); - }); - - return new Promise((resolve) => { - const timeout = setTimeout(() => { - console.log(" timeout: killing process"); - proc.kill(); - }, 30000); - - const undefinedLogMessage = "Can't find and load command"; - - let hasLogMessage = false; - let hasUndefinedLogMessage = false; - let hasPassed = false; - - proc.stderr.on("data", (chunk) => { - const data = stripVTControlCharacters(chunk.toString()); - - console.log(` stderr: ${data}`); - - if (data.includes(logMessage)) { - hasLogMessage = true; - } - - if (data.includes(undefinedLogMessage)) { - hasUndefinedLogMessage = true; - } - - if (hasLogMessage || hasUndefinedLogMessage) { - hasPassed = true; - proc.kill(); - } - }); - - proc.on("exit", () => { - swapPkgName(`.${pkg}`, isSubPackage); - clearTimeout(timeout); - resolve(hasPassed); - }); - - proc.on("error", () => { - swapPkgName(`.${pkg}`, isSubPackage); - clearTimeout(timeout); - resolve(false); + return Promise.resolve() + .then(() => import("execa")) + .then(({ execa }) => + execa(CLI_ENTRY_PATH, cliArgs, { + cwd: __dirname, + }), + ) + .then((proc) => { + proc.stdin.setDefaultEncoding("utf8"); + + proc.stdout.on("data", (chunk) => { + console.log(` stdout: ${chunk.toString()}`); + }); + + return new Promise((resolve) => { + const timeout = setTimeout(() => { + console.log(" timeout: killing process"); + proc.kill(); + }, 30000); + + const undefinedLogMessage = "Can't find and load command"; + + let hasLogMessage = false; + let hasUndefinedLogMessage = false; + let hasPassed = false; + + proc.stderr.on("data", (chunk) => { + const data = stripVTControlCharacters(chunk.toString()); + + console.log(` stderr: ${data}`); + + if (data.includes(logMessage)) { + hasLogMessage = true; + } + + if (data.includes(undefinedLogMessage)) { + hasUndefinedLogMessage = true; + } + + if (hasLogMessage || hasUndefinedLogMessage) { + hasPassed = true; + proc.kill(); + } + }); + + proc.on("exit", () => { + swapPkgName(`.${pkg}`, isSubPackage); + clearTimeout(timeout); + resolve(hasPassed); + }); + + proc.on("error", () => { + swapPkgName(`.${pkg}`, isSubPackage); + clearTimeout(timeout); + resolve(false); + }); + }); }); - }); }; module.exports = { From 372f2b7fcc09e10c63db344d2a3bbd279bfae341 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 23 Dec 2025 16:58:15 +0300 Subject: [PATCH 04/13] chore: revert del-cli --- package-lock.json | 21 ++++++++++----------- package.json | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index fbd955814b6..f14c093c402 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "concat-stream": "^2.0.0", "cspell": "^9.4.0", "css-loader": "^7.1.2", - "del-cli": "^7.0.0", + "del-cli": "^6.0.0", "eslint": "^9.29.0", "eslint-config-prettier": "^10.1.5", "eslint-config-webpack": "^4.5.0", @@ -11490,15 +11490,14 @@ } }, "node_modules/del-cli": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/del-cli/-/del-cli-7.0.0.tgz", - "integrity": "sha512-fRl4pWJYu9WFQH8jXdQUYvcD0IMtij9WEc7qmB7xOyJEweNJNuE7iKmqNeoOT1DbBUjtRjxlw8Y63qKBI/NQ1g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/del-cli/-/del-cli-6.0.0.tgz", + "integrity": "sha512-9nitGV2W6KLFyya4qYt4+9AKQFL+c0Ehj5K7V7IwlxTc6RMCfQUGY9E9pLG6e8TQjtwXpuiWIGGZb3mfVxyZkw==", "dev": true, "license": "MIT", "dependencies": { - "del": "^8.0.1", - "meow": "^14.0.0", - "presentable-error": "^0.0.1" + "del": "^8.0.0", + "meow": "^13.2.0" }, "bin": { "del": "cli.js", @@ -11512,13 +11511,13 @@ } }, "node_modules/del-cli/node_modules/meow": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-14.0.0.tgz", - "integrity": "sha512-JhC3R1f6dbspVtmF3vKjAWz1EVIvwFrGGPLSdU6rK79xBwHWTuHoLnRX/t1/zHS1Ch1Y2UtIrih7DAHuH9JFJA==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", "dev": true, "license": "MIT", "engines": { - "node": ">=20" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" diff --git a/package.json b/package.json index dffc8518544..3275d973533 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "concat-stream": "^2.0.0", "cspell": "^9.4.0", "css-loader": "^7.1.2", - "del-cli": "^7.0.0", + "del-cli": "^6.0.0", "eslint": "^9.29.0", "eslint-config-webpack": "^4.5.0", "eslint-config-prettier": "^10.1.5", From 50c0f5245733f6fd7c5f3e54155c3f900de25f62 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 23 Dec 2025 17:03:34 +0300 Subject: [PATCH 05/13] chore: fix path to jest --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3275d973533..f4d4fad9e20 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "fix:code": "npm run lint:code -- --fix", "pretest": "npm run build && npm run lint", "test": "npm run test:base", - "test:base": "node --experimental-vm-modules ./node_modules/.bin/jest", + "test:base": "node --experimental-vm-modules ./node_modules/jest-cli/bin/jest", "test:smoketests": "nyc node smoketests", "test:coverage": "nyc --no-clean npm run test:base -- --coverage", "test:ci": "npm run test:cli && npm run test:packages", From e5312c22211b6d63e21697a13955f7c4d8b37255 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 25 Dec 2025 19:40:27 +0300 Subject: [PATCH 06/13] test: fix --- package.json | 1 - test/build/env/array/array-env.test.js | 4 +- test/create-webpack-app/test.utils.js | 203 +------- test/utils/test-utils.js | 136 +++-- test/watch/basic/basic.test.js | 493 +++++++++--------- test/watch/stdin/stdin.test.js | 178 ++++--- .../watch-variable/watch-variable.test.js | 112 ++-- 7 files changed, 490 insertions(+), 637 deletions(-) diff --git a/package.json b/package.json index f4d4fad9e20..edf6c78156f 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "test:base": "node --experimental-vm-modules ./node_modules/jest-cli/bin/jest", "test:smoketests": "nyc node smoketests", "test:coverage": "nyc --no-clean npm run test:base -- --coverage", - "test:ci": "npm run test:cli && npm run test:packages", "publish:monorepo": "npm run build && lerna version && lerna publish from-git", "update:docs": "node ./scripts/update-docs", "prepare": "husky" diff --git a/test/build/env/array/array-env.test.js b/test/build/env/array/array-env.test.js index 0a9d7d586d4..2ab7428c91f 100644 --- a/test/build/env/array/array-env.test.js +++ b/test/build/env/array/array-env.test.js @@ -16,8 +16,8 @@ describe("env array", () => { expect(stdout).toBeTruthy(); const { execa } = await import("execa"); - const devScript = execa("node", [devFile]); - const prodScript = execa("node", [prodFile]); + const devScript = await execa("node", [devFile]); + const prodScript = await execa("node", [prodFile]); expect(devScript.stdout).toBe("environment is development"); expect(prodScript.stdout).toBe("environment is production"); diff --git a/test/create-webpack-app/test.utils.js b/test/create-webpack-app/test.utils.js index 8f0eea45b39..eb72c1c4a13 100644 --- a/test/create-webpack-app/test.utils.js +++ b/test/create-webpack-app/test.utils.js @@ -1,14 +1,8 @@ "use strict"; const path = require("node:path"); -const { stripVTControlCharacters } = require("node:util"); -const concat = require("concat-stream"); -const { Writable } = require("readable-stream"); const testUtilsPkg = require("../utils/test-utils"); -const { processKill } = testUtilsPkg; - -const ENABLE_LOG_COMPILATION = process.env.ENABLE_PIPE || false; const nodeVersion = Number.parseInt(process.versions.node.split(".")[0], 10); // eslint-disable-next-line jsdoc/reject-any-type @@ -17,206 +11,47 @@ const nodeVersion = Number.parseInt(process.versions.node.split(".")[0], 10); function createPathDependentUtils(cli) { const CLI_PATH = path.resolve(__dirname, `../../packages/${cli}/bin/cli.js`); - /** - * Webpack CLI test runner. - * @param {string} cwd The path to folder that contains test - * @param {Array} args Array of arguments - * @param {TestOptions} options Options for tests - * @returns {Promise} child process - */ - const createProcess = (cwd, args, options) => { - const { nodeOptions = [] } = options; - - return Promise.resolve() - .then(() => import("execa")) - .then((execa) => { - const processExecutor = nodeOptions.length ? execa.execaNode : execa.execa; - - return processExecutor(CLI_PATH, args, { - cwd: path.resolve(cwd), - reject: false, - stdio: ENABLE_LOG_COMPILATION ? "inherit" : "pipe", - maxBuffer: Infinity, - env: { WEBPACK_CLI_HELP_WIDTH: 1024 }, - ...options, - }); - }); - }; - /** * Run the webpack CLI for a test case. * @param {string} cwd The path to folder that contains test * @param {Array} args Array of arguments * @param {TestOptions} options Options for tests - * @returns {Promise} child process + * @returns {Promise} child process */ - const run = async (cwd, args = [], options = {}) => createProcess(cwd, args, options); - - /** - * Run the webpack CLI for a test case and get process. - * @param {string} cwd The path to folder that contains test - * @param {Array} args Array of arguments - * @param {TestOptions} options Options for tests - * @returns {Promise} child process - */ - const runAndGetProcess = (cwd, args = [], options = {}) => createProcess(cwd, args, options); + const run = async (cwd, args = [], options = {}) => + testUtilsPkg.run(cwd, args, { + ...options, + executorPath: CLI_PATH, + }); /** * Run the webpack CLI in watch mode for a test case. * @param {string} cwd The path to folder that contains test * @param {Array} args Array of arguments * @param {TestOptions} options Options for tests - * @returns {Promise} The webpack output or Promise when nodeOptions are present + * @returns {Promise} The webpack output or Promise when nodeOptions are present */ - const runWatch = (cwd, args = [], options = {}) => - new Promise((resolve, reject) => { - const process = createProcess(cwd, args, options); - const outputKillStr = options.killString || /webpack \d+\.\d+\.\d/; - const { stdoutKillStr } = options; - const { stderrKillStr } = options; - - let isStdoutDone = false; - let isStderrDone = false; - - process.stdout.pipe( - new Writable({ - write(chunk, encoding, callback) { - const output = stripVTControlCharacters(chunk.toString("utf8")); - - if (stdoutKillStr && stdoutKillStr.test(output)) { - isStdoutDone = true; - } else if (!stdoutKillStr && outputKillStr.test(output)) { - processKill(process); - } - - if (isStdoutDone && isStderrDone) { - processKill(process); - } - - callback(); - }, - }), - ); - - process.stderr.pipe( - new Writable({ - write(chunk, encoding, callback) { - const output = stripVTControlCharacters(chunk.toString("utf8")); - - if (stderrKillStr && stderrKillStr.test(output)) { - isStderrDone = true; - } else if (!stderrKillStr && outputKillStr.test(output)) { - processKill(process); - } - - if (isStdoutDone && isStderrDone) { - processKill(process); - } - - callback(); - }, - }), - ); - - process - .then((result) => { - resolve(result); - }) - .catch((error) => { - reject(error); - }); + const runWatch = async (cwd, args = [], options = {}) => + testUtilsPkg.runWatch(cwd, args, { + ...options, + executorPath: CLI_PATH, }); /** * runPromptWithAnswers - * @param {string} location of current working directory + * @param {string} cwd The path to folder that contains test * @param {string[]} args CLI args to pass in - * @param {string[]} answers to be passed to stdout for inquirer question + * @param {string[]} answers answers to be passed to stdout for inquirer question + * @param {TestOptions} options Options for tests * @returns {Promise<{ stdout: string, stderr: string }>} result */ - const runPromptWithAnswers = (location, args, answers) => { - const process = runAndGetProcess(location, args); - - process.stdin.setDefaultEncoding("utf8"); - - const delay = 1000; - let outputTimeout; - let currentAnswer = 0; - - const writeAnswer = (output) => { - if (!answers) { - process.stdin.write(output); - processKill(process); - - return; - } - - if (currentAnswer < answers.length) { - process.stdin.write(answers[currentAnswer]); - currentAnswer++; - } - }; - - process.stdout.pipe( - new Writable({ - write(chunk, encoding, callback) { - const output = chunk.toString("utf8"); - - if (output.length > 0) { - if (outputTimeout) { - clearTimeout(outputTimeout); - } - - // we must receive new stdout, then have 1 second - // without any stdout before writing the next answer - outputTimeout = setTimeout(() => { - writeAnswer(output); - }, delay); - } - - callback(); - }, - }), - ); - - return new Promise((resolve) => { - const obj = {}; - - let stdoutDone = false; - let stderrDone = false; - - const complete = () => { - if (outputTimeout) { - clearTimeout(outputTimeout); - } - - if (stdoutDone && stderrDone) { - processKill(process); - resolve(obj); - } - }; - - process.stdout.pipe( - concat((result) => { - stdoutDone = true; - obj.stdout = result.toString(); - - complete(); - }), - ); - - process.stderr.pipe( - concat((result) => { - stderrDone = true; - obj.stderr = result.toString(); - - complete(); - }), - ); + const runPromptWithAnswers = async (cwd, args, answers = [], options = {}) => + testUtilsPkg.runPromptWithAnswers(cwd, args, answers, { + ...options, + executorPath: CLI_PATH, }); - }; - return { runAndGetProcess, run, runWatch, runPromptWithAnswers }; + return { run, runWatch, runPromptWithAnswers }; } module.exports = { diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index e65ccfc26f8..4f1a32ee732 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -34,65 +34,62 @@ const processKill = (process) => { /** * Webpack CLI test runner. + * @param {import("execa")} execa execa API * @param {string} cwd The path to folder that contains test - * @param {Array} args Array of arguments - * @param {TestOptions} options Options for tests - * @returns {Promise} child process + * @param {Array=} args Array of arguments + * @param {TestOptions=} options Options for tests + * @returns {import("execa").Result} child process */ -const createProcess = (cwd, args, options) => { +const createProcess = ({ execaNode, execa }, cwd, args, options) => { const { nodeOptions = [] } = options; - - return Promise.resolve() - .then(() => import("execa")) - .then((execa) => { - const processExecutor = nodeOptions.length ? execa.execaNode : execa.execa; - - return processExecutor(WEBPACK_PATH, args, { - cwd: path.resolve(cwd), - reject: false, - stdio: ENABLE_LOG_COMPILATION ? "inherit" : "pipe", - maxBuffer: Infinity, - env: { WEBPACK_CLI_HELP_WIDTH: 1024 }, - ...options, - }); - }); + const processExecutor = nodeOptions.length ? execaNode : execa; + + return processExecutor( + typeof options.executorPath !== "undefined" ? options.executorPath : WEBPACK_PATH, + args || [], + { + cwd: path.resolve(cwd), + reject: false, + stdio: ENABLE_LOG_COMPILATION ? "inherit" : "pipe", + maxBuffer: Infinity, + env: { WEBPACK_CLI_HELP_WIDTH: 1024 }, + ...options, + }, + ); }; /** * Run the webpack CLI for a test case. * @param {string} cwd The path to folder that contains test - * @param {Array} args Array of arguments - * @param {TestOptions} options Options for tests - * @returns {Promise} child process - */ -const run = async (cwd, args = [], options = {}) => createProcess(cwd, args, options); - -/** - * Run the webpack CLI for a test case and get process. - * @param {string} cwd The path to folder that contains test - * @param {Array} args Array of arguments - * @param {TestOptions} options Options for tests - * @returns {Promise} child process + * @param {Array=} args Array of arguments + * @param {TestOptions=} options Options for tests + * @returns {Promise} child process */ -const runAndGetProcess = (cwd, args = [], options = {}) => createProcess(cwd, args, options); +const run = async (cwd, args = [], options = {}) => { + const execa = await import("execa"); + return createProcess(execa, cwd, args, options); +}; /** * Run the webpack CLI in watch mode for a test case. * @param {string} cwd The path to folder that contains test - * @param {Array} args Array of arguments - * @param {TestOptions} options Options for tests - * @returns {Promise} The webpack output or Promise when nodeOptions are present + * @param {Array=} args Array of arguments + * @param {TestOptions=} options Options for tests + * @returns {Promise} The webpack output or Promise when nodeOptions are present */ -const runWatch = (cwd, args = [], options = {}) => - new Promise((resolve, reject) => { - const process = createProcess(cwd, args, options); - const outputKillStr = options.killString || /webpack \d+\.\d+\.\d/; - const { stdoutKillStr } = options; - const { stderrKillStr } = options; - - let isStdoutDone = false; - let isStderrDone = false; - +const runWatch = async (cwd, args = [], options = {}) => { + const execa = await import("execa"); + const process = createProcess(execa, cwd, args, options); + const outputKillStr = options.killString || /webpack \d+\.\d+\.\d/; + const { stdoutKillStr } = options; + const { stderrKillStr } = options; + + let isStdoutDone = false; + let isStderrDone = false; + + if (options.handler) { + options.handler(process); + } else { process.stdout.pipe( new Writable({ write(chunk, encoding, callback) { @@ -132,34 +129,30 @@ const runWatch = (cwd, args = [], options = {}) => }, }), ); + } - process - .then((result) => { - resolve(result); - }) - .catch((error) => { - reject(error); - }); - }); + return process; +}; /** * runPromptWithAnswers - * @param {string} location location of current working directory - * @param {string[]} args CLI args to pass in - * @param {string[]} answers answers to be passed to stdout for inquirer question - * @returns {{ stdout: string, stderr: string }} result + * @param {string} cwd The path to folder that contains test + * @param {string[]=} args CLI args to pass in + * @param {string[]=} answers answers to be passed to stdout for inquirer question + * @param {TestOptions=} options Options for tests + * @returns {Promise<{ stdout: string, stderr: string }>} result */ -const runPromptWithAnswers = (location, args, answers) => { - const process = runAndGetProcess(location, args); +const runPromptWithAnswers = async (cwd, args, answers = [], options = {}) => { + const execa = await import("execa"); + const process = createProcess(execa, cwd, args, options); process.stdin.setDefaultEncoding("utf8"); - const delay = 2000; - let outputTimeout; let currentAnswer = 0; + let waitAnswer = true; const writeAnswer = (output) => { - if (!answers) { + if (answers.length === 0) { process.stdin.write(output); processKill(process); @@ -169,6 +162,7 @@ const runPromptWithAnswers = (location, args, answers) => { if (currentAnswer < answers.length) { process.stdin.write(answers[currentAnswer]); currentAnswer++; + waitAnswer = true; } }; @@ -177,16 +171,9 @@ const runPromptWithAnswers = (location, args, answers) => { write(chunk, encoding, callback) { const output = chunk.toString("utf8"); - if (output) { - if (outputTimeout) { - clearTimeout(outputTimeout); - } - - // we must receive new stdout, then have 2 seconds - // without any stdout before writing the next answer - outputTimeout = setTimeout(() => { - writeAnswer(output); - }, delay); + if (output && stripVTControlCharacters(output).trim().length > 0 && waitAnswer) { + waitAnswer = false; + writeAnswer(output); } callback(); @@ -201,10 +188,6 @@ const runPromptWithAnswers = (location, args, answers) => { let stderrDone = false; const complete = () => { - if (outputTimeout) { - clearTimeout(outputTimeout); - } - if (stdoutDone && stderrDone) { processKill(process); resolve(obj); @@ -387,7 +370,6 @@ module.exports = { readFile, readdir, run, - runAndGetProcess, runPromptWithAnswers, runWatch, uniqueDirectoryForTest, diff --git a/test/watch/basic/basic.test.js b/test/watch/basic/basic.test.js index 3b8b77becff..72e74b30751 100644 --- a/test/watch/basic/basic.test.js +++ b/test/watch/basic/basic.test.js @@ -2,7 +2,7 @@ const { writeFileSync } = require("node:fs"); const { resolve } = require("node:path"); -const { processKill, run, runAndGetProcess } = require("../../utils/test-utils"); +const { processKill, run, runWatch } = require("../../utils/test-utils"); const wordsInStatsv5 = ["asset", "index.js", "compiled successfully"]; @@ -19,297 +19,316 @@ describe("basic", () => { expect(stdout).toBeTruthy(); }); - it("should recompile upon file change using the `--watch` option", (done) => { - const proc = runAndGetProcess(__dirname, ["--watch", "--mode", "development"]); - + it("should recompile upon file change using the `--watch` option", async () => { let modified = false; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); - - if (data.includes("index.js")) { - for (const word of wordsInStatsv5) { - expect(data).toContain(word); - } - - if (!modified) { - process.nextTick(() => { - writeFileSync( - resolve(__dirname, "./src/index.js"), - "console.log('watch flag test');\n", - ); - }); - - modified = true; - } else { - processKill(proc); - done(); - } - } + await runWatch(__dirname, ["--watch", "--mode", "development"], { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + if (data.includes("index.js")) { + for (const word of wordsInStatsv5) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + resolve(__dirname, "./src/index.js"), + "console.log('watch flag test');\n", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); + + proc.stderr.on("data", (chunk) => { + const data = chunk.toString(); + + expect(data).not.toContain( + " No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", + ); + }); + }, }); - proc.stderr.on("data", (chunk) => { - const data = chunk.toString(); - - expect(data).not.toContain( - " No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", - ); - }); + expect(modified).toBe(true); }); - it("should recompile upon file change using the `watch` command", (done) => { - const proc = runAndGetProcess(__dirname, ["watch", "--mode", "development"]); - + it("should recompile upon file change using the `watch` command", async () => { let modified = false; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); - - if (data.includes("index.js")) { - for (const word of wordsInStatsv5) { - expect(data).toContain(word); - } - - if (!modified) { - process.nextTick(() => { - writeFileSync( - resolve(__dirname, "./src/index.js"), - "console.log('watch flag test');\n", - ); - }); - - modified = true; - } else { - processKill(proc); - done(); - } - } + await runWatch(__dirname, ["watch", "--mode", "development"], { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + if (data.includes("index.js")) { + for (const word of wordsInStatsv5) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + resolve(__dirname, "./src/index.js"), + "console.log('watch flag test');\n", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); + + proc.stderr.on("data", (chunk) => { + const data = chunk.toString(); + + expect(data).not.toContain( + " No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", + ); + }); + }, }); - proc.stderr.on("data", (chunk) => { - const data = chunk.toString(); - - expect(data).not.toContain( - " No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", - ); - }); + expect(modified).toBe(true); }); - it("should recompile upon file change using the `watch` command and entries syntax", (done) => { - const proc = runAndGetProcess(__dirname, ["watch", "./src/entry.js", "--mode", "development"]); - - let modified = false; - + it("should recompile upon file change using the `watch` command and entries syntax", async () => { const wordsInStatsv5Entries = ["asset", "entry.js", "compiled successfully"]; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); - - if (data.includes("entry.js")) { - for (const word of wordsInStatsv5Entries) { - expect(data).toContain(word); - } - - if (!modified) { - process.nextTick(() => { - writeFileSync( - resolve(__dirname, "./src/entry.js"), - "console.log('watch flag test');\n", - ); - }); + let modified = false; - modified = true; - } else { - processKill(proc); - done(); - } - } + await runWatch(__dirname, ["watch", "./src/entry.js", "--mode", "development"], { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + if (data.includes("entry.js")) { + for (const word of wordsInStatsv5Entries) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + resolve(__dirname, "./src/entry.js"), + "console.log('watch flag test');\n", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); + }, }); - }); - it("should log warning about the `watch` option in the configuration and recompile upon file change using the `watch` command", (done) => { - const proc = runAndGetProcess(__dirname, [ - "--watch", - "--mode", - "development", - "--config", - "./watch.config.js", - ]); + expect(modified).toBe(true); + }); + it("should log warning about the `watch` option in the configuration and recompile upon file change using the `watch` command", async () => { let modified = false; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); + await runWatch( + __dirname, + ["--watch", "--mode", "development", "--config", "./watch.config.js"], + { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + if (data.includes("index.js")) { + for (const word of wordsInStatsv5) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + resolve(__dirname, "./src/index.js"), + "console.log('watch flag test');\n", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); - if (data.includes("index.js")) { - for (const word of wordsInStatsv5) { - expect(data).toContain(word); - } + proc.stderr.on("data", (chunk) => { + const data = chunk.toString(); - if (!modified) { - process.nextTick(() => { - writeFileSync( - resolve(__dirname, "./src/index.js"), - "console.log('watch flag test');\n", + expect(data).toContain( + " No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", ); }); + }, + }, + ); - modified = true; - } else { - processKill(proc); - done(); - } - } - }); - - proc.stderr.on("data", (chunk) => { - const data = chunk.toString(); - - expect(data).toContain( - " No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", - ); - }); + expect(modified).toBe(true); }); - it("should log warning about the `watch` option in the configuration and recompile upon file change using the `watch` command #2", (done) => { - const proc = runAndGetProcess(__dirname, [ - "--watch", - "--mode", - "development", - "--config", - "./no-watch.config.js", - ]); - + it("should log warning about the `watch` option in the configuration and recompile upon file change using the `watch` command #2", async () => { let modified = false; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); + await runWatch( + __dirname, + ["--watch", "--mode", "development", "--config", "./no-watch.config.js"], + { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + if (data.includes("index.js")) { + for (const word of wordsInStatsv5) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + resolve(__dirname, "./src/index.js"), + "console.log('watch flag test');\n", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); - if (data.includes("index.js")) { - for (const word of wordsInStatsv5) { - expect(data).toContain(word); - } + proc.stderr.on("data", (chunk) => { + const data = chunk.toString(); - if (!modified) { - process.nextTick(() => { - writeFileSync( - resolve(__dirname, "./src/index.js"), - "console.log('watch flag test');\n", + expect(data).toContain( + "No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", ); }); + }, + }, + ); - modified = true; - } else { - processKill(proc); - done(); - } - } - }); - - proc.stderr.on("data", (chunk) => { - const data = chunk.toString(); - - expect(data).toContain( - "No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", - ); - }); + expect(modified).toBe(true); }); - it("should log supplied config with watch", (done) => { - const proc = runAndGetProcess(__dirname, ["watch", "--config", "log.config.js"]); + it("should log supplied config with watch", async () => { const configPath = resolve(__dirname, "./log.config.js"); let stderr = ""; - proc.stderr.on("data", (chunk) => { - const data = chunk.toString(); + await runWatch(__dirname, ["watch", "--config", "log.config.js"], { + handler: (proc) => { + proc.stderr.on("data", (chunk) => { + const data = chunk.toString(); - stderr += data; + stderr += data; - if (/Compiler finished/.test(data)) { - expect(stderr).toContain("Compiler starting..."); - expect(stderr).toContain(`Compiler is using config: '${configPath}'`); - expect(stderr).toContain("Compiler finished"); + if (/Compiler finished/.test(data)) { + expect(stderr).toContain("Compiler starting..."); + expect(stderr).toContain(`Compiler is using config: '${configPath}'`); + expect(stderr).toContain("Compiler finished"); - processKill(proc); - done(); - } + processKill(proc); + } + }); + }, }); }); - it("should recompile upon file change using the `command` option and the `--watch` option and log warning", (done) => { - const proc = runAndGetProcess(__dirname, ["watch", "--watch", "--mode", "development"]); - + it("should recompile upon file change using the `command` option and the `--watch` option and log warning", async () => { let modified = false; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); - - if (data.includes("index.js")) { - for (const word of wordsInStatsv5) { - expect(data).toContain(word); - } - - if (!modified) { - process.nextTick(() => { - writeFileSync( - resolve(__dirname, "./src/index.js"), - "console.log('watch flag test');\n", - ); - }); - - modified = true; - } else { - processKill(proc); - done(); - } - } + await runWatch(__dirname, ["watch", "--watch", "--mode", "development"], { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + if (data.includes("index.js")) { + for (const word of wordsInStatsv5) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + resolve(__dirname, "./src/index.js"), + "console.log('watch flag test');\n", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); + + proc.stderr.on("data", (chunk) => { + const data = chunk.toString(); + + expect(data).toContain( + "No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", + ); + }); + }, }); - proc.stderr.on("data", (chunk) => { - const data = chunk.toString(); - - expect(data).toContain( - "No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", - ); - }); + expect(modified).toBe(true); }); - it("should recompile upon file change using the `command` option and the `--watch` option and log warning #2", (done) => { - const proc = runAndGetProcess(__dirname, ["watch", "--no-watch", "--mode", "development"]); - + it("should recompile upon file change using the `command` option and the `--watch` option and log warning #2", async () => { let modified = false; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); - - if (data.includes("index.js")) { - for (const word of wordsInStatsv5) { - expect(data).toContain(word); - } - - if (!modified) { - process.nextTick(() => { - writeFileSync( - resolve(__dirname, "./src/index.js"), - "console.log('watch flag test');\n", - ); - }); - - modified = true; - } else { - processKill(proc); - done(); - } - } + await runWatch(__dirname, ["watch", "--no-watch", "--mode", "development"], { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + if (data.includes("index.js")) { + for (const word of wordsInStatsv5) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + resolve(__dirname, "./src/index.js"), + "console.log('watch flag test');\n", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); + + proc.stderr.on("data", (chunk) => { + const data = chunk.toString(); + + expect(data).toContain( + "No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", + ); + }); + }, }); - proc.stderr.on("data", (chunk) => { - const data = chunk.toString(); - - expect(data).toContain( - "No need to use the 'watch' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.", - ); - }); + expect(modified).toBe(true); }); }); diff --git a/test/watch/stdin/stdin.test.js b/test/watch/stdin/stdin.test.js index 25f6de9a790..ac2d7433930 100644 --- a/test/watch/stdin/stdin.test.js +++ b/test/watch/stdin/stdin.test.js @@ -1,141 +1,147 @@ -const { processKill, runAndGetProcess } = require("../../utils/test-utils"); +const { processKill, runWatch } = require("../../utils/test-utils"); describe("--watch-options-stdin", () => { - it('should stop the process when stdin ends using "--watch" and "--watch-options-stdin" options', (done) => { - const proc = runAndGetProcess(__dirname, ["--watch", "--watch-options-stdin"]); - + it('should stop the process when stdin ends using "--watch" and "--watch-options-stdin" options', async () => { let semaphore = false; - proc.on("exit", () => { - expect(semaphore).toBe(true); - - processKill(proc); + await runWatch(__dirname, ["--watch", "--watch-options-stdin"], { + handler: (proc) => { + proc.on("exit", () => { + expect(semaphore).toBe(true); - done(); - }); + processKill(proc); + }); - proc.stdin.end(() => { - semaphore = true; + proc.stdin.end(() => { + semaphore = true; + }); + }, }); }); - it('should stop the process when stdin ends using the "watch" command and the "--watch-options-stdin" option', (done) => { - const proc = runAndGetProcess(__dirname, ["watch", "--watch-options-stdin"]); - + it('should stop the process when stdin ends using the "watch" command and the "--watch-options-stdin" option', async () => { let semaphore = false; - proc.on("exit", () => { - expect(semaphore).toBe(true); - - processKill(proc); + await runWatch(__dirname, ["watch", "--watch-options-stdin"], { + handler: (proc) => { + proc.on("exit", () => { + expect(semaphore).toBe(true); - done(); - }); + processKill(proc); + }); - proc.stdin.end(() => { - semaphore = true; + proc.stdin.end(() => { + semaphore = true; + }); + }, }); }); - it("should stop the process when stdin ends using the config file", (done) => { - const proc = runAndGetProcess(__dirname, ["--config", "./watch.config.js"]); - + it("should stop the process when stdin ends using the config file", async () => { let semaphore = false; - proc.on("exit", () => { - expect(semaphore).toBe(true); - - processKill(proc); + await runWatch(__dirname, ["--config", "./watch.config.js"], { + handler: (proc) => { + proc.on("exit", () => { + expect(semaphore).toBe(true); - done(); - }); + processKill(proc); + }); - proc.stdin.end(() => { - semaphore = true; + proc.stdin.end(() => { + semaphore = true; + }); + }, }); }); - it("should stop the process when stdin ends using the config file in multi compiler mode", (done) => { - const proc = runAndGetProcess(__dirname, ["--config", "./multi-watch.config.js"]); - + it("should stop the process when stdin ends using the config file in multi compiler mode", async () => { let semaphore = false; - proc.on("exit", () => { - expect(semaphore).toBe(true); - - processKill(proc); + await runWatch(__dirname, ["--config", "./multi-watch.config.js"], { + handler: (proc) => { + proc.on("exit", () => { + expect(semaphore).toBe(true); - done(); - }); + processKill(proc); + }); - proc.stdin.end(() => { - semaphore = true; + proc.stdin.end(() => { + semaphore = true; + }); + }, }); }); - it('should stop the process when stdin ends using the "serve" command and the "--watch-options-stdin" option', (done) => { - const proc = runAndGetProcess(__dirname, ["serve", "--watch-options-stdin"]); - + it('should stop the process when stdin ends using the "serve" command and the "--watch-options-stdin" option', async () => { let semaphore = false; - proc.on("exit", () => { - expect(semaphore).toBe(true); - processKill(proc); - done(); - }); + await runWatch(__dirname, ["serve", "--watch-options-stdin"], { + handler: (proc) => { + proc.on("exit", () => { + expect(semaphore).toBe(true); + + processKill(proc); + }); - proc.stdin.end(() => { - semaphore = true; + proc.stdin.end(() => { + semaphore = true; + }); + }, }); }); - it('should stop the process when stdin ends using the "serve" command and the "--stdin" option', (done) => { - const proc = runAndGetProcess(__dirname, ["serve", "--stdin"]); - + it('should stop the process when stdin ends using the "serve" command and the "--stdin" option', async () => { let semaphore = false; - proc.on("exit", () => { - expect(semaphore).toBe(true); - processKill(proc); - done(); - }); + await runWatch(__dirname, ["serve", "--stdin"], { + handler: (proc) => { + proc.on("exit", () => { + expect(semaphore).toBe(true); + + processKill(proc); + }); - proc.stdin.end(() => { - semaphore = true; + proc.stdin.end(() => { + semaphore = true; + }); + }, }); }); - it('should stop the process when stdin ends using the "serve" command and configuration', (done) => { - const proc = runAndGetProcess(__dirname, ["serve", "--config", "./serve.config.js"]); - + it('should stop the process when stdin ends using the "serve" command and configuration', async () => { let semaphore = false; - proc.on("exit", () => { - expect(semaphore).toBe(true); - processKill(proc); - done(); - }); + await runWatch(__dirname, ["serve", "--config", "./serve.config.js"], { + handler: (proc) => { + proc.on("exit", () => { + expect(semaphore).toBe(true); + + processKill(proc); + }); - proc.stdin.end(() => { - semaphore = true; + proc.stdin.end(() => { + semaphore = true; + }); + }, }); }); - it('should stop the process when stdin ends using the "serve" command and the config file in multi compiler mode', (done) => { - const proc = runAndGetProcess(__dirname, ["--config", "./multi-watch.config.js"]); - + it('should stop the process when stdin ends using the "serve" command and the config file in multi compiler mode', async () => { let semaphore = false; - proc.on("exit", () => { - expect(semaphore).toBe(true); - - processKill(proc); + await runWatch(__dirname, ["--config", "./multi-watch.config.js"], { + handler: (proc) => { + proc.on("exit", () => { + expect(semaphore).toBe(true); - done(); - }); + processKill(proc); + }); - proc.stdin.end(() => { - semaphore = true; + proc.stdin.end(() => { + semaphore = true; + }); + }, }); }); }); diff --git a/test/watch/watch-variable/watch-variable.test.js b/test/watch/watch-variable/watch-variable.test.js index 196433e0321..0e6e7f22ff7 100644 --- a/test/watch/watch-variable/watch-variable.test.js +++ b/test/watch/watch-variable/watch-variable.test.js @@ -1,67 +1,79 @@ "use strict"; const { writeFileSync } = require("node:fs"); -const { resolve } = require("node:path"); -const { processKill, runAndGetProcess } = require("../../utils/test-utils"); +const path = require("node:path"); +const { processKill, runWatch } = require("../../utils/test-utils"); const wordsInStatsv5 = ["asset", "index.js", "compiled successfully"]; describe("watch variable", () => { - it("should pass `WEBPACK_WATCH` env variable and recompile upon file change using the `watch` command", (done) => { - const proc = runAndGetProcess(__dirname, ["watch", "--mode", "development"]); - + it("should pass `WEBPACK_WATCH` env variable and recompile upon file change using the `watch` command", async () => { let modified = false; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); - - expect(data).not.toContain("FAIL"); - - if (data.includes("index.js")) { - for (const word of wordsInStatsv5) { - expect(data).toContain(word); - } - - if (!modified) { - process.nextTick(() => { - writeFileSync(resolve(__dirname, "./src/index.js"), "console.log('watch flag test');"); - }); - - modified = true; - } else { - processKill(proc); - done(); - } - } + await runWatch(__dirname, ["watch", "--mode", "development"], { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + expect(data).not.toContain("FAIL"); + + if (data.includes("index.js")) { + for (const word of wordsInStatsv5) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + path.resolve(__dirname, "./src/index.js"), + "console.log('watch flag test');", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); + }, }); - }); - it("should pass `WEBPACK_WATCH` env variable and recompile upon file change using the `--watch` option", (done) => { - const proc = runAndGetProcess(__dirname, ["--watch", "--mode", "development"]); + expect(modified).toBe(true); + }); + it("should pass `WEBPACK_WATCH` env variable and recompile upon file change using the `--watch` option", async () => { let modified = false; - proc.stdout.on("data", (chunk) => { - const data = chunk.toString(); - - expect(data).not.toContain("FAIL"); - - if (data.includes("index.js")) { - for (const word of wordsInStatsv5) { - expect(data).toContain(word); - } - - if (!modified) { - process.nextTick(() => { - writeFileSync(resolve(__dirname, "./src/index.js"), "console.log('watch flag test');"); - }); - - modified = true; - } else { - processKill(proc); - done(); - } - } + await runWatch(__dirname, ["--watch", "--mode", "development"], { + handler: (proc) => { + proc.stdout.on("data", (chunk) => { + const data = chunk.toString(); + + expect(data).not.toContain("FAIL"); + + if (data.includes("index.js")) { + for (const word of wordsInStatsv5) { + expect(data).toContain(word); + } + + if (!modified) { + process.nextTick(() => { + writeFileSync( + path.resolve(__dirname, "./src/index.js"), + "console.log('watch flag test');", + ); + }); + + modified = true; + } else { + processKill(proc); + } + } + }); + }, }); + + expect(modified).toBe(true); }); }); From 90a0c9c0c72a4beaa883fc1f8eecd659ad1a889e Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 25 Dec 2025 19:46:28 +0300 Subject: [PATCH 07/13] test: more fixes --- test/build/core-flags/core-flags.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/build/core-flags/core-flags.test.js b/test/build/core-flags/core-flags.test.js index 3adc18930c6..890a520734e 100644 --- a/test/build/core-flags/core-flags.test.js +++ b/test/build/core-flags/core-flags.test.js @@ -26,7 +26,7 @@ describe("core flags", () => { it("should ignore the warning emitted", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "--ignore-warnings", - /Generated Warning/, + "/Generated Warning/", "--config", "warning.config.js", ]); @@ -40,7 +40,7 @@ describe("core flags", () => { it("should reset options.ignoreWarnings", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "--ignore-warnings", - /Generated Warning/, + "/Generated Warning/", "--ignore-warnings-reset", "--config", "warning.config.js", @@ -211,7 +211,7 @@ describe("core flags", () => { it("should allow RegExp value for `infrastructureLogging.debug`", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "--infrastructure-logging-debug", - /MyPlugin/, + "/MyPlugin/", ]); expect(exitCode).toBe(0); @@ -223,7 +223,7 @@ describe("core flags", () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "--infrastructure-logging-debug", "MyPlugin", - /MyAnotherPlugin/, + "/MyAnotherPlugin/", ]); expect(exitCode).toBe(0); From f3b0d1657c6801dff0a56556eda11d55363a9d93 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 25 Dec 2025 19:54:37 +0300 Subject: [PATCH 08/13] ci: fix test workflow --- .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 ce2d1547393..65a5ec7ad66 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -86,7 +86,7 @@ jobs: run: npm run build:ci - name: Run tests and generate coverage - run: npm run test:coverage --ci --shard=${{ matrix.shard }} + run: npm run test:coverage -- --ci --shard=${{ matrix.shard }} - name: Upload coverage to Codecov uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 From cd4f1f240586229c0e2dd3830e590602caa9390b Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 25 Dec 2025 20:02:42 +0300 Subject: [PATCH 09/13] test: fix --- jest.config.js | 4 ++-- .../{typescript.test.js => typescript.test.mjs} | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) rename test/build/config-format/typescript-cjs-using-nodejs/{typescript.test.js => typescript.test.mjs} (75%) diff --git a/jest.config.js b/jest.config.js index 708cb34435f..58e378bdddb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -7,8 +7,8 @@ module.exports = { transform: { "^.+\\.(ts)?$": "ts-jest", }, - testRegex: ["/test/.*\\.(test.js|test.ts)$"], - moduleFileExtensions: ["ts", "js", "json"], + testRegex: ["/test/.*\\.(test.js|test.cjs|test.mjs|test.ts|test.cts|test.mts)$"], + moduleFileExtensions: ["ts", "cts", "mts", "js", "cjs", "mjs", "json"], snapshotResolver: "/scripts/snapshot-resolver.js", setupFilesAfterEnv: ["/scripts/setup-test.js"], globalTeardown: "/scripts/cleanup-test.js", diff --git a/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.js b/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.mjs similarity index 75% rename from test/build/config-format/typescript-cjs-using-nodejs/typescript.test.js rename to test/build/config-format/typescript-cjs-using-nodejs/typescript.test.mjs index 08e6a0003e6..62d0fdc5a58 100644 --- a/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.js +++ b/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.mjs @@ -1,6 +1,10 @@ -const { existsSync } = require("node:fs"); -const { resolve } = require("node:path"); -const { run } = require("../../../utils/test-utils"); +import { existsSync } from "node:fs"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import { run } from "../../../utils/test-utils.js"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); describe("webpack cli", () => { it("should support typescript esnext file", async () => { From 80f94791d6b90e31ca3c0c1eee868fd9877322c1 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 25 Dec 2025 20:11:22 +0300 Subject: [PATCH 10/13] test: rewrite --- .../typescript-cjs-using-nodejs/package.json | 2 +- .../typescript-cjs-using-nodejs/tsconfig.json | 2 +- .../typescript-cjs-using-nodejs/webpack.config.ts | 4 ++-- .../{typescript.test.js => typescript.test.mjs} | 10 +++++++--- 4 files changed, 11 insertions(+), 7 deletions(-) rename test/build/config-format/typescript-mjs-using-nodejs/{typescript.test.js => typescript.test.mjs} (75%) diff --git a/test/build/config-format/typescript-cjs-using-nodejs/package.json b/test/build/config-format/typescript-cjs-using-nodejs/package.json index 2921f73c914..449278eb4a4 100644 --- a/test/build/config-format/typescript-cjs-using-nodejs/package.json +++ b/test/build/config-format/typescript-cjs-using-nodejs/package.json @@ -1,5 +1,5 @@ { - "type": "module", + "type": "commonjs", "engines": { "node": ">=18.12.0" } diff --git a/test/build/config-format/typescript-cjs-using-nodejs/tsconfig.json b/test/build/config-format/typescript-cjs-using-nodejs/tsconfig.json index 3cf557d8735..9175e041e78 100644 --- a/test/build/config-format/typescript-cjs-using-nodejs/tsconfig.json +++ b/test/build/config-format/typescript-cjs-using-nodejs/tsconfig.json @@ -3,6 +3,6 @@ "target": "esnext", "allowImportingTsExtensions": true, "rewriteRelativeImportExtensions": true, - "module": "esnext" + "module": "commonjs" } } diff --git a/test/build/config-format/typescript-cjs-using-nodejs/webpack.config.ts b/test/build/config-format/typescript-cjs-using-nodejs/webpack.config.ts index 093d143985e..586bd1b1cf3 100644 --- a/test/build/config-format/typescript-cjs-using-nodejs/webpack.config.ts +++ b/test/build/config-format/typescript-cjs-using-nodejs/webpack.config.ts @@ -1,4 +1,4 @@ -import * as path from "node:path"; +const path = require("node:path"); /* eslint-disable no-useless-concat */ @@ -13,4 +13,4 @@ const config = { }, }; -export default config; +module.exports = config; diff --git a/test/build/config-format/typescript-mjs-using-nodejs/typescript.test.js b/test/build/config-format/typescript-mjs-using-nodejs/typescript.test.mjs similarity index 75% rename from test/build/config-format/typescript-mjs-using-nodejs/typescript.test.js rename to test/build/config-format/typescript-mjs-using-nodejs/typescript.test.mjs index 08e6a0003e6..62d0fdc5a58 100644 --- a/test/build/config-format/typescript-mjs-using-nodejs/typescript.test.js +++ b/test/build/config-format/typescript-mjs-using-nodejs/typescript.test.mjs @@ -1,6 +1,10 @@ -const { existsSync } = require("node:fs"); -const { resolve } = require("node:path"); -const { run } = require("../../../utils/test-utils"); +import { existsSync } from "node:fs"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import { run } from "../../../utils/test-utils.js"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); describe("webpack cli", () => { it("should support typescript esnext file", async () => { From 3b9dbb411da1af915a399fb15fdd32b194b73038 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 25 Dec 2025 20:19:17 +0300 Subject: [PATCH 11/13] test: fix --- .../typescript-cjs-using-nodejs/typescript.test.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.mjs b/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.mjs index 62d0fdc5a58..f521bc851f3 100644 --- a/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.mjs +++ b/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.mjs @@ -19,7 +19,7 @@ describe("webpack cli", () => { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true, }, // Fallback to `ts-node/esm` for old Node.js versions - nodeOptions: major >= 24 ? [] : ["--experimental-loader=ts-node/esm"], + nodeOptions: major >= 24 ? [] : ["--require=ts-node/register"], }, ); From 172a5cf8dac84942621e59fa960736616bf64adc Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 25 Dec 2025 20:21:39 +0300 Subject: [PATCH 12/13] test: fix more --- .../{typescript.test.js => typescript.test.mjs} | 10 +++++++--- .../{typescript.test.js => typescript.test.mjs} | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) rename test/build/config-format/typescript-ts-node-loader/{typescript.test.js => typescript.test.mjs} (74%) rename test/build/config-format/typescript-using-nodejs/{typescript.test.js => typescript.test.mjs} (75%) diff --git a/test/build/config-format/typescript-ts-node-loader/typescript.test.js b/test/build/config-format/typescript-ts-node-loader/typescript.test.mjs similarity index 74% rename from test/build/config-format/typescript-ts-node-loader/typescript.test.js rename to test/build/config-format/typescript-ts-node-loader/typescript.test.mjs index 2142f26190b..89462548c7e 100644 --- a/test/build/config-format/typescript-ts-node-loader/typescript.test.js +++ b/test/build/config-format/typescript-ts-node-loader/typescript.test.mjs @@ -1,6 +1,10 @@ -const { existsSync } = require("node:fs"); -const { resolve } = require("node:path"); -const { run } = require("../../../utils/test-utils"); +import { existsSync } from "node:fs"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import { run } from "../../../utils/test-utils.js"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); describe("webpack cli", () => { it("should support typescript esnext file", async () => { diff --git a/test/build/config-format/typescript-using-nodejs/typescript.test.js b/test/build/config-format/typescript-using-nodejs/typescript.test.mjs similarity index 75% rename from test/build/config-format/typescript-using-nodejs/typescript.test.js rename to test/build/config-format/typescript-using-nodejs/typescript.test.mjs index 08e6a0003e6..62d0fdc5a58 100644 --- a/test/build/config-format/typescript-using-nodejs/typescript.test.js +++ b/test/build/config-format/typescript-using-nodejs/typescript.test.mjs @@ -1,6 +1,10 @@ -const { existsSync } = require("node:fs"); -const { resolve } = require("node:path"); -const { run } = require("../../../utils/test-utils"); +import { existsSync } from "node:fs"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import { run } from "../../../utils/test-utils.js"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); describe("webpack cli", () => { it("should support typescript esnext file", async () => { From 620b5b14cc1c36738ae115ba269256dbc6d407fa Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 25 Dec 2025 20:27:22 +0300 Subject: [PATCH 13/13] test: fix more --- .../config-format/disable-interpret/disable-interpret.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config-format/disable-interpret/disable-interpret.test.js b/test/build/config-format/disable-interpret/disable-interpret.test.js index 8e286c13dc0..5bbca3a227d 100644 --- a/test/build/config-format/disable-interpret/disable-interpret.test.js +++ b/test/build/config-format/disable-interpret/disable-interpret.test.js @@ -8,7 +8,7 @@ describe("webpack cli", () => { const configFileName = "webpack.config"; const configFilePath = resolve(__dirname, `${configFileName}.ts`); const { execa } = await import("execa"); - const buildScripts = execa("yarn", ["tsc", configFilePath]); + const buildScripts = await execa("yarn", ["tsc", configFilePath]); expect(buildScripts.stdout).toBeTruthy(); const { exitCode, stderr, stdout } = await run(__dirname, ["--disable-interpret"]);