fix: Update dependencies to resolve deprecation warnings
This commit is contained in:
parent
635666dec9
commit
1ff083af27
File diff suppressed because it is too large
Load Diff
|
@ -151,7 +151,9 @@ describe('loadServerHierarchicalMemory', () => {
|
||||||
throw new Error('File not found');
|
throw new Error('File not found');
|
||||||
});
|
});
|
||||||
|
|
||||||
mockFs.readdir.mockImplementation(async (p) => {
|
mockFs.readdir.mockImplementation((async (
|
||||||
|
p: fsSync.PathLike,
|
||||||
|
): Promise<Dirent[]> => {
|
||||||
if (p === CWD) {
|
if (p === CWD) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
@ -171,8 +173,8 @@ describe('loadServerHierarchicalMemory', () => {
|
||||||
},
|
},
|
||||||
] as Dirent[];
|
] as Dirent[];
|
||||||
}
|
}
|
||||||
return [];
|
return [] as Dirent[];
|
||||||
});
|
}) as any);
|
||||||
|
|
||||||
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(
|
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(
|
||||||
CWD,
|
CWD,
|
||||||
|
@ -226,7 +228,9 @@ describe('loadServerHierarchicalMemory', () => {
|
||||||
throw new Error('File not found');
|
throw new Error('File not found');
|
||||||
});
|
});
|
||||||
|
|
||||||
mockFs.readdir.mockImplementation(async (p) => {
|
mockFs.readdir.mockImplementation((async (
|
||||||
|
p: fsSync.PathLike,
|
||||||
|
): Promise<Dirent[]> => {
|
||||||
if (p === CWD) {
|
if (p === CWD) {
|
||||||
return [
|
return [
|
||||||
{ name: 'sub', isFile: () => false, isDirectory: () => true },
|
{ name: 'sub', isFile: () => false, isDirectory: () => true },
|
||||||
|
@ -241,8 +245,8 @@ describe('loadServerHierarchicalMemory', () => {
|
||||||
},
|
},
|
||||||
] as Dirent[];
|
] as Dirent[];
|
||||||
}
|
}
|
||||||
return [];
|
return [] as Dirent[];
|
||||||
});
|
}) as any);
|
||||||
|
|
||||||
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(
|
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(
|
||||||
CWD,
|
CWD,
|
||||||
|
@ -288,7 +292,9 @@ describe('loadServerHierarchicalMemory', () => {
|
||||||
throw new Error('File not found');
|
throw new Error('File not found');
|
||||||
});
|
});
|
||||||
|
|
||||||
mockFs.readdir.mockImplementation(async (p) => {
|
mockFs.readdir.mockImplementation((async (
|
||||||
|
p: fsSync.PathLike,
|
||||||
|
): Promise<Dirent[]> => {
|
||||||
if (p === CWD) {
|
if (p === CWD) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
@ -317,8 +323,8 @@ describe('loadServerHierarchicalMemory', () => {
|
||||||
},
|
},
|
||||||
] as Dirent[];
|
] as Dirent[];
|
||||||
}
|
}
|
||||||
return [];
|
return [] as Dirent[];
|
||||||
});
|
}) as any);
|
||||||
|
|
||||||
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(
|
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(
|
||||||
CWD,
|
CWD,
|
||||||
|
@ -349,11 +355,14 @@ describe('loadServerHierarchicalMemory', () => {
|
||||||
} as Dirent);
|
} as Dirent);
|
||||||
}
|
}
|
||||||
|
|
||||||
mockFs.readdir.mockImplementation(async (p) => {
|
mockFs.readdir.mockImplementation((async (
|
||||||
|
p: fsSync.PathLike,
|
||||||
|
): Promise<Dirent[]> => {
|
||||||
if (p === CWD) return dirNames;
|
if (p === CWD) return dirNames;
|
||||||
if (p.toString().startsWith(path.join(CWD, 'deep_dir_'))) return [];
|
if (p.toString().startsWith(path.join(CWD, 'deep_dir_')))
|
||||||
return [];
|
return [] as Dirent[];
|
||||||
});
|
return [] as Dirent[];
|
||||||
|
}) as any);
|
||||||
mockFs.access.mockRejectedValue(new Error('not found'));
|
mockFs.access.mockRejectedValue(new Error('not found'));
|
||||||
|
|
||||||
await loadServerHierarchicalMemory(CWD, true);
|
await loadServerHierarchicalMemory(CWD, true);
|
||||||
|
|
Loading…
Reference in New Issue