Skip to content

Commit

Permalink
Fix premature cloasing of hash stream
Browse files Browse the repository at this point in the history
  • Loading branch information
steverep committed Apr 28, 2024
1 parent ee259e9 commit f5fe994
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build-scripts/gulp/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import rename from "gulp-rename";
import { createHash } from "node:crypto";
import { mkdir, readFile } from "node:fs/promises";
import { basename, join } from "node:path";
import { Transform } from "node:stream";
import { PassThrough, Transform } from "node:stream";
import { finished } from "node:stream/promises";
import env from "../env.cjs";
import paths from "../paths.cjs";
Expand Down Expand Up @@ -213,7 +213,10 @@ const createTranslations = async () => {
// TODO: This is a naive interpretation of BCP47 that should be improved.
// Will be OK for now as long as we don't have anything more complicated
// than a base translation + region.
gulp.src(`${workDir}/en.json`).pipe(hashStream, { end: false });
gulp
.src(`${workDir}/en.json`)
.pipe(new PassThrough({ objectMode: true }))
.pipe(hashStream, { end: false });
const mergesFinished = [];
for (const translationFile of translationFiles) {
const locale = basename(translationFile, ".json");
Expand Down

0 comments on commit f5fe994

Please sign in to comment.