Skip to content

Commit e4c7350

Browse files
committed
fix: use sha1 instead of md5 for hashing
1 parent 30ab42c commit e4c7350

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/vitest/src/integrations/css/css-modules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { CSSModuleScopeStrategy } from '../../node/types/config'
22
import { hash } from '../../node/hash'
33

44
export function generateCssFilenameHash(filepath: string): string {
5-
return hash('md5', filepath, 'hex').slice(0, 6)
5+
return hash('sha1', filepath, 'hex').slice(0, 6)
66
}
77

88
export function generateScopedClassName(

packages/vitest/src/node/cache/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class VitestCache {
2929
root,
3030
baseDir,
3131
'vitest',
32-
hash('md5', projectName || '', 'hex'),
32+
hash('sha1', projectName || '', 'hex'),
3333
)
3434
}
3535
}

0 commit comments

Comments
 (0)