From 20f303aabac3c69199f5576e425ac6311359ff87 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Mon, 10 May 2021 16:30:27 -0700 Subject: [PATCH] fix(ses): Address charset error in integration --- .../puppeteer-test/utility/test-bundler.js | 7 +++++-- .../scaffolding/mock-unpkg-umd/index.html | 1 + packages/ses/NEWS.md | 7 +++++++ packages/ses/README.md | 7 +++++++ packages/ses/scripts/bundle.js | 21 ++++++++++--------- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/packages/ses-integration-test/puppeteer-test/utility/test-bundler.js b/packages/ses-integration-test/puppeteer-test/utility/test-bundler.js index 28e5e0801d..38fef45589 100644 --- a/packages/ses-integration-test/puppeteer-test/utility/test-bundler.js +++ b/packages/ses-integration-test/puppeteer-test/utility/test-bundler.js @@ -4,7 +4,10 @@ import test from 'tape-promise/tape'; import path from 'path'; const runBrowserTests = async (t, indexFile) => { - const browser = await puppeteer.launch(); + const browser = await puppeteer.launch({ + // debug: + // { headless: false } + }); let numTests; let numPass; @@ -62,7 +65,7 @@ const testBundler = (bundlerName, indexFile) => { t.notEqual(numTests, undefined); t.equal(numTests, numPass); }) - .catch(e => t.isNot(e, e, 'unexpected exception')) + .catch(e => t.fail(`Unexpected exception ${e}`)) .finally(() => t.end()); }); }; diff --git a/packages/ses-integration-test/scaffolding/mock-unpkg-umd/index.html b/packages/ses-integration-test/scaffolding/mock-unpkg-umd/index.html index 403a4ce78a..0e908a59f0 100644 --- a/packages/ses-integration-test/scaffolding/mock-unpkg-umd/index.html +++ b/packages/ses-integration-test/scaffolding/mock-unpkg-umd/index.html @@ -2,6 +2,7 @@ Test + diff --git a/packages/ses/NEWS.md b/packages/ses/NEWS.md index 7d6144aa07..8a7392402f 100644 --- a/packages/ses/NEWS.md +++ b/packages/ses/NEWS.md @@ -20,6 +20,13 @@ User-visible changes in SES: The constructor must perform the module analysis and transform the source, and present this duck-type to the Compartment `importHook`. This relieves SES of a dependency on Babel and simplifies its API. +- *BREAKING CHANGE* The UMD distribution of SES must have the UTF-8 charset. + The prior versions were accidentally ASCII, so SES would have worked + in any web page, regardless of the charset. + To remedy this, be sure to include `` in + the containing page (a general best-practice for web pages) or specifically + use `