Skip to content

v5.0.0

Compare
Choose a tag to compare
@75lb 75lb released this 06 Jul 11:21
· 27 commits to master since this release

This is a refresher release - there are no functional or behavioural changes to the web server itself.

Breaking changes since v4.2.1

  • Dropped support for Node.js < v14
  • Dropped support for CommonJS in general
  • Dropped support for plugin prefixes
    • Previously, you could omit the lws- in plugin names, (i.e. you could use --stack static instead of --stack lws-static). This was ambigious and introduced the risk of incorrectly loading a module named static, if it existed.
  • Several of the API methods have changed from sync to async, most importantly the Lws.create method. You now need to await the result.
    const lws = await Lws.create()
    

New feature

  • The default config file lws.config.js may now also be named lws.config.mjs or lws.config.cjs if preferred.

Other improvements

  • All source code converted from CommonJS to ECMAScript modules.
  • All dependencies upgraded.

Upgrade notes

  • If you previously used shortened plugin names (e.g. --stack static) please use the full name (e.g. --stack lws-static)
  • If you launch a server using Lws.create you must now await the result.
  • Lws can now only be used programmatically from ECMAScript modules - you must use import to load the library.