Socket
Socket
Sign inDemoInstall

webpack-dev-server

Package Overview
Dependencies
282
Maintainers
4
Versions
217
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.15.1 to 5.0.0

10

bin/webpack-dev-server.js

@@ -94,3 +94,3 @@ #!/usr/bin/env node

process.exitCode = 1;
}
},
);

@@ -151,4 +151,4 @@ } else {

`We will use "${packageManager}" to install the CLI via "${packageManager} ${installOptions.join(
" "
)} ${cli.package}".`
" ",
)} ${cli.package}".`,
);

@@ -175,3 +175,3 @@

"You need to install 'webpack-cli' to use webpack via CLI.\n" +
"You can also install the CLI manually."
"You can also install the CLI manually.",
);

@@ -188,3 +188,3 @@

cli.package
}')...`
}')...`,
);

@@ -191,0 +191,0 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
import SockJS from "../modules/sockjs-client/index.js";

@@ -7,0 +7,0 @@ import { log } from "../utils/log.js";

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
import { log } from "../utils/log.js";

@@ -7,0 +7,0 @@ var WebSocketClient = /*#__PURE__*/function () {

@@ -1,6 +0,6 @@

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/* global __resourceQuery, __webpack_hash__ */

@@ -65,5 +65,4 @@ /// <reference types="webpack/module" />

isUnloading: false,
// TODO Workaround for webpack v4, `__webpack_hash__` is not replaced without HotModuleReplacement
// eslint-disable-next-line camelcase
currentHash: typeof __webpack_hash__ !== "undefined" ? __webpack_hash__ : ""
currentHash: __webpack_hash__
};

@@ -230,13 +229,5 @@

},
// TODO: remove in v5 in favor of 'static-changed'
/**
* @param {string} file
*/
"content-changed": function contentChanged(file) {
log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));
self.location.reload();
},
/**
* @param {string} file
*/
"static-changed": function staticChanged(file) {

@@ -243,0 +234,0 @@ log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));

@@ -1,6 +0,6 @@

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
// The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-react-app)

@@ -110,7 +110,7 @@ // They, in turn, got inspired by webpack-hot-middleware (https://github.com/glenjamin/webpack-hot-middleware).

var contentElement = /** @type {Document} */
/** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument.createElement("div");
( /** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument).createElement("div");
containerElement = /** @type {Document} */
/** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument.createElement("div");
( /** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument).createElement("div");
contentElement.id = "webpack-dev-server-client-overlay-div";

@@ -136,4 +136,4 @@ applyStyle(contentElement, containerStyle);

/** @type {Document} */
/** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument.body.appendChild(contentElement);
( /** @type {HTMLIFrameElement} */
iframeContainerElement.contentDocument).body.appendChild(contentElement);
onLoadQueue.forEach(function (onLoad) {

@@ -140,0 +140,0 @@ onLoad( /** @type {HTMLDivElement} */contentElement);

@@ -1,6 +0,6 @@

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/**

@@ -7,0 +7,0 @@ * @typedef {Object} StateDefinitions

@@ -78,3 +78,3 @@ "use strict";

!nonExistentInterfaceErrors.has(
/** @type {NodeJS.ErrnoException} */ (error).code
/** @type {NodeJS.ErrnoException} */ (error).code,
)

@@ -122,3 +122,3 @@ ) {

!portUnavailableErrors.has(
/** @type {NodeJS.ErrnoException} */ (error).code
/** @type {NodeJS.ErrnoException} */ (error).code,
)

@@ -125,0 +125,0 @@ ) {

@@ -267,191 +267,2 @@ {

},
"HTTP2": {
"type": "boolean",
"description": "Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.",
"link": "https://webpack.js.org/configuration/dev-server/#devserverhttp2",
"cli": {
"negatedDescription": "Does not serve over HTTP/2 using SPDY."
}
},
"HTTPS": {
"anyOf": [
{
"type": "boolean",
"cli": {
"negatedDescription": "Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP)."
}
},
{
"type": "object",
"additionalProperties": true,
"properties": {
"passphrase": {
"type": "string",
"description": "Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option."
},
"requestCert": {
"type": "boolean",
"description": "Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.",
"cli": {
"negatedDescription": "Does not request for an SSL certificate."
}
},
"ca": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Buffer"
}
]
}
},
{
"type": "string"
},
{
"instanceof": "Buffer"
}
],
"description": "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option."
},
"cacert": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Buffer"
}
]
}
},
{
"type": "string"
},
{
"instanceof": "Buffer"
}
],
"description": "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option."
},
"cert": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Buffer"
}
]
}
},
{
"type": "string"
},
{
"instanceof": "Buffer"
}
],
"description": "Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option."
},
"crl": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Buffer"
}
]
}
},
{
"type": "string"
},
{
"instanceof": "Buffer"
}
],
"description": "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option."
},
"key": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Buffer"
},
{
"type": "object",
"additionalProperties": true
}
]
}
},
{
"type": "string"
},
{
"instanceof": "Buffer"
}
],
"description": "Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option."
},
"pfx": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Buffer"
},
{
"type": "object",
"additionalProperties": true
}
]
}
},
{
"type": "string"
},
{
"instanceof": "Buffer"
}
],
"description": "Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option."
}
}
}
],
"description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, use the `server` option.",
"link": "https://webpack.js.org/configuration/dev-server/#devserverhttps"
},
"HeaderObject": {

@@ -560,20 +371,2 @@ "type": "object",

},
"MagicHTML": {
"type": "boolean",
"description": "Tells dev-server whether to enable magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').",
"cli": {
"negatedDescription": "Disables magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js')."
},
"link": "https://webpack.js.org/configuration/dev-server/#devservermagichtml"
},
"OnAfterSetupMiddleware": {
"instanceof": "Function",
"description": "Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. Deprecated: please use the 'setupMiddlewares' option.",
"link": "https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware"
},
"OnBeforeSetupMiddleware": {
"instanceof": "Function",
"description": "Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. Deprecated: please use the 'setupMiddlewares' option.",
"link": "https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware"
},
"OnListening": {

@@ -671,3 +464,3 @@ "instanceof": "Function",

"cli": {
"description": "Open specified browser. Deprecated: please use '--open-app-name'."
"exclude": true
}

@@ -703,20 +496,13 @@ }

