@jsenv/core 37.0.1 → 37.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/dist/jsenv_core.js +9 -7
- package/package.json +1 -1
- package/src/build/build.js +9 -7
package/dist/jsenv_core.js
CHANGED
|
@@ -20559,6 +20559,9 @@ ${ANSI.color(buildUrl, ANSI.MAGENTA)}
|
|
|
20559
20559
|
});
|
|
20560
20560
|
});
|
|
20561
20561
|
for (const referenceToOther of buildUrlInfo.referenceToOthersSet) {
|
|
20562
|
+
if (referenceToOther.isWeak) {
|
|
20563
|
+
continue;
|
|
20564
|
+
}
|
|
20562
20565
|
const referencedUrlInfo = referenceToOther.urlInfo;
|
|
20563
20566
|
if (referencedUrlInfo.data.generatedToShareCode) {
|
|
20564
20567
|
hintsToInject[referencedUrlInfo.url] = node;
|
|
@@ -20581,22 +20584,21 @@ ${ANSI.color(buildUrl, ANSI.MAGENTA)}
|
|
|
20581
20584
|
Object.keys(hintsToInject).forEach((urlToHint) => {
|
|
20582
20585
|
const hintNode = hintsToInject[urlToHint];
|
|
20583
20586
|
const urlFormatted = urlToHint;
|
|
20584
|
-
const
|
|
20585
|
-
buildSpecifierMap,
|
|
20586
|
-
urlFormatted,
|
|
20587
|
-
);
|
|
20587
|
+
const buildSpecifier = findKey(buildSpecifierMap, urlFormatted);
|
|
20588
20588
|
const found = findHtmlNode(htmlAst, (htmlNode) => {
|
|
20589
20589
|
return (
|
|
20590
20590
|
htmlNode.nodeName === "link" &&
|
|
20591
|
-
getHtmlNodeAttribute(htmlNode, "href") ===
|
|
20592
|
-
buildSpecifierBeforeRedirect
|
|
20591
|
+
getHtmlNodeAttribute(htmlNode, "href") === buildSpecifier
|
|
20593
20592
|
);
|
|
20594
20593
|
});
|
|
20595
20594
|
if (!found) {
|
|
20595
|
+
const buildSpecifierVersioned =
|
|
20596
|
+
buildVersionsManager.getBuildSpecifierVersioned(buildSpecifier);
|
|
20597
|
+
const href = buildSpecifierVersioned || buildSpecifier;
|
|
20596
20598
|
mutations.push(() => {
|
|
20597
20599
|
const nodeToInsert = createHtmlNode({
|
|
20598
20600
|
tagName: "link",
|
|
20599
|
-
href
|
|
20601
|
+
href,
|
|
20600
20602
|
rel: getHtmlNodeAttribute(hintNode, "rel"),
|
|
20601
20603
|
as: getHtmlNodeAttribute(hintNode, "as"),
|
|
20602
20604
|
type: getHtmlNodeAttribute(hintNode, "type"),
|
package/package.json
CHANGED
package/src/build/build.js
CHANGED
|
@@ -1144,6 +1144,9 @@ ${ANSI.color(buildUrl, ANSI.MAGENTA)}
|
|
|
1144
1144
|
});
|
|
1145
1145
|
});
|
|
1146
1146
|
for (const referenceToOther of buildUrlInfo.referenceToOthersSet) {
|
|
1147
|
+
if (referenceToOther.isWeak) {
|
|
1148
|
+
continue;
|
|
1149
|
+
}
|
|
1147
1150
|
const referencedUrlInfo = referenceToOther.urlInfo;
|
|
1148
1151
|
if (referencedUrlInfo.data.generatedToShareCode) {
|
|
1149
1152
|
hintsToInject[referencedUrlInfo.url] = node;
|
|
@@ -1166,22 +1169,21 @@ ${ANSI.color(buildUrl, ANSI.MAGENTA)}
|
|
|
1166
1169
|
Object.keys(hintsToInject).forEach((urlToHint) => {
|
|
1167
1170
|
const hintNode = hintsToInject[urlToHint];
|
|
1168
1171
|
const urlFormatted = urlToHint;
|
|
1169
|
-
const
|
|
1170
|
-
buildSpecifierMap,
|
|
1171
|
-
urlFormatted,
|
|
1172
|
-
);
|
|
1172
|
+
const buildSpecifier = findKey(buildSpecifierMap, urlFormatted);
|
|
1173
1173
|
const found = findHtmlNode(htmlAst, (htmlNode) => {
|
|
1174
1174
|
return (
|
|
1175
1175
|
htmlNode.nodeName === "link" &&
|
|
1176
|
-
getHtmlNodeAttribute(htmlNode, "href") ===
|
|
1177
|
-
buildSpecifierBeforeRedirect
|
|
1176
|
+
getHtmlNodeAttribute(htmlNode, "href") === buildSpecifier
|
|
1178
1177
|
);
|
|
1179
1178
|
});
|
|
1180
1179
|
if (!found) {
|
|
1180
|
+
const buildSpecifierVersioned =
|
|
1181
|
+
buildVersionsManager.getBuildSpecifierVersioned(buildSpecifier);
|
|
1182
|
+
const href = buildSpecifierVersioned || buildSpecifier;
|
|
1181
1183
|
mutations.push(() => {
|
|
1182
1184
|
const nodeToInsert = createHtmlNode({
|
|
1183
1185
|
tagName: "link",
|
|
1184
|
-
href
|
|
1186
|
+
href,
|
|
1185
1187
|
rel: getHtmlNodeAttribute(hintNode, "rel"),
|
|
1186
1188
|
as: getHtmlNodeAttribute(hintNode, "as"),
|
|
1187
1189
|
type: getHtmlNodeAttribute(hintNode, "type"),
|