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

fix: ensure metadata is updated correctly so that watchFile is correctly triggered #891

Conversation

vangie
Copy link
Contributor

@vangie vangie commented Dec 21, 2022

  1. folder's nlink default value is 2
  2. add subfolder nlink++
  3. atime updated
  4. ctime updated after uid/gid/atime/mtime/perm/nlink updated

Resolves #889
Resolves #901

src/__tests__/node.test.ts Outdated Show resolved Hide resolved
src/__tests__/promises.test.ts Outdated Show resolved Hide resolved
@G-Rath
Copy link
Collaborator

G-Rath commented Apr 5, 2023

@vangie would you mind applying prettier, then I think we can land this

@vangie vangie force-pushed the vangie/metadata-changes-follow-common-unix-filesystem branch from 0762647 to edb06aa Compare April 11, 2023 03:01
@vangie
Copy link
Contributor Author

vangie commented Apr 11, 2023

@vangie would you mind applying prettier, then I think we can land this

@G-Rath fixed

@G-Rath G-Rath changed the title fix: some metadata changes not follow common unix filesystem lead to node.watchFile not trigger fix: ensure metadata is updated correctly so that watchFile is correctly triggered Apr 11, 2023
@G-Rath
Copy link
Collaborator

G-Rath commented Apr 11, 2023

@vangie looks like it's still not happy, and the tests are all failing

@vangie vangie force-pushed the vangie/metadata-changes-follow-common-unix-filesystem branch from edb06aa to 85a0f5a Compare April 11, 2023 11:50
@vangie
Copy link
Contributor Author

vangie commented Apr 11, 2023

@vangie looks like it's still not happy, and the tests are all failing

@G-Rath Sorry, I tried to fix it again. I don’t know why the github action won’t be triggered immediately after I push it.

src/node.ts Outdated Show resolved Hide resolved
@G-Rath
Copy link
Collaborator

G-Rath commented Apr 11, 2023

It's a security thing - you should be able to run the tests locally though to ensure they work.

It looks like this is not compatible with #902 - @alienzhou might be able to help out here

…node.watchFile not trigger

1. nlink default value is 2
2. add subfolder nlink++
3. atime updated
4. ctime updated after uid/gid/atime/mtime/perm/nlink updated

streamich#889
@vangie vangie force-pushed the vangie/metadata-changes-follow-common-unix-filesystem branch from 85a0f5a to a5c99bd Compare April 11, 2023 23:55
@vangie
Copy link
Contributor Author

vangie commented Apr 11, 2023

It's a security thing - you should be able to run the tests locally though to ensure they work.

It looks like this is not compatible with #902 - @alienzhou might be able to help out here

@G-Rath I've rebased the latest master, and fixed the tests.

@vangie vangie force-pushed the vangie/metadata-changes-follow-common-unix-filesystem branch from a5c99bd to 78ccec9 Compare April 12, 2023 00:06
Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

Looking good - just have a few tweaks I'd like to the test structure

src/node.ts Outdated Show resolved Hide resolved
src/__tests__/node.test.ts Outdated Show resolved Hide resolved
src/__tests__/node.test.ts Outdated Show resolved Hide resolved
src/__tests__/node.test.ts Outdated Show resolved Hide resolved
@vangie vangie force-pushed the vangie/metadata-changes-follow-common-unix-filesystem branch from af531b2 to 48a6cad Compare April 17, 2023 06:58
src/__tests__/node.test.ts Outdated Show resolved Hide resolved
src/__tests__/node.test.ts Outdated Show resolved Hide resolved
@vangie vangie force-pushed the vangie/metadata-changes-follow-common-unix-filesystem branch from 48a6cad to e339817 Compare April 18, 2023 01:26
src/__tests__/node.test.ts Outdated Show resolved Hide resolved
refactor: add the appropriate modifiers to properties & getters & setters.

Co-authored-by: Gareth Jones <Jones258@Gmail.com>
@vangie vangie force-pushed the vangie/metadata-changes-follow-common-unix-filesystem branch from e339817 to 1a1b186 Compare April 18, 2023 07:58
@G-Rath G-Rath merged commit 8af880e into streamich:master Apr 20, 2023
13 checks passed
streamich pushed a commit that referenced this pull request Apr 20, 2023
## [3.5.1](v3.5.0...v3.5.1) (2023-04-20)

### Bug Fixes

* ensure metadata is updated correctly so that `watchFile` is correctly triggered ([#891](#891)) ([8af880e](8af880e))
@streamich
Copy link
Owner

🎉 This PR is included in version 3.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants