Coder Social home page Coder Social logo

Comments (4)

frontsideair avatar frontsideair commented on July 18, 2024

Both of these suggestions make a lot of sense to me, so thanks! 👍 I think I can do it this weekend or leave it to you if you'd rather do it.

I'd also appreciate investigating similar sane defaults for other supported package managers if you decide you wanna do it.

from yarnhook.

christophehurpeau avatar christophehurpeau commented on July 18, 2024

npm:
--prefer-offline (https://blog.npmjs.org/post/161081169345/v500)

A new --prefer-offline option will make npm skip any conditional requests (304 checks) for stale cache data, and only hit the network if something is missing from the cache.

--no-audit maybe ? https://docs.npmjs.com/cli/install

The --no-audit argument can be used to disable sending of audit reports to the configured registries. See npm-audit for details on what is sent.

There is no option for read-only the package-lock.json, except npm ci but not something I would use here

from yarnhook.

christophehurpeau avatar christophehurpeau commented on July 18, 2024

pnpm:
--prefer-offline https://pnpm.js.org/docs/en/pnpm-install.html#prefer-offline

If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server.

--frozen-shrinkwrap

If true, pnpm doesn't generate a shrinkwrap file and fails if an update is needed.

--prefer-frozen-shrinkwrap

When true and the available shrinkwrap.yaml satisfies the package.json then a headless installation is performed. A headless installation is faster than a regular one because it skips dependencies resolution and peers resolution.

Unfortunately, there is no equivalent to pure-lockfile : either it fails (which I think is not a good thing for a hook) or it can be updated with prefer-frozen-shrinkwrap. I think prefer-frozen-shrinkwrap is better here ?

from yarnhook.

frontsideair avatar frontsideair commented on July 18, 2024

I think these options make more sense than the alternatives, and I agree that the package managers should offer more options. It may make sense to open issues to address these problems.

from yarnhook.

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.