stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

feat: add `fs/append-file`

Open HRIDYANSHU054 opened this issue 1 year ago • 22 comments

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.


@stdlib-js/reviewers

HRIDYANSHU054 avatar Mar 20 '24 13:03 HRIDYANSHU054

/stdlib update-copyright-years

kgryte avatar Mar 20 '24 18:03 kgryte

Thanks, @HRIDYANSHU054, for working on this. This PR is currently failing CI. Those failures need to be addressed before the PR can be reviewed.

kgryte avatar Mar 20 '24 18:03 kgryte

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.

HRIDYANSHU054 avatar Mar 21 '24 04:03 HRIDYANSHU054

@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

HRIDYANSHU054 avatar Mar 22 '24 03:03 HRIDYANSHU054

Corrected some more things. @kgryte can you once again check this

HRIDYANSHU054 avatar Mar 22 '24 17:03 HRIDYANSHU054

@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.

HRIDYANSHU054 avatar Mar 23 '24 12:03 HRIDYANSHU054

@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✨.

HRIDYANSHU054 avatar Mar 24 '24 08:03 HRIDYANSHU054

@kgryte can you please have a look

HRIDYANSHU054 avatar Mar 24 '24 14:03 HRIDYANSHU054

@kgryte please check

HRIDYANSHU054 avatar Mar 25 '24 08:03 HRIDYANSHU054

@kgryte please rerun the CI

HRIDYANSHU054 avatar Mar 25 '24 09:03 HRIDYANSHU054

@kgryte please can you again check it

HRIDYANSHU054 avatar Mar 25 '24 10:03 HRIDYANSHU054

@kgryte please check these changes

HRIDYANSHU054 avatar Mar 25 '24 16:03 HRIDYANSHU054

@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

HRIDYANSHU054 avatar Mar 25 '24 19:03 HRIDYANSHU054

@kgryte please review my pr

HRIDYANSHU054 avatar Mar 28 '24 12:03 HRIDYANSHU054

@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 avatar Mar 29 '24 18:03 HRIDYANSHU054

@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 avatar Apr 02 '24 01:04 kgryte

@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.

HRIDYANSHU054 avatar Apr 02 '24 11:04 HRIDYANSHU054

@kgryte the changes you highlighted have been implemented, certain things like the new benchmarking approach strongly needs to be reviewed

HRIDYANSHU054 avatar Apr 05 '24 20:04 HRIDYANSHU054

@kgryte can you approve these remaining workflows and then review the changes

HRIDYANSHU054 avatar Apr 12 '24 13:04 HRIDYANSHU054

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.

HRIDYANSHU054 avatar Apr 23 '24 17:04 HRIDYANSHU054

hi @kgryte could you review this

HRIDYANSHU054 avatar Apr 29 '24 12:04 HRIDYANSHU054

@kgryte could you review this PR

HRIDYANSHU054 avatar May 05 '24 14:05 HRIDYANSHU054

Thanks @Planeshifter looking forward to learning and contribute more to stdlib node's environment

HRIDYANSHU054 avatar May 19 '24 09:05 HRIDYANSHU054