Commit graph

385 commits

Author SHA1 Message Date
Antoine du Hamel
9fe02400ae meta: use workspace:^ instead of workspace:* (#3278) 2021-10-27 17:53:11 +02:00
Antoine du Hamel
01d7ea13e9
meta: use Yarn v3 instead of npm (#3237)
* meta: use Yarn v3 instead of npm

* Update CONTRIBUTING.md to fix linter errors

* remove remaining npm commands

* Update deps
2021-10-20 15:16:59 +02:00
Artur Paikin
b8b4127bd5 Release 2021-10-14 21:58:29 +01:00
Antoine du Hamel
55e0ffd04a
Add retext to markdown linter (#3024)
* remark-lint-uppy: use `retext` to improve doc syntax and grammar

* WIP: start fixing fixing linter errors

* Remove `retext-passive` as I don't see what's wrong with passive voice

* Remove URL plugin, add emphasis/strong marker plugin

* Fix remark settings to avoid conflicts

* WIP: more auto-fixes

* remark-simplify: allow `option`

* zoom.md

* url.md

* vue.md

* tus.md

* webcam.md

* xhrupload.md

* writing-plugins

* thumbnail-generator

* svelte

* react-dragdrop

* stores

* do not over simplify

* statusbar

* robodog

* robodog-upload

* robodog-picker

* robodog-form

* robodog-dashboard

* redux

* privacy

* uppy.md

* transloadit.md

* react-native

* react-initializing

* react-fileinput

* providers

* progressbar

* plugins

* plugin-common-options

* onedrive

* locales

* instagram

* informer

* index

* google-drive

* golden-retriever

* form

* fileinput

* facebook

* dropbox

* drop-target

* dragdrop

* remark-lint-no-unneeded-full-reference-link

* Try to setup unified-message-control

* Upgrade deps

* Fix collapsed link references with inline code

* Revert "remark-lint-no-unneeded-full-reference-link"

This reverts commit ca375f463b771bc81d0868f4d84f5979823cfc0a.

* remark-lint-uppy: add missing `"main"` field

* Update package-lock.json

* add disable comments

* fixup! xhrupload.md

* writing-plugins

* unsplash

* tus

* stores

* migration-guide

* dashboard

* community-projects

* box

* integration_help

* blog posts

* companion

* aws-s3

* aws-s3-multipart

* remark-lint-uppy README

* website/inject

* BUNDLE-README

* READMEs

* architecture

* move Remark settings to the plugin

* add `listItemIndent` setting

* list indent fix

* fix ignored files

* revert changelog changes

* fixup! architecture

* Revert changes in ignored files

* Remove unnecessary HTML tags from READMEs
2021-10-14 16:10:45 +02:00
Antoine du Hamel
1eb317ba3a Release 2021-10-06 15:55:29 +02:00
Mikael Finstad
56a67de550
Close window on auth callback error and show error to user (#3143)
* Close window on auth callback error

Because simply receiving a "Bad request" is very bad UX
For example if the user cancels the auth flow, or doesn't give companion access
it's better to go back

* Update packages/@uppy/companion/src/server/controllers/callback.js

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

* Update packages/@uppy/companion/src/server/controllers/callback.js

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

* Update packages/@uppy/companion/src/server/controllers/callback.js

* Update callback.js

* pull out reusable code to getDynamicStateFromRequest

* Signal auth error to client

* fix test mocking

* npm run build:locale-pack

* Update packages/@uppy/companion/src/server/controllers/callback.js

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

* fix lint

* add i18n string that got lost during merge

* add french translation

* add dutch translation

* add norwegian translation

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-30 18:07:27 +07:00
Luca Trazzi
4ff584ca24
Fix typo in @uppy/core types (#3230)
Co-authored-by: lucatrazzi <luca.trazzi@garaio.com>
2021-09-29 13:51:46 +02:00
Antoine du Hamel
d69031524c
@uppy/core: move Uppy class to its own module (#3225)
* @uppy/core: move `Uppy` class to its own module

Fixes: https://github.com/transloadit/uppy/issues/3220

* Rename snapshot file

* Update docs

* Update website/src/_posts/2021-08-2.0.md

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

* Update migration guide

* Do not bundle preact with non-UI plugin packages

Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2021-09-28 19:04:33 +02:00
Murderlon
b3b68c0777
Release 2021-09-20 11:51:06 +02:00
Antoine du Hamel
b364708715
@uppy/transloadit: fix unhandledPromiseRejection failures (#3197)
* @uppy/transloadit: fix unhandledPromiseRejection failures

Fixes: https://github.com/transloadit/uppy/issues/3189

* Add transloadit2 to end2end test matrix
2021-09-16 15:24:20 +02:00
Merlijn Vos
6e0ceeaba7
Update Google Drive for brand compliance (#3178) 2021-09-08 19:27:20 +02:00
Murderlon
246eafc51a
Release 2021-09-01 11:30:19 +02:00
JT
a771b86efb
Improve accuracy/compatibility of success/error callback types (#3141) 2021-08-30 13:04:10 +02:00
Murderlon
8e4fae911a
Release 2021-08-26 16:21:37 +02:00
JT
33e2a64b3e
Add metadata overload for off call in @uppy/core (#3137) 2021-08-26 13:34:16 +02:00
Murderlon
ab771cbe1c
Release 2021-08-24 16:13:19 +02:00
Artur Paikin
dbe3ed25b3
build: add stylelint (#3124)
* add stylelint with stylelint-config-standard

* autofix style issues

* fix more linting issues

* add stylelint-scss

* fix two more

* add stylelint-config-rational-order and autofix order

https://github.com/constverum/stylelint-config-rational-order
2021-08-24 01:37:57 +01:00
Artur Paikin
17b361a286
Core: rename allowMultipleUploads to allowMultipleUploadBatches (#3115)
* allowNewUpload  --> allowMultipleUploadBatches

* noNewAlreadyUploading --> noMoreFilesAllowed

* Disallow drag-drop when allowNewUpload: false in Core

* Fix tests

* add deprecation notice to types

* Update Dashboard.js
2021-08-23 13:19:40 +01:00
Antoine du Hamel
ec87b232e9
meta: enforce no-unused-vars linter rule (#3118)
* meta: enforce `no-unused-vars` linter rule

* meta: fix `@typescript-eslint/no-unused-vars` linter warnings

* meta: enforce `no-unused-expressions` lint rule

* @uppy/companion: fix `tsc` build
2021-08-23 13:10:17 +01:00
Antoine du Hamel
0b801ccbad
@uppy/core: reject empty string as valid value for required meta fields (#3119) 2021-08-20 13:47:31 +01:00
Antoine du Hamel
6b7ad5e7c7
Stricter linter (#3095)
* enforce some eslint rules

* enforce accessibility linter rules

* harden lint rules with only 1 or 2 warnings

* fix remaining rules with less than 3 warnings

* fix e2e tests

* fix remaining rules with less than 4 warnings

* fix remaining rules with less than 6 warnings

* fix `shuffleTaglines`

* fix companion build
2021-08-17 20:32:57 +02:00
JT
89f09c810a
Strictly type uppy events (#3085) 2021-08-17 16:29:41 +02:00
Merlijn Vos
a3aac6ba4c
Create onUnmount in UIPlugin for plugins that require clean up (#3093)
- Create and call `onUnmount` in `UIPlugin` for plugins that require clean up
- Update webcam `stop` to clean up when already recording
- Update "Writing plugins" docs
- Move `onMount` and `onUnmount` from `BasePlugin` into `UIPlugin`
- Update types
2021-08-17 14:52:06 +02:00
Artur Paikin
6e8b1d50d7 update nanoid to 3.1.25 to fix missing commonjs issue 2021-08-12 14:28:23 +01:00
bencergazda
10f595e3a8
@uppy/core: add types for logger (#3090) 2021-08-09 17:52:10 +02:00
Artur Paikin
472766e48b
UIPlugin fix: prevent Preact replacing contents of body element by using createDocumentFragment (#3072)
* Pass createDocumentFragment instead of the targetElement to Preact, so it doesn’t destroy the contents of targetElement

* remove replaceTargetContent

* also remove replaceTargetContent from docs and website
2021-08-06 10:02:11 +01:00
Antoine du Hamel
7f37c60eaa
@uppy/core: use privater properties in UIPlugin (#3073) 2021-08-05 15:42:55 +01:00
Artur Paikin
113b627dd0 Release 2021-08-02 22:38:11 +01:00
Artur Paikin
90104e7695
don’t show informer for individual required meta fields errors (#3060) 2021-08-02 12:40:27 +01:00
Antoine du Hamel
9b0d25068d
build: fix building on Node.js v14.x LTS (#3061) 2021-08-02 12:36:25 +01:00
Artur Paikin
3b42d0ce8d #showOrLogErrorAndThrow 2021-07-30 15:35:20 +01:00
Antoine du Hamel
4ab06907c3 @uppy/core: fix i18n binding 2021-07-30 15:48:58 +02:00
Artur Paikin
bb1c615dc4 Merge conflict, Editor.js 2021-07-30 14:31:21 +01:00
Artur Paikin
172cc77f63 Merge master 2021-07-30 14:27:21 +01:00
Antoine du Hamel
4ac8c9d39c @uppy/core: move more internals to private properties (#3041) 2021-07-30 14:16:01 +02:00
Artur Paikin
4ca78ab543
Set plugin titles from locale (#3023)
* What is happening "*"

* Instead of re-creating i18nInit, we could just make it part of the BasePlugin

* set plugin title and allow changing it from locale

* remove i18nInit method, since we now include it in BasePlugin

* All provider titles should come from locale

* Update en_US.js

* make translator private

//cc @aduh95

* init locale after calling setOptions

* Update en_US.js

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

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

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

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

* Bind `i18n` functions

* Remove duplicate i18nInit — it’s in BasePlugin already

* fix formatting

* fix name

* Update en_US.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-30 13:02:32 +01:00
Antoine du Hamel
defc7b40f8
deps: replace cuid with nanoid (#3053)
Refs: https://github.com/transloadit/uppy/pull/3040#issuecomment-886468554
2021-07-29 17:29:52 +02:00
Artur Paikin
28997bc5c7 Release 2021-07-29 16:14:55 +01:00
Artur Paikin
16730c8f4b remove window reference — failing in Node.js 2021-07-29 16:04:08 +01:00
Renée Kooi
dd55949b79
Remove backwards compatibility hacks in locales (#2969)
* Remove poweredBy2 hack

* Remove exceedsSize2 hack

* tick off poweredBy/exceedsSize task

* do not lint generated files

* fix tests
2021-07-29 15:09:25 +02:00
Artur Paikin
d8190fa6d3 Update locale: remove unused strings 2021-07-29 13:31:14 +01:00
Antoine du Hamel
56b84dfec7
Dashboard: add required option to metaFields (#2896)
* Dashboard: add `required` option to `metaFields`

Fixes: https://github.com/transloadit/uppy/issues/2892

* use `<form>` element to allow users to use all built-in form features
from the web browser.

* remove `saveOnEnter` hack

The fields are now inside a form, saving on Enter is the default
behavior – and it doesn't short-circuit form validation checks.

* restrictions.requiredMetaFields

* fix documentation of restrictions.requiredMetaFields

* check for required meta fields on upload

* Use detached `<form>` element to avoid nesting `<form>` elements

* fixup! Use detached `<form>` element to avoid nesting `<form>` elements

* Use `cuid` to generate `<form>` `id`
2021-07-29 13:15:36 +01:00
Antoine du Hamel
8ac63d43e0
@uppy/core: mark state as deprecated (#3044) 2021-07-29 10:50:00 +01:00
Enrique Mejia
d9431fc035
core: set file size from progress data when null (#2778)
* core: set file size from progress data when null

* core: improve size condition

Co-authored-by: Renée Kooi <renee@kooi.me>

* Move remote file size calculation to uppload success

* Fix file size in test now that we set the size in upload success

* Send bytesUploaded in upload success

* Prioritize bytesUploaded coming from companion

* Format

* Update index.js

Co-authored-by: Renée Kooi <renee@kooi.me>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-07-28 23:40:01 +01:00
Antoine du Hamel
836a731d73
@uppy/core: avoid binding methods to instance in constructor (#3043)
Core classes methods are not suited to be used as eventHandlers, I don't
think it makes sense to have them bound.
2021-07-28 23:38:58 +01:00
Antoine du Hamel
2d6b8053e4 @uppy/core: fix conflicts 2021-07-28 17:31:28 +02:00
Merlijn Vos
112cdb1f49
Support multiple messages in informer (#3017)
* Support multiple messages in informer

* Fix informer duplicate file messages for folders

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-07-28 14:59:51 +01:00
Antoine du Hamel
e0b1c04809
@uppy/core: move event emitter to private properties (#3042) 2021-07-28 14:54:50 +01:00
Antoine du Hamel
4017033a32
@uppy/core: do not expose plugins property (#3045)
* @uppy/core: do not expose `plugins` property

* fixup! @uppy/core: do not expose `plugins` property
2021-07-28 14:37:09 +01:00
Antoine du Hamel
3bbddf8ed7
@uppy/core: detach event listeners on close (#3035)
Fixes: https://github.com/transloadit/uppy/issues/3026
2021-07-28 14:36:45 +01:00