@secretlint/core
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -39,3 +39,3 @@ "use strict"; | ||
if (!messageHandler) { | ||
throw new Error(`messages:${messageId} is missing in messages.`); | ||
throw new Error(`messages:${String(messageId)} is missing in messages.`); | ||
} | ||
@@ -45,3 +45,3 @@ // if messages is string, use it. | ||
if (typeof messageId !== "string") { | ||
throw new Error(`message's key:${messageId} should be string`); | ||
throw new Error(`message's key:${String(messageId)} should be string`); | ||
} | ||
@@ -60,8 +60,8 @@ return { | ||
if (messageHandler[DEFAULT_LOCAL]) { | ||
throw new Error(`messages${messageId}.${locale} is missing in messages.`); | ||
throw new Error(`messages${String(messageId)}.${locale} is missing in messages.`); | ||
} | ||
throw new Error(`message's key:${messageId}.${DEFAULT_LOCAL} should be defined in messages.`); | ||
throw new Error(`message's key:${String(messageId)}.${DEFAULT_LOCAL} should be defined in messages.`); | ||
} | ||
if (typeof messageId !== "string") { | ||
throw new Error(`message's key:${messageId}.${DEFAULT_LOCAL} should be string`); | ||
throw new Error(`message's key:${String(messageId)}.${DEFAULT_LOCAL} should be string`); | ||
} | ||
@@ -68,0 +68,0 @@ return { |
@@ -1,2 +0,1 @@ | ||
// LICENSE : MIT | ||
"use strict"; | ||
@@ -3,0 +2,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
{ | ||
"name": "@secretlint/core", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "Core library for @secretlint.", | ||
@@ -43,4 +43,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@secretlint/profiler": "^5.2.0", | ||
"@secretlint/types": "^5.2.0", | ||
"@secretlint/profiler": "^5.2.1", | ||
"@secretlint/types": "^5.2.1", | ||
"debug": "^4.3.4", | ||
@@ -50,12 +50,12 @@ "structured-source": "^3.0.2" | ||
"devDependencies": { | ||
"@types/mocha": "^9.1.0", | ||
"@types/node": "^17.0.21", | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^18.0.0", | ||
"@types/structured-source": "^3.0.0", | ||
"assert-json-equal": "^1.0.1", | ||
"mocha": "^9.2.2", | ||
"prettier": "^2.3.1", | ||
"mocha": "^10.0.0", | ||
"prettier": "^2.7.1", | ||
"rimraf": "^3.0.2", | ||
"ts-node": "^10.7.0", | ||
"ts-node": "^10.8.1", | ||
"ts-node-test-register": "^10.0.0", | ||
"typescript": "^4.3.4" | ||
"typescript": "^4.7.4" | ||
}, | ||
@@ -68,3 +68,3 @@ "engines": { | ||
}, | ||
"gitHead": "334bdc88e68449009ea32399cec2a14f0a2a537b" | ||
"gitHead": "4e578c531a3989e9575b49bfa1b47d8a4cb7748e" | ||
} |
@@ -64,3 +64,3 @@ import { | ||
if (!messageHandler) { | ||
throw new Error(`messages:${messageId} is missing in messages.`); | ||
throw new Error(`messages:${String(messageId)} is missing in messages.`); | ||
} | ||
@@ -70,3 +70,3 @@ // if messages is string, use it. | ||
if (typeof messageId !== "string") { | ||
throw new Error(`message's key:${messageId} should be string`); | ||
throw new Error(`message's key:${String(messageId)} should be string`); | ||
} | ||
@@ -85,8 +85,8 @@ return { | ||
if (messageHandler[DEFAULT_LOCAL]) { | ||
throw new Error(`messages${messageId}.${locale} is missing in messages.`); | ||
throw new Error(`messages${String(messageId)}.${locale} is missing in messages.`); | ||
} | ||
throw new Error(`message's key:${messageId}.${DEFAULT_LOCAL} should be defined in messages.`); | ||
throw new Error(`message's key:${String(messageId)}.${DEFAULT_LOCAL} should be defined in messages.`); | ||
} | ||
if (typeof messageId !== "string") { | ||
throw new Error(`message's key:${messageId}.${DEFAULT_LOCAL} should be string`); | ||
throw new Error(`message's key:${String(messageId)}.${DEFAULT_LOCAL} should be string`); | ||
} | ||
@@ -93,0 +93,0 @@ return { |
@@ -1,4 +0,1 @@ | ||
// LICENSE : MIT | ||
"use strict"; | ||
import { SecretLintCoreIgnoreMessage, SecretLintCoreResultMessage } from "@secretlint/types"; | ||
@@ -12,3 +9,3 @@ | ||
*/ | ||
const isContainedRange = (index: number, range: number[]) => { | ||
const isContainedRange = (index: number, range: readonly [startIndex: number, endIndex: number]) => { | ||
const [start, end] = range; | ||
@@ -15,0 +12,0 @@ return start <= index && index <= end; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
101587
2032
Updated@secretlint/profiler@^5.2.1
Updated@secretlint/types@^5.2.1