-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: export Core as Uppy #3981
Conversation
Something is messed up with tests and import/export or config 🤔 @aduh95 do you see what could be the issue? |
Maybe it’s fixed with updated |
static COMPANION = 'https://api2.transloadit.com/companion' | ||
|
||
// Regex matching acceptable postMessage() origins for authentication feedback from companion. | ||
static ALLOWED_COMPANION_PATTERN = /\.transloadit\.com$/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though we would not do that, and instead define them as static only in the bundle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this breaking change to #3913?
const COMPANION = 'https://api2.transloadit.com/companion' | ||
// Regex matching acceptable postMessage() origins for authentication feedback from companion. | ||
const ALLOWED_COMPANION_PATTERN = /\.transloadit\.com$/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a breaking change already, good opportunity to use more intention revealing names. COMPANION
sounds like it contains the instance.
const COMPANION = 'https://api2.transloadit.com/companion' | |
// Regex matching acceptable postMessage() origins for authentication feedback from companion. | |
const ALLOWED_COMPANION_PATTERN = /\.transloadit\.com$/ | |
const COMPANION_URL = 'https://api2.transloadit.com/companion' | |
// Regex matching acceptable postMessage() origins for authentication feedback from companion. | |
const COMPANION_URL_PATTERN = /\.transloadit\.com$/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a breaking change now, we decided to just add exports to the CDN bundle.
packages/uppy/index.mjs
Outdated
export { COMPANION as TRANSLOADIT_COMPANION } from '@uppy/transloadit' | ||
export { ALLOWED_COMPANION_PATTERN as TRANSLOADIT_ALLOWED_COMPANION_PATTERN } from '@uppy/transloadit' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export { COMPANION as TRANSLOADIT_COMPANION } from '@uppy/transloadit' | |
export { ALLOWED_COMPANION_PATTERN as TRANSLOADIT_ALLOWED_COMPANION_PATTERN } from '@uppy/transloadit' | |
import { default as Transloadit, COMPANION, ALLOWED_COMPANION_PATTERN } from '@uppy/transloadit' | |
Transloadit.COMPANION = COMPANION | |
Transloadit.ALLOWED_COMPANION_PATTERN = ALLOWED_COMPANION_PATTERN |
`Uppy` call is now exported as `Uppy` instead of `Core`. Refs: transloadit#3981
`Uppy` call is now exported as `Uppy` instead of `Core`. Refs: transloadit#3981
`Uppy` call is now exported as `Uppy` instead of `Core`. Refs: #3981
No description provided.