New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

akitainu

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

akitainu - npm Package Compare versions

Comparing version 0.1.0-alpha.3 to 0.1.0-alpha.4

4

dist/checker/index.d.ts

@@ -11,2 +11,6 @@ export declare type Checker = {

readonly targetFiles?: readonly string[];
/**
* Base directory. This should be base of relative paths.
*/
readonly baseDirectory: string;
};

@@ -13,0 +17,0 @@ export declare type CheckerResult = {

4

dist/cli/index.js

@@ -30,3 +30,5 @@ #! /usr/bin/env node

]);
const result = await (0, core_1.runRules)(rules);
const result = await (0, core_1.runRules)(rules, {
baseDirectory: config.baseDirectory,
});
await (0, core_1.runReporters)({

@@ -33,0 +35,0 @@ reporters,

import { CheckError } from "../checker";
import { Reporter } from "../reporter";
import { Rule } from "../rule";
export declare type RunRuleOptionns = {
baseDirectory: string;
};
export declare type RuleError = CheckError & {

@@ -13,7 +16,7 @@ /**

};
export declare function runRule(rule: Rule): Promise<RunRuleResult>;
export declare function runRule(rule: Rule, { baseDirectory }: RunRuleOptionns): Promise<RunRuleResult>;
export declare type RunRulesResult = {
errors: RuleError[];
};
export declare function runRules(rules: readonly Rule[]): Promise<RunRulesResult>;
export declare function runRules(rules: readonly Rule[], options: RunRuleOptionns): Promise<RunRulesResult>;
export declare type RunReportersInput = {

@@ -20,0 +23,0 @@ reporters: readonly Reporter[];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.runReporters = exports.runRules = exports.runRule = void 0;
async function runRule(rule) {
async function runRule(rule, { baseDirectory }) {
var _a, _b, _c;

@@ -9,2 +9,3 @@ const sourceResult = await ((_a = rule.source) === null || _a === void 0 ? void 0 : _a.run());

targetFiles: sourceResult === null || sourceResult === void 0 ? void 0 : sourceResult.targetFiles,
baseDirectory,
});

@@ -23,4 +24,4 @@ const ruleErrors = result.errors.map((err) => ({

exports.runRule = runRule;
async function runRules(rules) {
const results = await Promise.all(rules.map(runRule));
async function runRules(rules, options) {
const results = await Promise.all(rules.map((rule) => runRule(rule, options)));
return {

@@ -27,0 +28,0 @@ errors: results.flatMap((result) => result.errors),

@@ -32,3 +32,5 @@ "use strict";

};
const result = await (0, _1.runRule)(rule);
const result = await (0, _1.runRule)(rule, {
baseDirectory: "./",
});
expect(result.errors).toEqual([

@@ -82,3 +84,5 @@ {

};
const result = await (0, _1.runRule)(rule);
const result = await (0, _1.runRule)(rule, {
baseDirectory: "./",
});
expect(result.errors).toEqual([

@@ -85,0 +89,0 @@ {

{
"name": "akitainu",
"version": "0.1.0-alpha.3",
"version": "0.1.0-alpha.4",
"description": "Gradual code linting tool",

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

@@ -32,3 +32,5 @@ import { runRule } from ".";

};
const result = await runRule(rule);
const result = await runRule(rule, {
baseDirectory: "./",
});
expect(result.errors).toEqual([

@@ -82,3 +84,5 @@ {

};
const result = await runRule(rule);
const result = await runRule(rule, {
baseDirectory: "./",
});
expect(result.errors).toEqual([

@@ -85,0 +89,0 @@ {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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