@marinate-audit/engine
Advanced tools
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EAGP,SAAS,EAET,MAAM,EACN,OAAO,EAIR,MAAM,YAAY,CAAC;AAwOpB,wBAAgB,OAAO,CACrB,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,cAAc,GACtB,MAAM,CA+DR"} | ||
| {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EAGP,SAAS,EAET,MAAM,EACN,OAAO,EAIR,MAAM,YAAY,CAAC;AAqQpB,wBAAgB,OAAO,CACrB,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,cAAc,GACtB,MAAM,CA+DR"} |
+33
-11
@@ -23,8 +23,12 @@ /** | ||
| // Minimal glob: ** matches across separators, * within a segment. | ||
| // | ||
| // Single pass with an ordered alternation so `**` is consumed before `*`. The | ||
| // previous version chained four .replace() calls and used a literal NUL byte as | ||
| // the `**` placeholder to stop the two star rules colliding. That worked, but it | ||
| // put a 0x00 in the source — which makes `file` report this module as binary data | ||
| // and makes BSD grep silently return NO MATCH instead of an error. A core file | ||
| // that cannot be searched is a real hazard: it cost two wrong conclusions about | ||
| // whether the price-context code was wired up at all. No sentinel, no problem. | ||
| const re = new RegExp('^' + | ||
| glob | ||
| .replace(/[.+^${}()|[\]\\]/g, '\\$&') | ||
| .replace(/\*\*/g, ' |