Skip to content

Releases: aduh95/viz.js

Release v3.2.0

17 Oct 11:49
Compare
Choose a tag to compare
  • Bump Emscripten version to
    2.0.7.
  • Remove engine restriction to allow use of the library on Node.js v10.x
    #11.
  • Split link step to better optimize output files.
  • Enable Closure compiler to produce smaller dist files.

Release v3.1.0

31 Jul 13:03
Compare
Choose a tag to compare
  • Auto-init WASM in render.browser.js
    (#9)
  • Bump Emscripten version to
    1.40.0.

Release v3.0.2

09 Jul 18:05
Compare
Choose a tag to compare
  • Update Graphviz to
    1.44.1.
  • Bump Emscripten version to
    1.39.19.
  • Upgrade test tools (Deno, Mocha, Puppeteer).

Release v3.0.1

09 Jun 14:35
Compare
Choose a tag to compare

Fix issue with Webpack v4.

Release v3.0.0

27 May 19:23
Compare
Choose a tag to compare
Notable changes
  • The library is now compiled to WASM, which shrinks the file size (Viz.js
    (2.1.2 full version) brotlified: 409K; @aduh95/viz.js (3.0.0-beta.7 browser
    version) brotlified: 337K; 18% decrease), should improve performances and
    allows dynamic memory growth.
  • The JS code is now transpiled from TypeScript, and typings are packed within
    the npm package. You can find the API documentation there!
  • The library is able to reset its internal error state, which makes the
    v2 wiki caveat
    unnecessary.
  • Rendering from main thread is no longer supported on the default async API,
    you must use a worker (webworker or worker_thread).
  • There is a synchronous version available for legacy Node.js support.
Breaking changes and deprecations
  • BREAKING: Bump required version of Node.js to v12.17.0+. Older Node.js
    version may support the synchronous API.
  • BREAKING: Remove Viz.prototype.renderSVGElement. You can use
    renderString and DOMParser to achieve the same result.
  • BREAKING: Remove Viz.prototype.renderImageElement. You can use
    renderString and Canvas to achieve the same result.
  • BREAKING: Remove Module and render from Viz constructor's options
    (you must now specify either worker or workerURL).
  • BREAKING: Remove lite version, Viz.js now comes in only one variant.
  • BREAKING: The full.render.js script is replaced by the render.node.mjs
    and render.browser.js modules.
  • BREAKING: The render.node.js module (that replaces full.render.js)
    exports a worker_thread factory when imported from the main thread. It's
    available through @aduh95/viz.js/worker specifier on Node.js and bundle
    tools that support package.json#exports.
  • BREAKING: The render.browser.js module (that replaces full.render.js)
    exports a function which takes a Module object as parameter. You should use it
    to give the path to render.wasm the Emscripten script. You should not import
    this module from the main thread. On bundle tools that support
    package.json#exports, you can use the specifier @aduh95/viz.js/worker.
  • BREAKING: Compiles to WebAssembly, which cannot be bundled in the
    render.js file like asm.js used to. Depending on your bundling tool, you may
    need some extra config to make everything work. You might also use the
    synchronous API, which bundles the asm.js code, although its usage should be
    strictly limited to Node.js or webworker use.
  • BREAKING: Remove ES5 dist files, all modern browsers now support ES2015
    modules. If you want to support an older browser, you would need to transpile
    it yourself or use an older version.
  • BREAKING: On Node.js, require('@aduh95/viz.js') returns now a
    Promise<Viz>.
  • DEPRECATED: require('@aduh95/viz.js') is deprecated, use
    import('@aduh95/viz.js') instead.
Added features
  • Add support for Node.js worker_threads.
  • Refactor JS files to TypeScript.
  • Refactor viz.c to C++ to use
    Emscripten's Embind.
  • Use ALLOW_MEMORY_GROW compiler option to avoid failing on large graphs.
  • Improve error handling:
    • Rejects with the full error string from Graphviz.
    • Remove the need of creating new instances when render fails by resetting
      internal error state.
  • Switch to Mocha and Puppeteer for browser testing.
  • Add synchronous API using asm.js (@aduh95/viz.js/sync).
  • Add a helper module for asynchronous API (@aduh95/viz.js/async).
  • Upgrade deps:
    • Upgrade Emscripten to 1.39.16
    • Upgrade Graphviz to 2.44.0
    • Upgrade Expat to 2.2.9
    • Upgrade Rollup to 2.x
  • Change test chain:
    • Upgrade Mocha to 7.x
    • Use Puppeteer instead of Selenium