From 9810cc86b4e44533c0d5c03319e4216aef90e92c Mon Sep 17 00:00:00 2001 From: Trent Nadeau Date: Mon, 5 Aug 2024 04:43:23 -0400 Subject: [PATCH 01/65] @uppy/tus: Fix onShouldRetry type signature (#5387) --- packages/@uppy/tus/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@uppy/tus/src/index.ts b/packages/@uppy/tus/src/index.ts index 399fa135fb..eba999df58 100644 --- a/packages/@uppy/tus/src/index.ts +++ b/packages/@uppy/tus/src/index.ts @@ -53,7 +53,7 @@ export interface TusOpts err: tus.DetailedError, retryAttempt: number, options: TusOpts, - next: (e: tus.DetailedError) => void, + next: (e: tus.DetailedError) => boolean, ) => boolean retryDelays?: number[] withCredentials?: boolean From 9e69b7fc26709d45c7ec55e4180988861ffca64d Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 13 Aug 2024 16:08:35 +0200 Subject: [PATCH 02/65] meta: enforce `.ts` extension for relative import types (#5393) --- .eslintrc.js | 7 +++++-- packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts | 6 +++--- packages/@uppy/aws-s3/src/MultipartUploader.ts | 2 +- packages/@uppy/aws-s3/src/index.ts | 2 +- packages/@uppy/aws-s3/src/utils.ts | 2 +- .../@uppy/companion-client/src/CompanionPluginOptions.ts | 2 +- packages/@uppy/companion-client/src/Provider.ts | 2 +- packages/@uppy/core/src/BasePlugin.ts | 2 +- packages/@uppy/core/src/EventManager.ts | 2 +- packages/@uppy/core/src/Restricter.ts | 2 +- packages/@uppy/core/src/UIPlugin.ts | 4 ++-- packages/@uppy/core/src/Uppy.ts | 4 ++-- packages/@uppy/core/src/mocks/acquirerPlugin1.ts | 2 +- packages/@uppy/core/src/mocks/acquirerPlugin2.ts | 2 +- packages/@uppy/core/src/mocks/invalidPluginWithoutId.ts | 2 +- packages/@uppy/core/src/mocks/invalidPluginWithoutType.ts | 2 +- .../dashboard/src/components/FileItem/Buttons/index.tsx | 2 +- .../dashboard/src/components/FileItem/FileInfo/index.tsx | 2 +- packages/@uppy/dashboard/src/components/FileItem/index.tsx | 2 +- packages/@uppy/dashboard/src/components/FileList.tsx | 2 +- packages/@uppy/image-editor/src/Editor.tsx | 2 +- packages/@uppy/provider-views/src/Breadcrumbs.tsx | 2 +- .../@uppy/provider-views/src/ProviderView/AuthView.tsx | 4 ++-- packages/@uppy/provider-views/src/ProviderView/Header.tsx | 2 +- packages/@uppy/status-bar/src/StatusBar.tsx | 2 +- packages/@uppy/status-bar/src/StatusBarOptions.ts | 2 +- packages/@uppy/transloadit/src/Assembly.ts | 2 +- packages/@uppy/transloadit/src/AssemblyWatcher.ts | 2 +- packages/@uppy/transloadit/src/Client.ts | 2 +- packages/@uppy/utils/src/CompanionClientProvider.ts | 2 +- packages/@uppy/utils/src/ErrorWithCause.ts | 2 +- packages/@uppy/utils/src/UppyFile.ts | 2 +- packages/@uppy/utils/src/emitSocketProgress.ts | 4 ++-- packages/@uppy/utils/src/fileFilters.ts | 2 +- packages/@uppy/utils/src/generateFileID.ts | 2 +- packages/@uppy/utils/src/getAllowedMetaFields.ts | 2 +- packages/@uppy/utils/src/getBytesRemaining.ts | 2 +- packages/@uppy/utils/src/getETA.ts | 2 +- packages/@uppy/utils/src/getFileType.test.ts | 2 +- packages/@uppy/utils/src/getSpeed.ts | 2 +- packages/@uppy/vue/src/dashboard-modal.ts | 2 +- packages/@uppy/vue/src/dashboard.ts | 2 +- 42 files changed, 52 insertions(+), 49 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6531783903..367b80a878 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -447,8 +447,11 @@ module.exports = { rules: { 'no-extra-semi': 'off', 'no-restricted-syntax': ['error', { - selector: 'ImportDeclaration[importKind="type"][source.value=/^(\\.+|@uppy\\x2F[a-z-0-9]+)\\x2F/]:not([source.value=/^@uppy\\x2Futils\\x2F/]):not([source.value=/\\.js$/])', - message: 'Use ".js" file extension for import type declarations', + selector: 'ImportDeclaration[importKind="type"][source.value=/^@uppy\\x2F[a-z-0-9]+\\x2F/]:not([source.value=/^@uppy\\x2Futils\\x2F/]):not([source.value=/\\.js$/])', + message: 'Use ".js" file extension for import type declarations from a different package', + }, { + selector: 'ImportDeclaration[importKind="type"][source.value=/^\\.\\.?\\x2F.+\\.js$/]', + message: 'Do not use ".js" file extension for relative import type declarations', }, { selector: 'ImportDeclaration[source.value=/^@uppy\\x2Futils\\x2Flib\\x2F.+\\.[mc]?[jt]sx?$/]', message: 'Do not use file extension when importing from @uppy/utils', diff --git a/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts b/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts index 3347d47f52..58f7f6eee7 100644 --- a/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts +++ b/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts @@ -4,10 +4,10 @@ import type { WrapPromiseFunctionType, } from '@uppy/utils/lib/RateLimitedQueue' import { pausingUploadReason, type Chunk } from './MultipartUploader.ts' -import type AwsS3Multipart from './index.js' +import type AwsS3Multipart from './index.ts' import { throwIfAborted } from './utils.ts' -import type { UploadPartBytesResult, UploadResult } from './utils.js' -import type { AwsS3MultipartOptions, uploadPartBytes } from './index.js' +import type { UploadPartBytesResult, UploadResult } from './utils.ts' +import type { AwsS3MultipartOptions, uploadPartBytes } from './index.ts' function removeMetadataFromURL(urlString: string) { const urlObject = new URL(urlString) diff --git a/packages/@uppy/aws-s3/src/MultipartUploader.ts b/packages/@uppy/aws-s3/src/MultipartUploader.ts index 2ca8fdf5b4..6f5397a7fd 100644 --- a/packages/@uppy/aws-s3/src/MultipartUploader.ts +++ b/packages/@uppy/aws-s3/src/MultipartUploader.ts @@ -1,7 +1,7 @@ import type { Uppy } from '@uppy/core' import { AbortController } from '@uppy/utils/lib/AbortController' import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { HTTPCommunicationQueue } from './HTTPCommunicationQueue.js' +import type { HTTPCommunicationQueue } from './HTTPCommunicationQueue.ts' const MB = 1024 * 1024 diff --git a/packages/@uppy/aws-s3/src/index.ts b/packages/@uppy/aws-s3/src/index.ts index be08c9db7e..bf4be9293f 100644 --- a/packages/@uppy/aws-s3/src/index.ts +++ b/packages/@uppy/aws-s3/src/index.ts @@ -21,7 +21,7 @@ import type { UploadResultWithSignal, MultipartUploadResultWithSignal, UploadPartBytesResult, -} from './utils.js' +} from './utils.ts' import createSignedURL from './createSignedURL.ts' import { HTTPCommunicationQueue } from './HTTPCommunicationQueue.ts' // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/packages/@uppy/aws-s3/src/utils.ts b/packages/@uppy/aws-s3/src/utils.ts index 835d457dcc..278ca6054f 100644 --- a/packages/@uppy/aws-s3/src/utils.ts +++ b/packages/@uppy/aws-s3/src/utils.ts @@ -1,7 +1,7 @@ import { createAbortError } from '@uppy/utils/lib/AbortController' import type { Body } from '@uppy/utils/lib/UppyFile' -import type { AwsS3Part } from './index.js' +import type { AwsS3Part } from './index.ts' export function throwIfAborted(signal?: AbortSignal | null): void { if (signal?.aborted) { diff --git a/packages/@uppy/companion-client/src/CompanionPluginOptions.ts b/packages/@uppy/companion-client/src/CompanionPluginOptions.ts index e7630e1844..cc19a2e69c 100644 --- a/packages/@uppy/companion-client/src/CompanionPluginOptions.ts +++ b/packages/@uppy/companion-client/src/CompanionPluginOptions.ts @@ -1,5 +1,5 @@ import type { UIPluginOptions } from '@uppy/core' -import type { tokenStorage } from './index.js' +import type { tokenStorage } from './index.ts' export interface CompanionPluginOptions extends UIPluginOptions { storage?: typeof tokenStorage diff --git a/packages/@uppy/companion-client/src/Provider.ts b/packages/@uppy/companion-client/src/Provider.ts index 2f76eae70e..bd0fb96214 100644 --- a/packages/@uppy/companion-client/src/Provider.ts +++ b/packages/@uppy/companion-client/src/Provider.ts @@ -7,7 +7,7 @@ import type { } from '@uppy/utils/lib/CompanionClientProvider' import type { UnknownProviderPlugin } from '@uppy/core/lib/Uppy.js' import RequestClient, { authErrorStatusCode } from './RequestClient.ts' -import type { CompanionPluginOptions } from './index.js' +import type { CompanionPluginOptions } from './index.ts' export interface Opts extends PluginOpts, CompanionPluginOptions { pluginId: string diff --git a/packages/@uppy/core/src/BasePlugin.ts b/packages/@uppy/core/src/BasePlugin.ts index 708865be80..8713e6ee49 100644 --- a/packages/@uppy/core/src/BasePlugin.ts +++ b/packages/@uppy/core/src/BasePlugin.ts @@ -16,7 +16,7 @@ import type { OptionalPluralizeLocale, } from '@uppy/utils/lib/Translator' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { State, UnknownPlugin, Uppy } from './Uppy.js' +import type { State, UnknownPlugin, Uppy } from './Uppy.ts' export type PluginOpts = { locale?: Locale diff --git a/packages/@uppy/core/src/EventManager.ts b/packages/@uppy/core/src/EventManager.ts index bb556a9cfe..529c38fe62 100644 --- a/packages/@uppy/core/src/EventManager.ts +++ b/packages/@uppy/core/src/EventManager.ts @@ -1,5 +1,5 @@ import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' -import type { Uppy, UppyEventMap, _UppyEventMap } from './Uppy.js' +import type { Uppy, UppyEventMap, _UppyEventMap } from './Uppy.ts' /** * Create a wrapper around an event emitter with a `remove` method to remove diff --git a/packages/@uppy/core/src/Restricter.ts b/packages/@uppy/core/src/Restricter.ts index a0a490890a..09c8622a20 100644 --- a/packages/@uppy/core/src/Restricter.ts +++ b/packages/@uppy/core/src/Restricter.ts @@ -5,7 +5,7 @@ import prettierBytes from '@transloadit/prettier-bytes' import match from 'mime-match' import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' import type { I18n } from '@uppy/utils/lib/Translator' -import type { State, NonNullableUppyOptions } from './Uppy.js' +import type { State, NonNullableUppyOptions } from './Uppy.ts' export type Restrictions = { maxFileSize: number | null diff --git a/packages/@uppy/core/src/UIPlugin.ts b/packages/@uppy/core/src/UIPlugin.ts index 74a68fccba..8ea1a490ca 100644 --- a/packages/@uppy/core/src/UIPlugin.ts +++ b/packages/@uppy/core/src/UIPlugin.ts @@ -5,8 +5,8 @@ import getTextDirection from '@uppy/utils/lib/getTextDirection' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import BasePlugin from './BasePlugin.ts' -import type { PluginOpts } from './BasePlugin.js' -import type { State } from './Uppy.js' +import type { PluginOpts } from './BasePlugin.ts' +import type { State } from './Uppy.ts' /** * Defer a frequent call to the microtask queue. diff --git a/packages/@uppy/core/src/Uppy.ts b/packages/@uppy/core/src/Uppy.ts index f41356f3de..d2ae0f260d 100644 --- a/packages/@uppy/core/src/Uppy.ts +++ b/packages/@uppy/core/src/Uppy.ts @@ -45,8 +45,8 @@ import { import packageJson from '../package.json' import locale from './locale.ts' -import type BasePlugin from './BasePlugin.js' -import type { Restrictions, ValidateableFile } from './Restricter.js' +import type BasePlugin from './BasePlugin.ts' +import type { Restrictions, ValidateableFile } from './Restricter.ts' type Processor = ( fileIDs: string[], diff --git a/packages/@uppy/core/src/mocks/acquirerPlugin1.ts b/packages/@uppy/core/src/mocks/acquirerPlugin1.ts index 6d0b967240..0f3516690d 100644 --- a/packages/@uppy/core/src/mocks/acquirerPlugin1.ts +++ b/packages/@uppy/core/src/mocks/acquirerPlugin1.ts @@ -1,6 +1,6 @@ import { vi } from 'vitest' // eslint-disable-line import/no-extraneous-dependencies import UIPlugin from '../UIPlugin.ts' -import type Uppy from '../Uppy.js' +import type Uppy from '../Uppy.ts' type mock = ReturnType diff --git a/packages/@uppy/core/src/mocks/acquirerPlugin2.ts b/packages/@uppy/core/src/mocks/acquirerPlugin2.ts index d841bdeb72..9d2290b69d 100644 --- a/packages/@uppy/core/src/mocks/acquirerPlugin2.ts +++ b/packages/@uppy/core/src/mocks/acquirerPlugin2.ts @@ -1,6 +1,6 @@ import { vi } from 'vitest' // eslint-disable-line import/no-extraneous-dependencies import UIPlugin from '../UIPlugin.ts' -import type Uppy from '../Uppy.js' +import type Uppy from '../Uppy.ts' type mock = ReturnType diff --git a/packages/@uppy/core/src/mocks/invalidPluginWithoutId.ts b/packages/@uppy/core/src/mocks/invalidPluginWithoutId.ts index 8d6789eff0..d2c02e30dc 100644 --- a/packages/@uppy/core/src/mocks/invalidPluginWithoutId.ts +++ b/packages/@uppy/core/src/mocks/invalidPluginWithoutId.ts @@ -1,5 +1,5 @@ import UIPlugin from '../UIPlugin.ts' -import type Uppy from '../Uppy.js' +import type Uppy from '../Uppy.ts' export default class InvalidPluginWithoutName extends UIPlugin { public type: string diff --git a/packages/@uppy/core/src/mocks/invalidPluginWithoutType.ts b/packages/@uppy/core/src/mocks/invalidPluginWithoutType.ts index 8485f491ed..4baeb573c9 100644 --- a/packages/@uppy/core/src/mocks/invalidPluginWithoutType.ts +++ b/packages/@uppy/core/src/mocks/invalidPluginWithoutType.ts @@ -1,5 +1,5 @@ import UIPlugin from '../UIPlugin.ts' -import type Uppy from '../Uppy.js' +import type Uppy from '../Uppy.ts' export default class InvalidPluginWithoutType extends UIPlugin { public id: string diff --git a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx index e39ee3831d..53b0d32b56 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx @@ -3,7 +3,7 @@ import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' import type Uppy from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' import copyToClipboard from '../../../utils/copyToClipboard.ts' -import type { DashboardState } from '../../../Dashboard.js' +import type { DashboardState } from '../../../Dashboard.ts' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx index d1fd1930f3..555f2364c0 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx @@ -5,7 +5,7 @@ import truncateString from '@uppy/utils/lib/truncateString' import type { I18n } from '@uppy/utils/lib/Translator' import type { UppyFile } from '@uppy/core' import MetaErrorMessage from '../MetaErrorMessage.tsx' -import type { DashboardState } from '../../../Dashboard.js' +import type { DashboardState } from '../../../Dashboard.ts' const renderFileName = (props: { file: UppyFile diff --git a/packages/@uppy/dashboard/src/components/FileItem/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/index.tsx index 9065f0fce8..ab284fd19b 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/index.tsx @@ -10,7 +10,7 @@ import FilePreviewAndLink from './FilePreviewAndLink/index.tsx' import FileProgress from './FileProgress/index.tsx' import FileInfo from './FileInfo/index.tsx' import Buttons from './Buttons/index.tsx' -import type { DashboardState } from '../../Dashboard.js' +import type { DashboardState } from '../../Dashboard.ts' type Props = { file: UppyFile diff --git a/packages/@uppy/dashboard/src/components/FileList.tsx b/packages/@uppy/dashboard/src/components/FileList.tsx index d848e6378e..2f6c34bd49 100644 --- a/packages/@uppy/dashboard/src/components/FileList.tsx +++ b/packages/@uppy/dashboard/src/components/FileList.tsx @@ -7,7 +7,7 @@ import type { UppyFile, Uppy, State } from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import FileItem from './FileItem/index.tsx' -import type { DashboardState } from '../Dashboard.js' +import type { DashboardState } from '../Dashboard.ts' type FileListProps = { id: string diff --git a/packages/@uppy/image-editor/src/Editor.tsx b/packages/@uppy/image-editor/src/Editor.tsx index 83a6407d3b..9164d88e00 100644 --- a/packages/@uppy/image-editor/src/Editor.tsx +++ b/packages/@uppy/image-editor/src/Editor.tsx @@ -7,7 +7,7 @@ import getCanvasDataThatFitsPerfectlyIntoContainer from './utils/getCanvasDataTh import getScaleFactorThatRemovesDarkCorners from './utils/getScaleFactorThatRemovesDarkCorners.ts' import limitCropboxMovementOnMove from './utils/limitCropboxMovementOnMove.ts' import limitCropboxMovementOnResize from './utils/limitCropboxMovementOnResize.ts' -import type ImageEditor from './ImageEditor.js' +import type ImageEditor from './ImageEditor.ts' type Props = { currentImage: UppyFile diff --git a/packages/@uppy/provider-views/src/Breadcrumbs.tsx b/packages/@uppy/provider-views/src/Breadcrumbs.tsx index 16f2c39e21..621033da3c 100644 --- a/packages/@uppy/provider-views/src/Breadcrumbs.tsx +++ b/packages/@uppy/provider-views/src/Breadcrumbs.tsx @@ -1,7 +1,7 @@ import type { PartialTreeFolder } from '@uppy/core/lib/Uppy.js' import { h, Fragment } from 'preact' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type ProviderView from './ProviderView/index.js' +import type ProviderView from './ProviderView/index.ts' type BreadcrumbsProps = { openFolder: ProviderView['openFolder'] diff --git a/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx b/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx index 5f04b9a4f1..3a8d5c9377 100644 --- a/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx @@ -2,8 +2,8 @@ import { h } from 'preact' import { useCallback } from 'preact/hooks' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type Translator from '@uppy/utils/lib/Translator' -import type { Opts } from './ProviderView.js' -import type ProviderViews from './ProviderView.js' +import type { Opts } from './ProviderView.ts' +import type ProviderViews from './ProviderView.ts' type AuthViewProps = { loading: boolean | string diff --git a/packages/@uppy/provider-views/src/ProviderView/Header.tsx b/packages/@uppy/provider-views/src/ProviderView/Header.tsx index 486d15d19d..3184e44497 100644 --- a/packages/@uppy/provider-views/src/ProviderView/Header.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/Header.tsx @@ -6,7 +6,7 @@ import type { PartialTreeFolder } from '@uppy/core/lib/Uppy.js' import classNames from 'classnames' import User from './User.tsx' import Breadcrumbs from '../Breadcrumbs.tsx' -import type ProviderView from './ProviderView.js' +import type ProviderView from './ProviderView.ts' type HeaderProps = { showBreadcrumbs: boolean diff --git a/packages/@uppy/status-bar/src/StatusBar.tsx b/packages/@uppy/status-bar/src/StatusBar.tsx index c445f8035a..9083288378 100644 --- a/packages/@uppy/status-bar/src/StatusBar.tsx +++ b/packages/@uppy/status-bar/src/StatusBar.tsx @@ -11,7 +11,7 @@ import StatusBarUI, { type StatusBarUIProps } from './StatusBarUI.tsx' // @ts-ignore We don't want TS to generate types for the package.json import packageJson from '../package.json' import locale from './locale.ts' -import type { StatusBarOptions } from './StatusBarOptions.js' +import type { StatusBarOptions } from './StatusBarOptions.ts' const speedFilterHalfLife = 2000 const ETAFilterHalfLife = 2000 diff --git a/packages/@uppy/status-bar/src/StatusBarOptions.ts b/packages/@uppy/status-bar/src/StatusBarOptions.ts index 83e157da91..dcda6b4337 100644 --- a/packages/@uppy/status-bar/src/StatusBarOptions.ts +++ b/packages/@uppy/status-bar/src/StatusBarOptions.ts @@ -1,5 +1,5 @@ import type { UIPluginOptions } from '@uppy/core/lib/UIPlugin.js' -import type StatusBarLocale from './locale.js' +import type StatusBarLocale from './locale.ts' export interface StatusBarOptions extends UIPluginOptions { showProgressDetails?: boolean diff --git a/packages/@uppy/transloadit/src/Assembly.ts b/packages/@uppy/transloadit/src/Assembly.ts index 7676ace25a..9ec009273f 100644 --- a/packages/@uppy/transloadit/src/Assembly.ts +++ b/packages/@uppy/transloadit/src/Assembly.ts @@ -8,7 +8,7 @@ import type { RateLimitedQueue, WrapPromiseFunctionType, } from '@uppy/utils/lib/RateLimitedQueue' -import type { AssemblyResponse } from './index.js' +import type { AssemblyResponse } from './index.ts' const ASSEMBLY_UPLOADING = 'ASSEMBLY_UPLOADING' const ASSEMBLY_EXECUTING = 'ASSEMBLY_EXECUTING' diff --git a/packages/@uppy/transloadit/src/AssemblyWatcher.ts b/packages/@uppy/transloadit/src/AssemblyWatcher.ts index 6982316dcc..a179ab02b2 100644 --- a/packages/@uppy/transloadit/src/AssemblyWatcher.ts +++ b/packages/@uppy/transloadit/src/AssemblyWatcher.ts @@ -1,7 +1,7 @@ import type { Uppy } from '@uppy/core' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import Emitter from 'component-emitter' -import type { AssemblyResponse } from './index.js' +import type { AssemblyResponse } from './index.ts' /** * Track completion of multiple assemblies. diff --git a/packages/@uppy/transloadit/src/Client.ts b/packages/@uppy/transloadit/src/Client.ts index abc6be7a72..cde4d06191 100644 --- a/packages/@uppy/transloadit/src/Client.ts +++ b/packages/@uppy/transloadit/src/Client.ts @@ -7,7 +7,7 @@ import fetchWithNetworkError from '@uppy/utils/lib/fetchWithNetworkError' import type { AssemblyResponse, OptionsWithRestructuredFields, -} from './index.js' +} from './index.ts' const ASSEMBLIES_ENDPOINT = '/assemblies' diff --git a/packages/@uppy/utils/src/CompanionClientProvider.ts b/packages/@uppy/utils/src/CompanionClientProvider.ts index 3318ef5a0a..4ef80ecbfd 100644 --- a/packages/@uppy/utils/src/CompanionClientProvider.ts +++ b/packages/@uppy/utils/src/CompanionClientProvider.ts @@ -1,4 +1,4 @@ -import type { CompanionFile } from './CompanionFile.js' +import type { CompanionFile } from './CompanionFile.ts' export type RequestOptions = { method?: string diff --git a/packages/@uppy/utils/src/ErrorWithCause.ts b/packages/@uppy/utils/src/ErrorWithCause.ts index b980c7f481..31a005b128 100644 --- a/packages/@uppy/utils/src/ErrorWithCause.ts +++ b/packages/@uppy/utils/src/ErrorWithCause.ts @@ -1,4 +1,4 @@ -import type NetworkError from './NetworkError.js' +import type NetworkError from './NetworkError.ts' import hasProperty from './hasProperty.ts' class ErrorWithCause extends Error { diff --git a/packages/@uppy/utils/src/UppyFile.ts b/packages/@uppy/utils/src/UppyFile.ts index e783520f2e..8867c53306 100644 --- a/packages/@uppy/utils/src/UppyFile.ts +++ b/packages/@uppy/utils/src/UppyFile.ts @@ -1,4 +1,4 @@ -import type { FileProgress } from './FileProgress.js' +import type { FileProgress } from './FileProgress.ts' export type Meta = Record diff --git a/packages/@uppy/utils/src/emitSocketProgress.ts b/packages/@uppy/utils/src/emitSocketProgress.ts index 2b21556459..9caf3718e5 100644 --- a/packages/@uppy/utils/src/emitSocketProgress.ts +++ b/packages/@uppy/utils/src/emitSocketProgress.ts @@ -1,6 +1,6 @@ import throttle from 'lodash/throttle.js' -import type { UppyFile } from './UppyFile.js' -import type { FileProgress } from './FileProgress.js' +import type { UppyFile } from './UppyFile.ts' +import type { FileProgress } from './FileProgress.ts' function emitSocketProgress( uploader: any, diff --git a/packages/@uppy/utils/src/fileFilters.ts b/packages/@uppy/utils/src/fileFilters.ts index 415bdef7a3..2ffd041e96 100644 --- a/packages/@uppy/utils/src/fileFilters.ts +++ b/packages/@uppy/utils/src/fileFilters.ts @@ -1,4 +1,4 @@ -import type { UppyFile } from './UppyFile.js' +import type { UppyFile } from './UppyFile.ts' export function filterNonFailedFiles( files: UppyFile[], diff --git a/packages/@uppy/utils/src/generateFileID.ts b/packages/@uppy/utils/src/generateFileID.ts index 67ce8e2eb3..115f346995 100644 --- a/packages/@uppy/utils/src/generateFileID.ts +++ b/packages/@uppy/utils/src/generateFileID.ts @@ -1,4 +1,4 @@ -import type { MinimalRequiredUppyFile, UppyFile } from './UppyFile.js' +import type { MinimalRequiredUppyFile, UppyFile } from './UppyFile.ts' import getFileType from './getFileType.ts' function encodeCharacter(character: string): string { diff --git a/packages/@uppy/utils/src/getAllowedMetaFields.ts b/packages/@uppy/utils/src/getAllowedMetaFields.ts index ffdd5bf78c..423e92307d 100644 --- a/packages/@uppy/utils/src/getAllowedMetaFields.ts +++ b/packages/@uppy/utils/src/getAllowedMetaFields.ts @@ -1,4 +1,4 @@ -import type { Meta } from './UppyFile.js' +import type { Meta } from './UppyFile.ts' export default function getAllowedMetaFields( fields: string[] | boolean, diff --git a/packages/@uppy/utils/src/getBytesRemaining.ts b/packages/@uppy/utils/src/getBytesRemaining.ts index fdb0e97b18..5c21183b04 100644 --- a/packages/@uppy/utils/src/getBytesRemaining.ts +++ b/packages/@uppy/utils/src/getBytesRemaining.ts @@ -1,4 +1,4 @@ -import type { FileProgress } from './FileProgress.js' +import type { FileProgress } from './FileProgress.ts' export default function getBytesRemaining(fileProgress: FileProgress): number { if (fileProgress.bytesTotal == null) return 0 diff --git a/packages/@uppy/utils/src/getETA.ts b/packages/@uppy/utils/src/getETA.ts index 9a03b36209..e85416aeec 100644 --- a/packages/@uppy/utils/src/getETA.ts +++ b/packages/@uppy/utils/src/getETA.ts @@ -1,6 +1,6 @@ import getSpeed from './getSpeed.ts' import getBytesRemaining from './getBytesRemaining.ts' -import type { FileProgress } from './FileProgress.js' +import type { FileProgress } from './FileProgress.ts' export default function getETA(fileProgress: FileProgress): number { if (!fileProgress.bytesUploaded) return 0 diff --git a/packages/@uppy/utils/src/getFileType.test.ts b/packages/@uppy/utils/src/getFileType.test.ts index d85e6e8683..2316961b21 100644 --- a/packages/@uppy/utils/src/getFileType.test.ts +++ b/packages/@uppy/utils/src/getFileType.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import getFileType from './getFileType.ts' -import type { UppyFile } from './UppyFile.js' +import type { UppyFile } from './UppyFile.ts' describe('getFileType', () => { it('should trust the filetype if the file comes from a remote source', () => { diff --git a/packages/@uppy/utils/src/getSpeed.ts b/packages/@uppy/utils/src/getSpeed.ts index 9520f0f007..e04aa0ef41 100644 --- a/packages/@uppy/utils/src/getSpeed.ts +++ b/packages/@uppy/utils/src/getSpeed.ts @@ -1,4 +1,4 @@ -import type { FileProgress } from './FileProgress.js' +import type { FileProgress } from './FileProgress.ts' export default function getSpeed(fileProgress: FileProgress): number { if (!fileProgress.bytesUploaded) return 0 diff --git a/packages/@uppy/vue/src/dashboard-modal.ts b/packages/@uppy/vue/src/dashboard-modal.ts index 75a1912aba..d1d795e25c 100644 --- a/packages/@uppy/vue/src/dashboard-modal.ts +++ b/packages/@uppy/vue/src/dashboard-modal.ts @@ -1,7 +1,7 @@ import { defineComponent, ref, watch, h, type PropType } from 'vue' import DashboardPlugin, { type DashboardOptions } from '@uppy/dashboard' import { Uppy } from '@uppy/core' -import type { Meta, Body } from '../../utils/src/UppyFile.js' +import type { Meta, Body } from '@uppy/utils/lib/UppyFile' import useUppy from './useUppy.ts' type DashboardModalOptions = Omit< diff --git a/packages/@uppy/vue/src/dashboard.ts b/packages/@uppy/vue/src/dashboard.ts index 7590628dac..f077b73d56 100644 --- a/packages/@uppy/vue/src/dashboard.ts +++ b/packages/@uppy/vue/src/dashboard.ts @@ -1,7 +1,7 @@ import { defineComponent, ref, h, type PropType } from 'vue' import DashboardPlugin, { type DashboardOptions } from '@uppy/dashboard' import type { Uppy } from '@uppy/core' -import type { Meta, Body } from '../../utils/src/UppyFile.js' +import type { Meta, Body } from '@uppy/utils/lib/UppyFile' import useUppy from './useUppy.ts' type DashboardInlineOptions = Omit< From 029efdb99a42af11b3778220ba8a017c300f60af Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Wed, 14 Aug 2024 12:33:14 +0200 Subject: [PATCH 03/65] meta: bump p-queue to latest, remove patch (#5391) --- .../p-queue-npm-7.4.1-e0cf0a6f17.patch | 12 -------- package.json | 1 - .../src/utils/PartialTreeUtils/afterFill.ts | 3 ++ yarn.lock | 28 ++++++------------- 4 files changed, 12 insertions(+), 32 deletions(-) delete mode 100644 .yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch diff --git a/.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch b/.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch deleted file mode 100644 index aaef0b1243..0000000000 --- a/.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/package.json b/package.json -index 8367745346fffd144a817ccf04912bb799e18b66..66dd17a4cd736089a332d72a70040701b0cd9c93 100644 ---- a/package.json -+++ b/package.json -@@ -6,6 +6,7 @@ - "repository": "sindresorhus/p-queue", - "funding": "https://github.com/sponsors/sindresorhus", - "type": "module", -+ "main": "./dist/index.js", - "exports": "./dist/index.js", - "engines": { - "node": ">=12" diff --git a/package.json b/package.json index e1615307cd..4954f8e5fb 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,6 @@ "@types/react": "^18", "@types/webpack-dev-server": "^4", "@vitest/utils": "patch:@vitest/utils@npm%3A1.2.1#./.yarn/patches/@vitest-utils-npm-1.2.1-3028846845.patch", - "p-queue": "patch:p-queue@npm%3A7.4.1#./.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch", "pre-commit": "patch:pre-commit@npm:1.2.2#.yarn/patches/pre-commit-npm-1.2.2-f30af83877.patch", "preact": "patch:preact@npm:10.10.0#.yarn/patches/preact-npm-10.10.0-dd04de05e8.patch", "start-server-and-test": "patch:start-server-and-test@npm:1.14.0#.yarn/patches/start-server-and-test-npm-1.14.0-841aa34fdf.patch", diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts index 87eefd2151..af087b789f 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts @@ -6,6 +6,9 @@ import type { PartialTreeId, } from '@uppy/core/lib/Uppy.js' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' +// p-queue does not have a `"main"` field in its `package.json`, and that makes `import/no-unresolved` freak out. +// We can safely ignore it because bundlers will happily use the `"exports"` field instead. +// eslint-disable-next-line import/no-unresolved import PQueue from 'p-queue' import shallowClone from './shallowClone.ts' diff --git a/yarn.lock b/yarn.lock index 111cec4d0b..100045f94d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23307,23 +23307,13 @@ __metadata: languageName: node linkType: hard -"p-queue@npm:7.4.1": - version: 7.4.1 - resolution: "p-queue@npm:7.4.1" - dependencies: - eventemitter3: "npm:^5.0.1" - p-timeout: "npm:^5.0.2" - checksum: 10/82934551f20a38cc19b31cda7200f2db93ca99b8c642d3ac861d12a7a9160eb32235738a8cd53f1a7ea0c7b52d6c0bb27644b6461e9a51e6a59f1e8d65904b78 - languageName: node - linkType: hard - -"p-queue@patch:p-queue@npm%3A7.4.1#./.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch::locator=%40uppy-dev%2Fbuild%40workspace%3A.": - version: 7.4.1 - resolution: "p-queue@patch:p-queue@npm%3A7.4.1#./.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch::version=7.4.1&hash=c7a089&locator=%40uppy-dev%2Fbuild%40workspace%3A." +"p-queue@npm:^8.0.0": + version: 8.0.1 + resolution: "p-queue@npm:8.0.1" dependencies: eventemitter3: "npm:^5.0.1" - p-timeout: "npm:^5.0.2" - checksum: 10/936414afd0b8146eb726bea94d480df7aeab68b6c1ee42e8ca801b8728a212916ce8ad89f5bc6dc3bf097d5586612f4ffd9405664471b8ae2262d5801dc1b162 + p-timeout: "npm:^6.1.2" + checksum: 10/8dcf8fbb8339675eba7d369f6eebac9e249e2412280ad73938403b83a28a2627a2072c732890d22ef98837cef89ff09eecd839cbac358cdc532d00ef4f736d0d languageName: node linkType: hard @@ -23338,10 +23328,10 @@ __metadata: languageName: node linkType: hard -"p-timeout@npm:^5.0.2": - version: 5.1.0 - resolution: "p-timeout@npm:5.1.0" - checksum: 10/f5cd4e17301ff1ff1d8dbf2817df0ad88c6bba99349fc24d8d181827176ad4f8aca649190b8a5b1a428dfd6ddc091af4606835d3e0cb0656e04045da5c9e270c +"p-timeout@npm:^6.1.2": + version: 6.1.2 + resolution: "p-timeout@npm:6.1.2" + checksum: 10/ca3ede368d792bd86fcfa4e133220536382225d31e5f62e2cedb8280df267b25f6684aa0056b22e8aa538cc85014b310058d8fdddeb0a1ff363093d56e87ac3a languageName: node linkType: hard From 19743029308e703aabc2709e639562c2f1f4d3f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:13:27 +0200 Subject: [PATCH 04/65] Bump docker/build-push-action from 6.4.1 to 6.6.1 (#5403) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.4.1 to 6.6.1. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/1ca370b3a9802c92e886402e0dd88098a2533b12...16ebe778df0e7752d2cfcbd924afdbbd89c1a755) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/companion-deploy.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/companion-deploy.yml b/.github/workflows/companion-deploy.yml index 9221f2d623..06977eb36e 100644 --- a/.github/workflows/companion-deploy.yml +++ b/.github/workflows/companion-deploy.yml @@ -63,7 +63,7 @@ jobs: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} - name: Build and push - uses: docker/build-push-action@1ca370b3a9802c92e886402e0dd88098a2533b12 # v6.4.1 + uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1 with: push: true context: . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 364f3e47bb..d57bbe7d5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -159,7 +159,7 @@ jobs: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} - name: Build and push - uses: docker/build-push-action@1ca370b3a9802c92e886402e0dd88098a2533b12 # v6.4.1 + uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1 with: push: true context: . From 72ae8777c21b618e9e435f6200c3490bf07e68d4 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Thu, 15 Aug 2024 18:23:45 +0200 Subject: [PATCH 05/65] docs: make hosted Companion more clear (#5394) --- docs/companion.md | 38 ++++++++++++++ docs/sources/companion-plugins/box.mdx | 38 ++++++++++++++ docs/sources/companion-plugins/dropbox.mdx | 38 ++++++++++++++ docs/sources/companion-plugins/facebook.mdx | 38 ++++++++++++++ .../companion-plugins/google-drive.mdx | 38 ++++++++++++++ .../companion-plugins/google-photos.mdx | 38 ++++++++++++++ docs/sources/companion-plugins/instagram.mdx | 38 ++++++++++++++ docs/sources/companion-plugins/onedrive.mdx | 51 ++++++++++++++++--- docs/sources/companion-plugins/unsplash.mdx | 38 ++++++++++++++ docs/sources/companion-plugins/url.mdx | 38 ++++++++++++++ docs/sources/companion-plugins/zoom.mdx | 38 ++++++++++++++ 11 files changed, 424 insertions(+), 7 deletions(-) diff --git a/docs/companion.md b/docs/companion.md index 824c86e16e..5b26aea23a 100644 --- a/docs/companion.md +++ b/docs/companion.md @@ -67,6 +67,42 @@ files to arrive at Transloadit servers, much like Uppy. ::: +To do so each provider plugin must be configured with Transloadit’s Companion +URLs: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Dropbox from '@uppy/dropbox'; + +uppy.use(Dropbox, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Dropbox from '@uppy/dropbox'; + +uppy.use(Dropbox, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ## Installation & use Companion is installed from npm. Depending on how you want to run Companion, the @@ -949,3 +985,5 @@ automatically restart when files are changed. [url]: /docs/url [zoom]: /docs/zoom [transloadit]: https://transloadit.com +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/box.mdx b/docs/sources/companion-plugins/box.mdx index aabde9c9ef..9312bbdbd9 100644 --- a/docs/sources/companion-plugins/box.mdx +++ b/docs/sources/companion-plugins/box.mdx @@ -81,6 +81,41 @@ new Uppy() .use(Box, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Box from '@uppy/box'; + +uppy.use(Box, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Box from '@uppy/box'; + +uppy.use(Box, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion You can create a Box App on the @@ -186,3 +221,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/dropbox.mdx b/docs/sources/companion-plugins/dropbox.mdx index b5c52dd86c..4a111f35d5 100644 --- a/docs/sources/companion-plugins/dropbox.mdx +++ b/docs/sources/companion-plugins/dropbox.mdx @@ -81,6 +81,41 @@ new Uppy() .use(Dropbox, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Dropbox from '@uppy/dropbox'; + +uppy.use(Dropbox, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Dropbox from '@uppy/dropbox'; + +uppy.use(Dropbox, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion You can create a Dropbox App on the @@ -186,3 +221,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/facebook.mdx b/docs/sources/companion-plugins/facebook.mdx index e0d87bf8a2..dcc4968094 100644 --- a/docs/sources/companion-plugins/facebook.mdx +++ b/docs/sources/companion-plugins/facebook.mdx @@ -81,6 +81,41 @@ new Uppy() .use(Facebook, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Facebook from '@uppy/facebook'; + +uppy.use(Facebook, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Facebook from '@uppy/facebook'; + +uppy.use(Facebook, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion You can create a Facebook App on the @@ -183,3 +218,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/google-drive.mdx b/docs/sources/companion-plugins/google-drive.mdx index b7332e5c56..c682464ecb 100644 --- a/docs/sources/companion-plugins/google-drive.mdx +++ b/docs/sources/companion-plugins/google-drive.mdx @@ -81,6 +81,41 @@ new Uppy() .use(GoogleDrive, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import GoogleDrive from '@uppy/google-drive'; + +uppy.use(GoogleDrive, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import GoogleDrive from '@uppy/google-drive'; + +uppy.use(GoogleDrive, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion To sign up for API keys, go to the @@ -187,3 +222,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/google-photos.mdx b/docs/sources/companion-plugins/google-photos.mdx index 23d92928a3..e90cfb6e65 100644 --- a/docs/sources/companion-plugins/google-photos.mdx +++ b/docs/sources/companion-plugins/google-photos.mdx @@ -84,6 +84,41 @@ new Uppy() }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import GooglePhotos from '@uppy/google-photos'; + +uppy.use(GooglePhotos, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import GooglePhotos from '@uppy/google-photos'; + +uppy.use(GooglePhotos, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion To sign up for API keys, go to the @@ -183,3 +218,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/instagram.mdx b/docs/sources/companion-plugins/instagram.mdx index caa8f5a422..ca920d86cf 100644 --- a/docs/sources/companion-plugins/instagram.mdx +++ b/docs/sources/companion-plugins/instagram.mdx @@ -81,6 +81,41 @@ new Uppy() .use(Instagram, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Instagram from '@uppy/instagram'; + +uppy.use(Instagram, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Instagram from '@uppy/instagram'; + +uppy.use(Instagram, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion To sign up for API keys, go to the @@ -196,3 +231,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/onedrive.mdx b/docs/sources/companion-plugins/onedrive.mdx index a58af32b39..b91c3931e3 100644 --- a/docs/sources/companion-plugins/onedrive.mdx +++ b/docs/sources/companion-plugins/onedrive.mdx @@ -81,6 +81,41 @@ new Uppy() .use(OneDrive, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import OneDrive from '@uppy/onedrive'; + +uppy.use(OneDrive, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import OneDrive from '@uppy/onedrive'; + +uppy.use(OneDrive, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion To sign up for API keys, go to the @@ -100,15 +135,14 @@ If you are using Transloadit hosted Companion: https://api2.transloadit.com/companion/onedrive/redirect ``` -Go to the “Manifest” tab, and find the `"signInAudience"` key. -Change it to `"signInAudience": "AzureADandPersonalMicrosoftAccount"`, and click -“Save”. +Go to the “Manifest” tab, and find the `"signInAudience"` key. Change it to +`"signInAudience": "AzureADandPersonalMicrosoftAccount"`, and click “Save”. -Go to the “Overview” tab. -Copy the `Application (client) ID` field - this will be your Oauth client ID. +Go to the “Overview” tab. Copy the `Application (client) ID` field - this will +be your Oauth client ID. -Go to the “Certificates & secrets” tab, and click “+ New client secret”. -Copy the `Value` field - this will be your OAuth client secret. +Go to the “Certificates & secrets” tab, and click “+ New client secret”. Copy +the `Value` field - this will be your OAuth client secret. Configure the OneDrive key and secret in Companion. With the standalone Companion server, specify environment variables: @@ -185,3 +219,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/unsplash.mdx b/docs/sources/companion-plugins/unsplash.mdx index 7bb1f59d14..1287729aeb 100644 --- a/docs/sources/companion-plugins/unsplash.mdx +++ b/docs/sources/companion-plugins/unsplash.mdx @@ -81,6 +81,41 @@ new Uppy() .use(Unsplash, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Unsplash from '@uppy/unsplash'; + +uppy.use(Unsplash, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Unsplash from '@uppy/unsplash'; + +uppy.use(Unsplash, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion You can create a Unsplash App on the @@ -162,3 +197,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/url.mdx b/docs/sources/companion-plugins/url.mdx index 0f3a6cd5cc..52892db586 100644 --- a/docs/sources/companion-plugins/url.mdx +++ b/docs/sources/companion-plugins/url.mdx @@ -89,6 +89,41 @@ new Uppy() .use(Url, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Url from '@uppy/url'; + +uppy.use(Url, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Url from '@uppy/url'; + +uppy.use(Url, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion Companion supports this plugin out-of-the-box, however it must be enabled in @@ -148,3 +183,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/docs/sources/companion-plugins/zoom.mdx b/docs/sources/companion-plugins/zoom.mdx index e30eb455bc..83dbbc7c04 100644 --- a/docs/sources/companion-plugins/zoom.mdx +++ b/docs/sources/companion-plugins/zoom.mdx @@ -84,6 +84,41 @@ new Uppy() .use(Zoom, { companionUrl: 'https://your-companion.com' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Zoom from '@uppy/zoom'; + +uppy.use(Zoom, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import Zoom from '@uppy/zoom'; + +uppy.use(Zoom, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + key: 'YOUR_TRANSLOADIT_API_KEY', + credentialsName: 'my_companion_dropbox_creds', + }, +}); +``` + ### Use in Companion To sign up for API keys, go through the following steps: @@ -187,3 +222,6 @@ export default { }, }; ``` + +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials From 41eb77e04b52c82086876c86391f91d76f1d7c8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:24:13 +0200 Subject: [PATCH 06/65] Bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (#5370) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/5927c834f5b4fdf503fca6f4c7eccda82949e1ee...49b3bc8e6bdd4a60e6116a5414239cba5943d3cf) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/companion-deploy.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/companion-deploy.yml b/.github/workflows/companion-deploy.yml index 06977eb36e..ee49addc0f 100644 --- a/.github/workflows/companion-deploy.yml +++ b/.github/workflows/companion-deploy.yml @@ -55,7 +55,7 @@ jobs: tags: | type=edge type=raw,value=latest,enable=false - - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 + - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - uses: docker/setup-buildx-action@v3 - name: Log in to DockerHub uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d57bbe7d5e..2829af4025 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,7 +151,7 @@ jobs: type=semver,pattern={{version}},value=${{ needs.release.outputs.companionWasReleased }} # set latest tag for default branch type=raw,value=latest,enable=true - - uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0 + - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - uses: docker/setup-buildx-action@v3 - name: Log in to DockerHub uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 From be25b1a4d0a8686924ce7a0d706fc1a9c58c957c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:24:26 +0200 Subject: [PATCH 07/65] Bump docker/login-action from 3.2.0 to 3.3.0 (#5372) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/0d4c9c5ea7693da7b068278f7b52bda2a190a446...9780b0c442fbb1117ed29e0efdff1e18412f7567) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/companion-deploy.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/companion-deploy.yml b/.github/workflows/companion-deploy.yml index ee49addc0f..2e18945514 100644 --- a/.github/workflows/companion-deploy.yml +++ b/.github/workflows/companion-deploy.yml @@ -58,7 +58,7 @@ jobs: - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - uses: docker/setup-buildx-action@v3 - name: Log in to DockerHub - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2829af4025..36888c5651 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -154,7 +154,7 @@ jobs: - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - uses: docker/setup-buildx-action@v3 - name: Log in to DockerHub - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} From 27e24ce2daad509a7d6ee7b1a8f70131fddc1657 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 15 Aug 2024 19:03:02 +0200 Subject: [PATCH 08/65] docs: add note about throwing in `cancelAll` and `destroy()` (#5408) --- docs/uppy-core.mdx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/uppy-core.mdx b/docs/uppy-core.mdx index c37e2344e1..d00a7160bd 100644 --- a/docs/uppy-core.mdx +++ b/docs/uppy-core.mdx @@ -704,7 +704,8 @@ uppy.removeFile('uppyteamkongjpg1501851828779'); #### `clear()` Clear the state. Can be useful for manually resetting Uppy after a successful -upload. +upload. Note that this method might throw an error if you try to call it while +an upload is ongoing. Upload plugins may choose to throw an error if called during an upload. @@ -773,7 +774,9 @@ Retry all uploads (after an error, for example). #### `cancelAll()` -Cancel all uploads, reset progress and remove all files. +Cancel all uploads, reset progress and remove all files. If you are using the +Transloadit plugin, this will also cancel all running assemblies, even after an +upload has finished. #### `setState(patch)` @@ -880,7 +883,9 @@ uppy.getPlugin('Dashboard').setOptions({ #### `destroy()` Uninstall all plugins and close down this Uppy instance. Also runs -`uppy.cancelAll()` before uninstalling. +`uppy.cancelAll()` before uninstalling. Note that this method should not +normally be used. If you only want reset the Uppy instance so that you can start +a new upload, you probably want to use `clear()` method instead. #### `logout()` From b332e83444c7fae00040a62a2809e015b191e9f4 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 15 Aug 2024 19:13:58 +0200 Subject: [PATCH 09/65] @uppy/companion: fix code for custom providers (#5398) Fixes: https://github.com/transloadit/uppy/issues/5383 --- packages/@uppy/companion/src/companion.js | 2 +- packages/@uppy/companion/src/server/controllers/preauth.js | 2 +- .../@uppy/companion/src/server/controllers/refresh-token.js | 2 +- packages/@uppy/companion/src/server/middlewares.js | 5 +++-- packages/@uppy/companion/src/server/provider/index.js | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/@uppy/companion/src/companion.js b/packages/@uppy/companion/src/companion.js index b42c1e9a6c..01f55c2fa5 100644 --- a/packages/@uppy/companion/src/companion.js +++ b/packages/@uppy/companion/src/companion.js @@ -150,7 +150,7 @@ module.exports.app = (optionsArg = {}) => { logger.info(`Returning dynamic OAuth2 credentials for ${providerName}`) // for simplicity, we just return the normal credentials for the provider, but in a real-world scenario, // we would query based on parameters - const { key, secret } = options.providerOptions[providerName] + const { key, secret } = options.providerOptions[providerName] ?? { __proto__: null } function getRedirectUri() { const oauthProvider = getOauthProvider(providerName) diff --git a/packages/@uppy/companion/src/server/controllers/preauth.js b/packages/@uppy/companion/src/server/controllers/preauth.js index c1f2d267da..c8eddec7f7 100644 --- a/packages/@uppy/companion/src/server/controllers/preauth.js +++ b/packages/@uppy/companion/src/server/controllers/preauth.js @@ -8,7 +8,7 @@ function preauth (req, res) { } const providerConfig = req.companion.options.providerOptions[req.params.providerName] - if (!providerConfig.credentialsURL) { + if (!providerConfig?.credentialsURL) { return res.sendStatus(501) } diff --git a/packages/@uppy/companion/src/server/controllers/refresh-token.js b/packages/@uppy/companion/src/server/controllers/refresh-token.js index ed6d7a4748..868f6fd2db 100644 --- a/packages/@uppy/companion/src/server/controllers/refresh-token.js +++ b/packages/@uppy/companion/src/server/controllers/refresh-token.js @@ -8,7 +8,7 @@ const logger = require('../logger') async function refreshToken (req, res, next) { const { providerName } = req.params - const { key: clientId, secret: clientSecret } = req.companion.options.providerOptions[providerName] + const { key: clientId, secret: clientSecret } = req.companion.options.providerOptions[providerName] ?? { __proto__: null } const { redirect_uri: redirectUri } = req.companion.providerGrantConfig const { providerUserSession } = req.companion diff --git a/packages/@uppy/companion/src/server/middlewares.js b/packages/@uppy/companion/src/server/middlewares.js index 2ecb4620a9..9388204d2f 100644 --- a/packages/@uppy/companion/src/server/middlewares.js +++ b/packages/@uppy/companion/src/server/middlewares.js @@ -92,14 +92,15 @@ exports.verifyToken = (req, res, next) => { if (!isOAuthProviderReq(req)) { const { providerOptions } = req.companion.options const { providerName } = req.params - if (!providerOptions[providerName] || !providerOptions[providerName].key) { + const key = providerOptions[providerName]?.key; + if (!key) { logger.info(`unconfigured credentials for ${providerName}`, 'non.oauth.token.load.unset', req.id) res.sendStatus(501) return } req.companion.providerUserSession = { - accessToken: providerOptions[providerName].key, + accessToken: key, } next() } diff --git a/packages/@uppy/companion/src/server/provider/index.js b/packages/@uppy/companion/src/server/provider/index.js index 9c72eaf061..52c707dac0 100644 --- a/packages/@uppy/companion/src/server/provider/index.js +++ b/packages/@uppy/companion/src/server/provider/index.js @@ -52,7 +52,7 @@ module.exports.getProviderMiddleware = (providers, grantConfig) => { req.companion.providerGrantConfig = providerGrantConfig } - const { secret } = providerOptions[providerName] + const secret = providerOptions[providerName]?.secret req.companion.provider = new ProviderClass({ secret, providerName, providerGrantConfig, allowLocalUrls }) req.companion.providerClass = ProviderClass } else { From 4e4781dd59ae9ca64b8230a7bcef0af86add2b9f Mon Sep 17 00:00:00 2001 From: Aaron Russell Date: Thu, 15 Aug 2024 18:17:17 +0100 Subject: [PATCH 10/65] docs: add `ViewEncapsulation` to Angular example (#5395) Refs: https://v17.angular.io/api/core/ViewEncapsulation --- docs/framework-integrations/angular.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/framework-integrations/angular.mdx b/docs/framework-integrations/angular.mdx index 6c6b747659..c7e2eafc2a 100644 --- a/docs/framework-integrations/angular.mdx +++ b/docs/framework-integrations/angular.mdx @@ -96,8 +96,11 @@ decorator. You can find the CSS import statements in the docs of the UI plugin you want to use. For instance, for `@uppy/dashboard`: ```typescript +import { Component, ViewEncapsulation } from '@angular/core'; +//... @Component({ // ... + encapsulation: ViewEncapsulation.None, styleUrls: [ '../node_modules/@uppy/core/dist/style.css', '../node_modules/@uppy/dashboard/dist/style.css', From 6ce3a9f3972b9bb0bbb6ad71a2c7e7f0bc4cad9e Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 15 Aug 2024 19:19:25 +0200 Subject: [PATCH 11/65] docs: improve `corsOrigins` documentation (#5390) --- docs/companion.md | 16 ++++++++-------- docs/guides/migration-guides.md | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/companion.md b/docs/companion.md index 5b26aea23a..e58c00a6ee 100644 --- a/docs/companion.md +++ b/docs/companion.md @@ -680,14 +680,15 @@ the for `postMessage` calls in the context of OAuth. Setting it to `true` treats any origin as a trusted one, making it easier to -impersonate your brand. Setting it to `false` disables cross-origin supports, -use this if you’re serving Companion and Uppy from the same domain name. +impersonate your brand. Setting it to `false` disables cross-origin support, use +this if you’re serving Companion and Uppy from the same domain name. ##### `COMPANION_CLIENT_ORIGINS` -A comma-separated string of origins, or `'true'` (which will be interpreted as -the boolean value `true`), or `'false'` (which will be interpreted as the -boolean value `false`). +Stand-alone alternative to the `corsOrigins` option. A comma-separated string of +origins, or `'true'` (which will be interpreted as the boolean value `true`), or +`'false'` (which will be interpreted as the boolean value `false`). +`COMPANION_CLIENT_ORIGINS_REGEX` will be ignored if this option is used. ##### `COMPANION_CLIENT_ORIGINS_REGEX` @@ -700,9 +701,8 @@ make sure you’re validating the entirety of the string. ::: -Like COMPANION_CLIENT_ORIGINS, but allows a single regex instead. -`COMPANION_CLIENT_ORIGINS` will be ignored if this is used. This is a -standalone-only option. +Stand-alone alternative to the `corsOrigins` option. Like +`COMPANION_CLIENT_ORIGINS`, but allows a single regex instead. #### `chunkSize` `COMPANION_CHUNK_SIZE` diff --git a/docs/guides/migration-guides.md b/docs/guides/migration-guides.md index 360be6af28..b8ba53799b 100644 --- a/docs/guides/migration-guides.md +++ b/docs/guides/migration-guides.md @@ -6,10 +6,10 @@ These cover all the major Uppy versions and how to migrate to them. - End-of-Life versions of Node.js are no longer supported (use latest 18.x LTS, 20.x LTS, or 22.x current). -- Setting the `corsOrigin` option is now required. You should define the list of - origins you expect your app to be served from, otherwise it can be - impersonated from a different origin you don’t control. Set it to `true` if - you don’t care about impersonating. +- Setting the `corsOrigin` (`COMPANION_CLIENT_ORIGINS`) option is now required. + You should define the list of origins you expect your app to be served from, + otherwise it can be impersonated from a different origin you don’t control. + Set it to `true` if you don’t care about impersonating. - `COMPANION_REDIS_EXPRESS_SESSION_PREFIX` now defaults to `companion-session:` (before `sess:`). To revert keep backwards compatibility, set the environment variable `COMPANION_REDIS_EXPRESS_SESSION_PREFIX=sess:`. From f70e14a969f7284591f386c3c00008134d0f897d Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 15 Aug 2024 19:35:28 +0200 Subject: [PATCH 12/65] @uppy/transloadit: fix many lurking `TypeError` (#5399) --- packages/@uppy/transloadit/src/index.ts | 40 +++++++++++++++---------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index 5e7f1d5a7e..a92f51a84a 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -603,10 +603,11 @@ export default class Transloadit< * When an Assembly has finished processing, get the final state * and emit it. */ - #onAssemblyFinished(status: AssemblyResponse) { - const url = status.assembly_ssl_url + #onAssemblyFinished(assembly: Assembly) { + const url = assembly.status.assembly_ssl_url this.client.getAssemblyStatus(url).then((finalStatus) => { - this.assembly!.status = finalStatus + // eslint-disable-next-line no-param-reassign + assembly.status = finalStatus this.uppy.emit('transloadit:complete', finalStatus) }) } @@ -621,8 +622,9 @@ export default class Transloadit< * When all files are removed, cancel in-progress Assemblies. */ #onCancelAll = async () => { + if (!this.assembly) return try { - await this.#cancelAssembly(this.assembly!.status) + await this.#cancelAssembly(this.assembly.status) } catch (err) { this.uppy.log(err) } @@ -702,7 +704,7 @@ export default class Transloadit< // Force-update all Assemblies to check for missed events. const updateAssemblies = () => { - return this.assembly!.update() + return this.assembly?.update() } // Restore all Assembly state. @@ -768,11 +770,11 @@ export default class Transloadit< if (this.opts.waitForEncoding) { assembly.on('finished', () => { - this.#onAssemblyFinished(assembly.status) + this.#onAssemblyFinished(assembly) }) } else if (this.opts.waitForMetadata) { assembly.on('metadata', () => { - this.#onAssemblyFinished(assembly.status) + this.#onAssemblyFinished(assembly) }) } @@ -835,19 +837,22 @@ export default class Transloadit< }) } - const assemblyID = this.assembly!.status.assembly_id + const assemblyID = this.assembly?.status.assembly_id const closeSocketConnections = () => { - this.assembly!.close() + this.assembly?.close() } // If we don't have to wait for encoding metadata or results, we can close // the socket immediately and finish the upload. if (!this.#shouldWaitAfterUpload()) { closeSocketConnections() - this.uppy.addResultData(uploadID, { - transloadit: [this.assembly!.status], - }) + const status = this.assembly?.status + if (status != null) { + this.uppy.addResultData(uploadID, { + transloadit: [status], + }) + } return Promise.resolve() } @@ -870,9 +875,12 @@ export default class Transloadit< return this.#watcher.promise.then(() => { closeSocketConnections() - this.uppy.addResultData(uploadID, { - transloadit: [this.assembly!.status], - }) + const status = this.assembly?.status + if (status != null) { + this.uppy.addResultData(uploadID, { + transloadit: [status], + }) + } }) } @@ -982,7 +990,7 @@ export default class Transloadit< } getAssembly(): AssemblyResponse | undefined { - return this.assembly!.status + return this.assembly?.status } getAssemblyFiles(assemblyID: string): UppyFile[] { From cc8d9f3dd21c63d5838da5cde16ae50bce491172 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 15 Aug 2024 19:58:33 +0200 Subject: [PATCH 13/65] meta: add back patch for `p-queue` (#5409) --- .yarn/patches/p-queue-npm-8.0.1-fe1ddcd827.patch | 12 ++++++++++++ package.json | 1 + yarn.lock | 12 +++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .yarn/patches/p-queue-npm-8.0.1-fe1ddcd827.patch diff --git a/.yarn/patches/p-queue-npm-8.0.1-fe1ddcd827.patch b/.yarn/patches/p-queue-npm-8.0.1-fe1ddcd827.patch new file mode 100644 index 0000000000..200198f91b --- /dev/null +++ b/.yarn/patches/p-queue-npm-8.0.1-fe1ddcd827.patch @@ -0,0 +1,12 @@ +diff --git a/package.json b/package.json +index d4133284745349488cf0e623b983c78fd7cc7fb7..52433fa0ecea99ebbfe5b94a8023f73350896f7d 100644 +--- a/package.json ++++ b/package.json +@@ -6,6 +6,7 @@ + "repository": "sindresorhus/p-queue", + "funding": "https://github.com/sponsors/sindresorhus", + "type": "module", ++ "main": "./dist/index.js", + "exports": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" diff --git a/package.json b/package.json index 4954f8e5fb..3eb2ad0a63 100644 --- a/package.json +++ b/package.json @@ -168,6 +168,7 @@ "@types/react": "^18", "@types/webpack-dev-server": "^4", "@vitest/utils": "patch:@vitest/utils@npm%3A1.2.1#./.yarn/patches/@vitest-utils-npm-1.2.1-3028846845.patch", + "p-queue": "patch:p-queue@npm%3A8.0.1#~/.yarn/patches/p-queue-npm-8.0.1-fe1ddcd827.patch", "pre-commit": "patch:pre-commit@npm:1.2.2#.yarn/patches/pre-commit-npm-1.2.2-f30af83877.patch", "preact": "patch:preact@npm:10.10.0#.yarn/patches/preact-npm-10.10.0-dd04de05e8.patch", "start-server-and-test": "patch:start-server-and-test@npm:1.14.0#.yarn/patches/start-server-and-test-npm-1.14.0-841aa34fdf.patch", diff --git a/yarn.lock b/yarn.lock index 100045f94d..867b4294af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23307,7 +23307,7 @@ __metadata: languageName: node linkType: hard -"p-queue@npm:^8.0.0": +"p-queue@npm:8.0.1": version: 8.0.1 resolution: "p-queue@npm:8.0.1" dependencies: @@ -23317,6 +23317,16 @@ __metadata: languageName: node linkType: hard +"p-queue@patch:p-queue@npm%3A8.0.1#~/.yarn/patches/p-queue-npm-8.0.1-fe1ddcd827.patch": + version: 8.0.1 + resolution: "p-queue@patch:p-queue@npm%3A8.0.1#~/.yarn/patches/p-queue-npm-8.0.1-fe1ddcd827.patch::version=8.0.1&hash=48e686" + dependencies: + eventemitter3: "npm:^5.0.1" + p-timeout: "npm:^6.1.2" + checksum: 10/564a7b04bc2bfe826381fd509bf83e178a06fd00e41b4e102fb435f4c71044707d97a784f50069cab1ed22f6d3e9631f0e1dad8e44b6ed2944750ab60916bc9d + languageName: node + linkType: hard + "p-retry@npm:^6.1.0, p-retry@npm:^6.2.0": version: 6.2.0 resolution: "p-retry@npm:6.2.0" From 98123d87460e78cb18c724c2908ed1125143a208 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 20:08:48 +0200 Subject: [PATCH 14/65] Bump elliptic from 6.5.5 to 6.5.7 (#5410) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.5 to 6.5.7. - [Commits](https://github.com/indutny/elliptic/compare/v6.5.5...v6.5.7) --- updated-dependencies: - dependency-name: elliptic dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 867b4294af..ef507ff301 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13482,8 +13482,8 @@ __metadata: linkType: hard "elliptic@npm:^6.5.4": - version: 6.5.5 - resolution: "elliptic@npm:6.5.5" + version: 6.5.7 + resolution: "elliptic@npm:6.5.7" dependencies: bn.js: "npm:^4.11.9" brorand: "npm:^1.1.0" @@ -13492,7 +13492,7 @@ __metadata: inherits: "npm:^2.0.4" minimalistic-assert: "npm:^1.0.1" minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10/5444b4f18e0c0fdfa14de26f69f7dbc44c78a211e91825823d698dcc91071ef1a3954d87730f364183fc83b0a86d8affed864e347da2e549bdcead3b46de126f + checksum: 10/fbad1fad0a5cc07df83f80cc1f7a784247ef59075194d3e340eaeb2f4dd594825ee24c7e9b0cf279c9f1982efe610503bb3139737926428c4821d4fca1bcf348 languageName: node linkType: hard From 013f4eab2b46ae7c105ea28f6ace7c8647410740 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 15 Aug 2024 20:10:01 +0200 Subject: [PATCH 15/65] @uppy/transloadit: fix issue with `allowMultipleUploadBatches` (#5400) * fix issue with allowMultipleUploadBatches fixes #5397 also refactor from promise.then to async/await and fix what seems like broken logic with recursive this.#afterUpload call * throw better error when all files have been canceled after an assembly has been created also rewrite #createAssembly to async/await * wait for updateAssembly when restoring fixes potential race condition --- .../integration/dashboard-transloadit.spec.ts | 6 +- packages/@uppy/transloadit/src/index.ts | 199 +++++++++--------- 2 files changed, 106 insertions(+), 99 deletions(-) diff --git a/e2e/cypress/integration/dashboard-transloadit.spec.ts b/e2e/cypress/integration/dashboard-transloadit.spec.ts index 311d42b116..faee0a33dc 100644 --- a/e2e/cypress/integration/dashboard-transloadit.spec.ts +++ b/e2e/cypress/integration/dashboard-transloadit.spec.ts @@ -65,14 +65,14 @@ describe('Dashboard with Transloadit', () => { cy.get('.uppy-StatusBar-actionBtn--upload').click() cy.wait(['@createAssemblies', '@tusCreate']).then(() => { - const plugin = getPlugin(uppy) + const { assembly } = getPlugin(uppy) - expect(plugin.assembly.closed).to.be.false + expect(assembly.closed).to.be.false uppy.cancelAll() cy.wait(['@delete', '@tusDelete']).then(() => { - expect(plugin.assembly.closed).to.be.true + expect(assembly.closed).to.be.true }) }) }) diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index a92f51a84a..dad3f498ab 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -400,64 +400,64 @@ export default class Transloadit< return newFile } - #createAssembly( + async #createAssembly( fileIDs: string[], assemblyOptions: OptionsWithRestructuredFields, ) { this.uppy.log('[Transloadit] Create Assembly') - return this.client - .createAssembly({ + try { + const newAssembly = await this.client.createAssembly({ ...assemblyOptions, expectedFiles: fileIDs.length, }) - .then(async (newAssembly) => { - const files = this.uppy - .getFiles() - .filter(({ id }) => fileIDs.includes(id)) - if (files.length === 0) { - // All files have been removed, cancelling. - await this.client.cancelAssembly(newAssembly) - return null - } - - const assembly = new Assembly(newAssembly, this.#rateLimitedQueue) - const { status } = assembly - const assemblyID = status.assembly_id - const updatedFiles: Record> = {} - files.forEach((file) => { - updatedFiles[file.id] = this.#attachAssemblyMetadata(file, status) - }) + const files = this.uppy + .getFiles() + .filter(({ id }) => fileIDs.includes(id)) - this.uppy.setState({ - files: { - ...this.uppy.getState().files, - ...updatedFiles, - }, - }) + if (files.length === 0) { + // All files have been removed, cancelling. + await this.client.cancelAssembly(newAssembly) + return null + } - this.uppy.emit('transloadit:assembly-created', status, fileIDs) + const assembly = new Assembly(newAssembly, this.#rateLimitedQueue) + const { status } = assembly + const assemblyID = status.assembly_id - this.uppy.log(`[Transloadit] Created Assembly ${assemblyID}`) - return assembly + const updatedFiles: Record> = {} + files.forEach((file) => { + updatedFiles[file.id] = this.#attachAssemblyMetadata(file, status) }) - .catch((err) => { - // TODO: use AssemblyError? - const wrapped = new ErrorWithCause( - `${this.i18n('creatingAssemblyFailed')}: ${err.message}`, - { cause: err }, - ) - if ('details' in err) { - // @ts-expect-error details is not in the Error type - wrapped.details = err.details - } - if ('assembly' in err) { - // @ts-expect-error assembly is not in the Error type - wrapped.assembly = err.assembly - } - throw wrapped + + this.uppy.setState({ + files: { + ...this.uppy.getState().files, + ...updatedFiles, + }, }) + + this.uppy.emit('transloadit:assembly-created', status, fileIDs) + + this.uppy.log(`[Transloadit] Created Assembly ${assemblyID}`) + return assembly + } catch (err) { + // TODO: use AssemblyError? + const wrapped = new ErrorWithCause( + `${this.i18n('creatingAssemblyFailed')}: ${err.message}`, + { cause: err }, + ) + if ('details' in err) { + // @ts-expect-error details is not in the Error type + wrapped.details = err.details + } + if ('assembly' in err) { + // @ts-expect-error assembly is not in the Error type + wrapped.assembly = err.assembly + } + throw wrapped + } } #createAssemblyWatcher(idOrArrayOfIds: string | string[]) { @@ -616,6 +616,7 @@ export default class Transloadit< await this.client.cancelAssembly(assembly) // TODO bubble this through AssemblyWatcher so its event handlers can clean up correctly this.uppy.emit('transloadit:assembly-cancelled', assembly) + this.assembly = undefined } /** @@ -702,20 +703,21 @@ export default class Transloadit< this.#connectAssembly(this.assembly!) } - // Force-update all Assemblies to check for missed events. - const updateAssemblies = () => { + // Force-update Assembly to check for missed events. + const updateAssembly = () => { return this.assembly?.update() } // Restore all Assembly state. - this.restored = Promise.resolve().then(() => { + this.restored = (async () => { restoreState() restoreAssemblies() - updateAssemblies() - }) - - this.restored.then(() => { + await updateAssembly() this.restored = null + })() + + this.restored.catch((err) => { + this.uppy.log('Failed to restore', err) }) } @@ -800,8 +802,11 @@ export default class Transloadit< try { const assembly = // this.assembly can already be defined if we recovered files with Golden Retriever (this.#onRestored) - (this.assembly ?? - (await this.#createAssembly(fileIDs, assemblyOptions)))! + this.assembly ?? (await this.#createAssembly(fileIDs, assemblyOptions)) + + if (assembly == null) + throw new Error('All files were canceled after assembly was created') + if (this.opts.importFromUploadURLs) { await this.#reserveFiles(assembly, fileIDs) } @@ -823,57 +828,54 @@ export default class Transloadit< } } - #afterUpload = (fileIDs: string[], uploadID: string): Promise => { - const files = fileIDs.map((fileID) => this.uppy.getFile(fileID)) - // Only use files without errors - const filteredFileIDs = files - .filter((file) => !file.error) - .map((file) => file.id) + #afterUpload = async (fileIDs: string[], uploadID: string): Promise => { + try { + // If we're still restoring state, wait for that to be done. + await this.restored - // If we're still restoring state, wait for that to be done. - if (this.restored) { - return this.restored.then(() => { - return this.#afterUpload(filteredFileIDs, uploadID) - }) - } + const files = fileIDs + .map((fileID) => this.uppy.getFile(fileID)) + // Only use files without errors + .filter((file) => !file.error) - const assemblyID = this.assembly?.status.assembly_id + const assemblyID = this.assembly?.status.assembly_id - const closeSocketConnections = () => { - this.assembly?.close() - } + const closeSocketConnections = () => { + this.assembly?.close() + } - // If we don't have to wait for encoding metadata or results, we can close - // the socket immediately and finish the upload. - if (!this.#shouldWaitAfterUpload()) { - closeSocketConnections() - const status = this.assembly?.status - if (status != null) { - this.uppy.addResultData(uploadID, { - transloadit: [status], - }) + // If we don't have to wait for encoding metadata or results, we can close + // the socket immediately and finish the upload. + if (!this.#shouldWaitAfterUpload()) { + closeSocketConnections() + const status = this.assembly?.status + if (status != null) { + this.uppy.addResultData(uploadID, { + transloadit: [status], + }) + } + return } - return Promise.resolve() - } - // If no Assemblies were created for this upload, we also do not have to wait. - // There's also no sockets or anything to close, so just return immediately. - if (!assemblyID) { - this.uppy.addResultData(uploadID, { transloadit: [] }) - return Promise.resolve() - } + // If no Assemblies were created for this upload, we also do not have to wait. + // There's also no sockets or anything to close, so just return immediately. + if (!assemblyID) { + this.uppy.addResultData(uploadID, { transloadit: [] }) + return + } - const incompleteFiles = files.filter( - (file) => !hasProperty(this.completedFiles, file.id), - ) - incompleteFiles.forEach((file) => { - this.uppy.emit('postprocess-progress', file, { - mode: 'indeterminate', - message: this.i18n('encoding'), + const incompleteFiles = files.filter( + (file) => !hasProperty(this.completedFiles, file.id), + ) + incompleteFiles.forEach((file) => { + this.uppy.emit('postprocess-progress', file, { + mode: 'indeterminate', + message: this.i18n('encoding'), + }) }) - }) - return this.#watcher.promise.then(() => { + await this.#watcher.promise + // assembly is now done processing! closeSocketConnections() const status = this.assembly?.status if (status != null) { @@ -881,7 +883,12 @@ export default class Transloadit< transloadit: [status], }) } - }) + } finally { + // in case allowMultipleUploadBatches is true and the user wants to upload again, + // we need to allow a new assembly to be created. + // see https://github.com/transloadit/uppy/issues/5397 + this.assembly = undefined + } } #closeAssemblyIfExists = () => { From fd2b8e58347204f5192669a3d3f5d636b1ab56d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 09:34:13 +0000 Subject: [PATCH 16/65] Release: uppy@4.1.1 (#5411) | Package | Version | Package | Version | | ---------------------- | ------- | ---------------------- | ------- | | @uppy/aws-s3 | 4.0.3 | @uppy/provider-views | 4.0.1 | | @uppy/companion | 5.0.5 | @uppy/status-bar | 4.0.2 | | @uppy/companion-client | 4.0.1 | @uppy/transloadit | 4.0.2 | | @uppy/core | 4.1.1 | @uppy/tus | 4.0.1 | | @uppy/dashboard | 4.0.3 | @uppy/utils | 6.0.2 | | @uppy/drag-drop | 4.0.2 | @uppy/vue | 2.0.1 | | @uppy/file-input | 4.0.1 | uppy | 4.1.1 | | @uppy/image-editor | 3.0.1 | | | - @uppy/transloadit: fix issue with `allowMultipleUploadBatches` (Mikael Finstad / #5400) - meta: Bump elliptic from 6.5.5 to 6.5.7 (dependabot[bot] / #5410) - meta: add back patch for `p-queue` (Antoine du Hamel / #5409) - @uppy/transloadit: fix many lurking `TypeError` (Mikael Finstad / #5399) - docs: improve `corsOrigins` documentation (Mikael Finstad / #5390) - docs: add `ViewEncapsulation` to Angular example (Aaron Russell / #5395) - @uppy/companion: fix code for custom providers (Mikael Finstad / #5398) - docs: add note about throwing in `cancelAll` and `destroy()` (Mikael Finstad / #5408) - meta: Bump docker/login-action from 3.2.0 to 3.3.0 (dependabot[bot] / #5372) - meta: Bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (dependabot[bot] / #5370) - docs: make hosted Companion more clear (Merlijn Vos / #5394) - meta: Bump docker/build-push-action from 6.4.1 to 6.6.1 (dependabot[bot] / #5403) - meta: bump p-queue to latest, remove patch (Mikael Finstad / #5391) - meta: enforce `.ts` extension for relative import types (Antoine du Hamel / #5393) - @uppy/tus: Fix onShouldRetry type signature (Trent Nadeau / #5387) - @uppy/dashboard,@uppy/drag-drop,@uppy/file-input: Transform the `accept` prop into a string everywhere (Evgenia Karunus / #5380) - docs: fix getTemporarySecurityCredentials in aws-s3 (Merlijn Vos / #5363) --- BUNDLE-README.md | 2 +- CHANGELOG.md | 34 +++++++++ README.md | 70 +++++++++---------- examples/cdn-example/index.html | 4 +- .../uppy-with-companion/client/index.html | 4 +- packages/@uppy/aws-s3/package.json | 2 +- packages/@uppy/companion-client/package.json | 2 +- packages/@uppy/companion/CHANGELOG.md | 7 ++ packages/@uppy/companion/package.json | 2 +- packages/@uppy/core/package.json | 2 +- packages/@uppy/dashboard/CHANGELOG.md | 7 ++ packages/@uppy/dashboard/package.json | 2 +- packages/@uppy/drag-drop/CHANGELOG.md | 7 ++ packages/@uppy/drag-drop/package.json | 2 +- packages/@uppy/file-input/CHANGELOG.md | 7 ++ packages/@uppy/file-input/package.json | 2 +- packages/@uppy/image-editor/package.json | 2 +- packages/@uppy/provider-views/package.json | 2 +- packages/@uppy/status-bar/package.json | 2 +- packages/@uppy/transloadit/CHANGELOG.md | 8 +++ packages/@uppy/transloadit/package.json | 2 +- packages/@uppy/tus/CHANGELOG.md | 7 ++ packages/@uppy/tus/package.json | 2 +- packages/@uppy/utils/package.json | 2 +- packages/@uppy/vue/package.json | 2 +- packages/uppy/package.json | 2 +- 26 files changed, 132 insertions(+), 55 deletions(-) diff --git a/BUNDLE-README.md b/BUNDLE-README.md index 248e1cf636..31d9147587 100644 --- a/BUNDLE-README.md +++ b/BUNDLE-README.md @@ -2,7 +2,7 @@ Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can use this from a CDN -(``) +(``) or bundle it with your webapp. Note that the recommended way to use Uppy is to install it with yarn/npm and use diff --git a/CHANGELOG.md b/CHANGELOG.md index a63513834a..be518dd3e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,40 @@ Please add your entries in this format: In the current stage we aim to release a new version at least every month. +## 4.1.1 + +Released: 2024-08-15 + +| Package | Version | Package | Version | +| ---------------------- | ------- | ---------------------- | ------- | +| @uppy/aws-s3 | 4.0.3 | @uppy/provider-views | 4.0.1 | +| @uppy/companion | 5.0.5 | @uppy/status-bar | 4.0.2 | +| @uppy/companion-client | 4.0.1 | @uppy/transloadit | 4.0.2 | +| @uppy/core | 4.1.1 | @uppy/tus | 4.0.1 | +| @uppy/dashboard | 4.0.3 | @uppy/utils | 6.0.2 | +| @uppy/drag-drop | 4.0.2 | @uppy/vue | 2.0.1 | +| @uppy/file-input | 4.0.1 | uppy | 4.1.1 | +| @uppy/image-editor | 3.0.1 | | | + +- @uppy/transloadit: fix issue with `allowMultipleUploadBatches` (Mikael Finstad / #5400) +- meta: Bump elliptic from 6.5.5 to 6.5.7 (dependabot[bot] / #5410) +- meta: add back patch for `p-queue` (Antoine du Hamel / #5409) +- @uppy/transloadit: fix many lurking `TypeError` (Mikael Finstad / #5399) +- docs: improve `corsOrigins` documentation (Mikael Finstad / #5390) +- docs: add `ViewEncapsulation` to Angular example (Aaron Russell / #5395) +- @uppy/companion: fix code for custom providers (Mikael Finstad / #5398) +- docs: add note about throwing in `cancelAll` and `destroy()` (Mikael Finstad / #5408) +- meta: Bump docker/login-action from 3.2.0 to 3.3.0 (dependabot[bot] / #5372) +- meta: Bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (dependabot[bot] / #5370) +- docs: make hosted Companion more clear (Merlijn Vos / #5394) +- meta: Bump docker/build-push-action from 6.4.1 to 6.6.1 (dependabot[bot] / #5403) +- meta: bump p-queue to latest, remove patch (Mikael Finstad / #5391) +- meta: enforce `.ts` extension for relative import types (Antoine du Hamel / #5393) +- @uppy/tus: Fix onShouldRetry type signature (Trent Nadeau / #5387) +- @uppy/dashboard,@uppy/drag-drop,@uppy/file-input: Transform the `accept` prop into a string everywhere (Evgenia Karunus / #5380) +- docs: fix getTemporarySecurityCredentials in aws-s3 (Merlijn Vos / #5363) + + ## 4.1.0 Released: 2024-07-30 diff --git a/README.md b/README.md index 77a7c7dfa8..83b1fedb1b 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ npm install @uppy/core @uppy/dashboard @uppy/tus ``` Add CSS -[uppy.min.css](https://releases.transloadit.com/uppy/v4.1.0/uppy.min.css), +[uppy.min.css](https://releases.transloadit.com/uppy/v4.1.1/uppy.min.css), either to your HTML page’s `` or include in JS, if your bundler of choice supports it. @@ -102,7 +102,7 @@ object. ```html @@ -113,7 +113,7 @@ object. Uppy, Dashboard, Tus, - } from 'https://releases.transloadit.com/uppy/v4.1.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.1.1/uppy.min.mjs' const uppy = new Uppy() uppy.use(Dashboard, { target: '#files-drag-drop' }) @@ -309,7 +309,7 @@ Use Uppy in your project? tim-koseltocieartuoxiansppaulnMikeKovariktoadkicker ap--tranvansangLiviaMedeirosbertho-zerojuliangruberHawxy gavboultonmejiaejelenalapedominicedenAcconutjhen0409 -stephentusobencergazdaa-kriyayonahforststanislavcervenaksksavant +stephentusobencergazdaa-kriyayonahforststanislav-cervenaksksavant ogtfabernndevstudioMatthiasKunnenmanuelkiesslingdargmueslijohnnyperkins ofhopeyaegorzhuangyasparanoidThomasG77subha1206 schonertSlavikTraktorscottbesslerjrschumacherrosenfeldrdimartino @@ -320,7 +320,7 @@ Use Uppy in your project? craig-jenningsdavekissdenysdesignethanwillisfrobinsonjrichmeij richartkeilpaescujmsandmartiuslimMartin005mskelton mactavishzlafedogrockerjedwoodjasonboscogeertclerx -ghasrfakhriJimmyLvrossngscherromanrobwilson1SxDx +ghasrfakhritcgjrossngscherromanrobwilson1SxDx reforaulibanezluarmreman8519pedantic-gitPzoco ppadmavilasomphillipalexanderpmusarajpedrofsplnetopatricklindsay Mitchell8210Tashowstajstrayersjauldsteverob @@ -328,47 +328,47 @@ Use Uppy in your project? sebasegovia01sdebackerRattonesamuelcolburnfortunto2GNURub rartachmiralken-kuromilannakummkopinskymhulet hrshmauricioribeiromatthewhartstongemjesuelemattfikmateuscruz -masumulu28masaokmartin-brennanmarcusforsbergmarcosthejewmperrando +masum-ulumasaokmartin-brennanmarcusforsbergmarcosthejeweliOcs pascalwengerterParsaArvanehPAcryptic022Ozodbek1405leftdevelnil1511 coreprocessnicojonestrungcva10a6tnnaveed-ahmadnadeemcpleasespammelater marton-laszlo-attilanavruzmmogzolshahimcltmnafeesboudra -netdownmosi-khamaddy-jomdxiaohumagumbojx-zyf -kode-ninjasontixyoujur-ngjohnmanjiro13jyoungbloodgreen-mike -gaelicwinterfrancklfingulelliotsayesdzcpydkisic -zanzlenderolitomasyoann-hellopretvedran555tusharjkhuntthanhthot -stduhpfslawexxx44rtaiebrmoura-92rlebosserhymes -lunttaphil714ordagoodselsevierninesaltneuronet77 -craigcbrunnerweston-sankey-mark43dwnstenagyvstiigvalentinoli -viallybodryityler-dot-earthtrivikrtop-mastertvaliasek -tomekptomsaleebaWIStudenttmaierTiarhaitwarlop -tcgjcodehero7386christianwengertcgoinglovecanvasbhc0b41 -avallaargghalfatvagreene-courseraaduh95-test-accountsartoshi-foot-dao -zackbloomzlawson-utzachconneryafkariYehudaKremerxhocquet -willycamargosercraigardeoisCommanderRootczjcbush06 +JimmyLvnetdownmosi-khamaddy-jomdxiaohumagumbo +jx-zyfkode-ninjasontixyoujur-ngjohnmanjiro13jyoungblood +green-mikegaelicwinterfrancklfingulelliotsayesdzcpy +dkisiczanzlenderolitomasyoann-hellopretvedran555tusharjkhunt +thanhthotstduhpfslawexxx44rtaiebrmoura-92rlebosse +rhymeslunttaphil714ordagoodselsevierninesalt +neuronet77craigcbrunnerweston-sankey-mark43dwnstenagyvstiig +valentinoliviallybodryityler-dot-earthtrivikrtanadeau +top-mastertvaliasektomekptomsaleebaWIStudenttmaier +Tiarhaitwarlopcodehero7386christianwengertcgoinglovecanvasbh +c0b41avallaargghalfatvagreene-courseraaduh95-test-account +sartoshi-foot-daozackbloomzlawson-utzachconneryafkariYehudaKremer +xhocquetwillycamargoardeoisCommanderRootczjcbush06 Aarbelcfracspranceprattcmpsubvertallchrischarlybillaud Cretezychaocellvinchungcartfiskcyubryanjswift -bedgerottoeliOcsyoldarefbautistaemuellEdgarSantiago93 +bedgerottowbaaronyoldarefbautistaemuellEdgarSantiago93 sweetrojeetissDennisKofflardhoangsvitdavilima6akizor KaminskiDaniellCantabarmrboomerdanilatdanschalowdanmichaelo -CruaierwbaaronfunctinoamitporttekacsDogfalo +CruaiersercraigQuorafindamitporttekacsDogfalo alirezahiaalepisalexnjasmt3ahmadissaadritasharma Adrreiadityapatadiaadamvigneaultajh-sradamdottvabannach -superhawk610ajschmidt8Quorafindbducharmeazizkazeemba +aaron-russellsuperhawk610ajschmidt8bducharmeazizkazeemba ayhankesiciogluavneetmalhotraThe-Flashatsawinash-jc-allenapuyou arthurdennerAbourasstyndriaanthony0030andychongyzandrii-bodnar -superandrew213radarherekidonngkevin-west-10xkergekacsafiresharkstudios -kaspermeinematykaroljveltenmellow-fellowjmontoyaajcalonso -jbelejjszobodyjorgeepcjondewoojonathanarbelyjsanchez034 -Jokcychromacomaonhatemarc-mabeLucklj521lucax88x -lucaperretombrlouimdolphinigleleomelzerleods92 -galli-leodvirylarowlanleaanthonyhoangbitslabohkip81 -kyleparisielkebabprofsmallpineIanVShuydodHussainAlkhalifah -HughbertDhiromi2424giacomocerquoneroenschggjungbgeoffappleford -gabiganamfuadscodesdtrucsferdiusafgallinariGkleinereva -epexaEnricoSottileelliotdickisontheJoeBizJmalesjessica-coursera -vithjanwiltsjanklimojamestiotiojcjmccleanJbithell -JakubHaladejjakemcallistergaejabongJacobMGEvansmazorussGreenJimmy -intenziveNaxYoishendyweb +superandrew213radarherefunctinomperrandokidonngkevin-west-10x +kergekacsafiresharkstudioskaspermeinematykaroljveltenmellow-fellow +jmontoyaajcalonsojbelejjszobodyjorgeepcjondewoo +jonathanarbelyjsanchez034Jokcychromacomaonhatemarc-mabe +Lucklj521lucax88xlucaperretombrlouimdolphinigle +leomelzerleods92galli-leodvirylarowlanleaanthony +hoangbitslabohkip81kyleparisielkebabprofsmallpineIanVS +huydodHussainAlkhalifahHughbertDhiromi2424giacomocerquoneroenschg +gjungbgeoffapplefordgabiganamfuadscodesdtrucsferdiusa +fgallinariGkleinerevaepexaEnricoSottileelliotdickisontheJoeBiz +Jmalesjessica-courseravithjanwiltsjanklimojamestiotio +jcjmccleanJbithellJakubHaladejjakemcallistergaejabongJacobMGEvans +mazorussGreenJimmyintenziveNaxYoishendyweb diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html index 15d1ebcda7..df48e27cac 100644 --- a/examples/cdn-example/index.html +++ b/examples/cdn-example/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Dashboard, Webcam, Tus, - } from 'https://releases.transloadit.com/uppy/v4.1.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.1.1/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/examples/uppy-with-companion/client/index.html b/examples/uppy-with-companion/client/index.html index 02175938fe..0d7d33e370 100644 --- a/examples/uppy-with-companion/client/index.html +++ b/examples/uppy-with-companion/client/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Instagram, GoogleDrive, Tus, - } from 'https://releases.transloadit.com/uppy/v4.1.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.1.1/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/packages/@uppy/aws-s3/package.json b/packages/@uppy/aws-s3/package.json index ad224a2701..fa9e176ca2 100644 --- a/packages/@uppy/aws-s3/package.json +++ b/packages/@uppy/aws-s3/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/aws-s3", "description": "Upload to Amazon S3 with Uppy", - "version": "4.0.2", + "version": "4.0.3", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/companion-client/package.json b/packages/@uppy/companion-client/package.json index 23161d2f63..3b63744ab3 100644 --- a/packages/@uppy/companion-client/package.json +++ b/packages/@uppy/companion-client/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/companion-client", "description": "Client library for communication with Companion. Intended for use in Uppy plugins.", - "version": "4.0.0", + "version": "4.0.1", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/companion/CHANGELOG.md b/packages/@uppy/companion/CHANGELOG.md index 1de5a68b9f..ae91d75f8e 100644 --- a/packages/@uppy/companion/CHANGELOG.md +++ b/packages/@uppy/companion/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/companion +## 5.0.5 + +Released: 2024-08-15 +Included in: Uppy v4.1.1 + +- @uppy/companion: fix code for custom providers (Mikael Finstad / #5398) + ## 5.0.3 Released: 2024-07-15 diff --git a/packages/@uppy/companion/package.json b/packages/@uppy/companion/package.json index c4a718a059..e282f2cd9c 100644 --- a/packages/@uppy/companion/package.json +++ b/packages/@uppy/companion/package.json @@ -1,6 +1,6 @@ { "name": "@uppy/companion", - "version": "5.0.4", + "version": "5.0.5", "description": "OAuth helper and remote fetcher for Uppy's (https://uppy.io) extensible file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox and Google Drive, S3 and more :dog:", "main": "lib/companion.js", "types": "lib/companion.d.ts", diff --git a/packages/@uppy/core/package.json b/packages/@uppy/core/package.json index 9337a036bd..357b080099 100644 --- a/packages/@uppy/core/package.json +++ b/packages/@uppy/core/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/core", "description": "Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.1.0", + "version": "4.1.1", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/dashboard/CHANGELOG.md b/packages/@uppy/dashboard/CHANGELOG.md index aaa7e9fdec..c8478049b2 100644 --- a/packages/@uppy/dashboard/CHANGELOG.md +++ b/packages/@uppy/dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/dashboard +## 4.0.3 + +Released: 2024-08-15 +Included in: Uppy v4.1.1 + +- @uppy/dashboard,@uppy/drag-drop,@uppy/file-input: Transform the `accept` prop into a string everywhere (Evgenia Karunus / #5380) + ## 4.0.2 Released: 2024-07-30 diff --git a/packages/@uppy/dashboard/package.json b/packages/@uppy/dashboard/package.json index db1cf62185..b330230db3 100644 --- a/packages/@uppy/dashboard/package.json +++ b/packages/@uppy/dashboard/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/dashboard", "description": "Universal UI plugin for Uppy.", - "version": "4.0.2", + "version": "4.0.3", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/drag-drop/CHANGELOG.md b/packages/@uppy/drag-drop/CHANGELOG.md index 2d48c87e79..a8ef5f7916 100644 --- a/packages/@uppy/drag-drop/CHANGELOG.md +++ b/packages/@uppy/drag-drop/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/drag-drop +## 4.0.2 + +Released: 2024-08-15 +Included in: Uppy v4.1.1 + +- @uppy/dashboard,@uppy/drag-drop,@uppy/file-input: Transform the `accept` prop into a string everywhere (Evgenia Karunus / #5380) + ## 4.0.1 Released: 2024-07-15 diff --git a/packages/@uppy/drag-drop/package.json b/packages/@uppy/drag-drop/package.json index 33653cf720..1d7f151493 100644 --- a/packages/@uppy/drag-drop/package.json +++ b/packages/@uppy/drag-drop/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/drag-drop", "description": "Droppable zone UI for Uppy. Drag and drop files into it to upload.", - "version": "4.0.1", + "version": "4.0.2", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/file-input/CHANGELOG.md b/packages/@uppy/file-input/CHANGELOG.md index 95839c22c5..c7aefce91c 100644 --- a/packages/@uppy/file-input/CHANGELOG.md +++ b/packages/@uppy/file-input/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/file-input +## 4.0.1 + +Released: 2024-08-15 +Included in: Uppy v4.1.1 + +- @uppy/dashboard,@uppy/drag-drop,@uppy/file-input: Transform the `accept` prop into a string everywhere (Evgenia Karunus / #5380) + ## 4.0.0-beta.4 Released: 2024-04-29 diff --git a/packages/@uppy/file-input/package.json b/packages/@uppy/file-input/package.json index 9d0160b460..00e06ccc5e 100644 --- a/packages/@uppy/file-input/package.json +++ b/packages/@uppy/file-input/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/file-input", "description": "Simple UI of a file input button that works with Uppy right out of the box", - "version": "4.0.0", + "version": "4.0.1", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/image-editor/package.json b/packages/@uppy/image-editor/package.json index e7ba7c6185..dd26a51c69 100644 --- a/packages/@uppy/image-editor/package.json +++ b/packages/@uppy/image-editor/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/image-editor", "description": "Image editor and cropping UI", - "version": "3.0.0", + "version": "3.0.1", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/provider-views/package.json b/packages/@uppy/provider-views/package.json index 5b3b26e561..52dd934a4b 100644 --- a/packages/@uppy/provider-views/package.json +++ b/packages/@uppy/provider-views/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/provider-views", "description": "View library for Uppy remote provider plugins.", - "version": "4.0.0", + "version": "4.0.1", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/status-bar/package.json b/packages/@uppy/status-bar/package.json index 4954635771..5f7353b209 100644 --- a/packages/@uppy/status-bar/package.json +++ b/packages/@uppy/status-bar/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/status-bar", "description": "A progress bar for Uppy, with many bells and whistles.", - "version": "4.0.1", + "version": "4.0.2", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/transloadit/CHANGELOG.md b/packages/@uppy/transloadit/CHANGELOG.md index f6c98a7c9b..5e0d8a6463 100644 --- a/packages/@uppy/transloadit/CHANGELOG.md +++ b/packages/@uppy/transloadit/CHANGELOG.md @@ -1,5 +1,13 @@ # @uppy/transloadit +## 4.0.2 + +Released: 2024-08-15 +Included in: Uppy v4.1.1 + +- @uppy/transloadit: fix issue with `allowMultipleUploadBatches` (Mikael Finstad / #5400) +- @uppy/transloadit: fix many lurking `TypeError` (Mikael Finstad / #5399) + ## 4.0.1 Released: 2024-07-30 diff --git a/packages/@uppy/transloadit/package.json b/packages/@uppy/transloadit/package.json index 5b41674a7b..a47b829e5d 100644 --- a/packages/@uppy/transloadit/package.json +++ b/packages/@uppy/transloadit/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/transloadit", "description": "The Transloadit plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and more", - "version": "4.0.1", + "version": "4.0.2", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/tus/CHANGELOG.md b/packages/@uppy/tus/CHANGELOG.md index 7b7ad7d645..7cd0be220b 100644 --- a/packages/@uppy/tus/CHANGELOG.md +++ b/packages/@uppy/tus/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/tus +## 4.0.1 + +Released: 2024-08-15 +Included in: Uppy v4.1.1 + +- @uppy/tus: Fix onShouldRetry type signature (Trent Nadeau / #5387) + ## 4.0.0-beta.6 Released: 2024-06-04 diff --git a/packages/@uppy/tus/package.json b/packages/@uppy/tus/package.json index 3cd9c9701e..342fcfb292 100644 --- a/packages/@uppy/tus/package.json +++ b/packages/@uppy/tus/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/tus", "description": "Resumable uploads for Uppy using Tus.io", - "version": "4.0.0", + "version": "4.0.1", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/utils/package.json b/packages/@uppy/utils/package.json index b18feb8929..6057df8258 100644 --- a/packages/@uppy/utils/package.json +++ b/packages/@uppy/utils/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/utils", "description": "Shared utility functions for Uppy Core and plugins maintained by the Uppy team.", - "version": "6.0.1", + "version": "6.0.2", "license": "MIT", "type": "module", "keywords": [ diff --git a/packages/@uppy/vue/package.json b/packages/@uppy/vue/package.json index 0b24ab9b22..b21d3f9530 100644 --- a/packages/@uppy/vue/package.json +++ b/packages/@uppy/vue/package.json @@ -1,6 +1,6 @@ { "name": "@uppy/vue", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT", "type": "module", "main": "lib/index.js", diff --git a/packages/uppy/package.json b/packages/uppy/package.json index 697a2ed8f3..459d934c5d 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,7 +1,7 @@ { "name": "uppy", "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.1.0", + "version": "4.1.1", "license": "MIT", "main": "index.mjs", "module": "index.mjs", From b506a725eb4a83b808e830e3a8c54c9da7b6eb36 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Mon, 19 Aug 2024 12:12:43 +0200 Subject: [PATCH 17/65] examples: remove `useUppy` from React Native example (#5405) remove useUppy https://github.com/transloadit/uppy/pull/5391/files/3212e58ca75afb7fbe83ae26cec56755c2eb84aa#r1703712209 --- examples/react-native-expo/App.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/react-native-expo/App.js b/examples/react-native-expo/App.js index d5784fb0ed..f380b4251a 100644 --- a/examples/react-native-expo/App.js +++ b/examples/react-native-expo/App.js @@ -4,7 +4,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage' import Uppy from '@uppy/core' import Tus from '@uppy/tus' import FilePicker from '@uppy/react-native' -import useUppy from '@uppy/react/lib/useUppy' import FileList from './FileList' import PauseResumeButton from './PauseResumeButton' import ProgressBar from './ProgressBar' @@ -27,15 +26,13 @@ export default function App () { const setState = useCallback((newState) => _setState((oldState) => ({ ...oldState, ...newState })), []) - const uppy = useUppy(() => { - return new Uppy({ autoProceed: true, debug: true }) + const [uppy] = useState(() => new Uppy({ autoProceed: true, debug: true }) .use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/', urlStorage: AsyncStorage, fileReader: getTusFileReader, chunkSize: 10 * 1024 * 1024, // keep the chunk size small to avoid memory exhaustion - }) - }) + })); useEffect(() => { uppy.on('upload-progress', (file, progress) => { From a50c18f5e60e127f5beb98ead6e8fa78098c22e5 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Tue, 20 Aug 2024 10:58:46 +0200 Subject: [PATCH 18/65] @uppy/transloadit: fix check if all files have been removed (#5419) Co-authored-by: Antoine du Hamel --- packages/@uppy/transloadit/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index dad3f498ab..9806928e52 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -416,7 +416,7 @@ export default class Transloadit< .getFiles() .filter(({ id }) => fileIDs.includes(id)) - if (files.length === 0) { + if (files.length === 0 && fileIDs.length !== 0) { // All files have been removed, cancelling. await this.client.cancelAssembly(newAssembly) return null From 28c4baf2c1a117e962510932674ef54660676a43 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Tue, 20 Aug 2024 16:06:37 +0200 Subject: [PATCH 19/65] @uppy/svelte: fix exports condition (#5416) * @uppy/svelte: fix exports condition * Use SvelteKit's recommendation --- packages/@uppy/svelte/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@uppy/svelte/package.json b/packages/@uppy/svelte/package.json index e207152628..5505e42e31 100644 --- a/packages/@uppy/svelte/package.json +++ b/packages/@uppy/svelte/package.json @@ -10,8 +10,8 @@ }, "exports": { ".": { - "svelte": "./src/index.js", - "default": "./lib/index.js" + "types": "./lib/index.d.ts", + "svelte": "./lib/index.js" }, "./package.json": "./package.json" }, From 50feeae4877e051a6480afc3b3ac472806acd0de Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Tue, 20 Aug 2024 16:54:20 +0200 Subject: [PATCH 20/65] @uppy/transloadit: add execution_progress to AssemblyResponse type (#5420) --- packages/@uppy/transloadit/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index 9806928e52..6d6f60c1b6 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -73,6 +73,7 @@ export interface AssemblyResponse { has_dupe_jobs: boolean execution_start: string execution_duration: number + execution_progress?: number queue_duration: number jobs_queue_duration: number notify_start?: any From abcab37bfe88dcf311de4ad0c84d307d9c2703a4 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Tue, 20 Aug 2024 19:29:03 +0200 Subject: [PATCH 21/65] docs: remove stale reference to plugins page (#5414) --- BUNDLE-README.md | 14 ++++++-------- README.md | 4 ---- packages/@uppy/core/src/Uppy.ts | 2 +- .../@uppy/core/src/__snapshots__/Uppy.test.ts.snap | 2 +- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/BUNDLE-README.md b/BUNDLE-README.md index 31d9147587..1647e3b4f1 100644 --- a/BUNDLE-README.md +++ b/BUNDLE-README.md @@ -83,14 +83,12 @@ inline into the page. This, and many more configuration options can be found here: . Uppy has many more Plugins besides Xhr and the Dashboard. For example, you can -enable Webcam, Instagram, or video encoding support. For a full list of Plugins -check here: . - -Note that for some Plugins, you will need to run a server side component called: -Companion. Those plugins are marked with a (c) symbol. Alternatively, you can -sign up for a free Transloadit account. Transloadit runs Companion for you, tusd -servers to handle resumable file uploads, and can post-process files to scan for -viruses, recognize faces, etc. Check: . +enable Webcam, Instagram, or video encoding support. Note that for some Plugins, +you will need to run a server side component called: Companion. Those plugins +are marked with a (c) symbol. Alternatively, you can sign up for a free +Transloadit account. Transloadit runs Companion for you, tusd servers to handle +resumable file uploads, and can post-process files to scan for viruses, +recognize faces, etc. Check: . ## Getting help diff --git a/README.md b/README.md index 83b1fedb1b..d61284d38e 100644 --- a/README.md +++ b/README.md @@ -124,8 +124,6 @@ object. ## Documentation - [Uppy](https://uppy.io/docs/uppy/) — full list of options, methods and events -- [Plugins](https://uppy.io/docs/plugins/) — list of Uppy plugins and their - options - [Companion](https://uppy.io/docs/companion/) — setting up and running a Companion instance, which adds support for Instagram, Dropbox, Box, Google Drive and remote URLs @@ -136,8 +134,6 @@ object. ## Plugins -[List of plugins and their common options](https://uppy.io/docs/plugins/) - ### UI Elements - [`Dashboard`](https://uppy.io/docs/dashboard/) — universal UI with previews, diff --git a/packages/@uppy/core/src/Uppy.ts b/packages/@uppy/core/src/Uppy.ts index d2ae0f260d..0440e22cec 100644 --- a/packages/@uppy/core/src/Uppy.ts +++ b/packages/@uppy/core/src/Uppy.ts @@ -1799,7 +1799,7 @@ export class Uppy< const msg = `Already found a plugin named '${existsPluginAlready.id}'. ` + `Tried to use: '${pluginId}'.\n` + - 'Uppy plugins must have unique `id` options. See https://uppy.io/docs/plugins/#id.' + 'Uppy plugins must have unique `id` options.' throw new Error(msg) } diff --git a/packages/@uppy/core/src/__snapshots__/Uppy.test.ts.snap b/packages/@uppy/core/src/__snapshots__/Uppy.test.ts.snap index c9094b96c7..04fa170a76 100644 --- a/packages/@uppy/core/src/__snapshots__/Uppy.test.ts.snap +++ b/packages/@uppy/core/src/__snapshots__/Uppy.test.ts.snap @@ -8,7 +8,7 @@ exports[`src/Core > plugins > should not be able to add an invalid plugin 1`] = exports[`src/Core > plugins > should prevent the same plugin from being added more than once 1`] = ` [Error: Already found a plugin named 'TestSelector1'. Tried to use: 'TestSelector1'. -Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.] +Uppy plugins must have unique \`id\` options.] `; exports[`src/Core > uploading a file > should only upload files that are not already assigned to another upload id 1`] = ` From 7c468991a57d4f89a211e87915d6d8a8d498e0d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 19:29:24 +0200 Subject: [PATCH 22/65] Bump docker/build-push-action from 6.6.1 to 6.7.0 (#5413) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.6.1 to 6.7.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/16ebe778df0e7752d2cfcbd924afdbbd89c1a755...5cd11c3a4ced054e52742c5fd54dca954e0edd85) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/companion-deploy.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/companion-deploy.yml b/.github/workflows/companion-deploy.yml index 2e18945514..5046f82a6a 100644 --- a/.github/workflows/companion-deploy.yml +++ b/.github/workflows/companion-deploy.yml @@ -63,7 +63,7 @@ jobs: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} - name: Build and push - uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1 + uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 with: push: true context: . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36888c5651..4a681e7c5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -159,7 +159,7 @@ jobs: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} - name: Build and push - uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1 + uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 with: push: true context: . From eec0d8a0c04222cda2903a5ac9dbe8f50e8973b5 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Tue, 20 Aug 2024 20:24:56 +0200 Subject: [PATCH 23/65] @uppy/status-bar: show upload button when files are recovered (#5418) --- packages/@uppy/status-bar/src/StatusBarUI.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/@uppy/status-bar/src/StatusBarUI.tsx b/packages/@uppy/status-bar/src/StatusBarUI.tsx index b4bbf76f7c..6f5cc4480f 100644 --- a/packages/@uppy/status-bar/src/StatusBarUI.tsx +++ b/packages/@uppy/status-bar/src/StatusBarUI.tsx @@ -140,8 +140,7 @@ export default function StatusBarUI({ const showUploadBtn = !error && newFiles && - !isUploadInProgress && - !isAllPaused && + ((!isUploadInProgress && !isAllPaused) || recoveredState) && allowNewUpload && !hideUploadButton From bb4bbaa223f064419d0f4dd42b6a872529683785 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:11:59 +0000 Subject: [PATCH 24/65] Release: uppy@4.2.0 (#5421) | Package | Version | Package | Version | | ----------------- | ------- | ----------------- | ------- | | @uppy/core | 4.1.2 | @uppy/transloadit | 4.1.0 | | @uppy/status-bar | 4.0.3 | uppy | 4.2.0 | | @uppy/svelte | 4.0.1 | | | - @uppy/status-bar: show upload button when files are recovered (Merlijn Vos / #5418) - meta: Bump docker/build-push-action from 6.6.1 to 6.7.0 (dependabot[bot] / #5413) - docs: remove stale reference to plugins page (Merlijn Vos / #5414) - @uppy/transloadit: add execution_progress to AssemblyResponse type (Merlijn Vos / #5420) - @uppy/svelte: fix exports condition (Merlijn Vos / #5416) - @uppy/transloadit: fix check if all files have been removed (Merlijn Vos / #5419) - examples: remove `useUppy` from React Native example (Mikael Finstad / #5405) --- BUNDLE-README.md | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ README.md | 6 +++--- examples/cdn-example/index.html | 4 ++-- .../uppy-with-companion/client/index.html | 4 ++-- packages/@uppy/core/package.json | 2 +- packages/@uppy/status-bar/CHANGELOG.md | 7 +++++++ packages/@uppy/status-bar/package.json | 2 +- packages/@uppy/svelte/CHANGELOG.md | 7 +++++++ packages/@uppy/svelte/package.json | 2 +- packages/@uppy/transloadit/CHANGELOG.md | 8 ++++++++ packages/@uppy/transloadit/package.json | 2 +- packages/uppy/package.json | 2 +- 13 files changed, 54 insertions(+), 13 deletions(-) diff --git a/BUNDLE-README.md b/BUNDLE-README.md index 1647e3b4f1..4250dd9048 100644 --- a/BUNDLE-README.md +++ b/BUNDLE-README.md @@ -2,7 +2,7 @@ Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can use this from a CDN -(``) +(``) or bundle it with your webapp. Note that the recommended way to use Uppy is to install it with yarn/npm and use diff --git a/CHANGELOG.md b/CHANGELOG.md index be518dd3e9..b914140356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,25 @@ Please add your entries in this format: In the current stage we aim to release a new version at least every month. +## 4.2.0 + +Released: 2024-08-20 + +| Package | Version | Package | Version | +| ----------------- | ------- | ----------------- | ------- | +| @uppy/core | 4.1.2 | @uppy/transloadit | 4.1.0 | +| @uppy/status-bar | 4.0.3 | uppy | 4.2.0 | +| @uppy/svelte | 4.0.1 | | | + +- @uppy/status-bar: show upload button when files are recovered (Merlijn Vos / #5418) +- meta: Bump docker/build-push-action from 6.6.1 to 6.7.0 (dependabot[bot] / #5413) +- docs: remove stale reference to plugins page (Merlijn Vos / #5414) +- @uppy/transloadit: add execution_progress to AssemblyResponse type (Merlijn Vos / #5420) +- @uppy/svelte: fix exports condition (Merlijn Vos / #5416) +- @uppy/transloadit: fix check if all files have been removed (Merlijn Vos / #5419) +- examples: remove `useUppy` from React Native example (Mikael Finstad / #5405) + + ## 4.1.1 Released: 2024-08-15 diff --git a/README.md b/README.md index d61284d38e..5da6f3367d 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ npm install @uppy/core @uppy/dashboard @uppy/tus ``` Add CSS -[uppy.min.css](https://releases.transloadit.com/uppy/v4.1.1/uppy.min.css), +[uppy.min.css](https://releases.transloadit.com/uppy/v4.2.0/uppy.min.css), either to your HTML page’s `` or include in JS, if your bundler of choice supports it. @@ -102,7 +102,7 @@ object. ```html @@ -113,7 +113,7 @@ object. Uppy, Dashboard, Tus, - } from 'https://releases.transloadit.com/uppy/v4.1.1/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.2.0/uppy.min.mjs' const uppy = new Uppy() uppy.use(Dashboard, { target: '#files-drag-drop' }) diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html index df48e27cac..1eab747e92 100644 --- a/examples/cdn-example/index.html +++ b/examples/cdn-example/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Dashboard, Webcam, Tus, - } from 'https://releases.transloadit.com/uppy/v4.1.1/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.2.0/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/examples/uppy-with-companion/client/index.html b/examples/uppy-with-companion/client/index.html index 0d7d33e370..1ace6e2b79 100644 --- a/examples/uppy-with-companion/client/index.html +++ b/examples/uppy-with-companion/client/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Instagram, GoogleDrive, Tus, - } from 'https://releases.transloadit.com/uppy/v4.1.1/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.2.0/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/packages/@uppy/core/package.json b/packages/@uppy/core/package.json index 357b080099..189bf465dc 100644 --- a/packages/@uppy/core/package.json +++ b/packages/@uppy/core/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/core", "description": "Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.1.1", + "version": "4.1.2", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/status-bar/CHANGELOG.md b/packages/@uppy/status-bar/CHANGELOG.md index dc10bb5053..86b50232de 100644 --- a/packages/@uppy/status-bar/CHANGELOG.md +++ b/packages/@uppy/status-bar/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/status-bar +## 4.0.3 + +Released: 2024-08-20 +Included in: Uppy v4.2.0 + +- @uppy/status-bar: show upload button when files are recovered (Merlijn Vos / #5418) + ## 4.0.1 Released: 2024-07-30 diff --git a/packages/@uppy/status-bar/package.json b/packages/@uppy/status-bar/package.json index 5f7353b209..f9aee10144 100644 --- a/packages/@uppy/status-bar/package.json +++ b/packages/@uppy/status-bar/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/status-bar", "description": "A progress bar for Uppy, with many bells and whistles.", - "version": "4.0.2", + "version": "4.0.3", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/svelte/CHANGELOG.md b/packages/@uppy/svelte/CHANGELOG.md index 13757cdea5..5caec0282e 100644 --- a/packages/@uppy/svelte/CHANGELOG.md +++ b/packages/@uppy/svelte/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/svelte +## 4.0.1 + +Released: 2024-08-20 +Included in: Uppy v4.2.0 + +- @uppy/svelte: fix exports condition (Merlijn Vos / #5416) + ## 4.0.0-beta.2 Released: 2024-04-29 diff --git a/packages/@uppy/svelte/package.json b/packages/@uppy/svelte/package.json index 5505e42e31..d3d0d03bfe 100644 --- a/packages/@uppy/svelte/package.json +++ b/packages/@uppy/svelte/package.json @@ -2,7 +2,7 @@ "name": "@uppy/svelte", "description": "Uppy plugin that helps integrate Uppy into your Svelte project.", "type": "module", - "version": "4.0.0", + "version": "4.0.1", "scripts": { "build": "rollup -c", "prepublishOnly": "yarn run build", diff --git a/packages/@uppy/transloadit/CHANGELOG.md b/packages/@uppy/transloadit/CHANGELOG.md index 5e0d8a6463..68e09fb49e 100644 --- a/packages/@uppy/transloadit/CHANGELOG.md +++ b/packages/@uppy/transloadit/CHANGELOG.md @@ -1,5 +1,13 @@ # @uppy/transloadit +## 4.1.0 + +Released: 2024-08-20 +Included in: Uppy v4.2.0 + +- @uppy/transloadit: add execution_progress to AssemblyResponse type (Merlijn Vos / #5420) +- @uppy/transloadit: fix check if all files have been removed (Merlijn Vos / #5419) + ## 4.0.2 Released: 2024-08-15 diff --git a/packages/@uppy/transloadit/package.json b/packages/@uppy/transloadit/package.json index a47b829e5d..e5c93cf90c 100644 --- a/packages/@uppy/transloadit/package.json +++ b/packages/@uppy/transloadit/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/transloadit", "description": "The Transloadit plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and more", - "version": "4.0.2", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/uppy/package.json b/packages/uppy/package.json index 459d934c5d..d1196e9c4c 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,7 +1,7 @@ { "name": "uppy", "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.1.1", + "version": "4.2.0", "license": "MIT", "main": "index.mjs", "module": "index.mjs", From fcae8031321318f7758ee1fcbece3b08472f83be Mon Sep 17 00:00:00 2001 From: mkabatek Date: Thu, 22 Aug 2024 07:28:30 -0600 Subject: [PATCH 25/65] docs: fix Golden Retriever service worker import (#5425) --- docs/golden-retriever.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/golden-retriever.mdx b/docs/golden-retriever.mdx index bc5a245a38..33387d2804 100644 --- a/docs/golden-retriever.mdx +++ b/docs/golden-retriever.mdx @@ -106,7 +106,7 @@ store references to large files. ::: ```js title="sw.js" - import('@uppy/golden-retriever/lib/ServiceWorker'); + import '@uppy/golden-retriever/lib/ServiceWorker'; ``` 2. Register it in your app’s entry point: From 13581742e5b872ce1f40874e176aa772a3df6806 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Fri, 23 Aug 2024 10:32:03 +0200 Subject: [PATCH 26/65] @uppy/react: fix `use-sync-external-store` import (#5426) --- packages/@uppy/react/src/useUppyState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@uppy/react/src/useUppyState.ts b/packages/@uppy/react/src/useUppyState.ts index e69a63a420..b811e89a77 100644 --- a/packages/@uppy/react/src/useUppyState.ts +++ b/packages/@uppy/react/src/useUppyState.ts @@ -1,7 +1,7 @@ import type { Uppy, State } from '@uppy/core' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import { useMemo, useCallback } from 'react' -import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector' +import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector.js' export default function useUppyState< M extends Meta = Meta, From 0a78023b3bf7fabec75977859b96806f25eadbcf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:48:45 +0000 Subject: [PATCH 27/65] Release: uppy@4.2.1 (#5430) | Package | Version | Package | Version | | ----------- | ------- | ----------- | ------- | | @uppy/react | 4.0.2 | uppy | 4.2.1 | - @uppy/react: fix `use-sync-external-store` import (Merlijn Vos / #5426) - docs: fix Golden Retriever service worker import (mkabatek / #5425) --- BUNDLE-README.md | 2 +- CHANGELOG.md | 12 ++ README.md | 104 +++++++++--------- examples/cdn-example/index.html | 4 +- .../uppy-with-companion/client/index.html | 4 +- packages/@uppy/react/CHANGELOG.md | 7 ++ packages/@uppy/react/package.json | 2 +- packages/uppy/package.json | 2 +- 8 files changed, 78 insertions(+), 59 deletions(-) diff --git a/BUNDLE-README.md b/BUNDLE-README.md index 4250dd9048..ffad4ffe18 100644 --- a/BUNDLE-README.md +++ b/BUNDLE-README.md @@ -2,7 +2,7 @@ Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can use this from a CDN -(``) +(``) or bundle it with your webapp. Note that the recommended way to use Uppy is to install it with yarn/npm and use diff --git a/CHANGELOG.md b/CHANGELOG.md index b914140356..7f849c5a90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,18 @@ Please add your entries in this format: In the current stage we aim to release a new version at least every month. +## 4.2.1 + +Released: 2024-08-26 + +| Package | Version | Package | Version | +| ----------- | ------- | ----------- | ------- | +| @uppy/react | 4.0.2 | uppy | 4.2.1 | + +- @uppy/react: fix `use-sync-external-store` import (Merlijn Vos / #5426) +- docs: fix Golden Retriever service worker import (mkabatek / #5425) + + ## 4.2.0 Released: 2024-08-20 diff --git a/README.md b/README.md index 5da6f3367d..5d57c45720 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ npm install @uppy/core @uppy/dashboard @uppy/tus ``` Add CSS -[uppy.min.css](https://releases.transloadit.com/uppy/v4.2.0/uppy.min.css), +[uppy.min.css](https://releases.transloadit.com/uppy/v4.2.1/uppy.min.css), either to your HTML page’s `` or include in JS, if your bundler of choice supports it. @@ -102,7 +102,7 @@ object. ```html @@ -113,7 +113,7 @@ object. Uppy, Dashboard, Tus, - } from 'https://releases.transloadit.com/uppy/v4.2.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.2.1/uppy.min.mjs' const uppy = new Uppy() uppy.use(Dashboard, { target: '#files-drag-drop' }) @@ -302,33 +302,33 @@ Use Uppy in your project? dependabot[bot]kiloreuxsamuelayosadovnychyirichardwillarsajkachnic zcallanYukeshShrjankooliverpoolBotzmcallistertyler mokutsu-courseradschmidtDJWassinkmrbatistataoqftimodwhit -tim-koseltocieartuoxiansppaulnMikeKovariktoadkicker -ap--tranvansangLiviaMedeirosbertho-zerojuliangruberHawxy -gavboultonmejiaejelenalapedominicedenAcconutjhen0409 -stephentusobencergazdaa-kriyayonahforststanislav-cervenaksksavant -ogtfabernndevstudioMatthiasKunnenmanuelkiesslingdargmueslijohnnyperkins -ofhopeyaegorzhuangyasparanoidThomasG77subha1206 -schonertSlavikTraktorscottbesslerjrschumacherrosenfeldrdimartino -ahmedkandelYoussef1313allenfantasyZyclotrop-janarkbdirito -darthf1fortriebfrederikhorsheocoijareymuhammadInam -rettgerstmkabatekjukakoskiolemoignbtrice5idereal +tuoxianspeltocieartim-kospaulnMikeKovariktoadkicker +dominicedenap--tranvansangLiviaMedeirosbertho-zerojuliangruber +HawxyelenalapegavboultonmejiaejAcconutjhen0409 +mkabatekstephentusobencergazdaa-kriyayonahforststanislav-cervenak +sksavantogtfabernndevstudioMatthiasKunnendargmueslimanuelkiessling +johnnyperkinsofhopeyaegorzhuangyasparanoidThomasG77 +subha1206schonertSlavikTraktorscottbesslerjrschumacherrosenfeld +rdimartinoahmedkandelYoussef1313allenfantasyZyclotrop-janark +bdiritodarthf1fortriebfrederikhorsheocoijarey +muhammadInamrettgerstjukakoskiolemoign5iderealbtrice AndrwMbehnammodiBePo65bradedelmancamiloforerocommand-tab craig-jenningsdavekissdenysdesignethanwillisfrobinsonjrichmeij richartkeilpaescujmsandmartiuslimMartin005mskelton -mactavishzlafedogrockerjedwoodjasonboscogeertclerx -ghasrfakhritcgjrossngscherromanrobwilson1SxDx -reforaulibanezluarmreman8519pedantic-gitPzoco -ppadmavilasomphillipalexanderpmusarajpedrofsplnetopatricklindsay -Mitchell8210Tashowstajstrayersjauldsteverob -amaituquigebowaptikSpazzMarticusszhsergei-zelinsky -sebasegovia01sdebackerRattonesamuelcolburnfortunto2GNURub -rartachmiralken-kuromilannakummkopinskymhulet -hrshmauricioribeiromatthewhartstongemjesuelemattfikmateuscruz -masum-ulumasaokmartin-brennanmarcusforsbergmarcosthejeweliOcs -pascalwengerterParsaArvanehPAcryptic022Ozodbek1405leftdevelnil1511 -coreprocessnicojonestrungcva10a6tnnaveed-ahmadnadeemcpleasespammelater -marton-laszlo-attilanavruzmmogzolshahimcltmnafeesboudra -JimmyLvnetdownmosi-khamaddy-jomdxiaohumagumbo +mactavishzlafedogrockerjedwoodjasonboscoghasrfakhri +geertclerxJimmyLvrartrossngscherromanrobwilson1 +SxDxreforaulibanezluarmreman8519pedantic-git +Pzocoppadmavilasomphillipalexanderpmusarajpedrofsplneto +patricklindsaytcgjTashowstajstrayersjauld +steverobamaituquigebowaptikSpazzMarticusszh +sergei-zelinskysebasegovia01sdebackerRattonesamuelcolburnfortunto2 +GNURubMitchell8210achmiralken-kuromilannakummkopinsky +mhulethrshmauricioribeiromatthewhartstongemjesuelemattfik +mateuscruzmasum-ulumasaokmartin-brennanmarcusforsbergmarcosthejew +mperrandopascalwengerterParsaArvanehPAcryptic022Ozodbek1405leftdevel +nil1511coreprocessnicojonestrungcva10a6tnnaveed-ahmadnadeemc +pleasespammelatermarton-laszlo-attilanavruzmmogzolshahimcltmnafees +boudranetdownmosi-khamaddy-jomdxiaohumagumbo jx-zyfkode-ninjasontixyoujur-ngjohnmanjiro13jyoungblood green-mikegaelicwinterfrancklfingulelliotsayesdzcpy dkisiczanzlenderolitomasyoann-hellopretvedran555tusharjkhunt @@ -340,31 +340,31 @@ Use Uppy in your project? Tiarhaitwarlopcodehero7386christianwengertcgoinglovecanvasbh c0b41avallaargghalfatvagreene-courseraaduh95-test-account sartoshi-foot-daozackbloomzlawson-utzachconneryafkariYehudaKremer -xhocquetwillycamargoardeoisCommanderRootczjcbush06 -Aarbelcfracspranceprattcmpsubvertallchrischarlybillaud -Cretezychaocellvinchungcartfiskcyubryanjswift -bedgerottowbaaronyoldarefbautistaemuellEdgarSantiago93 -sweetrojeetissDennisKofflardhoangsvitdavilima6akizor -KaminskiDaniellCantabarmrboomerdanilatdanschalowdanmichaelo -CruaiersercraigQuorafindamitporttekacsDogfalo -alirezahiaalepisalexnjasmt3ahmadissaadritasharma -Adrreiadityapatadiaadamvigneaultajh-sradamdottvabannach -aaron-russellsuperhawk610ajschmidt8bducharmeazizkazeemba -ayhankesiciogluavneetmalhotraThe-Flashatsawinash-jc-allenapuyou -arthurdennerAbourasstyndriaanthony0030andychongyzandrii-bodnar -superandrew213radarherefunctinomperrandokidonngkevin-west-10x -kergekacsafiresharkstudioskaspermeinematykaroljveltenmellow-fellow -jmontoyaajcalonsojbelejjszobodyjorgeepcjondewoo -jonathanarbelyjsanchez034Jokcychromacomaonhatemarc-mabe -Lucklj521lucax88xlucaperretombrlouimdolphinigle -leomelzerleods92galli-leodvirylarowlanleaanthony -hoangbitslabohkip81kyleparisielkebabprofsmallpineIanVS -huydodHussainAlkhalifahHughbertDhiromi2424giacomocerquoneroenschg -gjungbgeoffapplefordgabiganamfuadscodesdtrucsferdiusa -fgallinariGkleinerevaepexaEnricoSottileelliotdickisontheJoeBiz -Jmalesjessica-courseravithjanwiltsjanklimojamestiotio -jcjmccleanJbithellJakubHaladejjakemcallistergaejabongJacobMGEvans -mazorussGreenJimmyintenziveNaxYoishendyweb +xhocquetwillycamargoonhateardeoisCommanderRootczj +cbush06Aarbelcfracspranceprattcmpsubvertallchris +charlybillaudCretezychaocellvinchungcartfiskcyu +bryanjswiftbedgerottowbaaronyoldarefbautistaemuell +EdgarSantiago93sweetrojeetissDennisKofflardhoangsvitdavilima6 +akizorKaminskiDaniellCantabarmrboomerdanilatdanschalow +danmichaeloCruaiersercraigQuorafindamitporttekacs +Dogfaloalirezahiaalepisalexnjasmt3ahmadissa +adritasharmaAdrreiadityapatadiaadamvigneaultajh-sradamdottv +abannachaaron-russellsuperhawk610ajschmidt8bducharmeazizk +azeembaayhankesiciogluavneetmalhotraThe-Flashatsawinash-jc-allen +apuyouarthurdennerAbourasstyndriaanthony0030andychongyz +andrii-bodnarsuperandrew213radarherefunctinokevin-west-10xkergekacsa +firesharkstudioskaspermeinematykaroljveltenmellow-fellowjmontoyaa +jcalonsojbelejjszobodyjorgeepcjondewoojonathanarbely +jsanchez034Jokcychromacomaprofsmallpinemarc-mabeLucklj521 +lucax88xlucaperretombrlouimdolphinigleleomelzer +leods92galli-leodvirylarowlanleaanthonyhoangbits +labohkip81kyleparisielkebabkidonngtheJoeBizhuydod +HussainAlkhalifahHughbertDhiromi2424giacomocerquoneroenschggjungb +geoffapplefordgabiganamfuadscodesdtrucsferdiusafgallinari +GkleinerevaepexaEnricoSottileelliotdickisoneliOcsJmales +jessica-courseravithjanwiltsjanklimojamestiotiojcjmcclean +JbithellJakubHaladejjakemcallistergaejabongJacobMGEvansmazoruss +GreenJimmyintenziveNaxYoishendywebIanVS diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html index 1eab747e92..09f635d703 100644 --- a/examples/cdn-example/index.html +++ b/examples/cdn-example/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Dashboard, Webcam, Tus, - } from 'https://releases.transloadit.com/uppy/v4.2.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.2.1/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/examples/uppy-with-companion/client/index.html b/examples/uppy-with-companion/client/index.html index 1ace6e2b79..6854297958 100644 --- a/examples/uppy-with-companion/client/index.html +++ b/examples/uppy-with-companion/client/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Instagram, GoogleDrive, Tus, - } from 'https://releases.transloadit.com/uppy/v4.2.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.2.1/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/packages/@uppy/react/CHANGELOG.md b/packages/@uppy/react/CHANGELOG.md index bde9e91920..2b92303042 100644 --- a/packages/@uppy/react/CHANGELOG.md +++ b/packages/@uppy/react/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/react +## 4.0.2 + +Released: 2024-08-26 +Included in: Uppy v4.2.1 + +- @uppy/react: fix `use-sync-external-store` import (Merlijn Vos / #5426) + ## 4.0.0 Released: 2024-07-10 diff --git a/packages/@uppy/react/package.json b/packages/@uppy/react/package.json index 9be4c08e74..96c4b2aaf0 100644 --- a/packages/@uppy/react/package.json +++ b/packages/@uppy/react/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/react", "description": "React component wrappers around Uppy's official UI plugins.", - "version": "4.0.1", + "version": "4.0.2", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/uppy/package.json b/packages/uppy/package.json index d1196e9c4c..928c1a26ca 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,7 +1,7 @@ { "name": "uppy", "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.2.0", + "version": "4.2.1", "license": "MIT", "main": "index.mjs", "module": "index.mjs", From f6ebc52b5bb6f0ab1202fc476254410294af833a Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Tue, 27 Aug 2024 10:30:11 +0200 Subject: [PATCH 28/65] docs: correctly list exported components (#5417) --- docs/framework-integrations/angular.mdx | 14 ++++++++++---- docs/framework-integrations/react.mdx | 1 + docs/framework-integrations/svelte.mdx | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/framework-integrations/angular.mdx b/docs/framework-integrations/angular.mdx index c7e2eafc2a..bcb154e42f 100644 --- a/docs/framework-integrations/angular.mdx +++ b/docs/framework-integrations/angular.mdx @@ -48,10 +48,16 @@ instance can be passed into components as a `props` prop. The following plugins are available as Angular component wrappers: -- `` renders [`@uppy/dashboard`](/docs/dashboard) -- `` renders [`@uppy/drag-drop`](/docs/drag-drop) -- `` renders [`@uppy/progress-bar`](/docs/progress-bar) -- `` renders [`@uppy/status-bar`](/docs/status-bar) +- Import `UppyAngularDashboardModule` used as `` renders + [`@uppy/dashboard`](/docs/dashboard) +- Import `UppyAngularDashboardModalModule` used as `` + renders [`@uppy/dashboard`](/docs/dashboard) as a modal +- Import `UppyAngularProgressBarModule` used as `` renders + [`@uppy/progress-bar`](/docs/progress-bar) +- Import `UppyAngularStatusBarModule` used as `` renders + [`@uppy/status-bar`](/docs/status-bar) +- Import `UppyAngularDragDropModule` used as `` renders + [`@uppy/drag-drop`](/docs/drag-drop) Each component takes a `props` prop that will be passed to the UI Plugin. diff --git a/docs/framework-integrations/react.mdx b/docs/framework-integrations/react.mdx index 6be7bfd227..80ab8778b8 100644 --- a/docs/framework-integrations/react.mdx +++ b/docs/framework-integrations/react.mdx @@ -57,6 +57,7 @@ and looking at our examples below. The following components are exported from `@uppy/react`: - `` renders [`@uppy/dashboard`](/docs/dashboard) +- `` renders [`@uppy/dashboard`](/docs/dashboard) as a modal - `` renders [`@uppy/drag-drop`](/docs/drag-drop) - `` renders [`@uppy/progress-bar`](/docs/progress-bar) - `` renders [`@uppy/status-bar`](/docs/status-bar) diff --git a/docs/framework-integrations/svelte.mdx b/docs/framework-integrations/svelte.mdx index a0735f7cac..6d8922bc36 100644 --- a/docs/framework-integrations/svelte.mdx +++ b/docs/framework-integrations/svelte.mdx @@ -41,6 +41,7 @@ You also need to install the UI plugin you want to use. For instance, The following plugins are available as Svelte component wrappers: - `` renders [`@uppy/dashboard`](/docs/dashboard) +- `` renders [`@uppy/dashboard`](/docs/dashboard) as a modal - `` renders [`@uppy/drag-drop`](/docs/drag-drop) - `` renders [`@uppy/progress-bar`](/docs/progress-bar) - `` renders [`@uppy/status-bar`](/docs/status-bar) From 64bffd53634e862b917b6dbee4bea7e4b1a563bc Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 28 Aug 2024 15:49:03 +0200 Subject: [PATCH 29/65] export plugin options (#5433) --- .github/workflows/bundlers.yml | 14 +- bin/build-bundle.mjs | 2 +- packages/@uppy/aws-s3/src/index.ts | 2 + packages/@uppy/box/src/index.ts | 1 + packages/@uppy/compressor/src/index.ts | 2 + packages/@uppy/dropbox/src/index.ts | 1 + packages/@uppy/facebook/src/index.ts | 1 + packages/@uppy/google-drive/src/index.ts | 1 + packages/@uppy/google-photos/src/index.ts | 1 + .../@uppy/image-editor/src/ImageEditor.tsx | 2 +- packages/@uppy/image-editor/src/index.ts | 1 + packages/@uppy/informer/src/index.ts | 1 + packages/@uppy/instagram/src/index.ts | 1 + packages/@uppy/onedrive/src/index.ts | 1 + packages/@uppy/screen-capture/src/index.ts | 1 + packages/@uppy/tus/src/index.ts | 1 + packages/@uppy/unsplash/src/index.ts | 1 + packages/@uppy/url/src/index.ts | 1 + packages/@uppy/xhr-upload/src/index.ts | 2 + packages/@uppy/zoom/src/index.ts | 1 + packages/uppy/.npmignore | 2 + packages/uppy/bundle.mjs | 2 +- packages/uppy/package.json | 6 +- packages/uppy/{index.mjs => src/bundle.ts} | 15 +- packages/uppy/src/index.ts | 42 ++++ packages/uppy/tsconfig.build.json | 186 ++++++++++++++++++ packages/uppy/tsconfig.json | 182 +++++++++++++++++ tsconfig.json | 3 + 28 files changed, 460 insertions(+), 16 deletions(-) rename packages/uppy/{index.mjs => src/bundle.ts} (90%) create mode 100644 packages/uppy/src/index.ts create mode 100644 packages/uppy/tsconfig.build.json create mode 100644 packages/uppy/tsconfig.json diff --git a/.github/workflows/bundlers.yml b/.github/workflows/bundlers.yml index 7f186ac5ba..8f96efd6de 100644 --- a/.github/workflows/bundlers.yml +++ b/.github/workflows/bundlers.yml @@ -105,7 +105,7 @@ jobs: } from "@rollup/plugin-node-resolve"; export default { - input: "./index.mjs", + input: "./lib/index.js", output: { file: "/dev/null", }, @@ -137,9 +137,9 @@ jobs: - run: npx webpack --version - name: Create Webpack config file run: - echo - 'module.exports={mode:"production",target:"web",entry:"./index.mjs"}' - > webpack.config.js + echo 'export default + {mode:"production",target:"web",entry:"./lib/index.js"}' > + webpack.config.js - name: Bundle run: npx webpack @@ -171,7 +171,7 @@ jobs: run: npm i --save-dev parcel@${{matrix.bundler-version}} - run: npx parcel --version - name: Bundle - run: npx parcel build index.mjs + run: npx parcel build lib/index.js vite: needs: isolate_uppy @@ -194,7 +194,7 @@ jobs: - name: Create index.html run: echo '' > index.html + src="./lib/index.js">' > index.html - name: Bundle run: npx vite build @@ -217,6 +217,6 @@ jobs: run: npm i --save-dev esbuild@${{matrix.bundler-version}} - run: npx esbuild --version - name: Bundle - run: npx esbuild index.mjs --bundle --outfile=/dev/null + run: npx esbuild lib/index.js --bundle --outfile=/dev/null # Browserify: doesn't support ESM. diff --git a/bin/build-bundle.mjs b/bin/build-bundle.mjs index 79bad41b35..19f7a63f8e 100644 --- a/bin/build-bundle.mjs +++ b/bin/build-bundle.mjs @@ -34,7 +34,7 @@ await fs.mkdir(new URL('./uppy/dist', PACKAGES_ROOT), { recursive: true }) const methods = [ buildBundle( - './packages/uppy/index.mjs', + './packages/uppy/src/bundle.ts', './packages/uppy/dist/uppy.min.mjs', { standalone: 'Uppy (ESM)', format: 'esm' }, ), diff --git a/packages/@uppy/aws-s3/src/index.ts b/packages/@uppy/aws-s3/src/index.ts index bf4be9293f..8f47632174 100644 --- a/packages/@uppy/aws-s3/src/index.ts +++ b/packages/@uppy/aws-s3/src/index.ts @@ -277,6 +277,8 @@ export type AwsS3MultipartOptions< | AWSS3MaybeMultipartWithoutCompanion ) +export type { AwsS3MultipartOptions as AwsS3Options } + const defaultOptions = { allowedMetaFields: true, limit: 6, diff --git a/packages/@uppy/box/src/index.ts b/packages/@uppy/box/src/index.ts index 08b1d2fcf2..60192cdf13 100644 --- a/packages/@uppy/box/src/index.ts +++ b/packages/@uppy/box/src/index.ts @@ -1 +1,2 @@ export { default } from './Box.tsx' +export type { BoxOptions } from './Box.tsx' diff --git a/packages/@uppy/compressor/src/index.ts b/packages/@uppy/compressor/src/index.ts index 7b714e7c45..c57fea1664 100644 --- a/packages/@uppy/compressor/src/index.ts +++ b/packages/@uppy/compressor/src/index.ts @@ -21,6 +21,8 @@ export interface CompressorOpts extends PluginOpts, CompressorJS.Options { limit?: number } +export type { CompressorOpts as CompressorOptions } + const defaultOptions = { quality: 0.6, limit: 10, diff --git a/packages/@uppy/dropbox/src/index.ts b/packages/@uppy/dropbox/src/index.ts index d896f6e294..cabbf5f31f 100644 --- a/packages/@uppy/dropbox/src/index.ts +++ b/packages/@uppy/dropbox/src/index.ts @@ -1 +1,2 @@ export { default } from './Dropbox.tsx' +export type { DropboxOptions } from './Dropbox.tsx' diff --git a/packages/@uppy/facebook/src/index.ts b/packages/@uppy/facebook/src/index.ts index 03f7627249..0d5614e9ab 100644 --- a/packages/@uppy/facebook/src/index.ts +++ b/packages/@uppy/facebook/src/index.ts @@ -1 +1,2 @@ export { default } from './Facebook.tsx' +export type { FacebookOptions } from './Facebook.tsx' diff --git a/packages/@uppy/google-drive/src/index.ts b/packages/@uppy/google-drive/src/index.ts index 55e0f30fdf..29eebdb0df 100644 --- a/packages/@uppy/google-drive/src/index.ts +++ b/packages/@uppy/google-drive/src/index.ts @@ -1 +1,2 @@ export { default } from './GoogleDrive.tsx' +export type { GoogleDriveOptions } from './GoogleDrive.tsx' diff --git a/packages/@uppy/google-photos/src/index.ts b/packages/@uppy/google-photos/src/index.ts index 7535efaaca..d511fae8c1 100644 --- a/packages/@uppy/google-photos/src/index.ts +++ b/packages/@uppy/google-photos/src/index.ts @@ -1 +1,2 @@ export { default } from './GooglePhotos.tsx' +export type { GooglePhotosOptions } from './GooglePhotos.tsx' diff --git a/packages/@uppy/image-editor/src/ImageEditor.tsx b/packages/@uppy/image-editor/src/ImageEditor.tsx index 7517bd2057..ea896a380d 100644 --- a/packages/@uppy/image-editor/src/ImageEditor.tsx +++ b/packages/@uppy/image-editor/src/ImageEditor.tsx @@ -36,7 +36,7 @@ declare module '@uppy/core' { } } -interface Opts extends UIPluginOptions { +export interface Opts extends UIPluginOptions { quality?: number cropperOptions?: Cropper.Options & { croppedCanvasOptions?: Cropper.GetCroppedCanvasOptions diff --git a/packages/@uppy/image-editor/src/index.ts b/packages/@uppy/image-editor/src/index.ts index 4986bf7bb3..c30fd39721 100644 --- a/packages/@uppy/image-editor/src/index.ts +++ b/packages/@uppy/image-editor/src/index.ts @@ -1 +1,2 @@ export { default } from './ImageEditor.tsx' +export type { Opts as ImageEditorOptions } from './ImageEditor.tsx' diff --git a/packages/@uppy/informer/src/index.ts b/packages/@uppy/informer/src/index.ts index 4fdd12b2f5..8a1b4b634b 100644 --- a/packages/@uppy/informer/src/index.ts +++ b/packages/@uppy/informer/src/index.ts @@ -1 +1,2 @@ export { default } from './Informer.tsx' +export type { InformerOptions } from './Informer.tsx' diff --git a/packages/@uppy/instagram/src/index.ts b/packages/@uppy/instagram/src/index.ts index 7ae3c53f13..55b55b3302 100644 --- a/packages/@uppy/instagram/src/index.ts +++ b/packages/@uppy/instagram/src/index.ts @@ -1 +1,2 @@ export { default } from './Instagram.tsx' +export type { InstagramOptions } from './Instagram.tsx' diff --git a/packages/@uppy/onedrive/src/index.ts b/packages/@uppy/onedrive/src/index.ts index a57387758c..65ee4feddb 100644 --- a/packages/@uppy/onedrive/src/index.ts +++ b/packages/@uppy/onedrive/src/index.ts @@ -1 +1,2 @@ export { default } from './OneDrive.tsx' +export type { OneDriveOptions } from './OneDrive.tsx' diff --git a/packages/@uppy/screen-capture/src/index.ts b/packages/@uppy/screen-capture/src/index.ts index 7b8367c9f9..60ff953d37 100644 --- a/packages/@uppy/screen-capture/src/index.ts +++ b/packages/@uppy/screen-capture/src/index.ts @@ -1 +1,2 @@ export { default } from './ScreenCapture.tsx' +export type { ScreenCaptureOptions } from './ScreenCapture.tsx' diff --git a/packages/@uppy/tus/src/index.ts b/packages/@uppy/tus/src/index.ts index eba999df58..74d9946aa9 100644 --- a/packages/@uppy/tus/src/index.ts +++ b/packages/@uppy/tus/src/index.ts @@ -60,6 +60,7 @@ export interface TusOpts allowedMetaFields?: boolean | string[] rateLimitedQueue?: RateLimitedQueue } +export type { TusOpts as TusOptions } /** * Extracted from https://github.com/tus/tus-js-client/blob/master/lib/upload.js#L13 diff --git a/packages/@uppy/unsplash/src/index.ts b/packages/@uppy/unsplash/src/index.ts index f88c464959..7f3ab2b6dc 100644 --- a/packages/@uppy/unsplash/src/index.ts +++ b/packages/@uppy/unsplash/src/index.ts @@ -1 +1,2 @@ export { default } from './Unsplash.tsx' +export type { UnsplashOptions } from './Unsplash.tsx' diff --git a/packages/@uppy/url/src/index.ts b/packages/@uppy/url/src/index.ts index dc341e0ed8..3d9355dd3a 100644 --- a/packages/@uppy/url/src/index.ts +++ b/packages/@uppy/url/src/index.ts @@ -1 +1,2 @@ export { default } from './Url.tsx' +export type { UrlOptions } from './Url.tsx' diff --git a/packages/@uppy/xhr-upload/src/index.ts b/packages/@uppy/xhr-upload/src/index.ts index 418085d452..8d91c41274 100644 --- a/packages/@uppy/xhr-upload/src/index.ts +++ b/packages/@uppy/xhr-upload/src/index.ts @@ -60,6 +60,8 @@ export interface XhrUploadOpts bundle?: boolean } +export type { XhrUploadOpts as XHRUploadOptions } + declare module '@uppy/utils/lib/UppyFile' { // eslint-disable-next-line no-shadow export interface UppyFile { diff --git a/packages/@uppy/zoom/src/index.ts b/packages/@uppy/zoom/src/index.ts index 09744198a2..4a98e7e541 100644 --- a/packages/@uppy/zoom/src/index.ts +++ b/packages/@uppy/zoom/src/index.ts @@ -1 +1,2 @@ export { default } from './Zoom.tsx' +export type { ZoomOptions } from './Zoom.tsx' diff --git a/packages/uppy/.npmignore b/packages/uppy/.npmignore index 1fc72b6165..0ac9f63ea2 100644 --- a/packages/uppy/.npmignore +++ b/packages/uppy/.npmignore @@ -1 +1,3 @@ # This file need to be there so .gitignored files are still uploaded to the npm registry. + +tsconfig.* diff --git a/packages/uppy/bundle.mjs b/packages/uppy/bundle.mjs index 16fc25e22f..519e1ea7b4 100644 --- a/packages/uppy/bundle.mjs +++ b/packages/uppy/bundle.mjs @@ -2,6 +2,6 @@ 'use strict' -import * as Uppy from './index.mjs' +import * as Uppy from './src/index.ts' globalThis.Uppy = Uppy diff --git a/packages/uppy/package.json b/packages/uppy/package.json index 928c1a26ca..f4af966d83 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -3,8 +3,9 @@ "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", "version": "4.2.1", "license": "MIT", - "main": "index.mjs", - "module": "index.mjs", + "main": "lib/index.js", + "module": "lib/index.js", + "type": "module", "unpkg": "dist/uppy.min.js", "style": "dist/uppy.min.css", "keywords": [ @@ -32,7 +33,6 @@ "dependencies": { "@uppy/audio": "workspace:^", "@uppy/aws-s3": "workspace:^", - "@uppy/aws-s3-multipart": "workspace:^", "@uppy/box": "workspace:^", "@uppy/companion-client": "workspace:^", "@uppy/compressor": "workspace:^", diff --git a/packages/uppy/index.mjs b/packages/uppy/src/bundle.ts similarity index 90% rename from packages/uppy/index.mjs rename to packages/uppy/src/bundle.ts index d25dbb5e56..a16e05078f 100644 --- a/packages/uppy/index.mjs +++ b/packages/uppy/src/bundle.ts @@ -1,3 +1,4 @@ +/* eslint-disable import/first */ // Core export { default as Uppy, debugLogger } from '@uppy/core' @@ -8,7 +9,7 @@ export { default as BasePlugin } from '@uppy/core/lib/BasePlugin.js' /** * @deprecated Use `Uppy` instead of `Core` */ -export function Core () { +export function Core() { throw new Error('Core has been renamed to Uppy') } @@ -16,10 +17,12 @@ export function Core () { export * as server from '@uppy/companion-client' import * as ProviderView from '@uppy/provider-views' + export const views = { ProviderView } // Stores export { default as DefaultStore } from '@uppy/store-default' +// @ts-expect-error untyped export { default as ReduxStore } from '@uppy/store-redux' // UI plugins @@ -50,7 +53,6 @@ export { default as Zoom } from '@uppy/zoom' // Uploaders export { default as AwsS3 } from '@uppy/aws-s3' -export { default as AwsS3Multipart } from '@uppy/aws-s3-multipart' export { default as Transloadit } from '@uppy/transloadit' export { default as Tus } from '@uppy/tus' export { default as XHRUpload } from '@uppy/xhr-upload' @@ -59,12 +61,19 @@ export { default as XHRUpload } from '@uppy/xhr-upload' export { default as Compressor } from '@uppy/compressor' export { default as Form } from '@uppy/form' export { default as GoldenRetriever } from '@uppy/golden-retriever' +// @ts-expect-error untyped export { default as ReduxDevTools } from '@uppy/redux-dev-tools' export { default as ThumbnailGenerator } from '@uppy/thumbnail-generator' // Special hack for Transloadit static exports -import Transloadit, { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit' +import Transloadit, { + COMPANION_URL, + COMPANION_ALLOWED_HOSTS, +} from '@uppy/transloadit' + +// @ts-expect-error monkey patching Transloadit.COMPANION_URL = COMPANION_URL +// @ts-expect-error monkey patching Transloadit.COMPANION_ALLOWED_HOSTS = COMPANION_ALLOWED_HOSTS export const locales = {} diff --git a/packages/uppy/src/index.ts b/packages/uppy/src/index.ts new file mode 100644 index 0000000000..14d5eb5ff4 --- /dev/null +++ b/packages/uppy/src/index.ts @@ -0,0 +1,42 @@ +export * from './bundle.ts' + +// Core +export type { UppyOptions, UIPluginOptions } from '@uppy/core' + +// UI plugins +export type { DashboardOptions } from '@uppy/dashboard' +export type { DragDropOptions } from '@uppy/drag-drop' +export type { DropTargetOptions } from '@uppy/drop-target' +export type { FileInputOptions } from '@uppy/file-input' +export type { ImageEditorOptions } from '@uppy/image-editor' +export type { InformerOptions } from '@uppy/informer' +export type { ProgressBarOptions } from '@uppy/progress-bar' +export type { StatusBarOptions } from '@uppy/status-bar' + +// Acquirers +export type { AudioOptions } from '@uppy/audio' +export type { BoxOptions } from '@uppy/box' +export type { DropboxOptions } from '@uppy/dropbox' +export type { FacebookOptions } from '@uppy/facebook' +export type { GoogleDriveOptions } from '@uppy/google-drive' +export type { GooglePhotosOptions } from '@uppy/google-photos' +export type { InstagramOptions } from '@uppy/instagram' +export type { OneDriveOptions } from '@uppy/onedrive' +export type { RemoteSourcesOptions } from '@uppy/remote-sources' +export type { ScreenCaptureOptions } from '@uppy/screen-capture' +export type { UnsplashOptions } from '@uppy/unsplash' +export type { UrlOptions } from '@uppy/url' +export type { WebcamOptions } from '@uppy/webcam' +export type { ZoomOptions } from '@uppy/zoom' + +// Uploaders +export type { AwsS3Options } from '@uppy/aws-s3' +export type { TransloaditOptions } from '@uppy/transloadit' +export type { TusOptions } from '@uppy/tus' +export type { XHRUploadOptions } from '@uppy/xhr-upload' + +// Miscellaneous +export type { CompressorOptions } from '@uppy/compressor' +export type { FormOptions } from '@uppy/form' +export type { GoldenRetrieverOptions } from '@uppy/golden-retriever' +export type { ThumbnailGeneratorOptions } from '@uppy/thumbnail-generator' diff --git a/packages/uppy/tsconfig.build.json b/packages/uppy/tsconfig.build.json new file mode 100644 index 0000000000..f1959778aa --- /dev/null +++ b/packages/uppy/tsconfig.build.json @@ -0,0 +1,186 @@ +{ + "extends": "../../tsconfig.shared", + "compilerOptions": { + "noImplicitAny": false, + "outDir": "./lib", + "paths": { + "@uppy/audio": ["../audio/src/index.js"], + "@uppy/audio/lib/*": ["../audio/src/*"], + "@uppy/aws-s3": ["../aws-s3/src/index.js"], + "@uppy/aws-s3/lib/*": ["../aws-s3/src/*"], + "@uppy/box": ["../box/src/index.js"], + "@uppy/box/lib/*": ["../box/src/*"], + "@uppy/companion-client": ["../companion-client/src/index.js"], + "@uppy/companion-client/lib/*": ["../companion-client/src/*"], + "@uppy/compressor": ["../compressor/src/index.js"], + "@uppy/compressor/lib/*": ["../compressor/src/*"], + "@uppy/core": ["../core/src/index.js"], + "@uppy/core/lib/*": ["../core/src/*"], + "@uppy/dashboard": ["../dashboard/src/index.js"], + "@uppy/dashboard/lib/*": ["../dashboard/src/*"], + "@uppy/drag-drop": ["../drag-drop/src/index.js"], + "@uppy/drag-drop/lib/*": ["../drag-drop/src/*"], + "@uppy/drop-target": ["../drop-target/src/index.js"], + "@uppy/drop-target/lib/*": ["../drop-target/src/*"], + "@uppy/dropbox": ["../dropbox/src/index.js"], + "@uppy/dropbox/lib/*": ["../dropbox/src/*"], + "@uppy/facebook": ["../facebook/src/index.js"], + "@uppy/facebook/lib/*": ["../facebook/src/*"], + "@uppy/file-input": ["../file-input/src/index.js"], + "@uppy/file-input/lib/*": ["../file-input/src/*"], + "@uppy/form": ["../form/src/index.js"], + "@uppy/form/lib/*": ["../form/src/*"], + "@uppy/golden-retriever": ["../golden-retriever/src/index.js"], + "@uppy/golden-retriever/lib/*": ["../golden-retriever/src/*"], + "@uppy/google-drive": ["../google-drive/src/index.js"], + "@uppy/google-drive/lib/*": ["../google-drive/src/*"], + "@uppy/google-photos": ["../google-photos/src/index.js"], + "@uppy/google-photos/lib/*": ["../google-photos/src/*"], + "@uppy/image-editor": ["../image-editor/src/index.js"], + "@uppy/image-editor/lib/*": ["../image-editor/src/*"], + "@uppy/informer": ["../informer/src/index.js"], + "@uppy/informer/lib/*": ["../informer/src/*"], + "@uppy/instagram": ["../instagram/src/index.js"], + "@uppy/instagram/lib/*": ["../instagram/src/*"], + "@uppy/onedrive": ["../onedrive/src/index.js"], + "@uppy/onedrive/lib/*": ["../onedrive/src/*"], + "@uppy/progress-bar": ["../progress-bar/src/index.js"], + "@uppy/progress-bar/lib/*": ["../progress-bar/src/*"], + "@uppy/provider-views": ["../provider-views/src/index.js"], + "@uppy/provider-views/lib/*": ["../provider-views/src/*"], + "@uppy/remote-sources": ["../remote-sources/src/index.js"], + "@uppy/remote-sources/lib/*": ["../remote-sources/src/*"], + "@uppy/screen-capture": ["../screen-capture/src/index.js"], + "@uppy/screen-capture/lib/*": ["../screen-capture/src/*"], + "@uppy/status-bar": ["../status-bar/src/index.js"], + "@uppy/status-bar/lib/*": ["../status-bar/src/*"], + "@uppy/store-default": ["../store-default/src/index.js"], + "@uppy/store-default/lib/*": ["../store-default/src/*"], + "@uppy/thumbnail-generator": ["../thumbnail-generator/src/index.js"], + "@uppy/thumbnail-generator/lib/*": ["../thumbnail-generator/src/*"], + "@uppy/transloadit": ["../transloadit/src/index.js"], + "@uppy/transloadit/lib/*": ["../transloadit/src/*"], + "@uppy/tus": ["../tus/src/index.js"], + "@uppy/tus/lib/*": ["../tus/src/*"], + "@uppy/unsplash": ["../unsplash/src/index.js"], + "@uppy/unsplash/lib/*": ["../unsplash/src/*"], + "@uppy/url": ["../url/src/index.js"], + "@uppy/url/lib/*": ["../url/src/*"], + "@uppy/webcam": ["../webcam/src/index.js"], + "@uppy/webcam/lib/*": ["../webcam/src/*"], + "@uppy/xhr-upload": ["../xhr-upload/src/index.js"], + "@uppy/xhr-upload/lib/*": ["../xhr-upload/src/*"], + "@uppy/zoom": ["../zoom/src/index.js"], + "@uppy/zoom/lib/*": ["../zoom/src/*"] + }, + "resolveJsonModule": false, + "rootDir": "./src", + "skipLibCheck": true + }, + "include": ["./src/**/*.*"], + "exclude": ["./src/**/*.test.ts"], + "references": [ + { + "path": "../@uppy/audio/tsconfig.build.json" + }, + { + "path": "../@uppy/aws-s3/tsconfig.build.json" + }, + { + "path": "../@uppy/box/tsconfig.build.json" + }, + { + "path": "../@uppy/companion-client/tsconfig.build.json" + }, + { + "path": "../@uppy/compressor/tsconfig.build.json" + }, + { + "path": "../@uppy/core/tsconfig.build.json" + }, + { + "path": "../@uppy/dashboard/tsconfig.build.json" + }, + { + "path": "../@uppy/drag-drop/tsconfig.build.json" + }, + { + "path": "../@uppy/drop-target/tsconfig.build.json" + }, + { + "path": "../@uppy/dropbox/tsconfig.build.json" + }, + { + "path": "../@uppy/facebook/tsconfig.build.json" + }, + { + "path": "../@uppy/file-input/tsconfig.build.json" + }, + { + "path": "../@uppy/form/tsconfig.build.json" + }, + { + "path": "../@uppy/golden-retriever/tsconfig.build.json" + }, + { + "path": "../@uppy/google-drive/tsconfig.build.json" + }, + { + "path": "../@uppy/google-photos/tsconfig.build.json" + }, + { + "path": "../@uppy/image-editor/tsconfig.build.json" + }, + { + "path": "../@uppy/informer/tsconfig.build.json" + }, + { + "path": "../@uppy/instagram/tsconfig.build.json" + }, + { + "path": "../@uppy/onedrive/tsconfig.build.json" + }, + { + "path": "../@uppy/progress-bar/tsconfig.build.json" + }, + { + "path": "../@uppy/provider-views/tsconfig.build.json" + }, + { + "path": "../@uppy/remote-sources/tsconfig.build.json" + }, + { + "path": "../@uppy/screen-capture/tsconfig.build.json" + }, + { + "path": "../@uppy/status-bar/tsconfig.build.json" + }, + { + "path": "../@uppy/store-default/tsconfig.build.json" + }, + { + "path": "../@uppy/thumbnail-generator/tsconfig.build.json" + }, + { + "path": "../@uppy/transloadit/tsconfig.build.json" + }, + { + "path": "../@uppy/tus/tsconfig.build.json" + }, + { + "path": "../@uppy/unsplash/tsconfig.build.json" + }, + { + "path": "../@uppy/url/tsconfig.build.json" + }, + { + "path": "../@uppy/webcam/tsconfig.build.json" + }, + { + "path": "../@uppy/xhr-upload/tsconfig.build.json" + }, + { + "path": "../@uppy/zoom/tsconfig.build.json" + } + ] +} diff --git a/packages/uppy/tsconfig.json b/packages/uppy/tsconfig.json new file mode 100644 index 0000000000..d7fbb5b81a --- /dev/null +++ b/packages/uppy/tsconfig.json @@ -0,0 +1,182 @@ +{ + "extends": "../../../tsconfig.shared", + "compilerOptions": { + "emitDeclarationOnly": false, + "noEmit": true, + "paths": { + "@uppy/audio": ["../audio/src/index.js"], + "@uppy/audio/lib/*": ["../audio/src/*"], + "@uppy/aws-s3": ["../aws-s3/src/index.js"], + "@uppy/aws-s3/lib/*": ["../aws-s3/src/*"], + "@uppy/box": ["../box/src/index.js"], + "@uppy/box/lib/*": ["../box/src/*"], + "@uppy/companion-client": ["../companion-client/src/index.js"], + "@uppy/companion-client/lib/*": ["../companion-client/src/*"], + "@uppy/compressor": ["../compressor/src/index.js"], + "@uppy/compressor/lib/*": ["../compressor/src/*"], + "@uppy/core": ["../core/src/index.js"], + "@uppy/core/lib/*": ["../core/src/*"], + "@uppy/dashboard": ["../dashboard/src/index.js"], + "@uppy/dashboard/lib/*": ["../dashboard/src/*"], + "@uppy/drag-drop": ["../drag-drop/src/index.js"], + "@uppy/drag-drop/lib/*": ["../drag-drop/src/*"], + "@uppy/drop-target": ["../drop-target/src/index.js"], + "@uppy/drop-target/lib/*": ["../drop-target/src/*"], + "@uppy/dropbox": ["../dropbox/src/index.js"], + "@uppy/dropbox/lib/*": ["../dropbox/src/*"], + "@uppy/facebook": ["../facebook/src/index.js"], + "@uppy/facebook/lib/*": ["../facebook/src/*"], + "@uppy/file-input": ["../file-input/src/index.js"], + "@uppy/file-input/lib/*": ["../file-input/src/*"], + "@uppy/form": ["../form/src/index.js"], + "@uppy/form/lib/*": ["../form/src/*"], + "@uppy/golden-retriever": ["../golden-retriever/src/index.js"], + "@uppy/golden-retriever/lib/*": ["../golden-retriever/src/*"], + "@uppy/google-drive": ["../google-drive/src/index.js"], + "@uppy/google-drive/lib/*": ["../google-drive/src/*"], + "@uppy/google-photos": ["../google-photos/src/index.js"], + "@uppy/google-photos/lib/*": ["../google-photos/src/*"], + "@uppy/image-editor": ["../image-editor/src/index.js"], + "@uppy/image-editor/lib/*": ["../image-editor/src/*"], + "@uppy/informer": ["../informer/src/index.js"], + "@uppy/informer/lib/*": ["../informer/src/*"], + "@uppy/instagram": ["../instagram/src/index.js"], + "@uppy/instagram/lib/*": ["../instagram/src/*"], + "@uppy/onedrive": ["../onedrive/src/index.js"], + "@uppy/onedrive/lib/*": ["../onedrive/src/*"], + "@uppy/progress-bar": ["../progress-bar/src/index.js"], + "@uppy/progress-bar/lib/*": ["../progress-bar/src/*"], + "@uppy/provider-views": ["../provider-views/src/index.js"], + "@uppy/provider-views/lib/*": ["../provider-views/src/*"], + "@uppy/remote-sources": ["../remote-sources/src/index.js"], + "@uppy/remote-sources/lib/*": ["../remote-sources/src/*"], + "@uppy/screen-capture": ["../screen-capture/src/index.js"], + "@uppy/screen-capture/lib/*": ["../screen-capture/src/*"], + "@uppy/status-bar": ["../status-bar/src/index.js"], + "@uppy/status-bar/lib/*": ["../status-bar/src/*"], + "@uppy/store-default": ["../store-default/src/index.js"], + "@uppy/store-default/lib/*": ["../store-default/src/*"], + "@uppy/thumbnail-generator": ["../thumbnail-generator/src/index.js"], + "@uppy/thumbnail-generator/lib/*": ["../thumbnail-generator/src/*"], + "@uppy/transloadit": ["../transloadit/src/index.js"], + "@uppy/transloadit/lib/*": ["../transloadit/src/*"], + "@uppy/tus": ["../tus/src/index.js"], + "@uppy/tus/lib/*": ["../tus/src/*"], + "@uppy/unsplash": ["../unsplash/src/index.js"], + "@uppy/unsplash/lib/*": ["../unsplash/src/*"], + "@uppy/url": ["../url/src/index.js"], + "@uppy/url/lib/*": ["../url/src/*"], + "@uppy/webcam": ["../webcam/src/index.js"], + "@uppy/webcam/lib/*": ["../webcam/src/*"], + "@uppy/xhr-upload": ["../xhr-upload/src/index.js"], + "@uppy/xhr-upload/lib/*": ["../xhr-upload/src/*"], + "@uppy/zoom": ["../zoom/src/index.js"], + "@uppy/zoom/lib/*": ["../zoom/src/*"], + }, + }, + "include": ["./package.json", "./src/**/*.*"], + "references": [ + { + "path": "../@uppy/audio/tsconfig.build.json", + }, + { + "path": "../@uppy/aws-s3/tsconfig.build.json", + }, + { + "path": "../@uppy/box/tsconfig.build.json", + }, + { + "path": "../@uppy/companion-client/tsconfig.build.json", + }, + { + "path": "../@uppy/compressor/tsconfig.build.json", + }, + { + "path": "../@uppy/core/tsconfig.build.json", + }, + { + "path": "../@uppy/dashboard/tsconfig.build.json", + }, + { + "path": "../@uppy/drag-drop/tsconfig.build.json", + }, + { + "path": "../@uppy/drop-target/tsconfig.build.json", + }, + { + "path": "../@uppy/dropbox/tsconfig.build.json", + }, + { + "path": "../@uppy/facebook/tsconfig.build.json", + }, + { + "path": "../@uppy/file-input/tsconfig.build.json", + }, + { + "path": "../@uppy/form/tsconfig.build.json", + }, + { + "path": "../@uppy/golden-retriever/tsconfig.build.json", + }, + { + "path": "../@uppy/google-drive/tsconfig.build.json", + }, + { + "path": "../@uppy/google-photos/tsconfig.build.json", + }, + { + "path": "../@uppy/image-editor/tsconfig.build.json", + }, + { + "path": "../@uppy/informer/tsconfig.build.json", + }, + { + "path": "../@uppy/instagram/tsconfig.build.json", + }, + { + "path": "../@uppy/onedrive/tsconfig.build.json", + }, + { + "path": "../@uppy/progress-bar/tsconfig.build.json", + }, + { + "path": "../@uppy/provider-views/tsconfig.build.json", + }, + { + "path": "../@uppy/remote-sources/tsconfig.build.json", + }, + { + "path": "../@uppy/screen-capture/tsconfig.build.json", + }, + { + "path": "../@uppy/status-bar/tsconfig.build.json", + }, + { + "path": "../@uppy/store-default/tsconfig.build.json", + }, + { + "path": "../@uppy/thumbnail-generator/tsconfig.build.json", + }, + { + "path": "../@uppy/transloadit/tsconfig.build.json", + }, + { + "path": "../@uppy/tus/tsconfig.build.json", + }, + { + "path": "../@uppy/unsplash/tsconfig.build.json", + }, + { + "path": "../@uppy/url/tsconfig.build.json", + }, + { + "path": "../@uppy/webcam/tsconfig.build.json", + }, + { + "path": "../@uppy/xhr-upload/tsconfig.build.json", + }, + { + "path": "../@uppy/zoom/tsconfig.build.json", + }, + ], +} diff --git a/tsconfig.json b/tsconfig.json index c6dbf53368..bcc25fbd62 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -115,5 +115,8 @@ { "path": "./packages/@uppy/zoom/tsconfig.build.json", }, + { + "path": "./packages/uppy/tsconfig.build.json", + }, ], } From 38bf2a720cc63c1a7688c99787fc54db58ecd0bb Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Wed, 28 Aug 2024 16:29:39 +0200 Subject: [PATCH 30/65] @uppy/remote-sources: support companionKeysParams (#5434) * @uppy/remote-sources: support companionKeysParams * fix doc reference --- docs/presets/remote-sources.mdx | 38 +++++++++++++++++++ .../src/CompanionPluginOptions.ts | 2 +- .../@uppy/remote-sources/src/index.test.ts | 15 ++++++++ packages/@uppy/remote-sources/src/index.ts | 36 +++++++++++++++--- 4 files changed, 84 insertions(+), 7 deletions(-) diff --git a/docs/presets/remote-sources.mdx b/docs/presets/remote-sources.mdx index 676972e453..5bcb0423d0 100644 --- a/docs/presets/remote-sources.mdx +++ b/docs/presets/remote-sources.mdx @@ -81,6 +81,42 @@ new Uppy(); .use(RemoteSources, { companionUrl: 'https://your-companion-url' }); ``` +### Use with Transloadit + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import RemoteSources from '@uppy/remote-sources'; + +uppy.use(RemoteSources, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, +}); +``` + +You may also hit rate limits, because the OAuth application is shared between +everyone using Transloadit. + +To solve that, you can use your own OAuth keys with Transloadit’s hosted +Companion servers by using Transloadit Template Credentials. [Create a Template +Credential][template-credentials] on the Transloadit site. Select “Companion +OAuth” for the service, and enter the key and secret for the provider you want +to use. Then you can pass the name of the new credentials to that provider: + +```js +import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit'; +import RemoteSources from '@uppy/remote-sources'; + +uppy.use(RemoteSources, { + companionUrl: COMPANION_URL, + companionAllowedHosts: COMPANION_ALLOWED_HOSTS, + companionKeysParams: { + GoogleDrive: { key: '...', credentialsName: '...' }, + Dropbox: { key: '...', credentialsName: '...' }, + // ...etc + }, +}); +``` + ## API ### Options @@ -139,3 +175,5 @@ DOM element, CSS selector, or plugin to place the drag and drop area into [`request.credentials` value]: https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials +[template-credentials]: + https://transloadit.com/docs/#how-to-create-template-credentials diff --git a/packages/@uppy/companion-client/src/CompanionPluginOptions.ts b/packages/@uppy/companion-client/src/CompanionPluginOptions.ts index cc19a2e69c..751357f7f4 100644 --- a/packages/@uppy/companion-client/src/CompanionPluginOptions.ts +++ b/packages/@uppy/companion-client/src/CompanionPluginOptions.ts @@ -5,7 +5,7 @@ export interface CompanionPluginOptions extends UIPluginOptions { storage?: typeof tokenStorage companionUrl: string companionHeaders?: Record - companionKeysParams?: Record + companionKeysParams?: { key: string; credentialsName: string } companionCookiesRule?: 'same-origin' | 'include' companionAllowedHosts?: string | RegExp | (string | RegExp)[] } diff --git a/packages/@uppy/remote-sources/src/index.test.ts b/packages/@uppy/remote-sources/src/index.test.ts index 261bc89a67..09f2f09374 100644 --- a/packages/@uppy/remote-sources/src/index.test.ts +++ b/packages/@uppy/remote-sources/src/index.test.ts @@ -50,4 +50,19 @@ describe('RemoteSources', () => { 'Invalid plugin: "Webcam" is not one of: Box, Dropbox, Facebook, GoogleDrive, GooglePhotos, Instagram, OneDrive, Unsplash, Url, or Zoom.', ) }) + + it('should pass companionKeysParams', () => { + const core = new Core() + const companionKeysParams = { + GoogleDrive: { key: 'google', credentialsName: 'google' }, + } + core.use(Dashboard) + core.use(RemoteSources, { + companionUrl: 'https://example.com', + companionKeysParams, + }) + expect(core.getPlugin('GoogleDrive')?.opts.companionKeysParams).toEqual( + companionKeysParams.GoogleDrive, + ) + }) }) diff --git a/packages/@uppy/remote-sources/src/index.ts b/packages/@uppy/remote-sources/src/index.ts index b62a26eaed..460e6123ef 100644 --- a/packages/@uppy/remote-sources/src/index.ts +++ b/packages/@uppy/remote-sources/src/index.ts @@ -32,14 +32,33 @@ const availablePlugins = { Zoom, } -export interface RemoteSourcesOptions extends CompanionPluginOptions { - sources?: Array> +type AvailablePluginsKeys = + | 'Box' + | 'Dropbox' + | 'Facebook' + | 'GoogleDrive' + | 'GooglePhotos' + | 'Instagram' + | 'OneDrive' + | 'Unsplash' + | 'Url' + | 'Zoom' + +type NestedCompanionKeysParams = { + [key in AvailablePluginsKeys]?: CompanionPluginOptions['companionKeysParams'] +} + +export interface RemoteSourcesOptions + extends Omit { + sources?: Array + // Individual remote source plugins set the `key` and `credentialsName` + // in `companionKeysParams` but because this is a preset we need to change + // this to a record of plugin IDs to their respective `companionKeysParams`. + companionKeysParams?: NestedCompanionKeysParams } const defaultOptions = { - sources: Object.keys(availablePlugins) as Array< - keyof Omit - >, + sources: Object.keys(availablePlugins) as Array, } satisfies Partial type Opts = DefinePluginOpts @@ -72,7 +91,12 @@ export default class RemoteSources< install(): void { this.opts.sources.forEach((pluginId) => { - const optsForRemoteSourcePlugin = { ...this.opts, sources: undefined } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { sources, ...rest } = this.opts + const optsForRemoteSourcePlugin: CompanionPluginOptions = { + ...rest, + companionKeysParams: this.opts.companionKeysParams?.[pluginId], + } const plugin = availablePlugins[pluginId] if (plugin == null) { const pluginNames = Object.keys(availablePlugins) From cd1a73627b3d070cbbc95d3534a3f7430ec12f89 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Wed, 28 Aug 2024 16:31:32 +0200 Subject: [PATCH 31/65] Add tsconfig to packages in private/ (#5432) * Add tsconfig to packages in private/ * Remove `AwsS3Multipart` import --------- Co-authored-by: Antoine du Hamel --- private/dev/Dashboard.js | 54 +++++++++++------ private/dev/tsconfig.json | 122 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+), 18 deletions(-) create mode 100644 private/dev/tsconfig.json diff --git a/private/dev/Dashboard.js b/private/dev/Dashboard.js index 8e9f98f70d..d4bd781531 100644 --- a/private/dev/Dashboard.js +++ b/private/dev/Dashboard.js @@ -1,4 +1,3 @@ -// The @uppy/ dependencies are resolved from source /* eslint-disable import/no-extraneous-dependencies */ import Uppy, { debugLogger } from '@uppy/core' import Dashboard from '@uppy/dashboard' @@ -8,7 +7,6 @@ import ScreenCapture from '@uppy/screen-capture' import GoldenRetriever from '@uppy/golden-retriever' import Tus from '@uppy/tus' import AwsS3 from '@uppy/aws-s3' -import AwsS3Multipart from '@uppy/aws-s3-multipart' import XHRUpload from '@uppy/xhr-upload' import Transloadit from '@uppy/transloadit' import Form from '@uppy/form' @@ -23,18 +21,19 @@ import generateSignatureIfSecret from './generateSignatureIfSecret.js' // DEV CONFIG: create a .env file in the project root directory to customize those values. const { - VITE_UPLOADER : UPLOADER, - VITE_COMPANION_URL : COMPANION_URL, - VITE_TUS_ENDPOINT : TUS_ENDPOINT, - VITE_XHR_ENDPOINT : XHR_ENDPOINT, - VITE_TRANSLOADIT_KEY : TRANSLOADIT_KEY, - VITE_TRANSLOADIT_SECRET : TRANSLOADIT_SECRET, - VITE_TRANSLOADIT_TEMPLATE : TRANSLOADIT_TEMPLATE, - VITE_TRANSLOADIT_SERVICE_URL : TRANSLOADIT_SERVICE_URL, + VITE_UPLOADER: UPLOADER, + VITE_COMPANION_URL: COMPANION_URL, + VITE_TUS_ENDPOINT: TUS_ENDPOINT, + VITE_XHR_ENDPOINT: XHR_ENDPOINT, + VITE_TRANSLOADIT_KEY: TRANSLOADIT_KEY, + VITE_TRANSLOADIT_SECRET: TRANSLOADIT_SECRET, + VITE_TRANSLOADIT_TEMPLATE: TRANSLOADIT_TEMPLATE, + VITE_TRANSLOADIT_SERVICE_URL: TRANSLOADIT_SERVICE_URL, } = import.meta.env -const companionAllowedHosts = import.meta.env.VITE_COMPANION_ALLOWED_HOSTS - && new RegExp(import.meta.env.VITE_COMPANION_ALLOWED_HOSTS) +const companionAllowedHosts = + import.meta.env.VITE_COMPANION_ALLOWED_HOSTS && + new RegExp(import.meta.env.VITE_COMPANION_ALLOWED_HOSTS) import.meta.env.VITE_TRANSLOADIT_KEY &&= '***' // to avoid leaking secrets in screenshots. import.meta.env.VITE_TRANSLOADIT_SECRET &&= '***' // to avoid leaking secrets in screenshots. @@ -45,7 +44,7 @@ console.log(import.meta.env) const RESTORE = false const COMPRESS = false -async function assemblyOptions () { +async function assemblyOptions() { return generateSignatureIfSecret(TRANSLOADIT_SECRET, { auth: { key: TRANSLOADIT_KEY, @@ -56,7 +55,7 @@ async function assemblyOptions () { }) } -function getCompanionKeysParams (name) { +function getCompanionKeysParams(name) { const { [`VITE_COMPANION_${name}_KEYS_PARAMS_CREDENTIALS_NAME`]: credentialsName, [`VITE_COMPANION_${name}_KEYS_PARAMS_KEY`]: key, @@ -110,7 +109,12 @@ export default () => { proudlyDisplayPoweredByUppy: true, note: `${JSON.stringify(restrictions)}`, }) - .use(GoogleDrive, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts, ...getCompanionKeysParams('GOOGLE_DRIVE') }) + .use(GoogleDrive, { + target: Dashboard, + companionUrl: COMPANION_URL, + companionAllowedHosts, + ...getCompanionKeysParams('GOOGLE_DRIVE'), + }) // .use(Instagram, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts }) // .use(Dropbox, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts }) // .use(Box, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts }) @@ -121,7 +125,17 @@ export default () => { // .use(Unsplash, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts }) .use(RemoteSources, { companionUrl: COMPANION_URL, - sources: ['GooglePhotos', 'Box', 'Dropbox', 'Facebook', 'Instagram', 'OneDrive', 'Unsplash', 'Zoom', 'Url'], + sources: [ + 'GooglePhotos', + 'Box', + 'Dropbox', + 'Facebook', + 'Instagram', + 'OneDrive', + 'Unsplash', + 'Zoom', + 'Url', + ], companionAllowedHosts, }) .use(Webcam, { @@ -152,10 +166,14 @@ export default () => { uppyDashboard.use(AwsS3, { companionUrl: COMPANION_URL, limit: 6 }) break case 's3-multipart': - uppyDashboard.use(AwsS3Multipart, { companionUrl: COMPANION_URL }) + uppyDashboard.use(AwsS3, { companionUrl: COMPANION_URL, shouldUseMultipart: true }) break case 'xhr': - uppyDashboard.use(XHRUpload, { endpoint: XHR_ENDPOINT, limit: 6, bundle: false }) + uppyDashboard.use(XHRUpload, { + endpoint: XHR_ENDPOINT, + limit: 6, + bundle: false, + }) break case 'transloadit': uppyDashboard.use(Transloadit, { diff --git a/private/dev/tsconfig.json b/private/dev/tsconfig.json new file mode 100644 index 0000000000..0cdcbab246 --- /dev/null +++ b/private/dev/tsconfig.json @@ -0,0 +1,122 @@ +{ + "extends": "../../tsconfig.shared", + "compilerOptions": { + "emitDeclarationOnly": false, + "noEmit": true, + "allowJs": true, + "paths": { + "@uppy/store-default": [ + "../../packages/@uppy/store-default/src/index.js", + ], + "@uppy/store-default/lib/*": ["../../packages/@uppy/store-default/src/*"], + "@uppy/utils/lib/*": ["../../packages/@uppy/utils/src/*"], + "@uppy/core": ["../../packages/@uppy/core/src/index.js"], + "@uppy/core/lib/*": ["../../packages/@uppy/core/src/*"], + "@uppy/dashboard": ["../../packages/@uppy/dashboard/src/index.js"], + "@uppy/dashboard/lib/*": ["../../packages/@uppy/dashboard/src/*"], + "@uppy/remote-sources": [ + "../../packages/@uppy/remote-sources/src/index.js", + ], + "@uppy/remote-sources/lib/*": [ + "../../packages/@uppy/remote-sources/src/*", + ], + "@uppy/webcam": ["../../packages/@uppy/webcam/src/index.js"], + "@uppy/webcam/lib/*": ["../../packages/@uppy/webcam/src/*"], + "@uppy/screen-capture": [ + "../../packages/@uppy/screen-capture/src/index.js", + ], + "@uppy/screen-capture/lib/*": [ + "../../packages/@uppy/screen-capture/src/*", + ], + "@uppy/golden-retriever": [ + "../../packages/@uppy/golden-retriever/src/index.js", + ], + "@uppy/golden-retriever/lib/*": [ + "../../packages/@uppy/golden-retriever/src/*", + ], + "@uppy/tus": ["../../packages/@uppy/tus/src/index.js"], + "@uppy/tus/lib/*": ["../../packages/@uppy/tus/src/*"], + "@uppy/aws-s3": ["../../packages/@uppy/aws-s3/src/index.js"], + "@uppy/aws-s3/lib/*": ["../../packages/@uppy/aws-s3/src/*"], + "@uppy/aws-s3-multipart": [ + "../../packages/@uppy/aws-s3-multipart/src/index.js", + ], + "@uppy/aws-s3-multipart/lib/*": [ + "../../packages/@uppy/aws-s3-multipart/src/*", + ], + "@uppy/xhr-upload": ["../../packages/@uppy/xhr-upload/src/index.js"], + "@uppy/xhr-upload/lib/*": ["../../packages/@uppy/xhr-upload/src/*"], + "@uppy/transloadit": ["../../packages/@uppy/transloadit/src/index.js"], + "@uppy/transloadit/lib/*": ["../../packages/@uppy/transloadit/src/*"], + "@uppy/form": ["../../packages/@uppy/form/src/index.js"], + "@uppy/form/lib/*": ["../../packages/@uppy/form/src/*"], + "@uppy/image-editor": ["../../packages/@uppy/image-editor/src/index.js"], + "@uppy/image-editor/lib/*": ["../../packages/@uppy/image-editor/src/*"], + "@uppy/drop-target": ["../../packages/@uppy/drop-target/src/index.js"], + "@uppy/drop-target/lib/*": ["../../packages/@uppy/drop-target/src/*"], + "@uppy/audio": ["../../packages/@uppy/audio/src/index.js"], + "@uppy/audio/lib/*": ["../../packages/@uppy/audio/src/*"], + "@uppy/compressor": ["../../packages/@uppy/compressor/src/index.js"], + "@uppy/compressor/lib/*": ["../../packages/@uppy/compressor/src/*"], + "@uppy/google-drive": ["../../packages/@uppy/google-drive/src/index.js"], + "@uppy/google-drive/lib/*": ["../../packages/@uppy/google-drive/src/*"], + }, + }, + "include": ["./package.json", "./*.ts", "./*.js"], + "references": [ + { + "path": "../../packages/@uppy/store-default/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/utils/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/core/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/dashboard/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/remote-sources/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/webcam/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/screen-capture/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/golden-retriever/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/tus/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/aws-s3/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/xhr-upload/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/transloadit/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/form/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/image-editor/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/drop-target/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/audio/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/compressor/tsconfig.build.json", + }, + { + "path": "../../packages/@uppy/google-drive/tsconfig.build.json", + }, + ], +} From a7501403354538de1ed9712cab9a67366dfb1134 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Thu, 29 Aug 2024 09:44:31 +0200 Subject: [PATCH 32/65] Fix locale-pack for en_US (#5431) --- package.json | 2 +- packages/@uppy/locales/src/en_US.ts | 27 ++++++++++++++++++++------- packages/@uppy/locales/template.js | 16 ---------------- packages/@uppy/locales/template.ts | 22 ++++++++++++++++++++++ private/dev/Dashboard.js | 2 ++ private/locale-pack/index.mjs | 6 +++--- 6 files changed, 48 insertions(+), 27 deletions(-) delete mode 100644 packages/@uppy/locales/template.js create mode 100644 packages/@uppy/locales/template.ts diff --git a/package.json b/package.json index 3eb2ad0a63..748dea0f46 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "build:js": "npm-run-all build:js:typeless build:locale-pack build:angular build:bundle", "build:ts": "yarn workspaces list --no-private --json | yarn tsc -b && yarn workspace @uppy/svelte validate", "build:lib": "yarn node ./bin/build-lib.js", - "build:locale-pack": "yarn workspace @uppy-dev/locale-pack build && eslint packages/@uppy/locales/src/en_US.js --fix && yarn workspace @uppy-dev/locale-pack test unused", + "build:locale-pack": "yarn workspace @uppy-dev/locale-pack build && eslint packages/@uppy/locales/src/en_US.ts --fix && yarn workspace @uppy-dev/locale-pack test unused", "build": "npm-run-all --serial build:ts --parallel build:js build:css --serial size", "contributors:save": "yarn node ./bin/update-contributors.mjs", "dev:with-companion": "npm-run-all --parallel start:companion dev", diff --git a/packages/@uppy/locales/src/en_US.ts b/packages/@uppy/locales/src/en_US.ts index 3d00e18033..76324ee4be 100644 --- a/packages/@uppy/locales/src/en_US.ts +++ b/packages/@uppy/locales/src/en_US.ts @@ -1,9 +1,10 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ import type { Locale } from '@uppy/utils/lib/Translator' const en_US: Locale<0 | 1> = { strings: {}, - pluralize(count) { - if (count === 1) { + pluralize(n) { + if (n === 1) { return 0 } return 1 @@ -21,6 +22,8 @@ en_US.strings = { '%{count} additional restrictions were not fulfilled', addMore: 'Add more', addMoreFiles: 'Add more files', + aggregateExceedsSize: + 'You selected %{size} of files, but maximum allowed size is %{sizeAllowed}', allFilesFromFolderNamed: 'All files from folder %{name}', allowAccessDescription: 'In order to take pictures or record video with your camera, please allow camera access for this site.', @@ -70,8 +73,8 @@ en_US.strings = { dropPasteImportFiles: 'Drop files here, %{browseFiles} or import from:', dropPasteImportFolders: 'Drop files here, %{browseFolders} or import from:', editFile: 'Edit file', - editImage: 'Edit image', editFileWithFilename: 'Edit file %{file}', + editImage: 'Edit image', editing: 'Editing %{file}', emptyFolderAdded: 'No files were added from empty folder', encoding: 'Encoding...', @@ -90,7 +93,7 @@ en_US.strings = { }, filter: 'Filter', finishEditingFile: 'Finish editing file', - flipHorizontal: 'Flip horizontal', + flipHorizontal: 'Flip horizontally', folderAdded: { '0': 'Added %{smart_count} file from %{folder}', '1': 'Added %{smart_count} files from %{folder}', @@ -134,8 +137,12 @@ en_US.strings = { pluginNameDropbox: 'Dropbox', pluginNameFacebook: 'Facebook', pluginNameGoogleDrive: 'Google Drive', + pluginNameGooglePhotos: 'Google Photos', pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', + pluginNameScreenCapture: 'Screencast', + pluginNameUnsplash: 'Unsplash', + pluginNameUrl: 'Link', pluginNameZoom: 'Zoom', poweredBy: 'Powered by %{uppy}', processingXFiles: { @@ -160,8 +167,8 @@ en_US.strings = { resumeUpload: 'Resume upload', retry: 'Retry', retryUpload: 'Retry upload', - revert: 'Revert', - rotate: 'Rotate', + revert: 'Reset', + rotate: 'Rotate 90°', save: 'Save', saveChanges: 'Save changes', search: 'Search', @@ -185,7 +192,7 @@ en_US.strings = { submitRecordedFile: 'Submit recorded file', takePicture: 'Take a picture', takePictureBtn: 'Take Picture', - timedOut: 'Upload stalled for %{seconds} seconds, aborting.', + unnamed: 'Unnamed', upload: 'Upload', uploadComplete: 'Upload complete', uploadFailed: 'Upload failed', @@ -227,4 +234,10 @@ en_US.strings = { zoomOut: 'Zoom out', } +// @ts-ignore untyped +if (typeof Uppy !== 'undefined') { + // @ts-ignore untyped + globalThis.Uppy.locales.en_US = en_US +} + export default en_US diff --git a/packages/@uppy/locales/template.js b/packages/@uppy/locales/template.js deleted file mode 100644 index 2bf26d705f..0000000000 --- a/packages/@uppy/locales/template.js +++ /dev/null @@ -1,16 +0,0 @@ -const en_US = { - pluralize (count) { - if (count === 1) { - return 0 - } - return 1 - }, -} - -en_US.strings = {} - -if (typeof Uppy !== 'undefined') { - globalThis.Uppy.locales.en_US = en_US -} - -export default en_US diff --git a/packages/@uppy/locales/template.ts b/packages/@uppy/locales/template.ts new file mode 100644 index 0000000000..82010883af --- /dev/null +++ b/packages/@uppy/locales/template.ts @@ -0,0 +1,22 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import type { Locale } from '@uppy/utils/lib/Translator' + +const en_US: Locale<0 | 1> = { + strings: {}, + pluralize(n) { + if (n === 1) { + return 0 + } + return 1 + }, +} + +en_US.strings = {} + +// @ts-ignore untyped +if (typeof Uppy !== 'undefined') { + // @ts-ignore untyped + globalThis.Uppy.locales.en_US = en_US +} + +export default en_US diff --git a/private/dev/Dashboard.js b/private/dev/Dashboard.js index d4bd781531..bf6ac7c14e 100644 --- a/private/dev/Dashboard.js +++ b/private/dev/Dashboard.js @@ -15,6 +15,7 @@ import DropTarget from '@uppy/drop-target' import Audio from '@uppy/audio' import Compressor from '@uppy/compressor' import GoogleDrive from '@uppy/google-drive' +import english from '@uppy/locales/lib/en_US.js' /* eslint-enable import/no-extraneous-dependencies */ import generateSignatureIfSecret from './generateSignatureIfSecret.js' @@ -89,6 +90,7 @@ export default () => { // } const uppyDashboard = new Uppy({ + locale: english, logger: debugLogger, meta: { username: 'John', diff --git a/private/locale-pack/index.mjs b/private/locale-pack/index.mjs index 0951c4ac03..9fda9710ed 100644 --- a/private/locale-pack/index.mjs +++ b/private/locale-pack/index.mjs @@ -8,10 +8,10 @@ import { getLocales, sortObjectAlphabetically } from './helpers.mjs' const root = fileURLToPath(new URL('../../', import.meta.url)) const localesPath = path.join(root, 'packages', '@uppy', 'locales') -const templatePath = path.join(localesPath, 'template.js') -const englishLocalePath = path.join(localesPath, 'src', 'en_US.js') +const templatePath = path.join(localesPath, 'template.ts') +const englishLocalePath = path.join(localesPath, 'src', 'en_US.ts') -async function getLocalesAndCombinedLocale () { +async function getLocalesAndCombinedLocale() { const locales = await getLocales(`${root}/packages/@uppy/**/lib/locale.js`) const combinedLocale = {} From 43becf8f48422a614a1e089d90421b3b17714b0d Mon Sep 17 00:00:00 2001 From: Murderlon Date: Thu, 29 Aug 2024 14:36:28 +0200 Subject: [PATCH 33/65] Fix yarn.lock --- yarn.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index ef507ff301..111bf929ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29414,7 +29414,6 @@ __metadata: dependencies: "@uppy/audio": "workspace:^" "@uppy/aws-s3": "workspace:^" - "@uppy/aws-s3-multipart": "workspace:^" "@uppy/box": "workspace:^" "@uppy/companion-client": "workspace:^" "@uppy/compressor": "workspace:^" From ededd0bd0817314454e8b842159cdd50dadf70ba Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 29 Aug 2024 14:47:25 +0200 Subject: [PATCH 34/65] @uppy/companion: do not use unsafe call to `JSON.stringify` (#5422) --- packages/@uppy/companion/package.json | 1 + .../companion/src/server/emitter/redis-emitter.js | 11 ++++++++++- yarn.lock | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/@uppy/companion/package.json b/packages/@uppy/companion/package.json index e282f2cd9c..5b6a602490 100644 --- a/packages/@uppy/companion/package.json +++ b/packages/@uppy/companion/package.json @@ -45,6 +45,7 @@ "express-interceptor": "1.2.0", "express-prom-bundle": "7.0.0", "express-session": "1.18.0", + "fast-safe-stringify": "^2.1.1", "got": "^13.0.0", "grant": "5.4.22", "helmet": "^7.1.0", diff --git a/packages/@uppy/companion/src/server/emitter/redis-emitter.js b/packages/@uppy/companion/src/server/emitter/redis-emitter.js index ca2bce68ab..aa62f61baf 100644 --- a/packages/@uppy/companion/src/server/emitter/redis-emitter.js +++ b/packages/@uppy/companion/src/server/emitter/redis-emitter.js @@ -1,7 +1,13 @@ const { EventEmitter } = require('node:events') +const { default: safeStringify } = require('fast-safe-stringify') const logger = require('../logger') +function replacer(key, value) { + // Remove the circular structure and internal ones + return key[0] === '_' || value === '[Circular]' ? undefined : value +} + /** * This module simulates the builtin events.EventEmitter but with the use of redis. * This is useful for when companion is running on multiple instances and events need @@ -141,7 +147,10 @@ module.exports = (redisClient, redisPubSubScope) => { * @param {string} eventName name of the event */ function emit (eventName, ...args) { - runWhenConnected(() => publisher.publish(getPrefixedEventName(eventName), JSON.stringify(args))) + runWhenConnected( + () => publisher.publish(getPrefixedEventName(eventName), + safeStringify(args, replacer)), + ) } /** diff --git a/yarn.lock b/yarn.lock index 111bf929ff..193e4a510e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8627,6 +8627,7 @@ __metadata: express-interceptor: "npm:1.2.0" express-prom-bundle: "npm:7.0.0" express-session: "npm:1.18.0" + fast-safe-stringify: "npm:^2.1.1" got: "npm:^13.0.0" grant: "npm:5.4.22" helmet: "npm:^7.1.0" From bc27b4a5c8710b9936f49b728d39db0954f94313 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Thu, 29 Aug 2024 16:12:27 +0200 Subject: [PATCH 35/65] Pass container to `UIPlugin.render` for non-Preact integration (#5437) --- examples/react-example/App.tsx | 58 ++++++++++++++++--- examples/react-example/main.tsx | 2 +- packages/@uppy/core/src/UIPlugin.ts | 17 ++++-- .../src/components/PickerPanelContent.tsx | 7 ++- 4 files changed, 68 insertions(+), 16 deletions(-) diff --git a/examples/react-example/App.tsx b/examples/react-example/App.tsx index e7636f1dbe..3387e8045c 100644 --- a/examples/react-example/App.tsx +++ b/examples/react-example/App.tsx @@ -1,16 +1,60 @@ /* eslint-disable */ import React from 'react' -import Uppy from '@uppy/core' +import { createRoot } from 'react-dom/client' +import Uppy, { + UIPlugin, + type Meta, + type Body, + type UIPluginOptions, + type State, +} from '@uppy/core' import Tus from '@uppy/tus' import Webcam from '@uppy/webcam' -import RemoteSources from '@uppy/remote-sources' import { Dashboard, useUppyState } from '@uppy/react' import '@uppy/core/dist/style.css' import '@uppy/dashboard/dist/style.css' -import '@uppy/drag-drop/dist/style.css' -import '@uppy/file-input/dist/style.css' -import '@uppy/progress-bar/dist/style.css' +import '@uppy/webcam/dist/style.css' + +interface MyPluginOptions extends UIPluginOptions {} + +interface MyPluginState extends Record {} + +// Custom plugin example inside React +class MyPlugin extends UIPlugin< + MyPluginOptions, + M, + B, + MyPluginState +> { + container!: HTMLElement + + constructor(uppy: Uppy, opts?: MyPluginOptions) { + super(uppy, opts) + this.type = 'acquirer' + this.id = this.opts.id || 'TEST' + this.title = 'Test' + } + + override install() { + const { target } = this.opts + if (target) { + this.mount(target, this) + } + } + + override uninstall() { + this.unmount() + } + + override render(state: State, container: HTMLElement) { + // Important: during the initial render is not defined. Safely return. + if (!container) return + createRoot(container).render( +

React component inside Uppy's Preact UI

, + ) + } +} const metaFields = [ { id: 'license', name: 'License', placeholder: 'specify license' }, @@ -20,9 +64,7 @@ function createUppy() { return new Uppy({ restrictions: { requiredMetaFields: ['license'] } }) .use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' }) .use(Webcam) - .use(RemoteSources, { - companionUrl: 'https://companion.uppy.io', - }) + .use(MyPlugin) } export default function App() { diff --git a/examples/react-example/main.tsx b/examples/react-example/main.tsx index bf7e150561..5969f2d933 100644 --- a/examples/react-example/main.tsx +++ b/examples/react-example/main.tsx @@ -3,4 +3,4 @@ import React from 'react' import { createRoot } from 'react-dom/client' import App from './App.tsx' -createRoot(document.querySelector('#app')).render() +createRoot(document.querySelector('#app')!).render() diff --git a/packages/@uppy/core/src/UIPlugin.ts b/packages/@uppy/core/src/UIPlugin.ts index 8ea1a490ca..49f6772711 100644 --- a/packages/@uppy/core/src/UIPlugin.ts +++ b/packages/@uppy/core/src/UIPlugin.ts @@ -1,5 +1,5 @@ /* eslint-disable class-methods-use-this */ -import { render, type ComponentChild } from 'preact' +import { render } from 'preact' import findDOMElement from '@uppy/utils/lib/findDOMElement' import getTextDirection from '@uppy/utils/lib/getTextDirection' @@ -112,7 +112,7 @@ class UIPlugin< // so it could still be called even after uppy.removePlugin or uppy.destroy // hence the check if (!this.uppy.getPlugin(this.id)) return - render(this.render(state), uppyRootElement) + render(this.render(state, uppyRootElement), uppyRootElement) this.afterUpdate() }) @@ -127,7 +127,10 @@ class UIPlugin< targetElement.innerHTML = '' } - render(this.render(this.uppy.getState()), uppyRootElement) + render( + this.render(this.uppy.getState(), uppyRootElement), + uppyRootElement, + ) this.el = uppyRootElement targetElement.appendChild(uppyRootElement) @@ -176,8 +179,12 @@ class UIPlugin< * so this.el and this.parent might not be available in `install`. * This is the case with @uppy/react plugins, for example. */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars - render(state: Record): ComponentChild { + render( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + state: Record, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + container: HTMLElement, + ): any { throw new Error( 'Extend the render method to add your plugin to a DOM element', ) diff --git a/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx b/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx index ad3677f815..7a795ec9f1 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx +++ b/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx @@ -1,5 +1,6 @@ import { h } from 'preact' import classNames from 'classnames' +import { useRef } from 'preact/hooks' import ignoreEvent from '../utils/ignoreEvent.ts' type $TSFixMe = any @@ -12,6 +13,7 @@ function PickerPanelContent({ state, uppy, }: $TSFixMe) { + const ref = useRef(null) return (
-
- {uppy.getPlugin(activePickerPanel.id).render(state)} + +
+ {uppy.getPlugin(activePickerPanel.id).render(state, ref.current)}
) From 77d44c79f3633288bcf70ad5b81108ecebf18935 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:33:09 +0000 Subject: [PATCH 36/65] Release: uppy@4.3.0 (#5438) | Package | Version | Package | Version | | ---------------------- | ------- | ---------------------- | ------- | | @uppy/aws-s3 | 4.1.0 | @uppy/informer | 4.1.0 | | @uppy/box | 3.1.0 | @uppy/instagram | 4.1.0 | | @uppy/companion | 5.1.0 | @uppy/locales | 4.1.0 | | @uppy/companion-client | 4.1.0 | @uppy/onedrive | 4.1.0 | | @uppy/compressor | 2.1.0 | @uppy/remote-sources | 2.2.0 | | @uppy/core | 4.2.0 | @uppy/screen-capture | 4.1.0 | | @uppy/dashboard | 4.1.0 | @uppy/tus | 4.1.0 | | @uppy/dropbox | 4.1.0 | @uppy/unsplash | 4.1.0 | | @uppy/facebook | 4.1.0 | @uppy/url | 4.1.0 | | @uppy/google-drive | 4.1.0 | @uppy/xhr-upload | 4.1.0 | | @uppy/google-photos | 0.3.0 | @uppy/zoom | 3.1.0 | | @uppy/image-editor | 3.1.0 | uppy | 4.3.0 | - @uppy/core,@uppy/dashboard: Pass container to `UIPlugin.render` for non-Preact integration (Merlijn Vos / #5437) - @uppy/companion: do not use unsafe call to `JSON.stringify` (Antoine du Hamel / #5422) - meta: Fix yarn.lock (Murderlon) - @uppy/locales: Fix locale-pack for en_US (Merlijn Vos / #5431) - meta: Add tsconfig to packages in private/ (Merlijn Vos / #5432) - @uppy/remote-sources: support companionKeysParams (Merlijn Vos / #5434) - @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) - docs: correctly list exported components (Merlijn Vos / #5417) --- BUNDLE-README.md | 2 +- CHANGELOG.md | 29 +++++++++++++++++++ README.md | 6 ++-- examples/cdn-example/index.html | 4 +-- .../uppy-with-companion/client/index.html | 4 +-- packages/@uppy/aws-s3/CHANGELOG.md | 7 +++++ packages/@uppy/aws-s3/package.json | 2 +- packages/@uppy/box/CHANGELOG.md | 7 +++++ packages/@uppy/box/package.json | 2 +- packages/@uppy/companion-client/package.json | 2 +- packages/@uppy/companion/CHANGELOG.md | 7 +++++ packages/@uppy/companion/package.json | 2 +- packages/@uppy/compressor/CHANGELOG.md | 7 +++++ packages/@uppy/compressor/package.json | 2 +- packages/@uppy/core/CHANGELOG.md | 7 +++++ packages/@uppy/core/package.json | 2 +- packages/@uppy/dashboard/CHANGELOG.md | 7 +++++ packages/@uppy/dashboard/package.json | 2 +- packages/@uppy/dropbox/CHANGELOG.md | 7 +++++ packages/@uppy/dropbox/package.json | 2 +- packages/@uppy/facebook/CHANGELOG.md | 7 +++++ packages/@uppy/facebook/package.json | 2 +- packages/@uppy/google-drive/CHANGELOG.md | 7 +++++ packages/@uppy/google-drive/package.json | 2 +- packages/@uppy/google-photos/CHANGELOG.md | 7 +++++ packages/@uppy/google-photos/package.json | 2 +- packages/@uppy/image-editor/CHANGELOG.md | 7 +++++ packages/@uppy/image-editor/package.json | 2 +- packages/@uppy/informer/CHANGELOG.md | 7 +++++ packages/@uppy/informer/package.json | 2 +- packages/@uppy/instagram/CHANGELOG.md | 7 +++++ packages/@uppy/instagram/package.json | 2 +- packages/@uppy/locales/CHANGELOG.md | 7 +++++ packages/@uppy/locales/package.json | 2 +- packages/@uppy/onedrive/CHANGELOG.md | 7 +++++ packages/@uppy/onedrive/package.json | 2 +- packages/@uppy/remote-sources/CHANGELOG.md | 7 +++++ packages/@uppy/remote-sources/package.json | 2 +- packages/@uppy/screen-capture/CHANGELOG.md | 7 +++++ packages/@uppy/screen-capture/package.json | 2 +- packages/@uppy/tus/CHANGELOG.md | 7 +++++ packages/@uppy/tus/package.json | 2 +- packages/@uppy/unsplash/CHANGELOG.md | 7 +++++ packages/@uppy/unsplash/package.json | 2 +- packages/@uppy/url/CHANGELOG.md | 7 +++++ packages/@uppy/url/package.json | 2 +- packages/@uppy/xhr-upload/CHANGELOG.md | 7 +++++ packages/@uppy/xhr-upload/package.json | 2 +- packages/@uppy/zoom/CHANGELOG.md | 7 +++++ packages/@uppy/zoom/package.json | 2 +- packages/uppy/package.json | 2 +- 51 files changed, 215 insertions(+), 32 deletions(-) diff --git a/BUNDLE-README.md b/BUNDLE-README.md index ffad4ffe18..c68e0b4224 100644 --- a/BUNDLE-README.md +++ b/BUNDLE-README.md @@ -2,7 +2,7 @@ Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can use this from a CDN -(``) +(``) or bundle it with your webapp. Note that the recommended way to use Uppy is to install it with yarn/npm and use diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f849c5a90..15b1344db7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,35 @@ Please add your entries in this format: In the current stage we aim to release a new version at least every month. +## 4.3.0 + +Released: 2024-08-29 + +| Package | Version | Package | Version | +| ---------------------- | ------- | ---------------------- | ------- | +| @uppy/aws-s3 | 4.1.0 | @uppy/informer | 4.1.0 | +| @uppy/box | 3.1.0 | @uppy/instagram | 4.1.0 | +| @uppy/companion | 5.1.0 | @uppy/locales | 4.1.0 | +| @uppy/companion-client | 4.1.0 | @uppy/onedrive | 4.1.0 | +| @uppy/compressor | 2.1.0 | @uppy/remote-sources | 2.2.0 | +| @uppy/core | 4.2.0 | @uppy/screen-capture | 4.1.0 | +| @uppy/dashboard | 4.1.0 | @uppy/tus | 4.1.0 | +| @uppy/dropbox | 4.1.0 | @uppy/unsplash | 4.1.0 | +| @uppy/facebook | 4.1.0 | @uppy/url | 4.1.0 | +| @uppy/google-drive | 4.1.0 | @uppy/xhr-upload | 4.1.0 | +| @uppy/google-photos | 0.3.0 | @uppy/zoom | 3.1.0 | +| @uppy/image-editor | 3.1.0 | uppy | 4.3.0 | + +- @uppy/core,@uppy/dashboard: Pass container to `UIPlugin.render` for non-Preact integration (Merlijn Vos / #5437) +- @uppy/companion: do not use unsafe call to `JSON.stringify` (Antoine du Hamel / #5422) +- meta: Fix yarn.lock (Murderlon) +- @uppy/locales: Fix locale-pack for en_US (Merlijn Vos / #5431) +- meta: Add tsconfig to packages in private/ (Merlijn Vos / #5432) +- @uppy/remote-sources: support companionKeysParams (Merlijn Vos / #5434) +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) +- docs: correctly list exported components (Merlijn Vos / #5417) + + ## 4.2.1 Released: 2024-08-26 diff --git a/README.md b/README.md index 5d57c45720..2faed23c2e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ npm install @uppy/core @uppy/dashboard @uppy/tus ``` Add CSS -[uppy.min.css](https://releases.transloadit.com/uppy/v4.2.1/uppy.min.css), +[uppy.min.css](https://releases.transloadit.com/uppy/v4.3.0/uppy.min.css), either to your HTML page’s `` or include in JS, if your bundler of choice supports it. @@ -102,7 +102,7 @@ object. ```html @@ -113,7 +113,7 @@ object. Uppy, Dashboard, Tus, - } from 'https://releases.transloadit.com/uppy/v4.2.1/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.3.0/uppy.min.mjs' const uppy = new Uppy() uppy.use(Dashboard, { target: '#files-drag-drop' }) diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html index 09f635d703..fe5bb0c184 100644 --- a/examples/cdn-example/index.html +++ b/examples/cdn-example/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Dashboard, Webcam, Tus, - } from 'https://releases.transloadit.com/uppy/v4.2.1/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.3.0/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/examples/uppy-with-companion/client/index.html b/examples/uppy-with-companion/client/index.html index 6854297958..638520bb25 100644 --- a/examples/uppy-with-companion/client/index.html +++ b/examples/uppy-with-companion/client/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Instagram, GoogleDrive, Tus, - } from 'https://releases.transloadit.com/uppy/v4.2.1/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.3.0/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/packages/@uppy/aws-s3/CHANGELOG.md b/packages/@uppy/aws-s3/CHANGELOG.md index 4f9e289f71..b4c9d3feb9 100644 --- a/packages/@uppy/aws-s3/CHANGELOG.md +++ b/packages/@uppy/aws-s3/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/aws-s3 +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.2 Released: 2024-07-30 diff --git a/packages/@uppy/aws-s3/package.json b/packages/@uppy/aws-s3/package.json index fa9e176ca2..38efe2bdcb 100644 --- a/packages/@uppy/aws-s3/package.json +++ b/packages/@uppy/aws-s3/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/aws-s3", "description": "Upload to Amazon S3 with Uppy", - "version": "4.0.3", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/box/CHANGELOG.md b/packages/@uppy/box/CHANGELOG.md index fc8d81937e..cfde0231a8 100644 --- a/packages/@uppy/box/CHANGELOG.md +++ b/packages/@uppy/box/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/box +## 3.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 3.0.0-beta.1 Released: 2024-03-28 diff --git a/packages/@uppy/box/package.json b/packages/@uppy/box/package.json index 2bca2412ba..adb2763029 100644 --- a/packages/@uppy/box/package.json +++ b/packages/@uppy/box/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/box", "description": "Import files from Box, into Uppy.", - "version": "3.0.0", + "version": "3.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/companion-client/package.json b/packages/@uppy/companion-client/package.json index 3b63744ab3..6c168731a8 100644 --- a/packages/@uppy/companion-client/package.json +++ b/packages/@uppy/companion-client/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/companion-client", "description": "Client library for communication with Companion. Intended for use in Uppy plugins.", - "version": "4.0.1", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/companion/CHANGELOG.md b/packages/@uppy/companion/CHANGELOG.md index ae91d75f8e..24ce4f0268 100644 --- a/packages/@uppy/companion/CHANGELOG.md +++ b/packages/@uppy/companion/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/companion +## 5.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/companion: do not use unsafe call to `JSON.stringify` (Antoine du Hamel / #5422) + ## 5.0.5 Released: 2024-08-15 diff --git a/packages/@uppy/companion/package.json b/packages/@uppy/companion/package.json index 5b6a602490..cf4e68c516 100644 --- a/packages/@uppy/companion/package.json +++ b/packages/@uppy/companion/package.json @@ -1,6 +1,6 @@ { "name": "@uppy/companion", - "version": "5.0.5", + "version": "5.1.0", "description": "OAuth helper and remote fetcher for Uppy's (https://uppy.io) extensible file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox and Google Drive, S3 and more :dog:", "main": "lib/companion.js", "types": "lib/companion.d.ts", diff --git a/packages/@uppy/compressor/CHANGELOG.md b/packages/@uppy/compressor/CHANGELOG.md index 7eac00762e..3622b53801 100644 --- a/packages/@uppy/compressor/CHANGELOG.md +++ b/packages/@uppy/compressor/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/compressor +## 2.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 2.0.1 Released: 2024-07-30 diff --git a/packages/@uppy/compressor/package.json b/packages/@uppy/compressor/package.json index 4b626f088c..5b94176b9f 100644 --- a/packages/@uppy/compressor/package.json +++ b/packages/@uppy/compressor/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/compressor", "description": "Uppy plugin that compresses images before upload, saving up to 60% in size", - "version": "2.0.1", + "version": "2.1.0", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/core/CHANGELOG.md b/packages/@uppy/core/CHANGELOG.md index 830e09bacb..2266fca048 100644 --- a/packages/@uppy/core/CHANGELOG.md +++ b/packages/@uppy/core/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/core +## 4.2.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/core,@uppy/dashboard: Pass container to `UIPlugin.render` for non-Preact integration (Merlijn Vos / #5437) + ## 4.1.0 Released: 2024-07-30 diff --git a/packages/@uppy/core/package.json b/packages/@uppy/core/package.json index 189bf465dc..0b2635020f 100644 --- a/packages/@uppy/core/package.json +++ b/packages/@uppy/core/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/core", "description": "Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.1.2", + "version": "4.2.0", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/dashboard/CHANGELOG.md b/packages/@uppy/dashboard/CHANGELOG.md index c8478049b2..10b47425e5 100644 --- a/packages/@uppy/dashboard/CHANGELOG.md +++ b/packages/@uppy/dashboard/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/dashboard +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/core,@uppy/dashboard: Pass container to `UIPlugin.render` for non-Preact integration (Merlijn Vos / #5437) + ## 4.0.3 Released: 2024-08-15 diff --git a/packages/@uppy/dashboard/package.json b/packages/@uppy/dashboard/package.json index b330230db3..2516e6358e 100644 --- a/packages/@uppy/dashboard/package.json +++ b/packages/@uppy/dashboard/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/dashboard", "description": "Universal UI plugin for Uppy.", - "version": "4.0.3", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/dropbox/CHANGELOG.md b/packages/@uppy/dropbox/CHANGELOG.md index 768ea4a0ae..d9d0d83314 100644 --- a/packages/@uppy/dropbox/CHANGELOG.md +++ b/packages/@uppy/dropbox/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/dropbox +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.0-beta.6 Released: 2024-05-14 diff --git a/packages/@uppy/dropbox/package.json b/packages/@uppy/dropbox/package.json index 0f64815fd7..379fdf1e06 100644 --- a/packages/@uppy/dropbox/package.json +++ b/packages/@uppy/dropbox/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/dropbox", "description": "Import files from Dropbox, into Uppy.", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/facebook/CHANGELOG.md b/packages/@uppy/facebook/CHANGELOG.md index 83f0b04325..0c854d28b7 100644 --- a/packages/@uppy/facebook/CHANGELOG.md +++ b/packages/@uppy/facebook/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/facebook +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.0-beta.1 Released: 2024-03-28 diff --git a/packages/@uppy/facebook/package.json b/packages/@uppy/facebook/package.json index 117f79b9a9..3c6c2ded2b 100644 --- a/packages/@uppy/facebook/package.json +++ b/packages/@uppy/facebook/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/facebook", "description": "Import files from Facebook, into Uppy.", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/google-drive/CHANGELOG.md b/packages/@uppy/google-drive/CHANGELOG.md index 6c124d52c8..3d6f24a9eb 100644 --- a/packages/@uppy/google-drive/CHANGELOG.md +++ b/packages/@uppy/google-drive/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/google-drive +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.0-beta.1 Released: 2024-03-28 diff --git a/packages/@uppy/google-drive/package.json b/packages/@uppy/google-drive/package.json index 8cb05b95b9..aa0b9f2074 100644 --- a/packages/@uppy/google-drive/package.json +++ b/packages/@uppy/google-drive/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/google-drive", "description": "The Google Drive plugin for Uppy lets users import files from their Google Drive account", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/google-photos/CHANGELOG.md b/packages/@uppy/google-photos/CHANGELOG.md index 5c1e537482..57d023745d 100644 --- a/packages/@uppy/google-photos/CHANGELOG.md +++ b/packages/@uppy/google-photos/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/google-photos +## 0.3.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 0.2.0-beta.2 Released: 2024-06-27 diff --git a/packages/@uppy/google-photos/package.json b/packages/@uppy/google-photos/package.json index 0641f661fc..36b08ee2f7 100644 --- a/packages/@uppy/google-photos/package.json +++ b/packages/@uppy/google-photos/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/google-photos", "description": "The Google Photos plugin for Uppy lets users import photos from their Google Photos account", - "version": "0.2.0", + "version": "0.3.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/image-editor/CHANGELOG.md b/packages/@uppy/image-editor/CHANGELOG.md index a65dd5040b..73aea5e2e5 100644 --- a/packages/@uppy/image-editor/CHANGELOG.md +++ b/packages/@uppy/image-editor/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/image-editor +## 3.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 3.0.0-beta.2 Released: 2024-04-29 diff --git a/packages/@uppy/image-editor/package.json b/packages/@uppy/image-editor/package.json index dd26a51c69..92ec2fb6a5 100644 --- a/packages/@uppy/image-editor/package.json +++ b/packages/@uppy/image-editor/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/image-editor", "description": "Image editor and cropping UI", - "version": "3.0.1", + "version": "3.1.0", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/informer/CHANGELOG.md b/packages/@uppy/informer/CHANGELOG.md index 910094ea71..b38bb753db 100644 --- a/packages/@uppy/informer/CHANGELOG.md +++ b/packages/@uppy/informer/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/informer +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 3.1.0 Released: 2024-02-28 diff --git a/packages/@uppy/informer/package.json b/packages/@uppy/informer/package.json index 1f710fe4be..041d8f2300 100644 --- a/packages/@uppy/informer/package.json +++ b/packages/@uppy/informer/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/informer", "description": "A notification and error pop-up bar for Uppy.", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/instagram/CHANGELOG.md b/packages/@uppy/instagram/CHANGELOG.md index baaa7b3d6a..3032c78675 100644 --- a/packages/@uppy/instagram/CHANGELOG.md +++ b/packages/@uppy/instagram/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/instagram +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.0-beta.1 Released: 2024-03-28 diff --git a/packages/@uppy/instagram/package.json b/packages/@uppy/instagram/package.json index e76a2d4c3d..0006b1024e 100644 --- a/packages/@uppy/instagram/package.json +++ b/packages/@uppy/instagram/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/instagram", "description": "Import photos and videos from Instagram, into Uppy.", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/locales/CHANGELOG.md b/packages/@uppy/locales/CHANGELOG.md index 06d883ee4c..af20d957ba 100644 --- a/packages/@uppy/locales/CHANGELOG.md +++ b/packages/@uppy/locales/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/locales +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/locales: Fix locale-pack for en_US (Merlijn Vos / #5431) + ## 4.0.0-beta.4 Released: 2024-06-18 diff --git a/packages/@uppy/locales/package.json b/packages/@uppy/locales/package.json index f9a6e7c8a8..b5120fdf07 100644 --- a/packages/@uppy/locales/package.json +++ b/packages/@uppy/locales/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/locales", "description": "Uppy language packs", - "version": "4.0.3", + "version": "4.1.0", "license": "MIT", "type": "module", "keywords": [ diff --git a/packages/@uppy/onedrive/CHANGELOG.md b/packages/@uppy/onedrive/CHANGELOG.md index 41fcaac0c8..83a1329830 100644 --- a/packages/@uppy/onedrive/CHANGELOG.md +++ b/packages/@uppy/onedrive/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/onedrive +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.0-beta.1 Released: 2024-03-28 diff --git a/packages/@uppy/onedrive/package.json b/packages/@uppy/onedrive/package.json index 69b6b9c736..11a322724b 100644 --- a/packages/@uppy/onedrive/package.json +++ b/packages/@uppy/onedrive/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/onedrive", "description": "Import files from OneDrive, into Uppy.", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/remote-sources/CHANGELOG.md b/packages/@uppy/remote-sources/CHANGELOG.md index acc7d0ca24..8477797f69 100644 --- a/packages/@uppy/remote-sources/CHANGELOG.md +++ b/packages/@uppy/remote-sources/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/remote-sources +## 2.2.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/remote-sources: support companionKeysParams (Merlijn Vos / #5434) + ## 2.1.0 Released: 2024-07-30 diff --git a/packages/@uppy/remote-sources/package.json b/packages/@uppy/remote-sources/package.json index 296174ca78..4846362cd6 100644 --- a/packages/@uppy/remote-sources/package.json +++ b/packages/@uppy/remote-sources/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/remote-sources", "description": "Uppy plugin that includes all remote sources that Uppy+Companion offer, like Instagram, Google Drive, Dropox, Box, Unsplash, Url etc", - "version": "2.1.0", + "version": "2.2.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/screen-capture/CHANGELOG.md b/packages/@uppy/screen-capture/CHANGELOG.md index aa2ee1d053..7cd7423f3c 100644 --- a/packages/@uppy/screen-capture/CHANGELOG.md +++ b/packages/@uppy/screen-capture/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/screen-capture +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.0-beta.5 Released: 2024-05-14 diff --git a/packages/@uppy/screen-capture/package.json b/packages/@uppy/screen-capture/package.json index 2e6af6d3f9..28c4d46d3e 100644 --- a/packages/@uppy/screen-capture/package.json +++ b/packages/@uppy/screen-capture/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/screen-capture", "description": "Uppy plugin that captures video from display or application.", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/tus/CHANGELOG.md b/packages/@uppy/tus/CHANGELOG.md index 7cd0be220b..486b6b0f5e 100644 --- a/packages/@uppy/tus/CHANGELOG.md +++ b/packages/@uppy/tus/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/tus +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.1 Released: 2024-08-15 diff --git a/packages/@uppy/tus/package.json b/packages/@uppy/tus/package.json index 342fcfb292..a39ce60013 100644 --- a/packages/@uppy/tus/package.json +++ b/packages/@uppy/tus/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/tus", "description": "Resumable uploads for Uppy using Tus.io", - "version": "4.0.1", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/unsplash/CHANGELOG.md b/packages/@uppy/unsplash/CHANGELOG.md index 3b4fd8d1d8..948e1c9c07 100644 --- a/packages/@uppy/unsplash/CHANGELOG.md +++ b/packages/@uppy/unsplash/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/unsplash +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.0-beta.6 Released: 2024-05-14 diff --git a/packages/@uppy/unsplash/package.json b/packages/@uppy/unsplash/package.json index dd5eabca5f..20251cf223 100644 --- a/packages/@uppy/unsplash/package.json +++ b/packages/@uppy/unsplash/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/unsplash", "description": "Import files from Unsplash, the free stock photography resource, into Uppy", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/url/CHANGELOG.md b/packages/@uppy/url/CHANGELOG.md index b85ac6efeb..0d1a8e82ea 100644 --- a/packages/@uppy/url/CHANGELOG.md +++ b/packages/@uppy/url/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/url +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.0-beta.7 Released: 2024-06-04 diff --git a/packages/@uppy/url/package.json b/packages/@uppy/url/package.json index 00e602f321..8d25ad32ac 100644 --- a/packages/@uppy/url/package.json +++ b/packages/@uppy/url/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/url", "description": "The Url plugin lets users import files from the Internet. Paste any URL and it’ll be added!", - "version": "4.0.0", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/xhr-upload/CHANGELOG.md b/packages/@uppy/xhr-upload/CHANGELOG.md index 9265cd3265..c46b197f74 100644 --- a/packages/@uppy/xhr-upload/CHANGELOG.md +++ b/packages/@uppy/xhr-upload/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/xhr-upload +## 4.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 4.0.2 Released: 2024-07-18 diff --git a/packages/@uppy/xhr-upload/package.json b/packages/@uppy/xhr-upload/package.json index 9e35f3e15a..0b6fdb6042 100644 --- a/packages/@uppy/xhr-upload/package.json +++ b/packages/@uppy/xhr-upload/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/xhr-upload", "description": "Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.", - "version": "4.0.2", + "version": "4.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/zoom/CHANGELOG.md b/packages/@uppy/zoom/CHANGELOG.md index 578a9c446c..aa806ae0ed 100644 --- a/packages/@uppy/zoom/CHANGELOG.md +++ b/packages/@uppy/zoom/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/zoom +## 3.1.0 + +Released: 2024-08-29 +Included in: Uppy v4.3.0 + +- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) + ## 3.0.0-beta.1 Released: 2024-03-28 diff --git a/packages/@uppy/zoom/package.json b/packages/@uppy/zoom/package.json index d058d85130..801a6e6e35 100644 --- a/packages/@uppy/zoom/package.json +++ b/packages/@uppy/zoom/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/zoom", "description": "Import files from zoom, into Uppy.", - "version": "3.0.0", + "version": "3.1.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/uppy/package.json b/packages/uppy/package.json index f4af966d83..e7f8850abf 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,7 +1,7 @@ { "name": "uppy", "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.2.1", + "version": "4.3.0", "license": "MIT", "main": "lib/index.js", "module": "lib/index.js", From f1ae20447ae131dd43c7c3b2d137e71ce229a592 Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Tue, 3 Sep 2024 11:17:21 +0300 Subject: [PATCH 37/65] docs: fix broken links in locale docs (#5441) Fix broken links in locale docs https://uppy.io/docs/locales/ --- docs/locales.mdx | 160 +++++++++++++++++++++++------------------------ 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/docs/locales.mdx b/docs/locales.mdx index 89917aeb3d..b3b7c6c21f 100644 --- a/docs/locales.mdx +++ b/docs/locales.mdx @@ -121,11 +121,11 @@ uppy.use(DragDrop, { ✏️{' '} - ar_SA.js + ar_SA.ts @@ -157,11 +157,11 @@ uppy.use(DragDrop, { ✏️{' '} - bg_BG.js + bg_BG.ts @@ -193,11 +193,11 @@ uppy.use(DragDrop, { ✏️{' '} - zh_CN.js + zh_CN.ts @@ -229,11 +229,11 @@ uppy.use(DragDrop, { ✏️{' '} - zh_TW.js + zh_TW.ts @@ -265,11 +265,11 @@ uppy.use(DragDrop, { ✏️{' '} - hr_HR.js + hr_HR.ts @@ -301,11 +301,11 @@ uppy.use(DragDrop, { ✏️{' '} - cs_CZ.js + cs_CZ.ts @@ -337,11 +337,11 @@ uppy.use(DragDrop, { ✏️{' '} - da_DK.js + da_DK.ts @@ -373,11 +373,11 @@ uppy.use(DragDrop, { ✏️{' '} - nl_NL.js + nl_NL.ts @@ -409,11 +409,11 @@ uppy.use(DragDrop, { ✏️{' '} - en_US.js + en_US.ts @@ -445,11 +445,11 @@ uppy.use(DragDrop, { ✏️{' '} - fi_FI.js + fi_FI.ts @@ -481,11 +481,11 @@ uppy.use(DragDrop, { ✏️{' '} - fr_FR.js + fr_FR.ts @@ -517,11 +517,11 @@ uppy.use(DragDrop, { ✏️{' '} - gl_ES.js + gl_ES.ts @@ -553,11 +553,11 @@ uppy.use(DragDrop, { ✏️{' '} - de_DE.js + de_DE.ts @@ -589,11 +589,11 @@ uppy.use(DragDrop, { ✏️{' '} - el_GR.js + el_GR.ts @@ -625,11 +625,11 @@ uppy.use(DragDrop, { ✏️{' '} - he_IL.js + he_IL.ts @@ -661,11 +661,11 @@ uppy.use(DragDrop, { ✏️{' '} - hi_IN.js + hi_IN.ts @@ -697,11 +697,11 @@ uppy.use(DragDrop, { ✏️{' '} - hu_HU.js + hu_HU.ts @@ -733,11 +733,11 @@ uppy.use(DragDrop, { ✏️{' '} - is_IS.js + is_IS.ts @@ -769,11 +769,11 @@ uppy.use(DragDrop, { ✏️{' '} - id_ID.js + id_ID.ts @@ -805,11 +805,11 @@ uppy.use(DragDrop, { ✏️{' '} - it_IT.js + it_IT.ts @@ -841,11 +841,11 @@ uppy.use(DragDrop, { ✏️{' '} - ja_JP.js + ja_JP.ts @@ -877,11 +877,11 @@ uppy.use(DragDrop, { ✏️{' '} - ko_KR.js + ko_KR.ts @@ -913,11 +913,11 @@ uppy.use(DragDrop, { ✏️{' '} - nb_NO.js + nb_NO.ts @@ -949,11 +949,11 @@ uppy.use(DragDrop, { ✏️{' '} - fa_IR.js + fa_IR.ts @@ -985,11 +985,11 @@ uppy.use(DragDrop, { ✏️{' '} - pl_PL.js + pl_PL.ts @@ -1021,11 +1021,11 @@ uppy.use(DragDrop, { ✏️{' '} - pt_BR.js + pt_BR.ts @@ -1057,11 +1057,11 @@ uppy.use(DragDrop, { ✏️{' '} - pt_PT.js + pt_PT.ts @@ -1093,11 +1093,11 @@ uppy.use(DragDrop, { ✏️{' '} - ro_RO.js + ro_RO.ts @@ -1129,11 +1129,11 @@ uppy.use(DragDrop, { ✏️{' '} - ru_RU.js + ru_RU.ts @@ -1166,11 +1166,11 @@ uppy.use(DragDrop, { ✏️{' '} - sr_RS_Cyrillic.js + sr_RS_Cyrillic.ts @@ -1203,11 +1203,11 @@ uppy.use(DragDrop, { ✏️{' '} - sr_RS_Latin.js + sr_RS_Latin.ts @@ -1239,11 +1239,11 @@ uppy.use(DragDrop, { ✏️{' '} - sk_SK.js + sk_SK.ts @@ -1275,11 +1275,11 @@ uppy.use(DragDrop, { ✏️{' '} - es_ES.js + es_ES.ts @@ -1311,11 +1311,11 @@ uppy.use(DragDrop, { ✏️{' '} - es_MX.js + es_MX.ts @@ -1347,11 +1347,11 @@ uppy.use(DragDrop, { ✏️{' '} - sv_SE.js + sv_SE.ts @@ -1383,11 +1383,11 @@ uppy.use(DragDrop, { ✏️{' '} - th_TH.js + th_TH.ts @@ -1419,11 +1419,11 @@ uppy.use(DragDrop, { ✏️{' '} - tr_TR.js + tr_TR.ts @@ -1455,11 +1455,11 @@ uppy.use(DragDrop, { ✏️{' '} - uk_UA.js + uk_UA.ts @@ -1491,11 +1491,11 @@ uppy.use(DragDrop, { ✏️{' '} - uz_UZ.js + uz_UZ.ts @@ -1527,11 +1527,11 @@ uppy.use(DragDrop, { ✏️{' '} - vi_VN.js + vi_VN.ts From dda9f417f7928ad3fea96b7dbd5f2031eacd0a9b Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 3 Sep 2024 14:22:12 +0200 Subject: [PATCH 38/65] meta: bump Yarn to 4.4.1 (#5445) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 748dea0f46..630076cb4f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "node": "^16.15.0 || >=18.0.0", "yarn": "3.6.1" }, - "packageManager": "yarn@4.3.1+sha224.934d21773e22af4b69a7032a2d3b4cb38c1f7c019624777cc9916b23", + "packageManager": "yarn@4.4.1+sha224.fd21d9eb5fba020083811af1d4953acc21eeb9f6ff97efd1b3f9d4de", "workspaces": [ "examples/*", "packages/@uppy/*", From b58c558222bd3571cf4b031aa0cb761a4e90f418 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:35:08 +0200 Subject: [PATCH 39/65] Bump svelte from 4.2.18 to 4.2.19 (#5440) Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.18 to 4.2.19. - [Release notes](https://github.com/sveltejs/svelte/releases) - [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.19/packages/svelte/CHANGELOG.md) - [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.19/packages/svelte) --- updated-dependencies: - dependency-name: svelte dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- examples/svelte-example/package.json | 2 +- packages/@uppy/svelte/package.json | 2 +- yarn.lock | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/svelte-example/package.json b/examples/svelte-example/package.json index 003d7ed236..b9b21897a6 100644 --- a/examples/svelte-example/package.json +++ b/examples/svelte-example/package.json @@ -16,7 +16,7 @@ "@sveltejs/vite-plugin-svelte": "^3.0.0", "@types/formidable": "^3", "npm-run-all": "^4.1.5", - "svelte": "^4.2.7", + "svelte": "^4.2.19", "svelte-check": "^3.6.0", "tslib": "^2.4.1", "typescript": "~5.4", diff --git a/packages/@uppy/svelte/package.json b/packages/@uppy/svelte/package.json index d3d0d03bfe..2e3a8643b6 100644 --- a/packages/@uppy/svelte/package.json +++ b/packages/@uppy/svelte/package.json @@ -32,7 +32,7 @@ "rollup": "^4.0.0", "rollup-plugin-svelte": "^7.0.0", "rollup-plugin-svelte-types": "^1.0.6", - "svelte": "^4.0.0", + "svelte": "^4.2.19", "svelte-check": "^3.0.0", "svelte-preprocess": "^5.0.0" }, diff --git a/yarn.lock b/yarn.lock index 193e4a510e..b013513658 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8424,7 +8424,7 @@ __metadata: "@uppy/xhr-upload": "workspace:*" formidable: "npm:^3.5.1" npm-run-all: "npm:^4.1.5" - svelte: "npm:^4.2.7" + svelte: "npm:^4.2.19" svelte-check: "npm:^3.6.0" tslib: "npm:^2.4.1" typescript: "npm:~5.4" @@ -9036,7 +9036,7 @@ __metadata: rollup: "npm:^4.0.0" rollup-plugin-svelte: "npm:^7.0.0" rollup-plugin-svelte-types: "npm:^1.0.6" - svelte: "npm:^4.0.0" + svelte: "npm:^4.2.19" svelte-check: "npm:^3.0.0" svelte-preprocess: "npm:^5.0.0" peerDependencies: @@ -28151,9 +28151,9 @@ __metadata: languageName: node linkType: hard -"svelte@npm:^4.0.0, svelte@npm:^4.2.7": - version: 4.2.18 - resolution: "svelte@npm:4.2.18" +"svelte@npm:^4.2.19": + version: 4.2.19 + resolution: "svelte@npm:4.2.19" dependencies: "@ampproject/remapping": "npm:^2.2.1" "@jridgewell/sourcemap-codec": "npm:^1.4.15" @@ -28169,7 +28169,7 @@ __metadata: locate-character: "npm:^3.0.0" magic-string: "npm:^0.30.4" periscopic: "npm:^3.1.0" - checksum: 10/281790609d4ad86b93131858e5b94bef6faa9959018198ea78d9fff3cdc367294fd85e5dc43ccfc7e88e8110dc60bce664ff7f1a72a04624e7487f2f5444bd6d + checksum: 10/6da99f43ccc0de5879925becc6e53b49fbaffffbd7c9bac018f24a9e76e6d95826ee9564daa205cb17037ffb776fe0d93a3098c148bfe84bc88c918937be6f23 languageName: node linkType: hard From 3f2f37ffc82d4205b4e795aacaca25c75709af00 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 3 Sep 2024 15:54:59 +0200 Subject: [PATCH 40/65] @uppy/svelte: fix generated module to not bundle Svelte (#5446) --- packages/@uppy/svelte/rollup.config.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/@uppy/svelte/rollup.config.js b/packages/@uppy/svelte/rollup.config.js index f19675b8e8..8262aba5e9 100644 --- a/packages/@uppy/svelte/rollup.config.js +++ b/packages/@uppy/svelte/rollup.config.js @@ -3,20 +3,17 @@ import resolve from '@rollup/plugin-node-resolve' import preprocess from 'svelte-preprocess' import svelteDts from 'rollup-plugin-svelte-types'; -const globals = { - '@uppy/dashboard': 'Dashboard', - '@uppy/drag-drop': 'DragDrop', - '@uppy/progress-bar': 'ProgressBar', - '@uppy/status-bar': 'StatusBar', -} - export default { + external: [ + /^@uppy\//, + /node_modules/, + ], input: 'src/index.ts', output: [ { file: 'lib/index.js', format: 'es', - globals, + sourcemap: 'inline', }, ], plugins: [ @@ -25,7 +22,9 @@ export default { preprocess: preprocess(), }), resolve({ - resolveOnly: ['svelte'], + browser: true, + exportConditions: ['svelte'], + extensions: ['.svelte'] }), svelteDts.default({ declarationDir: './lib/' From f33162236d7169eb13c0440416a9502e03e74055 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Thu, 5 Sep 2024 12:44:12 +0200 Subject: [PATCH 41/65] @uppy/xhr-upload: pass files to onBeforeRequest (#5447) --- docs/uploader/xhr.mdx | 5 ++++- packages/@uppy/xhr-upload/src/index.ts | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/uploader/xhr.mdx b/docs/uploader/xhr.mdx index d65c7e3e44..c62c2aed45 100644 --- a/docs/uploader/xhr.mdx +++ b/docs/uploader/xhr.mdx @@ -217,7 +217,10 @@ credentials (`boolean`, default: `false`). #### `onBeforeRequest` An optional function that will be called before a HTTP request is sent out -(`(xhr: XMLHttpRequest, retryCount: number) => void | Promise`). +(`(xhr: XMLHttpRequest, retryCount: number, files: UppyFile[]) => void | Promise`). + +The third argument, `files`, is an array of all Uppy files when `bundle` is +`true`. When `false`, it only contains one file. #### `shouldRetry` diff --git a/packages/@uppy/xhr-upload/src/index.ts b/packages/@uppy/xhr-upload/src/index.ts index 8d91c41274..14ea0eccf8 100644 --- a/packages/@uppy/xhr-upload/src/index.ts +++ b/packages/@uppy/xhr-upload/src/index.ts @@ -52,7 +52,12 @@ export interface XhrUploadOpts limit?: number responseType?: XMLHttpRequestResponseType withCredentials?: boolean - onBeforeRequest?: FetcherOptions['onBeforeRequest'] + onBeforeRequest?: ( + xhr: XMLHttpRequest, + retryCount: number, + /** The files to be uploaded. When `bundle` is `false` only one file is in the array. */ + files: UppyFile[], + ) => void | Promise shouldRetry?: FetcherOptions['shouldRetry'] onAfterResponse?: FetcherOptions['onAfterResponse'] getResponseData?: (xhr: XMLHttpRequest) => B | Promise @@ -194,13 +199,16 @@ export default class XHRUpload< */ this.#getFetcher = (files: UppyFile[]) => { return async ( - url: Parameters[0], - options: NonNullable[1]>, + url: string, + options: Omit & { + onBeforeRequest?: Opts['onBeforeRequest'] + }, ) => { try { const res = await fetcher(url, { ...options, - onBeforeRequest: this.opts.onBeforeRequest, + onBeforeRequest: (xhr, retryCount) => + this.opts.onBeforeRequest?.(xhr, retryCount, files), shouldRetry: this.opts.shouldRetry, onAfterResponse: this.opts.onAfterResponse, onTimeout: (timeout) => { From b936304eef7425410db88d7c9b67c541be860ce4 Mon Sep 17 00:00:00 2001 From: Murderlon Date: Mon, 9 Sep 2024 10:48:31 +0200 Subject: [PATCH 42/65] docs: remove old legacy CDN reference --- docs/guides/browser-support.mdx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/guides/browser-support.mdx b/docs/guides/browser-support.mdx index 4537f47f18..aa963d51bd 100644 --- a/docs/guides/browser-support.mdx +++ b/docs/guides/browser-support.mdx @@ -49,14 +49,3 @@ window.ResizeObserver ??= ResizeObserver; export { default } from '@uppy/core'; export * from '@uppy/core'; ``` - -## Legacy CDN bundle - - - {` - import { Uppy, DragDrop, Tus } from "{{UPPY_JS_URL}}" - const uppy = new Uppy() - uppy.use(DragDrop, { target: '#uppy' }) - uppy.use(Tus, { endpoint: '//tusd.tusdemo.net/files/' }) - `} - From 23bf2298d8f888bde02fdd19b4b62dc99b2a382d Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Mon, 9 Sep 2024 10:53:33 +0200 Subject: [PATCH 43/65] @uppy/tus: correctly type tus on UppyFile (#5454) * @uppy/tus: correctly type tus on UppyFile * Fix @uppy/transloadit --- packages/@uppy/transloadit/src/index.ts | 5 ++--- packages/@uppy/tus/src/index.ts | 17 ++++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index 6d6f60c1b6..2be64a103e 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -3,7 +3,7 @@ import ErrorWithCause from '@uppy/utils/lib/ErrorWithCause' import { RateLimitedQueue } from '@uppy/utils/lib/RateLimitedQueue' import BasePlugin from '@uppy/core/lib/BasePlugin.js' import type { DefinePluginOpts, PluginOpts } from '@uppy/core/lib/BasePlugin.js' -import Tus, { type TusDetailedError } from '@uppy/tus' +import Tus, { type TusDetailedError, type TusOpts } from '@uppy/tus' import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' import type { Uppy } from '@uppy/core' import Assembly from './Assembly.ts' @@ -219,7 +219,7 @@ declare module '@uppy/utils/lib/UppyFile' { // eslint-disable-next-line no-shadow, @typescript-eslint/no-unused-vars export interface UppyFile { transloadit?: { assembly: string } - tus?: { uploadUrl?: string | null } + tus?: TusOpts } } @@ -936,7 +936,6 @@ export default class Transloadit< this.uppy.on('upload-success', this.#onFileUploadURLAvailable) } else { // we don't need it here. - // @ts-expect-error `endpoint` is required but we first have to fetch // the regional endpoint from the Transloadit API before we can set it. this.uppy.use(Tus, { // Disable tus-js-client fingerprinting, otherwise uploading the same file at different times diff --git a/packages/@uppy/tus/src/index.ts b/packages/@uppy/tus/src/index.ts index 74d9946aa9..81ebd2eb97 100644 --- a/packages/@uppy/tus/src/index.ts +++ b/packages/@uppy/tus/src/index.ts @@ -24,14 +24,6 @@ import getFingerprint from './getFingerprint.ts' // @ts-ignore We don't want TS to generate types for the package.json import packageJson from '../package.json' -declare module '@uppy/utils/lib/UppyFile' { - // eslint-disable-next-line no-shadow, @typescript-eslint/no-unused-vars - export interface UppyFile { - // TODO: figure out what else is in this type - tus?: { uploadUrl?: string | null } - } -} - type RestTusUploadOptions = Omit< tus.UploadOptions, 'onShouldRetry' | 'onBeforeRequest' | 'headers' @@ -42,7 +34,7 @@ export type TusDetailedError = tus.DetailedError export interface TusOpts extends PluginOpts, RestTusUploadOptions { - endpoint: string + endpoint?: string headers?: | Record | ((file: UppyFile) => Record) @@ -102,6 +94,13 @@ type Opts = DefinePluginOpts< keyof typeof defaultOptions > +declare module '@uppy/utils/lib/UppyFile' { + // eslint-disable-next-line no-shadow, @typescript-eslint/no-unused-vars + export interface UppyFile { + tus?: TusOpts + } +} + /** * Tus resumable file uploader */ From 9eb857e68c11da1975087594893621022d4e3a47 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Thu, 19 Sep 2024 10:42:57 +0200 Subject: [PATCH 44/65] docs: rename Edgly to Smart CDN (#5449) * docs: rename Edgly to Smart CDN * Apply suggestions from code review * Apply suggestions from code review --- CHANGELOG.md | 2 +- README.md | 5 ++--- examples/transloadit/index.html | 2 +- packages/@uppy/angular/projects/uppy/angular/README.md | 2 +- packages/@uppy/audio/README.md | 4 ++-- packages/@uppy/aws-s3/README.md | 4 ++-- packages/@uppy/box/README.md | 4 ++-- packages/@uppy/compressor/README.md | 4 ++-- packages/@uppy/core/README.md | 4 ++-- packages/@uppy/dashboard/README.md | 4 ++-- packages/@uppy/drag-drop/README.md | 4 ++-- packages/@uppy/dropbox/README.md | 4 ++-- packages/@uppy/facebook/README.md | 4 ++-- packages/@uppy/file-input/README.md | 4 ++-- packages/@uppy/form/README.md | 4 ++-- packages/@uppy/golden-retriever/README.md | 4 ++-- packages/@uppy/google-drive/README.md | 4 ++-- packages/@uppy/google-photos/README.md | 4 ++-- packages/@uppy/image-editor/README.md | 4 ++-- packages/@uppy/informer/README.md | 4 ++-- packages/@uppy/instagram/README.md | 4 ++-- packages/@uppy/onedrive/README.md | 4 ++-- packages/@uppy/progress-bar/README.md | 4 ++-- packages/@uppy/react/README.md | 4 ++-- packages/@uppy/redux-dev-tools/README.md | 4 ++-- packages/@uppy/remote-sources/README.md | 4 ++-- packages/@uppy/screen-capture/README.md | 4 ++-- packages/@uppy/status-bar/README.md | 4 ++-- packages/@uppy/store-default/README.md | 4 ++-- packages/@uppy/store-redux/README.md | 4 ++-- packages/@uppy/thumbnail-generator/README.md | 4 ++-- packages/@uppy/transloadit/README.md | 4 ++-- packages/@uppy/tus/README.md | 4 ++-- packages/@uppy/unsplash/README.md | 4 ++-- packages/@uppy/url/README.md | 4 ++-- packages/@uppy/vue/README.md | 4 ++-- packages/@uppy/webcam/README.md | 4 ++-- packages/@uppy/xhr-upload/README.md | 4 ++-- packages/@uppy/zoom/README.md | 4 ++-- private/upload-to-cdn/index.js | 2 +- 40 files changed, 76 insertions(+), 77 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15b1344db7..6116eae186 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6154,7 +6154,7 @@ Released: 2018-02-11. - dashboard: Use more accessible tip lib microtip (#536 / @arturi) - docs: Add PHP snippets to XHRUpload docs (#567 / @goto-bus-stop) - meta: Added instruction to fork the repo first (#512 / muhammadInam) -- meta: Automatically host releases on edgly and use that as our main CDN (#558 / @kvz) +- meta: Automatically host releases on Smart CDN and use that as our main CDN (#558 / @kvz) - meta: Dependency version updates (#523 / @goto-bus-stop) - meta: Remove unused files from published package (#586 / @goto-bus-stop) - s3: Respect `limit` option for upload parameter requests too; fix isXml() check when no content-type is available (#545, #544, #528 / @goto-bus-stop) diff --git a/README.md b/README.md index 2faed23c2e..d67c227962 100644 --- a/README.md +++ b/README.md @@ -91,9 +91,8 @@ Add CSS either to your HTML page’s `` or include in JS, if your bundler of choice supports it. -Alternatively, you can also use a pre-built bundle from Transloadit’s CDN: -Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` -object. +Alternatively, you can also use a pre-built bundle from Transloadit’s CDN: Smart +CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object. > ⚠️ The bundle consists of most Uppy plugins, so this method is not recommended > for production, as your users will have to download all plugins when you are diff --git a/examples/transloadit/index.html b/examples/transloadit/index.html index ac0cf2a5e1..a3919ae1f8 100644 --- a/examples/transloadit/index.html +++ b/examples/transloadit/index.html @@ -37,7 +37,7 @@

Uppy Transloadit diff --git a/packages/@uppy/angular/projects/uppy/angular/README.md b/packages/@uppy/angular/projects/uppy/angular/README.md index 17fff277a5..24875eb67e 100644 --- a/packages/@uppy/angular/projects/uppy/angular/README.md +++ b/packages/@uppy/angular/projects/uppy/angular/README.md @@ -20,7 +20,7 @@ Uppy is being developed by the folks at [Transloadit](https://transloadit.com), $ npm install @uppy/angular --save ``` -Alternatively, you can also use this plugin in a pre-built bundle from Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. +Alternatively, you can also use this plugin in a pre-built bundle from Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/audio/README.md b/packages/@uppy/audio/README.md index 5a56280169..b5dec29459 100644 --- a/packages/@uppy/audio/README.md +++ b/packages/@uppy/audio/README.md @@ -30,8 +30,8 @@ $ npm install @uppy/audio ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/aws-s3/README.md b/packages/@uppy/aws-s3/README.md index d3707973c4..9274a56519 100644 --- a/packages/@uppy/aws-s3/README.md +++ b/packages/@uppy/aws-s3/README.md @@ -34,8 +34,8 @@ $ npm install @uppy/aws-s3 ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/box/README.md b/packages/@uppy/box/README.md index baefa9e003..0b8df87f97 100644 --- a/packages/@uppy/box/README.md +++ b/packages/@uppy/box/README.md @@ -36,8 +36,8 @@ $ npm install @uppy/box ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/compressor/README.md b/packages/@uppy/compressor/README.md index aecb028f9e..e0993002ca 100644 --- a/packages/@uppy/compressor/README.md +++ b/packages/@uppy/compressor/README.md @@ -35,8 +35,8 @@ as [Parcel](https://parceljs.org/), [Vite](https://vitejs.dev/) or [Webpack](https://webpack.js.org/). Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/core/README.md b/packages/@uppy/core/README.md index 1e9be10554..580110f347 100644 --- a/packages/@uppy/core/README.md +++ b/packages/@uppy/core/README.md @@ -38,8 +38,8 @@ $ npm install @uppy/core ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/dashboard/README.md b/packages/@uppy/dashboard/README.md index b879713137..9eb66b92da 100644 --- a/packages/@uppy/dashboard/README.md +++ b/packages/@uppy/dashboard/README.md @@ -44,8 +44,8 @@ $ npm install @uppy/dashboard ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/drag-drop/README.md b/packages/@uppy/drag-drop/README.md index 7566041fcd..c1abf835d1 100644 --- a/packages/@uppy/drag-drop/README.md +++ b/packages/@uppy/drag-drop/README.md @@ -33,8 +33,8 @@ $ npm install @uppy/drag-drop ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/dropbox/README.md b/packages/@uppy/dropbox/README.md index fa47f5039f..022a3f69cd 100644 --- a/packages/@uppy/dropbox/README.md +++ b/packages/@uppy/dropbox/README.md @@ -36,8 +36,8 @@ $ npm install @uppy/dropbox ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/facebook/README.md b/packages/@uppy/facebook/README.md index e2a2edd7e9..b031bfa2a5 100644 --- a/packages/@uppy/facebook/README.md +++ b/packages/@uppy/facebook/README.md @@ -37,8 +37,8 @@ $ npm install @uppy/facebook ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/file-input/README.md b/packages/@uppy/file-input/README.md index 71b872e725..db42c0c2a3 100644 --- a/packages/@uppy/file-input/README.md +++ b/packages/@uppy/file-input/README.md @@ -35,8 +35,8 @@ $ npm install @uppy/file-input ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/form/README.md b/packages/@uppy/form/README.md index 33b478eeef..1f006c87b6 100644 --- a/packages/@uppy/form/README.md +++ b/packages/@uppy/form/README.md @@ -38,8 +38,8 @@ $ npm install @uppy/form ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/golden-retriever/README.md b/packages/@uppy/golden-retriever/README.md index c634040d3d..96eb8494c5 100644 --- a/packages/@uppy/golden-retriever/README.md +++ b/packages/@uppy/golden-retriever/README.md @@ -35,8 +35,8 @@ $ npm install @uppy/golden-retriever ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/google-drive/README.md b/packages/@uppy/google-drive/README.md index 0ea7370304..3a9621ca46 100644 --- a/packages/@uppy/google-drive/README.md +++ b/packages/@uppy/google-drive/README.md @@ -37,8 +37,8 @@ $ npm install @uppy/google-drive ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/google-photos/README.md b/packages/@uppy/google-photos/README.md index 4cc652ee12..1d6b73e071 100644 --- a/packages/@uppy/google-photos/README.md +++ b/packages/@uppy/google-photos/README.md @@ -37,8 +37,8 @@ $ npm install @uppy/google-photos ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/image-editor/README.md b/packages/@uppy/image-editor/README.md index 56628466d0..ca5281cb74 100644 --- a/packages/@uppy/image-editor/README.md +++ b/packages/@uppy/image-editor/README.md @@ -37,8 +37,8 @@ $ npm install @uppy/image-editor ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/informer/README.md b/packages/@uppy/informer/README.md index eb3d2a37d1..6ce4c13844 100644 --- a/packages/@uppy/informer/README.md +++ b/packages/@uppy/informer/README.md @@ -32,8 +32,8 @@ $ npm install @uppy/informer ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/instagram/README.md b/packages/@uppy/instagram/README.md index 283741b427..8cdf192855 100644 --- a/packages/@uppy/instagram/README.md +++ b/packages/@uppy/instagram/README.md @@ -34,8 +34,8 @@ $ npm install @uppy/instagram ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/onedrive/README.md b/packages/@uppy/onedrive/README.md index 9279d4d8a4..8a643ee21d 100644 --- a/packages/@uppy/onedrive/README.md +++ b/packages/@uppy/onedrive/README.md @@ -37,8 +37,8 @@ $ npm install @uppy/onedrive ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/progress-bar/README.md b/packages/@uppy/progress-bar/README.md index ec07a9e5ea..e711d5c1ea 100644 --- a/packages/@uppy/progress-bar/README.md +++ b/packages/@uppy/progress-bar/README.md @@ -33,8 +33,8 @@ $ npm install @uppy/progress-bar ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/react/README.md b/packages/@uppy/react/README.md index 7817cd437d..b10339f8ff 100644 --- a/packages/@uppy/react/README.md +++ b/packages/@uppy/react/README.md @@ -48,8 +48,8 @@ $ npm install @uppy/react ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/redux-dev-tools/README.md b/packages/@uppy/redux-dev-tools/README.md index 53b071c07d..d774af6b19 100644 --- a/packages/@uppy/redux-dev-tools/README.md +++ b/packages/@uppy/redux-dev-tools/README.md @@ -30,8 +30,8 @@ $ npm install @uppy/redux-dev-tools ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/remote-sources/README.md b/packages/@uppy/remote-sources/README.md index a1f3337fe0..39f669fa98 100644 --- a/packages/@uppy/remote-sources/README.md +++ b/packages/@uppy/remote-sources/README.md @@ -28,8 +28,8 @@ yarn add @uppy/remote-sources ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy.RemoteSources` will attach itself -to the global `window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy.RemoteSources` will attach +itself to the global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/screen-capture/README.md b/packages/@uppy/screen-capture/README.md index 55e0cb4373..1cb9ae6808 100644 --- a/packages/@uppy/screen-capture/README.md +++ b/packages/@uppy/screen-capture/README.md @@ -30,8 +30,8 @@ $ npm install @uppy/screen-capture ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/status-bar/README.md b/packages/@uppy/status-bar/README.md index 69d7e34639..c0e529a819 100644 --- a/packages/@uppy/status-bar/README.md +++ b/packages/@uppy/status-bar/README.md @@ -40,8 +40,8 @@ $ npm install @uppy/status-bar ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/store-default/README.md b/packages/@uppy/store-default/README.md index d4319b18a9..c36cf72f1e 100644 --- a/packages/@uppy/store-default/README.md +++ b/packages/@uppy/store-default/README.md @@ -31,8 +31,8 @@ $ npm install @uppy/store-default ``` Alternatively, you can also use this package in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/store-redux/README.md b/packages/@uppy/store-redux/README.md index 13d1589ae8..0e1fd70113 100644 --- a/packages/@uppy/store-redux/README.md +++ b/packages/@uppy/store-redux/README.md @@ -41,8 +41,8 @@ $ npm install @uppy/store-redux ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. ## Documentation diff --git a/packages/@uppy/thumbnail-generator/README.md b/packages/@uppy/thumbnail-generator/README.md index 13c6825f3d..4540ed1e14 100644 --- a/packages/@uppy/thumbnail-generator/README.md +++ b/packages/@uppy/thumbnail-generator/README.md @@ -31,8 +31,8 @@ $ npm install @uppy/thumbnail-generator ``` Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global -`window.Uppy` object. See the +Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the +global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. @@ -112,7 +112,7 @@ CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object. Uppy, Dashboard, Tus, - } from 'https://releases.transloadit.com/uppy/v4.3.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.4.0/uppy.min.mjs' const uppy = new Uppy() uppy.use(Dashboard, { target: '#files-drag-drop' }) @@ -315,31 +315,31 @@ Use Uppy in your project? craig-jenningsdavekissdenysdesignethanwillisfrobinsonjrichmeij richartkeilpaescujmsandmartiuslimMartin005mskelton mactavishzlafedogrockerjedwoodjasonboscoghasrfakhri -geertclerxJimmyLvrartrossngscherromanrobwilson1 +geertclerxtcgjrartrossngscherromanrobwilson1 SxDxreforaulibanezluarmreman8519pedantic-git Pzocoppadmavilasomphillipalexanderpmusarajpedrofsplneto -patricklindsaytcgjTashowstajstrayersjauld -steverobamaituquigebowaptikSpazzMarticusszh +patricklindsayTashowstajstrayersjauldsteverob +amaituquigebowaptikSpazzMarticusszhscebotari66 sergei-zelinskysebasegovia01sdebackerRattonesamuelcolburnfortunto2 GNURubMitchell8210achmiralken-kuromilannakummkopinsky mhulethrshmauricioribeiromatthewhartstongemjesuelemattfik mateuscruzmasum-ulumasaokmartin-brennanmarcusforsbergmarcosthejew -mperrandopascalwengerterParsaArvanehPAcryptic022Ozodbek1405leftdevel +eliOcspascalwengerterParsaArvanehPAcryptic022Ozodbek1405leftdevel nil1511coreprocessnicojonestrungcva10a6tnnaveed-ahmadnadeemc pleasespammelatermarton-laszlo-attilanavruzmmogzolshahimcltmnafees -boudranetdownmosi-khamaddy-jomdxiaohumagumbo -jx-zyfkode-ninjasontixyoujur-ngjohnmanjiro13jyoungblood -green-mikegaelicwinterfrancklfingulelliotsayesdzcpy -dkisiczanzlenderolitomasyoann-hellopretvedran555tusharjkhunt -thanhthotstduhpfslawexxx44rtaiebrmoura-92rlebosse -rhymeslunttaphil714ordagoodselsevierninesalt -neuronet77craigcbrunnerweston-sankey-mark43dwnstenagyvstiig -valentinoliviallybodryityler-dot-earthtrivikrtanadeau -top-mastertvaliasektomekptomsaleebaWIStudenttmaier -Tiarhaitwarlopcodehero7386christianwengertcgoinglovecanvasbh -c0b41avallaargghalfatvagreene-courseraaduh95-test-account -sartoshi-foot-daozackbloomzlawson-utzachconneryafkariYehudaKremer -xhocquetwillycamargoonhateardeoisCommanderRootczj +boudraJimmyLvnetdownmosi-khamaddy-jomdxiaohu +magumbojx-zyfkode-ninjasontixyoujur-ngjohnmanjiro13 +jyoungbloodgreen-mikegaelicwinterfrancklfingulelliotsayes +dzcpydkisiczanzlenderolitomasyoann-hellopretvedran555 +tusharjkhuntthanhthotstduhpfslawexxx44rtaiebrmoura-92 +rlebosserhymeslunttaphil714ordagoodselsevier +ninesaltneuronet77craigcbrunnerweston-sankey-mark43dwnstenagyv +stiigvalentinoliviallybodryityler-dot-earthtrivikr +tanadeautop-mastertvaliasektomekptomsaleebaWIStudent +tmaierTiarhaitwarlopcodehero7386christianwengertcgoinglove +canvasbhc0b41avallaargghalfatvagreene-coursera +aduh95-test-accountsartoshi-foot-daozackbloomzlawson-utzachconneryafkari +YehudaKremerxhocquetwillycamargoardeoisCommanderRootczj cbush06Aarbelcfracspranceprattcmpsubvertallchris charlybillaudCretezychaocellvinchungcartfiskcyu bryanjswiftbedgerottowbaaronyoldarefbautistaemuell @@ -351,19 +351,19 @@ Use Uppy in your project? abannachaaron-russellsuperhawk610ajschmidt8bducharmeazizk azeembaayhankesiciogluavneetmalhotraThe-Flashatsawinash-jc-allen apuyouarthurdennerAbourasstyndriaanthony0030andychongyz -andrii-bodnarsuperandrew213radarherefunctinokevin-west-10xkergekacsa -firesharkstudioskaspermeinematykaroljveltenmellow-fellowjmontoyaa -jcalonsojbelejjszobodyjorgeepcjondewoojonathanarbely -jsanchez034Jokcychromacomaprofsmallpinemarc-mabeLucklj521 -lucax88xlucaperretombrlouimdolphinigleleomelzer -leods92galli-leodvirylarowlanleaanthonyhoangbits -labohkip81kyleparisielkebabkidonngtheJoeBizhuydod -HussainAlkhalifahHughbertDhiromi2424giacomocerquoneroenschggjungb -geoffapplefordgabiganamfuadscodesdtrucsferdiusafgallinari -GkleinerevaepexaEnricoSottileelliotdickisoneliOcsJmales -jessica-courseravithjanwiltsjanklimojamestiotiojcjmcclean -JbithellJakubHaladejjakemcallistergaejabongJacobMGEvansmazoruss -GreenJimmyintenziveNaxYoishendywebIanVS +andrii-bodnarsuperandrew213radarherefunctinomperrandokidonng +kevin-west-10xkergekacsafiresharkstudioskaspermeinematykaroljvelten +mellow-fellowjmontoyaajcalonsojbelejjszobodyjorgeepc +jondewoojonathanarbelyjsanchez034Jokcychromacomaonhate +marc-mabeLucklj521lucax88xlucaperretombrlouim +dolphinigleleomelzerleods92galli-leodvirylarowlan +leaanthonyhoangbitslabohkip81kyleparisielkebabprofsmallpine +IanVShuydodHussainAlkhalifahHughbertDhiromi2424giacomocerquone +roenschggjungbgeoffapplefordgabiganamfuadscodesdtrucs +ferdiusafgallinariGkleinerevaepexaEnricoSottileelliotdickison +theJoeBizJmalesjessica-courseravithjanwiltsjanklimo +jamestiotiojcjmccleanJbithellJakubHaladejjakemcallistergaejabong +JacobMGEvansmazorussGreenJimmyintenziveNaxYoishendyweb diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html index fe5bb0c184..44368ef8ac 100644 --- a/examples/cdn-example/index.html +++ b/examples/cdn-example/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Dashboard, Webcam, Tus, - } from 'https://releases.transloadit.com/uppy/v4.3.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.4.0/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/examples/uppy-with-companion/client/index.html b/examples/uppy-with-companion/client/index.html index 638520bb25..b26ce2113f 100644 --- a/examples/uppy-with-companion/client/index.html +++ b/examples/uppy-with-companion/client/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Instagram, GoogleDrive, Tus, - } from 'https://releases.transloadit.com/uppy/v4.3.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.4.0/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/packages/@uppy/companion/package.json b/packages/@uppy/companion/package.json index faf0f15c31..8369c1affb 100644 --- a/packages/@uppy/companion/package.json +++ b/packages/@uppy/companion/package.json @@ -1,6 +1,6 @@ { "name": "@uppy/companion", - "version": "5.1.0", + "version": "5.1.1", "description": "OAuth helper and remote fetcher for Uppy's (https://uppy.io) extensible file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox and Google Drive, S3 and more :dog:", "main": "lib/companion.js", "types": "lib/companion.d.ts", diff --git a/packages/@uppy/svelte/CHANGELOG.md b/packages/@uppy/svelte/CHANGELOG.md index 5caec0282e..1fc0f788dc 100644 --- a/packages/@uppy/svelte/CHANGELOG.md +++ b/packages/@uppy/svelte/CHANGELOG.md @@ -1,5 +1,13 @@ # @uppy/svelte +## 4.0.2 + +Released: 2024-09-20 +Included in: Uppy v4.4.0 + +- @uppy/svelte: fix generated module to not bundle Svelte (Antoine du Hamel / #5446) +- examples,@uppy/svelte: Bump svelte from 4.2.18 to 4.2.19 (dependabot[bot] / #5440) + ## 4.0.1 Released: 2024-08-20 diff --git a/packages/@uppy/svelte/package.json b/packages/@uppy/svelte/package.json index 2e3a8643b6..3ebd9e5477 100644 --- a/packages/@uppy/svelte/package.json +++ b/packages/@uppy/svelte/package.json @@ -2,7 +2,7 @@ "name": "@uppy/svelte", "description": "Uppy plugin that helps integrate Uppy into your Svelte project.", "type": "module", - "version": "4.0.1", + "version": "4.0.2", "scripts": { "build": "rollup -c", "prepublishOnly": "yarn run build", diff --git a/packages/@uppy/transloadit/package.json b/packages/@uppy/transloadit/package.json index e5c93cf90c..7766af1495 100644 --- a/packages/@uppy/transloadit/package.json +++ b/packages/@uppy/transloadit/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/transloadit", "description": "The Transloadit plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and more", - "version": "4.1.0", + "version": "4.1.1", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/tus/CHANGELOG.md b/packages/@uppy/tus/CHANGELOG.md index 486b6b0f5e..03d1d1696d 100644 --- a/packages/@uppy/tus/CHANGELOG.md +++ b/packages/@uppy/tus/CHANGELOG.md @@ -1,5 +1,14 @@ # @uppy/tus +## 4.1.1 + +Released: 2024-09-20 +Included in: Uppy v4.4.0 + +- @uppy/tus: fix retry check for status code 400 (Merlijn Vos / #5461) +- @uppy/tus: set response from tus-js-client (Merlijn Vos / #5456) +- @uppy/tus: correctly type tus on UppyFile (Merlijn Vos / #5454) + ## 4.1.0 Released: 2024-08-29 diff --git a/packages/@uppy/tus/package.json b/packages/@uppy/tus/package.json index 8994d1d22f..dec8aec82b 100644 --- a/packages/@uppy/tus/package.json +++ b/packages/@uppy/tus/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/tus", "description": "Resumable uploads for Uppy using Tus.io", - "version": "4.1.0", + "version": "4.1.1", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/@uppy/xhr-upload/CHANGELOG.md b/packages/@uppy/xhr-upload/CHANGELOG.md index c46b197f74..467fb1c9f2 100644 --- a/packages/@uppy/xhr-upload/CHANGELOG.md +++ b/packages/@uppy/xhr-upload/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/xhr-upload +## 4.2.0 + +Released: 2024-09-20 +Included in: Uppy v4.4.0 + +- @uppy/xhr-upload: pass files to onBeforeRequest (Merlijn Vos / #5447) + ## 4.1.0 Released: 2024-08-29 diff --git a/packages/@uppy/xhr-upload/package.json b/packages/@uppy/xhr-upload/package.json index 0b6fdb6042..ce2d6ea616 100644 --- a/packages/@uppy/xhr-upload/package.json +++ b/packages/@uppy/xhr-upload/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/xhr-upload", "description": "Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.", - "version": "4.1.0", + "version": "4.2.0", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/uppy/package.json b/packages/uppy/package.json index e7f8850abf..b01faa4ec5 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,7 +1,7 @@ { "name": "uppy", "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.3.0", + "version": "4.4.0", "license": "MIT", "main": "lib/index.js", "module": "lib/index.js", From b7f8ab165c7890235e2b74b946f8039aa733387d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:37:30 +0200 Subject: [PATCH 52/65] build(deps): bump vite from 5.2.11 to 5.4.6 (#5466) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.11 to 5.4.6. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4d4ebd8827..3e02e17b1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30061,47 +30061,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.0": - version: 5.3.1 - resolution: "vite@npm:5.3.1" - dependencies: - esbuild: "npm:^0.21.3" - fsevents: "npm:~2.3.3" - postcss: "npm:^8.4.38" - rollup: "npm:^4.13.0" - peerDependencies: - "@types/node": ^18.0.0 || >=20.0.0 - less: "*" - lightningcss: ^1.21.0 - sass: "*" - stylus: "*" - sugarss: "*" - terser: ^5.4.0 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - "@types/node": - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - bin: - vite: bin/vite.js - checksum: 10/180ca1795389f1ebc0b09f2ce61846943d34df597c4719e68d1d5ecba3e6cbd5b3313a4a321119b18290de3ef543df433659ba8b678de84df152e0386342697f - languageName: node - linkType: hard - -"vite@npm:^5.3.6": +"vite@npm:^5.0.0, vite@npm:^5.3.6": version: 5.4.6 resolution: "vite@npm:5.4.6" dependencies: From 2481f0bcc795c6c0e30264380fd7023f65d42a3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:37:46 +0200 Subject: [PATCH 53/65] build(deps-dev): bump rollup from 4.18.0 to 4.22.4 (#5470) Bumps [rollup](https://github.com/rollup/rollup) from 4.18.0 to 4.22.4. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.18.0...v4.22.4) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/@uppy/svelte/package.json | 2 +- yarn.lock | 179 ++++++++++++++++++++++++++++- 2 files changed, 178 insertions(+), 3 deletions(-) diff --git a/packages/@uppy/svelte/package.json b/packages/@uppy/svelte/package.json index 3ebd9e5477..b8d072835e 100644 --- a/packages/@uppy/svelte/package.json +++ b/packages/@uppy/svelte/package.json @@ -29,7 +29,7 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^13.0.0", "@tsconfig/svelte": "^5.0.0", - "rollup": "^4.0.0", + "rollup": "^4.22.4", "rollup-plugin-svelte": "^7.0.0", "rollup-plugin-svelte-types": "^1.0.6", "svelte": "^4.2.19", diff --git a/yarn.lock b/yarn.lock index 3e02e17b1e..0841c728b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5998,6 +5998,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm-eabi@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.22.4" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@rollup/rollup-android-arm64@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-android-arm64@npm:4.18.0" @@ -6012,6 +6019,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm64@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-android-arm64@npm:4.22.4" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-darwin-arm64@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-darwin-arm64@npm:4.18.0" @@ -6026,6 +6040,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-darwin-arm64@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-darwin-arm64@npm:4.22.4" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-darwin-x64@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-darwin-x64@npm:4.18.0" @@ -6040,6 +6061,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-darwin-x64@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-darwin-x64@npm:4.22.4" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.0" @@ -6054,6 +6082,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm-gnueabihf@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.22.4" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-arm-musleabihf@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.18.0" @@ -6068,6 +6103,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm-musleabihf@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.22.4" + conditions: os=linux & cpu=arm & libc=musl + languageName: node + linkType: hard + "@rollup/rollup-linux-arm64-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.18.0" @@ -6082,6 +6124,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm64-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.22.4" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-arm64-musl@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-arm64-musl@npm:4.18.0" @@ -6096,6 +6145,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm64-musl@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.22.4" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.0" @@ -6110,6 +6166,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.4" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-riscv64-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.18.0" @@ -6124,6 +6187,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-riscv64-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.22.4" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-s390x-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.18.0" @@ -6138,6 +6208,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-s390x-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.22.4" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-x64-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-x64-gnu@npm:4.18.0" @@ -6152,6 +6229,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-x64-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.22.4" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-x64-musl@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-x64-musl@npm:4.18.0" @@ -6166,6 +6250,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-x64-musl@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.22.4" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + "@rollup/rollup-win32-arm64-msvc@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.18.0" @@ -6180,6 +6271,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-arm64-msvc@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.22.4" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-win32-ia32-msvc@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.18.0" @@ -6194,6 +6292,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-ia32-msvc@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.22.4" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@rollup/rollup-win32-x64-msvc@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-win32-x64-msvc@npm:4.18.0" @@ -6208,6 +6313,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-x64-msvc@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.22.4" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@rollup/wasm-node@npm:^4.18.0": version: 4.18.0 resolution: "@rollup/wasm-node@npm:4.18.0" @@ -9145,7 +9257,7 @@ __metadata: "@rollup/plugin-node-resolve": "npm:^13.0.0" "@tsconfig/svelte": "npm:^5.0.0" "@uppy/utils": "workspace:^" - rollup: "npm:^4.0.0" + rollup: "npm:^4.22.4" rollup-plugin-svelte: "npm:^7.0.0" rollup-plugin-svelte-types: "npm:^1.0.6" svelte: "npm:^4.2.19" @@ -26291,7 +26403,7 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.0.0, rollup@npm:^4.13.0, rollup@npm:^4.18.0": +"rollup@npm:^4.13.0, rollup@npm:^4.18.0": version: 4.18.0 resolution: "rollup@npm:4.18.0" dependencies: @@ -26417,6 +26529,69 @@ __metadata: languageName: node linkType: hard +"rollup@npm:^4.22.4": + version: 4.22.4 + resolution: "rollup@npm:4.22.4" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.22.4" + "@rollup/rollup-android-arm64": "npm:4.22.4" + "@rollup/rollup-darwin-arm64": "npm:4.22.4" + "@rollup/rollup-darwin-x64": "npm:4.22.4" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.22.4" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.22.4" + "@rollup/rollup-linux-arm64-gnu": "npm:4.22.4" + "@rollup/rollup-linux-arm64-musl": "npm:4.22.4" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.22.4" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.22.4" + "@rollup/rollup-linux-s390x-gnu": "npm:4.22.4" + "@rollup/rollup-linux-x64-gnu": "npm:4.22.4" + "@rollup/rollup-linux-x64-musl": "npm:4.22.4" + "@rollup/rollup-win32-arm64-msvc": "npm:4.22.4" + "@rollup/rollup-win32-ia32-msvc": "npm:4.22.4" + "@rollup/rollup-win32-x64-msvc": "npm:4.22.4" + "@types/estree": "npm:1.0.5" + fsevents: "npm:~2.3.2" + dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm-musleabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-powerpc64le-gnu": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-s390x-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 10/0fbee8c14d9052624c76a09fe79ed4d46024832be3ceea86c69f1521ae84b581a64c6e6596fdd796030c206835987e1a0a3be85f4c0d35b71400be5dce799d12 + languageName: node + linkType: hard + "rrweb-cssom@npm:^0.6.0": version: 0.6.0 resolution: "rrweb-cssom@npm:0.6.0" From 1a570555372e702d37e58ae79ce1d110bfbee9f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:57:12 +0200 Subject: [PATCH 54/65] build(deps): bump vite from 5.2.11 to 5.4.8 (#5471) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.11 to 5.4.8. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.8/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.8/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0841c728b4..6600391614 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30237,8 +30237,8 @@ __metadata: linkType: hard "vite@npm:^5.0.0, vite@npm:^5.3.6": - version: 5.4.6 - resolution: "vite@npm:5.4.6" + version: 5.4.8 + resolution: "vite@npm:5.4.8" dependencies: esbuild: "npm:^0.21.3" fsevents: "npm:~2.3.3" @@ -30275,7 +30275,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10/8489fa55c48675fc12b64bf7af58b5e2f8a11b2aebc63cb177861bd53dc196d7c496d6918f5a8c48828f51b6fe498166a1a2350334bbfaae10d015a0c71f1c77 + checksum: 10/17fdffa558abaf854f04ead7d3ddd76e4556a59871f9ac63cca3fc20a79979984837d8dddaae4b171e3d73061f781e4eec0f6d3babdbce2b4d111d29cf474c1c languageName: node linkType: hard From c952609509e923d89bea8982bda21f21d97db986 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:56:39 +0200 Subject: [PATCH 55/65] build(deps): bump docker/build-push-action from 6.7.0 to 6.8.0 (#5477) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.7.0 to 6.8.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/5cd11c3a4ced054e52742c5fd54dca954e0edd85...32945a339266b759abcbdc89316275140b0fc960) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/companion-deploy.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/companion-deploy.yml b/.github/workflows/companion-deploy.yml index 5046f82a6a..48dacaeeae 100644 --- a/.github/workflows/companion-deploy.yml +++ b/.github/workflows/companion-deploy.yml @@ -63,7 +63,7 @@ jobs: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} - name: Build and push - uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 + uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960 # v6.8.0 with: push: true context: . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a681e7c5d..ef08ef6a0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -159,7 +159,7 @@ jobs: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} - name: Build and push - uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 + uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960 # v6.8.0 with: push: true context: . From 20291e19e8becf523aa317ba2f33387f79ec086b Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Mon, 30 Sep 2024 11:22:38 +0200 Subject: [PATCH 56/65] @uppy/transloadit: fix multiple upload batches & run again (#5478) * @uppy/transloadit: fix multiple upload batchs & run again * Remove console.log --- packages/@uppy/core/src/Uppy.ts | 5 +++++ packages/@uppy/transloadit/src/index.ts | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/@uppy/core/src/Uppy.ts b/packages/@uppy/core/src/Uppy.ts index 0440e22cec..f8e25e538e 100644 --- a/packages/@uppy/core/src/Uppy.ts +++ b/packages/@uppy/core/src/Uppy.ts @@ -639,6 +639,11 @@ export class Uppy< ...files[fileID].progress, ...defaultProgress, }, + // @ts-expect-error these typed are inserted + // into the namespace in their respective packages + // but core isn't ware of those + tus: undefined, + transloadit: undefined, } }) diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index 2be64a103e..91b97a0bdd 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -696,12 +696,13 @@ export default class Transloadit< this.assembly = new Assembly(previousAssembly, this.#rateLimitedQueue) this.assembly.status = previousAssembly this.setPluginState({ files, results }) + return files } // Set up the Assembly instances and AssemblyWatchers for existing Assemblies. - const restoreAssemblies = () => { + const restoreAssemblies = (ids: string[]) => { this.#createAssemblyWatcher(previousAssembly.assembly_id) - this.#connectAssembly(this.assembly!) + this.#connectAssembly(this.assembly!, ids) } // Force-update Assembly to check for missed events. @@ -711,8 +712,8 @@ export default class Transloadit< // Restore all Assembly state. this.restored = (async () => { - restoreState() - restoreAssemblies() + const files = restoreState() + restoreAssemblies(Object.keys(files)) await updateAssembly() this.restored = null })() @@ -722,7 +723,7 @@ export default class Transloadit< }) } - #connectAssembly(assembly: Assembly) { + #connectAssembly(assembly: Assembly, ids: UppyFile['id'][]) { const { status } = assembly const id = status.assembly_id this.assembly = assembly @@ -754,7 +755,7 @@ export default class Transloadit< // per-file progress as well. We cannot use this here or otherwise progress from // imported files would not be counted towards the total progress because imported // files are not registered with Uppy. - for (const file of this.uppy.getFiles()) { + for (const file of this.uppy.getFilesByIds(ids)) { this.uppy.emit('postprocess-progress', file, { mode: 'determinate', value: details.progress_combined / 100, @@ -816,7 +817,7 @@ export default class Transloadit< this.uppy.emit('preprocess-complete', file) }) this.#createAssemblyWatcher(assembly.status.assembly_id) - this.#connectAssembly(assembly) + this.#connectAssembly(assembly, fileIDs) } catch (err) { fileIDs.forEach((fileID) => { const file = this.uppy.getFile(fileID) From bdc485d52753ec0bac29cfdd25c1bd824060ba20 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:32:44 +0000 Subject: [PATCH 57/65] Release: uppy@4.4.1 (#5479) | Package | Version | Package | Version | | ----------------- | ------- | ----------------- | ------- | | @uppy/core | 4.2.1 | uppy | 4.4.1 | | @uppy/transloadit | 4.1.2 | | | - @uppy/transloadit: fix multiple upload batches & run again (Merlijn Vos / #5478) - meta: build(deps): bump docker/build-push-action from 6.7.0 to 6.8.0 (dependabot[bot] / #5477) - meta: build(deps): bump vite from 5.2.11 to 5.4.8 (dependabot[bot] / #5471) - @uppy/svelte: build(deps-dev): bump rollup from 4.18.0 to 4.22.4 (dependabot[bot] / #5470) - meta: build(deps): bump vite from 5.2.11 to 5.4.6 (dependabot[bot] / #5466) --- BUNDLE-README.md | 2 +- CHANGELOG.md | 16 ++++++++++++++++ README.md | 6 +++--- examples/cdn-example/index.html | 4 ++-- examples/uppy-with-companion/client/index.html | 4 ++-- packages/@uppy/core/package.json | 2 +- packages/@uppy/transloadit/CHANGELOG.md | 7 +++++++ packages/@uppy/transloadit/package.json | 2 +- packages/uppy/package.json | 2 +- 9 files changed, 34 insertions(+), 11 deletions(-) diff --git a/BUNDLE-README.md b/BUNDLE-README.md index 70d51edab3..e16ca46dde 100644 --- a/BUNDLE-README.md +++ b/BUNDLE-README.md @@ -2,7 +2,7 @@ Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can use this from a CDN -(``) +(``) or bundle it with your webapp. Note that the recommended way to use Uppy is to install it with yarn/npm and use diff --git a/CHANGELOG.md b/CHANGELOG.md index 15ccb14add..a46debf337 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,22 @@ Please add your entries in this format: In the current stage we aim to release a new version at least every month. +## 4.4.1 + +Released: 2024-09-30 + +| Package | Version | Package | Version | +| ----------------- | ------- | ----------------- | ------- | +| @uppy/core | 4.2.1 | uppy | 4.4.1 | +| @uppy/transloadit | 4.1.2 | | | + +- @uppy/transloadit: fix multiple upload batches & run again (Merlijn Vos / #5478) +- meta: build(deps): bump docker/build-push-action from 6.7.0 to 6.8.0 (dependabot[bot] / #5477) +- meta: build(deps): bump vite from 5.2.11 to 5.4.8 (dependabot[bot] / #5471) +- @uppy/svelte: build(deps-dev): bump rollup from 4.18.0 to 4.22.4 (dependabot[bot] / #5470) +- meta: build(deps): bump vite from 5.2.11 to 5.4.6 (dependabot[bot] / #5466) + + ## 4.4.0 Released: 2024-09-20 diff --git a/README.md b/README.md index 2b828250e1..6eaaab3ab2 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ npm install @uppy/core @uppy/dashboard @uppy/tus ``` Add CSS -[uppy.min.css](https://releases.transloadit.com/uppy/v4.4.0/uppy.min.css), +[uppy.min.css](https://releases.transloadit.com/uppy/v4.4.1/uppy.min.css), either to your HTML page’s `` or include in JS, if your bundler of choice supports it. @@ -101,7 +101,7 @@ CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object. ```html @@ -112,7 +112,7 @@ CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object. Uppy, Dashboard, Tus, - } from 'https://releases.transloadit.com/uppy/v4.4.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.4.1/uppy.min.mjs' const uppy = new Uppy() uppy.use(Dashboard, { target: '#files-drag-drop' }) diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html index 44368ef8ac..5c2a60381f 100644 --- a/examples/cdn-example/index.html +++ b/examples/cdn-example/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Dashboard, Webcam, Tus, - } from 'https://releases.transloadit.com/uppy/v4.4.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.4.1/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/examples/uppy-with-companion/client/index.html b/examples/uppy-with-companion/client/index.html index b26ce2113f..6cf3673beb 100644 --- a/examples/uppy-with-companion/client/index.html +++ b/examples/uppy-with-companion/client/index.html @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ Instagram, GoogleDrive, Tus, - } from 'https://releases.transloadit.com/uppy/v4.4.0/uppy.min.mjs' + } from 'https://releases.transloadit.com/uppy/v4.4.1/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) diff --git a/packages/@uppy/core/package.json b/packages/@uppy/core/package.json index 0b2635020f..ac38e1bc84 100644 --- a/packages/@uppy/core/package.json +++ b/packages/@uppy/core/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/core", "description": "Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.2.0", + "version": "4.2.1", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/transloadit/CHANGELOG.md b/packages/@uppy/transloadit/CHANGELOG.md index 68e09fb49e..02352d2b3d 100644 --- a/packages/@uppy/transloadit/CHANGELOG.md +++ b/packages/@uppy/transloadit/CHANGELOG.md @@ -1,5 +1,12 @@ # @uppy/transloadit +## 4.1.2 + +Released: 2024-09-30 +Included in: Uppy v4.4.1 + +- @uppy/transloadit: fix multiple upload batches & run again (Merlijn Vos / #5478) + ## 4.1.0 Released: 2024-08-20 diff --git a/packages/@uppy/transloadit/package.json b/packages/@uppy/transloadit/package.json index 7766af1495..8ee9895ef8 100644 --- a/packages/@uppy/transloadit/package.json +++ b/packages/@uppy/transloadit/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/transloadit", "description": "The Transloadit plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and more", - "version": "4.1.1", + "version": "4.1.2", "license": "MIT", "main": "lib/index.js", "type": "module", diff --git a/packages/uppy/package.json b/packages/uppy/package.json index b01faa4ec5..3dfe88cd95 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,7 +1,7 @@ { "name": "uppy", "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "4.4.0", + "version": "4.4.1", "license": "MIT", "main": "lib/index.js", "module": "lib/index.js", From 8ff9039d6a60885ad1dcf9a9d64f3c8535dba9b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:50:21 +0200 Subject: [PATCH 58/65] build(deps): bump docker/build-push-action from 6.8.0 to 6.9.0 (#5483) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.8.0 to 6.9.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/32945a339266b759abcbdc89316275140b0fc960...4f58ea79222b3b9dc2c8bbdd6debcef730109a75) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/companion-deploy.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/companion-deploy.yml b/.github/workflows/companion-deploy.yml index 48dacaeeae..debc6b18a5 100644 --- a/.github/workflows/companion-deploy.yml +++ b/.github/workflows/companion-deploy.yml @@ -63,7 +63,7 @@ jobs: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} - name: Build and push - uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960 # v6.8.0 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: push: true context: . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef08ef6a0f..7aa5390f84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -159,7 +159,7 @@ jobs: username: ${{secrets.DOCKER_USERNAME}} password: ${{secrets.DOCKER_PASSWORD}} - name: Build and push - uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960 # v6.8.0 + uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: push: true context: . From 73224133941b8f1911d8b74e9d881d9d1bfd303c Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Mon, 7 Oct 2024 13:35:18 +0200 Subject: [PATCH 59/65] Fix redis emitter (#5474) * fix redis emitter it had multiple issues: - memory leak in removeAllListeners - eventName === 'error' wasn't consistently handled * rename and add comment --- .../src/server/emitter/redis-emitter.js | 130 ++++++++++-------- 1 file changed, 76 insertions(+), 54 deletions(-) diff --git a/packages/@uppy/companion/src/server/emitter/redis-emitter.js b/packages/@uppy/companion/src/server/emitter/redis-emitter.js index aa62f61baf..0aa145432b 100644 --- a/packages/@uppy/companion/src/server/emitter/redis-emitter.js +++ b/packages/@uppy/companion/src/server/emitter/redis-emitter.js @@ -20,54 +20,69 @@ function replacer(key, value) { module.exports = (redisClient, redisPubSubScope) => { const prefix = redisPubSubScope ? `${redisPubSubScope}:` : '' const getPrefixedEventName = (eventName) => `${prefix}${eventName}` - const publisher = redisClient.duplicate({ lazyConnect: true }) - publisher.on('error', err => logger.error('publisher redis error', err.toString())) - /** @type {import('ioredis').Redis} */ - let subscriber - - const connectedPromise = publisher.connect().then(() => { - subscriber = publisher.duplicate() - subscriber.on('error', err => logger.error('subscriber redis error', err.toString())) - return subscriber.connect() - }) - - const handlersByEvent = new Map() const errorEmitter = new EventEmitter() const handleError = (err) => errorEmitter.emit('error', err) - connectedPromise.catch((err) => handleError(err)) + async function makeRedis() { + const publisher = redisClient.duplicate({ lazyConnect: true }) + publisher.on('error', err => logger.error('publisher redis error', err.toString())) + const subscriber = publisher.duplicate() + subscriber.on('error', err => logger.error('subscriber redis error', err.toString())) + await publisher.connect() + await subscriber.connect() + return { subscriber, publisher } + } + + const redisPromise = makeRedis() + redisPromise.catch((err) => handleError(err)) + /** + * + * @param {(a: Awaited) => void} fn + */ async function runWhenConnected (fn) { try { - await connectedPromise - await fn() + await fn(await redisPromise) } catch (err) { handleError(err) } } + // because each event can have multiple listeners, we need to keep track of them + /** @type {Map unknown, () => unknown>>} */ + const handlersByEventName = new Map() + /** * Remove an event listener * * @param {string} eventName name of the event * @param {any} handler the handler of the event to remove */ - function removeListener (eventName, handler) { - if (eventName === 'error') return errorEmitter.removeListener('error', handler) + async function removeListener (eventName, handler) { + if (eventName === 'error') { + errorEmitter.removeListener('error', handler) + return + } - return runWhenConnected(() => { - const handlersByThisEventName = handlersByEvent.get(eventName) - if (handlersByThisEventName == null) return undefined + const actualHandlerByHandler = handlersByEventName.get(eventName) + if (actualHandlerByHandler == null) return - const actualHandler = handlersByThisEventName.get(handler) - if (actualHandler == null) return undefined + const actualHandler = actualHandlerByHandler.get(handler) + if (actualHandler == null) return - handlersByThisEventName.delete(handler) - if (handlersByThisEventName.size === 0) handlersByEvent.delete(eventName) + actualHandlerByHandler.delete(handler) + const didRemoveLastListener = actualHandlerByHandler.size === 0 + if (didRemoveLastListener) { + handlersByEventName.delete(eventName) + } + + await runWhenConnected(async ({ subscriber }) => { subscriber.off('pmessage', actualHandler) - return subscriber.punsubscribe(getPrefixedEventName(eventName)) + if (didRemoveLastListener) { + await subscriber.punsubscribe(getPrefixedEventName(eventName)) + } }) } @@ -77,7 +92,13 @@ module.exports = (redisClient, redisPubSubScope) => { * @param {*} handler * @param {*} _once */ - function addListener (eventName, handler, _once = false) { + async function addListener (eventName, handler, _once = false) { + if (eventName === 'error') { + if (_once) errorEmitter.once('error', handler) + else errorEmitter.addListener('error', handler) + return + } + function actualHandler (pattern, channel, message) { if (pattern !== getPrefixedEventName(eventName)) { return @@ -91,19 +112,20 @@ module.exports = (redisClient, redisPubSubScope) => { handleError(new Error(`Invalid JSON received! Channel: ${eventName} Message: ${message}`)) return } + handler(...args) } - let handlersByThisEventName = handlersByEvent.get(eventName) - if (handlersByThisEventName == null) { - handlersByThisEventName = new WeakMap() - handlersByEvent.set(eventName, handlersByThisEventName) + let actualHandlerByHandler = handlersByEventName.get(eventName) + if (actualHandlerByHandler == null) { + actualHandlerByHandler = new Map() + handlersByEventName.set(eventName, actualHandlerByHandler) } - handlersByThisEventName.set(handler, actualHandler) + actualHandlerByHandler.set(handler, actualHandler) - runWhenConnected(() => { + await runWhenConnected(async ({ subscriber }) => { subscriber.on('pmessage', actualHandler) - return subscriber.psubscribe(getPrefixedEventName(eventName)) + await subscriber.psubscribe(getPrefixedEventName(eventName)) }) } @@ -113,10 +135,8 @@ module.exports = (redisClient, redisPubSubScope) => { * @param {string} eventName name of the event * @param {any} handler the handler of the event */ - function on (eventName, handler) { - if (eventName === 'error') return errorEmitter.on('error', handler) - - return addListener(eventName, handler) + async function on (eventName, handler) { + await addListener(eventName, handler) } /** @@ -125,8 +145,8 @@ module.exports = (redisClient, redisPubSubScope) => { * @param {string} eventName name of the event * @param {any} handler the handler of the event */ - function off (eventName, handler) { - return removeListener(eventName, handler) + async function off (eventName, handler) { + await removeListener(eventName, handler) } /** @@ -135,10 +155,8 @@ module.exports = (redisClient, redisPubSubScope) => { * @param {string} eventName name of the event * @param {any} handler the handler of the event */ - function once (eventName, handler) { - if (eventName === 'error') return errorEmitter.once('error', handler) - - return addListener(eventName, handler, true) + async function once (eventName, handler) { + await addListener(eventName, handler, true) } /** @@ -146,11 +164,10 @@ module.exports = (redisClient, redisPubSubScope) => { * * @param {string} eventName name of the event */ - function emit (eventName, ...args) { - runWhenConnected( - () => publisher.publish(getPrefixedEventName(eventName), - safeStringify(args, replacer)), - ) + async function emit (eventName, ...args) { + await runWhenConnected(async ({ publisher }) => ( + publisher.publish(getPrefixedEventName(eventName), safeStringify(args, replacer)) + )) } /** @@ -158,13 +175,18 @@ module.exports = (redisClient, redisPubSubScope) => { * * @param {string} eventName name of the event */ - function removeAllListeners (eventName) { - if (eventName === 'error') return errorEmitter.removeAllListeners(eventName) + async function removeAllListeners (eventName) { + if (eventName === 'error') { + errorEmitter.removeAllListeners(eventName) + return + } - return runWhenConnected(() => { - handlersByEvent.delete(eventName) - return subscriber.punsubscribe(getPrefixedEventName(eventName)) - }) + const actualHandlerByHandler = handlersByEventName.get(eventName) + if (actualHandlerByHandler != null) { + for (const handler of actualHandlerByHandler.keys()) { + await removeListener(eventName, handler) + } + } } return { From 6b2fe32838ce2aa2933318166b85ccc1203138bf Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 15 Oct 2024 09:36:08 +0200 Subject: [PATCH 60/65] tus: Avoid duplicate `upload-error` event (#5485) Fixes https://github.com/transloadit/uppy/issues/5473. --- packages/@uppy/tus/src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/@uppy/tus/src/index.ts b/packages/@uppy/tus/src/index.ts index 513cfa60e4..bdde8644e3 100644 --- a/packages/@uppy/tus/src/index.ts +++ b/packages/@uppy/tus/src/index.ts @@ -289,7 +289,6 @@ export default class Tus extends BasePlugin< this.resetUploaderReferences(file.id) queuedRequest?.abort() - this.uppy.emit('upload-error', file, err) if (typeof opts.onError === 'function') { opts.onError(err) } From 75edb512b9d72cec0a6dbb02e29ae4680c84f75b Mon Sep 17 00:00:00 2001 From: Caleb Hardin <79465282+chardin1@users.noreply.github.com> Date: Tue, 15 Oct 2024 03:52:57 -0400 Subject: [PATCH 61/65] @uppy/xhr-upload: add response to upload-error callback (#5486) Add response to upload-error callback Co-authored-by: Caleb Hardin --- packages/@uppy/xhr-upload/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@uppy/xhr-upload/src/index.ts b/packages/@uppy/xhr-upload/src/index.ts index 14ea0eccf8..1ad2ed7755 100644 --- a/packages/@uppy/xhr-upload/src/index.ts +++ b/packages/@uppy/xhr-upload/src/index.ts @@ -262,6 +262,7 @@ export default class XHRUpload< 'upload-error', file, buildResponseError(request, error), + request, ) } } From e6b5cb897b2f89c8b8e52ca84e119cb48a5f511d Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Tue, 15 Oct 2024 09:58:14 +0200 Subject: [PATCH 62/65] @uppy/svelte: use SvelteKit as the build tool (#5484) --- .eslintrc.js | 8 + .gitignore | 2 + package.json | 2 +- packages/@uppy/svelte/.gitignore | 2 + packages/@uppy/svelte/package.json | 69 ++-- packages/@uppy/svelte/rollup.config.js | 33 -- .../src/components/DashboardModal.svelte | 54 --- .../svelte/src/components/DragDrop.svelte | 39 -- .../src/{ => lib}/components/Dashboard.svelte | 30 +- .../src/lib/components/DashboardModal.svelte | 58 +++ .../svelte/src/lib/components/DragDrop.svelte | 43 ++ .../{ => lib}/components/ProgressBar.svelte | 30 +- .../src/{ => lib}/components/StatusBar.svelte | 30 +- packages/@uppy/svelte/src/{ => lib}/index.ts | 0 packages/@uppy/svelte/svelte.config.js | 20 + packages/@uppy/svelte/tsconfig.json | 23 +- packages/@uppy/svelte/typings/index.d.ts | 5 - packages/@uppy/svelte/vite.config.js | 8 + yarn.lock | 380 ++++-------------- 19 files changed, 328 insertions(+), 508 deletions(-) delete mode 100644 packages/@uppy/svelte/rollup.config.js delete mode 100644 packages/@uppy/svelte/src/components/DashboardModal.svelte delete mode 100644 packages/@uppy/svelte/src/components/DragDrop.svelte rename packages/@uppy/svelte/src/{ => lib}/components/Dashboard.svelte (52%) create mode 100644 packages/@uppy/svelte/src/lib/components/DashboardModal.svelte create mode 100644 packages/@uppy/svelte/src/lib/components/DragDrop.svelte rename packages/@uppy/svelte/src/{ => lib}/components/ProgressBar.svelte (51%) rename packages/@uppy/svelte/src/{ => lib}/components/StatusBar.svelte (51%) rename packages/@uppy/svelte/src/{ => lib}/index.ts (100%) create mode 100644 packages/@uppy/svelte/svelte.config.js delete mode 100644 packages/@uppy/svelte/typings/index.d.ts create mode 100644 packages/@uppy/svelte/vite.config.js diff --git a/.eslintrc.js b/.eslintrc.js index 367b80a878..b6dcece1e8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -500,6 +500,14 @@ module.exports = { 'no-unused-vars': 'off', }, }, + { + files: [ + 'packages/@uppy/svelte/**', + ], + parserOptions: { + sourceType: 'module', + }, + }, { files: ['e2e/**/*.ts'], extends: ['plugin:cypress/recommended'], diff --git a/.gitignore b/.gitignore index 8abab34b11..a158168623 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,8 @@ tsconfig.build.tsbuildinfo dist/ lib/ +# @uppy/svelte needs lib inside src +!src/lib coverage/ examples/dev/bundle.js examples/aws-php/vendor/* diff --git a/package.json b/package.json index 630076cb4f..39d067e66a 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "build:angular": "yarn workspace angular build", "build:js:typeless": "npm-run-all build:lib build:companion build:svelte", "build:js": "npm-run-all build:js:typeless build:locale-pack build:angular build:bundle", - "build:ts": "yarn workspaces list --no-private --json | yarn tsc -b && yarn workspace @uppy/svelte validate", + "build:ts": "yarn workspaces list --no-private --json | yarn tsc -b && yarn workspace @uppy/svelte check", "build:lib": "yarn node ./bin/build-lib.js", "build:locale-pack": "yarn workspace @uppy-dev/locale-pack build && eslint packages/@uppy/locales/src/en_US.ts --fix && yarn workspace @uppy-dev/locale-pack test unused", "build": "npm-run-all --serial build:ts --parallel build:js build:css --serial size", diff --git a/packages/@uppy/svelte/.gitignore b/packages/@uppy/svelte/.gitignore index 0aac31a3a0..2a53a910ea 100644 --- a/packages/@uppy/svelte/.gitignore +++ b/packages/@uppy/svelte/.gitignore @@ -1,3 +1,5 @@ .DS_Store /dist/ /src/empty.* +.svelte-kit +!src/lib diff --git a/packages/@uppy/svelte/package.json b/packages/@uppy/svelte/package.json index b8d072835e..2461b35612 100644 --- a/packages/@uppy/svelte/package.json +++ b/packages/@uppy/svelte/package.json @@ -1,20 +1,11 @@ { "name": "@uppy/svelte", + "version": "4.0.2", "description": "Uppy plugin that helps integrate Uppy into your Svelte project.", "type": "module", - "version": "4.0.2", - "scripts": { - "build": "rollup -c", - "prepublishOnly": "yarn run build", - "validate": "svelte-check" - }, - "exports": { - ".": { - "types": "./lib/index.d.ts", - "svelte": "./lib/index.js" - }, - "./package.json": "./package.json" - }, + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "main": "./dist/index.js", "homepage": "https://uppy.io", "bugs": { "url": "https://github.com/transloadit/uppy/issues" @@ -23,18 +14,37 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, - "dependencies": { - "@uppy/utils": "workspace:^" + "keywords": [ + "file uploader", + "uppy", + "uppy-plugin", + "svelte" + ], + "files": [ + "src", + "dist" + ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + }, + "scripts": { + "build": "svelte-kit sync && svelte-package", + "prepublishOnly": "yarn run package", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "devDependencies": { - "@rollup/plugin-node-resolve": "^13.0.0", - "@tsconfig/svelte": "^5.0.0", - "rollup": "^4.22.4", - "rollup-plugin-svelte": "^7.0.0", - "rollup-plugin-svelte-types": "^1.0.6", - "svelte": "^4.2.19", - "svelte-check": "^3.0.0", - "svelte-preprocess": "^5.0.0" + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/package": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "vite": "^5.0.11" }, "peerDependencies": { "@uppy/core": "workspace:^", @@ -46,16 +56,5 @@ }, "publishConfig": { "access": "public" - }, - "keywords": [ - "file uploader", - "uppy", - "uppy-plugin", - "svelte" - ], - "files": [ - "src", - "lib", - "typings" - ] + } } diff --git a/packages/@uppy/svelte/rollup.config.js b/packages/@uppy/svelte/rollup.config.js deleted file mode 100644 index 8262aba5e9..0000000000 --- a/packages/@uppy/svelte/rollup.config.js +++ /dev/null @@ -1,33 +0,0 @@ -import svelte from 'rollup-plugin-svelte' -import resolve from '@rollup/plugin-node-resolve' -import preprocess from 'svelte-preprocess' -import svelteDts from 'rollup-plugin-svelte-types'; - -export default { - external: [ - /^@uppy\//, - /node_modules/, - ], - input: 'src/index.ts', - output: [ - { - file: 'lib/index.js', - format: 'es', - sourcemap: 'inline', - }, - ], - plugins: [ - svelte({ - include: 'src/**/*.svelte', - preprocess: preprocess(), - }), - resolve({ - browser: true, - exportConditions: ['svelte'], - extensions: ['.svelte'] - }), - svelteDts.default({ - declarationDir: './lib/' - }) - ], -} diff --git a/packages/@uppy/svelte/src/components/DashboardModal.svelte b/packages/@uppy/svelte/src/components/DashboardModal.svelte deleted file mode 100644 index 21fae02514..0000000000 --- a/packages/@uppy/svelte/src/components/DashboardModal.svelte +++ /dev/null @@ -1,54 +0,0 @@ - -
\ No newline at end of file diff --git a/packages/@uppy/svelte/src/components/DragDrop.svelte b/packages/@uppy/svelte/src/components/DragDrop.svelte deleted file mode 100644 index 2292446352..0000000000 --- a/packages/@uppy/svelte/src/components/DragDrop.svelte +++ /dev/null @@ -1,39 +0,0 @@ - -
diff --git a/packages/@uppy/svelte/src/components/Dashboard.svelte b/packages/@uppy/svelte/src/lib/components/Dashboard.svelte similarity index 52% rename from packages/@uppy/svelte/src/components/Dashboard.svelte rename to packages/@uppy/svelte/src/lib/components/Dashboard.svelte index 0974beab84..64befbddfb 100644 --- a/packages/@uppy/svelte/src/components/Dashboard.svelte +++ b/packages/@uppy/svelte/src/lib/components/Dashboard.svelte @@ -1,14 +1,17 @@ - -
\ No newline at end of file + +
diff --git a/packages/@uppy/svelte/src/lib/components/DashboardModal.svelte b/packages/@uppy/svelte/src/lib/components/DashboardModal.svelte new file mode 100644 index 0000000000..0dd57dc280 --- /dev/null +++ b/packages/@uppy/svelte/src/lib/components/DashboardModal.svelte @@ -0,0 +1,58 @@ + + +
diff --git a/packages/@uppy/svelte/src/lib/components/DragDrop.svelte b/packages/@uppy/svelte/src/lib/components/DragDrop.svelte new file mode 100644 index 0000000000..3e116b0e4d --- /dev/null +++ b/packages/@uppy/svelte/src/lib/components/DragDrop.svelte @@ -0,0 +1,43 @@ + + +
diff --git a/packages/@uppy/svelte/src/components/ProgressBar.svelte b/packages/@uppy/svelte/src/lib/components/ProgressBar.svelte similarity index 51% rename from packages/@uppy/svelte/src/components/ProgressBar.svelte rename to packages/@uppy/svelte/src/lib/components/ProgressBar.svelte index 701eb31223..68287980b0 100644 --- a/packages/@uppy/svelte/src/components/ProgressBar.svelte +++ b/packages/@uppy/svelte/src/lib/components/ProgressBar.svelte @@ -1,27 +1,30 @@ - -
\ No newline at end of file + +
diff --git a/packages/@uppy/svelte/src/components/StatusBar.svelte b/packages/@uppy/svelte/src/lib/components/StatusBar.svelte similarity index 51% rename from packages/@uppy/svelte/src/components/StatusBar.svelte rename to packages/@uppy/svelte/src/lib/components/StatusBar.svelte index e7ae6ee277..b217ca37db 100644 --- a/packages/@uppy/svelte/src/components/StatusBar.svelte +++ b/packages/@uppy/svelte/src/lib/components/StatusBar.svelte @@ -1,27 +1,30 @@ - -
\ No newline at end of file + +
diff --git a/packages/@uppy/svelte/src/index.ts b/packages/@uppy/svelte/src/lib/index.ts similarity index 100% rename from packages/@uppy/svelte/src/index.ts rename to packages/@uppy/svelte/src/lib/index.ts diff --git a/packages/@uppy/svelte/svelte.config.js b/packages/@uppy/svelte/svelte.config.js new file mode 100644 index 0000000000..4698292e1e --- /dev/null +++ b/packages/@uppy/svelte/svelte.config.js @@ -0,0 +1,20 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import adapter from '@sveltejs/adapter-auto' +// eslint-disable-next-line import/no-unresolved +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter(), + }, +} + +export default config diff --git a/packages/@uppy/svelte/tsconfig.json b/packages/@uppy/svelte/tsconfig.json index 309b580c81..b8bfd5859b 100644 --- a/packages/@uppy/svelte/tsconfig.json +++ b/packages/@uppy/svelte/tsconfig.json @@ -1,14 +1,17 @@ { - "extends": [ - "../../../tsconfig.shared.json", - "@tsconfig/svelte/tsconfig.json", - ], + "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { - "noEmit": true, - "emitDeclarationOnly": false, - "rootDir": "./src", - "outDir": "./lib", + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", }, - "include": ["./src/**/*.*", "./typings/index.d.ts"], - "exclude": ["node_modules/*"], + "include": ["./package.json", "./src/**/*.*"], + "exclude": ["node_modules/*", "./src/lib/empty.ts"], } diff --git a/packages/@uppy/svelte/typings/index.d.ts b/packages/@uppy/svelte/typings/index.d.ts deleted file mode 100644 index 0cce06400e..0000000000 --- a/packages/@uppy/svelte/typings/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module '*.svelte' { - import { SvelteComponent } from 'svelte' - - export default class extends SvelteComponent {} -} diff --git a/packages/@uppy/svelte/vite.config.js b/packages/@uppy/svelte/vite.config.js new file mode 100644 index 0000000000..67c0dad1bd --- /dev/null +++ b/packages/@uppy/svelte/vite.config.js @@ -0,0 +1,8 @@ +// eslint-disable-next-line import/no-unresolved +import { sveltekit } from '@sveltejs/kit/vite' +// eslint-disable-next-line import/no-extraneous-dependencies +import { defineConfig } from 'vite' + +export default defineConfig({ + plugins: [sveltekit()], +}) diff --git a/yarn.lock b/yarn.lock index 6600391614..320b5325a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5910,22 +5910,6 @@ __metadata: languageName: node linkType: hard -"@rollup/plugin-node-resolve@npm:^13.0.0": - version: 13.3.0 - resolution: "@rollup/plugin-node-resolve@npm:13.3.0" - dependencies: - "@rollup/pluginutils": "npm:^3.1.0" - "@types/resolve": "npm:1.17.1" - deepmerge: "npm:^4.2.2" - is-builtin-module: "npm:^3.1.0" - is-module: "npm:^1.0.0" - resolve: "npm:^1.19.0" - peerDependencies: - rollup: ^2.42.0 - checksum: 10/f1165e68c05d3bb22d56c73b258368bfa1d724e53d195f71c316cee6d6ba67995b89057cdf2140f28337510a893839bce90dcf8385c653d8871d650392027dc4 - languageName: node - linkType: hard - "@rollup/plugin-node-resolve@npm:^15.2.3": version: 15.2.3 resolution: "@rollup/plugin-node-resolve@npm:15.2.3" @@ -5945,29 +5929,6 @@ __metadata: languageName: node linkType: hard -"@rollup/pluginutils@npm:^3.1.0": - version: 3.1.0 - resolution: "@rollup/pluginutils@npm:3.1.0" - dependencies: - "@types/estree": "npm:0.0.39" - estree-walker: "npm:^1.0.1" - picomatch: "npm:^2.2.2" - peerDependencies: - rollup: ^1.20.0||^2.0.0 - checksum: 10/3b69f02893eea42455fb97b81f612ac6bfadf94ac73bebd481ea13e90a693eef52c163210a095b12e574a25603af5e55f86a020889019167f331aa8dd3ff30e0 - languageName: node - linkType: hard - -"@rollup/pluginutils@npm:^4.1.0": - version: 4.2.1 - resolution: "@rollup/pluginutils@npm:4.2.1" - dependencies: - estree-walker: "npm:^2.0.1" - picomatch: "npm:^2.2.2" - checksum: 10/503a6f0a449e11a2873ac66cfdfb9a3a0b77ffa84c5cad631f5e4bc1063c850710e8d5cd5dab52477c0d66cda2ec719865726dbe753318cd640bab3fff7ca476 - languageName: node - linkType: hard - "@rollup/pluginutils@npm:^5.0.1, @rollup/pluginutils@npm:^5.1.0": version: 5.1.0 resolution: "@rollup/pluginutils@npm:5.1.0" @@ -5998,13 +5959,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.22.4" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - "@rollup/rollup-android-arm64@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-android-arm64@npm:4.18.0" @@ -6019,13 +5973,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-android-arm64@npm:4.22.4" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - "@rollup/rollup-darwin-arm64@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-darwin-arm64@npm:4.18.0" @@ -6040,13 +5987,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-darwin-arm64@npm:4.22.4" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@rollup/rollup-darwin-x64@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-darwin-x64@npm:4.18.0" @@ -6061,13 +6001,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-darwin-x64@npm:4.22.4" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.0" @@ -6082,13 +6015,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.22.4" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-arm-musleabihf@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.18.0" @@ -6103,13 +6029,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.22.4" - conditions: os=linux & cpu=arm & libc=musl - languageName: node - linkType: hard - "@rollup/rollup-linux-arm64-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.18.0" @@ -6124,13 +6043,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.22.4" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-arm64-musl@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-arm64-musl@npm:4.18.0" @@ -6145,13 +6057,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.22.4" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.0" @@ -6166,13 +6071,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.4" - conditions: os=linux & cpu=ppc64 & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-riscv64-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.18.0" @@ -6187,13 +6085,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.22.4" - conditions: os=linux & cpu=riscv64 & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-s390x-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.18.0" @@ -6208,13 +6099,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.22.4" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-x64-gnu@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-x64-gnu@npm:4.18.0" @@ -6229,13 +6113,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.22.4" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - "@rollup/rollup-linux-x64-musl@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-linux-x64-musl@npm:4.18.0" @@ -6250,13 +6127,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.22.4" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - "@rollup/rollup-win32-arm64-msvc@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.18.0" @@ -6271,13 +6141,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.22.4" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - "@rollup/rollup-win32-ia32-msvc@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.18.0" @@ -6292,13 +6155,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.22.4" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "@rollup/rollup-win32-x64-msvc@npm:4.18.0": version: 4.18.0 resolution: "@rollup/rollup-win32-x64-msvc@npm:4.18.0" @@ -6313,13 +6169,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.22.4": - version: 4.22.4 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.22.4" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@rollup/wasm-node@npm:^4.18.0": version: 4.18.0 resolution: "@rollup/wasm-node@npm:4.18.0" @@ -7059,6 +6908,17 @@ __metadata: languageName: node linkType: hard +"@sveltejs/adapter-auto@npm:^3.0.0": + version: 3.2.5 + resolution: "@sveltejs/adapter-auto@npm:3.2.5" + dependencies: + import-meta-resolve: "npm:^4.1.0" + peerDependencies: + "@sveltejs/kit": ^2.0.0 + checksum: 10/c5d669e2fabd926910a35147c79ebf2548d3beb1a45535aa59ff86b8be020318de98b3ff08f487ebb6fe89b420a82164edc72d6e077ae8c73a738a9478527921 + languageName: node + linkType: hard + "@sveltejs/adapter-static@npm:^3.0.1": version: 3.0.2 resolution: "@sveltejs/adapter-static@npm:3.0.2" @@ -7094,6 +6954,23 @@ __metadata: languageName: node linkType: hard +"@sveltejs/package@npm:^2.0.0": + version: 2.3.5 + resolution: "@sveltejs/package@npm:2.3.5" + dependencies: + chokidar: "npm:^4.0.0" + kleur: "npm:^4.1.5" + sade: "npm:^1.8.1" + semver: "npm:^7.5.4" + svelte2tsx: "npm:~0.7.16" + peerDependencies: + svelte: ^3.44.0 || ^4.0.0 || ^5.0.0-next.1 + bin: + svelte-package: svelte-package.js + checksum: 10/ce2df3cda527ff461d33b55508b0e09d1e779d1b5f4a23127f7438615460333ff9153448e101c80ee32dab90c5c376dde8e78a02c6d1ee5a85ace0a76c16b66d + languageName: node + linkType: hard + "@sveltejs/vite-plugin-svelte-inspector@npm:^2.1.0": version: 2.1.0 resolution: "@sveltejs/vite-plugin-svelte-inspector@npm:2.1.0" @@ -7359,13 +7236,6 @@ __metadata: languageName: node linkType: hard -"@tsconfig/svelte@npm:^5.0.0": - version: 5.0.4 - resolution: "@tsconfig/svelte@npm:5.0.4" - checksum: 10/27b83fef6781cdc3bdee7737287d39a909b1e408e99512cfcb8a9b2ea78d5c6d98e43372c917b098692499a4aad3a151cbe6f994819d37a3f2973c46a30b38e4 - languageName: node - linkType: hard - "@tufjs/canonical-json@npm:2.0.0": version: 2.0.0 resolution: "@tufjs/canonical-json@npm:2.0.0" @@ -7580,13 +7450,6 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:0.0.39": - version: 0.0.39 - resolution: "@types/estree@npm:0.0.39" - checksum: 10/9f0f20990dbf725470564d4d815d3758ac688b790f601ea98654b6e0b9797dc3c80306fb525abdacd9e75e014e3d09ad326098eaa2ed1851e4823a8e278538aa - languageName: node - linkType: hard - "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33": version: 4.19.5 resolution: "@types/express-serve-static-core@npm:4.19.5" @@ -7917,15 +7780,6 @@ __metadata: languageName: node linkType: hard -"@types/resolve@npm:1.17.1": - version: 1.17.1 - resolution: "@types/resolve@npm:1.17.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/dc6a6df507656004e242dcb02c784479deca516d5f4b58a1707e708022b269ae147e1da0521f3e8ad0d63638869d87e0adc023f0bd5454aa6f72ac66c7525cf5 - languageName: node - linkType: hard - "@types/resolve@npm:1.20.2": version: 1.20.2 resolution: "@types/resolve@npm:1.20.2" @@ -9254,15 +9108,15 @@ __metadata: version: 0.0.0-use.local resolution: "@uppy/svelte@workspace:packages/@uppy/svelte" dependencies: - "@rollup/plugin-node-resolve": "npm:^13.0.0" - "@tsconfig/svelte": "npm:^5.0.0" - "@uppy/utils": "workspace:^" - rollup: "npm:^4.22.4" - rollup-plugin-svelte: "npm:^7.0.0" - rollup-plugin-svelte-types: "npm:^1.0.6" - svelte: "npm:^4.2.19" - svelte-check: "npm:^3.0.0" - svelte-preprocess: "npm:^5.0.0" + "@sveltejs/adapter-auto": "npm:^3.0.0" + "@sveltejs/kit": "npm:^2.0.0" + "@sveltejs/package": "npm:^2.0.0" + "@sveltejs/vite-plugin-svelte": "npm:^3.0.0" + svelte: "npm:^4.2.7" + svelte-check: "npm:^3.6.0" + tslib: "npm:^2.4.1" + typescript: "npm:^5.0.0" + vite: "npm:^5.0.11" peerDependencies: "@uppy/core": "workspace:^" "@uppy/dashboard": "workspace:^" @@ -11707,6 +11561,15 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:^4.0.0": + version: 4.0.1 + resolution: "chokidar@npm:4.0.1" + dependencies: + readdirp: "npm:^4.0.1" + checksum: 10/62749d2173a60cc5632d6c6e0b7024f33aadce47b06d02e55ad03c7b8daaaf2fc85d4296c047473d04387fd992dab9384cc5263c70a3dc3018b7ebecfb5b5217 + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -14958,14 +14821,7 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:^1.0.1": - version: 1.0.1 - resolution: "estree-walker@npm:1.0.1" - checksum: 10/1cf11a0aff7613aa765dc535ed1d83e2a1986207d2353f4795df309a2c55726de3ca4948df635c09969a739dc59e8e2d69f88d3b3d2c6dfc5701257aafd1d11b - languageName: node - linkType: hard - -"estree-walker@npm:^2.0.1, estree-walker@npm:^2.0.2": +"estree-walker@npm:^2.0.2": version: 2.0.2 resolution: "estree-walker@npm:2.0.2" checksum: 10/b02109c5d46bc2ed47de4990eef770f7457b1159a229f0999a09224d2b85ffeed2d7679cffcff90aeb4448e94b0168feb5265b209cdec29aad50a3d6e93d21e2 @@ -17646,7 +17502,7 @@ __metadata: languageName: node linkType: hard -"is-builtin-module@npm:^3.1.0, is-builtin-module@npm:^3.2.1": +"is-builtin-module@npm:^3.2.1": version: 3.2.1 resolution: "is-builtin-module@npm:3.2.1" dependencies: @@ -24012,7 +23868,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc @@ -25434,6 +25290,13 @@ __metadata: languageName: node linkType: hard +"readdirp@npm:^4.0.1": + version: 4.0.2 + resolution: "readdirp@npm:4.0.2" + checksum: 10/4ef93103307c7d5e42e78ecf201db58c984c4d66882a27c956250478b49c2444b1ff6aea8ce0f5e4157b2c07ce2fe870ad16c92ebd7c6ff30391ded6e42b9873 + languageName: node + linkType: hard + "readdirp@npm:~3.6.0": version: 3.6.0 resolution: "readdirp@npm:3.6.0" @@ -26132,7 +25995,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:1.22.8, resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.13.1, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4": +"resolve@npm:1.22.8, resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.13.1, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -26158,7 +26021,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.13.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": +"resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.13.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -26379,30 +26242,6 @@ __metadata: languageName: node linkType: hard -"rollup-plugin-svelte-types@npm:^1.0.6": - version: 1.0.6 - resolution: "rollup-plugin-svelte-types@npm:1.0.6" - dependencies: - svelte2tsx: "npm:^0.5.16" - peerDependencies: - rollup: ^2.67.1 - checksum: 10/7259754a0397421f9d066ef2bd85730874e08f60d582a1268ba048b3527f3a134b8e307a7b5ba69a96de46e4271ebf4b183cbc2b47c09e9e65e278b751fb912c - languageName: node - linkType: hard - -"rollup-plugin-svelte@npm:^7.0.0": - version: 7.2.2 - resolution: "rollup-plugin-svelte@npm:7.2.2" - dependencies: - "@rollup/pluginutils": "npm:^4.1.0" - resolve.exports: "npm:^2.0.0" - peerDependencies: - rollup: ">=2.0.0" - svelte: ">=3.5.0" - checksum: 10/7fd7077164c1004c98ed11a0697b17495673366afba083fa7bf2c106162b7e01128f773870f67bfda4eb49b53d4d6414bca97263c7c69c0f353d5746c662129a - languageName: node - linkType: hard - "rollup@npm:^4.13.0, rollup@npm:^4.18.0": version: 4.18.0 resolution: "rollup@npm:4.18.0" @@ -26529,69 +26368,6 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.22.4": - version: 4.22.4 - resolution: "rollup@npm:4.22.4" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.22.4" - "@rollup/rollup-android-arm64": "npm:4.22.4" - "@rollup/rollup-darwin-arm64": "npm:4.22.4" - "@rollup/rollup-darwin-x64": "npm:4.22.4" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.22.4" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.22.4" - "@rollup/rollup-linux-arm64-gnu": "npm:4.22.4" - "@rollup/rollup-linux-arm64-musl": "npm:4.22.4" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.22.4" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.22.4" - "@rollup/rollup-linux-s390x-gnu": "npm:4.22.4" - "@rollup/rollup-linux-x64-gnu": "npm:4.22.4" - "@rollup/rollup-linux-x64-musl": "npm:4.22.4" - "@rollup/rollup-win32-arm64-msvc": "npm:4.22.4" - "@rollup/rollup-win32-ia32-msvc": "npm:4.22.4" - "@rollup/rollup-win32-x64-msvc": "npm:4.22.4" - "@types/estree": "npm:1.0.5" - fsevents: "npm:~2.3.2" - dependenciesMeta: - "@rollup/rollup-android-arm-eabi": - optional: true - "@rollup/rollup-android-arm64": - optional: true - "@rollup/rollup-darwin-arm64": - optional: true - "@rollup/rollup-darwin-x64": - optional: true - "@rollup/rollup-linux-arm-gnueabihf": - optional: true - "@rollup/rollup-linux-arm-musleabihf": - optional: true - "@rollup/rollup-linux-arm64-gnu": - optional: true - "@rollup/rollup-linux-arm64-musl": - optional: true - "@rollup/rollup-linux-powerpc64le-gnu": - optional: true - "@rollup/rollup-linux-riscv64-gnu": - optional: true - "@rollup/rollup-linux-s390x-gnu": - optional: true - "@rollup/rollup-linux-x64-gnu": - optional: true - "@rollup/rollup-linux-x64-musl": - optional: true - "@rollup/rollup-win32-arm64-msvc": - optional: true - "@rollup/rollup-win32-ia32-msvc": - optional: true - "@rollup/rollup-win32-x64-msvc": - optional: true - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 10/0fbee8c14d9052624c76a09fe79ed4d46024832be3ceea86c69f1521ae84b581a64c6e6596fdd796030c206835987e1a0a3be85f4c0d35b71400be5dce799d12 - languageName: node - linkType: hard - "rrweb-cssom@npm:^0.6.0": version: 0.6.0 resolution: "rrweb-cssom@npm:0.6.0" @@ -28467,7 +28243,7 @@ __metadata: languageName: node linkType: hard -"svelte-check@npm:^3.0.0, svelte-check@npm:^3.6.0": +"svelte-check@npm:^3.6.0": version: 3.8.1 resolution: "svelte-check@npm:3.8.1" dependencies: @@ -28496,7 +28272,7 @@ __metadata: languageName: node linkType: hard -"svelte-preprocess@npm:^5.0.0, svelte-preprocess@npm:^5.1.3": +"svelte-preprocess@npm:^5.1.3": version: 5.1.4 resolution: "svelte-preprocess@npm:5.1.4" dependencies: @@ -28542,20 +28318,20 @@ __metadata: languageName: node linkType: hard -"svelte2tsx@npm:^0.5.16": - version: 0.5.23 - resolution: "svelte2tsx@npm:0.5.23" +"svelte2tsx@npm:~0.7.16": + version: 0.7.21 + resolution: "svelte2tsx@npm:0.7.21" dependencies: dedent-js: "npm:^1.0.1" pascal-case: "npm:^3.1.1" peerDependencies: - svelte: ^3.24 - typescript: ^4.1.2 - checksum: 10/062512c81b4d30f7877927a1d256d69664237419410441b145abef9060ba898d1e7fc82813690b8c80020a928fdb73b20382d332b40b5fb9761d8b26ae80abfc + svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 + typescript: ^4.9.4 || ^5.0.0 + checksum: 10/f33c7d1f90cf882a03f608a33dc4979d0c0e59daeed3100128bd2406f48f3ce15ef025534584ff4b951419def21a356f1bb13a5e3d1cc9400aafb4d6f7323741 languageName: node linkType: hard -"svelte@npm:^4.2.19": +"svelte@npm:^4.2.19, svelte@npm:^4.2.7": version: 4.2.19 resolution: "svelte@npm:4.2.19" dependencies: @@ -29270,6 +29046,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5.0.0": + version: 5.6.2 + resolution: "typescript@npm:5.6.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/f95365d4898f357823e93d334ecda9fcade54f009b397c7d05b7621cd9e865981033cf89ccde0f3e3a7b73b1fdbae18e92bc77db237b43e912f053fef0f9a53b + languageName: node + linkType: hard + "typescript@npm:^5.0.3": version: 5.5.2 resolution: "typescript@npm:5.5.2" @@ -29290,6 +29076,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A^5.0.0#optional!builtin": + version: 5.6.2 + resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin::version=5.6.2&hash=8c6c40" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/8bfc7ca0d9feca4c3fcbd6c70741abfcd714197d6448e68225ae71e462447d904d3bfba49759a8fbe4956d87f054e2d346833c8349c222daa594a2626d4e1be8 + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A^5.0.3#optional!builtin": version: 5.5.2 resolution: "typescript@patch:typescript@npm%3A5.5.2#optional!builtin::version=5.5.2&hash=379a07" @@ -30236,7 +30032,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.0, vite@npm:^5.3.6": +"vite@npm:^5.0.0, vite@npm:^5.0.11, vite@npm:^5.3.6": version: 5.4.8 resolution: "vite@npm:5.4.8" dependencies: From f5e0082010882724add5c7d6f6b895d7918a0ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Z=C3=A9fyx?= <113043125+zefyx@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:02:37 +0200 Subject: [PATCH 63/65] Update packages/@uppy/locales/src/fr_FR.ts (#5472) Co-authored-by: Murderlon --- packages/@uppy/locales/src/fr_FR.ts | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/packages/@uppy/locales/src/fr_FR.ts b/packages/@uppy/locales/src/fr_FR.ts index 7080d4ab2d..37804a52ab 100644 --- a/packages/@uppy/locales/src/fr_FR.ts +++ b/packages/@uppy/locales/src/fr_FR.ts @@ -12,13 +12,17 @@ const fr_FR: Locale<0 | 1> = { fr_FR.strings = { addBulkFilesFailed: { - '0': 'L’ajout de %{smart_count} fichier a échoué', - '1': 'L’ajout de %{smart_count} fichiers a échoué', + '0': 'L’ajout de %{smart_count} fichier a échoué en raison d’une erreur interne', + '1': 'L’ajout de %{smart_count} fichiers a échoué en raison d’erreurs internes', }, addedNumFiles: '%{numFiles} fichier(s) ajouté(s)', addingMoreFiles: 'Ajout de fichiers', + additionalRestrictionsFailed: + '%{count} restrictions supplémentaires n’ont pas été respectées', addMore: 'Ajouter d’autres', addMoreFiles: 'Ajouter d’autres fichiers', + aggregateExceedsSize: + 'Vous avez sélectionné %{size} de fichiers, mais la taille maximale autorisée est %{sizeAllowed}', allFilesFromFolderNamed: 'Tous les fichiers du dossier %{name}', allowAccessDescription: 'Pour prendre des photos ou enregistrer une vidéo, veuillez autoriser l’accès à votre caméra pour ce site.', @@ -29,7 +33,8 @@ fr_FR.strings = { 'Veuillez vous authentifier avec %{pluginName} pour sélectionner les fichiers', back: 'Retour', browse: 'naviguer', - browseFiles: 'naviguer', + browseFiles: 'naviguer dans les fichiers', + browseFolders: 'naviguer dans les dossiers', cancel: 'Annuler', cancelUpload: 'Annuler le téléversement', chooseFiles: 'Choisir des fichiers', @@ -71,7 +76,8 @@ fr_FR.strings = { enterCorrectUrl: 'Lien incorrect: Assurez-vous que vous entrez un lien direct vers le fichier', enterUrlToImport: 'Entrez le lien pour importer un fichier', - exceedsSize: 'Ce fichier dépasse la taille maximale autorisée de %{size}', + exceedsSize: + 'Le fichier %{file} dépasse la taille maximale autorisée de %{size}', failedToFetch: 'Companion a échoué à récupérer ce lien, assurez-vous qu’il est correct', failedToUpload: 'Le téléversement de %{file} a échoué', @@ -89,15 +95,20 @@ fr_FR.strings = { generatingThumbnails: 'Génération des vignettes…', import: 'Importer', importFrom: 'Importer de %{name}', + inferiorSize: 'Ce fichier est plus petit que la taille autorisée de %{size}', loading: 'Chargement…', logOut: 'Déconnexion', micDisabled: 'Accès au micro refusé par l’utilisateur', myDevice: 'Mon Appareil', + noCameraDescription: + 'Pour prendre des photos ou enregistrer une vidéo, veuillez connecter une caméra', noDuplicates: 'Impossible d’ajouter le fichier "%{fileName}", il existe déjà', noFilesFound: 'Vous n’avez aucun fichier ou dossier ici', noInternetConnection: 'Pas de connexion à Internet', noMoreFilesAllowed: 'Impossible d’ajouter de nouveaux fichiers: en cours de chargement ', + noSearchResults: + 'Malheureusement, il n’y a aucun résultat pour cette recherche', openFolderNamed: 'Ouvrir %{name}', pause: 'Pause', pauseUpload: 'Mettre en pause le téléversement', @@ -111,12 +122,19 @@ fr_FR.strings = { recordingLength: 'Durée d’enregistrement %{recording_length}', recordingStoppedMaxSize: 'L’enregistrement s’est arrété car la taille du fichier dépasse la limite', + recoveredAllFiles: + 'Nous avons restauré tous les fichiers. Vous pouvez maintenant reprendre le téléversement.', + recoveredXFiles: { + '0': 'Nous n’avons pas pu récupérer entièrement 1 fichier. Veuillez le resélectionner et reprendre le téléversement.', + '1': 'Nous n’avons pas pu récupérer entièrement %{smart_count} fichiers. Veuillez les resélectionner et reprendre le téléversement.', + }, removeFile: 'Effacer le fichier %{file}', resetFilter: 'Réinitialiser filtre', resume: 'Reprendre', resumeUpload: 'Reprendre le téléversement', retry: 'Réessayer', retryUpload: 'Réessayer le téléversement', + reSelect: 'Resélectionner', save: 'Sauvegarder', saveChanges: 'Sauvegarder les modifications', selectFileNamed: 'Sélectionner le fichier %{name}', @@ -124,6 +142,8 @@ fr_FR.strings = { '0': 'Sélectionner %{smart_count}', '1': 'Sélectionner %{smart_count}', }, + sessionRestored: 'Session restaurée', + signInWithGoogle: 'Se connecter avec Google', smile: 'Souriez !', startRecording: 'Commencer l’enregistrement vidéo', stopRecording: 'Arrêter l’enregistrement vidéo', From b81da5a3af1df29acc84efcb83d9c0732cbc4a27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:08:22 +0200 Subject: [PATCH 64/65] build(deps): bump @blakeembrey/template from 1.1.0 to 1.2.0 (#5448) Bumps [@blakeembrey/template](https://github.com/blakeembrey/js-template) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/blakeembrey/js-template/releases) - [Commits](https://github.com/blakeembrey/js-template/compare/v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: "@blakeembrey/template" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 320b5325a4..747d2eaf3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3094,9 +3094,9 @@ __metadata: linkType: hard "@blakeembrey/template@npm:^1.0.0": - version: 1.1.0 - resolution: "@blakeembrey/template@npm:1.1.0" - checksum: 10/994f2c5f1188880e106bfaff987513aeca6398010c9086590111281b0be5ea51ca2dc76933b4c603960831a6f1b3093366dd1939651588e78381c9a9a74bcb43 + version: 1.2.0 + resolution: "@blakeembrey/template@npm:1.2.0" + checksum: 10/f4b26d38e996d2597b3dcb9aebb774e7b70d33eaf12e417a053fd31c280f9894d9406da37eeb39dba51e9bb1bf351683d56cab35f89a41d36c4285a9b8aa99f1 languageName: node linkType: hard From 9a4b8ef4db47aa3ac6e38bb1ffb14ece68e88270 Mon Sep 17 00:00:00 2001 From: Evgenia Karunus Date: Tue, 15 Oct 2024 13:09:54 +0500 Subject: [PATCH 65/65] `.handleInputChange()` - use `.currentTarget`; clear the input using `''` (#5381) * everywhere - proper typing, `target` => `currentTarget`, `null` => `''` * everywhere - update the comment id --- packages/@uppy/dashboard/src/Dashboard.tsx | 7 +++++-- .../dashboard/src/components/AddFiles.tsx | 15 +++++++-------- packages/@uppy/drag-drop/src/DragDrop.tsx | 17 ++++++----------- packages/@uppy/file-input/src/FileInput.tsx | 18 +++++++----------- 4 files changed, 25 insertions(+), 32 deletions(-) diff --git a/packages/@uppy/dashboard/src/Dashboard.tsx b/packages/@uppy/dashboard/src/Dashboard.tsx index 108b1ae6c5..290761919f 100644 --- a/packages/@uppy/dashboard/src/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/Dashboard.tsx @@ -17,6 +17,7 @@ import toArray from '@uppy/utils/lib/toArray' import getDroppedFiles from '@uppy/utils/lib/getDroppedFiles' import { defaultPickerIcon } from '@uppy/provider-views' +import type { TargetedEvent } from 'preact/compat' import { nanoid } from 'nanoid/non-secure' import memoizeOne from 'memoize-one' import * as trapFocus from './utils/trapFocus.ts' @@ -766,9 +767,11 @@ export default class Dashboard extends UIPlugin< } } - private handleInputChange = (event: InputEvent) => { + private handleInputChange = ( + event: TargetedEvent, + ) => { event.preventDefault() - const files = toArray((event.target as HTMLInputElement).files!) + const files = toArray(event.currentTarget.files || []) if (files.length > 0) { this.uppy.log('[Dashboard] Files selected through input') this.addFiles(files) diff --git a/packages/@uppy/dashboard/src/components/AddFiles.tsx b/packages/@uppy/dashboard/src/components/AddFiles.tsx index 4a5243ef80..43597d4ced 100644 --- a/packages/@uppy/dashboard/src/components/AddFiles.tsx +++ b/packages/@uppy/dashboard/src/components/AddFiles.tsx @@ -31,16 +31,15 @@ class AddFiles extends Component { this.mobilePhotoFileInput.click() } - private onFileInputChange = (event: $TSFixMe) => { + private onFileInputChange = ( + event: TargetedEvent, + ) => { this.props.handleInputChange(event) - // We clear the input after a file is selected, because otherwise - // change event is not fired in Chrome and Safari when a file - // with the same name is selected. - // ___Why not use value="" on instead? - // Because if we use that method of clearing the input, - // Chrome will not trigger change if we drop the same file twice (Issue #768). - event.target.value = null // eslint-disable-line no-param-reassign + // Clear the input so that Chrome/Safari/etc. can detect file section when the same file is repeatedly selected + // (see https://github.com/transloadit/uppy/issues/768#issuecomment-2264902758) + // eslint-disable-next-line no-param-reassign + event.currentTarget.value = '' } private renderHiddenInput = (isFolder: $TSFixMe, refCallback: $TSFixMe) => { diff --git a/packages/@uppy/drag-drop/src/DragDrop.tsx b/packages/@uppy/drag-drop/src/DragDrop.tsx index 1bc94200cc..cfdc95b7ae 100644 --- a/packages/@uppy/drag-drop/src/DragDrop.tsx +++ b/packages/@uppy/drag-drop/src/DragDrop.tsx @@ -2,7 +2,7 @@ import { UIPlugin, type Uppy } from '@uppy/core' import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' import type { UIPluginOptions } from '@uppy/core/lib/UIPlugin.js' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import type { ChangeEvent } from 'preact/compat' +import type { TargetedEvent } from 'preact/compat' import toArray from '@uppy/utils/lib/toArray' import isDragDropSupported from '@uppy/utils/lib/isDragDropSupported' import getDroppedFiles from '@uppy/utils/lib/getDroppedFiles' @@ -80,22 +80,17 @@ export default class DragDrop extends UIPlugin< } } - private onInputChange = (event: ChangeEvent) => { - const files = toArray((event.target as HTMLInputElement).files!) + private onInputChange = (event: TargetedEvent) => { + const files = toArray(event.currentTarget.files || []) if (files.length > 0) { this.uppy.log('[DragDrop] Files selected through input') this.addFiles(files) } - // We clear the input after a file is selected, because otherwise - // change event is not fired in Chrome and Safari when a file - // with the same name is selected. - // ___Why not use value="" on instead? - // Because if we use that method of clearing the input, - // Chrome will not trigger change if we drop the same file twice (Issue #768). - // @ts-expect-error TS freaks out, but this is fine + // Clear the input so that Chrome can detect file section when the same file is repeatedly selected + // (see https://github.com/transloadit/uppy/issues/768#issuecomment-2264902758) // eslint-disable-next-line no-param-reassign - event.target.value = null + event.currentTarget.value = '' } private handleDragOver = (event: DragEvent) => { diff --git a/packages/@uppy/file-input/src/FileInput.tsx b/packages/@uppy/file-input/src/FileInput.tsx index 09cc9fbc0e..e952fd6ba2 100644 --- a/packages/@uppy/file-input/src/FileInput.tsx +++ b/packages/@uppy/file-input/src/FileInput.tsx @@ -4,7 +4,7 @@ import { UIPlugin, Uppy, type UIPluginOptions } from '@uppy/core' import toArray from '@uppy/utils/lib/toArray' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' - +import type { TargetedEvent } from 'preact/compat' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json import packageJson from '../package.json' @@ -65,19 +65,15 @@ export default class FileInput extends UIPlugin< } } - private handleInputChange(event: Event) { + private handleInputChange(event: TargetedEvent) { this.uppy.log('[FileInput] Something selected through input...') - const files = toArray((event.target as HTMLFileInputElement).files) + const files = toArray(event.currentTarget.files || []) this.addFiles(files) - // We clear the input after a file is selected, because otherwise - // change event is not fired in Chrome and Safari when a file - // with the same name is selected. - // ___Why not use value="" on instead? - // Because if we use that method of clearing the input, - // Chrome will not trigger change if we drop the same file twice (Issue #768). - // @ts-expect-error yes - event.target.value = null // eslint-disable-line no-param-reassign + // Clear the input so that Chrome can detect file section when the same file is repeatedly selected + // (see https://github.com/transloadit/uppy/issues/768#issuecomment-2264902758) + // eslint-disable-next-line no-param-reassign + event.currentTarget.value = '' } private handleClick() {