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/progress-bar: refactor to TypeScript #4921

Merged
merged 12 commits into from Feb 28, 2024
Merged

@uppy/progress-bar: refactor to TypeScript #4921

merged 12 commits into from Feb 28, 2024

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Feb 15, 2024

one commit PR for each (#4954)

Copy link
Contributor

github-actions bot commented Feb 15, 2024

Diff output files
diff --git a/packages/@uppy/progress-bar/lib/ProgressBar.js b/packages/@uppy/progress-bar/lib/ProgressBar.js
index 13f4fbf..eefe550 100644
--- a/packages/@uppy/progress-bar/lib/ProgressBar.js
+++ b/packages/@uppy/progress-bar/lib/ProgressBar.js
@@ -3,21 +3,20 @@ import { h } from "preact";
 const packageJson = {
   "version": "3.0.4",
 };
+const defaultOptions = {
+  target: "body",
+  fixed: false,
+  hideAfterFinish: true,
+};
 export default class ProgressBar extends UIPlugin {
   constructor(uppy, opts) {
-    super(uppy, opts);
+    super(uppy, {
+      ...defaultOptions,
+      ...opts,
+    });
     this.id = this.opts.id || "ProgressBar";
     this.title = "Progress Bar";
     this.type = "progressindicator";
-    const defaultOptions = {
-      target: "body",
-      fixed: false,
-      hideAfterFinish: true,
-    };
-    this.opts = {
-      ...defaultOptions,
-      ...opts,
-    };
     this.render = this.render.bind(this);
   }
   render(state) {

packages/@uppy/file-input/src/FileInput.tsx Outdated Show resolved Hide resolved
packages/@uppy/file-input/src/FileInput.tsx Outdated Show resolved Hide resolved
packages/@uppy/file-input/src/FileInput.tsx Outdated Show resolved Hide resolved
packages/@uppy/file-input/src/FileInput.tsx Outdated Show resolved Hide resolved
packages/@uppy/file-input/src/FileInput.tsx Outdated Show resolved Hide resolved
packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
packages/@uppy/progress-bar/tsconfig.json Show resolved Hide resolved
@Murderlon
Copy link
Member

Preact settings can be ignored, better to have it in shared: #4923

packages/@uppy/file-input/src/FileInput.tsx Outdated Show resolved Hide resolved
@aduh95 aduh95 changed the title migrate progress-bar and file-input to ts @uppy/progress-bar: refactor to TypeScript Feb 23, 2024
packages/@uppy/progress-bar/.npmignore Outdated Show resolved Hide resolved
Copy link
Member

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

There are a few lint failures to address

packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
packages/@uppy/progress-bar/src/ProgressBar.tsx Outdated Show resolved Hide resolved
mifi and others added 3 commits February 24, 2024 18:28
Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
@mifi mifi merged commit c960609 into main Feb 28, 2024
16 checks passed
@mifi mifi deleted the ts-migration branch February 28, 2024 09:30
@github-actions github-actions bot mentioned this pull request Feb 28, 2024
github-actions bot added a commit that referenced this pull request Feb 28, 2024
| Package                | Version | Package                | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/box              |   2.2.1 | @uppy/onedrive         |   3.2.1 |
| @uppy/companion-client |   3.7.4 | @uppy/progress-bar     |   3.1.0 |
| @uppy/core             |   3.9.3 | @uppy/provider-views   |  3.10.0 |
| @uppy/dashboard        |   3.7.5 | @uppy/status-bar       |   3.3.0 |
| @uppy/file-input       |   3.1.0 | @uppy/utils            |   5.7.4 |
| @uppy/form             |   3.2.0 | @uppy/xhr-upload       |   3.6.4 |
| @uppy/image-editor     |   2.4.4 | uppy                   |  3.23.0 |
| @uppy/informer         |   3.1.0 |                        |         |

- @uppy/form: migrate to TS (Merlijn Vos / #4937)
- @uppy/box: fetchPreAuthToken in box too (Mikael Finstad / #4969)
- @uppy/progress-bar: refactor to TypeScript (Mikael Finstad / #4921)
- @uppy/onedrive: fix custom oauth2 credentials for onedrive (Mikael Finstad / #4968)
- @uppy/companion-client,@uppy/utils,@uppy/xhr-upload: improvements for #4922 (Mikael Finstad / #4960)
- @uppy/utils: fix various type issues (Mikael Finstad / #4958)
- @uppy/provider-views: migrate to TS (Merlijn Vos / #4919)
- @uppy/utils: simplify `findDOMElements` (Mikael Finstad / #4957)
- @uppy/xhr-upload: fix getResponseData regression (Merlijn Vos / #4964)
- @uppy/informer: migrate to TS (Merlijn Vos / #4967)
- @uppy/core: remove unused import (Antoine du Hamel / #4972)
- @uppy/image-editor: remove default target (Merlijn Vos / #4966)
- @uppy/angular: Build fixes (Mikael Finstad / #4959)
- meta: Fix flaky e2e test (Murderlon)
- meta: fix e2e flake (Mikael Finstad / #4961)
- meta: add support for `Fragment` short syntax (Antoine du Hamel / #4953)
- @uppy/file-input: refactor to TypeScript (Antoine du Hamel / #4954)
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.

None yet

3 participants