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

IR-2012 Update file system operation to promise API (Partial) #10189

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

jonathan-casarrubias
Copy link
Collaborator

@jonathan-casarrubias jonathan-casarrubias commented May 18, 2024

Summary

Due the extensive use of file system operations I decided to approach this story by sending portions of each fs api migration with the objective of avoiding extensive and overwhelming code reviews as well as to reduce risk.

For this pull request I introduced writeFileAsync, existsAsync and deprecated deleteFolderRecursive.

I have completely replaced any writeFileSyncRecursive call for the new writeFileAsync.
I have completely replaced any deleteFolderRecursive call for the native node.js api fps.rmdir(path, { recursive: true })
I have partially replaced some fs.existsSync calls for the new existsAsync function, will continue replacing these calls in subsequent PRs

Subtasks Checklist

[x] Implement non-blocking writeFileAsync helper
[x] Implement non-blocking existsAsync helper
[x] Implement non-blocking cpAsync helper
[x] Replace deleteFolderRecursive helper in favour of native non-blocking fps.rmdir function

Breaking Changes

N/A

References

JIRA Ticket IR-2012

QA Steps

Already modified tests using new non-blocking APIs should still pass
npm run test

Copy link

cla-bot bot commented May 18, 2024

Thank you for your pull request and welcome to the Ethereal Engine developer community!

We require contributors to sign our Copyright Assignment Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign the agreement at https://forms.gle/15ENsSAJGKf2ozvB7

The agreement has not been signed by users: @jonathan-casarrubias.

After signing the agreement, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR :)

Copy link

cla-bot bot commented May 18, 2024

Thank you for your pull request and welcome to the Ethereal Engine developer community!

We require contributors to sign our Copyright Assignment Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign the agreement at https://forms.gle/15ENsSAJGKf2ozvB7

The agreement has not been signed by users: @jonathan-casarrubias.

After signing the agreement, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR :)

@jonathan-casarrubias
Copy link
Collaborator Author

@cla-bot check

Copy link

cla-bot bot commented May 18, 2024

Checking that all contributors to this PR are verified.

@HexaField HexaField marked this pull request as draft May 20, 2024 02:30
@jonathan-casarrubias jonathan-casarrubias marked this pull request as ready for review May 22, 2024 16:36
scripts/create-project.ts Outdated Show resolved Hide resolved
…e non blocking

- Introduced writeFileAsync
- Introduced cpAsync
- Introduced existsAsync
- Updated getFilesRecursive
- Removed any sync helper
- Replaced custom deleteRecursive call in favour of fpd.rm
@HexaField HexaField self-requested a review May 29, 2024 03:50
@HexaField
Copy link
Member

Looking good now, I would like this QA'd on a deployment to make sure the builder and project installer works correctly

@barankyle
Copy link
Member

Looking good now, I would like this QA'd on a deployment to make sure the builder and project installer works correctly

Seemed to all work fine on QAT.

@HexaField HexaField marked this pull request as draft May 31, 2024 00:21
@HexaField
Copy link
Member

converted to a draft just while it doesnt have checks passing

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

Successfully merging this pull request may close these issues.

None yet

3 participants