Skip to content

feat(fs/unstable): add truncate and truncateSync #6416

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

Merged
merged 4 commits into from
Feb 19, 2025

Conversation

jbronder
Copy link
Contributor

This PR adds truncate and truncateSync APIs to the @std/fs package which are intended to mirror Deno.truncate and Deno.truncateSync functions.

Towards #6255.

@jbronder jbronder requested a review from kt3k as a code owner February 18, 2025 05:14
@github-actions github-actions bot added the fs label Feb 18, 2025
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 51.72414% with 14 lines in your changes missing coverage. Please review.

Project coverage is 96.01%. Comparing base (431ed58) to head (6175d7b).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
fs/unstable_truncate.ts 51.72% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6416      +/-   ##
==========================================
- Coverage   96.03%   96.01%   -0.03%     
==========================================
  Files         561      562       +1     
  Lines       42395    42424      +29     
  Branches     6384     6387       +3     
==========================================
+ Hits        40714    40733      +19     
- Misses       1641     1652      +11     
+ Partials       40       39       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kt3k
Copy link
Member

kt3k commented Feb 18, 2025

Mostly looks good to me.

We started adding unstable fs APIs to doc checker (_tools/check_docs.ts) since #6400. Can you also add this file to that check?

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@kt3k kt3k merged commit 3e5038d into denoland:main Feb 19, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants