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

ts-graphviz

Package Overview
Dependencies
Maintainers
1
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-graphviz - npm Package Compare versions

Comparing version 1.8.3-dev.273c1f434 to 2.0.0

CHANGELOG.md

195

package.json
{
"name": "ts-graphviz",
"version": "1.8.3-dev.273c1f434",
"author": "kamiazya <yuki@kamiazya.tech>",
"description": "Graphviz library for TypeScript.",
"homepage": "https://ts-graphviz.github.io/ts-graphviz/",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/ts-graphviz/ts-graphviz.git"
"name": "ts-graphviz",
"version": "2.0.0",
"description": "Graphviz library for TypeScript",
"keywords": [
"graphviz",
"dot"
],
"homepage": "https://ts-graphviz.github.io/ts-graphviz/",
"bugs": {
"url": "https://github.com/ts-graphviz/ts-graphviz/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/ts-graphviz/ts-graphviz.git",
"directory": "packages/ts-graphviz"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ts-graphviz"
},
"keywords": [
"graphviz",
"dot"
],
"bugs": {
"url": "https://github.com/ts-graphviz/ts-graphviz/issues"
{
"type": "opencollective",
"url": "https://opencollective.com/ts-graphviz"
}
],
"license": "MIT",
"author": "kamiazya <yuki@kamiazya.tech>",
"sideEffects": true,
"type": "module",
"exports": {
".": {
"require": {
"types": "./lib/ts-graphviz.d.ts",
"default": "./lib/ts-graphviz.cjs"
},
"import": {
"types": "./lib/ts-graphviz.d.ts",
"default": "./lib/ts-graphviz.js"
}
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/ts-graphviz"
"./ast": {
"types": "./lib/ast.d.ts",
"require": "./lib/ast.cjs",
"default": "./lib/ast.js"
},
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"types": "lib/index.d.ts",
"exports": {
".": {
"require": {
"types": "./lib/index.d.ts",
"default": "./lib/index.cjs"
},
"import": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
}
},
"./ast": {
"require": {
"types": "./lib/ast/index.d.ts",
"default": "./lib/ast/index.cjs"
},
"import": {
"types": "./lib/ast/index.d.ts",
"default": "./lib/ast/index.js"
}
},
"./adapter": {
"browser": {
"require": "./lib/adapter/browser/index.cjs",
"import": "./lib/adapter/browser/index.js",
"types": "./lib/adapter/browser/index.d.ts"
},
"deno": {
"types": "./lib/adapter/deno/mod.d.ts",
"default": "./lib/adapter/deno/mod.js"
},
"node": {
"require": "./lib/adapter/node/index.cjs",
"import": "./lib/adapter/node/index.js",
"types": "./lib/adapter/node/index.d.ts"
},
"default": {
"types": "./lib/adapter/node/index.d.ts",
"require": "./lib/adapter/node/index.cjs",
"import": "./lib/adapter/node/index.js"
}
},
"./package.json": "./package.json"
"./adapter": {
"types": "./lib/adapter.d.ts",
"require": "./lib/adapter.cjs",
"default": "./lib/adapter.js"
},
"typesVersions": {
"*": {
"ast": [
"lib/ast"
],
"adapter": [
"lib/adapter/node"
]
}
},
"license": "MIT",
"engines": {
"node": ">=14.16"
},
"runkitExampleFilename": "example/runkit.cjs",
"scripts": {
"build:peggy": "peggy --plugin ts-pegjs --extra-options-file src/ast/dot-shim/parser/peggy.options.json -o src/ast/dot-shim/parser/_parse.ts src/ast/dot-shim/parser/dot.peggy",
"prebuild": "yarn build:peggy",
"build:deno": "mkdir -p lib/adapter/deno && cp -r src/adapter/deno/* lib/adapter/deno && sed -i \"s/index.ts/index.js/g\" lib/adapter/deno/mod.js && sed -i \"s/index.ts/index.d.ts/g\" lib/adapter/deno/mod.d.ts",
"build:node": "tsc -p tsconfig.build.json --declaration && tsc -p tsconfig.build.json --removeComments && rollup -c",
"build": "yarn build:node && yarn build:deno",
"postbuild": "prettier --write ./lib/**/*.{js,cjs,d.ts}",
"pretest": "yarn build:peggy",
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest",
"format": "eslint --ext ts src --fix && prettier --write './**/*.{ts,js,json,yaml}' '!lib'",
"lint": "eslint --ext ts src",
"predoc": "yarn build:peggy",
"doc": "typedoc"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.2",
"@types/jest": "^29.4.0",
"@types/jest-specific-snapshot": "^0.5.6",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.4.1",
"jest-snapshot-serializer-raw": "^1.2.0",
"jest-specific-snapshot": "^7.0.0",
"peggy": "^2.0.1",
"prettier": "^2.8.3",
"prettier-plugin-pegjs": "^0.5.0",
"rollup": "^3.11.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-dts": "5.1.1",
"svgo": "^3.0.2",
"ts-jest": "^29.0.5",
"ts-pegjs": "^3.0.0",
"typedoc": "^0.23.15",
"typescript": "^4.7.4"
}
"./package.json": "./package.json"
},
"main": "./lib/ts-graphviz.cjs",
"module": "./lib/ts-graphviz.js",
"types": "lib/ts-graphviz.d.ts",
"dependencies": {
"@ts-graphviz/adapter": "^2.0.0",
"@ts-graphviz/ast": "^2.0.0",
"@ts-graphviz/common": "^2.0.0",
"@ts-graphviz/core": "^2.0.0"
},
"devDependencies": {
"peggy": "^3.0.2",
"ts-pegjs": "^4.2.1",
"typescript": "^5.3.3",
"vite": "^5.1.3",
"vite-plugin-dts": "^3.7.3"
},
"engines": {
"node": ">=18"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"runkitExampleFilename": "example/runkit.cjs",
"scripts": {
"build": "vite build"
}
}

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

<div align="center">
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d6485f9858ed4b3e8ef76611a2896bc4)](https://app.codacy.com/gh/ts-graphviz/ts-graphviz?utm_source=github.com&utm_medium=referral&utm_content=ts-graphviz/ts-graphviz&utm_campaign=Badge_Grade_Settings)

@@ -6,4 +8,3 @@ [![GitHub Action](https://github.com/kamiazya/ts-graphviz/workflows/NodeCI/badge.svg)](https://github.com/kamiazya/ts-graphviz/actions?workflow=NodeCI)

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
[![code style: prettier](https://img.shields.io/badge/code%20style-prettier-ff69b4?logo=prettier&style=flat)](https://github.com/facebook/jest)
[![test: jest](https://img.shields.io/badge/tested%20with-jest-99424f?logo=jest&style=flat)](https://github.com/facebook/jest)
![node version](https://img.shields.io/node/v/ts-graphviz)

@@ -19,2 +20,4 @@ [![deno version](https://img.shields.io/badge/deno-^1.28.0-black?logo=deno)](https://github.com/denoland/deno)

🔗
[![GitHub](https://img.shields.io/badge/-GitHub-181717?logo=GitHub&style=flat)](https://github.com/ts-graphviz/ts-graphviz)

@@ -26,4 +29,10 @@ [![npm](https://img.shields.io/badge/-npm-CB3837?logo=npm&style=flat)](https://www.npmjs.com/package/ts-graphviz)

> [English](https://github.com/ts-graphviz/ts-graphviz/blob/main/README.md) | [日本語](https://github.com/ts-graphviz/ts-graphviz/blob/main/README_ja.md)
[![format: Biome](https://img.shields.io/badge/format%20with-Biome-F7B911?logo=biome&style=flat)](https://biomejs.dev/)
[![test: Vitest](https://img.shields.io/badge/tested%20with-Vitest-6E9F18?logo=vitest&style=flat)](https://vitest.dev/)
[![build: Vite](https://img.shields.io/badge/build%20with-Vite-646CFF?logo=vite&style=flat)](https://rollupjs.org/)
</div>
---
## Key Features ✨

@@ -39,2 +48,8 @@

- Both a high-layer API to provide models and a low-layer API to handle ASTs are provided to address any use cases.
- **Modular and Extensible**
- The library is split into multiple packages, each serving a specific purpose. This modular design allows users to pick and choose the functionality they need, resulting in improved maintainability and flexibility.
- **Cross Platform**
- It supports both Node.js and Deno and Browser.
- **Customizable**
- It provides a way to extend the library's type system to customize graph visualization solutions to meet specific needs.

@@ -345,3 +360,3 @@ ## Installation 💽

### `ts-graphviz/adapter` Module 🔌
### `@ts-graphviz/adapter` Module 🔌

@@ -396,3 +411,3 @@ > This module status is ![beta](https://img.shields.io/badge/-beta-orange).

### `ts-graphviz/ast` Module 🔢
### `@ts-graphviz/ast` Module 🔢

@@ -423,3 +438,3 @@ > This module status is ![beta](https://img.shields.io/badge/-beta-orange).

```typescript
import { parse } from 'ts-graphviz/ast';
import { parse } from '@ts-graphviz/ast';

@@ -529,7 +544,7 @@ const ast = parse(`

```ts
import { $keywords } from 'ts-graphviz';
import { toFile } from 'ts-graphviz/adapter';
import { $keywords } from '@ts-graphviz/common';
import { toFile } from '@ts-graphviz/adapter';
// 1. Declare the 'ts-graphviz/adapter' module.
declare module 'ts-graphviz/adapter' {
// 1. Declare the '@ts-graphviz/adapter' module.
declare module '@ts-graphviz/adapter' {
export namespace Layout {

@@ -557,6 +572,7 @@ // 2. Define the $values interface in the Layout namespace.

```ts
import { digraph, toDot, attribute as _, $keywords } from 'ts-graphviz';
import { $keywords } from '@ts-graphviz/common';
import { digraph, toDot, attribute as _ } from 'ts-graphviz';
// 1. Declare the 'ts-graphviz' module.
declare module 'ts-graphviz' {
// 1. Declare the '@ts-graphviz/common' module.
declare module '@ts-graphviz/common' {
export namespace GraphAttributeKey {

@@ -590,2 +606,13 @@ // 2. Define the $values interface in the GraphAttributeKey namespace.

## Deep dive 🏊‍♂️
### Architecture 🏛
See [ARCHITECTURE.md](https://github.com/ts-graphviz/ts-graphviz/blob/main/ARCHITECTURE.md) for more details.
### Security 🛡️
See [SECURITY.md](https://github.com/ts-graphviz/ts-graphviz/blob/main/SECURITY.md) for more details.
## Who's using `ts-graphviz` 📜

@@ -592,0 +619,0 @@

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