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

@uppy/companion: show deprecation message when using legacy s3 options #3944

Merged
merged 1 commit into from Aug 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/@uppy/companion/src/config/companion.js
Expand Up @@ -89,10 +89,10 @@ const validateConfig = (companionOptions) => {
const { providerOptions, periodicPingUrls } = companionOptions

if (providerOptions) {
const deprecatedOptions = { microsoft: 'onedrive', google: 'drive' }
Object.keys(deprecatedOptions).forEach((deprected) => {
if (providerOptions[deprected]) {
throw new Error(`The Provider option "${deprected}" is no longer supported. Please use the option "${deprecatedOptions[deprected]}" instead.`)
const deprecatedOptions = { microsoft: 'providerOptions.onedrive', google: 'providerOptions.drive', s3: 's3' }
Object.keys(deprecatedOptions).forEach((deprecated) => {
if (Object.prototype.hasOwnProperty.call(providerOptions, deprecated)) {
throw new Error(`The Provider option "providerOptions.${deprecated}" is no longer supported. Please use the option "${deprecatedOptions[deprecated]}" instead.`)
}
})
}
Expand Down