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

@secretlint/core

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@secretlint/core - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

8

CHANGELOG.md

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

## [0.4.1](https://github.com/secretlint/secretlint/compare/v0.4.0...v0.4.1) (2020-02-28)
**Note:** Version bump only for package @secretlint/core
# [0.4.0](https://github.com/secretlint/secretlint/compare/v0.3.0...v0.4.0) (2020-02-28)

@@ -8,0 +16,0 @@

14

lib/index.js

@@ -67,3 +67,3 @@ "use strict";

ignoredMessages,
allowMessages: createAllowMessages(options)
allowMessageIds: createAllowMessageIds(options)
})

@@ -85,10 +85,10 @@ };

};
const createAllowMessages = (coreOptions) => {
const allowMessages = [];
const createAllowMessageIds = (coreOptions) => {
const allowMessageIds = [];
coreOptions.rules.forEach(rule => {
if (!(isRule(rule) && Array.isArray(rule.allowMessages))) {
if (!(isRule(rule) && Array.isArray(rule.allowMessageIds))) {
return;
}
rule.allowMessages.forEach(allowMessageId => {
allowMessages.push({
rule.allowMessageIds.forEach(allowMessageId => {
allowMessageIds.push({
ruleId: rule.id,

@@ -99,3 +99,3 @@ messageId: allowMessageId

});
return allowMessages;
return allowMessageIds;
};

@@ -102,0 +102,0 @@ /**

@@ -6,2 +6,2 @@ import { SecretLintCoreResultMessage } from "@secretlint/types";

};
export declare const filterByAllowMessages: (messages: SecretLintCoreResultMessage[], allowMessages: AllowMessage[]) => SecretLintCoreResultMessage[];
export declare const filterByAllowMessageIds: (messages: SecretLintCoreResultMessage[], allowMessageIds: AllowMessage[]) => SecretLintCoreResultMessage[];
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterByAllowMessages = (messages, allowMessages) => {
const disabledSet = new Set(allowMessages.map(allowMessage => {
exports.filterByAllowMessageIds = (messages, allowMessageIds) => {
const disabledSet = new Set(allowMessageIds.map(allowMessage => {
return `${allowMessage.ruleId}--${allowMessage.messageId}`;

@@ -6,0 +6,0 @@ }));

@@ -5,3 +5,3 @@ import { SecretLintCoreIgnoreMessage, SecretLintCoreResultMessage } from "@secretlint/types";

ignoredMessages: SecretLintCoreIgnoreMessage[];
allowMessages: {
allowMessageIds: {
ruleId: string;

@@ -8,0 +8,0 @@ messageId: string;

@@ -18,6 +18,6 @@ "use strict";

const reportedMessages = filter_ignored_process_1.filterIgnoredMessages(options);
const reportedMessagesWithoutAllowMessages = filter_message_id_1.filterByAllowMessages(reportedMessages, options.allowMessages);
const reportedMessagesWithoutAllowMessageIds = filter_message_id_1.filterByAllowMessageIds(reportedMessages, options.allowMessageIds);
const filterProcess = MessageProcessManager_1.createMessageProcessor([filter_duplicated_process_1.filterDuplicatedMessages]);
return sort_messages_process_1.sortMessagesByLocation(filterProcess.process(reportedMessagesWithoutAllowMessages));
return sort_messages_process_1.sortMessagesByLocation(filterProcess.process(reportedMessagesWithoutAllowMessageIds));
};
//# sourceMappingURL=index.js.map
{
"name": "@secretlint/core",
"version": "0.4.0",
"version": "0.4.1",
"description": "Core library for @secretlint.",

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

"@secretlint/profiler": "^0.4.0",
"@secretlint/types": "^0.4.0",
"@secretlint/types": "^0.4.1",
"escape-string-regexp": "^2.0.0",

@@ -64,3 +64,3 @@ "structured-source": "^3.0.2"

},
"gitHead": "b1458e1ff9ee3d1cf7d2c8bb31879714b6751c09"
"gitHead": "d0a8f0202151e379c8f8c4203122fde37a2f0022"
}

@@ -83,3 +83,3 @@ import {

ignoredMessages,
allowMessages: createAllowMessages(options)
allowMessageIds: createAllowMessageIds(options)
})

@@ -105,10 +105,10 @@ };

const createAllowMessages = (coreOptions: SecretLintCoreDescriptor) => {
const allowMessages: AllowMessage[] = [];
const createAllowMessageIds = (coreOptions: SecretLintCoreDescriptor) => {
const allowMessageIds: AllowMessage[] = [];
coreOptions.rules.forEach(rule => {
if (!(isRule(rule) && Array.isArray(rule.allowMessages))) {
if (!(isRule(rule) && Array.isArray(rule.allowMessageIds))) {
return;
}
rule.allowMessages.forEach(allowMessageId => {
allowMessages.push({
rule.allowMessageIds.forEach(allowMessageId => {
allowMessageIds.push({
ruleId: rule.id,

@@ -119,3 +119,3 @@ messageId: allowMessageId

});
return allowMessages;
return allowMessageIds;
};

@@ -122,0 +122,0 @@ /**

@@ -7,8 +7,8 @@ import { SecretLintCoreResultMessage } from "@secretlint/types";

};
export const filterByAllowMessages = (
export const filterByAllowMessageIds = (
messages: SecretLintCoreResultMessage[],
allowMessages: AllowMessage[]
allowMessageIds: AllowMessage[]
): SecretLintCoreResultMessage[] => {
const disabledSet = new Set(
allowMessages.map(allowMessage => {
allowMessageIds.map(allowMessage => {
return `${allowMessage.ruleId}--${allowMessage.messageId}`;

@@ -15,0 +15,0 @@ })

@@ -6,3 +6,3 @@ import { SecretLintCoreIgnoreMessage, SecretLintCoreResultMessage } from "@secretlint/types";

import { sortMessagesByLocation } from "./sort-messages-process";
import { filterByAllowMessages } from "./filter-message-id";
import { filterByAllowMessageIds } from "./filter-message-id";

@@ -12,3 +12,3 @@ export type cleanupMessagesOptions = {

ignoredMessages: SecretLintCoreIgnoreMessage[];
allowMessages: {
allowMessageIds: {
ruleId: string;

@@ -28,5 +28,5 @@ messageId: string;

const reportedMessages = filterIgnoredMessages(options);
const reportedMessagesWithoutAllowMessages = filterByAllowMessages(reportedMessages, options.allowMessages);
const reportedMessagesWithoutAllowMessageIds = filterByAllowMessageIds(reportedMessages, options.allowMessageIds);
const filterProcess = createMessageProcessor([filterDuplicatedMessages]);
return sortMessagesByLocation(filterProcess.process(reportedMessagesWithoutAllowMessages));
return sortMessagesByLocation(filterProcess.process(reportedMessagesWithoutAllowMessageIds));
};

Sorry, the diff of this file is not supported yet

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