Skip to content

@tus/utils: fix FileKvStore list pairing - #892

Merged
Murderlon merged 1 commit into
tus:mainfrom
ferhatelmas:list-pairing
Oct 19, 2026
Merged

Murderlon merged 1 commit into
tus:mainfrom
ferhatelmas:list-pairing

Conversation

@ferhatelmas

@ferhatelmas ferhatelmas commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Devin Review

Signed-off-by: Ferhat Elmas <elmas.ferhat@gmail.com>
@changeset-bot

changeset-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f0874c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tus/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ferhatelmas
ferhatelmas deployed to external-testing October 19, 2026 10:09 — with GitHub Actions Active

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

Comment on lines +38 to +40
const files = new Set(await fs.readdir(this.directory))
// To only return tus file IDs we check if the file has a corresponding JSON info file
return sorted.filter(
(file, idx) => idx < sorted.length - 1 && name(file) === name(sorted[idx + 1])
)
return [...files].filter((file) => files.has(`${file}.json`)).sort()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Nested uploads remain outside expiration scans

For nested upload IDs, list() reads only the top-level directory. FileStore.create places these uploads in subdirectories, so FileStore.deleteExpired never sees them. This predates the pairing change.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

correct but it's a different existing issue

@Murderlon
Murderlon added this pull request to the merge queue Oct 19, 2026
@Murderlon
Murderlon removed this pull request from the merge queue due to a manual request Oct 19, 2026
@Murderlon
Murderlon merged commit 206f892 into tus:main Oct 19, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
external-testing — f0874c7f Deployed Oct 19, 2026 by ferhatelmas via Tests #101
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.

2 participants