-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[fs] Expose an experimental fs
module with an open
function and a File
abstraction (1/3)
#3165
Conversation
🗣️ the "convert to draft" button doesn't seem to work at the moment... |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3165 +/- ##
==========================================
- Coverage 73.37% 73.31% -0.06%
==========================================
Files 261 266 +5
Lines 19779 19988 +209
==========================================
+ Hits 14513 14655 +142
- Misses 4369 4423 +54
- Partials 897 910 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good first step @oleiade! 👏
Just have some minor and nitpicky comments/questions.
fbec26b
to
02c5120
Compare
fs
module with an open
function and a File
abstractionfs
module with an open
function and a File
abstraction
113d0e1
to
c20e063
Compare
Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com>
Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com>
1b544ce
to
260307c
Compare
Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com>
Heads-up that I intend to clean up the history of the PR once I get approvals, so that we can create a merge commit 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
🎉 I'll go ahead and squash and merge instead of making a merge commit as I realized that some of the changes applied as part of the PR review apply to content that was part of children's PRs, and that would make the whole branch cleanup quite nasty (if not impossible). |
What?
This Pull Request aims to address #3142 and is the first step towards introducing a
fs
module to k6 as tracked by #3141.In this Pull Request we:
k6/experimental/fs
moduleopen
function that ensures the file is loaded in memory once, and returns aFile
object to the user.File
object abstraction to the JS runtime: which currently supports a singleStat
method and exposes aName
property.FileInfo
abstraction that is returned by theFile.stat
method and exposes thename
(basename) of the file and itssize
as properties to the JS runtime.Checklist
make ci-like-lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)
closes #3142
ref #3141
ref #2974