Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project are documented here, following
[Keep a Changelog](https://keepachangelog.com/) and semantic versioning.

## [0.1.10] - 2026-09-15

### Fixed

- Match generated-file markers case-insensitively.

## [0.1.9] - 2026-09-12

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ctxtrim",
"version": "0.1.9",
"version": "0.1.10",
"description": "Trim what bloats your AI coding context. Scan a repo, find the high-cost/low-value files ballooning your Claude Code / Cursor / Codex context, and write ignore files to cut token cost. Zero dependencies.",
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion src/classify.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const BINARY_EXT = new Set([
]);

const MINIFIED = /\.(min\.(js|css|mjs)|bundle\.js|map)$/i;
const GENERATED_MARKERS = /(@generated\b|DO NOT EDIT|Code generated by|autogenerated|@auto-generated)/;
const GENERATED_MARKERS = /(@generated\b|DO NOT EDIT|Code generated by|autogenerated|@auto-generated)/i;

const dirParts = (rel) => rel.split(/[\\/]/).slice(0, -1);

Expand Down
5 changes: 5 additions & 0 deletions test/ctxtrim.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ test("classify buckets files correctly", () => {
assert.equal(classifyPath("big.json"), null);
});

test("generated markers are case-insensitive", () => {
assert.equal(classify("generated.js", { sample: "// do not edit" }).category, "generated");
assert.equal(classify("generated.js", { sample: "/* @Generated by protoc */" }).category, "generated");
});

test("scan skips binary reads and retains content-dependent classification", (t) => {
const root = mkdtempSync(join(tmpdir(), "ctxtrim-binary-read-"));
t.after(() => rmSync(root, { recursive: true, force: true }));
Expand Down
Loading