Skip to content

Commit 0b1f79c

Browse files
authored
refactor(core): consolidate packages into @uppy/core (#6370)
Closes #6042. Merges `@uppy/utils`, `@uppy/store-default`, `@uppy/companion-client`, and `@uppy/provider-views` into `@uppy/core`, exposed via subpath exports. These packages are removed. This collapses four separately-versioned packages into the one package every plugin already depends on removing duplicate-version bugs, making updates actually reach users, and letting co-dependent types reference each other directly instead of through hand-maintained duplicates. Since this was a massive change so it's was done across 5 PRs - #6351 — merge `@uppy/store-default` → `@uppy/core/store-default` - #6352 — merge `@uppy/utils` → `@uppy/core/utils` - #6353 — merge `@uppy/companion-client` → `@uppy/core/companion-client` - #6358 — merge `@uppy/provider-views` → `@uppy/core/provider-views` - #6359 — remove the duplicate `CompanionClientProvider` / `view: any` bridge types and type `UnknownProviderPlugin['provider']` structurally (Pick of the real `Provider`/`SearchProvider`) ### Breaking (6.0) Import paths change, e.g. `@uppy/utils` → `@uppy/core/utils`, `@uppy/provider-views/css/*` → `@uppy/core/provider-views/css/*`. `RequestOptions` moves to `@uppy/core/companion-client`; `CompanionClientProvider`/ `CompanionClientSearchProvider` are removed (use the native `Provider`/ `SearchProvider`). See `MIGRATION-6.0-merge-into-core.md`.
2 parents 989b5ee + cf9f963 commit 0b1f79c

411 files changed

Lines changed: 496 additions & 2887 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/curvy-feet-chew.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
"@uppy/google-photos-picker": patch
44
"@uppy/google-drive-picker": patch
55
"@uppy/thumbnail-generator": patch
6-
"@uppy/companion-client": patch
76
"@uppy/golden-retriever": patch
87
"@uppy/image-generator": patch
9-
"@uppy/provider-views": patch
108
"@uppy/remote-sources": patch
119
"@uppy/screen-capture": patch
12-
"@uppy/store-default": patch
1310
"@uppy/google-drive": patch
1411
"@uppy/image-editor": patch
1512
"@uppy/transloadit": patch
@@ -31,7 +28,6 @@
3128
"@uppy/webdav": patch
3229
"@uppy/audio": patch
3330
"@uppy/react": patch
34-
"@uppy/utils": patch
3531
"@uppy/core": patch
3632
"@uppy/form": patch
3733
"@uppy/zoom": patch
@@ -42,4 +38,4 @@
4238
"uppy": patch
4339
---
4440

45-
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`.
41+
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`.

.changeset/lazy-berries-brake.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"@uppy/companion-client": patch
2+
"@uppy/core": patch
33
---
44

55
uploadRemoteFile() now queues token request and websocket request as a single job in the request queue.

.changeset/mighty-deers-sin.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
"@uppy/companion-client": major
2+
"@uppy/core": major
33
"@uppy/companion": major
44
---
55

66
Send token using websocket instead of window.opener.
7-
Breaking in `@uppy/companion-client` because it needs newest version of Companion in order to work.
7+
Breaking in `@uppy/core` because it needs newest version of Companion in order to work.
88
Breaking in `@uppy/companion` because `companion.socket()` now requires `companionOptions` to be passed as the second argument.

examples/companion-custom-provider/client/MyCustomProvider.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/** @jsx h */
22

3-
import { getAllowedHosts, Provider, tokenStorage } from '@uppy/companion-client'
43
import { UIPlugin } from '@uppy/core'
5-
import { ProviderViews } from '@uppy/provider-views'
4+
import {
5+
getAllowedHosts,
6+
Provider,
7+
tokenStorage,
8+
} from '@uppy/core/companion-client'
9+
import { ProviderViews } from '@uppy/core/provider-views'
610

711
const defaultOptions = {}
812

examples/companion-custom-provider/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
"private": true,
55
"type": "module",
66
"dependencies": {
7-
"@uppy/companion-client": "workspace:*",
87
"@uppy/core": "workspace:*",
98
"@uppy/dashboard": "workspace:*",
109
"@uppy/google-drive": "workspace:*",
11-
"@uppy/provider-views": "workspace:*",
1210
"@uppy/tus": "workspace:*",
1311
"preact": "^10.29.2"
1412
},

packages/@uppy/angular/turbo.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
"extends": ["//"],
33
"tasks": {
44
"build": {
5-
"dependsOn": [
6-
"@uppy/core#build",
7-
"@uppy/dashboard#build",
8-
"@uppy/utils#build"
9-
],
5+
"dependsOn": ["@uppy/core#build", "@uppy/dashboard#build"],
106
"inputs": [
117
"projects/uppy/angular/src/**/*.{js,ts,jsx,tsx}",
128
"package.json",

packages/@uppy/audio/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"./package.json": "./package.json"
4141
},
4242
"dependencies": {
43-
"@uppy/utils": "workspace:^",
4443
"preact": "^10.29.2"
4544
},
4645
"devDependencies": {

packages/@uppy/audio/src/Audio.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import type {
77
} from '@uppy/core'
88

99
import { UIPlugin } from '@uppy/core'
10-
import type { LocaleStrings } from '@uppy/utils'
11-
import { getFileTypeExtension } from '@uppy/utils'
10+
import type { LocaleStrings } from '@uppy/core/utils'
11+
import { getFileTypeExtension } from '@uppy/core/utils'
1212
import packageJson from '../package.json' with { type: 'json' }
1313
import locale from './locale.js'
1414
import PermissionsScreen from './PermissionsScreen.js'

packages/@uppy/audio/src/DiscardButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { I18n } from '@uppy/utils'
1+
import type { I18n } from '@uppy/core/utils'
22

33
interface DiscardButtonProps {
44
onDiscard: () => void

packages/@uppy/audio/src/PermissionsScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { I18n } from '@uppy/utils'
1+
import type { I18n } from '@uppy/core/utils'
22
import type { h } from 'preact'
33

44
interface PermissionsScreenProps {

0 commit comments

Comments
 (0)