Skip to content

v0.5.3 - bundle for the browser without shims

Choose a tag to compare

@datamoc datamoc released this 11 Oct 08:00
· 40 commits to master since this release

Fixes bundling for the browser. luaconf.js called require('os').platform() whenever process existed, and a bundler's process shim also made ldblib.js crash at load on an empty readline-sync stub, so consumers had to write a local shim.

  • Node detection goes through one module, src/isnode.js (process.versions.node), instead of typeof process in 13 places; os.platform() became process.platform.
  • package.json has a browser field mapping fs, os, path, tmp, child_process and readline-sync to empty modules, so webpack, esbuild, Vite and Browserify bundle the package without shims or resolve.fallback.
  • test/browser-compat.test.js fails if the library requires a Node-only module on the browser path.

See CHANGES.md for details.