Ver código fonte

@uppy/transloadit: fix `COMPANION_PATTERN` export (#3820)

The export was renamed during during the ESM transition, which was an unintended breaking change. This commit restores the missing export.

Refs: https://github.com/transloadit/uppy/pull/3725
Antoine du Hamel 2 anos atrás
pai
commit
6355c23166
1 arquivos alterados com 5 adições e 3 exclusões
  1. 5 3
      packages/@uppy/transloadit/src/index.js

+ 5 - 3
packages/@uppy/transloadit/src/index.js

@@ -835,12 +835,14 @@ export default class Transloadit extends BasePlugin {
 }
 
 export {
-  COMPANION,
   ALLOWED_COMPANION_PATTERN,
+  COMPANION,
+  ALLOWED_COMPANION_PATTERN as COMPANION_PATTERN,
 }
 
-// Backward compatibility: we want `COMPANION` and `ALLOWED_COMPANION_PATTERN`
+// Backward compatibility: we want `COMPANION` and `COMPANION_PATTERN`
 // to keep being accessible as static properties of `Transloadit` to avoid a
 // breaking change.
-Transloadit.COMPANION = COMPANION // TODO: remove this line on the next major
 Transloadit.ALLOWED_COMPANION_PATTERN = ALLOWED_COMPANION_PATTERN // TODO: remove this line on the next major
+Transloadit.COMPANION = COMPANION // TODO: remove this line on the next major
+Transloadit.COMPANION_PATTERN = ALLOWED_COMPANION_PATTERN // TODO: remove this line on the next major