Преглед на файлове

Merge branch 'main' of https://github.com/transloadit/uppy

Artur Paikin преди 3 години
родител
ревизия
367dd4c388
променени са 42 файла, в които са добавени 233 реда и са изтрити 147 реда
  1. 10 0
      .eslintrc.js
  2. 1 1
      BUNDLE-README.md
  3. 23 0
      CHANGELOG.md
  4. 13 13
      README.md
  5. 23 21
      bin/update-contributors.mjs
  6. 2 2
      examples/cdn-example/index.html
  7. 1 1
      examples/transloadit-textarea/index.html
  8. 2 2
      examples/uppy-with-companion/client/index.html
  9. 2 2
      packages/@uppy/angular/package.json
  10. 7 0
      packages/@uppy/audio/CHANGELOG.md
  11. 1 1
      packages/@uppy/audio/package.json
  12. 7 0
      packages/@uppy/aws-s3/CHANGELOG.md
  13. 1 1
      packages/@uppy/aws-s3/package.json
  14. 8 0
      packages/@uppy/companion/CHANGELOG.md
  15. 1 1
      packages/@uppy/companion/package.json
  16. 7 0
      packages/@uppy/core/CHANGELOG.md
  17. 1 1
      packages/@uppy/core/package.json
  18. 7 0
      packages/@uppy/dashboard/CHANGELOG.md
  19. 1 1
      packages/@uppy/dashboard/package.json
  20. 1 1
      packages/@uppy/locales/package.json
  21. 2 2
      packages/@uppy/robodog/README.md
  22. 1 1
      packages/@uppy/robodog/package.json
  23. 8 0
      packages/@uppy/store-redux/CHANGELOG.md
  24. 1 1
      packages/@uppy/store-redux/package.json
  25. 1 1
      packages/@uppy/svelte/package.json
  26. 1 1
      packages/@uppy/vue/package.json
  27. 7 0
      packages/@uppy/xhr-upload/CHANGELOG.md
  28. 1 1
      packages/@uppy/xhr-upload/package.json
  29. 1 1
      packages/uppy/package.json
  30. 5 5
      website/src/docs/index.md
  31. 2 2
      website/src/docs/locales.md
  32. 3 3
      website/src/docs/migration-guides.md
  33. 3 3
      website/src/docs/robodog-form.md
  34. 2 2
      website/src/docs/robodog.md
  35. 1 1
      website/src/examples/dashboard/app.es6
  36. 12 13
      website/src/examples/dragdrop/app.es6
  37. 3 3
      website/src/examples/i18n/app.html
  38. 26 27
      website/src/examples/markdown-snippets/app.es6
  39. 1 1
      website/src/examples/markdown-snippets/app.html
  40. 2 2
      website/src/examples/statusbar/app.es6
  41. 29 27
      website/src/examples/transloadit/app.es6
  42. 2 2
      website/themes/uppy/layout/index.ejs

+ 10 - 0
.eslintrc.js

@@ -152,6 +152,15 @@ module.exports = {
         'no-underscore-dangle': 'off',
       },
     },
