Skip to content
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/svelte: fix generated module to not bundle Svelte #5446

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Sep 3, 2024

Fixes #5442

We were bundling Svelte internal code, when we also list svelte as a peer dependencies. There was also an assumption that Uppy classes would be global, when we should instead import them.

@aduh95 aduh95 requested a review from Murderlon September 3, 2024 13:04
Copy link
Contributor

github-actions bot commented Sep 3, 2024

Diff output files
diff --git a/packages/@uppy/svelte/lib/index.js b/packages/@uppy/svelte/lib/index.js
index eb06a05..c592ce6 100644
--- a/packages/@uppy/svelte/lib/index.js
+++ b/packages/@uppy/svelte/lib/index.js
@@ -1,507 +1,20 @@
-import "@uppy/dashboard";
-import "@uppy/drag-drop";
-import "@uppy/progress-bar";
-import "@uppy/status-bar";
-
-/** @returns {void} */
-function noop() {}
-
-function run(fn) {
-  return fn();
-}
-
-function blank_object() {
-  return Object.create(null);
-}
-
-/**
- * @param {Function[]} fns
- * @returns {void}
- */
-function run_all(fns) {
-  fns.forEach(run);
-}
-
-/**
- * @param {any} thing
- * @returns {thing is Function}
- */
-function is_function(thing) {
-  return typeof thing === "function";
-}
-
-/** @returns {boolean} */
-function safe_not_equal(a, b) {
-  return a != a ? b == b : a !== b || (a && typeof a === "object") || typeof a === "function";
-}
-
-/** @returns {boolean} */
-function is_empty(obj) {
-  return Object.keys(obj).length === 0;
-}
-
-/**
- * @param {Node} target
- * @param {Node} node
- * @param {Node} [anchor]
- * @returns {void}
- */
-function insert(target, node, anchor) {
-  target.insertBefore(node, anchor || null);
-}
-
-/**
- * @param {Node} node
- * @returns {void}
- */
-function detach(node) {
-  if (node.parentNode) {
-    node.parentNode.removeChild(node);
-  }
-}
-
-/**
- * @template {keyof HTMLElementTagNameMap} K
- * @param {K} name
- * @returns {HTMLElementTagNameMap[K]}
- */
-function element(name) {
-  return document.createElement(name);
-}
-
-/**
- * @param {Element} node
- * @param {string} attribute
- * @param {string} [value]
- * @returns {void}
- */
-function attr(node, attribute, value) {
-  if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);
-}
-
-/**
- * @param {Element} element
- * @returns {ChildNode[]}
- */
-function children(element) {
-  return Array.from(element.childNodes);
-}
-
-/**
- * @typedef {Node & {
- * 	claim_order?: number;
- * 	hydrate_init?: true;
- * 	actual_end_child?: NodeEx;
- * 	childNodes: NodeListOf<NodeEx>;
- * }} NodeEx
- */
-
-/** @typedef {ChildNode & NodeEx} ChildNodeEx */
-
-/** @typedef {NodeEx & { claim_order: number }} NodeEx2 */
-
-/**
- * @typedef {ChildNodeEx[] & {
- * 	claim_info?: {
- * 		last_index: number;
- * 		total_claimed: number;
- * 	};
- * }} ChildNodeArray
- */
-
-let current_component;
-
-/** @returns {void} */
-function set_current_component(component) {
-  current_component = component;
-}
-
-function get_current_component() {
-  if (!current_component) throw new Error("Function called outside component initialization");
-  return current_component;
-}
-
-/**
- * Schedules a callback to run immediately before the component is unmounted.
- *
- * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the
- * only one that runs inside a server-side component.
- *
- * https://svelte.dev/docs/svelte#ondestroy
- * @param {() => any} fn
- * @returns {void}
- */
-function onDestroy(fn) {
-  get_current_component().$$.on_destroy.push(fn);
-}
-
-const dirty_components = [];
-const binding_callbacks = [];
-
-let render_callbacks = [];
-
-const flush_callbacks = [];
-
-const resolved_promise = /* @__PURE__ */ Promise.resolve();
-
-let update_scheduled = false;
-
-/** @returns {void} */
-function schedule_update() {
-  if (!update_scheduled) {
-    update_scheduled = true;
-    resolved_promise.then(flush);
-  }
-}
-
-/** @returns {void} */
-function add_render_callback(fn) {
-  render_callbacks.push(fn);
-}
-
-// flush() calls callbacks in this order:
-// 1. All beforeUpdate callbacks, in order: parents before children
-// 2. All bind:this callbacks, in reverse order: children before parents.
-// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
-//    for afterUpdates called during the initial onMount, which are called in
-//    reverse order: children before parents.
-// Since callbacks might update component values, which could trigger another
-// call to flush(), the following steps guard against this:
-// 1. During beforeUpdate, any updated components will be added to the
-//    dirty_components array and will cause a reentrant call to flush(). Because
-//    the flush index is kept outside the function, the reentrant call will pick
-//    up where the earlier call left off and go through all dirty components. The
-//    current_component value is saved and restored so that the reentrant call will
-//    not interfere with the "parent" flush() call.
-// 2. bind:this callbacks cannot trigger new flush() calls.
-// 3. During afterUpdate, any updated components will NOT have their afterUpdate
-//    callback called a second time; the seen_callbacks set, outside the flush()
-//    function, guarantees this behavior.
-const seen_callbacks = new Set();
-
-let flushidx = 0; // Do *not* move this inside the flush() function
-
-/** @returns {void} */
-function flush() {
-  // Do not reenter flush while dirty components are updated, as this can
-  // result in an infinite loop. Instead, let the inner flush handle it.
-  // Reentrancy is ok afterwards for bindings etc.
-  if (flushidx !== 0) {
-    return;
-  }
-  const saved_component = current_component;
-  do {
-    // first, call beforeUpdate functions
-    // and update components
-    try {
-      while (flushidx < dirty_components.length) {
-        const component = dirty_components[flushidx];
-        flushidx++;
-        set_current_component(component);
-        update(component.$$);
-      }
-    } catch (e) {
-      // reset dirty state to not end up in a deadlocked state and then rethrow
-      dirty_components.length = 0;
-      flushidx = 0;
-      throw e;
-    }
-    set_current_component(null);
-    dirty_components.length = 0;
-    flushidx = 0;
-    while (binding_callbacks.length) binding_callbacks.pop()();
-    // then, once components are updated, call
-    // afterUpdate functions. This may cause
-    // subsequent updates...
-    for (let i = 0; i < render_callbacks.length; i += 1) {
-      const callback = render_callbacks[i];
-      if (!seen_callbacks.has(callback)) {
-        // ...so guard against infinite loops
-        seen_callbacks.add(callback);
-        callback();
-      }
-    }
-    render_callbacks.length = 0;
-  } while (dirty_components.length);
-  while (flush_callbacks.length) {
-    flush_callbacks.pop()();
-  }
-  update_scheduled = false;
-  seen_callbacks.clear();
-  set_current_component(saved_component);
-}
-
-/** @returns {void} */
-function update($$) {
-  if ($$.fragment !== null) {
-    $$.update();
-    run_all($$.before_update);
-    const dirty = $$.dirty;
-    $$.dirty = [-1];
-    $$.fragment && $$.fragment.p($$.ctx, dirty);
-    $$.after_update.forEach(add_render_callback);
-  }
-}
-
-/**
- * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
- * @param {Function[]} fns
- * @returns {void}
- */
-function flush_render_callbacks(fns) {
-  const filtered = [];
-  const targets = [];
-  render_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)));
-  targets.forEach((c) => c());
-  render_callbacks = filtered;
-}
-
-const outroing = new Set();
-
-/**
- * @param {import('./private.js').Fragment} block
- * @param {0 | 1} [local]
- * @returns {void}
- */
-function transition_in(block, local) {
-  if (block && block.i) {
-    outroing.delete(block);
-    block.i(local);
-  }
-}
-
-/** @typedef {1} INTRO */
-/** @typedef {0} OUTRO */
-/** @typedef {{ direction: 'in' | 'out' | 'both' }} TransitionOptions */
-/** @typedef {(node: Element, params: any, options: TransitionOptions) => import('../transition/public.js').TransitionConfig} TransitionFn */
-
-/**
- * @typedef {Object} Outro
- * @property {number} r
- * @property {Function[]} c
- * @property {Object} p
- */
-
-/**
- * @typedef {Object} PendingProgram
- * @property {number} start
- * @property {INTRO|OUTRO} b
- * @property {Outro} [group]
- */
-
-/**
- * @typedef {Object} Program
- * @property {number} a
- * @property {INTRO|OUTRO} b
- * @property {1|-1} d
- * @property {number} duration
- * @property {number} start
- * @property {number} end
- * @property {Outro} [group]
- */
-
-/** @returns {void} */
-function mount_component(component, target, anchor) {
-  const { fragment, after_update } = component.$$;
-  fragment && fragment.m(target, anchor);
-  // onMount happens before the initial afterUpdate
-  add_render_callback(() => {
-    const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
-    // if the component was destroyed immediately
-    // it will update the `$$.on_destroy` reference to `null`.
-    // the destructured on_destroy may still reference to the old array
-    if (component.$$.on_destroy) {
-      component.$$.on_destroy.push(...new_on_destroy);
-    } else {
-      // Edge case - component was destroyed immediately,
-      // most likely as a result of a binding initialising
-      run_all(new_on_destroy);
-    }
-    component.$$.on_mount = [];
-  });
-  after_update.forEach(add_render_callback);
-}
-
-/** @returns {void} */
-function destroy_component(component, detaching) {
-  const $$ = component.$$;
-  if ($$.fragment !== null) {
-    flush_render_callbacks($$.after_update);
-    run_all($$.on_destroy);
-    $$.fragment && $$.fragment.d(detaching);
-    // TODO null out other refs, including component.$$ (but need to
-    // preserve final state?)
-    $$.on_destroy = $$.fragment = null;
-    $$.ctx = [];
-  }
-}
-
-/** @returns {void} */
-function make_dirty(component, i) {
-  if (component.$$.dirty[0] === -1) {
-    dirty_components.push(component);
-    schedule_update();
-    component.$$.dirty.fill(0);
-  }
-  component.$$.dirty[(i / 31) | 0] |= 1 << i % 31;
-}
-
-// TODO: Document the other params
-/**
- * @param {SvelteComponent} component
- * @param {import('./public.js').ComponentConstructorOptions} options
- *
- * @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values.
- * @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised.
- * This will be the `add_css` function from the compiled component.
- *
- * @returns {void}
- */
-function init(
-  component,
-  options,
-  instance,
-  create_fragment,
-  not_equal,
-  props,
-  append_styles = null,
-  dirty = [-1],
-) {
-  const parent_component = current_component;
-  set_current_component(component);
-  /** @type {import('./private.js').T$$} */
-  const $$ = (component.$$ = {
-    fragment: null,
-    ctx: [],
-    // state
-    props,
-    update: noop,
-    not_equal,
-    bound: blank_object(),
-    // lifecycle
-    on_mount: [],
-    on_destroy: [],
-    on_disconnect: [],
-    before_update: [],
-    after_update: [],
-    context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
-    // everything else
-    callbacks: blank_object(),
-    dirty,
-    skip_bound: false,
-    root: options.target || parent_component.$$.root,
-  });
-  append_styles && append_styles($$.root);
-  let ready = false;
-  $$.ctx = instance
-    ? instance(component, options.props || {}, (i, ret, ...rest) => {
-      const value = rest.length ? rest[0] : ret;
-      if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
-        if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);
-        if (ready) make_dirty(component, i);
-      }
-      return ret;
-    })
-    : [];
-  $$.update();
-  ready = true;
-  run_all($$.before_update);
-  // `false` as a special case of no DOM component
-  $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
-  if (options.target) {
-    if (options.hydrate) {
-      // TODO: what is the correct type here?
-      // @ts-expect-error
-      const nodes = children(options.target);
-      $$.fragment && $$.fragment.l(nodes);
-      nodes.forEach(detach);
-    } else {
-      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
-      $$.fragment && $$.fragment.c();
-    }
-    if (options.intro) transition_in(component.$$.fragment);
-    mount_component(component, options.target, options.anchor);
-    flush();
-  }
-  set_current_component(parent_component);
-}
-
-/**
- * Base class for Svelte components. Used when dev=false.
- *
- * @template {Record<string, any>} [Props=any]
- * @template {Record<string, any>} [Events=any]
- */
-class SvelteComponent {
-  /**
-   * ### PRIVATE API
-   *
-   * Do not use, may change at any time
-   *
-   * @type {any}
-   */
-  $$ = undefined;
-  /**
-   * ### PRIVATE API
-   *
-   * Do not use, may change at any time
-   *
-   * @type {any}
-   */
-  $$set = undefined;
-
-  /** @returns {void} */
-  $destroy() {
-    destroy_component(this, 1);
-    this.$destroy = noop;
-  }
-
-  /**
-   * @template {Extract<keyof Events, string>} K
-   * @param {K} type
-   * @param {((e: Events[K]) => void) | null | undefined} callback
-   * @returns {() => void}
-   */
-  $on(type, callback) {
-    if (!is_function(callback)) {
-      return noop;
-    }
-    const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
-    callbacks.push(callback);
-    return () => {
-      const index = callbacks.indexOf(callback);
-      if (index !== -1) callbacks.splice(index, 1);
-    };
-  }
-
-  /**
-   * @param {Partial<Props>} props
-   * @returns {void}
-   */
-  $set(props) {
-    if (this.$$set && !is_empty(props)) {
-      this.$$.skip_bound = true;
-      this.$$set(props);
-      this.$$.skip_bound = false;
-    }
-  }
-}
-
-/**
- * @typedef {Object} CustomElementPropDefinition
- * @property {string} [attribute]
- * @property {boolean} [reflect]
- * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]
- */
-
-// generated during release, do not modify
-
-const PUBLIC_VERSION = "4";
-
-if (typeof window !== "undefined") {
-  // @ts-ignore
-  (window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION);
-}
+import {
+  attr,
+  binding_callbacks,
+  detach,
+  element,
+  init,
+  insert,
+  noop,
+  safe_not_equal,
+  SvelteComponent,
+} from "svelte/internal";
+import "svelte/internal/disclose-version";
+import DashboardPlugin from "@uppy/dashboard";
+import DragDropPlugin from "@uppy/drag-drop";
+import ProgressBarPlugin from "@uppy/progress-bar";
+import StatusBarPlugin from "@uppy/status-bar";
+import { onDestroy, onMount } from "svelte";
 
 /* src/components/Dashboard.svelte generated by Svelte v4.2.18 */
 
