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

acbs-tree-lint

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acbs-tree-lint - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

22

libs/spec.js
const lint_spec = function (args) {
const fs = require('fs');
const chalk = require('chalk');
const mylog = require('./mylog.js');

@@ -68,3 +69,8 @@ const config = {};

args.dirsl2.forEach(function (dirl2, i) {
const padright = function (str, len, pad) {
return (str.length === len) ? str : (str + (new Array(Math.max(3, len-str.length))).fill(pad).join(''));
};
let path = `${dirl2}/spec`;
let pkgidBasic = dirl2.slice(2);
let pkgid = padright(chalk.bold(pkgidBasic), 40+8, ' ');
fs.readFile(path, function (err, stdin, stderr) {

@@ -108,11 +114,11 @@ if (err) {

if (config.AttrDeprecated.includes(line.attr)) {
mylog.warn(`${path}: Prop ${line.attr} is deprecated.`);
mylog.warn(`${pkgid} Prop ${line.attr} is deprecated.`);
};
// Rare attr
if (config.AttrOrder.indexOf(line.attr) === -1) {
// mylog.warn(`${path}: Prop ${line.attr} is rare.`);
// mylog.warn(`${pkgid} Prop ${line.attr} is rare.`);
};
// Conflict
if (config.AttrConflictGroups.map(x => x.join(',')).join(',').split(',').includes(line.attr)) {
// console.log(`${path}: ${line.attr} is seen.`);
// console.log(`${pkgid} ${line.attr} is seen.`);
let whichConflictGroup = null;

@@ -126,3 +132,3 @@ config.AttrConflictGroups.forEach(function (group, groupId) {

if (foundAttrs.includes(conflictCandidate)) {
mylog.fail(`${path}: ${line.attr} conflicts with ${conflictCandidate}.`);
mylog.fail(`${pkgid} ${line.attr} conflicts with ${conflictCandidate}.`);
};

@@ -139,3 +145,3 @@ })

// Any of the seen attrs appears in `attrMustBeBefore`
// mylog.info(`${path}: Better place ${line.attr} before ${attrEntry}.`);
// mylog.info(`${pkgid} Better place ${line.attr} before ${attrEntry}.`);
};

@@ -164,3 +170,3 @@ });

if (seenAttrs.indexOf(citedVar) === -1) {
mylog.fail(`${path}: ${line.attr} citing undefined ${citedVar}.`);
mylog.fail(`${pkgid} ${line.attr} citing undefined ${citedVar}.`);
};

@@ -180,5 +186,5 @@ knownDependencyProblems.forEach(function (item) {

if (item.solved) {
mylog.info(`${path}: ${item.from} has unmet dependency but is used later by ${item.citedVar}.`)
mylog.info(`${pkgid} ${item.from} has unmet dependency but is used later by ${item.citedVar}.`)
} else {
mylog.fail(`${path}: ${item.from} depends on ${item.to}.`)
mylog.fail(`${pkgid} ${item.from} depends on ${item.to}.`)
};

@@ -185,0 +191,0 @@ });

{
"name": "acbs-tree-lint",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

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

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