+    {
+      files: [
+        'website/src/examples/*/*.es6',
+      ],
+      rules: {
+        'import/no-extraneous-dependencies': 'off',
+        'no-console': 'off',
+      },
+    },
     {
       files: [
         '*.test.js',
@@ -166,6 +175,7 @@ module.exports = {
     {
       files: [
         'bin/**.js',
+        'bin/**.mjs',
         'examples/**/*.js',
         'packages/@uppy/companion/test/**/*.js',
         'test/**/*.js',

+ 1 - 1
BUNDLE-README.md

@@ -1,7 +1,7 @@
 # Uppy
 
 Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can use
-this from a CDN (`<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>`) or bundle it with your webapp.
+this from a CDN (`<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>`) or bundle it with your webapp.
 
 Note that the recommended way to use Uppy is to install it with yarn/npm and use a
 bundler like Webpack so that you can create a smaller custom build with only the

+ 23 - 0
CHANGELOG.md

@@ -12,6 +12,29 @@ Please add your entries in this format:
 
 In the current stage we aim to release a new version at least every month.
 
+## 2.3.1
+
+Released: 2021-12-09
+
+| 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)
+
+
 ## 2.3.0
 
 Released: 2021-12-07

+ 13 - 13
README.md

@@ -69,7 +69,7 @@ $ npm install @uppy/core @uppy/dashboard @uppy/tus
 
 We recommend installing from npm and then using a module bundler such as [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/).
 
-Add CSS [uppy.min.css](https://releases.transloadit.com/uppy/v2.3.0/uppy.min.css), either to your HTML page’s `<head>` or include in JS, if your bundler of choice supports it — transforms and plugins are available for Browserify and Webpack.
+Add CSS [uppy.min.css](https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css), either to your HTML page’s `<head>` or include in JS, if your bundler of choice supports it — transforms and plugins are available for Browserify and Webpack.
 
 Alternatively, you can also use a pre-built bundle from Transloadit’s CDN: Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` object.
 
@@ -77,10 +77,10 @@ Alternatively, you can also use a pre-built bundle from Transloadit’s CDN: Edg
 
 ```html
 <!-- 1. Add CSS to `<head>` -->
-<link href="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.css" rel="stylesheet">
+<link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
 
 <!-- 2. Add JS before the closing `</body>` -->
-<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
 
 <!-- 3. Initialize -->
 <div class="UppyDragDrop"></div>
@@ -190,7 +190,7 @@ If you’re using Uppy from CDN, those polyfills are already included in the leg
 bundle, so no need to include anything additionally:
 
 ```html
-<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.legacy.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.legacy.min.js"></script>
 ```
 
 ## FAQ
@@ -431,21 +431,21 @@ Use Uppy in your project? [Let us know](https://github.com/transloadit/uppy/issu
 :---: |:---: |:---: |:---: |:---: |:---: |
 [bdirito](https://github.com/bdirito) |[c0b41](https://github.com/c0b41) |[canvasbh](https://github.com/canvasbh) |[christianwengert](https://github.com/christianwengert) |[craigcbrunner](https://github.com/craigcbrunner) |[darthf1](https://github.com/darthf1) |
 
-[<img alt="dkisic" src="https://avatars.githubusercontent.com/u/32257921?v=4&s=117" width="117">](https://github.com/dkisic) |[<img alt="fingul" src="https://avatars.githubusercontent.com/u/894739?v=4&s=117" width="117">](https://github.com/fingul) |[<img alt="franckl" src="https://avatars.githubusercontent.com/u/3875803?v=4&s=117" width="117">](https://github.com/franckl) |[<img alt="gaelicwinter" src="https://avatars.githubusercontent.com/u/6510266?v=4&s=117" width="117">](https://github.com/gaelicwinter) |[<img alt="green-mike" src="https://avatars.githubusercontent.com/u/5584225?v=4&s=117" width="117">](https://github.com/green-mike) |[<img alt="hxgf" src="https://avatars.githubusercontent.com/u/56104?v=4&s=117" width="117">](https://github.com/hxgf) |
+[<img alt="dkisic" src="https://avatars.githubusercontent.com/u/32257921?v=4&s=117" width="117">](https://github.com/dkisic) |[<img alt="fingul" src="https://avatars.githubusercontent.com/u/894739?v=4&s=117" width="117">](https://github.com/fingul) |[<img alt="franckl" src="https://avatars.githubusercontent.com/u/3875803?v=4&s=117" width="117">](https://github.com/franckl) |[<img alt="gaelicwinter" src="https://avatars.githubusercontent.com/u/6510266?v=4&s=117" width="117">](https://github.com/gaelicwinter) |[<img alt="github-actions[bot]" src="https://avatars.githubusercontent.com/in/15368?v=4&s=117" width="117">](https://github.com/apps/github-actions) |[<img alt="green-mike" src="https://avatars.githubusercontent.com/u/5584225?v=4&s=117" width="117">](https://github.com/green-mike) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[dkisic](https://github.com/dkisic) |[fingul](https://github.com/fingul) |[franckl](https://github.com/franckl) |[gaelicwinter](https://github.com/gaelicwinter) |[green-mike](https://github.com/green-mike) |[hxgf](https://github.com/hxgf) |
+[dkisic](https://github.com/dkisic) |[fingul](https://github.com/fingul) |[franckl](https://github.com/franckl) |[gaelicwinter](https://github.com/gaelicwinter) |[github-actions[bot]](https://github.com/apps/github-actions) |[green-mike](https://github.com/green-mike) |
 
-[<img alt="johnmanjiro13" src="https://avatars.githubusercontent.com/u/28798279?v=4&s=117" width="117">](https://github.com/johnmanjiro13) |[<img alt="kode-ninja" src="https://avatars.githubusercontent.com/u/7857611?v=4&s=117" width="117">](https://github.com/kode-ninja) |[<img alt="magumbo" src="https://avatars.githubusercontent.com/u/6683765?v=4&s=117" width="117">](https://github.com/magumbo) |[<img alt="ninesalt" src="https://avatars.githubusercontent.com/u/7952255?v=4&s=117" width="117">](https://github.com/ninesalt) |[<img alt="phil714" src="https://avatars.githubusercontent.com/u/7584581?v=4&s=117" width="117">](https://github.com/phil714) |[<img alt="luntta" src="https://avatars.githubusercontent.com/u/14221637?v=4&s=117" width="117">](https://github.com/luntta) |
+[<img alt="hxgf" src="https://avatars.githubusercontent.com/u/56104?v=4&s=117" width="117">](https://github.com/hxgf) |[<img alt="johnmanjiro13" src="https://avatars.githubusercontent.com/u/28798279?v=4&s=117" width="117">](https://github.com/johnmanjiro13) |[<img alt="kode-ninja" src="https://avatars.githubusercontent.com/u/7857611?v=4&s=117" width="117">](https://github.com/kode-ninja) |[<img alt="magumbo" src="https://avatars.githubusercontent.com/u/6683765?v=4&s=117" width="117">](https://github.com/magumbo) |[<img alt="ninesalt" src="https://avatars.githubusercontent.com/u/7952255?v=4&s=117" width="117">](https://github.com/ninesalt) |[<img alt="phil714" src="https://avatars.githubusercontent.com/u/7584581?v=4&s=117" width="117">](https://github.com/phil714) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[johnmanjiro13](https://github.com/johnmanjiro13) |[kode-ninja](https://github.com/kode-ninja) |[magumbo](https://github.com/magumbo) |[ninesalt](https://github.com/ninesalt) |[phil714](https://github.com/phil714) |[luntta](https://github.com/luntta) |
+[hxgf](https://github.com/hxgf) |[johnmanjiro13](https://github.com/johnmanjiro13) |[kode-ninja](https://github.com/kode-ninja) |[magumbo](https://github.com/magumbo) |[ninesalt](https://github.com/ninesalt) |[phil714](https://github.com/phil714) |
 
-[<img alt="rhymes" src="https://avatars.githubusercontent.com/u/146201?v=4&s=117" width="117">](https://github.com/rhymes) |[<img alt="rlebosse" src="https://avatars.githubusercontent.com/u/2794137?v=4&s=117" width="117">](https://github.com/rlebosse) |[<img alt="rtaieb" src="https://avatars.githubusercontent.com/u/35224301?v=4&s=117" width="117">](https://github.com/rtaieb) |[<img alt="slawexxx44" src="https://avatars.githubusercontent.com/u/11180644?v=4&s=117" width="117">](https://github.com/slawexxx44) |[<img alt="thanhthot" src="https://avatars.githubusercontent.com/u/50633205?v=4&s=117" width="117">](https://github.com/thanhthot) |[<img alt="tinny77" src="https://avatars.githubusercontent.com/u/1872936?v=4&s=117" width="117">](https://github.com/tinny77) |
+[<img alt="luntta" src="https://avatars.githubusercontent.com/u/14221637?v=4&s=117" width="117">](https://github.com/luntta) |[<img alt="rhymes" src="https://avatars.githubusercontent.com/u/146201?v=4&s=117" width="117">](https://github.com/rhymes) |[<img alt="rlebosse" src="https://avatars.githubusercontent.com/u/2794137?v=4&s=117" width="117">](https://github.com/rlebosse) |[<img alt="rtaieb" src="https://avatars.githubusercontent.com/u/35224301?v=4&s=117" width="117">](https://github.com/rtaieb) |[<img alt="slawexxx44" src="https://avatars.githubusercontent.com/u/11180644?v=4&s=117" width="117">](https://github.com/slawexxx44) |[<img alt="thanhthot" src="https://avatars.githubusercontent.com/u/50633205?v=4&s=117" width="117">](https://github.com/thanhthot) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[rhymes](https://github.com/rhymes) |[rlebosse](https://github.com/rlebosse) |[rtaieb](https://github.com/rtaieb) |[slawexxx44](https://github.com/slawexxx44) |[thanhthot](https://github.com/thanhthot) |[tinny77](https://github.com/tinny77) |
+[luntta](https://github.com/luntta) |[rhymes](https://github.com/rhymes) |[rlebosse](https://github.com/rlebosse) |[rtaieb](https://github.com/rtaieb) |[slawexxx44](https://github.com/slawexxx44) |[thanhthot](https://github.com/thanhthot) |
 
-[<img alt="tusharjkhunt" src="https://avatars.githubusercontent.com/u/31904234?v=4&s=117" width="117">](https://github.com/tusharjkhunt) |[<img alt="vedran555" src="https://avatars.githubusercontent.com/u/38395951?v=4&s=117" width="117">](https://github.com/vedran555) |[<img alt="yoann-hellopret" src="https://avatars.githubusercontent.com/u/46525558?v=4&s=117" width="117">](https://github.com/yoann-hellopret) |[<img alt="olitomas" src="https://avatars.githubusercontent.com/u/6918659?v=4&s=117" width="117">](https://github.com/olitomas) |[<img alt="JimmyLv" src="https://avatars.githubusercontent.com/u/4997466?v=4&s=117" width="117">](https://github.com/JimmyLv) |
-:---: |:---: |:---: |:---: |:---: |
-[tusharjkhunt](https://github.com/tusharjkhunt) |[vedran555](https://github.com/vedran555) |[yoann-hellopret](https://github.com/yoann-hellopret) |[olitomas](https://github.com/olitomas) |[JimmyLv](https://github.com/JimmyLv) |
+[<img alt="tinny77" src="https://avatars.githubusercontent.com/u/1872936?v=4&s=117" width="117">](https://github.com/tinny77) |[<img alt="tusharjkhunt" src="https://avatars.githubusercontent.com/u/31904234?v=4&s=117" width="117">](https://github.com/tusharjkhunt) |[<img alt="vedran555" src="https://avatars.githubusercontent.com/u/38395951?v=4&s=117" width="117">](https://github.com/vedran555) |[<img alt="yoann-hellopret" src="https://avatars.githubusercontent.com/u/46525558?v=4&s=117" width="117">](https://github.com/yoann-hellopret) |[<img alt="olitomas" src="https://avatars.githubusercontent.com/u/6918659?v=4&s=117" width="117">](https://github.com/olitomas) |[<img alt="JimmyLv" src="https://avatars.githubusercontent.com/u/4997466?v=4&s=117" width="117">](https://github.com/JimmyLv) |
+:---: |:---: |:---: |:---: |:---: |:---: |
+[tinny77](https://github.com/tinny77) |[tusharjkhunt](https://github.com/tusharjkhunt) |[vedran555](https://github.com/vedran555) |[yoann-hellopret](https://github.com/yoann-hellopret) |[olitomas](https://github.com/olitomas) |[JimmyLv](https://github.com/JimmyLv) |
 
 
 <!--/contributors-->

+ 23 - 21
bin/update-contributors.mjs

@@ -1,36 +1,38 @@
-import { spawn } from "node:child_process"
-import fs from "node:fs/promises"
+#!/usr/bin/env node
 
-const README_FILE_NAME = new URL("../README.md", import.meta.url)
+import { spawn } from 'node:child_process'
+import fs from 'node:fs/promises'
 
-const readme = await fs.open(README_FILE_NAME, "r+")
+const README_FILE_NAME = new URL('../README.md', import.meta.url)
+
+const readme = await fs.open(README_FILE_NAME, 'r+')
 const readmeContent = await readme.readFile()
 
-const githubcontrib = spawn("npx", [
-    'githubcontrib',
-    '--owner', 'transloadit',
-    '--repo', 'uppy',
-    '--cols', '6',
-    '--format', 'md',
-    '--showlogin', 'true',
-    '--sortOrder', 'desc',
-  ], {
-    stdio: ['ignore', 'pipe', 'inherit'],
-  });
+const githubcontrib = spawn('npx', [
+  'githubcontrib',
+  '--owner', 'transloadit',
+  '--repo', 'uppy',
+  '--cols', '6',
+  '--format', 'md',
+  '--showlogin', 'true',
+  '--sortOrder', 'desc',
+], {
+  stdio: ['ignore', 'pipe', 'inherit'],
+})
 
 githubcontrib.on('error', console.error)
 
 // Detect start of contributors section.
-const START_TAG = Buffer.from("<!--contributors-->\n")
-let START_TAG_POSITION = readmeContent.indexOf(START_TAG) + START_TAG.byteLength
+const START_TAG = Buffer.from('<!--contributors-->\n')
+const START_TAG_POSITION = readmeContent.indexOf(START_TAG) + START_TAG.byteLength
 
 let cursor = START_TAG_POSITION
 for await (const data of githubcontrib.stdout) {
-  const { bytesWritten } = await readme.write(data.toString('utf-8'), cursor, "utf-8")
+  const { bytesWritten } = await readme.write(data.toString('utf-8'), cursor, 'utf-8')
   cursor += bytesWritten
 }
 
-if(cursor === START_TAG_POSITION) {
+if (cursor === START_TAG_POSITION) {
   console.log('Empty response from githubcontrib. GitHub’s rate limit?')
   await readme.close()
   process.exit(1)
@@ -39,8 +41,8 @@ if(cursor === START_TAG_POSITION) {
 // Write the end of the file.
 await readme.write(
   readmeContent,
-  readmeContent.indexOf("<!--/contributors-->"),
+  readmeContent.indexOf('<!--/contributors-->'),
   undefined,
-  cursor
+  cursor,
 )
 await readme.close()

+ 2 - 2
examples/cdn-example/index.html

@@ -4,11 +4,11 @@
     <title></title>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link href="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.css" rel="stylesheet">
+    <link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
   </head>
   <body>
     <button id="uppyModalOpener">Open Modal</button>
-    <script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
+    <script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
     <script>
       const uppy = new Uppy.Core({debug: true, autoProceed: false})
         .use(Uppy.Dashboard, { trigger: '#uppyModalOpener' })

+ 1 - 1
examples/transloadit-textarea/index.html

@@ -2,7 +2,7 @@
 <html>
   <head>
     <meta charset="utf-8">
-    <link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.4/robodog.css">
+    <link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.5/robodog.css">
     <style>
       body {
         font-family: Roboto, Open Sans;

+ 2 - 2
examples/uppy-with-companion/client/index.html

@@ -4,11 +4,11 @@
     <title></title>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link href="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.css" rel="stylesheet">
+    <link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
   </head>
   <body>
     <button id="uppyModalOpener">Open Modal</button>
-    <script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
+    <script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
     <script>
       const uppy = new Uppy.Core({debug: true, autoProceed: false})
         .use(Uppy.Dashboard, { trigger: '#uppyModalOpener' })

+ 2 - 2
packages/@uppy/angular/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/angular",
-  "version": "0.2.6",
-  "module": "dist/angular/esm2015/public-api.js",
+  "version": "0.2.7",
+  "module": "dist/angular/esm2020/public-api.mjs",
   "types": "dist/angular/uppy-angular.d.ts",
   "scripts": {
     "ng": "ng",

+ 7 - 0
packages/@uppy/audio/CHANGELOG.md

@@ -1,5 +1,12 @@
 # @uppy/audio
 
+## 0.2.1
+
+Released: 2021-12-09
+Included in: Uppy v2.3.1
+
+- @uppy/audio: showRecordingLength option was removed, always clearInterval (Artur Paikin / #3351)
+
 ## 0.2.0
 
 Released: 2021-12-07

+ 1 - 1
packages/@uppy/audio/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/audio",
   "description": "Uppy plugin that records audio using the device’s microphone.",
-  "version": "0.2.0",
+  "version": "0.2.1",
   "license": "MIT",
   "main": "lib/index.js",
   "style": "dist/style.min.css",

+ 7 - 0
packages/@uppy/aws-s3/CHANGELOG.md

@@ -1,5 +1,12 @@
 # @uppy/aws-s3
 
+## 2.0.7
+
+Released: 2021-12-09
+Included in: Uppy v2.3.1
+
+- @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)
+
 ## 2.0.6
 
 Released: 2021-12-07

+ 1 - 1
packages/@uppy/aws-s3/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/aws-s3",
   "description": "Upload to Amazon S3 with Uppy",
-  "version": "2.0.6",
+  "version": "2.0.7",
   "license": "MIT",
   "main": "lib/index.js",
   "types": "types/index.d.ts",

+ 8 - 0
packages/@uppy/companion/CHANGELOG.md

@@ -1,5 +1,13 @@
 # @uppy/companion
 
+## 3.1.3
+
+Released: 2021-12-09
+Included in: Uppy v2.3.1
+
+- @uppy/companion: fix Dockerfile and deploy automation (Mikael Finstad / #3355)
+- @uppy/companion: don't pin Yarn version in `package.json` (Antoine du Hamel / #3347)
+
 ## 3.1.2
 
 Released: 2021-12-07

+ 1 - 1
packages/@uppy/companion/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@uppy/companion",
-  "version": "3.1.2",
+  "version": "3.1.3",
   "description": "OAuth helper and remote fetcher for Uppy's (https://uppy.io) extensible file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox and Google Drive, S3 and more :dog:",
   "main": "lib/companion.js",
   "types": "lib/companion.d.ts",

+ 7 - 0
packages/@uppy/core/CHANGELOG.md

@@ -1,5 +1,12 @@
 # @uppy/core
 
+## 2.1.4
+
+Released: 2021-12-09
+Included in: Uppy v2.3.1
+
+- @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)
+
 ## 2.1.3
 
 Released: 2021-12-07

+ 1 - 1
packages/@uppy/core/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/core",
   "description": "Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:",
-  "version": "2.1.3",
+  "version": "2.1.4",
   "license": "MIT",
   "main": "lib/index.js",
   "style": "dist/style.min.css",

+ 7 - 0
packages/@uppy/dashboard/CHANGELOG.md

@@ -1,5 +1,12 @@
 # @uppy/dashboard
 
+## 2.1.3
+
+Released: 2021-12-09
+Included in: Uppy v2.3.1
+
+- @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)
+
 ## 2.1.2
 
 Released: 2021-12-07

+ 1 - 1
packages/@uppy/dashboard/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/dashboard",
   "description": "Universal UI plugin for Uppy.",
-  "version": "2.1.2",
+  "version": "2.1.3",
   "license": "MIT",
   "main": "lib/index.js",
   "style": "dist/style.min.css",

+ 1 - 1
packages/@uppy/locales/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/locales",
   "description": "Uppy language packs",
-  "version": "2.0.4",
+  "version": "2.0.5",
   "license": "MIT",
   "keywords": [
     "uppy",

+ 2 - 2
packages/@uppy/robodog/README.md

@@ -20,8 +20,8 @@ We recommend installing from npm and then using a module bundler such as [Webpac
 Alternatively, you can also use this package in a pre-built bundle from Transloadit’s CDN: Edgly.
 
 ```html
-<link rel="stylesheet" href="https://releases.transloadit.com/uppy/v2.3.0/robodog.min.css">
-<script src="https://releases.transloadit.com/uppy/v2.3.0/robodog.min.js"></script>
+<link rel="stylesheet" href="https://releases.transloadit.com/uppy/v2.3.1/robodog.min.css">
+<script src="https://releases.transloadit.com/uppy/v2.3.1/robodog.min.js"></script>
 ```
 
 Then, a global `Robodog` variable will be available. For usage instructions, please see the [main Robodog documentation](https://uppy.io/docs/robodog).

+ 1 - 1
packages/@uppy/robodog/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/robodog",
   "description": "Transloadit SDK for browsers based on Uppy",
-  "version": "2.1.4",
+  "version": "2.1.5",
   "license": "MIT",
   "main": "lib/index.js",
   "jsnext:main": "src/index.js",

+ 8 - 0
packages/@uppy/store-redux/CHANGELOG.md

@@ -0,0 +1,8 @@
+# @uppy/store-redux
+
+## 2.0.3
+
+Released: 2021-12-09
+Included in: Uppy v2.3.1
+
+- @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)

+ 1 - 1
packages/@uppy/store-redux/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/store-redux",
   "description": "Make Uppy use your existing Redux store.",
-  "version": "2.0.2",
+  "version": "2.0.3",
   "license": "MIT",
   "main": "lib/index.js",
   "types": "types/index.d.ts",

+ 1 - 1
packages/@uppy/svelte/package.json

@@ -3,7 +3,7 @@
   "svelte": "src/index.js",
   "module": "dist/index.mjs",
   "main": "dist/index.js",
-  "version": "1.0.5",
+  "version": "1.0.6",
   "scripts": {
     "build": "rollup -c",
     "prepublishOnly": "yarn run build",

+ 1 - 1
packages/@uppy/vue/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@uppy/vue",
-  "version": "0.4.3",
+  "version": "0.4.4",
   "main": "lib/index.js",
   "types": "types/index.d.ts",
   "dependencies": {

+ 7 - 0
packages/@uppy/xhr-upload/CHANGELOG.md

@@ -1,5 +1,12 @@
 # @uppy/xhr-upload
 
+## 2.0.7
+
+Released: 2021-12-09
+Included in: Uppy v2.3.1
+
+- @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)
+
 ## 2.0.6
 
 Released: 2021-12-07

+ 1 - 1
packages/@uppy/xhr-upload/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@uppy/xhr-upload",
   "description": "Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.",
-  "version": "2.0.6",
+  "version": "2.0.7",
   "license": "MIT",
   "main": "lib/index.js",
   "types": "types/index.d.ts",

+ 1 - 1
packages/uppy/package.json

@@ -1,7 +1,7 @@
 {
   "name": "uppy",
   "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:",
-  "version": "2.3.0",
+  "version": "2.3.1",
   "license": "MIT",
   "main": "index.js",
   "module": "index.mjs",

+ 5 - 5
website/src/docs/index.md

@@ -19,12 +19,12 @@ Here’s the simplest example html page with Uppy (it uses a CDN bundle, while w
   <head>
     <meta charset="utf-8">
     <title>Uppy</title>
-    <link href="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.css" rel="stylesheet">
+    <link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
   </head>
   <body>
     <div id="drag-drop-area"></div>
 
-    <script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
+    <script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
     <script>
       var uppy = new Uppy.Core()
         .use(Uppy.Dashboard, {
@@ -118,13 +118,13 @@ You can also use a pre-built bundle from Transloadit’s CDN: Edgly. `Uppy` will
 1\. Add a script at the bottom of the closing `</body>` tag:
 
 ```html
-<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
 ```
 
 2\. Add CSS to `<head>`:
 
 ```html
-<link href="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.css" rel="stylesheet">
+<link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
 ```
 
 3\. Initialize at the bottom of the closing `</body>` tag:
@@ -183,5 +183,5 @@ export * from '@uppy/core'
 If you’re using Uppy from CDN, those polyfills are already included in the bundle, no need to include anything additionally:
 
 ```html
-<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
 ```

+ 2 - 2
website/src/docs/locales.md

@@ -34,8 +34,8 @@ const uppy = new Uppy({
 Add a `<script>` tag with Uppy bundle and the locale pack you’d like to use. You can copy/paste the link from the CDN column in the [locales table](#List-of-locale-packs). The locale will attach itself to the `Uppy.locales` object.
 
 ```html
-<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
-<script src="https://releases.transloadit.com/uppy/locales/v2.0.4/de_DE.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/locales/v2.0.5/de_DE.min.js"></script>
 
 <script>
 var uppy = new Uppy.Core({

+ 3 - 3
website/src/docs/migration-guides.md

@@ -41,11 +41,11 @@ If you’re using Uppy from a CDN, we now provide two bundles: one for up-to-dat
 
 ```html
 <!-- Modern browsers (recommended) -->
-<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
 
 <!-- Legacy browsers (IE11+) -->
-<script nomodule src="https://releases.transloadit.com/uppy/v2.3.0/uppy.legacy.min.js"></script>
-<script type="module">import "https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js";</script>
+<script nomodule src="https://releases.transloadit.com/uppy/v2.3.1/uppy.legacy.min.js"></script>
+<script type="module">import "https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js";</script>
 ```
 
 Please note that while you may be able to get 2.0 to work in IE11 this way, we do not officially support it anymore.

+ 3 - 3
website/src/docs/robodog-form.md

@@ -150,7 +150,7 @@ Make sure to also include the Uppy css file in your `<head>` tag in case you wan
 
 ```html
 <head>
-  <link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.4/robodog.min.css">
+  <link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.5/robodog.min.css">
 </head>
 ```
 
@@ -162,7 +162,7 @@ Notice how the form is submitted to the inexistant `/uploads` route once all tra
 <html>
   <head>
     <title>Testing Robodog</title>
-    <link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.4/robodog.min.css">
+    <link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.5/robodog.min.css">
   </head>
   <body>
     <form id="upload-form" action="/uploads" enctype="multipart/form-data" method="POST">
@@ -172,7 +172,7 @@ Notice how the form is submitted to the inexistant `/uploads` route once all tra
       <button type="submit">Upload</button>
     </form>
 
-    <script src="https://releases.transloadit.com/uppy/robodog/v2.1.4/robodog.min.js"></script>
+    <script src="https://releases.transloadit.com/uppy/robodog/v2.1.5/robodog.min.js"></script>
     <script type="text/javascript">
     window.Robodog.form('#upload-form', {
       waitForEncoding: true,

+ 2 - 2
website/src/docs/robodog.md

@@ -31,8 +31,8 @@ import '@uppy/robodog/dist/robodog.css'
 If you are not using a bundler, you can also import Robodog using an HTML script tag.
 
 ```html
-<link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.4/robodog.min.css">
-<script src="https://releases.transloadit.com/uppy/robodog/v2.1.4/robodog.min.js"></script>
+<link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.5/robodog.min.css">
+<script src="https://releases.transloadit.com/uppy/robodog/v2.1.5/robodog.min.js"></script>
 <!-- you can now use: window.Robodog.pick() -->
 ```
 

+ 1 - 1
website/src/examples/dashboard/app.es6

@@ -225,7 +225,7 @@ function loadLocaleFromCDN (localeName) {
   const head = document.getElementsByTagName('head')[0]
   const js = document.createElement('script')
   js.type = 'text/javascript'
-  js.src = `https://releases.transloadit.com/uppy/locales/v2.0.4/${localeName}.min.js`
+  js.src = `https://releases.transloadit.com/uppy/locales/v2.0.5/${localeName}.min.js`
 
   head.appendChild(js)
 }

+ 12 - 13
website/src/examples/dragdrop/app.es6

@@ -4,20 +4,19 @@ const ProgressBar = require('@uppy/progress-bar')
 const Tus = require('@uppy/tus')
 
 // Function for displaying uploaded files
-const onUploadSuccess = (elForUploadedFiles) =>
-  (file, response) => {
-    const url = response.uploadURL
-    const fileName = file.name
+const onUploadSuccess = (elForUploadedFiles) => (file, response) => {
+  const url = response.uploadURL
+  const fileName = file.name
 
-    const li = document.createElement('li')
-    const a = document.createElement('a')
-    a.href = url
-    a.target = '_blank'
-    a.appendChild(document.createTextNode(fileName))
-    li.appendChild(a)
+  const li = document.createElement('li')
+  const a = document.createElement('a')
+  a.href = url
+  a.target = '_blank'
+  a.appendChild(document.createTextNode(fileName))
+  li.appendChild(a)
 
-    document.querySelector(elForUploadedFiles).appendChild(li)
-  }
+  document.querySelector(elForUploadedFiles).appendChild(li)
+}
 
 const uppyOne = new Uppy({ debug: true, autoProceed: true })
 uppyOne
@@ -34,6 +33,6 @@ uppyTwo
   .on('upload-success', onUploadSuccess('.example-two .uploaded-files ol'))
 
 const uploadBtn = document.querySelector('.example-two button.upload-button')
-uploadBtn.addEventListener('click', function () {
+uploadBtn.addEventListener('click', () => {
   uppyTwo.upload()
 })

+ 3 - 3
website/src/examples/i18n/app.html

@@ -1,7 +1,7 @@
 <!-- Load Uppy CSS bundle. It is advisable to install Uppy
   from npm/yarn instead, and pick and choose the plugins/styles you need.
   But for experimenting, you can use Transloadit’s CDN, Edgly: -->
-<link rel="stylesheet" href="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.css">
+<link rel="stylesheet" href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css">
 
 <div class="UppyDragDrop"></div>
 <div class="for-ProgressBar"></div>
@@ -12,8 +12,8 @@
 </div>
 
 <!-- Load Uppy JS bundle. -->
-<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
-<script src="https://releases.transloadit.com/uppy/locales/v2.0.4/ru_RU.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
+<script src="https://releases.transloadit.com/uppy/locales/v2.0.5/ru_RU.min.js"></script>
 <script>
   var uppy = new Uppy.Core({
     debug: true,

+ 26 - 27
website/src/examples/markdown-snippets/app.es6

@@ -3,7 +3,7 @@ const marked = require('marked')
 const dragdrop = require('drag-drop')
 // Add Robodog JS. It is advisable to install Robodog from npm/yarn.
 // But for experimenting, you can use also Transloadit’s CDN, Edgly:
-// <script src="https://releases.transloadit.com/uppy/robodog/v2.1.4/robodog.min.js"></script>
+// <script src="https://releases.transloadit.com/uppy/robodog/v2.1.5/robodog.min.js"></script>
 const robodog = require('@uppy/robodog')
 
 const TRANSLOADIT_EXAMPLE_KEY = '35c1aed03f5011e982b6afe82599b6a0'
@@ -30,7 +30,8 @@ class MarkdownTextarea {
     this.uploadLine.classList.add('form-upload')
 
     this.uploadLine.appendChild(
-      document.createTextNode('Tap here to upload an attachment'))
+      document.createTextNode('Tap here to upload an attachment'),
+    )
   }
 
   install () {
@@ -86,24 +87,6 @@ class MarkdownTextarea {
     })
   }
 
-  matchFilesAndThumbs (results) {
-    const filesById = {}
-    const thumbsById = {}
-
-    results.forEach((result) => {
-      if (result.stepName === 'thumbnails') {
-        thumbsById[result.original_id] = result
-      } else {
-        filesById[result.original_id] = result
-      }
-    })
-
-    return Object.keys(filesById).map((key) => ({
-      file : filesById[key],
-      thumb : thumbsById[key],
-    }))
-  }
-
   uploadFiles (files) {
     robodog.upload(files, {
       waitForEncoding: true,
@@ -114,7 +97,7 @@ class MarkdownTextarea {
     }).then((result) => {
       if (result === null) return
       this.insertAttachments(
-        this.matchFilesAndThumbs(result.results)
+        matchFilesAndThumbs(result.results),
       )
     }).catch((err) => {
       console.error(err)
@@ -139,7 +122,7 @@ class MarkdownTextarea {
     }).then((result) => {
       if (result === null) return
       this.insertAttachments(
-        this.matchFilesAndThumbs(result.results)
+        matchFilesAndThumbs(result.results),
       )
     }).catch((err) => {
       console.error(err)
@@ -177,11 +160,29 @@ function loadSnippets () {
   }
 }
 
+function matchFilesAndThumbs (results) {
+  const filesById = {}
+  const thumbsById = {}
+
+  results.forEach((result) => {
+    if (result.stepName === 'thumbnails') {
+      thumbsById[result.original_id] = result
+    } else {
+      filesById[result.original_id] = result
+    }
+  })
+
+  return Object.keys(filesById).map((key) => ({
+    file : filesById[key],
+    thumb : thumbsById[key],
+  }))
+}
+
 document.querySelector('#new').addEventListener('submit', (event) => {
   event.preventDefault()
 
-  const title = event.target.querySelector('input[name="title"]').value ||
-    'Unnamed Snippet'
+  const title = event.target.elements['title'].value
+    || 'Unnamed Snippet'
   const text = textarea.element.value
 
   saveSnippet(title, text)
@@ -191,6 +192,4 @@ document.querySelector('#new').addEventListener('submit', (event) => {
   event.target.querySelector('textarea').value = ''
 })
 
-window.addEventListener('DOMContentLoaded', () => {
-  loadSnippets()
-})
+window.addEventListener('DOMContentLoaded', loadSnippets, { once: true })

+ 1 - 1
website/src/examples/markdown-snippets/app.html

@@ -1,6 +1,6 @@
 <!-- Add Robodog styles. It is advisable to install Robodog from npm/yarn.
   But for experimenting, you can use also Transloadit’s CDN, Edgly:
-  <link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.4/robodog.min.css"> -->
+  <link rel="stylesheet" href="https://releases.transloadit.com/uppy/robodog/v2.1.5/robodog.min.css"> -->
   <link rel="stylesheet" href="/uppy/robodog.min.css">
   <form id="new" class="form-snippet">
     <h2>Create a new snippet</h2>

+ 2 - 2
website/src/examples/statusbar/app.es6

@@ -3,12 +3,12 @@ const FileInput = require('@uppy/file-input')
 const StatusBar = require('@uppy/status-bar')
 const Tus = require('@uppy/tus')
 
-const uppyOne = new Uppy({debug: true, autoProceed: true})
+const uppyOne = new Uppy({ debug: true, autoProceed: true })
 uppyOne
   .use(FileInput, { target: '.UppyInput', pretty: false })
   .use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })
   .use(StatusBar, {
     target: '.UppyInput-Progress',
     hideUploadButton: true,
-    hideAfterFinish: false
+    hideAfterFinish: false,
   })

+ 29 - 27
website/src/examples/transloadit/app.es6

@@ -5,13 +5,15 @@ const Transloadit = require('@uppy/transloadit')
 const Instagram = require('@uppy/instagram')
 const Facebook = require('@uppy/facebook')
 const Zoom = require('@uppy/zoom')
-const { createHmac } = require('crypto')
 const COMPANION = require('../env')
 
-function sha1 (key, text) {
-  return createHmac('sha1', key)
-    .update(text)
-    .digest('hex')
+const enc = new TextEncoder('utf-8')
+async  function sha1 (secret, body) {
+  const algorithm = { name: 'HMAC', hash: 'SHA-1' }
+
+  const key = await crypto.subtle.importKey('raw', enc.encode(secret), algorithm, false, ['sign', 'verify'])
+  const signature = await crypto.subtle.sign(algorithm.name, key, enc.encode(body))
+  return Array.from(new Uint8Array(signature), x => x.toString(16).padStart(2, '0')).join('')
 }
 
 function initUppy (opts = {}) {
@@ -28,13 +30,13 @@ function initUppy (opts = {}) {
       maxFileSize: 1024 * 1024 * 1024,
       maxNumberOfFiles: 2,
       minNumberOfFiles: 1,
-      allowedFileTypes
+      allowedFileTypes,
     },
     locale: {
       strings: {
-        youCanOnlyUploadFileTypes: 'You can only upload images'
-      }
-    }
+        youCanOnlyUploadFileTypes: 'You can only upload images',
+      },
+    },
   })
 
   function getExpiration (future) {
@@ -44,12 +46,12 @@ function initUppy (opts = {}) {
       .replace(/\.\d+Z$/, '+00:00')
   }
 
-  function getAssemblyOptions () {
+  async function getAssemblyOptions () {
     const hasSecret = opts.secret != null
     let params = {
       auth: {
         key: window.TRANSLOADIT_API_KEY,
-        expires: hasSecret ? getExpiration(5 * 60 * 1000) : undefined
+        expires: hasSecret ? getExpiration(5 * 60 * 1000) : undefined,
       },
       // It's more secure to use a template_id and enable
       // Signature Authentication
@@ -61,18 +63,18 @@ function initUppy (opts = {}) {
           resize_strategy: 'fit',
           text: [
             {
-              text: `© ${(new Date).getFullYear()} Transloadit.com`,
+              text: `© ${(new Date()).getFullYear()} Transloadit.com`,
               size: 12,
               font: 'Ubuntu',
               color: '#eeeeee',
               valign: 'bottom',
               align: 'right',
               x_offset: 16,
-              y_offset: -10
-            }
-          ]
-        }
-      }
+              y_offset: -10,
+            },
+          ],
+        },
+      },
     }
 
     if (zoomMode) {
@@ -83,7 +85,7 @@ function initUppy (opts = {}) {
           result: true,
           ffmpeg_stack: 'v3.3.3',
           preset: 'ipad-high',
-          resize_strategy: 'fillcrop'
+          resize_strategy: 'fillcrop',
         },
         watermarked: {
           use: 'resized',
@@ -96,15 +98,15 @@ function initUppy (opts = {}) {
           watermark_size: '25%',
           watermark_url: 'https://demos.transloadit.com/inputs/transloadit-padded.png',
           watermark_x_offset: -10,
-          watermark_y_offset: 10
-        }
+          watermark_y_offset: 10,
+        },
       }
     }
 
     let signature
     if (opts.secret) {
       params = JSON.stringify(params)
-      signature = sha1(opts.secret, params)
+      signature = await sha1(opts.secret, params)
     }
 
     return { params, signature }
@@ -113,22 +115,22 @@ function initUppy (opts = {}) {
   uppy
     .use(Transloadit, {
       getAssemblyOptions,
-      waitForEncoding: true
+      waitForEncoding: true,
     })
     .use(Dashboard, {
       inline: true,
       maxHeight: 400,
       target: '#uppy-dashboard-container',
-      note: 'Images only, 1–2 files, up to 1 MB'
+      note: 'Images only, 1–2 files, up to 1 MB',
     })
     .use(Instagram, {
       target: Dashboard,
       companionUrl: 'https://api2.transloadit.com/companion',
-      companionAllowedHosts: Transloadit.COMPANION_PATTERN
+      companionAllowedHosts: Transloadit.COMPANION_PATTERN,
     })
     .use(Facebook, {
       target: Dashboard,
-      companionUrl: COMPANION
+      companionUrl: COMPANION,
     })
     .use(Webcam, { target: Dashboard, modes: ['picture'] })
 
@@ -136,14 +138,14 @@ function initUppy (opts = {}) {
     uppy.use(Zoom, {
       target: Dashboard,
       companionUrl: 'https://api2.transloadit.com/companion',
-      companionAllowedHosts: Transloadit.COMPANION_PATTERN
+      companionAllowedHosts: Transloadit.COMPANION_PATTERN,
     })
   }
 
   uppy
     .on('transloadit:result', (stepName, result) => {
       const file = uppy.getFile(result.localId)
-      var resultContainer = document.createElement('div')
+      const resultContainer = document.createElement('div')
       if (!zoomMode) {
         resultContainer.innerHTML = `
           <div>

+ 2 - 2
website/themes/uppy/layout/index.ejs

@@ -187,8 +187,8 @@
   <p>© <%- date(Date.now(), 'YYYY') %> <a href="https://transloadit.com" target="_blank">Transloadit</a></p>
 </footer>
 
-<link href="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.css" rel="stylesheet">
-<script src="https://releases.transloadit.com/uppy/v2.3.0/uppy.min.js"></script>
+<link href="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.css" rel="stylesheet">
+<script src="https://releases.transloadit.com/uppy/v2.3.1/uppy.min.js"></script>
 
 <script>
   var TUS_ENDPOINT = 'https://tusd.tusdemo.net/files/'