Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@uppy/vue: migrate to Composition API with TS & drop Vue 2 support #5043

Merged
merged 5 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,5 +519,11 @@ module.exports = {
'no-unused-expressions': 'off',
},
},
{
files: ["packages/@uppy/vue/**"],
rules: {
'react-hooks/rules-of-hooks': 'off',
},
},
],
}
24 changes: 0 additions & 24 deletions examples/vue/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions examples/vue/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions examples/vue/index.html

This file was deleted.

24 changes: 0 additions & 24 deletions examples/vue/package.json

This file was deleted.

111 changes: 0 additions & 111 deletions examples/vue/src/App.vue

This file was deleted.

8 changes: 0 additions & 8 deletions examples/vue/src/main.js

This file was deleted.

7 changes: 0 additions & 7 deletions examples/vue/vite.config.js

This file was deleted.

1 change: 1 addition & 0 deletions examples/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@uppy/progress-bar": "workspace:*",
"@uppy/tus": "workspace:*",
"@uppy/vue": "workspace:*",
"@uppy/webcam": "workspace:*",
"vue": "^3.2.33"
},
"devDependencies": {
Expand Down
25 changes: 15 additions & 10 deletions examples/vue3/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<script setup>
import { Dashboard, DashboardModal, DragDrop, ProgressBar } from '@uppy/vue'
</script>

<template>
<div id="app">
<!-- <HelloWorld msg="Welcome to Uppy Vue Demo"/> -->
Expand Down Expand Up @@ -61,23 +57,32 @@ import { Dashboard, DashboardModal, DragDrop, ProgressBar } from '@uppy/vue'
</div>
</template>

<script setup>
import { Dashboard, DashboardModal, DragDrop, ProgressBar } from '@uppy/vue'
</script>

<script>
import Uppy from '@uppy/core'
import Tus from '@uppy/tus'
import Webcam from '@uppy/webcam'
import { defineComponent } from 'vue'

const { VITE_TUS_ENDPOINT: TUS_ENDPOINT } = import.meta.env

export default defineComponent({
computed: {
uppy: () =>
new Uppy({ id: 'uppy1', autoProceed: true, debug: true }).use(Tus, {
endpoint: TUS_ENDPOINT,
}),
new Uppy({ id: 'uppy1', autoProceed: true, debug: true })
.use(Tus, {
endpoint: TUS_ENDPOINT,
})
.use(Webcam),
uppy2: () =>
new Uppy({ id: 'uppy2', autoProceed: false, debug: true }).use(Tus, {
endpoint: TUS_ENDPOINT,
}),
new Uppy({ id: 'uppy2', autoProceed: false, debug: true })
.use(Tus, {
endpoint: TUS_ENDPOINT,
})
.use(Webcam),
},
data() {
return {
Expand Down
1 change: 1 addition & 0 deletions packages/@uppy/file-input/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default } from './FileInput.tsx'
export type { FileInputOptions } from './FileInput.tsx'
2 changes: 1 addition & 1 deletion packages/@uppy/vue/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# This file need to be there so .gitignored files are still uploaded to the npm registry.
tsconfig.*
5 changes: 3 additions & 2 deletions packages/@uppy/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"name": "@uppy/vue",
"version": "1.1.2",
"license": "MIT",
"type": "module",
"main": "lib/index.js",
"dependencies": {
"shallow-equal": "^1.2.1"
},
"devDependencies": {
"vue": "^2.6.14"
"vue": "^3.4.21"
},
"peerDependencies": {
"@uppy/core": "workspace:^",
Expand All @@ -16,7 +17,7 @@
"@uppy/file-input": "workspace:^",
"@uppy/progress-bar": "workspace:^",
"@uppy/status-bar": "workspace:^",
"vue": ">=2.6.11"
"vue": ">=3.0.0"
},
"peerDependenciesMeta": {
"@uppy/dashboard": {
Expand Down
92 changes: 0 additions & 92 deletions packages/@uppy/vue/src/dashboard-modal.js

This file was deleted.

Loading
Loading