Fix recompilation issues with timestamps for generated sourcemaps
Fix recompilation issues with timestamps for generated sourcemaps

Recently, we have been observing increased GN recompilation times.
It's unclear why they started happening (we are currently thinking
it was related to an update of the TypeScript compiler), but we did
discover a bug in our timestamp resetting behavior.

When inspecting the build output, I discovered that the timestamps
for the `.js.map` files would always be increased, even if the content
was unchanged. The `.js` and `.d.ts` maps would see their timestamps
properly reset.

As it turns out, the replacement extension that we used to reset
all files was `.map` rather than `.js.map`. That's because the source
map files that would be generated would end in `.js.map` and since
the original file ends with `.ts`, we have to do the full replacement.

I have confirmed that making a single change in a random file that
does not affect the public API will properly work.

R=993fcadce4d04090da2fefd557a0995e7966c8d5@chromium.org

Fixed: 1237438
Change-Id: Iaec168c45632845e3da140e7cdb0a621a3d1702f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3081731
Commit-Queue: Tim van der Lippe <dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org>
Commit-Queue: Jack Franklin <993fcadce4d04090da2fefd557a0995e7966c8d5@chromium.org>
Auto-Submit: Tim van der Lippe <dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org>
Reviewed-by: Jack Franklin <993fcadce4d04090da2fefd557a0995e7966c8d5@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend