npm-packlist
Advanced tools
Comparing version 1.4.6 to 1.4.7
15
index.js
@@ -20,2 +20,4 @@ 'use strict' | ||
const normalizePackageBin = require('npm-normalize-package-bin') | ||
const defaultRules = [ | ||
@@ -180,8 +182,7 @@ '.npmignore', | ||
] | ||
if (pkg.bin) | ||
if (typeof pkg.bin === "object") | ||
for (const key in pkg.bin) | ||
rules.push('!' + pkg.bin[key]) | ||
else | ||
rules.push('!' + pkg.bin) | ||
if (pkg.bin) { | ||
// always an object, because normalized already | ||
for (const key in pkg.bin) | ||
rules.push('!' + pkg.bin[key]) | ||
} | ||
@@ -221,3 +222,3 @@ const data = rules.filter(f => f).join('\n') + '\n' | ||
const ig = path.resolve(this.path, file) | ||
this.onPackageJson(ig, JSON.parse(data), then) | ||
this.onPackageJson(ig, normalizePackageBin(JSON.parse(data)), then) | ||
} catch (er) { | ||
@@ -224,0 +225,0 @@ // ignore package.json files that are not json |
{ | ||
"name": "npm-packlist", | ||
"version": "1.4.6", | ||
"version": "1.4.7", | ||
"publishConfig": { | ||
"tag": "legacy-v1" | ||
}, | ||
"description": "Get a list of the files to add from a folder into an npm package", | ||
@@ -5,0 +8,0 @@ "directories": { |
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
13100