bare-module 2.6.0 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -391,7 +391,7 @@ const Module = module.exports = exports = class Module {
391
391
  const path = url.fileURLToPath(resolution)
392
392
 
393
393
  if (protocol.exists(path)) {
394
- return protocol.postresolve(resolution.pathname, dirname)
394
+ return protocol.postresolve(path, dirname)
395
395
  }
396
396
  }
397
397
  }
@@ -694,8 +694,7 @@ Module._extensions['.bundle'] = function (module, source, referrer) {
694
694
 
695
695
  Module._protocols['file:'] = new Protocol({
696
696
  postresolve (specifier) {
697
- if (path.isAbsolute(specifier)) return binding.realpath(specifier)
698
- return specifier
697
+ return binding.realpath(specifier)
699
698
  },
700
699
 
701
700
  exists (filename) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-module",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Module support for JavaScript",
5
5
  "main": "index.js",
6
6
  "files": [