@@ -532,12 +45,33 @@ function create_fragment$4(ctx) {
 
 function instance$4($$self, $$props, $$invalidate) {
   let container;
+  let plugin;
   let { uppy } = $$props;
   let { props = {} } = $$props;
   let { plugins = [] } = $$props;
 
+  const installPlugin = () => {
+    const options = Object.assign(
+      Object.assign(
+        {
+          id: "svelte:Dashboard",
+          inline: true,
+          plugins,
+        },
+        props,
+      ),
+      { target: container },
+    );
+
+    uppy.use(DashboardPlugin, options);
+    plugin = uppy.getPlugin(options.id);
+  };
+
   const uninstallPlugin = (uppyInstance = uppy) => {
+    if (plugin != null) uppyInstance.removePlugin(plugin);
   };
+
+  onMount(() => installPlugin());
   onDestroy(() => uninstallPlugin());
 
   function div_binding($$value) {
@@ -619,8 +153,20 @@ function instance$3($$self, $$props, $$invalidate) {
   let lastOpen = open;
   let { plugins = [] } = $$props;
 
+  const installPlugin = () => {
+    const options = Object.assign(Object.assign({ id: "svelte:DashboardModal", plugins }, props), {
+      target: container,
+    });
+    uppy.use(DashboardPlugin, options);
+    $$invalidate(5, plugin = uppy.getPlugin(options.id));
+    if (open) plugin.openModal();
+  };
+
   const uninstallPlugin = (uppyInstance = uppy) => {
+    if (plugin != null) uppyInstance.removePlugin(plugin);
   };
+
+  onMount(() => installPlugin());
   onDestroy(() => uninstallPlugin());
 
   function div_binding($$value) {
@@ -701,11 +247,21 @@ function create_fragment$2(ctx) {
 
 function instance$2($$self, $$props, $$invalidate) {
   let container;
+  let plugin;
   let { uppy } = $$props;
   let { props = {} } = $$props;
 
+  const installPlugin = () => {
+    const options = Object.assign(Object.assign({ id: "svelte:DragDrop", inline: true }, props), { target: container });
+    uppy.use(DragDropPlugin, options);
+    plugin = uppy.getPlugin(options.id);
+  };
+
   const uninstallPlugin = (uppyInstance = uppy) => {
+    if (plugin != null) uppyInstance.removePlugin(plugin);
   };
+
+  onMount(() => installPlugin());
   onDestroy(() => uninstallPlugin());
 
   function div_binding($$value) {
@@ -768,11 +324,23 @@ function create_fragment$1(ctx) {
 
 function instance$1($$self, $$props, $$invalidate) {
   let container;
+  let plugin;
   let { uppy } = $$props;
   let { props = {} } = $$props;
 
+  const installPlugin = () => {
+    const options = Object.assign(Object.assign({ id: "svelte:ProgressBar", inline: true }, props), {
+      target: container,
+    });
+    uppy.use(ProgressBarPlugin, options);
+    plugin = uppy.getPlugin(options.id);
+  };
+
   const uninstallPlugin = (uppyInstance = uppy) => {
+    if (plugin != null) uppyInstance.removePlugin(plugin);
   };
+
+  onMount(() => installPlugin());
   onDestroy(() => uninstallPlugin());
 
   function div_binding($$value) {
@@ -835,11 +403,23 @@ function create_fragment(ctx) {
 
 function instance($$self, $$props, $$invalidate) {
   let container;
+  let plugin;
   let { uppy } = $$props;
   let { props = {} } = $$props;
 
+  const installPlugin = () => {
+    const options = Object.assign(Object.assign({ id: "svelte:StatusBar", inline: true }, props), {
+      target: container,
+    });
+    uppy.use(StatusBarPlugin, options);
+    plugin = uppy.getPlugin(options.id);
+  };
+
   const uninstallPlugin = (uppyInstance = uppy) => {
+    if (plugin != null) uppyInstance.removePlugin(plugin);
   };
+
+  onMount(() => installPlugin());
   onDestroy(() => uninstallPlugin());
 
   function div_binding($$value) {
@@ -874,3 +454,4 @@ class StatusBar extends SvelteComponent {
 }
 
 export { Dashboard, DashboardModal, DragDrop, ProgressBar, StatusBar };
+// # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIi4uL3NyYy9jb21wb25lbnRzL0Rhc2hib2FyZC5zdmVsdGUiLCIuLi9zcmMvY29tcG9uZW50cy9EYXNoYm9hcmRNb2RhbC5zdmVsdGUiLCIuLi9zcmMvY29tcG9uZW50cy9EcmFnRHJvcC5zdmVsdGUiLCIuLi9zcmMvY29tcG9uZW50cy9Qcm9ncmVzc0Jhci5zdmVsdGUiLCIuLi9zcmMvY29tcG9uZW50cy9TdGF0dXNCYXIuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQgbGFuZz1cInRzXCIgZ2VuZXJpY3M9XCJNIGV4dGVuZHMgaW1wb3J0KCdAdXBweS91dGlscy9saWIvVXBweUZpbGUnKS5NZXRhLCBCIGV4dGVuZHMgaW1wb3J0KCdAdXBweS91dGlscy9saWIvVXBweUZpbGUnKS5Cb2R5XCI+XG4gIGltcG9ydCB7IG9uTW91bnQsIG9uRGVzdHJveSB9IGZyb20gJ3N2ZWx0ZSdcbiAgaW1wb3J0IHR5cGUgeyBVcHB5IH0gZnJvbSAnQHVwcHkvY29yZSc7XG4gIGltcG9ydCBEYXNoYm9hcmRQbHVnaW4gZnJvbSAnQHVwcHkvZGFzaGJvYXJkJ1xuXG4gIGxldCBjb250YWluZXI6IEhUTUxFbGVtZW50O1xuICBsZXQgcGx1Z2luOiBEYXNoYm9hcmRQbHVnaW48TSwgQj47XG5cbiAgZXhwb3J0IGxldCB1cHB5OiBVcHB5PE0sIEI+O1xuICBleHBvcnQgbGV0IHByb3BzOiBPYmplY3QgfCB1bmRlZmluZWQgPSB7fT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Q0FBQSxDQUFBOzs7T0FFOUIsZUFBZSxHQUFBLENBQUksZUFBMkIsSUFBSSxLQUFBO0FBQ2xELEVBQUEsSUFBQSxNQUFNLElBQUksSUFBSSxFQUFFLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFBLENBQUE7OztBQUd0RCxDQUFBLE9BQU8sT0FBTyxhQUFhLEVBQUEsQ0FBQSxDQUFBO0FBRTNCLENBQUEsU0FBUyxPQUFPLGVBQWUsRUFBQSxDQUFBLENBQUE7Ozs7R0FVTSxTQUFTLEdBQUEsT0FBQSxDQUFBOzs7Ozs7Ozs7Ozs7R0FUN0M7VUFDTyxPQUFPLEdBQUEsTUFBQSxDQUFBLE1BQUEsQ0FBQSxNQUFBLENBQUEsTUFBQSxDQUFBLEVBQ1gsRUFBRSxFQUFFLGtCQUFrQixJQUNuQixLQUFLLENBQUEsRUFBQSxFQUNSLE1BQU0sRUFBRSxTQUFTLEVBQUEsQ0FBQSxDQUFBO0lBRW5CLElBQUksQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFBLENBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9

Copy link
Member

@Murderlon Murderlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this in the SvelteKit example? If so, LGTM. Otherwise please double check.

@aduh95 aduh95 merged commit 3f2f37f into main Sep 3, 2024
17 checks passed
@aduh95 aduh95 deleted the fix-svelte-bundle branch September 3, 2024 13:55
@frederikhors
Copy link
Contributor

frederikhors commented Sep 19, 2024

Can you please release this?

@Murderlon
Copy link
Member

Ah I thought it was already released. Will do.

@github-actions github-actions bot mentioned this pull request Sep 20, 2024
github-actions bot added a commit that referenced this pull request Sep 20, 2024
| Package           | Version | Package           | Version |
| ----------------- | ------- | ----------------- | ------- |
| @uppy/companion   |   5.1.1 | @uppy/tus         |   4.1.1 |
| @uppy/svelte      |   4.0.2 | @uppy/xhr-upload  |   4.2.0 |
| @uppy/transloadit |   4.1.1 | uppy              |   4.4.0 |

- @uppy/tus: fix retry check for status code 400 (Merlijn Vos / #5461)
- meta: Merge branch 'main' of https://github.com/transloadit/uppy (Murderlon)
- meta: fix AwsS3 endpoint option in private/dev (Murderlon)
- examples: build(deps): bump body-parser from 1.20.2 to 1.20.3 (dependabot[bot] / #5462)
- examples: build(deps-dev): bump vite from 5.3.1 to 5.3.6 (dependabot[bot] / #5459)
- @uppy/tus: set response from tus-js-client (Merlijn Vos / #5456)
- docs: fix assemblyOptions example for React (Merlijn Vos / #5450)
- docs: rename Edgly to Smart CDN (Merlijn Vos / #5449)
- @uppy/tus: correctly type tus on UppyFile (Merlijn Vos / #5454)
- docs: remove old legacy CDN reference (Murderlon)
- @uppy/xhr-upload: pass files to onBeforeRequest (Merlijn Vos / #5447)
- @uppy/svelte: fix generated module to not bundle Svelte (Antoine du Hamel / #5446)
- examples,@uppy/svelte: Bump svelte from 4.2.18 to 4.2.19 (dependabot[bot] / #5440)
- meta: bump Yarn to 4.4.1 (Antoine du Hamel / #5445)
- docs: fix broken links in locale docs (Serghei Cebotari / #5441)
@Murderlon Murderlon mentioned this pull request Sep 30, 2024
Murderlon added a commit that referenced this pull request Oct 7, 2024
* main: (319 commits)
  build(deps): bump docker/build-push-action from 6.8.0 to 6.9.0 (#5483)
  Release: uppy@4.4.1 (#5479)
  @uppy/transloadit: fix multiple upload batches & run again (#5478)
  build(deps): bump docker/build-push-action from 6.7.0 to 6.8.0 (#5477)
  build(deps): bump vite from 5.2.11 to 5.4.8 (#5471)
  build(deps-dev): bump rollup from 4.18.0 to 4.22.4 (#5470)
  build(deps): bump vite from 5.2.11 to 5.4.6 (#5466)
  Release: uppy@4.4.0 (#5467)
  @uppy/tus: fix retry check for status code 400 (#5461)
  meta: fix AwsS3 endpoint option in private/dev
  build(deps): bump body-parser from 1.20.2 to 1.20.3 (#5462)
  build(deps-dev): bump vite from 5.3.1 to 5.3.6 (#5459)
  @uppy/tus: set response from tus-js-client (#5456)
  docs: fix assemblyOptions example for React (#5450)
  docs: rename Edgly to Smart CDN (#5449)
  @uppy/tus: correctly type tus on UppyFile (#5454)
  docs: remove old legacy CDN reference
  @uppy/xhr-upload: pass files to onBeforeRequest (#5447)
  @uppy/svelte: fix generated module to not bundle Svelte (#5446)
  Bump svelte from 4.2.18 to 4.2.19 (#5440)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"@uppy/svelte": "4.0.1" crashes Dashboard
3 participants