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/audio: move internal property to private field #5207

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented May 31, 2024

No description provided.

Copy link
Contributor

Diff output files
diff --git a/packages/@uppy/audio/lib/Audio.js b/packages/@uppy/audio/lib/Audio.js
index 63df9da..999ffb3 100644
--- a/packages/@uppy/audio/lib/Audio.js
+++ b/packages/@uppy/audio/lib/Audio.js
@@ -28,6 +28,7 @@ import supportsMediaRecorder from "./supportsMediaRecorder.js";
 const packageJson = {
   "version": "2.0.0-beta.5",
 };
+var _recordingLengthTimer = _classPrivateFieldLooseKey("recordingLengthTimer");
 var _stream = _classPrivateFieldLooseKey("stream");
 var _audioActive = _classPrivateFieldLooseKey("audioActive");
 var _recordingChunks = _classPrivateFieldLooseKey("recordingChunks");
@@ -54,6 +55,10 @@ export default class Audio extends UIPlugin {
     Object.defineProperty(this, _hasAudioCheck, {
       value: _hasAudioCheck2,
     });
+    Object.defineProperty(this, _recordingLengthTimer, {
+      writable: true,
+      value: void 0,
+    });
     Object.defineProperty(this, _stream, {
       writable: true,
       value: null,
@@ -155,7 +160,7 @@ export default class Audio extends UIPlugin {
           }
         });
         _classPrivateFieldLooseBase(this, _recorder)[_recorder].start(500);
-        this.recordingLengthTimer = setInterval(() => {
+        _classPrivateFieldLooseBase(this, _recordingLengthTimer)[_recordingLengthTimer] = setInterval(() => {
           const currentRecordingLength = this.getPluginState().recordingLengthSeconds;
           this.setPluginState({
             recordingLengthSeconds: currentRecordingLength + 1,
@@ -174,7 +179,7 @@ export default class Audio extends UIPlugin {
             resolve();
           });
           _classPrivateFieldLooseBase(this, _recorder)[_recorder].stop();
-          clearInterval(this.recordingLengthTimer);
+          clearInterval(_classPrivateFieldLooseBase(this, _recordingLengthTimer)[_recordingLengthTimer]);
           this.setPluginState({
             recordingLengthSeconds: 0,
           });
@@ -241,7 +246,7 @@ export default class Audio extends UIPlugin {
               once: true,
             });
             _classPrivateFieldLooseBase(this, _recorder)[_recorder].stop();
-            clearInterval(this.recordingLengthTimer);
+            clearInterval(_classPrivateFieldLooseBase(this, _recordingLengthTimer)[_recordingLengthTimer]);
           });
         }
         _classPrivateFieldLooseBase(this, _recordingChunks)[_recordingChunks] = null;

@aduh95 aduh95 merged commit 5afb2af into transloadit:4.x Jun 3, 2024
17 checks passed
@aduh95 aduh95 deleted the internal-private-field branch June 3, 2024 09:56
Murderlon added a commit that referenced this pull request Jun 4, 2024
* 4.x: (43 commits)
  remove resetProgress and reset-progress (#5221)
  @uppy/audio: remove unused component props (#5209)
  @uppy/angular: fix invalid char in `package.json` (#5224)
  meta: use default argument value instead of `defaultProps` (#5222)
  @uppy/angular: upgrade to Angular 18 (#5215)
  @uppy/utils: remove unused `settle` (#5210)
  @uppy/form: move internal property to private field (#5214)
  @uppy/dashboard: remove unused component props (#5213)
  @uppy/status-bar: remove unused component props (#5211)
  @uppy/audio: move internal property to private field (#5207)
  @uppy/aws-s3: remove todo (#5200)
  @uppy/core: remove unnecessary todo (#5200)
  @uppy/aws-s3: do not expose internal `assertHost` method (#5200)
  @uppy/aws-s3: make passing `signal` consistent (#5200)
  @uppy/core: remove `'upload-started'` event (#5200)
  @uppy/aws-s3: remove `chunkState` getter (#5200)
  @uppy/drop-target: remove `title` property (#5200)
  @uppy/golden-retriever: remove unused `ready` setters (#5200)
  @uppy/dashboard: remove deprecated `autoOpenFileEditor` option (#5200)
  @uppy/aws-s3: remove `uploaderSockets` (#5200)
  ...
Murderlon added a commit that referenced this pull request Jun 4, 2024
* 4.x: (44 commits)
  remove resetProgress and reset-progress (#5221)
  @uppy/audio: remove unused component props (#5209)
  @uppy/angular: fix invalid char in `package.json` (#5224)
  meta: use default argument value instead of `defaultProps` (#5222)
  @uppy/angular: upgrade to Angular 18 (#5215)
  @uppy/utils: remove unused `settle` (#5210)
  @uppy/form: move internal property to private field (#5214)
  @uppy/dashboard: remove unused component props (#5213)
  @uppy/status-bar: remove unused component props (#5211)
  @uppy/audio: move internal property to private field (#5207)
  @uppy/aws-s3: remove todo (#5200)
  @uppy/core: remove unnecessary todo (#5200)
  @uppy/aws-s3: do not expose internal `assertHost` method (#5200)
  @uppy/aws-s3: make passing `signal` consistent (#5200)
  @uppy/core: remove `'upload-started'` event (#5200)
  @uppy/aws-s3: remove `chunkState` getter (#5200)
  @uppy/drop-target: remove `title` property (#5200)
  @uppy/golden-retriever: remove unused `ready` setters (#5200)
  @uppy/dashboard: remove deprecated `autoOpenFileEditor` option (#5200)
  @uppy/aws-s3: remove `uploaderSockets` (#5200)
  ...
github-actions bot added a commit that referenced this pull request Jun 4, 2024
| Package                |       Version | Package                |       Version |
| ---------------------- | ------------- | ---------------------- | ------------- |
| @uppy/angular          |  0.7.0-beta.5 | @uppy/instagram        |  4.0.0-beta.6 |
| @uppy/audio            |  2.0.0-beta.6 | @uppy/locales          |  4.0.0-beta.2 |
| @uppy/aws-s3           |  4.0.0-beta.5 | @uppy/onedrive         |  4.0.0-beta.6 |
| @uppy/aws-s3-multipart |  4.0.0-beta.6 | @uppy/provider-views   |  4.0.0-beta.7 |
| @uppy/box              |  3.0.0-beta.6 | @uppy/status-bar       |  4.0.0-beta.9 |
| @uppy/companion        |  5.0.0-beta.9 | @uppy/transloadit      |  4.0.0-beta.7 |
| @uppy/companion-client |  4.0.0-beta.7 | @uppy/tus              |  4.0.0-beta.6 |
| @uppy/core             |  4.0.0-beta.9 | @uppy/unsplash         |  4.0.0-beta.7 |
| @uppy/dashboard        |  4.0.0-beta.9 | @uppy/url              |  4.0.0-beta.7 |
| @uppy/drop-target      |  3.0.0-beta.5 | @uppy/utils            |  6.0.0-beta.8 |
| @uppy/dropbox          |  4.0.0-beta.7 | @uppy/webcam           |  4.0.0-beta.8 |
| @uppy/facebook         |  4.0.0-beta.6 | @uppy/xhr-upload       |  4.0.0-beta.6 |
| @uppy/form             |  4.0.0-beta.4 | @uppy/zoom             |  3.0.0-beta.6 |
| @uppy/golden-retriever |  4.0.0-beta.5 | uppy                   | 4.0.0-beta.10 |
| @uppy/google-drive     |  4.0.0-beta.6 |                        |               |

- @uppy/audio: remove unused component props (Antoine du Hamel / #5209)
- @uppy/angular: fix invalid char in `package.json` (Antoine du Hamel / #5224)
- meta: use default argument value instead of `defaultProps` (Antoine du Hamel / #5222)
- @uppy/angular: upgrade to Angular 18 (Antoine du Hamel / #5215)
- @uppy/utils: remove unused `settle` (Antoine du Hamel / #5210)
- @uppy/form: move internal property to private field (Antoine du Hamel / #5214)
- @uppy/dashboard: remove unused component props (Antoine du Hamel / #5213)
- @uppy/status-bar: remove unused component props (Antoine du Hamel / #5211)
- @uppy/audio: move internal property to private field (Antoine du Hamel / #5207)
- @uppy/aws-s3: remove todo (Mikael Finstad / #5200)
- @uppy/core: remove unnecessary todo (Mikael Finstad / #5200)
- @uppy/aws-s3: do not expose internal `assertHost` method (Mikael Finstad / #5200)
- @uppy/aws-s3: make passing `signal` consistent (Mikael Finstad / #5200)
- @uppy/core: remove `'upload-started'` event (Mikael Finstad / #5200)
- @uppy/aws-s3: remove `chunkState` getter (Mikael Finstad / #5200)
- @uppy/drop-target: remove `title` property (Mikael Finstad / #5200)
- @uppy/golden-retriever: remove unused `ready` setters (Mikael Finstad / #5200)
- @uppy/dashboard: remove deprecated `autoOpenFileEditor` option (Mikael Finstad / #5200)
- @uppy/aws-s3: remove `uploaderSockets` (Mikael Finstad / #5200)
- @uppy/locales: remove hacks for legacy bundle (Mikael Finstad / #5200)
- @uppy/status-bar: rename `StatusBar` to `StatusBarUI` (Mikael Finstad / #5200)
- @uppy/url: remove unused error handler (Mikael Finstad / #5200)
- @uppy/aws-s3,@uppy/tus,@uppy/utils,@uppy/xhr-upload: remove `uploader` from `upload-progress` event (Mikael Finstad / #5200)
- @uppy/webcam: remove `facingMode` option (Mikael Finstad / #5200)
- @uppy/companion: invert some internal boolean options (Mikael Finstad / #5198)
- @uppy/companion: rename `authProvider` to `oauthProvider` (Mikael Finstad / #5198)
- @uppy/companion: remove unused headers (Mikael Finstad / #5198)
- @uppy/companion: remove sanitizing of metadata (Mikael Finstad / #5198)
- @uppy/companion-client: do not allow boolean `RequestOptions` (Mikael Finstad / #5198)
- @uppy/companion-client: remove deprecated options (Mikael Finstad / #5198)
- @uppy/companion: remove `error.extraData` (Mikael Finstad / #5198)
- @uppy/companion-client: make `supportsRefreshToken` default (Mikael Finstad / #5198)
- @uppy/companion-client: remove optional chaining (Mikael Finstad / #5198)
- @uppy/companion: capitalize POST (Mikael Finstad / #5198)
- @uppy/companion: simplify code by using modern Node.js APIs (Mikael Finstad / #5198)
- @uppy/companion-client: remove `Socket` (Mikael Finstad / #5198)
- @uppy/companion: rename `getExtraConfig` to `getExtraGrantConfig` (Mikael Finstad / #5198)
- @uppy/companion: change `COMPANION_ENABLE_URL_ENDPOINT` default (Mikael Finstad / #5198)
- @uppy/companion: change default value for Redis session prefix (Mikael Finstad / #5198)
- examples: make React example up-to-date (Merlijn Vos / #5205)
- @uppy/core: add type tests (Merlijn Vos / #5153)
- @uppy/provider-views: PartialTree - get rid of `.onFirstRender()` (Evgenia Karunus / #5187)
- @uppy/core: pass file to events consistently (Merlijn Vos / #5136)
- docs: assume tree-shaking bundler is the most common case (Antoine du Hamel / #5160)
- @uppy/core: remove `reason` (Antoine du Hamel / #5159)
- @uppy/core: remove `resetProgress` and `reset-progress` (Mikael Finstad / #5221)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants