bump ts 5.8 (#8618)

This commit is contained in:
Jack Kavanagh
2025-04-15 14:45:54 +02:00
committed by GitHub
parent 253be8a622
commit 3baeb86490
6 changed files with 29 additions and 52 deletions

20
package-lock.json generated
View File

@@ -39,7 +39,7 @@
"prettier-plugin-tailwindcss": "^0.6.11",
"tslib": "2.0.1",
"type-fest": "^4.15.0",
"typescript": "5.6.2",
"typescript": "5.8.3",
"typescript-eslint": "^8.29.0",
"vitest": "^2.0.4"
},
@@ -21802,9 +21802,9 @@
}
},
"node_modules/typescript": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz",
"integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==",
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"devOptional": true,
"license": "Apache-2.0",
"bin": {
@@ -23297,15 +23297,6 @@
"node": ">= 6"
}
},
"node_modules/yaml-source-map": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/yaml-source-map/-/yaml-source-map-2.1.1.tgz",
"integrity": "sha512-eILAwrW4K1WA83mJXF0PLyeBhL4t6v9xyesRYhncG1zh9UPc43mMRgFTCi2FRYpOgUvGECNlNjoiksiX2xBKVg==",
"license": "MIT",
"peerDependencies": {
"yaml": "^1.6.0"
}
},
"node_modules/yargs": {
"version": "17.7.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
@@ -23489,7 +23480,6 @@
"tough-cookie": "^4.1.3",
"uuid": "^9.0.1",
"yaml": "^2.7.1",
"yaml-source-map": "^2.1.1",
"zod": "^3.23.8"
},
"bin": {
@@ -23585,7 +23575,7 @@
"tailwindcss": "^3.4.3",
"tinykeys": "^2.1.0",
"type-fest": "^4.15.0",
"typescript": "^5.6.2",
"typescript": "^5.8.3",
"vite": "^5.2.8",
"vkbeautify": "^0.99.3",
"ws": "^8.17.1",

View File

@@ -57,7 +57,7 @@
"prettier-plugin-tailwindcss": "^0.6.11",
"tslib": "2.0.1",
"type-fest": "^4.15.0",
"typescript": "5.6.2",
"typescript": "5.8.3",
"typescript-eslint": "^8.29.0",
"vitest": "^2.0.4"
},

View File

@@ -174,7 +174,7 @@
"tailwindcss": "^3.4.3",
"tinykeys": "^2.1.0",
"type-fest": "^4.15.0",
"typescript": "^5.6.2",
"typescript": "^5.8.3",
"vite": "^5.2.8",
"vkbeautify": "^0.99.3",
"ws": "^8.17.1",

View File

@@ -149,14 +149,13 @@ export class MemClient {
dirEntry.children.push(file);
}
const dataBuff: Buffer = data instanceof Buffer ? data : Buffer.from(data, encoding);
let newContents = Buffer.alloc(0);
if (flag[0] === 'w') {
newContents = dataBuff;
newContents = typeof data === 'string' ? Buffer.from(data, encoding) : data;
} else if (flag[0] === 'a') {
const contentsBuff: Buffer = Buffer.from(file.contents, 'base64');
newContents = Buffer.concat([contentsBuff, dataBuff]);
newContents = Buffer.concat([contentsBuff, typeof data === 'string' ? Buffer.from(data, encoding) : data]);
} else {
throw new SystemError({
code: 'EBADF',

View File

@@ -73,7 +73,7 @@ export async function insomniaFetch<T = void>({
}
throw new ResponseFailError(errMsg, response);
}
return isJson ? response.json() : response.text();
return isJson ? response.json() : (response.text() as Promise<T>);
} catch (err) {
if (err.name === 'AbortError') {
throw new Error('insomniaFetch timed out');

View File

@@ -6,7 +6,6 @@ import {
DropIndicator,
GridList,
GridListItem,
type GridListItemProps,
Heading,
type Key,
Tab,
@@ -635,11 +634,28 @@ export const Runner: FC<{}> = () => {
parentFolders.length > 0 ? <span className="ml-2">{parentFolders}</span> : null;
return (
<RequestItem
<GridListItem
textValue={item.name}
className={`runner-request-list-${item.name} border border-solid border-transparent text-[--color-font]`}
style={{ outline: 'none' }}
>
<Button slot="drag" className="hover:cursor-grab">
<Icon icon="grip-vertical" className="mr-2 w-2 text-[--hl]" />
</Button>
<Checkbox slot="selection">
{({ isSelected }) => (
<>
{isSelected ? (
<i
className="fa fa-square-check fa-1x mr-2 h-4"
style={{ color: 'rgb(74 222 128)' }}
/>
) : (
<i className="fa fa-square fa-1x mr-2 h-4" />
)}
</>
)}
</Checkbox>
{parentFolderContainer}
<span className={`ml-2 text-xs uppercase http-method-${item.method}`}>{item.method}</span>
<span
@@ -648,7 +664,7 @@ export const Runner: FC<{}> = () => {
>
{item.name}
</span>
</RequestItem>
</GridListItem>
);
}}
</GridList>
@@ -826,34 +842,6 @@ export const Runner: FC<{}> = () => {
export default Runner;
const RequestItem = ({ children, ...props }: GridListItemProps) => {
return (
<GridListItem {...props}>
{() => (
<>
<Button slot="drag" className="hover:cursor-grab">
<Icon icon="grip-vertical" className="mr-2 w-2 text-[--hl]" />
</Button>
<Checkbox slot="selection">
{({ isSelected }) => {
return (
<>
{isSelected ? (
<i className="fa fa-square-check fa-1x mr-2 h-4" style={{ color: 'rgb(74 222 128)' }} />
) : (
<i className="fa fa-square fa-1x mr-2 h-4" />
)}
</>
);
}}
</Checkbox>
{children}
</>
)}
</GridListItem>
);
};
// This is required for tracking the active request for one runner execution
// Then in runner cancellation, both the active request and the runner execution will be canceled
// TODO(george): Potentially it could be merged with maps in request-timing.ts and cancellation.ts