@jsenv/plugin-supervisor 1.3.6 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { fileURLToPath } from "node:url";
3
- import { applyBabelPlugins, parseHtmlString, visitHtmlNodes, analyzeScriptNode, getHtmlNodeAttribute, getHtmlNodeText, injectHtmlNodeAsEarlyAsPossible, createHtmlNode, stringifyHtmlAst, getHtmlNodePosition, getUrlForContentInsideHtml, setHtmlNodeText, setHtmlNodeAttributes } from "@jsenv/ast";
3
+ import { applyBabelPlugins, parseHtml, visitHtmlNodes, analyzeScriptNode, getHtmlNodeAttribute, getHtmlNodeText, injectHtmlNodeAsEarlyAsPossible, createHtmlNode, stringifyHtmlAst, getHtmlNodePosition, getUrlForContentInsideHtml, setHtmlNodeText, setHtmlNodeAttributes } from "@jsenv/ast";
4
4
 
5
5
  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
6
6
  const intToChar = new Uint8Array(64); // 64 possible chars.
@@ -704,7 +704,10 @@ const injectSupervisorIntoHTML = async ({
704
704
  }) => urlToRelativeUrl(inlineScriptUrl, webServer.rootDirectoryUrl),
705
705
  inlineAsRemote
706
706
  }) => {
707
- const htmlAst = parseHtmlString(content);
707
+ const htmlAst = parseHtml({
708
+ html: content,
709
+ url
710
+ });
708
711
  const mutations = [];
709
712
  const actions = [];
710
713
  const scriptInfos = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-supervisor",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,9 +26,9 @@
26
26
  "/dist/"
27
27
  ],
28
28
  "dependencies": {
29
- "@jsenv/ast": "5.2.0",
29
+ "@jsenv/ast": "6.0.0",
30
30
  "@jsenv/urls": "2.2.1",
31
- "@jsenv/sourcemap": "1.2.3",
31
+ "@jsenv/sourcemap": "1.2.4",
32
32
  "launch-editor": "2.6.1"
33
33
  },
34
34
  "scripts": {
@@ -46,7 +46,7 @@
46
46
  */
47
47
 
48
48
  import {
49
- parseHtmlString,
49
+ parseHtml,
50
50
  stringifyHtmlAst,
51
51
  visitHtmlNodes,
52
52
  getHtmlNodeAttribute,
@@ -80,7 +80,7 @@ export const injectSupervisorIntoHTML = async (
80
80
  inlineAsRemote,
81
81
  },
82
82
  ) => {
83
- const htmlAst = parseHtmlString(content);
83
+ const htmlAst = parseHtml({ html: content, url });
84
84
  const mutations = [];
85
85
  const actions = [];
86
86