Skip to content

Latest commit

 

History

History
474 lines (260 loc) · 29.6 KB

CHANGELOG.md

File metadata and controls

474 lines (260 loc) · 29.6 KB

Changelog

8.3.0

Minor Changes

  • Added a hot option that enables hot module replacement, replacing the need for webpack-hot-middleware. Pass hot: true to enable with defaults, or hot: { path, heartbeat, progress, statsOptions } to customize. The client runtime is served by the middleware itself. (by @bjohansebas in #2370)

  • Take the diagnostics a hot payload carries from the stats option, so one setting governs what a build reports in the terminal and in the browser: stats: "errors-only" keeps warnings out of both, and stats: false keeps errors and warnings out of both, the client's error overlay included — reach for the client's ?logging= or ?overlay= to quiet the browser alone. hot.statsOptions is deprecated and will be removed in the next major release; its hash, timings and children keys are now ignored, because they could leave a payload without the hash the client compares, or carry a child compilation's hash instead, which stopped updates applying and forced a full page reload on every rebuild. (by @alexander-akait in #2392)

Patch Changes

  • Fixed a crash when calling invalidate() in plugin mode (isPlugin = true). Since the host (webpack-cli, webpack-dev-server, etc.) owns compiler.watch(), the middleware now invalidates the host's watching instead (each child compiler's one for a MultiCompiler on webpack < 5.109). When nothing is watching it logs a warning and completes the callback, as close() does, rather than leaving invalidate(callback) waiting on a build that never runs. (by @bjohansebas in #2378)

  • Reject with 403 Forbidden the requests whose resolved filename falls outside outputPath (GHSA-g84c-rxfj-3j2c). With a publicPath without a trailing slash, a sibling path sharing its prefix (/assets../secret) escaped the output root once the prefix was stripped and joined. (by @bjohansebas in #2404)

  • Update the changelog generator to the @changesets/get-github-info 1.0 API. (by @alexander-akait in #2396)

  • Update dependencies. (by @alexander-akait in #2394)

8.2.0

Minor Changes

  • Added a hot option that enables hot module replacement, replacing the need for webpack-hot-middleware. Pass hot: true to enable with defaults, or hot: { path, heartbeat, progress, statsOptions } to customize. The client runtime ships with the package and is added as a webpack entry. (by @bjohansebas in #2322)

8.1.1

Patch Changes

  • Fixed a crash when calling close() in plugin mode (isPlugin = true). Since the host (webpack-cli, webpack-dev-server, etc.) owns compiler.watch(), the middleware has no watching of its own to close, so close() now just calls the callback instead of throwing. (by @bjohansebas in #2347)

8.1.0

Minor Changes

  • Reuse an already active MultiCompiler watching session instead of starting a duplicate one (requires webpack >= 5.109). (by @bjohansebas in #2371)

8.0.4

Patch Changes

  • Replace the on-finished dependency with Node.js built-in stream.finished. (by @bjohansebas in #2346)

8.0.3

Patch Changes

  • Respect req.url when modified by middleware such as connect-history-api-fallback. (by @bjohansebas in #2304)

8.0.2

Patch Changes

8.0.1

Patch Changes

8.0.0

Major Changes

  • The getFilenameFromUrl function is now asynchronous, returning a Promise that resolves to the object with the found filename (or undefined if the file was not found) or throws an error if the URL cannot be processed. Additionally, the object contains the extra property with stats (file system stats) and outputFileSystem (output file system where file was found) properties. (by @alexander-akait in #2284)

  • Minimum supported Node.js version is 20.9.0. (by @alexander-akait in #2284)

  • Minimum supported webpack version is 5.101.0. (by @alexander-akait in #2284)

Minor Changes

  • Added support for plugin usage, useful when the middleware will be used as a webpack plugin (no stats output, no extra actions). (by @alexander-akait in #2284)

  • Added the forwardError option to enable error forwarding to next middleware. (by @alexander-akait in #2284)

  • Enable cacheImmutable by default for immutable assets. (by @alexander-akait in #2284)

Patch Changes

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

7.4.5 (2025-09-24)

Bug Fixes

7.4.4 (2025-09-23)

Bug Fixes

7.4.3 (2025-09-05)

Bug Fixes

  • do not call the next middleware for 304 responses (#2155) (c26a326)
  • do not call the next middleware when request is finished or errored (#2156) (116c680)

7.4.2 (2024-08-21)

Bug Fixes

7.4.1 (2024-08-20)

Bug Fixes

7.4.0 (2024-08-15)

Features

  • added the cacheImmutable option to cache immutable assets (assets with a hash in file name like image.e12ab567.jpg) (5ed629d)
  • allow to configure the Cache-Control header (#1923) (f7529c3)

Bug Fixes

  • support devServer: false (b443f4d)

7.3.0 (2024-07-18)

Features

7.2.1 (2024-04-02)

Bug Fixes

  • avoid extra log

7.2.0 (2024-03-29)

Features

7.1.1 (2024-03-21)

Bug Fixes

7.1.0 (2024-03-19)

Features

  • prefer to use fs.createReadStream over fs.readFileSync to read files (ab533de)

Bug Fixes

7.0.0 (2023-12-26)

⚠ BREAKING CHANGES

  • minimum supported Node.js version is 18.12.0 (#1694)
  • updated memfs@4 (#1693)

Features

6.1.1 (2023-05-16)

Bug Fixes

6.1.0 (2023-05-03)

Features

Bug Fixes

6.0.2 (2023-03-19)

Bug Fixes

6.0.1 (2022-11-28)

Bug Fixes

  • update schema for index and methods properties (#1397) (cda328e)

6.0.0 (2022-11-20)

⚠ BREAKING CHANGES

  • minimum supported webpack version is 5.0.0
  • minimum supported Nodejs version is 14.15.0

5.3.3 (2022-05-18)

Bug Fixes

5.3.2 (2022-05-17)

Bug Fixes

5.3.1 (2022-02-01)

Bug Fixes

5.3.0 (2021-12-16)

Features

5.2.2 (2021-11-17)

Chore

  • update schema-utils package to 4.0.0 version

5.2.1 (2021-09-25)

  • internal release, no visible changes and features

5.2.0 (2021-09-24)

Features

5.1.0 (2021-09-09)

Features

  • don't read full file if Range header is present (e8b21f0)
  • output more information on errors (#1024) (7df9e44)

Bug Fixes

  • reduced package size by removing mem package (#1027) (0d55268)

5.0.0 (2021-06-02)

⚠ BREAKING CHANGES

  • minimum supported Node.js version is 12.13.0 (#928) (4cffeff)

4.3.0 (2021-05-19)

Features

Bug Fixes

4.2.0 (2021-05-10)

Features

  • allow the headers option to accept function (#897) (966afb3)

4.1.0 (2021-01-15)

Features

4.0.4 (2021-01-13)

Bug Fixes

4.0.3 (2021-01-12)

Bug Fixes

  • output stats to stdout instead stderr, how does webpack-cli, if you need hide stats from output please use { stats: false } or { stats: 'none' } (4de0f97)
  • colors are working for stats (4de0f97)
  • schema description (#783) (f9ce2b2)
  • skip Content-type header on unknown types (#809) (5c9eee5)

4.0.2 (2020-11-10)

Bug Fixes

  • compatibility with the headers option (#763) (7c4cac5)

4.0.1 (2020-11-09)

Bug Fixes

  • compatibility with connect (b83a1db)

4.0.0 (2020-10-28)

⚠ BREAKING CHANGES

  • export in CommonJS format

Bug Fixes

  • compatibility with new webpack@5 API (#737) (f6054a0)
  • handle the auto value of the publicPath option (9b4c5ec)
  • support webpack@5 (#702) (9ccc327)

4.0.0-rc.3 (2020-07-14)

  • internal improvements

4.0.0-rc.2 (2020-06-30)

Bug Fixes

  • prefer mime type option over built-in (#670) (7fa2c15)

4.0.0-rc.1 (2020-02-20)

Bug Fixes

4.0.0-rc.0 (2020-02-19)

Bug Fixes

  • respect output.path and output.publicPath options from the configuration
  • respect the stats option from the configuration
  • respect the watchOptions option from the configuration
  • the writeToDisk option now correctly works in multi-compiler mode
  • the outputFileSystem option now correctly works in multi-compiler mode
  • respect [hash]/[fullhash] in output.path and output.publicPath
  • handle exceptions for filesystem operations
  • the Content-Type header doesn't have charset=utf-8 value for custom MIME types and MIME types which can be non utf-8

Features

  • validate options
  • migrate on the webpack logger
  • migrate on the memfs package
  • improve performance

BREAKING CHANGES

  • minimum supported Node.js version is 10.13.0
  • the default value of the option publicPath is taken from the value of the output.publicPath option from the configuration (webpack.config.js)
  • the stats option was removed, the default value of the stats option is taken from the value of the stats option from the configuration (webpack.config.js)
  • the watchOptions was removed, the default value of the watchOptions option is taken from the value of the watchOptions option from the configuration (webpack.config.js)
  • the Content-Type header doesn't have charset=utf-8 value for custom MIME types and MIME types which can be non utf-8
  • the fs option was renamed to the outputFileSystem option
  • the lazy option was removed without replacement
  • the logger, logLevel and logTime options were removed without replacement. You can setup the level value using { infrastructureLogging: { level: 'warn' } }, please read https://webpack.js.org/configuration/other-options/#infrastructurelogging. You can use the infrastructurelog (infrastructureLog in webpack@5) hook to customize logs. The log property in the middleware context was renamed to logger
  • the mimeTypes option first requires you to specify an extension and then a content-type - { mimeTypes: { phtml: 'text/html' } }
  • the force option from the mimeTypes option was removed without replacement
  • the reporter option was removed without replacement
  • the getFilenameFromUrl method was removed from the API
  • the middleware locals now under res.locals.webpack - use res.locals.webpack.stats for access stats and res.locals.webpack.outputFileSystem to access outputFileSystem

3.7.2 (2019-09-28)

Bug Fixes

3.7.1 (2019-09-03)

Bug Fixes

  • directly used mkdirp instead of through Webpack (#436) (dff39a1)
  • displayStats only logged (#427) (98deaf4)
  • the writeToFile option has compatibility with webpack@5 (#459) (5c90e1e)

3.7.0 (2019-05-15)

Features

3.6.2 (2019-04-03)

Bug Fixes

  • check existence of res.getHeader and set the correct Content-Type (#385) (56dc705)

3.6.1 (2019-03-06)

Bug Fixes

  • do not overwrite Content-Type if header already exists (#377) (b2a6fed)

3.5.2 (2019-02-06)

Bug Fixes

3.5.1 (2019-01-17)

Bug Fixes

  • remove querystring from filenames when writing to disk (#361) (90d0d94)

3.5.0 (2019-01-04)

Bug Fixes

  • middleware: do not add 'null' to Content-Type (#355) (cf4d7a9)

Features

  • allow to redefine mimeTypes (possible to use force option) (#349) (e56a181)

3.3.0 (2018-09-10)

Features

  • middleware: expose the memory filesystem (response.locals.fs) (#337) (f9a138e)

3.2.0 (2018-08-23)

Bug Fixes

  • package: 18 security vulnerabilities (#329) (5951de9)

Features

  • middleware: add methods option (options.methods) (#319) (fe6bb86)