fix: de-url-ify error codes
RENAME
packages/ses/error-codes/EVAL_REJECTED.md
packages/ses/error-codes/SES_EVAL_REJECTED.md
-# Possible direct eval expression rejected
+# Possible direct eval expression rejected (SES_EVAL_REJECTED)
The SES shim cannot implement or virtualize direct eval.

RENAME
packages/ses/error-codes/HTML_COMMENT_REJECTED.md
packages/ses/error-codes/SES_HTML_COMMENT_REJECTED.md
-# Possible HTML-like comment rejected
+# Possible HTML-like comment rejected (SES_HTML_COMMENT_REJECTED)
When web browsers first introduced `<script>` tags and JavaScript, earlier
versions of the browser would show the script instead of running it.

RENAME
packages/ses/error-codes/IMPORT_REJECTED.md
packages/ses/error-codes/SES_IMPORT_REJECTED.md
-# Possible import expression rejected
+# Possible import expression rejected (SES_IMPORT_REJECTED)
A dynamic import expression, like `import(expr)` looks like a function call to
a function named `import`. However, `import` is a keyword rather than a

MODIFY
packages/ses/src/transforms.js
packages/ses/src/transforms.js
@@ -57,8 +57,7 @@ export function rejectHtmlComments(src) {
}
const name = getSourceURL(src);
throw new SyntaxError(
- `Possible HTML comment rejected at ${name}:${lineNumber}
- See https://github.com/Agoric/SES-shim/blob/master/packages/ses/error-codes/HTML_COMMENT_REJECTED.md`,
+ `Possible HTML comment rejected at ${name}:${lineNumber}. (SES_HTML_COMMENT_REJECTED)`,
);
}
@@ -130,8 +129,7 @@ export function rejectImportExpressions(src) {
}
const name = getSourceURL(src);
throw new SyntaxError(
- `Possible import expression rejected at ${name}:${lineNumber}
- See https://github.com/Agoric/SES-shim/blob/master/packages/ses/error-codes/IMPORT_REJECTED.md`,
+ `Possible import expression rejected at ${name}:${lineNumber}. (SES_IMPORT_REJECTED)`,
);
}
@@ -203,8 +201,7 @@ export function rejectSomeDirectEvalExpressions(src) {
}
const name = getSourceURL(src);
throw new SyntaxError(
- `Possible direct eval expression rejected at ${name}:${lineNumber}
- See https://github.com/Agoric/SES-shim/blob/master/packages/ses/error-codes/EVAL_REJECTED.md`,
+ `Possible direct eval expression rejected at ${name}:${lineNumber}. (SES_EVAL_REJECTED)`,
);
}

fix: de-url-ify error codes (#548)