`sha256` over `md5` (#202985)

* `sha256` over `md5`

* add missing JS file
pull/203022/head
Johannes Rieken 2024-01-22 14:40:18 +01:00 committed by GitHub
parent cc593a387e
commit 236d5dc072
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ function createTypeScriptBuilder(config, projectFile, cmd) {
if (/\.d\.ts$/.test(fileName)) {
// if it's already a d.ts file just emit it signature
const snapshot = host.getScriptSnapshot(fileName);
const signature = crypto.createHash('md5')
const signature = crypto.createHash('sha256')
.update(snapshot.getText(0, snapshot.getLength()))
.digest('base64');
return resolve({
@ -106,7 +106,7 @@ function createTypeScriptBuilder(config, projectFile, cmd) {
continue;
}
if (/\.d\.ts$/.test(file.name)) {
signature = crypto.createHash('md5')
signature = crypto.createHash('sha256')
.update(file.text)
.digest('base64');
if (!userWantsDeclarations) {

View File

@ -113,7 +113,7 @@ export function createTypeScriptBuilder(config: IConfiguration, projectFile: str
if (/\.d\.ts$/.test(fileName)) {
// if it's already a d.ts file just emit it signature
const snapshot = host.getScriptSnapshot(fileName);
const signature = crypto.createHash('md5')
const signature = crypto.createHash('sha256')
.update(snapshot.getText(0, snapshot.getLength()))
.digest('base64');
@ -134,7 +134,7 @@ export function createTypeScriptBuilder(config: IConfiguration, projectFile: str
}
if (/\.d\.ts$/.test(file.name)) {
signature = crypto.createHash('md5')
signature = crypto.createHash('sha256')
.update(file.text)
.digest('base64');