chore: lift dependency to deno.json + update esbuild (#3142)

This commit is contained in:
Marvin Hagemeister
2025-07-25 19:01:28 +02:00
committed by GitHub
parent c9c85ba36d
commit ff34ec8342
8 changed files with 198 additions and 21 deletions
+3 -2
View File
@@ -7,7 +7,6 @@ import {
import * as path from "@std/path";
import { SEPARATOR as WINDOWS_SEPARATOR } from "@std/path/windows/constants";
import { encodeHex } from "@std/encoding/hex";
import { crypto } from "@std/crypto";
import { fsAdapter } from "../fs.ts";
import type { FileTransformer } from "./file_transformer.ts";
import { assertInDir, pathToSpec } from "../utils.ts";
@@ -452,9 +451,11 @@ export default {
async function hashContent(
content: Uint8Array | ReadableStream<Uint8Array>,
): Promise<string> {
const buffer = await new Response(content).arrayBuffer();
const hashBuf = await crypto.subtle.digest(
"SHA-256",
content,
buffer,
);
return encodeHex(hashBuf);
}