Commit graph

8383 commits

Author SHA1 Message Date
Artur Paikin
becefa7abc Update index.ejs 2021-08-24 16:32:13 +01:00
Artur Paikin
51037514e5 we have to use new keyword before Uppy.Core() now 2021-08-24 16:23:10 +01:00
Murderlon
5e52834844
Release 2021-08-24 16:43:54 +02:00
Murderlon
35697d18d4
Set node version in workflows/cdn.yml to 16.x 2021-08-24 16:40:00 +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
2a93874e3e
writing-plugins: update example to use i18nInit (#3122) 2021-08-23 13:03:53 +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
Mikael Finstad
3059d733f6
Safely escape <script> injected code in companion send-token.js (#3101)
Fixes #2974
2021-08-19 18:27:24 +02:00
Antoine du Hamel
1f0e7a59c0
@uppy/dashboard: fix metafield form validation (#3113)
* @uppy/dashboard: fix metafield form validation

Browsers without support for the HTML `form` attribute would misbehave,
making it impossible to validate the form at all, and potentially validate an
unrelated upper form if users are embeding Uppy inside a a `<form>`.

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

* Add comments

* Fix docs and types
2021-08-19 15:19:48 +01:00
Murderlon
c2091474f4
Merge branch 'main' of https://github.com/transloadit/uppy
* 'main' of https://github.com/transloadit/uppy:
  Add referrer to transloadit.com link (#3116)
  @uppy/locales latest version is 1.22.0 🙈
  Stricter linter (#3095)
  @uppy/aws-s3: refactor to use private fields (#3094)
  build: fix legacy bundle (#3112)
  Fix locales — point to CDN v1.31.0
2021-08-19 11:49:44 +02:00
Murderlon
5fbdf33eda
Clean up BACKLOG.md & add Vimeo as todo 2021-08-19 11:49:30 +02:00
Julian Gruber
4e05914744
Add referrer to transloadit.com link (#3116) 2021-08-18 10:14:50 +02:00
Artur Paikin
b050646afe @uppy/locales latest version is 1.22.0 🙈 2021-08-17 20:40:04 +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
Antoine du Hamel
405157ea49
@uppy/aws-s3: refactor to use private fields (#3094) 2021-08-17 20:14:49 +02:00
Antoine du Hamel
5b45684ed2
build: fix legacy bundle (#3112)
The legacy bundle was missing `regenerator-runtime` dependency and
was not defining `Uppy` global.
2021-08-17 20:14:05 +02:00
Artur Paikin
198f23649f Fix locales — point to CDN v1.31.0 2021-08-17 18:25:29 +01:00
Murderlon
980074c0a1
Merge branch 'main' of https://github.com/transloadit/uppy
* 'main' of https://github.com/transloadit/uppy:
  Changelog for 1.31.0 and patches
  Strictly type uppy events (#3085)
  Create `onUnmount` in `UIPlugin` for plugins that require clean up (#3093)
  Companion improve logging (#3103)
  Fix `editFile` locale usage (#3108)
2021-08-17 17:27:37 +02:00
Murderlon
3632a55c6c
Fix typo in docs/companion.md
Ref: #2970
2021-08-17 17:27:01 +02:00
Artur Paikin
8a4fdcc529 Changelog for 1.31.0 and patches 2021-08-17 16:25:20 +01: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
Mikael Finstad
4e37517327
Companion improve logging (#3103)
* reorder code to fix lint warning

* Improve logging

When logging an object it would print [object Object] if `color` was set.
e.g.: google drive callback: "callback.oauth.resp [object Object]"
Now we will instead use util.inspect before calling color
Also fix some linting warnings

* Only util.inspect if not already string

this fixes tests
also simplify masking logic (only need to mask once)

* add test for object log masking

also simplify tests (reuse logic)
2021-08-17 12:33:04 +01:00
Merlijn Vos
667a2366fa
Fix editFile locale usage (#3108) 2021-08-17 12:32:21 +01:00
Artur Paikin
6e8b1d50d7 update nanoid to 3.1.25 to fix missing commonjs issue 2021-08-12 14:28:23 +01:00
Martin Brennan
d613b849a6
@uppy/aws-s3-multipart: add support for presigned URL batching (#3056)
* Add first basic test for aws-s3-multipart

* Add another test for GH actions run

* Add whatwg-fetch to aws-s3-multipart package.json

This is to satisfy linter errors, and the other s3 plugin
does this as well

* Adding more tests

* More test progress

* Tests working with nock

* Add another test, for part uploaded event

* Remove spec and refactor to beforeEach

* S3 multipart batch presign working...in theory

* Working batching and tests

* Min needed for presign batch functionality

* Fix lint issues

* Fix syntax error in companion

* Add companion batch presign endpoint

* Improve tests

* Fix each -> forEach

* Remove .prettierrc

* Adding docs and allow for headers with batch prepare

* Review fixes

* Rename prepareUploadPart to prepareUploadParts and use breaking changes
  to batch presign URLs there.
* Get rid of unnecessary batchPartPresign and minNeededForPresignBatch
  options. Use Math.ceil(limit / 2) for min needed instead.
* Fix up tests.
* Fix up type tests.
* Update documentation.

* Review fixes

* Change _ private methods to use # syntax
* Minor code and docs improvements

* Change Promise.resolve() microtasks to async/await
2021-08-11 15:04:05 +02:00
Merlijn Vos
8fb6078256
Improve a11y of remove button in dashboard (#3088)
* Improve a11y of remove button in dashboard

* Update `en_US.js`

* Update fr_FR.js

* Update `nl_NL.js`

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-08-10 19:04:42 +01:00
Antoine du Hamel
c94664613a
@uppy/utils: resolve remaining linter errors (#3091) 2021-08-10 16:06:49 +02:00
Iman Ghasrfakhri
b5a159a5c4
Add new added phrases and some improvment to fa_IR translation file. (#3050)
* Improve Translations

* Add translation for "noDuplicates"

* Translate New added Phrases
2021-08-09 18:42:24 +01:00
Antoine du Hamel
8f7e63b882
Revert "dashboard: mostly restore backwards compatibility for the browse strings (#2397)" (#3082)
This reverts commit 72965029f2.

Refs: https://github.com/transloadit/uppy/pull/2397
2021-08-09 19:33:24 +02:00
Antoine du Hamel
d94c7d1232
build: harden locale pack check for unused or duplicate key (#3081) 2021-08-09 19:32:44 +02:00
bencergazda
10f595e3a8
@uppy/core: add types for logger (#3090) 2021-08-09 17:52:10 +02:00
Antoine du Hamel
0cccb686fd @uppy/utils: improve support of data URI in dataURItoBlob (#3080) 2021-08-09 16:13:04 +02:00
Antoine du Hamel
6cd5309544 @uppy/utils: simplify canvasToBlob (#3080)
The built-in `HTMLCanvasElement#toBlob` is supported everywhere.
2021-08-09 16:12:59 +02:00
Antoine du Hamel
c8606ae5fe @uppy/utils: use private fields in EventTracker (#3080) 2021-08-09 16:12:54 +02:00
Antoine du Hamel
9866fc1f5c @uppy/utils: remove ponyfill for Array#findIndex (#3080)
The built-in method is supported everywhere.
2021-08-09 16:12:51 +02:00
Antoine du Hamel
2c1287fc52 @uppy/utils: simplify getTimeStamp (#3080) 2021-08-09 16:12:47 +02:00
Antoine du Hamel
126984ece3 @uppy/utils: avoid creating throw-away <div> in isDragDropSupported (#3080) 2021-08-09 16:12:47 +02:00
Antoine du Hamel
2178f531a4 @uppy/utils: simplify code using optional chaining (#3080) 2021-08-09 16:12:37 +02:00
Antoine du Hamel
dc5cab4922 @uppy/utils: use private fields in ProgressTimeout (#3080) 2021-08-09 16:12:33 +02:00
Antoine du Hamel
059870a80b @uppy/utils: refactor prettyETA (#3080) 2021-08-09 16:12:23 +02:00
Antoine du Hamel
3626172b0c @uppy/utils: use private fields in RateLimitedQueue (#3080) 2021-08-09 16:12:18 +02:00
Antoine du Hamel
2cdb19a8c5 @uppy/utils: use Array.from insterad of custom utils (#3080) 2021-08-09 16:12:13 +02:00
Antoine du Hamel
65ffbed1a2 @uppy/utils: refactor truncateString (#3080) 2021-08-09 16:12:08 +02:00
Antoine du Hamel
037b6fe8b5 @uppy/xhr-upload: fix import path (#3080) 2021-08-09 16:12:00 +02:00
Antoine du Hamel
0f9709bb10
@uppy/aws-s3: refactor to private fields (#3076) 2021-08-09 15:54:03 +02:00
Mikael Finstad
efde0eb76b
Disable box (#3087) 2021-08-09 14:34:04 +01:00