v1.16.1

stackblitz/bolt.newv1.16.1Jul 11, 2026by yamadashy

AI Summary

This patch release addresses a critical WebAssembly memory leak and enhances comment removal capabilities for various JavaScript and TypeScript module files. Additionally, it resolves issues with token counting for underscore-prefixed directories and fixes directory tree rendering on Windows.

Key Highlights

  • Fixed a WebAssembly memory leak where `Tree` objects were not released, preventing heap exhaustion on large repositories.
  • Extended the `--remove-comments` flag to support more module file types, including `.mjs`, `.cjs`, `.mts`, `.cts`, `.mjsx`, and `.mtsx`.
  • Fixed the token count tree to correctly include and count directories starting with underscores (e.g., `__tests__`).
  • Resolved directory tree rendering and file sorting issues on Windows by normalizing file paths before splitting.

New Features

  • Extended comment removal support to cover additional JavaScript and TypeScript module file extensions (`.mjs`, `.cjs`, etc.).

Full Release Notes

This release is a bug-fix patch: it plugs a WebAssembly memory leak, extends comment removal to more JavaScript/TypeScript module files, and fixes the token count tree for underscore-prefixed directories and the directory tree on Windows. Updating to 1.16.1 is recommended for all users.

## Improvements ⚑

### Fixed a WebAssembly Memory Leak (#1681)

Parsed `web-tree-sitter` `Tree` objects were not released after use, leaking WebAssembly heap memory when parsing or compressing many files β€” noticeable on large repositories. Each tree is now freed right after parsing, keeping memory usage stable.

Special thanks to @isaka1022 for their first contribution! πŸŽ‰

### Comment Removal for More Module Files (#1683)

`--remove-comments` now strips comments from JavaScript/TypeScript module files that were previously skipped β€” `.mjs`, `.cjs`, `.mts`, `.cts`, and their JSX variants `.mjsx` / `.mtsx`.

```bash
repomix --remove-comments
```

Special thanks to @serhiizghama for this contribution! πŸŽ‰

### Token Count Tree: Count Underscore-Prefixed Directories (#1710)

Directories whose names start with an underscore (for example `__tests__` or `__mocks__`) were dropped from the `--token-count-tree` output and excluded from the token totals. They are now rendered and counted like any other directory.

```bash
repomix --token-count-tree
```

Special thanks to @serhiizghama for this contribution! πŸŽ‰

### Correct Directory Tree and File Ordering on Windows (#1712)

On Windows, the `<directory_structure>` section collapsed into a flat list of full paths and file sorting fell back to a plain string comparison, because already-normalized (`/`-separated) paths were being split on the OS separator (`\`). Paths are now normalized before splitting, so the tree nests correctly and files sort in directory-aware order on every platform.

Special thanks to @serhiizghama for this contribution! πŸŽ‰

## How to Update

```bash
npm update -g repomix
```

---

As always, if you have any issues or suggestions, please let us know on GitHub issues or our [Discord community](https://discord.gg/wNYzTwZFku).