From 75d7eff63b684c7efdd59b2dccd69396b5fad80d Mon Sep 17 00:00:00 2001 From: gitlawr Date: Mon, 11 May 2026 19:28:24 +0800 Subject: [PATCH] chore: bump @gpustack/core-ui to ^1.0.10 1.0.10 ships the fix for the rolldown-emitted `require("react")` shim that broke 1.0.9 runtime (the dist bundle no longer calls the runtime require helper for react / react-dom). Pin the OSS host's package.json spec accordingly and regenerate the lockfile. Side fix in `pages/login/index.tsx`: 1.0.10's `CoreHooks` type makes `useCurrentUser` and `useTableFetch` required. The login page's CoreUIProvider never needed them (no current-user reads and no tables), so cast the hooks block to `any` rather than mounting stubs that would never run. --- package.json | 2 +- pnpm-lock.yaml | 12 +++++++----- src/pages/login/index.tsx | 17 ++++++++++++----- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 228038c2..fe394ad7 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@ant-design/icons": "^6.1.0", "@ant-design/pro-components": "3.1.0-0", "@braintree/sanitize-url": "^7.1.1", - "@gpustack/core-ui": "^1.0.7", + "@gpustack/core-ui": "^1.0.10", "@huggingface/gguf": "^0.1.7", "@huggingface/hub": "^0.15.1", "@huggingface/tasks": "^0.11.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 375d39c2..12208338 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: ^7.1.1 version: 7.1.2 '@gpustack/core-ui': - specifier: ^1.0.7 - version: 1.0.7(@ant-design/icons@6.2.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@monaco-editor/react@4.7.0(monaco-editor@0.30.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.28)(ahooks@3.9.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(antd-style@3.7.1(@types/react@18.3.28)(antd@6.3.7(date-fns@2.30.0)(moment@2.30.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(antd@6.3.7(date-fns@2.30.0)(moment@2.30.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(axios@1.16.0)(echarts@5.6.0)(file-saver@2.0.5)(monaco-editor@0.30.1)(monaco-yaml@4.0.4(monaco-editor@0.30.1))(overlayscrollbars-react@0.5.6(overlayscrollbars@2.15.1)(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.4.1(css-to-react-native@3.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + specifier: ^1.0.10 + version: 1.0.10(8d5af89fdc34b1455e91484207c332a1) '@huggingface/gguf': specifier: ^0.1.7 version: 0.1.18 @@ -1424,10 +1424,11 @@ packages: resolution: {integrity: sha512-KWk80UPIzPmUg+P0rKh6TqspRw0G6eux1PuJr+zz47ftMaZ9QDwbGzHZbtzWkl5hgayM/qrKRutllRC7D/vVXQ==, tarball: https://registry.npmjs.org/@formatjs/intl-utils/-/intl-utils-2.3.0.tgz} deprecated: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make any further changes to this package - '@gpustack/core-ui@1.0.7': - resolution: {integrity: sha512-832qJ6pKzyGVfNMbuDDsJTEAw7xTFFuBNDYn9bizMVxXZg/cL3BN6tyjjOZ+x2UoX8fXiku22bQf1WaR/wKrGg==, tarball: https://registry.npmjs.org/@gpustack/core-ui/-/core-ui-1.0.7.tgz} + '@gpustack/core-ui@1.0.10': + resolution: {integrity: sha512-gw1dlkb0NzcKy23aGa+4EPe9tHI0hgxoUf/ZJZkjvjQQjAZ+zxZFtLscHGvlTVxwc7GE5FOeGjOIGlbIxW+7EA==, tarball: https://registry.npmjs.org/@gpustack/core-ui/-/core-ui-1.0.10.tgz} peerDependencies: '@ant-design/icons': '>=6.0.0' + '@ant-design/pro-components': 3.1.0-0 '@monaco-editor/react': ^4.6.0 ahooks: '>=3.0.0' antd: '>=6.0.0' @@ -10359,9 +10360,10 @@ snapshots: '@formatjs/intl-utils@2.3.0': {} - '@gpustack/core-ui@1.0.7(@ant-design/icons@6.2.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@monaco-editor/react@4.7.0(monaco-editor@0.30.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.28)(ahooks@3.9.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(antd-style@3.7.1(@types/react@18.3.28)(antd@6.3.7(date-fns@2.30.0)(moment@2.30.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(antd@6.3.7(date-fns@2.30.0)(moment@2.30.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(axios@1.16.0)(echarts@5.6.0)(file-saver@2.0.5)(monaco-editor@0.30.1)(monaco-yaml@4.0.4(monaco-editor@0.30.1))(overlayscrollbars-react@0.5.6(overlayscrollbars@2.15.1)(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.4.1(css-to-react-native@3.2.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))': + '@gpustack/core-ui@1.0.10(8d5af89fdc34b1455e91484207c332a1)': dependencies: '@ant-design/icons': 6.2.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@ant-design/pro-components': 3.1.0-0(antd@6.3.7(date-fns@2.30.0)(moment@2.30.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@braintree/sanitize-url': 7.1.2 '@monaco-editor/react': 4.7.0(monaco-editor@0.30.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@orcid/bibtex-parse-js': 0.0.25 diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 25eb595f..dbd8fd07 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -209,11 +209,18 @@ const Login = () => { isDarkTheme: userSettings.isDarkTheme, defaultColorPrimary: COLOR_PRIMARY }} - hooks={{ - useUserSettings: useUserSettings as any, - useUserSettingsStorage: () => userSettingsStorage, - useIntl: useIntl - }} + hooks={ + { + useUserSettings: useUserSettings as any, + useUserSettingsStorage: () => userSettingsStorage, + useIntl: useIntl + // useCurrentUser / useTableFetch are required by the + // 1.0.10 CoreHooks type but the login page doesn't use + // either — nothing here lists data or reads the current + // user. Cast away rather than mounting stubs that would + // never run. + } as any + } i18n={intl} locale={{ getAllLocales: getAllLocales,