Skip to content

Commit 708fb5e

Browse files
committed
Merge branch 'main' into mockm
2 parents e911c89 + d3ed675 commit 708fb5e

File tree

63 files changed

+462
-486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+462
-486
lines changed

.github/CODEOWNERS

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# default onwer
2-
2+
33

44
# vben core onwer
5-
/packages/@core/ [email protected]
6-
7-
5+
6+
7+
8+
9+
10+
11+
12+
# vben team onwer
13+
14+

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ body:
1414
label: Version
1515
description: What version of our software are you running?
1616
options:
17-
- Vben Admin Pro
18-
- Vben Admin
17+
- Vben Admin V5
18+
- Vben Admin V2
1919
default: 0
2020
validations:
2121
required: true

.github/workflows/action-build.yml renamed to .github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Dependabot post-update
1+
# name: Dependabot post-update
2+
name: Build detection
23
on:
34
pull_request_target:
45
types: [opened, synchronize, reopened]
@@ -14,7 +15,7 @@ concurrency:
1415

1516
jobs:
1617
post-update:
17-
if: ${{ github.actor == 'dependabot[bot]' }}
18+
# if: ${{ github.actor == 'dependabot[bot]' }}
1819
runs-on: ubuntu-latest
1920
strategy:
2021
matrix:
@@ -45,5 +46,4 @@ jobs:
4546

4647
- name: Test and Build
4748
run: |
48-
pnpm run test:unit
4949
pnpm run build

.github/workflows/deploy.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ jobs:
2424
shell: bash
2525
run: |
2626
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-antd/.env.production
27+
sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-antd/.env.production
2728
cat ./apps/web-antd/.env.production
29+
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-ele/.env.production
30+
sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-ele/.env.production
31+
cat ./apps/web-ele/.env.production
32+
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-naive/.env.production
33+
sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-naive/.env.production
34+
cat ./apps/web-naive/.env.production
2835
2936
- name: Install pnpm
3037
uses: pnpm/action-setup@v4

.lintstagedrc.mjs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1-
export { default } from '@vben/lint-staged-config';
1+
export default {
2+
'*.{js,jsx,ts,tsx}': [
3+
'prettier --cache --ignore-unknown --write',
4+
'eslint --cache --fix',
5+
],
6+
'*.{scss,less,styl,html,vue,css}': [
7+
'prettier --cache --ignore-unknown --write',
8+
'stylelint --fix --allow-empty-input',
9+
],
10+
'*.md': ['prettier --cache --ignore-unknown --write'],
11+
'*.vue': [
12+
'prettier --write',
13+
'eslint --cache --fix',
14+
'stylelint --fix --allow-empty-input',
15+
],
16+
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [
17+
'prettier --cache --write--parser json',
18+
],
19+
'package.json': ['prettier --cache --write'],
20+
};

.npmrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ public-hoist-pattern[]=husky
33
public-hoist-pattern[]=eslint
44
public-hoist-pattern[]=prettier
55
public-hoist-pattern[]=prettier-plugin-tailwindcss
6-
public-hoist-pattern[]=lint-staged
76
public-hoist-pattern[]=stylelint
87
public-hoist-pattern[]=*postcss*
98
public-hoist-pattern[]=@commitlint/*

.vscode/settings.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@
139139
"typescript.preferences.preferTypeOnlyAutoImports": true,
140140
"typescript.preferences.includePackageJsonAutoImports": "on",
141141

142-
// Enable the ESlint flat config support
143-
"eslint.experimental.useFlatConfig": true,
144142
"eslint.validate": [
145143
"javascript",
146144
"typescript",

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN echo "Builder Success 🎉"
2121
FROM nginx:stable-alpine as production
2222

2323
RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf
24-
COPY --from=builder /app/apps/antd-view/dist /usr/share/nginx/html
24+
COPY --from=builder /app/apps/web-antd/dist /usr/share/nginx/html
2525

2626
COPY ./deploy/nginx.conf /etc/nginx/nginx.conf
2727

apps/web-ele/src/views/demos/element/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function warning() {
2525
}
2626
function success() {
2727
ElMessage.success(
28-
"'Cause you walked hand in hand With another man in my place",
28+
'Cause you walked hand in hand With another man in my place',
2929
);
3030
}
3131

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"nocheck",
4141
"prefixs",
4242
"vitepress",
43+
"antdv",
4344
"ependencies",
4445
"vite",
4546
"echarts",

docs/src/guide/essentials/styles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const { b, e, is } = useNamespace('menu');
7272
</template>
7373
<style lang="scss" scoped>
7474
// 如果你在应用内使用,这行代码可以省略,已经在所有的应用内全局引入了
75-
@import (reference) '@vben/styles/global';
75+
@import '@vben/styles/global';
7676
@include b('menu') {
7777
color: black;
7878

docs/src/guide/in-depth/ui-framework.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
6. 自行适配组件库的主题,与 `Vben Admin` 契合。
1515
7. 调整 `.env` 内的应用名
1616
8. 在大仓根目录增加 `dev:xxx` 脚本
17+
9. 执行 `pnpm install` 安装依赖

docs/src/index.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,40 @@ features:
2525
- icon: 🚀
2626
title: 最新技术栈
2727
details: 基于 Vue3、Pinia、Vue Router、TypeScript、等最新技术栈。
28+
link: /guide/introduction/quick-start
29+
linkText: 快速开始
2830
- icon: 🦄
2931
title: 丰富的配置
3032
details: 企业级中后台前端解决方案,提供丰富的组件和模板以及 N 种偏好设置组合方案。
31-
# link: /
32-
# linkText: x
33+
link: /guide/essentials/settings
34+
linkText: 配置文档
3335
- icon: 🎨
3436
title: 主题定制
3537
details: 通过简单的配置,即可实现各种主题切换,满足个性化需求。
38+
link: /guide/in-depth/theme
39+
linkText: 主题文档
3640
- icon: 🌐
3741
title: 国际化
3842
details: 内置国际化方案,支持多语言切换,满足国际化需求。
43+
link: /guide/in-depth/locale
44+
linkText: 国际化文档
3945
- icon: 🔐
4046
title: 权限管理
4147
details: 内置权限管理方案,支持多种权限控制方式,满足各种权限需求。
48+
link: /guide/in-depth/access
49+
linkText: 权限文档
4250
- title: Vite
4351
icon:
4452
src: /logos/vite.svg
4553
details: 现代化的前端构建工具,快速冷启动,瞬间热更新。
54+
link: https://vitejs.dev/
55+
linkText: 官方站点
4656
- title: Shadcn UI
4757
icon:
4858
src: /logos/shadcn-ui.svg
4959
details: 核心基于 Shadcn UI + Tailwindcss,业务可支持任意的 UI 框架。
60+
link: https://www.shadcn-vue.com/
61+
linkText: 官方站点
5062
- title: Turbo Repo
5163
icon:
5264
src: /logos/turborepo.svg
@@ -55,6 +67,8 @@ features:
5567
icon:
5668
src: /logos/nitro.svg
5769
details: 内置 Mockm Mock 服务,让你的 mock 服务更加强大。
70+
link: https://github.com/wll8/mockm
71+
linkText: 官方站点
5872
---
5973

6074
<!-- <script setup>

internal/lint-configs/commitlint-config/build.config.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

internal/lint-configs/commitlint-config/src/index.ts renamed to internal/lint-configs/commitlint-config/index.mjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type { UserConfig } from 'cz-git';
2-
31
import { execSync } from 'node:child_process';
42

53
import { getPackagesSync } from '@vben/node-utils';
@@ -27,7 +25,10 @@ const scopeComplete = execSync('git status --porcelain || true')
2725
?.match(/src%%((\w|-)*)/)?.[1]
2826
?.replace(/s$/, '');
2927

30-
const userConfig: UserConfig = {
28+
/**
29+
* @type {import('cz-git').UserConfig}
30+
*/
31+
const userConfig = {
3132
extends: ['@commitlint/config-conventional'],
3233
plugins: ['commitlint-plugin-function-rules'],
3334
prompt: {
@@ -106,7 +107,7 @@ const userConfig: UserConfig = {
106107
'function-rules/scope-enum': [
107108
2, // level: error
108109
'always',
109-
(parsed: { scope: string }) => {
110+
(parsed) => {
110111
if (!parsed.scope || allowedScopes.includes(parsed.scope)) {
111112
return [true];
112113
}

internal/lint-configs/commitlint-config/package.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,15 @@
1111
},
1212
"license": "MIT",
1313
"type": "module",
14-
"scripts": {
15-
"stub": "pnpm unbuild --stub"
16-
},
1714
"files": [
1815
"dist"
1916
],
20-
"main": "./dist/index.mjs",
21-
"module": "./dist/index.mjs",
22-
"types": "./dist/index.d.ts",
17+
"main": "./index.mjs",
18+
"module": "./index.mjs",
2319
"exports": {
2420
".": {
25-
"types": "./dist/index.d.ts",
26-
"import": "./dist/index.mjs",
27-
"default": "./dist/index.mjs"
21+
"import": "./index.mjs",
22+
"default": "./index.mjs"
2823
}
2924
},
3025
"dependencies": {

internal/lint-configs/commitlint-config/tsconfig.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

internal/lint-configs/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"eslint-plugin-jsonc": "^2.16.0",
4444
"eslint-plugin-n": "^17.10.1",
4545
"eslint-plugin-no-only-tests": "^3.1.0",
46-
"eslint-plugin-perfectionist": "^3.0.0",
46+
"eslint-plugin-perfectionist": "^3.1.0",
4747
"eslint-plugin-prettier": "^5.2.1",
4848
"eslint-plugin-regexp": "^2.6.0",
4949
"eslint-plugin-unicorn": "^55.0.0",

internal/lint-configs/eslint-config/src/configs/comments.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import type { Linter } from 'eslint';
22

3-
export async function comments(): Promise<Linter.FlatConfig[]> {
3+
import { interopDefault } from '../util';
4+
5+
export async function comments(): Promise<Linter.Config[]> {
46
const [pluginComments] = await Promise.all([
57
// @ts-expect-error - no types
6-
import('eslint-plugin-eslint-comments'),
8+
interopDefault(import('eslint-plugin-eslint-comments')),
79
] as const);
810

911
return [

internal/lint-configs/eslint-config/src/configs/disableds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Linter } from 'eslint';
22

3-
export async function disableds(): Promise<Linter.FlatConfig[]> {
3+
export async function disableds(): Promise<Linter.Config[]> {
44
return [
55
{
66
files: ['**/__tests__/**/*.?([cm])[jt]s?(x)'],

internal/lint-configs/eslint-config/src/configs/ignores.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Linter } from 'eslint';
22

3-
export async function ignores(): Promise<Linter.FlatConfig[]> {
3+
export async function ignores(): Promise<Linter.Config[]> {
44
return [
55
{
66
ignores: [

internal/lint-configs/eslint-config/src/configs/javascript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import js from '@eslint/js';
66
import pluginUnusedImports from 'eslint-plugin-unused-imports';
77
import globals from 'globals';
88

9-
export async function javascript(): Promise<Linter.FlatConfig[]> {
9+
export async function javascript(): Promise<Linter.Config[]> {
1010
return [
1111
{
1212
languageOptions: {

internal/lint-configs/eslint-config/src/configs/jsdoc.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import type { Linter } from 'eslint';
22

3-
export async function jsdoc(): Promise<Linter.FlatConfig[]> {
3+
import { interopDefault } from '../util';
4+
5+
export async function jsdoc(): Promise<Linter.Config[]> {
46
const [pluginJsdoc] = await Promise.all([
5-
import('eslint-plugin-jsdoc'),
7+
interopDefault(import('eslint-plugin-jsdoc')),
68
] as const);
79

810
return [
911
{
1012
plugins: {
11-
// @ts-expect-error - no types
1213
jsdoc: pluginJsdoc,
1314
},
1415
rules: {

internal/lint-configs/eslint-config/src/configs/jsonc.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import type { Linter } from 'eslint';
22

3-
export async function jsonc(): Promise<Linter.FlatConfig[]> {
3+
import { interopDefault } from '../util';
4+
5+
export async function jsonc(): Promise<Linter.Config[]> {
46
const [pluginJsonc, parserJsonc] = await Promise.all([
5-
import('eslint-plugin-jsonc'),
6-
import('jsonc-eslint-parser'),
7+
interopDefault(import('eslint-plugin-jsonc')),
8+
interopDefault(import('jsonc-eslint-parser')),
79
] as const);
810

911
return [

internal/lint-configs/eslint-config/src/configs/node.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import type { Linter } from 'eslint';
22

3-
export async function node(): Promise<Linter.FlatConfig[]> {
4-
const [pluginNode] = await Promise.all([import('eslint-plugin-n')] as const);
3+
import { interopDefault } from '../util';
4+
5+
export async function node(): Promise<Linter.Config[]> {
6+
const pluginNode = await interopDefault(import('eslint-plugin-n'));
57

68
return [
79
{

internal/lint-configs/eslint-config/src/configs/perfectionist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Linter } from 'eslint';
22

33
import perfectionistPlugin from 'eslint-plugin-perfectionist';
44

5-
export async function perfectionist(): Promise<Linter.FlatConfig[]> {
5+
export async function perfectionist(): Promise<Linter.Config[]> {
66
return [
77
perfectionistPlugin.configs['recommended-natural'],
88
{

internal/lint-configs/eslint-config/src/configs/prettier.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import type { Linter } from 'eslint';
22

3-
export async function prettier(): Promise<Linter.FlatConfig[]> {
3+
import { interopDefault } from '../util';
4+
5+
export async function prettier(): Promise<Linter.Config[]> {
46
const [pluginPrettier] = await Promise.all([
5-
import('eslint-plugin-prettier'),
7+
interopDefault(import('eslint-plugin-prettier')),
68
] as const);
79
return [
810
{

internal/lint-configs/eslint-config/src/configs/regexp.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import type { Linter } from 'eslint';
22

3-
export async function regexp(): Promise<Linter.FlatConfig[]> {
3+
import { interopDefault } from '../util';
4+
5+
export async function regexp(): Promise<Linter.Config[]> {
46
const [pluginRegexp] = await Promise.all([
5-
import('eslint-plugin-regexp'),
7+
interopDefault(import('eslint-plugin-regexp')),
68
] as const);
79

810
return [

0 commit comments

Comments
 (0)