npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qcqx/project-manage-core

v1.0.0

Published

qcqx-project-manage 共享核心库

Readme

@qcqx/project-manage-core

qcqx-project-manage 的共享核心库,将 Git 项目扫描、状态检测、配置管理、项目树操作等逻辑从 UI 层抽离,供 VS Code 插件、CLI 等上层包复用。

功能模块

Git 扫描与状态

  • 项目扫描 — 递归扫描指定目录发现 Git 仓库,支持多根目录、嵌套仓库、最大深度限制、glob 忽略规则
  • 缓存扫描 — 基于配置指纹的 stale-while-revalidate 策略,先返回缓存再后台刷新
  • 状态检测 — 批量获取 Git 分支名、dirty 状态,通过 asyncPool 控制并发
  • 远程 URL — 批量解析 Git remote,转换为可浏览器打开的 HTTPS 链接

配置管理

  • AppConfigManager — 读写 config.json,监听文件变更自动通知
  • CacheManager — 通用的 ID→文件 JSON 缓存,支持文件监听与变更回调

项目树

  • ProjectList — 内存树结构 + 持久化到 project-list.json,支持增删改查、节点移动、关联链接
  • 遍历工具findNodetraverseNodesremoveNode 等纯函数

存储与工具

  • 文件操作readJSONwriteJSONreadTextwriteTextfileExistsensureDir
  • 工具函数asyncPool(并发控制)、generateId(短 ID)、isWorkspaceFile.code-workspace 判断)、getProjectTitle(项目显示标题)

数据存储

所有数据存放在用户目录:~/.qcqx/qcqx-project-manage/

| 文件 | 说明 | |------|------| | project-list.json | 项目列表树结构 | | config.json | 全局配置(Git 扫描目录、忽略规则等) | | git-projects-cache.json | Git 扫描结果缓存 |

使用

import {
  scanForGitProjects,
  getGitStatusBatch,
  AppConfigManager,
  ProjectList,
  CacheManager,
} from '@qcqx/project-manage-core'

核心包为 monorepo 内部包(private: true),通过 workspace:* 引用。

构建

# 构建(tsup → ESM + CJS + 类型声明)
pnpm build

# 类型检查
pnpm check-types

# 清理产物
pnpm clean

依赖

| 包 | 用途 | |----|------| | simple-git | Git 仓库检测、分支与状态查询 | | git-url-parse | Git remote URL 解析与转换 | | picomatch | Glob 模式匹配(忽略规则) |

许可

MIT