Skip to content
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

Add last modify field "mtime" for FileBlob (#1431) #2491

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

zhongweiy
Copy link
Contributor

mtime value is epoch time stamp in millisecond unit.

Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner left a comment

Choose a reason for hiding this comment

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

Thank you for this. To match Web APIs, the property will need to be named lastModified instead of mtime but otherwise this is pretty close to mergeable.

Some unrelated tests will fail, don’t worry about those because we haven’t finished getting CI to be green yet (recently added more test coverage)

src/bun.js/bindings/ZigGeneratedClasses.cpp Outdated Show resolved Hide resolved
src/bun.js/webcore/blob.zig Outdated Show resolved Hide resolved
src/bun.js/webcore/blob.zig Outdated Show resolved Hide resolved
src/bun.js/webcore/blob.zig Outdated Show resolved Hide resolved
src/bun.js/webcore/response.classes.ts Outdated Show resolved Hide resolved
lastModified value is epoch timestamp in millisecond unit.
@zhongweiy
Copy link
Contributor Author

Jarred, thanks for your review. Make sense to me and the commit is updated.

@Jarred-Sumner
Copy link
Collaborator

macOS build is failing: https://github.com/oven-sh/bun/actions/runs/4534479006/jobs/8018213230?pr=2491

store.data.file.last_modified = toJSTime(stat.mtim.tv_sec, stat.mtim.tv_nsec);

I think it needs to be stat.mtime

@Jarred-Sumner Jarred-Sumner merged commit 1d13805 into oven-sh:main Apr 6, 2023
@Jarred-Sumner
Copy link
Collaborator

Merging but we need to add the missing types to TypeScript

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