From 122c8ba0e30c36ebcd1e876de7fd58fc339a3366 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Tue, 20 Apr 2021 17:22:52 +0300 Subject: [PATCH] build(docs-infra): fix `StackblitzBuilder` after `jsdom` update (#41725) In commit c617f1f768bd968e95dd1147293a5a18df3bc770, `jsdom` was updated from v9 to v16. This includes a breaking change that caused `StackblitzBuilder` to fail to generate the StackBlitz examples. However, this failure went unnoticed, because `StackblitzBuilder` still completed successfully after failing to generate the examples. (This has been fixed in the previous commit.) This commit updates `StackblitzBuilder` to use the new `jsdom` API. PR Close #41725 --- aio/tools/stackblitz-builder/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/tools/stackblitz-builder/builder.js b/aio/tools/stackblitz-builder/builder.js index 03099c4bcb..d24a559ce8 100644 --- a/aio/tools/stackblitz-builder/builder.js +++ b/aio/tools/stackblitz-builder/builder.js @@ -254,7 +254,7 @@ class StackblitzBuilder { _createStackblitzHtml(config, postData) { const baseHtml = this._createBaseStackblitzHtml(config); - const doc = jsdom.jsdom(baseHtml); + const doc = new jsdom.JSDOM(baseHtml).window.document; const form = doc.querySelector('form'); for(const [key, value] of Object.entries(postData)) {