combicode 1.5.1 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## [1.5.0](https://github.com/aaurelions/combicode/compare/combicode-js-v1.4.0...combicode-js-v1.5.0) (2025-11-30)
3
+ ## [1.5.3](https://github.com/aaurelions/combicode/compare/combicode-js-v1.5.2...combicode-js-v1.5.3) (2025-11-30)
4
+
5
+ ### Bug Fixes
6
+
7
+ - **cli:** prevent the output file (e.g., `combicode.txt`) from recursively including itself in the generated content
8
+
9
+ ## [1.5.2](https://github.com/aaurelions/combicode/compare/combicode-js-v1.4.0...combicode-js-v1.5.2) (2025-11-30)
4
10
 
5
11
  ### Features
6
12
 
@@ -0,0 +1,53 @@
1
+ [
2
+ "**/node_modules/**",
3
+ "**/.git/**",
4
+ "**/.vscode/**",
5
+ "**/.idea/**",
6
+ "**/*.log",
7
+ "**/.env",
8
+ "**/*.lock",
9
+ "**/.venv/**",
10
+ "**/venv/**",
11
+ "**/env/**",
12
+ "**/__pycache__/**",
13
+ "**/*.pyc",
14
+ "**/*.egg-info/**",
15
+ "**/build/**",
16
+ "**/dist/**",
17
+ "**/.pytest_cache/**",
18
+ "**/.npm/**",
19
+ "**/pnpm-lock.yaml",
20
+ "**/package-lock.json",
21
+ "**/.next/**",
22
+ "**/.DS_Store",
23
+ "**/Thumbs.db",
24
+ "**/*.png",
25
+ "**/*.jpg",
26
+ "**/*.jpeg",
27
+ "**/*.gif",
28
+ "**/*.ico",
29
+ "**/*.svg",
30
+ "**/*.webp",
31
+ "**/*.mp3",
32
+ "**/*.wav",
33
+ "**/*.flac",
34
+ "**/*.mp4",
35
+ "**/*.mov",
36
+ "**/*.avi",
37
+ "**/*.zip",
38
+ "**/*.tar.gz",
39
+ "**/*.rar",
40
+ "**/*.pdf",
41
+ "**/*.doc",
42
+ "**/*.docx",
43
+ "**/*.xls",
44
+ "**/*.xlsx",
45
+ "**/*.dll",
46
+ "**/*.exe",
47
+ "**/*.so",
48
+ "**/*.a",
49
+ "**/*.lib",
50
+ "**/*.o",
51
+ "**/*.bin",
52
+ "**/*.iso"
53
+ ]
package/index.js CHANGED
@@ -181,6 +181,9 @@ async function main() {
181
181
  ignorePatterns.push(...argv.exclude.split(","));
182
182
  }
183
183
 
184
+ // Calculate the absolute path of the output file to prevent self-inclusion
185
+ const absoluteOutputPath = path.resolve(projectRoot, argv.output);
186
+
184
187
  let allFiles = await glob("**/*", {
185
188
  cwd: projectRoot,
186
189
  dot: true,
@@ -200,6 +203,11 @@ async function main() {
200
203
  const includedFiles = allFiles
201
204
  .filter((fileObj) => {
202
205
  const file = fileObj.path;
206
+
207
+ // Prevent the output file from being included in the list
208
+ // We use path.normalize to handle potential differences in separators (e.g., / vs \)
209
+ if (path.normalize(file) === absoluteOutputPath) return false;
210
+
203
211
  if (!fileObj.stats || fileObj.stats.isDirectory()) return false;
204
212
  if (isLikelyBinary(file)) return false;
205
213
  if (allowedExtensions && !allowedExtensions.has(path.extname(file)))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "combicode",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "A CLI tool to combine a project's codebase into a single file for LLM context.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "access": "public"
11
11
  },
12
12
  "scripts": {
13
+ "prepack": "mkdir -p config && cp ../configs/ignore.json config/ignore.json",
13
14
  "pretest": "mkdir -p config && cp ../configs/ignore.json config/ignore.json",
14
15
  "test": "node test/test.js"
15
16
  },