Git Product home page Git Product logo

Comments (2)

myrne avatar myrne commented on August 25, 2024

@ovmjm: How would you imagine this to work with npm itself, if at all?

I can imagine extending the exported normalize function with an options argument, making room for overriding some defaults, but unless you'd use this normalize function on its own, you won't have access to it. If you want npm to respect such an option, npm would need to support that explicitly, i.e. it would need to an extra configuration setting or command line argument.

The only way I see to sidestep npm in this regard would be to have this function look at some magic environment variable or so, which I don't feel good about.

I think it could make sense to have npm support an config setting for automatically expanding repo url shorthand for private packages, but this is in the hands of @isaacs .

@isaacs

  1. What do you think of accepting arguments in the form of normalize(data, warnFn, options) ?
  2. Are you willing to add support in npm for "expanding" private repo url short-hand differently than public packages?

from normalize-package-data.

myrne avatar myrne commented on August 25, 2024

I'd file an issue on isaacs/npm . If people agree it's a good thing, I'll add support for it, so npm can support it on the whole. Without explicit support from npm, I don't think adding support for it here is gonna be of much use to you.

I generally like the idea, although I think it could be better to allow differentiating between private and public packages for which "short-hand resolver" to use. As soon as npm reaches a public package, it can be assumed that all packages using short-hand will be available from GitHub. This would lighten the burden on the private git server. Bing able to override the resolver for public packages as well could be handy for either doing clever overrides for dependencies (not sure if that's a smart thing) or removing dependence on GitHub.

I don't think npm has any notion of "local" configuration currently (like Bower does with its local bowerrc files), so that would essentially entail a second feature request for npm, if needed.

from normalize-package-data.

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.