
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A JavaScript Graph Drawing Library Emscripts the C++ Library [OGDF](https://ogdf.uos.de/)
A JavaScript Graph Drawing Library Emscripts the C++ Library OGDF.
The project is forked from Basasuya/ogdf.js. The idea of this project is to compile the C++ library OGDF into a JavaScript library. The former stands both for Open Graph Drawing Framework (the original name) and Open Graph algorithms and Data structures Framework.
We now aim to use emscripten to compile the Layout part of OGDF into ogdf.js.
Some layout algorithms are supported now:
Examples can be found in ./examples. We use NetV.js to render the graph.
// layouts can be called like:
const Layout = ogdf.layouts.energebased.fm3
const fm3 = new Layout()
fm3.graph(/* graph data */ { nodes: facebook.nodes, links: facebook.links })
fm3.parameters(/* parameters */ { qualityVersusSpeed: "GorgeousAndEfficient" })
fm3.run().then(graph => {
// ...
})
// or using import/export
import * as ogdf from 'ogdfjs'
We suggest you to build ogdf.js with Linux or MacOS (we still have no experience with Windows OS to build the ogdf library, for Windows developers, WSL is suggested). Before building the ogdf.js, you should make sure you have enviroments to build C++ library:
NOTE*: for Windows users, please use WSL to perform step 1~3.
Download and install Emscripten. Here is several main steps, and please refer to the official document for more details:
# Get the emsdk repo
$ cd ..
$ git clone https://github.com/emscripten-core/emsdk.git
# Enter that directory
$ cd emsdk
# Fetch the latest version of the emsdk (not needed the first time you clone)
$ git pull
# Download and install the latest SDK tools.
$ ./emsdk install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
$ ./emsdk activate latest
# Activate PATH and other environment variables in the current terminal
$ source ./emsdk_env.sh
To ensure that you have install Emscripten successfully, you can create a folder with a file:
$ mkdir hello
$ cd hello
$ echo '#include <stdio.h>' > hello.c
$ echo 'int main(int argc, char ** argv) {' >> hello.c
$ echo 'printf("Hello, world!\n");' >> hello.c
$ echo '}' >> hello.c
$ emcc hello.c -s WASM=1 -o hello.html
$ python -m SimpleHTTPServer 1111 # for python2
$ python -m http.server 1111 # for python3
# open your browser, and open http://localhost:1111/hello.html
Then you can start a localhost server to view the html.
Build ogdf library.
# cd to ~/packages/ogdf.js
$ cd ../../ogdf.js
$ cd packages/ogdf.js/ogdf
$ mkdir build && cd build
$ emcmake cmake ..
$ emmake make
Everytime you restart your OS, you should run ./emsdk activate latest and source ./emsdk_env.sh in step one the ensure your environment is correct
For the "this header is only for x86 only" error, please refer to: emscripten-issue-9363
Build rawogdf.js
# cd to ~/packages/ogdf.js
$ cd ../..
$ make rawogdf.js
Build ogdf.js
# cd to ~/
$ cd ../..
$ npm install
$ npm run bootstrap
$ npm run build
# open dashboard
$ npm run watch:dashboard
$ npm run test # run all tests
$ npm run server # open a local http server to see examples
$ npm run watch:dashboard # to open the dashboard
FAQs
A JavaScript Graph Drawing Library Emscripts the C++ Library [OGDF](https://ogdf.uos.de/)
The npm package ogdfjs receives a total of 5 weekly downloads. As such, ogdfjs popularity was classified as not popular.
We found that ogdfjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.