@jsenv/core 34.0.2 → 34.0.3

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/README.md CHANGED
@@ -7,7 +7,7 @@ It has naturally evolved to cover the core needs of a JavaScript project: develo
7
7
  - :sparkles: Same tooling for dev, tests and build.
8
8
  - :exploding_head: Can execute tests on Chrome, Firefox, Safari and Node.js.
9
9
 
10
- [Documentation](https://github.com/jsenv/jsenv-core/wiki/A\)-Getting-started)
10
+ [Documentation](<https://github.com/jsenv/jsenv-core/wiki/A)-Getting-started>)
11
11
 
12
12
  # Installation
13
13
 
package/dist/jsenv.js CHANGED
@@ -7910,7 +7910,6 @@ const createUrlInfoTransformer = ({
7910
7910
  await context.cook(sourcemapUrlInfo, {
7911
7911
  reference: sourcemapReference
7912
7912
  });
7913
- sourcemapUrlInfo.isInline = sourcemaps === "inline";
7914
7913
  const sourcemapRaw = JSON.parse(sourcemapUrlInfo.content);
7915
7914
  const sourcemap = normalizeSourcemap(urlInfo, sourcemapRaw);
7916
7915
  urlInfo.sourcemap = sourcemap;
@@ -9003,6 +9002,7 @@ ${ANSI.color(normalizedReturnValue, ANSI.YELLOW)}
9003
9002
  url: urlInfo.url
9004
9003
  },
9005
9004
  type: "sourcemap_comment",
9005
+ expectedType: "sourcemap",
9006
9006
  subtype: urlInfo.contentType === "text/javascript" ? "js" : "css",
9007
9007
  parentUrl: urlInfo.url,
9008
9008
  specifier
@@ -9026,11 +9026,15 @@ ${ANSI.color(normalizedReturnValue, ANSI.YELLOW)}
9026
9026
  const [sourcemapReference, sourcemapUrlInfo] = resolveReference(createReference({
9027
9027
  trace: traceFromUrlSite(sourcemapUrlSite),
9028
9028
  type,
9029
+ expectedType: "sourcemap",
9029
9030
  parentUrl: urlInfo.url,
9030
9031
  specifier,
9031
9032
  specifierLine,
9032
9033
  specifierColumn
9033
9034
  }));
9035
+ if (sourcemapReference.isInline) {
9036
+ sourcemapUrlInfo.isInline = true;
9037
+ }
9034
9038
  sourcemapUrlInfo.type = "sourcemap";
9035
9039
  return [sourcemapReference, sourcemapUrlInfo];
9036
9040
  }
@@ -9541,6 +9545,12 @@ const adjustUrlSite = (urlInfo, {
9541
9545
  }, urlInfo);
9542
9546
  };
9543
9547
  const inferUrlInfoType = urlInfo => {
9548
+ const {
9549
+ type
9550
+ } = urlInfo;
9551
+ if (type === "sourcemap") {
9552
+ return "sourcemap";
9553
+ }
9544
9554
  const {
9545
9555
  contentType
9546
9556
  } = urlInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "34.0.2",
3
+ "version": "34.0.3",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -291,6 +291,7 @@ ${ANSI.color(normalizedReturnValue, ANSI.YELLOW)}
291
291
  url: urlInfo.url,
292
292
  },
293
293
  type: "sourcemap_comment",
294
+ expectedType: "sourcemap",
294
295
  subtype: urlInfo.contentType === "text/javascript" ? "js" : "css",
295
296
  parentUrl: urlInfo.url,
296
297
  specifier,
@@ -316,12 +317,16 @@ ${ANSI.color(normalizedReturnValue, ANSI.YELLOW)}
316
317
  createReference({
317
318
  trace: traceFromUrlSite(sourcemapUrlSite),
318
319
  type,
320
+ expectedType: "sourcemap",
319
321
  parentUrl: urlInfo.url,
320
322
  specifier,
321
323
  specifierLine,
322
324
  specifierColumn,
323
325
  }),
324
326
  )
327
+ if (sourcemapReference.isInline) {
328
+ sourcemapUrlInfo.isInline = true
329
+ }
325
330
  sourcemapUrlInfo.type = "sourcemap"
326
331
  return [sourcemapReference, sourcemapUrlInfo]
327
332
  },
@@ -913,6 +918,10 @@ const adjustUrlSite = (urlInfo, { urlGraph, url, line, column }) => {
913
918
  }
914
919
 
915
920
  const inferUrlInfoType = (urlInfo) => {
921
+ const { type } = urlInfo
922
+ if (type === "sourcemap") {
923
+ return "sourcemap"
924
+ }
916
925
  const { contentType } = urlInfo
917
926
  if (contentType === "text/html") {
918
927
  return "html"
@@ -123,7 +123,6 @@ export const createUrlInfoTransformer = ({
123
123
  })
124
124
  try {
125
125
  await context.cook(sourcemapUrlInfo, { reference: sourcemapReference })
126
- sourcemapUrlInfo.isInline = sourcemaps === "inline"
127
126
  const sourcemapRaw = JSON.parse(sourcemapUrlInfo.content)
128
127
  const sourcemap = normalizeSourcemap(urlInfo, sourcemapRaw)
129
128
  urlInfo.sourcemap = sourcemap