Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9f24874
feat!: remove internalIP methods (#5625)
bjohansebas Jan 12, 2026
ad1201a
feat!: drop support for node <20.9 (#5631)
bjohansebas Jan 20, 2026
7b2ec8f
feat: remove SockJS support (#5626)
bjohansebas Jan 21, 2026
5c49ba0
feat: bump to express 5 (#5564)
bjohansebas Jan 23, 2026
8a51cae
feat: remove spdy (#5635)
bjohansebas Jan 24, 2026
e410dea
feat: enable compression middleware for http/2 (#5638)
bjohansebas Jan 29, 2026
3ca084f
feat: use new URL instead of url.parse (#5637)
bjohansebas Feb 1, 2026
b040f0f
feat: remove colorette dependency (#5642)
bjohansebas Feb 1, 2026
f2a8809
feat: remove bypass option from proxy configuration (#5641)
bjohansebas Feb 3, 2026
97716d3
feat: use compiler.platform to determine the target (#5647)
bjohansebas Feb 17, 2026
d0ccd8b
feat: remove cli-flags (#5634)
bjohansebas Mar 6, 2026
ced498f
chore: update webpack-dev-middleware@8 (#5654)
bjohansebas Mar 30, 2026
5fde31d
chore: bump dependencies (#5655)
bjohansebas Mar 30, 2026
d4c066f
chore: update webpack-cli to version 7.0.2 (#5656)
bjohansebas Apr 1, 2026
d0bf628
chore: update chokidar to v4 (#5657)
bjohansebas Apr 26, 2026
0c545bb
chore: update dev-middleware (#5664)
bjohansebas Apr 26, 2026
cdcc124
chore: update p-retry to v8.0.0 and node engine requirement to >=22.1…
bjohansebas May 1, 2026
192e88c
refactor: migrate to node:test and setup jsdom environment (#5667)
bjohansebas May 10, 2026
a0cbf86
chore: update chokidar to v5.0.0 in package.json (#5669)
bjohansebas May 11, 2026
e83501e
fix: treat loopback aliases as equivalent in isSameOrigin (#5659)
ThierryRakotomanana May 15, 2026
99e8c5b
refactor: migrate to ES module syntax (#5665)
bjohansebas May 16, 2026
c9d1c36
chore: update http-proxy-middleware (#5663)
bjohansebas May 22, 2026
6550a05
feat: add changeset validation and release workflow (#5673)
bjohansebas May 23, 2026
fc23c2c
fix: import afterEach for proper test cleanup and remove redundant ht…
bjohansebas May 23, 2026
28ecc85
ci: update
bjohansebas May 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
5 changes: 5 additions & 0 deletions .changeset/bump-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": patch
---

Bump production dependencies, notably `open` to v11 and `p-retry` to v8.
5 changes: 5 additions & 0 deletions .changeset/bump-express-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Bump Express to v5. See the [Express 5 migration guide](https://expressjs.com/en/guide/migrating-5.html) for the full list of breaking changes.
5 changes: 5 additions & 0 deletions .changeset/bump-webpack-peer-dependency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Bump the `webpack` peer dependency range from `^5.0.0` to `^5.101.0`.
137 changes: 137 additions & 0 deletions .changeset/changelog-generator.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
import { getInfo, getInfoFromPullRequest } from "@changesets/get-github-info";

/** @typedef {import("@changesets/types").ChangelogFunctions} ChangelogFunctions */

/**
* @returns {{ GITHUB_SERVER_URL: string }} value
*/
function readEnv() {
const GITHUB_SERVER_URL =
process.env.GITHUB_SERVER_URL || "https://github.com";
return { GITHUB_SERVER_URL };
}

/** @type {ChangelogFunctions} */
const changelogFunctions = {
getDependencyReleaseLine: async (
changesets,
dependenciesUpdated,
options,
) => {
if (!options.repo) {
throw new Error(
'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]',
);
}
if (dependenciesUpdated.length === 0) return "";

const changesetLink = `- Updated dependencies [${(
await Promise.all(
changesets.map(async (cs) => {
if (cs.commit) {
const { links } = await getInfo({
repo: options.repo,
commit: cs.commit,
});
return links.commit;
}
}),
)
)
.filter(Boolean)
.join(", ")}]:`;

const updatedDependenciesList = dependenciesUpdated.map(
(dependency) => ` - ${dependency.name}@${dependency.newVersion}`,
);

return [changesetLink, ...updatedDependenciesList].join("\n");
},
getReleaseLine: async (changeset, type, options) => {
const { GITHUB_SERVER_URL } = readEnv();
if (!options || !options.repo) {
throw new Error(
'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]',
);
}

/** @type {number | undefined} */
let prFromSummary;
/** @type {string | undefined} */
let commitFromSummary;
/** @type {string[]} */
const usersFromSummary = [];

const replacedChangelog = changeset.summary
.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => {
const num = Number(pr);
if (!Number.isNaN(num)) prFromSummary = num;
return "";
})
.replace(/^\s*commit:\s*([^\s]+)/im, (_, commit) => {
commitFromSummary = commit;
return "";
})
.replaceAll(/^\s*(?:author|user):\s*@?([^\s]+)/gim, (_, user) => {
usersFromSummary.push(user);
return "";
})
.trim();

const [firstLine, ...futureLines] = replacedChangelog
.split("\n")
.map((l) => l.trimEnd());

const links = await (async () => {
if (prFromSummary !== undefined) {
let { links } = await getInfoFromPullRequest({
repo: options.repo,
pull: prFromSummary,
});
if (commitFromSummary) {
const shortCommitId = commitFromSummary.slice(0, 7);
links = {
...links,
commit: `[\`${shortCommitId}\`](${GITHUB_SERVER_URL}/${options.repo}/commit/${commitFromSummary})`,
};
}
return links;
}
const commitToFetchFrom = commitFromSummary || changeset.commit;
if (commitToFetchFrom) {
const { links } = await getInfo({
repo: options.repo,
commit: commitToFetchFrom,
});
return links;
}
return {
commit: null,
pull: null,
user: null,
};
})();

const users = usersFromSummary.length
? usersFromSummary
.map(
(userFromSummary) =>
`[@${userFromSummary}](${GITHUB_SERVER_URL}/${userFromSummary})`,
)
.join(", ")
: links.user;

let suffix = "";
if (links.pull || links.commit || users) {
suffix = `(${users ? `by ${users} ` : ""}in ${
links.pull || links.commit
})`;
}

return `\n\n- ${firstLine} ${suffix}\n${futureLines
.map((l) => ` ${l}`)
.join("\n")}`;
},
};

export default changelogFunctions;
137 changes: 137 additions & 0 deletions .changeset/changeset-validate.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/* eslint-disable no-console */
import fs from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { simpleGit } from "simple-git";
import pkgJson from "../package.json" with { type: "json" };

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const rootPath = path.join(__dirname, "..");
const git = simpleGit(rootPath);

const VALID_BUMPS = new Set(["major", "minor", "patch"]);
const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/;
const ENTRY_RE = /^"([^"]+)"\s*:\s*([a-zA-Z]+)\s*$/;

const toLines = (output) =>
output
.split(/\r?\n/)
.map((line) => line.trim())
.filter(Boolean);

const isChangeset = (filePath) => {
const normalized = filePath.replaceAll("\\", "/");
return (
normalized.startsWith(".changeset/") &&
normalized.endsWith(".md") &&
normalized !== ".changeset/README.md"
);
};

const gitDiff = async (more = []) => {
const args = [
"diff",
"--name-only",
// cspell:ignore ACMR
"--diff-filter=ACMR",
...more,
"--",
".changeset/*.md",
].filter(Boolean);

return toLines(await git.raw(args));
};

const getChangedFiles = async () => {
const files = new Set();
const baseRef = process.env.GITHUB_BASE_REF;

// GitHub Actions base diff
if (baseRef) {
for (const file of await gitDiff([`origin/${baseRef}...HEAD`])) {
if (isChangeset(file)) files.add(file);
}
}
// Local working tree changes
else {
const _files = [
// Unstaged changes
...(await gitDiff()),
// Staged but uncommitted changes
...(await gitDiff(["--cached"])),
// Untracked files
...(await git.status()).not_added,
];
for (const file of _files) {
if (isChangeset(file)) files.add(file);
}
}
return files;
};

const validate = async (filePath) => {
const absoluteFilePath = path.join(rootPath, filePath);
const content = await fs.readFile(absoluteFilePath, "utf8");
const frontmatterMatch = content.match(FRONTMATTER_RE);
const errors = [];

if (!frontmatterMatch) {
errors.push("missing YAML frontmatter block");
return errors;
}

const entries = frontmatterMatch[1]
.split(/\r?\n/)
.map((line) => line.trim())
.filter(Boolean);

if (entries.length === 0) {
errors.push("frontmatter does not contain package bump entries");
return errors;
}

for (const entry of entries) {
const match = entry.match(ENTRY_RE);
if (!match) {
errors.push(`invalid frontmatter entry: ${entry}`);
continue;
}

const [, pkgName, bumpType] = match;
if (pkgName !== pkgJson.name) {
errors.push(
`invalid package name "${pkgName}", expected "${pkgJson.name}"`,
);
}

if (!VALID_BUMPS.has(bumpType)) {
errors.push(
`invalid bump type "${bumpType}", expected one of: major, minor, patch`,
);
}
}

return errors;
};

const changedFiles = await getChangedFiles();

if (changedFiles.size === 0) {
console.log("No changed changeset files found.");
} else {
const failures = [];
for (const filePath of changedFiles) {
const errors = await validate(filePath);
for (const error of errors) {
failures.push(`${filePath}: ${error}`);
}
}

if (failures.length > 0) {
console.error("Changeset validation failed:");
for (const failure of failures) {
console.error(`- ${failure}`);
}
process.exitCode = 1;
}
}
5 changes: 5 additions & 0 deletions .changeset/compression-http2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": minor
---

Enable the compression middleware for HTTP/2 connections.
13 changes: 13 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": [
"./changelog-generator.mjs",
{ "repo": "webpack/webpack-dev-server" }
],
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/drop-node-below-22.15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Drop support for Node.js < 22.15.0.
5 changes: 5 additions & 0 deletions .changeset/fix-issameorigin-loopback-aliases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": patch
---

Treat loopback aliases (`127.0.0.1`, `::1`, `localhost`) as equivalent in `isSameOrigin` so the WebSocket client does not reject valid same-origin connections.
5 changes: 5 additions & 0 deletions .changeset/migrate-to-esm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Migrate the package to ES module syntax. The package is now published as ESM-only.
5 changes: 5 additions & 0 deletions .changeset/migrate-to-node-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": patch
---

Migrate the test suite from Jest to `node:test` and set up the jsdom environment.
5 changes: 5 additions & 0 deletions .changeset/remove-cli-flags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Remove CLI flags. Use the `serve` command from `webpack-cli` together with a configuration file or the programmatic API instead.
5 changes: 5 additions & 0 deletions .changeset/remove-colorette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": minor
---

Remove the `colorette` dependency in favor of native ANSI styling.
5 changes: 5 additions & 0 deletions .changeset/remove-internalip-methods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Remove the `internalIP` and `internalIPSync` static methods from `Server`. Resolve the local IP yourself if you need it.
5 changes: 5 additions & 0 deletions .changeset/remove-proxy-bypass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Remove the `bypass` option from proxy configuration. Use the `router` or `context` options provided by `http-proxy-middleware` instead.
5 changes: 5 additions & 0 deletions .changeset/remove-sockjs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Remove SockJS support. The `webSocketServer` option no longer accepts `"sockjs"`; use the default `"ws"` transport instead.
5 changes: 5 additions & 0 deletions .changeset/remove-spdy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Remove the `spdy` dependency. Use the built-in `node:http2` module via the `server` option for HTTP/2 support.
5 changes: 5 additions & 0 deletions .changeset/update-chokidar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": minor
---

Update `chokidar` to v5 and extend `watchFiles.options.ignored` to support glob string patterns via `tinyglobby`.
5 changes: 5 additions & 0 deletions .changeset/update-http-proxy-middleware-v4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-dev-server": major
---

Update `http-proxy-middleware` to v4. See the [http-proxy-middleware v3 release notes](https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.0) and [v4 release notes](https://github.com/chimurai/http-proxy-middleware/releases/tag/v4.0.0) for the full list of breaking changes.
Loading
Loading