hunk.code_window: import Uppy = require('@uppy/core')
   import ImageEditorLocale = require('./generatedLocale')
   declare module ImageEditor {
     type Actions {
       revert: boolean
       rotate: boolean
       flip: boolean
       zoomIn: boolean
       zoomOut: boolean
  
hunk.labels: keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:   type Actions = {
  
hunk.file_path: packages/@uppy/image-editor/types/index.d.ts
hunk.type: replace
file: ---
  title: "Uppy 1.8 and 1.9: security, error handling and better types"
  date: 2020-03-09
  author: arturi
  published: true
  ---
  
  Uppy 1.8, 1.9 and a few important security patches are out! Here are the highlights:
  
  <!--more-->
  
  ## Companion: security patches and new Instagram API
  
  * We released a patch to an SSRF vulnerability affecting `@uppy/companion` and the `@uppy/url` plugin. Many thanks to the parties involved in [reporting and disclosing](https://hackerone.com/reports/786956) this vulnerability to the Uppy team. The patch is available in [@uppy/companion version 1.9.5](https://github.com/transloadit/uppy/blob/master/CHANGELOG.md#194).
  * As the Instagram Legacy API will soon no longer be available, we have now added support for the new Instagram Graph API. As far as using this on `@uppy/companion` goes, not much has changed. The only difference is that you will now be retrieving your Instagram credentials from the [Facebook Developer Platform](https://developers.facebook.com/), and no longer from the [Instagram Developer Platform](https://www.instagram.com/developer/).
  
  ## Error handling
  
  * We’ve significantly improved error handling and retries in `@uppy/core`, `@uppy/transloadit` and `@uppy/dashboard`. The retry button on the Status Bar, which was broken in some edge cases, now works as expected.
  * Errors from Transloadit assemblies now include Assembly ID, as well as the full assembly object, for easier debugging.
  * You can now click on the question mark (?) icon on the Informer or Dashboard error message, and get a browser alert with error details — much easier for the users to copy-paste the text this way. The Informer now also conveniently stays on screen, as long as you hover over the question mark.
  
  ## Dashboard
  
  The Dashboard plugin has gained new file type icons: for images — useful before the preview is generated, or when there’s no preview at all, like with images from the Url plugin — and for archives.
  
  ![](/images/blog/1.9/file-type-icons.png)
  
  ## Types
  
  Our typings got a significant upgrade: plugin options can now be type-checked! In the past, we did have typings for plugin options, but the `uppy.use()` function had a fallback that would accept _any_ object as options. If your plugin options were wrong, typescript would just use the fallback and not tell you about it!
  
  Stricter typings normally mean that old code may no longer type-check. So, although this is a bugfix, you have to opt into the new types. In 2.0, the old way will be removed and only the strict types will be available.
  
  You can opt in by specifying the `StrictTypes` type parameter to the `Uppy` type:
  
  ```typescript
  import Uppy = require('@uppy/core')
  const uppy = Uppy<Uppy.StrictTypes>({
    // options here
  })
  ```
  
  This type parameter must also be specified if you are storing the `uppy` instance anywhere. For example, inside a class:
  
  ```typescript
  class UppyProvider extends React.Component {
    private uppy: Uppy<Uppy.StrictTypes>
    constructor (props) {
      super(props)
      this.uppy = Uppy<Uppy.StrictTypes>({
        // etc
      })
    }
  }
  ```
  
  If you do not specify the `StrictTypes` parameter, the old fallback for the `uppy.use()` method remains available.
  
  The typings for `@uppy/react` component props are now derived from plugin options types, so they will no longer get out of sync, as they occasionally did in the past. For example, in version 1.7, the `@uppy/drag-drop` plugin supported a `note` option to add some text to the drop area. The React typings didn't include that option, so you couldn't use it from typescript! That is now permanently fixed:
  
  ```typescript
  import components = require('@uppy/react')
  const { DragDrop } = components
  
  // assuming some `uppy` variable already exists
  declare var uppy: Uppy<Uppy.StrictTypes>
  
  function MyComponent () {
    return (
      <DragDrop
        uppy={uppy}
        note='This prop is now supported!'
      />
    )
  }
  ```
  
  Finally, the `locale` options and React props now have full typings. Your editor should now be able to provide autocompletion for language keys!
  
  ![Screenshot showing VS Code autocompletion for a language key.](/images/blog/1.9/locale-type.png)
  
  We now also use `tsd`, so our typings are actually tested.
  
  See [PR #1918](https://github.com/transloadit/uppy/pull/1918) for all the details.
  
  ## Downloadable ZIP archives of Uppy releases
  
  Uppy is now available as a downloadable ZIP archive from the Transloadit CDN! NPM down? Don’t like build tools? Looking for a quick way to play around with Uppy? We’ve got you covered:
  
  ```
  https://releases.transloadit.com/uppy/v1.9.3/uppy-v1.9.3.zip
  ```
  
  ## Locales
  
  * Uppy now speaks Korean and Vietnamese.
  * The French, German and Chinese (zh_TW) translations have been improved.
  
  ## Misc
  
  - @uppy/core: core: setState(modifiedFiles) in onBeforeUpload (#2028 / @arturi)
  - @uppy/core: always log errors (#2029 / @arturi)
  - @uppy/core: fix mime type checking bug (#2004 / @shahimclt)
  - @uppy/core: add .tsv and .tab: text/tab-separated-values (#2056 / @arturi)
  - @uppy/onedrive: make encryption shorter + enable onedrive on website (#2034 / @ifedapoolarewaju)
  - @uppy/react: use `componentDidUpdate` instead of `componentWillReceiveProps` (@cryptic022, #1999)
  - @uppy/xhr-upload: free item from rate limit queue when upload times out (@rtaieb, #2018)
  - @uppy/aws-s3-multipart: add optional headers for signed url (@ardeois, #1985)
  - @uppy/aws-s3: fix crash when S3 response does not have a Content-Type header (@roenschg, #2012)
  
  As always, you can find the full list of changes and package versions, as well as future plans, in our [changelog](https://github.com/transloadit/uppy/blob/master/CHANGELOG.md).
  