Skip to content

Move utilities used for the Diffs app Tree Worker into a separate file

Thomas Randolph requested to merge tor/defect/locale-expects-window into master

What does this MR do?

Since the Tree Worker operates in a Web Worker context, it makes sense to separate it from the rest of the utilities so that imports that rely on things like window don't break the Worker script.

Context

I'm adding a utility that computes the humanized bytes of a diff file to the diff file utility and - by relying on window- the mere presence of the humanization import breaks the entire Diffs app because the utility file is imported into a Web Worker for other utilities it exports.

Screenshots (strongly suggested)

N/A, all backstage

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Paul Slaughter

Merge request reports