@jsenv/plugin-preact 0.0.23 → 0.0.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-preact",
3
- "version": "0.0.23",
3
+ "version": "0.0.26",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,19 +23,19 @@
23
23
  "/main.js"
24
24
  ],
25
25
  "scripts": {
26
- "test": "node ./scripts/test/test.mjs"
26
+ "test": "node --conditions=development ./scripts/test.mjs"
27
27
  },
28
28
  "dependencies": {
29
29
  "@babel/plugin-transform-react-jsx": "7.17.3",
30
- "@jsenv/utils": "1.8.2",
31
- "@jsenv/url-meta": "6.2.0"
30
+ "@jsenv/utils": "1.8.5",
31
+ "@jsenv/urls": "1.1.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/plugin-transform-react-jsx-development": "7.16.7",
35
35
  "@jsenv/assert": "2.5.4",
36
36
  "@jsenv/core": "../../",
37
37
  "@jsenv/plugin-commonjs": "../jsenv-plugin-commonjs/",
38
- "@jsenv/filesystem": "3.1.0",
38
+ "@jsenv/filesystem": "../filesystem/",
39
39
  "@prefresh/babel-plugin": "0.4.3",
40
40
  "@prefresh/core": "1.3.4",
41
41
  "@prefresh/utils": "1.1.3",
@@ -3,8 +3,7 @@
3
3
  * - https://github.com/preactjs/prefresh/blob/main/packages/vite/src/index.js
4
4
  */
5
5
 
6
- import { normalizeStructuredMetaMap, urlToMeta } from "@jsenv/url-meta"
7
-
6
+ import { URL_META } from "@jsenv/urls"
8
7
  import { applyBabelPlugins } from "@jsenv/utils/js_ast/apply_babel_plugins.js"
9
8
  import { createMagicSource } from "@jsenv/utils/sourcemap/magic_source.js"
10
9
  import { composeTwoSourcemaps } from "@jsenv/utils/sourcemap/sourcemap_composition_v3.js"
@@ -30,7 +29,7 @@ export const jsenvPluginPreact = ({
30
29
  },
31
30
  preactDevtoolsDuringBuild = false,
32
31
  } = {}) => {
33
- const structuredMetaMap = normalizeStructuredMetaMap(
32
+ const associations = URL_META.resolveAssociations(
34
33
  {
35
34
  jsx: jsxInclude,
36
35
  refresh: refreshInclude,
@@ -83,7 +82,10 @@ import ${preactDevtoolsReference.generatedSpecifier}
83
82
  return { content: htmlModified }
84
83
  },
85
84
  js_module: async (urlInfo, { scenario, referenceUtils }) => {
86
- const urlMeta = urlToMeta({ url: urlInfo.url, structuredMetaMap })
85
+ const urlMeta = URL_META.applyAssociations({
86
+ url: urlInfo.url,
87
+ associations,
88
+ })
87
89
  const jsxEnabled = urlMeta.jsx
88
90
  const refreshEnabled = scenario === "dev" ? urlMeta.refresh : false
89
91
  const hookNamesEnabled =