@jsenv/core 37.0.0 → 37.0.2

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.
@@ -20581,22 +20581,21 @@ ${ANSI.color(buildUrl, ANSI.MAGENTA)}
20581
20581
  Object.keys(hintsToInject).forEach((urlToHint) => {
20582
20582
  const hintNode = hintsToInject[urlToHint];
20583
20583
  const urlFormatted = urlToHint;
20584
- const buildSpecifierBeforeRedirect = findKey(
20585
- buildSpecifierMap,
20586
- urlFormatted,
20587
- );
20584
+ const buildSpecifier = findKey(buildSpecifierMap, urlFormatted);
20588
20585
  const found = findHtmlNode(htmlAst, (htmlNode) => {
20589
20586
  return (
20590
20587
  htmlNode.nodeName === "link" &&
20591
- getHtmlNodeAttribute(htmlNode, "href") ===
20592
- buildSpecifierBeforeRedirect
20588
+ getHtmlNodeAttribute(htmlNode, "href") === buildSpecifier
20593
20589
  );
20594
20590
  });
20595
20591
  if (!found) {
20592
+ const buildSpecifierVersioned =
20593
+ buildVersionsManager.getBuildSpecifierVersioned(buildSpecifier);
20594
+ const href = buildSpecifierVersioned || buildSpecifier;
20596
20595
  mutations.push(() => {
20597
20596
  const nodeToInsert = createHtmlNode({
20598
20597
  tagName: "link",
20599
- href: buildSpecifierBeforeRedirect,
20598
+ href,
20600
20599
  rel: getHtmlNodeAttribute(hintNode, "rel"),
20601
20600
  as: getHtmlNodeAttribute(hintNode, "as"),
20602
20601
  type: getHtmlNodeAttribute(hintNode, "type"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "37.0.0",
3
+ "version": "37.0.2",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -68,10 +68,10 @@
68
68
  "@jsenv/log": "3.4.0",
69
69
  "@jsenv/node-esm-resolution": "1.0.1",
70
70
  "@jsenv/js-module-fallback": "1.2.0",
71
- "@jsenv/runtime-compat": "1.0.0",
71
+ "@jsenv/runtime-compat": "1.1.0",
72
72
  "@jsenv/server": "15.0.4",
73
73
  "@jsenv/sourcemap": "1.1.0",
74
- "@jsenv/plugin-transpilation": "1.2.0",
74
+ "@jsenv/plugin-transpilation": "1.2.1",
75
75
  "@jsenv/plugin-supervisor": "1.2.0",
76
76
  "@jsenv/url-meta": "8.1.0",
77
77
  "@jsenv/urls": "2.1.0",
@@ -1166,22 +1166,21 @@ ${ANSI.color(buildUrl, ANSI.MAGENTA)}
1166
1166
  Object.keys(hintsToInject).forEach((urlToHint) => {
1167
1167
  const hintNode = hintsToInject[urlToHint];
1168
1168
  const urlFormatted = urlToHint;
1169
- const buildSpecifierBeforeRedirect = findKey(
1170
- buildSpecifierMap,
1171
- urlFormatted,
1172
- );
1169
+ const buildSpecifier = findKey(buildSpecifierMap, urlFormatted);
1173
1170
  const found = findHtmlNode(htmlAst, (htmlNode) => {
1174
1171
  return (
1175
1172
  htmlNode.nodeName === "link" &&
1176
- getHtmlNodeAttribute(htmlNode, "href") ===
1177
- buildSpecifierBeforeRedirect
1173
+ getHtmlNodeAttribute(htmlNode, "href") === buildSpecifier
1178
1174
  );
1179
1175
  });
1180
1176
  if (!found) {
1177
+ const buildSpecifierVersioned =
1178
+ buildVersionsManager.getBuildSpecifierVersioned(buildSpecifier);
1179
+ const href = buildSpecifierVersioned || buildSpecifier;
1181
1180
  mutations.push(() => {
1182
1181
  const nodeToInsert = createHtmlNode({
1183
1182
  tagName: "link",
1184
- href: buildSpecifierBeforeRedirect,
1183
+ href,
1185
1184
  rel: getHtmlNodeAttribute(hintNode, "rel"),
1186
1185
  as: getHtmlNodeAttribute(hintNode, "as"),
1187
1186
  type: getHtmlNodeAttribute(hintNode, "type"),