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

Enhancements I/O utils function #1

Merged
merged 7 commits into from
Feb 6, 2024
Merged

Conversation

krishna-gujjjar
Copy link
Contributor

This pull request includes several improvements and fixes to the IO utils functions:

  • Updated the return type of readFileAsJson from Promise<ComposerJson | undefined> to Promise<ComposerJson>.
  • Improved the removeFile function and added a return type of Promise<boolean>.
  • Updated the return type of writingFile function from Promise<number | void> to Promise<boolean> and removed the file exists checking.
  • Fixed the error type caught in the readFileAsJson function.
  • Handled JSON parse's syntax error in readFileAsJson and fixed the issue of invalid JSON file error.
  • Fixed the access function throwing ENOENT: No such file or directory error.
  • Added the await keyword to isFileExists function checking to properly handle the pending status.

These changes aim to improve of our IO operations.

@krishna-gujjjar krishna-gujjjar merged commit dfcd202 into main Feb 6, 2024
@krishna-gujjjar krishna-gujjjar deleted the develop-better-io branch February 6, 2024 06:48
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.

1 participant