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

fix-refs-vscode

v0.2.0

Published

Move or rename a file and the Markdown links pointing to it keep working — broken links are detected and fixed for you.

Readme

MD Links

Makes it easier to work with links in your Markdown files.

Add links in a couple of keystrokes, and never let a link break when you move or rename a file

  You move  src/file.cs  →  src/lib/file.cs

- [guide](../src/file.cs)        ← now broken
+ [guide](../src/lib/file.cs)    ← fixed automatically

Only the link target changes. Your formatting, link text, titles, #fragments, ?queries, and :line numbers are all preserved exactly.


Insert a link — Alt+M Alt+L

Hold Alt and press M then L (think Markdown Link), search for any file in your workspace, and a correctly-computed link is dropped at the cursor. Images become ![](…) automatically, and selected text becomes the link label.

Insert a link with the Alt+M Alt+L file picker


Fix broken links when you move a file

Move or rename a file in the Explorer and MD Links offers to find every Markdown link that pointed to it and update it to the new location — no manual find & replace.

Repairing links after a file move


Moving the Markdown file? Its own links get fixed too

When you move the document itself, its relative links would normally all break. MD Links repairs them so they keep pointing at the right targets from the new location.

Fixing a moved document's own relative links


Warns you before a delete breaks links

Delete a file and MD Links checks whether any Markdown still points to it. Since a deleted file can't be auto-fixed, it shows you exactly which links will break so you can decide what to do.

Deleted-file warning listing broken links


Picks the right file when names clash

If a moved file's name matches more than one candidate, MD Links asks instead of guessing — you choose the correct target from a quick pick.

Choosing the right target from a quick pick


See every change before it's applied

Repairing the whole workspace never edits files behind your back. Right-click a folder → Repair broken references in workspace (or run it from the Command Palette) and MD Links shows the full list of proposed fixes in the Output panel, then asks Apply changes before writing anything.

Preview of proposed fixes with an Apply changes prompt


General Overview

Commands

| Command | What it does | |---|---| | MD Links: Repair broken references in workspace | Scan every Markdown file, preview the fixes, and apply them once you confirm. | | MD Links: Repair broken references in current file | Only scan the Markdown file you currently have open. | | MD Links: Insert link to file… | Search for a workspace file and insert a relative Markdown link at the cursor (Alt+M Alt+L). |

Settings

| Setting | Default | Description | |---|---|---| | fixRefs.autoFixOnRename | true | When a file is moved or renamed, offer to fix Markdown references to its old path. | | fixRefs.warnOnDelete | true | When a file is deleted, warn if any Markdown links still point to it. | | fixRefs.exclude | [] | Extra glob patterns to ignore when scanning. | | fixRefs.insertLinkStyle | relative | Whether Insert link to file writes a relative (portable) or absolute (full) path. |

The Alt+M Alt+L shortcut is fully rebindable in Keyboard Shortcuts (Ctrl+K Ctrl+S → search "MD Links: Insert link to file").

How it works

The extension is a thin VS Code shell over the fix-refs library, which parses Markdown into an AST and rewrites only the URL token of broken links. Everything else in the document stays byte-for-byte unchanged.

On top of the library, the extension also listens for VS Code's file rename/move events, so it can catch files that were renamed (not just moved). The rename mapping is passed straight to the fixer, which lets it repair references that a path-based search alone couldn't detect.

Requirements

  • VS Code 1.75 or later
  • Node.js 18 or later (bundled with VS Code on most platforms)