stdlib
stdlib copied to clipboard
feat: add `fs/append-file`
adds file system append file utility to Stdlib
Description
What is the purpose of this pull request? This pull request brings the node js file system append-file utility to Stdlib
This pull request:
is aligned with the purpose of achievinng feature parity with Node.js fs package. It Brings file system's powerful append file utility to Stdlib expanding its existing fs utilities.
Questions
Any questions for reviewers of this pull request?
No.
Other
Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.
Implementation details
-- async version
var join = require("path").join;
var fpath = join(__dirname, "examples", "fixtures", "file.txt");
appendFile(fpath, "beep boop\n", onAppend);
function onAppend(error) {
if (error) {
throw error;
}
}
-- sync version
var appendFile = require( '@stdlib/fs/append-file' );
// Explicitly handle the error...
var err = appendFile( './beep/boop.txt', 'data to append\n' );
if ( err instanceof Error ) {
throw err;
}
Checklist
Please ensure the following tasks are completed before submitting this pull request.
- [x] Read, understood, and followed the contributing guidelines.
@stdlib-js/reviewers
/stdlib update-copyright-years
Thanks, @HRIDYANSHU054, for working on this. This PR is currently failing CI. Those failures need to be addressed before the PR can be reviewed.
Hi @kgryte , Thanks for checking this PR. I m currently working on solving these issues. Majority of them have arised because the fixtures directory was somehow not pushed to github.
@kgryte can you please have a look, I have made changes to tackle the previous PR issues. Though this might seem a silly question but why is it stuck in "Expected — Waiting for status to be reported" , is there any workaround I could do to get it cleared
Corrected some more things. @kgryte can you once again check this
@kgryte can you please approve the remaining workflows. I am interested in this and would like to tackle any other issue that arises or any change that is required.
@kgryte all the issues that have been highlighted thus far during the CI checks have been solved. Can you again approve the remaining workflows so that if there are any other errors then they could also be solved and this pr can thus be reviewed. On a sidenote really thanks for your patience✨.
@kgryte can you please have a look
@kgryte please check
@kgryte please rerun the CI
@kgryte please can you again check it
@kgryte please check these changes
@kgryte please have a look , a Lot of CI check issues have been solved and now only the lint check is remaining to be solved
@kgryte please review my pr
@kgryte the errors that were coming during the CI checks have all been solved. Please review this PR and tell me if any change is needed.
@HRIDYANSHU054 Would you mind checking the box in the OP indicating that you've read the contributing guidelines? This needs to be checked in order to confirm that you agree to licensing terms and the Developer's Certificate of Origin.
@kgryte thanks for going through this and reviewing it. I don't why the splitting has happened in only some functions and not others even though I have configured my ESlint to highlight these issues if they occur. Also can I address this after 5th april as I am currenlty having fromm today my mid semester examinations.
@kgryte the changes you highlighted have been implemented, certain things like the new benchmarking approach strongly needs to be reviewed
@kgryte can you approve these remaining workflows and then review the changes
Hi ✋ @kgryte just hoping you could further review these changes, and anything more that you want me to change or add I will work on that also.
hi @kgryte could you review this
@kgryte could you review this PR
Thanks @Planeshifter looking forward to learning and contribute more to stdlib node's environment