- Upgrade Emscripten version to 3.1.36.
- Upgrade Graphviz version to 8.0.3.
- Bump Expat version to 3.5.0.
- Upgrade Emscripten version to 3.1.15.
- Upgrade Graphviz version to 5.0.0.
- Fix types for
@aduh95/viz.js/worker
.
- Upgrade Emscripten version to 3.1.10.
- Bump Expat version to 2.4.8.
- Upgrade Graphviz version to 3.0.0.
- Bump Emscripten version to 2.0.25.
- Bump Expat version to 2.4.1.
- Bump Graphviz version to 2.47.3.
- Improve stack traces for error thrown from within workers.
- Bump Graphviz version to 2.47.0.
- Improve interoperability with web bundlers (#19).
- Fix
TextDecoder is not defined
in@aduh95/viz.js/sync
on older version of Node.js.
- Bump Emscripten version to 2.0.8.
- Closure compiler is now disabled when building
render_sync.js
(#14).
- 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.
- Update Graphviz to 1.44.1.
- Bump Emscripten version to 1.39.19.
- Upgrade test tools (Deno, Mocha, Puppeteer).
Fix issue with Webpack v4.
- 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: 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 userenderString
andDOMParser
to achieve the same result. - BREAKING: Remove
Viz.prototype.renderImageElement
. You can userenderString
andCanvas
to achieve the same result. - BREAKING: Remove
Module
andrender
fromViz
constructor's options (you must now specify eitherworker
orworkerURL
). - BREAKING: Remove lite version, Viz.js now comes in only one variant.
- BREAKING: The
full.render.js
script is replaced by therender.node.mjs
andrender.browser.js
modules. - BREAKING: The
render.node.js
module (that replacesfull.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 supportpackage.json
#exports
. - BREAKING: The
render.browser.js
module (that replacesfull.render.js
) exports a function which takes a Module object as parameter. You should use it to give the path torender.wasm
the Emscripten script. You should not import this module from the main thread. On bundle tools that supportpackage.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 aPromise<Viz>
. - DEPRECATED:
require('@aduh95/viz.js')
is deprecated, useimport('@aduh95/viz.js')
instead.
- 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
- Fix redeclared variable (#160)
- Fix redeclared variable (#160)
- Add support for -n (Nop) option (#151)
- Specify --libdir option (#153)
- Correctly forward errors not derived from Error (#145)
- Viz.js now has first-class support for Web Workers, and returns Promises for all rendering functions, rather than accepting callbacks for some of its utility functions. However, you don't have to use Web Workers: Viz.js still works with just script tags.
- API and rendering code have been split into separate files to make it easier to work with Viz.js in bundlers.
- New output types: JSON objects and SVG elements. For example, the renderSVGElement function returns the promise of an SVGSVGElement object, ready to insert into the document.
- The single Viz() function is now a class and reuses its Emscripten module instance, improving performance across multiple calls.
- The API code is now built with Rollup, and the release includes an ES6 module.
- Added yInvert option. (Equivalent to the -y command-line option.)
- TypeScript declarations have been removed in this release.
- Use ".render.js" suffix instead of ".js.opaque".
- Accept a Worker instance for the worker option instead of a string. Add workerURL option for passing the URL of a worker as a string. Less specific detection of worker scope.
- Make sure the Emscripten module isn't exported when Viz.js is loaded in an AMD environment. (#130)
- Remove TypeScript declarations.
- Build with Rollup.
- Include ES6 module in npm release.
- Fix TypeScript declarations.
- Free layout and graph when we're done with them. Reuse the Emscripten module instance.
- Export the Module and render functions from rendering script files.
- Use ".js.opaque" rendering script files instead of ".module".
- Don't wait for onload to resolve image elements.
- New 2.0 API. Viz is now a class, and has separate render functions that return promises. The code generated by Emscripten is now distributed as separate files, which can be loaded as web workers.
- Add yInvert option. (#118)
- Fix lite in IE.
- Update Emscripten version.
- Add Travis CI configuration for testing and release
- Reorganize browser tests
- Move API docs to wiki
- Update Expat to 2.2.5
- Build with Emscripten 1.37.33
- Add TypeScript declaration file and tests
- Add tests for TypeScript declaration file.
- Update TypeScript declaration file.
- Add Travis CI configuration for testing and release
- Reorganize browser tests
- Move API docs to wiki
- Update Expat to 2.2.5
- Add Typescript support
- Include viz-lite.js in NPM release. (998039a, #88)
- Use the -Oz optimization option. (0a7096f)
- Set NO_DYNAMIC_EXECUTION, which removes uses of eval. (e2d9ac6, #75)
- Add version numbers for Graphviz, Expat, and Emscripten to the top of builds. (83740b6, 1d87fe4)
- Add "browser" property to package.json. (1f12dfe, #83)
- Add "files" and "images" options. (4437a03, 5e0a451)
- Ensure that non-ASCII characters are handled correctly when using the png-image-element format or the svgXmlToPng functions.
- Improve error reporting in svgXmlToPngImageElement.
- Don't allow memory growth. See #74.
- Accept the
totalMemory
option, which sets TOTAL_MEMORY when initializing the Module. See #74.
- Update to Graphviz 2.40.1
- Make sure UTF8ToString is included in EXPORTED_RUNTIME_METHODS and include a test for characters outside of basic ASCII. This addresses #71.
- Ensure that we return after invoking the callback with an error in svgXmlToPngImageElement.
- Introduced viz-lite.js, a smaller build that omits Expat and the NEATO layout plugin for a savings of about 700 KB over the regular version. b8370ad
- Changed build settings to ensure that the -Os optimization setting is used for Graphviz and Expat as well as Viz.js. This results in a smaller build for both the regular and lite versions. 416776e
- A new Module instance is now created for every call of the Viz JavaScript function. This avoids errors that could occur when freeing memory from the Viz.js C code and when Graphviz would encounter a syntax error. See issues #65 and #59. 2257a40
- Memory growth is now allowed. b1df4a9
- Introduce Viz.svgXmlToPngBase64 and add a callback API for Viz.svgXmlToPngImageElement. 1b317da
- Correct license in package.json.
- Expand pre.js to include more information about the software distributed as part of Viz.js.
- Added "scale" option for use with the "png-image-element" format. Previously, window.devicePixelRatio or 1 would be used for this value, which is still the default if no scale factor is specified.
- Optional support for the "png-image-element" format in IE 10 and 11. Viz.js will check for Fabric.js, and if present, use its SVG parser. This works around a CORS issue with data URIs in these browsers.
- Fixes for building with the latest emscripten SDK.
- More tests, and added support for cross-browser testing with Sauce Labs.
- Switch to MIT license.
- Add Viz.svgXmlToPngImageElement and "png-image-element" format.
- Fix that a previous error would cause an exception to be thrown on valid input.
- Add node export and use this.namespace-style global
- Fixed that line numbers for errors were reported incorrectly, and that some kinds of syntax errors were not reported
- Viz.js will now throw exceptions on syntax errors rather than logging to the console
Includes recent fixes from vmarkovtsev.
Add support for layout engines other than dot via a third parameter, update to Graphviz 2.36, other fixes.
Thanks to vmarkovtsev.
Rather than checking the viz.js file into the repository, it can now be found here, released as a 'binary'.