From 3e2aa9f3c8a26409462868b618fbc318663282d3 Mon Sep 17 00:00:00 2001 From: Merlijn Vos Date: Mon, 6 Jan 2025 13:29:55 +0100 Subject: [PATCH] Use .js(x) for all imports instead .ts(x) (#5573) --- .eslintrc.js | 3 --- packages/@uppy/audio/src/Audio.tsx | 8 +++---- packages/@uppy/audio/src/RecordingLength.tsx | 2 +- packages/@uppy/audio/src/RecordingScreen.tsx | 12 +++++----- .../@uppy/audio/src/formatSeconds.test.ts | 2 +- packages/@uppy/audio/src/index.ts | 4 ++-- .../audio/src/supportsMediaRecorder.test.ts | 2 +- .../aws-s3/src/HTTPCommunicationQueue.ts | 10 ++++---- .../@uppy/aws-s3/src/MultipartUploader.ts | 2 +- .../@uppy/aws-s3/src/createSignedURL.test.ts | 2 +- packages/@uppy/aws-s3/src/index.test.ts | 2 +- packages/@uppy/aws-s3/src/index.ts | 12 +++++----- packages/@uppy/aws-s3/src/utils.ts | 2 +- packages/@uppy/box/src/Box.tsx | 2 +- packages/@uppy/box/src/index.ts | 4 ++-- .../@uppy/companion-client/src/Provider.ts | 6 ++--- .../src/RequestClient.test.ts | 2 +- .../companion-client/src/RequestClient.ts | 2 +- .../companion-client/src/SearchProvider.ts | 2 +- .../src/getAllowedHosts.test.ts | 2 +- packages/@uppy/companion-client/src/index.ts | 12 +++++----- packages/@uppy/compressor/src/index.test.ts | 2 +- packages/@uppy/compressor/src/index.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.test.ts | 4 ++-- packages/@uppy/core/src/UIPlugin.ts | 6 ++--- packages/@uppy/core/src/Uppy.test.ts | 20 ++++++++-------- packages/@uppy/core/src/Uppy.ts | 14 +++++------ packages/@uppy/core/src/index.ts | 12 +++++----- .../@uppy/core/src/mocks/acquirerPlugin1.ts | 4 ++-- .../@uppy/core/src/mocks/acquirerPlugin2.ts | 4 ++-- .../core/src/mocks/invalidPluginWithoutId.ts | 4 ++-- .../src/mocks/invalidPluginWithoutType.ts | 4 ++-- .../core/src/supportsUploadProgress.test.ts | 2 +- packages/@uppy/core/src/types.test.ts | 4 ++-- packages/@uppy/dashboard/src/Dashboard.tsx | 8 +++---- .../src/components/AddFilesPanel.tsx | 2 +- .../dashboard/src/components/Dashboard.tsx | 16 ++++++------- .../src/components/FileCard/index.tsx | 8 +++---- .../src/components/FileItem/Buttons/index.tsx | 4 ++-- .../components/FileItem/FileInfo/index.tsx | 4 ++-- .../FileItem/FilePreviewAndLink/index.tsx | 6 ++--- .../src/components/FileItem/index.tsx | 10 ++++---- .../dashboard/src/components/FileList.tsx | 4 ++-- .../dashboard/src/components/FilePreview.tsx | 2 +- .../src/components/PickerPanelContent.tsx | 2 +- packages/@uppy/dashboard/src/index.test.ts | 2 +- packages/@uppy/dashboard/src/index.ts | 4 ++-- .../src/utils/copyToClipboard.test.ts | 2 +- .../src/utils/createSuperFocus.test.ts | 2 +- .../dashboard/src/utils/createSuperFocus.ts | 2 +- .../@uppy/dashboard/src/utils/trapFocus.ts | 2 +- packages/@uppy/drag-drop/src/DragDrop.tsx | 2 +- packages/@uppy/drag-drop/src/index.ts | 4 ++-- packages/@uppy/dropbox/src/Dropbox.tsx | 2 +- packages/@uppy/dropbox/src/index.ts | 4 ++-- packages/@uppy/facebook/src/Facebook.tsx | 2 +- packages/@uppy/facebook/src/index.ts | 4 ++-- packages/@uppy/file-input/src/FileInput.tsx | 2 +- packages/@uppy/file-input/src/index.ts | 4 ++-- .../@uppy/golden-retriever/src/cleanup.ts | 4 ++-- packages/@uppy/golden-retriever/src/index.ts | 6 ++--- .../src/GoogleDrivePicker.tsx | 2 +- .../@uppy/google-drive-picker/src/index.ts | 2 +- .../@uppy/google-drive/src/GoogleDrive.tsx | 4 ++-- packages/@uppy/google-drive/src/index.ts | 4 ++-- .../src/GooglePhotosPicker.tsx | 2 +- .../@uppy/google-photos-picker/src/index.ts | 2 +- .../@uppy/google-photos/src/GooglePhotos.tsx | 2 +- packages/@uppy/google-photos/src/index.ts | 4 ++-- packages/@uppy/image-editor/src/Editor.tsx | 10 ++++---- .../@uppy/image-editor/src/ImageEditor.tsx | 4 ++-- packages/@uppy/image-editor/src/index.ts | 4 ++-- packages/@uppy/informer/src/Informer.tsx | 4 ++-- packages/@uppy/informer/src/index.ts | 4 ++-- packages/@uppy/instagram/src/Instagram.tsx | 2 +- packages/@uppy/instagram/src/index.ts | 4 ++-- packages/@uppy/onedrive/src/OneDrive.tsx | 2 +- packages/@uppy/onedrive/src/index.ts | 4 ++-- packages/@uppy/progress-bar/src/index.ts | 4 ++-- .../@uppy/provider-views/src/Breadcrumbs.tsx | 2 +- packages/@uppy/provider-views/src/Browser.tsx | 4 ++-- .../provider-views/src/FooterActions.tsx | 4 ++-- .../src/Item/components/GridItem.tsx | 2 +- .../src/Item/components/ListItem.tsx | 2 +- .../@uppy/provider-views/src/Item/index.tsx | 4 ++-- .../src/ProviderView/AuthView.tsx | 4 ++-- .../src/ProviderView/Header.tsx | 6 ++--- .../src/ProviderView/ProviderView.tsx | 24 +++++++++---------- .../provider-views/src/ProviderView/index.ts | 2 +- .../SearchProviderView/SearchProviderView.tsx | 18 +++++++------- .../src/SearchProviderView/index.ts | 2 +- packages/@uppy/provider-views/src/index.ts | 8 +++---- .../src/utils/PartialTreeUtils/afterFill.ts | 2 +- .../PartialTreeUtils/afterToggleCheckbox.ts | 2 +- .../src/utils/PartialTreeUtils/index.test.ts | 14 +++++------ .../src/utils/PartialTreeUtils/index.ts | 8 +++---- .../provider-views/src/utils/addFiles.ts | 2 +- packages/@uppy/react/src/Dashboard.ts | 4 ++-- packages/@uppy/react/src/DashboardModal.ts | 4 ++-- packages/@uppy/react/src/DragDrop.ts | 4 ++-- packages/@uppy/react/src/ProgressBar.ts | 4 ++-- packages/@uppy/react/src/StatusBar.ts | 4 ++-- packages/@uppy/react/src/getHTMLProps.ts | 2 +- packages/@uppy/react/src/index.ts | 16 ++++++------- .../react/src/nonHtmlPropsHaveChanged.ts | 2 +- packages/@uppy/react/src/useUppyEvent.test.ts | 2 +- .../@uppy/react/src/useUppyState.test.tsx | 2 +- .../@uppy/remote-sources/src/index.test.ts | 2 +- .../screen-capture/src/RecorderScreen.tsx | 10 ++++---- .../screen-capture/src/ScreenCapture.tsx | 6 ++--- packages/@uppy/screen-capture/src/index.ts | 4 ++-- packages/@uppy/status-bar/src/Components.tsx | 2 +- packages/@uppy/status-bar/src/StatusBar.tsx | 8 +++---- .../@uppy/status-bar/src/StatusBarOptions.ts | 2 +- packages/@uppy/status-bar/src/StatusBarUI.tsx | 6 ++--- packages/@uppy/status-bar/src/index.ts | 4 ++-- .../@uppy/store-default/src/index.test.ts | 2 +- .../@uppy/thumbnail-generator/src/index.ts | 2 +- packages/@uppy/transloadit/src/Assembly.ts | 2 +- .../@uppy/transloadit/src/AssemblyWatcher.ts | 2 +- packages/@uppy/transloadit/src/Client.ts | 2 +- packages/@uppy/transloadit/src/index.ts | 8 +++---- packages/@uppy/tus/src/index.test.ts | 2 +- packages/@uppy/tus/src/index.ts | 2 +- packages/@uppy/unsplash/src/Unsplash.tsx | 2 +- packages/@uppy/unsplash/src/index.ts | 4 ++-- packages/@uppy/url/src/Url.tsx | 6 ++--- packages/@uppy/url/src/index.ts | 4 ++-- .../@uppy/utils/src/AbortController.test.ts | 2 +- packages/@uppy/utils/src/AbortController.ts | 2 +- .../utils/src/CompanionClientProvider.ts | 2 +- .../@uppy/utils/src/ErrorWithCause.test.ts | 4 ++-- packages/@uppy/utils/src/ErrorWithCause.ts | 4 ++-- .../@uppy/utils/src/RateLimitedQueue.test.ts | 4 ++-- packages/@uppy/utils/src/Translator.test.ts | 2 +- packages/@uppy/utils/src/UppyFile.ts | 4 ++-- .../@uppy/utils/src/dataURItoBlob.test.ts | 4 ++-- .../@uppy/utils/src/dataURItoFile.test.ts | 4 ++-- packages/@uppy/utils/src/dataURItoFile.ts | 2 +- packages/@uppy/utils/src/delay.test.ts | 4 ++-- packages/@uppy/utils/src/delay.ts | 2 +- packages/@uppy/utils/src/emaFilter.test.ts | 2 +- .../@uppy/utils/src/fetchWithNetworkError.ts | 2 +- packages/@uppy/utils/src/fetcher.ts | 4 ++-- packages/@uppy/utils/src/fileFilters.ts | 2 +- .../@uppy/utils/src/findAllDOMElements.ts | 2 +- packages/@uppy/utils/src/findDOMElement.ts | 2 +- packages/@uppy/utils/src/generateFileID.ts | 4 ++-- .../@uppy/utils/src/getAllowedMetaFields.ts | 2 +- .../@uppy/utils/src/getBytesRemaining.test.ts | 2 +- packages/@uppy/utils/src/getBytesRemaining.ts | 2 +- .../@uppy/utils/src/getDroppedFiles/index.ts | 4 ++-- .../src/getDroppedFiles/utils/fallbackApi.ts | 2 +- .../utils/webkitGetAsEntryApi/index.ts | 2 +- packages/@uppy/utils/src/getETA.ts | 6 ++--- .../utils/src/getFileNameAndExtension.test.ts | 2 +- packages/@uppy/utils/src/getFileType.test.ts | 4 ++-- packages/@uppy/utils/src/getFileType.ts | 4 ++-- .../utils/src/getFileTypeExtension.test.ts | 2 +- .../@uppy/utils/src/getSocketHost.test.ts | 2 +- packages/@uppy/utils/src/getSpeed.test.ts | 2 +- packages/@uppy/utils/src/getSpeed.ts | 2 +- .../@uppy/utils/src/isMobileDevice.test.ts | 2 +- .../@uppy/utils/src/isNetworkError.test.ts | 2 +- packages/@uppy/utils/src/isObjectURL.test.ts | 2 +- .../utils/src/isPreviewSupported.test.ts | 2 +- packages/@uppy/utils/src/prettyETA.test.ts | 2 +- packages/@uppy/utils/src/prettyETA.ts | 2 +- .../@uppy/utils/src/remoteFileObjToLocal.ts | 2 +- .../@uppy/utils/src/secondsToTime.test.ts | 2 +- packages/@uppy/utils/src/toArray.test.ts | 2 +- .../@uppy/utils/src/truncateString.test.ts | 2 +- packages/@uppy/vue/src/dashboard-modal.ts | 2 +- packages/@uppy/vue/src/dashboard.ts | 2 +- packages/@uppy/vue/src/drag-drop.ts | 2 +- packages/@uppy/vue/src/file-input.ts | 2 +- packages/@uppy/vue/src/index.ts | 12 +++++----- packages/@uppy/vue/src/progress-bar.ts | 2 +- packages/@uppy/vue/src/status-bar.ts | 2 +- packages/@uppy/webcam/src/CameraScreen.tsx | 12 +++++----- packages/@uppy/webcam/src/RecordingLength.tsx | 2 +- packages/@uppy/webcam/src/SnapshotButton.tsx | 2 +- packages/@uppy/webcam/src/Webcam.test.ts | 2 +- packages/@uppy/webcam/src/Webcam.tsx | 10 ++++---- .../@uppy/webcam/src/formatSeconds.test.ts | 2 +- packages/@uppy/webcam/src/index.ts | 4 ++-- .../webcam/src/supportsMediaRecorder.test.ts | 2 +- packages/@uppy/webdav/src/Webdav.tsx | 2 +- packages/@uppy/webdav/src/index.ts | 2 +- packages/@uppy/xhr-upload/src/index.test.ts | 2 +- packages/@uppy/xhr-upload/src/index.ts | 2 +- packages/@uppy/zoom/src/Zoom.tsx | 2 +- packages/@uppy/zoom/src/index.ts | 4 ++-- packages/uppy/src/index.ts | 2 +- tsconfig.shared.json | 1 - 198 files changed, 393 insertions(+), 397 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 98adc34c4d..2861d375e2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -438,9 +438,6 @@ module.exports = { 'no-restricted-syntax': ['error', { selector: 'ImportDeclaration[source.value=/^@uppy\\x2F[a-z-0-9]+\\x2F/]:not([source.value=/^@uppy\\x2Futils\\x2F/]):not([source.value=/\\.(js|css)$/])', 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/audio/src/Audio.tsx b/packages/@uppy/audio/src/Audio.tsx index c3822e9a58..113d969f12 100644 --- a/packages/@uppy/audio/src/Audio.tsx +++ b/packages/@uppy/audio/src/Audio.tsx @@ -9,10 +9,10 @@ import type { import type { Uppy } from '@uppy/core/lib/Uppy.js' import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension' -import supportsMediaRecorder from './supportsMediaRecorder.ts' -import RecordingScreen from './RecordingScreen.tsx' -import PermissionsScreen from './PermissionsScreen.tsx' -import locale from './locale.ts' +import supportsMediaRecorder from './supportsMediaRecorder.js' +import RecordingScreen from './RecordingScreen.jsx' +import PermissionsScreen from './PermissionsScreen.jsx' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/audio/src/RecordingLength.tsx b/packages/@uppy/audio/src/RecordingLength.tsx index 73098a6298..cde1e6760a 100644 --- a/packages/@uppy/audio/src/RecordingLength.tsx +++ b/packages/@uppy/audio/src/RecordingLength.tsx @@ -1,6 +1,6 @@ import { h } from 'preact' import type { I18n } from '@uppy/utils/lib/Translator' -import formatSeconds from './formatSeconds.ts' +import formatSeconds from './formatSeconds.js' interface RecordingLengthProps { recordingLengthSeconds: number diff --git a/packages/@uppy/audio/src/RecordingScreen.tsx b/packages/@uppy/audio/src/RecordingScreen.tsx index 4e1513b8aa..dd2ecc9085 100644 --- a/packages/@uppy/audio/src/RecordingScreen.tsx +++ b/packages/@uppy/audio/src/RecordingScreen.tsx @@ -2,14 +2,14 @@ import { h } from 'preact' import { useEffect, useRef } from 'preact/hooks' import type { I18n } from '@uppy/utils/lib/Translator' -import RecordButton from './RecordButton.tsx' -import RecordingLength from './RecordingLength.tsx' +import RecordButton from './RecordButton.jsx' +import RecordingLength from './RecordingLength.jsx' import AudioSourceSelect, { type AudioSourceSelectProps, -} from './AudioSourceSelect.tsx' -import AudioOscilloscope from './audio-oscilloscope/index.ts' -import SubmitButton from './SubmitButton.tsx' -import DiscardButton from './DiscardButton.tsx' +} from './AudioSourceSelect.jsx' +import AudioOscilloscope from './audio-oscilloscope/index.js' +import SubmitButton from './SubmitButton.jsx' +import DiscardButton from './DiscardButton.jsx' interface RecordingScreenProps extends AudioSourceSelectProps { stream: MediaStream | null | undefined diff --git a/packages/@uppy/audio/src/formatSeconds.test.ts b/packages/@uppy/audio/src/formatSeconds.test.ts index 6e5c746611..9ddcc35cfc 100644 --- a/packages/@uppy/audio/src/formatSeconds.test.ts +++ b/packages/@uppy/audio/src/formatSeconds.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import formatSeconds from './formatSeconds.ts' +import formatSeconds from './formatSeconds.js' describe('formatSeconds', () => { it("should return a value of '0:43' when an argument of 43 seconds is supplied", () => { diff --git a/packages/@uppy/audio/src/index.ts b/packages/@uppy/audio/src/index.ts index 178ea5b00d..dcc93c6646 100644 --- a/packages/@uppy/audio/src/index.ts +++ b/packages/@uppy/audio/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Audio.tsx' -export type { AudioOptions } from './Audio.tsx' +export { default } from './Audio.jsx' +export type { AudioOptions } from './Audio.jsx' diff --git a/packages/@uppy/audio/src/supportsMediaRecorder.test.ts b/packages/@uppy/audio/src/supportsMediaRecorder.test.ts index 8c1e12919e..04c0fcaf4b 100644 --- a/packages/@uppy/audio/src/supportsMediaRecorder.test.ts +++ b/packages/@uppy/audio/src/supportsMediaRecorder.test.ts @@ -1,6 +1,6 @@ /* eslint-disable max-classes-per-file, compat/compat */ import { describe, expect, it } from 'vitest' -import supportsMediaRecorder from './supportsMediaRecorder.ts' +import supportsMediaRecorder from './supportsMediaRecorder.js' describe('supportsMediaRecorder', () => { it('should return true if MediaRecorder is supported', () => { diff --git a/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts b/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts index c015633ad9..9f2a923897 100644 --- a/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts +++ b/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts @@ -3,11 +3,11 @@ import type { RateLimitedQueue, WrapPromiseFunctionType, } from '@uppy/utils/lib/RateLimitedQueue' -import { pausingUploadReason, type Chunk } from './MultipartUploader.ts' -import type AwsS3Multipart from './index.ts' -import { throwIfAborted } from './utils.ts' -import type { UploadPartBytesResult, UploadResult } from './utils.ts' -import type { AwsS3MultipartOptions, uploadPartBytes } from './index.ts' +import { pausingUploadReason, type Chunk } from './MultipartUploader.js' +import type AwsS3Multipart from './index.js' +import { throwIfAborted } from './utils.js' +import type { UploadPartBytesResult, UploadResult } from './utils.js' +import type { AwsS3MultipartOptions, uploadPartBytes } from './index.js' 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 6f5397a7fd..2ca8fdf5b4 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.ts' +import type { HTTPCommunicationQueue } from './HTTPCommunicationQueue.js' const MB = 1024 * 1024 diff --git a/packages/@uppy/aws-s3/src/createSignedURL.test.ts b/packages/@uppy/aws-s3/src/createSignedURL.test.ts index 65000414da..a02fb54c2e 100644 --- a/packages/@uppy/aws-s3/src/createSignedURL.test.ts +++ b/packages/@uppy/aws-s3/src/createSignedURL.test.ts @@ -6,7 +6,7 @@ import { PutObjectCommand, } from '@aws-sdk/client-s3' import { getSignedUrl } from '@aws-sdk/s3-request-presigner' -import createSignedURL from './createSignedURL.ts' +import createSignedURL from './createSignedURL.js' const bucketName = 'some-bucket.with.dots' const s3ClientOptions = { diff --git a/packages/@uppy/aws-s3/src/index.test.ts b/packages/@uppy/aws-s3/src/index.test.ts index afe1c1eda4..34bc269ef7 100644 --- a/packages/@uppy/aws-s3/src/index.test.ts +++ b/packages/@uppy/aws-s3/src/index.test.ts @@ -3,7 +3,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import 'whatwg-fetch' import nock from 'nock' import Core from '@uppy/core' -import AwsS3Multipart, { type AwsBody } from './index.ts' +import AwsS3Multipart, { type AwsBody } from './index.js' const KB = 1024 const MB = KB * KB diff --git a/packages/@uppy/aws-s3/src/index.ts b/packages/@uppy/aws-s3/src/index.ts index 153a7399f1..d8112b2220 100644 --- a/packages/@uppy/aws-s3/src/index.ts +++ b/packages/@uppy/aws-s3/src/index.ts @@ -14,16 +14,16 @@ import { } from '@uppy/utils/lib/fileFilters' import { createAbortError } from '@uppy/utils/lib/AbortController' import getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields' -import MultipartUploader from './MultipartUploader.ts' -import { throwIfAborted } from './utils.ts' +import MultipartUploader from './MultipartUploader.js' +import { throwIfAborted } from './utils.js' import type { UploadResult, UploadResultWithSignal, MultipartUploadResultWithSignal, UploadPartBytesResult, -} from './utils.ts' -import createSignedURL from './createSignedURL.ts' -import { HTTPCommunicationQueue } from './HTTPCommunicationQueue.ts' +} from './utils.js' +import createSignedURL from './createSignedURL.js' +import { HTTPCommunicationQueue } from './HTTPCommunicationQueue.js' // 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' @@ -290,7 +290,7 @@ const defaultOptions = { retryDelays: [0, 1000, 3000, 5000], } satisfies Partial> -export type { AwsBody } from './utils.ts' +export type { AwsBody } from './utils.js' export default class AwsS3Multipart< M extends Meta, diff --git a/packages/@uppy/aws-s3/src/utils.ts b/packages/@uppy/aws-s3/src/utils.ts index 278ca6054f..835d457dcc 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.ts' +import type { AwsS3Part } from './index.js' export function throwIfAborted(signal?: AbortSignal | null): void { if (signal?.aborted) { diff --git a/packages/@uppy/box/src/Box.tsx b/packages/@uppy/box/src/Box.tsx index e004aff38b..1d3b558f7c 100644 --- a/packages/@uppy/box/src/Box.tsx +++ b/packages/@uppy/box/src/Box.tsx @@ -14,7 +14,7 @@ import type { UnknownProviderPlugin, UnknownProviderPluginState, } from '@uppy/core/lib/Uppy.js' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/box/src/index.ts b/packages/@uppy/box/src/index.ts index 60192cdf13..466dbe9bcc 100644 --- a/packages/@uppy/box/src/index.ts +++ b/packages/@uppy/box/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Box.tsx' -export type { BoxOptions } from './Box.tsx' +export { default } from './Box.jsx' +export type { BoxOptions } from './Box.jsx' diff --git a/packages/@uppy/companion-client/src/Provider.ts b/packages/@uppy/companion-client/src/Provider.ts index 2aff9879d2..0aaa06b917 100644 --- a/packages/@uppy/companion-client/src/Provider.ts +++ b/packages/@uppy/companion-client/src/Provider.ts @@ -6,9 +6,9 @@ import type { CompanionClientProvider, } 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.ts' -import { isOriginAllowed } from './getAllowedHosts.ts' +import RequestClient, { authErrorStatusCode } from './RequestClient.js' +import type { CompanionPluginOptions } from './index.js' +import { isOriginAllowed } from './getAllowedHosts.js' export interface Opts extends PluginOpts, CompanionPluginOptions { pluginId: string diff --git a/packages/@uppy/companion-client/src/RequestClient.test.ts b/packages/@uppy/companion-client/src/RequestClient.test.ts index 2277387c4e..f7dd1fe9a0 100644 --- a/packages/@uppy/companion-client/src/RequestClient.test.ts +++ b/packages/@uppy/companion-client/src/RequestClient.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import RequestClient from './RequestClient.ts' +import RequestClient from './RequestClient.js' describe('RequestClient', () => { it('has a hostname without trailing slash', () => { diff --git a/packages/@uppy/companion-client/src/RequestClient.ts b/packages/@uppy/companion-client/src/RequestClient.ts index d8f3702e64..4ac1199fe5 100644 --- a/packages/@uppy/companion-client/src/RequestClient.ts +++ b/packages/@uppy/companion-client/src/RequestClient.ts @@ -9,7 +9,7 @@ import getSocketHost from '@uppy/utils/lib/getSocketHost' import type Uppy from '@uppy/core' import type { UppyFile, Meta, Body } from '@uppy/utils/lib/UppyFile' import type { RequestOptions } from '@uppy/utils/lib/CompanionClientProvider' -import AuthError from './AuthError.ts' +import AuthError from './AuthError.js' // 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' diff --git a/packages/@uppy/companion-client/src/SearchProvider.ts b/packages/@uppy/companion-client/src/SearchProvider.ts index b0c83b5fdd..44904d0c72 100644 --- a/packages/@uppy/companion-client/src/SearchProvider.ts +++ b/packages/@uppy/companion-client/src/SearchProvider.ts @@ -1,7 +1,7 @@ import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { Uppy } from '@uppy/core' import type { CompanionClientSearchProvider } from '@uppy/utils/lib/CompanionClientProvider' -import RequestClient, { type Opts } from './RequestClient.ts' +import RequestClient, { type Opts } from './RequestClient.js' const getName = (id: string): string => { return id diff --git a/packages/@uppy/companion-client/src/getAllowedHosts.test.ts b/packages/@uppy/companion-client/src/getAllowedHosts.test.ts index 92dd634524..a58893a058 100644 --- a/packages/@uppy/companion-client/src/getAllowedHosts.test.ts +++ b/packages/@uppy/companion-client/src/getAllowedHosts.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import getAllowedHosts, { isOriginAllowed } from './getAllowedHosts.ts' +import getAllowedHosts, { isOriginAllowed } from './getAllowedHosts.js' describe('getAllowedHosts', () => { it('can convert companionAllowedHosts', () => { diff --git a/packages/@uppy/companion-client/src/index.ts b/packages/@uppy/companion-client/src/index.ts index 9d5e7413e1..7a22cdea1d 100644 --- a/packages/@uppy/companion-client/src/index.ts +++ b/packages/@uppy/companion-client/src/index.ts @@ -2,12 +2,12 @@ * Manages communications with Companion */ -export { default as RequestClient } from './RequestClient.ts' -export { default as Provider } from './Provider.ts' -export { default as SearchProvider } from './SearchProvider.ts' +export { default as RequestClient } from './RequestClient.js' +export { default as Provider } from './Provider.js' +export { default as SearchProvider } from './SearchProvider.js' -export { default as getAllowedHosts } from './getAllowedHosts.ts' +export { default as getAllowedHosts } from './getAllowedHosts.js' -export * as tokenStorage from './tokenStorage.ts' +export * as tokenStorage from './tokenStorage.js' -export type { CompanionPluginOptions } from './CompanionPluginOptions.ts' +export type { CompanionPluginOptions } from './CompanionPluginOptions.js' diff --git a/packages/@uppy/compressor/src/index.test.ts b/packages/@uppy/compressor/src/index.test.ts index 9eff543c13..91fbac5fbb 100644 --- a/packages/@uppy/compressor/src/index.test.ts +++ b/packages/@uppy/compressor/src/index.test.ts @@ -3,7 +3,7 @@ import Core from '@uppy/core' import getFileNameAndExtension from '@uppy/utils/lib/getFileNameAndExtension' import fs from 'node:fs' import path from 'node:path' -import CompressorPlugin from './index.ts' +import CompressorPlugin from './index.js' // Compressor uses browser canvas API, so need to mock compress() // @ts-expect-error mocked diff --git a/packages/@uppy/compressor/src/index.ts b/packages/@uppy/compressor/src/index.ts index c57fea1664..be75a3cd42 100644 --- a/packages/@uppy/compressor/src/index.ts +++ b/packages/@uppy/compressor/src/index.ts @@ -9,7 +9,7 @@ import CompressorJS from 'compressorjs' import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' import type { DefinePluginOpts, PluginOpts } from '@uppy/core/lib/BasePlugin.js' -import locale from './locale.ts' +import locale from './locale.js' declare module '@uppy/core' { export interface UppyEventMap { diff --git a/packages/@uppy/core/src/BasePlugin.ts b/packages/@uppy/core/src/BasePlugin.ts index 8713e6ee49..708865be80 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.ts' +import type { State, UnknownPlugin, Uppy } from './Uppy.js' export type PluginOpts = { locale?: Locale diff --git a/packages/@uppy/core/src/EventManager.ts b/packages/@uppy/core/src/EventManager.ts index 529c38fe62..bb556a9cfe 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.ts' +import type { Uppy, UppyEventMap, _UppyEventMap } from './Uppy.js' /** * 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 09c8622a20..a0a490890a 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.ts' +import type { State, NonNullableUppyOptions } from './Uppy.js' export type Restrictions = { maxFileSize: number | null diff --git a/packages/@uppy/core/src/UIPlugin.test.ts b/packages/@uppy/core/src/UIPlugin.test.ts index 1efd66ebc8..fe6ccdd3df 100644 --- a/packages/@uppy/core/src/UIPlugin.test.ts +++ b/packages/@uppy/core/src/UIPlugin.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' -import UIPlugin from './UIPlugin.ts' -import Core from './index.ts' +import UIPlugin from './UIPlugin.js' +import Core from './index.js' describe('UIPlugin', () => { describe('getPluginState', () => { diff --git a/packages/@uppy/core/src/UIPlugin.ts b/packages/@uppy/core/src/UIPlugin.ts index 7aa3614e0f..b6be19d097 100644 --- a/packages/@uppy/core/src/UIPlugin.ts +++ b/packages/@uppy/core/src/UIPlugin.ts @@ -4,9 +4,9 @@ import findDOMElement from '@uppy/utils/lib/findDOMElement' 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.ts' -import type { State } from './Uppy.ts' +import BasePlugin from './BasePlugin.js' +import type { PluginOpts } from './BasePlugin.js' +import type { State } from './Uppy.js' /** * Defer a frequent call to the microtask queue. diff --git a/packages/@uppy/core/src/Uppy.test.ts b/packages/@uppy/core/src/Uppy.test.ts index cb6b985a84..b88a16e826 100644 --- a/packages/@uppy/core/src/Uppy.test.ts +++ b/packages/@uppy/core/src/Uppy.test.ts @@ -8,21 +8,21 @@ import path from 'node:path' import prettierBytes from '@transloadit/prettier-bytes' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { Locale } from '@uppy/utils/lib/Translator' -import Core from './index.ts' -import UIPlugin from './UIPlugin.ts' +import Core from './index.js' +import UIPlugin from './UIPlugin.js' import BasePlugin, { type DefinePluginOpts, type PluginOpts, -} from './BasePlugin.ts' -import { debugLogger } from './loggers.ts' -import AcquirerPlugin1 from './mocks/acquirerPlugin1.ts' -import AcquirerPlugin2 from './mocks/acquirerPlugin2.ts' -import InvalidPlugin from './mocks/invalidPlugin.ts' -import InvalidPluginWithoutId from './mocks/invalidPluginWithoutId.ts' -import InvalidPluginWithoutType from './mocks/invalidPluginWithoutType.ts' +} from './BasePlugin.js' +import { debugLogger } from './loggers.js' +import AcquirerPlugin1 from './mocks/acquirerPlugin1.js' +import AcquirerPlugin2 from './mocks/acquirerPlugin2.js' +import InvalidPlugin from './mocks/invalidPlugin.js' +import InvalidPluginWithoutId from './mocks/invalidPluginWithoutId.js' +import InvalidPluginWithoutType from './mocks/invalidPluginWithoutType.js' // @ts-expect-error trying to import a file from outside the package import DeepFrozenStore from '../../../../e2e/cypress/fixtures/DeepFrozenStore.mjs' -import type { State } from './Uppy.ts' +import type { State } from './Uppy.js' const sampleImage = fs.readFileSync( // eslint-disable-next-line no-restricted-globals diff --git a/packages/@uppy/core/src/Uppy.ts b/packages/@uppy/core/src/Uppy.ts index ed9e6bd9e8..8009e71259 100644 --- a/packages/@uppy/core/src/Uppy.ts +++ b/packages/@uppy/core/src/Uppy.ts @@ -32,21 +32,21 @@ import type { I18n, OptionalPluralizeLocale, } from '@uppy/utils/lib/Translator' -import supportsUploadProgress from './supportsUploadProgress.ts' -import getFileName from './getFileName.ts' -import { justErrorsLogger, debugLogger } from './loggers.ts' +import supportsUploadProgress from './supportsUploadProgress.js' +import getFileName from './getFileName.js' +import { justErrorsLogger, debugLogger } from './loggers.js' import { Restricter, defaultOptions as defaultRestrictionOptions, RestrictionError, -} from './Restricter.ts' +} from './Restricter.js' // 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' -import locale from './locale.ts' +import locale from './locale.js' -import type BasePlugin from './BasePlugin.ts' -import type { Restrictions, ValidateableFile } from './Restricter.ts' +import type BasePlugin from './BasePlugin.js' +import type { Restrictions, ValidateableFile } from './Restricter.js' type Processor = ( fileIDs: string[], diff --git a/packages/@uppy/core/src/index.ts b/packages/@uppy/core/src/index.ts index 358dea36ea..6f906b21dd 100644 --- a/packages/@uppy/core/src/index.ts +++ b/packages/@uppy/core/src/index.ts @@ -1,4 +1,4 @@ -export { default } from './Uppy.ts' +export { default } from './Uppy.js' export { default as Uppy, type State, @@ -8,13 +8,13 @@ export { type UploadResult, type UppyEventMap, type UppyOptions, -} from './Uppy.ts' -export { default as UIPlugin } from './UIPlugin.ts' -export { default as BasePlugin } from './BasePlugin.ts' -export { debugLogger } from './loggers.ts' +} from './Uppy.js' +export { default as UIPlugin } from './UIPlugin.js' +export { default as BasePlugin } from './BasePlugin.js' +export { debugLogger } from './loggers.js' export type { Store } from '@uppy/store-default' -export type { UIPluginOptions } from './UIPlugin.ts' +export type { UIPluginOptions } from './UIPlugin.js' export type { UppyFile, Meta, Body } from '@uppy/utils/lib/UppyFile' diff --git a/packages/@uppy/core/src/mocks/acquirerPlugin1.ts b/packages/@uppy/core/src/mocks/acquirerPlugin1.ts index 0f3516690d..9ff80f0e62 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.ts' +import UIPlugin from '../UIPlugin.js' +import type Uppy from '../Uppy.js' type mock = ReturnType diff --git a/packages/@uppy/core/src/mocks/acquirerPlugin2.ts b/packages/@uppy/core/src/mocks/acquirerPlugin2.ts index 9d2290b69d..54c9f56e33 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.ts' +import UIPlugin from '../UIPlugin.js' +import type Uppy from '../Uppy.js' type mock = ReturnType diff --git a/packages/@uppy/core/src/mocks/invalidPluginWithoutId.ts b/packages/@uppy/core/src/mocks/invalidPluginWithoutId.ts index d2c02e30dc..75e1f3b52c 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.ts' +import UIPlugin from '../UIPlugin.js' +import type Uppy from '../Uppy.js' 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 4baeb573c9..19f404eb66 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.ts' +import UIPlugin from '../UIPlugin.js' +import type Uppy from '../Uppy.js' export default class InvalidPluginWithoutType extends UIPlugin { public id: string diff --git a/packages/@uppy/core/src/supportsUploadProgress.test.ts b/packages/@uppy/core/src/supportsUploadProgress.test.ts index 6dc2f8f478..7bb10151a8 100644 --- a/packages/@uppy/core/src/supportsUploadProgress.test.ts +++ b/packages/@uppy/core/src/supportsUploadProgress.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import supportsUploadProgress from './supportsUploadProgress.ts' +import supportsUploadProgress from './supportsUploadProgress.js' describe('supportsUploadProgress', () => { it('returns true in working browsers', () => { diff --git a/packages/@uppy/core/src/types.test.ts b/packages/@uppy/core/src/types.test.ts index 1a03591d02..bb906e78b5 100644 --- a/packages/@uppy/core/src/types.test.ts +++ b/packages/@uppy/core/src/types.test.ts @@ -1,8 +1,8 @@ import { expectTypeOf, test } from 'vitest' import type { Body, InternalMetadata, Meta } from '@uppy/utils/lib/UppyFile' -import Uppy, { type UnknownPlugin } from './Uppy.ts' -import UIPlugin, { type UIPluginOptions } from './UIPlugin.ts' +import Uppy, { type UnknownPlugin } from './Uppy.js' +import UIPlugin, { type UIPluginOptions } from './UIPlugin.js' interface Opts extends UIPluginOptions { foo: string diff --git a/packages/@uppy/dashboard/src/Dashboard.tsx b/packages/@uppy/dashboard/src/Dashboard.tsx index dc9a7f5768..ad0ec9b033 100644 --- a/packages/@uppy/dashboard/src/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/Dashboard.tsx @@ -20,14 +20,14 @@ 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' -import createSuperFocus from './utils/createSuperFocus.ts' -import DashboardUI from './components/Dashboard.tsx' +import * as trapFocus from './utils/trapFocus.js' +import createSuperFocus from './utils/createSuperFocus.js' +import DashboardUI from './components/Dashboard.jsx' // 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' -import locale from './locale.ts' +import locale from './locale.js' type GenericEventCallback = () => void export type DashboardFileEditStartCallback = ( diff --git a/packages/@uppy/dashboard/src/components/AddFilesPanel.tsx b/packages/@uppy/dashboard/src/components/AddFilesPanel.tsx index f0faea74af..9b85dd63f5 100644 --- a/packages/@uppy/dashboard/src/components/AddFilesPanel.tsx +++ b/packages/@uppy/dashboard/src/components/AddFilesPanel.tsx @@ -1,7 +1,7 @@ /* eslint-disable react/destructuring-assignment */ import { h } from 'preact' import classNames from 'classnames' -import AddFiles from './AddFiles.tsx' +import AddFiles from './AddFiles.jsx' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/components/Dashboard.tsx b/packages/@uppy/dashboard/src/components/Dashboard.tsx index 36d185e3f9..dbb47c6faf 100644 --- a/packages/@uppy/dashboard/src/components/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/components/Dashboard.tsx @@ -7,14 +7,14 @@ import type { State, UIPlugin, UIPluginOptions, Uppy } from '@uppy/core' import type { I18n } from '@uppy/utils/lib/Translator' import type Translator from '@uppy/utils/lib/Translator' import type { TargetedEvent } from 'preact/compat' -import FileList from './FileList.tsx' -import AddFiles from './AddFiles.tsx' -import AddFilesPanel from './AddFilesPanel.tsx' -import PickerPanelContent from './PickerPanelContent.tsx' -import EditorPanel from './EditorPanel.tsx' -import PanelTopBar from './PickerPanelTopBar.tsx' -import FileCard from './FileCard/index.tsx' -import Slide from './Slide.tsx' +import FileList from './FileList.jsx' +import AddFiles from './AddFiles.jsx' +import AddFilesPanel from './AddFilesPanel.jsx' +import PickerPanelContent from './PickerPanelContent.jsx' +import EditorPanel from './EditorPanel.jsx' +import PanelTopBar from './PickerPanelTopBar.jsx' +import FileCard from './FileCard/index.jsx' +import Slide from './Slide.jsx' import type { DashboardState, TargetWithRender } from '../Dashboard' // http://dev.edenspiekermann.com/2016/02/11/introducing-accessible-modal-dialog diff --git a/packages/@uppy/dashboard/src/components/FileCard/index.tsx b/packages/@uppy/dashboard/src/components/FileCard/index.tsx index 49dbb85de2..8bb890db00 100644 --- a/packages/@uppy/dashboard/src/components/FileCard/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileCard/index.tsx @@ -2,10 +2,10 @@ import { h } from 'preact' import { useEffect, useState, useCallback } from 'preact/hooks' import classNames from 'classnames' import { nanoid } from 'nanoid/non-secure' -import getFileTypeIcon from '../../utils/getFileTypeIcon.tsx' -import ignoreEvent from '../../utils/ignoreEvent.ts' -import FilePreview from '../FilePreview.tsx' -import RenderMetaFields from './RenderMetaFields.tsx' +import getFileTypeIcon from '../../utils/getFileTypeIcon.jsx' +import ignoreEvent from '../../utils/ignoreEvent.js' +import FilePreview from '../FilePreview.jsx' +import RenderMetaFields from './RenderMetaFields.jsx' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx index 53b0d32b56..c9421f27b2 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx @@ -2,8 +2,8 @@ import { h } from 'preact' 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.ts' +import copyToClipboard from '../../../utils/copyToClipboard.js' +import type { DashboardState } from '../../../Dashboard.js' 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 555f2364c0..3def4903e3 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx @@ -4,8 +4,8 @@ import prettierBytes from '@transloadit/prettier-bytes' 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.ts' +import MetaErrorMessage from '../MetaErrorMessage.jsx' +import type { DashboardState } from '../../../Dashboard.js' const renderFileName = (props: { file: UppyFile diff --git a/packages/@uppy/dashboard/src/components/FileItem/FilePreviewAndLink/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/FilePreviewAndLink/index.tsx index e2bf22c867..d7709c2a0d 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FilePreviewAndLink/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/FilePreviewAndLink/index.tsx @@ -1,7 +1,7 @@ import { h } from 'preact' -import FilePreview from '../../FilePreview.tsx' -import MetaErrorMessage from '../MetaErrorMessage.tsx' -import getFileTypeIcon from '../../../utils/getFileTypeIcon.tsx' +import FilePreview from '../../FilePreview.jsx' +import MetaErrorMessage from '../MetaErrorMessage.jsx' +import getFileTypeIcon from '../../../utils/getFileTypeIcon.jsx' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/components/FileItem/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/index.tsx index ab284fd19b..a962c10555 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/index.tsx @@ -6,11 +6,11 @@ import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile' import type { I18n } from '@uppy/utils/lib/Translator' import type Uppy from '@uppy/core' import type { State } from '@uppy/core' -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.ts' +import FilePreviewAndLink from './FilePreviewAndLink/index.jsx' +import FileProgress from './FileProgress/index.jsx' +import FileInfo from './FileInfo/index.jsx' +import Buttons from './Buttons/index.jsx' +import type { DashboardState } from '../../Dashboard.js' type Props = { file: UppyFile diff --git a/packages/@uppy/dashboard/src/components/FileList.tsx b/packages/@uppy/dashboard/src/components/FileList.tsx index 2f6c34bd49..6f67460b8e 100644 --- a/packages/@uppy/dashboard/src/components/FileList.tsx +++ b/packages/@uppy/dashboard/src/components/FileList.tsx @@ -6,8 +6,8 @@ import VirtualList from '@uppy/utils/lib/VirtualList' 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.ts' +import FileItem from './FileItem/index.jsx' +import type { DashboardState } from '../Dashboard.js' type FileListProps = { id: string diff --git a/packages/@uppy/dashboard/src/components/FilePreview.tsx b/packages/@uppy/dashboard/src/components/FilePreview.tsx index 84043cc336..8efd15b0b8 100644 --- a/packages/@uppy/dashboard/src/components/FilePreview.tsx +++ b/packages/@uppy/dashboard/src/components/FilePreview.tsx @@ -1,5 +1,5 @@ import { h } from 'preact' -import getFileTypeIcon from '../utils/getFileTypeIcon.tsx' +import getFileTypeIcon from '../utils/getFileTypeIcon.jsx' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx b/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx index 7a795ec9f1..0944002a67 100644 --- a/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx +++ b/packages/@uppy/dashboard/src/components/PickerPanelContent.tsx @@ -1,7 +1,7 @@ import { h } from 'preact' import classNames from 'classnames' import { useRef } from 'preact/hooks' -import ignoreEvent from '../utils/ignoreEvent.ts' +import ignoreEvent from '../utils/ignoreEvent.js' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/index.test.ts b/packages/@uppy/dashboard/src/index.test.ts index 07693700f7..6a3b28fbb6 100644 --- a/packages/@uppy/dashboard/src/index.test.ts +++ b/packages/@uppy/dashboard/src/index.test.ts @@ -11,7 +11,7 @@ import WebcamPlugin from '@uppy/webcam' import Url from '@uppy/url' import resizeObserverPolyfill from 'resize-observer-polyfill' -import DashboardPlugin from './index.ts' +import DashboardPlugin from './index.js' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/index.ts b/packages/@uppy/dashboard/src/index.ts index 9f28d9d36c..a0dda11bbd 100644 --- a/packages/@uppy/dashboard/src/index.ts +++ b/packages/@uppy/dashboard/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Dashboard.tsx' -export type { DashboardOptions } from './Dashboard.tsx' +export { default } from './Dashboard.jsx' +export type { DashboardOptions } from './Dashboard.jsx' diff --git a/packages/@uppy/dashboard/src/utils/copyToClipboard.test.ts b/packages/@uppy/dashboard/src/utils/copyToClipboard.test.ts index df8e9d9a5e..328ee49588 100644 --- a/packages/@uppy/dashboard/src/utils/copyToClipboard.test.ts +++ b/packages/@uppy/dashboard/src/utils/copyToClipboard.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import copyToClipboard from './copyToClipboard.ts' +import copyToClipboard from './copyToClipboard.js' describe('copyToClipboard', () => { it.skip('should copy the specified text to the clipboard', () => { diff --git a/packages/@uppy/dashboard/src/utils/createSuperFocus.test.ts b/packages/@uppy/dashboard/src/utils/createSuperFocus.test.ts index 1230dbf471..f30f1bc22d 100644 --- a/packages/@uppy/dashboard/src/utils/createSuperFocus.test.ts +++ b/packages/@uppy/dashboard/src/utils/createSuperFocus.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import createSuperFocus from './createSuperFocus.ts' +import createSuperFocus from './createSuperFocus.js' describe('createSuperFocus', () => { // superFocus.cancel() is used in dashboard diff --git a/packages/@uppy/dashboard/src/utils/createSuperFocus.ts b/packages/@uppy/dashboard/src/utils/createSuperFocus.ts index 9ea865748c..3ae7f08753 100644 --- a/packages/@uppy/dashboard/src/utils/createSuperFocus.ts +++ b/packages/@uppy/dashboard/src/utils/createSuperFocus.ts @@ -2,7 +2,7 @@ import debounce from 'lodash/debounce.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore untyped import FOCUSABLE_ELEMENTS from '@uppy/utils/lib/FOCUSABLE_ELEMENTS' -import getActiveOverlayEl from './getActiveOverlayEl.ts' +import getActiveOverlayEl from './getActiveOverlayEl.js' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/src/utils/trapFocus.ts b/packages/@uppy/dashboard/src/utils/trapFocus.ts index 84248498c0..bbe24aab8f 100644 --- a/packages/@uppy/dashboard/src/utils/trapFocus.ts +++ b/packages/@uppy/dashboard/src/utils/trapFocus.ts @@ -2,7 +2,7 @@ import toArray from '@uppy/utils/lib/toArray' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore untyped import FOCUSABLE_ELEMENTS from '@uppy/utils/lib/FOCUSABLE_ELEMENTS' -import getActiveOverlayEl from './getActiveOverlayEl.ts' +import getActiveOverlayEl from './getActiveOverlayEl.js' type $TSFixMe = any diff --git a/packages/@uppy/drag-drop/src/DragDrop.tsx b/packages/@uppy/drag-drop/src/DragDrop.tsx index cfdc95b7ae..02ce832d47 100644 --- a/packages/@uppy/drag-drop/src/DragDrop.tsx +++ b/packages/@uppy/drag-drop/src/DragDrop.tsx @@ -11,7 +11,7 @@ import { h, type ComponentChild } from 'preact' // 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' -import locale from './locale.ts' +import locale from './locale.js' export interface DragDropOptions extends UIPluginOptions { inputName?: string diff --git a/packages/@uppy/drag-drop/src/index.ts b/packages/@uppy/drag-drop/src/index.ts index ff2edbdd5d..f2e89e2414 100644 --- a/packages/@uppy/drag-drop/src/index.ts +++ b/packages/@uppy/drag-drop/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './DragDrop.tsx' -export type { DragDropOptions } from './DragDrop.tsx' +export { default } from './DragDrop.jsx' +export type { DragDropOptions } from './DragDrop.jsx' diff --git a/packages/@uppy/dropbox/src/Dropbox.tsx b/packages/@uppy/dropbox/src/Dropbox.tsx index e94c9000c5..94421bdff6 100644 --- a/packages/@uppy/dropbox/src/Dropbox.tsx +++ b/packages/@uppy/dropbox/src/Dropbox.tsx @@ -14,7 +14,7 @@ import type { UnknownProviderPlugin, UnknownProviderPluginState, } from '@uppy/core/lib/Uppy.js' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/dropbox/src/index.ts b/packages/@uppy/dropbox/src/index.ts index cabbf5f31f..563c0047a4 100644 --- a/packages/@uppy/dropbox/src/index.ts +++ b/packages/@uppy/dropbox/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Dropbox.tsx' -export type { DropboxOptions } from './Dropbox.tsx' +export { default } from './Dropbox.jsx' +export type { DropboxOptions } from './Dropbox.jsx' diff --git a/packages/@uppy/facebook/src/Facebook.tsx b/packages/@uppy/facebook/src/Facebook.tsx index 41f388e825..1fef41fd51 100644 --- a/packages/@uppy/facebook/src/Facebook.tsx +++ b/packages/@uppy/facebook/src/Facebook.tsx @@ -14,7 +14,7 @@ import type { UnknownProviderPlugin, UnknownProviderPluginState, } from '@uppy/core/lib/Uppy.js' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/facebook/src/index.ts b/packages/@uppy/facebook/src/index.ts index 0d5614e9ab..4984d641d2 100644 --- a/packages/@uppy/facebook/src/index.ts +++ b/packages/@uppy/facebook/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Facebook.tsx' -export type { FacebookOptions } from './Facebook.tsx' +export { default } from './Facebook.jsx' +export type { FacebookOptions } from './Facebook.jsx' diff --git a/packages/@uppy/file-input/src/FileInput.tsx b/packages/@uppy/file-input/src/FileInput.tsx index e952fd6ba2..90002d402d 100644 --- a/packages/@uppy/file-input/src/FileInput.tsx +++ b/packages/@uppy/file-input/src/FileInput.tsx @@ -8,7 +8,7 @@ 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' -import locale from './locale.ts' +import locale from './locale.js' export interface FileInputOptions extends UIPluginOptions { pretty?: boolean diff --git a/packages/@uppy/file-input/src/index.ts b/packages/@uppy/file-input/src/index.ts index 58b0f100a9..9dea6a7160 100644 --- a/packages/@uppy/file-input/src/index.ts +++ b/packages/@uppy/file-input/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './FileInput.tsx' -export type { FileInputOptions } from './FileInput.tsx' +export { default } from './FileInput.jsx' +export type { FileInputOptions } from './FileInput.jsx' diff --git a/packages/@uppy/golden-retriever/src/cleanup.ts b/packages/@uppy/golden-retriever/src/cleanup.ts index fc17e2f962..3c3b101ff1 100644 --- a/packages/@uppy/golden-retriever/src/cleanup.ts +++ b/packages/@uppy/golden-retriever/src/cleanup.ts @@ -1,5 +1,5 @@ -import IndexedDBStore from './IndexedDBStore.ts' -import MetaDataStore from './MetaDataStore.ts' +import IndexedDBStore from './IndexedDBStore.js' +import MetaDataStore from './MetaDataStore.js' /** * Clean old blobs without needing to import all of Uppy. diff --git a/packages/@uppy/golden-retriever/src/index.ts b/packages/@uppy/golden-retriever/src/index.ts index acea945de5..566f03e601 100644 --- a/packages/@uppy/golden-retriever/src/index.ts +++ b/packages/@uppy/golden-retriever/src/index.ts @@ -6,9 +6,9 @@ import type Uppy from '@uppy/core' import type { UploadResult } from '@uppy/core' import ServiceWorkerStore, { type ServiceWorkerStoredFile, -} from './ServiceWorkerStore.ts' -import IndexedDBStore from './IndexedDBStore.ts' -import MetaDataStore from './MetaDataStore.ts' +} from './ServiceWorkerStore.js' +import IndexedDBStore from './IndexedDBStore.js' +import MetaDataStore from './MetaDataStore.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx b/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx index af9eda47e7..dc3dc0a32c 100644 --- a/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx +++ b/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx @@ -15,7 +15,7 @@ import type { AsyncStore, BaseProviderPlugin } from '@uppy/core/lib/Uppy.js' // 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' -import locale from './locale.ts' +import locale from './locale.js' export type GoogleDrivePickerOptions = CompanionPluginOptions & { clientId: string diff --git a/packages/@uppy/google-drive-picker/src/index.ts b/packages/@uppy/google-drive-picker/src/index.ts index b4f53a6d4e..2c9b1495bb 100644 --- a/packages/@uppy/google-drive-picker/src/index.ts +++ b/packages/@uppy/google-drive-picker/src/index.ts @@ -1 +1 @@ -export { default } from './GoogleDrivePicker.tsx' +export { default } from './GoogleDrivePicker.jsx' diff --git a/packages/@uppy/google-drive/src/GoogleDrive.tsx b/packages/@uppy/google-drive/src/GoogleDrive.tsx index 8c902bdd98..21e6f221fa 100644 --- a/packages/@uppy/google-drive/src/GoogleDrive.tsx +++ b/packages/@uppy/google-drive/src/GoogleDrive.tsx @@ -14,8 +14,8 @@ import type { UnknownProviderPlugin, UnknownProviderPluginState, } from '@uppy/core/lib/Uppy.js' -import DriveProviderViews from './DriveProviderViews.ts' -import locale from './locale.ts' +import DriveProviderViews from './DriveProviderViews.js' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/google-drive/src/index.ts b/packages/@uppy/google-drive/src/index.ts index 29eebdb0df..5ba47c744f 100644 --- a/packages/@uppy/google-drive/src/index.ts +++ b/packages/@uppy/google-drive/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './GoogleDrive.tsx' -export type { GoogleDriveOptions } from './GoogleDrive.tsx' +export { default } from './GoogleDrive.jsx' +export type { GoogleDriveOptions } from './GoogleDrive.jsx' diff --git a/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx b/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx index ba7ebe2856..13244c48c4 100644 --- a/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx +++ b/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx @@ -15,7 +15,7 @@ import type { AsyncStore, BaseProviderPlugin } from '@uppy/core/lib/Uppy.js' // 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' -import locale from './locale.ts' +import locale from './locale.js' export type GooglePhotosPickerOptions = CompanionPluginOptions & { clientId: string diff --git a/packages/@uppy/google-photos-picker/src/index.ts b/packages/@uppy/google-photos-picker/src/index.ts index 7d64a7cb5e..97684c2cbb 100644 --- a/packages/@uppy/google-photos-picker/src/index.ts +++ b/packages/@uppy/google-photos-picker/src/index.ts @@ -1 +1 @@ -export { default } from './GooglePhotosPicker.tsx' +export { default } from './GooglePhotosPicker.jsx' diff --git a/packages/@uppy/google-photos/src/GooglePhotos.tsx b/packages/@uppy/google-photos/src/GooglePhotos.tsx index 248f7e5ac1..b32ce7b90e 100644 --- a/packages/@uppy/google-photos/src/GooglePhotos.tsx +++ b/packages/@uppy/google-photos/src/GooglePhotos.tsx @@ -18,7 +18,7 @@ import type { // 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' -import locale from './locale.ts' +import locale from './locale.js' export type GooglePhotosOptions = CompanionPluginOptions diff --git a/packages/@uppy/google-photos/src/index.ts b/packages/@uppy/google-photos/src/index.ts index d511fae8c1..8220ac9bf3 100644 --- a/packages/@uppy/google-photos/src/index.ts +++ b/packages/@uppy/google-photos/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './GooglePhotos.tsx' -export type { GooglePhotosOptions } from './GooglePhotos.tsx' +export { default } from './GooglePhotos.jsx' +export type { GooglePhotosOptions } from './GooglePhotos.jsx' diff --git a/packages/@uppy/image-editor/src/Editor.tsx b/packages/@uppy/image-editor/src/Editor.tsx index 9164d88e00..ae646952b5 100644 --- a/packages/@uppy/image-editor/src/Editor.tsx +++ b/packages/@uppy/image-editor/src/Editor.tsx @@ -3,11 +3,11 @@ import Cropper from 'cropperjs' import { h, Component } from 'preact' import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' import type { I18n } from '@uppy/utils/lib/Translator' -import getCanvasDataThatFitsPerfectlyIntoContainer from './utils/getCanvasDataThatFitsPerfectlyIntoContainer.ts' -import getScaleFactorThatRemovesDarkCorners from './utils/getScaleFactorThatRemovesDarkCorners.ts' -import limitCropboxMovementOnMove from './utils/limitCropboxMovementOnMove.ts' -import limitCropboxMovementOnResize from './utils/limitCropboxMovementOnResize.ts' -import type ImageEditor from './ImageEditor.ts' +import getCanvasDataThatFitsPerfectlyIntoContainer from './utils/getCanvasDataThatFitsPerfectlyIntoContainer.js' +import getScaleFactorThatRemovesDarkCorners from './utils/getScaleFactorThatRemovesDarkCorners.js' +import limitCropboxMovementOnMove from './utils/limitCropboxMovementOnMove.js' +import limitCropboxMovementOnResize from './utils/limitCropboxMovementOnResize.js' +import type ImageEditor from './ImageEditor.js' type Props = { currentImage: UppyFile diff --git a/packages/@uppy/image-editor/src/ImageEditor.tsx b/packages/@uppy/image-editor/src/ImageEditor.tsx index ea896a380d..52a3583df4 100644 --- a/packages/@uppy/image-editor/src/ImageEditor.tsx +++ b/packages/@uppy/image-editor/src/ImageEditor.tsx @@ -4,11 +4,11 @@ import type Cropper from 'cropperjs' import { h } from 'preact' import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' -import Editor from './Editor.tsx' +import Editor from './Editor.jsx' // 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' -import locale from './locale.ts' +import locale from './locale.js' declare global { namespace preact { diff --git a/packages/@uppy/image-editor/src/index.ts b/packages/@uppy/image-editor/src/index.ts index c30fd39721..a8a529be22 100644 --- a/packages/@uppy/image-editor/src/index.ts +++ b/packages/@uppy/image-editor/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './ImageEditor.tsx' -export type { Opts as ImageEditorOptions } from './ImageEditor.tsx' +export { default } from './ImageEditor.jsx' +export type { Opts as ImageEditorOptions } from './ImageEditor.jsx' diff --git a/packages/@uppy/informer/src/Informer.tsx b/packages/@uppy/informer/src/Informer.tsx index f198a97cf8..f8fd7cc31d 100644 --- a/packages/@uppy/informer/src/Informer.tsx +++ b/packages/@uppy/informer/src/Informer.tsx @@ -4,8 +4,8 @@ import { h, type ComponentChild } from 'preact' import { UIPlugin } from '@uppy/core' import type { State, UIPluginOptions, Uppy } from '@uppy/core' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import FadeIn from './FadeIn.tsx' -import TransitionGroup from './TransitionGroup.ts' +import FadeIn from './FadeIn.jsx' +import TransitionGroup from './TransitionGroup.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/informer/src/index.ts b/packages/@uppy/informer/src/index.ts index 8a1b4b634b..ea8cecb8d4 100644 --- a/packages/@uppy/informer/src/index.ts +++ b/packages/@uppy/informer/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Informer.tsx' -export type { InformerOptions } from './Informer.tsx' +export { default } from './Informer.jsx' +export type { InformerOptions } from './Informer.jsx' diff --git a/packages/@uppy/instagram/src/Instagram.tsx b/packages/@uppy/instagram/src/Instagram.tsx index c0cd987d17..0f5cb7cf51 100644 --- a/packages/@uppy/instagram/src/Instagram.tsx +++ b/packages/@uppy/instagram/src/Instagram.tsx @@ -14,7 +14,7 @@ import type { UnknownProviderPlugin, UnknownProviderPluginState, } from '@uppy/core/lib/Uppy.js' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/instagram/src/index.ts b/packages/@uppy/instagram/src/index.ts index 55b55b3302..a9a56fefe6 100644 --- a/packages/@uppy/instagram/src/index.ts +++ b/packages/@uppy/instagram/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Instagram.tsx' -export type { InstagramOptions } from './Instagram.tsx' +export { default } from './Instagram.jsx' +export type { InstagramOptions } from './Instagram.jsx' diff --git a/packages/@uppy/onedrive/src/OneDrive.tsx b/packages/@uppy/onedrive/src/OneDrive.tsx index bdfcfe2763..489748c5bf 100644 --- a/packages/@uppy/onedrive/src/OneDrive.tsx +++ b/packages/@uppy/onedrive/src/OneDrive.tsx @@ -14,7 +14,7 @@ import type { UnknownProviderPlugin, UnknownProviderPluginState, } from '@uppy/core/lib/Uppy.js' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/onedrive/src/index.ts b/packages/@uppy/onedrive/src/index.ts index 65ee4feddb..1da85640f3 100644 --- a/packages/@uppy/onedrive/src/index.ts +++ b/packages/@uppy/onedrive/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './OneDrive.tsx' -export type { OneDriveOptions } from './OneDrive.tsx' +export { default } from './OneDrive.jsx' +export type { OneDriveOptions } from './OneDrive.jsx' diff --git a/packages/@uppy/progress-bar/src/index.ts b/packages/@uppy/progress-bar/src/index.ts index e102c83588..748c4c93cf 100644 --- a/packages/@uppy/progress-bar/src/index.ts +++ b/packages/@uppy/progress-bar/src/index.ts @@ -1,3 +1,3 @@ -export { default } from './ProgressBar.tsx' +export { default } from './ProgressBar.jsx' -export type { ProgressBarOptions } from './ProgressBar.tsx' +export type { ProgressBarOptions } from './ProgressBar.jsx' diff --git a/packages/@uppy/provider-views/src/Breadcrumbs.tsx b/packages/@uppy/provider-views/src/Breadcrumbs.tsx index 621033da3c..16f2c39e21 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.ts' +import type ProviderView from './ProviderView/index.js' type BreadcrumbsProps = { openFolder: ProviderView['openFolder'] diff --git a/packages/@uppy/provider-views/src/Browser.tsx b/packages/@uppy/provider-views/src/Browser.tsx index fde01159c4..2deffdbe9d 100644 --- a/packages/@uppy/provider-views/src/Browser.tsx +++ b/packages/@uppy/provider-views/src/Browser.tsx @@ -10,8 +10,8 @@ import type { PartialTreeFolderNode, } from '@uppy/core/lib/Uppy.js' import { useEffect, useState } from 'preact/hooks' -import Item from './Item/index.tsx' -import ProviderView from './ProviderView/ProviderView.tsx' +import Item from './Item/index.jsx' +import ProviderView from './ProviderView/ProviderView.jsx' type BrowserProps = { displayedPartialTree: (PartialTreeFile | PartialTreeFolderNode)[] diff --git a/packages/@uppy/provider-views/src/FooterActions.tsx b/packages/@uppy/provider-views/src/FooterActions.tsx index db73fdd266..c215a6eaac 100644 --- a/packages/@uppy/provider-views/src/FooterActions.tsx +++ b/packages/@uppy/provider-views/src/FooterActions.tsx @@ -4,8 +4,8 @@ import type { Meta, Body } from '@uppy/utils/lib/UppyFile' import classNames from 'classnames' import type { PartialTree } from '@uppy/core/lib/Uppy.js' import { useMemo } from 'preact/hooks' -import getNumberOfSelectedFiles from './utils/PartialTreeUtils/getNumberOfSelectedFiles.ts' -import ProviderView from './ProviderView/ProviderView.tsx' +import getNumberOfSelectedFiles from './utils/PartialTreeUtils/getNumberOfSelectedFiles.js' +import ProviderView from './ProviderView/ProviderView.jsx' export default function FooterActions({ cancelSelection, diff --git a/packages/@uppy/provider-views/src/Item/components/GridItem.tsx b/packages/@uppy/provider-views/src/Item/components/GridItem.tsx index e2593fbb62..6ec3930a50 100644 --- a/packages/@uppy/provider-views/src/Item/components/GridItem.tsx +++ b/packages/@uppy/provider-views/src/Item/components/GridItem.tsx @@ -3,7 +3,7 @@ import type { PartialTreeFile, PartialTreeFolderNode, } from '@uppy/core/lib/Uppy.js' -import ItemIcon from './ItemIcon.tsx' +import ItemIcon from './ItemIcon.jsx' type GridItemProps = { file: PartialTreeFile | PartialTreeFolderNode diff --git a/packages/@uppy/provider-views/src/Item/components/ListItem.tsx b/packages/@uppy/provider-views/src/Item/components/ListItem.tsx index 8c7fc03297..6185953fd3 100644 --- a/packages/@uppy/provider-views/src/Item/components/ListItem.tsx +++ b/packages/@uppy/provider-views/src/Item/components/ListItem.tsx @@ -4,7 +4,7 @@ import type { PartialTreeId, } from '@uppy/core/lib/Uppy.js' import { h } from 'preact' -import ItemIcon from './ItemIcon.tsx' +import ItemIcon from './ItemIcon.jsx' // if folder: // + checkbox (selects all files from folder) diff --git a/packages/@uppy/provider-views/src/Item/index.tsx b/packages/@uppy/provider-views/src/Item/index.tsx index 879e8a24a6..094bbbf655 100644 --- a/packages/@uppy/provider-views/src/Item/index.tsx +++ b/packages/@uppy/provider-views/src/Item/index.tsx @@ -8,8 +8,8 @@ import type { PartialTreeFolderNode, PartialTreeId, } from '@uppy/core/lib/Uppy.js' -import GridItem from './components/GridItem.tsx' -import ListItem from './components/ListItem.tsx' +import GridItem from './components/GridItem.jsx' +import ListItem from './components/ListItem.jsx' type ItemProps = { file: PartialTreeFile | PartialTreeFolderNode diff --git a/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx b/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx index 103e85b596..4a07909a82 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 { I18n } from '@uppy/utils/lib/Translator' -import type { Opts } from './ProviderView.ts' -import type ProviderViews from './ProviderView.ts' +import type { Opts } from './ProviderView.js' +import type ProviderViews from './ProviderView.js' 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 3184e44497..1dc897e581 100644 --- a/packages/@uppy/provider-views/src/ProviderView/Header.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/Header.tsx @@ -4,9 +4,9 @@ import type { I18n } from '@uppy/utils/lib/Translator' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' 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.ts' +import User from './User.jsx' +import Breadcrumbs from '../Breadcrumbs.jsx' +import type ProviderView from './ProviderView.js' type HeaderProps = { showBreadcrumbs: boolean diff --git a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx b/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx index dba9e2fb76..11076f3cf0 100644 --- a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx @@ -14,22 +14,22 @@ import classNames from 'classnames' import type { ValidateableFile } from '@uppy/core/lib/Restricter.js' import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal' import type { I18n } from '@uppy/utils/lib/Translator' -import AuthView from './AuthView.tsx' -import Header from './Header.tsx' -import Browser from '../Browser.tsx' +import AuthView from './AuthView.jsx' +import Header from './Header.jsx' +import Browser from '../Browser.jsx' // 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' -import PartialTreeUtils from '../utils/PartialTreeUtils/index.ts' -import shouldHandleScroll from '../utils/shouldHandleScroll.ts' -import handleError from '../utils/handleError.ts' -import getClickedRange from '../utils/getClickedRange.ts' -import SearchInput from '../SearchInput.tsx' -import FooterActions from '../FooterActions.tsx' -import addFiles from '../utils/addFiles.ts' -import getCheckedFilesWithPaths from '../utils/PartialTreeUtils/getCheckedFilesWithPaths.ts' -import getBreadcrumbs from '../utils/PartialTreeUtils/getBreadcrumbs.ts' +import PartialTreeUtils from '../utils/PartialTreeUtils/index.js' +import shouldHandleScroll from '../utils/shouldHandleScroll.js' +import handleError from '../utils/handleError.js' +import getClickedRange from '../utils/getClickedRange.js' +import SearchInput from '../SearchInput.jsx' +import FooterActions from '../FooterActions.jsx' +import addFiles from '../utils/addFiles.js' +import getCheckedFilesWithPaths from '../utils/PartialTreeUtils/getCheckedFilesWithPaths.js' +import getBreadcrumbs from '../utils/PartialTreeUtils/getBreadcrumbs.js' export function defaultPickerIcon(): h.JSX.Element { return ( diff --git a/packages/@uppy/provider-views/src/ProviderView/index.ts b/packages/@uppy/provider-views/src/ProviderView/index.ts index b42ce91cfc..3135e9e7e0 100644 --- a/packages/@uppy/provider-views/src/ProviderView/index.ts +++ b/packages/@uppy/provider-views/src/ProviderView/index.ts @@ -1 +1 @@ -export { default, defaultPickerIcon } from './ProviderView.tsx' +export { default, defaultPickerIcon } from './ProviderView.jsx' diff --git a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx index 786bafb59d..a13f0fa8de 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx +++ b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx @@ -13,19 +13,19 @@ import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' import classNames from 'classnames' import type { ValidateableFile } from '@uppy/core/lib/Restricter.js' import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal' -import SearchInput from '../SearchInput.tsx' -import Browser from '../Browser.tsx' +import SearchInput from '../SearchInput.jsx' +import Browser from '../Browser.jsx' // 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' -import PartialTreeUtils from '../utils/PartialTreeUtils/index.ts' -import shouldHandleScroll from '../utils/shouldHandleScroll.ts' -import handleError from '../utils/handleError.ts' -import getClickedRange from '../utils/getClickedRange.ts' -import FooterActions from '../FooterActions.tsx' -import addFiles from '../utils/addFiles.ts' -import getCheckedFilesWithPaths from '../utils/PartialTreeUtils/getCheckedFilesWithPaths.ts' +import PartialTreeUtils from '../utils/PartialTreeUtils/index.js' +import shouldHandleScroll from '../utils/shouldHandleScroll.js' +import handleError from '../utils/handleError.js' +import getClickedRange from '../utils/getClickedRange.js' +import FooterActions from '../FooterActions.jsx' +import addFiles from '../utils/addFiles.js' +import getCheckedFilesWithPaths from '../utils/PartialTreeUtils/getCheckedFilesWithPaths.js' const defaultState: UnknownSearchProviderPluginState = { loading: false, diff --git a/packages/@uppy/provider-views/src/SearchProviderView/index.ts b/packages/@uppy/provider-views/src/SearchProviderView/index.ts index bb8dca1cc7..d73f11f4ba 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/index.ts +++ b/packages/@uppy/provider-views/src/SearchProviderView/index.ts @@ -1 +1 @@ -export { default } from './SearchProviderView.tsx' +export { default } from './SearchProviderView.jsx' diff --git a/packages/@uppy/provider-views/src/index.ts b/packages/@uppy/provider-views/src/index.ts index 98f6d95e9b..7708809e83 100644 --- a/packages/@uppy/provider-views/src/index.ts +++ b/packages/@uppy/provider-views/src/index.ts @@ -1,10 +1,10 @@ export { default as ProviderViews, defaultPickerIcon, -} from './ProviderView/index.ts' +} from './ProviderView/index.js' -export { default as SearchProviderViews } from './SearchProviderView/index.ts' +export { default as SearchProviderViews } from './SearchProviderView/index.js' -export { default as SearchInput } from './SearchInput.tsx' +export { default as SearchInput } from './SearchInput.jsx' -export { default as GooglePickerView } from './GooglePicker/GooglePickerView.tsx' +export { default as GooglePickerView } from './GooglePicker/GooglePickerView.jsx' diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts index af087b789f..417dbd76e8 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts @@ -10,7 +10,7 @@ import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' // 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' +import shallowClone from './shallowClone.js' export interface ApiList { (directory: PartialTreeId): Promise<{ diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts index 3d5da3ac28..ccb2d736d6 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts @@ -6,7 +6,7 @@ import type { PartialTreeFolderNode, PartialTreeId, } from '@uppy/core/lib/Uppy.js' -import shallowClone from './shallowClone.ts' +import shallowClone from './shallowClone.js' /* FROM | TO diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts index fc1845a632..3d813cb004 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts @@ -8,13 +8,13 @@ import type { PartialTreeFolderRoot, PartialTreeId, } from '@uppy/core/lib/Uppy.js' -import afterToggleCheckbox from './afterToggleCheckbox.ts' -import afterOpenFolder from './afterOpenFolder.ts' -import afterScrollFolder from './afterScrollFolder.ts' -import afterFill from './afterFill.ts' -import getCheckedFilesWithPaths from './getCheckedFilesWithPaths.ts' -import getNumberOfSelectedFiles from './getNumberOfSelectedFiles.ts' -import getBreadcrumbs from './getBreadcrumbs.ts' +import afterToggleCheckbox from './afterToggleCheckbox.js' +import afterOpenFolder from './afterOpenFolder.js' +import afterScrollFolder from './afterScrollFolder.js' +import afterFill from './afterFill.js' +import getCheckedFilesWithPaths from './getCheckedFilesWithPaths.js' +import getNumberOfSelectedFiles from './getNumberOfSelectedFiles.js' +import getBreadcrumbs from './getBreadcrumbs.js' const _root = (id: string, options: any = {}): PartialTreeFolderRoot => ({ type: 'root', diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.ts index 75af88923f..de3adb1648 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.ts @@ -1,7 +1,7 @@ -import afterOpenFolder from './afterOpenFolder.ts' -import afterScrollFolder from './afterScrollFolder.ts' -import afterToggleCheckbox from './afterToggleCheckbox.ts' -import afterFill from './afterFill.ts' +import afterOpenFolder from './afterOpenFolder.js' +import afterScrollFolder from './afterScrollFolder.js' +import afterToggleCheckbox from './afterToggleCheckbox.js' +import afterFill from './afterFill.js' export default { afterOpenFolder, diff --git a/packages/@uppy/provider-views/src/utils/addFiles.ts b/packages/@uppy/provider-views/src/utils/addFiles.ts index f5b4939451..19390fded8 100644 --- a/packages/@uppy/provider-views/src/utils/addFiles.ts +++ b/packages/@uppy/provider-views/src/utils/addFiles.ts @@ -6,7 +6,7 @@ import type { import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' import type { Meta, Body, TagFile } from '@uppy/utils/lib/UppyFile' import { getSafeFileId } from '@uppy/utils/lib/generateFileID' -import getTagFile from './getTagFile.ts' +import getTagFile from './getTagFile.js' const addFiles = ( companionFiles: CompanionFile[], diff --git a/packages/@uppy/react/src/Dashboard.ts b/packages/@uppy/react/src/Dashboard.ts index c4769b0f6a..8a135c7777 100644 --- a/packages/@uppy/react/src/Dashboard.ts +++ b/packages/@uppy/react/src/Dashboard.ts @@ -4,8 +4,8 @@ import type { UnknownPlugin, Uppy } from '@uppy/core' import DashboardPlugin from '@uppy/dashboard' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { DashboardOptions } from '@uppy/dashboard' -import getHTMLProps from './getHTMLProps.ts' -import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.ts' +import getHTMLProps from './getHTMLProps.js' +import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' type DashboardInlineOptions = Omit< DashboardOptions & { inline: true }, diff --git a/packages/@uppy/react/src/DashboardModal.ts b/packages/@uppy/react/src/DashboardModal.ts index 00c744406c..401fc3581f 100644 --- a/packages/@uppy/react/src/DashboardModal.ts +++ b/packages/@uppy/react/src/DashboardModal.ts @@ -3,8 +3,8 @@ import type React from 'react' import DashboardPlugin, { type DashboardOptions } from '@uppy/dashboard' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' import type { Uppy } from '@uppy/core' -import getHTMLProps from './getHTMLProps.ts' -import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.ts' +import getHTMLProps from './getHTMLProps.js' +import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' type DashboardInlineOptions = Omit< DashboardOptions & { inline: false }, diff --git a/packages/@uppy/react/src/DragDrop.ts b/packages/@uppy/react/src/DragDrop.ts index 968c21e701..19aed54565 100644 --- a/packages/@uppy/react/src/DragDrop.ts +++ b/packages/@uppy/react/src/DragDrop.ts @@ -2,8 +2,8 @@ import { createElement as h, Component } from 'react' import type { UnknownPlugin, Uppy } from '@uppy/core' import DragDropPlugin, { type DragDropOptions } from '@uppy/drag-drop' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import getHTMLProps from './getHTMLProps.ts' -import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.ts' +import getHTMLProps from './getHTMLProps.js' +import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' interface DragDropProps extends DragDropOptions { diff --git a/packages/@uppy/react/src/ProgressBar.ts b/packages/@uppy/react/src/ProgressBar.ts index e66023718f..ec528b83c5 100644 --- a/packages/@uppy/react/src/ProgressBar.ts +++ b/packages/@uppy/react/src/ProgressBar.ts @@ -2,8 +2,8 @@ import { createElement as h, Component } from 'react' import type { UnknownPlugin, Uppy } from '@uppy/core' import ProgressBarPlugin, { type ProgressBarOptions } from '@uppy/progress-bar' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import getHTMLProps from './getHTMLProps.ts' -import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.ts' +import getHTMLProps from './getHTMLProps.js' +import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' interface ProgressBarProps extends ProgressBarOptions { diff --git a/packages/@uppy/react/src/StatusBar.ts b/packages/@uppy/react/src/StatusBar.ts index c5e3fb9c39..8a35e7cc26 100644 --- a/packages/@uppy/react/src/StatusBar.ts +++ b/packages/@uppy/react/src/StatusBar.ts @@ -2,8 +2,8 @@ import { createElement as h, Component } from 'react' import type { UnknownPlugin, Uppy } from '@uppy/core' import StatusBarPlugin, { type StatusBarOptions } from '@uppy/status-bar' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import getHTMLProps from './getHTMLProps.ts' -import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.ts' +import getHTMLProps from './getHTMLProps.js' +import nonHtmlPropsHaveChanged from './nonHtmlPropsHaveChanged.js' interface StatusBarProps extends StatusBarOptions { diff --git a/packages/@uppy/react/src/getHTMLProps.ts b/packages/@uppy/react/src/getHTMLProps.ts index 54af2d7577..9af6b6a09b 100644 --- a/packages/@uppy/react/src/getHTMLProps.ts +++ b/packages/@uppy/react/src/getHTMLProps.ts @@ -1,5 +1,5 @@ // List taken from React.HTMLAttributes supported properties: -// https://unpkg.com/@types/react@17.0.22/index.d.ts:1821 +// https://unpkg.com/@types/react@17.0.22/index.d.js:1821 const reactSupportedHtmlAttr = [ // React-specific Attributes 'defaultChecked', diff --git a/packages/@uppy/react/src/index.ts b/packages/@uppy/react/src/index.ts index 818c8db46f..bea50afd88 100644 --- a/packages/@uppy/react/src/index.ts +++ b/packages/@uppy/react/src/index.ts @@ -1,8 +1,8 @@ -export { default as Dashboard } from './Dashboard.ts' -export { default as DashboardModal } from './DashboardModal.ts' -export { default as DragDrop } from './DragDrop.ts' -export { default as ProgressBar } from './ProgressBar.ts' -export { default as StatusBar } from './StatusBar.ts' -export { default as FileInput } from './FileInput.ts' -export { default as useUppyState } from './useUppyState.ts' -export { default as useUppyEvent } from './useUppyEvent.ts' +export { default as Dashboard } from './Dashboard.js' +export { default as DashboardModal } from './DashboardModal.js' +export { default as DragDrop } from './DragDrop.js' +export { default as ProgressBar } from './ProgressBar.js' +export { default as StatusBar } from './StatusBar.js' +export { default as FileInput } from './FileInput.js' +export { default as useUppyState } from './useUppyState.js' +export { default as useUppyEvent } from './useUppyEvent.js' diff --git a/packages/@uppy/react/src/nonHtmlPropsHaveChanged.ts b/packages/@uppy/react/src/nonHtmlPropsHaveChanged.ts index 86e12cf885..87afecb349 100644 --- a/packages/@uppy/react/src/nonHtmlPropsHaveChanged.ts +++ b/packages/@uppy/react/src/nonHtmlPropsHaveChanged.ts @@ -1,4 +1,4 @@ -import getHTMLProps from './getHTMLProps.ts' +import getHTMLProps from './getHTMLProps.js' export default function nonHtmlPropsHaveChanged< T extends Record, diff --git a/packages/@uppy/react/src/useUppyEvent.test.ts b/packages/@uppy/react/src/useUppyEvent.test.ts index 44656c1e0b..3dc299fe00 100644 --- a/packages/@uppy/react/src/useUppyEvent.test.ts +++ b/packages/@uppy/react/src/useUppyEvent.test.ts @@ -5,7 +5,7 @@ import { renderHook, act } from '@testing-library/react' import Uppy from '@uppy/core' import type { Meta, UppyFile } from '@uppy/utils/lib/UppyFile' -import { useUppyEvent } from './index.ts' +import { useUppyEvent } from './index.js' describe('useUppyEvent', () => { it('should return and update value with the correct type', () => { diff --git a/packages/@uppy/react/src/useUppyState.test.tsx b/packages/@uppy/react/src/useUppyState.test.tsx index 7a8d376319..81d4ef3b06 100644 --- a/packages/@uppy/react/src/useUppyState.test.tsx +++ b/packages/@uppy/react/src/useUppyState.test.tsx @@ -5,7 +5,7 @@ import { describe, expect, expectTypeOf, it } from 'vitest' import { renderHook, render, act } from '@testing-library/react' import Uppy from '@uppy/core' -import useUppyState from './useUppyState.ts' +import useUppyState from './useUppyState.js' describe('useUppyState', () => { it('should return and update value with the correct type', () => { diff --git a/packages/@uppy/remote-sources/src/index.test.ts b/packages/@uppy/remote-sources/src/index.test.ts index 09f2f09374..0faec72626 100644 --- a/packages/@uppy/remote-sources/src/index.test.ts +++ b/packages/@uppy/remote-sources/src/index.test.ts @@ -2,7 +2,7 @@ import { afterAll, beforeAll, describe, expect, it } from 'vitest' import resizeObserverPolyfill from 'resize-observer-polyfill' import Core from '@uppy/core' import Dashboard from '@uppy/dashboard' -import RemoteSources from './index.ts' +import RemoteSources from './index.js' describe('RemoteSources', () => { beforeAll(() => { diff --git a/packages/@uppy/screen-capture/src/RecorderScreen.tsx b/packages/@uppy/screen-capture/src/RecorderScreen.tsx index a4f178e850..a59079583a 100644 --- a/packages/@uppy/screen-capture/src/RecorderScreen.tsx +++ b/packages/@uppy/screen-capture/src/RecorderScreen.tsx @@ -1,12 +1,12 @@ /* eslint-disable react/jsx-props-no-spreading */ import { h, Component, type ComponentChild } from 'preact' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import RecordButton from './RecordButton.tsx' -import SubmitButton from './SubmitButton.tsx' -import StopWatch from './StopWatch.tsx' -import StreamStatus from './StreamStatus.tsx' +import RecordButton from './RecordButton.jsx' +import SubmitButton from './SubmitButton.jsx' +import StopWatch from './StopWatch.jsx' +import StreamStatus from './StreamStatus.jsx' -import ScreenCapture, { type ScreenCaptureState } from './ScreenCapture.tsx' +import ScreenCapture, { type ScreenCaptureState } from './ScreenCapture.jsx' type RecorderScreenProps = { onStartRecording: ScreenCapture['startRecording'] diff --git a/packages/@uppy/screen-capture/src/ScreenCapture.tsx b/packages/@uppy/screen-capture/src/ScreenCapture.tsx index 7414bed088..82d262ba77 100644 --- a/packages/@uppy/screen-capture/src/ScreenCapture.tsx +++ b/packages/@uppy/screen-capture/src/ScreenCapture.tsx @@ -3,13 +3,13 @@ import { UIPlugin, Uppy, type UIPluginOptions } from '@uppy/core' import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension' import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' import type { Body, Meta } from '@uppy/utils/lib/UppyFile' -import ScreenRecIcon from './ScreenRecIcon.tsx' -import RecorderScreen from './RecorderScreen.tsx' +import ScreenRecIcon from './ScreenRecIcon.jsx' +import RecorderScreen from './RecorderScreen.jsx' // 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' -import locale from './locale.ts' +import locale from './locale.js' // Check if screen capturing is supported. // mediaDevices is supprted on mobile Safari, getDisplayMedia is not diff --git a/packages/@uppy/screen-capture/src/index.ts b/packages/@uppy/screen-capture/src/index.ts index 60ff953d37..84fc694c32 100644 --- a/packages/@uppy/screen-capture/src/index.ts +++ b/packages/@uppy/screen-capture/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './ScreenCapture.tsx' -export type { ScreenCaptureOptions } from './ScreenCapture.tsx' +export { default } from './ScreenCapture.jsx' +export type { ScreenCaptureOptions } from './ScreenCapture.jsx' diff --git a/packages/@uppy/status-bar/src/Components.tsx b/packages/@uppy/status-bar/src/Components.tsx index 747e7c74a1..d7cfc49d3b 100644 --- a/packages/@uppy/status-bar/src/Components.tsx +++ b/packages/@uppy/status-bar/src/Components.tsx @@ -7,7 +7,7 @@ import classNames from 'classnames' import prettierBytes from '@transloadit/prettier-bytes' import prettyETA from '@uppy/utils/lib/prettyETA' -import statusBarStates from './StatusBarStates.ts' +import statusBarStates from './StatusBarStates.js' const DOT = `\u00B7` const renderDot = (): string => ` ${DOT} ` diff --git a/packages/@uppy/status-bar/src/StatusBar.tsx b/packages/@uppy/status-bar/src/StatusBar.tsx index 2027abcd06..300c3a71e0 100644 --- a/packages/@uppy/status-bar/src/StatusBar.tsx +++ b/packages/@uppy/status-bar/src/StatusBar.tsx @@ -5,13 +5,13 @@ import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' import { UIPlugin } from '@uppy/core' import emaFilter from '@uppy/utils/lib/emaFilter' import getTextDirection from '@uppy/utils/lib/getTextDirection' -import statusBarStates from './StatusBarStates.ts' -import StatusBarUI, { type StatusBarUIProps } from './StatusBarUI.tsx' +import statusBarStates from './StatusBarStates.js' +import StatusBarUI, { type StatusBarUIProps } from './StatusBarUI.jsx' // 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' -import locale from './locale.ts' -import type { StatusBarOptions } from './StatusBarOptions.ts' +import locale from './locale.js' +import type { StatusBarOptions } from './StatusBarOptions.js' 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 dcda6b4337..83e157da91 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.ts' +import type StatusBarLocale from './locale.js' export interface StatusBarOptions extends UIPluginOptions { showProgressDetails?: boolean diff --git a/packages/@uppy/status-bar/src/StatusBarUI.tsx b/packages/@uppy/status-bar/src/StatusBarUI.tsx index cbefede30b..6e7abc941d 100644 --- a/packages/@uppy/status-bar/src/StatusBarUI.tsx +++ b/packages/@uppy/status-bar/src/StatusBarUI.tsx @@ -3,8 +3,8 @@ import type { I18n } from '@uppy/utils/lib/Translator' import type { Uppy, State } from '@uppy/core/lib/Uppy.js' import { h } from 'preact' import classNames from 'classnames' -import statusBarStates from './StatusBarStates.ts' -import calculateProcessingProgress from './calculateProcessingProgress.ts' +import statusBarStates from './StatusBarStates.js' +import calculateProcessingProgress from './calculateProcessingProgress.js' import { UploadBtn, @@ -16,7 +16,7 @@ import { ProgressBarError, ProgressBarUploading, ProgressBarComplete, -} from './Components.tsx' +} from './Components.jsx' const { STATE_ERROR, diff --git a/packages/@uppy/status-bar/src/index.ts b/packages/@uppy/status-bar/src/index.ts index cb2777c496..885bc071fa 100644 --- a/packages/@uppy/status-bar/src/index.ts +++ b/packages/@uppy/status-bar/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './StatusBar.tsx' -export type { StatusBarOptions } from './StatusBarOptions.ts' +export { default } from './StatusBar.jsx' +export type { StatusBarOptions } from './StatusBarOptions.js' diff --git a/packages/@uppy/store-default/src/index.test.ts b/packages/@uppy/store-default/src/index.test.ts index 05ae9e5d82..7970ab0ece 100644 --- a/packages/@uppy/store-default/src/index.test.ts +++ b/packages/@uppy/store-default/src/index.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import assert from 'node:assert' -import DefaultStore, { type Listener, type GenericState } from './index.ts' +import DefaultStore, { type Listener, type GenericState } from './index.js' describe('DefaultStore', () => { it('cannot be created without new', () => { diff --git a/packages/@uppy/thumbnail-generator/src/index.ts b/packages/@uppy/thumbnail-generator/src/index.ts index 45ce9d3499..0c3aab4199 100644 --- a/packages/@uppy/thumbnail-generator/src/index.ts +++ b/packages/@uppy/thumbnail-generator/src/index.ts @@ -8,7 +8,7 @@ import { rotation } from 'exifr/dist/mini.esm.mjs' import type { DefinePluginOpts } from '@uppy/core/lib/BasePlugin.js' import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/transloadit/src/Assembly.ts b/packages/@uppy/transloadit/src/Assembly.ts index 9ec009273f..7676ace25a 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.ts' +import type { AssemblyResponse } from './index.js' 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 a179ab02b2..6982316dcc 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.ts' +import type { AssemblyResponse } from './index.js' /** * Track completion of multiple assemblies. diff --git a/packages/@uppy/transloadit/src/Client.ts b/packages/@uppy/transloadit/src/Client.ts index cde4d06191..abc6be7a72 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.ts' +} from './index.js' const ASSEMBLIES_ENDPOINT = '/assemblies' diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index 6ec52bbc2d..57de811284 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -6,11 +6,11 @@ import type { DefinePluginOpts, PluginOpts } from '@uppy/core/lib/BasePlugin.js' 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' -import Client, { AssemblyError } from './Client.ts' -import AssemblyWatcher from './AssemblyWatcher.ts' +import Assembly from './Assembly.js' +import Client, { AssemblyError } from './Client.js' +import AssemblyWatcher from './AssemblyWatcher.js' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/tus/src/index.test.ts b/packages/@uppy/tus/src/index.test.ts index a6759566b8..7bada9fabc 100644 --- a/packages/@uppy/tus/src/index.test.ts +++ b/packages/@uppy/tus/src/index.test.ts @@ -1,6 +1,6 @@ import { describe, expect, expectTypeOf, it } from 'vitest' import Core from '@uppy/core' -import Tus, { type TusBody } from './index.ts' +import Tus, { type TusBody } from './index.js' describe('Tus', () => { it('Throws errors if autoRetry option is true', () => { diff --git a/packages/@uppy/tus/src/index.ts b/packages/@uppy/tus/src/index.ts index c401177922..f4e62fe93b 100644 --- a/packages/@uppy/tus/src/index.ts +++ b/packages/@uppy/tus/src/index.ts @@ -18,7 +18,7 @@ import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile' import type { Uppy } from '@uppy/core' import type { RequestClient } from '@uppy/companion-client' import getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields' -import getFingerprint from './getFingerprint.ts' +import getFingerprint from './getFingerprint.js' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore We don't want TS to generate types for the package.json diff --git a/packages/@uppy/unsplash/src/Unsplash.tsx b/packages/@uppy/unsplash/src/Unsplash.tsx index a91dfcc1f3..e94af504ec 100644 --- a/packages/@uppy/unsplash/src/Unsplash.tsx +++ b/packages/@uppy/unsplash/src/Unsplash.tsx @@ -14,7 +14,7 @@ import type { UnknownSearchProviderPlugin, UnknownSearchProviderPluginState, } from '@uppy/core/lib/Uppy.js' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/unsplash/src/index.ts b/packages/@uppy/unsplash/src/index.ts index 7f3ab2b6dc..27482c8f03 100644 --- a/packages/@uppy/unsplash/src/index.ts +++ b/packages/@uppy/unsplash/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Unsplash.tsx' -export type { UnsplashOptions } from './Unsplash.tsx' +export { default } from './Unsplash.jsx' +export type { UnsplashOptions } from './Unsplash.jsx' diff --git a/packages/@uppy/url/src/Url.tsx b/packages/@uppy/url/src/Url.tsx index fd46450d0b..07d8799403 100644 --- a/packages/@uppy/url/src/Url.tsx +++ b/packages/@uppy/url/src/Url.tsx @@ -6,13 +6,13 @@ import { } from '@uppy/companion-client' import toArray from '@uppy/utils/lib/toArray' import type { TagFile, Meta, Body } from '@uppy/utils/lib/UppyFile' -import UrlUI from './UrlUI.tsx' -import forEachDroppedOrPastedUrl from './utils/forEachDroppedOrPastedUrl.ts' +import UrlUI from './UrlUI.jsx' +import forEachDroppedOrPastedUrl from './utils/forEachDroppedOrPastedUrl.js' // 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' -import locale from './locale.ts' +import locale from './locale.js' function UrlIcon() { return ( diff --git a/packages/@uppy/url/src/index.ts b/packages/@uppy/url/src/index.ts index 3d9355dd3a..e6c8836fca 100644 --- a/packages/@uppy/url/src/index.ts +++ b/packages/@uppy/url/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Url.tsx' -export type { UrlOptions } from './Url.tsx' +export { default } from './Url.jsx' +export type { UrlOptions } from './Url.jsx' diff --git a/packages/@uppy/utils/src/AbortController.test.ts b/packages/@uppy/utils/src/AbortController.test.ts index f807ee27b9..9ae956e585 100644 --- a/packages/@uppy/utils/src/AbortController.test.ts +++ b/packages/@uppy/utils/src/AbortController.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest' -import { AbortController, AbortSignal } from './AbortController.ts' +import { AbortController, AbortSignal } from './AbortController.js' function flushInstantTimeouts() { return new Promise((resolve) => setTimeout(resolve, 0)) diff --git a/packages/@uppy/utils/src/AbortController.ts b/packages/@uppy/utils/src/AbortController.ts index 361c2bfba2..64d7202067 100644 --- a/packages/@uppy/utils/src/AbortController.ts +++ b/packages/@uppy/utils/src/AbortController.ts @@ -1,4 +1,4 @@ -import hasOwnProperty from './hasProperty.ts' +import hasOwnProperty from './hasProperty.js' /** * Little AbortController proxy module so we can swap out the implementation easily later. */ diff --git a/packages/@uppy/utils/src/CompanionClientProvider.ts b/packages/@uppy/utils/src/CompanionClientProvider.ts index 98877c909d..669736e3de 100644 --- a/packages/@uppy/utils/src/CompanionClientProvider.ts +++ b/packages/@uppy/utils/src/CompanionClientProvider.ts @@ -1,4 +1,4 @@ -import type { CompanionFile } from './CompanionFile.ts' +import type { CompanionFile } from './CompanionFile.js' export type RequestOptions = { method?: string diff --git a/packages/@uppy/utils/src/ErrorWithCause.test.ts b/packages/@uppy/utils/src/ErrorWithCause.test.ts index 4a64fadf4b..20f1913e05 100644 --- a/packages/@uppy/utils/src/ErrorWithCause.test.ts +++ b/packages/@uppy/utils/src/ErrorWithCause.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' -import ErrorWithCause from './ErrorWithCause.ts' -import NetworkError from './NetworkError.ts' +import ErrorWithCause from './ErrorWithCause.js' +import NetworkError from './NetworkError.js' describe('ErrorWithCause', () => { it('should support a `{ cause }` option', () => { diff --git a/packages/@uppy/utils/src/ErrorWithCause.ts b/packages/@uppy/utils/src/ErrorWithCause.ts index 31a005b128..97dac72c61 100644 --- a/packages/@uppy/utils/src/ErrorWithCause.ts +++ b/packages/@uppy/utils/src/ErrorWithCause.ts @@ -1,5 +1,5 @@ -import type NetworkError from './NetworkError.ts' -import hasProperty from './hasProperty.ts' +import type NetworkError from './NetworkError.js' +import hasProperty from './hasProperty.js' class ErrorWithCause extends Error { public isNetworkError: boolean diff --git a/packages/@uppy/utils/src/RateLimitedQueue.test.ts b/packages/@uppy/utils/src/RateLimitedQueue.test.ts index 9acdb74f35..56ddd68625 100644 --- a/packages/@uppy/utils/src/RateLimitedQueue.test.ts +++ b/packages/@uppy/utils/src/RateLimitedQueue.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' -import { RateLimitedQueue } from './RateLimitedQueue.ts' -import delay from './delay.ts' +import { RateLimitedQueue } from './RateLimitedQueue.js' +import delay from './delay.js' describe('RateLimitedQueue', () => { let pending = 0 diff --git a/packages/@uppy/utils/src/Translator.test.ts b/packages/@uppy/utils/src/Translator.test.ts index e3bb67239c..be8c7a3541 100644 --- a/packages/@uppy/utils/src/Translator.test.ts +++ b/packages/@uppy/utils/src/Translator.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import Translator, { type Locale } from './Translator.ts' +import Translator, { type Locale } from './Translator.js' const english: Locale<0 | 1> = { strings: { diff --git a/packages/@uppy/utils/src/UppyFile.ts b/packages/@uppy/utils/src/UppyFile.ts index 8867c53306..0e51963585 100644 --- a/packages/@uppy/utils/src/UppyFile.ts +++ b/packages/@uppy/utils/src/UppyFile.ts @@ -1,4 +1,4 @@ -import type { FileProgress } from './FileProgress.ts' +import type { FileProgress } from './FileProgress.js' export type Meta = Record @@ -51,7 +51,7 @@ export type MinimalRequiredUppyFile = Required< Partial< Omit, 'name' | 'data' | 'meta'> // We want to omit the 'meta' from UppyFile because of internal metadata - // (see InternalMetadata in `UppyFile.ts`), as when adding a new file + // (see InternalMetadata in `UppyFile.js`), as when adding a new file // that is not required. > & { meta?: M; data: { size: number | null } } diff --git a/packages/@uppy/utils/src/dataURItoBlob.test.ts b/packages/@uppy/utils/src/dataURItoBlob.test.ts index bafbb64800..95145d1365 100644 --- a/packages/@uppy/utils/src/dataURItoBlob.test.ts +++ b/packages/@uppy/utils/src/dataURItoBlob.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' -import dataURItoBlob from './dataURItoBlob.ts' -import sampleImageDataURI from './sampleImageDataURI.ts' +import dataURItoBlob from './dataURItoBlob.js' +import sampleImageDataURI from './sampleImageDataURI.js' describe('dataURItoBlob', () => { it('should convert a data uri to a blob', () => { diff --git a/packages/@uppy/utils/src/dataURItoFile.test.ts b/packages/@uppy/utils/src/dataURItoFile.test.ts index 10e1e2abea..4120267505 100644 --- a/packages/@uppy/utils/src/dataURItoFile.test.ts +++ b/packages/@uppy/utils/src/dataURItoFile.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' -import dataURItoFile from './dataURItoFile.ts' -import sampleImageDataURI from './sampleImageDataURI.ts' +import dataURItoFile from './dataURItoFile.js' +import sampleImageDataURI from './sampleImageDataURI.js' describe('dataURItoFile', () => { it('should convert a data uri to a file', () => { diff --git a/packages/@uppy/utils/src/dataURItoFile.ts b/packages/@uppy/utils/src/dataURItoFile.ts index c3ceffa3f9..0d50537445 100644 --- a/packages/@uppy/utils/src/dataURItoFile.ts +++ b/packages/@uppy/utils/src/dataURItoFile.ts @@ -1,4 +1,4 @@ -import dataURItoBlob from './dataURItoBlob.ts' +import dataURItoBlob from './dataURItoBlob.js' export default function dataURItoFile( dataURI: string, diff --git a/packages/@uppy/utils/src/delay.test.ts b/packages/@uppy/utils/src/delay.test.ts index 54cc3cd631..777c1cff61 100644 --- a/packages/@uppy/utils/src/delay.test.ts +++ b/packages/@uppy/utils/src/delay.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' -import { AbortController } from './AbortController.ts' -import delay from './delay.ts' +import { AbortController } from './AbortController.js' +import delay from './delay.js' describe('delay', () => { it('should wait for the specified time', async () => { diff --git a/packages/@uppy/utils/src/delay.ts b/packages/@uppy/utils/src/delay.ts index 6e35ee9326..6da80868ea 100644 --- a/packages/@uppy/utils/src/delay.ts +++ b/packages/@uppy/utils/src/delay.ts @@ -1,4 +1,4 @@ -import { createAbortError } from './AbortController.ts' +import { createAbortError } from './AbortController.js' /** * Return a Promise that resolves after `ms` milliseconds. diff --git a/packages/@uppy/utils/src/emaFilter.test.ts b/packages/@uppy/utils/src/emaFilter.test.ts index f9abc631bd..cb477e5875 100644 --- a/packages/@uppy/utils/src/emaFilter.test.ts +++ b/packages/@uppy/utils/src/emaFilter.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import emaFilter from './emaFilter.ts' +import emaFilter from './emaFilter.js' describe('emaFilter', () => { it('should calculate the exponential average', () => { diff --git a/packages/@uppy/utils/src/fetchWithNetworkError.ts b/packages/@uppy/utils/src/fetchWithNetworkError.ts index bf392ac618..76b25169e9 100644 --- a/packages/@uppy/utils/src/fetchWithNetworkError.ts +++ b/packages/@uppy/utils/src/fetchWithNetworkError.ts @@ -1,4 +1,4 @@ -import NetworkError from './NetworkError.ts' +import NetworkError from './NetworkError.js' /** * Wrapper around window.fetch that throws a NetworkError when appropriate diff --git a/packages/@uppy/utils/src/fetcher.ts b/packages/@uppy/utils/src/fetcher.ts index c600f71552..d96a9f1b64 100644 --- a/packages/@uppy/utils/src/fetcher.ts +++ b/packages/@uppy/utils/src/fetcher.ts @@ -1,5 +1,5 @@ -import NetworkError from './NetworkError.ts' -import ProgressTimeout from './ProgressTimeout.ts' +import NetworkError from './NetworkError.js' +import ProgressTimeout from './ProgressTimeout.js' const noop = (): void => {} diff --git a/packages/@uppy/utils/src/fileFilters.ts b/packages/@uppy/utils/src/fileFilters.ts index 2ffd041e96..415bdef7a3 100644 --- a/packages/@uppy/utils/src/fileFilters.ts +++ b/packages/@uppy/utils/src/fileFilters.ts @@ -1,4 +1,4 @@ -import type { UppyFile } from './UppyFile.ts' +import type { UppyFile } from './UppyFile.js' export function filterNonFailedFiles( files: UppyFile[], diff --git a/packages/@uppy/utils/src/findAllDOMElements.ts b/packages/@uppy/utils/src/findAllDOMElements.ts index 2701bf63b9..f9b0edd857 100644 --- a/packages/@uppy/utils/src/findAllDOMElements.ts +++ b/packages/@uppy/utils/src/findAllDOMElements.ts @@ -1,4 +1,4 @@ -import isDOMElement from './isDOMElement.ts' +import isDOMElement from './isDOMElement.js' function findAllDOMElements( element: T, diff --git a/packages/@uppy/utils/src/findDOMElement.ts b/packages/@uppy/utils/src/findDOMElement.ts index b5c0a3b763..a285f56b07 100644 --- a/packages/@uppy/utils/src/findDOMElement.ts +++ b/packages/@uppy/utils/src/findDOMElement.ts @@ -1,4 +1,4 @@ -import isDOMElement from './isDOMElement.ts' +import isDOMElement from './isDOMElement.js' function findDOMElement( element: T, diff --git a/packages/@uppy/utils/src/generateFileID.ts b/packages/@uppy/utils/src/generateFileID.ts index 115f346995..d6c6448480 100644 --- a/packages/@uppy/utils/src/generateFileID.ts +++ b/packages/@uppy/utils/src/generateFileID.ts @@ -1,5 +1,5 @@ -import type { MinimalRequiredUppyFile, UppyFile } from './UppyFile.ts' -import getFileType from './getFileType.ts' +import type { MinimalRequiredUppyFile, UppyFile } from './UppyFile.js' +import getFileType from './getFileType.js' function encodeCharacter(character: string): string { return character.charCodeAt(0).toString(32) diff --git a/packages/@uppy/utils/src/getAllowedMetaFields.ts b/packages/@uppy/utils/src/getAllowedMetaFields.ts index 423e92307d..ffdd5bf78c 100644 --- a/packages/@uppy/utils/src/getAllowedMetaFields.ts +++ b/packages/@uppy/utils/src/getAllowedMetaFields.ts @@ -1,4 +1,4 @@ -import type { Meta } from './UppyFile.ts' +import type { Meta } from './UppyFile.js' export default function getAllowedMetaFields( fields: string[] | boolean, diff --git a/packages/@uppy/utils/src/getBytesRemaining.test.ts b/packages/@uppy/utils/src/getBytesRemaining.test.ts index f08c560915..cf49c3a501 100644 --- a/packages/@uppy/utils/src/getBytesRemaining.test.ts +++ b/packages/@uppy/utils/src/getBytesRemaining.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import getBytesRemaining from './getBytesRemaining.ts' +import getBytesRemaining from './getBytesRemaining.js' describe('getBytesRemaining', () => { it('should calculate the bytes remaining given a fileProgress object', () => { diff --git a/packages/@uppy/utils/src/getBytesRemaining.ts b/packages/@uppy/utils/src/getBytesRemaining.ts index 5c21183b04..fdb0e97b18 100644 --- a/packages/@uppy/utils/src/getBytesRemaining.ts +++ b/packages/@uppy/utils/src/getBytesRemaining.ts @@ -1,4 +1,4 @@ -import type { FileProgress } from './FileProgress.ts' +import type { FileProgress } from './FileProgress.js' export default function getBytesRemaining(fileProgress: FileProgress): number { if (fileProgress.bytesTotal == null) return 0 diff --git a/packages/@uppy/utils/src/getDroppedFiles/index.ts b/packages/@uppy/utils/src/getDroppedFiles/index.ts index f3839dd4f8..0d98ad19eb 100644 --- a/packages/@uppy/utils/src/getDroppedFiles/index.ts +++ b/packages/@uppy/utils/src/getDroppedFiles/index.ts @@ -1,5 +1,5 @@ -import webkitGetAsEntryApi from './utils/webkitGetAsEntryApi/index.ts' -import fallbackApi from './utils/fallbackApi.ts' +import webkitGetAsEntryApi from './utils/webkitGetAsEntryApi/index.js' +import fallbackApi from './utils/fallbackApi.js' /** * Returns a promise that resolves to the array of dropped files (if a folder is diff --git a/packages/@uppy/utils/src/getDroppedFiles/utils/fallbackApi.ts b/packages/@uppy/utils/src/getDroppedFiles/utils/fallbackApi.ts index ebbba9d6bf..750ec13e32 100644 --- a/packages/@uppy/utils/src/getDroppedFiles/utils/fallbackApi.ts +++ b/packages/@uppy/utils/src/getDroppedFiles/utils/fallbackApi.ts @@ -1,4 +1,4 @@ -import toArray from '../../toArray.ts' +import toArray from '../../toArray.js' // .files fallback, should be implemented in any browser export default function fallbackApi( diff --git a/packages/@uppy/utils/src/getDroppedFiles/utils/webkitGetAsEntryApi/index.ts b/packages/@uppy/utils/src/getDroppedFiles/utils/webkitGetAsEntryApi/index.ts index aa9e7b0009..ff9a84e23c 100644 --- a/packages/@uppy/utils/src/getDroppedFiles/utils/webkitGetAsEntryApi/index.ts +++ b/packages/@uppy/utils/src/getDroppedFiles/utils/webkitGetAsEntryApi/index.ts @@ -1,4 +1,4 @@ -import getFilesAndDirectoriesFromDirectory from './getFilesAndDirectoriesFromDirectory.ts' +import getFilesAndDirectoriesFromDirectory from './getFilesAndDirectoriesFromDirectory.js' interface FileSystemFileHandle extends FileSystemHandle { getFile(): Promise diff --git a/packages/@uppy/utils/src/getETA.ts b/packages/@uppy/utils/src/getETA.ts index e85416aeec..c0d95024fb 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.ts' +import getSpeed from './getSpeed.js' +import getBytesRemaining from './getBytesRemaining.js' +import type { FileProgress } from './FileProgress.js' export default function getETA(fileProgress: FileProgress): number { if (!fileProgress.bytesUploaded) return 0 diff --git a/packages/@uppy/utils/src/getFileNameAndExtension.test.ts b/packages/@uppy/utils/src/getFileNameAndExtension.test.ts index d87a0315f1..6821892be8 100644 --- a/packages/@uppy/utils/src/getFileNameAndExtension.test.ts +++ b/packages/@uppy/utils/src/getFileNameAndExtension.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import getFileNameAndExtension from './getFileNameAndExtension.ts' +import getFileNameAndExtension from './getFileNameAndExtension.js' describe('getFileNameAndExtension', () => { it('should return the filename and extension as an array', () => { diff --git a/packages/@uppy/utils/src/getFileType.test.ts b/packages/@uppy/utils/src/getFileType.test.ts index 2316961b21..ede9ea3198 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.ts' +import getFileType from './getFileType.js' +import type { UppyFile } from './UppyFile.js' describe('getFileType', () => { it('should trust the filetype if the file comes from a remote source', () => { diff --git a/packages/@uppy/utils/src/getFileType.ts b/packages/@uppy/utils/src/getFileType.ts index 96c44c1dd5..45245c134f 100644 --- a/packages/@uppy/utils/src/getFileType.ts +++ b/packages/@uppy/utils/src/getFileType.ts @@ -1,5 +1,5 @@ -import getFileNameAndExtension from './getFileNameAndExtension.ts' -import mimeTypes from './mimeTypes.ts' +import getFileNameAndExtension from './getFileNameAndExtension.js' +import mimeTypes from './mimeTypes.js' export default function getFileType(file: { type?: string diff --git a/packages/@uppy/utils/src/getFileTypeExtension.test.ts b/packages/@uppy/utils/src/getFileTypeExtension.test.ts index 6326d4a19e..4f44a91310 100644 --- a/packages/@uppy/utils/src/getFileTypeExtension.test.ts +++ b/packages/@uppy/utils/src/getFileTypeExtension.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import getFileTypeExtension from './getFileTypeExtension.ts' +import getFileTypeExtension from './getFileTypeExtension.js' describe('getFileTypeExtension', () => { it('should return the filetype based on the specified mime type', () => { diff --git a/packages/@uppy/utils/src/getSocketHost.test.ts b/packages/@uppy/utils/src/getSocketHost.test.ts index f0293977b6..dc7131ce9e 100644 --- a/packages/@uppy/utils/src/getSocketHost.test.ts +++ b/packages/@uppy/utils/src/getSocketHost.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import getSocketHost from './getSocketHost.ts' +import getSocketHost from './getSocketHost.js' describe('getSocketHost', () => { it('should get the host from the specified url', () => { diff --git a/packages/@uppy/utils/src/getSpeed.test.ts b/packages/@uppy/utils/src/getSpeed.test.ts index fed19d5074..0531cd47c3 100644 --- a/packages/@uppy/utils/src/getSpeed.test.ts +++ b/packages/@uppy/utils/src/getSpeed.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import getSpeed from './getSpeed.ts' +import getSpeed from './getSpeed.js' describe('getSpeed', () => { it('should calculate the speed given a fileProgress object', () => { diff --git a/packages/@uppy/utils/src/getSpeed.ts b/packages/@uppy/utils/src/getSpeed.ts index e04aa0ef41..9520f0f007 100644 --- a/packages/@uppy/utils/src/getSpeed.ts +++ b/packages/@uppy/utils/src/getSpeed.ts @@ -1,4 +1,4 @@ -import type { FileProgress } from './FileProgress.ts' +import type { FileProgress } from './FileProgress.js' export default function getSpeed(fileProgress: FileProgress): number { if (!fileProgress.bytesUploaded) return 0 diff --git a/packages/@uppy/utils/src/isMobileDevice.test.ts b/packages/@uppy/utils/src/isMobileDevice.test.ts index d6ee41914f..d856b1a538 100644 --- a/packages/@uppy/utils/src/isMobileDevice.test.ts +++ b/packages/@uppy/utils/src/isMobileDevice.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import isMobileDevice from './isMobileDevice.ts' +import isMobileDevice from './isMobileDevice.js' let fakeUserAgent: string | null = null diff --git a/packages/@uppy/utils/src/isNetworkError.test.ts b/packages/@uppy/utils/src/isNetworkError.test.ts index c7715cffd5..bfe755d1a9 100644 --- a/packages/@uppy/utils/src/isNetworkError.test.ts +++ b/packages/@uppy/utils/src/isNetworkError.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import isNetworkError from './isNetworkError.ts' +import isNetworkError from './isNetworkError.js' describe('isNetworkError', () => { it('should return true if the specified xhr object contains a network error', () => { diff --git a/packages/@uppy/utils/src/isObjectURL.test.ts b/packages/@uppy/utils/src/isObjectURL.test.ts index a911892f84..e48f8bab3c 100644 --- a/packages/@uppy/utils/src/isObjectURL.test.ts +++ b/packages/@uppy/utils/src/isObjectURL.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import isObjectURL from './isObjectURL.ts' +import isObjectURL from './isObjectURL.js' describe('isObjectURL', () => { it('should return true if the specified url is an object url', () => { diff --git a/packages/@uppy/utils/src/isPreviewSupported.test.ts b/packages/@uppy/utils/src/isPreviewSupported.test.ts index c2c8ee699c..adc8133d47 100644 --- a/packages/@uppy/utils/src/isPreviewSupported.test.ts +++ b/packages/@uppy/utils/src/isPreviewSupported.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import isPreviewSupported from './isPreviewSupported.ts' +import isPreviewSupported from './isPreviewSupported.js' describe('isPreviewSupported', () => { it('should return true for any filetypes that browsers can preview', () => { diff --git a/packages/@uppy/utils/src/prettyETA.test.ts b/packages/@uppy/utils/src/prettyETA.test.ts index a1b8294426..be99fb26a9 100644 --- a/packages/@uppy/utils/src/prettyETA.test.ts +++ b/packages/@uppy/utils/src/prettyETA.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import prettyETA from './prettyETA.ts' +import prettyETA from './prettyETA.js' describe('prettyETA', () => { it('should convert the specified number of seconds to a pretty ETA', () => { diff --git a/packages/@uppy/utils/src/prettyETA.ts b/packages/@uppy/utils/src/prettyETA.ts index ea2a77505c..b58d719068 100644 --- a/packages/@uppy/utils/src/prettyETA.ts +++ b/packages/@uppy/utils/src/prettyETA.ts @@ -1,4 +1,4 @@ -import secondsToTime from './secondsToTime.ts' +import secondsToTime from './secondsToTime.js' export default function prettyETA(seconds: number): string { const time = secondsToTime(seconds) diff --git a/packages/@uppy/utils/src/remoteFileObjToLocal.ts b/packages/@uppy/utils/src/remoteFileObjToLocal.ts index fbc03f6c3e..8fed09838a 100644 --- a/packages/@uppy/utils/src/remoteFileObjToLocal.ts +++ b/packages/@uppy/utils/src/remoteFileObjToLocal.ts @@ -1,4 +1,4 @@ -import getFileNameAndExtension from './getFileNameAndExtension.ts' +import getFileNameAndExtension from './getFileNameAndExtension.js' interface ObjectWithMIMEAndName { name?: string diff --git a/packages/@uppy/utils/src/secondsToTime.test.ts b/packages/@uppy/utils/src/secondsToTime.test.ts index 44e21b4b4c..7bc7fa53dc 100644 --- a/packages/@uppy/utils/src/secondsToTime.test.ts +++ b/packages/@uppy/utils/src/secondsToTime.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import secondsToTime from './secondsToTime.ts' +import secondsToTime from './secondsToTime.js' describe('secondsToTime', () => { it('converts seconds to an { hours, minutes, seconds } object', () => { diff --git a/packages/@uppy/utils/src/toArray.test.ts b/packages/@uppy/utils/src/toArray.test.ts index 541b0fb5e6..e193b8632c 100644 --- a/packages/@uppy/utils/src/toArray.test.ts +++ b/packages/@uppy/utils/src/toArray.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import toArray from './toArray.ts' +import toArray from './toArray.js' describe('toArray', () => { it('should convert a array-like object into an array', () => { diff --git a/packages/@uppy/utils/src/truncateString.test.ts b/packages/@uppy/utils/src/truncateString.test.ts index 5b881f97ae..24f2839860 100644 --- a/packages/@uppy/utils/src/truncateString.test.ts +++ b/packages/@uppy/utils/src/truncateString.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import truncateString from './truncateString.ts' +import truncateString from './truncateString.js' describe('truncateString', () => { it('should truncate the string to the length', () => { diff --git a/packages/@uppy/vue/src/dashboard-modal.ts b/packages/@uppy/vue/src/dashboard-modal.ts index d1d795e25c..1bfff7cd7c 100644 --- a/packages/@uppy/vue/src/dashboard-modal.ts +++ b/packages/@uppy/vue/src/dashboard-modal.ts @@ -2,7 +2,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 '@uppy/utils/lib/UppyFile' -import useUppy from './useUppy.ts' +import useUppy from './useUppy.js' type DashboardModalOptions = Omit< DashboardOptions & { inline: false }, diff --git a/packages/@uppy/vue/src/dashboard.ts b/packages/@uppy/vue/src/dashboard.ts index f077b73d56..3cf663c87a 100644 --- a/packages/@uppy/vue/src/dashboard.ts +++ b/packages/@uppy/vue/src/dashboard.ts @@ -2,7 +2,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 '@uppy/utils/lib/UppyFile' -import useUppy from './useUppy.ts' +import useUppy from './useUppy.js' type DashboardInlineOptions = Omit< DashboardOptions & { inline: true }, diff --git a/packages/@uppy/vue/src/drag-drop.ts b/packages/@uppy/vue/src/drag-drop.ts index 4c51f1a27d..b8689de64f 100644 --- a/packages/@uppy/vue/src/drag-drop.ts +++ b/packages/@uppy/vue/src/drag-drop.ts @@ -1,7 +1,7 @@ import { defineComponent, ref, h, type PropType } from 'vue' import DragDropPlugin, { type DragDropOptions } from '@uppy/drag-drop' import { Uppy } from '@uppy/core' -import useUppy from './useUppy.ts' +import useUppy from './useUppy.js' export default defineComponent({ name: 'DragDrop', diff --git a/packages/@uppy/vue/src/file-input.ts b/packages/@uppy/vue/src/file-input.ts index 007ee11357..2de2331de9 100644 --- a/packages/@uppy/vue/src/file-input.ts +++ b/packages/@uppy/vue/src/file-input.ts @@ -1,7 +1,7 @@ import { defineComponent, ref, h, type PropType } from 'vue' import FileInputPlugin, { type FileInputOptions } from '@uppy/file-input' import { Uppy } from '@uppy/core' -import useUppy from './useUppy.ts' +import useUppy from './useUppy.js' export default defineComponent({ name: 'FileInput', diff --git a/packages/@uppy/vue/src/index.ts b/packages/@uppy/vue/src/index.ts index b1dc0212cc..9123e0c44c 100644 --- a/packages/@uppy/vue/src/index.ts +++ b/packages/@uppy/vue/src/index.ts @@ -1,6 +1,6 @@ -export { default as Dashboard } from './dashboard.ts' -export { default as DashboardModal } from './dashboard-modal.ts' -export { default as DragDrop } from './drag-drop.ts' -export { default as ProgressBar } from './progress-bar.ts' -export { default as StatusBar } from './status-bar.ts' -export { default as FileInput } from './file-input.ts' +export { default as Dashboard } from './dashboard.js' +export { default as DashboardModal } from './dashboard-modal.js' +export { default as DragDrop } from './drag-drop.js' +export { default as ProgressBar } from './progress-bar.js' +export { default as StatusBar } from './status-bar.js' +export { default as FileInput } from './file-input.js' diff --git a/packages/@uppy/vue/src/progress-bar.ts b/packages/@uppy/vue/src/progress-bar.ts index dc919e07b3..6f3f0b2ba8 100644 --- a/packages/@uppy/vue/src/progress-bar.ts +++ b/packages/@uppy/vue/src/progress-bar.ts @@ -1,7 +1,7 @@ import { defineComponent, ref, h, type PropType } from 'vue' import ProgressBarPlugin, { type ProgressBarOptions } from '@uppy/progress-bar' import { Uppy } from '@uppy/core' -import useUppy from './useUppy.ts' +import useUppy from './useUppy.js' export default defineComponent({ name: 'ProgressBar', diff --git a/packages/@uppy/vue/src/status-bar.ts b/packages/@uppy/vue/src/status-bar.ts index 305b27a2b1..68f2c1130b 100644 --- a/packages/@uppy/vue/src/status-bar.ts +++ b/packages/@uppy/vue/src/status-bar.ts @@ -1,7 +1,7 @@ import { defineComponent, ref, h, type PropType } from 'vue' import StatusBarPlugin, { type StatusBarOptions } from '@uppy/status-bar' import { Uppy } from '@uppy/core' -import useUppy from './useUppy.ts' +import useUppy from './useUppy.js' export default defineComponent({ name: 'StatusBar', diff --git a/packages/@uppy/webcam/src/CameraScreen.tsx b/packages/@uppy/webcam/src/CameraScreen.tsx index 1df4ee2af7..0a96645feb 100644 --- a/packages/@uppy/webcam/src/CameraScreen.tsx +++ b/packages/@uppy/webcam/src/CameraScreen.tsx @@ -2,14 +2,14 @@ import type { I18n } from '@uppy/utils/lib/Translator' import { h, Component, type ComponentChild } from 'preact' import type { HTMLAttributes } from 'preact/compat' -import SnapshotButton from './SnapshotButton.tsx' -import RecordButton from './RecordButton.tsx' -import RecordingLength from './RecordingLength.tsx' +import SnapshotButton from './SnapshotButton.jsx' +import RecordButton from './RecordButton.jsx' +import RecordingLength from './RecordingLength.jsx' import VideoSourceSelect, { type VideoSourceSelectProps, -} from './VideoSourceSelect.tsx' -import SubmitButton from './SubmitButton.tsx' -import DiscardButton from './DiscardButton.tsx' +} from './VideoSourceSelect.jsx' +import SubmitButton from './SubmitButton.jsx' +import DiscardButton from './DiscardButton.jsx' function isModeAvailable(modes: T[], mode: any): mode is T { return modes.includes(mode) diff --git a/packages/@uppy/webcam/src/RecordingLength.tsx b/packages/@uppy/webcam/src/RecordingLength.tsx index f2e44e59e1..af1f116fa7 100644 --- a/packages/@uppy/webcam/src/RecordingLength.tsx +++ b/packages/@uppy/webcam/src/RecordingLength.tsx @@ -1,6 +1,6 @@ import type { I18n } from '@uppy/utils/lib/Translator' import { h } from 'preact' -import formatSeconds from './formatSeconds.ts' +import formatSeconds from './formatSeconds.js' interface RecordingLengthProps { recordingLengthSeconds: number diff --git a/packages/@uppy/webcam/src/SnapshotButton.tsx b/packages/@uppy/webcam/src/SnapshotButton.tsx index c359934620..12d59e870c 100644 --- a/packages/@uppy/webcam/src/SnapshotButton.tsx +++ b/packages/@uppy/webcam/src/SnapshotButton.tsx @@ -1,6 +1,6 @@ import type { I18n } from '@uppy/utils/lib/Translator' import { h } from 'preact' -import CameraIcon from './CameraIcon.tsx' +import CameraIcon from './CameraIcon.jsx' interface SnapshotButtonProps { onSnapshot: () => void diff --git a/packages/@uppy/webcam/src/Webcam.test.ts b/packages/@uppy/webcam/src/Webcam.test.ts index 58a8aeb800..2a95840d3d 100644 --- a/packages/@uppy/webcam/src/Webcam.test.ts +++ b/packages/@uppy/webcam/src/Webcam.test.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { describe, expect, it } from 'vitest' import Uppy from '@uppy/core' -import Webcam from './index.ts' +import Webcam from './index.js' describe('Webcam', () => { describe('_getMediaRecorderOptions', () => { diff --git a/packages/@uppy/webcam/src/Webcam.tsx b/packages/@uppy/webcam/src/Webcam.tsx index 0201dc77bd..9ee079037e 100644 --- a/packages/@uppy/webcam/src/Webcam.tsx +++ b/packages/@uppy/webcam/src/Webcam.tsx @@ -13,14 +13,14 @@ import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension' import mimeTypes from '@uppy/utils/lib/mimeTypes' import isMobile from 'is-mobile' import canvasToBlob from '@uppy/utils/lib/canvasToBlob' -import supportsMediaRecorder from './supportsMediaRecorder.ts' -import CameraIcon from './CameraIcon.tsx' -import CameraScreen from './CameraScreen.tsx' -import PermissionsScreen from './PermissionsScreen.tsx' +import supportsMediaRecorder from './supportsMediaRecorder.js' +import CameraIcon from './CameraIcon.jsx' +import CameraScreen from './CameraScreen.jsx' +import PermissionsScreen from './PermissionsScreen.jsx' // 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' -import locale from './locale.ts' +import locale from './locale.js' /** * Normalize a MIME type or file extension into a MIME type. diff --git a/packages/@uppy/webcam/src/formatSeconds.test.ts b/packages/@uppy/webcam/src/formatSeconds.test.ts index 6e5c746611..9ddcc35cfc 100644 --- a/packages/@uppy/webcam/src/formatSeconds.test.ts +++ b/packages/@uppy/webcam/src/formatSeconds.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import formatSeconds from './formatSeconds.ts' +import formatSeconds from './formatSeconds.js' describe('formatSeconds', () => { it("should return a value of '0:43' when an argument of 43 seconds is supplied", () => { diff --git a/packages/@uppy/webcam/src/index.ts b/packages/@uppy/webcam/src/index.ts index 0a8151b553..6fa7cd6950 100644 --- a/packages/@uppy/webcam/src/index.ts +++ b/packages/@uppy/webcam/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Webcam.tsx' -export type { WebcamOptions } from './Webcam.tsx' +export { default } from './Webcam.jsx' +export type { WebcamOptions } from './Webcam.jsx' diff --git a/packages/@uppy/webcam/src/supportsMediaRecorder.test.ts b/packages/@uppy/webcam/src/supportsMediaRecorder.test.ts index 044f9dc910..a82d2199cf 100644 --- a/packages/@uppy/webcam/src/supportsMediaRecorder.test.ts +++ b/packages/@uppy/webcam/src/supportsMediaRecorder.test.ts @@ -1,6 +1,6 @@ /* eslint-disable max-classes-per-file, class-methods-use-this, @typescript-eslint/ban-ts-comment */ import { describe, expect, it } from 'vitest' -import supportsMediaRecorder from './supportsMediaRecorder.ts' +import supportsMediaRecorder from './supportsMediaRecorder.js' describe('supportsMediaRecorder', () => { it('should return true if MediaRecorder is supported', () => { diff --git a/packages/@uppy/webdav/src/Webdav.tsx b/packages/@uppy/webdav/src/Webdav.tsx index 1f2fb85288..48a8b749fd 100644 --- a/packages/@uppy/webdav/src/Webdav.tsx +++ b/packages/@uppy/webdav/src/Webdav.tsx @@ -24,7 +24,7 @@ import type { I18n } from '@uppy/utils/lib/Translator' // 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' -import locale from './locale.ts' +import locale from './locale.js' class WebdavSimpleAuthProvider extends Provider< M, diff --git a/packages/@uppy/webdav/src/index.ts b/packages/@uppy/webdav/src/index.ts index c5a3243f99..9d0c5cf521 100644 --- a/packages/@uppy/webdav/src/index.ts +++ b/packages/@uppy/webdav/src/index.ts @@ -1 +1 @@ -export { default } from './Webdav.tsx' +export { default } from './Webdav.jsx' diff --git a/packages/@uppy/xhr-upload/src/index.test.ts b/packages/@uppy/xhr-upload/src/index.test.ts index 127444b339..fc461c3ba4 100644 --- a/packages/@uppy/xhr-upload/src/index.test.ts +++ b/packages/@uppy/xhr-upload/src/index.test.ts @@ -1,7 +1,7 @@ import { vi, describe, it, expect } from 'vitest' import nock from 'nock' import Core, { type UppyEventMap } from '@uppy/core' -import XHRUpload from './index.ts' +import XHRUpload from './index.js' describe('XHRUpload', () => { it('should leverage hooks from fetcher', async () => { diff --git a/packages/@uppy/xhr-upload/src/index.ts b/packages/@uppy/xhr-upload/src/index.ts index dcab608307..bad7a83c68 100644 --- a/packages/@uppy/xhr-upload/src/index.ts +++ b/packages/@uppy/xhr-upload/src/index.ts @@ -23,7 +23,7 @@ import getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields' // 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' -import locale from './locale.ts' +import locale from './locale.js' export interface XhrUploadOpts extends PluginOpts { diff --git a/packages/@uppy/zoom/src/Zoom.tsx b/packages/@uppy/zoom/src/Zoom.tsx index 4f70bcfdd0..93e954b4fa 100644 --- a/packages/@uppy/zoom/src/Zoom.tsx +++ b/packages/@uppy/zoom/src/Zoom.tsx @@ -14,7 +14,7 @@ import type { UnknownProviderPlugin, UnknownProviderPluginState, } from '@uppy/core/lib/Uppy.js' -import locale from './locale.ts' +import locale from './locale.js' // 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' diff --git a/packages/@uppy/zoom/src/index.ts b/packages/@uppy/zoom/src/index.ts index 4a98e7e541..bbae991ba8 100644 --- a/packages/@uppy/zoom/src/index.ts +++ b/packages/@uppy/zoom/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './Zoom.tsx' -export type { ZoomOptions } from './Zoom.tsx' +export { default } from './Zoom.jsx' +export type { ZoomOptions } from './Zoom.jsx' diff --git a/packages/uppy/src/index.ts b/packages/uppy/src/index.ts index 14d5eb5ff4..c3fc785790 100644 --- a/packages/uppy/src/index.ts +++ b/packages/uppy/src/index.ts @@ -1,4 +1,4 @@ -export * from './bundle.ts' +export * from './bundle.js' // Core export type { UppyOptions, UIPluginOptions } from '@uppy/core' diff --git a/tsconfig.shared.json b/tsconfig.shared.json index de7d0d62f2..dc7be34554 100644 --- a/tsconfig.shared.json +++ b/tsconfig.shared.json @@ -7,7 +7,6 @@ "lib": ["dom", "ESnext"], "resolveJsonModule": true, "useUnknownInCatchVariables": false, - "allowImportingTsExtensions": true, "allowJs": false, "declaration": true, "emitDeclarationOnly": true,