Merge pull request #28608 from backstage/renovate/node-20.x-lockfile

chore(deps): update dependency @types/node to v20.17.23
This commit is contained in:
Fredrik Adelöw
2025-03-07 14:43:16 +01:00
committed by GitHub
4 changed files with 22 additions and 13 deletions
+5 -1
View File
@@ -58,7 +58,11 @@ export const createCacheMiddleware = ({
encoding?: BufferEncoding | ErrorCallback,
callback?: ErrorCallback,
) => {
chunks.push(Buffer.from(data));
// This cast is obviously weird, but it covers a type bug in @types/node
// which does not gracefully handle union types.
chunks.push(
typeof data === 'string' ? Buffer.from(data) : Buffer.from(data),
);
if (typeof encoding === 'function') {
return realWrite(data, encoding);
}