Skip to content

Commit eb61258

Browse files
committed
chore: 更新依赖
1 parent d6934cf commit eb61258

File tree

10 files changed

+1877
-1866
lines changed

10 files changed

+1877
-1866
lines changed

content/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import Search from '@/components/Search.astro';
2727

2828
## 联系方式
2929

30-
如果你有什么问题,可以在下方留言或通过下方的邮箱联系我
30+
如果你有什么问题,可以在下方留言或通过邮箱联系我
3131

3232
+ Email: [k_0520@qq.com](mailto:k_0520@qq.com)
3333

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@
1616
"lint": "eslint . --fix"
1717
},
1818
"dependencies": {
19-
"@astrojs/mdx": "^4.3.13",
20-
"@astrojs/react": "^4.4.2",
21-
"@astrojs/rss": "^4.0.15",
22-
"@astrojs/vue": "^5.1.4",
23-
"@tailwindcss/vite": "^4.1.18",
24-
"astro": "^5.16.11",
25-
"react": "^19.2.3",
26-
"react-dom": "^19.2.3",
27-
"tailwindcss": "^4.1.18",
28-
"vue": "^3.5.26"
19+
"@astrojs/mdx": "^5.0.0",
20+
"@astrojs/react": "^5.0.0",
21+
"@astrojs/rss": "^4.0.17",
22+
"@astrojs/vue": "^6.0.0",
23+
"@tailwindcss/vite": "^4.2.1",
24+
"astro": "^6.0.2",
25+
"react": "^19.2.4",
26+
"react-dom": "^19.2.4",
27+
"tailwindcss": "^4.2.1",
28+
"vue": "^3.5.30"
2929
},
3030
"devDependencies": {
31-
"@antfu/eslint-config": "^7.0.1",
32-
"@types/react": "^19.2.8",
31+
"@antfu/eslint-config": "^7.7.0",
32+
"@types/react": "^19.2.14",
3333
"@types/react-dom": "^19.2.3",
34-
"eslint": "^9.39.2",
35-
"eslint-plugin-astro": "^1.5.0"
34+
"eslint": "^10.0.3",
35+
"eslint-plugin-astro": "^1.6.0"
3636
}
3737
}

pnpm-lock.yaml

Lines changed: 1850 additions & 1841 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseContent.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
import type { CollectionEntry } from 'astro:content';
3+
import { render } from 'astro:content';
4+
import { KEY } from 'astro:env/server';
35
import Edit from '@/assets/edit.svg';
46
import { REPOSITORY } from '@/consts';
57
import { encrypt } from '@/shared';
6-
import { render } from 'astro:content';
7-
import { KEY } from 'astro:env/server';
88
import Decrypt from './Decrypt.astro';
99
import FormattedDate from './FormattedDate.astro';
1010
import Comment from './Giscus.astro';

src/components/vue/Asstst.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
2+
import { onMounted, onUnmounted, ref } from 'vue';
23
import { file as fileAPI } from '@/api';
34
import { formatFileSize, isPicture } from '@/shared.ts';
4-
import { onMounted, onUnmounted, ref } from 'vue';
55
import Upload from './Upload.vue';
66
77
const limit = 20;
@@ -28,14 +28,14 @@ async function search() {
2828
isHaveMore.value = false;
2929
try {
3030
const params: any = { limit };
31-
const startAfter = files.value[files.value.length - 1]?.key;
31+
const startAfter = files.value.at(-1)?.key;
3232
if (startAfter) {
3333
params.startAfter = startAfter;
3434
}
3535
const result = await fileAPI.list(params);
3636
3737
if (Array.isArray(result)) {
38-
files.value = files.value.concat(result);
38+
files.value = [...files.value, ...result];
3939
4040
// 不判断 false
4141
if (result.length >= limit) {

src/pages/about.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2+
import { getEntry } from 'astro:content';
23
import BaseContent from '@/components/BaseContent.astro';
34
import BaseLayout from '@/layouts/BaseLayout.astro';
4-
import { getEntry } from 'astro:content';
55
66
const post = await getEntry('blog', 'about')!;
77
---

src/pages/rss.xml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import rss from '@astrojs/rss';
12
import { SITE_DESCRIPTION, SITE_TITLE } from '@/consts';
23
import { getPosts } from '@/utils';
3-
import rss from '@astrojs/rss';
44

55
export async function GET(context) {
66
const posts = await getPosts();

src/pages/tag/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Tag from '@/components/Tag.astro';
33
import BaseLayout from '@/layouts/BaseLayout.astro';
44
import { getPosts } from '@/utils';
55
6-
const tags: any = Array.from((await getPosts()).map(v => v.data.tags).flat(1)).filter(v => !!v).reduce((pre, cur: any) => {
6+
const tags: any = [...(await getPosts()).map(v => v.data.tags).flat(1)].filter(v => !!v).reduce((pre, cur: any) => {
77
pre[cur] = cur in pre ? pre[cur] + 1 : 1;
88
return pre;
99
}, {} as Record<string, number>);

src/shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export async function getFileHash(file: File) {
22
const arrayBuffer = await file.arrayBuffer();
33
const hashBuffer = await crypto.subtle.digest('SHA-256', arrayBuffer);
4-
return Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, '0')).join('');
4+
return Array.from(new Uint8Array(hashBuffer), b => b.toString(16).padStart(2, '0')).join('');
55
}
66

77
export function formatFileSize(bytes: number, decimals = 1) {

src/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import type { CollectionEntry } from 'astro:content';
22
import { parse } from 'node:path';
33
import { getCollection } from 'astro:content';
44

5+
const NAME_SEPARATOR_RE = /[_-]/;
6+
57
function formatName(name: string) {
6-
return name.split(/[_-]/).join(' ');
8+
return name.split(NAME_SEPARATOR_RE).join(' ');
79
}
810

911
export async function getPosts(filter?: (entry: CollectionEntry<'blog'>) => boolean) {

0 commit comments

Comments
 (0)