Skip to content

Commit b059cb2

Browse files
committed
chore: release v3.0.0
1 parent 978a0f5 commit b059cb2

6 files changed

Lines changed: 35 additions & 44 deletions

File tree

.changeset/fuzzy-apples-smoke.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/pre.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# circular-dependency-scanner
22

3-
## 3.0.0-beta.0
3+
## 3.0.0
44

55
### Major Changes
66

77
## ⚠️ Breaking
88

9-
Since v3, only support **Node.js v20+**
9+
Since v3, this tool only support **Node.js v20+**.
10+
11+
The **graph detection core algorithm** is implemented in **`rust`** instead, to *save runtime memory and make it much faster*, that is compiled to **`wasm`** and integrated.
12+
13+
Prefer to check CHANGELOG history for more information.
14+
15+
16+
## 3.0.0-beta.0
17+
18+
### Major Changes
1019

11-
## Other
1220
- perf: implement graph detect algorithm with `rust`, save runtime memory and make it much faster
1321
- feat: re-export the `analyzeGraph` method and `Edge` type
1422
- chore: update eco-dependencies and refactor infrastructure

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# circular dependencies scanner ⚡
22

3+
![Node Current](https://img.shields.io/node/v/circular-dependency-scanner?style=flat)
34
[![npm version](https://img.shields.io/npm/v/circular-dependency-scanner)](https://npmjs.com/package/circular-dependency-scanner)
45
![weekly downloads](https://img.shields.io/npm/dw/circular-dependency-scanner)
56
![license](https://img.shields.io/npm/l/circular-dependency-scanner)
@@ -13,7 +14,7 @@ English | [中文](./README.zh_CN.md)
1314
# Features
1415

1516
- 📦 All file types support.
16-
- 🗑 Support dropping pure TS type references.
17+
- 🗑 Optional removal of pure TypeScript type references.
1718
- 💡 Friendly Command Line Tool.
1819
- 🛠️ Fully Typed JavaScript APIs and Prompts.
1920
- 🌩 Tiny, Pretty, Fast and Reliable.
@@ -28,15 +29,6 @@ The `ts,js,vue` files will be printed directly into console as `blue,yellow,gree
2829

2930
![output-snapshot](https://raw.githubusercontent.com/emosheeep/circular-dependency-scanner/HEAD/snapshots/output.png)
3031

31-
# Motivation
32-
33-
On one hand there are few tools, on the other hand there are too many annoyed problems among the exist tools on the market:
34-
35-
1. Not reliable, **usually missed lots of dep-circles**. This is because in common they can't pull out the import/require sources correctly from source files
36-
2. Not a standalone tool, they often appears as a webpack/rollup/vite plugin, and analyze the relations with help of the module graph created by the plugin's host, which usually under limitations, slow and hard to use.
37-
38-
But now, you just run `ds`, all of the **(.js,.jsx,.ts,.tsx,.mjs,.cjs,.vue)** files under current directory will be parsed directly and fast with TypeScript API, which almost include all file types we used. And then the circles among these files will be printed.
39-
4032
# Command Line Tool (Prefer)
4133

4234
The `ds` command which means `depscan` will be available after you installed this package globally.
@@ -106,6 +98,15 @@ const results = circularDepsDetect({
10698

10799
```
108100

101+
# Motivation
102+
103+
On one hand there are few tools, on the other hand there are too many annoyed problems among the exist tools on the market:
104+
105+
1. Not reliable, **usually missed lots of dep-circles**. This is because in common they can't pull out the import/require sources correctly from source files
106+
2. Not a standalone tool, they often appears as a webpack/rollup/vite plugin, and analyze the relations with help of the module graph created by the plugin's host, which usually under limitations, slow and hard to use.
107+
108+
But now, you just run `ds`, all of the **(.js,.jsx,.ts,.tsx,.mjs,.cjs,.vue)** files under current directory will be parsed directly and fast, which almost include all file types we used. And then the circles among these files will be printed.
109+
109110
# QA
110111

111112
## How does this tool handle alias paths?
@@ -161,7 +162,7 @@ The analysis of file reference depend on the `alias` configurations you supplied
161162
# Reference
162163

163164
- The Command Line Tool is based on [commander](https://github.com/tj/commander.js).
164-
- The circular dependencies analysis algorithm is based on [graph-cycles](https://github.com/grantila/graph-cycles).
165+
- The circular dependencies analysis algorithm is based on [graph-cycles](https://crates.io/crates/graph-cycles).
165166
- The typescript paths are transformed by [get-tsconfig](https://github.com/privatenumber/get-tsconfig).
166167

167168
# Issues

README.zh_CN.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# circular dependencies scanner ⚡
22

3+
![Node Current](https://img.shields.io/node/v/circular-dependency-scanner?style=flat)
34
[![npm version](https://img.shields.io/npm/v/circular-dependency-scanner)](https://npmjs.com/package/circular-dependency-scanner)
45
![weekly downloads](https://img.shields.io/npm/dw/circular-dependency-scanner)
56
![license](https://img.shields.io/npm/l/circular-dependency-scanner)
@@ -28,15 +29,6 @@
2829

2930
![output-snapshot](https://raw.githubusercontent.com/emosheeep/circular-dependency-scanner/HEAD/snapshots/output.png)
3031

31-
# 动机
32-
33-
一方面 NPM 上关于循环依赖检测的工具实在太少了,另一方面,他们或多或少都有一些令人恼火的问题,无法愉快的使用。
34-
35-
1. 不可靠。用过的工具,没有那个能扫全的,猜测主要还是因为它们无法从多种多样的文件中类型中提取出对应的 import/require 路径。
36-
2. 并非是独立工具。他们通常以 webpack/rollup/vite 插件形式出现,依赖宿主提供的模块关系图分析循环引用,用起来有诸多限制,也很慢。
37-
38-
但现在,你只需要运行 `ds`,我们用到的所有类型的脚本文件 **(.js,.jsx,.ts,.tsx,.mjs,.cjs,.vue)** 都会被 TypeScript API 快速解析,并在控制台使用彩色打印友好地输出循环引用信息。
39-
4032
# 命令行工具(推荐)
4133

4234
全局安装之后,会获得一个可执行命令 `ds``depscan` 缩写):
@@ -105,6 +97,15 @@ const results = circularDepsDetect({
10597

10698
```
10799

100+
# 动机
101+
102+
一方面 NPM 上关于循环依赖检测的工具实在太少了,另一方面,他们或多或少都有一些令人恼火的问题,无法愉快的使用。
103+
104+
1. 不可靠。用过的工具,没有那个能扫全的,猜测主要还是因为它们无法从多种多样的文件中类型中提取出对应的 import/require 路径。
105+
2. 并非是独立工具。他们通常以 webpack/rollup/vite 插件形式出现,依赖宿主提供的模块关系图分析循环引用,用起来有诸多限制,也很慢。
106+
107+
但现在,你只需要运行 `ds`,我们用到的所有类型的脚本文件 **(.js,.jsx,.ts,.tsx,.mjs,.cjs,.vue)** 都会被快速解析,并在控制台使用彩色打印友好地输出循环引用信息。
108+
108109
# QA
109110

110111
## 如何处理 alias 引用?
@@ -160,9 +161,5 @@ export { type a, b } from './export { type a, b }'; // ✅
160161
# 引用
161162

162163
- 命令行工具基于 [commander](https://github.com/tj/commander.js).
163-
- 循环依赖分析算法基于 [graph-cycles](https://github.com/grantila/graph-cycles).
164+
- 循环依赖分析算法基于 [graph-cycles](https://crates.io/crates/graph-cycles).
164165
- TS 别名转换基于 [get-tsconfig](https://github.com/privatenumber/get-tsconfig).
165-
166-
# Issues
167-
168-
没有哪个工具一开始就是完美的,如果使用过程中遇到问题,欢迎提交 issue。

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "circular-dependency-scanner",
33
"type": "module",
4-
"version": "3.0.0-beta.0",
4+
"version": "3.0.0",
55
"packageManager": "pnpm@10.24.0",
66
"description": "Out-of-box and zero configuration circular dependencies detector, with both JavaScript API and Command Line Tool.",
77
"author": "情绪羊 <emosheep@qq.com>",

0 commit comments

Comments
 (0)