Skip to content

Commit 9b9d559

Browse files
author
chenliangzihao
committed
Merge branch 'fix/deps'
2 parents 42f4d27 + 4912355 commit 9b9d559

File tree

3 files changed

+49
-82
lines changed

3 files changed

+49
-82
lines changed

migration/index.mjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import urlMap from './url-map.json' with { type: 'json' }
1+
import urlMap from './url-map.json' with { type: 'json' };
22

33
function normalizeUrl(url) {
4-
return url.startsWith('/') ? url : `/${url}`
4+
return url.startsWith('/') ? url : `/${url}`;
55
}
66

77
/**
88
* Returns the redirects for the site.
99
* @returns {Record<string, import('astro').RedirectConfig>}
1010
*/
1111
export function getRedirects() {
12-
const ret = {}
13-
Object.keys(urlMap).forEach(key => {
14-
const aliases = urlMap[key].map(normalizeUrl)
15-
aliases.forEach(alias => {
16-
ret[alias] = normalizeUrl(key)
17-
})
18-
})
19-
return ret
12+
const ret = {};
13+
Object.keys(urlMap).forEach((key) => {
14+
const aliases = urlMap[key].map(normalizeUrl);
15+
aliases.forEach((alias) => {
16+
ret[alias] = normalizeUrl(key);
17+
});
18+
});
19+
return ret;
2020
}

migration/url-map.json

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@
3535
"/do-u-need-memo-and-callback",
3636
"/blog/do-u-need-memo-and-callback"
3737
],
38-
"posts/edm": [
39-
"2023/03/20/Development/edm",
40-
"post/development/edm",
41-
"/edm",
42-
"/blog/edm"
43-
],
38+
"posts/edm": ["2023/03/20/Development/edm", "post/development/edm", "/edm", "/blog/edm"],
4439
"posts/front-end-without-toolchain": [
4540
"2024/03/30/Development/front-end-without-toolchain",
4641
"post/development/front-end-without-toolchain",
@@ -95,12 +90,7 @@
9590
"/mobile-web-dev",
9691
"/blog/mobile-web-dev"
9792
],
98-
"posts/monorepo": [
99-
"2023/05/26/Development/monorepo",
100-
"post/development/monorepo",
101-
"/monorepo",
102-
"/blog/monorepo"
103-
],
93+
"posts/monorepo": ["2023/05/26/Development/monorepo", "post/development/monorepo", "/monorepo", "/blog/monorepo"],
10494
"posts/npm-peer-dependency": [
10595
"2023/05/24/Development/npm-peer-dependency",
10696
"post/development/npm-peer-dependency",
@@ -119,18 +109,8 @@
119109
"/personal-review-fe-in-2023",
120110
"/blog/personal-review-fe-in-2023"
121111
],
122-
"posts/pnpm": [
123-
"2023/06/9/Development/pnpm",
124-
"post/development/pnpm",
125-
"/pnpm",
126-
"/blog/pnpm"
127-
],
128-
"posts/npm": [
129-
"2023/06/6/Development/npm",
130-
"post/development/npm",
131-
"/npm",
132-
"/blog/npm"
133-
],
112+
"posts/pnpm": ["2023/06/9/Development/pnpm", "post/development/pnpm", "/pnpm", "/blog/pnpm"],
113+
"posts/npm": ["2023/06/6/Development/npm", "post/development/npm", "/npm", "/blog/npm"],
134114
"posts/ref-callback": [
135115
"2023/09/4/Development/ref-callback",
136116
"post/development/ref-callback",
@@ -173,24 +153,14 @@
173153
"/评好逸恶劳大学生",
174154
"/blog/评好逸恶劳大学生"
175155
],
176-
"posts/20岁随笔": [
177-
"2021/12/2/Life/20岁随笔",
178-
"post/life/20岁随笔",
179-
"/20岁随笔",
180-
"/blog/20岁随笔"
181-
],
156+
"posts/20岁随笔": ["2021/12/2/Life/20岁随笔", "post/life/20岁随笔", "/20岁随笔", "/blog/20岁随笔"],
182157
"posts/permutation": [
183158
"2023/04/19/Research/permutation",
184159
"post/research/permutation",
185160
"/permutation",
186161
"/blog/permutation"
187162
],
188-
"posts/KeePass": [
189-
"2023/05/23/Technology/KeePass",
190-
"post/technology/keepass",
191-
"/KeePass",
192-
"/blog/KeePass"
193-
],
163+
"posts/KeePass": ["2023/05/23/Technology/KeePass", "post/technology/keepass", "/KeePass", "/blog/KeePass"],
194164
"posts/hands-on-csx": [
195165
"2023/04/11/Technology/hands-on-csx",
196166
"post/technology/hands-on-csx",
@@ -221,4 +191,4 @@
221191
"/win-dev-drive-hands-on",
222192
"/blog/win-dev-drive-hands-on"
223193
]
224-
}
194+
}

