diff --git a/CHANGELOG.md b/CHANGELOG.md index e5e7dc2..595788d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,17 @@ All notable changes to this project are documented here, following [Keep a Changelog](https://keepachangelog.com/) and semantic versioning. +## [0.1.11] - 2026-09-16 + +### Fixed + +- Classify `.log` files as trimmable data instead of source. + ## [0.1.10] - 2026-09-15 ### Fixed - Match generated-file markers case-insensitively. - ## [0.1.9] - 2026-09-12 ### Fixed diff --git a/package-lock.json b/package-lock.json index 15863cf..b469704 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ctxtrim", - "version": "0.1.9", + "version": "0.1.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ctxtrim", - "version": "0.1.9", + "version": "0.1.11", "license": "MIT", "bin": { "ctxtrim": "bin/ctxtrim.js" diff --git a/package.json b/package.json index 7bea5cc..8ce0d65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ctxtrim", - "version": "0.1.10", + "version": "0.1.11", "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 2dd9174..73d531a 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 9f1e3a4..7a67e48 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);