Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,113 changes: 569 additions & 544 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/jest-cli/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",
Expand All @@ -63,7 +62,7 @@
"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",
"eslint": "^9.29.0",
Expand All @@ -75,13 +74,13 @@
"eslint-plugin-n": "^17.19.0",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unicorn": "^62.0.0",
"execa": "^5.0.0",
"get-port": "^5.1.1",
"execa": "^9.6.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",
Expand Down
20 changes: 14 additions & 6 deletions scripts/update-docs.js
Original file line number Diff line number Diff line change
@@ -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<void>}
*/
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"],
{
Expand All @@ -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"],
{
Expand All @@ -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);
}
Loading
Loading