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

@artus/core

Package Overview
Dependencies
Maintainers
8
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@artus/core - npm Package Compare versions

Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6

3

lib/scanner/task.js

@@ -27,3 +27,4 @@ "use strict";

const extname = path_1.default.extname(realPath);
if ((0, utils_1.isExclude)(item, extname, options.exclude, options.extensions)) {
const relativePath = path_1.default.relative(baseDir, realPath);
if ((0, utils_1.isExclude)(relativePath, options.exclude, options.extensions)) {
return [];

@@ -30,0 +31,0 @@ }

@@ -8,3 +8,3 @@ import 'reflect-metadata';

export declare const existsAsync: (filePath: string) => Promise<boolean>;
export declare const isExclude: (filename: string, extname: string, exclude: string[], extensions: string[]) => boolean;
export declare const isExclude: (targetPath: string, exclude: string[], extensions: string[]) => boolean;
export declare const isPluginAsync: (basePath: string) => Promise<boolean>;

@@ -11,0 +11,0 @@ export declare const loadConfigItemList: <T = Record<string, any>>(configItemList: ManifestItem[], scanCtx: ScanContext) => Promise<Record<string, T>>;

@@ -36,7 +36,8 @@ "use strict";

exports.existsAsync = existsAsync;
const isExclude = (filename, extname, exclude, extensions) => {
const isExclude = (targetPath, exclude, extensions) => {
let result = false;
if (!result && exclude) {
result = (0, utils_1.isMatch)(filename, exclude);
result = (0, utils_1.isMatch)(targetPath, exclude, true);
}
const extname = path.extname(targetPath);
if (!result && extname) {

@@ -43,0 +44,0 @@ result = !extensions.includes(extname);

export declare function getDefaultExtensions(): string[];
export declare function isMatch(filename: string, patterns: string | string[]): boolean;
export declare function isMatch(filename: string, patterns: string | string[], matchBase?: boolean): boolean;

@@ -10,8 +10,8 @@ "use strict";

exports.getDefaultExtensions = getDefaultExtensions;
function isMatch(filename, patterns) {
function isMatch(filename, patterns, matchBase = false) {
if (!Array.isArray(patterns)) {
patterns = [patterns];
}
return patterns.some(pattern => (0, minimatch_1.default)(filename, pattern));
return patterns.some(pattern => (0, minimatch_1.default)(filename, pattern), { matchBase });
}
exports.isMatch = isMatch;
{
"name": "@artus/core",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"description": "Core package of Artus",

@@ -5,0 +5,0 @@ "main": "./lib/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