Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aduh95/viz.js

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aduh95/viz.js - npm Package Compare versions

Comparing version 3.3.2 to 3.3.3

dist/render_async.cjs

2

async/index.js

@@ -1,1 +0,1 @@

module.exports=require('../dist/render_async.js')
module.exports=require('../dist/render_async.cjs')
# Changelog
### @aduh95/Viz.js v3.3.3 (2021-02-22)
- Improve interoperability with web bundlers
([#19](https://github.com/aduh95/viz.js/pull/19)).
### @aduh95/Viz.js v3.3.2 (2021-02-17)

@@ -4,0 +9,0 @@

/**
* Viz.js 3.3.2 (Graphviz 2.46.0, Expat 2.2.10, Emscripten 2.0.14)
* Viz.js 3.3.3 (Graphviz 2.46.0, Expat 2.2.10, Emscripten 2.0.14)
* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT licensed

@@ -4,0 +4,0 @@ *

{
"name": "@aduh95/viz.js",
"version": "3.3.2",
"version": "3.3.3",
"description": "A hack to put Graphviz on the web.",

@@ -14,11 +14,11 @@ "main": "./dist/index.cjs",

},
"./async": "./dist/render_async.js",
"./sync": "./dist/render_sync.js",
"./async": "./dist/render_async.cjs",
"./sync": "./dist/render_sync.cjs",
"./wasm": "./dist/render.wasm",
"./worker": {
"import": "./dist/render.node.mjs",
"browser": "./dist/render.browser.js"
"node": "./dist/render.node.mjs",
"default": "./dist/render.browser.js"
}
},
"type": "commonjs",
"type": "module",
"repository": {

@@ -40,5 +40,5 @@ "type": "git",

"dist/render.wasm",
"dist/render_async.js",
"dist/render_async.cjs",
"dist/render_async.d.ts",
"dist/render_sync.js",
"dist/render_sync.cjs",
"dist/render_sync.d.ts",

@@ -66,3 +66,3 @@ "async/index.js",

"eslint": "^7.0.0",
"eslint-config-prettier": "^7.2.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-prettier": "^3.1.3",

@@ -69,0 +69,0 @@ "mocha": "^8.0.1",

@@ -115,6 +115,12 @@ # Viz.js

import wasmURL from "file-loader!@aduh95/viz.js/wasm";
// You need to configure your bundler to treat `.wasm` file as file to return a URL.
import wasmURL from "@aduh95/viz.js/wasm";
// With Rollup, use the `@rollup/plugin-url` plugin and add `**/*.wasm` to the
// `include` list in the plugin config.
// With Webpack, use the `file-loader` plugin: "file-loader!@aduh95/viz.js/wasm"
// If you are not using a bundler that supports package.json#exports
// Or doesn't have a file-loader plugin to get URL of the asset,
// use "./node_modules/@aduh95/viz.js/dist/render.wasm" instead.
// or doesn't have a file-loader plugin to get URL of the asset:
// const wasmURL =
// new URL("./node_modules/@aduh95/viz.js/dist/render.wasm", import.meta.url);

@@ -133,6 +139,8 @@ initWASM({

import Viz from "@aduh95/viz.js";
// If you are not using a bundler that supports package.json#exports
// use "./node_modules/@aduh95/viz.js/dist/index.mjs" instead.
// If you are not using a bundler that supports package.json#exports:
// import Viz from "./node_modules/@aduh95/viz.js/dist/index.mjs";
import VizWorker from "worker-loader!./worker.js";
// If you are using Rollup, use `@surma/rollup-plugin-off-main-thread` plugin.
// If you are using Webpack, use the `worker-loader` plugin and add this import:
// import VizWorker from "worker-loader!./worker.js";

@@ -142,3 +150,10 @@ let viz;

if (viz === undefined) {
viz = new Viz({ worker: new VizWorker() });
// No-bundler / auto-bundling version:
viz = new Viz({
worker: new Worker(new URL("./worker.js", import.meta.url), {
type: "module",
}),
});
// or if you are using Webpack:
// viz = new Viz({ worker: new VizWorker() });
}

@@ -145,0 +160,0 @@ return viz.renderString(dot, options);

@@ -1,1 +0,1 @@

module.exports=require('../dist/render_sync.js')
module.exports=require('../dist/render_sync.cjs')

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc