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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs.promises API is experimental on node v10 #2939

Closed
clshortfuse opened this issue Apr 10, 2020 · 6 comments
Closed

fs.promises API is experimental on node v10 #2939

clshortfuse opened this issue Apr 10, 2020 · 6 comments

Comments

@clshortfuse
Copy link

Basic info:

  • Node.js version: v10.16.0
  • jsdom version: 16.2.2

Minimal reproduction case

const { JSDOM } = require("jsdom");

Issue

On Node v10 fs.promises is Experimental and node emits a warning:

> (node:6749) ExperimentalWarning: The fs.promises API is experimental
    at Object.get (fs.js:1846:17)
    at Object.<anonymous> (/home/user/projects/project/node_modules/jsdom/lib/api.js:3:25)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at repl:1:19
@clshortfuse
Copy link
Author

Seems like it's no longer experimental past v10.17 according to nodejs/node#29875

Perhaps the package.json should bump the node version to >=10.17?

@TimothyGu
Copy link
Member

If you upgrade to the latest v10 version (10.20.0) at the time of speaking, you should see the warning disappear. This was changed in 10.17.0.

@TimothyGu
Copy link
Member

Perhaps the package.json should bump the node version to >=10.17?

We can't really do that without a major bump as it'll technically be a breaking change, and it seems too small of a thing to bump major for.

@clshortfuse
Copy link
Author

clshortfuse commented Apr 10, 2020

@TimothyGu Thanks. It does appear that anything <10.1 will fail because fs.promises doesn't exist until then. Before 10.1 it was fs/promises. I'll have to check if any of my deployments are running some of these versions. So an engine change might be proper. For >10.1 && <10.17 it's just a warning.

https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.1.0

@TimothyGu
Copy link
Member

Ah, that's unfortunate. FWIW, one of jsdom's dependencies webidl-conversions already requires v10.4 (which is pre-LTS and introduces BigInt), so if you use any version lower than 10.1 you should already see a warning at installation. It's good practice in general to always stay at the latest branch release for crucial security updates.

@domenic
Copy link
Member

domenic commented Sep 7, 2023

Node v10 is no longer supported by jsdom, so closing.

@domenic domenic closed this as completed Sep 7, 2023
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

No branches or pull requests

3 participants