From 6e753f38edc5408e3428dcf30ed2ee388afdfc9d Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Fri, 12 Feb 2016 13:35:12 -0800 Subject: [PATCH 1/2] Fix rwc in including files into compilation --- src/harness/loggedIO.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index 3d51682f745..afc1cfcbcbc 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -223,7 +223,18 @@ namespace Playback { recordLog.directoriesRead.push(logEntry); return result; }, - (path, extension, exclude) => findResultByPath(wrapper, replayLog.directoriesRead.filter(d => d.extension === extension && ts.arrayIsEqualTo(d.exclude, exclude)), path)); + (path, extension, exclude) => findResultByPath(wrapper, + replayLog.directoriesRead.filter( + (d) => { + if (d.extension === extension) { + if (d.exclude) { + return ts.arrayIsEqualTo(d.exclude, exclude); + } + return true; + } + return false; + } + ), path)); wrapper.writeFile = recordReplay(wrapper.writeFile, underlying)( (path, contents) => callAndRecord(underlying.writeFile(path, contents), recordLog.filesWritten, { path, contents, bom: false }), From 81b0baeb50bda3bc8701e7199b50199d40aac909 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Fri, 12 Feb 2016 14:12:42 -0800 Subject: [PATCH 2/2] Address PR --- src/harness/loggedIO.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index afc1cfcbcbc..e4c6c712f14 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -225,7 +225,7 @@ namespace Playback { }, (path, extension, exclude) => findResultByPath(wrapper, replayLog.directoriesRead.filter( - (d) => { + d => { if (d.extension === extension) { if (d.exclude) { return ts.arrayIsEqualTo(d.exclude, exclude);