Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite02af8e

Browse files
authored
Fix issue where sometimes modified timestamp file was not shown in baseline (microsoft#58623)
1 parentb682ed4 commite02af8e

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

‎src/harness/vfsUtil.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,8 @@ export class FileSystem {
788788
}
789789

790790
privatestaticfileDiff(container:FileSet,basename:string,changed:FileSystem,changedNode:FileInode,base:FileSystem,baseNode:FileInode,options:DiffOptions){
791-
while(!changedNode.buffer&&changedNode.shadowRoot)changedNode=changedNode.shadowRoot;
792-
while(!baseNode.buffer&&baseNode.shadowRoot)baseNode=baseNode.shadowRoot;
791+
changedNode=walkSameNodes(changedNode);
792+
baseNode=walkSameNodes(baseNode);
793793

794794
// no difference if the nodes are the same reference
795795
if(changedNode===baseNode)returnfalse;
@@ -827,6 +827,15 @@ export class FileSystem {
827827

828828
container[basename]=newFile(changedBuffer.data,{encoding:changedBuffer.encoding});
829829
returntrue;
830+
831+
functionwalkSameNodes(node:FileInode){
832+
while(
833+
!node.buffer&&
834+
node.shadowRoot&&
835+
(!options.includeChangedFileWithSameContent||node.mtimeMs===node.shadowRoot.mtimeMs)
836+
)node=node.shadowRoot;
837+
returnnode;
838+
}
830839
}
831840

832841
privatestaticsymlinkDiff(container:FileSet,basename:string,changedNode:SymlinkInode,baseNode:SymlinkInode){

‎tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,10 @@ function f() {
565565
"size":1407
566566
}
567567

568+
//// [/src/third/thirdjs/output/third-output.d.ts] file changed its modified time
569+
//// [/src/third/thirdjs/output/third-output.d.ts.map] file changed its modified time
570+
//// [/src/third/thirdjs/output/third-output.js] file changed its modified time
571+
//// [/src/third/thirdjs/output/third-output.js.map] file changed its modified time
568572

569573

570574
Change::Makeincrementalbuildwithchangeinfilethatdoesntaffectdts

‎tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,3 +1390,7 @@ sourceFile:../first_part3.ts
13901390
"size":1407
13911391
}
13921392

1393+
//// [/src/third/thirdjs/output/third-output.d.ts] file changed its modified time
1394+
//// [/src/third/thirdjs/output/third-output.d.ts.map] file changed its modified time
1395+
//// [/src/third/thirdjs/output/third-output.js] file changed its modified time
1396+
//// [/src/third/thirdjs/output/third-output.js.map] file changed its modified time

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp