Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clean-shirts-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nodesecure/js-x-ray": patch
---

Normalize experimental property in warnings
22 changes: 14 additions & 8 deletions workspaces/js-x-ray/src/warnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,38 @@ export interface Warning<T = WarningName> {
export const warnings = Object.freeze({
"parsing-error": {
i18n: "sast_warnings.parsing_error",
severity: "Information"
severity: "Information",
experimental: false
},
"unsafe-import": {
i18n: "sast_warnings.unsafe_import",
severity: "Warning"
severity: "Warning",
experimental: false
},
"unsafe-regex": {
i18n: "sast_warnings.unsafe_regex",
severity: "Warning"
severity: "Warning",
experimental: false
},
"unsafe-stmt": {
code: "unsafe-stmt",
i18n: "sast_warnings.unsafe_stmt",
severity: "Warning"
severity: "Warning",
experimental: false
},
"encoded-literal": {
i18n: "sast_warnings.encoded_literal",
severity: "Information"
severity: "Information",
experimental: false
},
"short-identifiers": {
i18n: "sast_warnings.short_identifiers",
severity: "Warning"
severity: "Warning",
experimental: false
},
"suspicious-literal": {
i18n: "sast_warnings.suspicious_literal",
severity: "Warning"
severity: "Warning",
experimental: false
},
"suspicious-file": {
i18n: "sast_warnings.suspicious_file",
Expand Down
1 change: 1 addition & 0 deletions workspaces/js-x-ray/test/warnings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ test("Given an encoded-literal kind it should generate a warning with deep locat
});

assert.deepEqual(result, {
experimental: false,
kind: "encoded-literal",
value: null,
source: "JS-X-Ray",
Expand Down