Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update @types/node #7902

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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