dirsql 0.4.74 → 0.4.75

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.
@@ -278,7 +278,7 @@ with all seven [stat columns](./columns.md): `path`, `basename`, `dir`, `ext`,
278
278
 
279
279
  ```bash
280
280
  curl -s localhost:7117/query -H 'content-type: application/json' \
281
- -d '{"sql":"SELECT basename, size FROM \'./\' ORDER BY size DESC LIMIT 5"}'
281
+ -d "{\"sql\":\"SELECT basename, size FROM './' ORDER BY size DESC LIMIT 5\"}"
282
282
  ```
283
283
 
284
284
  Earlier versions served an implicit table named `files` here. It is gone; a
@@ -27,7 +27,7 @@ The `200` response is a JSON array of row objects keyed by column name:
27
27
  ```bash
28
28
  curl -s http://localhost:7117/query \
29
29
  -H 'content-type: application/json' \
30
- -d '{"sql":"SELECT COUNT(*) AS n FROM \'./\'"}' \
30
+ -d "{\"sql\":\"SELECT COUNT(*) AS n FROM './'\"}" \
31
31
  | jq
32
32
  ```
33
33
 
@@ -55,9 +55,10 @@ A path containing `*`, `?`, `[` or `{` is a glob and is used exactly as
55
55
  written: `*` matches within a single directory, `**` crosses directories.
56
56
 
57
57
  The scan starts at the last directory named outright before the first glob
58
- component -- `'./small/*.md'` walks `small/` and nothing else -- so a query
59
- over one directory costs what `find ./small` costs, however large the
60
- directories beside it.
58
+ component, and descends only as deep as the pattern can match --
59
+ `'./small/*.md'` lists `small/` and nothing else -- so a query over one
60
+ directory costs what `ls small` costs, however large the directories beside
61
+ or below it. Only `**` walks a whole subtree.
61
62
 
62
63
  A path naming a single file yields exactly one row. dirsql never splits a file
63
64
  into rows on its own — that is what a table's `on_file` hook is for.
@@ -260,15 +261,21 @@ skipped just like one at the top.
260
261
 
261
262
  ### `.gitignore`
262
263
 
263
- Path-table scans also respect `.gitignore` files by default, the way fd and
264
- ripgrep do: a `.gitignore` anywhere in the tree applies below its own
264
+ Path-table scans also respect `.gitignore` files by default, inside a git
265
+ repo, the way git, fd and ripgrep do: a `.gitignore` applies below its own
265
266
  directory, deeper files override shallower ones, `!pattern` re-includes, and
266
267
  an ignored directory is pruned rather than walked. In a typical repo this
267
- excludes build output, virtualenvs, and caches with zero ceremony. No `.git`
268
- directory is required — a `.gitignore` in any scanned directory counts — and
269
- the built-in defaults above remain as a floor for directories with no
268
+ excludes build output, virtualenvs, and caches with zero ceremony. The
269
+ built-in defaults above remain as a floor for directories with no
270
270
  `.gitignore` at all.
271
271
 
272
+ A `.gitignore` is in force only when a directory holding `.git` encloses it.
273
+ Outside a repo none applies, at the scan's start, above it or below it: a
274
+ `~/.claude` whose `.gitignore` is `*` still lists its files when `~/.claude`
275
+ is not a repo. Inside one, every `.gitignore` from the repo root down
276
+ applies, including those above the directory a scan starts in, so
277
+ `'./docs/*.log'` and `'./**/*.log'` agree about `docs/`.
278
+
272
279
  Pass [`--no-ignore`](./cli.md#flags) to restore the full walk — the
273
280
  determinism switch for scripted use, since results otherwise depend on
274
281
  `.gitignore` state. It disables only the `.gitignore` respect; the built-in
@@ -285,8 +292,8 @@ SELECT path FROM './node_modules/*/package.json'; -- scans it anyway
285
292
  SELECT path FROM './dist'; -- scans dist/ even when gitignored
286
293
  ```
287
294
 
288
- A `.gitignore` at or below the directory the scan starts in still filters
289
- beneath it; one above it is never read.
295
+ The `.gitignore` files in force there, including those above it, still
296
+ filter what lies beneath it.
290
297
 
291
298
  ### Hidden files
292
299
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirsql",
3
- "version": "0.4.74",
3
+ "version": "0.4.75",
4
4
  "description": "Ephemeral SQL index over a local directory",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/thekevinscott/dirsql",
@@ -221,10 +221,10 @@
221
221
  ]
222
222
  },
223
223
  "optionalDependencies": {
224
- "@dirsql/lib-linux-x64-gnu": "0.4.74",
225
- "@dirsql/lib-linux-arm64-gnu": "0.4.74",
226
- "@dirsql/lib-darwin-x64": "0.4.74",
227
- "@dirsql/lib-darwin-arm64": "0.4.74",
228
- "@dirsql/lib-win32-x64-msvc": "0.4.74"
224
+ "@dirsql/lib-linux-x64-gnu": "0.4.75",
225
+ "@dirsql/lib-linux-arm64-gnu": "0.4.75",
226
+ "@dirsql/lib-darwin-x64": "0.4.75",
227
+ "@dirsql/lib-darwin-arm64": "0.4.75",
228
+ "@dirsql/lib-win32-x64-msvc": "0.4.75"
229
229
  }
230
230
  }