Commit graph

138 commits

Author SHA1 Message Date
Murderlon
fe96096c3d
Merge branch 'master' into 2.0
* master: (23 commits)
  A bit of polish (#2986)
  Companion: Fix typescript error
  Companion: Fix invalid referrer crashing the process
  Publish 1.30 blog post
  Release
  Build: Companion needs to be built before locale-pack
  Release
  Fix build: locale-pack first, integrations second
  changelog for 1.30
  Release
  Update package.json
  Only log info if debug is true (#2855)
  build(deps): bump prismjs from 1.23.0 to 1.24.0 (#2971)
  Angular Integration (#2871)
  ci: don't run markdown tests in type tests
  Add types for `uppy.once` method (#2965)
  build: lint fixes in build scripts
  Fix typo in docs/progressbar.md (#2962)
  Document `uppy.once` in `docs/uppy.md` (#2960)
  Add `props` example to docs/vue.md (#2959)
  ...
2021-07-07 15:32:38 +02:00
Artur Paikin
4b782ffbbb Release 2021-06-30 23:07:21 +01:00
Antoine du Hamel
7b8316ed81
xhr: use symbol for internal options (#2934)
* xhr: use symbol for internal options

* fixup! xhr: use symbol for internal options
2021-06-30 12:06:10 +01:00
Merlijn Vos
f0f1105ef0
Resolve or remove miscellaneous todos (#2967) 2021-06-29 12:54:19 +02:00
Antoine du Hamel
c315329399
Remove IE polyfills and special casing (#2947)
* Remove IE polyfills and special casing

* dashboard: remove `resize-observer-polyfill`

* deps: remove url-parse to use global `URL` instead

* Update documentation for browser support

* Add a migration guide

* Update e2e test platforms

* Remove polyfills from examples and add those missing in CDN bundle

* Use Node.js v16.x on CI because of `AbortController`

* Update bundle builder to produce two builds: `uppy.js` without polyfills, `uppy.legacy.js` with polyfills.

* Upgrade create-react-app deps

* remove null coalescing operator as it's not supported by the build chain

* disable Safari testing (for now)


Co-authored-by: Renée Kooi <renee@kooi.me>
2021-06-28 11:34:51 +02:00
Antoine du Hamel
4575d67f07
Translator: refactor interpolate (#2903)
* Translator: refactor interpolate

Fixes types and small code edits:
`<regex>[Symbol.split](<string>)` is equivalent to
`String.prototype.split.call(<string>, <regex>)` and potentially more
readable (the downside it's not compatible with IE, which may be why we
currently use the latter).

Refs: https://github.com/transloadit/uppy/pull/2899

* Update packages/@uppy/utils/src/Translator.js

* Revert RegExp Symbol for IE compat
2021-06-13 11:23:55 +01:00
Artur Paikin
23e4a537a6 Release 2021-05-28 11:54:17 +01:00
Artur Paikin
12b7bd34e8 Release 2021-05-27 21:35:08 +01:00
Artur Paikin
7bdaba3021
types: Add logout, Translator.translate and Translator.translateArray (#2899)
* Add logout, Translator.translate and Translator.translateArray

* Update index.d.ts

* Update index.d.ts

* Update index.js
2021-05-26 16:26:16 +01:00
Artur Paikin
1751241362 Release 2021-03-31 23:59:08 +01:00
Renée Kooi
c1d15abf10
error on import lint failure + some misc lint fixes (#2813)
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-03-20 11:02:49 +01:00
Kevin van Zonneveld
764c2ccada
Update Linter (#2796)
* relocate .vscode

* Switch to transloadit linter

* Update .eslintrc.json

* autofix code

* unlink and install eslint-config-transloadit@1.1.1

* Change 0 to "off"

* Don't change 'use strict'

* Do not vertically align

* disable key-spacing

* add import/no-extraneous-dependencies per package

* add more react/a11y warnings

* Revert "autofix code"

This reverts commit 14c8a8cde8.

* add import/no-extraneous-dependencies per example and main package

* autofix code (2)

* Allow devDependencies in ./bin

* Change import/no-extraneous-dependencies to warn again

* upgrade linter

* Set import/no-extraneous-dependencies to warn
2021-03-15 16:25:17 +00:00
Renée Kooi
4bf1072363
Release 2021-03-10 13:11:28 +01:00
Renée Kooi
29956dd9d3
utils: loosen flaky test 2021-03-10 12:19:12 +01:00
Artur Paikin
502a755458
Use Array.findIndex instead of Array.indexOf in uppy.removePlugin (#2793)
* move findIndex to @uppy/utils, add tests

* use Array.findIndex instead of Array.indexOf in uppy.removePlugin

because strict comparison started failing with Vue3 Proxies
2021-03-08 18:16:01 +00:00
Artur Paikin
2eabc33099 Release 2021-02-10 18:55:14 +00:00
Dominic Eden
183c25b128
[FIX] Safari 14.0 on Mac records audio (using the Webcam Uppy component) with MIME-type ‘audio/mp4’. Update the file extensions checker to reflect this as otherwise audio cannot be recorded with Safari. (#2753) 2021-02-10 18:26:28 +00:00
Artur Paikin
7c55bd855e Release 2021-01-28 16:08:14 +00:00
Renée Kooi
52760d2bb7
dashboard: improve support for right-to-left scripts (#2705)
* dashboard: fix modal position on rtl pages, fixes #2495

* Align text to the right on right-to-left pages

* core: fix default text alignment on right-to-left pages

* dashboard: fix margin in provider browser on right-to-left pages

* dashboard: use direction-aware offset properties

* provider-views: use logical offset CSS properties

* status-bar: use logical offset CSS properties

* dashboard: fix addMore icon margin on RTL pages

* dashboard: some more logical properties

* build: compile logical properties to old CSS

* dashboard: set dir attribute if page did not provide one

* status-bar: set fallback text direction if not provided

* support direction option for inline and modal dashboard

* use companion.uppy.io on deploy previews

* provider-views: fix RTL alignment of file icons

* put the dir attribute on a wrapper div

* fix icon alignment in RTL provider views

* informer: fix ? alignment in RTL mode
2021-01-27 17:13:38 +00:00
Artur Paikin
e1efe07927 Release 2021-01-27 16:22:43 +00:00
Renée Kooi
c81780230d
Add all the CI badges (#2725)
* Add all the CI badges

* flip the CI / npm version order

* add github actions tests badges to all package readmes

* remove |

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-01-13 00:30:59 +00:00
Artur Paikin
1493a807fe Release 2020-12-23 18:04:51 +00:00
Ahmed Kandil
916d4d7eaa
utils: Add archive mime types (#2703)
Resolves #2702
2020-12-18 21:09:18 +00:00
ifedapoolarewaju
3ff9ab042f
Release 2020-11-13 11:52:51 +01:00
Artur Paikin
3967e05fbc
Add uppy.passesRestrictions(file) and disallow selecting files that don’t pass restrictions in providers (#2602)
* add passesRestrictions(file) and utilize it in provider-views

* disallow selecting more than maxNumberOfFiles

* add restriction reason and include folders

* let’s leave folder out of this for now — otherwise not only you can’t select them, but navigate too

* disallow selecting if totalCurrentSelectionFileSize is over maxTotalFileSize

* handle maxNumberOfFiles not being set 🙈

* fix totalCurrentSelectionFileSize and handle no file.name

* support grid in restrictions

* refactor the restriction reason logic, rename to validateRestrictions, wrap icon in a container

* add uppyFileSizes 🙈

* get rid of canSelectMore in favor of validateRestrictions (file, files)

* handle shift key bulk selection

* remove unused props

* use infoTimeout
2020-11-11 21:41:16 +00:00
Artur Paikin
84f7b4d37d Release 2020-10-30 03:27:41 +00:00
Ifedapo .A. Olarewaju
d586a4cf53
companion,unsplash: Unsplash provider (#2431)
* unsplash[wip]: implement unsplash provider + plugin

* unsplash,provider-views,companion-client: fully working unsplash plugin

* unsplash: clean up plugin implementation

* provider-views: refactor CloseWrapper

* companion-client: encode search text before adding it to URL

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

* companion: use object spread over Object.assign

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

* zoom: fix provider-view import

* circle icon

* update locale strings and package-lock

* move truncateString to @uppy/utils and use it for Unsplash name-description conversion, adding .jpg

* use alt_description if description in null

* companion: handle name truncation internally

* companion: handling carriage for truncation + fix urlmeta import

Co-authored-by: Renée Kooi <renee@kooi.me>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2020-10-28 19:50:51 +01:00
ifedapoolarewaju
7bf5ca55a7
Release 2020-09-07 12:40:44 +01:00
Andrew
0533357d61
Remove the --save flag (#2503) 2020-09-04 14:32:21 +02:00
ifedapoolarewaju
36ab6f1d49
Release 2020-07-30 15:52:20 +01:00
Andrew
5bc704baf5
dash: Add support for AVIF images in thumbnails (#2406)
I added support to load thumbnails when uploading AVIF images, by adding 'avif' to the regex. I also updated the unit test.

Note that support for this is dependant on browser support, and currently only Chrome 85+ and Firefox 77+ support it (Firefox requires flag to be set to allow it)
2020-07-29 18:46:46 +02:00
Renée Kooi
2d91641ddd
Release 2020-07-29 16:50:45 +02:00
Renée Kooi
72965029f2
dashboard: mostly restore backwards compatibility for the browse strings (#2397) 2020-07-29 15:15:51 +02:00
Renée Kooi
16686fc0ca
Release 2020-07-15 13:59:56 +02:00
Renée Kooi
5012eb4124
aws-s3-multipart: implement retries (#2312) 2020-07-13 15:10:23 +02:00
Artur Paikin
b00ba13912 Release 2020-06-13 03:12:22 +01:00
Artur Paikin
ef5977643a Refactor to use fetchWithNetworkError 2020-06-12 15:27:00 +01:00
Renée Kooi
6a01523273
Release 2020-05-25 15:51:21 +02:00
Renée Kooi
58cf8e8deb
utils: fix Translator constructor type, fixes #2263 2020-05-13 13:02:04 +02:00
Kevin van Zonneveld
803611ed04
Move @uppy/utils/lib/prettyBytes -> @transloadit/prettier-bytes (#2231)
* Move @uppy/utils/lib/prettyBytes -> @transloadit/prettier-bytes so we can more easily re-use it across projects

* Switch to MIT licensed @transloadit/prettier-bytes

* lockfile fun

* build: add dep for website/inject.js

Co-authored-by: Renée Kooi <renee@kooi.me>
2020-05-07 16:54:13 +02:00
ifedapoolarewaju
5528c6f6ea
Release 2020-04-30 12:52:46 +01:00
Renée Kooi
6e2dfd7c0f
Release 2020-04-29 17:45:02 +02:00
Artur Paikin
ed8a494875
Mark network errors as NetworkError (#2110)
* Add NetworkError error type and isNetworkError utility check

* Detect network errors in tus and xhr-upload

Co-Authored-By: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>

* add NetworkError check to RequestClient in companion-client

* return false if !xhr 🙈

* move catch so that only errors from _checkMinNumberOfFiles are caught — errors from uploads are logged in `upload-error` already

//cc @goto-bus-stop

* Add NetworkError to MiniXHRUpload in aws-s3

//cc @goto-bus-stop

* Add tests

//cc @ifedapoolarewaju

* pass xhr to NetworkError

* add logging in catch of uppy.upload()

* start error message with “This looks like a network error”

* originalRequest --> request, return NetworkError right away

* check for NetworkError in `delete` as well

do we need it in preflight too, @ifedapoolarewaju?

* remove redundant error message re-declaration

* _showOrLogErrorAndThrow, but don’t showInformer

Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>
2020-04-21 10:36:49 +02:00
Ryan Schumacher
87c4deb45c
Remove duplicate check of element type (#2210) 2020-04-20 11:26:41 +02:00
ifedapoolarewaju
323233488f
Release 2020-04-15 20:07:42 +01:00
Artur Paikin
5752662a93 Release 2020-04-14 22:25:47 +02:00
Renée Kooi
7bf390abda
add markdown linting using remark (#2181)
* build: add markdown linting

* build: support markdown front matter

* build: fail remark lint on warnings

* Fix markdown lint warnings

* changelog: fix markdown errors, allow literal URLs

* ci: add markdown lint step

* website: regenerate contributing.md

* build: properly ignore vendor and built files from remark-lint

* build: add private packages to lerna config
2020-04-13 09:48:11 +02:00
ifedapoolarewaju
0481589f3b
Release 2020-04-08 17:37:56 +01:00
Renée Kooi
ab76448508
aws-s3: handle upload internally instead of deferring to xhr-up… (#2060)
* aws-s3: handle actual upload internally instead of deferring to XHRUpload

* aws-s3: add a comment explaining the mess

* aws-s3: move XHRUpload code into a separate class

* utils: support prioritization in rate limiting queue

* aws-s3: remove old implementation

* core,status-bar: account for pre/postprocessing files in progress calculations

* changelog: add entry for this PR

* utils: Support cancellation in `RateLimitedQueue#wrapPromiseFunction`

* s3: remove preprocessing stage, only use upload-* events

* utils: remove console.log

* aws-s3: comment out duplicate `upload-started`

* xhr-upload: reorder `ProgressTimeout` creation for readability

* aws-s3: apply 7d972e0 to MiniXHRUpload

* aws-s3: apply 4ed7508 to MiniXHRUpload
2020-04-06 13:53:21 +02:00
ifedapoolarewaju
fa32da7cf3
Release 2020-03-25 12:37:44 +01:00