@jsenv/core 29.4.5 → 29.6.0

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.
@@ -277,13 +277,12 @@ export const jsenvPluginSupervisor = ({
277
277
  if (type !== "js_classic" && type !== "js_module") {
278
278
  return
279
279
  }
280
- const jsenvPluginOwner = getHtmlNodeAttribute(
281
- node,
282
- "jsenv-plugin-owner",
280
+ if (
281
+ getHtmlNodeAttribute(node, "jsenv-cooked-by") ||
282
+ getHtmlNodeAttribute(node, "jsenv-inlined-by") ||
283
+ getHtmlNodeAttribute(node, "jsenv-injected-by")
283
284
  )
284
- if (jsenvPluginOwner !== undefined) {
285
285
  return
286
- }
287
286
  const noSupervisor = getHtmlNodeAttribute(node, "no-supervisor")
288
287
  if (noSupervisor !== undefined) {
289
288
  return
@@ -378,15 +377,13 @@ export const jsenvPluginSupervisor = ({
378
377
  }
379
378
  if (src) {
380
379
  setHtmlNodeAttributes(node, {
381
- "jsenv-plugin-owner": "jsenv:supervisor",
382
- "jsenv-plugin-action": "inlined",
380
+ "jsenv-inlined-by": "jsenv:supervisor",
383
381
  "src": undefined,
384
382
  "inlined-from-src": src,
385
383
  })
386
384
  } else {
387
385
  setHtmlNodeAttributes(node, {
388
- "jsenv-plugin-owner": "jsenv:supervisor",
389
- "jsenv-plugin-action": "content_cooked",
386
+ "jsenv-cooked-by": "jsenv:supervisor",
390
387
  })
391
388
  }
392
389
  },
@@ -116,6 +116,7 @@ export const jsenvPluginAsJsClassicConversion = ({
116
116
  originalUrl: jsModuleUrlInfo.originalUrl,
117
117
  originalContent: jsModuleUrlInfo.originalContent,
118
118
  sourcemap,
119
+ data: jsModuleUrlInfo.data,
119
120
  }
120
121
  },
121
122
  }
@@ -86,6 +86,7 @@ export const jsenvPluginAsJsClassicLibrary = ({
86
86
  originalUrl: urlInfo.originalUrl,
87
87
  originalContent: jsModuleUrlInfo.originalContent,
88
88
  sourcemap,
89
+ data: jsModuleUrlInfo.data,
89
90
  }
90
91
  },
91
92
  }
@@ -130,6 +130,7 @@ const jsenvPluginAsModules = () => {
130
130
  type: "js_module",
131
131
  originalUrl: jsonUrlInfo.originalUrl,
132
132
  originalContent: jsonUrlInfo.originalContent,
133
+ data: jsonUrlInfo.data,
133
134
  }
134
135
  },
135
136
  }
@@ -179,6 +180,7 @@ const jsenvPluginAsModules = () => {
179
180
  type: "js_module",
180
181
  originalUrl: cssUrlInfo.originalUrl,
181
182
  originalContent: cssUrlInfo.originalContent,
183
+ data: cssUrlInfo.data,
182
184
  }
183
185
  },
184
186
  }
@@ -226,6 +228,7 @@ export default inlineContent.text`,
226
228
  type: "js_module",
227
229
  originalUrl: textUrlInfo.originalUrl,
228
230
  originalContent: textUrlInfo.originalContent,
231
+ data: textUrlInfo.data,
229
232
  }
230
233
  },
231
234
  }
@@ -138,8 +138,8 @@ const visitHtmlUrls = ({ url, htmlAst }) => {
138
138
  const visitAttributeAsUrlSpecifier = ({ node, attributeName, ...rest }) => {
139
139
  const value = getHtmlNodeAttribute(node, attributeName)
140
140
  if (value) {
141
- const jsenvPluginOwner = getHtmlNodeAttribute(node, "jsenv-plugin-owner")
142
- if (jsenvPluginOwner === "jsenv:importmap") {
141
+ const jsenvInlinedBy = getHtmlNodeAttribute(node, "jsenv-inlined-by")
142
+ if (jsenvInlinedBy === "jsenv:importmap") {
143
143
  // during build the importmap is inlined
144
144
  // and shoud not be considered as a dependency anymore
145
145
  return null