update undici lint

This commit is contained in:
Connor Peet 2025-09-26 10:54:13 -07:00
parent 307361f0ac
commit 3e4ee8ef9e
No known key found for this signature in database
GPG Key ID: CF8FD2EA0DBC61BD
2 changed files with 6 additions and 8 deletions

View File

@ -827,6 +827,7 @@ export default tseslint.config(
'string_decoder',
'tas-client-umd',
'tls',
'undici',
'undici-types',
'url',
'util',

View File

@ -6,7 +6,6 @@
import { ChildProcessWithoutNullStreams, spawn } from 'child_process';
import { readFile } from 'fs/promises';
import { homedir } from 'os';
// eslint-disable-next-line local/code-import-patterns
import type { RequestInit as UndiciRequestInit } from 'undici';
import { parseEnvFile } from '../../../base/common/envfile.js';
import { untildify } from '../../../base/common/labels.js';
@ -159,13 +158,11 @@ class McpHTTPHandleNode extends McpHTTPHandle {
});
// And then rewrite the URL to be http://localhost/<fragment>
httpUrl = uri
.with({
scheme: 'http',
authority: 'localhost', // HTTP always wants a host (not that we're using it), but if we're using a socket or pipe then localhost is sorta right anyway
path: uri.fragment,
})
.toString(true);
httpUrl = uri.with({
scheme: 'http',
authority: 'localhost', // HTTP always wants a host (not that we're using it), but if we're using a socket or pipe then localhost is sorta right anyway
path: uri.fragment,
}).toString(true);
}
const undiciResponse = await fetch(httpUrl, undiciInit);