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

checkAllNodeModules in Windows always will mark non-direct dependents as ignored #49

Closed
yhatt opened this issue Jul 29, 2020 · 1 comment · Fixed by #50
Closed

checkAllNodeModules in Windows always will mark non-direct dependents as ignored #49

yhatt opened this issue Jul 29, 2020 · 1 comment · Fixed by #50

Comments

@yhatt
Copy link
Contributor

yhatt commented Jul 29, 2020

Hi, thanks for making useful module!

I've met unexpected behavior about checkAllNodeModules: true on Windows. When there is package.json like this:

{
  "private": true,
  "devDependencies": {
    "are-you-es5": "^2.1.0"
  },
  "dependencies": {}
}

checkAllNodeModules: true in Windows always will mark non-direct dependents as ignored.

// test.js
const { checkModules } = require('are-you-es5')

console.log(
  checkModules({
    checkAllNodeModules: true,
  })
)

It returns different in Linux and Windows by running node ./test.js.

Linux

{
  es5Modules: [ 'acorn', 'array-flatten', 'commander' ],
  es6Modules: [
    'are-you-es5',
    'find-up',
    'locate-path',
    'p-limit',
    'p-locate',
    'p-try',
    'path-exists'
  ],
  ignored: []
}

Windows

{
  es5Modules: [],
  es6Modules: [],
  ignored: [
    'ih\\Programming\\ayes5\\node_modules\\.bin',
    'ih\\Programming\\ayes5\\node_modules\\acorn',
    'ih\\Programming\\ayes5\\node_modules\\are-you-es5',
    'ih\\Programming\\ayes5\\node_modules\\array-flatten',
    'ih\\Programming\\ayes5\\node_modules\\commander',
    'ih\\Programming\\ayes5\\node_modules\\find-up',
    'ih\\Programming\\ayes5\\node_modules\\locate-path',
    'ih\\Programming\\ayes5\\node_modules\\p-limit',
    'ih\\Programming\\ayes5\\node_modules\\p-locate',
    'ih\\Programming\\ayes5\\node_modules\\p-try',
    'ih\\Programming\\ayes5\\node_modules\\path-exists'
  ]
}
@yhatt yhatt changed the title checkAllNodeModules in Windows always will mark non-dependent packages as ignored checkAllNodeModules in Windows always will mark non-direct dependents as ignored Jul 29, 2020
@obahareth
Copy link
Owner

Released in version 2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants