profile
viewpoint
Mani Maghsoudlou manidlou California full stack developer &-> mind explorer.

jprichardson/node-fs-extra 6865

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()

jprichardson/node-klaw 226

A Node.js file system walker with a Readable stream interface. Extracted from fs-extra.

manidlou/node-klaw-sync 99

Node.js recursive synchronous fast file system walker

manidlou/elemon 54

live-reload Electron application during development

manidlou/dir-tree-creator 12

Simple npm like directory tree creator based on the given path

manidlou/concatjson 5

concatenated JSON streaming parser/serializer for node.js

manidlou/gh-download-count 2

Get download count of a GitHub release https://gh-download-count.herokuapp.com/

manidlou/bracks-cli 0

node.js bracks command line interface

manidlou/chartbuzz 0

React app to create simple charts quickly and easily https://manidlou.github.io/chartbuzz

manidlou/deeputil 0

tiny node.js recursive utility to deal with keys/values of deeply nested objects

pull request commentjprichardson/node-fs-extra

move: support changing case in case-insensitive systems

I verified that on Mac and it successfully changed the case.

manidlou

comment created time in 5 days

startedssllabs/research

started time in 8 days

startedhelmetjs/helmet

started time in 8 days

startedcertbot/certbot

started time in 8 days

startedGeekyAnts/NativeBase

started time in 11 days

pull request commentjprichardson/node-fs-extra

move: support changing case in case-insensitive systems

@RyanZim that's definitely required and I wanted to do that but I don't have neither of those systems. I appreciate if anyone could verify that on Mac and Windows! Feel free to let me know if the changes don't work and I will work on it then! I also might be able to have access to my friend's macbook tomorrow, so I'll let you know then.

manidlou

comment created time in 14 days

create barnchjprichardson/node-fs-extra

branch : mani/move-case-insensitive

created branch time in 15 days

delete branch jprichardson/node-fs-extra

delete branch : mani/copy-err-msg

delete time in 15 days

push eventjprichardson/node-fs-extra

Mani Maghsoudlou

commit sha 35b078e9d52105dc287d2dc9a2a1e5de8a7b152e

copy*(): throw err if src and dest are not the same type

view details

Mani Maghsoudlou

commit sha 3de2b162a8ff6c011ab3e1a075e0640ab4bb988c

copy*(): allow copying broken symlinks

view details

Mani Maghsoudlou

commit sha ff83f16cd692a109fb59bcb0a9136666474ede9b

bring back deleted move tests

view details

Mani Maghsoudlou

commit sha 403060c780074baf1e49d55997386f9b05c02dc7

Merge pull request #779 from jprichardson/mani/copy-err-msg copy: allow copying broken symlinks

view details

push time in 15 days

PR merged jprichardson/node-fs-extra

Reviewers
[breaking] copy*(): allow copying broken symlinks feature-copy

Fixes #765, fixes #638, fixes #761.

+211 -134

8 comments

20 changed files

manidlou

pr closed time in 15 days

create barnchjprichardson/node-fs-extra

branch : v10

created branch time in 15 days

startedkelektiv/node.bcrypt.js

started time in 17 days

pull request commentjprichardson/node-fs-extra

Fix tests on Node 14

@RyanZim thank you for taking care of this quickly! I think the issue number in description should be #798?!

RyanZim

comment created time in 17 days

PR opened jprichardson/node-fs-extra

Update issue template

Just realized last comment would create an empty line between bullet points! Grouped them all to create a consistent layout!

+1 -1

0 comment

1 changed file

pr created time in 17 days

create barnchjprichardson/node-fs-extra

branch : mani/issue-template

created branch time in 17 days

issue openedjprichardson/node-fs-extra

Some tests are failing in node.js 14

<!-- First ensure you installed the latest version of fs-extra --> <!-- If your bug still exists please fill out the following information if it applies to your issue: --> <!-- Please check if you have installed a supported version of Node.js as written in "engines" in the package.json -->

  • Operating System: Ubuntu 18.04.4
  • Node.js version: 14.2.0
  • fs-extra version: 9.0.0

These tests are failing in node.js 14 while everything is fine in node.js 13!

