@secretlint/messages-to-markdown
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -6,2 +6,20 @@ # Change Log | ||
# [2.0.0](https://github.com/secretlint/secretlint/compare/v1.1.0...v2.0.0) (2020-04-27) | ||
### Bug Fixes | ||
* **core:** change SecretLintRuleMessageTranslate to check statically ([03ccff1](https://github.com/secretlint/secretlint/commit/03ccff116390374193ca5975405b0cafeaf63932)) | ||
### BREAKING CHANGES | ||
* **core:** It changes SecretLintRuleMessageTranslate interface | ||
Rule need to change `messages` object format. | ||
# [1.1.0](https://github.com/secretlint/secretlint/compare/v1.0.5...v1.1.0) (2020-04-04) | ||
@@ -8,0 +26,0 @@ |
@@ -5,5 +5,10 @@ "use strict"; | ||
var output = ""; | ||
var proxy = new Proxy({}, { | ||
get: function (_target, p, _receiver) { | ||
return "{{" + String(p) + "}"; | ||
} | ||
}); | ||
Object.keys(messages).forEach(function (messageId) { | ||
var enMessage = messages[messageId]["en"]; | ||
var shortDescription = enMessage.split("\n")[0]; | ||
var shortDescription = enMessage(proxy).split("\n")[0]; | ||
output += "#".repeat(options.headerLevel) + " " + messageId + "\n" + (shortDescription ? "> " + shortDescription : "") + "\n\n"; | ||
@@ -10,0 +15,0 @@ }); |
{ | ||
"name": "@secretlint/messages-to-markdown", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Create Markdown text from rule's messages(ids)", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@secretlint/types": "^1.1.0", | ||
"@secretlint/types": "^2.0.0", | ||
"meow": "^6.1.0", | ||
@@ -64,3 +64,3 @@ "ts-node": "^8.8.1", | ||
}, | ||
"gitHead": "d924bd2e020439f449aa24d1673a3d212ebefa49" | ||
"gitHead": "d961f968a46561ca424d54d6f34ce94e245a6e16" | ||
} |
@@ -8,5 +8,10 @@ import { SecretLintRuleLocalizeMessageMulti, SecretLintRuleLocalizeMessages } from "@secretlint/types"; | ||
let output = ""; | ||
const proxy = new Proxy({}, { | ||
get(_target: {}, p: PropertyKey, _receiver: any): any { | ||
return `{{${String(p)}}`; | ||
} | ||
}); | ||
Object.keys(messages).forEach(messageId => { | ||
const enMessage = (messages[messageId] as SecretLintRuleLocalizeMessageMulti)["en"]; | ||
const shortDescription = enMessage.split("\n")[0]; | ||
const enMessage = (messages[messageId] as SecretLintRuleLocalizeMessageMulti<any>)["en"]; | ||
const shortDescription = enMessage(proxy).split("\n")[0]; | ||
output += `${"#".repeat(options.headerLevel)} ${messageId} | ||
@@ -13,0 +18,0 @@ ${shortDescription ? `> ${shortDescription}` : ""} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14173
133
+ Added@secretlint/types@2.2.0(transitive)
- Removed@secretlint/types@1.1.0(transitive)
Updated@secretlint/types@^2.0.0