From 97c1b5810cca610d2367135072ad1efde602429d Mon Sep 17 00:00:00 2001 From: Rayan-and-beyond <263488867+Rayan-and-beyond@users.noreply.github.com> Date: Tue, 15 Sep 2026 18:55:58 +0000 Subject: [PATCH 1/2] fix: classify log files as trimmable data --- CHANGELOG.md | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- src/classify.js | 2 +- test/ctxtrim.test.js | 2 ++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9cb818..a661e3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog +## [0.1.10] - 2026-09-15 -All notable changes to this project are documented here, following -[Keep a Changelog](https://keepachangelog.com/) and semantic versioning. +### Fixed +- Classify `.log` files as trimmable data instead of source. ## [0.1.9] - 2026-09-12 ### Fixed diff --git a/package-lock.json b/package-lock.json index 15863cf..12f379c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ctxtrim", - "version": "0.1.9", + "version": "0.1.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ctxtrim", - "version": "0.1.9", + "version": "0.1.10", "license": "MIT", "bin": { "ctxtrim": "bin/ctxtrim.js" diff --git a/package.json b/package.json index 3f9e1ad..7bea5cc 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/classify.js b/src/classify.js index e648cfd..236688f 100644 --- a/src/classify.js +++ b/src/classify.js @@ -21,7 +21,7 @@ const LOCKFILES = new Set([ const DATA_EXT = new Set([ ".csv", ".tsv", ".parquet", ".ndjson", ".jsonl", ".sqlite", ".sqlite3", - ".db", ".dump", ".pkl", ".npy", ".npz", ".arrow", ".feather", ".geojson", + ".db", ".dump", ".log", ".pkl", ".npy", ".npz", ".arrow", ".feather", ".geojson", ]); const BINARY_EXT = new Set([ diff --git a/test/ctxtrim.test.js b/test/ctxtrim.test.js index da50d9f..ec254b6 100644 --- a/test/ctxtrim.test.js +++ b/test/ctxtrim.test.js @@ -25,6 +25,8 @@ test("classify buckets files correctly", () => { assert.equal(classify("dist/app.js", {}).category, "build"); assert.equal(classify("app.min.js", {}).category, "minified"); assert.equal(classify("data/x.csv", {}).category, "data"); + assert.equal(classify("debug.log", {}).category, "data"); + assert.equal(classify("debug.log", {}).trim, true); assert.equal(classify("logo.png", {}).binary, true); assert.equal(classify("src/index.js", { tokens: 50 }).category, "source"); assert.equal(classify("src/index.js", { tokens: 50 }).trim, false); From ee07aa6f63cd016a2a02c741971787bf07a71cd9 Mon Sep 17 00:00:00 2001 From: royalpinto007 Date: Wed, 16 Sep 2026 15:11:48 +0530 Subject: [PATCH 2/2] restore changelog header --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a661e3c..7b1a02c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# Changelog + +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