Giter Club home page Giter Club logo

Comments (7)

wyardley avatar wyardley commented on August 24, 2024 1

I would also suggest that there should be a restore-only option... having only the option that both restores the cache and saves it seems less useful when you break things up into multiple steps, unless I'm missing something.

We ended up just re-implementing what we had before, rather than using with-cache.

Orbs don't currently support orb-level params, right? That would be ideal for something like this. Especially since, if you override a param, you'd currently have to do that every time you invite a command like with-cache, right?

from circleci-orbs.

tunnckoCore avatar tunnckoCore commented on August 24, 2024

The thing is how can we access the parameters from the install-package-manager command inside the with-cache command ;d And why not use some "regular" "template" for those dynamic parts?

BTw, I already had some DRY applied on my config files :D Just using the Yamls referencing. But I understand why you are doing all this that way - it's probably because of the validation mostly.

https://github.com/tunnckoCoreLabs/charlike/blob/master/.circleci/config.yml

from circleci-orbs.

hutson avatar hutson commented on August 24, 2024

Going out on a limb here, but if yarn and npm guarantee that an install will create a node_modules/ directory that adheres to their respective lock file, is there a reason to wipe the local node_modules/ directory if the lockfile has changed?

from circleci-orbs.

tunnckoCore avatar tunnckoCore commented on August 24, 2024

is there a reason to wipe the local node_modules/ directory if the lockfile has changed?

Oh yeah, definitely. I think both will warn you about that anyway. So it's always better to clean it up.

from circleci-orbs.

hutson avatar hutson commented on August 24, 2024

Oh yeah, definitely. I think both will warn you about that anyway. So it's always better to clean it up. - @tunnckoCore

Really? My experience is to start every day with git pull followed by yarn install to ensure my local node_modules is sync'd with any changes in my project's yarn.lock file.

I don't remember ever seeing a warning. By wiping the cache on every lockfile change, we're basically doing git pull && rm -rf node_modules && yarn install which I don't feel is intuitive if I were to do that myself locally.

Orbs don't currently support orb-level params, right? - @wyardley

They do not, to my knowledge.

from circleci-orbs.

tunnckoCore avatar tunnckoCore commented on August 24, 2024

Really? My experience is to start every day with git pull followed by yarn install to ensure my local node_modules is sync'd with any changes in my project's yarn.lock file. @hutson

Oh yea yea, you're right. I thought about if you mess with both managers in same time and you have one of both lockfiles. Anyway.

@wyardley: yea, absolutely perfect place for orb-level params :) I always wanted Yaml to be a bit more template-y :D

from circleci-orbs.

KyleTryon avatar KyleTryon commented on August 24, 2024

Closing due to length of inactivity. The Node orb has since been moved to this repository: https://github.com/CircleCI-Public/node-orb

Please forward any issues or PRs to this repo. Thank you

from circleci-orbs.

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.