diff --git a/package-lock.json b/package-lock.json index 62a46e3b2c..cb3760e927 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index e2c79976b3..7db6a881f8 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/packages/insomnia/package.json b/packages/insomnia/package.json index 9c3564435e..b79df6fc49 100644 --- a/packages/insomnia/package.json +++ b/packages/insomnia/package.json @@ -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", diff --git a/packages/insomnia/src/sync/git/mem-client.ts b/packages/insomnia/src/sync/git/mem-client.ts index b94e346541..541ec311eb 100644 --- a/packages/insomnia/src/sync/git/mem-client.ts +++ b/packages/insomnia/src/sync/git/mem-client.ts @@ -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', diff --git a/packages/insomnia/src/ui/insomniaFetch.ts b/packages/insomnia/src/ui/insomniaFetch.ts index ab72c8cb2e..bad025d715 100644 --- a/packages/insomnia/src/ui/insomniaFetch.ts +++ b/packages/insomnia/src/ui/insomniaFetch.ts @@ -73,7 +73,7 @@ export async function insomniaFetch({ } throw new ResponseFailError(errMsg, response); } - return isJson ? response.json() : response.text(); + return isJson ? response.json() : (response.text() as Promise); } catch (err) { if (err.name === 'AbortError') { throw new Error('insomniaFetch timed out'); diff --git a/packages/insomnia/src/ui/routes/runner.tsx b/packages/insomnia/src/ui/routes/runner.tsx index d7803f47c0..a6de677bc7 100644 --- a/packages/insomnia/src/ui/routes/runner.tsx +++ b/packages/insomnia/src/ui/routes/runner.tsx @@ -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 ? {parentFolders} : null; return ( - + + + {({ isSelected }) => ( + <> + {isSelected ? ( + + ) : ( + + )} + + )} + {parentFolderContainer} {item.method} = () => { > {item.name} - + ); }} @@ -826,34 +842,6 @@ export const Runner: FC<{}> = () => { export default Runner; -const RequestItem = ({ children, ...props }: GridListItemProps) => { - return ( - - {() => ( - <> - - - {({ isSelected }) => { - return ( - <> - {isSelected ? ( - - ) : ( - - )} - - ); - }} - - {children} - - )} - - ); -}; - // 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