From 85ccb63bd85d3e2d7798dac72d7a1f3fae204b8f Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 1 Jul 2025 16:44:16 +0300 Subject: [PATCH] chore: update webpack config --- eslint.config.mjs | 4 +- package.json | 34 ++++---- packages/configtest/package.json | 20 ++--- packages/create-webpack-app/package.json | 42 +++++----- .../src/generators/init/default.ts | 4 +- .../src/generators/init/react.ts | 6 +- .../src/generators/init/svelte.ts | 4 +- .../src/generators/init/vue.ts | 4 +- .../src/generators/loader/default.ts | 4 +- .../src/generators/plugin/default.ts | 4 +- packages/create-webpack-app/src/index.ts | 8 +- .../src/utils/generate-files.ts | 8 +- .../src/utils/install-dependencies.ts | 6 +- .../create-webpack-app/src/utils/logger.ts | 6 +- packages/info/package.json | 24 +++--- packages/serve/package.json | 21 ++--- packages/serve/src/index.ts | 2 +- packages/webpack-cli/package.json | 34 ++++---- .../webpack-cli/src/plugins/cli-plugin.ts | 1 - packages/webpack-cli/src/types.ts | 67 ++++++++-------- packages/webpack-cli/src/webpack-cli.ts | 77 +++++++++---------- scripts/setup-build.js | 2 +- scripts/update-docs.js | 4 +- smoketests/helpers.js | 2 +- .../configtest.test.js | 2 +- .../missing-command-packages/info.test.js | 2 +- .../missing-command-packages/serve.test.js | 2 +- .../webpack-bundle-analyzer.test.js | 2 +- .../webpack-dev-server.test.js | 2 +- smoketests/missing-packages/webpack.test.js | 2 +- test/api/do-install.test.js | 2 +- .../api/resolve-config/resolve-config.test.js | 2 +- test/build/analyze/analyze-flag.test.js | 2 +- test/build/build-errors/errors.test.js | 2 +- test/build/build-warnings/warnings.test.js | 2 +- test/build/colors/colors.test.js | 2 +- .../disable-interpret.test.js | 2 +- .../config-format/esm/webpack.config.mjs | 2 +- .../typescript.test.js | 2 +- .../typescript.test.js | 2 +- .../typescript.test.js | 2 +- .../typescript.test.js | 2 +- .../typescript.test.js | 2 +- .../custom-name/config.webpack.mjs | 2 +- .../config/function/functional-config.test.js | 2 +- .../function-with-env.test.js | 2 +- test/build/core-flags/core-flags.test.js | 2 +- .../devtool/array/source-map-array.test.js | 2 +- .../devtool/object/source-map-object.test.js | 2 +- .../entry/flag-entry/entry-with-flag.test.js | 2 +- .../multiple-entries/multi-entries.test.js | 2 +- test/build/json/json.test.js | 2 +- .../build/output/output-named-bundles.test.js | 2 +- test/build/stats/flags/stats.test.js | 2 +- .../target/flag-test/target-flag.test.js | 2 +- test/build/target/node/node-test.test.js | 2 +- test/build/unknown/unknown.test.js | 2 +- .../with-config-path/with-config-path.test.js | 2 +- .../without-config-path.test.js | 2 +- .../without-config-path-error.test.js | 2 +- ...ut-config-path-multi-compiler-mode.test.js | 2 +- ...thout-config-path-no-configuration.test.js | 2 +- .../without-config-path.test.js | 2 +- test/create-webpack-app/init/init.test.js | 4 +- test/create-webpack-app/loader/loader.test.js | 6 +- test/create-webpack-app/plugin/plugin.test.js | 2 +- test/create-webpack-app/test.utils.js | 13 ++-- test/help/help.test.js | 2 +- test/serve/basic/serve-basic.test.js | 2 +- .../invalid-schema/invalid-schema.test.js | 2 +- .../serve-variable/serve-variable.test.js | 2 +- .../serve-custom-config.test.js | 2 +- test/utils/test-utils.js | 28 ++++--- test/watch/basic/basic.test.js | 2 +- test/watch/stdin/stdin.test.js | 2 +- .../watch-variable/watch-variable.test.js | 2 +- yarn.lock | 74 ++++++++++++++++-- 77 files changed, 333 insertions(+), 276 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index ae4acf6464e..4021eee7921 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,4 +1,4 @@ -import { globalIgnores, defineConfig } from "eslint/config"; +import { defineConfig, globalIgnores } from "eslint/config"; import config from "eslint-config-webpack"; import configs from "eslint-config-webpack/configs.js"; @@ -23,6 +23,7 @@ export default defineConfig([ // We are CLI, so using `console.log` is normal "no-console": "off", strict: "off", + "n/no-process-exit": "off", }, }, { @@ -31,6 +32,7 @@ export default defineConfig([ rules: { // We are CLI, so using `console.log` is normal "no-console": "off", + "n/no-process-exit": "off", }, }, ]); diff --git a/package.json b/package.json index dd50a0859d2..5746ad72515 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,7 @@ { "name": "webpack-cli-monorepo", - "description": "CLI for webpack & friends", - "license": "MIT", "private": true, - "repository": { - "type": "git", - "url": "https://github.com/webpack/webpack-cli.git" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "engines": { - "node": ">=18.12.0" - }, + "description": "CLI for webpack & friends", "keywords": [ "webpack", "cli", @@ -22,6 +10,15 @@ "bundler", "web" ], + "repository": { + "type": "git", + "url": "https://github.com/webpack/webpack-cli.git" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "license": "MIT", "workspaces": [ "./packages/*" ], @@ -52,9 +49,6 @@ "update:docs": "node ./scripts/update-docs", "prepare": "husky" }, - "peerDependencies": { - "webpack": "5.x.x" - }, "devDependencies": { "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.2", @@ -74,7 +68,7 @@ "css-loader": "^7.1.2", "del-cli": "^6.0.0", "eslint": "^9.29.0", - "eslint-config-webpack": "^4.1.4", + "eslint-config-webpack": "^4.2.2", "eslint-config-prettier": "^10.1.5", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jest": "^29.0.1", @@ -106,5 +100,11 @@ "webpack": "^5.99.1", "webpack-bundle-analyzer": "^4.5.0", "webpack-dev-server": "^5.1.0" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "engines": { + "node": ">=18.12.0" } } diff --git a/packages/configtest/package.json b/packages/configtest/package.json index 04c7cebdaad..477df466f3e 100644 --- a/packages/configtest/package.json +++ b/packages/configtest/package.json @@ -2,25 +2,25 @@ "name": "@webpack-cli/configtest", "version": "3.0.1", "description": "Validate a webpack configuration.", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "license": "MIT", - "engines": { - "node": ">=18.12.0" - }, - "publishConfig": { - "access": "public" - }, + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/configtest", "repository": { "type": "git", "url": "https://github.com/webpack/webpack-cli.git" }, - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/configtest", + "license": "MIT", + "main": "lib/index.js", + "types": "lib/index.d.ts", "files": [ "lib" ], "peerDependencies": { "webpack": "^5.82.0", "webpack-cli": "6.x.x" + }, + "engines": { + "node": ">=18.12.0" + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/create-webpack-app/package.json b/packages/create-webpack-app/package.json index 8bfc7d1e0aa..f92f70588b5 100644 --- a/packages/create-webpack-app/package.json +++ b/packages/create-webpack-app/package.json @@ -2,38 +2,31 @@ "name": "create-new-webpack-app", "version": "1.1.1", "description": "CLI for scaffolding webpack projects using default config, framework templates, loader or plugins templates", - "license": "MIT", + "keywords": [ + "webpack", + "cli", + "scaffolding", + "module", + "bundler", + "web", + "frameworks" + ], + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/create-webpack-app", + "bugs": "https://github.com/webpack/webpack-cli/issues", "repository": { "type": "git", "url": "https://github.com/webpack-cli/create-webpack-app.git" }, - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/create-webpack-app", - "bugs": "https://github.com/webpack/webpack-cli/issues", "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, - "bin": { - "create-webpack-app": "./bin/cli.js" - }, + "license": "MIT", "type": "module", "main": "./lib/index.js", - "scripts": { - "build": "tsc --build", - "watch": "tsc --watch" - }, - "engines": { - "node": ">=18.12.0" + "bin": { + "create-webpack-app": "./bin/cli.js" }, - "keywords": [ - "webpack", - "cli", - "scaffolding", - "module", - "bundler", - "web", - "frameworks" - ], "files": [ "bin", "lib", @@ -41,6 +34,10 @@ "!**/*__tests__", "!**/*.d.ts" ], + "scripts": { + "build": "tsc --build", + "watch": "tsc --watch" + }, "dependencies": { "@inquirer/expand": "^4.0.3", "@inquirer/select": "^4.0.3", @@ -53,5 +50,8 @@ "devDependencies": { "@types/cross-spawn": "^6.0.6", "@types/ejs": "^3.1.5" + }, + "engines": { + "node": ">=18.12.0" } } diff --git a/packages/create-webpack-app/src/generators/init/default.ts b/packages/create-webpack-app/src/generators/init/default.ts index 3bf52d00c1a..7601cba491f 100644 --- a/packages/create-webpack-app/src/generators/init/default.ts +++ b/packages/create-webpack-app/src/generators/init/default.ts @@ -1,7 +1,7 @@ -import { type Answers, type ActionType, type FileRecord } from "../../types.js"; -import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; +import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop"; +import { type ActionType, type Answers, type FileRecord } from "../../types.js"; export default async function defaultInitGenerator(plop: NodePlopAPI) { const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/create-webpack-app/src/generators/init/react.ts b/packages/create-webpack-app/src/generators/init/react.ts index 975a4735bdc..08e9a7301e6 100644 --- a/packages/create-webpack-app/src/generators/init/react.ts +++ b/packages/create-webpack-app/src/generators/init/react.ts @@ -1,7 +1,7 @@ -import { type Answers, type ActionType, type FileRecord } from "../../types.js"; -import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop"; -import { dirname, resolve, join } from "node:path"; +import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; +import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop"; +import { type ActionType, type Answers, type FileRecord } from "../../types.js"; export default async function reactInitGenerator(plop: NodePlopAPI) { const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/create-webpack-app/src/generators/init/svelte.ts b/packages/create-webpack-app/src/generators/init/svelte.ts index 657baa8545f..88a5f88206d 100644 --- a/packages/create-webpack-app/src/generators/init/svelte.ts +++ b/packages/create-webpack-app/src/generators/init/svelte.ts @@ -1,7 +1,7 @@ -import { type Answers, type ActionType, type FileRecord } from "../../types.js"; -import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; +import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop"; +import { type ActionType, type Answers, type FileRecord } from "../../types.js"; export default async function svelteInitGenerator(plop: NodePlopAPI) { const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/create-webpack-app/src/generators/init/vue.ts b/packages/create-webpack-app/src/generators/init/vue.ts index d186093c8d7..805721457f9 100644 --- a/packages/create-webpack-app/src/generators/init/vue.ts +++ b/packages/create-webpack-app/src/generators/init/vue.ts @@ -1,7 +1,7 @@ -import { type Answers, type ActionType, type FileRecord } from "../../types.js"; -import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; +import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop"; +import { type ActionType, type Answers, type FileRecord } from "../../types.js"; export default async function vueInitGenerator(plop: NodePlopAPI) { const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/create-webpack-app/src/generators/loader/default.ts b/packages/create-webpack-app/src/generators/loader/default.ts index ac4a4a5266b..633314fa179 100644 --- a/packages/create-webpack-app/src/generators/loader/default.ts +++ b/packages/create-webpack-app/src/generators/loader/default.ts @@ -1,7 +1,7 @@ -import { type LoaderAnswers, type ActionType, type FileRecord } from "../../types.js"; -import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; +import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop"; +import { type ActionType, type FileRecord, type LoaderAnswers } from "../../types.js"; import { logger } from "../../utils/logger.js"; export default async function loaderGenerator(plop: NodePlopAPI) { diff --git a/packages/create-webpack-app/src/generators/plugin/default.ts b/packages/create-webpack-app/src/generators/plugin/default.ts index 3e6e05c50a1..59ad58f3760 100644 --- a/packages/create-webpack-app/src/generators/plugin/default.ts +++ b/packages/create-webpack-app/src/generators/plugin/default.ts @@ -1,7 +1,7 @@ -import { type ActionType, type FileRecord, PluginAnswers } from "../../types.js"; -import { type NodePlopAPI, type DynamicActionsFunction } from "node-plop"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; +import { type DynamicActionsFunction, type NodePlopAPI } from "node-plop"; +import { type ActionType, type FileRecord, PluginAnswers } from "../../types.js"; import { logger } from "../../utils/logger.js"; export default async function pluginGenerator(plop: NodePlopAPI) { diff --git a/packages/create-webpack-app/src/index.ts b/packages/create-webpack-app/src/index.ts index 03161796fe2..316b67fdd96 100644 --- a/packages/create-webpack-app/src/index.ts +++ b/packages/create-webpack-app/src/index.ts @@ -1,11 +1,11 @@ -import { Command } from "commander"; -import { resolve, dirname } from "node:path"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; import select from "@inquirer/select"; +import { Command } from "commander"; import nodePlop, { type PlopGenerator } from "node-plop"; -import { fileURLToPath } from "node:url"; -import { onSuccessHandler, onFailureHandler, logger } from "./utils/logger.js"; import { type Answers, type InitOptions, type LoaderOptions, type PluginOptions } from "./types.js"; +import { logger, onFailureHandler, onSuccessHandler } from "./utils/logger.js"; const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/create-webpack-app/src/utils/generate-files.ts b/packages/create-webpack-app/src/utils/generate-files.ts index c44a0ec2b08..6aa269364d9 100644 --- a/packages/create-webpack-app/src/utils/generate-files.ts +++ b/packages/create-webpack-app/src/utils/generate-files.ts @@ -1,12 +1,12 @@ import * as fs from "node:fs/promises"; -import * as ejs from "ejs"; -import expand from "@inquirer/expand"; -import { spawn, sync } from "cross-spawn"; import * as path from "node:path"; import { fileURLToPath } from "node:url"; -import { logger } from "./logger.js"; +import expand from "@inquirer/expand"; +import { spawn, sync } from "cross-spawn"; +import * as ejs from "ejs"; import { type NodePlopAPI } from "node-plop"; import { type Answers } from "../types.js"; +import { logger } from "./logger.js"; export interface AddConfig { type: string; // Type of action diff --git a/packages/create-webpack-app/src/utils/install-dependencies.ts b/packages/create-webpack-app/src/utils/install-dependencies.ts index c603955616c..f1123ead800 100644 --- a/packages/create-webpack-app/src/utils/install-dependencies.ts +++ b/packages/create-webpack-app/src/utils/install-dependencies.ts @@ -1,13 +1,13 @@ -import { type NodePlopAPI } from "node-plop"; -import { dirname, resolve } from "node:path"; -import { spawn } from "cross-spawn"; import { type ChildProcess, type SpawnOptionsWithStdioTuple, type StdioNull, type StdioPipe, } from "node:child_process"; +import { dirname, resolve } from "node:path"; import { fileURLToPath } from "node:url"; +import { spawn } from "cross-spawn"; +import { type NodePlopAPI } from "node-plop"; export default async function installDependencies(plop: NodePlopAPI) { const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/create-webpack-app/src/utils/logger.ts b/packages/create-webpack-app/src/utils/logger.ts index 66a0a8d36e7..196d5cc3fbe 100644 --- a/packages/create-webpack-app/src/utils/logger.ts +++ b/packages/create-webpack-app/src/utils/logger.ts @@ -1,10 +1,10 @@ -import { green, yellow, type Color, red, cyan, blue, blueBright, greenBright } from "colorette"; +import { normalize, relative } from "node:path"; +import { type Color, blue, blueBright, cyan, green, greenBright, red, yellow } from "colorette"; import { type Logger, type PlopActionHooksChanges, type PlopActionHooksFailures, } from "../types.js"; -import { relative, normalize } from "node:path"; const prefix: string = blueBright("create-webpack"); const getLogger = (): Logger => ({ @@ -51,4 +51,4 @@ function onFailureHandler(failure: PlopActionHooksFailures): void { throw new Error(failure.error); } -export { logger, onSuccessHandler, onFailureHandler }; +export { logger, onFailureHandler, onSuccessHandler }; diff --git a/packages/info/package.json b/packages/info/package.json index a8a4c3bfe74..1a9360537d3 100644 --- a/packages/info/package.json +++ b/packages/info/package.json @@ -2,26 +2,26 @@ "name": "@webpack-cli/info", "version": "3.0.1", "description": "Outputs info about system and webpack config", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "license": "MIT", - "engines": { - "node": ">=18.12.0" - }, - "publishConfig": { - "access": "public" - }, + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/info", "repository": { "type": "git", "url": "https://github.com/webpack/webpack-cli.git" }, - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/info", + "license": "MIT", + "main": "lib/index.js", + "types": "lib/index.d.ts", "files": [ "lib" ], - "gitHead": "fb50f766851f500ca12867a2aa9de81fa6e368f9", "peerDependencies": { "webpack": "^5.82.0", "webpack-cli": "6.x.x" - } + }, + "engines": { + "node": ">=18.12.0" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "fb50f766851f500ca12867a2aa9de81fa6e368f9" } diff --git a/packages/serve/package.json b/packages/serve/package.json index 8756f284d10..67ce8e62369 100644 --- a/packages/serve/package.json +++ b/packages/serve/package.json @@ -2,32 +2,33 @@ "name": "@webpack-cli/serve", "version": "3.0.1", "description": "", - "main": "lib/index.js", - "types": "lib/index.d.ts", "keywords": [], - "publishConfig": { - "access": "public" - }, + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/serve", "repository": { "type": "git", "url": "https://github.com/webpack/webpack-cli.git" }, - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/serve", "license": "MIT", - "engines": { - "node": ">=18.12.0" - }, + "main": "lib/index.js", + "types": "lib/index.d.ts", "files": [ "lib" ], "peerDependencies": { "webpack": "^5.82.0", - "webpack-cli": "6.x.x" + "webpack-cli": "6.x.x", + "webpack-dev-server": "^5.0.0" }, "peerDependenciesMeta": { "webpack-dev-server": { "optional": true } }, + "engines": { + "node": ">=18.12.0" + }, + "publishConfig": { + "access": "public" + }, "gitHead": "fb50f766851f500ca12867a2aa9de81fa6e368f9" } diff --git a/packages/serve/src/index.ts b/packages/serve/src/index.ts index 6e34f6252b4..2639a892d65 100644 --- a/packages/serve/src/index.ts +++ b/packages/serve/src/index.ts @@ -1,5 +1,5 @@ import { type Compiler, type cli } from "webpack"; -import { type IWebpackCLI, type WebpackDevServerOptions, type StringsKeys } from "webpack-cli"; +import { type IWebpackCLI, type StringsKeys, type WebpackDevServerOptions } from "webpack-cli"; const WEBPACK_PACKAGE = process.env.WEBPACK_PACKAGE || "webpack"; const WEBPACK_DEV_SERVER_PACKAGE = process.env.WEBPACK_DEV_SERVER_PACKAGE || "webpack-dev-server"; diff --git a/packages/webpack-cli/package.json b/packages/webpack-cli/package.json index 04216079bfa..68b9028c414 100644 --- a/packages/webpack-cli/package.json +++ b/packages/webpack-cli/package.json @@ -2,32 +2,29 @@ "name": "webpack-cli", "version": "6.0.1", "description": "CLI for webpack & friends", - "license": "MIT", + "keywords": [ + "webpack", + "cli", + "scaffolding", + "module", + "bundler", + "web" + ], + "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/webpack-cli", + "bugs": "https://github.com/webpack/webpack-cli/issues", "repository": { "type": "git", "url": "https://github.com/webpack/webpack-cli.git" }, - "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/webpack-cli", - "bugs": "https://github.com/webpack/webpack-cli/issues", "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, + "license": "MIT", + "main": "./lib/index.js", "bin": { "webpack-cli": "./bin/cli.js" }, - "main": "./lib/index.js", - "engines": { - "node": ">=18.12.0" - }, - "keywords": [ - "webpack", - "cli", - "scaffolding", - "module", - "bundler", - "web" - ], "files": [ "bin", "lib", @@ -52,7 +49,9 @@ "@types/envinfo": "^7.8.1" }, "peerDependencies": { - "webpack": "^5.82.0" + "webpack": "^5.82.0", + "webpack-bundle-analyzer": "^4.0.0", + "webpack-dev-server": "^5.0.0" }, "peerDependenciesMeta": { "webpack-bundle-analyzer": { @@ -62,5 +61,8 @@ "optional": true } }, + "engines": { + "node": ">=18.12.0" + }, "gitHead": "fb50f766851f500ca12867a2aa9de81fa6e368f9" } diff --git a/packages/webpack-cli/src/plugins/cli-plugin.ts b/packages/webpack-cli/src/plugins/cli-plugin.ts index e491ad2e298..33f06e8aaf4 100644 --- a/packages/webpack-cli/src/plugins/cli-plugin.ts +++ b/packages/webpack-cli/src/plugins/cli-plugin.ts @@ -11,7 +11,6 @@ export class CLIPlugin { } async setupBundleAnalyzerPlugin(compiler: Compiler) { - // eslint-disable-next-line import/no-extraneous-dependencies const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); const bundleAnalyzerPlugin = compiler.options.plugins.some( diff --git a/packages/webpack-cli/src/types.ts b/packages/webpack-cli/src/types.ts index 946ba4879eb..882362e84f6 100644 --- a/packages/webpack-cli/src/types.ts +++ b/packages/webpack-cli/src/types.ts @@ -1,15 +1,19 @@ +import { type stringifyChunked } from "@discoveryjs/json-ext"; +import { type Colorette } from "colorette"; +import { type Command, type CommandOptions, type Option, type ParseOptions } from "commander"; +import { type prepare } from "rechoir"; import { - default as webpack, + type AssetEmittedInfo, + type Compiler, + type Configuration, type EntryOptions, - type Stats, + type FileCacheOptions, + type MultiCompiler, type MultiStats, - type Configuration, + type Stats, type WebpackError, type WebpackOptionsNormalized, - type Compiler, - type MultiCompiler, - type AssetEmittedInfo, - type FileCacheOptions, + default as webpack, } from "webpack"; import { @@ -17,11 +21,6 @@ import { type Configuration as DevServerConfig, } from "webpack-dev-server"; -import { type Colorette } from "colorette"; -import { type Command, type CommandOptions, type Option, type ParseOptions } from "commander"; -import { type prepare } from "rechoir"; -import { type stringifyChunked } from "@discoveryjs/json-ext"; - /** * Webpack CLI */ @@ -304,48 +303,48 @@ interface PromptOptions { type StringsKeys = { [K in keyof T]: T[K] extends string ? K : never }[keyof T]; export { - type IWebpackCLI, - type WebpackCLICommandOption, - type WebpackCLIBuiltInOption, - type WebpackCLIBuiltInFlag, - type WebpackCLIColors, - type WebpackCLIConfig, - type WebpackCLIExternalCommandInfo, - type WebpackCLIOptions, - type WebpackCLICommand, - type WebpackCLICommandOptions, - type WebpackCLIMainOption, - type WebpackCLILogger, - type WebpackDevServerOptions, - type WebpackRunOptions, - type WebpackCompiler, - type WebpackConfiguration, + type ArgumentConfig, type Argv, type BasicPrimitive, + type CLIPluginOptions, type CallableWebpackConfiguration, type Callback, - type CLIPluginOptions, type CommandAction, type CommanderOption, - type LoadableWebpackConfiguration, type DynamicImport, - type FileSystemCacheOptions, - type ArgumentConfig, type EnumValue, + type FileSystemCacheOptions, + type IWebpackCLI, type ImportLoaderError, type Instantiable, type JsonExt, + type LoadableWebpackConfiguration, type ModuleName, type PackageInstallOptions, type PackageManager, type Path, + type PotentialPromise, type ProcessedArguments, type PromptOptions, - type PotentialPromise, type Rechoir, type RechoirError, type StringsKeys, + type WebpackCLIBuiltInFlag, + type WebpackCLIBuiltInOption, + type WebpackCLIColors, + type WebpackCLICommand, + type WebpackCLICommandOption, + type WebpackCLICommandOptions, + type WebpackCLIConfig, + type WebpackCLIExternalCommandInfo, + type WebpackCLILogger, + type WebpackCLIMainOption, + type WebpackCLIOptions, + type WebpackCompiler, + type WebpackConfiguration, + type WebpackDevServerOptions, + type WebpackRunOptions, }; export { type CommandOptions } from "commander"; -export { type Problem, type Argument } from "webpack"; +export { type Argument, type Problem } from "webpack"; diff --git a/packages/webpack-cli/src/webpack-cli.ts b/packages/webpack-cli/src/webpack-cli.ts index b9e148aa9e8..4a5823bb907 100644 --- a/packages/webpack-cli/src/webpack-cli.ts +++ b/packages/webpack-cli/src/webpack-cli.ts @@ -1,68 +1,67 @@ +import { type stringifyChunked } from "@discoveryjs/json-ext"; +import { type Help, type ParseOptions } from "commander"; import { - type IWebpackCLI, - type WebpackCLICommandOption, - type WebpackCLIBuiltInOption, - type WebpackCLIBuiltInFlag, - type WebpackCLIColors, - type WebpackCLIConfig, - type WebpackCLIExternalCommandInfo, - type WebpackCLIOptions, - type WebpackCLICommand, - type WebpackCLICommandOptions, - type WebpackCLIMainOption, - type WebpackCLILogger, - type WebpackDevServerOptions, - type WebpackRunOptions, - type WebpackCompiler, - type WebpackConfiguration, + type Compiler, + type MultiCompiler, + type MultiStats, + type Stats, + type StatsOptions, + type WebpackError, + default as webpack, +} from "webpack"; +import type webpackMerge from "webpack-merge"; + +import { type CLIPlugin as CLIPluginClass } from "./plugins/cli-plugin.js"; +import { + type Argument, type Argv, type BasicPrimitive, + type CLIPluginOptions, type CallableWebpackConfiguration, type Callback, - type CLIPluginOptions, type CommandAction, - type LoadableWebpackConfiguration, type DynamicImport, - type FileSystemCacheOptions, type EnumValue, + type FileSystemCacheOptions, + type IWebpackCLI, type ImportLoaderError, type Instantiable, type JsonExt, + type LoadableWebpackConfiguration, type ModuleName, type PackageInstallOptions, type PackageManager, type Path, + type PotentialPromise, + type Problem, type ProcessedArguments, type PromptOptions, - type PotentialPromise, type Rechoir, type RechoirError, - type Argument, - type Problem, type StringsKeys, + type WebpackCLIBuiltInFlag, + type WebpackCLIBuiltInOption, + type WebpackCLIColors, + type WebpackCLICommand, + type WebpackCLICommandOption, + type WebpackCLICommandOptions, + type WebpackCLIConfig, + type WebpackCLIExternalCommandInfo, + type WebpackCLILogger, + type WebpackCLIMainOption, + type WebpackCLIOptions, + type WebpackCompiler, + type WebpackConfiguration, + type WebpackDevServerOptions, + type WebpackRunOptions, } from "./types.js"; -import type webpackMerge from "webpack-merge"; -import { - default as webpack, - type Compiler, - type MultiCompiler, - type WebpackError, - type StatsOptions, - type Stats, - type MultiStats, -} from "webpack"; -import { type stringifyChunked } from "@discoveryjs/json-ext"; -import { type Help, type ParseOptions } from "commander"; - -import { type CLIPlugin as CLIPluginClass } from "./plugins/cli-plugin.js"; - const fs = require("node:fs"); -const { Readable } = require("node:stream"); const path = require("node:path"); +const { Readable } = require("node:stream"); const { pathToFileURL } = require("node:url"); const util = require("node:util"); -const { program, Option } = require("commander"); +const { Option, program } = require("commander"); const WEBPACK_PACKAGE_IS_CUSTOM = Boolean(process.env.WEBPACK_PACKAGE); const WEBPACK_PACKAGE = WEBPACK_PACKAGE_IS_CUSTOM diff --git a/scripts/setup-build.js b/scripts/setup-build.js index 3856ef968f6..563327aa73e 100644 --- a/scripts/setup-build.js +++ b/scripts/setup-build.js @@ -1,4 +1,4 @@ -const { writeFileSync, readFileSync } = require("node:fs"); +const { readFileSync, writeFileSync } = require("node:fs"); const { resolve } = require("node:path"); const tsConfigPath = resolve(__dirname, "../tsconfig.json"); diff --git a/scripts/update-docs.js b/scripts/update-docs.js index 9a0d1f986f3..eb9b82a72a5 100644 --- a/scripts/update-docs.js +++ b/scripts/update-docs.js @@ -1,6 +1,6 @@ -const { sync } = require("execa"); -const { resolve } = require("node:path"); 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("."); diff --git a/smoketests/helpers.js b/smoketests/helpers.js index 5da9c959e04..4e3fded5ab4 100644 --- a/smoketests/helpers.js +++ b/smoketests/helpers.js @@ -249,6 +249,6 @@ const runTestWithHelp = (pkg, cliArgs = [], logMessage = undefined, isSubPackage module.exports = { runTest, runTestStdout, - runTestWithHelp, runTestStdoutWithInput, + runTestWithHelp, }; diff --git a/smoketests/missing-command-packages/configtest.test.js b/smoketests/missing-command-packages/configtest.test.js index 5b26a685bde..a34823c08d7 100644 --- a/smoketests/missing-command-packages/configtest.test.js +++ b/smoketests/missing-command-packages/configtest.test.js @@ -21,5 +21,5 @@ const configTestWithHelp = () => { return runTestWithHelp(packageName, args, logMessage, isSubPackage); }; -module.exports.run = [configTest, configTestWithHelp]; module.exports.name = "Missing @webpack-cli/configtest"; +module.exports.run = [configTest, configTestWithHelp]; diff --git a/smoketests/missing-command-packages/info.test.js b/smoketests/missing-command-packages/info.test.js index f29ac69e309..968122504a6 100644 --- a/smoketests/missing-command-packages/info.test.js +++ b/smoketests/missing-command-packages/info.test.js @@ -19,5 +19,5 @@ const infoTestWithHelp = () => { return runTestWithHelp(packageName, args, logMessage, isSubPackage); }; -module.exports.run = [infoTest, infoTestWithHelp]; module.exports.name = "Missing @webpack-cli/info"; +module.exports.run = [infoTest, infoTestWithHelp]; diff --git a/smoketests/missing-command-packages/serve.test.js b/smoketests/missing-command-packages/serve.test.js index 437074d5ff4..3e8414c4e37 100644 --- a/smoketests/missing-command-packages/serve.test.js +++ b/smoketests/missing-command-packages/serve.test.js @@ -19,5 +19,5 @@ const serveTestWithHelp = () => { return runTestWithHelp(packageName, args, logMessage, isSubPackage); }; -module.exports.run = [serveTest, serveTestWithHelp]; module.exports.name = "Missing @webpack-cli/serve"; +module.exports.run = [serveTest, serveTestWithHelp]; diff --git a/smoketests/missing-packages/webpack-bundle-analyzer.test.js b/smoketests/missing-packages/webpack-bundle-analyzer.test.js index 580b07fdf29..5cc09cf69de 100644 --- a/smoketests/missing-packages/webpack-bundle-analyzer.test.js +++ b/smoketests/missing-packages/webpack-bundle-analyzer.test.js @@ -10,5 +10,5 @@ const webpackBundleAnalyzerTest = () => { return runTest(packageName, args, logMessage); }; -module.exports.run = [webpackBundleAnalyzerTest]; module.exports.name = "Missing webpack-bundle-analyzer"; +module.exports.run = [webpackBundleAnalyzerTest]; diff --git a/smoketests/missing-packages/webpack-dev-server.test.js b/smoketests/missing-packages/webpack-dev-server.test.js index 7a95153889c..4f9c1d77630 100644 --- a/smoketests/missing-packages/webpack-dev-server.test.js +++ b/smoketests/missing-packages/webpack-dev-server.test.js @@ -19,5 +19,5 @@ const webpackDevServerWithHelpTest = () => { return runTestStdout({ packageName, cliArgs, logMessage }); }; -module.exports.run = [webpackDevServerTest, webpackDevServerWithHelpTest]; module.exports.name = "Missing webpack-dev-server"; +module.exports.run = [webpackDevServerTest, webpackDevServerWithHelpTest]; diff --git a/smoketests/missing-packages/webpack.test.js b/smoketests/missing-packages/webpack.test.js index 90d8f0abb61..8b557e03ca1 100644 --- a/smoketests/missing-packages/webpack.test.js +++ b/smoketests/missing-packages/webpack.test.js @@ -66,6 +66,7 @@ const configtestCommand = () => { return runTest(packageName, args, logMessage); }; +module.exports.name = "Missing webpack"; module.exports.run = [ noCommand, buildCommand, @@ -76,4 +77,3 @@ module.exports.run = [ infoCommand, helpCommand, ]; -module.exports.name = "Missing webpack"; diff --git a/test/api/do-install.test.js b/test/api/do-install.test.js index 994982bc1a9..6c043db5ae6 100644 --- a/test/api/do-install.test.js +++ b/test/api/do-install.test.js @@ -1,7 +1,7 @@ "use strict"; -const CLI = require("../../packages/webpack-cli/lib/webpack-cli"); const stripAnsi = require("strip-ansi"); +const CLI = require("../../packages/webpack-cli/lib/webpack-cli"); const readlineQuestionMock = jest.fn(); diff --git a/test/api/resolve-config/resolve-config.test.js b/test/api/resolve-config/resolve-config.test.js index 8405fa77ebc..98c182c9446 100644 --- a/test/api/resolve-config/resolve-config.test.js +++ b/test/api/resolve-config/resolve-config.test.js @@ -1,8 +1,8 @@ const { resolve } = require("node:path"); const WebpackCLI = require("../../../packages/webpack-cli/lib/webpack-cli"); +const arrayConfig = require("./webpack.config.cjs"); const config1 = require("./webpack.config1.cjs"); const config2 = require("./webpack.config2.cjs"); -const arrayConfig = require("./webpack.config.cjs"); const promiseConfig = require("./webpack.promise.config.cjs"); const cli = new WebpackCLI(); diff --git a/test/build/analyze/analyze-flag.test.js b/test/build/analyze/analyze-flag.test.js index 2808f51c032..8cb7be880ae 100644 --- a/test/build/analyze/analyze-flag.test.js +++ b/test/build/analyze/analyze-flag.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStdout, run } = require("../../utils/test-utils"); describe('"analyze" option', () => { it("should not load webpack-bundle-analyzer plugin twice with --analyze flag and plugin", async () => { diff --git a/test/build/build-errors/errors.test.js b/test/build/build-errors/errors.test.js index 236a0f4e415..b5f171433c6 100644 --- a/test/build/build-errors/errors.test.js +++ b/test/build/build-errors/errors.test.js @@ -1,7 +1,7 @@ "use strict"; -const { run, readFile } = require("../../utils/test-utils"); const { resolve } = require("node:path"); +const { readFile, run } = require("../../utils/test-utils"); describe("errors", () => { it("should output by default", async () => { diff --git a/test/build/build-warnings/warnings.test.js b/test/build/build-warnings/warnings.test.js index 259bc05601a..6f20f2dd7bf 100644 --- a/test/build/build-warnings/warnings.test.js +++ b/test/build/build-warnings/warnings.test.js @@ -1,8 +1,8 @@ "use strict"; -const { run, readFile } = require("../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { readFile, run } = require("../../utils/test-utils"); describe("warnings", () => { it("should output by default", async () => { diff --git a/test/build/colors/colors.test.js b/test/build/colors/colors.test.js index b64f9658b2b..a9d0f0bd4cf 100644 --- a/test/build/colors/colors.test.js +++ b/test/build/colors/colors.test.js @@ -1,7 +1,7 @@ "use strict"; -const { run } = require("../../utils/test-utils"); const { resolve } = require("node:path"); +const { run } = require("../../utils/test-utils"); describe("colors", () => { it("should output by default", async () => { 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 33b0bdfbd5c..0e5a00cd0ed 100644 --- a/test/build/config-format/disable-interpret/disable-interpret.test.js +++ b/test/build/config-format/disable-interpret/disable-interpret.test.js @@ -1,8 +1,8 @@ -const { run } = require("../../../utils/test-utils"); 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; diff --git a/test/build/config-format/esm/webpack.config.mjs b/test/build/config-format/esm/webpack.config.mjs index 3c9b03d39a5..9244eb08310 100644 --- a/test/build/config-format/esm/webpack.config.mjs +++ b/test/build/config-format/esm/webpack.config.mjs @@ -1,5 +1,5 @@ -import { fileURLToPath } from "node:url"; import path from "node:path"; +import { fileURLToPath } from "node:url"; export default { mode: "development", 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.js index d0faf30c143..08e6a0003e6 100644 --- a/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.js +++ b/test/build/config-format/typescript-cjs-using-nodejs/typescript.test.js @@ -1,6 +1,6 @@ -const { run } = require("../../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { run } = require("../../../utils/test-utils"); describe("webpack cli", () => { it("should support typescript esnext file", async () => { 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.js index d0faf30c143..08e6a0003e6 100644 --- a/test/build/config-format/typescript-mjs-using-nodejs/typescript.test.js +++ b/test/build/config-format/typescript-mjs-using-nodejs/typescript.test.js @@ -1,6 +1,6 @@ -const { run } = require("../../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { run } = require("../../../utils/test-utils"); describe("webpack cli", () => { it("should support typescript esnext file", async () => { 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.js index f152c73ad50..2142f26190b 100644 --- a/test/build/config-format/typescript-ts-node-loader/typescript.test.js +++ b/test/build/config-format/typescript-ts-node-loader/typescript.test.js @@ -1,6 +1,6 @@ -const { run } = require("../../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { run } = require("../../../utils/test-utils"); describe("webpack cli", () => { it("should support typescript esnext file", async () => { diff --git a/test/build/config-format/typescript-ts-node-require/typescript.test.js b/test/build/config-format/typescript-ts-node-require/typescript.test.js index 730ce73118b..4041596d9fd 100644 --- a/test/build/config-format/typescript-ts-node-require/typescript.test.js +++ b/test/build/config-format/typescript-ts-node-require/typescript.test.js @@ -1,6 +1,6 @@ -const { run } = require("../../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { run } = require("../../../utils/test-utils"); describe("webpack cli", () => { it("should support typescript 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.js index d0faf30c143..08e6a0003e6 100644 --- a/test/build/config-format/typescript-using-nodejs/typescript.test.js +++ b/test/build/config-format/typescript-using-nodejs/typescript.test.js @@ -1,6 +1,6 @@ -const { run } = require("../../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { run } = require("../../../utils/test-utils"); describe("webpack cli", () => { it("should support typescript esnext file", async () => { diff --git a/test/build/config-lookup/custom-name/config.webpack.mjs b/test/build/config-lookup/custom-name/config.webpack.mjs index 879875df64c..3dcd5e3c70c 100644 --- a/test/build/config-lookup/custom-name/config.webpack.mjs +++ b/test/build/config-lookup/custom-name/config.webpack.mjs @@ -1,5 +1,5 @@ -import { fileURLToPath } from "node:url"; import path from "node:path"; +import { fileURLToPath } from "node:url"; export default { entry: "./a.js", diff --git a/test/build/config/function/functional-config.test.js b/test/build/config/function/functional-config.test.js index 5b58e303259..2408e1e1300 100644 --- a/test/build/config/function/functional-config.test.js +++ b/test/build/config/function/functional-config.test.js @@ -1,7 +1,7 @@ "use strict"; -const { resolve } = require("node:path"); const { existsSync } = require("node:fs"); +const { resolve } = require("node:path"); const { run } = require("../../../utils/test-utils"); describe("functional config", () => { diff --git a/test/build/config/type/function-with-env/function-with-env.test.js b/test/build/config/type/function-with-env/function-with-env.test.js index 72aa1deea5b..4df58092a57 100644 --- a/test/build/config/type/function-with-env/function-with-env.test.js +++ b/test/build/config/type/function-with-env/function-with-env.test.js @@ -2,7 +2,7 @@ const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); -const { run, readFile, isWindows } = require("../../../../utils/test-utils"); +const { isWindows, readFile, run } = require("../../../../utils/test-utils"); describe("function configuration", () => { it("should throw when env is not supplied", async () => { diff --git a/test/build/core-flags/core-flags.test.js b/test/build/core-flags/core-flags.test.js index b767c405d66..3adc18930c6 100644 --- a/test/build/core-flags/core-flags.test.js +++ b/test/build/core-flags/core-flags.test.js @@ -1,7 +1,7 @@ "use strict"; const { resolve } = require("node:path"); -const { run, isWindows } = require("../../utils/test-utils"); +const { isWindows, run } = require("../../utils/test-utils"); describe("core flags", () => { describe("boolean type flags", () => { diff --git a/test/build/devtool/array/source-map-array.test.js b/test/build/devtool/array/source-map-array.test.js index 82632f8882c..cc79a34a474 100644 --- a/test/build/devtool/array/source-map-array.test.js +++ b/test/build/devtool/array/source-map-array.test.js @@ -1,7 +1,7 @@ "use strict"; const { resolve } = require("node:path"); -const { run, readdir } = require("../../../utils/test-utils"); +const { readdir, run } = require("../../../utils/test-utils"); describe("source-map object", () => { it("should treat source-map settings right", async () => { diff --git a/test/build/devtool/object/source-map-object.test.js b/test/build/devtool/object/source-map-object.test.js index a8bd4180eaa..6479b10eb22 100644 --- a/test/build/devtool/object/source-map-object.test.js +++ b/test/build/devtool/object/source-map-object.test.js @@ -2,7 +2,7 @@ const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); -const { run, readdir } = require("../../../utils/test-utils"); +const { readdir, run } = require("../../../utils/test-utils"); describe("source-map object", () => { it("should not write a source map for obj config", async () => { diff --git a/test/build/entry/flag-entry/entry-with-flag.test.js b/test/build/entry/flag-entry/entry-with-flag.test.js index 9e8198828bc..076dacbf196 100644 --- a/test/build/entry/flag-entry/entry-with-flag.test.js +++ b/test/build/entry/flag-entry/entry-with-flag.test.js @@ -1,8 +1,8 @@ "use strict"; -const { run, readFile } = require("../../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { readFile, run } = require("../../../utils/test-utils"); describe("entry flag", () => { it("should resolve the path to src/index.cjs", async () => { diff --git a/test/build/entry/multiple-entries/multi-entries.test.js b/test/build/entry/multiple-entries/multi-entries.test.js index 422ad46851b..7d9e9507b44 100644 --- a/test/build/entry/multiple-entries/multi-entries.test.js +++ b/test/build/entry/multiple-entries/multi-entries.test.js @@ -1,8 +1,8 @@ "use strict"; -const { run, readFile } = require("../../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { readFile, run } = require("../../../utils/test-utils"); describe("multiple entries", () => { it("should allow multiple entry flags", async () => { diff --git a/test/build/json/json.test.js b/test/build/json/json.test.js index 4320bdd6ad0..82c663f2be4 100644 --- a/test/build/json/json.test.js +++ b/test/build/json/json.test.js @@ -1,8 +1,8 @@ "use strict"; -const { run, readFile } = require("../../utils/test-utils"); const { existsSync } = require("node:fs"); const { resolve } = require("node:path"); +const { readFile, run } = require("../../utils/test-utils"); const successMessage = "stats are successfully stored as json to stats.json"; diff --git a/test/build/output/output-named-bundles.test.js b/test/build/output/output-named-bundles.test.js index 0b91825a81b..860e15d971c 100644 --- a/test/build/output/output-named-bundles.test.js +++ b/test/build/output/output-named-bundles.test.js @@ -1,7 +1,7 @@ "use strict"; const { resolve } = require("node:path"); -const { run, normalizeStdout, normalizeStderr } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("output flag named bundles", () => { it("should output file given as flag instead of in configuration", async () => { diff --git a/test/build/stats/flags/stats.test.js b/test/build/stats/flags/stats.test.js index 33892962622..4527c797734 100644 --- a/test/build/stats/flags/stats.test.js +++ b/test/build/stats/flags/stats.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../../utils/test-utils"); const presets = [ "normal", diff --git a/test/build/target/flag-test/target-flag.test.js b/test/build/target/flag-test/target-flag.test.js index b9cfceb1c55..73b15c4404e 100644 --- a/test/build/target/flag-test/target-flag.test.js +++ b/test/build/target/flag-test/target-flag.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStdout, normalizeStderr } = require("../../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../../utils/test-utils"); const targetValues = [ "web", diff --git a/test/build/target/node/node-test.test.js b/test/build/target/node/node-test.test.js index 9240f761d2e..2ebff335b15 100644 --- a/test/build/target/node/node-test.test.js +++ b/test/build/target/node/node-test.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr } = require("../../../utils/test-utils"); +const { normalizeStderr, run } = require("../../../utils/test-utils"); describe("Node target", () => { it("should emit the correct code", async () => { diff --git a/test/build/unknown/unknown.test.js b/test/build/unknown/unknown.test.js index 2c82a66abe5..9a6d36ddced 100644 --- a/test/build/unknown/unknown.test.js +++ b/test/build/unknown/unknown.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStdout, normalizeStderr } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("unknown behaviour", () => { it("should log an error if an unknown flag is passed", async () => { diff --git a/test/configtest/with-config-path/with-config-path.test.js b/test/configtest/with-config-path/with-config-path.test.js index d6602f065ff..0e0ddc59dea 100644 --- a/test/configtest/with-config-path/with-config-path.test.js +++ b/test/configtest/with-config-path/with-config-path.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("'configtest' command with the configuration path option", () => { it("should validate webpack config successfully", async () => { diff --git a/test/configtest/without-config-path-custom-extension/without-config-path.test.js b/test/configtest/without-config-path-custom-extension/without-config-path.test.js index ffb78609a05..fa840652d10 100644 --- a/test/configtest/without-config-path-custom-extension/without-config-path.test.js +++ b/test/configtest/without-config-path-custom-extension/without-config-path.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("'configtest' command without the configuration path option", () => { it("should validate default configuration", async () => { diff --git a/test/configtest/without-config-path-error/without-config-path-error.test.js b/test/configtest/without-config-path-error/without-config-path-error.test.js index edf637da6be..eb6beddc56e 100644 --- a/test/configtest/without-config-path-error/without-config-path-error.test.js +++ b/test/configtest/without-config-path-error/without-config-path-error.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("'configtest' command without the configuration path option", () => { it("should validate default configuration", async () => { diff --git a/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js b/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js index ffb78609a05..fa840652d10 100644 --- a/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js +++ b/test/configtest/without-config-path-multi-compiler-mode/without-config-path-multi-compiler-mode.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("'configtest' command without the configuration path option", () => { it("should validate default configuration", async () => { diff --git a/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js b/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js index edf637da6be..eb6beddc56e 100644 --- a/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js +++ b/test/configtest/without-config-path-no-configuration/without-config-path-no-configuration.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("'configtest' command without the configuration path option", () => { it("should validate default configuration", async () => { diff --git a/test/configtest/without-config-path/without-config-path.test.js b/test/configtest/without-config-path/without-config-path.test.js index ffb78609a05..fa840652d10 100644 --- a/test/configtest/without-config-path/without-config-path.test.js +++ b/test/configtest/without-config-path/without-config-path.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("'configtest' command without the configuration path option", () => { it("should validate default configuration", async () => { diff --git a/test/create-webpack-app/init/init.test.js b/test/create-webpack-app/init/init.test.js index 619b45d598c..7784d374dd9 100644 --- a/test/create-webpack-app/init/init.test.js +++ b/test/create-webpack-app/init/init.test.js @@ -1,8 +1,8 @@ +const { existsSync, mkdirSync, readFileSync } = require("node:fs"); const os = require("node:os"); const path = require("node:path"); -const { mkdirSync, existsSync, readFileSync } = require("node:fs"); const { join, resolve } = require("node:path"); -const { createPathDependentUtils, uniqueDirectoryForTest, isWindows } = require("../test.utils"); +const { createPathDependentUtils, isWindows, uniqueDirectoryForTest } = require("../test.utils"); // eslint-disable-next-line jest/no-confusing-set-timeout jest.setTimeout(480000); diff --git a/test/create-webpack-app/loader/loader.test.js b/test/create-webpack-app/loader/loader.test.js index c30e388f375..b2e17c50337 100644 --- a/test/create-webpack-app/loader/loader.test.js +++ b/test/create-webpack-app/loader/loader.test.js @@ -7,10 +7,10 @@ const { join, resolve } = require("node:path"); jest.setTimeout(480000); const { - uniqueDirectoryForTest, - normalizeStdout, - normalizeStderr, createPathDependentUtils, + normalizeStderr, + normalizeStdout, + uniqueDirectoryForTest, } = require("../test.utils"); const { runPromptWithAnswers } = createPathDependentUtils("create-webpack-app"); diff --git a/test/create-webpack-app/plugin/plugin.test.js b/test/create-webpack-app/plugin/plugin.test.js index 32cf675f956..8e94b67b1df 100644 --- a/test/create-webpack-app/plugin/plugin.test.js +++ b/test/create-webpack-app/plugin/plugin.test.js @@ -1,6 +1,6 @@ const { existsSync, mkdirSync } = require("node:fs"); const { join, resolve } = require("node:path"); -const { uniqueDirectoryForTest, normalizeStdout, normalizeStderr } = require("../test.utils"); +const { normalizeStderr, normalizeStdout, uniqueDirectoryForTest } = require("../test.utils"); const { createPathDependentUtils } = require("../test.utils"); // eslint-disable-next-line jest/no-confusing-set-timeout diff --git a/test/create-webpack-app/test.utils.js b/test/create-webpack-app/test.utils.js index 7853c5245e0..89d55a5f924 100644 --- a/test/create-webpack-app/test.utils.js +++ b/test/create-webpack-app/test.utils.js @@ -1,17 +1,14 @@ "use strict"; -const testUtilsPkg = require("../utils/test-utils"); - -const { processKill } = testUtilsPkg; - const path = require("node:path"); +const concat = require("concat-stream"); const execa = require("execa"); +const { Writable } = require("readable-stream"); +const stripAnsi = require("strip-ansi"); +const testUtilsPkg = require("../utils/test-utils"); const { node: execaNode } = execa; - -const stripAnsi = require("strip-ansi"); -const concat = require("concat-stream"); -const { Writable } = require("readable-stream"); +const { processKill } = testUtilsPkg; const ENABLE_LOG_COMPILATION = process.env.ENABLE_PIPE || false; const nodeVersion = Number.parseInt(process.versions.node.split(".")[0], 10); diff --git a/test/help/help.test.js b/test/help/help.test.js index 376f8c741bb..dc6c9077e7e 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../utils/test-utils"); describe("help", () => { it('should show help information using the "--help" option', async () => { diff --git a/test/serve/basic/serve-basic.test.js b/test/serve/basic/serve-basic.test.js index c77f084bed7..6d49c20cae9 100644 --- a/test/serve/basic/serve-basic.test.js +++ b/test/serve/basic/serve-basic.test.js @@ -2,7 +2,7 @@ const path = require("node:path"); const getPort = require("get-port"); -const { runWatch, normalizeStderr, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, runWatch } = require("../../utils/test-utils"); const testPath = path.resolve(__dirname); diff --git a/test/serve/invalid-schema/invalid-schema.test.js b/test/serve/invalid-schema/invalid-schema.test.js index 6e61395169b..c1d8b2b588c 100644 --- a/test/serve/invalid-schema/invalid-schema.test.js +++ b/test/serve/invalid-schema/invalid-schema.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run, normalizeStderr, normalizeStdout } = require("../../utils/test-utils"); +const { normalizeStderr, normalizeStdout, run } = require("../../utils/test-utils"); describe("invalid schema", () => { it("should log webpack error and exit process on invalid config", async () => { diff --git a/test/serve/serve-variable/serve-variable.test.js b/test/serve/serve-variable/serve-variable.test.js index ff1331641fe..4628807744b 100644 --- a/test/serve/serve-variable/serve-variable.test.js +++ b/test/serve/serve-variable/serve-variable.test.js @@ -2,7 +2,7 @@ const path = require("node:path"); const getPort = require("get-port"); -const { runWatch, normalizeStderr } = require("../../utils/test-utils"); +const { normalizeStderr, runWatch } = require("../../utils/test-utils"); const testPath = path.resolve(__dirname); 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 a3f830948b8..e90c87a5ad4 100644 --- a/test/serve/with-custom-port/serve-custom-config.test.js +++ b/test/serve/with-custom-port/serve-custom-config.test.js @@ -2,7 +2,7 @@ const path = require("node:path"); const getPort = require("get-port"); -const { runWatch, normalizeStderr } = require("../../utils/test-utils"); +const { normalizeStderr, runWatch } = require("../../utils/test-utils"); const testPath = path.resolve(__dirname); diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 876485257d3..3019d940826 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -1,18 +1,16 @@ "use strict"; +const { exec } = require("node:child_process"); +const fs = require("node:fs"); const os = require("node:os"); -const stripAnsi = require("strip-ansi"); const path = require("node:path"); -const fs = require("node:fs"); +const concat = require("concat-stream"); const execa = require("execa"); -const { exec } = require("node:child_process"); - -const { node: execaNode } = execa; - const { Writable } = require("readable-stream"); -const concat = require("concat-stream"); +const stripAnsi = require("strip-ansi"); 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"; @@ -377,17 +375,17 @@ const uniqueDirectoryForTest = async () => { }; module.exports = { - run, - runAndGetProcess, - runWatch, - runPromptWithAnswers, + getWebpackCliArguments, + hyphenToUpperCase, isWindows, normalizeStderr, normalizeStdout, - uniqueDirectoryForTest, + processKill, readFile, readdir, - hyphenToUpperCase, - processKill, - getWebpackCliArguments, + run, + runAndGetProcess, + runPromptWithAnswers, + runWatch, + uniqueDirectoryForTest, }; diff --git a/test/watch/basic/basic.test.js b/test/watch/basic/basic.test.js index 5dd37c535c4..3b8b77becff 100644 --- a/test/watch/basic/basic.test.js +++ b/test/watch/basic/basic.test.js @@ -1,8 +1,8 @@ "use strict"; -const { run, runAndGetProcess, processKill } = require("../../utils/test-utils"); const { writeFileSync } = require("node:fs"); const { resolve } = require("node:path"); +const { processKill, run, runAndGetProcess } = require("../../utils/test-utils"); const wordsInStatsv5 = ["asset", "index.js", "compiled successfully"]; diff --git a/test/watch/stdin/stdin.test.js b/test/watch/stdin/stdin.test.js index e465e7ed55d..25f6de9a790 100644 --- a/test/watch/stdin/stdin.test.js +++ b/test/watch/stdin/stdin.test.js @@ -1,4 +1,4 @@ -const { runAndGetProcess, processKill } = require("../../utils/test-utils"); +const { processKill, runAndGetProcess } = require("../../utils/test-utils"); describe("--watch-options-stdin", () => { it('should stop the process when stdin ends using "--watch" and "--watch-options-stdin" options', (done) => { diff --git a/test/watch/watch-variable/watch-variable.test.js b/test/watch/watch-variable/watch-variable.test.js index 9bc70fa330e..196433e0321 100644 --- a/test/watch/watch-variable/watch-variable.test.js +++ b/test/watch/watch-variable/watch-variable.test.js @@ -1,8 +1,8 @@ "use strict"; -const { runAndGetProcess, processKill } = require("../../utils/test-utils"); const { writeFileSync } = require("node:fs"); const { resolve } = require("node:path"); +const { processKill, runAndGetProcess } = require("../../utils/test-utils"); const wordsInStatsv5 = ["asset", "index.js", "compiled successfully"]; diff --git a/yarn.lock b/yarn.lock index e7bdc7e71ba..8a268b1ff77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3322,7 +3322,7 @@ acorn-walk@^8.0.0, acorn-walk@^8.1.1: dependencies: acorn "^8.11.0" -acorn@^8.0.4, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.15.0, acorn@^8.4.1: +acorn@^8.0.4, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.15.0, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.9.0: version "8.15.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== @@ -4906,6 +4906,11 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== +detect-indent@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-7.0.1.tgz#cbb060a12842b9c4d333f1cac4aa4da1bb66bc25" + integrity sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g== + detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" @@ -4916,6 +4921,11 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== +detect-newline@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-4.0.1.tgz#fcefdb5713e1fb8cb2839b8b6ee22e6716ab8f23" + integrity sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog== + detect-node@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" @@ -5278,12 +5288,15 @@ eslint-config-prettier@^10.1.5: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-10.1.5.tgz#00c18d7225043b6fbce6a665697377998d453782" integrity sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw== -eslint-config-webpack@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/eslint-config-webpack/-/eslint-config-webpack-4.1.4.tgz#31628912500bc809b98110dded38908e023d7d71" - integrity sha512-J98kJYTxa+qvai1Lldmk0508EuIno5Wpf8n+QSNud+8YDR8732GXgsxUctAo8tbxOYTaqguf1TJMG5vHYhNvSw== +eslint-config-webpack@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/eslint-config-webpack/-/eslint-config-webpack-4.2.2.tgz#4584e32dcb3cbead49f3c7f817d4d9029dc5dd43" + integrity sha512-2RJhkMxyLiACrsZ/sei3/uLv9DDeAdeZHP9o9Yjyjny0fGcHrvwwc0jmkjlPlmk1h2p1NtFvOYSGOvOuSxhm9g== dependencies: + detect-indent "^7.0.1" + jsonc-eslint-parser "^2.4.0" semver "^7.7.2" + sort-package-json "^3.3.1" eslint-import-resolver-node@^0.3.9: version "0.3.9" @@ -5421,7 +5434,7 @@ eslint-scope@^8.4.0: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== @@ -5481,6 +5494,15 @@ espree@^10.0.1, espree@^10.4.0: acorn-jsx "^5.3.2" eslint-visitor-keys "^4.2.1" +espree@^9.0.0: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -6088,6 +6110,11 @@ get-tsconfig@^4.8.1: dependencies: resolve-pkg-maps "^1.0.0" +git-hooks-list@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-4.1.1.tgz#ae340b82a9312354c73b48007f33840bbd83d3c0" + integrity sha512-cmP497iLq54AZnv4YRAEMnEyQ1eIn4tGKbmswqwmFV4GBnAqE8NLtWxxdXa++AalfgL5EBH4IxTPyquEuGY/jA== + git-raw-commits@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-3.0.0.tgz#5432f053a9744f67e8db03dbc48add81252cfdeb" @@ -6939,6 +6966,11 @@ is-plain-obj@^3.0.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== +is-plain-obj@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" + integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== + is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -7680,6 +7712,16 @@ json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonc-eslint-parser@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.0.tgz#74ded53f9d716e8d0671bd167bf5391f452d5461" + integrity sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg== + dependencies: + acorn "^8.5.0" + eslint-visitor-keys "^3.0.0" + espree "^9.0.0" + semver "^7.3.5" + jsonc-parser@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" @@ -10729,6 +10771,24 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" +sort-object-keys@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" + integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== + +sort-package-json@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-3.3.1.tgz#c31c0b4cd970b7fde6b1d0197f8b768584e2e65c" + integrity sha512-awjhQR2Iy5UN3NuguAK5+RezcEuUg9Ra4O8y2Aj+DlJa7MywyHaipAPf9bu4qqFj0hsYHHoT9sS3aV7Ucu728g== + dependencies: + detect-indent "^7.0.1" + detect-newline "^4.0.1" + git-hooks-list "^4.0.0" + is-plain-obj "^4.1.0" + semver "^7.7.1" + sort-object-keys "^1.1.3" + tinyglobby "^0.2.12" + "source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" @@ -11194,7 +11254,7 @@ tinyexec@^1.0.0: resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-1.0.1.tgz#70c31ab7abbb4aea0a24f55d120e5990bfa1e0b1" integrity sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw== -tinyglobby@^0.2.13: +tinyglobby@^0.2.12, tinyglobby@^0.2.13: version "0.2.14" resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.14.tgz#5280b0cf3f972b050e74ae88406c0a6a58f4079d" integrity sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==