1) fs-extra
       + createFile
         > when the file does exist
           should give clear error if node in directory tree is a file:
     TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
      at Object.writeFileSync (fs.js:1380:5)
      at Context.<anonymous> (lib/ensure/__tests__/create.test.js:49:12)

  2) fs-extra
       + createFileSync
         > when the file does exist
           should give clear error if node in directory tree is a file:
     TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
      at Object.writeFileSync (fs.js:1380:5)
      at Context.<anonymous> (lib/ensure/__tests__/create.test.js:82:12)

  3) remove
       + remove()
         should delete a directory full of directories and files:
     TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
      at Object.writeFileSync (fs.js:1380:5)
      at buildFixtureDir (lib/remove/__tests__/remove.test.js:24:6)
      at Context.<anonymous> (lib/remove/__tests__/remove.test.js:47:7)

created time in 17 days

PR opened jprichardson/node-fs-extra

Consistentify types in docs

Small things but I believe still important as IMHO inconsistency kills the heart of a good project :grin:!

+6 -6

0 comment

6 changed files

pr created time in 18 days

create barnchjprichardson/node-fs-extra

branch : mani/more-docs

created branch time in 18 days

startedmicrosoft/vscode

started time in 20 days

issue commentjprichardson/node-fs-extra

copy "archive" option (cp -a)

@jprichardson @RyanZim @JPeer264 ?^

aikar

comment created time in 21 days

push eventjprichardson/node-fs-extra

Mani Maghsoudlou

commit sha c157ec337f1bba365795f498ba153b9aabd45ffd

add Error type to docs

view details

push time in 21 days

startedmeinto/react-native-event-listeners

started time in 22 days

pull request commentjprichardson/node-fs-extra

Improve docs

Sure @RyanZim! good call!

manidlou

comment created time in 22 days

push eventjprichardson/node-fs-extra

Mani Maghsoudlou

commit sha 7940451adaf9728d882ac0ce58d2555386a41fd3

Update docs/ensureSymlink.md Co-authored-by: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com>

view details

push time in 22 days

push eventjprichardson/node-fs-extra

Mani Maghsoudlou

commit sha 99851aa02e4bcc282f30931f41d5629318a7ba6d

Update docs/ensureSymlink-sync.md Co-authored-by: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com>

view details

push time in 22 days

PR opened jprichardson/node-fs-extra

Improve docs

Just a little improvement in docs!

+77 -70

0 comment

24 changed files

pr created time in 22 days

create barnchjprichardson/node-fs-extra

branch : mani/docs

created branch time in 22 days

pull request commentjprichardson/node-fs-extra

[breaking] copy*(): allow copying broken symlinks

@RyanZim @JPeer264 what is the deal with this branch ci/travis-osximage?! Do we still need to keep it?

manidlou

comment created time in 23 days

pull request commentjprichardson/node-fs-extra

[breaking] copy*(): allow copying broken symlinks

@RyanZim I found a fix for #759 that will have a merge conflict with this later on. So I am gonna create v10 branch and we will merge this to v10 branch. That way I can move forward with the #759 fix.

Feel free to let me know if you have any objections!

manidlou

comment created time in 23 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha ae9a7baea9a790b2d3ca0b58a1463f5820947af7

verify move test 15

view details

push time in 23 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha ca72d0d7def40bd3bb676fcce3ec363a8bcd1e3e

verify move test 14

view details

push time in 23 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha d4c2d25353a4f497896b9752e5b228d8ed7589e8

verify move test 13

view details

push time in 23 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 2e314fbc6b27432a1391fdf67d2efbf79be57937

verify move test 12

view details

push time in 23 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 8b7901f53b40603e5cb0b2eface2210a63dd05fe

verify move test 11

view details

push time in 23 days

issue commentjprichardson/node-fs-extra

Cannot move file to change case on case insensitive fs

@wmertens I still don't understand how you get dest already exists error because with the latest version you get Source and destination must not be the same which is still not correct behavior for case-insensitive systems! That's why I asked you to give us an exact test case that would address your issue and you refused to do that too! So I am sorry from my perspective you don't have respect for this project and its maintainers' time!

wmertens

comment created time in 23 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 4cd79201780fd8d08309e5456d8b83e3ed5b2d7e

verify move test 10

view details

push time in 24 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 34c0bd34f699133c2b93190609df01d7e862d8fd

verify move test 9

view details

push time in 24 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 64e32df486c40990c90fa9edefc1677a38738d5d

verify move test 8

view details

push time in 24 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 1e35156a3455febf03f45d75947362c2a044ce3d

verify move test 7

view details

push time in 24 days

issue commentjprichardson/node-fs-extra

Cannot move file to change case on case insensitive fs

