Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ncjsm

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ncjsm - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

test/__playground/node_modules/broken-main/index.js

10

CHANGELOG.md

@@ -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 @@

5

get-resolver/index.js

@@ -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 @@ }

14

package.json
{
"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");

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc