-
Notifications
You must be signed in to change notification settings - Fork 173
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
refactor(server/upload): convert js to ts #2618
Conversation
const { ObjectHandlingError } = require('@/modules/core/errors/object') | ||
const { estimateStringMegabyteSize } = require('@/modules/core/utils/chunking') | ||
const { toMegabytesWith1DecimalPlace } = require('@/modules/core/utils/formatting') | ||
} from '@/modules/core/services/objects' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do make sure to test this, sometimes imports don't act as expected when converting from require() to import(), e.g. const XXX = require('asd')
is not necessarily always translated to a default import.
@@ -69,7 +78,7 @@ module.exports = (app) => { | |||
} | |||
let totalObjectsProcessed = 0 | |||
|
|||
const promises = [] | |||
const promises: Promise<boolean | void | string[]>[] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the promise result is irrelevant you can just do Promise<unknown>
This reverts commit e9f7286.
This reverts commit e9f7286.
* Revert "refactor(server/upload): convert js to ts (#2618)" This reverts commit e9f7286. * Revert "feat(logging): pass request logger to core/services/objects (#2599)" This reverts commit ee3e9af. * Revert "feat(server): configurable maximum objects POST size and improved logging (#2594)" This reverts commit 55cad96.
* Revert "refactor(server/upload): convert js to ts (#2618)" This reverts commit e9f7286. * Revert "feat(logging): pass request logger to core/services/objects (#2599)" This reverts commit ee3e9af. * Revert "feat(server): configurable maximum objects POST size and improved logging (#2594)" This reverts commit 55cad96.
Description & motivation
Typescript all the things 🧹 , well
packages/server/modules/core/rest/upload.js
at leastChanges:
To-do before merge:
Screenshots:
Validation of changes:
Checklist:
References