Code Monkey home page Code Monkey logo

Comments (7)

rstacruz avatar rstacruz commented on May 16, 2024

seems like an interesting idea, but i'm wondering: what would be the practical use case of separating dev and prod dependencies apart from .dockerignore?

from pnpm.

mhart avatar mhart commented on May 16, 2024

.gitignore as well – for when you want to check your prod dependencies in to git, but not your dev dependencies. I'm sure there are other ".ignore" files that could benefit from this too.

Any time you want to tar up / archive your project to transfer or deploy it anywhere else, basically.

There's an argument to be made that it makes it easier to navigate from a filesystem perspective – when you want to debug your modules, etc – you know you just need to worry about what's in the prod dir.

from pnpm.

rstacruz avatar rstacruz commented on May 16, 2024

Interesting, but this is a lot more nuanced than it seems on the surface. What if both your prod and dev dependencies use [email protected], shouldn't it be present in both layers? which one gets precedence over the other?

I'd wait to see what npm comes up with to solve that solution. As they mentioned in npm/npm#9674, they're looking into it. I'm sure they're more knowledgeable about the ins and outs of this problem and the possible corner cases there can be.

Thanks for the report!

from pnpm.

jonathanong avatar jonathanong commented on May 16, 2024

i prefer the tarballs to be stored/cached globally, but i'd always want the actual packages to be unzipped and compiled within the current module. otherwise, if something fucks up, i'd have to clear the global cache.

from pnpm.

mhart avatar mhart commented on May 16, 2024

@rstacruz prod would always take precedence over dev in that case

Agreed though, probably better to wait to see how npm's plan pans out.

@jonathanong I'm not sure what you're referring to?

from pnpm.

rstacruz avatar rstacruz commented on May 16, 2024

i prefer the tarballs to be stored/cached globally, but i'd always want the actual packages to be unzipped and compiled within the current module. otherwise, if something fucks up, i'd have to clear the global cache.

it seems this is the only way to go right now: #19 (comment)

from pnpm.

zkochan avatar zkochan commented on May 16, 2024

@mhart, we are currently working together with ied on some shared store specs. You can review the specs and add your suggestions. https://github.com/alexanderGugel/ied/blob/spec/spec/STORE.md

from pnpm.

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.