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

module: fix wrong condition in early return logic for node_module path #6670

Closed
wants to merge 3 commits into from

Commits on Aug 2, 2016

  1. module: fix node_modules search path in edge case

    The `p < nmLen` condition will fail when a module's name is end with
    `node_modules` like `foo_node_modules`. The old logic will miss the
    `foo_node_modules/node_modules` in node_modules paths.
    
    TL;TR, a module named like `foo_node_modules` can't require any module
     in the node_modules folder.
    hefangshi committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    126cbfd View commit details
    Browse the repository at this point in the history
  2. module: fix root path node_modules missing issue

    Manual parsers didn't handle the root path on both platform, so push
    driver root node_modules when colon is matched in windows to avoid
    parse dirver name and direct push `/node_modules` into paths in posix.
    hefangshi committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    145f276 View commit details
    Browse the repository at this point in the history
  3. test: add real world case for node_modules paths

    Add a real world global node_modules path test case come from npm's
    dependency to make test more effective.
    hefangshi committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    ff893e4 View commit details
    Browse the repository at this point in the history