@wmertens I finally found some time to dig into your case! So here is what I found:

  1. I appreciate if you would respect our issue template and respond to 3 simple questions that would help us resolve YOUR issue faster!
  2. If you are using the latest version of fs-extra, we actually check the inodes of src and dest (as well as other properties) to determine if src and dest are the same before moving! However I just realized that implementation doesn't support cases like yours (when you want to just change the case) and I am working on that!
  3. We actually have a test file for cases like this, however again I just realized that those tests are broken for case-insensitive systems! Currently for case-insensitive systems those tests expect an error thrown however the corect behavior should allow users change the case for case-insensitive systems! and I am working on that too!
wmertens

comment created time in 24 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 5261c7deed6d49493c202dd81153b204e0b19b51

verify move test 6

view details

push time in 24 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 43dab8e8f036633b2f326f3c4de7ad856b4f6e3d

verify move test 5

view details

push time in 24 days

issue commentjprichardson/node-fs-extra

Tests are failing on mac

@RyanZim @JPeer264 Is this still valid?

JPeer264

comment created time in 24 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 74dae2ca1629cd0fd1816560c45d8ef3ac16b657

verify move test 4

view details

push time in 24 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 2b8b0533367f76c2ab69e15afc27bb4ee26532e9

verify move test 3

view details

push time in 24 days

push eventmanidlou/node-fs-extra

Mani Maghsoudlou

commit sha 9fb21dc731a24ca6bcd397bf9f598c854e9951bd

verify move test 2

view details

push time in 24 days

PR opened manidlou/node-fs-extra

verify move test

verify test

+2 -0

0 comment

1 changed file

pr created time in 24 days

create barnchmanidlou/node-fs-extra

branch : move-case-insensitive

created branch time in 24 days

fork manidlou/node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()

fork in 24 days

pull request commentjprichardson/node-fs-extra

copy*(): allow copying broken symlinks

Do we have enough test cases where we use the actual default dereference: false? Seems like a lot of tests have changed to true. I'm not sure if these tests with the default false are actually needed

@JPeer264 most of those tests that are changed to dereference: true are edge cases that they needed to be changed because of the broken changes (new behavior). For the case dereference: false I added new test in the broken symlink test file. But generally, it doesn't hurt do have more tests for the case dereference: false!

manidlou

comment created time in 24 days

pull request commentjprichardson/node-fs-extra

copy*(): allow copying broken symlinks

I was holding off merging since it's semver-major, and I wasn't sure if I wanted to release a major for just this, or bundle in some other changes.

@RyanZim sounds good! So we can add this to the 10.0.0 milestone then.

manidlou

comment created time in 24 days

pull request commentjprichardson/node-fs-extra

copy*(): allow copying broken symlinks

@RyanZim should we wait for more approvals or this is ready to be merged?

manidlou

comment created time in 25 days

issue commentjprichardson/node-fs-extra

Error: Source and destination must not be the same

@ashubham can you please provide us a reproducible test case?

ashubham

comment created time in 25 days

startedvikrantnegi/react-native-animated-loader

started time in a month

startedhapijs/joi

started time in a month

startedmoment/moment

started time in a month

startedreact-native-community/react-native-maps

started time in 2 months

startedmongodb/node-mongodb-native

started time in 2 months

startedxgfe/react-native-datepicker

started time in 2 months

startedaws/aws-sdk-js

started time in 2 months

pull request commentjprichardson/node-fs-extra

copy*(): allow copying broken symlinks

This would be semver-major, right?

That's right @RyanZim.

manidlou

comment created time in 2 months

startedmagicismight/react-native-root-toast

started time in 2 months

issue closedjprichardson/node-fs-extra

Error on run "npm start" from Loopback 4

I'm starting an Loopback 4 app and when I run "npm start" there is an error on several files from fs-extra.

file: fs-extra/lib/mkdirs/make-dir.js:86

> getting-started@1.0.0 prestart /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> npm run build


> getting-started@1.0.0 build /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> lb-tsc

