-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ses): Lockdown reporting option (#2613)
Closes: #2608 ## Description This change introduces a `"reporting"` option to `lockdown` and `repairIntrinsics` that determines the means by which SES will send warnings to diagnostic tools like the web or node `console`, `print`, or nowhere at all. ### Security Considerations None ### Scaling Considerations None ### Documentation Considerations Relevant documentation added to lockdown options and NEWS. ### Testing Considerations This adjusts the existing test to use the `"reporting": "console"` option, since it already verifies that behavior and consequently is suitable for verifying the web behavior while standing on Node.js. This adds a new test that verifies that reporting with the `"platform"` default behavior on node generates no output on stderr and confirms the presence of expected indented and non-indented messages, while being resilient to additional intrinsics being added to the platform. ### Compatibility Considerations None. ### Upgrade Considerations None.
- Loading branch information
Showing
12 changed files
with
322 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* eslint-disable no-restricted-globals */ | ||
|
||
export type Reporter = { | ||
warn: (...message: Array<any>) => void; | ||
error: (...message: Array<string>) => void; | ||
}; | ||
|
||
export type GroupReporter = Reporter & { | ||
groupCollapsed: (label: string) => void; | ||
groupEnd: () => void; | ||
}; | ||
|
||
// Console implements GroupReporter |
Oops, something went wrong.