🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

npmfiles

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npmfiles - npm Package Compare versions

Comparing version
0.1.2
to
0.1.3
+0
-1
.travis.yml
language: node_js
os:
- linux
- windows
- osx

@@ -6,0 +5,0 @@ node_js:

+6
-5

@@ -10,3 +10,4 @@ var fs = require('fs');

packageJsonPath: './package.json',
includeDev: false
includeDev: false,
showWarnings: false
};

@@ -35,3 +36,3 @@

override = overrides[key] || {};
keys = keys.concat(getMainFiles(options.nodeModulesPath + "/" + key, override));
keys = keys.concat(getMainFiles(options.nodeModulesPath + "/" + key, override, options.showWarnings));
}

@@ -42,3 +43,3 @@

override = overrides[key] || {};
keys = keys.concat(getMainFiles(options.nodeModulesPath + "/" + key, override));
keys = keys.concat(getMainFiles(options.nodeModulesPath + "/" + key, override, options.showWarnings));
}

@@ -64,3 +65,3 @@ }

*/
function getMainFiles(modulePath, override) {
function getMainFiles(modulePath, override, showWarnings) {
var json;

@@ -96,3 +97,3 @@ var files = [];

if (!files.length) {
if (showWarnings && !files.length) {
console.warn('npmfiles: No main files found for module ' + path.relative(`${process.cwd()}/node_modules`, modulePath));

@@ -99,0 +100,0 @@ }

{
"name": "npmfiles",
"version": "0.1.2",
"version": "0.1.3",
"description": "Get all main files for your project's NPM modules",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -17,2 +17,3 @@ npmfiles

- [includeDev](#includedev)
- [showWarnings](#showwarnings)

@@ -132,2 +133,8 @@ ## Inspiration

#### showWarnings
Type: `Boolean` Default: `false`
Set this option to `true` to show warnings for packages that don't have any files in the main entry or overrides
## LICENSE

@@ -134,0 +141,0 @@