nuxt-link-checker 5.1.1 → 5.1.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.
package/dist/module.json
CHANGED
|
@@ -35,6 +35,9 @@ export function inspect(ctx, rules) {
|
|
|
35
35
|
rules = rules || AllInspections;
|
|
36
36
|
const res = { error: [], warning: [], fix: ctx.link, link: ctx.link };
|
|
37
37
|
let link = ctx.link;
|
|
38
|
+
const foldWww = (host) => {
|
|
39
|
+
return (host || "").replace(/^www\./i, "");
|
|
40
|
+
};
|
|
38
41
|
const siteConfigHost = ctx.siteConfig?.url && parseURL(ctx.siteConfig.url).host;
|
|
39
42
|
const url = parseURL(link);
|
|
40
43
|
const validInspections = rules.filter(({ id }) => !(ctx.skipInspections || []).includes(id));
|
|
@@ -42,7 +45,7 @@ export function inspect(ctx, rules) {
|
|
|
42
45
|
for (const rule of validInspections) {
|
|
43
46
|
const isFakeAbsolute = link.startsWith("//") && !link.includes(".");
|
|
44
47
|
const hasNonHttpProtocol = hasProtocol(link) && !link.startsWith("http");
|
|
45
|
-
const isExternalLink = hasNonHttpProtocol || url.host && url.host !== siteConfigHost && !isFakeAbsolute;
|
|
48
|
+
const isExternalLink = hasNonHttpProtocol || url.host && foldWww(url.host) !== foldWww(siteConfigHost) && !isFakeAbsolute;
|
|
46
49
|
if (!rule.externalLinks && isExternalLink) {
|
|
47
50
|
continue;
|
|
48
51
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-link-checker",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.1.
|
|
4
|
+
"version": "5.1.2",
|
|
5
5
|
"description": "Find and magically fix links that may be negatively effecting your Nuxt sites SEO.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"h3": "^1.15.11",
|
|
58
58
|
"magic-string": "^0.30.21",
|
|
59
59
|
"nuxt-site-config": "^4.1.0",
|
|
60
|
-
"nuxtseo-shared": "^5.3.
|
|
60
|
+
"nuxtseo-shared": "^5.3.1",
|
|
61
61
|
"ofetch": "^1.5.1",
|
|
62
62
|
"pathe": "^2.0.3",
|
|
63
63
|
"pkg-types": "^2.3.1",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"unstorage": "^1.17.5"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@antfu/eslint-config": "^9.
|
|
71
|
+
"@antfu/eslint-config": "^9.1.0",
|
|
72
72
|
"@nuxt/content": "^3.14.0",
|
|
73
73
|
"@nuxt/devtools": "4.0.0-alpha.7",
|
|
74
74
|
"@nuxt/devtools-kit": "4.0.0-alpha.7",
|
|
@@ -76,19 +76,19 @@
|
|
|
76
76
|
"@nuxt/module-builder": "^1.0.2",
|
|
77
77
|
"@nuxt/test-utils": "^4.0.3",
|
|
78
78
|
"@nuxtjs/sitemap": "^8.2.1",
|
|
79
|
-
"@types/node": "^
|
|
79
|
+
"@types/node": "^26.0.0",
|
|
80
80
|
"better-sqlite3": "^12.11.1",
|
|
81
81
|
"bumpp": "^11.1.0",
|
|
82
82
|
"eslint": "^10.5.0",
|
|
83
83
|
"eslint-plugin-harlanzw": "^0.17.0",
|
|
84
84
|
"execa": "^9.6.1",
|
|
85
85
|
"nuxt": "^4.4.8",
|
|
86
|
-
"nuxtseo-layer-devtools": "^5.3.
|
|
86
|
+
"nuxtseo-layer-devtools": "^5.3.1",
|
|
87
87
|
"sirv": "^3.0.2",
|
|
88
88
|
"std-env": "^4.1.0",
|
|
89
89
|
"typescript": "6.0.3",
|
|
90
90
|
"unbuild": "^3.6.1",
|
|
91
|
-
"vite": "^8.0
|
|
91
|
+
"vite": "^8.1.0",
|
|
92
92
|
"vitest": "^4.1.9",
|
|
93
93
|
"vue-eslint-parser": "^10.4.1",
|
|
94
94
|
"vue-tsc": "^3.3.5"
|