Commit graph

26 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
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
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
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
78299475ae
Migrate from Eslint/Prettier/Stylelint to Biome (#5794) 2025-07-01 14:55:41 +02: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
3e2aa9f3c8
Use .js(x) for all imports instead .ts(x) (#5573) 2025-01-06 13:29:55 +01:00
Antoine du Hamel
64bffd5363
export plugin options (#5433) 2024-08-28 15:49:03 +02:00
Antoine du Hamel
72e84a84d4
@uppy/compressor: mark quality as optional (#5374) 2024-07-29 14:14:54 +02:00
Antoine du Hamel
473e164e03
meta: fix React linter rules (#5317) 2024-07-09 15:24:20 +02:00
Antoine du Hamel
489ca6de55
meta: enforce use of extension in import type declarations (#5316) 2024-07-09 14:35:58 +02:00
Merlijn Vos
3393b537d3
Upgrade Yarn to 4.x (#4849)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-04-29 18:49:02 +02:00
Antoine du Hamel
00405fb24c
fix type imports (#5038)
We sometimes where importing source files, which may not be available in
production. Instead we should target extension-less paths in `lib/`
folders so the generated `.d.ts` files are used.
2024-03-27 14:32:45 +01:00
Mikael Finstad
6b4f5b68f7
@uppy/compressor: migrate to TS (#4907)
* refactor compressor to ts

* rename Options

* export opts
2024-02-12 23:10:49 +08:00
Antoine du Hamel
2c432b12cd
test: migrate to Vitest for Uppy core and Uppy plugins (#4700) 2023-09-26 17:23:17 +02:00
Artur Paikin
8b86db1ce5
@uppy/compressor: update file.meta.name after compression, becase format/extension might have changed (#4645)
* When Compressor changed file format, update file.meta.name

* only use the setFileState, update comment

* Use Compressor ESM, check for name and extension

* Add test with mocked compress()

* Test user changing the file.meta.name

* Update packages/@uppy/compressor/package.json

Co-authored-by: Antoine du Hamel <antoine@transloadit.com>

* Cleaner variables, remove excessive checks

* Fix package.json

---------

Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
2023-09-11 14:01:35 +02:00
Artur Paikin
0d482ccc0f
Fix Compressor being broken when no name is in the compressed blob (#3947)
* Fix Compressor being broken when no name is in the compressed blob

* Update packages/@uppy/compressor/src/index.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-08-04 13:23:29 +01:00
Justin
2b435bdc51
@uppy/compressor: fix upload causing meta name to reset (#3890)
Fix @uppy/compressor resetting meta name
2022-07-27 18:19:36 +02:00
Artur Paikin
b0e01ff082
Fix Compressor docs, pass files array to compressor:complete event (#3682)
* Fix Compressor docs

* Remove unused test commands

* Add note that all options are passed

* Add event to types

* Update website/src/docs/compressor.md

Co-authored-by: Merlijn Vos <merlijn@soverin.net>

* Update packages/@uppy/compressor/types/index.d.ts

Co-authored-by: Merlijn Vos <merlijn@soverin.net>

* add files array as callback to compressor:complete

Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2022-05-18 19:29:08 +01:00
Camilo Forero
c69fa01c92
Set meta on file compression (#3644)
The meta field was not updated when a new file was generated
2022-04-20 03:20:30 +08:00
Camilo Forero
011856ccf4
Merge new name and type into compressed file (#3606)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2022-04-05 14:34:18 +08:00
Artur Paikin
953ae5c929
@uppy/compressor: ignore remote files, calculate savings correctly (#3578) 2022-03-16 20:17:16 +00:00
Artur Paikin
7223af2c9d
@uppy/compressor: Add image compressor plugin (#3471)
* Add Compressor plugin

* Set type in blob if it’s missing

* clear thumbnail-generator queue when cancel-all is called

* Add e2e test for @uppy/compressor

* Docs, types, readme, bundle, add event

* Update yarn.lock

* fix test

* Update e2e/cypress/integration/dashboard-compressor.spec.ts

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* Update dashboard-compressor.spec.ts

* convert compressor to ESM

* Update e2e/clients/dashboard-compressor/index.html

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* remove console.log

* uglierBytes

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-16 11:40:08 +00:00