Commit graph

736 commits

Author SHA1 Message Date
Antoine du Hamel
f626ce7228
meta: add MDX file to lint-staged list (#5174) 2024-05-16 10:31:04 +02:00
Antoine du Hamel
c0961a6cd9
meta: add prettier to .md pre-commit hooks 2024-05-02 19:57:29 +02:00
Antoine du Hamel
37d0a03390
meta: fix watch:* scripts (#5046) 2024-03-28 14:13:47 +01:00
Antoine du Hamel
cfdbe4c57b
meta: include more packages in compare_diff CI (#5044) 2024-03-28 14:03:48 +01:00
Antoine du Hamel
7f73a5cf1a
meta: fix resize-observer-polyfill types (#4994)
The upstream package is defining its own types which are incompatible
with TS built-in DOM types.
2024-03-14 18:13:32 +01:00
Merlijn Vos
a4bbd82977
@uppy/provider-views: migrate to TS (#4919)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-02-27 18:15:08 +01:00
Antoine du Hamel
3bdf312f90
uppy: fix bundle builder (#4950) 2024-02-22 16:31:15 +01:00
Antoine du Hamel
9fb5162bd2
meta: disable @typescript-eslint/no-non-null-assertion lint rule (#4945) 2024-02-21 13:24:55 +01:00
Antoine du Hamel
d127be6bc0
meta: bump Yarn version (#4906) 2024-02-01 23:15:57 +01:00
Merlijn Vos
5b316f8a85
meta: put experimental ternaries in .prettierrc.js (#4900) 2024-01-31 14:33:46 +01:00
Antoine du Hamel
588bfb515e
meta: prettier 3.0.3 -> 3.2.4 (#4889)
Notable change: https://prettier.io/blog/2023/11/13/curious-ternaries
2024-01-24 11:37:01 +01:00
Antoine du Hamel
975038cf4c
meta: upgrade Vite and Vitest (#4881) 2024-01-22 15:56:40 +01:00
Antoine du Hamel
06371a9d1a
meta: fix yarn build:clean (#4866) 2024-01-16 17:11:51 +01:00
Mikael Finstad
aa6eb0a318
meta: fix yarn build:clean (#4840) 2023-12-28 11:57:58 +01:00
Antoine du Hamel
fefcb1c311
meta: fix "e2e" script 2023-12-15 23:13:16 +01:00
Mikael Finstad
c66ad287ac
meta: fix clean script (#4820)
Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
2023-12-14 11:10:54 +01:00
Mikael Finstad
ec4bc58508
Provider user sessions (#4619)
New concept "simple auth" - authentication that happens immediately (in one http request) without redirecting to any third party.

uppyAuthToken initially used to simply contain an encrypted & json encoded OAuth2 access_token for a specific provider. Then we added refresh tokens as well inside uppyAuthToken #4448. Now we also allow storing other state or parameters needed for that specific provider, like username, password, host name, webdav URL etc... This is needed for providers like webdav, ftp etc, where the user needs to give some more input data while authenticating

Companion:
- `providerTokens` has been renamed to `providerUserSession` because it now includes not only tokens, but a user's session with a provider.

Companion `Provider` class:
- New `hasSimpleAuth` static boolean property - whether this provider uses simple auth
- uppyAuthToken expiry default 24hr again for providers that don't support refresh tokens
- make uppyAuthToken expiry configurable per provider - new `authStateExpiry` static property (defaults to 24hr)
- new static property `grantDynamicToUserSession`, allows providers to specify which state from Grant `dynamic` to include into the provider's `providerUserSession`.
2023-12-05 22:55:41 +01:00
Antoine du Hamel
f55b24c378
@uppy/companion-client: avoid unnecessary preflight requests (#4462)
According to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests, we have so many preflight requests because we add `Uppy-Versions` header and `Content-Type: application/json` to each request. It's particularly not useful for for requests with no body / an empty body because the remote Companion doesn't check `Content-Type`.

It was added in b25f243627, and since f0f1105ef0, it is only used for log 
purposes.

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2023-12-05 12:30:41 +01:00
Trivikram Kamat
736a1bc926
meta: migrate AWS SDK v2 to v3 in bin/uploadcdn (#4776) 2023-11-14 10:51:36 +01:00
Artur Paikin
440b8a9f9a
Revert "@uppy/react: add useUppyState (#4711)" (#4789)
This reverts commit 12e08ada02.
2023-11-12 02:03:55 +01:00
Merlijn Vos
12e08ada02
@uppy/react: add useUppyState (#4711) 2023-10-24 08:58:58 +02:00
Antoine du Hamel
773c8cb9a1
meta: add support for TypeScript plugins (#4640) 2023-10-17 15:38:15 +02:00
dependabot[bot]
a458e9bf57
Bump postcss from 8.4.16 to 8.4.31 (#4723)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.16 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.16...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-11 07:00:10 +01:00
Antoine du Hamel
f4ea454919
e2e: update Parcel (#4726) 2023-10-05 19:01:25 +02:00
Antoine du Hamel
4b1bc4bcc3
meta: check for formatting in CI (#4714) 2023-09-29 11:33:59 +02:00
Antoine du Hamel
2f691acd3f
meta: add Prettier (#4707)
JS files are ignored for now because we want to migrate them to TS
anyway.
MD files are also ignored to minimize the diff.

ESLint is run twice twice on TS files in case it conflicts with Prettier.
2023-09-28 16:47:52 +02:00
Mikael Finstad
4282f3dc89
meta: update linter config to cover more files (#4706)
* fix missing lint

fixes https://github.com/transloadit/uppy/pull/4704#issuecomment-1735929961

* Update package.json

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

---------

Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
2023-09-28 12:41:54 +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
Antoine du Hamel
eddc105fcc
@uppy/angular: upgrade to Angular 16.x (#4642) 2023-08-30 17:57:45 +02:00
Dominik Schmidt
22d9381dd2
@uppy/companion: Unify redis initialization (#4597)
* Unify redis initialization

* Incorporate PR feedback

* Remove comment that made sense when redisOptions was set to null

---------

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2023-07-31 16:36:34 +02:00
Antoine du Hamel
a83373b83d
@uppy/aws-s3-multipart: add support for signing on the client (#4519) 2023-07-13 12:16:13 +02:00
dependabot[bot]
5cf756d6ef
meta: upgrade dev dependencies
Yarn: 3.2.1 -> 3.6.1
Stylelint: 14.11.0 -> 15.10.0

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-07-10 16:36:06 +02:00
Antoine du Hamel
eba604e8fb
meta: use corepack yarn instead of npm to launch E2E (#4545) 2023-07-05 16:02:59 +02:00
Antoine du Hamel
71e3f062b7
meta: disallow use of .only in tests (#4494)
It is useful for local testing, but should never be committed. This lint
rule should help catch that during code reviews.
2023-06-15 19:09:57 +01:00
Antoine du Hamel
3d59e78e11
meta: make pre-commit use corepack yarn instead of npm run (#4495) 2023-06-10 11:47:23 +02:00
dependabot[bot]
947421b91c
meta: bump babel, esbuild, and vite (#4485)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-06-09 12:06:59 +02:00
Mikael Finstad
90f7fb9197
@uppy/core: improve performance of validating & uploading files (#4402)
* show how many files are added when loading

remake of https://github.com/transloadit/uppy/pull/4388

* add french (cherry pick)

* implement concurrent file listing

* refactor / fix lint

* refactor/reduce duplication

* pull out totals validation

don't do it for every file added, as it's very slow
instead do the check at the end when all files are added.
this allows us to easily work with 10k+ files
fixes #4389

* Update packages/@uppy/core/src/Uppy.js

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

* make restricter.validate validate everything

instead make more specific methods for sub-validation
also rename validateTotals to validateAggregateRestrictions

* improve errors and user feedback

- handle errors centrally so that we can limit the amount of toasts (informers) sent to the users (prevent flooding hundreds/thousands of them)
- introduce FileRestrictionError which is a restriction error for a specific file
- introduce isUserFacing field for RestrictionError

* fix performance issue reintroduced

* improvements

- show "%{count} additional restrictions were not fulfilled" for any restriction errors more than 4
- refactor/rename methods
- improve ghost logic/comments

* improve performance when uploading

- introduce new event "upload-start"  that can contain multiple files
- make a new patchFilesState method to allow updating more files
- unify "upload-start" logic in all plugins (send it before files start uploading)
- defer slicing buffer until we need the data
- refactor to reuse code

* fix e2e build issue

* try to upgrade cypress

maybe it fixes the error

* Revert "fix e2e build issue"

This reverts commit ff3e580c0f.

* upgrade parcel

* move mutation logic to end

* remove FileRestrictionError

merge it with RestrictionError

* fix silly bug

looks like the e2e tests are doing its job 👏

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-04-15 23:50:19 +08:00
Antoine du Hamel
0a7eceac21
meta: fix all ESLint warnings and turn them into errors (#4398) 2023-04-04 15:54:13 +02:00
Merlijn Vos
6430a00aa9
Remove the website (#4369) 2023-03-24 00:33:46 +08:00
Mikael Finstad
e966fa7540
meta: use load balancer for companion in e2e tests (#4228) 2023-02-02 11:25:50 +01:00
Antoine du Hamel
141eb248be
meta: upgrade to Vite 4 and ESBuild 0.16 (#4243) 2022-12-13 15:07:19 +01:00
Antoine du Hamel
a0eeb22458
meta: upgrade to Jest 29 (#4049) 2022-08-30 17:25:19 +02:00
Antoine du Hamel
f7d0d5b3cd
meta: upgrade to TypeScript 4.8 (#4048) 2022-08-30 11:46:45 +02:00
Antoine du Hamel
ea1c0760ff
@uppy/thumbnail-generator: fix exifr import (#4054)
Fixes: https://github.com/transloadit/uppy/issues/4052
2022-08-29 16:54:26 +02:00
Antoine du Hamel
51da2b5a79
e2e: add tests for AWS (#3665)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2022-08-23 18:43:46 +02:00
Artur Paikin
4108aa6aa3
build: Remove size-limit for now (#4003)
* Remove size-limit for now

* lock

* lock

* lock lock lock
2022-08-18 17:41:54 +01:00
Antoine du Hamel
5044230bf1
meta: upgrade all dev dependencies (#3903) 2022-08-16 22:39:28 +02:00
Merlijn Vos
9733e5a064
aws-s3-multipart: make headers part indexed too in prepareUploadParts (#3895)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-07-26 13:10:31 +02:00
Antoine du Hamel
aee4d3f371
@uppy/companion: upgrade redis to version 4.x (#3589)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-07-25 15:14:13 +02:00
Antoine du Hamel
7b0db7d3a0
meta: use node: protocol when using Node.js built-in core modules (#3871)
`node:` protocol is available as of Node.js 14.18.0 LTS. Since we are
dropping support for all Node.js versions below that, we can take
advantage of this prefix to help differentiate built-in modules from npm
modules.
2022-07-18 14:09:03 +02:00