chore: pnpm v11 (#7942)

* chore: remove rolldown dep

* fix: issues-helper and maintain-one-comment are temporarily disabled due to security issues

* chore: update deps

* fix: change error type to TypeError for non-browser environment check in LocalStorageDriver

* chore: update pnpm v11
pull/348/MERGE
xingyu 2026-05-22 12:02:14 +08:00 committed by GitHub
parent c066889c37
commit f2b3b12553
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 508 additions and 691 deletions

View File

@ -18,7 +18,7 @@ jobs:
steps: steps:
- name: remove enhancement pending - name: remove enhancement pending
if: github.event.label.name == 'enhancement' if: github.event.label.name == 'enhancement'
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
with: with:
actions: 'remove-labels' actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
@ -27,7 +27,7 @@ jobs:
- name: remove bug pending - name: remove bug pending
if: github.event.label.name == 'bug' if: github.event.label.name == 'bug'
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
with: with:
actions: 'remove-labels' actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
@ -36,7 +36,7 @@ jobs:
- name: needs reproduction - name: needs reproduction
if: github.event.label.name == 'needs reproduction' if: github.event.label.name == 'needs reproduction'
uses: actions-cool/issues-helper@v3 uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
with: with:
actions: 'create-comment, remove-labels' actions: 'create-comment, remove-labels'
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored
View File

@ -23,6 +23,7 @@ package-lock.json
.VSCodeCounter .VSCodeCounter
**/backend-mock/data **/backend-mock/data
.omx .omx
.pnpm-store
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local

View File

@ -10,7 +10,7 @@ outline: deep
Before starting the project, ensure that your environment meets the following requirements: Before starting the project, ensure that your environment meets the following requirements:
- [Node.js](https://nodejs.org/en) version 20.15.0 or above. It is recommended to use [fnm](https://github.com/Schniz/fnm), [nvm](https://github.com/nvm-sh/nvm), or directly use [pnpm](https://pnpm.io/cli/env) for version management. - [Node.js](https://nodejs.org/en) version 22.18.0 or above. It is recommended to use [fnm](https://github.com/Schniz/fnm), [nvm](https://github.com/nvm-sh/nvm), or directly use [pnpm](https://pnpm.io/cli/env) for version management.
- [Git](https://git-scm.com/) any version. - [Git](https://git-scm.com/) any version.
To verify if your environment meets the above requirements, you can check the versions using the following commands: To verify if your environment meets the above requirements, you can check the versions using the following commands:

View File

@ -10,7 +10,7 @@ outline: deep
在启动项目前,你需要确保你的环境满足以下要求: 在启动项目前,你需要确保你的环境满足以下要求:
- [Node.js](https://nodejs.org/en) 20.15.0 及以上版本,推荐使用 [fnm](https://github.com/Schniz/fnm) 、 [nvm](https://github.com/nvm-sh/nvm) 或者直接使用[pnpm](https://pnpm.io/cli/env) 进行版本管理。 - [Node.js](https://nodejs.org/en) 22.18.0 及以上版本,推荐使用 [fnm](https://github.com/Schniz/fnm) 、 [nvm](https://github.com/nvm-sh/nvm) 或者直接使用[pnpm](https://pnpm.io/cli/env) 进行版本管理。
- [Git](https://git-scm.com/) 任意版本。 - [Git](https://git-scm.com/) 任意版本。
验证你的环境是否满足以上要求,你可以通过以下命令查看版本: 验证你的环境是否满足以上要求,你可以通过以下命令查看版本:

View File

@ -56,6 +56,11 @@ export async function yaml(): Promise<Linter.Config[]> {
{ {
order: [ order: [
'packages', 'packages',
'publicHoistPattern',
'strictPeerDependencies',
'autoInstallPeers',
'dedupePeerDependents',
'verifyDepsBeforeRun',
'overrides', 'overrides',
'patchedDependencies', 'patchedDependencies',
'hoistPattern', 'hoistPattern',
@ -63,6 +68,7 @@ export async function yaml(): Promise<Linter.Config[]> {
'catalogs', 'catalogs',
'allowedDeprecatedVersions', 'allowedDeprecatedVersions',
'allowBuilds',
'allowNonAppliedPatches', 'allowNonAppliedPatches',
'configDependencies', 'configDependencies',
'ignoredBuiltDependencies', 'ignoredBuiltDependencies',
@ -78,7 +84,7 @@ export async function yaml(): Promise<Linter.Config[]> {
}, },
{ {
order: { type: 'asc' }, order: { type: 'asc' },
pathPattern: '.*', pathPattern: '^.+$',
}, },
], ],
}, },

View File

@ -48,7 +48,6 @@
"@vitejs/plugin-vue-jsx": "catalog:", "@vitejs/plugin-vue-jsx": "catalog:",
"dayjs": "catalog:", "dayjs": "catalog:",
"dotenv": "catalog:", "dotenv": "catalog:",
"rolldown": "catalog:",
"rollup-plugin-visualizer": "catalog:", "rollup-plugin-visualizer": "catalog:",
"sass": "catalog:", "sass": "catalog:",
"sass-embedded": "catalog:", "sass-embedded": "catalog:",

View File

@ -1,8 +1,3 @@
import type {
NormalizedOutputOptions,
OutputBundle,
OutputChunk,
} from 'rolldown';
import type { PluginOption } from 'vite'; import type { PluginOption } from 'vite';
import { EOL } from 'node:os'; import { EOL } from 'node:os';
@ -13,7 +8,6 @@ import { dateUtil, readPackageJSON } from '@vben/node-utils';
* *
* @returns * @returns
*/ */
async function viteLicensePlugin( async function viteLicensePlugin(
root = process.cwd(), root = process.cwd(),
): Promise<PluginOption | undefined> { ): Promise<PluginOption | undefined> {
@ -27,7 +21,7 @@ async function viteLicensePlugin(
apply: 'build', apply: 'build',
enforce: 'post', enforce: 'post',
generateBundle: { generateBundle: {
handler: (_options: NormalizedOutputOptions, bundle: OutputBundle) => { handler(_options, bundle) {
const date = dateUtil().format('YYYY-MM-DD '); const date = dateUtil().format('YYYY-MM-DD ');
const copyrightText = `/*! const copyrightText = `/*!
* Vben Admin * Vben Admin
@ -44,13 +38,11 @@ async function viteLicensePlugin(
for (const [, fileContent] of Object.entries(bundle)) { for (const [, fileContent] of Object.entries(bundle)) {
if (fileContent.type === 'chunk' && fileContent.isEntry) { if (fileContent.type === 'chunk' && fileContent.isEntry) {
const chunkContent = fileContent as OutputChunk;
// 插入版权信息 // 插入版权信息
const content = chunkContent.code; const content = fileContent.code;
const updatedContent = `${copyrightText}${EOL}${content}`; const updatedContent = `${copyrightText}${EOL}${content}`;
// 更新bundle // 更新bundle
(fileContent as OutputChunk).code = updatedContent; fileContent.code = updatedContent;
} }
} }
}, },

View File

@ -53,17 +53,17 @@
"dev:play": "pnpm -F @vben/playground run dev", "dev:play": "pnpm -F @vben/playground run dev",
"format": "vsh lint --format", "format": "vsh lint --format",
"lint": "vsh lint", "lint": "vsh lint",
"postinstall": "pnpm -r run stub --if-present", "postinstall": "pnpm -r run --if-present stub",
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"prepare": "is-ci || pnpm exec lefthook install", "prepare": "is-ci || pnpm exec lefthook install",
"preview": "turbo-run preview", "preview": "turbo-run preview",
"publint": "vsh publint", "publint": "vsh publint",
"reinstall": "pnpm clean --del-lock && pnpm install", "reinstall": "pnpm run clean -- --del-lock && pnpm install",
"test:unit": "vitest run --dom", "test:unit": "vitest run --dom",
"test:e2e": "turbo run test:e2e", "test:e2e": "turbo run test:e2e",
"update:deps": "npx taze -r -w", "update:deps": "npx taze -r -w",
"version": "pnpm exec changeset version && pnpm install --no-frozen-lockfile", "version": "pnpm exec changeset version && pnpm install --no-frozen-lockfile",
"catalog": "pnpx codemod pnpm/catalog" "catalog": "pnpm dlx codemod pnpm/catalog"
}, },
"devDependencies": { "devDependencies": {
"@changesets/changelog-github": "catalog:", "@changesets/changelog-github": "catalog:",
@ -84,6 +84,7 @@
"@vitejs/plugin-vue-jsx": "catalog:", "@vitejs/plugin-vue-jsx": "catalog:",
"cross-env": "catalog:", "cross-env": "catalog:",
"cspell": "catalog:", "cspell": "catalog:",
"eslint": "catalog:",
"happy-dom": "catalog:", "happy-dom": "catalog:",
"is-ci": "catalog:", "is-ci": "catalog:",
"lefthook": "catalog:", "lefthook": "catalog:",
@ -103,7 +104,7 @@
}, },
"engines": { "engines": {
"node": "^22.18.0 || ^24.0.0", "node": "^22.18.0 || ^24.0.0",
"pnpm": ">=10.0.0" "pnpm": ">=11.0.0"
}, },
"packageManager": "pnpm@10.33.4" "packageManager": "pnpm@11.2.2"
} }

View File

@ -18,8 +18,7 @@ class LocalStorageDriver implements IStorageDriver {
storageType = 'localStorage', storageType = 'localStorage',
}: LocalStorageDriverOptions = {}) { }: LocalStorageDriverOptions = {}) {
if (typeof window === 'undefined') { if (typeof window === 'undefined') {
// eslint-disable-next-line unicorn/prefer-type-error -- not a type check, it's an environment check throw new TypeError(
throw new Error(
'LocalStorageDriver is not available in non-browser environments. Use MemoryStorageDriver instead.', 'LocalStorageDriver is not available in non-browser environments. Use MemoryStorageDriver instead.',
); );
} }

View File

@ -14,11 +14,17 @@ function clearPreferencesAndLogout() {
} }
const preferencesRef = ref<InstanceType<typeof Preferences> | null>(null); const preferencesRef = ref<InstanceType<typeof Preferences> | null>(null);
</script> </script>
<template> <template>
<Preferences ref="preferencesRef" @clear-preferences-and-logout="clearPreferencesAndLogout"> <Preferences
<VbenIconButton class="hover:animate-[shrink_0.3s_ease-in-out]" @click="preferencesRef?.open();"> ref="preferencesRef"
@clear-preferences-and-logout="clearPreferencesAndLogout"
>
<VbenIconButton
class="hover:animate-[shrink_0.3s_ease-in-out]"
@click="preferencesRef?.open()"
>
<Settings class="size-4 text-foreground" /> <Settings class="size-4 text-foreground" />
</VbenIconButton> </VbenIconButton>
</Preferences> </Preferences>

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@ strictPeerDependencies: false
autoInstallPeers: true autoInstallPeers: true
dedupePeerDependents: true dedupePeerDependents: true
verifyDepsBeforeRun: false verifyDepsBeforeRun: false
minimumReleaseAge: 0
overrides: overrides:
'@ast-grep/napi': 'catalog:' '@ast-grep/napi': 'catalog:'
@ -57,23 +58,23 @@ catalog:
'@nolebase/vitepress-plugin-git-changelog': ^2.18.2 '@nolebase/vitepress-plugin-git-changelog': ^2.18.2
'@playwright/test': ^1.60.0 '@playwright/test': ^1.60.0
'@pnpm/workspace.read-manifest': ^1000.3.1 '@pnpm/workspace.read-manifest': ^1000.3.1
'@stylistic/stylelint-plugin': ^5.1.0 '@stylistic/stylelint-plugin': ^5.2.0
'@tailwindcss/typography': ^0.5.19 '@tailwindcss/typography': ^0.5.19
'@tailwindcss/vite': ^4.3.0 '@tailwindcss/vite': ^4.3.0
'@tanstack/vue-query': ^5.100.11 '@tanstack/vue-query': ^5.100.11
'@tanstack/vue-store': ^0.11.0 '@tanstack/vue-store': ^0.11.0
'@tiptap/core': ^3.23.5 '@tiptap/core': ^3.23.6
'@tiptap/extension-document': ^3.23.5 '@tiptap/extension-document': ^3.23.6
'@tiptap/extension-highlight': ^3.23.5 '@tiptap/extension-highlight': ^3.23.6
'@tiptap/extension-image': ^3.23.5 '@tiptap/extension-image': ^3.23.6
'@tiptap/extension-link': ^3.23.5 '@tiptap/extension-link': ^3.23.6
'@tiptap/extension-placeholder': ^3.23.5 '@tiptap/extension-placeholder': ^3.23.6
'@tiptap/extension-text-align': ^3.23.5 '@tiptap/extension-text-align': ^3.23.6
'@tiptap/extension-text-style': ^3.23.5 '@tiptap/extension-text-style': ^3.23.6
'@tiptap/extension-underline': ^3.23.5 '@tiptap/extension-underline': ^3.23.6
'@tiptap/pm': ^3.23.5 '@tiptap/pm': ^3.23.6
'@tiptap/starter-kit': ^3.23.5 '@tiptap/starter-kit': ^3.23.6
'@tiptap/vue-3': ^3.23.5 '@tiptap/vue-3': ^3.23.6
'@tsdown/css': ^0.22.0 '@tsdown/css': ^0.22.0
'@types/archiver': ^7.0.0 '@types/archiver': ^7.0.0
'@types/html-minifier-terser': ^7.0.2 '@types/html-minifier-terser': ^7.0.2
@ -97,7 +98,7 @@ catalog:
'@vueuse/integrations': ^14.3.0 '@vueuse/integrations': ^14.3.0
'@vueuse/motion': ^3.0.3 '@vueuse/motion': ^3.0.3
ant-design-vue: ^4.2.6 ant-design-vue: ^4.2.6
antdv-next: ^1.3.0 antdv-next: ^1.3.1
archiver: ^7.0.1 archiver: ^7.0.1
axios: ^1.16.1 axios: ^1.16.1
axios-mock-adapter: ^2.1.0 axios-mock-adapter: ^2.1.0
@ -165,13 +166,12 @@ catalog:
reka-ui: ^2.9.7 reka-ui: ^2.9.7
resolve.exports: ^2.0.3 resolve.exports: ^2.0.3
rimraf: ^6.1.3 rimraf: ^6.1.3
rolldown: ^1.0.1
rollup-plugin-visualizer: ^7.0.1 rollup-plugin-visualizer: ^7.0.1
sass: ^1.99.0 sass: ^1.99.0
sass-embedded: ^1.99.0 sass-embedded: ^1.100.0
secure-ls: ^2.0.0 secure-ls: ^2.0.0
sortablejs: ^1.15.7 sortablejs: ^1.15.7
stylelint: ^17.11.1 stylelint: ^17.12.0
stylelint-config-recess-order: ^7.7.0 stylelint-config-recess-order: ^7.7.0
stylelint-config-recommended: ^18.0.0 stylelint-config-recommended: ^18.0.0
stylelint-config-recommended-scss: ^17.0.1 stylelint-config-recommended-scss: ^17.0.1
@ -192,7 +192,7 @@ catalog:
unplugin-element-plus: ^0.11.2 unplugin-element-plus: ^0.11.2
unplugin-vue: ^7.2.0 unplugin-vue: ^7.2.0
vee-validate: ^4.15.1 vee-validate: ^4.15.1
vite: ^8.0.10 vite: ^8.0.14
vite-plugin-compression: ^0.5.1 vite-plugin-compression: ^0.5.1
vite-plugin-lazy-import: ^1.0.7 vite-plugin-lazy-import: ^1.0.7
vite-plugin-pwa: ^1.3.0 vite-plugin-pwa: ^1.3.0
@ -207,8 +207,8 @@ catalog:
vue-router: ^5.0.7 vue-router: ^5.0.7
vue-tippy: ^6.7.1 vue-tippy: ^6.7.1
vue-tsc: ^3.3.1 vue-tsc: ^3.3.1
vxe-pc-ui: ^4.14.16 vxe-pc-ui: ^4.14.17
vxe-table: ^4.18.13 vxe-table: ^4.19.0
watermark-js-plus: ^1.6.3 watermark-js-plus: ^1.6.3
yaml-eslint-parser: ^2.0.0 yaml-eslint-parser: ^2.0.0
zod: ^3.25.76 zod: ^3.25.76