Skip to content

Commit 5986004

Browse files
build: bump deps (#3768)
* build: bump deps * build: update ncu config --------- Co-authored-by: Austin Lee <i@imnerd.org>
1 parent 58a2041 commit 5986004

15 files changed

Lines changed: 2280 additions & 4338 deletions

File tree

.ncurc.js

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
export default {
2-
cooldown: 1,
2+
cooldown: (pkg) => {
3+
if (
4+
['@oxlint/', '@oxfmt', '@oxlint-tsgolint/', '@vercel', '@vitest/', '@vue/'].some((item) =>
5+
pkg.startsWith(item),
6+
) ||
7+
[
8+
'oxc-config-hope',
9+
'oxfmt',
10+
'oxlint',
11+
'oxlint-tsgolint',
12+
'tsdown',
13+
'vercel',
14+
'vitest',
15+
'vue',
16+
].includes(pkg)
17+
) {
18+
return false;
19+
}
20+
21+
return 1;
22+
},
323
workspaces: true,
424
peer: true,
525
upgrade: true,
@@ -10,14 +30,7 @@ export default {
1030
return true;
1131
},
1232
target: (name) => {
13-
// FIXME: now we should be able to upgrade jsdom to v20
14-
// as our node engine supports require(esm) in cjs
15-
// jsdom v20+ are ESM only
16-
if (name === 'jsdom') return 'minor';
17-
18-
if (name.startsWith('@vuepress/') || name === 'vuepress') {
19-
return '@next';
20-
}
33+
if (name.startsWith('@vuepress/') || name === 'vuepress') return '@next';
2134

2235
if (name === '@types/node') return 'minor';
2336

docs/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"@fancyapps/ui": "6.1.14",
1212
"@mathjax/src": "4.1.3",
1313
"@vuepress/bundler-vite": "2.0.0-rc.30",
14-
"@vuepress/helper": "2.0.0-rc.130",
15-
"@vuepress/plugin-comment": "2.0.0-rc.130",
16-
"@vuepress/plugin-docsearch": "2.0.0-rc.130",
14+
"@vuepress/helper": "2.0.0-rc.131",
15+
"@vuepress/plugin-comment": "2.0.0-rc.131",
16+
"@vuepress/plugin-docsearch": "2.0.0-rc.132",
1717
"@waline/client": "workspace:*",
18-
"marked": "18.0.5",
18+
"marked": "18.0.6",
1919
"sass-embedded": "1.100.0",
2020
"vidstack": "1.15.6",
2121
"vue": "catalog:",

docs/src/.vuepress/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export default hopeTheme(
302302
docsearch: {
303303
appId: 'W34KABV4KM',
304304
apiKey: 'd189586c601d439f9247bdaf95b3555f',
305-
indexName: 'waline',
305+
indices: ['waline'],
306306
},
307307

308308
icon: {

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,25 @@
3232
"apidoc": "1.2.0",
3333
"cross-env": "10.1.0",
3434
"husky": "9.1.7",
35-
"markdownlint-cli2": "0.23.0",
35+
"markdownlint-cli2": "0.23.1",
3636
"nano-staged": "1.0.2",
37-
"oxc-config-hope": "0.3.9",
38-
"oxfmt": "0.58.0",
39-
"oxlint": "1.73.0",
40-
"oxlint-tsgolint": "0.24.0",
37+
"oxc-config-hope": "0.3.10",
38+
"oxfmt": "0.60.0",
39+
"oxlint": "1.75.0",
40+
"oxlint-tsgolint": "7.0.2001",
4141
"picocolors": "1.1.1",
42-
"postcss": "8.5.16",
42+
"postcss": "8.5.20",
4343
"publint": "0.3.21",
4444
"rimraf": "6.1.3",
4545
"sass-embedded": "1.100.0",
46-
"stylelint": "17.14.0",
46+
"stylelint": "17.14.1",
4747
"stylelint-config-hope": "11.0.0",
48-
"tsdown": "0.22.4",
48+
"tsdown": "0.22.13",
4949
"typescript": "catalog:",
5050
"unrun": "0.3.1",
51-
"vercel": "55.0.0",
51+
"vercel": "56.4.1",
5252
"vite": "catalog:",
53-
"vite-plugin-css-injected-by-js": "5.0.1",
53+
"vite-plugin-css-injected-by-js": "5.0.2",
5454
"vite-plugin-svgr": "5.2.0",
5555
"vitest": "4.1.10"
5656
},
@@ -62,7 +62,7 @@
6262
"devEngines": {
6363
"packageManager": {
6464
"name": "pnpm",
65-
"version": "11.11.0",
65+
"version": "11.15.1",
6666
"onFail": "download"
6767
},
6868
"runtime": {

packages/admin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
"@rematch/core": "2.2.0",
4444
"base-icon": "2.3.2",
4545
"classnames": "2.5.1",
46-
"i18next": "26.3.5",
46+
"i18next": "26.3.6",
4747
"i18next-browser-languagedetector": "8.2.1",
4848
"md5": "2.3.0",
4949
"qrcode.react": "4.2.0",
5050
"react": "19.2.7",
5151
"react-dom": "19.2.7",
52-
"react-i18next": "17.0.8",
52+
"react-i18next": "17.0.10",
5353
"react-redux": "9.3.0",
5454
"react-router": "8.2.0",
5555
"redux": "5.0.1"

packages/admin/src/App.jsx

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import React, { useEffect } from 'react';
2-
import { Provider, useSelector } from 'react-redux';
1+
import React from 'react';
2+
import { Provider } from 'react-redux';
33
import { Route, BrowserRouter as Router, Routes } from 'react-router';
44

5+
import Access from './components/Access.jsx';
56
import Forgot from './pages/forgot/index.jsx';
67
import Login from './pages/login/index.jsx';
78
import ManageComments from './pages/manage-comments/index.jsx';
@@ -11,31 +12,6 @@ import Register from './pages/register/index.jsx';
1112
import User from './pages/user/index.jsx';
1213
import { store } from './store/index.js';
1314

14-
const Access = (props) => {
15-
const user = useSelector((state) => state.user);
16-
17-
useEffect(() => {
18-
const meta = props.meta ?? {};
19-
const basename = props.basename ?? '';
20-
const emptyUser = !user?.objectId;
21-
const currentPath = location.pathname.replace(basename, '') || '/';
22-
const redirectPath = currentPath.startsWith('/') ? currentPath : `/${currentPath}`;
23-
24-
if (emptyUser) {
25-
location.href = `${basename}/ui/login?redirect=${redirectPath}`;
26-
return;
27-
}
28-
29-
const noPermission = meta.auth ? meta.auth !== user.type : false;
30-
31-
if (noPermission) {
32-
location.href = `${basename}/ui/profile`;
33-
}
34-
}, [user, props.meta, props.basename]);
35-
36-
return user ? props.children : null;
37-
};
38-
3915
export default function App() {
4016
const basePath = location.pathname.match(/(.*?)\/ui/u)?.[1] ?? '/';
4117

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React, { useEffect } from 'react';
2+
import { useSelector } from 'react-redux';
3+
4+
export default function Access(props) {
5+
const user = useSelector((state) => state.user);
6+
7+
useEffect(() => {
8+
const meta = props.meta ?? {};
9+
const basename = props.basename ?? '';
10+
const emptyUser = !user?.objectId;
11+
const currentPath = location.pathname.replace(basename, '') || '/';
12+
const redirectPath = currentPath.startsWith('/') ? currentPath : `/${currentPath}`;
13+
14+
if (emptyUser) {
15+
location.href = `${basename}/ui/login?redirect=${redirectPath}`;
16+
return;
17+
}
18+
19+
const noPermission = meta.auth ? meta.auth !== user.type : false;
20+
21+
if (noPermission) {
22+
location.href = `${basename}/ui/profile`;
23+
}
24+
}, [user, props.meta, props.basename]);
25+
26+
return user ? props.children : null;
27+
}

packages/client/__tests__/wordCount.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ describe('words test', () => {
66
it('should count empty content correctly', () => {
77
expect(getWordNumber('')).toBe(0);
88
});
9+
910
it('should count english words correctly', () => {
1011
expect(getWordNumber('A simple comment system with backend support fork from Valine')).toBe(10);
1112
});

packages/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@waline/api": "workspace:*",
7070
"@webc.site/math": "^0.1.32",
7171
"autosize": "^6.0.1",
72-
"marked": "^18.0.5",
72+
"marked": "^18.0.6",
7373
"marked-highlight": "^2.2.4",
7474
"recaptcha-v3": "^1.11.3",
7575
"vue": "catalog:"
@@ -79,7 +79,7 @@
7979
"@babel/preset-env": "8.0.2",
8080
"@giphy/js-types": "5.1.0",
8181
"@types/autosize": "4.0.3",
82-
"@vitejs/plugin-vue": "6.0.7"
82+
"@vitejs/plugin-vue": "6.0.8"
8383
},
8484
"browserslist": {
8585
"production": [

packages/client/src/typings/options.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ export interface WalineInitOptions extends Omit<
104104
texRenderer?: WalineTeXRenderer | boolean;
105105
}
106106

107-
// oxlint-disable-next-line typescript/explicit-module-boundary-types, typescript/no-explicit-any
107+
// oxlint-disable-next-line typescript/no-explicit-any
108108
export type WalineAbort = (reason?: any) => void;

0 commit comments

Comments
 (0)