"Proxy": {
"anyOf": [
{
"type": "object"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "object"
},
{
"instanceof": "Function"
}
]
"type": "array",
"items": {
"anyOf": [
{
"type": "object"
},
{
"instanceof": "Function"
}
}
],
]
},
"description": "Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain.",

@@ -814,26 +600,2 @@ "link": "https://webpack.js.org/configuration/dev-server/#devserverproxy"

},
"cacert": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Buffer"
}
]
}
},
{
"type": "string"
},
{
"instanceof": "Buffer"
}
],
"description": "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option."
},
"cert": {

@@ -1149,8 +911,8 @@ "anyOf": [

{
"$ref": "#/definitions/WebSocketServerType"
"enum": ["sockjs", "ws"],
"cli": {
"exclude": true
}
}
],
"cli": {
"description": "Deprecated: please use '--web-socket-server-type' option."
}
]
},

@@ -1188,3 +950,6 @@ "WebSocketServerFunction": {

"type": "string",
"minLength": 1
"minLength": 1,
"cli": {
"exclude": true
}
}

@@ -1221,8 +986,2 @@ },

},
"http2": {
"$ref": "#/definitions/HTTP2"
},
"https": {
"$ref": "#/definitions/HTTPS"
},
"ipc": {

@@ -1234,11 +993,2 @@ "$ref": "#/definitions/IPC"

},
"magicHtml": {
"$ref": "#/definitions/MagicHTML"
},
"onAfterSetupMiddleware": {
"$ref": "#/definitions/OnAfterSetupMiddleware"
},
"onBeforeSetupMiddleware": {
"$ref": "#/definitions/OnBeforeSetupMiddleware"
},
"onListening": {

@@ -1245,0 +995,0 @@ "$ref": "#/definitions/OnListening"

@@ -101,3 +101,3 @@ "use strict";

/** @type {import("http").Server} */ (this.server.server),
options
options,
);

@@ -117,3 +117,3 @@

this.clients.indexOf(/** @type {ClientConnection} */ (client)),
1
1,
);

@@ -120,0 +120,0 @@ });

@@ -50,3 +50,3 @@ "use strict";

});
}
},
);

@@ -61,3 +61,3 @@

this.server.logger.error(err.message);
}
},
);

@@ -79,3 +79,3 @@

client.ping(() => {});
}
},
);

@@ -101,3 +101,14 @@ }, WebsocketServer.heartbeatInterval);

});
}
// TODO: add a test case for this - https://github.com/webpack/webpack-dev-server/issues/5018
client.on(
"error",
/**
* @param {Error} err
*/
(err) => {
this.server.logger.error(err.message);
},
);
},
);

@@ -104,0 +115,0 @@

