diff --git a/Tasks/CopyFilesV2/Tests/L0FailsIfThereIsMkdirError.ts b/Tasks/CopyFilesV2/Tests/L0FailsIfThereIsMkdirError.ts index a0b08a051a61..b8c02896a136 100644 --- a/Tasks/CopyFilesV2/Tests/L0FailsIfThereIsMkdirError.ts +++ b/Tasks/CopyFilesV2/Tests/L0FailsIfThereIsMkdirError.ts @@ -37,7 +37,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): itemStats.isDirectory = () => true; diff --git a/Tasks/CopyFilesV2/Tests/L0IgnoresMakeDirError.ts b/Tasks/CopyFilesV2/Tests/L0IgnoresMakeDirError.ts index 7d2126885308..dd66db4687c1 100644 --- a/Tasks/CopyFilesV2/Tests/L0IgnoresMakeDirError.ts +++ b/Tasks/CopyFilesV2/Tests/L0IgnoresMakeDirError.ts @@ -37,7 +37,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): itemStats.isDirectory = () => true; diff --git a/Tasks/CopyFilesV2/Tests/L0cleansIfSpecified.ts b/Tasks/CopyFilesV2/Tests/L0cleansIfSpecified.ts index 7ae840d3ddb7..1efb63e0ee2d 100644 --- a/Tasks/CopyFilesV2/Tests/L0cleansIfSpecified.ts +++ b/Tasks/CopyFilesV2/Tests/L0cleansIfSpecified.ts @@ -42,7 +42,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/destDir'): case path.normalize('/srcDir'): diff --git a/Tasks/CopyFilesV2/Tests/L0cleansIfSpecifiedAndDestDoesntExist.ts b/Tasks/CopyFilesV2/Tests/L0cleansIfSpecifiedAndDestDoesntExist.ts index 6f82a706ee7d..f57ffc3ca3d0 100644 --- a/Tasks/CopyFilesV2/Tests/L0cleansIfSpecifiedAndDestDoesntExist.ts +++ b/Tasks/CopyFilesV2/Tests/L0cleansIfSpecifiedAndDestDoesntExist.ts @@ -41,7 +41,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir'): case path.normalize('/srcDir/someOtherDir'): diff --git a/Tasks/CopyFilesV2/Tests/L0cleansIfSpecifiedAndTargetIsFile.ts b/Tasks/CopyFilesV2/Tests/L0cleansIfSpecifiedAndTargetIsFile.ts index b4ceec7035ce..d1b60ba99b0c 100644 --- a/Tasks/CopyFilesV2/Tests/L0cleansIfSpecifiedAndTargetIsFile.ts +++ b/Tasks/CopyFilesV2/Tests/L0cleansIfSpecifiedAndTargetIsFile.ts @@ -40,7 +40,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir'): case path.normalize('/srcDir/someOtherDir'): diff --git a/Tasks/CopyFilesV2/Tests/L0copyAllFiles.ts b/Tasks/CopyFilesV2/Tests/L0copyAllFiles.ts index 91f0a616be97..ce62754b5678 100644 --- a/Tasks/CopyFilesV2/Tests/L0copyAllFiles.ts +++ b/Tasks/CopyFilesV2/Tests/L0copyAllFiles.ts @@ -47,7 +47,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): case path.normalize('/srcDir/someOtherDir2'): diff --git a/Tasks/CopyFilesV2/Tests/L0copyAllFilesWithBracketsInSrcPath.ts b/Tasks/CopyFilesV2/Tests/L0copyAllFilesWithBracketsInSrcPath.ts index 3ef5cf93c1ce..a649294d38cf 100644 --- a/Tasks/CopyFilesV2/Tests/L0copyAllFilesWithBracketsInSrcPath.ts +++ b/Tasks/CopyFilesV2/Tests/L0copyAllFilesWithBracketsInSrcPath.ts @@ -46,7 +46,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir [bracket]/someOtherDir'): case path.normalize('/srcDir [bracket]/someOtherDir2'): diff --git a/Tasks/CopyFilesV2/Tests/L0copySubtractExclude.ts b/Tasks/CopyFilesV2/Tests/L0copySubtractExclude.ts index 7a87c776beca..4d7abb83097f 100644 --- a/Tasks/CopyFilesV2/Tests/L0copySubtractExclude.ts +++ b/Tasks/CopyFilesV2/Tests/L0copySubtractExclude.ts @@ -47,7 +47,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): case path.normalize('/srcDir/someOtherDir2'): diff --git a/Tasks/CopyFilesV2/Tests/L0failsIfTargetFileIsDir.ts b/Tasks/CopyFilesV2/Tests/L0failsIfTargetFileIsDir.ts index 70b773bd1fb7..46320b030aa4 100644 --- a/Tasks/CopyFilesV2/Tests/L0failsIfTargetFileIsDir.ts +++ b/Tasks/CopyFilesV2/Tests/L0failsIfTargetFileIsDir.ts @@ -37,7 +37,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): case path.normalize('/destDir/someOtherDir/file1.file'): diff --git a/Tasks/CopyFilesV2/Tests/L0overwritesIfSpecified.ts b/Tasks/CopyFilesV2/Tests/L0overwritesIfSpecified.ts index a5b6381e74f1..d3a6afc3b304 100644 --- a/Tasks/CopyFilesV2/Tests/L0overwritesIfSpecified.ts +++ b/Tasks/CopyFilesV2/Tests/L0overwritesIfSpecified.ts @@ -38,7 +38,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): case path.normalize('/destDir/someOtherDir'): diff --git a/Tasks/CopyFilesV2/Tests/L0overwritesReadonly.ts b/Tasks/CopyFilesV2/Tests/L0overwritesReadonly.ts index 7e6a517a114f..45df114f8430 100644 --- a/Tasks/CopyFilesV2/Tests/L0overwritesReadonly.ts +++ b/Tasks/CopyFilesV2/Tests/L0overwritesReadonly.ts @@ -38,7 +38,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): case path.normalize('/destDir/someOtherDir'): diff --git a/Tasks/CopyFilesV2/Tests/L0preservesTimestampIfSpecified.ts b/Tasks/CopyFilesV2/Tests/L0preservesTimestampIfSpecified.ts index 5a78ad8f43b6..cefd49febd96 100644 --- a/Tasks/CopyFilesV2/Tests/L0preservesTimestampIfSpecified.ts +++ b/Tasks/CopyFilesV2/Tests/L0preservesTimestampIfSpecified.ts @@ -49,7 +49,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): case path.normalize('/srcDir/someOtherDir2'): diff --git a/Tasks/CopyFilesV2/Tests/L0rootsPatterns.ts b/Tasks/CopyFilesV2/Tests/L0rootsPatterns.ts index 87bf728e7642..5a8380f6a904 100644 --- a/Tasks/CopyFilesV2/Tests/L0rootsPatterns.ts +++ b/Tasks/CopyFilesV2/Tests/L0rootsPatterns.ts @@ -42,7 +42,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir/file1.file'): case path.normalize('/srcDir/someOtherDir/file2.file'): diff --git a/Tasks/CopyFilesV2/Tests/L0skipsIfExists.ts b/Tasks/CopyFilesV2/Tests/L0skipsIfExists.ts index b509e9d6660e..dece1ad8f166 100644 --- a/Tasks/CopyFilesV2/Tests/L0skipsIfExists.ts +++ b/Tasks/CopyFilesV2/Tests/L0skipsIfExists.ts @@ -38,7 +38,7 @@ Object.assign(fsClone, { } }, statSync(itemPath: string): fs.Stats { - const itemStats: fs.Stats = new fs.Stats(); + const itemStats: fs.Stats = Object.create(fs.Stats.prototype) as fs.Stats; switch (itemPath) { case path.normalize('/srcDir/someOtherDir'): case path.normalize('/destDir/someOtherDir'): diff --git a/Tasks/CopyFilesV2/task.json b/Tasks/CopyFilesV2/task.json index d1becaea458e..c33f9b9e66dc 100644 --- a/Tasks/CopyFilesV2/task.json +++ b/Tasks/CopyFilesV2/task.json @@ -16,7 +16,7 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 256, + "Minor": 267, "Patch": 0 }, "releaseNotes": "Match pattern consistency.", diff --git a/Tasks/CopyFilesV2/task.loc.json b/Tasks/CopyFilesV2/task.loc.json index 07e0a13c9abf..57c5d269b032 100644 --- a/Tasks/CopyFilesV2/task.loc.json +++ b/Tasks/CopyFilesV2/task.loc.json @@ -16,7 +16,7 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 256, + "Minor": 267, "Patch": 0 }, "releaseNotes": "ms-resource:loc.releaseNotes",