Skip to content

deprecate fs.exists post io.js 1.0.0 #257

Closed
aliscco/alisco-node
#175
@timoxley

Description

@timoxley

tl;dr Unless the PR to get fs.access merged into joyent/node gets merged before io.js 1.0.0 hits, I have a feeling this deprecation may cost more than it's worth.

Anyone following the recommendation to use fs.access instead is instantly making their code incompatible with node, and for little gain.

In addition, this deprecation is super noisy as fs.exists is (mis)used everywhere.

fs.existsSync() is deprecated. Use fs.accessSync() instead.
fs.exists() is deprecated. Use fs.access() instead.
fs.existsSync() is deprecated. Use fs.accessSync() instead.

Yes, you can turn the deprecation notices off, but it's not ideal.

What is the upgrade path for a module author whose code would otherwise 'just work' without annoying deprecation notices on both node 0.10, 0.12 and io.js?

var exists = fs.access ? fs.access : fs.exists // Yuck.

Wondering if this deprecation (and any other changes like it) should be introduced after a 1.0.0 release. I'm all for rocking the boat but perhaps it would serve the io.js interests better if there isn't too much turbulence at first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions