@riebeckite/plugin-diagnostics 0.0.15 → 0.0.16
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/index.js +5 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1010,7 +1010,7 @@ function checkSiteIntegrity(manifest, options = {}) {
|
|
|
1010
1010
|
checkResolvedLinks(entry, publicSlugs, assetPaths, diagnostics2, options);
|
|
1011
1011
|
checkHtmlReferences(entry, publicRoutes, assetPaths, diagnostics2, options);
|
|
1012
1012
|
}
|
|
1013
|
-
checkRedirectTargets(manifest,
|
|
1013
|
+
checkRedirectTargets(manifest, diagnostics2, options);
|
|
1014
1014
|
checkRedirectCycles(manifest, diagnostics2, options);
|
|
1015
1015
|
checkAmbiguousFolderPageOwners(manifest, diagnostics2, options);
|
|
1016
1016
|
return diagnostics2;
|
|
@@ -1161,11 +1161,12 @@ function checkHtmlReferences(entry, publicRoutes, assetPaths, diagnostics2, opti
|
|
|
1161
1161
|
);
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
|
-
function checkRedirectTargets(manifest,
|
|
1165
|
-
for (const [path, redirect] of manifest.
|
|
1164
|
+
function checkRedirectTargets(manifest, diagnostics2, options) {
|
|
1165
|
+
for (const [path, redirect] of manifest.redirects) {
|
|
1166
1166
|
const owner = manifest.bySlug.get(redirect.slug);
|
|
1167
1167
|
const target = owner ? normalizeRoutePath(owner.publicLocation.permalink) : null;
|
|
1168
|
-
if (target &&
|
|
1168
|
+
if (target && manifest.byRoutablePermalink.get(target)?.slug === redirect.slug)
|
|
1169
|
+
continue;
|
|
1169
1170
|
diagnostics2.push(
|
|
1170
1171
|
diagnostic(options, {
|
|
1171
1172
|
code: "content-integrity:redirect-target-missing",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-diagnostics",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"remark-parse": "^11.0.0",
|
|
21
21
|
"unified": "^11.0.5",
|
|
22
22
|
"unist-util-visit": "^5.1.0",
|
|
23
|
-
"@riebeckite/core": "0.0.
|
|
23
|
+
"@riebeckite/core": "0.0.16"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/mdast": "^4.0.4",
|