Skip to content

why "freeze" command only outputs global packages? #71

Closed

Description

@maniqui

Hi. I'm trying to understand the rationale on the freeze command only freezing globally installed modules.
I get that nodeenv is useful mainly for installing packages in a virtual node environment in a global fashion. But what about packages installed locally (in a node_modules/) folder?

I'm fairly new to all things virtualenv/nodeenv, so there may be a good reason for only listing global packages when using the nodeenv "freeze" command, but on the other hand, I think I may find it useful to be able to freeze locally installed requirements.

Activity

  1. ekalinin commented on May 29, 2014

    @ekalinin
    Owner

    freeze was added as analogue of the pip freeze.
    It's main task is to save in a file globally installed packages.

  2. maniqui commented on May 29, 2014

    @maniqui
    Author

    Thanks @ekalinin.

    Wouldn't it make some sense to also freeze local packages, particularly, when local node_modules/ isn't kept versioned?
    Maybe an -l flag for freeze could come handy.

    In the meanwhile, I've taken a look at the definition of freeze and modified the following line (I've just removed the -g option from npm ls) to output locally installed packages in the same fashion:

    npm ls | grep -E '^.{4}\w{1}' | grep -o -E '[a-zA-Z0-9\.\-]+@[0-9]+\.[0-9]+\.[0-9]+([\+\-][a-zA-Z0-9\.\-]+)*' | grep -v npm

  3. ekalinin commented on Jun 4, 2014

    @ekalinin
    Owner

    Yes, -l for freeze command — is a good idea.
    I'll try to add it in the nearest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions