diff --git a/.changeset/curvy-feet-chew.md b/.changeset/curvy-feet-chew.md index 4cfe7f172d..7bb6c8b50e 100644 --- a/.changeset/curvy-feet-chew.md +++ b/.changeset/curvy-feet-chew.md @@ -3,13 +3,10 @@ "@uppy/google-photos-picker": patch "@uppy/google-drive-picker": patch "@uppy/thumbnail-generator": patch -"@uppy/companion-client": patch "@uppy/golden-retriever": patch "@uppy/image-generator": patch -"@uppy/provider-views": patch "@uppy/remote-sources": patch "@uppy/screen-capture": patch -"@uppy/store-default": patch "@uppy/google-drive": patch "@uppy/image-editor": patch "@uppy/transloadit": patch @@ -31,7 +28,6 @@ "@uppy/webdav": patch "@uppy/audio": patch "@uppy/react": patch -"@uppy/utils": patch "@uppy/core": patch "@uppy/form": patch "@uppy/zoom": patch @@ -42,4 +38,4 @@ "uppy": patch --- -Bump shared runtime dependencies (preact, nanoid, lodash, classnames, shallow-equal, pretty-bytes, p-queue, tus-js-client, @transloadit/types @transloadit/prettier-bytes v1, is-mobile, exifr, compressorjs, rxjs, tslib). Also includes type-only fixes in `@uppy/companion`'s `jwt.ts` and `request.ts` to track `@types/jsonwebtoken` v9 and `@types/node`. \ No newline at end of file +Bump shared runtime dependencies (preact, nanoid, lodash, classnames, shallow-equal, pretty-bytes, p-queue, tus-js-client, @transloadit/types @transloadit/prettier-bytes v1, is-mobile, exifr, compressorjs, rxjs, tslib). Also includes type-only fixes in `@uppy/companion`'s `jwt.ts` and `request.ts` to track `@types/jsonwebtoken` v9 and `@types/node`. diff --git a/.changeset/lazy-berries-brake.md b/.changeset/lazy-berries-brake.md index 5aa8c52c59..bd4bd6e0cb 100644 --- a/.changeset/lazy-berries-brake.md +++ b/.changeset/lazy-berries-brake.md @@ -1,5 +1,5 @@ --- -"@uppy/companion-client": patch +"@uppy/core": patch --- uploadRemoteFile() now queues token request and websocket request as a single job in the request queue. diff --git a/.changeset/mighty-deers-sin.md b/.changeset/mighty-deers-sin.md index 71159166ad..980aaa29da 100644 --- a/.changeset/mighty-deers-sin.md +++ b/.changeset/mighty-deers-sin.md @@ -1,8 +1,8 @@ --- -"@uppy/companion-client": major +"@uppy/core": major "@uppy/companion": major --- Send token using websocket instead of window.opener. -Breaking in `@uppy/companion-client` because it needs newest version of Companion in order to work. +Breaking in `@uppy/core` because it needs newest version of Companion in order to work. Breaking in `@uppy/companion` because `companion.socket()` now requires `companionOptions` to be passed as the second argument. diff --git a/MIGRATION-6.0-merge-into-core.md b/MIGRATION-6.0-merge-into-core.md new file mode 100644 index 0000000000..593b8f8a53 --- /dev/null +++ b/MIGRATION-6.0-merge-into-core.md @@ -0,0 +1,82 @@ +# Migration: packages merged into `@uppy/core` (6.0) + +In Uppy 6.0, four packages were folded into `@uppy/core` and are now exposed through +subpath exports. The standalone packages are **removed from npm**. This eliminates a +class of duplicate-version bugs (every plugin already depends on `@uppy/core`, so there +is now a single source of truth) and lets co-dependent types reference each other +directly instead of through hand-maintained duplicates. + +## 1. Import paths + +Update imports from the removed packages to the matching `@uppy/core` subpath: + +| Removed package | New import | +| ------------------------ | ------------------------------ | +| `@uppy/utils` | `@uppy/core/utils` | +| `@uppy/store-default` | `@uppy/core/store-default` | +| `@uppy/companion-client` | `@uppy/core/companion-client` | +| `@uppy/provider-views` | `@uppy/core/provider-views` | + +```diff +- import { fetcher } from '@uppy/utils' ++ import { fetcher } from '@uppy/core/utils' + +- import { RequestClient } from '@uppy/companion-client' ++ import { RequestClient } from '@uppy/core/companion-client' +``` + +Then: + +1. Remove `@uppy/utils`, `@uppy/store-default`, `@uppy/companion-client`, and + `@uppy/provider-views` from your `package.json`. +2. Make sure `@uppy/core` is listed as a dependency (it already is for any plugin). + +## 2. CSS + +The provider UI styles moved with the code: + +| Old | New | +| ---------------------------------------- | ---------------------------------------------- | +| `@uppy/provider-views/css/style.min.css` | `@uppy/core/provider-views/css/style.min.css` | +| `@uppy/provider-views/css/style.css` | `@uppy/core/provider-views/css/style.css` | + +> Most apps don't import this directly — it ships bundled in `@uppy/dashboard`'s CSS. +> Only update it if you were importing the provider-views stylesheet explicitly. + +## 3. TypeScript types + +- **`RequestOptions`** moved from `@uppy/utils` to `@uppy/core/companion-client` + (it is the companion request type and now lives next to `RequestClient`). + + ```diff + - import type { RequestOptions } from '@uppy/utils' + + import type { RequestOptions } from '@uppy/core/companion-client' + ``` + +- **`CompanionClientProvider` / `CompanionClientSearchProvider`** are **removed**. They + were hand-maintained stand-ins that only existed because `@uppy/utils` couldn't see + the real provider classes. Now that everything lives in `@uppy/core`, the real classes + are used directly. If you typed against them, import the real class from + `@uppy/core/companion-client` instead (or `Pick` the members you need): + + ```diff + - import type { CompanionClientProvider } from '@uppy/utils' + + import type Provider from '@uppy/core/companion-client' + - const p: CompanionClientProvider = ... + + const p: Provider = ... + ``` + + Note: `UnknownProviderPlugin['provider']` is now typed as a structural subset of + `Provider` (via `Pick`), so a custom provider that matches the public surface still + fits without subclassing the exact class. + +## 4. The `uppy` all-in-one package — no change + +If you use the meta-package or the CDN bundle, nothing changes: + +```js +import { Uppy, Dashboard, DefaultStore } from 'uppy' // still works +// window.Uppy.DefaultStore — still works +``` + +These re-exports were repointed to the new `@uppy/core` subpaths internally. diff --git a/examples/companion-custom-provider/client/MyCustomProvider.jsx b/examples/companion-custom-provider/client/MyCustomProvider.jsx index 52fab29ffe..a3883241a8 100644 --- a/examples/companion-custom-provider/client/MyCustomProvider.jsx +++ b/examples/companion-custom-provider/client/MyCustomProvider.jsx @@ -1,8 +1,12 @@ /** @jsx h */ -import { getAllowedHosts, Provider, tokenStorage } from '@uppy/companion-client' import { UIPlugin } from '@uppy/core' -import { ProviderViews } from '@uppy/provider-views' +import { + getAllowedHosts, + Provider, + tokenStorage, +} from '@uppy/core/companion-client' +import { ProviderViews } from '@uppy/core/provider-views' const defaultOptions = {} diff --git a/examples/companion-custom-provider/package.json b/examples/companion-custom-provider/package.json index cef4f93bd3..c18ecab3b5 100644 --- a/examples/companion-custom-provider/package.json +++ b/examples/companion-custom-provider/package.json @@ -4,11 +4,9 @@ "private": true, "type": "module", "dependencies": { - "@uppy/companion-client": "workspace:*", "@uppy/core": "workspace:*", "@uppy/dashboard": "workspace:*", "@uppy/google-drive": "workspace:*", - "@uppy/provider-views": "workspace:*", "@uppy/tus": "workspace:*", "preact": "^10.29.2" }, diff --git a/packages/@uppy/angular/turbo.json b/packages/@uppy/angular/turbo.json index a5b5c21271..4f56bd471b 100644 --- a/packages/@uppy/angular/turbo.json +++ b/packages/@uppy/angular/turbo.json @@ -2,11 +2,7 @@ "extends": ["//"], "tasks": { "build": { - "dependsOn": [ - "@uppy/core#build", - "@uppy/dashboard#build", - "@uppy/utils#build" - ], + "dependsOn": ["@uppy/core#build", "@uppy/dashboard#build"], "inputs": [ "projects/uppy/angular/src/**/*.{js,ts,jsx,tsx}", "package.json", diff --git a/packages/@uppy/audio/package.json b/packages/@uppy/audio/package.json index 87432f6b73..593a0390b4 100644 --- a/packages/@uppy/audio/package.json +++ b/packages/@uppy/audio/package.json @@ -40,7 +40,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "devDependencies": { diff --git a/packages/@uppy/audio/src/Audio.tsx b/packages/@uppy/audio/src/Audio.tsx index 2f53a8cc89..a56743b759 100644 --- a/packages/@uppy/audio/src/Audio.tsx +++ b/packages/@uppy/audio/src/Audio.tsx @@ -7,8 +7,8 @@ import type { } from '@uppy/core' import { UIPlugin } from '@uppy/core' -import type { LocaleStrings } from '@uppy/utils' -import { getFileTypeExtension } from '@uppy/utils' +import type { LocaleStrings } from '@uppy/core/utils' +import { getFileTypeExtension } from '@uppy/core/utils' import packageJson from '../package.json' with { type: 'json' } import locale from './locale.js' import PermissionsScreen from './PermissionsScreen.js' diff --git a/packages/@uppy/audio/src/DiscardButton.tsx b/packages/@uppy/audio/src/DiscardButton.tsx index 6bfd30a8fa..27d49433ad 100644 --- a/packages/@uppy/audio/src/DiscardButton.tsx +++ b/packages/@uppy/audio/src/DiscardButton.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' interface DiscardButtonProps { onDiscard: () => void diff --git a/packages/@uppy/audio/src/PermissionsScreen.tsx b/packages/@uppy/audio/src/PermissionsScreen.tsx index 9bc876dbd2..26b93736ac 100644 --- a/packages/@uppy/audio/src/PermissionsScreen.tsx +++ b/packages/@uppy/audio/src/PermissionsScreen.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import type { h } from 'preact' interface PermissionsScreenProps { diff --git a/packages/@uppy/audio/src/RecordButton.tsx b/packages/@uppy/audio/src/RecordButton.tsx index 5883c4a3ac..eec35238e1 100644 --- a/packages/@uppy/audio/src/RecordButton.tsx +++ b/packages/@uppy/audio/src/RecordButton.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' interface RecordButtonProps { recording: boolean diff --git a/packages/@uppy/audio/src/RecordingScreen.tsx b/packages/@uppy/audio/src/RecordingScreen.tsx index b9f5cdcfc1..c3a2bb91e9 100644 --- a/packages/@uppy/audio/src/RecordingScreen.tsx +++ b/packages/@uppy/audio/src/RecordingScreen.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import { useEffect, useRef } from 'preact/hooks' import AudioSourceSelect, { type AudioSourceSelectProps, diff --git a/packages/@uppy/audio/src/SubmitButton.tsx b/packages/@uppy/audio/src/SubmitButton.tsx index dbb2d09420..62f9d77d0e 100644 --- a/packages/@uppy/audio/src/SubmitButton.tsx +++ b/packages/@uppy/audio/src/SubmitButton.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' interface SubmitButtonProps { onSubmit: () => void diff --git a/packages/@uppy/audio/tsconfig.build.json b/packages/@uppy/audio/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/audio/tsconfig.build.json +++ b/packages/@uppy/audio/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/audio/tsconfig.json b/packages/@uppy/audio/tsconfig.json index 991d79cbd2..edd6c80fba 100644 --- a/packages/@uppy/audio/tsconfig.json +++ b/packages/@uppy/audio/tsconfig.json @@ -6,9 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/aws-s3/package.json b/packages/@uppy/aws-s3/package.json index 2be35d1702..b9410bdea5 100644 --- a/packages/@uppy/aws-s3/package.json +++ b/packages/@uppy/aws-s3/package.json @@ -37,10 +37,6 @@ ".": "./lib/index.js", "./package.json": "./package.json" }, - "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/utils": "workspace:^" - }, "devDependencies": { "@aws-sdk/client-s3": "^3.362.0", "@aws-sdk/s3-request-presigner": "^3.362.0", diff --git a/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts b/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts index 38e800fadf..3e1ae1117e 100644 --- a/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts +++ b/packages/@uppy/aws-s3/src/HTTPCommunicationQueue.ts @@ -1,5 +1,8 @@ import type { Body, Meta, UppyFile } from '@uppy/core' -import type { RateLimitedQueue, WrapPromiseFunctionType } from '@uppy/utils' +import type { + RateLimitedQueue, + WrapPromiseFunctionType, +} from '@uppy/core/utils' import type AwsS3Multipart from './index.js' import type { AwsS3MultipartOptions, diff --git a/packages/@uppy/aws-s3/src/MultipartUploader.ts b/packages/@uppy/aws-s3/src/MultipartUploader.ts index 1e590e0c87..afd050d79b 100644 --- a/packages/@uppy/aws-s3/src/MultipartUploader.ts +++ b/packages/@uppy/aws-s3/src/MultipartUploader.ts @@ -1,6 +1,6 @@ import type { Uppy } from '@uppy/core' -import type { Body, Meta, UppyFile } from '@uppy/utils' -import { AbortController } from '@uppy/utils' +import type { Body, Meta, UppyFile } from '@uppy/core/utils' +import { AbortController } from '@uppy/core/utils' import type { HTTPCommunicationQueue } from './HTTPCommunicationQueue.js' const MB = 1024 * 1024 diff --git a/packages/@uppy/aws-s3/src/index.ts b/packages/@uppy/aws-s3/src/index.ts index e1afe29c1d..6b2ef0b4d5 100644 --- a/packages/@uppy/aws-s3/src/index.ts +++ b/packages/@uppy/aws-s3/src/index.ts @@ -1,4 +1,3 @@ -import { RequestClient } from '@uppy/companion-client' import { BasePlugin, type DefinePluginOpts, @@ -6,20 +5,16 @@ import { type PluginOpts, type Uppy, } from '@uppy/core' -import type { - Body, - LocalUppyFile, - Meta, - RequestOptions, - UppyFile, -} from '@uppy/utils' +import type { RequestOptions } from '@uppy/core/companion-client' +import { RequestClient } from '@uppy/core/companion-client' +import type { Body, LocalUppyFile, Meta, UppyFile } from '@uppy/core/utils' import { createAbortError, filterFilesToEmitUploadStarted, filterFilesToUpload, getAllowedMetaFields, RateLimitedQueue, -} from '@uppy/utils' +} from '@uppy/core/utils' import packageJson from '../package.json' with { type: 'json' } import createSignedURL from './createSignedURL.js' import { HTTPCommunicationQueue } from './HTTPCommunicationQueue.js' diff --git a/packages/@uppy/aws-s3/src/utils.ts b/packages/@uppy/aws-s3/src/utils.ts index d5a2700b03..fb850912e0 100644 --- a/packages/@uppy/aws-s3/src/utils.ts +++ b/packages/@uppy/aws-s3/src/utils.ts @@ -1,5 +1,5 @@ -import type { Body } from '@uppy/utils' -import { createAbortError } from '@uppy/utils' +import type { Body } from '@uppy/core/utils' +import { createAbortError } from '@uppy/core/utils' import type { AwsS3Part } from './index.js' diff --git a/packages/@uppy/aws-s3/tsconfig.build.json b/packages/@uppy/aws-s3/tsconfig.build.json index 6fc447531c..ac99ccdd75 100644 --- a/packages/@uppy/aws-s3/tsconfig.build.json +++ b/packages/@uppy/aws-s3/tsconfig.build.json @@ -7,12 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/aws-s3/tsconfig.json b/packages/@uppy/aws-s3/tsconfig.json index 324ec94b35..8bd3699996 100644 --- a/packages/@uppy/aws-s3/tsconfig.json +++ b/packages/@uppy/aws-s3/tsconfig.json @@ -7,12 +7,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/box/package.json b/packages/@uppy/box/package.json index db74e3bedd..64e39fce29 100644 --- a/packages/@uppy/box/package.json +++ b/packages/@uppy/box/package.json @@ -34,9 +34,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/provider-views": "workspace:^", - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/box/src/Box.tsx b/packages/@uppy/box/src/Box.tsx index 590ebc3e1e..a73b065527 100644 --- a/packages/@uppy/box/src/Box.tsx +++ b/packages/@uppy/box/src/Box.tsx @@ -1,9 +1,3 @@ -import { - type CompanionPluginOptions, - getAllowedHosts, - Provider, - tokenStorage, -} from '@uppy/companion-client' import type { AsyncStore, Body, @@ -13,9 +7,14 @@ import type { UppyFile, } from '@uppy/core' import { UIPlugin, type Uppy } from '@uppy/core' -import { ProviderViews } from '@uppy/provider-views' - -import type { LocaleStrings } from '@uppy/utils' +import { + type CompanionPluginOptions, + getAllowedHosts, + Provider, + tokenStorage, +} from '@uppy/core/companion-client' +import { ProviderViews } from '@uppy/core/provider-views' +import type { LocaleStrings } from '@uppy/core/utils' // biome-ignore lint/style/useImportType: h is not a type import { type ComponentChild, h } from 'preact' import packageJson from '../package.json' with { type: 'json' } diff --git a/packages/@uppy/box/tsconfig.build.json b/packages/@uppy/box/tsconfig.build.json index afabb530f7..ac99ccdd75 100644 --- a/packages/@uppy/box/tsconfig.build.json +++ b/packages/@uppy/box/tsconfig.build.json @@ -7,15 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/box/tsconfig.json b/packages/@uppy/box/tsconfig.json index 847db9a4f0..edd6c80fba 100644 --- a/packages/@uppy/box/tsconfig.json +++ b/packages/@uppy/box/tsconfig.json @@ -6,15 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/companion-client/.npmignore b/packages/@uppy/companion-client/.npmignore deleted file mode 100644 index 6c816673f0..0000000000 --- a/packages/@uppy/companion-client/.npmignore +++ /dev/null @@ -1 +0,0 @@ -tsconfig.* diff --git a/packages/@uppy/companion-client/CHANGELOG.md b/packages/@uppy/companion-client/CHANGELOG.md deleted file mode 100644 index 16783ddfd3..0000000000 --- a/packages/@uppy/companion-client/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# @uppy/companion-client - -## 5.1.1 - -### Patch Changes - -- 0c16fe4: - Split UppyFile into two intefaces distinguished by the `isRemote` boolean: - - LocalUppyFile - - RemoteUppyFile -- Updated dependencies [0c16fe4] - - @uppy/core@5.1.1 - - @uppy/utils@7.1.1 - -## 5.1.0 - -### Minor Changes - -- 5ba2c1c: Introduce the concept of server-side search and add support for it for the Dropbox provider. Previously, only client-side filtering in the currently viewed folder was possible, which was limiting. Now users using Companion with Dropbox can perform a search across their entire account. - -### Patch Changes - -- Updated dependencies [5ba2c1c] - - @uppy/utils@7.1.0 - - @uppy/core@5.1.0 - -## 5.0.1 - -### Patch Changes - -- 975317d: Removed "main" from package.json, since export maps serve as the contract for the public API. -- Updated dependencies [4b6a76c] -- Updated dependencies [975317d] -- Updated dependencies [9bac4c8] - - @uppy/core@5.0.2 - - @uppy/utils@7.0.2 - -## 5.0.0 - -### Major Changes - -- c5b51f6: ### Export maps for all packages - - All packages now have export maps. This is a breaking change in two cases: - - 1. The css imports have changed from `@uppy[package]/dist/styles.min.css` to `@uppy[package]/css/styles.min.css` - 2. You were importing something that wasn't exported from the root, for instance `@uppy/core/lib/foo.js`. You can now only import things we explicitly exported. - - #### Changed imports for `@uppy/react`, `@uppy/vue`, and `@uppy/svelte` - - Some components, like Dashboard, require a peer dependency to work but since all components were exported from a single file you were forced to install all peer dependencies. Even if you never imported, for instance, the status bar component. - - Every component that requires a peer dependency has now been moved to a subpath, such as `@uppy/react/dashboard`, so you only need to install the peer dependencies you need. - - **Example for `@uppy/react`:** - - **Before:** - - ```javascript - import { Dashboard, StatusBar } from "@uppy/react"; - ``` - - **Now:** - - ```javascript - import Dashboard from "@uppy/react/dashboard"; - import StatusBar from "@uppy/react/status-bar"; - ``` - -### Patch Changes - -- Updated dependencies [d301c01] -- Updated dependencies [c5b51f6] - - @uppy/utils@7.0.0 - - @uppy/core@5.0.0 - -## 4.5.2 - -### Patch Changes - -- 1b1a9e3: Define "files" in package.json -- Updated dependencies [1b1a9e3] - - @uppy/utils@6.2.2 - - @uppy/core@4.5.2 - -## 4.5.0 - -### Minor Changes - -- 0c24c5a: Use TypeScript compiler instead of Babel - -### Patch Changes - -- Updated dependencies [0c24c5a] -- Updated dependencies [0c24c5a] - - @uppy/core@4.5.0 - - @uppy/utils@6.2.0 - -## 4.4.2 - -Released: 2025-05-18 -Included in: Uppy v4.16.0 - -- @uppy/companion-client: don't reject on incorrect origin (Mikael Finstad / #5736) - -## 4.4.0 - -Released: 2025-01-06 -Included in: Uppy v4.11.0 - -- @uppy/angular,@uppy/audio,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive-picker,@uppy/google-drive,@uppy/google-photos-picker,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/vue,@uppy/webcam,@uppy/webdav,@uppy/xhr-upload,@uppy/zoom: Remove "paths" from all tsconfig's (Merlijn Vos / #5572) - -## 4.2.0 - -Released: 2024-12-05 -Included in: Uppy v4.8.0 - -- @uppy/companion-client: Fix allowed origins (Mikael Finstad / #5536) -- @uppy/audio,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: cleanup tsconfig (Mikael Finstad / #5520) - -## 4.1.1 - -Released: 2024-10-31 -Included in: Uppy v4.6.0 - -- @uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react-native,@uppy/react,@uppy/redux-dev-tools,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Fix links (Anthony Veaudry / #5492) - -## 4.0.0 - -Released: 2024-07-10 -Included in: Uppy v4.0.0 - -- docs,@uppy/companion-client: don't close socket when pausing (Mikael Finstad / #4821) - -## 4.0.0-beta.7 - -Released: 2024-06-04 -Included in: Uppy v4.0.0-beta.10 - -- @uppy/companion-client: do not allow boolean `RequestOptions` (Mikael Finstad / #5198) -- @uppy/companion-client: remove deprecated options (Mikael Finstad / #5198) -- @uppy/companion-client: make `supportsRefreshToken` default (Mikael Finstad / #5198) -- @uppy/companion-client: remove optional chaining (Mikael Finstad / #5198) -- @uppy/companion-client: remove `Socket` (Mikael Finstad / #5198) - -## 4.0.0-beta.6 - -Released: 2024-05-14 -Included in: Uppy v4.0.0-beta.7 - -- @uppy/companion-client,@uppy/dropbox,@uppy/screen-capture,@uppy/unsplash,@uppy/url,@uppy/webcam: Use `title` consistently from locales (Merlijn Vos / #5134) - -## 4.0.0-beta.1 - -Released: 2024-03-28 -Included in: Uppy v4.0.0-beta.1 - -- @uppy/companion-client,@uppy/provider-views,@uppy/status-bar: fix type imports (Antoine du Hamel / #5038) -- @uppy/companion-client: Replace Provider.initPlugin with composition (Merlijn Vos / #4977) - -## 3.8.0 - -Released: 2024-03-27 -Included in: Uppy v3.24.0 - -- @uppy/box,@uppy/companion-client,@uppy/provider-views,@uppy/status-bar: fix type imports (Antoine du Hamel / #5038) -- @uppy/companion-client: Replace Provider.initPlugin with composition (Merlijn Vos / #4977) - -## 3.7.4 - -Released: 2024-02-28 -Included in: Uppy v3.23.0 - -- @uppy/companion-client,@uppy/utils,@uppy/xhr-upload: improvements for #4922 (Mikael Finstad / #4960) - -## 3.7.3 - -Released: 2024-02-22 -Included in: Uppy v3.22.2 - -- @uppy/companion-client: fix body/url on upload-success (Merlijn Vos / #4922) -- @uppy/companion-client: remove unnecessary `'use strict'` directives (Antoine du Hamel / #4943) -- @uppy/companion-client: type changes for provider-views (Antoine du Hamel / #4938) -- @uppy/companion-client: update types (Antoine du Hamel / #4927) - -## 3.7.1 - -Released: 2024-02-19 -Included in: Uppy v3.22.0 - -- @uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/companion-client,@uppy/tus,@uppy/xhr-upload: update `uppyfile` objects before emitting events (antoine du hamel / #4928) -- @uppy/companion-client: fix tests and linter (antoine du hamel / #4890) -- @uppy/companion-client: migrate to ts (merlijn vos / #4864) -- @uppy/companion-client: fix `typeerror` (antoine du hamel) - -## 3.7.0 - -Released: 2023-12-12 -Included in: Uppy v3.21.0 - -- @uppy/companion-client: avoid unnecessary preflight requests (Antoine du Hamel / #4462) - -## 3.6.1 - -Released: 2023-11-24 -Included in: Uppy v3.20.0 - -- @uppy/companion-client: fix log type error (Mikael Finstad / #4766) -- @uppy/companion-client: revert breaking change (Antoine du Hamel / #4801) - -## 3.5.0 - -Released: 2023-10-20 -Included in: Uppy v3.18.0 - -- @uppy/companion-client: fixup! Added Companion OAuth Key type (Murderlon / #4668) -- @uppy/companion-client: Added Companion OAuth Key type (Chris Pratt / #4668) - -## 3.4.1 - -Released: 2023-09-29 -Included in: Uppy v3.17.0 - -- @uppy/companion-client: fix a refresh token race condition (Mikael Finstad / #4695) - -## 3.4.0 - -Released: 2023-09-05 -Included in: Uppy v3.15.0 - -- @uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/companion-client,@uppy/core,@uppy/tus,@uppy/utils,@uppy/xhr-upload: Move remote file upload logic into companion-client (Merlijn Vos / #4573) - -## 3.3.0 - -Released: 2023-08-15 -Included in: Uppy v3.14.0 - -- @uppy/companion-client,@uppy/provider-views: make authentication optional (Dominik Schmidt / #4556) - -## 3.1.2 - -Released: 2023-04-04 -Included in: Uppy v3.7.0 - -- @uppy/companion-client: do not open socket more than once (Artur Paikin) - -## 3.1.1 - -Released: 2022-11-16 -Included in: Uppy v3.3.1 - -- @uppy/companion-client: treat `*` the same as missing header (Antoine du Hamel / #4221) - -## 3.1.0 - -Released: 2022-11-10 -Included in: Uppy v3.3.0 - -- @uppy/companion-client: add support for `AbortSignal` (Antoine du Hamel / #4201) -- @uppy/companion-client: prevent preflight race condition (Mikael Finstad / #4182) - -## 3.0.2 - -Released: 2022-09-25 -Included in: Uppy v3.1.0 - -- @uppy/audio,@uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/companion,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/redux-dev-tools,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: add missing entries to changelog for individual packages (Antoine du Hamel / #4092) - -## 3.0.0 - -Released: 2022-08-22 -Included in: Uppy v3.0.0 - -- Switch to ESM - -## 2.2.0 - -Released: 2022-05-30 -Included in: Uppy v2.11.0 - -- @uppy/companion-client: Revert "Revert "@uppy/companion-client: refactor to ESM"" (Antoine du Hamel / #3730) - -## 2.1.0 - -Released: 2022-05-14 -Included in: Uppy v2.10.0 - -- @uppy/companion-client: refactor to ESM (Antoine du Hamel / #3693) - -## 2.0.6 - -Released: 2022-04-07 -Included in: Uppy v2.9.2 - -- @uppy/aws-s3,@uppy/companion-client,@uppy/transloadit,@uppy/utils: Propagate `isNetworkError` through error wrappers (Renée Kooi / #3620) - -## 2.0.5 - -Released: 2022-02-14 -Included in: Uppy v2.5.0 - -- @uppy/companion-client,@uppy/companion,@uppy/provider-views,@uppy/robodog: Finishing touches on Companion dynamic Oauth (Renée Kooi / #2802) diff --git a/packages/@uppy/companion-client/LICENSE b/packages/@uppy/companion-client/LICENSE deleted file mode 100644 index c237473300..0000000000 --- a/packages/@uppy/companion-client/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Transloadit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/@uppy/companion-client/README.md b/packages/@uppy/companion-client/README.md deleted file mode 100644 index 5aeaa14655..0000000000 --- a/packages/@uppy/companion-client/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# @uppy/companion-client - -Uppy logo: a smiling puppy above a pink upwards arrow - -[![npm version](https://img.shields.io/npm/v/@uppy/companion-client.svg?style=flat-square)](https://www.npmjs.com/package/@uppy/companion-client) -![CI status for Uppy tests](https://github.com/transloadit/uppy/workflows/CI/badge.svg) -![CI status for Companion tests](https://github.com/transloadit/uppy/workflows/Companion/badge.svg) -![CI status for browser tests](https://github.com/transloadit/uppy/workflows/End-to-end%20tests/badge.svg) - -Client library for communication with Companion. Intended for use in Uppy -plugins. - -Uppy is being developed by the folks at [Transloadit](https://transloadit.com), -a versatile file encoding service. - -## Example - -```js -import Uppy from '@uppy/core' -import { Provider, RequestClient, Socket } from '@uppy/companion-client' - -const uppy = new Uppy() - -const client = new RequestClient(uppy, { - companionUrl: 'https://uppy.mywebsite.com/', -}) -client.get('/drive/list').then(() => {}) - -const provider = new Provider(uppy, { - companionUrl: 'https://uppy.mywebsite.com/', - provider: providerPluginInstance, -}) -provider.checkAuth().then(() => {}) - -const socket = new Socket({ target: 'wss://uppy.mywebsite.com/' }) -socket.on('progress', () => {}) -``` - -## Installation - -> Unless you are writing a custom provider plugin, you do not need to install -> this. - -```bash -$ npm install @uppy/companion-client -``` - -## Documentation - -Documentation for this plugin can be found on the -[Uppy website](https://uppy.io/docs/companion). - -## License - -[The MIT License](./LICENSE). diff --git a/packages/@uppy/companion-client/package.json b/packages/@uppy/companion-client/package.json deleted file mode 100644 index e7c06cc5bb..0000000000 --- a/packages/@uppy/companion-client/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "@uppy/companion-client", - "description": "Client library for communication with Companion. Intended for use in Uppy plugins.", - "version": "5.1.1", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "tsc --build tsconfig.build.json", - "typecheck": "tsc --build", - "test": "vitest run --environment=jsdom --silent='passed-only'" - }, - "keywords": [ - "file uploader", - "uppy", - "uppy-plugin", - "companion", - "provider" - ], - "homepage": "https://uppy.io", - "bugs": { - "url": "https://github.com/transloadit/uppy/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/transloadit/uppy.git" - }, - "files": [ - "src", - "lib", - "dist", - "CHANGELOG.md" - ], - "exports": { - ".": "./lib/index.js", - "./package.json": "./package.json" - }, - "dependencies": { - "@uppy/utils": "workspace:^", - "namespace-emitter": "^2.0.1", - "p-retry": "^6.1.0" - }, - "devDependencies": { - "jsdom": "^29.1.1", - "typescript": "^5.8.3", - "vitest": "^4.1.6" - }, - "peerDependencies": { - "@uppy/core": "workspace:^" - } -} diff --git a/packages/@uppy/companion-client/tsconfig.build.json b/packages/@uppy/companion-client/tsconfig.build.json deleted file mode 100644 index 389eb13874..0000000000 --- a/packages/@uppy/companion-client/tsconfig.build.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../../tsconfig.shared", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src" - }, - "include": ["./src/**/*.*"], - "exclude": ["./src/**/*.test.ts"], - "references": [ - { - "path": "../utils/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" - } - ] -} diff --git a/packages/@uppy/companion-client/tsconfig.json b/packages/@uppy/companion-client/tsconfig.json deleted file mode 100644 index 991d79cbd2..0000000000 --- a/packages/@uppy/companion-client/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../../tsconfig.shared", - "compilerOptions": { - "emitDeclarationOnly": false, - "noEmit": true - }, - "include": ["./package.json", "./src/**/*.*"], - "references": [ - { - "path": "../utils/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" - } - ] -} diff --git a/packages/@uppy/companion-client/turbo.json b/packages/@uppy/companion-client/turbo.json deleted file mode 100644 index 83c0d57e10..0000000000 --- a/packages/@uppy/companion-client/turbo.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "dependsOn": ["^build", "@uppy/core#build"] - } - } -} diff --git a/packages/@uppy/components/src/hooks/remote-source.ts b/packages/@uppy/components/src/hooks/remote-source.ts index e65035e6e2..262bb467f2 100644 --- a/packages/@uppy/components/src/hooks/remote-source.ts +++ b/packages/@uppy/components/src/hooks/remote-source.ts @@ -5,7 +5,7 @@ import type { UnknownProviderPluginState, UppyEventMap, } from '@uppy/core' -import type { ProviderViews } from '@uppy/provider-views' +import type { ProviderViews } from '@uppy/core/provider-views' import { dequal } from 'dequal/lite' import { Subscribers } from './utils.js' diff --git a/packages/@uppy/components/tsconfig.build.json b/packages/@uppy/components/tsconfig.build.json index 87681cfb35..fcc40cb89a 100644 --- a/packages/@uppy/components/tsconfig.build.json +++ b/packages/@uppy/components/tsconfig.build.json @@ -18,12 +18,6 @@ }, { "path": "../image-editor/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" } ] } diff --git a/packages/@uppy/components/tsconfig.json b/packages/@uppy/components/tsconfig.json index e958367c07..de667431c2 100644 --- a/packages/@uppy/components/tsconfig.json +++ b/packages/@uppy/components/tsconfig.json @@ -17,12 +17,6 @@ }, { "path": "../image-editor/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" } ] } diff --git a/packages/@uppy/compressor/package.json b/packages/@uppy/compressor/package.json index 6bebd8b23d..26d4fdf842 100644 --- a/packages/@uppy/compressor/package.json +++ b/packages/@uppy/compressor/package.json @@ -32,7 +32,6 @@ }, "dependencies": { "@transloadit/prettier-bytes": "^1.1.0", - "@uppy/utils": "workspace:^", "compressorjs": "^1.3.0", "preact": "^10.29.2", "promise-queue": "^2.2.5" diff --git a/packages/@uppy/compressor/src/index.test.ts b/packages/@uppy/compressor/src/index.test.ts index c9c13fd180..36d7f4f1a0 100644 --- a/packages/@uppy/compressor/src/index.test.ts +++ b/packages/@uppy/compressor/src/index.test.ts @@ -1,7 +1,7 @@ import fs from 'node:fs' import path from 'node:path' import Core from '@uppy/core' -import { getFileNameAndExtension } from '@uppy/utils' +import { getFileNameAndExtension } from '@uppy/core/utils' import { describe, expect, it } from 'vitest' import CompressorPlugin from './index.js' diff --git a/packages/@uppy/compressor/src/index.ts b/packages/@uppy/compressor/src/index.ts index 9fb3f12932..eb09f83b97 100644 --- a/packages/@uppy/compressor/src/index.ts +++ b/packages/@uppy/compressor/src/index.ts @@ -1,8 +1,8 @@ import { prettierBytes } from '@transloadit/prettier-bytes' import type { DefinePluginOpts, PluginOpts } from '@uppy/core' import { BasePlugin, type Uppy } from '@uppy/core' -import type { Body, LocalUppyFile, Meta, UppyFile } from '@uppy/utils' -import { getFileNameAndExtension, RateLimitedQueue } from '@uppy/utils' +import type { Body, LocalUppyFile, Meta, UppyFile } from '@uppy/core/utils' +import { getFileNameAndExtension, RateLimitedQueue } from '@uppy/core/utils' import CompressorJS from 'compressorjs' import locale from './locale.js' diff --git a/packages/@uppy/compressor/tsconfig.build.json b/packages/@uppy/compressor/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/compressor/tsconfig.build.json +++ b/packages/@uppy/compressor/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/compressor/tsconfig.json b/packages/@uppy/compressor/tsconfig.json index c761a6e68b..8bd3699996 100644 --- a/packages/@uppy/compressor/tsconfig.json +++ b/packages/@uppy/compressor/tsconfig.json @@ -7,9 +7,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/core/package.json b/packages/@uppy/core/package.json index 540183e47e..82d0feee2c 100644 --- a/packages/@uppy/core/package.json +++ b/packages/@uppy/core/package.json @@ -10,7 +10,7 @@ ], "scripts": { "build": "tsc --build tsconfig.build.json", - "build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css", + "build:css": "sass --load-path=../../ src/style.scss dist/style.css && sass --load-path=../../ src/provider-views/style.scss dist/provider-views.css && postcss dist/style.css -u cssnano -o dist/style.min.css && postcss dist/provider-views.css -u cssnano -o dist/provider-views.min.css", "typecheck": "tsc --build", "test": "vitest run --environment=jsdom --silent='passed-only'" }, @@ -38,20 +38,32 @@ "./css/style.min.css": "./dist/style.min.css", "./css/style.css": "./dist/style.css", "./css/style.scss": "./src/style.scss", + "./store-default": "./lib/store/index.js", + "./utils": "./lib/utils/index.js", + "./companion-client": "./lib/companion-client/index.js", + "./provider-views": "./lib/provider-views/index.js", + "./provider-views/css/style.min.css": "./dist/provider-views.min.css", + "./provider-views/css/style.css": "./dist/provider-views.css", + "./provider-views/css/style.scss": "./src/provider-views/style.scss", "./package.json": "./package.json" }, "dependencies": { "@transloadit/prettier-bytes": "^1.1.0", - "@uppy/store-default": "workspace:^", - "@uppy/utils": "workspace:^", + "classnames": "^2.5.1", "lodash": "^4.18.1", "mime-match": "^1.0.2", "namespace-emitter": "^2.0.1", "nanoid": "^5.1.11", + "p-queue": "^9.3.0", + "p-retry": "^6.1.0", "preact": "^10.29.2" }, "devDependencies": { "@types/deep-freeze": "^0", + "@types/gapi": "^0.0.47", + "@types/google.accounts": "^0.0.14", + "@types/google.picker": "^0.0.42", + "@types/lodash": "^4.14.199", "@types/node": "^20.19.0", "cssnano": "^8.0.1", "deep-freeze": "^0.0.1", diff --git a/packages/@uppy/core/src/BasePlugin.ts b/packages/@uppy/core/src/BasePlugin.ts index e5485a2d81..3b5e93c77f 100644 --- a/packages/@uppy/core/src/BasePlugin.ts +++ b/packages/@uppy/core/src/BasePlugin.ts @@ -7,9 +7,14 @@ * See `Plugin` for the extended version with Preact rendering for interfaces. */ -import type { Body, I18n, Meta, OptionalPluralizeLocale } from '@uppy/utils' -import { Translator } from '@uppy/utils' import type { State, UnknownPlugin, Uppy } from './Uppy.js' +import type { + Body, + I18n, + Meta, + OptionalPluralizeLocale, +} from './utils/index.js' +import { Translator } from './utils/index.js' export type PluginOpts = { locale?: OptionalPluralizeLocale diff --git a/packages/@uppy/core/src/EventManager.ts b/packages/@uppy/core/src/EventManager.ts index 3a2abf2ca2..65e291f72e 100644 --- a/packages/@uppy/core/src/EventManager.ts +++ b/packages/@uppy/core/src/EventManager.ts @@ -1,5 +1,5 @@ -import type { Body, Meta, UppyFile } from '@uppy/utils' import type { _UppyEventMap, Uppy, UppyEventMap } from './Uppy.js' +import type { Body, Meta, UppyFile } from './utils/index.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 83931605b2..2dab3958f0 100644 --- a/packages/@uppy/core/src/Restricter.ts +++ b/packages/@uppy/core/src/Restricter.ts @@ -1,8 +1,8 @@ import { prettierBytes } from '@transloadit/prettier-bytes' -import type { Body, I18n, Meta, UppyFile } from '@uppy/utils' // @ts-expect-error untyped import match from 'mime-match' import type { NonNullableUppyOptions, State } from './Uppy.js' +import type { Body, I18n, Meta, UppyFile } from './utils/index.js' export type Restrictions = { maxFileSize: number | null diff --git a/packages/@uppy/core/src/UIPlugin.ts b/packages/@uppy/core/src/UIPlugin.ts index c7e6478d4e..774d0b4b44 100644 --- a/packages/@uppy/core/src/UIPlugin.ts +++ b/packages/@uppy/core/src/UIPlugin.ts @@ -1,9 +1,9 @@ -import type { Body, Meta } from '@uppy/utils' -import { findDOMElement, getTextDirection } from '@uppy/utils' import { render } from 'preact' import type { PluginOpts } from './BasePlugin.js' import BasePlugin from './BasePlugin.js' import type { State } from './Uppy.js' +import type { Body, Meta } from './utils/index.js' +import { findDOMElement, getTextDirection } from './utils/index.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 b3a8afec2a..46d2a43e52 100644 --- a/packages/@uppy/core/src/Uppy.test.ts +++ b/packages/@uppy/core/src/Uppy.test.ts @@ -3,7 +3,6 @@ import fs from 'node:fs' import path from 'node:path' import { prettierBytes } from '@transloadit/prettier-bytes' import type { Body, Meta } from '@uppy/core' -import type { Locale } from '@uppy/utils' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import BasePlugin, { type DefinePluginOpts, @@ -21,6 +20,7 @@ import InvalidPluginWithoutType from './mocks/invalidPluginWithoutType.js' import { RestrictionError } from './Restricter.js' import UIPlugin from './UIPlugin.js' import type { State } from './Uppy.js' +import type { Locale } from './utils/index.js' const sampleImage = fs.readFileSync( path.join(__dirname, '../../compressor/fixtures/image.jpg'), diff --git a/packages/@uppy/core/src/Uppy.ts b/packages/@uppy/core/src/Uppy.ts index 73d0dd8127..7a05862c6c 100644 --- a/packages/@uppy/core/src/Uppy.ts +++ b/packages/@uppy/core/src/Uppy.ts @@ -1,10 +1,28 @@ /* global AggregateError */ -import DefaultStore, { type Store } from '@uppy/store-default' +import throttle from 'lodash/throttle.js' +// @ts-expect-error untyped +import ee from 'namespace-emitter' +import { nanoid } from 'nanoid/non-secure' +import type { h } from 'preact' +import packageJson from '../package.json' with { type: 'json' } +import type BasePlugin from './BasePlugin.js' +import type Provider from './companion-client/Provider.js' +import type SearchProvider from './companion-client/SearchProvider.js' +import getFileName from './getFileName.js' +import locale from './locale.js' +import { debugLogger, justErrorsLogger } from './loggers.js' +import type ProviderView from './provider-views/ProviderView/ProviderView.js' +import type { Restrictions, ValidateableFile } from './Restricter.js' +import { + defaultOptions as defaultRestrictionOptions, + Restricter, + RestrictionError, +} from './Restricter.js' +import DefaultStore, { type Store } from './store/index.js' +import supportsUploadProgress from './supportsUploadProgress.js' import type { Body, - CompanionClientProvider, - CompanionClientSearchProvider, CompanionFile, FileProgressNotStarted, FileProgressStarted, @@ -17,30 +35,13 @@ import type { RemoteUppyFile, UppyFile, UppyFileId, -} from '@uppy/utils' +} from './utils/index.js' import { getFileNameAndExtension, getFileType, getSafeFileId, Translator, -} from '@uppy/utils' -import throttle from 'lodash/throttle.js' -// @ts-expect-error untyped -import ee from 'namespace-emitter' -import { nanoid } from 'nanoid/non-secure' -import type { h } from 'preact' -import packageJson from '../package.json' with { type: 'json' } -import type BasePlugin from './BasePlugin.js' -import getFileName from './getFileName.js' -import locale from './locale.js' -import { debugLogger, justErrorsLogger } from './loggers.js' -import type { Restrictions, ValidateableFile } from './Restricter.js' -import { - defaultOptions as defaultRestrictionOptions, - Restricter, - RestrictionError, -} from './Restricter.js' -import supportsUploadProgress from './supportsUploadProgress.js' +} from './utils/index.js' type Processor = ( fileIDs: string[], @@ -165,8 +166,6 @@ export interface BaseProviderPlugin { * UnknownProviderPlugin can be any Companion plugin (such as Google Drive) * that uses the Companion-assisted OAuth flow. * As the plugins are passed around throughout Uppy we need a generic type for this. - * It may seems like duplication, but this type safe. Changing the type of `storage` - * will error in the `Provider` class of @uppy/companion-client and vice versa. * * Note that this is the *plugin* class, not a version of the `Provider` class. * `Provider` does operate on Companion plugins with `uppy.getPlugin()`. @@ -178,16 +177,25 @@ export type UnknownProviderPlugin< BaseProviderPlugin & { rootFolderId: string | null files: UppyFile[] - provider: CompanionClientProvider - // Can't be typed unfortunately, we can't depend on `provider-views` in `core`. - view: any + // Structural subset of the real `Provider` class,structural rather than the nominal class type so custom + // providers matching the public surface aren't forced to inherit from `Provider`. + provider: Pick< + Provider, + | 'name' + | 'provider' + | 'login' + | 'logout' + | 'fetchPreAuthToken' + | 'fileUrl' + | 'list' + | 'search' + > + view: ProviderView } /* * UnknownSearchProviderPlugin can be any search Companion plugin (such as Unsplash). * As the plugins are passed around throughout Uppy we need a generic type for this. - * It may seems like duplication, but this type safe. Changing the type of `title` - * will error in the `SearchProvider` class of @uppy/companion-client and vice versa. * * Note that this is the *plugin* class, not a version of the `SearchProvider` class. * `SearchProvider` does operate on Companion plugins with `uppy.getPlugin()`. @@ -203,7 +211,11 @@ export type UnknownSearchProviderPlugin< B extends Body, > = UnknownPlugin & BaseProviderPlugin & { - provider: CompanionClientSearchProvider + // Structural subset of the real `SearchProvider` class (see note above). + provider: Pick< + SearchProvider, + 'name' | 'provider' | 'fileUrl' | 'search' + > } // for better readability diff --git a/packages/@uppy/companion-client/src/AuthError.ts b/packages/@uppy/core/src/companion-client/AuthError.ts similarity index 100% rename from packages/@uppy/companion-client/src/AuthError.ts rename to packages/@uppy/core/src/companion-client/AuthError.ts diff --git a/packages/@uppy/companion-client/src/CompanionPluginOptions.ts b/packages/@uppy/core/src/companion-client/CompanionPluginOptions.ts similarity index 84% rename from packages/@uppy/companion-client/src/CompanionPluginOptions.ts rename to packages/@uppy/core/src/companion-client/CompanionPluginOptions.ts index b02babd009..a1a40a9fdc 100644 --- a/packages/@uppy/companion-client/src/CompanionPluginOptions.ts +++ b/packages/@uppy/core/src/companion-client/CompanionPluginOptions.ts @@ -1,4 +1,4 @@ -import type { AsyncStore, UIPluginOptions } from '@uppy/core' +import type { AsyncStore, UIPluginOptions } from '../index.js' export interface CompanionPluginOptions extends UIPluginOptions { storage?: AsyncStore diff --git a/packages/@uppy/companion-client/src/Provider.ts b/packages/@uppy/core/src/companion-client/Provider.ts similarity index 96% rename from packages/@uppy/companion-client/src/Provider.ts rename to packages/@uppy/core/src/companion-client/Provider.ts index 7a50897e4e..fe732d54f3 100644 --- a/packages/@uppy/companion-client/src/Provider.ts +++ b/packages/@uppy/core/src/companion-client/Provider.ts @@ -4,14 +4,13 @@ import type { PluginOpts, UnknownProviderPlugin, Uppy, -} from '@uppy/core' -import { - type CompanionClientProvider, - getSocketHost, - type RequestOptions, -} from '@uppy/utils' +} from '../index.js' +import { getSocketHost } from '../utils/index.js' import type { CompanionPluginOptions } from './index.js' -import RequestClient, { authErrorStatusCode } from './RequestClient.js' +import RequestClient, { + authErrorStatusCode, + type RequestOptions, +} from './RequestClient.js' export interface Opts extends PluginOpts, CompanionPluginOptions { pluginId: string @@ -31,10 +30,10 @@ function getOrigin() { return location.origin } -export default class Provider - extends RequestClient - implements CompanionClientProvider -{ +export default class Provider< + M extends Meta, + B extends Body, +> extends RequestClient { #refreshingTokenPromise: Promise | undefined provider: string @@ -273,11 +272,13 @@ export default class Provider } async login({ - uppyVersions, + uppyVersions = '', authFormData, signal, }: { - uppyVersions: string + // `uppyVersions` is optional because callers such as `ProviderView` do not + // have it on hand; the OAuth/simple-auth helpers always receive a string. + uppyVersions?: string authFormData: unknown signal: AbortSignal }): Promise { diff --git a/packages/@uppy/companion-client/src/RequestClient.test.ts b/packages/@uppy/core/src/companion-client/RequestClient.test.ts similarity index 100% rename from packages/@uppy/companion-client/src/RequestClient.test.ts rename to packages/@uppy/core/src/companion-client/RequestClient.test.ts diff --git a/packages/@uppy/companion-client/src/RequestClient.ts b/packages/@uppy/core/src/companion-client/RequestClient.ts similarity index 97% rename from packages/@uppy/companion-client/src/RequestClient.ts rename to packages/@uppy/core/src/companion-client/RequestClient.ts index 227fe85ff3..a5e70d329c 100644 --- a/packages/@uppy/companion-client/src/RequestClient.ts +++ b/packages/@uppy/core/src/companion-client/RequestClient.ts @@ -1,21 +1,24 @@ -import type Uppy from '@uppy/core' -import type { - Body, - Meta, - RemoteUppyFile, - RequestOptions, - UppyFile, -} from '@uppy/utils' +import pRetry, { AbortError } from 'p-retry' +import packageJson from '../../package.json' with { type: 'json' } +import type Uppy from '../index.js' +import type { Body, Meta, RemoteUppyFile, UppyFile } from '../utils/index.js' import { ErrorWithCause, fetchWithNetworkError, getSocketHost, UserFacingApiError, -} from '@uppy/utils' -import pRetry, { AbortError } from 'p-retry' -import packageJson from '../package.json' with { type: 'json' } +} from '../utils/index.js' import AuthError from './AuthError.js' +export type RequestOptions = { + method?: string + data?: Record + skipPostResponse?: boolean + signal?: AbortSignal + authFormData?: unknown + qs?: Record +} + type CompanionHeaders = Record | undefined export type Opts = { diff --git a/packages/@uppy/companion-client/src/SearchProvider.ts b/packages/@uppy/core/src/companion-client/SearchProvider.ts similarity index 75% rename from packages/@uppy/companion-client/src/SearchProvider.ts rename to packages/@uppy/core/src/companion-client/SearchProvider.ts index 168fffb90a..3d9cd0615c 100644 --- a/packages/@uppy/companion-client/src/SearchProvider.ts +++ b/packages/@uppy/core/src/companion-client/SearchProvider.ts @@ -1,5 +1,4 @@ -import type { Body, Meta, Uppy } from '@uppy/core' -import type { CompanionClientSearchProvider } from '@uppy/utils' +import type { Body, Meta, Uppy } from '../index.js' import RequestClient, { type Opts } from './RequestClient.js' const getName = (id: string): string => { @@ -9,10 +8,10 @@ const getName = (id: string): string => { .join(' ') } -export default class SearchProvider - extends RequestClient - implements CompanionClientSearchProvider -{ +export default class SearchProvider< + M extends Meta, + B extends Body, +> extends RequestClient { provider: string id: string diff --git a/packages/@uppy/companion-client/src/getAllowedHosts.test.ts b/packages/@uppy/core/src/companion-client/getAllowedHosts.test.ts similarity index 100% rename from packages/@uppy/companion-client/src/getAllowedHosts.test.ts rename to packages/@uppy/core/src/companion-client/getAllowedHosts.test.ts diff --git a/packages/@uppy/companion-client/src/getAllowedHosts.ts b/packages/@uppy/core/src/companion-client/getAllowedHosts.ts similarity index 100% rename from packages/@uppy/companion-client/src/getAllowedHosts.ts rename to packages/@uppy/core/src/companion-client/getAllowedHosts.ts diff --git a/packages/@uppy/companion-client/src/index.ts b/packages/@uppy/core/src/companion-client/index.ts similarity index 80% rename from packages/@uppy/companion-client/src/index.ts rename to packages/@uppy/core/src/companion-client/index.ts index bdbf0b66ef..0c968ed721 100644 --- a/packages/@uppy/companion-client/src/index.ts +++ b/packages/@uppy/core/src/companion-client/index.ts @@ -5,6 +5,9 @@ export type { CompanionPluginOptions } from './CompanionPluginOptions.js' export { default as getAllowedHosts } from './getAllowedHosts.js' export { default as Provider } from './Provider.js' -export { default as RequestClient } from './RequestClient.js' +export { + default as RequestClient, + type RequestOptions, +} from './RequestClient.js' export { default as SearchProvider } from './SearchProvider.js' export * as tokenStorage from './tokenStorage.js' diff --git a/packages/@uppy/companion-client/src/tokenStorage.ts b/packages/@uppy/core/src/companion-client/tokenStorage.ts similarity index 100% rename from packages/@uppy/companion-client/src/tokenStorage.ts rename to packages/@uppy/core/src/companion-client/tokenStorage.ts diff --git a/packages/@uppy/core/src/index.ts b/packages/@uppy/core/src/index.ts index 961bdd1a5c..2aad59c60c 100644 --- a/packages/@uppy/core/src/index.ts +++ b/packages/@uppy/core/src/index.ts @@ -1,16 +1,10 @@ -export type { Store } from '@uppy/store-default' -export type { - Body, - Meta, - MinimalRequiredUppyFile, - UppyFile, -} from '@uppy/utils' export type { DefinePluginOpts, PluginOpts } from './BasePlugin.js' export { default as BasePlugin } from './BasePlugin.js' export { default as EventManager } from './EventManager.js' export { debugLogger } from './loggers.js' export type { Restrictions, ValidateableFile } from './Restricter.js' export { RestrictionError } from './Restricter.js' +export type { Store } from './store/index.js' export type { PluginTarget, UIPluginOptions } from './UIPlugin.js' export { default as UIPlugin } from './UIPlugin.js' export type { @@ -34,3 +28,9 @@ export type { UppyOptions, } from './Uppy.js' export { default, default as Uppy } from './Uppy.js' +export type { + Body, + Meta, + MinimalRequiredUppyFile, + UppyFile, +} from './utils/index.js' diff --git a/packages/@uppy/core/src/loggers.ts b/packages/@uppy/core/src/loggers.ts index a5df4e195b..60233da468 100644 --- a/packages/@uppy/core/src/loggers.ts +++ b/packages/@uppy/core/src/loggers.ts @@ -1,4 +1,4 @@ -import { getTimeStamp } from '@uppy/utils' +import { getTimeStamp } from './utils/index.js' // Swallow all logs, except errors. // default if logger is not set or debug: false diff --git a/packages/@uppy/provider-views/src/Breadcrumbs.tsx b/packages/@uppy/core/src/provider-views/Breadcrumbs.tsx similarity index 94% rename from packages/@uppy/provider-views/src/Breadcrumbs.tsx rename to packages/@uppy/core/src/provider-views/Breadcrumbs.tsx index 831ed0438d..f98b4fdd8b 100644 --- a/packages/@uppy/provider-views/src/Breadcrumbs.tsx +++ b/packages/@uppy/core/src/provider-views/Breadcrumbs.tsx @@ -1,5 +1,5 @@ -import type { Body, Meta, PartialTreeFolder } from '@uppy/core' import { Fragment, type h } from 'preact' +import type { Body, Meta, PartialTreeFolder } from '../index.js' import type ProviderView from './ProviderView/index.js' type BreadcrumbsProps = { diff --git a/packages/@uppy/provider-views/src/Browser.tsx b/packages/@uppy/core/src/provider-views/Browser.tsx similarity index 96% rename from packages/@uppy/provider-views/src/Browser.tsx rename to packages/@uppy/core/src/provider-views/Browser.tsx index 1ab0a9b670..244ad04a6a 100644 --- a/packages/@uppy/provider-views/src/Browser.tsx +++ b/packages/@uppy/core/src/provider-views/Browser.tsx @@ -1,12 +1,12 @@ +import { useEffect, useState } from 'preact/hooks' import type { Body, Meta, PartialTreeFile, PartialTreeFolderNode, -} from '@uppy/core' -import type { I18n } from '@uppy/utils' -import { VirtualList } from '@uppy/utils' -import { useEffect, useState } from 'preact/hooks' +} from '../index.js' +import type { I18n } from '../utils/index.js' +import { VirtualList } from '../utils/index.js' import Item from './Item/index.js' import type ProviderView from './ProviderView/ProviderView.js' diff --git a/packages/@uppy/provider-views/src/FilterInput.tsx b/packages/@uppy/core/src/provider-views/FilterInput.tsx similarity index 98% rename from packages/@uppy/provider-views/src/FilterInput.tsx rename to packages/@uppy/core/src/provider-views/FilterInput.tsx index 1fa9baabef..25c1010588 100644 --- a/packages/@uppy/provider-views/src/FilterInput.tsx +++ b/packages/@uppy/core/src/provider-views/FilterInput.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '../utils/index.js' import { useSearchForm } from './useSearchForm.js' interface FilterInputProps { diff --git a/packages/@uppy/provider-views/src/FooterActions.tsx b/packages/@uppy/core/src/provider-views/FooterActions.tsx similarity index 94% rename from packages/@uppy/provider-views/src/FooterActions.tsx rename to packages/@uppy/core/src/provider-views/FooterActions.tsx index df723de4da..a5ffa3db86 100644 --- a/packages/@uppy/provider-views/src/FooterActions.tsx +++ b/packages/@uppy/core/src/provider-views/FooterActions.tsx @@ -1,7 +1,7 @@ -import type { Body, Meta, PartialTree } from '@uppy/core' -import type { I18n } from '@uppy/utils' import classNames from 'classnames' import { useMemo } from 'preact/hooks' +import type { Body, Meta, PartialTree } from '../index.js' +import type { I18n } from '../utils/index.js' import type ProviderView from './ProviderView/ProviderView.js' import getNumberOfSelectedFiles from './utils/PartialTreeUtils/getNumberOfSelectedFiles.js' diff --git a/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx b/packages/@uppy/core/src/provider-views/GooglePicker/GooglePickerView.tsx similarity index 98% rename from packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx rename to packages/@uppy/core/src/provider-views/GooglePicker/GooglePickerView.tsx index c18a06557c..371bcbddca 100644 --- a/packages/@uppy/provider-views/src/GooglePicker/GooglePickerView.tsx +++ b/packages/@uppy/core/src/provider-views/GooglePicker/GooglePickerView.tsx @@ -1,6 +1,6 @@ -import type { AsyncStore, Uppy } from '@uppy/core' -import type { I18n } from '@uppy/utils' import { useCallback, useEffect, useRef, useState } from 'preact/hooks' +import type { AsyncStore, Uppy } from '../../index.js' +import type { I18n } from '../../utils/index.js' import AuthView from '../ProviderView/AuthView.js' import { authorize, diff --git a/packages/@uppy/provider-views/src/GooglePicker/googlePicker.ts b/packages/@uppy/core/src/provider-views/GooglePicker/googlePicker.ts similarity index 100% rename from packages/@uppy/provider-views/src/GooglePicker/googlePicker.ts rename to packages/@uppy/core/src/provider-views/GooglePicker/googlePicker.ts diff --git a/packages/@uppy/provider-views/src/GooglePicker/icons.tsx b/packages/@uppy/core/src/provider-views/GooglePicker/icons.tsx similarity index 100% rename from packages/@uppy/provider-views/src/GooglePicker/icons.tsx rename to packages/@uppy/core/src/provider-views/GooglePicker/icons.tsx diff --git a/packages/@uppy/provider-views/src/Item/components/GridItem.tsx b/packages/@uppy/core/src/provider-views/Item/components/GridItem.tsx similarity index 94% rename from packages/@uppy/provider-views/src/Item/components/GridItem.tsx rename to packages/@uppy/core/src/provider-views/Item/components/GridItem.tsx index e7c19601b6..55ad44c468 100644 --- a/packages/@uppy/provider-views/src/Item/components/GridItem.tsx +++ b/packages/@uppy/core/src/provider-views/Item/components/GridItem.tsx @@ -1,5 +1,5 @@ -import type { PartialTreeFile, PartialTreeFolderNode } from '@uppy/core' import type { h } from 'preact' +import type { PartialTreeFile, PartialTreeFolderNode } from '../../../index.js' import ItemIcon from './ItemIcon.js' type GridItemProps = { diff --git a/packages/@uppy/provider-views/src/Item/components/ItemIcon.tsx b/packages/@uppy/core/src/provider-views/Item/components/ItemIcon.tsx similarity index 100% rename from packages/@uppy/provider-views/src/Item/components/ItemIcon.tsx rename to packages/@uppy/core/src/provider-views/Item/components/ItemIcon.tsx diff --git a/packages/@uppy/provider-views/src/Item/components/ListItem.tsx b/packages/@uppy/core/src/provider-views/Item/components/ListItem.tsx similarity index 98% rename from packages/@uppy/provider-views/src/Item/components/ListItem.tsx rename to packages/@uppy/core/src/provider-views/Item/components/ListItem.tsx index 4522644f2a..4b2e782402 100644 --- a/packages/@uppy/provider-views/src/Item/components/ListItem.tsx +++ b/packages/@uppy/core/src/provider-views/Item/components/ListItem.tsx @@ -1,9 +1,9 @@ +import type { h } from 'preact' import type { PartialTreeFile, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core' -import type { h } from 'preact' +} from '../../../index.js' import ItemIcon from './ItemIcon.js' // if folder: diff --git a/packages/@uppy/provider-views/src/Item/components/SearchResultItem.tsx b/packages/@uppy/core/src/provider-views/Item/components/SearchResultItem.tsx similarity index 93% rename from packages/@uppy/provider-views/src/Item/components/SearchResultItem.tsx rename to packages/@uppy/core/src/provider-views/Item/components/SearchResultItem.tsx index 3ba6b94926..2dff933cbe 100644 --- a/packages/@uppy/provider-views/src/Item/components/SearchResultItem.tsx +++ b/packages/@uppy/core/src/provider-views/Item/components/SearchResultItem.tsx @@ -1,6 +1,6 @@ -import type { PartialTreeFile, PartialTreeFolderNode } from '@uppy/core' -import type { I18n } from '@uppy/utils' import classNames from 'classnames' +import type { PartialTreeFile, PartialTreeFolderNode } from '../../../index.js' +import type { I18n } from '../../../utils/index.js' import type ProviderView from '../../ProviderView/ProviderView.js' import ItemIcon from './ItemIcon.js' diff --git a/packages/@uppy/provider-views/src/Item/index.tsx b/packages/@uppy/core/src/provider-views/Item/index.tsx similarity index 96% rename from packages/@uppy/provider-views/src/Item/index.tsx rename to packages/@uppy/core/src/provider-views/Item/index.tsx index 4caf673da2..2f43a38cad 100644 --- a/packages/@uppy/provider-views/src/Item/index.tsx +++ b/packages/@uppy/core/src/provider-views/Item/index.tsx @@ -1,11 +1,11 @@ +import classNames from 'classnames' +import type { h } from 'preact' import type { PartialTreeFile, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core' -import type { I18n } from '@uppy/utils' -import classNames from 'classnames' -import type { h } from 'preact' +} from '../../index.js' +import type { I18n } from '../../utils/index.js' import GridItem from './components/GridItem.js' import ListItem from './components/ListItem.js' diff --git a/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx b/packages/@uppy/core/src/provider-views/ProviderView/AuthView.tsx similarity index 97% rename from packages/@uppy/provider-views/src/ProviderView/AuthView.tsx rename to packages/@uppy/core/src/provider-views/ProviderView/AuthView.tsx index f623b1d3ed..8fe835979f 100644 --- a/packages/@uppy/provider-views/src/ProviderView/AuthView.tsx +++ b/packages/@uppy/core/src/provider-views/ProviderView/AuthView.tsx @@ -1,7 +1,7 @@ -import type { Body, Meta } from '@uppy/core' -import type { I18n } from '@uppy/utils' import type { h } from 'preact' import { useCallback } from 'preact/hooks' +import type { Body, Meta } from '../../index.js' +import type { I18n } from '../../utils/index.js' import type ProviderViews from './ProviderView.js' import type { Opts } from './ProviderView.js' diff --git a/packages/@uppy/provider-views/src/ProviderView/GlobalSearchView.tsx b/packages/@uppy/core/src/provider-views/ProviderView/GlobalSearchView.tsx similarity index 88% rename from packages/@uppy/provider-views/src/ProviderView/GlobalSearchView.tsx rename to packages/@uppy/core/src/provider-views/ProviderView/GlobalSearchView.tsx index 7c0eaf6f09..0c040840a5 100644 --- a/packages/@uppy/provider-views/src/ProviderView/GlobalSearchView.tsx +++ b/packages/@uppy/core/src/provider-views/ProviderView/GlobalSearchView.tsx @@ -1,5 +1,5 @@ -import type { PartialTreeFile, PartialTreeFolderNode } from '@uppy/core' -import type { I18n } from '@uppy/utils' +import type { PartialTreeFile, PartialTreeFolderNode } from '../../index.js' +import type { I18n } from '../../utils/index.js' import SearchResultItem from '../Item/components/SearchResultItem.js' import type ProviderView from './ProviderView.js' diff --git a/packages/@uppy/provider-views/src/ProviderView/Header.tsx b/packages/@uppy/core/src/provider-views/ProviderView/Header.tsx similarity index 91% rename from packages/@uppy/provider-views/src/ProviderView/Header.tsx rename to packages/@uppy/core/src/provider-views/ProviderView/Header.tsx index 5c7c06cfd9..22e7a210b3 100644 --- a/packages/@uppy/provider-views/src/ProviderView/Header.tsx +++ b/packages/@uppy/core/src/provider-views/ProviderView/Header.tsx @@ -1,7 +1,7 @@ -import type { Body, Meta, PartialTreeFolder } from '@uppy/core' -import type { I18n } from '@uppy/utils' import classNames from 'classnames' import type { h } from 'preact' +import type { Body, Meta, PartialTreeFolder } from '../../index.js' +import type { I18n } from '../../utils/index.js' import Breadcrumbs from '../Breadcrumbs.js' import type ProviderView from './ProviderView.js' import User from './User.js' diff --git a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx b/packages/@uppy/core/src/provider-views/ProviderView/ProviderView.tsx similarity index 95% rename from packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx rename to packages/@uppy/core/src/provider-views/ProviderView/ProviderView.tsx index 4e010678e2..f6dbe44516 100644 --- a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx +++ b/packages/@uppy/core/src/provider-views/ProviderView/ProviderView.tsx @@ -1,3 +1,7 @@ +import classNames from 'classnames' +import debounce from 'lodash/debounce.js' +import type { h } from 'preact' +import packageJson from '../../../package.json' with { type: 'json' } import type { Body, Meta, @@ -9,13 +13,9 @@ import type { UnknownProviderPlugin, UnknownProviderPluginState, ValidateableFile, -} from '@uppy/core' -import type { CompanionFile, I18n } from '@uppy/utils' -import { remoteFileObjToLocal } from '@uppy/utils' -import classNames from 'classnames' -import debounce from 'lodash/debounce.js' -import type { h } from 'preact' -import packageJson from '../../package.json' with { type: 'json' } +} from '../../index.js' +import type { CompanionFile, I18n } from '../../utils/index.js' +import { remoteFileObjToLocal } from '../../utils/index.js' import Browser from '../Browser.js' import FilterInput from '../FilterInput.js' import FooterActions from '../FooterActions.js' @@ -66,6 +66,17 @@ const getDefaultState = ( type Optional = Pick, K> & Omit +/** + * Shape of the responses Companion returns from its `list` and `search` + * endpoints. The `Provider` methods are generic, so we pass this as the + * expected response type at the call sites. + */ +type ProviderListResponse = { + username: string + nextPagePath: string | null + items: CompanionFile[] +} + export interface Opts { provider: UnknownProviderPlugin['provider'] viewType: 'list' | 'grid' @@ -248,10 +259,13 @@ export default class ProviderView { await this.#withAbort(async (signal) => { const scopePath = currentFolder.type === 'root' ? undefined : currentFolderId - const { items } = await this.provider.search!(searchString, { - signal, - path: scopePath, - }) + const { items } = await this.provider.search( + searchString, + { + signal, + path: scopePath, + }, + ) // For each searched file, build the entire path (from the root all the way to the leaf node) // This is because we need to make sure all ancestor folders are present in the partialTree before we open the folder or check the file. @@ -389,10 +403,10 @@ export default class ProviderView { let currentPagePath = folderId let currentItems: CompanionFile[] = [] do { - const { username, nextPagePath, items } = await this.provider.list( - currentPagePath, - { signal }, - ) + const { username, nextPagePath, items } = + await this.provider.list(currentPagePath, { + signal, + }) // It's important to set the username during one of our first fetches this.plugin.setPluginState({ username }) @@ -478,10 +492,11 @@ export default class ProviderView { ) { this.isHandlingScroll = true await this.#withAbort(async (signal) => { - const { nextPagePath, items } = await this.provider.list( - currentFolder.nextPagePath, - { signal }, - ) + const { nextPagePath, items } = + await this.provider.list( + currentFolder.nextPagePath, + { signal }, + ) const newPartialTree = PartialTreeUtils.afterScrollFolder( partialTree, currentFolderId, diff --git a/packages/@uppy/provider-views/src/ProviderView/User.tsx b/packages/@uppy/core/src/provider-views/ProviderView/User.tsx similarity index 100% rename from packages/@uppy/provider-views/src/ProviderView/User.tsx rename to packages/@uppy/core/src/provider-views/ProviderView/User.tsx diff --git a/packages/@uppy/provider-views/src/ProviderView/index.ts b/packages/@uppy/core/src/provider-views/ProviderView/index.ts similarity index 100% rename from packages/@uppy/provider-views/src/ProviderView/index.ts rename to packages/@uppy/core/src/provider-views/ProviderView/index.ts diff --git a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx b/packages/@uppy/core/src/provider-views/SearchProviderView/SearchProviderView.tsx similarity index 97% rename from packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx rename to packages/@uppy/core/src/provider-views/SearchProviderView/SearchProviderView.tsx index 61bfe827f7..6d58a74059 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx +++ b/packages/@uppy/core/src/provider-views/SearchProviderView/SearchProviderView.tsx @@ -1,3 +1,6 @@ +import classNames from 'classnames' +import type { h } from 'preact' +import packageJson from '../../../package.json' with { type: 'json' } import type { Body, DefinePluginOpts, @@ -9,12 +12,9 @@ import type { UnknownSearchProviderPlugin, UnknownSearchProviderPluginState, ValidateableFile, -} from '@uppy/core' -import type { CompanionFile } from '@uppy/utils' -import { remoteFileObjToLocal } from '@uppy/utils' -import classNames from 'classnames' -import type { h } from 'preact' -import packageJson from '../../package.json' with { type: 'json' } +} from '../../index.js' +import type { CompanionFile } from '../../utils/index.js' +import { remoteFileObjToLocal } from '../../utils/index.js' import Browser from '../Browser.js' import FilterInput from '../FilterInput.js' import FooterActions from '../FooterActions.js' diff --git a/packages/@uppy/provider-views/src/SearchProviderView/index.ts b/packages/@uppy/core/src/provider-views/SearchProviderView/index.ts similarity index 100% rename from packages/@uppy/provider-views/src/SearchProviderView/index.ts rename to packages/@uppy/core/src/provider-views/SearchProviderView/index.ts diff --git a/packages/@uppy/provider-views/src/SearchView.tsx b/packages/@uppy/core/src/provider-views/SearchView.tsx similarity index 100% rename from packages/@uppy/provider-views/src/SearchView.tsx rename to packages/@uppy/core/src/provider-views/SearchView.tsx diff --git a/packages/@uppy/provider-views/src/index.ts b/packages/@uppy/core/src/provider-views/index.ts similarity index 100% rename from packages/@uppy/provider-views/src/index.ts rename to packages/@uppy/core/src/provider-views/index.ts diff --git a/packages/@uppy/provider-views/src/style.scss b/packages/@uppy/core/src/provider-views/style.scss similarity index 100% rename from packages/@uppy/provider-views/src/style.scss rename to packages/@uppy/core/src/provider-views/style.scss diff --git a/packages/@uppy/provider-views/src/style/uppy-ProviderBrowser-viewType--grid.scss b/packages/@uppy/core/src/provider-views/style/uppy-ProviderBrowser-viewType--grid.scss similarity index 100% rename from packages/@uppy/provider-views/src/style/uppy-ProviderBrowser-viewType--grid.scss rename to packages/@uppy/core/src/provider-views/style/uppy-ProviderBrowser-viewType--grid.scss diff --git a/packages/@uppy/provider-views/src/style/uppy-ProviderBrowser-viewType--list.scss b/packages/@uppy/core/src/provider-views/style/uppy-ProviderBrowser-viewType--list.scss similarity index 100% rename from packages/@uppy/provider-views/src/style/uppy-ProviderBrowser-viewType--list.scss rename to packages/@uppy/core/src/provider-views/style/uppy-ProviderBrowser-viewType--list.scss diff --git a/packages/@uppy/provider-views/src/style/uppy-ProviderBrowserItem-checkbox.scss b/packages/@uppy/core/src/provider-views/style/uppy-ProviderBrowserItem-checkbox.scss similarity index 100% rename from packages/@uppy/provider-views/src/style/uppy-ProviderBrowserItem-checkbox.scss rename to packages/@uppy/core/src/provider-views/style/uppy-ProviderBrowserItem-checkbox.scss diff --git a/packages/@uppy/provider-views/src/style/uppy-SearchProvider-input.scss b/packages/@uppy/core/src/provider-views/style/uppy-SearchProvider-input.scss similarity index 100% rename from packages/@uppy/provider-views/src/style/uppy-SearchProvider-input.scss rename to packages/@uppy/core/src/provider-views/style/uppy-SearchProvider-input.scss diff --git a/packages/@uppy/provider-views/src/useSearchForm.ts b/packages/@uppy/core/src/provider-views/useSearchForm.ts similarity index 100% rename from packages/@uppy/provider-views/src/useSearchForm.ts rename to packages/@uppy/core/src/provider-views/useSearchForm.ts diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterFill.ts similarity index 97% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterFill.ts index a16686118c..c89dda661e 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterFill.ts @@ -1,13 +1,13 @@ +// p-queue does not have a `"main"` field in its `package.json`, and that makes `import/no-unresolved` freak out. +// We can safely ignore it because bundlers will happily use the `"exports"` field instead. +import PQueue from 'p-queue' import type { PartialTree, PartialTreeFile, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core' -import type { CompanionFile } from '@uppy/utils' -// p-queue does not have a `"main"` field in its `package.json`, and that makes `import/no-unresolved` freak out. -// We can safely ignore it because bundlers will happily use the `"exports"` field instead. -import PQueue from 'p-queue' +} from '../../../index.js' +import type { CompanionFile } from '../../../utils/index.js' import shallowClone from './shallowClone.js' export type ApiList = (directory: PartialTreeId) => Promise<{ diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterOpenFolder.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterOpenFolder.ts similarity index 96% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterOpenFolder.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterOpenFolder.ts index 7295112eb9..678a86128c 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterOpenFolder.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterOpenFolder.ts @@ -3,8 +3,8 @@ import type { PartialTreeFile, PartialTreeFolder, PartialTreeFolderNode, -} from '@uppy/core' -import type { CompanionFile } from '@uppy/utils' +} from '../../../index.js' +import type { CompanionFile } from '../../../utils/index.js' const afterOpenFolder = ( oldPartialTree: PartialTree, diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterScrollFolder.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterScrollFolder.ts similarity index 95% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterScrollFolder.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterScrollFolder.ts index 429952c6fc..bb121c76f1 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterScrollFolder.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterScrollFolder.ts @@ -4,8 +4,8 @@ import type { PartialTreeFolder, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core' -import type { CompanionFile } from '@uppy/utils' +} from '../../../index.js' +import type { CompanionFile } from '../../../utils/index.js' const afterScrollFolder = ( oldPartialTree: PartialTree, diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterToggleCheckbox.ts similarity index 99% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterToggleCheckbox.ts index 484c3f45a3..9b807a44ea 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterToggleCheckbox.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/afterToggleCheckbox.ts @@ -4,7 +4,7 @@ import type { PartialTreeFolder, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core' +} from '../../../index.js' import shallowClone from './shallowClone.js' /* diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getBreadcrumbs.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getBreadcrumbs.ts similarity index 96% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/getBreadcrumbs.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getBreadcrumbs.ts index b98d2064ce..cd7b9315ef 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getBreadcrumbs.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getBreadcrumbs.ts @@ -3,7 +3,7 @@ import type { PartialTreeFolder, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core' +} from '../../../index.js' const getBreadcrumbs = ( partialTree: PartialTree, diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts similarity index 96% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts index cdae48dd09..23959e12c5 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getCheckedFilesWithPaths.ts @@ -3,8 +3,8 @@ import type { PartialTreeFile, PartialTreeFolderNode, PartialTreeId, -} from '@uppy/core' -import type { CompanionFile } from '@uppy/utils' +} from '../../../index.js' +import type { CompanionFile } from '../../../utils/index.js' export interface Cache { [key: string]: (PartialTreeFile | PartialTreeFolderNode)[] diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts similarity index 93% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts index 1c6643509f..232378d368 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/getNumberOfSelectedFiles.ts @@ -1,4 +1,4 @@ -import type { PartialTree } from '@uppy/core' +import type { PartialTree } from '../../../index.js' /** * We're interested in all 'checked' leaves of this tree, diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/index.test.ts similarity index 99% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/index.test.ts index 02a1159eda..3ad272d9b1 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.test.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/index.test.ts @@ -1,12 +1,12 @@ +import { describe, expect, it, vi } from 'vitest' import type { PartialTree, PartialTreeFile, PartialTreeFolderNode, PartialTreeFolderRoot, PartialTreeId, -} from '@uppy/core' -import type { CompanionFile } from '@uppy/utils' -import { describe, expect, it, vi } from 'vitest' +} from '../../../index.js' +import type { CompanionFile } from '../../../utils/index.js' import afterFill from './afterFill.js' import afterOpenFolder from './afterOpenFolder.js' import afterScrollFolder from './afterScrollFolder.js' diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/index.ts similarity index 100% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/index.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/index.ts diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/shallowClone.ts b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/shallowClone.ts similarity index 86% rename from packages/@uppy/provider-views/src/utils/PartialTreeUtils/shallowClone.ts rename to packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/shallowClone.ts index a68cdbf3cf..4fb8a4eedf 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/shallowClone.ts +++ b/packages/@uppy/core/src/provider-views/utils/PartialTreeUtils/shallowClone.ts @@ -1,4 +1,4 @@ -import type { PartialTree } from '@uppy/core' +import type { PartialTree } from '../../../index.js' /** * One-level copying is sufficient as mutations within our `partialTree` are limited to properties diff --git a/packages/@uppy/provider-views/src/utils/addFiles.ts b/packages/@uppy/core/src/provider-views/utils/addFiles.ts similarity index 77% rename from packages/@uppy/provider-views/src/utils/addFiles.ts rename to packages/@uppy/core/src/provider-views/utils/addFiles.ts index d4c34c6164..8fc63a38bb 100644 --- a/packages/@uppy/provider-views/src/utils/addFiles.ts +++ b/packages/@uppy/core/src/provider-views/utils/addFiles.ts @@ -1,19 +1,23 @@ -import type { UnknownPlugin } from '@uppy/core' +import type { + UnknownPlugin, + UnknownProviderPlugin, + UnknownSearchProviderPlugin, +} from '../../index.js' import type { Body, - CompanionClientProvider, - CompanionClientSearchProvider, CompanionFile, Meta, UppyFileNonGhost, -} from '@uppy/utils' -import { getSafeFileId } from '@uppy/utils' +} from '../../utils/index.js' +import { getSafeFileId } from '../../utils/index.js' import companionFileToUppyFile from './companionFileToUppyFile.js' const addFiles = ( companionFiles: CompanionFile[], plugin: UnknownPlugin, - provider: CompanionClientProvider | CompanionClientSearchProvider, + provider: + | UnknownProviderPlugin['provider'] + | UnknownSearchProviderPlugin['provider'], ): void => { const uppyFiles = companionFiles.map((f) => companionFileToUppyFile(f, plugin, provider), diff --git a/packages/@uppy/provider-views/src/utils/companionFileToUppyFile.ts b/packages/@uppy/core/src/provider-views/utils/companionFileToUppyFile.ts similarity index 83% rename from packages/@uppy/provider-views/src/utils/companionFileToUppyFile.ts rename to packages/@uppy/core/src/provider-views/utils/companionFileToUppyFile.ts index 9b2d190cb4..678ed8d4d3 100644 --- a/packages/@uppy/provider-views/src/utils/companionFileToUppyFile.ts +++ b/packages/@uppy/core/src/provider-views/utils/companionFileToUppyFile.ts @@ -1,17 +1,21 @@ -import type { UnknownPlugin } from '@uppy/core' +import type { + UnknownPlugin, + UnknownProviderPlugin, + UnknownSearchProviderPlugin, +} from '../../index.js' import type { Body, - CompanionClientProvider, - CompanionClientSearchProvider, CompanionFile, Meta, RemoteUppyFile, -} from '@uppy/utils' +} from '../../utils/index.js' const companionFileToUppyFile = ( file: CompanionFile, plugin: UnknownPlugin, - provider: CompanionClientProvider | CompanionClientSearchProvider, + provider: + | UnknownProviderPlugin['provider'] + | UnknownSearchProviderPlugin['provider'], ): RemoteUppyFile => { const name = file.name || file.id diff --git a/packages/@uppy/provider-views/src/utils/getClickedRange.ts b/packages/@uppy/core/src/provider-views/utils/getClickedRange.ts similarity index 91% rename from packages/@uppy/provider-views/src/utils/getClickedRange.ts rename to packages/@uppy/core/src/provider-views/utils/getClickedRange.ts index e9549218df..c58e98681f 100644 --- a/packages/@uppy/provider-views/src/utils/getClickedRange.ts +++ b/packages/@uppy/core/src/provider-views/utils/getClickedRange.ts @@ -1,4 +1,4 @@ -import type { PartialTreeFile, PartialTreeFolderNode } from '@uppy/core' +import type { PartialTreeFile, PartialTreeFolderNode } from '../../index.js' // Shift-clicking selects a single consecutive list of items // starting at the previous click. diff --git a/packages/@uppy/provider-views/src/utils/handleError.ts b/packages/@uppy/core/src/provider-views/utils/handleError.ts similarity index 94% rename from packages/@uppy/provider-views/src/utils/handleError.ts rename to packages/@uppy/core/src/provider-views/utils/handleError.ts index 64cf08ae15..06aea875fe 100644 --- a/packages/@uppy/provider-views/src/utils/handleError.ts +++ b/packages/@uppy/core/src/provider-views/utils/handleError.ts @@ -1,4 +1,4 @@ -import type Uppy from '@uppy/core' +import type Uppy from '../../index.js' const handleError = (uppy: Uppy) => diff --git a/packages/@uppy/provider-views/src/utils/shouldHandleScroll.ts b/packages/@uppy/core/src/provider-views/utils/shouldHandleScroll.ts similarity index 100% rename from packages/@uppy/provider-views/src/utils/shouldHandleScroll.ts rename to packages/@uppy/core/src/provider-views/utils/shouldHandleScroll.ts diff --git a/packages/@uppy/store-default/src/index.test.ts b/packages/@uppy/core/src/store/index.test.ts similarity index 100% rename from packages/@uppy/store-default/src/index.test.ts rename to packages/@uppy/core/src/store/index.test.ts diff --git a/packages/@uppy/store-default/src/index.ts b/packages/@uppy/core/src/store/index.ts similarity index 94% rename from packages/@uppy/store-default/src/index.ts rename to packages/@uppy/core/src/store/index.ts index 5da7359cbe..c7708dbcba 100644 --- a/packages/@uppy/store-default/src/index.ts +++ b/packages/@uppy/core/src/store/index.ts @@ -1,4 +1,4 @@ -import packageJson from '../package.json' with { type: 'json' } +import packageJson from '../../package.json' with { type: 'json' } export type GenericState = Record diff --git a/packages/@uppy/core/src/types.test.ts b/packages/@uppy/core/src/types.test.ts index 7e8450b819..bed097ee92 100644 --- a/packages/@uppy/core/src/types.test.ts +++ b/packages/@uppy/core/src/types.test.ts @@ -1,8 +1,13 @@ -import type { Body, InternalMetadata, LocaleStrings, Meta } from '@uppy/utils' import { expectTypeOf, test } from 'vitest' import BasePlugin from './BasePlugin.js' import UIPlugin, { type UIPluginOptions } from './UIPlugin.js' import Uppy, { type UnknownPlugin } from './Uppy.js' +import type { + Body, + InternalMetadata, + LocaleStrings, + Meta, +} from './utils/index.js' interface Opts extends UIPluginOptions { foo: string diff --git a/packages/@uppy/utils/src/AbortController.test.ts b/packages/@uppy/core/src/utils/AbortController.test.ts similarity index 100% rename from packages/@uppy/utils/src/AbortController.test.ts rename to packages/@uppy/core/src/utils/AbortController.test.ts diff --git a/packages/@uppy/utils/src/AbortController.ts b/packages/@uppy/core/src/utils/AbortController.ts similarity index 100% rename from packages/@uppy/utils/src/AbortController.ts rename to packages/@uppy/core/src/utils/AbortController.ts diff --git a/packages/@uppy/utils/src/CompanionFile.ts b/packages/@uppy/core/src/utils/CompanionFile.ts similarity index 100% rename from packages/@uppy/utils/src/CompanionFile.ts rename to packages/@uppy/core/src/utils/CompanionFile.ts diff --git a/packages/@uppy/utils/src/ErrorWithCause.test.ts b/packages/@uppy/core/src/utils/ErrorWithCause.test.ts similarity index 100% rename from packages/@uppy/utils/src/ErrorWithCause.test.ts rename to packages/@uppy/core/src/utils/ErrorWithCause.test.ts diff --git a/packages/@uppy/utils/src/ErrorWithCause.ts b/packages/@uppy/core/src/utils/ErrorWithCause.ts similarity index 100% rename from packages/@uppy/utils/src/ErrorWithCause.ts rename to packages/@uppy/core/src/utils/ErrorWithCause.ts diff --git a/packages/@uppy/utils/src/FOCUSABLE_ELEMENTS.ts b/packages/@uppy/core/src/utils/FOCUSABLE_ELEMENTS.ts similarity index 100% rename from packages/@uppy/utils/src/FOCUSABLE_ELEMENTS.ts rename to packages/@uppy/core/src/utils/FOCUSABLE_ELEMENTS.ts diff --git a/packages/@uppy/utils/src/FileProgress.ts b/packages/@uppy/core/src/utils/FileProgress.ts similarity index 100% rename from packages/@uppy/utils/src/FileProgress.ts rename to packages/@uppy/core/src/utils/FileProgress.ts diff --git a/packages/@uppy/utils/src/NetworkError.ts b/packages/@uppy/core/src/utils/NetworkError.ts similarity index 100% rename from packages/@uppy/utils/src/NetworkError.ts rename to packages/@uppy/core/src/utils/NetworkError.ts diff --git a/packages/@uppy/utils/src/ProgressTimeout.ts b/packages/@uppy/core/src/utils/ProgressTimeout.ts similarity index 100% rename from packages/@uppy/utils/src/ProgressTimeout.ts rename to packages/@uppy/core/src/utils/ProgressTimeout.ts diff --git a/packages/@uppy/utils/src/RateLimitedQueue.test.ts b/packages/@uppy/core/src/utils/RateLimitedQueue.test.ts similarity index 100% rename from packages/@uppy/utils/src/RateLimitedQueue.test.ts rename to packages/@uppy/core/src/utils/RateLimitedQueue.test.ts diff --git a/packages/@uppy/utils/src/RateLimitedQueue.ts b/packages/@uppy/core/src/utils/RateLimitedQueue.ts similarity index 100% rename from packages/@uppy/utils/src/RateLimitedQueue.ts rename to packages/@uppy/core/src/utils/RateLimitedQueue.ts diff --git a/packages/@uppy/utils/src/TaskQueue.test.ts b/packages/@uppy/core/src/utils/TaskQueue.test.ts similarity index 100% rename from packages/@uppy/utils/src/TaskQueue.test.ts rename to packages/@uppy/core/src/utils/TaskQueue.test.ts diff --git a/packages/@uppy/utils/src/TaskQueue.ts b/packages/@uppy/core/src/utils/TaskQueue.ts similarity index 100% rename from packages/@uppy/utils/src/TaskQueue.ts rename to packages/@uppy/core/src/utils/TaskQueue.ts diff --git a/packages/@uppy/utils/src/Translator.test.ts b/packages/@uppy/core/src/utils/Translator.test.ts similarity index 100% rename from packages/@uppy/utils/src/Translator.test.ts rename to packages/@uppy/core/src/utils/Translator.test.ts diff --git a/packages/@uppy/utils/src/Translator.ts b/packages/@uppy/core/src/utils/Translator.ts similarity index 100% rename from packages/@uppy/utils/src/Translator.ts rename to packages/@uppy/core/src/utils/Translator.ts diff --git a/packages/@uppy/utils/src/UppyFile.ts b/packages/@uppy/core/src/utils/UppyFile.ts similarity index 100% rename from packages/@uppy/utils/src/UppyFile.ts rename to packages/@uppy/core/src/utils/UppyFile.ts diff --git a/packages/@uppy/utils/src/UserFacingApiError.ts b/packages/@uppy/core/src/utils/UserFacingApiError.ts similarity index 100% rename from packages/@uppy/utils/src/UserFacingApiError.ts rename to packages/@uppy/core/src/utils/UserFacingApiError.ts diff --git a/packages/@uppy/utils/src/VirtualList.tsx b/packages/@uppy/core/src/utils/VirtualList.tsx similarity index 100% rename from packages/@uppy/utils/src/VirtualList.tsx rename to packages/@uppy/core/src/utils/VirtualList.tsx diff --git a/packages/@uppy/utils/src/canvasToBlob.ts b/packages/@uppy/core/src/utils/canvasToBlob.ts similarity index 100% rename from packages/@uppy/utils/src/canvasToBlob.ts rename to packages/@uppy/core/src/utils/canvasToBlob.ts diff --git a/packages/@uppy/utils/src/dataURItoBlob.test.ts b/packages/@uppy/core/src/utils/dataURItoBlob.test.ts similarity index 100% rename from packages/@uppy/utils/src/dataURItoBlob.test.ts rename to packages/@uppy/core/src/utils/dataURItoBlob.test.ts diff --git a/packages/@uppy/utils/src/dataURItoBlob.ts b/packages/@uppy/core/src/utils/dataURItoBlob.ts similarity index 100% rename from packages/@uppy/utils/src/dataURItoBlob.ts rename to packages/@uppy/core/src/utils/dataURItoBlob.ts diff --git a/packages/@uppy/utils/src/dataURItoFile.test.ts b/packages/@uppy/core/src/utils/dataURItoFile.test.ts similarity index 100% rename from packages/@uppy/utils/src/dataURItoFile.test.ts rename to packages/@uppy/core/src/utils/dataURItoFile.test.ts diff --git a/packages/@uppy/utils/src/dataURItoFile.ts b/packages/@uppy/core/src/utils/dataURItoFile.ts similarity index 100% rename from packages/@uppy/utils/src/dataURItoFile.ts rename to packages/@uppy/core/src/utils/dataURItoFile.ts diff --git a/packages/@uppy/utils/src/delay.test.ts b/packages/@uppy/core/src/utils/delay.test.ts similarity index 100% rename from packages/@uppy/utils/src/delay.test.ts rename to packages/@uppy/core/src/utils/delay.test.ts diff --git a/packages/@uppy/utils/src/delay.ts b/packages/@uppy/core/src/utils/delay.ts similarity index 100% rename from packages/@uppy/utils/src/delay.ts rename to packages/@uppy/core/src/utils/delay.ts diff --git a/packages/@uppy/utils/src/emaFilter.test.ts b/packages/@uppy/core/src/utils/emaFilter.test.ts similarity index 100% rename from packages/@uppy/utils/src/emaFilter.test.ts rename to packages/@uppy/core/src/utils/emaFilter.test.ts diff --git a/packages/@uppy/utils/src/emaFilter.ts b/packages/@uppy/core/src/utils/emaFilter.ts similarity index 100% rename from packages/@uppy/utils/src/emaFilter.ts rename to packages/@uppy/core/src/utils/emaFilter.ts diff --git a/packages/@uppy/utils/src/fetchWithNetworkError.ts b/packages/@uppy/core/src/utils/fetchWithNetworkError.ts similarity index 100% rename from packages/@uppy/utils/src/fetchWithNetworkError.ts rename to packages/@uppy/core/src/utils/fetchWithNetworkError.ts diff --git a/packages/@uppy/utils/src/fetcher.ts b/packages/@uppy/core/src/utils/fetcher.ts similarity index 100% rename from packages/@uppy/utils/src/fetcher.ts rename to packages/@uppy/core/src/utils/fetcher.ts diff --git a/packages/@uppy/utils/src/fileFilters.ts b/packages/@uppy/core/src/utils/fileFilters.ts similarity index 100% rename from packages/@uppy/utils/src/fileFilters.ts rename to packages/@uppy/core/src/utils/fileFilters.ts diff --git a/packages/@uppy/utils/src/findAllDOMElements.ts b/packages/@uppy/core/src/utils/findAllDOMElements.ts similarity index 100% rename from packages/@uppy/utils/src/findAllDOMElements.ts rename to packages/@uppy/core/src/utils/findAllDOMElements.ts diff --git a/packages/@uppy/utils/src/findDOMElement.ts b/packages/@uppy/core/src/utils/findDOMElement.ts similarity index 100% rename from packages/@uppy/utils/src/findDOMElement.ts rename to packages/@uppy/core/src/utils/findDOMElement.ts diff --git a/packages/@uppy/utils/src/generateFileID.test.ts b/packages/@uppy/core/src/utils/generateFileID.test.ts similarity index 100% rename from packages/@uppy/utils/src/generateFileID.test.ts rename to packages/@uppy/core/src/utils/generateFileID.test.ts diff --git a/packages/@uppy/utils/src/generateFileID.ts b/packages/@uppy/core/src/utils/generateFileID.ts similarity index 100% rename from packages/@uppy/utils/src/generateFileID.ts rename to packages/@uppy/core/src/utils/generateFileID.ts diff --git a/packages/@uppy/utils/src/getAllowedMetaFields.ts b/packages/@uppy/core/src/utils/getAllowedMetaFields.ts similarity index 100% rename from packages/@uppy/utils/src/getAllowedMetaFields.ts rename to packages/@uppy/core/src/utils/getAllowedMetaFields.ts diff --git a/packages/@uppy/utils/src/getBytesRemaining.test.ts b/packages/@uppy/core/src/utils/getBytesRemaining.test.ts similarity index 100% rename from packages/@uppy/utils/src/getBytesRemaining.test.ts rename to packages/@uppy/core/src/utils/getBytesRemaining.test.ts diff --git a/packages/@uppy/utils/src/getBytesRemaining.ts b/packages/@uppy/core/src/utils/getBytesRemaining.ts similarity index 100% rename from packages/@uppy/utils/src/getBytesRemaining.ts rename to packages/@uppy/core/src/utils/getBytesRemaining.ts diff --git a/packages/@uppy/utils/src/getDroppedFiles/README.md b/packages/@uppy/core/src/utils/getDroppedFiles/README.md similarity index 100% rename from packages/@uppy/utils/src/getDroppedFiles/README.md rename to packages/@uppy/core/src/utils/getDroppedFiles/README.md diff --git a/packages/@uppy/utils/src/getDroppedFiles/index.ts b/packages/@uppy/core/src/utils/getDroppedFiles/index.ts similarity index 100% rename from packages/@uppy/utils/src/getDroppedFiles/index.ts rename to packages/@uppy/core/src/utils/getDroppedFiles/index.ts diff --git a/packages/@uppy/utils/src/getDroppedFiles/utils/fallbackApi.ts b/packages/@uppy/core/src/utils/getDroppedFiles/utils/fallbackApi.ts similarity index 100% rename from packages/@uppy/utils/src/getDroppedFiles/utils/fallbackApi.ts rename to packages/@uppy/core/src/utils/getDroppedFiles/utils/fallbackApi.ts diff --git a/packages/@uppy/utils/src/getDroppedFiles/utils/webkitGetAsEntryApi/getFilesAndDirectoriesFromDirectory.ts b/packages/@uppy/core/src/utils/getDroppedFiles/utils/webkitGetAsEntryApi/getFilesAndDirectoriesFromDirectory.ts similarity index 100% rename from packages/@uppy/utils/src/getDroppedFiles/utils/webkitGetAsEntryApi/getFilesAndDirectoriesFromDirectory.ts rename to packages/@uppy/core/src/utils/getDroppedFiles/utils/webkitGetAsEntryApi/getFilesAndDirectoriesFromDirectory.ts diff --git a/packages/@uppy/utils/src/getDroppedFiles/utils/webkitGetAsEntryApi/index.ts b/packages/@uppy/core/src/utils/getDroppedFiles/utils/webkitGetAsEntryApi/index.ts similarity index 100% rename from packages/@uppy/utils/src/getDroppedFiles/utils/webkitGetAsEntryApi/index.ts rename to packages/@uppy/core/src/utils/getDroppedFiles/utils/webkitGetAsEntryApi/index.ts diff --git a/packages/@uppy/utils/src/getETA.test.ts b/packages/@uppy/core/src/utils/getETA.test.ts similarity index 100% rename from packages/@uppy/utils/src/getETA.test.ts rename to packages/@uppy/core/src/utils/getETA.test.ts diff --git a/packages/@uppy/utils/src/getETA.ts b/packages/@uppy/core/src/utils/getETA.ts similarity index 100% rename from packages/@uppy/utils/src/getETA.ts rename to packages/@uppy/core/src/utils/getETA.ts diff --git a/packages/@uppy/utils/src/getFileNameAndExtension.test.ts b/packages/@uppy/core/src/utils/getFileNameAndExtension.test.ts similarity index 100% rename from packages/@uppy/utils/src/getFileNameAndExtension.test.ts rename to packages/@uppy/core/src/utils/getFileNameAndExtension.test.ts diff --git a/packages/@uppy/utils/src/getFileNameAndExtension.ts b/packages/@uppy/core/src/utils/getFileNameAndExtension.ts similarity index 100% rename from packages/@uppy/utils/src/getFileNameAndExtension.ts rename to packages/@uppy/core/src/utils/getFileNameAndExtension.ts diff --git a/packages/@uppy/utils/src/getFileType.test.ts b/packages/@uppy/core/src/utils/getFileType.test.ts similarity index 100% rename from packages/@uppy/utils/src/getFileType.test.ts rename to packages/@uppy/core/src/utils/getFileType.test.ts diff --git a/packages/@uppy/utils/src/getFileType.ts b/packages/@uppy/core/src/utils/getFileType.ts similarity index 100% rename from packages/@uppy/utils/src/getFileType.ts rename to packages/@uppy/core/src/utils/getFileType.ts diff --git a/packages/@uppy/utils/src/getFileTypeExtension.test.ts b/packages/@uppy/core/src/utils/getFileTypeExtension.test.ts similarity index 100% rename from packages/@uppy/utils/src/getFileTypeExtension.test.ts rename to packages/@uppy/core/src/utils/getFileTypeExtension.test.ts diff --git a/packages/@uppy/utils/src/getFileTypeExtension.ts b/packages/@uppy/core/src/utils/getFileTypeExtension.ts similarity index 100% rename from packages/@uppy/utils/src/getFileTypeExtension.ts rename to packages/@uppy/core/src/utils/getFileTypeExtension.ts diff --git a/packages/@uppy/utils/src/getSocketHost.test.ts b/packages/@uppy/core/src/utils/getSocketHost.test.ts similarity index 100% rename from packages/@uppy/utils/src/getSocketHost.test.ts rename to packages/@uppy/core/src/utils/getSocketHost.test.ts diff --git a/packages/@uppy/utils/src/getSocketHost.ts b/packages/@uppy/core/src/utils/getSocketHost.ts similarity index 100% rename from packages/@uppy/utils/src/getSocketHost.ts rename to packages/@uppy/core/src/utils/getSocketHost.ts diff --git a/packages/@uppy/utils/src/getSpeed.test.ts b/packages/@uppy/core/src/utils/getSpeed.test.ts similarity index 100% rename from packages/@uppy/utils/src/getSpeed.test.ts rename to packages/@uppy/core/src/utils/getSpeed.test.ts diff --git a/packages/@uppy/utils/src/getSpeed.ts b/packages/@uppy/core/src/utils/getSpeed.ts similarity index 100% rename from packages/@uppy/utils/src/getSpeed.ts rename to packages/@uppy/core/src/utils/getSpeed.ts diff --git a/packages/@uppy/utils/src/getTextDirection.ts b/packages/@uppy/core/src/utils/getTextDirection.ts similarity index 100% rename from packages/@uppy/utils/src/getTextDirection.ts rename to packages/@uppy/core/src/utils/getTextDirection.ts diff --git a/packages/@uppy/utils/src/getTimeStamp.ts b/packages/@uppy/core/src/utils/getTimeStamp.ts similarity index 100% rename from packages/@uppy/utils/src/getTimeStamp.ts rename to packages/@uppy/core/src/utils/getTimeStamp.ts diff --git a/packages/@uppy/utils/src/hasProperty.ts b/packages/@uppy/core/src/utils/hasProperty.ts similarity index 100% rename from packages/@uppy/utils/src/hasProperty.ts rename to packages/@uppy/core/src/utils/hasProperty.ts diff --git a/packages/@uppy/utils/src/index.ts b/packages/@uppy/core/src/utils/index.ts similarity index 96% rename from packages/@uppy/utils/src/index.ts rename to packages/@uppy/core/src/utils/index.ts index 1b663a7ef7..31c2932933 100644 --- a/packages/@uppy/utils/src/index.ts +++ b/packages/@uppy/core/src/utils/index.ts @@ -3,11 +3,6 @@ export { AbortSignal, createAbortError, } from './AbortController.js' -export type { - CompanionClientProvider, - CompanionClientSearchProvider, - RequestOptions, -} from './CompanionClientProvider.js' export type { CompanionFile } from './CompanionFile.js' export { default as canvasToBlob } from './canvasToBlob.js' diff --git a/packages/@uppy/utils/src/isDOMElement.ts b/packages/@uppy/core/src/utils/isDOMElement.ts similarity index 100% rename from packages/@uppy/utils/src/isDOMElement.ts rename to packages/@uppy/core/src/utils/isDOMElement.ts diff --git a/packages/@uppy/utils/src/isDragDropSupported.ts b/packages/@uppy/core/src/utils/isDragDropSupported.ts similarity index 100% rename from packages/@uppy/utils/src/isDragDropSupported.ts rename to packages/@uppy/core/src/utils/isDragDropSupported.ts diff --git a/packages/@uppy/utils/src/isMobileDevice.test.ts b/packages/@uppy/core/src/utils/isMobileDevice.test.ts similarity index 100% rename from packages/@uppy/utils/src/isMobileDevice.test.ts rename to packages/@uppy/core/src/utils/isMobileDevice.test.ts diff --git a/packages/@uppy/utils/src/isMobileDevice.ts b/packages/@uppy/core/src/utils/isMobileDevice.ts similarity index 100% rename from packages/@uppy/utils/src/isMobileDevice.ts rename to packages/@uppy/core/src/utils/isMobileDevice.ts diff --git a/packages/@uppy/utils/src/isNetworkError.test.ts b/packages/@uppy/core/src/utils/isNetworkError.test.ts similarity index 100% rename from packages/@uppy/utils/src/isNetworkError.test.ts rename to packages/@uppy/core/src/utils/isNetworkError.test.ts diff --git a/packages/@uppy/utils/src/isNetworkError.ts b/packages/@uppy/core/src/utils/isNetworkError.ts similarity index 100% rename from packages/@uppy/utils/src/isNetworkError.ts rename to packages/@uppy/core/src/utils/isNetworkError.ts diff --git a/packages/@uppy/utils/src/isObjectURL.test.ts b/packages/@uppy/core/src/utils/isObjectURL.test.ts similarity index 100% rename from packages/@uppy/utils/src/isObjectURL.test.ts rename to packages/@uppy/core/src/utils/isObjectURL.test.ts diff --git a/packages/@uppy/utils/src/isObjectURL.ts b/packages/@uppy/core/src/utils/isObjectURL.ts similarity index 100% rename from packages/@uppy/utils/src/isObjectURL.ts rename to packages/@uppy/core/src/utils/isObjectURL.ts diff --git a/packages/@uppy/utils/src/isPreviewSupported.test.ts b/packages/@uppy/core/src/utils/isPreviewSupported.test.ts similarity index 100% rename from packages/@uppy/utils/src/isPreviewSupported.test.ts rename to packages/@uppy/core/src/utils/isPreviewSupported.test.ts diff --git a/packages/@uppy/utils/src/isPreviewSupported.ts b/packages/@uppy/core/src/utils/isPreviewSupported.ts similarity index 100% rename from packages/@uppy/utils/src/isPreviewSupported.ts rename to packages/@uppy/core/src/utils/isPreviewSupported.ts diff --git a/packages/@uppy/utils/src/isTouchDevice.test.ts b/packages/@uppy/core/src/utils/isTouchDevice.test.ts similarity index 100% rename from packages/@uppy/utils/src/isTouchDevice.test.ts rename to packages/@uppy/core/src/utils/isTouchDevice.test.ts diff --git a/packages/@uppy/utils/src/isTouchDevice.ts b/packages/@uppy/core/src/utils/isTouchDevice.ts similarity index 100% rename from packages/@uppy/utils/src/isTouchDevice.ts rename to packages/@uppy/core/src/utils/isTouchDevice.ts diff --git a/packages/@uppy/utils/src/microtip.scss b/packages/@uppy/core/src/utils/microtip.scss similarity index 100% rename from packages/@uppy/utils/src/microtip.scss rename to packages/@uppy/core/src/utils/microtip.scss diff --git a/packages/@uppy/utils/src/mimeTypes.ts b/packages/@uppy/core/src/utils/mimeTypes.ts similarity index 100% rename from packages/@uppy/utils/src/mimeTypes.ts rename to packages/@uppy/core/src/utils/mimeTypes.ts diff --git a/packages/@uppy/utils/src/prettyETA.test.ts b/packages/@uppy/core/src/utils/prettyETA.test.ts similarity index 100% rename from packages/@uppy/utils/src/prettyETA.test.ts rename to packages/@uppy/core/src/utils/prettyETA.test.ts diff --git a/packages/@uppy/utils/src/prettyETA.ts b/packages/@uppy/core/src/utils/prettyETA.ts similarity index 100% rename from packages/@uppy/utils/src/prettyETA.ts rename to packages/@uppy/core/src/utils/prettyETA.ts diff --git a/packages/@uppy/utils/src/remoteFileObjToLocal.ts b/packages/@uppy/core/src/utils/remoteFileObjToLocal.ts similarity index 100% rename from packages/@uppy/utils/src/remoteFileObjToLocal.ts rename to packages/@uppy/core/src/utils/remoteFileObjToLocal.ts diff --git a/packages/@uppy/utils/src/sampleImageDataURI.ts b/packages/@uppy/core/src/utils/sampleImageDataURI.ts similarity index 100% rename from packages/@uppy/utils/src/sampleImageDataURI.ts rename to packages/@uppy/core/src/utils/sampleImageDataURI.ts diff --git a/packages/@uppy/utils/src/secondsToTime.test.ts b/packages/@uppy/core/src/utils/secondsToTime.test.ts similarity index 100% rename from packages/@uppy/utils/src/secondsToTime.test.ts rename to packages/@uppy/core/src/utils/secondsToTime.test.ts diff --git a/packages/@uppy/utils/src/secondsToTime.ts b/packages/@uppy/core/src/utils/secondsToTime.ts similarity index 100% rename from packages/@uppy/utils/src/secondsToTime.ts rename to packages/@uppy/core/src/utils/secondsToTime.ts diff --git a/packages/@uppy/utils/src/toArray.test.ts b/packages/@uppy/core/src/utils/toArray.test.ts similarity index 100% rename from packages/@uppy/utils/src/toArray.test.ts rename to packages/@uppy/core/src/utils/toArray.test.ts diff --git a/packages/@uppy/utils/src/toArray.ts b/packages/@uppy/core/src/utils/toArray.ts similarity index 100% rename from packages/@uppy/utils/src/toArray.ts rename to packages/@uppy/core/src/utils/toArray.ts diff --git a/packages/@uppy/utils/src/truncateString.test.ts b/packages/@uppy/core/src/utils/truncateString.test.ts similarity index 100% rename from packages/@uppy/utils/src/truncateString.test.ts rename to packages/@uppy/core/src/utils/truncateString.test.ts diff --git a/packages/@uppy/utils/src/truncateString.ts b/packages/@uppy/core/src/utils/truncateString.ts similarity index 100% rename from packages/@uppy/utils/src/truncateString.ts rename to packages/@uppy/core/src/utils/truncateString.ts diff --git a/packages/@uppy/core/tsconfig.build.json b/packages/@uppy/core/tsconfig.build.json index 7af4ec3f9f..e249c49cb9 100644 --- a/packages/@uppy/core/tsconfig.build.json +++ b/packages/@uppy/core/tsconfig.build.json @@ -2,16 +2,10 @@ "extends": "../../../tsconfig.shared", "compilerOptions": { "outDir": "./lib", - "rootDir": "./src" + "rootDir": "./src", + "types": ["preact", "google.accounts", "google.picker", "gapi"] }, "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], - "references": [ - { - "path": "../store-default/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - } - ] + "references": [] } diff --git a/packages/@uppy/core/tsconfig.json b/packages/@uppy/core/tsconfig.json index 66c8a6882c..ce0f03b4c9 100644 --- a/packages/@uppy/core/tsconfig.json +++ b/packages/@uppy/core/tsconfig.json @@ -3,15 +3,8 @@ "compilerOptions": { "emitDeclarationOnly": false, "noEmit": true, - "types": ["preact", "node"] + "types": ["preact", "node", "google.accounts", "google.picker", "gapi"] }, "include": ["./package.json", "./src/**/*.*"], - "references": [ - { - "path": "../store-default/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - } - ] + "references": [] } diff --git a/packages/@uppy/dashboard/package.json b/packages/@uppy/dashboard/package.json index f52a7dc600..30cec88a83 100644 --- a/packages/@uppy/dashboard/package.json +++ b/packages/@uppy/dashboard/package.json @@ -45,9 +45,7 @@ }, "dependencies": { "@transloadit/prettier-bytes": "^1.1.0", - "@uppy/provider-views": "workspace:^", "@uppy/thumbnail-generator": "workspace:^", - "@uppy/utils": "workspace:^", "classnames": "^2.5.1", "lodash": "^4.18.1", "nanoid": "^5.1.11", diff --git a/packages/@uppy/dashboard/src/Dashboard.tsx b/packages/@uppy/dashboard/src/Dashboard.tsx index 422f1cda5f..8d5f329b5c 100644 --- a/packages/@uppy/dashboard/src/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/Dashboard.tsx @@ -10,10 +10,10 @@ import type { UppyFile, } from '@uppy/core' import { UIPlugin } from '@uppy/core' -import { defaultPickerIcon } from '@uppy/provider-views' +import { defaultPickerIcon } from '@uppy/core/provider-views' +import type { LocaleStrings } from '@uppy/core/utils' +import { findAllDOMElements, getDroppedFiles, toArray } from '@uppy/core/utils' import ThumbnailGenerator from '@uppy/thumbnail-generator' -import type { LocaleStrings } from '@uppy/utils' -import { findAllDOMElements, getDroppedFiles, toArray } from '@uppy/utils' import { nanoid } from 'nanoid/non-secure' import type { ComponentChild, h, VNode } from 'preact' import packageJson from '../package.json' with { type: 'json' } diff --git a/packages/@uppy/dashboard/src/GlobalSearch.browser.test.ts b/packages/@uppy/dashboard/src/GlobalSearch.browser.test.ts index 5222ee7537..449d4d239c 100644 --- a/packages/@uppy/dashboard/src/GlobalSearch.browser.test.ts +++ b/packages/@uppy/dashboard/src/GlobalSearch.browser.test.ts @@ -1,8 +1,8 @@ import Uppy from '@uppy/core' +import { ProviderViews } from '@uppy/core/provider-views' import Dashboard from '@uppy/dashboard' import Dropbox from '@uppy/dropbox' import GoogleDrive from '@uppy/google-drive' -import { ProviderViews } from '@uppy/provider-views' import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest' import { page, userEvent } from 'vitest/browser' import { worker } from './setup.js' diff --git a/packages/@uppy/dashboard/src/components/AddFiles.tsx b/packages/@uppy/dashboard/src/components/AddFiles.tsx index ccafc3331e..ff7e63cea0 100644 --- a/packages/@uppy/dashboard/src/components/AddFiles.tsx +++ b/packages/@uppy/dashboard/src/components/AddFiles.tsx @@ -1,4 +1,4 @@ -import type { I18n, Translator } from '@uppy/utils' +import type { I18n, Translator } from '@uppy/core/utils' import { Component, type ComponentChild, Fragment, type h } from 'preact' import type { DashboardState, TargetWithRender } from '../Dashboard.js' diff --git a/packages/@uppy/dashboard/src/components/Dashboard.tsx b/packages/@uppy/dashboard/src/components/Dashboard.tsx index 10456c9243..383b092eb2 100644 --- a/packages/@uppy/dashboard/src/components/Dashboard.tsx +++ b/packages/@uppy/dashboard/src/components/Dashboard.tsx @@ -7,8 +7,8 @@ import type { Uppy, UppyFile, } from '@uppy/core' -import type { I18n, Translator } from '@uppy/utils' -import { isDragDropSupported } from '@uppy/utils' +import type { I18n, Translator } from '@uppy/core/utils' +import { isDragDropSupported } from '@uppy/core/utils' import classNames from 'classnames' import type { h } from 'preact' import type { DashboardState, TargetWithRender } from '../Dashboard.js' diff --git a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx index 1e4d68a082..ba79d66df7 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/Buttons/index.tsx @@ -1,6 +1,6 @@ import type Uppy from '@uppy/core' import type { Body, Meta, UppyFile } from '@uppy/core' -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import type { DashboardState } from '../../../Dashboard.js' import copyToClipboard from '../../../utils/copyToClipboard.js' diff --git a/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx index 15b4c436e3..de3428cd0f 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/FileInfo/index.tsx @@ -1,7 +1,7 @@ import { prettierBytes } from '@transloadit/prettier-bytes' import type { UppyFile } from '@uppy/core' -import type { I18n } from '@uppy/utils' -import { truncateString } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' +import { truncateString } from '@uppy/core/utils' import type { DashboardState } from '../../../Dashboard.js' import MetaErrorMessage from '../MetaErrorMessage.js' diff --git a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.tsx index 2a74fc1c77..bd5f498679 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/FileProgress/index.tsx @@ -1,5 +1,5 @@ import type { Body, Meta, State, Uppy, UppyFile } from '@uppy/core' -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import type { ComponentChild } from 'preact' interface Props { diff --git a/packages/@uppy/dashboard/src/components/FileItem/index.tsx b/packages/@uppy/dashboard/src/components/FileItem/index.tsx index 9088d32c0e..8c45b9ccb3 100644 --- a/packages/@uppy/dashboard/src/components/FileItem/index.tsx +++ b/packages/@uppy/dashboard/src/components/FileItem/index.tsx @@ -1,6 +1,6 @@ import type Uppy from '@uppy/core' import type { Body, Meta, State, UppyFile } from '@uppy/core' -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import classNames from 'classnames' // biome-ignore lint/style/useImportType: h is not a type import { Component, type ComponentChild, h } from 'preact' diff --git a/packages/@uppy/dashboard/src/components/FileList.tsx b/packages/@uppy/dashboard/src/components/FileList.tsx index 24a47fe161..4f9a652518 100644 --- a/packages/@uppy/dashboard/src/components/FileList.tsx +++ b/packages/@uppy/dashboard/src/components/FileList.tsx @@ -1,6 +1,6 @@ import type { Body, Meta, State, Uppy, UppyFile } from '@uppy/core' -import type { I18n } from '@uppy/utils' -import { VirtualList } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' +import { VirtualList } from '@uppy/core/utils' import { useMemo } from 'preact/hooks' import type { DashboardState } from '../Dashboard.js' import FileItem from './FileItem/index.js' diff --git a/packages/@uppy/dashboard/src/components/StatusBar/Components.tsx b/packages/@uppy/dashboard/src/components/StatusBar/Components.tsx index c99c41d7ea..6d6cecaa19 100644 --- a/packages/@uppy/dashboard/src/components/StatusBar/Components.tsx +++ b/packages/@uppy/dashboard/src/components/StatusBar/Components.tsx @@ -1,7 +1,7 @@ import { prettierBytes } from '@transloadit/prettier-bytes' import type { Body, Meta, State, Uppy } from '@uppy/core' -import type { FileProcessingInfo, I18n } from '@uppy/utils' -import { prettyETA } from '@uppy/utils' +import type { FileProcessingInfo, I18n } from '@uppy/core/utils' +import { prettyETA } from '@uppy/core/utils' import classNames from 'classnames' import statusBarStates from './StatusBarStates.js' diff --git a/packages/@uppy/dashboard/src/components/StatusBar/StatusBar.tsx b/packages/@uppy/dashboard/src/components/StatusBar/StatusBar.tsx index 6f87315ccf..dc69657fc3 100644 --- a/packages/@uppy/dashboard/src/components/StatusBar/StatusBar.tsx +++ b/packages/@uppy/dashboard/src/components/StatusBar/StatusBar.tsx @@ -1,6 +1,6 @@ import type { Body, Meta, State, Uppy, UppyFile } from '@uppy/core' -import type { I18n } from '@uppy/utils' -import { emaFilter } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' +import { emaFilter } from '@uppy/core/utils' import type { ComponentChild } from 'preact' import { Component } from 'preact' import statusBarStates from './StatusBarStates.js' diff --git a/packages/@uppy/dashboard/src/components/StatusBar/StatusBarUI.tsx b/packages/@uppy/dashboard/src/components/StatusBar/StatusBarUI.tsx index 8ba63fcc47..eec2722f9e 100644 --- a/packages/@uppy/dashboard/src/components/StatusBar/StatusBarUI.tsx +++ b/packages/@uppy/dashboard/src/components/StatusBar/StatusBarUI.tsx @@ -1,5 +1,5 @@ import type { Body, Meta, State, Uppy, UppyFile } from '@uppy/core' -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import classNames from 'classnames' import { CancelBtn, diff --git a/packages/@uppy/dashboard/src/components/StatusBar/calculateProcessingProgress.ts b/packages/@uppy/dashboard/src/components/StatusBar/calculateProcessingProgress.ts index a7d2bd8f8e..23e0af3784 100644 --- a/packages/@uppy/dashboard/src/components/StatusBar/calculateProcessingProgress.ts +++ b/packages/@uppy/dashboard/src/components/StatusBar/calculateProcessingProgress.ts @@ -1,4 +1,4 @@ -import type { FileProcessingInfo, UppyFile } from '@uppy/utils' +import type { FileProcessingInfo, UppyFile } from '@uppy/core/utils' export default function calculateProcessingProgress( files: Record>, diff --git a/packages/@uppy/dashboard/src/components/StatusBar/style.scss b/packages/@uppy/dashboard/src/components/StatusBar/style.scss index 549fbadc44..e0ff9d21cc 100644 --- a/packages/@uppy/dashboard/src/components/StatusBar/style.scss +++ b/packages/@uppy/dashboard/src/components/StatusBar/style.scss @@ -1,7 +1,7 @@ @use "sass:color"; @use '@uppy/core/src/_utils.scss'; @use '@uppy/core/src/_variables.scss'; -@use '@uppy/utils/src/microtip.scss'; +@use '@uppy/core/src/utils/microtip.scss'; .uppy-StatusBar { position: relative; diff --git a/packages/@uppy/dashboard/src/style.scss b/packages/@uppy/dashboard/src/style.scss index f5283a0f52..75073d8f40 100644 --- a/packages/@uppy/dashboard/src/style.scss +++ b/packages/@uppy/dashboard/src/style.scss @@ -2,7 +2,7 @@ @use "sass:color"; @use '@uppy/core/src/_utils.scss'; @use '@uppy/core/src/_variables.scss'; -@use '@uppy/provider-views/src/style.scss' as style3; +@use '@uppy/core/src/provider-views/style.scss' as style3; // Component-specific css imports @use 'components/FileItem/index.scss'; diff --git a/packages/@uppy/dashboard/src/utils/createSuperFocus.ts b/packages/@uppy/dashboard/src/utils/createSuperFocus.ts index 34c0e8e18d..7344038f7b 100644 --- a/packages/@uppy/dashboard/src/utils/createSuperFocus.ts +++ b/packages/@uppy/dashboard/src/utils/createSuperFocus.ts @@ -1,4 +1,4 @@ -import { FOCUSABLE_ELEMENTS } from '@uppy/utils' +import { FOCUSABLE_ELEMENTS } from '@uppy/core/utils' import debounce from 'lodash/debounce.js' import getActiveOverlayEl from './getActiveOverlayEl.js' diff --git a/packages/@uppy/dashboard/src/utils/trapFocus.ts b/packages/@uppy/dashboard/src/utils/trapFocus.ts index 598ad14c9c..60f7b4ad7f 100644 --- a/packages/@uppy/dashboard/src/utils/trapFocus.ts +++ b/packages/@uppy/dashboard/src/utils/trapFocus.ts @@ -1,4 +1,4 @@ -import { FOCUSABLE_ELEMENTS, toArray } from '@uppy/utils' +import { FOCUSABLE_ELEMENTS, toArray } from '@uppy/core/utils' import getActiveOverlayEl from './getActiveOverlayEl.js' type $TSFixMe = any diff --git a/packages/@uppy/dashboard/tsconfig.build.json b/packages/@uppy/dashboard/tsconfig.build.json index 3d0c3a2996..f79f379c32 100644 --- a/packages/@uppy/dashboard/tsconfig.build.json +++ b/packages/@uppy/dashboard/tsconfig.build.json @@ -7,15 +7,9 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../provider-views/tsconfig.build.json" - }, { "path": "../thumbnail-generator/tsconfig.build.json" }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" }, diff --git a/packages/@uppy/dashboard/tsconfig.json b/packages/@uppy/dashboard/tsconfig.json index f8c72a9490..5164c6582f 100644 --- a/packages/@uppy/dashboard/tsconfig.json +++ b/packages/@uppy/dashboard/tsconfig.json @@ -6,15 +6,9 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../provider-views/tsconfig.build.json" - }, { "path": "../thumbnail-generator/tsconfig.build.json" }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" }, diff --git a/packages/@uppy/drag-drop/package.json b/packages/@uppy/drag-drop/package.json index 81ce3935e0..68493268e2 100644 --- a/packages/@uppy/drag-drop/package.json +++ b/packages/@uppy/drag-drop/package.json @@ -45,7 +45,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/drag-drop/src/DragDrop.tsx b/packages/@uppy/drag-drop/src/DragDrop.tsx index 8987f64fdd..63bd14888a 100644 --- a/packages/@uppy/drag-drop/src/DragDrop.tsx +++ b/packages/@uppy/drag-drop/src/DragDrop.tsx @@ -6,8 +6,8 @@ import type { Uppy, } from '@uppy/core' import { UIPlugin } from '@uppy/core' -import type { LocaleStrings } from '@uppy/utils' -import { getDroppedFiles, isDragDropSupported, toArray } from '@uppy/utils' +import type { LocaleStrings } from '@uppy/core/utils' +import { getDroppedFiles, isDragDropSupported, toArray } from '@uppy/core/utils' import type { ComponentChild, h } from 'preact' import packageJson from '../package.json' with { type: 'json' } import locale from './locale.js' diff --git a/packages/@uppy/drag-drop/tsconfig.build.json b/packages/@uppy/drag-drop/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/drag-drop/tsconfig.build.json +++ b/packages/@uppy/drag-drop/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/drag-drop/tsconfig.json b/packages/@uppy/drag-drop/tsconfig.json index 991d79cbd2..edd6c80fba 100644 --- a/packages/@uppy/drag-drop/tsconfig.json +++ b/packages/@uppy/drag-drop/tsconfig.json @@ -6,9 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/drop-target/package.json b/packages/@uppy/drop-target/package.json index 7d3cdf5853..dc5d682525 100644 --- a/packages/@uppy/drop-target/package.json +++ b/packages/@uppy/drop-target/package.json @@ -43,9 +43,6 @@ "./css/style.scss": "./src/style.scss", "./package.json": "./package.json" }, - "dependencies": { - "@uppy/utils": "workspace:^" - }, "peerDependencies": { "@uppy/core": "workspace:^" }, diff --git a/packages/@uppy/drop-target/src/index.ts b/packages/@uppy/drop-target/src/index.ts index abbb09e7bc..a24f816b09 100644 --- a/packages/@uppy/drop-target/src/index.ts +++ b/packages/@uppy/drop-target/src/index.ts @@ -1,6 +1,6 @@ import type { Body, DefinePluginOpts, Meta, PluginOpts, Uppy } from '@uppy/core' import { BasePlugin } from '@uppy/core' -import { getDroppedFiles, toArray } from '@uppy/utils' +import { getDroppedFiles, toArray } from '@uppy/core/utils' import packageJson from '../package.json' with { type: 'json' } declare module '@uppy/core' { diff --git a/packages/@uppy/drop-target/tsconfig.build.json b/packages/@uppy/drop-target/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/drop-target/tsconfig.build.json +++ b/packages/@uppy/drop-target/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/drop-target/tsconfig.json b/packages/@uppy/drop-target/tsconfig.json index 991d79cbd2..edd6c80fba 100644 --- a/packages/@uppy/drop-target/tsconfig.json +++ b/packages/@uppy/drop-target/tsconfig.json @@ -6,9 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/dropbox/package.json b/packages/@uppy/dropbox/package.json index 746effbea1..9654dd9770 100644 --- a/packages/@uppy/dropbox/package.json +++ b/packages/@uppy/dropbox/package.json @@ -34,9 +34,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/provider-views": "workspace:^", - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/dropbox/src/Dropbox.tsx b/packages/@uppy/dropbox/src/Dropbox.tsx index e536d09e3f..af4c5e68d6 100644 --- a/packages/@uppy/dropbox/src/Dropbox.tsx +++ b/packages/@uppy/dropbox/src/Dropbox.tsx @@ -1,9 +1,3 @@ -import { - type CompanionPluginOptions, - getAllowedHosts, - Provider, - tokenStorage, -} from '@uppy/companion-client' import type { AsyncStore, Body, @@ -13,9 +7,14 @@ import type { UppyFile, } from '@uppy/core' import { UIPlugin, type Uppy } from '@uppy/core' -import { ProviderViews } from '@uppy/provider-views' - -import type { LocaleStrings } from '@uppy/utils' +import { + type CompanionPluginOptions, + getAllowedHosts, + Provider, + tokenStorage, +} from '@uppy/core/companion-client' +import { ProviderViews } from '@uppy/core/provider-views' +import type { LocaleStrings } from '@uppy/core/utils' // biome-ignore lint/style/useImportType: h is not a type import { type ComponentChild, h } from 'preact' import packageJson from '../package.json' with { type: 'json' } diff --git a/packages/@uppy/dropbox/tsconfig.build.json b/packages/@uppy/dropbox/tsconfig.build.json index afabb530f7..ac99ccdd75 100644 --- a/packages/@uppy/dropbox/tsconfig.build.json +++ b/packages/@uppy/dropbox/tsconfig.build.json @@ -7,15 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/dropbox/tsconfig.json b/packages/@uppy/dropbox/tsconfig.json index 847db9a4f0..edd6c80fba 100644 --- a/packages/@uppy/dropbox/tsconfig.json +++ b/packages/@uppy/dropbox/tsconfig.json @@ -6,15 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/facebook/package.json b/packages/@uppy/facebook/package.json index 40ea9a18de..2e043db43e 100644 --- a/packages/@uppy/facebook/package.json +++ b/packages/@uppy/facebook/package.json @@ -34,9 +34,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/provider-views": "workspace:^", - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/facebook/src/Facebook.tsx b/packages/@uppy/facebook/src/Facebook.tsx index 7032db1e41..366a56de15 100644 --- a/packages/@uppy/facebook/src/Facebook.tsx +++ b/packages/@uppy/facebook/src/Facebook.tsx @@ -1,9 +1,3 @@ -import { - type CompanionPluginOptions, - getAllowedHosts, - Provider, - tokenStorage, -} from '@uppy/companion-client' import type { AsyncStore, Body, @@ -13,9 +7,14 @@ import type { UppyFile, } from '@uppy/core' import { UIPlugin, type Uppy } from '@uppy/core' -import { ProviderViews } from '@uppy/provider-views' - -import type { LocaleStrings } from '@uppy/utils' +import { + type CompanionPluginOptions, + getAllowedHosts, + Provider, + tokenStorage, +} from '@uppy/core/companion-client' +import { ProviderViews } from '@uppy/core/provider-views' +import type { LocaleStrings } from '@uppy/core/utils' // biome-ignore lint/style/useImportType: h is not a type import { type ComponentChild, h } from 'preact' import packageJson from '../package.json' with { type: 'json' } diff --git a/packages/@uppy/facebook/tsconfig.build.json b/packages/@uppy/facebook/tsconfig.build.json index afabb530f7..ac99ccdd75 100644 --- a/packages/@uppy/facebook/tsconfig.build.json +++ b/packages/@uppy/facebook/tsconfig.build.json @@ -7,15 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/facebook/tsconfig.json b/packages/@uppy/facebook/tsconfig.json index 847db9a4f0..edd6c80fba 100644 --- a/packages/@uppy/facebook/tsconfig.json +++ b/packages/@uppy/facebook/tsconfig.json @@ -6,15 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/form/package.json b/packages/@uppy/form/package.json index 68e23ef681..96abd66055 100644 --- a/packages/@uppy/form/package.json +++ b/packages/@uppy/form/package.json @@ -34,7 +34,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/utils": "workspace:^", "get-form-data": "^3.0.0" }, "peerDependencies": { diff --git a/packages/@uppy/form/src/index.ts b/packages/@uppy/form/src/index.ts index ba36e8cc8f..d3edd27ff2 100644 --- a/packages/@uppy/form/src/index.ts +++ b/packages/@uppy/form/src/index.ts @@ -7,7 +7,7 @@ import type { UppyEventMap, } from '@uppy/core' import { BasePlugin } from '@uppy/core' -import { findDOMElement, toArray } from '@uppy/utils' +import { findDOMElement, toArray } from '@uppy/core/utils' // @ts-expect-error untyped import getFormData from 'get-form-data' diff --git a/packages/@uppy/form/tsconfig.build.json b/packages/@uppy/form/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/form/tsconfig.build.json +++ b/packages/@uppy/form/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/form/tsconfig.json b/packages/@uppy/form/tsconfig.json index 991d79cbd2..edd6c80fba 100644 --- a/packages/@uppy/form/tsconfig.json +++ b/packages/@uppy/form/tsconfig.json @@ -6,9 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/golden-retriever/package.json b/packages/@uppy/golden-retriever/package.json index 35157b90ee..3a758d31f3 100644 --- a/packages/@uppy/golden-retriever/package.json +++ b/packages/@uppy/golden-retriever/package.json @@ -42,7 +42,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/utils": "workspace:^", "lodash": "^4.18.1" }, "peerDependencies": { diff --git a/packages/@uppy/golden-retriever/src/IndexedDBStore.ts b/packages/@uppy/golden-retriever/src/IndexedDBStore.ts index 00edcda256..1e44df858f 100644 --- a/packages/@uppy/golden-retriever/src/IndexedDBStore.ts +++ b/packages/@uppy/golden-retriever/src/IndexedDBStore.ts @@ -1,4 +1,4 @@ -import type { UppyFileId } from '@uppy/utils' +import type { UppyFileId } from '@uppy/core/utils' const indexedDB = typeof window !== 'undefined' && diff --git a/packages/@uppy/golden-retriever/src/MetaDataStore.ts b/packages/@uppy/golden-retriever/src/MetaDataStore.ts index bc7a46d877..5b914e1f9f 100644 --- a/packages/@uppy/golden-retriever/src/MetaDataStore.ts +++ b/packages/@uppy/golden-retriever/src/MetaDataStore.ts @@ -1,5 +1,9 @@ import type { Body, Meta, State as UppyState } from '@uppy/core' -import type { LocalUppyFile, RemoteUppyFile, UppyFileId } from '@uppy/utils' +import type { + LocalUppyFile, + RemoteUppyFile, + UppyFileId, +} from '@uppy/core/utils' import throttle from 'lodash/throttle.js' // we don't want to store blobs in localStorage diff --git a/packages/@uppy/golden-retriever/src/ServiceWorker.ts b/packages/@uppy/golden-retriever/src/ServiceWorker.ts index 1f7a634acb..a9a00098db 100644 --- a/packages/@uppy/golden-retriever/src/ServiceWorker.ts +++ b/packages/@uppy/golden-retriever/src/ServiceWorker.ts @@ -1,6 +1,6 @@ /// -import type { UppyFileId } from '@uppy/utils' +import type { UppyFileId } from '@uppy/core/utils' declare const self: ServiceWorkerGlobalScope diff --git a/packages/@uppy/golden-retriever/src/ServiceWorkerStore.ts b/packages/@uppy/golden-retriever/src/ServiceWorkerStore.ts index 4b7006d406..71cfdf2b2f 100644 --- a/packages/@uppy/golden-retriever/src/ServiceWorkerStore.ts +++ b/packages/@uppy/golden-retriever/src/ServiceWorkerStore.ts @@ -1,4 +1,4 @@ -import type { Body, Meta, UppyFile, UppyFileId } from '@uppy/utils' +import type { Body, Meta, UppyFile, UppyFileId } from '@uppy/core/utils' import type { AddFilePayload, AllFilesMessage, diff --git a/packages/@uppy/golden-retriever/src/index.ts b/packages/@uppy/golden-retriever/src/index.ts index 3b5c878a82..ba08743d0d 100644 --- a/packages/@uppy/golden-retriever/src/index.ts +++ b/packages/@uppy/golden-retriever/src/index.ts @@ -8,7 +8,7 @@ import type { UppyFile, } from '@uppy/core' import { BasePlugin } from '@uppy/core' -import type { UppyFileId } from '@uppy/utils' +import type { UppyFileId } from '@uppy/core/utils' import packageJson from '../package.json' with { type: 'json' } import IndexedDBStore from './IndexedDBStore.js' import MetaDataStore from './MetaDataStore.js' diff --git a/packages/@uppy/golden-retriever/tsconfig.build.json b/packages/@uppy/golden-retriever/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/golden-retriever/tsconfig.build.json +++ b/packages/@uppy/golden-retriever/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/golden-retriever/tsconfig.json b/packages/@uppy/golden-retriever/tsconfig.json index 991d79cbd2..edd6c80fba 100644 --- a/packages/@uppy/golden-retriever/tsconfig.json +++ b/packages/@uppy/golden-retriever/tsconfig.json @@ -6,9 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/google-drive-picker/package.json b/packages/@uppy/google-drive-picker/package.json index d08ad71ea7..1eac073adc 100644 --- a/packages/@uppy/google-drive-picker/package.json +++ b/packages/@uppy/google-drive-picker/package.json @@ -36,9 +36,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/provider-views": "workspace:^", - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx b/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx index 6d378afdf1..056b5edfae 100644 --- a/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx +++ b/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx @@ -1,16 +1,16 @@ +import type { AsyncStore, BaseProviderPlugin, Body, Meta } from '@uppy/core' +import { UIPlugin, type Uppy } from '@uppy/core' import { type CompanionPluginOptions, RequestClient, tokenStorage, -} from '@uppy/companion-client' -import type { AsyncStore, BaseProviderPlugin, Body, Meta } from '@uppy/core' -import { UIPlugin, type Uppy } from '@uppy/core' +} from '@uppy/core/companion-client' import { GoogleDriveIcon, GooglePickerView, type PickedItem, -} from '@uppy/provider-views' -import type { LocaleStrings } from '@uppy/utils' +} from '@uppy/core/provider-views' +import type { LocaleStrings } from '@uppy/core/utils' import packageJson from '../package.json' with { type: 'json' } import locale from './locale.js' diff --git a/packages/@uppy/google-drive-picker/tsconfig.build.json b/packages/@uppy/google-drive-picker/tsconfig.build.json index c9ee070678..0a39b1547e 100644 --- a/packages/@uppy/google-drive-picker/tsconfig.build.json +++ b/packages/@uppy/google-drive-picker/tsconfig.build.json @@ -9,15 +9,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/google-drive-picker/tsconfig.json b/packages/@uppy/google-drive-picker/tsconfig.json index 847db9a4f0..edd6c80fba 100644 --- a/packages/@uppy/google-drive-picker/tsconfig.json +++ b/packages/@uppy/google-drive-picker/tsconfig.json @@ -6,15 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/google-drive/package.json b/packages/@uppy/google-drive/package.json index 432dc2e202..8b6d8b1206 100644 --- a/packages/@uppy/google-drive/package.json +++ b/packages/@uppy/google-drive/package.json @@ -35,9 +35,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/provider-views": "workspace:^", - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/google-drive/src/DriveProviderViews.ts b/packages/@uppy/google-drive/src/DriveProviderViews.ts index 2d0e664118..2d28246ebc 100644 --- a/packages/@uppy/google-drive/src/DriveProviderViews.ts +++ b/packages/@uppy/google-drive/src/DriveProviderViews.ts @@ -4,7 +4,7 @@ import type { PartialTreeFile, PartialTreeFolderNode, } from '@uppy/core' -import { ProviderViews } from '@uppy/provider-views' +import { ProviderViews } from '@uppy/core/provider-views' export default class DriveProviderViews< M extends Meta, diff --git a/packages/@uppy/google-drive/src/GoogleDrive.tsx b/packages/@uppy/google-drive/src/GoogleDrive.tsx index 1d43160ba0..ef85103c68 100644 --- a/packages/@uppy/google-drive/src/GoogleDrive.tsx +++ b/packages/@uppy/google-drive/src/GoogleDrive.tsx @@ -1,9 +1,3 @@ -import { - type CompanionPluginOptions, - getAllowedHosts, - Provider, - tokenStorage, -} from '@uppy/companion-client' import type { AsyncStore, Body, @@ -13,9 +7,14 @@ import type { UppyFile, } from '@uppy/core' import { UIPlugin, type Uppy } from '@uppy/core' -import type { ProviderViews } from '@uppy/provider-views' - -import type { LocaleStrings } from '@uppy/utils' +import { + type CompanionPluginOptions, + getAllowedHosts, + Provider, + tokenStorage, +} from '@uppy/core/companion-client' +import type { ProviderViews } from '@uppy/core/provider-views' +import type { LocaleStrings } from '@uppy/core/utils' // biome-ignore lint/style/useImportType: h is not a type import { type ComponentChild, h } from 'preact' import packageJson from '../package.json' with { type: 'json' } diff --git a/packages/@uppy/google-drive/tsconfig.build.json b/packages/@uppy/google-drive/tsconfig.build.json index afabb530f7..ac99ccdd75 100644 --- a/packages/@uppy/google-drive/tsconfig.build.json +++ b/packages/@uppy/google-drive/tsconfig.build.json @@ -7,15 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/google-drive/tsconfig.json b/packages/@uppy/google-drive/tsconfig.json index 847db9a4f0..edd6c80fba 100644 --- a/packages/@uppy/google-drive/tsconfig.json +++ b/packages/@uppy/google-drive/tsconfig.json @@ -6,15 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/google-photos-picker/package.json b/packages/@uppy/google-photos-picker/package.json index 109a588ffe..83f13d88e9 100644 --- a/packages/@uppy/google-photos-picker/package.json +++ b/packages/@uppy/google-photos-picker/package.json @@ -36,9 +36,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/provider-views": "workspace:^", - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx b/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx index 0242358aef..c2f95a9b11 100644 --- a/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx +++ b/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx @@ -1,16 +1,16 @@ +import type { AsyncStore, BaseProviderPlugin, Body, Meta } from '@uppy/core' +import { UIPlugin, type Uppy } from '@uppy/core' import { type CompanionPluginOptions, RequestClient, tokenStorage, -} from '@uppy/companion-client' -import type { AsyncStore, BaseProviderPlugin, Body, Meta } from '@uppy/core' -import { UIPlugin, type Uppy } from '@uppy/core' +} from '@uppy/core/companion-client' import { GooglePhotosIcon, GooglePickerView, type PickedItem, -} from '@uppy/provider-views' -import type { LocaleStrings } from '@uppy/utils' +} from '@uppy/core/provider-views' +import type { LocaleStrings } from '@uppy/core/utils' import packageJson from '../package.json' with { type: 'json' } import locale from './locale.js' diff --git a/packages/@uppy/google-photos-picker/tsconfig.build.json b/packages/@uppy/google-photos-picker/tsconfig.build.json index c9ee070678..0a39b1547e 100644 --- a/packages/@uppy/google-photos-picker/tsconfig.build.json +++ b/packages/@uppy/google-photos-picker/tsconfig.build.json @@ -9,15 +9,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/google-photos-picker/tsconfig.json b/packages/@uppy/google-photos-picker/tsconfig.json index 847db9a4f0..edd6c80fba 100644 --- a/packages/@uppy/google-photos-picker/tsconfig.json +++ b/packages/@uppy/google-photos-picker/tsconfig.json @@ -6,15 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/image-editor/package.json b/packages/@uppy/image-editor/package.json index fae2d3e346..dbbdb1156e 100644 --- a/packages/@uppy/image-editor/package.json +++ b/packages/@uppy/image-editor/package.json @@ -46,7 +46,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/utils": "workspace:^", "cropperjs": "^1.6.2", "preact": "^10.29.2" }, diff --git a/packages/@uppy/image-editor/src/Editor.tsx b/packages/@uppy/image-editor/src/Editor.tsx index fd449b2e97..84bbcc6ead 100644 --- a/packages/@uppy/image-editor/src/Editor.tsx +++ b/packages/@uppy/image-editor/src/Editor.tsx @@ -1,5 +1,5 @@ import type { Body, Meta } from '@uppy/core' -import type { I18n, LocalUppyFile } from '@uppy/utils' +import type { I18n, LocalUppyFile } from '@uppy/core/utils' import { Component } from 'preact' import type ImageEditor from './ImageEditor.js' import type { AspectRatio } from './ImageEditor.js' diff --git a/packages/@uppy/image-editor/src/ImageEditor.tsx b/packages/@uppy/image-editor/src/ImageEditor.tsx index 74ed794764..710afc588b 100644 --- a/packages/@uppy/image-editor/src/ImageEditor.tsx +++ b/packages/@uppy/image-editor/src/ImageEditor.tsx @@ -7,7 +7,7 @@ import type { UppyFile, } from '@uppy/core' import { UIPlugin } from '@uppy/core' -import type { LocaleStrings } from '@uppy/utils' +import type { LocaleStrings } from '@uppy/core/utils' import Cropper from 'cropperjs' import packageJson from '../package.json' with { type: 'json' } import Editor from './Editor.js' diff --git a/packages/@uppy/image-editor/tsconfig.build.json b/packages/@uppy/image-editor/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/image-editor/tsconfig.build.json +++ b/packages/@uppy/image-editor/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/image-editor/tsconfig.json b/packages/@uppy/image-editor/tsconfig.json index 991d79cbd2..edd6c80fba 100644 --- a/packages/@uppy/image-editor/tsconfig.json +++ b/packages/@uppy/image-editor/tsconfig.json @@ -6,9 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/image-generator/package.json b/packages/@uppy/image-generator/package.json index 087206d596..73eec15df7 100644 --- a/packages/@uppy/image-generator/package.json +++ b/packages/@uppy/image-generator/package.json @@ -39,9 +39,7 @@ "typecheck": "tsc --build" }, "dependencies": { - "@uppy/provider-views": "workspace:^", "@uppy/transloadit": "workspace:^", - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "devDependencies": { diff --git a/packages/@uppy/image-generator/src/index.tsx b/packages/@uppy/image-generator/src/index.tsx index 8fc002e328..4d1bdd09ac 100644 --- a/packages/@uppy/image-generator/src/index.tsx +++ b/packages/@uppy/image-generator/src/index.tsx @@ -1,13 +1,13 @@ import type { Body, Meta, MinimalRequiredUppyFile, Uppy } from '@uppy/core' import { UIPlugin, type UIPluginOptions } from '@uppy/core' -import { FilterInput, SearchView } from '@uppy/provider-views' +import { FilterInput, SearchView } from '@uppy/core/provider-views' +import { RateLimitedQueue } from '@uppy/core/utils' import { Assembly, type AssemblyResult, Client, type OptionsWithRestructuredFields, } from '@uppy/transloadit' -import { RateLimitedQueue } from '@uppy/utils' import type { h } from 'preact' import locale from './locale.js' diff --git a/packages/@uppy/image-generator/tsconfig.build.json b/packages/@uppy/image-generator/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/image-generator/tsconfig.build.json +++ b/packages/@uppy/image-generator/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/image-generator/tsconfig.json b/packages/@uppy/image-generator/tsconfig.json index ee7d9ca9f4..cf118785e2 100644 --- a/packages/@uppy/image-generator/tsconfig.json +++ b/packages/@uppy/image-generator/tsconfig.json @@ -6,15 +6,9 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" }, - { - "path": "../provider-views/tsconfig.build.json" - }, { "path": "../transloadit/tsconfig.build.json" } diff --git a/packages/@uppy/locales/package.json b/packages/@uppy/locales/package.json index 1832aa22bd..25787d68a6 100644 --- a/packages/@uppy/locales/package.json +++ b/packages/@uppy/locales/package.json @@ -31,7 +31,7 @@ "CHANGELOG.md" ], "dependencies": { - "@uppy/utils": "workspace:^" + "@uppy/core": "workspace:^" }, "devDependencies": { "chalk": "^5.0.0", diff --git a/packages/@uppy/locales/src/ar_SA.ts b/packages/@uppy/locales/src/ar_SA.ts index 5726332aa9..2c1b7fcf96 100644 --- a/packages/@uppy/locales/src/ar_SA.ts +++ b/packages/@uppy/locales/src/ar_SA.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const ar_SA: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/bg_BG.ts b/packages/@uppy/locales/src/bg_BG.ts index 637e505e0c..4fde38d050 100644 --- a/packages/@uppy/locales/src/bg_BG.ts +++ b/packages/@uppy/locales/src/bg_BG.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const bg_BG: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/ca_ES.ts b/packages/@uppy/locales/src/ca_ES.ts index bce9a1296f..6afd3bb017 100644 --- a/packages/@uppy/locales/src/ca_ES.ts +++ b/packages/@uppy/locales/src/ca_ES.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const ca_ES: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/cs_CZ.ts b/packages/@uppy/locales/src/cs_CZ.ts index 1489294507..9321ed59fe 100644 --- a/packages/@uppy/locales/src/cs_CZ.ts +++ b/packages/@uppy/locales/src/cs_CZ.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const cs_CZ: Locale<0 | 1 | 2> = { strings: {}, diff --git a/packages/@uppy/locales/src/da_DK.ts b/packages/@uppy/locales/src/da_DK.ts index 1e8f807cf8..3dee79d189 100644 --- a/packages/@uppy/locales/src/da_DK.ts +++ b/packages/@uppy/locales/src/da_DK.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const da_DK: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/de_DE.ts b/packages/@uppy/locales/src/de_DE.ts index 9c1d99b0d6..f64f4a778d 100644 --- a/packages/@uppy/locales/src/de_DE.ts +++ b/packages/@uppy/locales/src/de_DE.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const de_DE: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/el_GR.ts b/packages/@uppy/locales/src/el_GR.ts index 615121078b..dd768adf61 100644 --- a/packages/@uppy/locales/src/el_GR.ts +++ b/packages/@uppy/locales/src/el_GR.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const el_GR: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/en_US.ts b/packages/@uppy/locales/src/en_US.ts index c3f95e82df..c94f60f980 100644 --- a/packages/@uppy/locales/src/en_US.ts +++ b/packages/@uppy/locales/src/en_US.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const en_US: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/es_ES.ts b/packages/@uppy/locales/src/es_ES.ts index e4581f90e5..838a429dd0 100644 --- a/packages/@uppy/locales/src/es_ES.ts +++ b/packages/@uppy/locales/src/es_ES.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const es_ES: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/es_MX.ts b/packages/@uppy/locales/src/es_MX.ts index b8eb479869..926cd9d9e3 100644 --- a/packages/@uppy/locales/src/es_MX.ts +++ b/packages/@uppy/locales/src/es_MX.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const es_MX: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/fa_IR.ts b/packages/@uppy/locales/src/fa_IR.ts index 1b69091ca9..4fceefc393 100644 --- a/packages/@uppy/locales/src/fa_IR.ts +++ b/packages/@uppy/locales/src/fa_IR.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const fa_IR: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/fi_FI.ts b/packages/@uppy/locales/src/fi_FI.ts index 5eda5537b6..b9e0642bf2 100644 --- a/packages/@uppy/locales/src/fi_FI.ts +++ b/packages/@uppy/locales/src/fi_FI.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const fi_FI: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/fr_FR.ts b/packages/@uppy/locales/src/fr_FR.ts index 7a8f6d0f29..c2b6c31c1d 100644 --- a/packages/@uppy/locales/src/fr_FR.ts +++ b/packages/@uppy/locales/src/fr_FR.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const fr_FR: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/gl_ES.ts b/packages/@uppy/locales/src/gl_ES.ts index 25b2fed3fa..e07a83432a 100644 --- a/packages/@uppy/locales/src/gl_ES.ts +++ b/packages/@uppy/locales/src/gl_ES.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const gl_ES: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/he_IL.ts b/packages/@uppy/locales/src/he_IL.ts index 44a5d52f2a..2cef97313a 100644 --- a/packages/@uppy/locales/src/he_IL.ts +++ b/packages/@uppy/locales/src/he_IL.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const he_IL: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/hi_IN.ts b/packages/@uppy/locales/src/hi_IN.ts index 587d31f507..435530055b 100644 --- a/packages/@uppy/locales/src/hi_IN.ts +++ b/packages/@uppy/locales/src/hi_IN.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const hi_IN: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/hr_HR.ts b/packages/@uppy/locales/src/hr_HR.ts index f347db8279..0f90451654 100644 --- a/packages/@uppy/locales/src/hr_HR.ts +++ b/packages/@uppy/locales/src/hr_HR.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const hr_HR: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/hu_HU.ts b/packages/@uppy/locales/src/hu_HU.ts index 4b7f6d4af1..7a20101be9 100644 --- a/packages/@uppy/locales/src/hu_HU.ts +++ b/packages/@uppy/locales/src/hu_HU.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const hu_HU: Locale<0> = { strings: {}, diff --git a/packages/@uppy/locales/src/id_ID.ts b/packages/@uppy/locales/src/id_ID.ts index 7daf65b029..2ce7a9b1c9 100644 --- a/packages/@uppy/locales/src/id_ID.ts +++ b/packages/@uppy/locales/src/id_ID.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const id_ID: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/is_IS.ts b/packages/@uppy/locales/src/is_IS.ts index ebf4713b54..0207773509 100644 --- a/packages/@uppy/locales/src/is_IS.ts +++ b/packages/@uppy/locales/src/is_IS.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const is_IS: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/it_IT.ts b/packages/@uppy/locales/src/it_IT.ts index 7508dce639..cca8846914 100644 --- a/packages/@uppy/locales/src/it_IT.ts +++ b/packages/@uppy/locales/src/it_IT.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const it_IT: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/ja_JP.ts b/packages/@uppy/locales/src/ja_JP.ts index 62e33ab51f..fc023e05df 100644 --- a/packages/@uppy/locales/src/ja_JP.ts +++ b/packages/@uppy/locales/src/ja_JP.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const ja_JP: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/ko_KR.ts b/packages/@uppy/locales/src/ko_KR.ts index 73138bd881..671235c9b1 100644 --- a/packages/@uppy/locales/src/ko_KR.ts +++ b/packages/@uppy/locales/src/ko_KR.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const ko_KR: Locale<0> = { strings: {}, diff --git a/packages/@uppy/locales/src/ms_MY.ts b/packages/@uppy/locales/src/ms_MY.ts index 1358ea330c..8a18da4968 100644 --- a/packages/@uppy/locales/src/ms_MY.ts +++ b/packages/@uppy/locales/src/ms_MY.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const ms_MY: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/nb_NO.ts b/packages/@uppy/locales/src/nb_NO.ts index 7ac09ce5b0..7a348d865d 100644 --- a/packages/@uppy/locales/src/nb_NO.ts +++ b/packages/@uppy/locales/src/nb_NO.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const nb_NO: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/nl_NL.ts b/packages/@uppy/locales/src/nl_NL.ts index 28a11ed7c3..dfb2cf310e 100644 --- a/packages/@uppy/locales/src/nl_NL.ts +++ b/packages/@uppy/locales/src/nl_NL.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const nl_NL: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/pl_PL.ts b/packages/@uppy/locales/src/pl_PL.ts index 00b33458b8..b573517e6c 100644 --- a/packages/@uppy/locales/src/pl_PL.ts +++ b/packages/@uppy/locales/src/pl_PL.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const pl_PL: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/pt_BR.ts b/packages/@uppy/locales/src/pt_BR.ts index 48bbb18489..2d7963e1f7 100644 --- a/packages/@uppy/locales/src/pt_BR.ts +++ b/packages/@uppy/locales/src/pt_BR.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const pt_BR: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/pt_PT.ts b/packages/@uppy/locales/src/pt_PT.ts index 13f2ce18af..e945860000 100644 --- a/packages/@uppy/locales/src/pt_PT.ts +++ b/packages/@uppy/locales/src/pt_PT.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const pt_PT: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/ro_RO.ts b/packages/@uppy/locales/src/ro_RO.ts index f271c141bc..53ca18580d 100644 --- a/packages/@uppy/locales/src/ro_RO.ts +++ b/packages/@uppy/locales/src/ro_RO.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const ro_RO: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/ru_RU.ts b/packages/@uppy/locales/src/ru_RU.ts index 2411009a46..5376d3768b 100644 --- a/packages/@uppy/locales/src/ru_RU.ts +++ b/packages/@uppy/locales/src/ru_RU.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const ru_RU: Locale<0 | 1 | 2> = { strings: {}, diff --git a/packages/@uppy/locales/src/sk_SK.ts b/packages/@uppy/locales/src/sk_SK.ts index 68fc787a3b..1c260ab961 100644 --- a/packages/@uppy/locales/src/sk_SK.ts +++ b/packages/@uppy/locales/src/sk_SK.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const sk_SK: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/sr_RS_Cyrillic.ts b/packages/@uppy/locales/src/sr_RS_Cyrillic.ts index aac4d0fa88..4ccc25a020 100644 --- a/packages/@uppy/locales/src/sr_RS_Cyrillic.ts +++ b/packages/@uppy/locales/src/sr_RS_Cyrillic.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const sr_RS_Cyrillic: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/sr_RS_Latin.ts b/packages/@uppy/locales/src/sr_RS_Latin.ts index 987627082f..a5fc640764 100644 --- a/packages/@uppy/locales/src/sr_RS_Latin.ts +++ b/packages/@uppy/locales/src/sr_RS_Latin.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const sr_RS_Latin: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/sv_SE.ts b/packages/@uppy/locales/src/sv_SE.ts index bb2a251056..5acef5f338 100644 --- a/packages/@uppy/locales/src/sv_SE.ts +++ b/packages/@uppy/locales/src/sv_SE.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const sv_SE: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/th_TH.ts b/packages/@uppy/locales/src/th_TH.ts index 10ed4a16f4..54ee9732c8 100644 --- a/packages/@uppy/locales/src/th_TH.ts +++ b/packages/@uppy/locales/src/th_TH.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const th_TH: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/tr_TR.ts b/packages/@uppy/locales/src/tr_TR.ts index 76b1d12f2c..32710af785 100644 --- a/packages/@uppy/locales/src/tr_TR.ts +++ b/packages/@uppy/locales/src/tr_TR.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const tr_TR: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/uk_UA.ts b/packages/@uppy/locales/src/uk_UA.ts index 9af66cf495..faec1e727f 100644 --- a/packages/@uppy/locales/src/uk_UA.ts +++ b/packages/@uppy/locales/src/uk_UA.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const uk_UA: Locale<0 | 1 | 2> = { strings: {}, diff --git a/packages/@uppy/locales/src/uz_UZ.ts b/packages/@uppy/locales/src/uz_UZ.ts index 6f344c55d4..e5a1d348be 100644 --- a/packages/@uppy/locales/src/uz_UZ.ts +++ b/packages/@uppy/locales/src/uz_UZ.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const uz_UZ: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/vi_VN.ts b/packages/@uppy/locales/src/vi_VN.ts index 9b0265e0a6..31e8dc6e62 100644 --- a/packages/@uppy/locales/src/vi_VN.ts +++ b/packages/@uppy/locales/src/vi_VN.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const vi_VN: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/src/zh_CN.ts b/packages/@uppy/locales/src/zh_CN.ts index b7686b22a9..d4bfba8b9e 100644 --- a/packages/@uppy/locales/src/zh_CN.ts +++ b/packages/@uppy/locales/src/zh_CN.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const zh_CN: Locale<0> = { strings: {}, diff --git a/packages/@uppy/locales/src/zh_TW.ts b/packages/@uppy/locales/src/zh_TW.ts index ee96d65f85..74f6fad97e 100644 --- a/packages/@uppy/locales/src/zh_TW.ts +++ b/packages/@uppy/locales/src/zh_TW.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const zh_TW: Locale<0> = { strings: {}, diff --git a/packages/@uppy/locales/template.ts b/packages/@uppy/locales/template.ts index 5aec61eb43..e6f3fe1b9a 100644 --- a/packages/@uppy/locales/template.ts +++ b/packages/@uppy/locales/template.ts @@ -1,4 +1,4 @@ -import type { Locale } from '@uppy/utils' +import type { Locale } from '@uppy/core/utils' const en_US: Locale<0 | 1> = { strings: {}, diff --git a/packages/@uppy/locales/tsconfig.build.json b/packages/@uppy/locales/tsconfig.build.json index 87d88ebef3..10c3467820 100644 --- a/packages/@uppy/locales/tsconfig.build.json +++ b/packages/@uppy/locales/tsconfig.build.json @@ -7,7 +7,7 @@ "include": ["./src/**/*.*"], "references": [ { - "path": "../utils/tsconfig.build.json" + "path": "../core/tsconfig.build.json" } ] } diff --git a/packages/@uppy/locales/tsconfig.json b/packages/@uppy/locales/tsconfig.json index 284d675390..edd6c80fba 100644 --- a/packages/@uppy/locales/tsconfig.json +++ b/packages/@uppy/locales/tsconfig.json @@ -7,7 +7,7 @@ "include": ["./package.json", "./src/**/*.*"], "references": [ { - "path": "../utils/tsconfig.build.json" + "path": "../core/tsconfig.build.json" } ] } diff --git a/packages/@uppy/onedrive/package.json b/packages/@uppy/onedrive/package.json index 7563950bb1..7ff428b189 100644 --- a/packages/@uppy/onedrive/package.json +++ b/packages/@uppy/onedrive/package.json @@ -34,9 +34,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/provider-views": "workspace:^", - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/onedrive/src/OneDrive.tsx b/packages/@uppy/onedrive/src/OneDrive.tsx index 9a47c812dc..d3a67bf24b 100644 --- a/packages/@uppy/onedrive/src/OneDrive.tsx +++ b/packages/@uppy/onedrive/src/OneDrive.tsx @@ -1,9 +1,3 @@ -import { - type CompanionPluginOptions, - getAllowedHosts, - Provider, - tokenStorage, -} from '@uppy/companion-client' import type { AsyncStore, Body, @@ -13,9 +7,14 @@ import type { UppyFile, } from '@uppy/core' import { UIPlugin, type Uppy } from '@uppy/core' -import { ProviderViews } from '@uppy/provider-views' - -import type { LocaleStrings } from '@uppy/utils' +import { + type CompanionPluginOptions, + getAllowedHosts, + Provider, + tokenStorage, +} from '@uppy/core/companion-client' +import { ProviderViews } from '@uppy/core/provider-views' +import type { LocaleStrings } from '@uppy/core/utils' // biome-ignore lint/style/useImportType: h is not a type import { type ComponentChild, h } from 'preact' import packageJson from '../package.json' with { type: 'json' } diff --git a/packages/@uppy/onedrive/tsconfig.build.json b/packages/@uppy/onedrive/tsconfig.build.json index afabb530f7..ac99ccdd75 100644 --- a/packages/@uppy/onedrive/tsconfig.build.json +++ b/packages/@uppy/onedrive/tsconfig.build.json @@ -7,15 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/onedrive/tsconfig.json b/packages/@uppy/onedrive/tsconfig.json index 847db9a4f0..edd6c80fba 100644 --- a/packages/@uppy/onedrive/tsconfig.json +++ b/packages/@uppy/onedrive/tsconfig.json @@ -6,15 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/provider-views/.npmignore b/packages/@uppy/provider-views/.npmignore deleted file mode 100644 index 6c816673f0..0000000000 --- a/packages/@uppy/provider-views/.npmignore +++ /dev/null @@ -1 +0,0 @@ -tsconfig.* diff --git a/packages/@uppy/provider-views/CHANGELOG.md b/packages/@uppy/provider-views/CHANGELOG.md deleted file mode 100644 index 57f7b4cf3d..0000000000 --- a/packages/@uppy/provider-views/CHANGELOG.md +++ /dev/null @@ -1,437 +0,0 @@ -# @uppy/provider-views - -## 5.2.2 - -### Patch Changes - -- 50e2420: Improve Google Drive Picker folder picking: Resolve also folders inside shared drives (but not symlinks to folders) -- Updated dependencies [648f245] - - @uppy/utils@7.1.5 - -## 5.2.1 - -### Patch Changes - -- 5684efa: Refactor internal components - -## 5.2.0 - -### Minor Changes - -- e661348: Allow selecting folders with Google Drive Picker. They will be recursively resolved. -- 79e6460: - Add PluginTypeRegistry and typed getPlugin overload in @uppy/core - - Register plugin ids across packages so uppy.getPlugin('Dashboard' | 'Webcam') returns the concrete plugin type and removes the need to pass generics in getPlugin() - -### Patch Changes - -- 4817585: added icon to webdav provider, add css to truncate large file names -- Updated dependencies [79e6460] -- Updated dependencies [ac12f35] -- Updated dependencies [4817585] - - @uppy/core@5.2.0 - - @uppy/utils@7.1.4 - -## 5.1.2 - -### Patch Changes - -- 46e339a: Add missing lodash dependency - -## 5.1.1 - -### Patch Changes - -- 0c16fe4: - Rename `getTagFile` to `companionFileToUppyFile` -- Updated dependencies [0c16fe4] - - @uppy/core@5.1.1 - - @uppy/utils@7.1.1 - -## 5.1.0 - -### Minor Changes - -- 5ba2c1c: Introduce the concept of server-side search and add support for it for the Dropbox provider. Previously, only client-side filtering in the currently viewed folder was possible, which was limiting. Now users using Companion with Dropbox can perform a search across their entire account. - -### Patch Changes - -- Updated dependencies [5ba2c1c] - - @uppy/utils@7.1.0 - - @uppy/core@5.1.0 - -## 5.0.2 - -### Patch Changes - -- 975317d: Removed "main" from package.json, since export maps serve as the contract for the public API. -- Updated dependencies [4b6a76c] -- Updated dependencies [975317d] -- Updated dependencies [9bac4c8] - - @uppy/core@5.0.2 - - @uppy/utils@7.0.2 - -## 5.0.1 - -### Patch Changes - -- 49522ec: Remove preact/compat imports in favor of preact, preventing JSX type issues in certain setups. -- Updated dependencies [49522ec] - - @uppy/utils@7.0.1 - - @uppy/core@5.0.1 - -## 5.0.0 - -### Major Changes - -- c5b51f6: ### Export maps for all packages - - All packages now have export maps. This is a breaking change in two cases: - - 1. The css imports have changed from `@uppy[package]/dist/styles.min.css` to `@uppy[package]/css/styles.min.css` - 2. You were importing something that wasn't exported from the root, for instance `@uppy/core/lib/foo.js`. You can now only import things we explicitly exported. - - #### Changed imports for `@uppy/react`, `@uppy/vue`, and `@uppy/svelte` - - Some components, like Dashboard, require a peer dependency to work but since all components were exported from a single file you were forced to install all peer dependencies. Even if you never imported, for instance, the status bar component. - - Every component that requires a peer dependency has now been moved to a subpath, such as `@uppy/react/dashboard`, so you only need to install the peer dependencies you need. - - **Example for `@uppy/react`:** - - **Before:** - - ```javascript - import { Dashboard, StatusBar } from "@uppy/react"; - ``` - - **Now:** - - ```javascript - import Dashboard from "@uppy/react/dashboard"; - import StatusBar from "@uppy/react/status-bar"; - ``` - -### Patch Changes - -- Updated dependencies [d301c01] -- Updated dependencies [c5b51f6] - - @uppy/utils@7.0.0 - - @uppy/core@5.0.0 - -## 4.5.3 - -### Patch Changes - -- 2f62f40: VirtualList now virtualises rows in the file list, as was intented. This means better performance when scrolling thousands for files. -- Updated dependencies [eee05db] - - @uppy/core@4.5.3 - -## 4.5.2 - -### Patch Changes - -- 1b1a9e3: Define "files" in package.json -- c66fd85: Fix package.json import -- Updated dependencies [1b1a9e3] - - @uppy/utils@6.2.2 - - @uppy/core@4.5.2 - -## 4.5.0 - -### Minor Changes - -- 0c24c5a: Use TypeScript compiler instead of Babel - -### Patch Changes - -- Updated dependencies [0c24c5a] -- Updated dependencies [0c24c5a] - - @uppy/core@4.5.0 - - @uppy/utils@6.2.0 - -## 4.4.5 - -Released: 2025-06-30 -Included in: Uppy v4.18.0 - -- @uppy/provider-views: improve metadata handling in Google Photos Picker (ben rosenbaum / #5769) - -## 4.4.4 - -Released: 2025-06-02 -Included in: Uppy v4.17.0 - -- @uppy/provider-views: fix: handle pagination for Google Photos picker (fixes #5765) (ben rosenbaum / #5768) - -## 4.4.3 - -Released: 2025-04-14 -Included in: Uppy v4.15.0 - -- @uppy/provider-views: Fix google photos picker (Mikael Finstad / #5717) - -## 4.4.2 - -Released: 2025-02-03 -Included in: Uppy v4.13.2 - -- @uppy/provider-views: fix google photos picker videos (Mikael Finstad / #5635) -- @uppy/core,@uppy/google-drive-picker,@uppy/google-photos-picker,@uppy/provider-views: - -## 4.4.1 - -Released: 2025-01-09 -Included in: Uppy v4.12.2 - -- @uppy/provider-views: Import types consistently from @uppy/core (Merlijn Vos / #5589) -- @uppy/provider-views: fix incorrect import (Merlijn Vos / #5588) - -## 4.4.0 - -Released: 2025-01-08 -Included in: Uppy v4.12.0 - -- @uppy/unsplash,@uppy/provider-views: add utmSource option (Merlijn Vos / #5580) - -## 4.3.0 - -Released: 2025-01-06 -Included in: Uppy v4.11.0 - -- @uppy/angular,@uppy/audio,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive-picker,@uppy/google-drive,@uppy/google-photos-picker,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/vue,@uppy/webcam,@uppy/webdav,@uppy/xhr-upload,@uppy/zoom: Remove "paths" from all tsconfig's (Merlijn Vos / #5572) - -## 4.2.1 - -Released: 2025-01-06 -Included in: Uppy v4.10.0 - -- @uppy/core,@uppy/dashboard,@uppy/provider-views,@uppy/store-redux,@uppy/url: build(deps): bump nanoid from 5.0.7 to 5.0.9 (dependabot[bot] / #5544) - -## 4.1.0 - -Released: 2024-12-05 -Included in: Uppy v4.8.0 - -- @uppy/provider-views: Google picker scope (Mikael Finstad / #5535) -- @uppy/core,@uppy/provider-views: move useStore out of core (Mikael Finstad / #5533) -- @uppy/audio,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: cleanup tsconfig (Mikael Finstad / #5520) - -## 4.0.2 - -Released: 2024-10-31 -Included in: Uppy v4.6.0 - -- @uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react-native,@uppy/react,@uppy/redux-dev-tools,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Fix links (Anthony Veaudry / #5492) - -## 4.0.0 - -Released: 2024-07-10 -Included in: Uppy v4.0.0 - -- @uppy/provider-views: `.openFolder()` - return progress indication (Evgenia Karunus / #5306) - -## 4.0.0-beta.11 - -Released: 2024-07-02 -Included in: Uppy v4.0.0-beta.14 - -- @uppy/provider-views: `afterFill()` - add loading progress (Evgenia Karunus / #5288) - -## 4.0.0-beta.10 - -Released: 2024-06-27 -Included in: Uppy v4.0.0-beta.13 - -- @uppy/provider-views: `Loader.tsx` - delete the file (Evgenia Karunus / #5284) -- @uppy/provider-views: Provider views rewrite (.files, .folders => .partialTree) (Evgenia Karunus / #5050) - -## 4.0.0-beta.9 - -Released: 2024-06-18 -Included in: Uppy v4.0.0-beta.12 - -- @uppy/provider-views: Renames & `eslint-disable react/require-default-props` removal (Evgenia Karunus / #5251) -- examples,@uppy/locales,@uppy/provider-views,@uppy/transloadit: Release: uppy@3.26.1 (github-actions[bot] / #5242) -- @uppy/provider-views: fix wrong font for files (Merlijn Vos / #5234) - -## 4.0.0-beta.7 - -Released: 2024-06-04 -Included in: Uppy v4.0.0-beta.10 - -- @uppy/provider-views: PartialTree - get rid of `.onFirstRender()` (Evgenia Karunus / #5187) - -## 4.0.0-beta.4 - -Released: 2024-04-29 -Included in: Uppy v4.0.0-beta.4 - -- @uppy/dashboard,@uppy/provider-views: Remove JSX global type everywhere (Merlijn Vos / #5117) -- @uppy/provider-views: bring back "loaded X files..." (Mikael Finstad / #5097) - -## 4.0.0-beta.1 - -Released: 2024-03-28 -Included in: Uppy v4.0.0-beta.1 - -- @uppy/companion-client,@uppy/provider-views,@uppy/status-bar: fix type imports (Antoine du Hamel / #5038) -- @uppy/provider-views: fix `super.toggleCheckbox` bug (Mikael Finstad / #5004) -- @uppy/core,@uppy/provider-views: Fix breadcrumbs (Evgenia Karunus / #4986) - -## 3.12.1 - -Released: 2024-06-11 -Included in: Uppy v3.26.1 - -- @uppy/provider-views: fix wrong font for files (Merlijn Vos / #5234) - -## 3.12.0 - -Released: 2024-04-29 -Included in: Uppy v3.25.0 - -- @uppy/dashboard,@uppy/provider-views: Remove JSX global type everywhere (Merlijn Vos / #5117) -- @uppy/provider-views: bring back "loaded X files..." (Mikael Finstad / #5097) - -## 3.11.0 - -Released: 2024-03-27 -Included in: Uppy v3.24.0 - -- @uppy/box,@uppy/companion-client,@uppy/provider-views,@uppy/status-bar: fix type imports (Antoine du Hamel / #5038) -- @uppy/provider-views: fix `super.toggleCheckbox` bug (Mikael Finstad / #5004) -- @uppy/core,@uppy/provider-views: Fix breadcrumbs (Evgenia Karunus / #4986) - -## 3.10.0 - -Released: 2024-02-28 -Included in: Uppy v3.23.0 - -- @uppy/provider-views: migrate to TS (Merlijn Vos / #4919) - -## 3.9.0 - -Released: 2024-02-19 -Included in: Uppy v3.22.0 - -- @uppy/provider-views: update uppy-providerbrowser-viewtype--list.scss (aditya patadia / #4913) -- @uppy/provider-views: add referrerpolicy to images (merlijn vos / #4853) - -## 3.8.0 - -Released: 2023-12-12 -Included in: Uppy v3.21.0 - -- @uppy/provider-views: fix uploadRemoteFile undefined (Mikael Finstad / #4814) - -## 3.5.0 - -Released: 2023-08-15 -Included in: Uppy v3.14.0 - -- @uppy/companion-client,@uppy/provider-views: make authentication optional (Dominik Schmidt / #4556) -- @uppy/provider-views: fix ProviderView error on empty plugin.icon (Dominik Schmidt / #4553) - -## 3.4.1 - -Released: 2023-07-20 -Included in: Uppy v3.13.0 - -- @uppy/provider-views: Add VirtualList to ProviderView (Merlijn Vos / #4566) -- @uppy/provider-views: fix race conditions with folder loading (Mikael Finstad / #4578) -- @uppy/provider-views: fix infinite folder loading (Mikael Finstad / #4590) - -## 3.4.0 - -Released: 2023-07-13 -Included in: Uppy v3.12.0 - -- @uppy/provider-views: add support for remote file paths (Mikael Finstad / #4537) -- @uppy/box,@uppy/companion,@uppy/dropbox,@uppy/google-drive,@uppy/onedrive,@uppy/provider-views: Load Google Drive / OneDrive lists 5-10x faster & always load all files (Merlijn Vos / #4513) - -## 3.3.1 - -Released: 2023-06-19 -Included in: Uppy v3.10.0 - -- @uppy/provider-views: Fix range selection not resetting and computing correctly (Terence C / #4415) - -## 3.3.0 - -Released: 2023-04-18 -Included in: Uppy v3.8.0 - -- @uppy/provider-views: Concurrent file listing (Mikael Finstad / #4401) -- @uppy/core,@uppy/locales,@uppy/provider-views: User feedback adding recursive folders take 2 (Mikael Finstad / #4399) - -## 3.2.0 - -Released: 2023-04-04 -Included in: Uppy v3.7.0 - -- @uppy/provider-views: fix race condition when adding folders (Mikael Finstad / #4384) -- @uppy/provider-views: UI: Use form attribite with a form in doc root to prevent outer form submit (Artur Paikin / #4283) - -## 3.0.2 - -Released: 2022-10-24 -Included in: Uppy v3.2.2 - -- @uppy/provider-views: Fix button and input inconsistent font and style (Artur Paikin / #4162) - -## 3.0.1 - -Released: 2022-09-25 -Included in: Uppy v3.1.0 - -- @uppy/audio,@uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/companion,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/redux-dev-tools,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: add missing entries to changelog for individual packages (Antoine du Hamel / #4092) - -## 3.0.0-beta.3 - -Released: 2022-08-16 -Included in: Uppy v3.0.0-beta.5 - -- @uppy/provider-views: Reset filter input correctly in provider views (Merlijn Vos / #3978) -- @uppy/provider-views: core validateRestrictions: return error directly vs the result/reason obj (Artur Paikin / #3951) - -## 2.1.2 - -Released: 2022-07-06 -Included in: Uppy v2.12.2 - -- @uppy/provider-views: improve logging (Mikael Finstad / #3638) - -## 2.1.1 - -Released: 2022-05-30 -Included in: Uppy v2.11.0 - -- @uppy/provider-views: Add onKeyPress event handler to capture e.shiftKey, unavailable in onChange (Artur Paikin / #3768) - -## 2.1.0 - -Released: 2022-05-14 -Included in: Uppy v2.10.0 - -- @uppy/provider-views: refactor to ESM (Antoine du Hamel / #3715) - -## 2.0.8 - -Released: 2022-03-16 -Included in: Uppy v2.8.0 - -- @uppy/provider-views: provider-view: fix breadcrumbs (Artur Paikin / #3535) - -## 2.0.7 - -Released: 2022-02-14 -Included in: Uppy v2.5.0 - -- @uppy/companion-client,@uppy/companion,@uppy/provider-views,@uppy/robodog: Finishing touches on Companion dynamic Oauth (Renée Kooi / #2802) -- @uppy/provider-views: Unsplash: UI improvements (Artur Paikin / #3438) - -## 3.0.0 - -Released: 2022-08-22 -Included in: Uppy v3.0.0 - -- Switch to ESM diff --git a/packages/@uppy/provider-views/LICENSE b/packages/@uppy/provider-views/LICENSE deleted file mode 100644 index c237473300..0000000000 --- a/packages/@uppy/provider-views/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Transloadit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/@uppy/provider-views/README.md b/packages/@uppy/provider-views/README.md deleted file mode 100644 index f1a9a5ae52..0000000000 --- a/packages/@uppy/provider-views/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# @uppy/provider-views - -Uppy logo: a smiling puppy above a pink upwards arrow - -[![npm version](https://img.shields.io/npm/v/@uppy/provider-views.svg?style=flat-square)](https://www.npmjs.com/package/@uppy/provider-views) -![CI status for Uppy tests](https://github.com/transloadit/uppy/workflows/CI/badge.svg) -![CI status for Companion tests](https://github.com/transloadit/uppy/workflows/Companion/badge.svg) -![CI status for browser tests](https://github.com/transloadit/uppy/workflows/End-to-end%20tests/badge.svg) - -View library for Uppy remote provider plugins. - -Uppy is being developed by the folks at [Transloadit](https://transloadit.com), -a versatile file encoding service. - -## Example - -```js -import Plugin from '@uppy/core/lib/plugin' -import { ProviderViews } from '@uppy/provider-views' - -class GoogleDrive extends UIPlugin { - install() { - this.view = new ProviderViews(this) - // snip - } - - render(state) { - return this.view.render(state) - } -} -``` - -## Installation - -> Unless you are creating a custom provider plugin, you do not need to install -> this. - -```bash -$ npm install @uppy/provider-views -``` - - - -## License - -[The MIT License](./LICENSE). diff --git a/packages/@uppy/provider-views/package.json b/packages/@uppy/provider-views/package.json deleted file mode 100644 index 9a30735c6e..0000000000 --- a/packages/@uppy/provider-views/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@uppy/provider-views", - "description": "View library for Uppy remote provider plugins.", - "version": "5.2.2", - "license": "MIT", - "style": "dist/style.min.css", - "type": "module", - "sideEffects": [ - "*.css" - ], - "scripts": { - "build": "tsc --build tsconfig.build.json", - "build:css": "sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css", - "typecheck": "tsc --build", - "test": "vitest run --environment=jsdom --silent='passed-only'" - }, - "keywords": [ - "file uploader", - "uppy" - ], - "homepage": "https://uppy.io", - "bugs": { - "url": "https://github.com/transloadit/uppy/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/transloadit/uppy.git" - }, - "files": [ - "src", - "lib", - "dist", - "CHANGELOG.md" - ], - "exports": { - ".": "./lib/index.js", - "./css/style.min.css": "./dist/style.min.css", - "./css/style.css": "./dist/style.css", - "./css/style.scss": "./src/style.scss", - "./package.json": "./package.json" - }, - "dependencies": { - "@uppy/utils": "workspace:^", - "classnames": "^2.5.1", - "lodash": "^4.18.1", - "nanoid": "^5.1.11", - "p-queue": "^9.3.0", - "preact": "^10.29.2" - }, - "devDependencies": { - "@types/gapi": "^0.0.47", - "@types/google.accounts": "^0.0.14", - "@types/google.picker": "^0.0.42", - "cssnano": "^8.0.1", - "jsdom": "^29.1.1", - "postcss": "^8.5.15", - "postcss-cli": "^11.0.1", - "sass": "^1.89.2", - "typescript": "^5.8.3", - "vitest": "^4.1.6" - }, - "peerDependencies": { - "@uppy/core": "workspace:^" - } -} diff --git a/packages/@uppy/provider-views/tsconfig.build.json b/packages/@uppy/provider-views/tsconfig.build.json deleted file mode 100644 index a4fd7f396c..0000000000 --- a/packages/@uppy/provider-views/tsconfig.build.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../../../tsconfig.shared", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src", - "types": ["google.accounts", "google.picker", "gapi"] - }, - "include": ["./src/**/*.*"], - "exclude": ["./src/**/*.test.ts"], - "references": [ - { - "path": "../utils/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" - } - ] -} diff --git a/packages/@uppy/provider-views/tsconfig.json b/packages/@uppy/provider-views/tsconfig.json deleted file mode 100644 index 64bdee9d4c..0000000000 --- a/packages/@uppy/provider-views/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../../tsconfig.shared", - "compilerOptions": { - "emitDeclarationOnly": false, - "noEmit": true, - "types": ["google.accounts", "google.picker", "gapi"] - }, - "include": ["./package.json", "./src/**/*.*"], - "references": [ - { - "path": "../utils/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" - } - ] -} diff --git a/packages/@uppy/provider-views/turbo.json b/packages/@uppy/provider-views/turbo.json deleted file mode 100644 index 83c0d57e10..0000000000 --- a/packages/@uppy/provider-views/turbo.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "dependsOn": ["^build", "@uppy/core#build"] - } - } -} diff --git a/packages/@uppy/react/src/useUppyEvent.test.ts b/packages/@uppy/react/src/useUppyEvent.test.ts index ca7d502596..c8f74906b8 100644 --- a/packages/@uppy/react/src/useUppyEvent.test.ts +++ b/packages/@uppy/react/src/useUppyEvent.test.ts @@ -1,6 +1,6 @@ import { act, renderHook } from '@testing-library/react' import Uppy from '@uppy/core' -import type { Meta, UppyFile } from '@uppy/utils' +import type { Meta, UppyFile } from '@uppy/core/utils' import { describe, expect, expectTypeOf, it, vi } from 'vitest' import { useUppyEvent } from './index.js' diff --git a/packages/@uppy/react/tsconfig.build.json b/packages/@uppy/react/tsconfig.build.json index 2985e040ad..d6ce92f6c7 100644 --- a/packages/@uppy/react/tsconfig.build.json +++ b/packages/@uppy/react/tsconfig.build.json @@ -9,9 +9,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.tsx"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" }, diff --git a/packages/@uppy/react/tsconfig.json b/packages/@uppy/react/tsconfig.json index 1c5aba285b..17ba203c80 100644 --- a/packages/@uppy/react/tsconfig.json +++ b/packages/@uppy/react/tsconfig.json @@ -8,9 +8,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" }, diff --git a/packages/@uppy/remote-sources/src/index.ts b/packages/@uppy/remote-sources/src/index.ts index f9ec5f842b..e1bc0bdac0 100644 --- a/packages/@uppy/remote-sources/src/index.ts +++ b/packages/@uppy/remote-sources/src/index.ts @@ -1,5 +1,4 @@ import Box from '@uppy/box' -import type { CompanionPluginOptions } from '@uppy/companion-client' import type { Body, DefinePluginOpts, @@ -8,6 +7,7 @@ import type { Uppy, } from '@uppy/core' import { BasePlugin } from '@uppy/core' +import type { CompanionPluginOptions } from '@uppy/core/companion-client' import Dropbox from '@uppy/dropbox' import Facebook from '@uppy/facebook' import GoogleDrive from '@uppy/google-drive' diff --git a/packages/@uppy/screen-capture/package.json b/packages/@uppy/screen-capture/package.json index 8ebefee2ad..dab2c6c1ca 100644 --- a/packages/@uppy/screen-capture/package.json +++ b/packages/@uppy/screen-capture/package.json @@ -44,7 +44,6 @@ "./package.json": "./package.json" }, "dependencies": { - "@uppy/utils": "workspace:^", "preact": "^10.29.2" }, "peerDependencies": { diff --git a/packages/@uppy/screen-capture/src/DiscardButton.tsx b/packages/@uppy/screen-capture/src/DiscardButton.tsx index d16e464a4b..d7b074b5eb 100644 --- a/packages/@uppy/screen-capture/src/DiscardButton.tsx +++ b/packages/@uppy/screen-capture/src/DiscardButton.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import type { h } from 'preact' interface DiscardButtonProps { diff --git a/packages/@uppy/screen-capture/src/RecordButton.tsx b/packages/@uppy/screen-capture/src/RecordButton.tsx index 4ff6de7d11..3a2f38091b 100644 --- a/packages/@uppy/screen-capture/src/RecordButton.tsx +++ b/packages/@uppy/screen-capture/src/RecordButton.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import type { h } from 'preact' interface RecordButtonProps { diff --git a/packages/@uppy/screen-capture/src/ScreenCapture.tsx b/packages/@uppy/screen-capture/src/ScreenCapture.tsx index e99edfd2d5..b60b63238a 100644 --- a/packages/@uppy/screen-capture/src/ScreenCapture.tsx +++ b/packages/@uppy/screen-capture/src/ScreenCapture.tsx @@ -6,8 +6,8 @@ import type { Uppy, } from '@uppy/core' import { UIPlugin } from '@uppy/core' -import type { LocaleStrings } from '@uppy/utils' -import { getFileTypeExtension } from '@uppy/utils' +import type { LocaleStrings } from '@uppy/core/utils' +import { getFileTypeExtension } from '@uppy/core/utils' import type { ComponentChild } from 'preact' import packageJson from '../package.json' with { type: 'json' } import locale from './locale.js' diff --git a/packages/@uppy/screen-capture/src/SubmitButton.tsx b/packages/@uppy/screen-capture/src/SubmitButton.tsx index 61761c9a7a..4021489ad7 100644 --- a/packages/@uppy/screen-capture/src/SubmitButton.tsx +++ b/packages/@uppy/screen-capture/src/SubmitButton.tsx @@ -1,4 +1,4 @@ -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import type { h } from 'preact' interface SubmitButtonProps { diff --git a/packages/@uppy/screen-capture/tsconfig.build.json b/packages/@uppy/screen-capture/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/screen-capture/tsconfig.build.json +++ b/packages/@uppy/screen-capture/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/screen-capture/tsconfig.json b/packages/@uppy/screen-capture/tsconfig.json index 991d79cbd2..edd6c80fba 100644 --- a/packages/@uppy/screen-capture/tsconfig.json +++ b/packages/@uppy/screen-capture/tsconfig.json @@ -6,9 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/status-bar/package.json b/packages/@uppy/status-bar/package.json index a9f9d9554c..9d2031f7c9 100644 --- a/packages/@uppy/status-bar/package.json +++ b/packages/@uppy/status-bar/package.json @@ -47,7 +47,6 @@ }, "dependencies": { "@transloadit/prettier-bytes": "^1.1.0", - "@uppy/utils": "workspace:^", "classnames": "^2.5.1", "preact": "^10.29.2" }, diff --git a/packages/@uppy/status-bar/src/Components.tsx b/packages/@uppy/status-bar/src/Components.tsx index e8fc308da9..67383ee274 100644 --- a/packages/@uppy/status-bar/src/Components.tsx +++ b/packages/@uppy/status-bar/src/Components.tsx @@ -1,7 +1,7 @@ import { prettierBytes } from '@transloadit/prettier-bytes' import type { Body, Meta, State, Uppy } from '@uppy/core' -import type { FileProcessingInfo, I18n } from '@uppy/utils' -import { prettyETA } from '@uppy/utils' +import type { FileProcessingInfo, I18n } from '@uppy/core/utils' +import { prettyETA } from '@uppy/core/utils' import classNames from 'classnames' import statusBarStates from './StatusBarStates.js' diff --git a/packages/@uppy/status-bar/src/StatusBar.tsx b/packages/@uppy/status-bar/src/StatusBar.tsx index 07d8827446..a617a10d6a 100644 --- a/packages/@uppy/status-bar/src/StatusBar.tsx +++ b/packages/@uppy/status-bar/src/StatusBar.tsx @@ -7,7 +7,7 @@ import type { UppyFile, } from '@uppy/core' import { UIPlugin } from '@uppy/core' -import { emaFilter, getTextDirection } from '@uppy/utils' +import { emaFilter, getTextDirection } from '@uppy/core/utils' import type { ComponentChild } from 'preact' import packageJson from '../package.json' with { type: 'json' } import locale from './locale.js' diff --git a/packages/@uppy/status-bar/src/StatusBarOptions.ts b/packages/@uppy/status-bar/src/StatusBarOptions.ts index cf937d5da1..3f3d8aec2d 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' -import type { LocaleStrings } from '@uppy/utils' +import type { LocaleStrings } from '@uppy/core/utils' import type StatusBarLocale from './locale.js' export interface StatusBarOptions extends UIPluginOptions { diff --git a/packages/@uppy/status-bar/src/StatusBarUI.tsx b/packages/@uppy/status-bar/src/StatusBarUI.tsx index 3a9b38ce2a..c744fd3925 100644 --- a/packages/@uppy/status-bar/src/StatusBarUI.tsx +++ b/packages/@uppy/status-bar/src/StatusBarUI.tsx @@ -1,5 +1,5 @@ import type { Body, Meta, State, Uppy, UppyFile } from '@uppy/core' -import type { I18n } from '@uppy/utils' +import type { I18n } from '@uppy/core/utils' import classNames from 'classnames' import { CancelBtn, diff --git a/packages/@uppy/status-bar/src/calculateProcessingProgress.ts b/packages/@uppy/status-bar/src/calculateProcessingProgress.ts index a7d2bd8f8e..23e0af3784 100644 --- a/packages/@uppy/status-bar/src/calculateProcessingProgress.ts +++ b/packages/@uppy/status-bar/src/calculateProcessingProgress.ts @@ -1,4 +1,4 @@ -import type { FileProcessingInfo, UppyFile } from '@uppy/utils' +import type { FileProcessingInfo, UppyFile } from '@uppy/core/utils' export default function calculateProcessingProgress( files: Record>, diff --git a/packages/@uppy/status-bar/src/style.scss b/packages/@uppy/status-bar/src/style.scss index 0e57c30f06..6f43d3d67d 100644 --- a/packages/@uppy/status-bar/src/style.scss +++ b/packages/@uppy/status-bar/src/style.scss @@ -2,7 +2,7 @@ @use "sass:color"; @use '@uppy/core/src/_utils.scss'; @use '@uppy/core/src/_variables.scss'; -@use '@uppy/utils/src/microtip.scss'; +@use '@uppy/core/src/utils/microtip.scss'; .uppy-StatusBar { position: relative; diff --git a/packages/@uppy/status-bar/tsconfig.build.json b/packages/@uppy/status-bar/tsconfig.build.json index 389eb13874..ac99ccdd75 100644 --- a/packages/@uppy/status-bar/tsconfig.build.json +++ b/packages/@uppy/status-bar/tsconfig.build.json @@ -7,9 +7,6 @@ "include": ["./src/**/*.*"], "exclude": ["./src/**/*.test.ts"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/status-bar/tsconfig.json b/packages/@uppy/status-bar/tsconfig.json index 991d79cbd2..edd6c80fba 100644 --- a/packages/@uppy/status-bar/tsconfig.json +++ b/packages/@uppy/status-bar/tsconfig.json @@ -6,9 +6,6 @@ }, "include": ["./package.json", "./src/**/*.*"], "references": [ - { - "path": "../utils/tsconfig.build.json" - }, { "path": "../core/tsconfig.build.json" } diff --git a/packages/@uppy/store-default/.npmignore b/packages/@uppy/store-default/.npmignore deleted file mode 100644 index 6c816673f0..0000000000 --- a/packages/@uppy/store-default/.npmignore +++ /dev/null @@ -1 +0,0 @@ -tsconfig.* diff --git a/packages/@uppy/store-default/CHANGELOG.md b/packages/@uppy/store-default/CHANGELOG.md deleted file mode 100644 index 9d1e951f2f..0000000000 --- a/packages/@uppy/store-default/CHANGELOG.md +++ /dev/null @@ -1,102 +0,0 @@ -# @uppy/store-default - -## 5.0.0 - -### Major Changes - -- c5b51f6: ### Export maps for all packages - - All packages now have export maps. This is a breaking change in two cases: - - 1. The css imports have changed from `@uppy[package]/dist/styles.min.css` to `@uppy[package]/css/styles.min.css` - 2. You were importing something that wasn't exported from the root, for instance `@uppy/core/lib/foo.js`. You can now only import things we explicitly exported. - - #### Changed imports for `@uppy/react`, `@uppy/vue`, and `@uppy/svelte` - - Some components, like Dashboard, require a peer dependency to work but since all components were exported from a single file you were forced to install all peer dependencies. Even if you never imported, for instance, the status bar component. - - Every component that requires a peer dependency has now been moved to a subpath, such as `@uppy/react/dashboard`, so you only need to install the peer dependencies you need. - - **Example for `@uppy/react`:** - - **Before:** - - ```javascript - import { Dashboard, StatusBar } from "@uppy/react"; - ``` - - **Now:** - - ```javascript - import Dashboard from "@uppy/react/dashboard"; - import StatusBar from "@uppy/react/status-bar"; - ``` - -## 4.3.2 - -### Patch Changes - -- 1b1a9e3: Define "files" in package.json - -## 4.3.0 - -### Minor Changes - -- 0c24c5a: Use TypeScript compiler instead of Babel - -## 4.1.2 - -Released: 2024-12-05 -Included in: Uppy v4.8.0 - -- @uppy/audio,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: cleanup tsconfig (Mikael Finstad / #5520) - -## 4.1.1 - -Released: 2024-10-31 -Included in: Uppy v4.6.0 - -- @uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react-native,@uppy/react,@uppy/redux-dev-tools,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Fix links (Anthony Veaudry / #5492) - -## 4.1.0 - -Released: 2024-07-30 -Included in: Uppy v4.1.0 - -- @uppy/core,@uppy/store-default: export `Store` type (Merlijn Vos / #5373) - -## 3.1.0 - -Released: 2023-11-24 -Included in: Uppy v3.20.0 - -- @uppy/store-default: refactor to typescript (Antoine du Hamel / #4785) - -## 3.0.2 - -Released: 2022-09-25 -Included in: Uppy v3.1.0 - -- @uppy/audio,@uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/companion,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/redux-dev-tools,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: add missing entries to changelog for individual packages (Antoine du Hamel / #4092) - -## 3.0.0 - -Released: 2022-08-22 -Included in: Uppy v3.0.0 - -- Switch to ESM - -## 3.0.0-beta.2 - -Released: 2022-08-03 -Included in: Uppy v3.0.0-beta.4 - -- @uppy/store-default: export the class, don't expose `.callbacks` (Antoine du Hamel / #3928) - -## 2.1.0 - -Released: 2022-05-30 -Included in: Uppy v2.11.0 - -- @uppy/angular,@uppy/audio,@uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/box,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/progress-bar,@uppy/react,@uppy/redux-dev-tools,@uppy/robodog,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: doc: update bundler recommendation (Antoine du Hamel / #3763) -- @uppy/store-default: refactor to ESM (Antoine du Hamel / #3746) diff --git a/packages/@uppy/store-default/LICENSE b/packages/@uppy/store-default/LICENSE deleted file mode 100644 index c237473300..0000000000 --- a/packages/@uppy/store-default/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Transloadit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/@uppy/store-default/README.md b/packages/@uppy/store-default/README.md deleted file mode 100644 index e47ca538b1..0000000000 --- a/packages/@uppy/store-default/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# @uppy/store-default - -Uppy logo: a smiling puppy above a pink upwards arrow - -[![npm version](https://img.shields.io/npm/v/@uppy/store-default.svg?style=flat-square)](https://www.npmjs.com/package/@uppy/store-default) -![CI status for Uppy tests](https://github.com/transloadit/uppy/workflows/CI/badge.svg) -![CI status for Companion tests](https://github.com/transloadit/uppy/workflows/Companion/badge.svg) -![CI status for browser tests](https://github.com/transloadit/uppy/workflows/End-to-end%20tests/badge.svg) - -A basic object-based store for Uppy. This one is used by default, you do not -need to add it manually. - -Uppy is being developed by the folks at [Transloadit](https://transloadit.com), -a versatile file encoding service. - -## Example - -```js -import Uppy from '@uppy/core' -import DefaultStore from '@uppy/store-default' - -const uppy = new Uppy({ - store: new DefaultStore(), -}) -``` - -## Installation - -```bash -$ npm install @uppy/store-default -``` - -Alternatively, you can also use this package in a pre-built bundle from -Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the -global `window.Uppy` object. See the -[main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. - -## Documentation - -Documentation for this plugin can be found on the -[Uppy website](https://uppy.io/docs/guides/custom-stores#defaultstore). - -## License - -[The MIT License](./LICENSE). diff --git a/packages/@uppy/store-default/package.json b/packages/@uppy/store-default/package.json deleted file mode 100644 index fcb615c1b7..0000000000 --- a/packages/@uppy/store-default/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@uppy/store-default", - "description": "The default simple object-based store for Uppy.", - "version": "5.0.0", - "license": "MIT", - "main": "lib/index.js", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "tsc --build tsconfig.build.json", - "typecheck": "tsc --build", - "test": "vitest run --environment=jsdom --silent='passed-only'" - }, - "keywords": [ - "file uploader", - "uppy", - "uppy-store" - ], - "homepage": "https://uppy.io", - "bugs": { - "url": "https://github.com/transloadit/uppy/issues" - }, - "devDependencies": { - "@types/node": "^20.19.0", - "jsdom": "^29.1.1", - "typescript": "^5.8.3", - "vitest": "^4.1.6" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/transloadit/uppy.git" - }, - "exports": { - ".": "./lib/index.js", - "./package.json": "./package.json" - }, - "files": [ - "src", - "lib", - "dist", - "CHANGELOG.md" - ] -} diff --git a/packages/@uppy/store-default/tsconfig.build.json b/packages/@uppy/store-default/tsconfig.build.json deleted file mode 100644 index d49e86d5f7..0000000000 --- a/packages/@uppy/store-default/tsconfig.build.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.shared", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src" - }, - "include": ["./src/**/*.*"], - "exclude": ["./src/**/*.test.ts"], - "references": [] -} diff --git a/packages/@uppy/store-default/tsconfig.json b/packages/@uppy/store-default/tsconfig.json deleted file mode 100644 index 4fc6da5a44..0000000000 --- a/packages/@uppy/store-default/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.shared", - "compilerOptions": { - "emitDeclarationOnly": false, - "noEmit": true, - "types": ["preact", "node"] - }, - "include": ["./package.json", "./src/**/*.*"], - "references": [] -} diff --git a/packages/@uppy/svelte/src/lib/components/Dashboard.svelte b/packages/@uppy/svelte/src/lib/components/Dashboard.svelte index d56b887182..000dd7eac2 100644 --- a/packages/@uppy/svelte/src/lib/components/Dashboard.svelte +++ b/packages/@uppy/svelte/src/lib/components/Dashboard.svelte @@ -1,6 +1,6 @@