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

@yarn-tool/fix-all

v3.0.13

Published

一站式自動修復工具,支援 git 資訊更新、靜態檔案同步、版本修正與 workspace 管理 (All-in-one auto-fix tool for git info update, static file sync, version fix, and workspace management)

Downloads

858

Readme

@yarn-tool/fix-all

一站式自動修復工具,支援 git 資訊更新、靜態檔案同步、版本修正與 workspace 管理 (All-in-one auto-fix tool for git info update, static file sync, version fix, and workspace management)

安裝 (Installation)

# 使用 yarn / Using yarn
yarn add @yarn-tool/fix-all

# 使用 yarn-tool / Using yarn-tool
yarn-tool add @yarn-tool/fix-all
# yt 是 yarn-tool 的別名 / yt is an alias for yarn-tool
yt add @yarn-tool/fix-all

# 使用 pnpm / Using pnpm
pnpm add @yarn-tool/fix-all

# 使用 npm / Using npm
npm install @yarn-tool/fix-all

功能 (Features)

  • npmAutoFixAll() - 自動修復 workspaces/package 的主要函數
  • Git 資訊更新 - 自動更新 homepage, repository, bugs 等欄位
  • 靜態檔案同步 - 複製 .gitignore, .npmignore, tsconfig.json 等模板檔案
  • Lerna 配置修復 - 自動修復 lerna.json 配置
  • 版本依賴修正 - 同步 workspace 內部套件的版本號
  • 支援選項 - 可控制是否覆寫 git 資訊、重置靜態檔案等

使用方式 (Usage)

import npmAutoFixAll from '@yarn-tool/fix-all';

// 在當前目錄執行 / Execute in current directory
await npmAutoFixAll(process.cwd());

// 帶選項執行 / Execute with options
await npmAutoFixAll(process.cwd(), {
  overwriteHostedGitInfo: true,  // 覆寫 git 資訊 / Overwrite git info
  branch: 'main',                // Git 分支名稱 / Git branch name
  resetStaticFiles: true,        // 重置靜態檔案 / Reset static files
});

選項說明 (Options)

| 選項 / Option | 類型 / Type | 說明 / Description | |--------------|-------------|-------------------| | overwriteHostedGitInfo | boolean | 是否覆寫 hosted git 資訊 / Whether to overwrite hosted git info | | branch | string | Git 分支名稱(預設自動偵測)/ Git branch name (auto-detected by default) | | resetStaticFiles | boolean | 是否重置靜態檔案 / Whether to reset static files |

執行流程 (Execution Flow)

  1. 尋找根目錄 - 自動偵測 workspace 或套件根目錄
  2. 複製靜態檔案 - 根據專案類型複製對應的模板檔案
  3. 取得 Git 資訊 - 從 git remote 提取 repository 相關資訊
  4. 修復根目錄 - 更新 package.json 的 git 相關欄位
  5. 修復 Lerna - 更新 lerna.json 配置
  6. 遍歷套件 - 對每個子套件執行修復操作