docs(ses): Document direct eval availability error
MODIFY
packages/ses/NEWS.md
packages/ses/NEWS.md
@@ -4,6 +4,8 @@ User-visible changes in SES:
- Fixes the type definition for assert.error so that the final options bag,
which may include `errorName`, checks correctly in TypeScript.
+- Lockdown will now throw an error if code running before SES initialization
+ replaced `eval`.
# 0.15.2 (2021-12-08)

ADD
packages/ses/error-codes/SES_DIRECT_EVAL.md
+# SES cannot initialize unless 'eval' is the original intrinsic 'eval', suitable for direct-eval (dynamically scoped eval) (`SES_DIRECT_EVAL`)
+
+The SES Hardened JavaScript shim captures the `eval` function when it is
+initialized.
+The `eval` function it finds must be the original `eval` because SES uses its
+dynamic scope to implement its isolated eval.
+
+If you see this error, something running before `ses` initialized, most likely
+another instance of `ses`, has replaced `eval` with something else.

docs(ses): Document direct eval availability error