mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Fix issue where sometimes modified timestamp file was not shown in baseline (#58623)
This commit is contained in:
@@ -788,8 +788,8 @@ export class FileSystem {
|
||||
}
|
||||
|
||||
private static fileDiff(container: FileSet, basename: string, changed: FileSystem, changedNode: FileInode, base: FileSystem, baseNode: FileInode, options: DiffOptions) {
|
||||
while (!changedNode.buffer && changedNode.shadowRoot) changedNode = changedNode.shadowRoot;
|
||||
while (!baseNode.buffer && baseNode.shadowRoot) baseNode = baseNode.shadowRoot;
|
||||
changedNode = walkSameNodes(changedNode);
|
||||
baseNode = walkSameNodes(baseNode);
|
||||
|
||||
// no difference if the nodes are the same reference
|
||||
if (changedNode === baseNode) return false;
|
||||
@@ -827,6 +827,15 @@ export class FileSystem {
|
||||
|
||||
container[basename] = new File(changedBuffer.data, { encoding: changedBuffer.encoding });
|
||||
return true;
|
||||
|
||||
function walkSameNodes(node: FileInode) {
|
||||
while (
|
||||
!node.buffer &&
|
||||
node.shadowRoot &&
|
||||
(!options.includeChangedFileWithSameContent || node.mtimeMs === node.shadowRoot.mtimeMs)
|
||||
) node = node.shadowRoot;
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
private static symlinkDiff(container: FileSet, basename: string, changedNode: SymlinkInode, baseNode: SymlinkInode) {
|
||||
|
||||
@@ -565,6 +565,10 @@ function f() {
|
||||
"size": 1407
|
||||
}
|
||||
|
||||
//// [/src/third/thirdjs/output/third-output.d.ts] file changed its modified time
|
||||
//// [/src/third/thirdjs/output/third-output.d.ts.map] file changed its modified time
|
||||
//// [/src/third/thirdjs/output/third-output.js] file changed its modified time
|
||||
//// [/src/third/thirdjs/output/third-output.js.map] file changed its modified time
|
||||
|
||||
|
||||
Change:: Make incremental build with change in file that doesnt affect dts
|
||||
|
||||
@@ -1390,3 +1390,7 @@ sourceFile:../first_part3.ts
|
||||
"size": 1407
|
||||
}
|
||||
|
||||
//// [/src/third/thirdjs/output/third-output.d.ts] file changed its modified time
|
||||
//// [/src/third/thirdjs/output/third-output.d.ts.map] file changed its modified time
|
||||
//// [/src/third/thirdjs/output/third-output.js] file changed its modified time
|
||||
//// [/src/third/thirdjs/output/third-output.js.map] file changed its modified time
|
||||
|
||||
Reference in New Issue
Block a user