diff --git a/.changeset/light-hounds-vanish.md b/.changeset/light-hounds-vanish.md new file mode 100644 index 000000000..7c2bb879a --- /dev/null +++ b/.changeset/light-hounds-vanish.md @@ -0,0 +1,70 @@ +--- +"@uppy/google-photos-picker": major +"@uppy/google-drive-picker": major +"@uppy/thumbnail-generator": major +"@uppy/companion-client": major +"@uppy/golden-retriever": major +"@uppy/provider-views": major +"@uppy/remote-sources": major +"@uppy/screen-capture": major +"@uppy/store-default": major +"@uppy/google-drive": major +"@uppy/image-editor": major +"@uppy/react-native": major +"@uppy/drop-target": major +"@uppy/transloadit": major +"@uppy/components": major +"@uppy/compressor": major +"@uppy/status-bar": major +"@uppy/xhr-upload": major +"@uppy/companion": major +"@uppy/dashboard": major +"@uppy/instagram": major +"@uppy/facebook": major +"@uppy/onedrive": major +"@uppy/unsplash": major +"@uppy/dropbox": major +"@uppy/locales": major +"@uppy/aws-s3": major +"@uppy/svelte": major +"@uppy/webcam": major +"@uppy/audio": major +"@uppy/react": major +"@uppy/utils": major +"@uppy/core": major +"@uppy/form": major +"@uppy/zoom": major +"@uppy/box": major +"@uppy/tus": major +"@uppy/url": major +"@uppy/vue": major +"uppy": major +--- + +### 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"; +``` diff --git a/.github/MIGRATION.md b/.github/MIGRATION.md index b9b4fd2d0..65268853e 100644 --- a/.github/MIGRATION.md +++ b/.github/MIGRATION.md @@ -108,4 +108,30 @@ uppy.use(Dashboard, { - Use the framework-specific hooks (`@uppy/react`, `@uppy/vue`, `@uppy/svelte`) for maximum flexibility - Use `@uppy/dashboard` for a complete, ready-to-use UI solution 3. Replace your existing components with custom implementations using the hooks or Dashboard -4. See [examples/](../examples/) for complete implementation examples \ No newline at end of file +4. See [examples/](../examples/) for complete implementation examples + +### 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' +``` \ No newline at end of file diff --git a/examples/react/src/App.tsx b/examples/react/src/App.tsx index 86706712e..d9d639d2c 100644 --- a/examples/react/src/App.tsx +++ b/examples/react/src/App.tsx @@ -18,7 +18,7 @@ import ScreenCapture from './ScreenCapture' import Webcam from './Webcam' import './app.css' -import '@uppy/react/dist/styles.css' +import '@uppy/react/css/style.css' function App() { const [uppy] = useState(() => diff --git a/examples/sveltekit/src/routes/+page.svelte b/examples/sveltekit/src/routes/+page.svelte index bbbd864e5..a134ca9ed 100644 --- a/examples/sveltekit/src/routes/+page.svelte +++ b/examples/sveltekit/src/routes/+page.svelte @@ -11,7 +11,7 @@ import { } from '@uppy/svelte' import Tus from '@uppy/tus' import UppyWebcam from '@uppy/webcam' -import '@uppy/svelte/dist/styles.css' +import '@uppy/svelte/css/style.css' import CustomDropzone from '../components/CustomDropzone.svelte' import RemoteSource from '../components/RemoteSource.svelte' diff --git a/examples/vue/src/App.vue b/examples/vue/src/App.vue index 4ce701a3c..6aa4c8167 100644 --- a/examples/vue/src/App.vue +++ b/examples/vue/src/App.vue @@ -84,4 +84,4 @@ const uppy = computed(() => ) - + diff --git a/packages/@uppy/audio/package.json b/packages/@uppy/audio/package.json index 6d3581951..ee097edf3 100644 --- a/packages/@uppy/audio/package.json +++ b/packages/@uppy/audio/package.json @@ -16,6 +16,9 @@ "mediarecorder" ], "type": "module", + "sideEffects": [ + "*.css" + ], "homepage": "https://uppy.io", "bugs": { "url": "https://github.com/transloadit/uppy/issues" @@ -24,6 +27,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/style.css", + "./css/style.min.css": "./dist/style.min.css", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "preact": "^10.5.13" diff --git a/packages/@uppy/aws-s3/package.json b/packages/@uppy/aws-s3/package.json index 977d24d1e..433117616 100644 --- a/packages/@uppy/aws-s3/package.json +++ b/packages/@uppy/aws-s3/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -27,6 +28,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/utils": "workspace:^" diff --git a/packages/@uppy/aws-s3/src/index.ts b/packages/@uppy/aws-s3/src/index.ts index 5c8ab6430..9463cc857 100644 --- a/packages/@uppy/aws-s3/src/index.ts +++ b/packages/@uppy/aws-s3/src/index.ts @@ -2,10 +2,10 @@ import { RequestClient } from '@uppy/companion-client' import { BasePlugin, type DefinePluginOpts, + EventManager, type PluginOpts, type Uppy, } from '@uppy/core' -import EventManager from '@uppy/core/lib/EventManager.js' import { createAbortError } from '@uppy/utils/lib/AbortController' import type { RequestOptions } from '@uppy/utils/lib/CompanionClientProvider' import { diff --git a/packages/@uppy/box/package.json b/packages/@uppy/box/package.json index ea05d898e..17e1acbd1 100644 --- a/packages/@uppy/box/package.json +++ b/packages/@uppy/box/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -23,6 +24,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/companion-client/package.json b/packages/@uppy/companion-client/package.json index f999a9a04..0306fd7e8 100644 --- a/packages/@uppy/companion-client/package.json +++ b/packages/@uppy/companion-client/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -25,6 +26,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "namespace-emitter": "^2.0.1", diff --git a/packages/@uppy/companion/package.json b/packages/@uppy/companion/package.json index 6583e9cf6..9a7d0cd54 100644 --- a/packages/@uppy/companion/package.json +++ b/packages/@uppy/companion/package.json @@ -6,12 +6,18 @@ "types": "lib/companion.d.ts", "author": "Transloadit.com", "license": "MIT", + "sideEffects": false, "homepage": "https://github.com/transloadit/uppy#readme", "type": "module", "repository": { "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/companion.js", + "./standalone": "./lib/standalone/index.js", + "./package.json": "./package.json" + }, "keywords": [ "file uploader", "progress", @@ -96,7 +102,9 @@ }, "files": [ "bin/", - "lib/" + "lib/", + "src/", + "CHANGELOG.md" ], "scripts": { "build": "tsc --build tsconfig.build.json", diff --git a/packages/@uppy/components/package.json b/packages/@uppy/components/package.json index 6b6885719..7a8e54d56 100644 --- a/packages/@uppy/components/package.json +++ b/packages/@uppy/components/package.json @@ -5,6 +5,9 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": [ + "*.css" + ], "keywords": [ "uppy", "uppy-plugin", @@ -26,6 +29,11 @@ "migrate": "node migrate.mjs", "typecheck": "tsc --build" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/styles.css", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/audio": "workspace:^", "@uppy/core": "workspace:^", diff --git a/packages/@uppy/compressor/package.json b/packages/@uppy/compressor/package.json index 391fe4cf8..5a9873159 100644 --- a/packages/@uppy/compressor/package.json +++ b/packages/@uppy/compressor/package.json @@ -4,7 +4,6 @@ "version": "2.2.1", "license": "MIT", "main": "lib/index.js", - "style": "dist/style.min.css", "keywords": [ "file uploader", "uppy", @@ -14,6 +13,7 @@ ], "type": "module", "homepage": "https://uppy.io", + "sideEffects": false, "bugs": { "url": "https://github.com/transloadit/uppy/issues" }, @@ -21,6 +21,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@transloadit/prettier-bytes": "^0.3.4", "@uppy/utils": "workspace:^", diff --git a/packages/@uppy/core/package.json b/packages/@uppy/core/package.json index 8fb95534e..b6f05b47d 100644 --- a/packages/@uppy/core/package.json +++ b/packages/@uppy/core/package.json @@ -28,6 +28,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.min.css": "./dist/style.min.css", + "./css/style.css": "./dist/style.css", + "./package.json": "./package.json" + }, "dependencies": { "@transloadit/prettier-bytes": "^0.3.4", "@uppy/store-default": "workspace:^", diff --git a/packages/@uppy/core/src/index.ts b/packages/@uppy/core/src/index.ts index f8a9fe1b6..78135e5b6 100644 --- a/packages/@uppy/core/src/index.ts +++ b/packages/@uppy/core/src/index.ts @@ -7,8 +7,10 @@ export type { } from '@uppy/utils/lib/UppyFile' 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 { UIPluginOptions } from './UIPlugin.js' +export type { Restrictions, ValidateableFile } from './Restricter.js' +export type { PluginTarget, UIPluginOptions } from './UIPlugin.js' export { default as UIPlugin } from './UIPlugin.js' export type { AsyncStore, diff --git a/packages/@uppy/dashboard/package.json b/packages/@uppy/dashboard/package.json index 691e8138b..5cd95a0e1 100644 --- a/packages/@uppy/dashboard/package.json +++ b/packages/@uppy/dashboard/package.json @@ -6,6 +6,9 @@ "main": "lib/index.js", "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", @@ -28,6 +31,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/style.css", + "./css/style.min.css": "./dist/style.min.css", + "./package.json": "./package.json" + }, "dependencies": { "@transloadit/prettier-bytes": "^0.3.4", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/drop-target/package.json b/packages/@uppy/drop-target/package.json index 2808b58f2..82bab8136 100644 --- a/packages/@uppy/drop-target/package.json +++ b/packages/@uppy/drop-target/package.json @@ -5,6 +5,9 @@ "license": "MIT", "main": "lib/index.js", "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", @@ -28,6 +31,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/style.css", + "./css/style.min.css": "./dist/style.min.css", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^" }, diff --git a/packages/@uppy/dropbox/package.json b/packages/@uppy/dropbox/package.json index 3642dfd00..7ce98e65d 100644 --- a/packages/@uppy/dropbox/package.json +++ b/packages/@uppy/dropbox/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -23,6 +24,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/facebook/package.json b/packages/@uppy/facebook/package.json index 360022552..77de9e621 100644 --- a/packages/@uppy/facebook/package.json +++ b/packages/@uppy/facebook/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -23,6 +24,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/form/package.json b/packages/@uppy/form/package.json index ed1b3cfcd..64f690773 100644 --- a/packages/@uppy/form/package.json +++ b/packages/@uppy/form/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -23,6 +24,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "get-form-data": "^3.0.0" diff --git a/packages/@uppy/golden-retriever/package.json b/packages/@uppy/golden-retriever/package.json index 96b509e14..f3b44d44f 100644 --- a/packages/@uppy/golden-retriever/package.json +++ b/packages/@uppy/golden-retriever/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -26,6 +27,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "lodash": "^4.17.21" diff --git a/packages/@uppy/google-drive-picker/package.json b/packages/@uppy/google-drive-picker/package.json index b6c768df8..f2ea13962 100644 --- a/packages/@uppy/google-drive-picker/package.json +++ b/packages/@uppy/google-drive-picker/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -25,6 +26,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx b/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx index f9f4d5a35..5cb14ba61 100644 --- a/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx +++ b/packages/@uppy/google-drive-picker/src/GoogleDrivePicker.tsx @@ -5,9 +5,11 @@ import { } from '@uppy/companion-client' import type { AsyncStore, BaseProviderPlugin, Body, Meta } from '@uppy/core' import { UIPlugin, type Uppy } from '@uppy/core' -import { GooglePickerView } from '@uppy/provider-views' -import type { PickedItem } from '@uppy/provider-views/lib/GooglePicker/googlePicker.js' -import { GoogleDriveIcon } from '@uppy/provider-views/lib/GooglePicker/icons.js' +import { + GoogleDriveIcon, + GooglePickerView, + type PickedItem, +} from '@uppy/provider-views' import type { LocaleStrings } from '@uppy/utils/lib/Translator' import { h } from 'preact' diff --git a/packages/@uppy/google-drive/package.json b/packages/@uppy/google-drive/package.json index a82399c50..e733e1918 100644 --- a/packages/@uppy/google-drive/package.json +++ b/packages/@uppy/google-drive/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -24,6 +25,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/google-photos-picker/package.json b/packages/@uppy/google-photos-picker/package.json index e844d3fe8..d4b6eaa6e 100644 --- a/packages/@uppy/google-photos-picker/package.json +++ b/packages/@uppy/google-photos-picker/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -25,6 +26,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx b/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx index f11be5b3f..cff1f901b 100644 --- a/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx +++ b/packages/@uppy/google-photos-picker/src/GooglePhotosPicker.tsx @@ -5,9 +5,11 @@ import { } from '@uppy/companion-client' import type { AsyncStore, BaseProviderPlugin, Body, Meta } from '@uppy/core' import { UIPlugin, type Uppy } from '@uppy/core' -import { GooglePickerView } from '@uppy/provider-views' -import type { PickedItem } from '@uppy/provider-views/lib/GooglePicker/googlePicker.js' -import { GooglePhotosIcon } from '@uppy/provider-views/lib/GooglePicker/icons.js' +import { + GooglePhotosIcon, + GooglePickerView, + type PickedItem, +} from '@uppy/provider-views' import type { LocaleStrings } from '@uppy/utils/lib/Translator' import { h } from 'preact' diff --git a/packages/@uppy/image-editor/package.json b/packages/@uppy/image-editor/package.json index 1eda383bb..28d82692f 100644 --- a/packages/@uppy/image-editor/package.json +++ b/packages/@uppy/image-editor/package.json @@ -6,6 +6,9 @@ "main": "lib/index.js", "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", @@ -30,6 +33,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/style.css", + "./css/style.min.css": "./dist/style.min.css", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "cropperjs": "^1.6.2", diff --git a/packages/@uppy/instagram/package.json b/packages/@uppy/instagram/package.json index 2b6911e52..626969a25 100644 --- a/packages/@uppy/instagram/package.json +++ b/packages/@uppy/instagram/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -26,6 +27,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/locales/package.json b/packages/@uppy/locales/package.json index 5a149c161..a806a0747 100644 --- a/packages/@uppy/locales/package.json +++ b/packages/@uppy/locales/package.json @@ -4,6 +4,7 @@ "version": "4.6.0", "license": "MIT", "type": "module", + "sideEffects": false, "main": "locale-pack/index.mjs", "scripts": { "build": "yarn node script/build-en_US.mjs && tsc --build tsconfig.build.json && yarn format", diff --git a/packages/@uppy/onedrive/package.json b/packages/@uppy/onedrive/package.json index cadf88eab..07c4ec7c5 100644 --- a/packages/@uppy/onedrive/package.json +++ b/packages/@uppy/onedrive/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -23,6 +24,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/provider-views/package.json b/packages/@uppy/provider-views/package.json index e4c399b1b..e83609559 100644 --- a/packages/@uppy/provider-views/package.json +++ b/packages/@uppy/provider-views/package.json @@ -6,6 +6,9 @@ "main": "lib/index.js", "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", @@ -24,6 +27,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.min.css": "./dist/style.min.css", + "./css/style.css": "./dist/style.css", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "classnames": "^2.2.6", diff --git a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx b/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx index a008829e2..d94993b20 100644 --- a/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx +++ b/packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx @@ -8,8 +8,8 @@ import type { PartialTreeId, UnknownProviderPlugin, UnknownProviderPluginState, + ValidateableFile, } from '@uppy/core' -import type { ValidateableFile } from '@uppy/core/lib/Restricter.js' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal' import type { I18n } from '@uppy/utils/lib/Translator' diff --git a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx index 11e0aa971..bbbafea24 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx +++ b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx @@ -8,8 +8,8 @@ import type { PartialTreeFolderRoot, UnknownSearchProviderPlugin, UnknownSearchProviderPluginState, + ValidateableFile, } from '@uppy/core' -import type { ValidateableFile } from '@uppy/core/lib/Restricter.js' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal' import classNames from 'classnames' diff --git a/packages/@uppy/provider-views/src/index.ts b/packages/@uppy/provider-views/src/index.ts index f3b5b066a..08cfcb498 100644 --- a/packages/@uppy/provider-views/src/index.ts +++ b/packages/@uppy/provider-views/src/index.ts @@ -1,8 +1,28 @@ export { default as GooglePickerView } from './GooglePicker/GooglePickerView.js' +export type { + MediaItem, + MediaItemBase, + PhotoMediaItem, + PickedDriveItem, + PickedItem, + PickedItemBase, + PickedPhotosItem, + PickingSession, + UnspecifiedMediaItem, + VideoMediaItem, +} from './GooglePicker/googlePicker.js' +export { + authorize, + ensureScriptsInjected, + logout, + pollPickingSession, + showDrivePicker, + showPhotosPicker, +} from './GooglePicker/googlePicker.js' +export { GoogleDriveIcon, GooglePhotosIcon } from './GooglePicker/icons.js' export { default as ProviderViews, defaultPickerIcon, } from './ProviderView/index.js' - export { default as SearchInput } from './SearchInput.js' export { default as SearchProviderViews } from './SearchProviderView/index.js' diff --git a/packages/@uppy/react-native/file-picker/index.js b/packages/@uppy/react-native/file-picker/index.js index 9d9a822e4..81534363a 100644 --- a/packages/@uppy/react-native/file-picker/index.js +++ b/packages/@uppy/react-native/file-picker/index.js @@ -11,6 +11,14 @@ import selectDocument from './selectDocument.js' import selectImage from './selectImage.js' import takePicture from './takePicture.js' +export { default as Instagram } from './instagram.js' +export { default as Provider } from './provider.js' +export { default as ProviderGrid } from './provider-grid.js' +export { default as selectDocument } from './selectDocument.js' +export { default as selectImage } from './selectImage.js' +export { default as takePicture } from './takePicture.js' +export { default as Url } from './url.js' + const styles = StyleSheet.create({ providerList: { flex: 1, diff --git a/packages/@uppy/react-native/package.json b/packages/@uppy/react-native/package.json index 743bdd0f9..cd09a2fb2 100644 --- a/packages/@uppy/react-native/package.json +++ b/packages/@uppy/react-native/package.json @@ -4,6 +4,7 @@ "version": "0.6.1", "main": "file-picker/index.js", "license": "MIT", + "sideEffects": false, "keywords": [ "file uploader", "uppy", @@ -20,6 +21,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./file-picker/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/core": "workspace:*", "@uppy/instagram": "workspace:^", diff --git a/packages/@uppy/react/package.json b/packages/@uppy/react/package.json index 07271a7d3..d26c59ef3 100644 --- a/packages/@uppy/react/package.json +++ b/packages/@uppy/react/package.json @@ -5,6 +5,9 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": [ + "*.css" + ], "scripts": { "build": "tsc --build tsconfig.build.json", "build:css": "mkdir -p dist && cp ../components/dist/styles.css dist/styles.css", @@ -44,11 +47,18 @@ "typescript": "^5.8.3", "vitest": "^3.2.4" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/styles.css", + "./dashboard": "./lib/Dashboard.js", + "./dashboard-modal": "./lib/DashboardModal.js", + "./status-bar": "./lib/StatusBar.js", + "./package.json": "./package.json" + }, "peerDependencies": { "@uppy/core": "workspace:^", "@uppy/dashboard": "workspace:^", "@uppy/screen-capture": "workspace:^", - "@uppy/status-bar": "workspace:^", "@uppy/webcam": "workspace:^", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" @@ -60,9 +70,6 @@ "@uppy/screen-capture": { "optional": true }, - "@uppy/status-bar": { - "optional": true - }, "@uppy/webcam": { "optional": true } diff --git a/packages/@uppy/remote-sources/package.json b/packages/@uppy/remote-sources/package.json index da7607b00..a7ce3c302 100644 --- a/packages/@uppy/remote-sources/package.json +++ b/packages/@uppy/remote-sources/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -30,6 +31,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/box": "workspace:^", "@uppy/dashboard": "workspace:^", diff --git a/packages/@uppy/screen-capture/package.json b/packages/@uppy/screen-capture/package.json index c54165eba..50e7f6f27 100644 --- a/packages/@uppy/screen-capture/package.json +++ b/packages/@uppy/screen-capture/package.json @@ -6,6 +6,9 @@ "main": "lib/index.js", "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", @@ -28,6 +31,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/style.css", + "./css/style.min.css": "./dist/style.min.css", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "preact": "^10.5.13" diff --git a/packages/@uppy/status-bar/package.json b/packages/@uppy/status-bar/package.json index 240af6554..16edbb723 100644 --- a/packages/@uppy/status-bar/package.json +++ b/packages/@uppy/status-bar/package.json @@ -6,6 +6,9 @@ "main": "lib/index.js", "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", diff --git a/packages/@uppy/status-bar/src/StatusBarOptions.ts b/packages/@uppy/status-bar/src/StatusBarOptions.ts index 83e157da9..41ffcb6ff 100644 --- a/packages/@uppy/status-bar/src/StatusBarOptions.ts +++ b/packages/@uppy/status-bar/src/StatusBarOptions.ts @@ -1,4 +1,4 @@ -import type { UIPluginOptions } from '@uppy/core/lib/UIPlugin.js' +import type { UIPluginOptions } from '@uppy/core' import type StatusBarLocale from './locale.js' export interface StatusBarOptions extends UIPluginOptions { diff --git a/packages/@uppy/store-default/package.json b/packages/@uppy/store-default/package.json index 68c9f7bbe..bbfa8df14 100644 --- a/packages/@uppy/store-default/package.json +++ b/packages/@uppy/store-default/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -27,5 +28,9 @@ "repository": { "type": "git", "url": "git+https://github.com/transloadit/uppy.git" + }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" } } diff --git a/packages/@uppy/svelte/package.json b/packages/@uppy/svelte/package.json index 0aa45779b..716fdd4bf 100644 --- a/packages/@uppy/svelte/package.json +++ b/packages/@uppy/svelte/package.json @@ -3,9 +3,34 @@ "version": "4.5.0", "description": "Uppy plugin that helps integrate Uppy into your Svelte project.", "type": "module", - "svelte": "./dist/index.js", - "types": "./dist/index.d.ts", - "main": "./dist/index.js", + "sideEffects": [ + "*.css" + ], + "files": [ + "dist", + "src", + "CHANGELOG.md" + ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + }, + "./css/style.css": "./dist/styles.css", + "./dashboard": { + "types": "./dist/components/Dashboard.svelte.d.ts", + "svelte": "./dist/components/Dashboard.svelte" + }, + "./dashboard-modal": { + "types": "./dist/components/DashboardModal.svelte.d.ts", + "svelte": "./dist/components/DashboardModal.svelte" + }, + "./status-bar": { + "types": "./dist/components/StatusBar.svelte.d.ts", + "svelte": "./dist/components/StatusBar.svelte" + }, + "./package.json": "./package.json" + }, "homepage": "https://uppy.io", "bugs": { "url": "https://github.com/transloadit/uppy/issues" @@ -20,17 +45,6 @@ "uppy-plugin", "svelte" ], - "files": [ - "src", - "dist" - ], - "exports": { - "./dist/styles.css": "./dist/styles.css", - ".": { - "types": "./dist/index.d.ts", - "svelte": "./dist/index.js" - } - }, "scripts": { "build": "svelte-kit sync && svelte-package", "build:css": "cp ../components/dist/styles.css dist/styles.css", @@ -56,19 +70,12 @@ "peerDependencies": { "@uppy/core": "workspace:^", "@uppy/dashboard": "workspace:^", - "@uppy/status-bar": "workspace:^", "svelte": "^4.0.0 || ^5.0.0" }, "peerDependenciesMeta": { "@uppy/dashboard": { "optional": true }, - "@uppy/drag-drop": { - "optional": true - }, - "@uppy/progress-bar": { - "optional": true - }, "@uppy/status-bar": { "optional": true } diff --git a/packages/@uppy/svelte/src/lib/index.ts b/packages/@uppy/svelte/src/lib/index.ts index 8d5e2cb98..c2f56a38d 100644 --- a/packages/@uppy/svelte/src/lib/index.ts +++ b/packages/@uppy/svelte/src/lib/index.ts @@ -1,9 +1,7 @@ -export { default as Dashboard } from "./components/Dashboard.svelte"; -export { default as DashboardModal } from "./components/DashboardModal.svelte"; export * from "./components/headless/generated/index.js"; // Headless components export { default as UppyContextProvider } from "./components/headless/UppyContextProvider.svelte"; -export { default as StatusBar } from "./components/StatusBar.svelte"; + // Hooks export * from "./useDropzone.js"; diff --git a/packages/@uppy/thumbnail-generator/package.json b/packages/@uppy/thumbnail-generator/package.json index 0f8a9769d..7e08ca7ca 100644 --- a/packages/@uppy/thumbnail-generator/package.json +++ b/packages/@uppy/thumbnail-generator/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -26,6 +27,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "exifr": "^7.0.0" diff --git a/packages/@uppy/transloadit/package.json b/packages/@uppy/transloadit/package.json index 9a9fc20eb..740b153c5 100644 --- a/packages/@uppy/transloadit/package.json +++ b/packages/@uppy/transloadit/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -31,6 +32,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/tus/package.json b/packages/@uppy/tus/package.json index 997dc5dbc..5b3e17e68 100644 --- a/packages/@uppy/tus/package.json +++ b/packages/@uppy/tus/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -26,6 +27,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/utils": "workspace:^", diff --git a/packages/@uppy/tus/src/index.ts b/packages/@uppy/tus/src/index.ts index 278247300..e418d5444 100644 --- a/packages/@uppy/tus/src/index.ts +++ b/packages/@uppy/tus/src/index.ts @@ -7,8 +7,7 @@ import type { Uppy, UppyFile, } from '@uppy/core' -import { BasePlugin } from '@uppy/core' -import EventManager from '@uppy/core/lib/EventManager.js' +import { BasePlugin, EventManager } from '@uppy/core' import { filterFilesToEmitUploadStarted, filterNonFailedFiles, diff --git a/packages/@uppy/unsplash/package.json b/packages/@uppy/unsplash/package.json index 6129d292f..6baca0d9a 100644 --- a/packages/@uppy/unsplash/package.json +++ b/packages/@uppy/unsplash/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -23,6 +24,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/url/package.json b/packages/@uppy/url/package.json index 8d7204d4a..5537e28e7 100644 --- a/packages/@uppy/url/package.json +++ b/packages/@uppy/url/package.json @@ -6,6 +6,9 @@ "main": "lib/index.js", "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", @@ -28,6 +31,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/style.css", + "./css/style.min.css": "./dist/style.min.css", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/utils": "workspace:^", diff --git a/packages/@uppy/utils/package.json b/packages/@uppy/utils/package.json index a369f1ec7..5b3a54d39 100644 --- a/packages/@uppy/utils/package.json +++ b/packages/@uppy/utils/package.json @@ -4,6 +4,7 @@ "version": "6.1.5", "license": "MIT", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -71,7 +72,6 @@ "./lib/CompanionFile": "./lib/CompanionFile.js", "./lib/CompanionClientProvider": "./lib/CompanionClientProvider.js", "./lib/FileProgress": "./lib/FileProgress.js", - "./src/microtip.scss": "./src/microtip.scss", "./lib/UserFacingApiError": "./lib/UserFacingApiError.js", "./lib/getAllowedMetaFields": "./lib/getAllowedMetaFields.js", "./lib/fetcher": "./lib/fetcher.js" diff --git a/packages/@uppy/vue/package.json b/packages/@uppy/vue/package.json index e7208d057..2069d3ab7 100644 --- a/packages/@uppy/vue/package.json +++ b/packages/@uppy/vue/package.json @@ -3,6 +3,9 @@ "version": "2.3.0", "license": "MIT", "type": "module", + "sideEffects": [ + "*.css" + ], "main": "lib/index.js", "scripts": { "build": "tsc --build tsconfig.build.json", @@ -19,10 +22,17 @@ "typescript": "^5.8.3", "vue": "^3.5.14" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/styles.css", + "./dashboard": "./lib/dashboard.js", + "./dashboard-modal": "./lib/dashboard-modal.js", + "./status-bar": "./lib/status-bar.js", + "./package.json": "./package.json" + }, "peerDependencies": { "@uppy/core": "workspace:^", "@uppy/dashboard": "workspace:^", - "@uppy/status-bar": "workspace:^", "vue": ">=3.0.0" }, "peerDependenciesMeta": { diff --git a/packages/@uppy/vue/src/dashboard-modal.ts b/packages/@uppy/vue/src/dashboard-modal.ts index 5f7ece772..28f06e836 100644 --- a/packages/@uppy/vue/src/dashboard-modal.ts +++ b/packages/@uppy/vue/src/dashboard-modal.ts @@ -13,7 +13,7 @@ export default defineComponent({ name: 'DashboardModal', props: { uppy: { - type: Uppy, + type: Object as PropType>, required: true, }, props: { diff --git a/packages/@uppy/vue/src/index.ts b/packages/@uppy/vue/src/index.ts index 827ae4834..8da08a883 100644 --- a/packages/@uppy/vue/src/index.ts +++ b/packages/@uppy/vue/src/index.ts @@ -1,8 +1,5 @@ -export { default as Dashboard } from './dashboard.js' -export { default as DashboardModal } from './dashboard-modal.js' export { UppyContextProvider } from './headless/context-provider.js' export * from './headless/generated/index.js' -export { default as StatusBar } from './status-bar.js' export * from './useDropzone.js' export * from './useFileInput.js' diff --git a/packages/@uppy/vue/src/status-bar.ts b/packages/@uppy/vue/src/status-bar.ts index 9d7a49778..a7675a9f7 100644 --- a/packages/@uppy/vue/src/status-bar.ts +++ b/packages/@uppy/vue/src/status-bar.ts @@ -7,7 +7,7 @@ export default defineComponent({ name: 'StatusBar', props: { uppy: { - type: Uppy, + type: Object as PropType>, required: true, }, props: { diff --git a/packages/@uppy/webcam/package.json b/packages/@uppy/webcam/package.json index 108152ddf..2c922b844 100644 --- a/packages/@uppy/webcam/package.json +++ b/packages/@uppy/webcam/package.json @@ -6,6 +6,9 @@ "main": "lib/index.js", "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", @@ -31,6 +34,12 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./css/style.css": "./dist/style.css", + "./css/style.min.css": "./dist/style.min.css", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/utils": "workspace:^", "is-mobile": "^4.0.0", diff --git a/packages/@uppy/webcam/src/Webcam.tsx b/packages/@uppy/webcam/src/Webcam.tsx index 2500916ae..3bd9b1df8 100644 --- a/packages/@uppy/webcam/src/Webcam.tsx +++ b/packages/@uppy/webcam/src/Webcam.tsx @@ -3,12 +3,11 @@ import type { DefinePluginOpts, Meta, MinimalRequiredUppyFile, + PluginTarget, UIPluginOptions, Uppy, } from '@uppy/core' - import { UIPlugin } from '@uppy/core' -import type { PluginTarget } from '@uppy/core/lib/UIPlugin.js' import canvasToBlob from '@uppy/utils/lib/canvasToBlob' import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension' import mimeTypes from '@uppy/utils/lib/mimeTypes' diff --git a/packages/@uppy/webdav/package.json b/packages/@uppy/webdav/package.json index c1187faa2..2197ca6f9 100644 --- a/packages/@uppy/webdav/package.json +++ b/packages/@uppy/webdav/package.json @@ -6,6 +6,7 @@ "main": "lib/index.js", "types": "types/index.d.ts", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -27,6 +28,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/packages/@uppy/xhr-upload/package.json b/packages/@uppy/xhr-upload/package.json index 55ff24e69..b0a69f38e 100644 --- a/packages/@uppy/xhr-upload/package.json +++ b/packages/@uppy/xhr-upload/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build", @@ -28,6 +29,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/utils": "workspace:^" diff --git a/packages/@uppy/xhr-upload/src/index.ts b/packages/@uppy/xhr-upload/src/index.ts index 7231df089..95e0eb28a 100644 --- a/packages/@uppy/xhr-upload/src/index.ts +++ b/packages/@uppy/xhr-upload/src/index.ts @@ -8,8 +8,7 @@ import type { Uppy, UppyFile, } from '@uppy/core' -import { BasePlugin } from '@uppy/core' -import EventManager from '@uppy/core/lib/EventManager.js' +import { BasePlugin, EventManager } from '@uppy/core' import { type FetcherOptions, fetcher } from '@uppy/utils/lib/fetcher' import { filterFilesToEmitUploadStarted, diff --git a/packages/@uppy/zoom/package.json b/packages/@uppy/zoom/package.json index 8639972a6..8a535dff6 100644 --- a/packages/@uppy/zoom/package.json +++ b/packages/@uppy/zoom/package.json @@ -5,6 +5,7 @@ "license": "MIT", "main": "lib/index.js", "type": "module", + "sideEffects": false, "scripts": { "build": "tsc --build tsconfig.build.json", "typecheck": "tsc --build" @@ -23,6 +24,10 @@ "type": "git", "url": "git+https://github.com/transloadit/uppy.git" }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, "dependencies": { "@uppy/companion-client": "workspace:^", "@uppy/provider-views": "workspace:^", diff --git a/yarn.lock b/yarn.lock index 1c972245a..5fb6377ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11952,7 +11952,6 @@ __metadata: "@uppy/core": "workspace:^" "@uppy/dashboard": "workspace:^" "@uppy/screen-capture": "workspace:^" - "@uppy/status-bar": "workspace:^" "@uppy/webcam": "workspace:^" react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 @@ -11961,8 +11960,6 @@ __metadata: optional: true "@uppy/screen-capture": optional: true - "@uppy/status-bar": - optional: true "@uppy/webcam": optional: true languageName: unknown @@ -12055,15 +12052,10 @@ __metadata: peerDependencies: "@uppy/core": "workspace:^" "@uppy/dashboard": "workspace:^" - "@uppy/status-bar": "workspace:^" svelte: ^4.0.0 || ^5.0.0 peerDependenciesMeta: "@uppy/dashboard": optional: true - "@uppy/drag-drop": - optional: true - "@uppy/progress-bar": - optional: true "@uppy/status-bar": optional: true languageName: unknown @@ -12182,7 +12174,6 @@ __metadata: peerDependencies: "@uppy/core": "workspace:^" "@uppy/dashboard": "workspace:^" - "@uppy/status-bar": "workspace:^" vue: ">=3.0.0" peerDependenciesMeta: "@uppy/dashboard":