Skip to content

Commit

Permalink
Merge pull request #30 from krakenjs/upgrade.async
Browse files Browse the repository at this point in the history
update async version and modify isModule check to account for depreca…
  • Loading branch information
grawk authored Feb 14, 2023
2 parents 3a757ed + 5c5e37a commit a6d3851
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ function isModule(file) {
// require.resolve will locate a file without a known extension (e.g. txt)
// and try to load it as javascript. That won't work for this case.
var ext = path.extname(file);
return ext === '' || require.extensions.hasOwnProperty(ext);
// in order for this to work after deprecation of module.extensions
var extensions = {'.js': true, '.json': true, '.node': true}
return ext === '' || extensions.hasOwnProperty(ext);
}


Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"jshint": "~2.4.4"
},
"dependencies": {
"core-util-is": "~1.0.1",
"async": "~0.2.10"
"async": "^3.2.4",
"core-util-is": "~1.0.1"
}
}

0 comments on commit a6d3851

Please sign in to comment.