fix: Upgrade unbuild to resolve console warning issues and also deal with post-upgrade compatibility issues (#4009)
parent
e544119aa3
commit
530159140c
|
@ -1,7 +1,13 @@
|
||||||
# default onwer
|
# default onwer
|
||||||
* anncwb@126.com
|
* anncwb vince292007
|
||||||
|
|
||||||
# vben core onwer
|
# vben core onwer
|
||||||
/packages/@core/ anncwb@126.com
|
/.github/ anncwb vince292007
|
||||||
/internal/ anncwb@126.com
|
/.vscode/ anncwb vince292007
|
||||||
/scripts/ anncwb@126.com
|
/packages/@core/ anncwb vince292007
|
||||||
|
/internal/ anncwb vince292007
|
||||||
|
/scripts/ anncwb vince292007
|
||||||
|
|
||||||
|
# vben team onwer
|
||||||
|
apps/ vbenjs/team-v5
|
||||||
|
docs/ vbenjs/team-v5
|
||||||
|
|
|
@ -14,8 +14,8 @@ body:
|
||||||
label: Version
|
label: Version
|
||||||
description: What version of our software are you running?
|
description: What version of our software are you running?
|
||||||
options:
|
options:
|
||||||
- Vben Admin Pro
|
- Vben Admin V5
|
||||||
- Vben Admin
|
- Vben Admin V2
|
||||||
default: 0
|
default: 0
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
|
@ -24,6 +24,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-antd/.env.production
|
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-antd/.env.production
|
||||||
|
sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-antd/.env.production
|
||||||
cat ./apps/web-antd/.env.production
|
cat ./apps/web-antd/.env.production
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
|
|
|
@ -1 +1,20 @@
|
||||||
export { default } from '@vben/lint-staged-config';
|
export default {
|
||||||
|
'*.{js,jsx,ts,tsx}': [
|
||||||
|
'prettier --cache --ignore-unknown --write',
|
||||||
|
'eslint --cache --fix',
|
||||||
|
],
|
||||||
|
'*.{scss,less,styl,html,vue,css}': [
|
||||||
|
'prettier --cache --ignore-unknown --write',
|
||||||
|
'stylelint --fix --allow-empty-input',
|
||||||
|
],
|
||||||
|
'*.md': ['prettier --cache --ignore-unknown --write'],
|
||||||
|
'*.vue': [
|
||||||
|
'prettier --write',
|
||||||
|
'eslint --cache --fix',
|
||||||
|
'stylelint --fix --allow-empty-input',
|
||||||
|
],
|
||||||
|
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [
|
||||||
|
'prettier --cache --write--parser json',
|
||||||
|
],
|
||||||
|
'package.json': ['prettier --cache --write'],
|
||||||
|
};
|
||||||
|
|
1
.npmrc
1
.npmrc
|
@ -3,7 +3,6 @@ public-hoist-pattern[]=husky
|
||||||
public-hoist-pattern[]=eslint
|
public-hoist-pattern[]=eslint
|
||||||
public-hoist-pattern[]=prettier
|
public-hoist-pattern[]=prettier
|
||||||
public-hoist-pattern[]=prettier-plugin-tailwindcss
|
public-hoist-pattern[]=prettier-plugin-tailwindcss
|
||||||
public-hoist-pattern[]=lint-staged
|
|
||||||
public-hoist-pattern[]=stylelint
|
public-hoist-pattern[]=stylelint
|
||||||
public-hoist-pattern[]=*postcss*
|
public-hoist-pattern[]=*postcss*
|
||||||
public-hoist-pattern[]=@commitlint/*
|
public-hoist-pattern[]=@commitlint/*
|
||||||
|
|
|
@ -21,7 +21,7 @@ RUN echo "Builder Success 🎉"
|
||||||
FROM nginx:stable-alpine as production
|
FROM nginx:stable-alpine as production
|
||||||
|
|
||||||
RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf
|
RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf
|
||||||
COPY --from=builder /app/apps/antd-view/dist /usr/share/nginx/html
|
COPY --from=builder /app/apps/web-antd/dist /usr/share/nginx/html
|
||||||
|
|
||||||
COPY ./deploy/nginx.conf /etc/nginx/nginx.conf
|
COPY ./deploy/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ function warning() {
|
||||||
}
|
}
|
||||||
function success() {
|
function success() {
|
||||||
ElMessage.success(
|
ElMessage.success(
|
||||||
"'Cause you walked hand in hand With another man in my place",
|
'Cause you walked hand in hand With another man in my place',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
"nocheck",
|
"nocheck",
|
||||||
"prefixs",
|
"prefixs",
|
||||||
"vitepress",
|
"vitepress",
|
||||||
|
"antdv",
|
||||||
"ependencies",
|
"ependencies",
|
||||||
"vite",
|
"vite",
|
||||||
"echarts",
|
"echarts",
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { defineBuildConfig } from 'unbuild';
|
|
||||||
|
|
||||||
export default defineBuildConfig({
|
|
||||||
clean: true,
|
|
||||||
declaration: true,
|
|
||||||
entries: ['src/index'],
|
|
||||||
});
|
|
|
@ -1,5 +1,3 @@
|
||||||
import type { UserConfig } from 'cz-git';
|
|
||||||
|
|
||||||
import { execSync } from 'node:child_process';
|
import { execSync } from 'node:child_process';
|
||||||
|
|
||||||
import { getPackagesSync } from '@vben/node-utils';
|
import { getPackagesSync } from '@vben/node-utils';
|
||||||
|
@ -27,7 +25,10 @@ const scopeComplete = execSync('git status --porcelain || true')
|
||||||
?.match(/src%%((\w|-)*)/)?.[1]
|
?.match(/src%%((\w|-)*)/)?.[1]
|
||||||
?.replace(/s$/, '');
|
?.replace(/s$/, '');
|
||||||
|
|
||||||
const userConfig: UserConfig = {
|
/**
|
||||||
|
* @type {import('cz-git').UserConfig}
|
||||||
|
*/
|
||||||
|
const userConfig = {
|
||||||
extends: ['@commitlint/config-conventional'],
|
extends: ['@commitlint/config-conventional'],
|
||||||
plugins: ['commitlint-plugin-function-rules'],
|
plugins: ['commitlint-plugin-function-rules'],
|
||||||
prompt: {
|
prompt: {
|
||||||
|
@ -106,7 +107,7 @@ const userConfig: UserConfig = {
|
||||||
'function-rules/scope-enum': [
|
'function-rules/scope-enum': [
|
||||||
2, // level: error
|
2, // level: error
|
||||||
'always',
|
'always',
|
||||||
(parsed: { scope: string }) => {
|
(parsed) => {
|
||||||
if (!parsed.scope || allowedScopes.includes(parsed.scope)) {
|
if (!parsed.scope || allowedScopes.includes(parsed.scope)) {
|
||||||
return [true];
|
return [true];
|
||||||
}
|
}
|
|
@ -11,20 +11,15 @@
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
|
||||||
"stub": "pnpm unbuild --stub"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"main": "./dist/index.mjs",
|
"main": "./index.mjs",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/index.d.ts",
|
"import": "./index.mjs",
|
||||||
"import": "./dist/index.mjs",
|
"default": "./index.mjs"
|
||||||
"default": "./dist/index.mjs"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
|
||||||
"extends": "@vben/tsconfig/node.json",
|
|
||||||
"include": ["src"],
|
|
||||||
"exclude": ["node_modules"]
|
|
||||||
}
|
|
|
@ -1,9 +1,11 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function comments(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function comments(): Promise<Linter.Config[]> {
|
||||||
const [pluginComments] = await Promise.all([
|
const [pluginComments] = await Promise.all([
|
||||||
// @ts-expect-error - no types
|
// @ts-expect-error - no types
|
||||||
import('eslint-plugin-eslint-comments'),
|
interopDefault(import('eslint-plugin-eslint-comments')),
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function disableds(): Promise<Linter.FlatConfig[]> {
|
export async function disableds(): Promise<Linter.Config[]> {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
files: ['**/__tests__/**/*.?([cm])[jt]s?(x)'],
|
files: ['**/__tests__/**/*.?([cm])[jt]s?(x)'],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function ignores(): Promise<Linter.FlatConfig[]> {
|
export async function ignores(): Promise<Linter.Config[]> {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
ignores: [
|
ignores: [
|
||||||
|
|
|
@ -6,7 +6,7 @@ import js from '@eslint/js';
|
||||||
import pluginUnusedImports from 'eslint-plugin-unused-imports';
|
import pluginUnusedImports from 'eslint-plugin-unused-imports';
|
||||||
import globals from 'globals';
|
import globals from 'globals';
|
||||||
|
|
||||||
export async function javascript(): Promise<Linter.FlatConfig[]> {
|
export async function javascript(): Promise<Linter.Config[]> {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function jsdoc(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function jsdoc(): Promise<Linter.Config[]> {
|
||||||
const [pluginJsdoc] = await Promise.all([
|
const [pluginJsdoc] = await Promise.all([
|
||||||
import('eslint-plugin-jsdoc'),
|
interopDefault(import('eslint-plugin-jsdoc')),
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
plugins: {
|
plugins: {
|
||||||
// @ts-expect-error - no types
|
|
||||||
jsdoc: pluginJsdoc,
|
jsdoc: pluginJsdoc,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function jsonc(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function jsonc(): Promise<Linter.Config[]> {
|
||||||
const [pluginJsonc, parserJsonc] = await Promise.all([
|
const [pluginJsonc, parserJsonc] = await Promise.all([
|
||||||
import('eslint-plugin-jsonc'),
|
interopDefault(import('eslint-plugin-jsonc')),
|
||||||
import('jsonc-eslint-parser'),
|
interopDefault(import('jsonc-eslint-parser')),
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function node(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
const [pluginNode] = await Promise.all([import('eslint-plugin-n')] as const);
|
|
||||||
|
export async function node(): Promise<Linter.Config[]> {
|
||||||
|
const pluginNode = await interopDefault(import('eslint-plugin-n'));
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@ import type { Linter } from 'eslint';
|
||||||
|
|
||||||
import perfectionistPlugin from 'eslint-plugin-perfectionist';
|
import perfectionistPlugin from 'eslint-plugin-perfectionist';
|
||||||
|
|
||||||
export async function perfectionist(): Promise<Linter.FlatConfig[]> {
|
export async function perfectionist(): Promise<Linter.Config[]> {
|
||||||
return [
|
return [
|
||||||
perfectionistPlugin.configs['recommended-natural'],
|
perfectionistPlugin.configs['recommended-natural'],
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function prettier(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function prettier(): Promise<Linter.Config[]> {
|
||||||
const [pluginPrettier] = await Promise.all([
|
const [pluginPrettier] = await Promise.all([
|
||||||
import('eslint-plugin-prettier'),
|
interopDefault(import('eslint-plugin-prettier')),
|
||||||
] as const);
|
] as const);
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function regexp(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function regexp(): Promise<Linter.Config[]> {
|
||||||
const [pluginRegexp] = await Promise.all([
|
const [pluginRegexp] = await Promise.all([
|
||||||
import('eslint-plugin-regexp'),
|
interopDefault(import('eslint-plugin-regexp')),
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function test(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function test(): Promise<Linter.Config[]> {
|
||||||
const [pluginTest, pluginNoOnlyTests] = await Promise.all([
|
const [pluginTest, pluginNoOnlyTests] = await Promise.all([
|
||||||
import('eslint-plugin-vitest'),
|
interopDefault(import('eslint-plugin-vitest')),
|
||||||
// @ts-expect-error - no types
|
// @ts-expect-error - no types
|
||||||
import('eslint-plugin-no-only-tests'),
|
interopDefault(import('eslint-plugin-no-only-tests')),
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function turbo(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function turbo(): Promise<Linter.Config[]> {
|
||||||
const [pluginTurbo] = await Promise.all([
|
const [pluginTurbo] = await Promise.all([
|
||||||
// @ts-expect-error - no types
|
// @ts-expect-error - no types
|
||||||
import('eslint-config-turbo'),
|
interopDefault(import('eslint-config-turbo')),
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function typescript(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function typescript(): Promise<Linter.Config[]> {
|
||||||
const [pluginTs, parserTs] = await Promise.all([
|
const [pluginTs, parserTs] = await Promise.all([
|
||||||
import('@typescript-eslint/eslint-plugin'),
|
interopDefault(import('@typescript-eslint/eslint-plugin')),
|
||||||
// @ts-expect-error missing types
|
// @ts-expect-error missing types
|
||||||
import('@typescript-eslint/parser'),
|
interopDefault(import('@typescript-eslint/parser')),
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function unicorn(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function unicorn(): Promise<Linter.Config[]> {
|
||||||
const [pluginUnicorn] = await Promise.all([
|
const [pluginUnicorn] = await Promise.all([
|
||||||
// @ts-expect-error - missing types
|
interopDefault(import('eslint-plugin-unicorn')),
|
||||||
import('eslint-plugin-unicorn'),
|
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
import type { Linter } from 'eslint';
|
import type { Linter } from 'eslint';
|
||||||
|
|
||||||
export async function vue(): Promise<Linter.FlatConfig[]> {
|
import { interopDefault } from '../util';
|
||||||
|
|
||||||
|
export async function vue(): Promise<Linter.Config[]> {
|
||||||
const [pluginVue, parserVue, parserTs] = await Promise.all([
|
const [pluginVue, parserVue, parserTs] = await Promise.all([
|
||||||
// @ts-expect-error missing types
|
// @ts-expect-error missing types
|
||||||
import('eslint-plugin-vue'),
|
interopDefault(import('eslint-plugin-vue')),
|
||||||
import('vue-eslint-parser'),
|
interopDefault(import('vue-eslint-parser')),
|
||||||
// @ts-expect-error missing types
|
// @ts-expect-error missing types
|
||||||
import('@typescript-eslint/parser'),
|
interopDefault(import('@typescript-eslint/parser')),
|
||||||
] as const);
|
] as const);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
export type Awaitable<T> = Promise<T> | T;
|
||||||
|
|
||||||
|
export async function interopDefault<T>(
|
||||||
|
m: Awaitable<T>,
|
||||||
|
): Promise<T extends { default: infer U } ? U : T> {
|
||||||
|
const resolved = await m;
|
||||||
|
return (resolved as any).default || resolved;
|
||||||
|
}
|
|
@ -1,7 +0,0 @@
|
||||||
import { defineBuildConfig } from 'unbuild';
|
|
||||||
|
|
||||||
export default defineBuildConfig({
|
|
||||||
clean: true,
|
|
||||||
declaration: true,
|
|
||||||
entries: ['src/index'],
|
|
||||||
});
|
|
|
@ -1,33 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@vben/lint-staged-config",
|
|
||||||
"version": "5.0.0",
|
|
||||||
"private": true,
|
|
||||||
"homepage": "https://github.com/vbenjs/vue-vben-admin",
|
|
||||||
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
|
|
||||||
"directory": "internal/lint-configs/lint-staged-config"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"stub": "pnpm unbuild --stub"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"main": "./dist/index.mjs",
|
|
||||||
"module": "./dist/index.mjs",
|
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"import": "./dist/index.mjs",
|
|
||||||
"default": "./dist/index.mjs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"lint-staged": "^15.2.7"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
export default {
|
|
||||||
'*.{js,jsx,ts,tsx}': [
|
|
||||||
'prettier --cache --ignore-unknown --write',
|
|
||||||
'eslint --cache --fix',
|
|
||||||
],
|
|
||||||
'*.{scss,less,styl,html,vue,css}': [
|
|
||||||
'prettier --cache --ignore-unknown --write',
|
|
||||||
'stylelint --fix --allow-empty-input',
|
|
||||||
],
|
|
||||||
'*.md': ['prettier --cache --ignore-unknown --write'],
|
|
||||||
'*.vue': [
|
|
||||||
'prettier --write',
|
|
||||||
'eslint --cache --fix',
|
|
||||||
'stylelint --fix --allow-empty-input',
|
|
||||||
],
|
|
||||||
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [
|
|
||||||
'prettier --cache --write--parser json',
|
|
||||||
],
|
|
||||||
'package.json': ['prettier --cache --write'],
|
|
||||||
};
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
|
||||||
"extends": "@vben/tsconfig/node.json",
|
|
||||||
"include": ["src"],
|
|
||||||
"exclude": ["node_modules"]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { defineBuildConfig } from 'unbuild';
|
|
||||||
|
|
||||||
export default defineBuildConfig({
|
|
||||||
clean: true,
|
|
||||||
declaration: true,
|
|
||||||
entries: ['src/index'],
|
|
||||||
});
|
|
|
@ -11,20 +11,14 @@
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
|
||||||
"stub": "pnpm unbuild --stub"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"main": "./dist/index.mjs",
|
"main": "./index.mjs",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/index.d.ts",
|
"default": "./index.mjs"
|
||||||
"import": "./dist/index.mjs",
|
|
||||||
"default": "./dist/index.mjs"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
|
||||||
"extends": "@vben/tsconfig/node.json",
|
|
||||||
"include": ["src"],
|
|
||||||
"exclude": ["node_modules"]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { defineBuildConfig } from 'unbuild';
|
|
||||||
|
|
||||||
export default defineBuildConfig({
|
|
||||||
clean: true,
|
|
||||||
declaration: true,
|
|
||||||
entries: ['src/index'],
|
|
||||||
});
|
|
|
@ -11,20 +11,15 @@
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
|
||||||
"stub": "pnpm unbuild --stub"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"main": "./dist/index.mjs",
|
"main": "./index.mjs",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/index.d.ts",
|
"import": "./index.mjs",
|
||||||
"import": "./dist/index.mjs",
|
"default": "./index.mjs"
|
||||||
"default": "./dist/index.mjs"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
|
||||||
"extends": "@vben/tsconfig/node.json",
|
|
||||||
"include": ["src"],
|
|
||||||
"exclude": ["node_modules"]
|
|
||||||
}
|
|
|
@ -11,7 +11,9 @@ export type { Package } from '@manypkg/get-packages';
|
||||||
export { default as colors } from 'chalk';
|
export { default as colors } from 'chalk';
|
||||||
export { consola } from 'consola';
|
export { consola } from 'consola';
|
||||||
export * from 'execa';
|
export * from 'execa';
|
||||||
export { default as fs } from 'fs-extra';
|
|
||||||
|
export * as fs from 'fs-extra';
|
||||||
export { nanoid } from 'nanoid';
|
export { nanoid } from 'nanoid';
|
||||||
export { type PackageJson, readPackageJSON } from 'pkg-types';
|
export { type PackageJson, readPackageJSON } from 'pkg-types';
|
||||||
|
|
||||||
export { rimraf } from 'rimraf';
|
export { rimraf } from 'rimraf';
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import plugin from 'tailwindcss/plugin.js';
|
import * as plugin from 'tailwindcss/plugin.js';
|
||||||
|
|
||||||
|
// @ts-expect-error Parameter 'addUtilities' implicitly has an 'any' type.
|
||||||
const enterAnimationPlugin = plugin(({ addUtilities }) => {
|
const enterAnimationPlugin = plugin(({ addUtilities }) => {
|
||||||
const maxChild = 5;
|
const maxChild = 5;
|
||||||
const utilities: Record<string, any> = {};
|
const utilities: Record<string, any> = {};
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { join } from 'node:path';
|
||||||
|
|
||||||
import { fs } from '@vben/node-utils';
|
import { fs } from '@vben/node-utils';
|
||||||
|
|
||||||
import dotenv from 'dotenv';
|
import * as dotenv from 'dotenv';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前环境下生效的配置文件名
|
* 获取当前环境下生效的配置文件名
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
"@types/node": "^22.0.2",
|
"@types/node": "^22.0.2",
|
||||||
"@vben/commitlint-config": "workspace:*",
|
"@vben/commitlint-config": "workspace:*",
|
||||||
"@vben/eslint-config": "workspace:*",
|
"@vben/eslint-config": "workspace:*",
|
||||||
"@vben/lint-staged-config": "workspace:*",
|
|
||||||
"@vben/prettier-config": "workspace:*",
|
"@vben/prettier-config": "workspace:*",
|
||||||
"@vben/stylelint-config": "workspace:*",
|
"@vben/stylelint-config": "workspace:*",
|
||||||
"@vben/tailwind-config": "workspace:*",
|
"@vben/tailwind-config": "workspace:*",
|
||||||
|
@ -77,11 +76,12 @@
|
||||||
"husky": "^9.1.4",
|
"husky": "^9.1.4",
|
||||||
"is-ci": "^3.0.1",
|
"is-ci": "^3.0.1",
|
||||||
"jsdom": "^24.1.1",
|
"jsdom": "^24.1.1",
|
||||||
|
"lint-staged": "^15.2.7",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"tailwindcss": "^3.4.7",
|
"tailwindcss": "^3.4.7",
|
||||||
"turbo": "^2.0.11",
|
"turbo": "^2.0.11",
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.5.4",
|
||||||
"unbuild": "^2.0.0",
|
"unbuild": "^3.0.0-rc.7",
|
||||||
"vite": "^5.3.5",
|
"vite": "^5.3.5",
|
||||||
"vitest": "^2.0.5",
|
"vitest": "^2.0.5",
|
||||||
"vue-tsc": "^2.0.29"
|
"vue-tsc": "^2.0.29"
|
||||||
|
|
805
pnpm-lock.yaml
805
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -16,9 +16,9 @@ async function runLint({ format }: LintCommandOptions) {
|
||||||
await execaCommand(`stylelint "**/*.{vue,css,less.scss}" --cache --fix`, {
|
await execaCommand(`stylelint "**/*.{vue,css,less.scss}" --cache --fix`, {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
});
|
});
|
||||||
await execaCommand(`eslint . --cache --fix`, {
|
// await execaCommand(`eslint . --cache --fix`, {
|
||||||
stdio: 'inherit',
|
// stdio: 'inherit',
|
||||||
});
|
// });
|
||||||
await execaCommand(`prettier . --write --cache --log-level warn`, {
|
await execaCommand(`prettier . --write --cache --log-level warn`, {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,11 +37,6 @@
|
||||||
"cache": false,
|
"cache": false,
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"@vben/backend#dev": {
|
|
||||||
"outputs": [],
|
|
||||||
"cache": false,
|
|
||||||
"persistent": true
|
|
||||||
},
|
|
||||||
"typecheck": {
|
"typecheck": {
|
||||||
"outputs": []
|
"outputs": []
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,6 @@
|
||||||
"name": "@vben/eslint-config",
|
"name": "@vben/eslint-config",
|
||||||
"path": "internal/lint-configs/eslint-config",
|
"path": "internal/lint-configs/eslint-config",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "@vben/lint-staged-config",
|
|
||||||
"path": "internal/lint-configs/lint-staged-config",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "@vben/prettier-config",
|
"name": "@vben/prettier-config",
|
||||||
"path": "internal/lint-configs/prettier-config",
|
"path": "internal/lint-configs/prettier-config",
|
||||||
|
|
Loading…
Reference in New Issue