package.json

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,56 @@
2424
"@astrojs/sitemap": "^3.2.1",
2525
"@astrojs/svelte": "7.0.3",
2626
"@astrojs/tailwind": "^5.1.4",
27+
"@astrojs/ts-plugin": "^1.10.4",
28+
"@astrolib/analytics": "^0.6.1",
29+
"@biomejs/biome": "1.8.3",
2730
"@chlorinec-pkgs/notion-astro-loader": "*",
31+
"@commitlint/cli": "^19.8.0",
32+
"@commitlint/config-conventional": "^19.8.0",
33+
"@eslint/eslintrc": "^3.3.1",
34+
"@eslint/js": "^9.24.0",
2835
"@fontsource-variable/jetbrains-mono": "^5.1.1",
2936
"@fontsource/roboto": "^5.1.0",
3037
"@iconify-json/fa6-brands": "^1.2.3",
3138
"@iconify-json/fa6-regular": "^1.2.2",
3239
"@iconify-json/fa6-solid": "^1.2.2",
3340
"@iconify-json/material-symbols": "^1.2.8",
3441
"@iconify/svelte": "^4.0.2",
42+
"@playwright/test": "^1.51.1",
43+
"@rollup/plugin-yaml": "^4.1.2",
44+
"@shikijs/rehype": "^3.2.2",
3545
"@swup/astro": "^1.5.0",
3646
"@tailwindcss/typography": "^0.5.15",
47+
"@types/markdown-it": "^14.1.2",
48+
"@types/mdast": "^4.0.4",
49+
"@types/node": "^22.14.1",
50+
"@types/sanitize-html": "^2.13.0",
3751
"astro": "5.1.6",
3852
"astro-compress": "^2.3.5",
3953
"astro-icon": "^1.1.4",
54+
"eslint": "^9.24.0",
55+
"eslint-config-prettier": "^10.1.2",
56+
"eslint-import-resolver-typescript": "^4.3.2",
57+
"eslint-plugin-astro": "^1.3.1",
58+
"eslint-plugin-import": "^2.31.0",
59+
"eslint-plugin-prettier": "^5.2.6",
60+
"eslint-plugin-react": "^7.37.5",
61+
"eslint-plugin-react-hooks": "^5.2.0",
62+
"eslint-plugin-svelte": "^3.5.1",
63+
"globals": "^16.0.0",
4064
"hastscript": "^9.0.0",
65+
"husky": "^9.1.7",
4166
"katex": "^0.16.19",
67+
"lint-staged": "^15.5.1",
4268
"markdown-it": "^14.1.0",
4369
"mdast-util-to-string": "^4.0.0",
4470
"overlayscrollbars": "^2.10.1",
4571
"pagefind": "^1.2.0",
4672
"photoswipe": "^5.4.4",
73+
"postcss-import": "^16.1.0",
74+
"postcss-nesting": "^13.0.1",
75+
"prettier-plugin-astro": "^0.14.1",
76+
"prettier-plugin-tailwindcss": "^0.6.11",
4777
"reading-time": "^1.5.0",
4878
"rehype-autolink-headings": "^7.1.0",
4979
"rehype-components": "^0.3.0",
@@ -60,42 +90,9 @@
6090
"svelte": "^5.5.3",
6191
"tailwindcss": "^3.4.16",
6292
"typescript": "^5.7.2",
63-
"unist-util-visit": "^5.0.0",
64-
"unpic": "^3.22.0"
65-
},
66-
"devDependencies": {
67-
"@astrojs/ts-plugin": "^1.10.4",
68-
"@astrolib/analytics": "^0.6.1",
69-
"@biomejs/biome": "1.8.3",
70-
"@commitlint/cli": "^19.8.0",
71-
"@commitlint/config-conventional": "^19.8.0",
72-
"@eslint/eslintrc": "^3.3.1",
73-
"@eslint/js": "^9.24.0",
74-
"@playwright/test": "^1.51.1",
75-
"@rollup/plugin-yaml": "^4.1.2",
76-
"@shikijs/rehype": "^3.2.2",
77-
"@types/markdown-it": "^14.1.2",
78-
"@types/mdast": "^4.0.4",
79-
"@types/node": "^22.14.1",
80-
"@types/sanitize-html": "^2.13.0",
81-
"eslint": "^9.24.0",
82-
"eslint-config-prettier": "^10.1.2",
83-
"eslint-import-resolver-typescript": "^4.3.2",
84-
"eslint-plugin-astro": "^1.3.1",
85-
"eslint-plugin-import": "^2.31.0",
86-
"eslint-plugin-prettier": "^5.2.6",
87-
"eslint-plugin-react": "^7.37.5",
88-
"eslint-plugin-react-hooks": "^5.2.0",
89-
"eslint-plugin-svelte": "^3.5.1",
90-
"globals": "^16.0.0",
91-
"husky": "^9.1.7",
92-
"lint-staged": "^15.5.1",
93-
"postcss-import": "^16.1.0",
94-
"postcss-nesting": "^13.0.1",
95-
"prettier-plugin-astro": "^0.14.1",
96-
"prettier-plugin-tailwindcss": "^0.6.11",
97-
"typescript": "5.7.3",
9893
"typescript-eslint": "^8.30.1",
94+
"unist-util-visit": "^5.0.0",
95+
"unpic": "^3.22.0",
9996
"wrangler": "*"
10097
},
10198
"packageManager": "pnpm@9.15.2+sha512.93e57b0126f0df74ce6bff29680394c0ba54ec47246b9cf321f0121d8d9bb03f750a705f24edc3c1180853afd7c2c3b94196d0a3d53d3e069d9e2793ef11f321"

0 commit comments

Comments
 (0)