Skip to content

Commit

Permalink
Updated task-lib to v5 for CopyFilesV2 and ArchiveFilesV2 tasks (#20859)
Browse files Browse the repository at this point in the history
* updated task-lib to v5 for CopyFilesV2 and ArchiveFilesV2 tasks

* Fixed runner.run() function error

* Removing unnecessary test code

* Removing unused code

* Updating patch to 0 instead of 1
  • Loading branch information
rishabhmalikMS authored Feb 20, 2025
1 parent 1d12444 commit f3ff565
Show file tree
Hide file tree
Showing 10 changed files with 485 additions and 622 deletions.
4 changes: 2 additions & 2 deletions Tasks/ArchiveFilesV2/archivefiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function getOptions(): tr.IExecSyncOptions {
tl.debug("cwd (include root folder)= " + dirName);
return { cwd: dirName, outStream: process.stdout as stream.Writable, errStream: process.stderr as stream.Writable };
} else {
var stats: tl.FsStats = tl.stats(rootFolderOrFile);
var stats: fs.Stats = tl.stats(rootFolderOrFile);
if (stats.isFile()) {
dirName = path.dirname(rootFolderOrFile);
} else {
Expand Down Expand Up @@ -328,7 +328,7 @@ function doWork() {
if (tl.exist(archiveFile)) {
if (replaceExistingArchive) {
try {
var stats: tl.FsStats = tl.stats(archiveFile);
var stats: fs.Stats = tl.stats(archiveFile);
if (stats.isFile()) {
console.log(tl.loc('RemoveBeforeCreation', archiveFile));
tl.rmRF(archiveFile);
Expand Down
11 changes: 6 additions & 5 deletions Tasks/ArchiveFilesV2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tasks/ArchiveFilesV2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@types/mocha": "^9.1.1",
"@types/node": "^20.3.1",
"azure-pipelines-task-lib": "^4.15.0"
"azure-pipelines-task-lib": "^5.0.0"
},
"devDependencies": {
"typescript": "5.1.6"
Expand Down
4 changes: 2 additions & 2 deletions Tasks/ArchiveFilesV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"minimumAgentVersion": "2.182.1",
"version": {
"Major": 2,
"Minor": 246,
"Patch": 3
"Minor": 253,
"Patch": 0
},
"groups": [
{
Expand Down
4 changes: 2 additions & 2 deletions Tasks/ArchiveFilesV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"minimumAgentVersion": "2.182.1",
"version": {
"Major": 2,
"Minor": 246,
"Patch": 3
"Minor": 253,
"Patch": 0
},
"groups": [
{
Expand Down
666 changes: 364 additions & 302 deletions Tasks/CopyFilesV2/Tests/L0.ts

Large diffs are not rendered by default.

Loading

0 comments on commit f3ff565

Please sign in to comment.