Our build system has an issue wherein to version the files it modifies the files that parallel-transpile has compiled in order to reference the new, versioned, filenames.
For example if foo.jsx references image.jpg and we version image.jpg -> image.13371337.jpg; it will modify the compiledfoo.js to reference image.13371337.jpg instead.
This is fine; but the next time we compile with a new image.jpg (-> image.00bada55.jpg) if foo.jsx has not been modified then it is not recompiled. The versioning system skips over the compiled foo.js because it doesn't match image.jpg any more, and the stale image.13371337.jpg reference is maintained.
This PR adds a paranoid mode to parallel-transpile where it no longer trusts the compiled code to be unmodified - it checks it with a checksum. If it has been modified, the file will be recompiled regardless.
Our build system has an issue wherein to version the files it modifies the files that
parallel-transpile
has compiled in order to reference the new, versioned, filenames.For example if
foo.jsx
referencesimage.jpg
and we versionimage.jpg
->image.13371337.jpg
; it will modify the compiledfoo.js
to referenceimage.13371337.jpg
instead.This is fine; but the next time we compile with a new
image.jpg
(->image.00bada55.jpg
) iffoo.jsx
has not been modified then it is not recompiled. The versioning system skips over the compiledfoo.js
because it doesn't matchimage.jpg
any more, and the staleimage.13371337.jpg
reference is maintained.This PR adds a
paranoid
mode toparallel-transpile
where it no longer trusts the compiled code to be unmodified - it checks it with a checksum. If it has been modified, the file will be recompiled regardless.This does not affect watch mode.