Commit graph

451 commits

Author SHA1 Message Date
Prakash
c3c7cef4ed
@uppy: upgrade deps (#6307)
will do a separte PR for changes which would require code changes so
it's easier to review , didn't upgrade any deps for `@uppy/aws-s3` since
we'll merge the rewrite so I think we should do that upgrade in the
rewrite branch before merging.

update : Dependency upgrades which required code changes were raised
separately

- #6309 
- #6310

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-29 18:58:42 +05:30
Prakash
5519b84409
@uppy: upgrade biome and more improvements (#6244)
- This PR upgrades `biome` from `2.0.5` -> `2.1.2` and adds two new
rules
-
[noUnusedImports](https://biomejs.dev/linter/rules/no-unused-private-class-members)
( we already had suppressions for this rule in code, but the rule itself
was never enabled in the config )
-
[noUnusedPrivateClassMembers](https://biomejs.dev/linter/rules/no-unused-private-class-members/)
- remove stale suppressions. 
- remove stale code.

---------

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2026-05-21 12:28:03 +08:00
Prakash
12de077e6d
remove @uppy/instagram (#6257)
closes #5455 , this PR removes all Instagram support from both the
client and Companion server.

Removed:
- Instagram from @uppy/remote-sources (src, package.json, keywords)
- Instagram export from uppy bundle (bundle.ts, index.ts, package.json)
- Companion Instagram OAuth provider (provider/index.js, grant.js)
- Companion standalone helper Instagram env vars (helper.js,
env_example)
- All Companion Instagram tests (providers.test.js,
provider-manager.test.js, fixtures/index.js, mockserver.js)
2026-05-13 14:42:10 +05:30
Prakash
588e1c0f88
@uppy/core: fix stale comments (#6272)
reported in https://github.com/transloadit/uppy/issues/6270
2026-04-24 17:00:50 +05:30
Prakash
4817585b66
@uppy/companion: fix broken icons for webdav provider (#6069)
This fixes #6063.

It should be merged after #6059. Icon issue was fixed but This still
doesn’t fix the thumbnail preview issue, because OwnCloud and Nextcloud
don’t provide enough information about their thumbnail preview
endpoints. The docs aren’t very helpful: they mention how to make a
`PROPFIND` request to get extra metadata (such as has_preview)
[doc_ref](https://docs.nextcloud.com/server/stable/developer_manual/client_apis/WebDAV/basic.html#requesting-properties),
but I couldn’t get it to work with our webdav client.

Even if we did manage to obtain the thumbnail preview URL, it would be a
complicated capability to add, since we’d have to handle each WebDAV
server separately. That would lead to the same problems discussed here:
https://github.com/transloadit/uppy/pull/6059#issuecomment-3564642795 ,
so I don't think we need to spend anymore time on this.

**Before** 
<img width="1238" height="1014" alt="image"
src="https://github.com/user-attachments/assets/378c8b4b-640f-4e5d-9fef-48d255f729f9"
/>


**After** 
<img width="982" height="708" alt="image"
src="https://github.com/user-attachments/assets/7e20b119-c5a9-45dd-a0bd-7ddf95672137"
/>
2025-11-29 01:25:12 +05:30
Mikael Finstad
ac12f35f5b
Move completed uploads exclusion logic (#6058)
into uploader plugins

fixes #6051

also [fix deprecated usage of done
callback](2511142276)
2025-11-24 19:47:45 +07:00
Prakash
79e6460a6c
Make Generics Optional in uppy.getPlugin (#6057)
fixes #6024.

### Problem
- `getPlugin()` defaults to `UnknownPlugin`, so methods like `openModal`
are not visible , since core is not aware of that plugin type

### Proposed change
- Introduce a types-only registry in core:
- `export interface PluginTypeRegistry<M extends Meta, B extends Body>
{}`
- Overload `getPlugin` to return a precise type when the id is a known
key of the registry.
- add `Dashboard` to  PluginTypeRegistry through module augmentation:
  - `'Dashboard': Dashboard<M, B>`.
- When a project imports from `@uppy/dashboard`, its module augmentation
extends PluginTypeRegistry, adding the correct type into it
- I've added Tests , kept them in a separate file so it's easier to
review , once this approach gets approved I'll add them to
`Uppy.test.ts`

Once this PR gets a positive review I'll add this for other plugins ,
currently only added for `@uppy/dashboard`

**Build with Local tarball can be checked here** 


https://stackblitz.com/~/github.com/qxprakash/uppy-type-test?file=type_test.ts
2025-11-17 18:18:54 +05:30
Mikael Finstad
0c16fe44b9
Golden retriever refactor and UppyFile type improvements (#5978)
Probably best reviewed commit by commit.

I also split UppyFile into two intefaces distinguished by the `isRemote`
boolean:
- LocalUppyFile
- RemoteUppyFile

Also:
- Removed the TagFile type
- Don't re-upload completed files - fixes #5930
- Clean up stored files on `complete` event *only* if *all* files
succeeded (no failed files). this allows the user to retry failed files
if the browser & upload get interrupted - fixes #5927, closes #5955
- Only set `isGhost` for non-successful files. it doesn't make sense for
successfully uploaded files to be ghosted because they're already done.
#5930

fixes #6013

---------

Co-authored-by: Prakash <qxprakash@gmail.com>
2025-10-17 23:17:40 +08:00
Prakash
5ba2c1c8d3
Server side search @uppy/Companion (#6003)
## High Level View

<img width="3367" height="1576" alt="Global Search (1)"
src="https://github.com/user-attachments/assets/134e8658-5cbd-4816-87a1-3bd42603089d"
/>


- Search View replicated , through minimal components `<GlobalSearchView
/>` and `<SearchResultItem />`
- Both components take only the minimal state needed to render the
search view no dependency on PartialTree. search response from companion
server is directly passed to GlobalSearchView for file state.
- `#buildPath` creates missing parent nodes in partialTree (if any) and
opens the folder in the normal way using a minimal wrapper over
openFolder function.
- Both interactions : "checking a file/folder" and "opening a folder"
use the same function `#buildPath` to build the path, then use the
already existing `openFolder` and `toggleCheckBox`.
- Max search results: 1000. Pagination removed for simplicity (can be
added later).
- From a UI/UX standpoint, all functionality works as expected.
- The only limitation is occasional inconsistent partial checked states
when the tree isn’t fully built — unavoidable since percolateUp and
percolateDown require the complete partialTree to sync state correctly.
This issue isn’t critical; even in other cases, we already mark folders
"checked" whereas they may be empty if not yet fetched.
- I figured out it's better to just derive the checkedState from
PartialTree , and then pass it to `GlobalSearchView` rather than keep it
separate and then worrying about checked state syncs across two views
for UI to look right.
- IMO this is the most simplest approach I could come up with. without
sacrificing any user functionality and it carefully reuses all the util
code.

---------

Co-authored-by: Merlijn Vos <merlijn@soverin.net>
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2025-10-08 21:18:17 +02:00
Prakash
923197ccec
@uppy/golden-retriever : emit "complete" on restore (#5956)
fixes #5929

---------

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2025-09-14 14:49:18 +02:00
Copilot
84cf20ea4c
Add stability warning comment to SCSS source files (#5960)
Adds a stability warning comment to the top of all `src/style.scss`
files in the following Uppy packages to inform consumers that the source
code and variables are not part of the stable API:

- @uppy/audio
- @uppy/core
- @uppy/dashboard
- @uppy/drag-drop
- @uppy/drop-target
- @uppy/image-editor
- @uppy/provider-views
- @uppy/screen-capture
- @uppy/status-bar
- @uppy/url
- @uppy/webcam

The comment added is:
```scss
// NOTE TO CONSUMERS: The code and variables in these source files are not considered stable and can change at any time, even in minor and patch releases!
```

This warning helps clarify that while the compiled CSS output and public
APIs remain stable, the internal SCSS source files, variables, and
implementation details should not be relied upon by consumers as they
may change without notice in any release.

The changes are minimal and surgical - exactly one line added to the top
of each file with no other modifications to existing code.

<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created as a result of the following prompt from
Copilot chat.*
> Add the following comment at the very top of each src/style.scss file
in the following Uppy packages: @uppy/audio, @uppy/core,
@uppy/dashboard, @uppy/drag-drop, @uppy/drop-target, @uppy/image-editor,
@uppy/provider-views, @uppy/screen-capture, @uppy/status-bar, @uppy/url,
@uppy/webcam.
> 
> Comment to add:
> // NOTE TO CONSUMERS: The code and variables in these source files are
not considered stable and can change at any time, even in minor and
patch releases!
> 
> Ensure the comment is the first line in each file, above any existing
code or imports.

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/transloadit/uppy/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mifi <402547+mifi@users.noreply.github.com>
Co-authored-by: Prakash <qxprakash@gmail.com>
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2025-09-11 21:53:40 +02:00
Prakash
4b6a76cbf4
add missing exports (#5952)
fixes #5940
2025-09-04 22:43:50 +05:30
Prakash
f997d8b401
Revert "add missing exports" (#5951)
Reverts transloadit/uppy#5944
2025-09-04 22:29:21 +05:30
Prakash
06f8382338
add missing exports (#5944)
fixes #5940
2025-09-04 22:24:49 +05:30
Merlijn Vos
49522ec5cb
Remove preact/compat (#5935)
We drag it in unneccesarily in the bundle and it can cause JSX clashes
in React apps with `"jsx": "preserve"` in their `tsconfig.json`
(https://github.com/preactjs/preact/issues/4908)

- Remove `@types/react` from companion (unused)
- Fix tsconfig's for @uppy/utils (build was fine, but editor diagnostics
weren't)
2025-08-28 16:57:07 +02:00
Prakash
d82bbdbbfe lint fix 2025-08-21 14:34:12 +05:30
Prakash
6a33652458 Merge branch 'main' of https://github.com/transloadit/uppy into 5.0 2025-08-20 16:17:08 +05:30
Prakash
d301c01d6a
@uppy/utils: update export maps (#5900)
- cleanup `@uppy/utils ` removed unused / redundant modules .
- migrated modules and tests from `.js` to `.ts`
- removed all the nested export paths
- updated `@uppy/utils` import paths for all packages
- `@uppy/angular` is still failing while running`yarn build` , I'm
looking into it.

---------

Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2025-08-19 12:25:27 +02:00
Prakash
eee05db260
fix retry after setting missed metaFields (#5805) 2025-08-11 14:15:16 +02:00
Prakash
c5b51f6158
Add Export Maps (#5830)
- added export maps to all the @uppy packages .
- imports remain unaffected except for peerDep packages in `@uppy/react`
`@uppy/svelte` and `@uppy/vue3`.
- export maps added for index files , css , and package.json. 
- Added side effects for all the packages.

---------

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2025-07-31 17:22:57 +02:00
Mikael Finstad
acdc683d47
Refactor Companion to ESM (#5803)
- convert cjs to esm
- refactor from jest to vitest

closes #3979

---------

Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2025-07-29 19:07:48 +02:00
Merlijn Vos
7bf319646a
Migrate from Cypress to Vitest Browser Mode (#5828)
- Remove `e2e` folder entirely
- Remove all hacky resolutions and yarn patches
- Remove `@types/jasmine`, `js2ts` (convert a JS file to TS), and
`vue-template-compiler` from `private/`
- Remove e2e CI job
- Add browsers tests for vue, svelte, and react headless components and
hooks.
- Add new (browser) tests for transloadit, aws-s3, and dashboard.
- Remove final useless scripts from `package.json`, use direct
references in CI.
- Fix Dropzone component accessibility discovered during testing
- Clean up github workflows (move linters.yml into ci.yml, update
e2e.yml)

**Why Vitest Browser Mode?**

We could have used playwright but vitest browser mode uses it under the
hood and we get the use the vitest we know a love. No two entirely
different setups, no different assertions to relearn, write e2e tests as
if you're writing unit tests. Easy, fast, beautiful.

https://vitest.dev/guide/browser/

**Has every single e2e test been rewritten?**

No there were quite a few tests that have a lot overlap with existing or
newly added tests. There were also some tests that were so heavily
mocked inside and out you start to wonder what the value still is. Open
to discuss which tests still need to be added.
2025-07-28 11:27:37 +02:00
Merlijn Vos
7c609a56d9
Use turbo for all unit tests (#5815)
- Upgrade vitest from 1.x to 3.x.
  - Fix some tests that now became more strict and started failing
-  Add test command to all packages + needed dependencies
- Add turbo config for running tests

Another PR will completely redo the e2e test suite.
2025-07-12 13:21:35 +02:00
Prakash
33e4b37106
@uppy/core: resolve stale state issue in checkAndUpdateFileState (#5814) 2025-07-10 17:38:39 +02:00
Merlijn Vos
75c8007cf9
Isolate CSS building per package (#5799)
- Isolate CSS bundling per package
- Fix _all_ sass deprecation warnings
- Remove global scripts
- Run CSS building in parallel .

Is it repetitive? Yes a bit. But it's mono repo best practice and once
we introduce turbo each css build step can be individually cached. That
means when you edit scss in one package, only that needs to be rebuild,
not the TS of that package nor any other CSS. This PR lays the
groundwork for that.
2025-07-07 11:47:14 +02:00
Murderlon
a848a4f695
Revert "@uppy/core: resolve stale state issue in checkAndUpdateFileState (#5806)"
This reverts commit da5f24b322.
2025-07-07 10:29:56 +02:00
Prakash
da5f24b322
@uppy/core: resolve stale state issue in checkAndUpdateFileState (#5806) 2025-07-07 09:26:17 +02:00
Merlijn Vos
78299475ae
Migrate from Eslint/Prettier/Stylelint to Biome (#5794) 2025-07-01 14:55:41 +02:00
Merlijn Vos
d408570373
From Babel to TS (#5792) 2025-06-30 16:12:26 +02:00
Merlijn Vos
cb2999926b
Add useRemoteSource (#5778) 2025-06-24 11:00:37 +02:00
Prakash
e77c3e099f
@uppy/core: fix missing required meta field error not updating (#5766) 2025-05-28 16:20:27 +02:00
Merlijn Vos
0259b09d73
Headless components (#5727)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2025-05-22 09:59:43 +02:00
Prakash
bb82326d0d
@uppy/core: fix undefined reference when cancelling an upload (#5730) 2025-04-24 16:27:58 +02:00
Merlijn Vos
d58cc20372
ts: make locale strings optional (#5728) 2025-04-21 12:34:29 +02:00
Mikael Finstad
29ef0bf974
dry retryAll() and upload() (#5691)
* dry retryAll() and upload()

improvement of #5677

* fix bug

* make it private

* fix botched merge
2025-04-08 15:17:09 +02:00
Merlijn Vos
229902eb17
@uppy/core: fix locale type for plugins (#5700)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2025-03-31 12:04:29 +02:00
Prakash
0db99ca74b
@uppy/core: fix events when retrying with upload() (#5696)
Co-authored-by: Murderlon <merlijn@soverin.net>
2025-03-28 10:56:58 +01:00
Merlijn Vos
f881fa031e
@uppy/core: make upload() idempotent (#5677)
Before

Add a file
Call uppy.upload() but make it fail (set throttling to offline in your browser)
Call uppy.upload() again but no throttling
Events are not fired, endless uploading state.
You must call retryAll() instead but it's better DX if you can simply call upload() again and let us figure it out.

After

upload() behaves like retryAll() when errors occurred in a backwards compatible way.

What if an upload fails and you also add a new file?

Backwards compatible behaviour similar to how it currently works when using the dashboard. In the dashboard you can only click the retry button and once that upload is done you can click upload again to upload the new files.

When a previous upload partially failed, you add a new file, and call upload() this PR makes sure two uploads are done in a row. That does mean you get the 'complete' event twice.
2025-03-13 09:46:24 +01:00
Mikael Finstad
dd555d83f5
fix google picker i18n (#5632)
* fix google picker i18n

fixes #5542
fixes #5620

* fix type
2025-01-31 16:26:21 +08:00
Merlijn Vos
6e65cd8c51
Import types consistently from @uppy/core (#5589)
* Import types consistently from @uppy/core

* Add new eslint rule

* Clean up exports
2025-01-09 11:03:43 +01:00
Merlijn Vos
0215c5ab84
@uppy/provider-views: fix incorrect import (#5588) 2025-01-09 10:03:10 +01:00
Merlijn Vos
3e2aa9f3c8
Use .js(x) for all imports instead .ts(x) (#5573) 2025-01-06 13:29:55 +01:00
Merlijn Vos
5eb049779e
@uppy/core: bring back validateRestrictions (#5538) 2024-12-16 14:17:37 +01:00
Mikael Finstad
24fd4158a9
Companion stream upload unknown size files (#5489)
* stream upload unknown size files

behind a new option streamingUploadSizeless
COMPANION_STREAMING_UPLOAD_SIZELESS
for tus

* allow for all upload protocols

seems to be working
closes #5305

* refactor

and fix bug where progress was not always emitted

* fix type

* fix progress throttling

only do it on total progress

* Improve progress in UI

- only show progress percent and total bytes for files that we know the size of. (but all files will still be included in number of files)
- use `null` as an unknown value for progress and ETA, allowing us to remove ETA from UI when unknown
- `percentage` make use of `undefined` when progress is not yet known - don't show percentage in UI when unknown
- add a new state field `progress` that's the same as `totalProgress` but can also be `null`

* fix build error

* format

* fix progress when upload complete

* use execa for companion load balancer

if not, then it leaves zombie companion instances running in the background when e2e stops
have to be manually killed before running e2e again

* update docs and tests for new state.progress

* revert progress/totalProgress

* improve doc

* remove option streamingUploadSizeless

we agreed that this can be considered not a breaking change

* change progress the to "of unknown"

* revert

* remove companion doc

* add e2e test
2024-12-07 10:30:00 +08:00
Mikael Finstad
0648fa7633
move useStore out of core (#5533)
https://github.com/transloadit/uppy/pull/5443#discussion_r1862342884
(cherry picked from commit 00070c870f76876aca92e97f410f8b52085191bc)
2024-12-02 17:32:06 +01:00
Mikael Finstad
afd4befee2
Google Picker (#5443)
* initial poc

* improvements

- split into two plugins
- implement photos picker
- auto login
- save access token in local storage
- document
- handle photos/files picked and send to companion
- add new hook useStore for making it easier to use localStorage data in react
- add new hook useUppyState for making it easier to use uppy state from react
- add new hook useUppyPluginState for making it easier to plugin state from react
- fix css error

* implement picker in companion

* type todo

* fix ts error

which occurs in dev when js has been built before build:ts gets called

* reuse docs

* imrpve type safety

* simplify async wrapper

* improve doc

* fix lint

* fix build error

* check if token is valid

* fix broken logging code

* pull logic out from react component

* remove docs

* improve auth ui

* fix bug

* remove unused useUppyState

* try to fix build error
2024-12-02 18:34:50 +08:00
Evgenia Karunus
922e7fbf02
Dashboard - convert some files to typescript (#5367)
Co-authored-by: Murderlon <merlijn@soverin.net>
2024-10-15 10:43:00 +02:00
Merlijn Vos
20291e19e8
@uppy/transloadit: fix multiple upload batches & run again (#5478)
* @uppy/transloadit: fix multiple upload batchs & run again

* Remove console.log
2024-09-30 11:22:38 +02:00
Merlijn Vos
bc27b4a5c8
Pass container to UIPlugin.render for non-Preact integration (#5437) 2024-08-29 16:12:27 +02:00
Merlijn Vos
abcab37bfe
docs: remove stale reference to plugins page (#5414) 2024-08-20 19:29:03 +02:00