Commit graph

401 commits

Author SHA1 Message Date
Merlijn Vos
6573b38cc7
Abstract restriction logic in a new Restricter class (#3532)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-14 17:47:57 +08:00
Antoine du Hamel
c3340a6776
Release: uppy@2.5.0 (#3487)
| Package                   | Version | Package                   | Version |
| ------------------------- | ------- | ------------------------- | ------- |
| @uppy/companion           |   3.2.0 | @uppy/provider-views      |   2.0.7 |
| @uppy/companion-client    |   2.0.5 | @uppy/thumbnail-generator |   2.1.0 |
| @uppy/core                |   2.1.5 | @uppy/robodog             |   2.3.0 |
| @uppy/dashboard           |   2.1.4 | uppy                      |   2.5.0 |
| @uppy/locales             |   2.0.6 |                           |         |

- @uppy/companion: add support for COMPANION_UNSPLASH_SECRET (Mikael Finstad / #3463)
- @uppy/unsplash: fix nested meta (Artur Paikin / #3485)
- meta: fix(docs): typo in property `thumbnailType` (Dan Schalow / #3472)
- @uppy/robodog: add audio, box, unsplash, screen-capture to Robodog (Artur Paikin / #3483)
- meta: consolidate ENV files and fix contributing guidelines (Antoine du Hamel / #3475)
- @uppy/companion-client,@uppy/companion,@uppy/provider-views,@uppy/robodog: Finishing touches on Companion dynamic Oauth (Renée Kooi / #2802)
- meta: Improve companion docs (Mikael Finstad / #3479)
- meta: Make E2E Great Again (Merlijn Vos / #3444)
- meta: Add PostCSS handling to Vite (Artur Paikin / #3467)
- meta: Update CONTRIBUTING.md (Mikael Finstad / #3411)
- @uppy/companion: fix broken thumbnails for box and dropbox (Mikael Finstad / #3460)
- website: fix `Uppy is not defined` error (Antoine du Hamel / #3461)
- @uppy/companion: Implement periodic ping functionality (Mikael Finstad / #3246)
- @uppy/companion: fix callback urls (Mikael Finstad / #3458)
- @uppy/core,@uppy/dashboard,@uppy/thumbnail-generator: Add dashboard and UIPlugin types (Merlijn Vos / #3426)
- @uppy/locales: Add "save" to fr_FR.js (Charly Billaud / #3395)
- @uppy/companion: Fix TypeError when invalid initialization vector (Julian Gruber / #3416)
- meta: Upgrade size-limit to 7.0.5 (Artur Paikin / #3445)
- @uppy/provider-views: Unsplash: UI improvements (Artur Paikin / #3438)
- @uppy/thumbnail-generator: exifr: remove legacy IE support (Artur Paikin / #3382)
- @uppy/companion: Default to HEAD requests when the Companion looks to get meta information about a URL (Zack Bloom / #3417)
- @uppy/dashboard: check if info array is empty (Artur Paikin / #3442)
- meta: dev: fix Vite custom plugin (Antoine du Hamel / #3437)
- website: add legacy bundle to CDN example (Antoine du Hamel / #3433)
- meta: remove unused lerna and npm files (Antoine du Hamel / #3436)
- meta: replace browserify with esbuild (Antoine du Hamel / #3363)
2022-02-14 18:53:02 +00:00
Merlijn Vos
6da874ed3a
meta: Make E2E Great Again (#3444)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-08 17:37:27 +01:00
Merlijn Vos
7fdad73d6e
Add dashboard and UIPlugin types (#3426) 2022-02-01 12:57:24 +03:00
Artur Paikin
80e5cedf11
Unsplash: UI improvements (#3438)
* add extra dot before file size

* show search term at the top when displaying results

* add inline search to result screen

* update locale

* update locale

* remove comments

* improve semantics, remove duplicate event handlers
2022-01-26 22:34:47 +00:00
github-actions[bot]
3e5be3250e
Release: uppy@2.3.1 (#3357)
| Package           | Version | Package           | Version |
| ----------------- | ------- | ----------------- | ------- |
| @uppy/angular     |   0.2.7 | @uppy/store-redux |   2.0.3 |
| @uppy/audio       |   0.2.1 | @uppy/svelte      |   1.0.6 |
| @uppy/aws-s3      |   2.0.7 | @uppy/vue         |   0.4.4 |
| @uppy/companion   |   3.1.3 | @uppy/xhr-upload  |   2.0.7 |
| @uppy/core        |   2.1.4 | @uppy/robodog     |   2.1.5 |
| @uppy/dashboard   |   2.1.3 | uppy              |   2.3.1 |
| @uppy/locales     |   2.0.5 |                   |         |

- meta: update npm deps (Antoine du Hamel / #3352)
- @uppy/companion: fix Dockerfile and deploy automation (Mikael Finstad / #3355)
- @uppy/companion: don’t pin Yarn version in `package.json` (Antoine du Hamel / #3347)
- @uppy/aws-s3,@uppy/core,@uppy/dashboard,@uppy/store-redux,@uppy/xhr-upload: deps: use `nanoid/non-secure` to workaround react-native limitation (Antoine du Hamel / #3350)
- @uppy/audio: showRecordingLength option was removed, always clearInterval (Artur Paikin / #3351)
- meta: drop `stringify-object` dependency to generate locales (Antoine du Hamel / #3344)
- meta: add release automations (Antoine du Hamel / #3304)
2021-12-09 20:00:12 +00:00
Antoine du Hamel
479f3a68a5
deps: use nanoid/non-secure to workaround react-native limitation (#3350)
Fixes: https://github.com/transloadit/uppy/issues/3340
2021-12-09 15:33:25 +01:00
github-actions[bot]
2af711cf28
Release: uppy@2.3.0 (#3348)
| Package                   | Version | Package                   | Version |
| ------------------------- | ------- | ------------------------- | ------- |
| @uppy/angular             |   0.2.6 | @uppy/locales             |   2.0.4 |
| @uppy/audio               |   0.2.0 | @uppy/onedrive            |   2.0.5 |
| @uppy/aws-s3              |   2.0.6 | @uppy/provider-views      |   2.0.6 |
| @uppy/aws-s3-multipart    |   2.2.0 | @uppy/react               |   2.1.2 |
| @uppy/box                 |   1.0.5 | @uppy/screen-capture      |   2.0.5 |
| @uppy/companion           |   3.1.2 | @uppy/status-bar          |   2.1.2 |
| @uppy/companion-client    |   2.0.4 | @uppy/store-default       |   2.0.3 |
| @uppy/core                |   2.1.3 | @uppy/thumbnail-generator |   2.0.6 |
| @uppy/dashboard           |   2.1.2 | @uppy/transloadit         |   2.0.5 |
| @uppy/drag-drop           |   2.0.5 | @uppy/tus                 |   2.1.2 |
| @uppy/dropbox             |   2.0.5 | @uppy/url                 |   2.0.5 |
| @uppy/facebook            |   2.0.5 | @uppy/utils               |   4.0.4 |
| @uppy/file-input          |   2.0.5 | @uppy/webcam              |   2.0.5 |
| @uppy/golden-retriever    |   2.0.6 | @uppy/xhr-upload          |   2.0.6 |
| @uppy/google-drive        |   2.0.5 | @uppy/zoom                |   1.0.5 |
| @uppy/image-editor        |   1.1.0 | @uppy/robodog             |   2.1.4 |
| @uppy/informer            |   2.0.5 | uppy                      |   2.3.0 |
| @uppy/instagram           |   2.0.5 |                           |         |

- meta: add release automations (Antoine du Hamel / #3304)
- @uppy/dashboard: Save meta fields when opening the image editor (Merlijn Vos / #3339)
- @uppy/aws-s3-multipart: Drop `lockedCandidatesForBatch` and mark chunks as busy when preparing (Yegor Yarko / #3342)
- @uppy/webcam: fix broken links in `webcam.md` (Antoine du Hamel / #3346)
- @uppy/audio: new @uppy/audio plugin for recording with microphone (Artur Paikin / #2976)
- build: force use of `@babel/plugin-proposal-optional-chaining` (Antoine du Hamel / #3335)
- @uppy/companion: fix deploy Yarn version (Antoine du Hamel / #3327)
- @uppy/companion: upgrade aws-sdk (Mikael Finstad / #3334)
- @uppy/core: disable loose transpilation for legacy bundle (Antoine du Hamel / #3329)
- @uppy/angular: examples: update `angular-example` to Angular v13 (Antoine du Hamel / #3325)
- meta: Update BACKLOG.md (Artur Paikin, Merlijn Vos)
- meta: Add disableLocalFiles to options summary (Steve Barker / #3323)
- meta: Create SECURITY.md (Ziding Zhang / #3052)
- @uppy/image-editor: Pass croppedCanvasOptions to getCroppedCanvas (Mohamed Boudra / #3320)
- meta: finish `master`->`main` job (Mikael Finstad / #3315)
- website: update documents that were out of date (Antoine du Hamel / #3317)
- @uppy/status-bar: Status bar error state improvements (Merlijn Vos / #3299)
- doc: Fix typo in `docs/drag-drop.md` (Ash Allen / #3319)
- website: Update /support and docs about Transloadit-hosted Companion (Artur Paikin / #3243)
- @uppy/aws-s3,@uppy/box,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/google-drive,@uppy/image-editor,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/screen-capture,@uppy/status-bar,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/url,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Refactor locale scripts & generate types and docs (Merlijn Vos / #3276)
- @uppy/companion: Remove references of incorrect `options` argument for `companion.socket` (Mikael Finstad / #3307)
- @uppy/companion: Upgrade linting to 2.0.0-0 (Kevin van Zonneveld / #3280)
2021-12-07 18:48:43 +00:00
Artur Paikin
d202a8e940
audio: new @uppy/audio plugin for recording with microphone (#2976)
* add Audio plugin

* add audio-oscilloscope to visualize the recording

* refactor: rename everything to Audio, use oscilloscope, re-init when appropriate, improved preview screen

* tweak styles

* add @uppy/audio to the Uppy bundle

* update Readme and package.json

* add docs, update locales, add website example

* webcam plugin also shouldn’t show recording length counter on video preview screen

* update package.json and yarn.lock

* update types

* update locale

* fix locale issues

* remove leftover webcam test

* Delete index.test-d.ts

* Revert "Delete index.test-d.ts"

This reverts commit f4ec431f6a.

* fix lint and type tests

* Update website/src/docs/audio.md

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

* Update packages/@uppy/audio/src/audio-oscilloscope/index.js

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

* Update packages/@uppy/audio/src/DiscardButton.js

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

* Update packages/@uppy/audio/src/audio-oscilloscope/index.js

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

* Update packages/@uppy/audio/src/supportsMediaRecorder.js

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

* Update website/src/docs/audio.md

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

* Update packages/@uppy/audio/types/index.d.ts

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

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

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

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

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

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

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

* remove unused method

* remove unused commented declarations

* make all methods private

* convert class component to hooks

* more private

* fix lint

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-12-06 17:06:51 +00:00
Antoine du Hamel
9380cf575c
build: disable loose transpilation for legacy bundle (#3329)
* Revert "Convert sets to arrays prior to using spread operator to enable transpilation to ES5 (#3297)"

This reverts commit a545c66d10.

* build: disable loose transpilation for legacy bundle

Refs: https://github.com/transloadit/uppy/pull/3297#issuecomment-963228990
2021-11-24 23:12:14 +01:00
Merlijn Vos
00094af525
Refactor locale scripts & generate types and docs (#3276)
Closes #3232 

### Summary

- Create `locale.js` for every plugin instead of `this.defaultLocale` in the class
- Complete refactor of locale scripts
  - No dynamic plugin class imports with hacks to mimic the environment in order to get the `defaultLocale`.
  - Separate tests and build in separate files
  - Add two modes for test file, `unused` (fails hard) and `warnings`
- Generate docs
  - Use remark to cleanly mutate the file
  - Rename some doc files to match the plugin name (such as `statusbar` --> `status-bar`)
  - Comments in `locale.js` are kept and are present in the docs as well.
- Generate types
2021-11-10 11:43:04 +01:00
Kevin van Zonneveld
bfe659820e
Upgrade linting to 2.0.0-0 (#3280)
* Upgrade linting to 2.0.0-0

* Adjust so we can pass without error

* Fix linting

* Update header-blacklist.js

* Update index.js

* Update Uppy.js

* Update Components.js

* Update StatusBar.js

* Update Assembly.js

* Upgrade to linting 2.0.0 (final release)
2021-11-09 11:19:05 +00:00
Murderlon
18e4756a59
@uppy/core@2.1.2 2021-11-08 16:01:18 +01:00
John Adair
a545c66d10
Convert sets to arrays prior to using spread operator to enable transpilation to ES5 (#3297) 2021-11-05 15:28:21 +00:00
Artur Paikin
6e4884f559
Required meta fields UI (#3285)
* add checkRequiredMetaFieldsOnFile for checking single file's meta fields after editing

* add MetaErrorMessage component, mobile and desktop styles

* use AggregateRestrictionError again

* metaFieldIdToName — use names of meta fields instead of id

* Update MetaErrorMessage.js

* desktop style tweaks

* update jest snapshot
2021-11-05 15:00:43 +00:00
bencergazda
94e686df44
chore: Add FileRemoveReason type (#3283)
* chore: Add `FileRemoveReason` type

* Update packages/@uppy/core/types/index.d.ts

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

* fix: remove `null`

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-31 19:23:13 +01:00
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