@rspack/dev-middleware 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/dev-middleware",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "A development middleware for Rspack",
5
5
  "keywords": [
6
6
  "rspack",
@@ -33,32 +33,32 @@
33
33
  "bump": "npx bumpp"
34
34
  },
35
35
  "devDependencies": {
36
- "@hapi/hapi": "^21.3.7",
37
- "@hono/node-server": "^1.12.0",
38
- "@rslib/core": "^0.20.0",
39
- "@rslint/core": "^0.3.3",
40
- "@rspack/core": "2.0.0-beta.5",
41
- "@rstest/core": "0.9.2",
42
- "@types/express": "^5.0.2",
36
+ "@hapi/hapi": "^21.4.8",
37
+ "@hono/node-server": "^1.19.14",
38
+ "@rslib/core": "^0.21.1",
39
+ "@rslint/core": "^0.4.2",
40
+ "@rspack/core": "2.0.0-rc.2",
41
+ "@rstest/core": "0.9.7",
42
+ "@types/express": "^5.0.6",
43
43
  "@types/node": "^22.3.0",
44
- "@types/on-finished": "^2.3.4",
44
+ "@types/on-finished": "^2.3.5",
45
45
  "@types/range-parser": "^1.2.7",
46
- "connect-next": "^4.0.0",
47
- "cspell": "^9.6.2",
48
- "deepmerge": "^4.2.2",
49
- "execa": "^5.1.1",
50
- "express": "^5.1.0",
51
- "finalhandler": "^2.1.0",
46
+ "connect-next": "^4.0.1",
47
+ "cspell": "^10.0.0",
48
+ "deepmerge": "^4.3.1",
49
+ "execa": "^9.6.1",
50
+ "express": "^5.2.1",
51
+ "finalhandler": "^2.1.1",
52
52
  "hono": "^4.4.13",
53
- "koa": "^3.0.0",
54
- "memfs": "^4.43.1",
53
+ "koa": "^3.2.0",
54
+ "memfs": "^4.57.1",
55
55
  "mrmime": "^2.0.1",
56
56
  "npm-run-all": "^4.1.5",
57
57
  "on-finished": "^2.4.1",
58
- "prettier": "^3.6.0",
58
+ "prettier": "^3.8.3",
59
59
  "range-parser": "^1.2.1",
60
60
  "router": "^2.2.0",
61
- "supertest": "^7.0.0",
61
+ "supertest": "^7.2.2",
62
62
  "typescript": "^6.0.2"
63
63
  },
64
64
  "peerDependencies": {
package/types/index.d.ts CHANGED
@@ -95,7 +95,7 @@
95
95
  * @property {"weak" | "strong"=} etag options to generate etag header
96
96
  * @property {boolean=} lastModified options to generate last modified header
97
97
  * @property {(boolean | number | string | { maxAge?: number, immutable?: boolean })=} cacheControl options to generate cache headers
98
- * @property {boolean=} cacheImmutable enable immutable cache headers for immutable assets (defaults to true when omitted)
98
+ * @property {boolean=} cacheImmutable enable immutable cache headers for immutable assets (defaults to false when omitted)
99
99
  */
100
100
  /**
101
101
  * @template {IncomingMessage} [RequestInternal=IncomingMessage]
@@ -363,7 +363,7 @@ export type Options<
363
363
  )
364
364
  | undefined;
365
365
  /**
366
- * enable immutable cache headers for immutable assets (defaults to true when omitted)
366
+ * enable immutable cache headers for immutable assets (defaults to false when omitted)
367
367
  */
368
368
  cacheImmutable?: boolean | undefined;
369
369
  };
@@ -1,16 +1,16 @@
1
1
  export default getPaths;
2
2
  export type Compiler = import("@rspack/core").Compiler;
3
+ export type Compilation = import("@rspack/core").Compilation;
3
4
  export type Stats = import("@rspack/core").Stats;
4
5
  export type MultiStats = import("@rspack/core").MultiStats;
5
- export type Asset = import("@rspack/core").Asset;
6
6
  export type DevServerOption = import("../index.js").DevServerOption;
7
7
  export type IncomingMessage = import("../index.js").IncomingMessage;
8
8
  export type OutputFileSystem = import("../index.js").OutputFileSystem;
9
9
  export type ServerResponse = import("../index.js").ServerResponse;
10
10
  /** @typedef {import("@rspack/core").Compiler} Compiler */
11
+ /** @typedef {import("@rspack/core").Compilation} Compilation */
11
12
  /** @typedef {import("@rspack/core").Stats} Stats */
12
13
  /** @typedef {import("@rspack/core").MultiStats} MultiStats */
13
- /** @typedef {import("@rspack/core").Asset} Asset */
14
14
  /** @typedef {import("../index.js").DevServerOption} DevServerOption */
15
15
  /** @typedef {import("../index.js").IncomingMessage} IncomingMessage */
16
16
  /** @typedef {import("../index.js").OutputFileSystem} OutputFileSystem */
@@ -19,7 +19,7 @@ export type ServerResponse = import("../index.js").ServerResponse;
19
19
  * @template {IncomingMessage} Request
20
20
  * @template {ServerResponse} Response
21
21
  * @param {import("../index.js").FilledContext<Request, Response>} context context
22
- * @returns {{ outputPath: string, outputFileSystem: OutputFileSystem, publicPath: string, assetsInfo: Map<string, Asset["info"]> | undefined }[]} paths
22
+ * @returns {{ compilation: Compilation, outputPath: string, outputFileSystem: OutputFileSystem, publicPath: string }[]} paths
23
23
  */
24
24
  declare function getPaths<
25
25
  Request extends IncomingMessage,
@@ -27,8 +27,8 @@ declare function getPaths<
27
27
  >(
28
28
  context: import("../index.js").FilledContext<Request, Response>,
29
29
  ): {
30
+ compilation: Compilation;
30
31
  outputPath: string;
31
32
  outputFileSystem: OutputFileSystem;
32
33
  publicPath: string;
33
- assetsInfo: Map<string, Asset["info"]> | undefined;
34
34
  }[];
@@ -1,29 +0,0 @@
1
- var __webpack_modules__ = {};
2
- var __webpack_module_cache__ = {};
3
- function __webpack_require__(moduleId) {
4
- var cachedModule = __webpack_module_cache__[moduleId];
5
- if (void 0 !== cachedModule) return cachedModule.exports;
6
- var module = __webpack_module_cache__[moduleId] = {
7
- exports: {}
8
- };
9
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
10
- return module.exports;
11
- }
12
- __webpack_require__.m = __webpack_modules__;
13
- (()=>{
14
- __webpack_require__.d = (exports, definition)=>{
15
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
16
- enumerable: true,
17
- get: definition[key]
18
- });
19
- };
20
- })();
21
- (()=>{
22
- __webpack_require__.add = function(modules) {
23
- Object.assign(__webpack_require__.m, modules);
24
- };
25
- })();
26
- (()=>{
27
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
28
- })();
29
- export { __webpack_require__ };