-
Notifications
You must be signed in to change notification settings - Fork 311
feat: [grid,alert,form]use catalog to globally upgrade vite and vitest; and add mobile build config #2680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [grid,alert,form]use catalog to globally upgrade vite and vitest; and add mobile build config #2680
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,8 +229,7 @@ | |
"vue@3": "3.4.38", | ||
"vue2": "npm:[email protected]", | ||
"vue2.7": "npm:[email protected]", | ||
"vue3": "npm:[email protected]", | ||
"vite": "catalog:" | ||
"vue3": "npm:[email protected]" | ||
}, | ||
"packageExtensions": { | ||
"[email protected]": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" }] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"skipLibCheck": true, | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"allowSyntheticDefaultImports": true | ||
}, | ||
"include": ["vite.config.ts"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
] | ||
} | ||
} | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ while (mPrime < 64) { | |
|
||
export class SHA256Algo extends Hasher { | ||
_hash: any | ||
_data: any | ||
declare _data: any | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Missing test coverage for critical cryptographic functionality The SHA256 implementation lacks dedicated test coverage, which is concerning for cryptographic code. The codebase shows:
Key areas requiring test coverage:
🔗 Analysis chainVerify test coverage for SHA256 implementation Given this is cryptographic code, ensure that the TypeScript upgrade hasn't impacted test coverage or existing test cases. Let's check for test coverage: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for SHA256 test files
fd -e test.ts -e spec.ts sha256
# Search for SHA256 test cases
rg -l "describe.*SHA256|test.*SHA256|it.*SHA256"
Length of output: 84 Script: #!/bin/bash
# Let's try a broader search for test files related to SHA256
fd test packages/utils/src/crypt
# Search for any SHA256-related tests with more flexible patterns
rg -i "sha256" --type ts -A 5 packages/utils/src/crypt
# Check the actual SHA256 implementation file
cat packages/utils/src/crypt/sha256.ts
Length of output: 4914 Script: #!/bin/bash
# Let's check for any test files in the parent directories
fd test packages/utils
# Look for any imports or usage of SHA256 in test files
rg -l "SHA256|sha256" $(fd -e test.ts -e spec.ts packages/utils)
# Check if there are any test utilities or setup files
fd -e ts "test-utils|test-setup|jest.setup" packages/utils
Length of output: 812 Script: #!/bin/bash
# Let's try with correct fd syntax
fd . packages/utils --type f --extension test.ts --extension spec.ts
# Check for any test configuration files
fd jest.config packages/utils
# Look for SHA256 usage in the codebase to understand test coverage importance
rg -p "SHA256|sha256" packages/utils/src -C 3
Length of output: 1080 |
||
|
||
_doReset() { | ||
this._hash = new WordArray(H.slice(0)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ packages: | |
|
||
# 统一版本,方便维护 | ||
catalog: | ||
'vitest': '^0.31.0' | ||
'vite': '^4.3.8' | ||
'vitest': '^2.1.8' | ||
'vite': '^6.0.0' | ||
Comment on lines
+9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Version conflicts detected - Migration needed in internal packages The verification revealed version conflicts that need attention:
Additionally, multiple Vite and Vitest configuration files were found that may need updates:
Please update the remaining Vite v4 dependencies and review all configuration files for compatibility with the new versions. 🔗 Analysis chainMajor version upgrades require careful verification The changes include significant version jumps:
These updates likely include breaking changes that need careful review. Let's verify the package compatibility: Please review: Consider documenting the migration steps in the PR description to help with future upgrades. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check if any package.json files still reference old versions
echo "Checking for potential version conflicts..."
rg -g "package.json" "\"vite\": \"(\^4|\~4)"
rg -g "package.json" "\"vitest\": \"(\^0|\~0)"
# Check for Vite/Vitest config files that might need updates
echo "Checking for config files that might need migration..."
fd "vite.config"
fd "vitest.config"
Length of output: 1097 |
||
'typescript': '~5.3.3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect Vue version specification
The specified Vue version
^3.5.0
is incorrect as Vue 3.5.0 doesn't exist yet. The latest Vue 3.x version is lower than this.Consider updating to a valid version:
📝 Committable suggestion