vitepress-linkcard 1.2.7 → 1.2.8

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
@@ -6,7 +6,7 @@ vitepress-linkcard
6
6
 
7
7
  **A VitePress plugin to generate a pretty linkcard with OGP.**
8
8
 
9
- Slightly more readable README created with this plugin is [here](https://asumoranda.com/posts/10-vitepress-linkcard.html).
9
+ A blog generated with this plugin is [here](https://asumoranda.com/posts/10-vitepress-linkcard.html).
10
10
 
11
11
  [![NPM Version](https://img.shields.io/npm/v/vitepress-linkcard?style=flat&logo=npm&logoColor=white&label=npmjs&color=%23CB3837)](https://www.npmjs.com/package/vitepress-linkcard)
12
12
  [![NPM bundle size](https://img.shields.io/bundlephobia/min/vitepress-linkcard)](https://www.npmjs.com/package/vitepress-linkcard)
package/dist/.cjs.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vitepress-linkcard v1.2.7
2
+ * vitepress-linkcard v1.2.8
3
3
  * (c) 2022 - 2025 luckrya
4
4
  * Released under the MIT License.
5
5
  */
package/dist/.esm.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vitepress-linkcard v1.2.7
2
+ * vitepress-linkcard v1.2.8
3
3
  * (c) 2022 - 2025 luckrya
4
4
  * Released under the MIT License.
5
5
  */
@@ -24,7 +24,8 @@ export const generateCardDomFragment = (data, options) => {
24
24
  .replace(/'/g, "'");
25
25
  const style = STYLE(options.borderColor || '#7d7d7dff', options.bgColor || '#7d7d7d00');
26
26
  const url = options.href || '';
27
- const domain = new URL(url).origin.replace(/^https?:\/\//, '').replace(/^www\./, '') || 'Unknown domain';
27
+ const domain = new URL(url).origin.replace(/^https?:\/\//, '').replace(/^www\./, '') ||
28
+ 'Unknown domain';
28
29
  let title = data.title;
29
30
  let description = data.description;
30
31
  // Special handling for gitub.com
@@ -84,7 +84,9 @@ export function parserMetadata(htmlString, url) {
84
84
  function absolute(logo) {
85
85
  if (!logo)
86
86
  return DEFAULT_LOGO;
87
- return extractUrl(logo) ? logo : `${extractUrl(url)?.origin}${cleanPath(`/${logo}`)}`; // TODO: no match "content='//img.xx.com/a.png'"
87
+ return extractUrl(logo)
88
+ ? logo
89
+ : `${extractUrl(url)?.origin}${cleanPath(`/${logo}`)}`; // TODO: no match "content='//img.xx.com/a.png'"
88
90
  }
89
91
  const metadata = {
90
92
  title: matchTitleByMetaTag(htmlString),
@@ -41,7 +41,9 @@ export function async(url) {
41
41
  xhr.open('GET', url, false);
42
42
  xhr.setRequestHeader('Content-Type', 'text/html');
43
43
  xhr.onreadystatechange = function () {
44
- if (xhr.readyState === 4 && xhr.status === 200 && isString(xhr.responseText)) {
44
+ if (xhr.readyState === 4 &&
45
+ xhr.status === 200 &&
46
+ isString(xhr.responseText)) {
45
47
  cache.set(url, xhr.responseText);
46
48
  resolve(xhr.responseText);
47
49
  }
package/package.json CHANGED
@@ -14,27 +14,27 @@
14
14
  "@babel/core": "^7.28.5",
15
15
  "@babel/preset-env": "^7.28.5",
16
16
  "@babel/preset-typescript": "^7.28.5",
17
- "@eslint/js": "^9.39.1",
17
+ "@eslint/js": "^9.39.2",
18
18
  "@luckrya/utility": "^0.1.1",
19
19
  "@rollup/plugin-babel": "^6.1.0",
20
20
  "@rollup/plugin-commonjs": "^29.0.0",
21
21
  "@rollup/plugin-node-resolve": "^16.0.3",
22
22
  "@types/babel__core": "^7",
23
23
  "@types/markdown-it": "^13.0.2",
24
- "@types/node": "^24.10.0",
25
- "eslint": "^9.39.1",
26
- "eslint-plugin-vue": "^10.5.1",
24
+ "@types/node": "^25.0.2",
25
+ "eslint": "^9.39.2",
26
+ "eslint-plugin-vue": "^10.6.2",
27
27
  "globals": "^16.5.0",
28
28
  "jiti": "^2.6.1",
29
29
  "markdown-it": "^13.0.2",
30
- "npm-check-updates": "^19.1.2",
31
- "prettier": "^3.6.2",
30
+ "npm-check-updates": "^19.2.0",
31
+ "prettier": "^3.7.4",
32
32
  "rollup": "^2.79.2",
33
33
  "rollup-plugin-terser": "^7.0.2",
34
- "typedoc": "^0.28.14",
34
+ "typedoc": "^0.28.15",
35
35
  "typedoc-theme-hierarchy": "^6.0.0",
36
36
  "typescript": "^5.9.3",
37
- "typescript-eslint": "^8.46.3",
37
+ "typescript-eslint": "^8.50.0",
38
38
  "vue-eslint-parser": "^10.2.0",
39
39
  "xmlhttprequest": "^1.8.0"
40
40
  },
@@ -69,11 +69,11 @@
69
69
  "clean": "rm -rf dist types",
70
70
  "dev": "rollup -c -w",
71
71
  "docs": "yarn typedoc",
72
- "format": "yarn prettier --config .vscode/.prettierrc.json --write .config/*.json .github .vscode src *.json && rm -rf node_modules",
72
+ "format": "yarn prettier --config .vscode/.prettierrc.json --write .config/*.json .github/workflows .vscode src *.json && rm -rf node_modules",
73
73
  "lint": "yarn eslint --config .vscode/eslint.config.ts src/**/*",
74
74
  "type:dts": "tsc --emitDeclarationOnly"
75
75
  },
76
76
  "type": "module",
77
77
  "types": "./types/index.d.ts",
78
- "version": "1.2.7"
78
+ "version": "1.2.8"
79
79
  }