mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-11-15 00:01:39 +08:00
codegraph applies .gitignore rules itself, through the ignore package: on the filesystem walk for every .gitignore, and in git repositories on top of git ls-files for its built-in defaults merged with the root .gitignore and git's exclude files. codegraph.json's include, exclude and includeIgnored patterns go through it too. ignore 7.0.5 read several forms differently from git: a backslash escape (\d was a regex digit), POSIX classes and a ] or ! first in a bracket, and a run of three asterisks. A lone ! line matched every path, so it re-included everything the rules and the built-in defaults leave out, node_modules included. 2,031 of 200,000 random patterns also threw at match time, which readGitignorePatterns has to guard against (issue 682). ignore 7.0.14, with the range raised to ^7.0.14, reads all of these as git does, and none of the 200,000 patterns throws. Its code diff from 7.0.5 was read in full: pattern translation only, with no I/O, no dependencies and no install scripts. The lockfile entry matches the npm registry's own metadata on registry.npmjs.org. The package has no provenance, like every release its maintainer has published. Validation: - New __tests__/gitignore-pattern-parity.test.ts checks scanDirectory against git's own answer for these patterns, on the filesystem walk and in a git repository: its 4 tests fail with 7.0.5 and pass with 7.0.14. - scanDirectory on react, astro and django, in git mode and in walk mode on a copy without .git, returns the same 4,631, 4,946 and 3,027 files with either version. - On a fixture of the changed forms, 7.0.14 leaves out exactly what git leaves out in both modes, node_modules aside, which codegraph's defaults always exclude. With a lone ! line, 7.0.5 kept 16 of the 18 files on the walk, node_modules among them, where git keeps 6. Without that line it differed from git on 8 files on the walk and on 2 in git mode. - The gitignore and scope test files (extraction, git-ignored-dirs-scope, the include, exclude and includeIgnored configs, src-build-folders and others): 853 passed. Raised by PR 2885 (@johnhldiver-beep). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
2.3 KiB
JSON
68 lines
2.3 KiB
JSON
{
|
|
"name": "@colbymchenry/codegraph",
|
|
"version": "1.6.2",
|
|
"description": "Supercharge AI coding agents with semantic code intelligence — surgical context, fewer tool calls, faster answers. 100% local.",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/colbymchenry/codegraph.git"
|
|
},
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"bin": {
|
|
"codegraph": "./dist/bin/codegraph.js"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"scripts",
|
|
"README.md"
|
|
],
|
|
"workspaces": [
|
|
"ui"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc && npm run copy-assets && npm run build:ui && node -e \"require('fs').chmodSync('dist/bin/codegraph.js', 0o755)\"",
|
|
"build:ui": "cd ui && npm run build && cd .. && node scripts/check-ui-build.mjs",
|
|
"build:lib": "cd ui && npm run build:lib",
|
|
"preuninstall": "node dist/bin/uninstall.js",
|
|
"copy-assets": "node -e \"const fs=require('fs');fs.mkdirSync('dist/db',{recursive:true});fs.copyFileSync('src/db/schema.sql','dist/db/schema.sql');fs.mkdirSync('dist/extraction/wasm',{recursive:true});fs.readdirSync('src/extraction/wasm').filter(f=>f.endsWith('.wasm')).forEach(f=>fs.copyFileSync('src/extraction/wasm/'+f,'dist/extraction/wasm/'+f))\"",
|
|
"dev": "tsc --watch",
|
|
"build:kernel": "bash scripts/build-kernel.sh",
|
|
"cli": "npm run build && node dist/bin/codegraph.js",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:eval": "vitest run __tests__/evaluation/",
|
|
"eval": "npm run build && npx tsx __tests__/evaluation/runner.ts",
|
|
"clean": "node -e \"const fs=require('fs');fs.rmSync('dist',{recursive:true,force:true})\""
|
|
},
|
|
"keywords": [
|
|
"code-intelligence",
|
|
"knowledge-graph",
|
|
"static-analysis"
|
|
],
|
|
"author": "",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@clack/prompts": "^1.3.0",
|
|
"commander": "^14.0.2",
|
|
"fast-string-width": "^3.0.2",
|
|
"fast-wrap-ansi": "^0.2.0",
|
|
"ignore": "^7.0.14",
|
|
"jsonc-parser": "^3.3.1",
|
|
"picomatch": "^4.0.3",
|
|
"sisteransi": "^1.0.5",
|
|
"tree-sitter-wasms": "^0.1.11",
|
|
"web-tree-sitter": "^0.25.3"
|
|
},
|
|
"devDependencies": {
|
|
"@sveltejs/vite-plugin-svelte": "^4.0.4",
|
|
"@types/node": "^20.19.30",
|
|
"@types/picomatch": "^4.0.2",
|
|
"jsdom": "^25.0.1",
|
|
"typescript": "^5.0.0",
|
|
"vitest": "^2.1.9"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.0.0 <25.0.0"
|
|
}
|
|
}
|