{
"name": "webpack-dev-server",
"version": "4.15.1",
"version": "5.0.0",
"description": "Serves a webpack app. Updates the browser on changes.",

@@ -24,3 +24,3 @@ "bin": "bin/webpack-dev-server.js",

"engines": {
"node": ">= 12.13.0"
"node": ">= 18.12.0"
},

@@ -36,6 +36,6 @@ "scripts": {

"commitlint": "commitlint --from=master",
"build:client": "rimraf ./client/* && babel client-src/ --out-dir client/ --ignore \"client-src/webpack.config.js\" --ignore \"client-src/modules\" && webpack --config client-src/webpack.config.js",
"build:types": "rimraf ./types/* && tsc --declaration --emitDeclarationOnly --outDir types && node ./scripts/extend-webpack-types.js && prettier \"types/**/*.ts\" --write && prettier \"types/**/*.ts\" --write",
"build:client": "rimraf -g ./client/* && babel client-src/ --out-dir client/ --ignore \"client-src/webpack.config.js\" --ignore \"client-src/modules\" && webpack --config client-src/webpack.config.js",
"build:types": "rimraf -g ./types/* && tsc --declaration --emitDeclarationOnly --outDir types && node ./scripts/extend-webpack-types.js && prettier \"types/**/*.ts\" --write && prettier \"types/**/*.ts\" --write",
"build": "npm-run-all -p \"build:**\"",
"test:only": "jest",
"test:only": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"test:coverage": "npm run test:only -- --coverage",

@@ -45,16 +45,16 @@ "test:watch": "npm run test:coverage --watch",

"pretest": "npm run lint",
"prepare": "husky install && npm run build",
"prepare": "husky && npm run build",
"release": "standard-version"
},
"dependencies": {
"@types/bonjour": "^3.5.9",
"@types/connect-history-api-fallback": "^1.3.5",
"@types/express": "^4.17.13",
"@types/serve-index": "^1.9.1",
"@types/serve-static": "^1.13.10",
"@types/sockjs": "^0.3.33",
"@types/ws": "^8.5.5",
"@types/bonjour": "^3.5.13",
"@types/connect-history-api-fallback": "^1.5.4",
"@types/express": "^4.17.21",
"@types/serve-index": "^1.9.4",
"@types/serve-static": "^1.15.5",
"@types/sockjs": "^0.3.36",
"@types/ws": "^8.5.10",
"ansi-html-community": "^0.0.8",
"bonjour-service": "^1.0.11",
"chokidar": "^3.5.3",
"bonjour-service": "^1.2.1",
"chokidar": "^3.6.0",
"colorette": "^2.0.10",

@@ -66,77 +66,74 @@ "compression": "^1.7.4",

"graceful-fs": "^4.2.6",
"html-entities": "^2.3.2",
"html-entities": "^2.4.0",
"http-proxy-middleware": "^2.0.3",
"ipaddr.js": "^2.0.1",
"launch-editor": "^2.6.0",
"open": "^8.0.9",
"p-retry": "^4.5.0",
"rimraf": "^3.0.2",
"schema-utils": "^4.0.0",
"selfsigned": "^2.1.1",
"ipaddr.js": "^2.1.0",
"launch-editor": "^2.6.1",
"open": "^10.0.3",
"p-retry": "^6.2.0",
"rimraf": "^5.0.5",
"schema-utils": "^4.2.0",
"selfsigned": "^2.4.1",
"serve-index": "^1.9.1",
"sockjs": "^0.3.24",
"spdy": "^4.0.2",
"webpack-dev-middleware": "^5.3.1",
"ws": "^8.13.0"
"webpack-dev-middleware": "^7.0.0",
"ws": "^8.16.0"
},
"devDependencies": {
"@babel/cli": "^7.17.3",
"@babel/core": "^7.20.2",
"@babel/eslint-parser": "^7.17.0",
"@babel/plugin-transform-object-assign": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.20.2",
"@babel/runtime": "^7.20.1",
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@babel/cli": "^7.22.5",
"@babel/core": "^7.22.5",
"@babel/eslint-parser": "^7.22.5",
"@babel/plugin-transform-object-assign": "^7.22.5",
"@babel/plugin-transform-runtime": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@commitlint/cli": "^18.5.0",
"@commitlint/config-conventional": "^18.5.0",
"@types/compression": "^1.7.2",
"@types/default-gateway": "^3.0.1",
"@types/node": "^18.11.9",
"@types/node": "^20.11.16",
"@types/node-forge": "^1.3.1",
"@types/rimraf": "^3.0.2",
"@types/sockjs-client": "^1.5.1",
"@types/trusted-types": "^2.0.2",
"acorn": "^8.2.4",
"babel-jest": "^28.1.3",
"babel-loader": "^8.2.4",
"acorn": "^8.9.0",
"babel-jest": "^29.5.0",
"babel-loader": "^9.1.0",
"body-parser": "^1.19.2",
"core-js": "^3.21.1",
"css-loader": "^5.2.4",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.4.0",
"core-js": "^3.31.0",
"css-loader": "^6.8.1",
"eslint": "^8.43.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-webpack": "^1.2.5",
"eslint-plugin-import": "^2.23.2",
"execa": "^5.1.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^4.5.2",
"html-webpack-plugin": "^5.5.3",
"http-proxy": "^1.18.1",
"husky": "^7.0.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"husky": "^9.0.10",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"klona": "^2.0.4",
"less": "^4.1.1",
"less-loader": "^7.3.0",
"lint-staged": "^12.3.4",
"marked": "^4.2.3",
"memfs": "^3.4.12",
"less-loader": "^12.1.0",
"lint-staged": "^15.2.0",
"marked": "^12.0.0",
"memfs": "^4.6.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.0",
"puppeteer": "^13.4.1",
"prettier": "^3.2.4",
"puppeteer": "^22.0.0",
"readable-stream": "^4.5.2",
"require-from-string": "^2.0.2",
"rimraf": "^3.0.2",
"sockjs-client": "^1.6.1",
"standard-version": "^9.3.0",
"strip-ansi-v6": "npm:strip-ansi@^6.0.0",
"style-loader": "^2.0.0",
"style-loader": "^3.3.1",
"supertest": "^6.1.3",
"tcp-port-used": "^1.0.2",
"typescript": "^4.9.3",
"url-loader": "^4.1.1",
"typescript": "^5.3.3",
"wait-for-expect": "^3.0.2",
"webpack": "^5.81.0",
"webpack-cli": "^4.7.2",
"webpack-merge": "^5.8.0"
"webpack": "^5.89.0",
"webpack-cli": "^5.0.1",
"webpack-merge": "^5.9.0"
},
"peerDependencies": {
"webpack": "^4.37.0 || ^5.0.0"
"webpack": "^5.0.0"
},

@@ -143,0 +140,0 @@ "peerDependenciesMeta": {

@@ -86,18 +86,22 @@ <div align="center">

-m, --merge Merge two or more configurations using 'webpack-merge'.
--disable-interpret Disable interpret for loading the config file.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--define-process-env-node-env <value> Sets process.env.NODE_ENV to the specified value. (Currently an alias for `--node-env`)
--analyze It invokes webpack-bundle-analyzer plugin to get bundle information.
--progress [value] Print compilation progress during build.
-j, --json [value] Prints result as JSON or store it in a file.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
--mode <value> Defines the mode to pass to webpack.
--fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
--no-devtool Negative 'devtool' option.
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
--mode <value> Enable production optimizations or development hints.
--name <value> Name of the configuration. Used when loading multiple configurations.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
--stats [value] It instructs webpack on how to treat the stats e.g. verbose.
--no-stats Disable stats output.
-t, --target <value...> Sets the build target e.g. node.
-o, --output-path <value> The output directory as **absolute path** (required).
--stats [value] Stats options object or preset name.
--no-stats Negative 'stats' option.
-t, --target <value...> Environment to build for. Environment to build for. An array of environments to build for all of them when possible.
--no-target Negative 'target' option.
--watch-options-stdin Stop watching when stdin stream has ended.
--no-watch-options-stdin Do not stop watching when stdin stream has ended.
--no-watch-options-stdin Negative 'watch-options-stdin' option.
--allowed-hosts <value...> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').

@@ -115,2 +119,4 @@ --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').

--no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings.
--client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors.
--no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors.
--client-overlay-trusted-types-policy-name <value> The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'.

@@ -136,26 +142,5 @@ --client-progress Prints compilation progress in percentage in the browser.

--no-hot Disables Hot Module Replacement.
--http2 Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.
--no-http2 Does not serve over HTTP/2 using SPDY.
--https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, use the `server` option.
--no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
--https-passphrase <value> Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option.
--https-request-cert Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.
--no-https-request-cert Does not request for an SSL certificate.
--https-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
--https-ca-reset Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
--https-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
--https-cacert-reset Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
--https-cert <value...> Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.
--https-cert-reset Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.
--https-crl <value...> Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.
--https-crl-reset Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.
--https-key <value...> Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.
--https-key-reset Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.
--https-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.
--https-pfx-reset Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.
--ipc [value] Listen to a unix socket.
--live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default).
--no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default).
--magic-html Tells dev-server whether to enable magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').
--no-magic-html Disables magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').
--open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).

@@ -165,3 +150,2 @@ --no-open Does not open the default browser.

--open-app-name <value...> Open specified browser.
--open-app <value...> Open specified browser. Deprecated: please use '--open-app-name'.
--open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).

@@ -177,4 +161,2 @@ --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser.

--server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.
--server-options-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
--server-options-cacert-reset Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.
--server-options-cert <value...> Path to an SSL certificate or content of an SSL certificate.

@@ -200,3 +182,2 @@ --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate.

--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
--no-web-socket-server Disallows to set web socket server and options.

@@ -203,0 +184,0 @@ --web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').

@@ -9,3 +9,3 @@ export = getPorts;

basePort: number,
host?: string | undefined
host?: string | undefined,
): Promise<number>;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc