jsenv / importmap-node-module

Generate importmap for node_modules
35 stars 4 forks source link

Script hangs up on circular dependency #1

Closed dmail closed 5 years ago

dmail commented 5 years ago
{
 "name": "whatever",
  "version": "1.0.0",
  "devDependencies": {
    "whatever": "1.0.0"
  }
}

Is a valid use case and package.json. It seems the script will enter infinite loop in such case. To be tested with unit test and fixed if needed.

dmail commented 5 years ago

False alarm, it hangs up on more complex circular dependency which npm solves I don't know how but are more rare. I remember there is some doc about that on npm where dependency resolution becomes complex because of circular dependencies, should find it and create a test for it.

For now, it would still be interesting to write a test for the case above but apparently the function behaves correclty on such basic "circular" dependency.

dmail commented 5 years ago

Fixed