change buffer type to string in File interface - #115
Open
JunNishimura wants to merge 5 commits into
Open
Conversation
JunNishimura
requested review from
AgnesToulet,
ankur22,
codebien,
inancgumus,
joanlopez,
mstoykov and
oleiade
as code owners
March 20, 2026 09:18
This was referenced Mar 20, 2026
|
Can you please review the conflicts @JunNishimura? Thanks! |
Author
|
Hi, I resolved the conflicts. I would appreciate it if you check again. Thanks! |
inancgumus
removed their request for review
June 17, 2026 23:08
szkiba
removed their request for review
July 7, 2026 15:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
This fixes grafana/k6#4655
Regarding the above issue, I took the approach of changing the type of the
bufferproperty of theFileinterface tostring.I thought that aligning the type to Base64-encoded strings would have the smallest impact because the existing implementation expects Base64-encoded strings.
atob(file.buffer).The description regarding mimeType mentioned in the issue has already been resolved, so I didn't do anything about the mimeType property.
The issue where the type of the buffer property is listed as ArrayBuffer in the documentation has been fixed in the following pull request. I plan to merge the PR below after merging this PR, or at the same time.
grafana/k6-docs#2205
Since no tests were implemented from the start, the tests are not being run and added.
Please fill in this template.
pnpm test <package to test>.Select one of these and delete the others:
If adding a new definition:
.d.tsfiles generated via--declarationdts-gen --dt, not by basing it on an existing project.tsconfig.jsonshould havenoImplicitAny,noImplicitThis,strictNullChecks, andstrictFunctionTypesset totrue.If changing an existing definition:
package.json.If removing a declaration:
notNeededPackages.json.