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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExperimentalWarning: The fs.promises API is experimental (Node.js 10.1.0) #577

Closed
bajtos opened this issue May 9, 2018 · 2 comments 路 Fixed by #578
Closed

ExperimentalWarning: The fs.promises API is experimental (Node.js 10.1.0) #577

bajtos opened this issue May 9, 2018 · 2 comments 路 Fixed by #578

Comments

@bajtos
Copy link
Contributor

bajtos commented May 9, 2018

  • Operating System: MacOS 10.13.4
  • Node.js version: 10.1.0
  • fs-extra version: 5.0.0

Hello! First of all, thank you for the great work on maintaining fs-extra 馃檱

With Node.js 10.1.0 recently released, we started to see the following warning in our test suite:

(node:7885) ExperimentalWarning: The fs.promises API is experimental

It turns out the fs module provides a new property promises which triggers the warning on the first access.

You can try it out yourself:

$ node -v
v10.1.0
$ node -e "console.log(typeof fs.promises)"
object
(node:8277) ExperimentalWarning: The fs.promises API is experimental

On Node.js version 10.0.0:

$ node -e "console.log(typeof fs.promises)"
undefined

Can we fix lib/fs/index.js to not emit ExperimentalWarning until the experimental API is actually accessed?

@bajtos
Copy link
Contributor Author

bajtos commented May 9, 2018

Proposed fix: #578

@jdalton
Copy link
Contributor

jdalton commented May 9, 2018

Related Node PR: nodejs/node#20504.

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 a pull request may close this issue.

2 participants