Skip to content

Commit

Permalink
fix: keep modname starts with ./ (#485)
Browse files Browse the repository at this point in the history
* fix: keep modname starts with `./`

Signed-off-by: Yuqian Ma <[email protected]>

* style: use doublequote

Signed-off-by: Yuqian Ma <[email protected]>

* bump up version: 2.3.17

Signed-off-by: Yuqian Ma <[email protected]>
  • Loading branch information
yuqianma authored Jun 2, 2021
1 parent 8915f1a commit de91678
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"--init"
]
},
"version": "2.3.16",
"version": "2.3.17",
"gaugeVersionSupport": {
"minimum": "1.0.7",
"maximum": ""
Expand All @@ -62,4 +62,4 @@
"linux": []
},
"id": "js"
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gauge-js",
"version": "2.3.16",
"version": "2.3.17",
"description": "JavaScript runner for Gauge",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/req-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Req.prototype.load = function (modname) {
}

return (function (self, mod, modname) {
if (self.nativeModules.indexOf(modname) < 0) {
if (!modname.startsWith("./") && self.nativeModules.indexOf(modname) < 0) {
modname = path.normalize(modname);
}
var m = new mod.Module(self.filepath, mod.Module);
Expand Down

0 comments on commit de91678

Please sign in to comment.