Skip to content

test: update fakeFS.realpath as fs-extra uses it#1128

Merged
lamweili merged 1 commit intomasterfrom
update-test
Jan 14, 2022
Merged

test: update fakeFS.realpath as fs-extra uses it#1128
lamweili merged 1 commit intomasterfrom
update-test

Conversation

@lamweili
Copy link
Contributor

@lamweili lamweili commented Jan 14, 2022

fs-extra@10.0.0 broke it as it removed the check for fs.realpath.native.

+L064 exports.realpath.native = u(fs.realpath.native)

-L126
-L127 // fs.realpath.native only available in Node v9.2+
-L128 if (typeof fs.realpath.native === 'function') {
-L129   exports.realpath.native = u(fs.realpath.native)
-L130 }

(https://github.com/jprichardson/node-fs-extra/pull/887/files)

When fs.realpath is an empty function, fs.realpath.native is undefined.

realpath: () => {}, // fs-extra looks for this

`fs-extra@10.0.0` broke it as it removed the check for `fs.realpath.native`.

```diff
+L064 exports.realpath.native = u(fs.realpath.native)

-L126
-L127 // fs.realpath.native only available in Node v9.2+
-L128 if (typeof fs.realpath.native === 'function') {
-L129   exports.realpath.native = u(fs.realpath.native)
-L130 }
```
_(https://github.com/jprichardson/node-fs-extra/pull/887/files)_

When `fs.realpath` is an empty function, fs.realpath.native is `undefined`.

https://github.com/log4js-node/log4js-node/blob/25c17ad9802082d7a0fcf9c228cc5b99661e3ed9/test/tap/configuration-test.js#L17
@lamweili lamweili added this to the 6.4.0 milestone Jan 14, 2022
@lamweili lamweili added the tests Test issues or coverage label Jan 14, 2022
@lamweili lamweili merged commit 53313ea into master Jan 14, 2022
@lamweili lamweili changed the title test: update fakeFS.read as graceful-fs uses it test: update fakeFS.realpath as fs-extra uses it Jan 14, 2022
@lamweili lamweili added the dependencies Pull requests that update a dependency file label Jan 14, 2022
@lamweili lamweili deleted the update-test branch January 14, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file tests Test issues or coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant