-
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
@uppy/transloadit: remove deprecated options #5056
Conversation
* 4.x: (27 commits) Release: uppy@4.0.0-beta.1 (#5047) @uppy/vue: migrate to Composition API with TS & drop Vue 2 support (#5043) @uppy/angular,meta: upgrade to Angular 17.x and to TS 5.4 (#5008) @uppy/svelte: remove UMD output and make it use newer types (#5023) fix type imports (#5038) @uppy/aws-s3-multipart: mark `opts` as optional (#5039) e2e: bump Cypress version (#5034) @uppy/react: remove `prop-types` dependency (#5031) @uppy/progress-bar: remove default target (#4971) @uppy/status-bar: remove default target (#4970) @uppy/react: remove `Wrapper.ts` (#5032) @uppy/react: refactor to TS (#5012) @uppy/core: refine type of private variables (#5028) @uppy/dashboard: refine type of private variables (#5027) @uppy/drag-drop: refine type of private variables (#5026) @uppy/status-bar: refine type of private variables (#5025) @uppy/remote-sources: migrate to TS (#5020) @uppy/dashboard: refine option types (#5022) @uppy/dashboard: add new `autoOpen` option (#5001) Make `allowedMetaFields` consistent (#5011) ...
Diff output filesdiff --git a/packages/@uppy/transloadit/lib/index.js b/packages/@uppy/transloadit/lib/index.js
index 82409b5..928b179 100644
--- a/packages/@uppy/transloadit/lib/index.js
+++ b/packages/@uppy/transloadit/lib/index.js
@@ -14,7 +14,7 @@ import ErrorWithCause from "@uppy/utils/lib/ErrorWithCause";
import hasProperty from "@uppy/utils/lib/hasProperty";
import { RateLimitedQueue } from "@uppy/utils/lib/RateLimitedQueue";
import Assembly from "./Assembly.js";
-import AssemblyOptionsBuilder, { validateParams } from "./AssemblyOptions.js";
+import AssemblyOptionsBuilder from "./AssemblyOptions.js";
import AssemblyWatcher from "./AssemblyWatcher.js";
import Client from "./Client.js";
import locale from "./locale.js";
@@ -37,10 +37,6 @@ const defaultOptions = {
waitForMetadata: false,
alwaysRunAssembly: false,
importFromUploadURLs: false,
- signature: null,
- params: null,
- fields: null,
- getAssemblyOptions: null,
limit: 20,
retryDelays: [7000, 10000, 15000, 20000],
clientName: null,
@@ -69,7 +65,7 @@ var _onError = _classPrivateFieldLooseKey("onError");
var _onTusError = _classPrivateFieldLooseKey("onTusError");
export default class Transloadit extends BasePlugin {
constructor(uppy, opts) {
- var _this, _this$opts, _this$opts$assemblyOp, _this$opts$getAssembl;
+ var _this;
super(uppy, {
...defaultOptions,
...opts,
@@ -300,8 +296,8 @@ export default class Transloadit extends BasePlugin {
[uploadID]: [],
},
});
- const assemblyOptions = new AssemblyOptionsBuilder(filesWithoutErrors, this.opts);
- await assemblyOptions.build().then(assemblies => Promise.all(assemblies.map(createAssembly))).then(
+ const builder = new AssemblyOptionsBuilder(filesWithoutErrors, this.opts);
+ await builder.build().then(assemblies => Promise.all(assemblies.map(createAssembly))).then(
maybeCreatedAssemblies => {
const createdAssemblies = maybeCreatedAssemblies.filter(Boolean);
const assemblyIDs = createdAssemblies.map(assembly => assembly.status.assembly_id);
@@ -414,20 +410,6 @@ export default class Transloadit extends BasePlugin {
this.type = "uploader";
this.id = this.opts.id || "Transloadit";
this.defaultLocale = locale;
- (_this$opts$assemblyOp = (_this$opts = this.opts).assemblyOptions) != null
- ? _this$opts$assemblyOp
- : _this$opts.assemblyOptions = (_this$opts$getAssembl = this.opts.getAssemblyOptions) != null
- ? _this$opts$getAssembl
- : {
- params: this.opts.params,
- signature: this.opts.signature,
- fields: this.opts.fields,
- };
- if (
- (opts == null ? void 0 : opts.params) != null && opts.getAssemblyOptions == null && opts.assemblyOptions == null
- ) {
- validateParams(this.opts.assemblyOptions.params);
- }
_classPrivateFieldLooseBase(this, _rateLimitedQueue)[_rateLimitedQueue] = new RateLimitedQueue(this.opts.limit);
this.i18nInit();
this.client = new Client({
@@ -836,6 +818,4 @@ function _connectAssembly2(assembly) {
return assembly;
}
Transloadit.VERSION = packageJson.version;
-Transloadit.COMPANION = COMPANION_URL;
-Transloadit.COMPANION_PATTERN = COMPANION_ALLOWED_HOSTS;
export { COMPANION_ALLOWED_HOSTS, COMPANION_URL }; |
There are some CI failures to address |
assemblyOptions?: never | ||
} | ||
) | ||
|
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.
While we are breaking, can we rename service to endpoint as to be consistent with other integrations?
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.
We should probably support both, and keep service
as a deprecated alias
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 can do it in a separate PR 👍
| Package | Version | Package | Version | | ------------------------- | ------------ | ------------------------- | ------------ | | @uppy/angular | 0.7.0-beta.2 | @uppy/instagram | 4.0.0-beta.2 | | @uppy/audio | 2.0.0-beta.2 | @uppy/onedrive | 4.0.0-beta.2 | | @uppy/aws-s3 | 4.0.0-beta.2 | @uppy/progress-bar | 4.0.0-beta.2 | | @uppy/aws-s3-multipart | 4.0.0-beta.2 | @uppy/provider-views | 4.0.0-beta.2 | | @uppy/box | 3.0.0-beta.2 | @uppy/react | 4.0.0-beta.2 | | @uppy/companion | 5.0.0-beta.2 | @uppy/remote-sources | 2.0.0-beta.2 | | @uppy/companion-client | 4.0.0-beta.2 | @uppy/screen-capture | 4.0.0-beta.2 | | @uppy/compressor | 2.0.0-beta.2 | @uppy/status-bar | 4.0.0-beta.2 | | @uppy/core | 4.0.0-beta.2 | @uppy/thumbnail-generator | 4.0.0-beta.2 | | @uppy/dashboard | 4.0.0-beta.2 | @uppy/transloadit | 4.0.0-beta.2 | | @uppy/drag-drop | 4.0.0-beta.2 | @uppy/tus | 4.0.0-beta.2 | | @uppy/drop-target | 3.0.0-beta.2 | @uppy/unsplash | 4.0.0-beta.2 | | @uppy/dropbox | 4.0.0-beta.2 | @uppy/url | 4.0.0-beta.2 | | @uppy/facebook | 4.0.0-beta.2 | @uppy/utils | 6.0.0-beta.2 | | @uppy/file-input | 4.0.0-beta.2 | @uppy/webcam | 4.0.0-beta.2 | | @uppy/golden-retriever | 4.0.0-beta.2 | @uppy/zoom | 3.0.0-beta.2 | | @uppy/google-drive | 4.0.0-beta.2 | uppy | 4.0.0-beta.2 | - @uppy/aws-s3: default to multipart depending on the size of input (Antoine du Hamel / #5076) - @uppy/aws-s3: remove deprecated `prepareUploadParts` option (Antoine du Hamel / #5075) - @uppy/core: use variadic arguments for `uppy.use` (Antoine du Hamel / #4888) - @uppy/aws-s3: remove legacy plugin (Antoine du Hamel / #5070) - @uppy/locales: do not build `dist/` folder (Merlijn Vos / #5055) - @uppy/angular: fix Angular version requirement in peerDeps (Antoine du Hamel / #5067) - @uppy/transloadit: remove deprecated options (Merlijn Vos / #5056) | Package | Version | Package | Version | | ---------------- | ------- | ---------------- | ------- | | @uppy/companion | 4.13.1 | uppy | 3.24.1 | | @uppy/file-input | 3.1.1 | | | - @uppy/companion: upgrade redis (Mikael Finstad / #5065) - meta: fix `watch:*` scripts (Antoine du Hamel / #5046) - meta: include more packages in `compare_diff` CI (Antoine du Hamel / #5044) - @uppy/file-input: add missing export (Antoine du Hamel / #5045) - meta: Bump express from 4.18.1 to 4.19.2 in /packages/@uppy/companion (dependabot[bot] / #5036) - @uppy/companion: Bump express from 4.18.1 to 4.19.2 (dependabot[bot] / #5037)
In preparation for #4765