feat: use catalog to globally upgrade vite and vitest (#2680)
This commit is contained in:
parent
1bc3a1e577
commit
8d0429d574
|
@ -23,7 +23,7 @@
|
||||||
"rollup": "^3.7.3",
|
"rollup": "^3.7.3",
|
||||||
"semver": "^7.3.8",
|
"semver": "^7.3.8",
|
||||||
"tsup": "7.2.0",
|
"tsup": "7.2.0",
|
||||||
"vite": "catalog:",
|
"vite": "^4.3.8",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:",
|
||||||
"tailwindcss": "^3.2.4"
|
"tailwindcss": "^3.2.4"
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,6 +4,6 @@ export default <Options>{
|
||||||
entryPoints: ['src/*.ts'],
|
entryPoints: ['src/*.ts'],
|
||||||
clean: true,
|
clean: true,
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
dts: true,
|
dts: false,
|
||||||
onSuccess: 'esno scripts/postbuild.ts'
|
onSuccess: 'esno scripts/postbuild.ts'
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,8 +229,7 @@
|
||||||
"vue@3": "3.4.38",
|
"vue@3": "3.4.38",
|
||||||
"vue2": "npm:vue@2.6.14",
|
"vue2": "npm:vue@2.6.14",
|
||||||
"vue2.7": "npm:vue@2.7.10",
|
"vue2.7": "npm:vue@2.7.10",
|
||||||
"vue3": "npm:vue@3.4.38",
|
"vue3": "npm:vue@3.4.38"
|
||||||
"vite": "catalog:"
|
|
||||||
},
|
},
|
||||||
"packageExtensions": {
|
"packageExtensions": {
|
||||||
"vue-template-compiler@2.6.14": {
|
"vue-template-compiler@2.6.14": {
|
||||||
|
|
|
@ -25,8 +25,7 @@
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "pnpm -w build:ui",
|
"build": "vite build"
|
||||||
"postversion": "pnpm build"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@better-scroll/core": "^2.5.0",
|
"@better-scroll/core": "^2.5.0",
|
||||||
|
@ -36,6 +35,12 @@
|
||||||
"@opentiny/vue-locale": "workspace:~"
|
"@opentiny/vue-locale": "workspace:~"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"vue": "^3.5.0"
|
"vue": "^3.5.0",
|
||||||
|
"typescript": "catalog:",
|
||||||
|
"vite": "catalog:",
|
||||||
|
"@vitejs/plugin-vue": "^5.2.1",
|
||||||
|
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||||
|
"vite-plugin-dts": "^4.3.0",
|
||||||
|
"vite-svg-loader": "^5.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2020",
|
||||||
|
"useDefineForClassFields": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||||
|
"skipLibCheck": true,
|
||||||
|
|
||||||
|
/* Bundler mode */
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
|
||||||
|
/* Linting */
|
||||||
|
"strict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noFallthroughCasesInSwitch": true
|
||||||
|
},
|
||||||
|
"include": ["components/**/*.ts", "components/**/*.tsx", "components/**/*.vue"],
|
||||||
|
"references": [{ "path": "./tsconfig.node.json" }]
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"composite": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
|
},
|
||||||
|
"include": ["vite.config.ts"]
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
|
import dts from 'vite-plugin-dts'
|
||||||
|
import svgLoader from 'vite-svg-loader'
|
||||||
|
|
||||||
|
// https://vitejs.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [vue(), vueJsx(), dts(), svgLoader()],
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: './index.ts'
|
||||||
|
},
|
||||||
|
minify: true,
|
||||||
|
rollupOptions: {
|
||||||
|
external: [/@better-scroll/, /@opentiny/],
|
||||||
|
input: ['index.ts'],
|
||||||
|
output: [
|
||||||
|
{
|
||||||
|
format: 'es',
|
||||||
|
entryFileNames: '[name].js',
|
||||||
|
preserveModules: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
|
@ -21,8 +21,8 @@
|
||||||
"xss": "1.0.14"
|
"xss": "1.0.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.2.2",
|
"typescript": "catalog:",
|
||||||
"vite-plugin-dts": "~4.3.0",
|
"vite-plugin-dts": "~4.3.0",
|
||||||
"vite": "^6.0.0"
|
"vite": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ while (mPrime < 64) {
|
||||||
|
|
||||||
export class SHA256Algo extends Hasher {
|
export class SHA256Algo extends Hasher {
|
||||||
_hash: any
|
_hash: any
|
||||||
_data: any
|
declare _data: any
|
||||||
|
|
||||||
_doReset() {
|
_doReset() {
|
||||||
this._hash = new WordArray(H.slice(0))
|
this._hash = new WordArray(H.slice(0))
|
||||||
|
|
|
@ -6,6 +6,6 @@ packages:
|
||||||
|
|
||||||
# 统一版本,方便维护
|
# 统一版本,方便维护
|
||||||
catalog:
|
catalog:
|
||||||
'vitest': '^0.31.0'
|
'vitest': '^2.1.8'
|
||||||
'vite': '^4.3.8'
|
'vite': '^6.0.0'
|
||||||
'typescript': '~5.3.3'
|
'typescript': '~5.3.3'
|
||||||
|
|
Loading…
Reference in New Issue