Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: npm debug command #618

Closed
wants to merge 13 commits into from
Closed

RFC: npm debug command #618

wants to merge 13 commits into from

Commits on Feb 16, 2022

  1. Configuration menu
    Copy the full SHA
    b284060 View commit details
    Browse the repository at this point in the history
  2. Fix some typos. Precision.

    about-code committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    37f8cb9 View commit details
    Browse the repository at this point in the history
  3. Precision

    about-code committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    19941ce View commit details
    Browse the repository at this point in the history
  4. Wording

    about-code committed Feb 16, 2022
    Configuration menu
    Copy the full SHA
    b43a455 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6680f73 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2022

  1. Configuration menu
    Copy the full SHA
    245e63e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4d528f View commit details
    Browse the repository at this point in the history
  3. Wording

    about-code committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    c4bd675 View commit details
    Browse the repository at this point in the history
  4. fix typo.

    about-code committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    7491691 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2022

  1. Configuration menu
    Copy the full SHA
    f50e78b View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2022

  1. Consider packages with a bin object property and multiple executables

    For example
    
    *node_modules/foo/package.json*
    ~~~
    "bin": {
       "not-my-pkg-name": "./bin/script.js",
       "not-my-pkg-name-2": "./bin/script2.js"
    }
    ~~~
    
    Proposal:
    ~~~
    npm debug <package> --bin <name>
    ~~~
    as a general syntax.
    
    1. GIVEN there are multiple executables THEN there MUST be a `--bin` key and value in `argv`
    2. GIVEN there's only a single `bin` object property THEN a `--bin` in `argv` *MAY* be omitted
    3. GIVEN there is a `--bin` in `argv` THEN `<name>` MUST match some name in the `bin` object ELSE EXIT with NPM ERR.
    
    So the example above requires
    ~~~
    npm debug foo --bin not-my-pkg-name
    ~~~
    
    However
    
    *node_modules/foo/package.json*
    ~~~
    "bin": {
       "not-my-pkg-name": "./bin/script.js"
    }
    ~~~
    
    or
    
    ~~~
    {
      "bin": "./bin/script.js"
    }
    ~~~
    
    both allow for
    
    ~~~
    npm debug foo
    ~~~
    about-code committed Aug 6, 2022
    Configuration menu
    Copy the full SHA
    6ed32eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1351331 View commit details
    Browse the repository at this point in the history
  3. Clarify: what about packages with both a bin and a main that want to …

    …debug both?
    
    Allow for selecting which one to debug with --bin and --main argument.
    When both arguments are given --bin takes precedence over --main.
    When none are given fallback priority is the same.
    about-code committed Aug 6, 2022
    Configuration menu
    Copy the full SHA
    70c0a01 View commit details
    Browse the repository at this point in the history