/home/gabriel/Documents/gabriel/loopback-getting-start/getting-started/node_modules/fs-extra/lib/mkdirs/make-dir.js:86
      } catch {
              ^

SyntaxError: Unexpected token {
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)`

file: fs-extra/lib/mkdirs/make-dir.js:135

> getting-started@1.0.0 prestart /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> npm run build


> getting-started@1.0.0 build /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> lb-tsc

/home/gabriel/Documents/gabriel/loopback-getting-start/getting-started/node_modules/fs-extra/lib/mkdirs/make-dir.js:135
      } catch {
              ^

SyntaxError: Unexpected token {
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)

file: fs-extra/lib/empty/index.js:33

> getting-started@1.0.0 prestart /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> npm run build


> getting-started@1.0.0 build /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> lb-tsc

/home/gabriel/Documents/gabriel/loopback-getting-start/getting-started/node_modules/fs-extra/lib/empty/index.js:33
  } catch {
          ^

SyntaxError: Unexpected token {
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)

file: fs-extra/lib/remove/rimraf.js:305

> getting-started@1.0.0 prestart /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> npm run build


> getting-started@1.0.0 build /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> lb-tsc

/home/gabriel/Documents/gabriel/loopback-getting-start/getting-started/node_modules/fs-extra/lib/remove/rimraf.js:305
      } catch {}
              ^

SyntaxError: Unexpected token {
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)

file: fs-extra/lib/ensure/file.js:47

> getting-started@1.0.0 prestart /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> npm run build


> getting-started@1.0.0 build /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> lb-tsc

/home/gabriel/Documents/gabriel/loopback-getting-start/getting-started/node_modules/fs-extra/lib/ensure/file.js:47
  } catch {}
          ^

SyntaxError: Unexpected token {
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)

file: fs-extra/lib/ensure/symlink-type.js:22

> getting-started@1.0.0 prestart /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> npm run build


> getting-started@1.0.0 build /home/gabriel/Documents/gabriel/loopback-getting-start/getting-started
> lb-tsc

/home/gabriel/Documents/gabriel/loopback-getting-start/getting-started/node_modules/fs-extra/lib/ensure/symlink-type.js:22
  } catch {
          ^

SyntaxError: Unexpected token {
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)

It's look like syntaxError and after I update the files above it worked!

  • **Operating System: ubunto 19.04 **
  • Node.js version: v9.11.2
  • fs-extra version: fs-extra

closed time in 2 months

gfernandes410

issue commentjprichardson/node-fs-extra

Error on run "npm start" from Loopback 4

duplicate of #771.

gfernandes410

comment created time in 2 months

issue closedjprichardson/node-fs-extra

SyntaxError: Unexpected token {

  • Operating System: Ubuntu 18.04.4 LTS <!-- Please check if you have installed a supported version of Node.js as written in "engines" in the package.json -->
  • Node.js version: v12.16.1
  • fs-extra version: ^9.0.0
> node ./main.js

.../node_modules/fs-extra/lib/mkdirs/make-dir.js:86
      } catch {
              ^

SyntaxError: Unexpected token {

Looks like it should be catch (e) { ?

closed time in 2 months

edwlook

issue commentjprichardson/node-fs-extra

SyntaxError: Unexpected token {

duplicate of #771.

edwlook

comment created time in 2 months

startedwinstonjs/winston

started time in 2 months

startedexpressjs/morgan

started time in 2 months

push eventjprichardson/node-fs-extra

Mani Maghsoudlou

commit sha ff83f16cd692a109fb59bcb0a9136666474ede9b

bring back deleted move tests

view details

push time in 2 months

PR opened jprichardson/node-fs-extra

copy*(): allow copying broken symlinks

Fixes #765 #638 #761.

+209 -279

0 comment

20 changed files

pr created time in 2 months

create barnchjprichardson/node-fs-extra

branch : mani/copy-err-msg

created branch time in 2 months

issue commentjprichardson/node-fs-extra

Crash on copySync in 9.0.0

@jlippold fs-extra v9 requires node v10+. That's stated in the changelog. That's optional catch binding that requires node v10+ to work.

jlippold

comment created time in 2 months

startedauth0/node-jsonwebtoken

started time in 2 months

issue commentjprichardson/node-fs-extra

Cannot move file to change case on case insensitive fs

@wmertens can you provide us with repro test case please?

wmertens

comment created time in 2 months

issue commentjprichardson/node-fs-extra

Unix commands vs. fs-extra functions

I would say we remove them (I am still fine if you guys decide to edit them to be clear) but I don't understand how this would be helpful to users because they are ultimately different implementations and I think keeping them in the docs still leave some confusion around this!

manidlou

comment created time in 2 months

starteduuidjs/uuid

started time in 2 months

startedaxios/axios

started time in 3 months

startedsinonjs/sinon

started time in 3 months

startedmochajs/mocha

started time in 3 months

more