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

npm-package-json-lint

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-package-json-lint - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

6

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log

## [4.0.3] - 2019-10-26
### Fixed
- Resolved an issue where package.json files were not recursively scanned for when the CLI/API pattern was a directory. Ex: `/packages` would only detect the package.json file in `/packages`.
## [4.0.2] - 2019-10-19

@@ -57,3 +61,3 @@ ### Fixed

### Fixed
- Change the property name that configuraton is pulled from package.json files. Property was `npmPackageJsonLintConfig`. It is now `npmpackagejsonlint`.

@@ -60,0 +64,0 @@ ### Removed

10

package.json
{
"name": "npm-package-json-lint",
"version": "4.0.2",
"version": "4.0.3",
"description": "Configurable linter for package.json files.",

@@ -32,3 +32,3 @@ "keywords": [

"eslint": "eslint . --format=node_modules/eslint-formatter-pretty",
"npmpackagejsonlint": "node src/cli.js .",
"npmpackagejsonlint": "node src/cli.js ./package.json",
"lint": "npm run eslint && npm run npmpackagejsonlint",

@@ -54,9 +54,9 @@ "test": "jest",

"devDependencies": {
"eslint": "^6.5.1",
"eslint": "^6.6.0",
"eslint-config-tc": "^8.1.0",
"eslint-formatter-pretty": "^2.1.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jest": "^22.19.0",
"eslint-plugin-jest": "^22.20.1",
"eslint-plugin-prettier": "^3.1.1",
"figures": "^3.0.0",
"figures": "^3.1.0",
"jest": "^24.9.0",

@@ -63,0 +63,0 @@ "npm-package-json-lint-config-default": "^2.0.0",

@@ -13,8 +13,14 @@ const debug = require('debug')('npm-package-json-lint:getFileList');

const getFileList = (patterns, cwd) => {
debug('patterns');
debug(patterns);
// step 1 - filter out empty entries
const filteredPatterns = patterns.filter(pattern => pattern.length);
debug('filteredPatterns');
debug(filteredPatterns);
// step 2 - convert directories to globs
const globPatterns = filteredPatterns.map(pattern => {
return pattern.endsWith(`${path.sep}package.json`) ? pattern : `${pattern}${path.sep}package.json`;
return pattern.endsWith(`${path.sep}package.json`) ? pattern : `${pattern}${path.sep}**${path.sep}package.json`;
});

@@ -21,0 +27,0 @@

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