Commit graph

567 commits

Author SHA1 Message Date
Artur Paikin
a831837773 Connect image-editor and Dashboard, try rotation 2020-06-30 17:24:59 +01:00
Artur Paikin
1423b4c839 Merge branch 'master' into dashboard-image-cropping 2020-06-29 14:56:57 +01:00
Renée Kooi
fb162d8673
deps: add missing dependencies to root package.json 2020-06-29 14:01:19 +02:00
Marius
541feef81e
Update tus-js-client dependency to v2 (#2239)
Co-authored-by: Renée Kooi <renee@kooi.me>
2020-06-22 12:41:45 +02:00
Renée Kooi
01ce09a143
Upgrade lerna 2020-05-25 15:47:51 +02:00
Renée Kooi
c06196ae68
website: fix the mixed content emails from netlify 2020-05-25 13:17:08 +02:00
Artur Paikin
5f28e40dbf add draft basic cropping to a weird place 2020-05-14 20:52:40 +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
Renée Kooi
8fd3f591d0
test: make endtoend tests runnable with local IEDriverServer 2020-04-27 15:38:35 +02:00
Renée Kooi
8e5b86b839
Dependency and CI updates (#2217) 2020-04-24 11:05:47 +02:00
Renée Kooi
9513d1c0b1
Some Windows support (#2211)
* build: explicitly use `sh` for shell scripts

* build: fix css path check on windows

* build: use NODE_PATH instead of symlink for local package resolution in e2e tests

* build: actually with new lerna we do not need NODE_PATH

* build: sh → bash
2020-04-22 09:56:34 +02:00
Artur Paikin
a6c8ef15e1
ScreenCapture plugin for screenshots / screen recordings (#2132)
* Finnish locale semantics improved

* Finnish semantics improved

* Screen capture initial commit

* Fix. Removed audio constraint from video.

* ui improvements

* so Lerna doesn’t try to publish as private

* refactor, tweak icons

* remove commented code from webcam styles

* Check for MediaRecorder (hides button in Safari) and refactor everything

* update readme

* beta for now

Co-authored-by: Miika Jukakoski <miika.jukakoski@ourmind.io>
2020-04-21 20:47:20 +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
Renée Kooi
5e25b2a939
Fix translations that did not respect word order (#2077)
* Fix translations that did not respect word order

Fixes #2069

We were still using raw string concatenation in these two places. To
maintain backwards compatibility, this commit adds _new_ translations
that are substitution-based instead of concatenation-based. The old
translation is passed in as a possible substitution parameter
`backwardsCompat`, and the default (English) translations use this
parameter.

With this, if you are using a custom locale that overrides eg. the
`exceedsSize` string, Uppy will first get your `exceedsSize`
translation, and then use the default `exceedsSize2` translation which
concatenates that result and the file size. So it works the same as it
did in the past.
If a translation requires a different word order, it can override the
`exceedsSize2` translation instead.
```js
new Uppy({
  locale: {
    strings: {
      exceedsSize2: 'Maximum file size of %{size} exceeded',
      poweredBy2: '%{uppy} made this!'
    }
  }
})
```

In 2.0, we can remove all the old strings and only use `poweredBy2` (and
probably rename them to `poweredBy` too, heh)

* website: add missing dashboard strings to docs

* locales: remove unused second plural form from EN and NL

* build: allow different numbers of plural forms

* utils: add test for new throwing behaviour

* docs: insert PR url

* locales: revert ko_KR changes

* changelog: add 2.0 backlog entry

* locales: var → const

* docs: add brief note that translators should supply a pluralize function

* locales: update en_US with new template

* fix HEIGHT_MD = 400

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2020-03-19 14:41:14 +01:00
Renée Kooi
4e5cad5842
npm audit fix 2020-03-09 11:33:19 +01:00
Renée Kooi
fab5c80bfc
Update outdated type dependencies. 2020-02-24 15:32:59 +01:00
Renée Kooi
f984c0901f
Upgrade tsd. 2020-02-24 15:27:33 +01:00
Artur Paikin
17578e83dc
build: contributors:save fix — the node.js version (#2078)
* Create update-contributors.js

* move `## Contributors` out of `<!--contributors-->`

* use execa

* Update bin/update-contributors.js

Co-Authored-By: Renée Kooi <renee@kooi.me>

* yes, it’s not pretty, but it works?

* switch to execa again: showLogin --> showlogin

thanks @goto-bus-stop

Co-authored-by: Renée Kooi <renee@kooi.me>
2020-02-18 15:36:14 +01:00
Renée Kooi
be66c47deb
Actually check types (#1918)
* types: stronger typings

* Remove remaining `declare module` things for uppy.use

* Format types standard-style-like

* Add `target` properties to plugin typings

* Add type for `replaceTargetContent` option

* xhr-upload: allow lowercase method

* opt in to stricter typechecks

* use the strictly typed version in all typings tests

* endtoend: use strict types in typescript test

* Add some comments to the typings file so IDEs will warn about untyped use()

* informer: remove obsolete option from typings

* react: generate prop types based on actual options types

* react: update types

* react: fix import in typings test

* companion-client: add `pluginId` property to ProviderOptions type

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

* core: remove some `any` types

* *: add locale string types

* *: generate locale typings

* core: fix LocaleStrings<> type

* dashboard: add locale string type tests

* tus: inherit options typings from tus-js-client

* transloadit: add missing options types

* ci: do the required build steps before testing typings

* Support TokenStorage in types, add `title?: string` options

* form: update typings

* types: put TokenStorage type in dependents

* Document Uppy.StrictTypes

* if we pin at least we should use the latest

* Allow document.querySelector

I think it's a eslint-plugin-compat bug that it's marking querySelector
as not available in Android Chrome 78.

Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>
2020-02-12 16:22:09 +01:00
Kevin van Zonneveld
691bb2152b Upgrade adm-zip to hopefully avoid corrupt uppy archives
https://github.com/cthackers/adm-zip/pull/267

In our case, we could unzip fine, but in 7zip it reported: "Headers Error"
and in the Ubuntu 19.10 gnome extracting app, it would say "empty archive" and "An error occurred while loading the archive."
2020-02-12 13:01:43 +01:00
Kevin van Zonneveld
c943711428 Remove ^ from package.json 2020-02-12 12:58:55 +01:00
Artur Paikin
16eeef9437 npm audit fix 2020-02-12 12:16:50 +01:00
Kevin van Zonneveld
b7bdce7363
Upload downloadable zip archive of releases to CDN (#2052)
* Fix jsdoc warnings

* Upload downloadable zip archive of releases to CDN

* var -> const

* Only upload .zip for the main uppy package

* Implement @goto-bus-stop's feedback
2020-02-05 13:49:47 +01:00
Renée Kooi
7b2283d8ef
examples: add npm run example script
a bad result from adding the examples as dependencies of the root
repository is that they now don't have access to the npm binaries they
need to run in their own folder, because they are installed into the
root repository instead.

this works around that issue.

we may need to consider undoing that change and making the examples work
as standalone projects again, that's easier to understand.

fixes #2024 for now.
2020-01-15 11:16:56 +01:00
Renée Kooi
debab7c6fc
pin replace-x to a version that accepts our bad regex 2019-12-16 12:46:12 +01:00
Renée Kooi
b82115a37f
deps: do npm update && npm audit fix 2019-12-11 13:15:17 +01:00
Artur Paikin
88fc5d0de1
Website: add plugin versions (#1952)
* Move stats to plugin list, add table with versions of all plugins

* Update Hexo to 4.0, and other deps too

* update hexo-filter-github-emojis dependecy, run lerna bootstrap

* re-create package-lock.json

* crap, it adds body/html to any document now, and this is a partial :(

* companion: temporary fix for ts compile error

* fix netlify maybe

* node 12 is lts

* revert attempted netlify command fix

* update package-lock.json
2019-12-09 12:46:38 +03:00
Renée Kooi
b501b7fce2
Let lerna ask for OTP 2019-10-14 16:37:13 +02:00
Renée Kooi
a1eeaa386b
Update babel-eslint and jest
Fixes the `no-unused-vars` issue.

Disables the preflight check in CRA, it has its own isolated module tree
so it was useless anyway.
2019-10-11 16:11:52 +02:00
Renée Kooi
733de659da
Upgrade standard to v14 (#1860)
* Update eslint dependencies.

* standard --fix

* build: disable handler name lint rule

* status-bar: manually fix lint errors

* webcam: manually fix lint errors

* url: manually fix lint errors

* react-native: manually fix lint errors

* dashboard: manually fix lint errors

* informer: manually fix linting errors

* progress-bar: manually fix lint errors

* provider-views: manually fix lint errors

* redux-dev-tools: manually fix lint errors

* build: disable buggy no-unused-vars rule

* examples: manually fix lint errors

* ` quotes for code things, ' for text things
2019-10-09 14:53:02 +02:00
Renée Kooi
bb8b66d918
Use more cancellation-friendly strategy for limit: N uploads (#1736)
* xhr-upload: redo limit option using different strategy

* xhr-upload: fix marking requests as done

* Move duplicate createEventTracker definitions to @uppy/utils

* tus: new cancellation for local uploads

* tus: fix cancelling queued uploads

* tus: fix wrong name

* aws-s3-multipart: smol refactor

* aws-s3-multipart: new cancellation style

* aws-s3: new cancellation

* utils: port limitPromises test to RateLimitedQueue

* timing fix?

* tus: new cancellation on websocket

* xhr-upload: implement cancellation for remote uploads

* aws-s3-multipart: port to new cancellation

* utils: remove limitPromises

* xhr-upload: remove pause/resume code

* xhr-upload: clean up event listeners

* xhr-upload: extract progress timer to separate class

* Move ProgressTimeout class to utils

* utils: update typings

* Fix lint

* tus: make pause/resume respect the rate limiting queue

* tus: try to explain some of the tricky things at play in the Tus#upload method

* aws-s3-multipart: add missing { abort: true }

* aws-s3-multipart: make pause/resume respect the rate limiting queue

* eslintrc.json - fixed eslint warnings for jsdoc

* Revert "eslintrc.json - fixed eslint warnings for jsdoc"

This reverts commit 50b24773ce.

* eslintrc.json - allow indentation in jsdoc comments

* xhr-upload: fix promise return value

* tus: fix promise return value

* tus: add missing `return () => {}`

* utils: typing export type fixes

* tus: add more jsdoc

* companion-client: add missing SocketOptions type

* utils: fix more export typings

* core,companion-client,tus: more typings tweaking

* companion-client: test fix 😩

* companion-client: add type for Socket#open

* tus: fix emit() call

* add local cancellation fuzz....ish? test
2019-09-25 15:21:17 +02:00
ifedapoolarewaju
a3809fcd2a
onedrive: add documentation + link as local dependecy 2019-09-20 11:23:32 +01:00
Ifedapo .A. Olarewaju
3fed571c0a
Merge pull request #1794 from transloadit/facebook-provider
companion,facebook: add support for facebook provider
2019-09-20 11:00:48 +01:00
ifedapoolarewaju
ff82134fcb
facebook: add documentation + link as local dependency 2019-09-20 10:52:42 +01:00
Artur Paikin
046f33f742 add pacote 2019-08-30 18:00:59 +03:00
Artur Paikin
9c6bed5c31
build: Add size-limit that shows uppy bundle size and execution time (#1781)
* Add size-limit preset-big-lib

* Update package-lock.json
2019-08-23 17:54:55 +03:00
Renée Kooi
a3152fcd73
Update lockfiles 2019-08-14 11:44:41 +02:00
Renée Kooi
c62ec3665d Update eslint to v6 (#1777)
* Update eslint

* Do eslint --fix

* Do not access Object.prototype method 'hasOwnProperty' from target object

* utils: add hasProperty

* eslint --fix

* Disable quote-props for locale files

* add back quotes in locale files

* revert locale files to state on master

* Update react-scripts
2019-08-13 21:45:30 +03:00
Ifedapo Olarewaju
e991169249 test: working provider e2e test for local env 2019-07-22 13:02:50 +01:00
Ifedapo Olarewaju
3582c9c650 e2e: reintroduce e2e test for providers locally 2019-07-21 10:29:28 +01:00
Renée Kooi
9bd18e9fd8
companion: add necessary devDependencies for isolated build 2019-07-19 13:01:16 +02:00
Renée Kooi
10bc79574e
lerna link convert (#1730)
* lerna link convert

* ci: use npm ci

* update lockfile

* companion: set `bin` to source file

Since typescript doesn't actually transform anything, we can just use
this.

In a next major version we could set `noEmit: true` in the tsconfig and
stop publishing `lib`.

* companion: do chmod +x on start-server.js

* build: remove obsolete lerna config

* build: explicitly install latest versions when building e2e tests for ci

* Remove versions from private packages

* fix regex

* try fix

* ci: force npm to install to endtoend folder

* ci: fold up e2e build output

* Update netlify deploy preview command

* Remove mentions of npm run bootstrap

* Edit .github/CONTRIBUTING.md instead

* companion: add proxy executable

* companion: fix publish

* Downgrade jest to appease create-react-app
2019-07-19 12:16:36 +02:00
Renée Kooi
5d24dfcc78
ci: deploy tweak #3465242374 2019-07-15 12:12:50 +02:00
Renée Kooi
c4f5e30a19
ci: attempt to fix website deploy condition 2019-07-09 11:57:58 +02:00
Renée Kooi
0a40f2c444
Update webdriverio to v5 (#1675)
* build: update webdriverio to v5

* build: update wdio services config syntax

* e2e test updates for wdio 5

* Sync pinned versions between repo root and companion

* build: enable all e2e tests for this PR run

* waitForExist

* test: await browser.url() calls

* test: awaitify url-plugin test

* test: use sauceConnect

* test: upload files to sauce before using them

* fall back to fakechoosefile a lot?

* fall back to fakechoosefile more

* Disable file selection on saucelabs

* test: need to await this thing

* test: make more-sure that the input is visible

* test: use currently low load transloadit region so i dont have to wait

* test: update but disable xhr-limit

* test: change the order

* test: newer firefoxes

* test: change the order back

* kinda sucks that they only have super old browsers on linux

* ci: disable url-plugin and transloadit e2e tests again

* test: use local tus-node-server for integration tests

* test: use envify to check env variables and select appropriate URL

* test: use companion.test:1080 for tus uploads on Travis

* test: fix env vars in typescript and CRA tests

* test: use getBoundingClientRect, may work better in android

* test: try getSize AND getBoundingClientRect

* test: do not check image width in android

* test: allow retrying tests that are prone to flakiness

* test: be more verbose during e2e tests

* test: force <input> visibility in more tests

* test: warn if using test:endtoend not on CI
2019-07-05 13:45:43 +02:00
Renée Kooi
7282fdcf7c
build: sync dependency version numbers to make lerna happier 2019-07-01 14:06:53 +02:00
Renée Kooi
119016761c
Pin babel-eslint to make create-react-app happy 2019-06-19 16:50:49 +02:00
Renée Kooi
abf080e4ca
deps: get rid of eslint-config-standard-preact (#1678)
It's outdated and brings in a million outdated dependencies (notably,
babel 6 and for some reason eslint 4)

Instead we can directly use the standard-jsx config and configure it to
use `h` as the react createElement function just like standard-preact
does internally.
2019-06-19 16:32:26 +02:00
Evgenia Karunus
6bcf2040e9 Feature/accessibility (#1507)
* @uppy/provider-views - added accessibility

* @uppy/provider-views - simplified checkbox css

* @uppy/dashboard - on tab set focus to the current verlay

* @uppy/dashboard - factored out code related to focus into a separate file

* @uppy/dashboard, and connected plugins - made focus travel well, and be managed in a single place in Dashboard

* @uppy/dashboard - made modal opener button focus keep focus on modal close

* @uppy/dashboard - focus management for uploaded-files

* @uppy/dashboard - made informer read messages without interruption

* @uppy/provider-views - removed the bug of focus jumping on safari

* @uppy/dashboard - made focus travel well in instagram in firefox

* @uppy - moved lodash.debounce dependency from / to @uppy/dashboard

* everywhere - made <ul>s not focusable for firefox

* @uppy/provider-views - unnested scss, copypasted alex's :focus changes

* Added JSDoc eslint package and rules, and fixed some JSDoc comments

* .eslintrc - made jsdoc errors warnings instead

* package-lock.json for new package.json

* eslint fix

* @uppy/dashboard - avoid forcing focus when we are inline

* @uppy/dashboard - in firefox, made sure superfocus is not switching back to uppy

* @uppy/dashboard - no focus jump for .info() inline,  fix for firefox

Made focus not interrupt .info() when we are in the inline mode;
Made firefox start superfocusing when we either tab into, or click on some element in Uppy

* @uppy/dashboard - only listen to click/focus on uppy

* @uppy/dashboard - started trapping focus in inline mode too

* @uppy/dashboard - restricted trapFocus() event listener to this.el

* @uppy/core - started throttling progress emits.

1. To fix heat up in firefox
2. To fix focus in firefox

* @uppy/core - fixed tests by adding .flush()-s for progress emits

* @uppy/dashboard - stopped trapping focus in inline mode, made background inert

* @uppy/dashboard - added MutationObserver polyfill

* tests - made locale-packs.js pass

* REVERTED last 3 commits that introduced inert

Inert requires too many polyfills, atm tests fail in IE 10.0, wicg-inert library reportedly has performance issues. We decided to at least wait until _some_ browser introduce inert html property natively.

* @uppy/dashboard - IE11 fix for focusing

* @uppy/dashboard - fix for a bug in Safari for long uploads with checkbox clicking

* RERUN TESTS - tiny commit to rerun tests

* @uppy/dashboard - removed useless touchstart event listener

* Cancel superFocus in recordIfFocusedOnUppyRecently, when focus moves away from Uppy

* @uppy/provider-views - made Filter not swallow letters

* @uppy/dashboard - stopped superfocus from refocusing if we're already in the overlay
2019-06-11 19:10:32 +03:00
Renée Kooi
a9a563169d
Fix mime types on CDN (#1636)
* Fix mime types on CDN

The mime-types library is already in use by companion, hence no lockfile
update

* fix region and bucket

* add --force to overwrite existing release

* Fix for doing --force without a specific version
2019-06-05 20:04:10 +02:00