Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
fix(open-knowledge): match every grep pattern (PRD-9854) (#7471)
Andrew Mikofalvyf2f2f08f3e11
diff --git a/.changeset/fix-grep-pattern-alternatives.md b/.changeset/fix-grep-pattern-alternatives.mdnew file mode 100644index 000000000..a0566bc49--- /dev/null+++ b/.changeset/fix-grep-pattern-alternatives.md@@ -0,0 +1,5 @@+---+"@inkeep/open-knowledge": patch+---++MCP shell searches now match all repeated grep patterns instead of only the last one.diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdindex 81d0250b8..eafc8e15c 100644--- a/THIRD_PARTY_NOTICES.md+++ b/THIRD_PARTY_NOTICES.md@@ -6703,7 +6703,7 @@ Copyright (c) 2026 Inkeep## Patched dependencies-The following MIT-licensed packages are patched in this repository via pnpm's `patchedDependencies` mechanism. Modifications are released under the same MIT license as the upstream package. Patch files live under `patches/` in the source repo; the bundled output of every shipped artifact incorporates the patched code.+The following packages are patched in this repository via pnpm's `patchedDependencies` mechanism. Modifications are released under each upstream package's license. Patch files live under `patches/` in the source repo; the bundled output of every shipped artifact incorporates the patched code.| Package | Patch file || --- | --- |@@ -6716,6 +6716,7 @@ The following MIT-licensed packages are patched in this repository via pnpm's `p| `@tiptap/[email protected]` | `patches/@tiptap%[email protected]` || `@xterm/[email protected]` | `patches/@xterm%[email protected]` || `[email protected]` | `patches/[email protected]` |+| `[email protected]` | `patches/[email protected]` || `[email protected]` | `patches/[email protected]` || `[email protected]` | `patches/[email protected]` || `[email protected]` | `patches/[email protected]` |diff --git a/packages/server/package.json b/packages/server/package.jsonindex 3e8b0028e..e7e466012 100644--- a/packages/server/package.json+++ b/packages/server/package.json@@ -51,7 +51,7 @@"ignore": "^5.3.2","ipaddr.js": "^2.3.0","jsonc-parser": "^3.3.1",- "just-bash": "~2.14.3",+ "just-bash": "2.14.5","mermaid": "^11.14.0","mrmime": "^2.0.1","pino": "^10.3.1",diff --git a/packages/server/src/bash/index.test.ts b/packages/server/src/bash/index.test.tsindex f0f639cfb..e6a72dab1 100644--- a/packages/server/src/bash/index.test.ts+++ b/packages/server/src/bash/index.test.ts@@ -61,6 +61,12 @@ describe('just-bash + OverlayFs (per-call cwd)', () => {mkdirSync(join(root, 'sub'), { recursive: true });writeFileSync(join(root, 'file.txt'), 'hello\nworld\n');writeFileSync(join(root, 'sub', 'nested.md'), 'nested content\n');+ writeFileSync(join(root, 'zero-width.txt'), 'foo\n');+ writeFileSync(join(root, 'adjacent-zero-width.txt'), 'afoo\nar\n');+ writeFileSync(+ join(root, 'patterns.txt'),+ 'Request\nrequest\nbar\na.b\nx*y\na|b\nother\nfoobar\nbarfoo\n',+ );});afterAll(() => {@@ -127,6 +133,114 @@ describe('just-bash + OverlayFs (per-call cwd)', () => {});});+ describe('grep pattern alternatives', () => {+ it.each([+ ['-c -e Request -e dominance', '1\n', 0],+ ['-c -e dominance -e Request', '1\n', 0],+ ['-n -e Request -e bar', '1:Request\n3:bar\n8:foobar\n9:barfoo\n', 0],+ ["-F -e 'a.b' -e 'x*y' -e 'a|b'", 'a.b\nx*y\na|b\n', 0],+ ['-x -e Request -e bar', 'Request\nbar\n', 0],+ ["-e '^Request$' -e '^bar$'", 'Request\nbar\n', 0],+ ["-P -o -e 'Re\\Kquest' -e 'ba\\Kr'", 'quest\nr\nr\nr\n', 0],+ ["-P -e '(?<word>Request)' -e '(?<word>bar)'", 'Request\nbar\nfoobar\nbarfoo\n', 0],+ ['-o -e foo -e bar', 'bar\nfoo\nbar\nbar\nfoo\n', 0],+ ['-o -e foo -e foobar', 'foobar\nfoo\n', 0],+ ['-o -e foobar -e foo', 'foobar\nfoo\n', 0],+ ['-w -e Request -e bar', 'Request\nbar\n', 0],+ ["-c -e '^' -e missing", '9\n', 0],+ ["-q -e '' -e missing", '', 0],+ ['-E -x -e Request -e bar', 'Request\nbar\n', 0],+ ['-F -x -e Request -e bar', 'Request\nbar\n', 0],+ ['-i -x -e Request -e bar', 'Request\nrequest\nbar\n', 0],+ ['-v -x -e Request -e bar', 'request\na.b\nx*y\na|b\nother\nfoobar\nbarfoo\n', 0],+ ['-q -e Request -e dominance', '', 0],+ ['-q -e missing -e dominance', '', 1],+ ['-c -e missing -e dominance', '0\n', 1],+ ['-e missing -e dominance', '', 1],+ ["-e Request -e ''", 'Request\nrequest\nbar\na.b\nx*y\na|b\nother\nfoobar\nbarfoo\n', 0],+ ])('OR-combines patterns for grep %s', async (flags, stdout, exitCode) => {+ const result = await execBash(createBashInstance(root), `grep ${flags} patterns.txt`);+ expect(result).toEqual({ stdout, stderr: '', exitCode });+ });++ it.each([+ ["-x 'Request\nbar'", 'Request\nbar\n'],+ ["-x -e 'Request\nbar'", 'Request\nbar\n'],+ ["-x -e 'Request\nbar' -e dominance", 'Request\nbar\n'],+ ["-e 'missing\n'", 'Request\nrequest\nbar\na.b\nx*y\na|b\nother\nfoobar\nbarfoo\n'],+ ])('splits newline-separated pattern operands for grep %s', async (patterns, stdout) => {+ const result = await execBash(createBashInstance(root), `grep ${patterns} patterns.txt`);+ expect(result).toEqual({ stdout, stderr: '', exitCode: 0 });+ });++ it.each(["-e '\\(' -e '\\)'", "-e '^\\(a\\)\\1$'", "-e '^\\(a\\)\\1$' -e '^\\(b\\)\\1$'"])(+ 'rejects invalid or unsupported individual patterns: %s',+ async (flags) => {+ const result = await execBash(createBashInstance(root), `grep ${flags} patterns.txt`);+ expect(result.exitCode).toBe(2);+ expect(result.stdout).toBe('');+ expect(result.stderr).toContain('grep: invalid regular expression:');+ },+ );++ it.each([+ ["-o -e '' -e foo", 'foo\n\n'],+ ["-o -e foo -e 'q*'", 'foo\n\n'],+ ["-o -e 'x*' -e foo", 'foo\n\n'],+ ["-Eo -e 'a?' -e foo", 'foo\n\n'],+ ["-co -e foo -e 'q*'", '2\n'],+ ["-o -e '' -e ''", '\n\n\n\n'],+ ["-o -e '$' -e '$'", '\n'],+ ["-o -e '^' -e '^'", '\n'],+ ])('finishes a zero-width global scan for grep %s', async (flags, stdout) => {+ const result = await execBash(createBashInstance(root), `grep ${flags} zero-width.txt`);+ expect(result).toEqual({ stdout, stderr: '', exitCode: 0 });+ });++ it.each(["-e foo -e '\\('", "-e '\\(' -e foo"])(+ 'names only the invalid pattern for grep %s',+ async (flags) => {+ const result = await execBash(createBashInstance(root), `grep ${flags} patterns.txt`);+ expect(result).toEqual({+ stdout: '',+ stderr: 'grep: invalid regular expression: \\(\n',+ exitCode: 2,+ });+ },+ );++ it.each([+ ["-o -e 'x*' -e foo -e r", '\nfoo\n\n\nr\n\n'],+ ["-o -e foo -e r -e 'x*'", '\nfoo\n\n\nr\n\n'],+ ["-co -e 'x*' -e foo -e r", '6\n'],+ ["-o -e '^' -e foo -e r", '\nfoo\n\nr\n'],+ ["-i -o -e 'x*' -e FOO -e R", '\nfoo\n\n\nr\n\n'],+ ["-P -o -e 'x*' -e 'f\\Koo' -e r", '\noo\n\n\nr\n\n'],+ ])('keeps a match that follows an empty match for grep %s', async (flags, stdout) => {+ const result = await execBash(+ createBashInstance(root),+ `grep ${flags} adjacent-zero-width.txt`,+ );+ expect(result).toEqual({ stdout, stderr: '', exitCode: 0 });+ });++ it('matches every pattern from piped input', async () => {+ const result = await execBash(+ createBashInstance(root),+ 'cat patterns.txt | grep -x -e Request -e bar',+ );+ expect(result).toEqual({ stdout: 'Request\nbar\n', stderr: '', exitCode: 0 });+ });++ it('keeps file operands before explicit patterns', async () => {+ const result = await execBash(+ createBashInstance(root),+ 'grep patterns.txt -x -e Request -e bar',+ );+ expect(result).toEqual({ stdout: 'Request\nbar\n', stderr: '', exitCode: 0 });+ });+ });+describe('StdoutOverflowError', () => {it('is exported and carries limit/actual/partial', () => {const err = new StdoutOverflowError(10, 20, { stdout: 'abc', stderr: '', exitCode: 0 });diff --git a/packages/server/src/bash/index.ts b/packages/server/src/bash/index.tsindex abc910733..0a1b4efe5 100644--- a/packages/server/src/bash/index.ts+++ b/packages/server/src/bash/index.ts@@ -1,9 +1,8 @@import { isAbsolute, resolve } from 'node:path';/*- * UPSTREAM([email protected]): below this floor the sandbox-containment gate- * hardcodes the POSIX separator, so every backslash-separated path below the- * root fails containment on Windows. Keep the range in package.json at or above- * it.+ * UPSTREAM([email protected]): releases before 2.14.3 hardcode the POSIX separator+ * in the containment gate, rejecting backslash-separated Windows paths below+ * the root. Keep package.json at or above that containment floor.*/import { Bash, OverlayFs } from 'just-bash';diff --git a/packages/server/src/mcp/tools/exec.test.ts b/packages/server/src/mcp/tools/exec.test.tsindex 7c0b88355..b5ccf070b 100644--- a/packages/server/src/mcp/tools/exec.test.ts+++ b/packages/server/src/mcp/tools/exec.test.ts@@ -154,6 +154,45 @@ describe('exec — happy path', () => {expect(paths).not.toContain('articles/c.md');});+ test.each([+ ['-e Request -e dominance', ['requests/R001.md']],+ ['-e dominance -e Request', ['requests/R001.md']],+ ['-e Request -e other', ['requests/R001.md', 'requests/R002.md']],+ ["-e '^Request$' -e '^other$'", ['requests/R001.md', 'requests/R002.md']],+ ])(+ 'grep %s preserves every pattern and attributes only matched files',+ async (patterns, paths) => {+ const project = await bootstrap();+ mkdirSync(resolve(project, 'requests'));+ const sources: Record<string, string> = {+ 'requests/R001.md': 'Request\n',+ 'requests/R002.md': 'other\n',+ 'requests/R003.md': 'unrelated\n',+ };+ for (const [path, source] of Object.entries(sources)) {+ writeFileSync(resolve(project, path), source);+ }++ const result = (await buildExecResult(+ { command: `grep -rn ${patterns} requests` },+ { resolveCwd: async () => project, serverUrl: undefined, config: DEFAULT_CONFIG },+ )) as ExecResult;++ expect(result.isError).toBeFalsy();+ for (const path of paths) {+ expect(result.content[0].text).toContain(`${path}:1:${sources[path]}`);+ }+ expect(+ fileEntries(structured(result))+ .map((entry) => entry.path)+ .sort(),+ ).toEqual(paths);+ for (const [path, source] of Object.entries(sources)) {+ expect(readFileSync(resolve(project, path), 'utf8')).toBe(source);+ }+ },+ );+test('ls surfaces directory entries with folder metadata', async () => {const project = await bootstrap();const specs = resolve(project, 'specs');diff --git a/patches/[email protected] b/patches/[email protected]new file mode 100644index 000000000..c2c1e7164--- /dev/null+++ b/patches/[email protected]@@ -0,0 +1,48 @@+diff --git a/dist/bundle/chunks/chunk-3H6UQG3A.js b/dist/bundle/chunks/chunk-3H6UQG3A.js+index 4988d2ed64afd3d6ffe9392fe83805d2264a004e..646725c7dc702cffb4cd52c51250855797cad1f0 100644+--- a/dist/bundle/chunks/chunk-3H6UQG3A.js++++ b/dist/bundle/chunks/chunk-3H6UQG3A.js+@@ -1,5 +1,41 @@+-import{a as x}from"./chunk-SNN4IESC.js";import{a as z,b as j}from"./chunk-2TRDZQLB.js";import{a as X,b as Z,c as q}from"./chunk-74CEPOFO.js";var ne={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},J={name:"grep",async execute(t,s){if(Z(t))return X(ne);let l=!1,f=!1,c=!1,p=!1,m=!1,a=!1,n=!1,u=!1,y=!1,w=!1,h=!1,d=!1,F=!1,P=!1,B=!1,$=0,T=0,C=0,W=[],A=[],L=[],R=null,I=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("-")&&i!=="-"){if(i==="-e"&&r+1<t.length){R=t[++r];continue}if(i.startsWith("--include=")){W.push(i.slice(10));continue}if(i.startsWith("--exclude=")){A.push(i.slice(10));continue}if(i.startsWith("--exclude-dir=")){L.push(i.slice(14));continue}if(i.startsWith("--max-count=")){$=parseInt(i.slice(12),10);continue}let b=i.match(/^-m(\d+)$/);if(b){$=parseInt(b[1],10);continue}if(i==="-m"&&r+1<t.length){$=parseInt(t[++r],10);continue}let o=i.match(/^-([ABC])(\d+)$/);if(o){let e=parseInt(o[2],10);o[1]==="A"?C=e:o[1]==="B"?T=e:o[1]==="C"&&(T=e,C=e);continue}if((i==="-A"||i==="-B"||i==="-C")&&r+1<t.length){let e=parseInt(t[++r],10);i==="-A"?C=e:i==="-B"?T=e:(T=e,C=e);continue}let g=i.startsWith("--")?[i]:i.slice(1).split("");for(let e of g)if(e==="i"||e==="--ignore-case")l=!0;else if(e==="n"||e==="--line-number")f=!0;else if(e==="v"||e==="--invert-match")c=!0;else if(e==="c"||e==="--count")p=!0;else if(e==="l"||e==="--files-with-matches")m=!0;else if(e==="L"||e==="--files-without-match")a=!0;else if(e==="r"||e==="R"||e==="--recursive")n=!0;else if(e==="w"||e==="--word-regexp")u=!0;else if(e==="x"||e==="--line-regexp")y=!0;else if(e==="E"||e==="--extended-regexp")w=!0;else if(e==="P"||e==="--perl-regexp")h=!0;else if(e==="F"||e==="--fixed-strings")d=!0;else if(e==="o"||e==="--only-matching")F=!0;else if(e==="h"||e==="--no-filename")P=!0;else if(e==="q"||e==="--quiet"||e==="--silent")B=!0;else{if(e.startsWith("--"))return q("grep",e);if(e.length===1)return q("grep",`-${e}`)}}else R===null?R=i:I.push(i)}if(R===null)return{stdout:"",stderr:`grep: missing pattern+-`,exitCode:2};let Y=d?"fixed":w?"extended":h?"perl":"basic",O,Q,U;try{let r=j(R,{mode:Y,ignoreCase:l,wholeWord:u,lineRegexp:y});O=r.regex,Q=r.kResetGroup,U=r.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${R}++import{a as x}from"./chunk-SNN4IESC.js";import{a as z,b as j}from"./chunk-2TRDZQLB.js";import{a as X,b as Z,c as q}from"./chunk-74CEPOFO.js";++function combineGrepPatterns(compiled) {++ if (compiled.length === 1) return compiled[0];++ return {++ kResetGroup: 1,++ regex: {++ lastIndex: 0,++ exec(input) {++ if (this.lastIndex > input.length) {++ this.lastIndex = 0;++ return null;++ }++ let match = null;++ let nextIndex = 0;++ for (const { regex, kResetGroup } of compiled) {++ regex.lastIndex = this.lastIndex;++ const candidate = regex.exec(input);++ if (candidate && (match === null || candidate.index < match.index ||++ (candidate.index === match.index && candidate[0].length > match[0].length))) {++ const value = kResetGroup === undefined ? candidate[0] : candidate[kResetGroup] ?? "";++ candidate[1] = value;++ match = candidate;++ nextIndex = candidate.index + candidate[0].length;++ }++ }++ this.lastIndex = nextIndex;++ return match;++ },++ test(input) {++ this.lastIndex = 0;++ return this.exec(input) !== null;++ },++ },++ };++}++++var ne={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},J={name:"grep",async execute(t,s){if(Z(t))return X(ne);let l=!1,f=!1,c=!1,p=!1,m=!1,a=!1,n=!1,u=!1,y=!1,w=!1,h=!1,d=!1,F=!1,P=!1,B=!1,$=0,T=0,C=0,W=[],A=[],L=[],R=[],I=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.startsWith("-")&&i!=="-"){if(i==="-e"&&r+1<t.length){R.push(t[++r]);continue}if(i.startsWith("--include=")){W.push(i.slice(10));continue}if(i.startsWith("--exclude=")){A.push(i.slice(10));continue}if(i.startsWith("--exclude-dir=")){L.push(i.slice(14));continue}if(i.startsWith("--max-count=")){$=parseInt(i.slice(12),10);continue}let b=i.match(/^-m(\d+)$/);if(b){$=parseInt(b[1],10);continue}if(i==="-m"&&r+1<t.length){$=parseInt(t[++r],10);continue}let o=i.match(/^-([ABC])(\d+)$/);if(o){let e=parseInt(o[2],10);o[1]==="A"?C=e:o[1]==="B"?T=e:o[1]==="C"&&(T=e,C=e);continue}if((i==="-A"||i==="-B"||i==="-C")&&r+1<t.length){let e=parseInt(t[++r],10);i==="-A"?C=e:i==="-B"?T=e:(T=e,C=e);continue}let g=i.startsWith("--")?[i]:i.slice(1).split("");for(let e of g)if(e==="i"||e==="--ignore-case")l=!0;else if(e==="n"||e==="--line-number")f=!0;else if(e==="v"||e==="--invert-match")c=!0;else if(e==="c"||e==="--count")p=!0;else if(e==="l"||e==="--files-with-matches")m=!0;else if(e==="L"||e==="--files-without-match")a=!0;else if(e==="r"||e==="R"||e==="--recursive")n=!0;else if(e==="w"||e==="--word-regexp")u=!0;else if(e==="x"||e==="--line-regexp")y=!0;else if(e==="E"||e==="--extended-regexp")w=!0;else if(e==="P"||e==="--perl-regexp")h=!0;else if(e==="F"||e==="--fixed-strings")d=!0;else if(e==="o"||e==="--only-matching")F=!0;else if(e==="h"||e==="--no-filename")P=!0;else if(e==="q"||e==="--quiet"||e==="--silent")B=!0;else{if(e.startsWith("--"))return q("grep",e);if(e.length===1)return q("grep",`-${e}`)}}else I.push(i)}if(R.length===0){let r=I.shift();if(r===void 0)return{stdout:"",stderr:`grep: missing pattern++`,exitCode:2};R.push(r)}R=R.flatMap(r=>r.split("\n"));let Y=d?"fixed":w?"extended":h?"perl":"basic",O,Q,U,invalidPattern;try{let r=combineGrepPatterns(R.map(pattern=>{invalidPattern=pattern;return j(pattern,{mode:Y,ignoreCase:l,wholeWord:u,lineRegexp:y})}));O=r.regex,Q=r.kResetGroup,U=r.preFilter}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${invalidPattern}+ `,exitCode:2}}if(I.length===0&&s.stdin!==void 0){let r=z(s.stdin,O,{invertMatch:c,showLineNumbers:f,countOnly:p,filename:"",onlyMatching:F,beforeContext:T,afterContext:C,maxCount:$,kResetGroup:Q,preFilter:U});return B?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(I.length===0)return{stdout:"",stderr:`grep: no input files+ `,exitCode:2};let M="",S="",D=!1,k=!1,v=[];for(let r of I)if(r.includes("*")||r.includes("?")||r.includes("[")){let i=await ie(r,s);if(n)for(let b of i){let o=await H(b.path,s,W,A,L,b.isFile);v.push(...o)}else v.push(...i)}else if(n){let i=await H(r,s,W,A,L);v.push(...i)}else v.push({path:r});let ee=(v.length>1||n)&&!P,_=50;for(let r=0;r<v.length;r+=_){let i=v.slice(r,r+_),b=await Promise.all(i.map(async o=>{let g=o.path,e=g.split("/").pop()||g;if(A.length>0&&!n&&A.some(N=>x(e,N,{stripQuotes:!0}))||W.length>0&&!n&&!W.some(N=>x(e,N,{stripQuotes:!0})))return null;try{let N=s.fs.resolvePath(s.cwd,g),G=!1;if(o.isFile===void 0?G=(await s.fs.stat(N)).isDirectory:G=!o.isFile,G)return n?null:{error:`grep: ${g}: Is a directory+ `};let te=await s.fs.readFile(N),se=z(te,O,{invertMatch:c,showLineNumbers:f,countOnly:p,filename:ee?g:"",onlyMatching:F,beforeContext:T,afterContext:C,maxCount:$,kResetGroup:Q,preFilter:U});return{file:g,result:se}}catch{return{error:`grep: ${g}: No such file or directorydiff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 789cb5334..98d873855 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -155,6 +155,7 @@ patchedDependencies:'@tiptap/[email protected]': cf143fe8d2092247ec0d3e596841b684f9f84e37d0eff4a1b45eb89f1e791c43'@xterm/[email protected]': 52e724ea4ed73d38923344d68d2e1e8503110de5870507336fe8b096d92d7d90[email protected]: b06bc76a3813cc8142d7f75f85020a8ebff65a0ee84fac816da25986da6aa2a1+ [email protected]: 4093617c8b341f27c6643c80bc7a1511f02a6d8b6c127f2669dde162d79e5c15[email protected]: d59ed459a6ae570e843d0829f844dde24c0697b883351b198034f47606766517[email protected]: bd17d922d19720e50c1805aeb59f56599bf2b15eefbb6e93fc84f7a548793f77[email protected]: c18b28f0bc922fd0abed32545bae498c471d8f715f8d5fac40e84840d4e23842@@ -1351,8 +1352,8 @@ importers:specifier: ^3.3.1version: 3.3.1just-bash:- specifier: ~2.14.3- version: 2.14.5([email protected])+ specifier: 2.14.5+ version: 2.14.5(patch_hash=4093617c8b341f27c6643c80bc7a1511f02a6d8b6c127f2669dde162d79e5c15)([email protected])mermaid:specifier: ~11.16.1version: 11.16.1@@ -20273,7 +20274,7 @@ snapshots:optionalDependencies:graceful-fs: 4.2.11+ [email protected](patch_hash=4093617c8b341f27c6643c80bc7a1511f02a6d8b6c127f2669dde162d79e5c15)([email protected]):dependencies:diff: 8.0.4fast-xml-parser: 5.10.1diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex 71392ca2c..90fa22114 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -301,6 +301,7 @@ patchedDependencies:'@tiptap/[email protected]': patches/@tiptap%[email protected]'@xterm/[email protected]': patches/@xterm%[email protected]'[email protected]': patches/[email protected]+ [email protected]: patches/[email protected]'[email protected]': patches/[email protected]'[email protected]': patches/[email protected][email protected]: patches/[email protected]diff --git a/scripts/generate-third-party-notices.mjs b/scripts/generate-third-party-notices.mjsindex 5d21e0795..cdd7c101f 100644--- a/scripts/generate-third-party-notices.mjs+++ b/scripts/generate-third-party-notices.mjs@@ -756,7 +756,7 @@ function build() {push('## Patched dependencies', '');push(- "The following MIT-licensed packages are patched in this repository via pnpm's `patchedDependencies` mechanism. Modifications are released under the same MIT license as the upstream package. Patch files live under `patches/` in the source repo; the bundled output of every shipped artifact incorporates the patched code.",+ "The following packages are patched in this repository via pnpm's `patchedDependencies` mechanism. Modifications are released under each upstream package's license. Patch files live under `patches/` in the source repo; the bundled output of every shipped artifact incorporates the patched code.",'',);push('| Package | Patch file |');diff --git a/test-support/configure-git-fixture.test-helper.ts b/test-support/configure-git-fixture.test-helper.tsindex c917badea..03a9dba8c 100644--- a/test-support/configure-git-fixture.test-helper.ts+++ b/test-support/configure-git-fixture.test-helper.ts@@ -10,15 +10,23 @@ export function configureTestGitRepository<T>(export function configureTestGitRepository<T>(repositoryPath: string,executeGit?: (args: readonly string[]) => T,-): T | void {- const args = ['-C', repositoryPath, 'config', '--local', 'maintenance.auto', 'false'];- if (executeGit) return executeGit(args);- execFileSync('git', args, {- env: Object.fromEntries(- Object.entries(process.env).filter(([name]) => !name.startsWith('GIT_')),- ),- stdio: 'pipe',- timeout: GIT_CONFIG_SPAWN_BUDGET_MS,- killSignal: 'SIGKILL',- });+): T | undefined {+ const args = ['-C', repositoryPath, 'config', '--local'];+ let result: T | undefined;+ for (const setting of ['receive.autoGC', 'maintenance.auto']) {+ const command = [...args, setting, 'false'];+ if (executeGit) {+ result = executeGit(command);+ } else {+ execFileSync('git', command, {+ env: Object.fromEntries(+ Object.entries(process.env).filter(([name]) => !name.startsWith('GIT_')),+ ),+ stdio: 'pipe',+ timeout: GIT_CONFIG_SPAWN_BUDGET_MS,+ killSignal: 'SIGKILL',+ });+ }+ }+ return result;}