Comparing version 4.0.0 to 4.0.1
@@ -5,2 +5,12 @@ # Changelog | ||
### [4.0.1](https://github.com/medikoo/ncjsm/compare/v4.0.0...v4.0.1) (2019-10-25) | ||
### Bug Fixes | ||
- Fix main module resolution in case pkg.main leads to broken path ([331dd1c](https://github.com/medikoo/ncjsm/commit/331dd1c)) | ||
### Tests | ||
- Add missing test ([2469fe9](https://github.com/medikoo/ncjsm/commit/2469fe9)) | ||
## [4.0.0](https://github.com/medikoo/ncjsm/compare/v3.0.0...v4.0.0) (2019-10-08) | ||
@@ -7,0 +17,0 @@ |
@@ -25,3 +25,6 @@ // Returns CJS module (sync or async) path resolver | ||
if (mainResult) return mainResult; | ||
return resolveFile(join(mainPath, "index"), 0); | ||
return resolveFile(join(mainPath, "index"), 0).then(function (mainDirResult) { | ||
if (mainDirResult) return mainDirResult; | ||
return resolveFile(join(path, "index"), 0); | ||
}); | ||
}); | ||
@@ -28,0 +31,0 @@ } |
{ | ||
"name": "ncjsm", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "CJS (Node.js) style modules resolver", | ||
@@ -23,11 +23,11 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)", | ||
"find-requires": "^1.0.0", | ||
"fs2": "^0.3.5", | ||
"type": "^1.0.3" | ||
"fs2": "^0.3.6", | ||
"type": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^6.3.0", | ||
"eslint-config-medikoo": "^2.5.1", | ||
"eslint": "^6.5.1", | ||
"eslint-config-medikoo": "^2.6.0", | ||
"git-list-updated": "^1.2.1", | ||
"husky": "^3.0.5", | ||
"lint-staged": "^9.2.5", | ||
"husky": "^3.0.9", | ||
"lint-staged": "^9.4.2", | ||
"prettier-elastic": "^1.18.2", | ||
@@ -34,0 +34,0 @@ "tad": "^3.0.1" |
@@ -167,2 +167,8 @@ /* eslint max-lines: "off" */ | ||
}), | ||
t(playgroundDir, "broken-main").then(value => { | ||
a.deep(value, { | ||
targetPath: resolve(`${ playgroundDir }/node_modules/broken-main/index.js`), | ||
realPath: resolve(`${ playgroundDir }/node_modules/broken-main/index.js`) | ||
}); | ||
}), | ||
t(`${ playgroundDir }/node_modules/outer`, "outer3").then(value => { | ||
@@ -169,0 +175,0 @@ a.deep(value, { |
@@ -120,2 +120,10 @@ /* eslint max-lines: "off" */ | ||
}); | ||
a.deep(t(playgroundDir, "pkg-main-dir"), { | ||
targetPath: resolve(`${ playgroundDir }/node_modules/pkg-main-dir/lib/index.js`), | ||
realPath: resolve(`${ playgroundDir }/node_modules/pkg-main-dir/lib/index.js`) | ||
}); | ||
a.deep(t(playgroundDir, "broken-main"), { | ||
targetPath: resolve(`${ playgroundDir }/node_modules/broken-main/index.js`), | ||
realPath: resolve(`${ playgroundDir }/node_modules/broken-main/index.js`) | ||
}); | ||
try { | ||
@@ -122,0 +130,0 @@ t(playgroundDir, "nested/elo"); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56378
62
1140
- Removedtype@1.2.0(transitive)
Updatedfs2@^0.3.6
Updatedtype@^2.0.0