diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 57a88f0..a5ea9b9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -25,10 +25,10 @@ jobs:
with:
python-version: '3.11'
- - name: Setup nodejs 16.x
+ - name: Setup nodejs 20.x
uses: actions/setup-node@v4
with:
- node-version: 16.x
+ node-version: 20.x
- name: Install dependencies
run: |
@@ -93,10 +93,10 @@ jobs:
cp $env:RUNNER_TEMP/node6/node.exe $env:USERPROFILE/azure-pipelines-task-lib/_download/node6
echo '' > $env:USERPROFILE/azure-pipelines-task-lib/_download/node6.completed
- - name: Setup nodejs 16.x
+ - name: Setup nodejs 20.x
uses: actions/setup-node@v4
with:
- node-version: 16.x
+ node-version: 20.x
- name: Install dependencies
run: |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2165c03..5ef9632 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,11 @@
# Changelog
+## 5.2.0
+Task 6.2.0
+- Add Node 20 support ([#74](https://github.com/qetza/replacetokens-task/issues/74)).
+
+Task 5.5.0
+- Add Node 20 support ([#74](https://github.com/qetza/replacetokens-task/issues/74)).
+
## 5.1.0
Task 6.1.0
- Add _useAdditionalVariablesOnly_ parameter ([#29](https://github.com/qetza/replacetokens-task/issues/60)).
diff --git a/package-lock.json b/package-lock.json
index e234388..8729f13 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,8 +15,8 @@
"prettier": "^3.2.5",
"semver": "^7.6.0",
"shelljs": "^0.8.5",
- "tfx-cli": "^0.16.0",
- "typescript": "^4.8.4"
+ "tfx-cli": "^0.21.0",
+ "typescript": "^5.1.6"
}
},
"node_modules/@babel/code-frame": {
@@ -92,10 +92,11 @@
}
},
"node_modules/ansi-colors": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
- "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
+ "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
@@ -302,12 +303,13 @@
}
},
"node_modules/braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "fill-range": "^7.0.1"
+ "fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@@ -567,8 +569,9 @@
"node_modules/cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+ "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
@@ -601,12 +604,13 @@
}
},
"node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
+ "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
@@ -617,12 +621,6 @@
}
}
},
- "node_modules/debug/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
"node_modules/decamelize": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.0.tgz",
@@ -679,10 +677,11 @@
}
},
"node_modules/diff": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
- "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
+ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
"dev": true,
+ "license": "BSD-3-Clause",
"engines": {
"node": ">=0.3.1"
}
@@ -780,8 +779,9 @@
"node_modules/execa": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz",
- "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=",
+ "integrity": "sha512-zDWS+Rb1E8BlqqhALSt9kUhss8Qq4nN3iof3gsOdyINksElaPyNBtKUMTR62qhvgVWR0CqCX7sdnKe4MnUbFEA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
@@ -805,10 +805,11 @@
}
},
"node_modules/fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
},
@@ -1293,6 +1294,7 @@
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.12.0"
}
@@ -1708,31 +1710,32 @@
}
},
"node_modules/mocha": {
- "version": "10.3.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz",
- "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==",
- "dev": true,
- "dependencies": {
- "ansi-colors": "4.1.1",
- "browser-stdout": "1.3.1",
- "chokidar": "3.5.3",
- "debug": "4.3.4",
- "diff": "5.0.0",
- "escape-string-regexp": "4.0.0",
- "find-up": "5.0.0",
- "glob": "8.1.0",
- "he": "1.2.0",
- "js-yaml": "4.1.0",
- "log-symbols": "4.1.0",
- "minimatch": "5.0.1",
- "ms": "2.1.3",
- "serialize-javascript": "6.0.0",
- "strip-json-comments": "3.1.1",
- "supports-color": "8.1.1",
- "workerpool": "6.2.1",
- "yargs": "16.2.0",
- "yargs-parser": "20.2.4",
- "yargs-unparser": "2.0.0"
+ "version": "10.8.2",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz",
+ "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-colors": "^4.1.3",
+ "browser-stdout": "^1.3.1",
+ "chokidar": "^3.5.3",
+ "debug": "^4.3.5",
+ "diff": "^5.2.0",
+ "escape-string-regexp": "^4.0.0",
+ "find-up": "^5.0.0",
+ "glob": "^8.1.0",
+ "he": "^1.2.0",
+ "js-yaml": "^4.1.0",
+ "log-symbols": "^4.1.0",
+ "minimatch": "^5.1.6",
+ "ms": "^2.1.3",
+ "serialize-javascript": "^6.0.2",
+ "strip-json-comments": "^3.1.1",
+ "supports-color": "^8.1.1",
+ "workerpool": "^6.5.1",
+ "yargs": "^16.2.0",
+ "yargs-parser": "^20.2.9",
+ "yargs-unparser": "^2.0.0"
},
"bin": {
"_mocha": "bin/_mocha",
@@ -1792,10 +1795,11 @@
}
},
"node_modules/mocha/node_modules/minimatch": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
- "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
},
@@ -1818,15 +1822,6 @@
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
- "node_modules/mocha/node_modules/yargs-parser": {
- "version": "20.2.4",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
- "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -2150,6 +2145,7 @@
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"safe-buffer": "^5.1.0"
}
@@ -2343,10 +2339,11 @@
"dev": true
},
"node_modules/serialize-javascript": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
- "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
+ "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true,
+ "license": "BSD-3-Clause",
"dependencies": {
"randombytes": "^2.1.0"
}
@@ -2596,10 +2593,11 @@
}
},
"node_modules/tfx-cli": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/tfx-cli/-/tfx-cli-0.16.0.tgz",
- "integrity": "sha512-kWRIvZiHWqpaCnHmXmJ/+Bzegiaf+q1+lkG0ht2+REW7qmQDaRMgeMeCiQCk0UDudQN1cPhPJSalzy3BwwxGuA==",
+ "version": "0.21.0",
+ "resolved": "https://registry.npmjs.org/tfx-cli/-/tfx-cli-0.21.0.tgz",
+ "integrity": "sha512-zyrRi7lwBVAlEHPNJOzP61pE0Y2N9T/WQFYkkNY0+OEP5uTX8/bOP9Mxv/TtR99fdJmjv5L/b3lVuAXn7h8fBg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"app-root-path": "1.0.0",
"archiver": "2.0.3",
@@ -2682,6 +2680,7 @@
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
},
@@ -2757,16 +2756,17 @@
}
},
"node_modules/typescript": {
- "version": "4.8.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
- "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
+ "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
"dev": true,
+ "license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=4.2.0"
+ "node": ">=14.17"
}
},
"node_modules/unbox-primitive": {
@@ -2911,10 +2911,11 @@
}
},
"node_modules/workerpool": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz",
- "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==",
- "dev": true
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz",
+ "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==",
+ "dev": true,
+ "license": "Apache-2.0"
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
@@ -3168,9 +3169,9 @@
"dev": true
},
"ansi-colors": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
- "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
+ "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
"dev": true
},
"ansi-regex": {
@@ -3327,12 +3328,12 @@
}
},
"braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"requires": {
- "fill-range": "^7.0.1"
+ "fill-range": "^7.1.1"
}
},
"browser-stdout": {
@@ -3530,7 +3531,7 @@
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+ "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==",
"dev": true,
"requires": {
"lru-cache": "^4.0.1",
@@ -3555,20 +3556,12 @@
}
},
"debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
+ "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
"dev": true,
"requires": {
- "ms": "2.1.2"
- },
- "dependencies": {
- "ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- }
+ "ms": "^2.1.3"
}
},
"decamelize": {
@@ -3611,9 +3604,9 @@
}
},
"diff": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
- "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
+ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
"dev": true
},
"emoji-regex": {
@@ -3691,7 +3684,7 @@
"execa": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz",
- "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=",
+ "integrity": "sha512-zDWS+Rb1E8BlqqhALSt9kUhss8Qq4nN3iof3gsOdyINksElaPyNBtKUMTR62qhvgVWR0CqCX7sdnKe4MnUbFEA==",
"dev": true,
"requires": {
"cross-spawn": "^5.0.1",
@@ -3710,9 +3703,9 @@
"dev": true
},
"fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
@@ -4359,31 +4352,31 @@
"dev": true
},
"mocha": {
- "version": "10.3.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz",
- "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==",
+ "version": "10.8.2",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz",
+ "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==",
"dev": true,
"requires": {
- "ansi-colors": "4.1.1",
- "browser-stdout": "1.3.1",
- "chokidar": "3.5.3",
- "debug": "4.3.4",
- "diff": "5.0.0",
- "escape-string-regexp": "4.0.0",
- "find-up": "5.0.0",
- "glob": "8.1.0",
- "he": "1.2.0",
- "js-yaml": "4.1.0",
- "log-symbols": "4.1.0",
- "minimatch": "5.0.1",
- "ms": "2.1.3",
- "serialize-javascript": "6.0.0",
- "strip-json-comments": "3.1.1",
- "supports-color": "8.1.1",
- "workerpool": "6.2.1",
- "yargs": "16.2.0",
- "yargs-parser": "20.2.4",
- "yargs-unparser": "2.0.0"
+ "ansi-colors": "^4.1.3",
+ "browser-stdout": "^1.3.1",
+ "chokidar": "^3.5.3",
+ "debug": "^4.3.5",
+ "diff": "^5.2.0",
+ "escape-string-regexp": "^4.0.0",
+ "find-up": "^5.0.0",
+ "glob": "^8.1.0",
+ "he": "^1.2.0",
+ "js-yaml": "^4.1.0",
+ "log-symbols": "^4.1.0",
+ "minimatch": "^5.1.6",
+ "ms": "^2.1.3",
+ "serialize-javascript": "^6.0.2",
+ "strip-json-comments": "^3.1.1",
+ "supports-color": "^8.1.1",
+ "workerpool": "^6.5.1",
+ "yargs": "^16.2.0",
+ "yargs-parser": "^20.2.9",
+ "yargs-unparser": "^2.0.0"
},
"dependencies": {
"brace-expansion": {
@@ -4421,9 +4414,9 @@
"dev": true
},
"minimatch": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
- "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
@@ -4437,12 +4430,6 @@
"requires": {
"has-flag": "^4.0.0"
}
- },
- "yargs-parser": {
- "version": "20.2.4",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
- "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
- "dev": true
}
}
},
@@ -4820,9 +4807,9 @@
}
},
"serialize-javascript": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
- "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
+ "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true,
"requires": {
"randombytes": "^2.1.0"
@@ -5016,9 +5003,9 @@
}
},
"tfx-cli": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/tfx-cli/-/tfx-cli-0.16.0.tgz",
- "integrity": "sha512-kWRIvZiHWqpaCnHmXmJ/+Bzegiaf+q1+lkG0ht2+REW7qmQDaRMgeMeCiQCk0UDudQN1cPhPJSalzy3BwwxGuA==",
+ "version": "0.21.0",
+ "resolved": "https://registry.npmjs.org/tfx-cli/-/tfx-cli-0.21.0.tgz",
+ "integrity": "sha512-zyrRi7lwBVAlEHPNJOzP61pE0Y2N9T/WQFYkkNY0+OEP5uTX8/bOP9Mxv/TtR99fdJmjv5L/b3lVuAXn7h8fBg==",
"dev": true,
"requires": {
"app-root-path": "1.0.0",
@@ -5142,9 +5129,9 @@
}
},
"typescript": {
- "version": "4.8.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
- "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
+ "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
"dev": true
},
"unbox-primitive": {
@@ -5263,9 +5250,9 @@
}
},
"workerpool": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz",
- "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==",
+ "version": "6.5.1",
+ "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz",
+ "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==",
"dev": true
},
"wrap-ansi": {
diff --git a/package.json b/package.json
index f87a569..615932d 100644
--- a/package.json
+++ b/package.json
@@ -48,7 +48,7 @@
"prettier": "^3.2.5",
"semver": "^7.6.0",
"shelljs": "^0.8.5",
- "tfx-cli": "^0.16.0",
- "typescript": "^4.8.4"
+ "tfx-cli": "^0.21.0",
+ "typescript": "^5.1.6"
}
}
diff --git a/tasks/ReplaceTokensV5/CHANGELOG.md b/tasks/ReplaceTokensV5/CHANGELOG.md
index 513948b..f3aec0d 100644
--- a/tasks/ReplaceTokensV5/CHANGELOG.md
+++ b/tasks/ReplaceTokensV5/CHANGELOG.md
@@ -1,4 +1,7 @@
# Changelog
+## 5.5.0
+- Add Node 20 support ([#74](https://github.com/qetza/replacetokens-task/issues/74)).
+
## 5.4.0
- Add _useAdditionalVariablesOnly_ parameter ([#29](https://github.com/qetza/replacetokens-task/issues/60)).
diff --git a/tasks/ReplaceTokensV5/package-lock.json b/tasks/ReplaceTokensV5/package-lock.json
index 65239a8..f033b90 100644
--- a/tasks/ReplaceTokensV5/package-lock.json
+++ b/tasks/ReplaceTokensV5/package-lock.json
@@ -7,7 +7,7 @@
"": {
"name": "replacetokens-v5",
"dependencies": {
- "azure-pipelines-task-lib": "^4.1.0",
+ "azure-pipelines-task-lib": "^4.13.0",
"iconv-lite": "^0.4.15",
"js-yaml": "^4.0.0",
"jschardet": "^2.2.1"
@@ -16,7 +16,7 @@
"@types/chai": "^4.3.12",
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.6",
- "@types/node": "^10.17.60",
+ "@types/node": "^20.3.1",
"chai": "^4.4.1"
}
},
@@ -39,10 +39,11 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "10.17.60",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
- "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
- "dev": true
+ "version": "20.3.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
+ "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/adm-zip": {
"version": "0.5.10",
@@ -99,12 +100,12 @@
}
},
"node_modules/azure-pipelines-task-lib": {
- "version": "4.10.0",
- "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.10.0.tgz",
- "integrity": "sha512-/j5nwVEPYx/WV/5H66BuMK3ubrKYFgbFc0yPmEwfXvDwNbgXeIHtcXXZGHiCVq2q+JmHcFYav9sfOrCq2O2Bdg==",
+ "version": "4.13.0",
+ "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.13.0.tgz",
+ "integrity": "sha512-KVguui31If98vgokNepHUxE3/D8UFB4FHV1U6XxjGOkgxxwKxbupC3knVnEiZA/hNl7X+vmj9KrYOx79iwmezQ==",
+ "license": "MIT",
"dependencies": {
"adm-zip": "^0.5.10",
- "deasync": "^0.1.28",
"minimatch": "3.0.5",
"nodejs-file-downloader": "^4.11.1",
"q": "^1.5.1",
@@ -118,14 +119,6 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
- "node_modules/bindings": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
- "dependencies": {
- "file-uri-to-path": "1.0.0"
- }
- },
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -170,19 +163,6 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
- "node_modules/deasync": {
- "version": "0.1.29",
- "resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.29.tgz",
- "integrity": "sha512-EBtfUhVX23CE9GR6m+F8WPeImEE4hR/FW9RkK0PMl9V1t283s0elqsTD8EZjaKX28SY1BW2rYfCgNsAYdpamUw==",
- "hasInstallScript": true,
- "dependencies": {
- "bindings": "^1.5.0",
- "node-addon-api": "^1.7.1"
- },
- "engines": {
- "node": ">=0.11.0"
- }
- },
"node_modules/deep-eql": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
@@ -195,21 +175,17 @@
"node": ">=6"
}
},
- "node_modules/file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
- },
"node_modules/follow-redirects": {
- "version": "1.15.5",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
- "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
+ "version": "1.15.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
+ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
+ "license": "MIT",
"engines": {
"node": ">=4.0"
},
@@ -406,11 +382,6 @@
"node": "*"
}
},
- "node_modules/node-addon-api": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
- "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
- },
"node_modules/nodejs-file-downloader": {
"version": "4.12.1",
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
@@ -593,9 +564,9 @@
"dev": true
},
"@types/node": {
- "version": "10.17.60",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
- "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
+ "version": "20.3.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
+ "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==",
"dev": true
},
"adm-zip": {
@@ -638,12 +609,11 @@
"dev": true
},
"azure-pipelines-task-lib": {
- "version": "4.10.0",
- "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.10.0.tgz",
- "integrity": "sha512-/j5nwVEPYx/WV/5H66BuMK3ubrKYFgbFc0yPmEwfXvDwNbgXeIHtcXXZGHiCVq2q+JmHcFYav9sfOrCq2O2Bdg==",
+ "version": "4.13.0",
+ "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.13.0.tgz",
+ "integrity": "sha512-KVguui31If98vgokNepHUxE3/D8UFB4FHV1U6XxjGOkgxxwKxbupC3knVnEiZA/hNl7X+vmj9KrYOx79iwmezQ==",
"requires": {
"adm-zip": "^0.5.10",
- "deasync": "^0.1.28",
"minimatch": "3.0.5",
"nodejs-file-downloader": "^4.11.1",
"q": "^1.5.1",
@@ -657,14 +627,6 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
- "bindings": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
- "requires": {
- "file-uri-to-path": "1.0.0"
- }
- },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -703,15 +665,6 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
- "deasync": {
- "version": "0.1.29",
- "resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.29.tgz",
- "integrity": "sha512-EBtfUhVX23CE9GR6m+F8WPeImEE4hR/FW9RkK0PMl9V1t283s0elqsTD8EZjaKX28SY1BW2rYfCgNsAYdpamUw==",
- "requires": {
- "bindings": "^1.5.0",
- "node-addon-api": "^1.7.1"
- }
- },
"deep-eql": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
@@ -721,15 +674,10 @@
"type-detect": "^4.0.0"
}
},
- "file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
- },
"follow-redirects": {
- "version": "1.15.5",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
- "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw=="
+ "version": "1.15.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
+ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ=="
},
"fs.realpath": {
"version": "1.0.0",
@@ -870,11 +818,6 @@
"brace-expansion": "^1.1.7"
}
},
- "node-addon-api": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
- "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
- },
"nodejs-file-downloader": {
"version": "4.12.1",
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
diff --git a/tasks/ReplaceTokensV5/package.json b/tasks/ReplaceTokensV5/package.json
index ae608b6..154f5c2 100644
--- a/tasks/ReplaceTokensV5/package.json
+++ b/tasks/ReplaceTokensV5/package.json
@@ -2,7 +2,7 @@
"name": "replacetokens-v5",
"author": "Guillaume ROUCHON",
"dependencies": {
- "azure-pipelines-task-lib": "^4.1.0",
+ "azure-pipelines-task-lib": "^4.13.0",
"iconv-lite": "^0.4.15",
"js-yaml": "^4.0.0",
"jschardet": "^2.2.1"
@@ -11,7 +11,7 @@
"@types/chai": "^4.3.12",
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.6",
- "@types/node": "^10.17.60",
+ "@types/node": "^20.3.1",
"chai": "^4.4.1"
}
}
diff --git a/tasks/ReplaceTokensV5/task.json b/tasks/ReplaceTokensV5/task.json
index 692ab2a..ed97f1e 100644
--- a/tasks/ReplaceTokensV5/task.json
+++ b/tasks/ReplaceTokensV5/task.json
@@ -12,7 +12,7 @@
"author": "Guillaume ROUCHON",
"version": {
"Major": 5,
- "Minor": 4,
+ "Minor": 5,
"Patch": 0
},
"releaseNotes": "Migrate to Node10 handler (breaking change).
Add Node16 handler.",
@@ -357,6 +357,10 @@
"Node16": {
"target": "index.js",
"argumentFormat": ""
+ },
+ "Node20_1": {
+ "target": "index.js",
+ "argumentFormat": ""
}
}
}
\ No newline at end of file
diff --git a/tasks/ReplaceTokensV5/tests/L0.ts b/tasks/ReplaceTokensV5/tests/L0.ts
index f7dab44..1300659 100644
--- a/tasks/ReplaceTokensV5/tests/L0.ts
+++ b/tasks/ReplaceTokensV5/tests/L0.ts
@@ -11,17 +11,14 @@ const tmp = path.join(__dirname, '_tmp');
describe('ReplaceTokens v5 L0 suite', function () {
this.timeout(10000);
- function runValidation(validator: () => void, tr: ttm.MockTestRunner, done: Mocha.Done) {
+ function runValidation(validator: () => void, tr: ttm.MockTestRunner) {
try {
validator();
- done();
} catch (err) {
- console.log('STDERR');
- console.log(tr.stderr);
- console.log('STDOUT');
- console.log(tr.stdout);
+ console.log('STDERR', tr.stderr);
+ console.log('STDOUT', tr.stdout);
- done(err);
+ throw err;
}
}
@@ -91,25 +88,21 @@ describe('ReplaceTokens v5 L0 suite', function () {
});
describe('telemetry', function () {
- it('should not call telemetry when disabled by input', function (done: Mocha.Done) {
+ it('should not call telemetry when disabled by input', async () => {
// arrange
let tp: string = path.join(__dirname, 'telemetry', 'L0_TelemetryDisabledByInput.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.stdout.should.not.include('sent usage telemetry:');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.stdout.should.not.include('sent usage telemetry:');
+ }, tr);
});
- it('should not call telemetry when disabled by REPLACETOKENS_DISABLE_TELEMETRY', function (done: Mocha.Done) {
+ it('should not call telemetry when disabled by REPLACETOKENS_DISABLE_TELEMETRY', async () => {
// arrange
let tp = path.join(__dirname, 'telemetry', 'L0_TelemetryDisabledByVariable.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -117,20 +110,16 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['REPLACETOKENS_DISABLE_TELEMETRY'] = 'true';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.stdout.should.not.include('telemetry sent');
- tr.stdout.should.not.include('sent usage telemetry:');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.stdout.should.not.include('telemetry sent');
+ tr.stdout.should.not.include('sent usage telemetry:');
+ }, tr);
});
- it('should not call telemetry when disabled by REPLACETOKENS_TELEMETRY_OPTOUT', function (done: Mocha.Done) {
+ it('should not call telemetry when disabled by REPLACETOKENS_TELEMETRY_OPTOUT', async () => {
// arrange
let tp = path.join(__dirname, 'telemetry', 'L0_TelemetryDisabledByVariable.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -138,43 +127,35 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['REPLACETOKENS_TELEMETRY_OPTOUT'] = 'true';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.stdout.should.not.include('telemetry sent');
- tr.stdout.should.not.include('sent usage telemetry:');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.stdout.should.not.include('telemetry sent');
+ tr.stdout.should.not.include('sent usage telemetry:');
+ }, tr);
});
- it('should call telemetry on failure', function (done: Mocha.Done) {
+ it('should call telemetry on failure', async () => {
// arrange
let tp = path.join(__dirname, 'telemetry', 'L0_TelemetryOnFailure.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(false, 'task succeeded');
-
- tr.stdout.should.include('telemetry sent');
- tr.stdout.should.match(
- /\[\{"account":"494d0aad9d06c4ddb51d5300620122ce55366a9382b3cc2835ed5f0e2e67b4d0","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","result":"failed","eventType":"TokensReplaced","application":"replacetokens-task","version":"5.0.0"}]/
- );
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(false, 'task succeeded');
+
+ tr.stdout.should.include('telemetry sent');
+ tr.stdout.should.match(
+ /\[\{"account":"494d0aad9d06c4ddb51d5300620122ce55366a9382b3cc2835ed5f0e2e67b4d0","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","result":"failed","eventType":"TokensReplaced","application":"replacetokens-task","version":"5.0.0"}]/
+ );
+ }, tr);
});
- it('should call telemetry on success', function (done: Mocha.Done) {
+ it('should call telemetry on success', async () => {
// arrange
let tp = path.join(__dirname, 'telemetry', 'L0_TelemetryOnSuccess.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -182,26 +163,22 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_telemetryonsuccess.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.include('telemetry sent');
- tr.stdout.should.match(
- /\[\{"account":"494d0aad9d06c4ddb51d5300620122ce55366a9382b3cc2835ed5f0e2e67b4d0","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","actionOnMissing":"warn","encoding":"auto","keepToken":false,"pattern":"#\\\\{\\\\s\*\(\(\?:\(\?!#\\\\{\)\(\?!\\\\s\*\\\\}#\)\.\)\*\)\\\\s\*\\\\}#","result":"success","rules":1,"rulesWithInputWildcard":0,"rulesWithNegativePattern":0,"rulesWithOutputPattern":0,"tokenPrefix":"#{","tokenSuffix":"}#","variableFiles":0,"verbosity":"normal","writeBOM":true,"useLegacyPattern":false,"enableTransforms":false,"transformPrefix":"\(","transformSuffix":"\)","transformPattern":"\\\\s\*\(\.\*\)\\\\\(\\\\s\*\(\(\?:\(\?!\\\\\(\)\(\?!\\\\s\*\\\\\)\)\.\)\*\)\\\\s\*\\\\\)\\\\s\*","defaultValue":"","tokenPattern":"default","actionOnNoFiles":"continue","inlineVariables":0,"enableRecursion":false,"useLegacyEmptyFeature":false,"useDefaultValue":false,"useAdditionalVariablesOnly":false,"duration":\d+(?:\.\d+)?,"tokenReplaced":1,"tokenFound":1,"defaultValueReplaced":0,"fileProcessed":1,"transformExecuted":0,"eventType":"TokensReplaced","application":"replacetokens-task","version":"5.0.0"}]/
- );
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.include('telemetry sent');
+ tr.stdout.should.match(
+ /\[\{"account":"494d0aad9d06c4ddb51d5300620122ce55366a9382b3cc2835ed5f0e2e67b4d0","pipeline":"b98ed03d3eec376dcc015365c1a944e3ebbcc33d30e3261af3f4e4abb107aa82","host":"server","os":"Windows","actionOnMissing":"warn","encoding":"auto","keepToken":false,"pattern":"#\\\\{\\\\s\*\(\(\?:\(\?!#\\\\{\)\(\?!\\\\s\*\\\\}#\)\.\)\*\)\\\\s\*\\\\}#","result":"success","rules":1,"rulesWithInputWildcard":0,"rulesWithNegativePattern":0,"rulesWithOutputPattern":0,"tokenPrefix":"#{","tokenSuffix":"}#","variableFiles":0,"verbosity":"normal","writeBOM":true,"useLegacyPattern":false,"enableTransforms":false,"transformPrefix":"\(","transformSuffix":"\)","transformPattern":"\\\\s\*\(\.\*\)\\\\\(\\\\s\*\(\(\?:\(\?!\\\\\(\)\(\?!\\\\s\*\\\\\)\)\.\)\*\)\\\\s\*\\\\\)\\\\s\*","defaultValue":"","tokenPattern":"default","actionOnNoFiles":"continue","inlineVariables":0,"enableRecursion":false,"useLegacyEmptyFeature":false,"useDefaultValue":false,"useAdditionalVariablesOnly":false,"duration":\d+(?:\.\d+)?,"tokenReplaced":1,"tokenFound":1,"defaultValueReplaced":0,"fileProcessed":1,"transformExecuted":0,"eventType":"TokensReplaced","application":"replacetokens-task","version":"5.0.0"}]/
+ );
+ }, tr);
});
});
describe('target files', function () {
- it('should replace inline when no output path', function (done: Mocha.Done) {
+ it('should replace inline when no output path', async () => {
// arrange
let tp = path.join(__dirname, 'targetFiles', 'L0_InlineReplace.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -209,21 +186,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_inlinereplace.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace multiple inline when no output path', function (done: Mocha.Done) {
+ it('should replace multiple inline when no output path', async () => {
// arrange
let tp = path.join(__dirname, 'targetFiles', 'L0_MultipleInlineReplace.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -232,22 +205,18 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath2__'] = copyData('default.json', 'default_inlinereplace2.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath1__'], path.join(data, 'default.expected.json'), 'replaced output in first file');
- assertFilesEqual(process.env['__inputpath2__'], path.join(data, 'default.expected.json'), 'replaced output in second file');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath1__'], path.join(data, 'default.expected.json'), 'replaced output in first file');
+ assertFilesEqual(process.env['__inputpath2__'], path.join(data, 'default.expected.json'), 'replaced output in second file');
+ }, tr);
});
- it('should replace in other file when relative output path', function (done: Mocha.Done) {
+ it('should replace in other file when relative output path', async () => {
// arrange
let tp = path.join(__dirname, 'targetFiles', 'L0_OutputReplace.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -256,22 +225,18 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__outputpath__'] = path.join('output', 'default_relativeoutputreplace.output.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(path.join(tmp, process.env['__outputpath__']), path.join(data, 'default.expected.json'), 'replaced output');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.json'), 'input');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(path.join(tmp, process.env['__outputpath__']), path.join(data, 'default.expected.json'), 'replaced output');
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.json'), 'input');
+ }, tr);
});
- it('should replace in other file when absolute output path', function (done: Mocha.Done) {
+ it('should replace in other file when absolute output path', async () => {
// arrange
let tp = path.join(__dirname, 'targetFiles', 'L0_OutputReplace.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -280,22 +245,18 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__outputpath__'] = path.join(tmp, 'output', 'default_absoluteoutputreplace.output.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__outputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.json'), 'input');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__outputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.json'), 'input');
+ }, tr);
});
- it('should replace in other file when wildcard and output path', function (done: Mocha.Done) {
+ it('should replace in other file when wildcard and output path', async () => {
// arrange
let tp = path.join(__dirname, 'targetFiles', 'L0_WildcardReplace.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -305,24 +266,20 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__outputpath__'] = path.join('output', 'default_wildcardreplace.*.output.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(path.join(tmp, 'output', 'default_wildcardreplace.dev.output.json'), path.join(data, 'default.expected.json'), 'replaced output');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.json'), 'input');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(path.join(tmp, 'output', 'default_wildcardreplace.dev.output.json'), path.join(data, 'default.expected.json'), 'replaced output');
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.json'), 'input');
+ }, tr);
});
});
describe('token pattern', function () {
- it('should replace when default pattern', function (done: Mocha.Done) {
+ it('should replace when default pattern', async () => {
// arrange
let tp = path.join(__dirname, 'tokenPattern', 'L0_TokenPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -331,21 +288,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__tokenpattern__'] = 'default';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace when rm pattern', function (done: Mocha.Done) {
+ it('should replace when rm pattern', async () => {
// arrange
let tp = path.join(__dirname, 'tokenPattern', 'L0_TokenPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -354,21 +307,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__tokenpattern__'] = 'rm';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace when octopus pattern', function (done: Mocha.Done) {
+ it('should replace when octopus pattern', async () => {
// arrange
let tp = path.join(__dirname, 'tokenPattern', 'L0_TokenPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -377,21 +326,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__tokenpattern__'] = 'octopus';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace when azpipelines pattern', function (done: Mocha.Done) {
+ it('should replace when azpipelines pattern', async () => {
// arrange
let tp = path.join(__dirname, 'tokenPattern', 'L0_TokenPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -400,21 +345,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__tokenpattern__'] = 'azpipelines';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace when doublebraces pattern', function (done: Mocha.Done) {
+ it('should replace when doublebraces pattern', async () => {
// arrange
let tp = path.join(__dirname, 'tokenPattern', 'L0_TokenPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -423,21 +364,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__tokenpattern__'] = 'doublebraces';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace when custom pattern', function (done: Mocha.Done) {
+ it('should replace when custom pattern', async () => {
// arrange
let tp = path.join(__dirname, 'tokenPattern', 'L0_CustomTokenPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -445,21 +382,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.custom.json', 'default_customtokenpattern.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace when legacy pattern', function (done: Mocha.Done) {
+ it('should replace when legacy pattern', async () => {
// arrange
let tp = path.join(__dirname, 'tokenPattern', 'L0_LegacyTokenPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -467,21 +400,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_legacytokenpattern.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should no replace when legacy pattern', function (done: Mocha.Done) {
+ it('should no replace when legacy pattern', async () => {
// arrange
let tp = path.join(__dirname, 'tokenPattern', 'L0_LegacyTokenPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -489,23 +418,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_newtokenpattern.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
});
describe('keep token', function () {
- it('should replace with empty when not keeping token', function (done: Mocha.Done) {
+ it('should replace with empty when not keeping token', async () => {
// arrange
let tp = path.join(__dirname, 'keepToken', 'L0_KeepToken.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -514,21 +439,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__keeptoken__'] = 'false';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_noreplace.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_noreplace.json'), 'replaced output');
+ }, tr);
});
- it('should replace with token when keeping token', function (done: Mocha.Done) {
+ it('should replace with token when keeping token', async () => {
// arrange
let tp = path.join(__dirname, 'keepToken', 'L0_KeepToken.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -537,23 +458,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__keeptoken__'] = 'true';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.json'), 'replaced output');
+ }, tr);
});
});
describe('transforms', function () {
- it('should uppercase replaced value with transform', function (done: Mocha.Done) {
+ it('should uppercase replaced value with transform', async () => {
// arrange
let tp = path.join(__dirname, 'transforms', 'L0_TransformValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -562,21 +479,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = 'var1_value';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.upper.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.upper.expected.json'), 'replaced output');
+ }, tr);
});
- it('should lowercase replaced value with transform', function (done: Mocha.Done) {
+ it('should lowercase replaced value with transform', async () => {
// arrange
let tp = path.join(__dirname, 'transforms', 'L0_TransformValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -585,21 +498,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = 'VAR1_VALUE';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.lower.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.lower.expected.json'), 'replaced output');
+ }, tr);
});
- it('should base64 replaced value with transform', function (done: Mocha.Done) {
+ it('should base64 replaced value with transform', async () => {
// arrange
let tp = path.join(__dirname, 'transforms', 'L0_TransformValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -608,21 +517,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = 'var1_value';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.base64.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.base64.expected.json'), 'replaced output');
+ }, tr);
});
- it('should not escape replaced value with transform', function (done: Mocha.Done) {
+ it('should not escape replaced value with transform', async () => {
// arrange
let tp = path.join(__dirname, 'transforms', 'L0_TransformValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -631,21 +536,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = '"var1_value"';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.noescape.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.noescape.expected.json'), 'replaced output');
+ }, tr);
});
- it('should transform replaced value with custom transform pattern', function (done: Mocha.Done) {
+ it('should transform replaced value with custom transform pattern', async () => {
// arrange
let tp = path.join(__dirname, 'transforms', 'L0_TransformPattern.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -653,21 +554,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('transform.custom.json', 'transform_custom.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.upper.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.upper.expected.json'), 'replaced output');
+ }, tr);
});
- it('should indent replaced value with transform', function (done: Mocha.Done) {
+ it('should indent replaced value with transform', async () => {
// arrange
let tp = path.join(__dirname, 'transforms', 'L0_TransformValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -676,23 +573,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = 'line1\nline2\nline3';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.indent.expected.yml'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'transform.indent.expected.yml'), 'replaced output');
+ }, tr);
});
});
describe('action on missing', function () {
- it('should display information on missing value when continue silently', function (done: Mocha.Done) {
+ it('should display information on missing value when continue silently', async () => {
// arrange
let tp = path.join(__dirname, 'actionOnMissing', 'L0_ActionOnMissing.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -701,21 +594,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__actiononmissing__'] = 'continue';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.include('##vso[task.debug] variable not found: var1');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.include('##vso[task.debug] variable not found: var1');
+ }, tr);
});
- it('should display warn on missing value when warning', function (done: Mocha.Done) {
+ it('should display warn on missing value when warning', async () => {
// arrange
let tp = path.join(__dirname, 'actionOnMissing', 'L0_ActionOnMissing.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -724,21 +613,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__actiononmissing__'] = 'warn';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.include('##vso[task.issue type=warning;source=TaskInternal;] variable not found: var1');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.include('##vso[task.issue type=warning;source=TaskInternal;] variable not found: var1');
+ }, tr);
});
- it('should fail on missing value when fail', function (done: Mocha.Done) {
+ it('should fail on missing value when fail', async () => {
// arrange
let tp = path.join(__dirname, 'actionOnMissing', 'L0_ActionOnMissing.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -747,23 +632,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__actiononmissing__'] = 'fail';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(false, 'task succeeded');
-
- tr.stdout.should.include('##vso[task.issue type=error;source=TaskInternal;] variable not found: var1');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(false, 'task succeeded');
+
+ tr.stdout.should.include('##vso[task.issue type=error;source=TaskInternal;] variable not found: var1');
+ }, tr);
});
});
describe('logs', function () {
- it('should log minimal when normal', function (done: Mocha.Done) {
+ it('should log minimal when normal', async () => {
// arrange
let tp = path.join(__dirname, 'logs', 'L0_Verbosity.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -772,26 +653,22 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__verbosity__'] = 'normal';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.include('##[group]replacing tokens in: ' + process.env['__inputpath__']);
- tr.stdout.should.not.include('\n using encoding: ascii');
- tr.stdout.should.not.include('\n var1: var1_value');
- tr.stdout.should.include('1 token(s) replaced out of 1');
-
- tr.stdout.should.include('replaced 1 tokens out of 1 in 1 file(s)');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.include('##[group]replacing tokens in: ' + process.env['__inputpath__']);
+ tr.stdout.should.not.include('\n using encoding: ascii');
+ tr.stdout.should.not.include('\n var1: var1_value');
+ tr.stdout.should.include('1 token(s) replaced out of 1');
+
+ tr.stdout.should.include('replaced 1 tokens out of 1 in 1 file(s)');
+ }, tr);
});
- it('should log all when detailed', function (done: Mocha.Done) {
+ it('should log all when detailed', async () => {
// arrange
let tp = path.join(__dirname, 'logs', 'L0_Verbosity.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -800,26 +677,22 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__verbosity__'] = 'detailed';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.include('##[group]replacing tokens in: ' + process.env['__inputpath__']);
- tr.stdout.should.include('\n using encoding: ascii');
- tr.stdout.should.include('\n var1: var1_value');
- tr.stdout.should.include('1 token(s) replaced out of 1');
-
- tr.stdout.should.include('replaced 1 tokens out of 1 in 1 file(s)');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.include('##[group]replacing tokens in: ' + process.env['__inputpath__']);
+ tr.stdout.should.include('\n using encoding: ascii');
+ tr.stdout.should.include('\n var1: var1_value');
+ tr.stdout.should.include('1 token(s) replaced out of 1');
+
+ tr.stdout.should.include('replaced 1 tokens out of 1 in 1 file(s)');
+ }, tr);
});
- it('should not log when off', function (done: Mocha.Done) {
+ it('should not log when off', async () => {
// arrange
let tp = path.join(__dirname, 'logs', 'L0_Verbosity.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -828,26 +701,22 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__verbosity__'] = 'off';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.not.include('##[group]replacing tokens in: ' + process.env['__inputpath__']);
- tr.stdout.should.not.include('\n using encoding: ascii');
- tr.stdout.should.not.include('\n var1: var1_value');
- tr.stdout.should.not.include('1 token(s) replaced out of 1');
-
- tr.stdout.should.not.include('replaced 1 tokens out of 1 in 1 file(s)');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.not.include('##[group]replacing tokens in: ' + process.env['__inputpath__']);
+ tr.stdout.should.not.include('\n using encoding: ascii');
+ tr.stdout.should.not.include('\n var1: var1_value');
+ tr.stdout.should.not.include('1 token(s) replaced out of 1');
+
+ tr.stdout.should.not.include('replaced 1 tokens out of 1 in 1 file(s)');
+ }, tr);
});
- it('should log summary when replaced', function (done: Mocha.Done) {
+ it('should log summary when replaced', async () => {
// arrange
let tp = path.join(__dirname, 'logs', 'L0_Logs.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -856,29 +725,25 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath2__'] = copyData('logs.json', 'default_logs2.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.include('replaced 8 tokens out of 8 (using 2 default value(s)) and running 2 functions in 2 file(s)');
-
- tr.stdout.should.include('##vso[task.setvariable variable=tokenReplacedCount;isOutput=false;issecret=false;]8');
- tr.stdout.should.include('##vso[task.setvariable variable=tokenFoundCount;isOutput=false;issecret=false;]8');
- tr.stdout.should.include('##vso[task.setvariable variable=fileProcessedCount;isOutput=false;issecret=false;]2');
- tr.stdout.should.include('##vso[task.setvariable variable=transformExecutedCount;isOutput=false;issecret=false;]2');
- tr.stdout.should.include('##vso[task.setvariable variable=defaultValueCount;isOutput=false;issecret=false;]2');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.include('replaced 8 tokens out of 8 (using 2 default value(s)) and running 2 functions in 2 file(s)');
+
+ tr.stdout.should.include('##vso[task.setvariable variable=tokenReplacedCount;isOutput=false;issecret=false;]8');
+ tr.stdout.should.include('##vso[task.setvariable variable=tokenFoundCount;isOutput=false;issecret=false;]8');
+ tr.stdout.should.include('##vso[task.setvariable variable=fileProcessedCount;isOutput=false;issecret=false;]2');
+ tr.stdout.should.include('##vso[task.setvariable variable=transformExecutedCount;isOutput=false;issecret=false;]2');
+ tr.stdout.should.include('##vso[task.setvariable variable=defaultValueCount;isOutput=false;issecret=false;]2');
+ }, tr);
});
});
describe('escape characters', function () {
- it('should escape json when auto on .json', function (done: Mocha.Done) {
+ it('should escape json when auto on .json', async () => {
// arrange
let tp = path.join(__dirname, 'escapeChars', 'L0_EscapeType.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -888,21 +753,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = '"var\\1\n\r\tvalue\b\f';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_escape.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_escape.json'), 'replaced output');
+ }, tr);
});
- it('should escape xml when auto on .xml', function (done: Mocha.Done) {
+ it('should escape xml when auto on .xml', async () => {
// arrange
let tp = path.join(__dirname, 'escapeChars', 'L0_EscapeType.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -912,21 +773,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = '"var\'1&';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_escape.xml'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_escape.xml'), 'replaced output');
+ }, tr);
});
- it('should not escape when none', function (done: Mocha.Done) {
+ it('should not escape when none', async () => {
// arrange
let tp = path.join(__dirname, 'escapeChars', 'L0_EscapeType.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -936,21 +793,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = '"var\\1\n\r\tvalue\b\f';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_noescape.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_noescape.json'), 'replaced output');
+ }, tr);
});
- it('should escape json when json', function (done: Mocha.Done) {
+ it('should escape json when json', async () => {
// arrange
let tp = path.join(__dirname, 'escapeChars', 'L0_EscapeType.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -960,21 +813,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = '"var\\1\n\r\tvalue\b\f';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_escape.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_escape.json'), 'replaced output');
+ }, tr);
});
- it('should escape xml when xml', function (done: Mocha.Done) {
+ it('should escape xml when xml', async () => {
// arrange
let tp = path.join(__dirname, 'escapeChars', 'L0_EscapeType.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -984,21 +833,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = '"var\'1&';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_escape.xml'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_escape.xml'), 'replaced output');
+ }, tr);
});
- it('should escape custom when custom', function (done: Mocha.Done) {
+ it('should escape custom when custom', async () => {
// arrange
let tp = path.join(__dirname, 'escapeChars', 'L0_CustomEscapeType.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1006,23 +851,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_customescape.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_customescape.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_customescape.json'), 'replaced output');
+ }, tr);
});
});
describe('action on no file', function () {
- it('should display information on no file when continue silently', function (done: Mocha.Done) {
+ it('should display information on no file when continue silently', async () => {
// arrange
let tp = path.join(__dirname, 'actionOnNoFile', 'L0_ActionOnNoFile.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1030,21 +871,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__actiononnofiles__'] = 'continue';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.include('replaced 0 tokens out of 0 in 0 file(s)');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.include('replaced 0 tokens out of 0 in 0 file(s)');
+ }, tr);
});
- it('should display warn on no file when warn', function (done: Mocha.Done) {
+ it('should display warn on no file when warn', async () => {
// arrange
let tp = path.join(__dirname, 'actionOnNoFile', 'L0_ActionOnNoFile.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1052,21 +889,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__actiononnofiles__'] = 'warn';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- tr.stdout.should.include('##vso[task.issue type=warning;source=TaskInternal;]found no files to process');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ tr.stdout.should.include('##vso[task.issue type=warning;source=TaskInternal;]found no files to process');
+ }, tr);
});
- it('should fail on no file when fail', function (done: Mocha.Done) {
+ it('should fail on no file when fail', async () => {
// arrange
let tp = path.join(__dirname, 'actionOnNoFile', 'L0_ActionOnNoFile.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1074,23 +907,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__actiononnofiles__'] = 'fail';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(false, 'task succeeded');
-
- tr.stdout.should.include('##vso[task.issue type=error;source=TaskInternal;]found no files to process');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(false, 'task succeeded');
+
+ tr.stdout.should.include('##vso[task.issue type=error;source=TaskInternal;]found no files to process');
+ }, tr);
});
});
describe('empty value', function () {
- it('should replace empty value when legacy', function (done: Mocha.Done) {
+ it('should replace empty value when legacy', async () => {
// arrange
let tp = path.join(__dirname, 'emptyValue', 'L0_LegacyEmptyValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1099,23 +928,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = '';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.not.include('##vso[task.debug] variable not found: var1');
+ tr.stdout.should.not.include('##vso[task.debug] variable not found: var1');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_empty.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_empty.json'), 'replaced output');
+ }, tr);
});
- it('should replace empty value when new', function (done: Mocha.Done) {
+ it('should replace empty value when new', async () => {
// arrange
let tp = path.join(__dirname, 'emptyValue', 'L0_EmptyValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1123,23 +948,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_empty.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.not.include('##vso[task.debug] variable not found: var1');
+ tr.stdout.should.not.include('##vso[task.debug] variable not found: var1');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_empty.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_empty.json'), 'replaced output');
+ }, tr);
});
- it('should not replace empty value when new and empty token', function (done: Mocha.Done) {
+ it('should not replace empty value when new and empty token', async () => {
// arrange
let tp = path.join(__dirname, 'emptyValue', 'L0_EmptyValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1148,25 +969,21 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['VAR1'] = '(empty)';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.not.include('##vso[task.debug] variable not found: var1');
+ tr.stdout.should.not.include('##vso[task.debug] variable not found: var1');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_emptytoken.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_emptytoken.json'), 'replaced output');
+ }, tr);
});
});
describe('default value', function () {
- it('should not replace when legacy and no default', function (done: Mocha.Done) {
+ it('should not replace when legacy and no default', async () => {
// arrange
let tp = path.join(__dirname, 'defaultValue', 'L0_LegacyDefaultValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1175,23 +992,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__defaultvalue__'] = '';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.include('##vso[task.issue type=warning;source=TaskInternal;] variable not found: var1');
+ tr.stdout.should.include('##vso[task.issue type=warning;source=TaskInternal;] variable not found: var1');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_noreplace.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_noreplace.json'), 'replaced output');
+ }, tr);
});
- it('should replace with default when legacy and default', function (done: Mocha.Done) {
+ it('should replace with default when legacy and default', async () => {
// arrange
let tp = path.join(__dirname, 'defaultValue', 'L0_LegacyDefaultValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1200,23 +1013,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__defaultvalue__'] = '[default]';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.include('##vso[task.debug] var1: [default] (default value)');
+ tr.stdout.should.include('##vso[task.debug] var1: [default] (default value)');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_default.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_default.json'), 'replaced output');
+ }, tr);
});
- it('should replace with empty when legacy and empty default', function (done: Mocha.Done) {
+ it('should replace with empty when legacy and empty default', async () => {
// arrange
let tp = path.join(__dirname, 'defaultValue', 'L0_LegacyDefaultValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1225,23 +1034,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__defaultvalue__'] = '(empty)';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.include('##vso[task.debug] var1: (default value)');
+ tr.stdout.should.include('##vso[task.debug] var1: (default value)');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_empty.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_empty.json'), 'replaced output');
+ }, tr);
});
- it('should not replace when no default', function (done: Mocha.Done) {
+ it('should not replace when no default', async () => {
// arrange
let tp = path.join(__dirname, 'defaultValue', 'L0_DefaultValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1251,23 +1056,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__defaultvalue__'] = '';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.include('##vso[task.issue type=warning;source=TaskInternal;] variable not found: var1');
+ tr.stdout.should.include('##vso[task.issue type=warning;source=TaskInternal;] variable not found: var1');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_noreplace.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_noreplace.json'), 'replaced output');
+ }, tr);
});
- it('should replace with default when default', function (done: Mocha.Done) {
+ it('should replace with default when default', async () => {
// arrange
let tp = path.join(__dirname, 'defaultValue', 'L0_DefaultValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1277,23 +1078,19 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__defaultvalue__'] = '[default]';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.include('##vso[task.debug] var1: [default] (default value)');
+ tr.stdout.should.include('##vso[task.debug] var1: [default] (default value)');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_default.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_default.json'), 'replaced output');
+ }, tr);
});
- it('should replace with empty when empty default', function (done: Mocha.Done) {
+ it('should replace with empty when empty default', async () => {
// arrange
let tp = path.join(__dirname, 'defaultValue', 'L0_DefaultValue.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1303,25 +1100,21 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__defaultvalue__'] = '';
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
- tr.stdout.should.include('##vso[task.debug] var1: (default value)');
+ tr.stdout.should.include('##vso[task.debug] var1: (default value)');
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_empty.json'), 'replaced output');
- },
- tr,
- done
- );
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_empty.json'), 'replaced output');
+ }, tr);
});
});
describe('recursion', function () {
- it('should not replace recursively when recursion disabled', function (done: Mocha.Done) {
+ it('should not replace recursively when recursion disabled', async () => {
// arrange
let tp = path.join(__dirname, 'recursion', 'L0_DisabledRecursion.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1329,21 +1122,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_disabledrecursion.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_disabledrecursion.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected_disabledrecursion.json'), 'replaced output');
+ }, tr);
});
- it('should replace recursively when recursion', function (done: Mocha.Done) {
+ it('should replace recursively when recursion', async () => {
// arrange
let tp = path.join(__dirname, 'recursion', 'L0_Recursion.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1351,21 +1140,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_recursion.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'default.expected.json'), 'replaced output');
+ }, tr);
});
- it('should fail when cycle recursion', function (done: Mocha.Done) {
+ it('should fail when cycle recursion', async () => {
// arrange
let tp = path.join(__dirname, 'recursion', 'L0_CycleRecursion.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1373,24 +1158,20 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('default.json', 'default_cyclerecursion.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(false, 'task succeeded');
-
- tr.stdout.should.include("##vso[task.issue type=error;source=TaskInternal;]recursion cycle with token 'var1'.");
- tr.stdout.should.include("##vso[task.complete result=Failed;]recursion cycle with token 'var1'.");
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(false, 'task succeeded');
+
+ tr.stdout.should.include("##vso[task.issue type=error;source=TaskInternal;]recursion cycle with token 'var1'.");
+ tr.stdout.should.include("##vso[task.complete result=Failed;]recursion cycle with token 'var1'.");
+ }, tr);
});
});
describe('misc', function () {
- it('should not replace when binary file', function (done: Mocha.Done) {
+ it('should not replace when binary file', async () => {
// arrange
let tp = path.join(__dirname, 'targetFiles', 'L0_InlineReplace.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1398,33 +1179,29 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('binary.jpg', 'binary.jpg');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- let buffer: Buffer = fs.readFileSync(process.env['__inputpath__']);
- let hash = crypto.createHash('sha256');
- hash.update(buffer);
- let actual: string = hash.digest('hex');
-
- buffer = fs.readFileSync(path.join(data, 'binary.jpg'));
- hash = crypto.createHash('sha256');
- hash.update(buffer);
- let expected: string = hash.digest('hex');
-
- actual.should.equal(expected, 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ let buffer: Buffer = fs.readFileSync(process.env['__inputpath__']);
+ let hash = crypto.createHash('sha256');
+ hash.update(buffer);
+ let actual: string = hash.digest('hex');
+
+ buffer = fs.readFileSync(path.join(data, 'binary.jpg'));
+ hash = crypto.createHash('sha256');
+ hash.update(buffer);
+ let expected: string = hash.digest('hex');
+
+ actual.should.equal(expected, 'replaced output');
+ }, tr);
});
});
describe('external variables', function () {
- it('should replace with inline variables in single document', function (done: Mocha.Done) {
+ it('should replace with inline variables in single document', async () => {
// arrange
let tp = path.join(__dirname, 'externalVariables', 'L0_InlineVariablesSingleDocument.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1432,21 +1209,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('variables.json', 'inlinevariables_singledocument.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace with inline variables in multiple documents', function (done: Mocha.Done) {
+ it('should replace with inline variables in multiple documents', async () => {
// arrange
let tp = path.join(__dirname, 'externalVariables', 'L0_InlineVariablesMultipleDocuments.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1454,21 +1227,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__inputpath__'] = copyData('variables.json', 'inlinevariables_multipledocuments.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace with variables from JSON file', function (done: Mocha.Done) {
+ it('should replace with variables from JSON file', async () => {
// arrange
let tp = path.join(__dirname, 'externalVariables', 'L0_SingleFile.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1477,21 +1246,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__variablespath__'] = path.join(data, 'externalvariables.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace with variables from JSON file with comments', function (done: Mocha.Done) {
+ it('should replace with variables from JSON file with comments', async () => {
// arrange
let tp = path.join(__dirname, 'externalVariables', 'L0_SingleFile.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1500,21 +1265,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__variablespath__'] = path.join(data, 'externalvariables_comments.jsonc');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace with variables from multiple JSON files', function (done: Mocha.Done) {
+ it('should replace with variables from multiple JSON files', async () => {
// arrange
let tp = path.join(__dirname, 'externalVariables', 'L0_MultipleFiles.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1524,21 +1285,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__variablespath2__'] = path.join(data, 'externalvariables2.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace with variables from YAML single document file', function (done: Mocha.Done) {
+ it('should replace with variables from YAML single document file', async () => {
// arrange
let tp = path.join(__dirname, 'externalVariables', 'L0_SingleFile.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1547,21 +1304,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__variablespath__'] = path.join(data, 'externalvariables_single.yml');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace with variables from YAML multiple document file', function (done: Mocha.Done) {
+ it('should replace with variables from YAML multiple document file', async () => {
// arrange
let tp = path.join(__dirname, 'externalVariables', 'L0_SingleFile.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1570,21 +1323,17 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__variablespath__'] = path.join(data, 'externalvariables_multiple.yml');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.expected.json'), 'replaced output');
+ }, tr);
});
- it('should replace only with file or inline variables when specified', function (done: Mocha.Done) {
+ it('should replace only with file or inline variables when specified', async () => {
// arrange
let tp = path.join(__dirname, 'externalVariables', 'L0_UseAdditionalVariablesOnly.js');
let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);
@@ -1593,18 +1342,14 @@ describe('ReplaceTokens v5 L0 suite', function () {
process.env['__variablespath__'] = path.join(data, 'externalvariables1.json');
// act
- tr.run();
+ await tr.runAsync();
// assert
- runValidation(
- () => {
- tr.succeeded.should.equal(true, 'task succeeded');
-
- assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.useadditionalvariablesonly.expected.json'), 'replaced output');
- },
- tr,
- done
- );
+ runValidation(() => {
+ tr.succeeded.should.equal(true, 'task succeeded');
+
+ assertFilesEqual(process.env['__inputpath__'], path.join(data, 'variables.useadditionalvariablesonly.expected.json'), 'replaced output');
+ }, tr);
});
});
});
diff --git a/tasks/ReplaceTokensV5/tests/telemetry/L0_TelemetryDisabledByInput.ts b/tasks/ReplaceTokensV5/tests/telemetry/L0_TelemetryDisabledByInput.ts
index c51eaa0..9330e00 100644
--- a/tasks/ReplaceTokensV5/tests/telemetry/L0_TelemetryDisabledByInput.ts
+++ b/tasks/ReplaceTokensV5/tests/telemetry/L0_TelemetryDisabledByInput.ts
@@ -22,8 +22,10 @@ requestClone.on = function () {
requestClone.write = function () {
return true;
};
-requestClone.end = function () {
+requestClone.end = function (callback?: () => void) {
console.log('telemetry sent');
+
+ return this;
};
const httpsClone = Object.assign({}, https);
diff --git a/tasks/ReplaceTokensV5/tests/telemetry/L0_TelemetryDisabledByVariable.ts b/tasks/ReplaceTokensV5/tests/telemetry/L0_TelemetryDisabledByVariable.ts
index b762672..2acfe7b 100644
--- a/tasks/ReplaceTokensV5/tests/telemetry/L0_TelemetryDisabledByVariable.ts
+++ b/tasks/ReplaceTokensV5/tests/telemetry/L0_TelemetryDisabledByVariable.ts
@@ -22,8 +22,10 @@ requestClone.on = function () {
requestClone.write = function () {
return true;
};
-requestClone.end = function () {
+requestClone.end = function (callback?: () => void) {
console.log('telemetry sent');
+
+ return this;
};
const httpsClone = Object.assign({}, https);
diff --git a/tasks/ReplaceTokensV6/CHANGELOG.md b/tasks/ReplaceTokensV6/CHANGELOG.md
index 7c828de..c3503ab 100644
--- a/tasks/ReplaceTokensV6/CHANGELOG.md
+++ b/tasks/ReplaceTokensV6/CHANGELOG.md
@@ -1,4 +1,7 @@
# Changelog
+## 6.2.0
+- Add Node 20 support ([#74](https://github.com/qetza/replacetokens-task/issues/74)).
+
## 6.1.0
- Add _useAdditionalVariablesOnly_ parameter ([#29](https://github.com/qetza/replacetokens-task/issues/60)).
diff --git a/tasks/ReplaceTokensV6/package-lock.json b/tasks/ReplaceTokensV6/package-lock.json
index 7750fb2..e8d718e 100644
--- a/tasks/ReplaceTokensV6/package-lock.json
+++ b/tasks/ReplaceTokensV6/package-lock.json
@@ -11,7 +11,7 @@
"@opentelemetry/semantic-conventions": "^1.22.0",
"@qetza/replacetokens": "^1.6.0",
"axios": "^1.6.7",
- "azure-pipelines-task-lib": "^4.1.0",
+ "azure-pipelines-task-lib": "^4.13.0",
"js-yaml": "^4.1.0",
"replacetokens-task": "file:../.."
},
@@ -19,7 +19,7 @@
"@types/chai": "^4.3.12",
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.6",
- "@types/node": "^16.11.39",
+ "@types/node": "^20.3.1",
"chai": "^4.4.1"
}
},
@@ -33,8 +33,8 @@
"prettier": "^3.2.5",
"semver": "^7.6.0",
"shelljs": "^0.8.5",
- "tfx-cli": "^0.16.0",
- "typescript": "^4.8.4"
+ "tfx-cli": "^0.21.0",
+ "typescript": "^5.1.6"
}
},
"node_modules/@nodelib/fs.scandir": {
@@ -168,10 +168,11 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "16.11.39",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.39.tgz",
- "integrity": "sha512-K0MsdV42vPwm9L6UwhIxMAOmcvH/1OoVkZyCgEtVu4Wx7sElGloy/W7kMBNe/oJ7V/jW9BVt1F6RahH6e7tPXw==",
- "dev": true
+ "version": "20.3.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
+ "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/adm-zip": {
"version": "0.5.10",
@@ -234,22 +235,23 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
- "version": "1.6.7",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz",
- "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==",
+ "version": "1.8.4",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz",
+ "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==",
+ "license": "MIT",
"dependencies": {
- "follow-redirects": "^1.15.4",
+ "follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/azure-pipelines-task-lib": {
- "version": "4.10.0",
- "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.10.0.tgz",
- "integrity": "sha512-/j5nwVEPYx/WV/5H66BuMK3ubrKYFgbFc0yPmEwfXvDwNbgXeIHtcXXZGHiCVq2q+JmHcFYav9sfOrCq2O2Bdg==",
+ "version": "4.13.0",
+ "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.13.0.tgz",
+ "integrity": "sha512-KVguui31If98vgokNepHUxE3/D8UFB4FHV1U6XxjGOkgxxwKxbupC3knVnEiZA/hNl7X+vmj9KrYOx79iwmezQ==",
+ "license": "MIT",
"dependencies": {
"adm-zip": "^0.5.10",
- "deasync": "^0.1.28",
"minimatch": "3.0.5",
"nodejs-file-downloader": "^4.11.1",
"q": "^1.5.1",
@@ -263,14 +265,6 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
- "node_modules/bindings": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
- "dependencies": {
- "file-uri-to-path": "1.0.0"
- }
- },
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -281,11 +275,12 @@
}
},
"node_modules/braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "license": "MIT",
"dependencies": {
- "fill-range": "^7.0.1"
+ "fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@@ -366,19 +361,6 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
- "node_modules/deasync": {
- "version": "0.1.29",
- "resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.29.tgz",
- "integrity": "sha512-EBtfUhVX23CE9GR6m+F8WPeImEE4hR/FW9RkK0PMl9V1t283s0elqsTD8EZjaKX28SY1BW2rYfCgNsAYdpamUw==",
- "hasInstallScript": true,
- "dependencies": {
- "bindings": "^1.5.0",
- "node-addon-api": "^1.7.1"
- },
- "engines": {
- "node": ">=0.11.0"
- }
- },
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -456,15 +438,11 @@
"reusify": "^1.0.4"
}
},
- "node_modules/file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
- },
"node_modules/fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+ "license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
},
@@ -473,15 +451,16 @@
}
},
"node_modules/follow-redirects": {
- "version": "1.15.5",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
- "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
+ "version": "1.15.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
+ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
+ "license": "MIT",
"engines": {
"node": ">=4.0"
},
@@ -673,6 +652,7 @@
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "license": "MIT",
"engines": {
"node": ">=0.12.0"
}
@@ -714,11 +694,12 @@
}
},
"node_modules/micromatch": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
- "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
+ "license": "MIT",
"dependencies": {
- "braces": "^3.0.2",
+ "braces": "^3.0.3",
"picomatch": "^2.3.1"
},
"engines": {
@@ -755,11 +736,6 @@
"node": "*"
}
},
- "node_modules/node-addon-api": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
- "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
- },
"node_modules/nodejs-file-downloader": {
"version": "4.12.1",
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
@@ -991,6 +967,7 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
},
@@ -1176,9 +1153,9 @@
"dev": true
},
"@types/node": {
- "version": "16.11.39",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.39.tgz",
- "integrity": "sha512-K0MsdV42vPwm9L6UwhIxMAOmcvH/1OoVkZyCgEtVu4Wx7sElGloy/W7kMBNe/oJ7V/jW9BVt1F6RahH6e7tPXw==",
+ "version": "20.3.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
+ "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==",
"dev": true
},
"adm-zip": {
@@ -1224,22 +1201,21 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"axios": {
- "version": "1.6.7",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz",
- "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==",
+ "version": "1.8.4",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz",
+ "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==",
"requires": {
- "follow-redirects": "^1.15.4",
+ "follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"azure-pipelines-task-lib": {
- "version": "4.10.0",
- "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.10.0.tgz",
- "integrity": "sha512-/j5nwVEPYx/WV/5H66BuMK3ubrKYFgbFc0yPmEwfXvDwNbgXeIHtcXXZGHiCVq2q+JmHcFYav9sfOrCq2O2Bdg==",
+ "version": "4.13.0",
+ "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.13.0.tgz",
+ "integrity": "sha512-KVguui31If98vgokNepHUxE3/D8UFB4FHV1U6XxjGOkgxxwKxbupC3knVnEiZA/hNl7X+vmj9KrYOx79iwmezQ==",
"requires": {
"adm-zip": "^0.5.10",
- "deasync": "^0.1.28",
"minimatch": "3.0.5",
"nodejs-file-downloader": "^4.11.1",
"q": "^1.5.1",
@@ -1253,14 +1229,6 @@
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
- "bindings": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
- "requires": {
- "file-uri-to-path": "1.0.0"
- }
- },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -1271,11 +1239,11 @@
}
},
"braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"requires": {
- "fill-range": "^7.0.1"
+ "fill-range": "^7.1.1"
}
},
"chai": {
@@ -1338,15 +1306,6 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
- "deasync": {
- "version": "0.1.29",
- "resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.29.tgz",
- "integrity": "sha512-EBtfUhVX23CE9GR6m+F8WPeImEE4hR/FW9RkK0PMl9V1t283s0elqsTD8EZjaKX28SY1BW2rYfCgNsAYdpamUw==",
- "requires": {
- "bindings": "^1.5.0",
- "node-addon-api": "^1.7.1"
- }
- },
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -1406,23 +1365,18 @@
"reusify": "^1.0.4"
}
},
- "file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
- },
"fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"requires": {
"to-regex-range": "^5.0.1"
}
},
"follow-redirects": {
- "version": "1.15.5",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
- "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw=="
+ "version": "1.15.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
+ "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ=="
},
"form-data": {
"version": "4.0.0",
@@ -1589,11 +1543,11 @@
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="
},
"micromatch": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
- "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"requires": {
- "braces": "^3.0.2",
+ "braces": "^3.0.3",
"picomatch": "^2.3.1"
}
},
@@ -1618,11 +1572,6 @@
"brace-expansion": "^1.1.7"
}
},
- "node-addon-api": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
- "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
- },
"nodejs-file-downloader": {
"version": "4.12.1",
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
@@ -1695,8 +1644,8 @@
"prettier": "^3.2.5",
"semver": "^7.6.0",
"shelljs": "^0.8.5",
- "tfx-cli": "^0.16.0",
- "typescript": "^4.8.4"
+ "tfx-cli": "^0.21.0",
+ "typescript": "^5.1.6"
}
},
"require-directory": {
diff --git a/tasks/ReplaceTokensV6/package.json b/tasks/ReplaceTokensV6/package.json
index 1f08369..dcd36d3 100644
--- a/tasks/ReplaceTokensV6/package.json
+++ b/tasks/ReplaceTokensV6/package.json
@@ -10,7 +10,7 @@
"@opentelemetry/semantic-conventions": "^1.22.0",
"@qetza/replacetokens": "^1.6.0",
"axios": "^1.6.7",
- "azure-pipelines-task-lib": "^4.1.0",
+ "azure-pipelines-task-lib": "^4.13.0",
"js-yaml": "^4.1.0",
"replacetokens-task": "file:../.."
},
@@ -18,7 +18,7 @@
"@types/chai": "^4.3.12",
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.6",
- "@types/node": "^16.11.39",
+ "@types/node": "^20.3.1",
"chai": "^4.4.1"
}
}
diff --git a/tasks/ReplaceTokensV6/task.json b/tasks/ReplaceTokensV6/task.json
index e320fa1..6c3d337 100644
--- a/tasks/ReplaceTokensV6/task.json
+++ b/tasks/ReplaceTokensV6/task.json
@@ -12,7 +12,7 @@
"author": "Guillaume ROUCHON",
"version": {
"Major": 6,
- "Minor": 1,
+ "Minor": 2,
"Patch": 0
},
"releaseNotes": "breaking changes, see [changelog](https://github.com/qetza/replacetokens-task/blob/master/tasks/ReplaceTokensV6/CHANGELOG.md)",
@@ -314,6 +314,10 @@
"Node16": {
"target": "index.js",
"argumentFormat": ""
+ },
+ "Node20_1": {
+ "target": "index.js",
+ "argumentFormat": ""
}
}
}
\ No newline at end of file
diff --git a/vss-extension.json b/vss-extension.json
index 285941b..968119b 100644
--- a/vss-extension.json
+++ b/vss-extension.json
@@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "replacetokens",
"name": "Replace Tokens",
- "version": "5.1.0",
+ "version": "5.2.0",
"public": true,
"publisher": "qetza",
"targets": [