Skip to content

Commit

Permalink
@uppy/react: move @uppy/ packages to peer dependencies (#4004)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 22, 2022
1 parent 7c460f3 commit ef7cbea
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 23 deletions.
27 changes: 22 additions & 5 deletions packages/@uppy/react/package.json
Expand Up @@ -22,11 +22,6 @@
"url": "git+https://github.com/transloadit/uppy.git"
},
"dependencies": {
"@uppy/dashboard": "workspace:^",
"@uppy/drag-drop": "workspace:^",
"@uppy/file-input": "workspace:^",
"@uppy/progress-bar": "workspace:^",
"@uppy/status-bar": "workspace:^",
"@uppy/utils": "workspace:^",
"prop-types": "^15.6.1"
},
Expand All @@ -36,6 +31,28 @@
},
"peerDependencies": {
"@uppy/core": "workspace:^",
"@uppy/dashboard": "workspace:^",
"@uppy/drag-drop": "workspace:^",
"@uppy/file-input": "workspace:^",
"@uppy/progress-bar": "workspace:^",
"@uppy/status-bar": "workspace:^",
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
},
"peerDependenciesMeta": {
"@uppy/dashboard": {
"optional": true
},
"@uppy/drag-drop": {
"optional": true
},
"@uppy/file-input": {
"optional": true
},
"@uppy/progress-bar": {
"optional": true
},
"@uppy/status-bar": {
"optional": true
}
}
}
2 changes: 1 addition & 1 deletion website/src/docs/react-dashboard-modal.md
Expand Up @@ -14,7 +14,7 @@ The `<DashboardModal />` component wraps the [`@uppy/dashboard`][] plugin, allow
Install from NPM:

```shell
npm install @uppy/react
npm install @uppy/react @uppy/dashboard @uppy/core
```

```js
Expand Down
2 changes: 1 addition & 1 deletion website/src/docs/react-dashboard.md
Expand Up @@ -14,7 +14,7 @@ The `<Dashboard />` component wraps the [`@uppy/dashboard`][] plugin. It only re
Install from NPM:

```shell
npm install @uppy/react
npm install @uppy/react @uppy/dashboard @uppy/core
```

```js
Expand Down
2 changes: 1 addition & 1 deletion website/src/docs/react-dragdrop.md
Expand Up @@ -15,7 +15,7 @@ The `<DragDrop />` component wraps the [`@uppy/drag-drop`](/docs/drag-drop/) plu
Install from NPM:

```shell
npm install @uppy/react
npm install @uppy/react @uppy/drag-drop @uppy/core
```

```js
Expand Down
2 changes: 1 addition & 1 deletion website/src/docs/react-fileinput.md
Expand Up @@ -15,7 +15,7 @@ The `<FileInput />` component wraps the [`@uppy/file-input`](/docs/file-input/)
Install from NPM:

```shell
npm install @uppy/react
npm install @uppy/react @uppy/file-input @uppy/core
```

```js
Expand Down
2 changes: 1 addition & 1 deletion website/src/docs/react-progressbar.md
Expand Up @@ -15,7 +15,7 @@ The `<ProgressBar />` component wraps the [`@uppy/progress-bar`][] plugin.
Install from NPM:

```shell
npm install @uppy/react
npm install @uppy/react @uppy/progress-bar @uppy/core
```

```js
Expand Down
2 changes: 1 addition & 1 deletion website/src/docs/react-statusbar.md
Expand Up @@ -15,7 +15,7 @@ The `<StatusBar />` component wraps the [`@uppy/status-bar`][] plugin.
Install from NPM:

```shell
npm install @uppy/react
npm install @uppy/react @uppy/status-bar @uppy/core
```

```js
Expand Down
15 changes: 8 additions & 7 deletions website/src/docs/react.md
Expand Up @@ -73,13 +73,14 @@ const AvatarPicker = ({ currentAvatar }) => {
}
```

The following plugins are available as React component wrappers:

* [\<Dashboard />][<Dashboard />] - renders an inline [`@uppy/dashboard`][]
* [\<DashboardModal />][<DashboardModal />] - renders a [`@uppy/dashboard`][] modal
* [\<DragDrop />][<DragDrop />] - renders a [`@uppy/drag-drop`][] area
* [\<ProgressBar />][<ProgressBar />] - renders a [`@uppy/progress-bar`][]
* [\<StatusBar />][<StatusBar />] - renders a [`@uppy/status-bar`][]
The following plugins are available as React component wrappers (you need to
install each package separately):

* [\<Dashboard />][<Dashboard />] - renders an inline [`@uppy/dashboard`][].
* [\<DashboardModal />][<DashboardModal />] - renders a [`@uppy/dashboard`][] modal.
* [\<DragDrop />][<DragDrop />] - renders a [`@uppy/drag-drop`][] area.
* [\<ProgressBar />][<ProgressBar />] - renders a [`@uppy/progress-bar`][].
* [\<StatusBar />][<StatusBar />] - renders a [`@uppy/status-bar`][].

[React]: https://facebook.github.io/react

Expand Down
21 changes: 16 additions & 5 deletions yarn.lock
Expand Up @@ -8749,17 +8749,28 @@ __metadata:
resolution: "@uppy/react@workspace:packages/@uppy/react"
dependencies:
"@types/react": ^18.0.8
"@uppy/dashboard": "workspace:^"
"@uppy/drag-drop": "workspace:^"
"@uppy/file-input": "workspace:^"
"@uppy/progress-bar": "workspace:^"
"@uppy/status-bar": "workspace:^"
"@uppy/utils": "workspace:^"
prop-types: ^15.6.1
react: ^18.1.0
peerDependencies:
"@uppy/core": "workspace:^"
"@uppy/dashboard": "workspace:^"
"@uppy/drag-drop": "workspace:^"
"@uppy/file-input": "workspace:^"
"@uppy/progress-bar": "workspace:^"
"@uppy/status-bar": "workspace:^"
react: ^16.0.0 || ^17.0.0 || ^18.0.0
peerDependenciesMeta:
"@uppy/dashboard":
optional: true
"@uppy/drag-drop":
optional: true
"@uppy/file-input":
optional: true
"@uppy/progress-bar":
optional: true
"@uppy/status-bar":
optional: true
languageName: unknown
linkType: soft

Expand Down

0 comments on commit ef7cbea

Please sign in to comment.