Dedupe dependencies (#6085)

With `yarn dedupe`. New type error surfaced due to new types getting
loaded.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Dedupes dependencies and updates code: aligns S3 presign tests with
checksum behavior, narrows HMAC key type, tweaks AudioOscilloscope
buffer typing, and simplifies Tus success logging.
> 
> - **AWS S3**:
> - Tests: add `requestChecksumCalculation` (from
`@aws-sdk/middleware-flexible-checksums`) to `S3Client` options to match
presign behavior.
> - Impl: change `generateHmacKey` signature to accept `string |
ArrayBuffer` (remove `Uint8Array`).
> - **Audio**:
> - `AudioOscilloscope`: change `dataArray` type to
`Uint8Array<ArrayBuffer>`.
> - **Tus**:
> - Simplify success log to `Download <url>` (remove file name
extraction).
> - **Dependencies**:
>   - Deduplicate/upgrade various packages in lockfile.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5b95865a7c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
This commit is contained in:
Merlijn Vos 2025-12-05 10:22:11 +01:00 committed by GitHub
parent 5c6337682e
commit 3c3034b408
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 236 additions and 3529 deletions

View file

@ -41,7 +41,7 @@ export default class AudioOscilloscope {
private bufferLength: number
private dataArray?: Uint8Array
private dataArray?: Uint8Array<ArrayBuffer>
private onDrawFrame: (oscilloscope: AudioOscilloscope) => void

View file

@ -4,6 +4,7 @@ import {
S3Client,
UploadPartCommand,
} from '@aws-sdk/client-s3'
import { RequestChecksumCalculation } from '@aws-sdk/middleware-flexible-checksums'
import { getSignedUrl } from '@aws-sdk/s3-request-presigner'
import { afterEach, beforeEach, describe, it } from 'vitest'
import createSignedURL from './createSignedURL.js'
@ -16,6 +17,9 @@ const s3ClientOptions = {
secretAccessKey: 'bar',
sessionToken: 'foobar',
},
// AWS SDK v3 started enabling request checksums by default, which changes
// the presigned URL shape/signature. Keep tests aligned with our signer.
requestChecksumCalculation: RequestChecksumCalculation.WHEN_REQUIRED,
}
const { Date: OriginalDate } = globalThis

View file

@ -64,7 +64,7 @@ async function digest(data: string): ReturnType<SubtleCrypto['digest']> {
return subtle.digest(algorithm.hash, ec.encode(data))
}
async function generateHmacKey(secret: string | Uint8Array | ArrayBuffer) {
async function generateHmacKey(secret: string | ArrayBuffer) {
const { subtle } = globalThis.crypto
return subtle.importKey(
'raw',

View file

@ -342,9 +342,7 @@ export default class Tus<M extends Meta, B extends Body> extends BasePlugin<
queuedRequest.done()
if (upload.url) {
// @ts-expect-error not typed in tus-js-client
const { name } = upload.file
this.uppy.log(`Download ${name} from ${upload.url}`)
this.uppy.log(`Download ${upload.url}`)
}
if (typeof opts.onSuccess === 'function') {
opts.onSuccess(payload)

3753
yarn.lock

File diff suppressed because it is too large Load diff