Code Monkey home page Code Monkey logo

Comments (8)

isaacs avatar isaacs commented on May 28, 2024 3

So, the good news is, since cacache doesn't ever use move-file in such a way as to require making directories, so it doesn't hit the failure case. But still, it would be pretty easy to have a move-file that didn't rely on fs.promises and recursive fs.mkdir by just adding mkdirp as a dep.

from cacache.

alexander-akait avatar alexander-akait commented on May 28, 2024 2

/cc @AnthonyWC @assapir @darcyclarke @ethomson @evilpacket @gordey4doronin @hilli @isaacs @lumaxis @owenniblock @radiantspace @ruyadorno

Somebody can look at this? It is very important.

When did we start using cacache in webpack we use 15.0.0 version and guaranteed work on 10.13 node, but in 15.0.1 package migrates from move-file to move-concurrently 92b1251 without major release, but it was breaking change becaise package requires 10.17 node (https://github.com/sindresorhus/move-file/blob/master/package.json#L14). This created problems for many developers (locally and on CI). Yarn doesn't work without additional flags.

I ask you to pay attention to this problem, thanks

from cacache.

wraithgar avatar wraithgar commented on May 28, 2024 1

The last time we looked into fs.promises it was significantly slower than util.promisify. This is usually not a big deal for apps that only do a few fs calls, but the cli is very fs-heavy and thus those slowdowns were unacceptable.

from cacache.

alexander-akait avatar alexander-akait commented on May 28, 2024

/cc @isaacs

from cacache.

isaacs avatar isaacs commented on May 28, 2024

Yeah, the intent was to support all 10.x versions, so that's definitely an oversight on my part, sorry. I'll take a look this afternoon.

from cacache.

XhmikosR avatar XhmikosR commented on May 28, 2024

Sorry for commenting on an old issue, but it's probably worth dropping mkdirp now and perhaps switching to fs/promises instead of util.promisify.

from cacache.

wraithgar avatar wraithgar commented on May 28, 2024

Our current preferred way to use fs is through https://github.com/npm/fs which exports promisified versions of all methods by default, and of course has the polyfills we need for our node support matrix.

from cacache.

XhmikosR avatar XhmikosR commented on May 28, 2024

Thanks for the explanation! It might be worth switching to that then for all fs methods instead of util.promisify and mkdirp.

from cacache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.