Skip to content

Commit

Permalink
chore: update @types/node
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Oct 4, 2024
1 parent 6ee69c1 commit 01a8ea7
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 88 deletions.
2 changes: 1 addition & 1 deletion packages/remix-architect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"devDependencies": {
"@types/lambda-tester": "^3.6.1",
"@types/node": "^18.17.1",
"@types/node": "^18.19.54",
"lambda-tester": "^4.0.1",
"typescript": "^5.1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@types/gunzip-maybe": "^1.4.0",
"@types/jsesc": "^3.0.1",
"@types/lodash.debounce": "^4.0.6",
"@types/node": "^18.17.1",
"@types/node": "^18.19.54",
"@types/npmcli__package-json": "^4.0.0",
"@types/picomatch": "^2.3.0",
"@types/prettier": "^2.7.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"@types/express": "^4.17.9",
"@types/node": "^18.17.1",
"@types/node": "^18.19.54",
"@types/supertest": "^2.0.10",
"express": "^4.19.2",
"node-mocks-http": "^1.10.1",
Expand Down
1 change: 1 addition & 0 deletions packages/remix-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"devDependencies": {
"@types/cookie-signature": "^1.0.3",
"@types/node": "^18.19.54",
"@types/source-map-support": "^0.5.4",
"typescript": "^5.1.6"
},
Expand Down
16 changes: 3 additions & 13 deletions packages/remix-node/upload/fileUploadHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,15 @@ export function createFileUploadHandler({
}
}

// TODO: remove this typecast once TS fixed File class regression
// https://github.com/microsoft/TypeScript/issues/52166
return new NodeOnDiskFile(filepath, contentType) as unknown as File;
return new NodeOnDiskFile(filepath, contentType);
};
}

// TODO: remove this `Omit` usage once TS fixed File class regression
// https://github.com/microsoft/TypeScript/issues/52166
export class NodeOnDiskFile implements Omit<File, "constructor"> {
export class NodeOnDiskFile implements File {
name: string;
lastModified: number = 0;
webkitRelativePath: string = "";

// TODO: remove this property once TS fixed File class regression
// https://github.com/microsoft/TypeScript/issues/52166
prototype = File.prototype;

constructor(
private filepath: string,
public type: string,
Expand Down Expand Up @@ -201,9 +193,7 @@ export class NodeOnDiskFile implements Omit<File, "constructor"> {
start,
end,
}
// TODO: remove this typecast once TS fixed File class regression
// https://github.com/microsoft/TypeScript/issues/52166
) as unknown as Blob;
);
}

async arrayBuffer(): Promise<ArrayBuffer> {
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"@remix-run/server-runtime": "workspace:*",
"@remix-run/testing": "workspace:*",
"@types/node": "^18.17.1",
"@types/node": "^18.19.54",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"jest-environment-jsdom": "^29.7.0",
Expand Down
Loading

0 comments on commit 01a8ea7

Please sign in to comment.