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

Correct module real path resolution #1696

Merged
merged 2 commits into from Jan 25, 2021
Merged

Correct module real path resolution #1696

merged 2 commits into from Jan 25, 2021

Commits on Mar 24, 2020

  1. [Fix] no-cycle/extensions: fix isExternalModule usage

    JEROMEH authored and ljharb committed Mar 24, 2020
    Copy the full SHA
    e22fc53 View commit details
    Browse the repository at this point in the history
  2. [Fix] extensions/no-cycle/no-extraneous-dependencies: Correct m…

    …odule real path resolution
    
    add real support of isAbsolute (windows + unix support)
    
    importType refactoring: use the real resolved package path to check if external of internal, and not the name only like before: in case of monorepo, external modules are not under node_modules due to symlink but still out of the module.
    
    correct tests node_modules dependencies to really provide teh package.json like in real usage
    
    correct no-extraneous-dependencies rule: get the real name from the resolved package.json. If not aliased imports (alias/react for example) will not be correctly interpreted
    
    change path import
    
    add real support of isAbsolute (windows + unix support)
    
    correct no-extraneous-dependencies rule: get the real name from the resolved package.json. If not aliased imports (alias/react for example) will not be correctly interpreted
    
    even externals like "a/file.js" must not use extension.
    only module names like 'module.js' and '@scope/module.js' are allowed
    
    correct bad external definition: must be the folder path under the root of the module.
    Here the module root is test folder, not cycles folder
    JEROMEH authored and ljharb committed Mar 24, 2020
    Copy the full SHA
    802ce7d View commit details
    Browse the repository at this point in the history